diff --git metastore/if/hive_metastore.thrift metastore/if/hive_metastore.thrift deleted file mode 100755 index 042a5d8..0000000 --- metastore/if/hive_metastore.thrift +++ /dev/null @@ -1,1602 +0,0 @@ -#!/usr/local/bin/thrift -java - -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -# -# Thrift Service that the MetaStore is built on -# - -include "share/fb303/if/fb303.thrift" - -namespace java org.apache.hadoop.hive.metastore.api -namespace php metastore -namespace cpp Apache.Hadoop.Hive - -const string DDL_TIME = "transient_lastDdlTime" - -struct Version { - 1: string version, - 2: string comments -} - -struct FieldSchema { - 1: string name, // name of the field - 2: string type, // type of the field. primitive types defined above, specify list, map for lists & maps - 3: string comment -} - -struct SQLPrimaryKey { - 1: string table_db, // table schema - 2: string table_name, // table name - 3: string column_name, // column name - 4: i32 key_seq, // sequence number within primary key - 5: string pk_name, // primary key name - 6: bool enable_cstr, // Enable/Disable - 7: bool validate_cstr, // Validate/No validate - 8: bool rely_cstr // Rely/No Rely -} - -struct SQLForeignKey { - 1: string pktable_db, // primary key table schema - 2: string pktable_name, // primary key table name - 3: string pkcolumn_name, // primary key column name - 4: string fktable_db, // foreign key table schema - 5: string fktable_name, // foreign key table name - 6: string fkcolumn_name, // foreign key column name - 7: i32 key_seq, // sequence within foreign key - 8: i32 update_rule, // what happens to foreign key when parent key is updated - 9: i32 delete_rule, // what happens to foreign key when parent key is deleted - 10: string fk_name, // foreign key name - 11: string pk_name, // primary key name - 12: bool enable_cstr, // Enable/Disable - 13: bool validate_cstr, // Validate/No validate - 14: bool rely_cstr // Rely/No Rely -} - -struct SQLUniqueConstraint { - 1: string table_db, // table schema - 2: string table_name, // table name - 3: string column_name, // column name - 4: i32 key_seq, // sequence number within unique constraint - 5: string uk_name, // unique key name - 6: bool enable_cstr, // Enable/Disable - 7: bool validate_cstr, // Validate/No validate - 8: bool rely_cstr // Rely/No Rely -} - -struct SQLNotNullConstraint { - 1: string table_db, // table schema - 2: string table_name, // table name - 3: string column_name, // column name - 4: string nn_name, // not null name - 5: bool enable_cstr, // Enable/Disable - 6: bool validate_cstr, // Validate/No validate - 7: bool rely_cstr // Rely/No Rely -} - -struct Type { - 1: string name, // one of the types in PrimitiveTypes or CollectionTypes or User defined types - 2: optional string type1, // object type if the name is 'list' (LIST_TYPE), key type if the name is 'map' (MAP_TYPE) - 3: optional string type2, // val type if the name is 'map' (MAP_TYPE) - 4: optional list fields // if the name is one of the user defined types -} - -enum HiveObjectType { - GLOBAL = 1, - DATABASE = 2, - TABLE = 3, - PARTITION = 4, - COLUMN = 5, -} - -enum PrincipalType { - USER = 1, - ROLE = 2, - GROUP = 3, -} - -const string HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__" -const string HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__" -const string HIVE_FILTER_FIELD_LAST_ACCESS = "hive_filter_field_last_access__" - -enum PartitionEventType { - LOAD_DONE = 1, -} - -// Enums for transaction and lock management -enum TxnState { - COMMITTED = 1, - ABORTED = 2, - OPEN = 3, -} - -enum LockLevel { - DB = 1, - TABLE = 2, - PARTITION = 3, -} - -enum LockState { - ACQUIRED = 1, // requester has the lock - WAITING = 2, // requester is waiting for the lock and should call checklock at a later point to see if the lock has been obtained. - ABORT = 3, // the lock has been aborted, most likely due to timeout - NOT_ACQUIRED = 4, // returned only with lockNoWait, indicates the lock was not available and was not acquired -} - -enum LockType { - SHARED_READ = 1, - SHARED_WRITE = 2, - EXCLUSIVE = 3, -} - -enum CompactionType { - MINOR = 1, - MAJOR = 2, -} - -enum GrantRevokeType { - GRANT = 1, - REVOKE = 2, -} - -enum DataOperationType { - SELECT = 1, - INSERT = 2 - UPDATE = 3, - DELETE = 4, - UNSET = 5,//this is the default to distinguish from NULL from old clients - NO_TXN = 6,//drop table, insert overwrite, etc - something non-transactional -} - -// Types of events the client can request that the metastore fire. For now just support DML operations, as the metastore knows -// about DDL operations and there's no reason for the client to request such an event. -enum EventRequestType { - INSERT = 1, - UPDATE = 2, - DELETE = 3, -} - -struct HiveObjectRef{ - 1: HiveObjectType objectType, - 2: string dbName, - 3: string objectName, - 4: list partValues, - 5: string columnName, -} - -struct PrivilegeGrantInfo { - 1: string privilege, - 2: i32 createTime, - 3: string grantor, - 4: PrincipalType grantorType, - 5: bool grantOption, -} - -struct HiveObjectPrivilege { - 1: HiveObjectRef hiveObject, - 2: string principalName, - 3: PrincipalType principalType, - 4: PrivilegeGrantInfo grantInfo, -} - -struct PrivilegeBag { - 1: list privileges, -} - -struct PrincipalPrivilegeSet { - 1: map> userPrivileges, // user name -> privilege grant info - 2: map> groupPrivileges, // group name -> privilege grant info - 3: map> rolePrivileges, //role name -> privilege grant info -} - -struct GrantRevokePrivilegeRequest { - 1: GrantRevokeType requestType; - 2: PrivilegeBag privileges; - 3: optional bool revokeGrantOption; // Only for revoke request -} - -struct GrantRevokePrivilegeResponse { - 1: optional bool success; -} - -struct Role { - 1: string roleName, - 2: i32 createTime, - 3: string ownerName, -} - -// Representation of a grant for a principal to a role -struct RolePrincipalGrant { - 1: string roleName, - 2: string principalName, - 3: PrincipalType principalType, - 4: bool grantOption, - 5: i32 grantTime, - 6: string grantorName, - 7: PrincipalType grantorPrincipalType -} - -struct GetRoleGrantsForPrincipalRequest { - 1: required string principal_name, - 2: required PrincipalType principal_type -} - -struct GetRoleGrantsForPrincipalResponse { - 1: required list principalGrants; -} - -struct GetPrincipalsInRoleRequest { - 1: required string roleName; -} - -struct GetPrincipalsInRoleResponse { - 1: required list principalGrants; -} - -struct GrantRevokeRoleRequest { - 1: GrantRevokeType requestType; - 2: string roleName; - 3: string principalName; - 4: PrincipalType principalType; - 5: optional string grantor; // Needed for grant - 6: optional PrincipalType grantorType; // Needed for grant - 7: optional bool grantOption; -} - -struct GrantRevokeRoleResponse { - 1: optional bool success; -} - -// namespace for tables -struct Database { - 1: string name, - 2: string description, - 3: string locationUri, - 4: map parameters, // properties associated with the database - 5: optional PrincipalPrivilegeSet privileges, - 6: optional string ownerName, - 7: optional PrincipalType ownerType -} - -// This object holds the information needed by SerDes -struct SerDeInfo { - 1: string name, // name of the serde, table name by default - 2: string serializationLib, // usually the class that implements the extractor & loader - 3: map parameters // initialization parameters -} - -// sort order of a column (column name along with asc(1)/desc(0)) -struct Order { - 1: string col, // sort column name - 2: i32 order // asc(1) or desc(0) -} - -// this object holds all the information about skewed table -struct SkewedInfo { - 1: list skewedColNames, // skewed column names - 2: list> skewedColValues, //skewed values - 3: map, string> skewedColValueLocationMaps, //skewed value to location mappings -} - -// this object holds all the information about physical storage of the data belonging to a table -struct StorageDescriptor { - 1: list cols, // required (refer to types defined above) - 2: string location, // defaults to //tablename - 3: string inputFormat, // SequenceFileInputFormat (binary) or TextInputFormat` or custom format - 4: string outputFormat, // SequenceFileOutputFormat (binary) or IgnoreKeyTextOutputFormat or custom format - 5: bool compressed, // compressed or not - 6: i32 numBuckets, // this must be specified if there are any dimension columns - 7: SerDeInfo serdeInfo, // serialization and deserialization information - 8: list bucketCols, // reducer grouping columns and clustering columns and bucketing columns` - 9: list sortCols, // sort order of the data in each bucket - 10: map parameters, // any user supplied key value hash - 11: optional SkewedInfo skewedInfo, // skewed information - 12: optional bool storedAsSubDirectories // stored as subdirectories or not -} - -// table information -struct Table { - 1: string tableName, // name of the table - 2: string dbName, // database name ('default') - 3: string owner, // owner of this table - 4: i32 createTime, // creation time of the table - 5: i32 lastAccessTime, // last access time (usually this will be filled from HDFS and shouldn't be relied on) - 6: i32 retention, // retention time - 7: StorageDescriptor sd, // storage descriptor of the table - 8: list partitionKeys, // partition keys of the table. only primitive types are supported - 9: map parameters, // to store comments or any other user level parameters - 10: string viewOriginalText, // original view text, null for non-view - 11: string viewExpandedText, // expanded view text, null for non-view - 12: string tableType, // table type enum, e.g. EXTERNAL_TABLE - 13: optional PrincipalPrivilegeSet privileges, - 14: optional bool temporary=false, - 15: optional bool rewriteEnabled // rewrite enabled or not -} - -struct Partition { - 1: list values // string value is converted to appropriate partition key type - 2: string dbName, - 3: string tableName, - 4: i32 createTime, - 5: i32 lastAccessTime, - 6: StorageDescriptor sd, - 7: map parameters, - 8: optional PrincipalPrivilegeSet privileges -} - -struct PartitionWithoutSD { - 1: list values // string value is converted to appropriate partition key type - 2: i32 createTime, - 3: i32 lastAccessTime, - 4: string relativePath, - 5: map parameters, - 6: optional PrincipalPrivilegeSet privileges -} - -struct PartitionSpecWithSharedSD { - 1: list partitions, - 2: StorageDescriptor sd, -} - -struct PartitionListComposingSpec { - 1: list partitions -} - -struct PartitionSpec { - 1: string dbName, - 2: string tableName, - 3: string rootPath, - 4: optional PartitionSpecWithSharedSD sharedSDPartitionSpec, - 5: optional PartitionListComposingSpec partitionList -} - -struct Index { - 1: string indexName, // unique with in the whole database namespace - 2: string indexHandlerClass, // reserved - 3: string dbName, - 4: string origTableName, - 5: i32 createTime, - 6: i32 lastAccessTime, - 7: string indexTableName, - 8: StorageDescriptor sd, - 9: map parameters, - 10: bool deferredRebuild -} - -// column statistics -struct BooleanColumnStatsData { -1: required i64 numTrues, -2: required i64 numFalses, -3: required i64 numNulls, -4: optional string bitVectors -} - -struct DoubleColumnStatsData { -1: optional double lowValue, -2: optional double highValue, -3: required i64 numNulls, -4: required i64 numDVs, -5: optional string bitVectors -} - -struct LongColumnStatsData { -1: optional i64 lowValue, -2: optional i64 highValue, -3: required i64 numNulls, -4: required i64 numDVs, -5: optional string bitVectors -} - -struct StringColumnStatsData { -1: required i64 maxColLen, -2: required double avgColLen, -3: required i64 numNulls, -4: required i64 numDVs, -5: optional string bitVectors -} - -struct BinaryColumnStatsData { -1: required i64 maxColLen, -2: required double avgColLen, -3: required i64 numNulls, -4: optional string bitVectors -} - - -struct Decimal { -1: required binary unscaled, -3: required i16 scale -} - -struct DecimalColumnStatsData { -1: optional Decimal lowValue, -2: optional Decimal highValue, -3: required i64 numNulls, -4: required i64 numDVs, -5: optional string bitVectors -} - -struct Date { -1: required i64 daysSinceEpoch -} - -struct DateColumnStatsData { -1: optional Date lowValue, -2: optional Date highValue, -3: required i64 numNulls, -4: required i64 numDVs, -5: optional string bitVectors -} - -union ColumnStatisticsData { -1: BooleanColumnStatsData booleanStats, -2: LongColumnStatsData longStats, -3: DoubleColumnStatsData doubleStats, -4: StringColumnStatsData stringStats, -5: BinaryColumnStatsData binaryStats, -6: DecimalColumnStatsData decimalStats, -7: DateColumnStatsData dateStats -} - -struct ColumnStatisticsObj { -1: required string colName, -2: required string colType, -3: required ColumnStatisticsData statsData -} - -struct ColumnStatisticsDesc { -1: required bool isTblLevel, -2: required string dbName, -3: required string tableName, -4: optional string partName, -5: optional i64 lastAnalyzed -} - -struct ColumnStatistics { -1: required ColumnStatisticsDesc statsDesc, -2: required list statsObj; -} - -struct AggrStats { -1: required list colStats, -2: required i64 partsFound // number of partitions for which stats were found -} - -struct SetPartitionsStatsRequest { -1: required list colStats, -2: optional bool needMerge //stats need to be merged with the existing stats -} - -// schema of the table/query results etc. -struct Schema { - // column names, types, comments - 1: list fieldSchemas, // delimiters etc - 2: map properties -} - -// Key-value store to be used with selected -// Metastore APIs (create, alter methods). -// The client can pass environment properties / configs that can be -// accessed in hooks. -struct EnvironmentContext { - 1: map properties -} - -struct PrimaryKeysRequest { - 1: required string db_name, - 2: required string tbl_name -} - -struct PrimaryKeysResponse { - 1: required list primaryKeys -} - -struct ForeignKeysRequest { - 1: string parent_db_name, - 2: string parent_tbl_name, - 3: string foreign_db_name, - 4: string foreign_tbl_name -} - -struct ForeignKeysResponse { - 1: required list foreignKeys -} - -struct UniqueConstraintsRequest { - 1: required string db_name, - 2: required string tbl_name -} - -struct UniqueConstraintsResponse { - 1: required list uniqueConstraints -} - -struct NotNullConstraintsRequest { - 1: required string db_name, - 2: required string tbl_name -} - -struct NotNullConstraintsResponse { - 1: required list notNullConstraints -} - -struct DropConstraintRequest { - 1: required string dbname, - 2: required string tablename, - 3: required string constraintname -} - -struct AddPrimaryKeyRequest { - 1: required list primaryKeyCols -} - -struct AddForeignKeyRequest { - 1: required list foreignKeyCols -} - -struct AddUniqueConstraintRequest { - 1: required list uniqueConstraintCols -} - -struct AddNotNullConstraintRequest { - 1: required list notNullConstraintCols -} - -// Return type for get_partitions_by_expr -struct PartitionsByExprResult { - 1: required list partitions, - // Whether the results has any (currently, all) partitions which may or may not match - 2: required bool hasUnknownPartitions -} - -struct PartitionsByExprRequest { - 1: required string dbName, - 2: required string tblName, - 3: required binary expr, - 4: optional string defaultPartitionName, - 5: optional i16 maxParts=-1 -} - -struct TableStatsResult { - 1: required list tableStats -} - -struct PartitionsStatsResult { - 1: required map> partStats -} - -struct TableStatsRequest { - 1: required string dbName, - 2: required string tblName, - 3: required list colNames -} - -struct PartitionsStatsRequest { - 1: required string dbName, - 2: required string tblName, - 3: required list colNames, - 4: required list partNames -} - -// Return type for add_partitions_req -struct AddPartitionsResult { - 1: optional list partitions, -} - -// Request type for add_partitions_req -struct AddPartitionsRequest { - 1: required string dbName, - 2: required string tblName, - 3: required list parts, - 4: required bool ifNotExists, - 5: optional bool needResult=true -} - -// Return type for drop_partitions_req -struct DropPartitionsResult { - 1: optional list partitions, -} - -struct DropPartitionsExpr { - 1: required binary expr; - 2: optional i32 partArchiveLevel; -} - -union RequestPartsSpec { - 1: list names; - 2: list exprs; -} - -// Request type for drop_partitions_req -// TODO: we might want to add "bestEffort" flag; where a subset can fail -struct DropPartitionsRequest { - 1: required string dbName, - 2: required string tblName, - 3: required RequestPartsSpec parts, - 4: optional bool deleteData, - 5: optional bool ifExists=true, // currently verified on client - 6: optional bool ignoreProtection, - 7: optional EnvironmentContext environmentContext, - 8: optional bool needResult=true -} - -enum FunctionType { - JAVA = 1, -} - -enum ResourceType { - JAR = 1, - FILE = 2, - ARCHIVE = 3, -} - -struct ResourceUri { - 1: ResourceType resourceType, - 2: string uri, -} - -// User-defined function -struct Function { - 1: string functionName, - 2: string dbName, - 3: string className, - 4: string ownerName, - 5: PrincipalType ownerType, - 6: i32 createTime, - 7: FunctionType functionType, - 8: list resourceUris, -} - -// Structs for transaction and locks -struct TxnInfo { - 1: required i64 id, - 2: required TxnState state, - 3: required string user, // used in 'show transactions' to help admins find who has open transactions - 4: required string hostname, // used in 'show transactions' to help admins find who has open transactions - 5: optional string agentInfo = "Unknown", - 6: optional i32 heartbeatCount=0, - 7: optional string metaInfo, - 8: optional i64 startedTime, - 9: optional i64 lastHeartbeatTime, -} - -struct GetOpenTxnsInfoResponse { - 1: required i64 txn_high_water_mark, - 2: required list open_txns, -} - -struct GetOpenTxnsResponse { - 1: required i64 txn_high_water_mark, - 2: required list open_txns, // set changed to list since 3.0 - 3: optional i64 min_open_txn, //since 1.3,2.2 - 4: required binary abortedBits, // since 3.0 -} - -struct OpenTxnRequest { - 1: required i32 num_txns, - 2: required string user, - 3: required string hostname, - 4: optional string agentInfo = "Unknown", -} - -struct OpenTxnsResponse { - 1: required list txn_ids, -} - -struct AbortTxnRequest { - 1: required i64 txnid, -} - -struct AbortTxnsRequest { - 1: required list txn_ids, -} - -struct CommitTxnRequest { - 1: required i64 txnid, -} - -struct LockComponent { - 1: required LockType type, - 2: required LockLevel level, - 3: required string dbname, - 4: optional string tablename, - 5: optional string partitionname, - 6: optional DataOperationType operationType = DataOperationType.UNSET, - 7: optional bool isAcid = false, - 8: optional bool isDynamicPartitionWrite = false -} - -struct LockRequest { - 1: required list component, - 2: optional i64 txnid, - 3: required string user, // used in 'show locks' to help admins find who has open locks - 4: required string hostname, // used in 'show locks' to help admins find who has open locks - 5: optional string agentInfo = "Unknown", -} - -struct LockResponse { - 1: required i64 lockid, - 2: required LockState state, -} - -struct CheckLockRequest { - 1: required i64 lockid, - 2: optional i64 txnid, - 3: optional i64 elapsed_ms, -} - -struct UnlockRequest { - 1: required i64 lockid, -} - -struct ShowLocksRequest { - 1: optional string dbname, - 2: optional string tablename, - 3: optional string partname, - 4: optional bool isExtended=false, -} - -struct ShowLocksResponseElement { - 1: required i64 lockid, - 2: required string dbname, - 3: optional string tablename, - 4: optional string partname, - 5: required LockState state, - 6: required LockType type, - 7: optional i64 txnid, - 8: required i64 lastheartbeat, - 9: optional i64 acquiredat, - 10: required string user, - 11: required string hostname, - 12: optional i32 heartbeatCount = 0, - 13: optional string agentInfo, - 14: optional i64 blockedByExtId, - 15: optional i64 blockedByIntId, - 16: optional i64 lockIdInternal, -} - -struct ShowLocksResponse { - 1: list locks, -} - -struct HeartbeatRequest { - 1: optional i64 lockid, - 2: optional i64 txnid -} - -struct HeartbeatTxnRangeRequest { - 1: required i64 min, - 2: required i64 max -} - -struct HeartbeatTxnRangeResponse { - 1: required set aborted, - 2: required set nosuch -} - -struct CompactionRequest { - 1: required string dbname, - 2: required string tablename, - 3: optional string partitionname, - 4: required CompactionType type, - 5: optional string runas, - 6: optional map properties -} - -struct CompactionResponse { - 1: required i64 id, - 2: required string state, - 3: required bool accepted -} - -struct ShowCompactRequest { -} - -struct ShowCompactResponseElement { - 1: required string dbname, - 2: required string tablename, - 3: optional string partitionname, - 4: required CompactionType type, - 5: required string state, - 6: optional string workerid, - 7: optional i64 start, - 8: optional string runAs, - 9: optional i64 hightestTxnId, // Highest Txn ID handled by this compaction - 10: optional string metaInfo, - 11: optional i64 endTime, - 12: optional string hadoopJobId = "None", - 13: optional i64 id, -} - -struct ShowCompactResponse { - 1: required list compacts, -} - -struct AddDynamicPartitions { - 1: required i64 txnid, - 2: required string dbname, - 3: required string tablename, - 4: required list partitionnames, - 5: optional DataOperationType operationType = DataOperationType.UNSET -} - -struct NotificationEventRequest { - 1: required i64 lastEvent, - 2: optional i32 maxEvents, -} - -struct NotificationEvent { - 1: required i64 eventId, - 2: required i32 eventTime, - 3: required string eventType, - 4: optional string dbName, - 5: optional string tableName, - 6: required string message, - 7: optional string messageFormat, -} - -struct NotificationEventResponse { - 1: required list events, -} - -struct CurrentNotificationEventId { - 1: required i64 eventId, -} - -struct InsertEventRequestData { - 1: optional bool replace, - 2: required list filesAdded, - // Checksum of files (hex string of checksum byte payload) - 3: optional list filesAddedChecksum, -} - -union FireEventRequestData { - 1: InsertEventRequestData insertData -} - -struct FireEventRequest { - 1: required bool successful, - 2: required FireEventRequestData data - // dbname, tablename, and partition vals are included as optional in the top level event rather than placed in each type of - // subevent as I assume they'll be used across most event types. - 3: optional string dbName, - 4: optional string tableName, - 5: optional list partitionVals, -} - -struct FireEventResponse { - // NOP for now, this is just a place holder for future responses -} - -struct MetadataPpdResult { - 1: optional binary metadata, - 2: optional binary includeBitset -} - -// Return type for get_file_metadata_by_expr -struct GetFileMetadataByExprResult { - 1: required map metadata, - 2: required bool isSupported -} - -enum FileMetadataExprType { - ORC_SARG = 1 -} - - -// Request type for get_file_metadata_by_expr -struct GetFileMetadataByExprRequest { - 1: required list fileIds, - 2: required binary expr, - 3: optional bool doGetFooters, - 4: optional FileMetadataExprType type -} - -// Return type for get_file_metadata -struct GetFileMetadataResult { - 1: required map metadata, - 2: required bool isSupported -} - -// Request type for get_file_metadata -struct GetFileMetadataRequest { - 1: required list fileIds -} - -// Return type for put_file_metadata -struct PutFileMetadataResult { -} - -// Request type for put_file_metadata -struct PutFileMetadataRequest { - 1: required list fileIds, - 2: required list metadata, - 3: optional FileMetadataExprType type -} - -// Return type for clear_file_metadata -struct ClearFileMetadataResult { -} - -// Request type for clear_file_metadata -struct ClearFileMetadataRequest { - 1: required list fileIds -} - -// Return type for cache_file_metadata -struct CacheFileMetadataResult { - 1: required bool isSupported -} - -// Request type for cache_file_metadata -struct CacheFileMetadataRequest { - 1: required string dbName, - 2: required string tblName, - 3: optional string partName, - 4: optional bool isAllParts -} - -struct GetAllFunctionsResponse { - 1: optional list functions -} - -enum ClientCapability { - TEST_CAPABILITY = 1 -} - - -struct ClientCapabilities { - 1: required list values -} - -struct GetTableRequest { - 1: required string dbName, - 2: required string tblName, - 3: optional ClientCapabilities capabilities -} - -struct GetTableResult { - 1: required Table table -} - -struct GetTablesRequest { - 1: required string dbName, - 2: optional list tblNames, - 3: optional ClientCapabilities capabilities -} - -struct GetTablesResult { - 1: required list tables -} - -// Request type for cm_recycle -struct CmRecycleRequest { - 1: required string dataPath, - 2: required bool purge -} - -// Response type for cm_recycle -struct CmRecycleResponse { -} - -struct TableMeta { - 1: required string dbName; - 2: required string tableName; - 3: required string tableType; - 4: optional string comments; -} - -exception MetaException { - 1: string message -} - -exception UnknownTableException { - 1: string message -} - -exception UnknownDBException { - 1: string message -} - -exception AlreadyExistsException { - 1: string message -} - -exception InvalidPartitionException { - 1: string message -} - -exception UnknownPartitionException { - 1: string message -} - -exception InvalidObjectException { - 1: string message -} - -exception NoSuchObjectException { - 1: string message -} - -exception IndexAlreadyExistsException { - 1: string message -} - -exception InvalidOperationException { - 1: string message -} - -exception ConfigValSecurityException { - 1: string message -} - -exception InvalidInputException { - 1: string message -} - -// Transaction and lock exceptions -exception NoSuchTxnException { - 1: string message -} - -exception TxnAbortedException { - 1: string message -} - -exception TxnOpenException { - 1: string message -} - -exception NoSuchLockException { - 1: string message -} - -/** -* This interface is live. -*/ -service ThriftHiveMetastore extends fb303.FacebookService -{ - string getMetaConf(1:string key) throws(1:MetaException o1) - void setMetaConf(1:string key, 2:string value) throws(1:MetaException o1) - - void create_database(1:Database database) throws(1:AlreadyExistsException o1, 2:InvalidObjectException o2, 3:MetaException o3) - Database get_database(1:string name) throws(1:NoSuchObjectException o1, 2:MetaException o2) - void drop_database(1:string name, 2:bool deleteData, 3:bool cascade) throws(1:NoSuchObjectException o1, 2:InvalidOperationException o2, 3:MetaException o3) - list get_databases(1:string pattern) throws(1:MetaException o1) - list get_all_databases() throws(1:MetaException o1) - void alter_database(1:string dbname, 2:Database db) throws(1:MetaException o1, 2:NoSuchObjectException o2) - - // returns the type with given name (make seperate calls for the dependent types if needed) - Type get_type(1:string name) throws(1:MetaException o1, 2:NoSuchObjectException o2) - bool create_type(1:Type type) throws(1:AlreadyExistsException o1, 2:InvalidObjectException o2, 3:MetaException o3) - bool drop_type(1:string type) throws(1:MetaException o1, 2:NoSuchObjectException o2) - map get_type_all(1:string name) - throws(1:MetaException o2) - - // Gets a list of FieldSchemas describing the columns of a particular table - list get_fields(1: string db_name, 2: string table_name) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3), - list get_fields_with_environment_context(1: string db_name, 2: string table_name, 3:EnvironmentContext environment_context) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3) - - // Gets a list of FieldSchemas describing both the columns and the partition keys of a particular table - list get_schema(1: string db_name, 2: string table_name) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3) - list get_schema_with_environment_context(1: string db_name, 2: string table_name, 3:EnvironmentContext environment_context) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3) - - // create a Hive table. Following fields must be set - // tableName - // database (only 'default' for now until Hive QL supports databases) - // owner (not needed, but good to have for tracking purposes) - // sd.cols (list of field schemas) - // sd.inputFormat (SequenceFileInputFormat (binary like falcon tables or u_full) or TextInputFormat) - // sd.outputFormat (SequenceFileInputFormat (binary) or TextInputFormat) - // sd.serdeInfo.serializationLib (SerDe class name eg org.apache.hadoop.hive.serde.simple_meta.MetadataTypedColumnsetSerDe - // * See notes on DDL_TIME - void create_table(1:Table tbl) throws(1:AlreadyExistsException o1, 2:InvalidObjectException o2, 3:MetaException o3, 4:NoSuchObjectException o4) - void create_table_with_environment_context(1:Table tbl, - 2:EnvironmentContext environment_context) - throws (1:AlreadyExistsException o1, - 2:InvalidObjectException o2, 3:MetaException o3, - 4:NoSuchObjectException o4) - void create_table_with_constraints(1:Table tbl, 2: list primaryKeys, 3: list foreignKeys, - 4: list uniqueConstraints, 5: list notNullConstraints) - throws (1:AlreadyExistsException o1, - 2:InvalidObjectException o2, 3:MetaException o3, - 4:NoSuchObjectException o4) - void drop_constraint(1:DropConstraintRequest req) - throws(1:NoSuchObjectException o1, 2:MetaException o3) - void add_primary_key(1:AddPrimaryKeyRequest req) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - void add_foreign_key(1:AddForeignKeyRequest req) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - void add_unique_constraint(1:AddUniqueConstraintRequest req) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - void add_not_null_constraint(1:AddNotNullConstraintRequest req) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - - // drops the table and all the partitions associated with it if the table has partitions - // delete data (including partitions) if deleteData is set to true - void drop_table(1:string dbname, 2:string name, 3:bool deleteData) - throws(1:NoSuchObjectException o1, 2:MetaException o3) - void drop_table_with_environment_context(1:string dbname, 2:string name, 3:bool deleteData, - 4:EnvironmentContext environment_context) - throws(1:NoSuchObjectException o1, 2:MetaException o3) - void truncate_table(1:string dbName, 2:string tableName, 3:list partNames) - throws(1:MetaException o1) - list get_tables(1: string db_name, 2: string pattern) throws (1: MetaException o1) - list get_tables_by_type(1: string db_name, 2: string pattern, 3: string tableType) throws (1: MetaException o1) - list get_table_meta(1: string db_patterns, 2: string tbl_patterns, 3: list tbl_types) - throws (1: MetaException o1) - list get_all_tables(1: string db_name) throws (1: MetaException o1) - - Table get_table(1:string dbname, 2:string tbl_name) - throws (1:MetaException o1, 2:NoSuchObjectException o2) - list
get_table_objects_by_name(1:string dbname, 2:list tbl_names) - GetTableResult get_table_req(1:GetTableRequest req) throws (1:MetaException o1, 2:NoSuchObjectException o2) - GetTablesResult get_table_objects_by_name_req(1:GetTablesRequest req) - throws (1:MetaException o1, 2:InvalidOperationException o2, 3:UnknownDBException o3) - - // Get a list of table names that match a filter. - // The filter operators are LIKE, <, <=, >, >=, =, <> - // - // In the filter statement, values interpreted as strings must be enclosed in quotes, - // while values interpreted as integers should not be. Strings and integers are the only - // supported value types. - // - // The currently supported key names in the filter are: - // Constants.HIVE_FILTER_FIELD_OWNER, which filters on the tables' owner's name - // and supports all filter operators - // Constants.HIVE_FILTER_FIELD_LAST_ACCESS, which filters on the last access times - // and supports all filter operators except LIKE - // Constants.HIVE_FILTER_FIELD_PARAMS, which filters on the tables' parameter keys and values - // and only supports the filter operators = and <>. - // Append the parameter key name to HIVE_FILTER_FIELD_PARAMS in the filter statement. - // For example, to filter on parameter keys called "retention", the key name in the filter - // statement should be Constants.HIVE_FILTER_FIELD_PARAMS + "retention" - // Also, = and <> only work for keys that exist - // in the tables. E.g., if you are looking for tables where key1 <> value, it will only - // look at tables that have a value for the parameter key1. - // Some example filter statements include: - // filter = Constants.HIVE_FILTER_FIELD_OWNER + " like \".*test.*\" and " + - // Constants.HIVE_FILTER_FIELD_LAST_ACCESS + " = 0"; - // filter = Constants.HIVE_FILTER_FIELD_PARAMS + "retention = \"30\" or " + - // Constants.HIVE_FILTER_FIELD_PARAMS + "retention = \"90\"" - // @param dbName - // The name of the database from which you will retrieve the table names - // @param filterType - // The type of filter - // @param filter - // The filter string - // @param max_tables - // The maximum number of tables returned - // @return A list of table names that match the desired filter - list get_table_names_by_filter(1:string dbname, 2:string filter, 3:i16 max_tables=-1) - throws (1:MetaException o1, 2:InvalidOperationException o2, 3:UnknownDBException o3) - - // alter table applies to only future partitions not for existing partitions - // * See notes on DDL_TIME - void alter_table(1:string dbname, 2:string tbl_name, 3:Table new_tbl) - throws (1:InvalidOperationException o1, 2:MetaException o2) - void alter_table_with_environment_context(1:string dbname, 2:string tbl_name, - 3:Table new_tbl, 4:EnvironmentContext environment_context) - throws (1:InvalidOperationException o1, 2:MetaException o2) - // alter table not only applies to future partitions but also cascade to existing partitions - void alter_table_with_cascade(1:string dbname, 2:string tbl_name, 3:Table new_tbl, 4:bool cascade) - throws (1:InvalidOperationException o1, 2:MetaException o2) - // the following applies to only tables that have partitions - // * See notes on DDL_TIME - Partition add_partition(1:Partition new_part) - throws(1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) - Partition add_partition_with_environment_context(1:Partition new_part, - 2:EnvironmentContext environment_context) - throws (1:InvalidObjectException o1, 2:AlreadyExistsException o2, - 3:MetaException o3) - i32 add_partitions(1:list new_parts) - throws(1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) - i32 add_partitions_pspec(1:list new_parts) - throws(1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) - Partition append_partition(1:string db_name, 2:string tbl_name, 3:list part_vals) - throws (1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) - AddPartitionsResult add_partitions_req(1:AddPartitionsRequest request) - throws(1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) - Partition append_partition_with_environment_context(1:string db_name, 2:string tbl_name, - 3:list part_vals, 4:EnvironmentContext environment_context) - throws (1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) - Partition append_partition_by_name(1:string db_name, 2:string tbl_name, 3:string part_name) - throws (1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) - Partition append_partition_by_name_with_environment_context(1:string db_name, 2:string tbl_name, - 3:string part_name, 4:EnvironmentContext environment_context) - throws (1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) - bool drop_partition(1:string db_name, 2:string tbl_name, 3:list part_vals, 4:bool deleteData) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - bool drop_partition_with_environment_context(1:string db_name, 2:string tbl_name, - 3:list part_vals, 4:bool deleteData, 5:EnvironmentContext environment_context) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - bool drop_partition_by_name(1:string db_name, 2:string tbl_name, 3:string part_name, 4:bool deleteData) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - bool drop_partition_by_name_with_environment_context(1:string db_name, 2:string tbl_name, - 3:string part_name, 4:bool deleteData, 5:EnvironmentContext environment_context) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - DropPartitionsResult drop_partitions_req(1: DropPartitionsRequest req) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - - Partition get_partition(1:string db_name, 2:string tbl_name, 3:list part_vals) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - Partition exchange_partition(1:map partitionSpecs, 2:string source_db, - 3:string source_table_name, 4:string dest_db, 5:string dest_table_name) - throws(1:MetaException o1, 2:NoSuchObjectException o2, 3:InvalidObjectException o3, - 4:InvalidInputException o4) - - list exchange_partitions(1:map partitionSpecs, 2:string source_db, - 3:string source_table_name, 4:string dest_db, 5:string dest_table_name) - throws(1:MetaException o1, 2:NoSuchObjectException o2, 3:InvalidObjectException o3, - 4:InvalidInputException o4) - - Partition get_partition_with_auth(1:string db_name, 2:string tbl_name, 3:list part_vals, - 4: string user_name, 5: list group_names) throws(1:MetaException o1, 2:NoSuchObjectException o2) - - Partition get_partition_by_name(1:string db_name 2:string tbl_name, 3:string part_name) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - - // returns all the partitions for this table in reverse chronological order. - // If max parts is given then it will return only that many. - list get_partitions(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - list get_partitions_with_auth(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1, - 4: string user_name, 5: list group_names) throws(1:NoSuchObjectException o1, 2:MetaException o2) - - list get_partitions_pspec(1:string db_name, 2:string tbl_name, 3:i32 max_parts=-1) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - - list get_partition_names(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1) - throws(1:MetaException o2) - - // get_partition*_ps methods allow filtering by a partial partition specification, - // as needed for dynamic partitions. The values that are not restricted should - // be empty strings. Nulls were considered (instead of "") but caused errors in - // generated Python code. The size of part_vals may be smaller than the - // number of partition columns - the unspecified values are considered the same - // as "". - list get_partitions_ps(1:string db_name 2:string tbl_name - 3:list part_vals, 4:i16 max_parts=-1) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - list get_partitions_ps_with_auth(1:string db_name, 2:string tbl_name, 3:list part_vals, 4:i16 max_parts=-1, - 5: string user_name, 6: list group_names) throws(1:NoSuchObjectException o1, 2:MetaException o2) - - list get_partition_names_ps(1:string db_name, - 2:string tbl_name, 3:list part_vals, 4:i16 max_parts=-1) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - - // get the partitions matching the given partition filter - list get_partitions_by_filter(1:string db_name 2:string tbl_name - 3:string filter, 4:i16 max_parts=-1) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - - // List partitions as PartitionSpec instances. - list get_part_specs_by_filter(1:string db_name 2:string tbl_name - 3:string filter, 4:i32 max_parts=-1) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - - // get the partitions matching the given partition filter - // unlike get_partitions_by_filter, takes serialized hive expression, and with that can work - // with any filter (get_partitions_by_filter only works if the filter can be pushed down to JDOQL. - PartitionsByExprResult get_partitions_by_expr(1:PartitionsByExprRequest req) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - - // get the partitions matching the given partition filter - i32 get_num_partitions_by_filter(1:string db_name 2:string tbl_name 3:string filter) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - - // get partitions give a list of partition names - list get_partitions_by_names(1:string db_name 2:string tbl_name 3:list names) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - - // changes the partition to the new partition object. partition is identified from the part values - // in the new_part - // * See notes on DDL_TIME - void alter_partition(1:string db_name, 2:string tbl_name, 3:Partition new_part) - throws (1:InvalidOperationException o1, 2:MetaException o2) - - // change a list of partitions. All partitions are altered atomically and all - // prehooks are fired together followed by all post hooks - void alter_partitions(1:string db_name, 2:string tbl_name, 3:list new_parts) - throws (1:InvalidOperationException o1, 2:MetaException o2) - void alter_partitions_with_environment_context(1:string db_name, 2:string tbl_name, 3:list new_parts, 4:EnvironmentContext environment_context) throws (1:InvalidOperationException o1, 2:MetaException o2) - - void alter_partition_with_environment_context(1:string db_name, - 2:string tbl_name, 3:Partition new_part, - 4:EnvironmentContext environment_context) - throws (1:InvalidOperationException o1, 2:MetaException o2) - - // rename the old partition to the new partition object by changing old part values to the part values - // in the new_part. old partition is identified from part_vals. - // partition keys in new_part should be the same as those in old partition. - void rename_partition(1:string db_name, 2:string tbl_name, 3:list part_vals, 4:Partition new_part) - throws (1:InvalidOperationException o1, 2:MetaException o2) - - // returns whether or not the partition name is valid based on the value of the config - // hive.metastore.partition.name.whitelist.pattern - bool partition_name_has_valid_characters(1:list part_vals, 2:bool throw_exception) - throws(1: MetaException o1) - - // gets the value of the configuration key in the metastore server. returns - // defaultValue if the key does not exist. if the configuration key does not - // begin with "hive", "mapred", or "hdfs", a ConfigValSecurityException is - // thrown. - string get_config_value(1:string name, 2:string defaultValue) - throws(1:ConfigValSecurityException o1) - - // converts a partition name into a partition values array - list partition_name_to_vals(1: string part_name) - throws(1: MetaException o1) - // converts a partition name into a partition specification (a mapping from - // the partition cols to the values) - map partition_name_to_spec(1: string part_name) - throws(1: MetaException o1) - - void markPartitionForEvent(1:string db_name, 2:string tbl_name, 3:map part_vals, - 4:PartitionEventType eventType) throws (1: MetaException o1, 2: NoSuchObjectException o2, - 3: UnknownDBException o3, 4: UnknownTableException o4, 5: UnknownPartitionException o5, - 6: InvalidPartitionException o6) - bool isPartitionMarkedForEvent(1:string db_name, 2:string tbl_name, 3:map part_vals, - 4: PartitionEventType eventType) throws (1: MetaException o1, 2:NoSuchObjectException o2, - 3: UnknownDBException o3, 4: UnknownTableException o4, 5: UnknownPartitionException o5, - 6: InvalidPartitionException o6) - - //index - Index add_index(1:Index new_index, 2: Table index_table) - throws(1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) - void alter_index(1:string dbname, 2:string base_tbl_name, 3:string idx_name, 4:Index new_idx) - throws (1:InvalidOperationException o1, 2:MetaException o2) - bool drop_index_by_name(1:string db_name, 2:string tbl_name, 3:string index_name, 4:bool deleteData) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - Index get_index_by_name(1:string db_name 2:string tbl_name, 3:string index_name) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - - list get_indexes(1:string db_name, 2:string tbl_name, 3:i16 max_indexes=-1) - throws(1:NoSuchObjectException o1, 2:MetaException o2) - list get_index_names(1:string db_name, 2:string tbl_name, 3:i16 max_indexes=-1) - throws(1:MetaException o2) - - //primary keys and foreign keys - PrimaryKeysResponse get_primary_keys(1:PrimaryKeysRequest request) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - ForeignKeysResponse get_foreign_keys(1:ForeignKeysRequest request) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - // other constraints - UniqueConstraintsResponse get_unique_constraints(1:UniqueConstraintsRequest request) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - NotNullConstraintsResponse get_not_null_constraints(1:NotNullConstraintsRequest request) - throws(1:MetaException o1, 2:NoSuchObjectException o2) - - // column statistics interfaces - - // update APIs persist the column statistics object(s) that are passed in. If statistics already - // exists for one or more columns, the existing statistics will be overwritten. The update APIs - // validate that the dbName, tableName, partName, colName[] passed in as part of the ColumnStatistics - // struct are valid, throws InvalidInputException/NoSuchObjectException if found to be invalid - bool update_table_column_statistics(1:ColumnStatistics stats_obj) throws (1:NoSuchObjectException o1, - 2:InvalidObjectException o2, 3:MetaException o3, 4:InvalidInputException o4) - bool update_partition_column_statistics(1:ColumnStatistics stats_obj) throws (1:NoSuchObjectException o1, - 2:InvalidObjectException o2, 3:MetaException o3, 4:InvalidInputException o4) - - // get APIs return the column statistics corresponding to db_name, tbl_name, [part_name], col_name if - // such statistics exists. If the required statistics doesn't exist, get APIs throw NoSuchObjectException - // For instance, if get_table_column_statistics is called on a partitioned table for which only - // partition level column stats exist, get_table_column_statistics will throw NoSuchObjectException - ColumnStatistics get_table_column_statistics(1:string db_name, 2:string tbl_name, 3:string col_name) throws - (1:NoSuchObjectException o1, 2:MetaException o2, 3:InvalidInputException o3, 4:InvalidObjectException o4) - ColumnStatistics get_partition_column_statistics(1:string db_name, 2:string tbl_name, 3:string part_name, - 4:string col_name) throws (1:NoSuchObjectException o1, 2:MetaException o2, - 3:InvalidInputException o3, 4:InvalidObjectException o4) - TableStatsResult get_table_statistics_req(1:TableStatsRequest request) throws - (1:NoSuchObjectException o1, 2:MetaException o2) - PartitionsStatsResult get_partitions_statistics_req(1:PartitionsStatsRequest request) throws - (1:NoSuchObjectException o1, 2:MetaException o2) - AggrStats get_aggr_stats_for(1:PartitionsStatsRequest request) throws - (1:NoSuchObjectException o1, 2:MetaException o2) - bool set_aggr_stats_for(1:SetPartitionsStatsRequest request) throws - (1:NoSuchObjectException o1, 2:InvalidObjectException o2, 3:MetaException o3, 4:InvalidInputException o4) - - - // delete APIs attempt to delete column statistics, if found, associated with a given db_name, tbl_name, [part_name] - // and col_name. If the delete API doesn't find the statistics record in the metastore, throws NoSuchObjectException - // Delete API validates the input and if the input is invalid throws InvalidInputException/InvalidObjectException. - bool delete_partition_column_statistics(1:string db_name, 2:string tbl_name, 3:string part_name, 4:string col_name) throws - (1:NoSuchObjectException o1, 2:MetaException o2, 3:InvalidObjectException o3, - 4:InvalidInputException o4) - bool delete_table_column_statistics(1:string db_name, 2:string tbl_name, 3:string col_name) throws - (1:NoSuchObjectException o1, 2:MetaException o2, 3:InvalidObjectException o3, - 4:InvalidInputException o4) - - // - // user-defined functions - // - - void create_function(1:Function func) - throws (1:AlreadyExistsException o1, - 2:InvalidObjectException o2, - 3:MetaException o3, - 4:NoSuchObjectException o4) - - void drop_function(1:string dbName, 2:string funcName) - throws (1:NoSuchObjectException o1, 2:MetaException o3) - - void alter_function(1:string dbName, 2:string funcName, 3:Function newFunc) - throws (1:InvalidOperationException o1, 2:MetaException o2) - - list get_functions(1:string dbName, 2:string pattern) - throws (1:MetaException o1) - Function get_function(1:string dbName, 2:string funcName) - throws (1:MetaException o1, 2:NoSuchObjectException o2) - - GetAllFunctionsResponse get_all_functions() throws (1:MetaException o1) - - //authorization privileges - - bool create_role(1:Role role) throws(1:MetaException o1) - bool drop_role(1:string role_name) throws(1:MetaException o1) - list get_role_names() throws(1:MetaException o1) - // Deprecated, use grant_revoke_role() - bool grant_role(1:string role_name, 2:string principal_name, 3:PrincipalType principal_type, - 4:string grantor, 5:PrincipalType grantorType, 6:bool grant_option) throws(1:MetaException o1) - // Deprecated, use grant_revoke_role() - bool revoke_role(1:string role_name, 2:string principal_name, 3:PrincipalType principal_type) - throws(1:MetaException o1) - list list_roles(1:string principal_name, 2:PrincipalType principal_type) throws(1:MetaException o1) - GrantRevokeRoleResponse grant_revoke_role(1:GrantRevokeRoleRequest request) throws(1:MetaException o1) - - // get all role-grants for users/roles that have been granted the given role - // Note that in the returned list of RolePrincipalGrants, the roleName is - // redundant as it would match the role_name argument of this function - GetPrincipalsInRoleResponse get_principals_in_role(1: GetPrincipalsInRoleRequest request) throws(1:MetaException o1) - - // get grant information of all roles granted to the given principal - // Note that in the returned list of RolePrincipalGrants, the principal name,type is - // redundant as it would match the principal name,type arguments of this function - GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(1: GetRoleGrantsForPrincipalRequest request) throws(1:MetaException o1) - - PrincipalPrivilegeSet get_privilege_set(1:HiveObjectRef hiveObject, 2:string user_name, - 3: list group_names) throws(1:MetaException o1) - list list_privileges(1:string principal_name, 2:PrincipalType principal_type, - 3: HiveObjectRef hiveObject) throws(1:MetaException o1) - - // Deprecated, use grant_revoke_privileges() - bool grant_privileges(1:PrivilegeBag privileges) throws(1:MetaException o1) - // Deprecated, use grant_revoke_privileges() - bool revoke_privileges(1:PrivilegeBag privileges) throws(1:MetaException o1) - GrantRevokePrivilegeResponse grant_revoke_privileges(1:GrantRevokePrivilegeRequest request) throws(1:MetaException o1); - - // this is used by metastore client to send UGI information to metastore server immediately - // after setting up a connection. - list set_ugi(1:string user_name, 2:list group_names) throws (1:MetaException o1) - - //Authentication (delegation token) interfaces - - // get metastore server delegation token for use from the map/reduce tasks to authenticate - // to metastore server - string get_delegation_token(1:string token_owner, 2:string renewer_kerberos_principal_name) - throws (1:MetaException o1) - - // method to renew delegation token obtained from metastore server - i64 renew_delegation_token(1:string token_str_form) throws (1:MetaException o1) - - // method to cancel delegation token obtained from metastore server - void cancel_delegation_token(1:string token_str_form) throws (1:MetaException o1) - - // add a delegation token - bool add_token(1:string token_identifier, 2:string delegation_token) - - // remove a delegation token - bool remove_token(1:string token_identifier) - - // get a delegation token by identifier - string get_token(1:string token_identifier) - - // get all delegation token identifiers - list get_all_token_identifiers() - - // add master key - i32 add_master_key(1:string key) throws (1:MetaException o1) - - // update master key - void update_master_key(1:i32 seq_number, 2:string key) throws (1:NoSuchObjectException o1, 2:MetaException o2) - - // remove master key - bool remove_master_key(1:i32 key_seq) - - // get master keys - list get_master_keys() - - // Transaction and lock management calls - // Get just list of open transactions - GetOpenTxnsResponse get_open_txns() - // Get list of open transactions with state (open, aborted) - GetOpenTxnsInfoResponse get_open_txns_info() - OpenTxnsResponse open_txns(1:OpenTxnRequest rqst) - void abort_txn(1:AbortTxnRequest rqst) throws (1:NoSuchTxnException o1) - void abort_txns(1:AbortTxnsRequest rqst) throws (1:NoSuchTxnException o1) - void commit_txn(1:CommitTxnRequest rqst) throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2) - LockResponse lock(1:LockRequest rqst) throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2) - LockResponse check_lock(1:CheckLockRequest rqst) - throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2, 3:NoSuchLockException o3) - void unlock(1:UnlockRequest rqst) throws (1:NoSuchLockException o1, 2:TxnOpenException o2) - ShowLocksResponse show_locks(1:ShowLocksRequest rqst) - void heartbeat(1:HeartbeatRequest ids) throws (1:NoSuchLockException o1, 2:NoSuchTxnException o2, 3:TxnAbortedException o3) - HeartbeatTxnRangeResponse heartbeat_txn_range(1:HeartbeatTxnRangeRequest txns) - void compact(1:CompactionRequest rqst) - CompactionResponse compact2(1:CompactionRequest rqst) - ShowCompactResponse show_compact(1:ShowCompactRequest rqst) - void add_dynamic_partitions(1:AddDynamicPartitions rqst) throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2) - - // Notification logging calls - NotificationEventResponse get_next_notification(1:NotificationEventRequest rqst) - CurrentNotificationEventId get_current_notificationEventId() - FireEventResponse fire_listener_event(1:FireEventRequest rqst) - void flushCache() - - // Repl Change Management api - CmRecycleResponse cm_recycle(1:CmRecycleRequest request) throws(1:MetaException o1) - - GetFileMetadataByExprResult get_file_metadata_by_expr(1:GetFileMetadataByExprRequest req) - GetFileMetadataResult get_file_metadata(1:GetFileMetadataRequest req) - PutFileMetadataResult put_file_metadata(1:PutFileMetadataRequest req) - ClearFileMetadataResult clear_file_metadata(1:ClearFileMetadataRequest req) - CacheFileMetadataResult cache_file_metadata(1:CacheFileMetadataRequest req) - - // Metastore DB properties - string get_metastore_db_uuid() throws (1:MetaException o1) -} - -// * Note about the DDL_TIME: When creating or altering a table or a partition, -// if the DDL_TIME is not set, the current time will be used. - -// For storing info about archived partitions in parameters - -// Whether the partition is archived -const string IS_ARCHIVED = "is_archived", -// The original location of the partition, before archiving. After archiving, -// this directory will contain the archive. When the partition -// is dropped, this directory will be deleted -const string ORIGINAL_LOCATION = "original_location", - -// Whether or not the table is considered immutable - immutable tables can only be -// overwritten or created if unpartitioned, or if partitioned, partitions inside them -// can only be overwritten or created. Immutability supports write-once and replace -// semantics, but not append. -const string IS_IMMUTABLE = "immutable", - -// these should be needed only for backward compatibility with filestore -const string META_TABLE_COLUMNS = "columns", -const string META_TABLE_COLUMN_TYPES = "columns.types", -const string BUCKET_FIELD_NAME = "bucket_field_name", -const string BUCKET_COUNT = "bucket_count", -const string FIELD_TO_DIMENSION = "field_to_dimension", -const string META_TABLE_NAME = "name", -const string META_TABLE_DB = "db", -const string META_TABLE_LOCATION = "location", -const string META_TABLE_SERDE = "serde", -const string META_TABLE_PARTITION_COLUMNS = "partition_columns", -const string META_TABLE_PARTITION_COLUMN_TYPES = "partition_columns.types", -const string FILE_INPUT_FORMAT = "file.inputformat", -const string FILE_OUTPUT_FORMAT = "file.outputformat", -const string META_TABLE_STORAGE = "storage_handler", -const string TABLE_IS_TRANSACTIONAL = "transactional", -const string TABLE_NO_AUTO_COMPACT = "no_auto_compaction", -const string TABLE_TRANSACTIONAL_PROPERTIES = "transactional_properties", - - diff --git metastore/pom.xml metastore/pom.xml index 733f891..073d039 100644 --- metastore/pom.xml +++ metastore/pom.xml @@ -44,6 +44,11 @@ hive-shims ${project.version} + + org.apache.hive + hive-standalone-metastore + ${project.version} + javolution javolution @@ -281,39 +286,6 @@ - thriftif - - - - com.google.code.maven-replacer-plugin - replacer - 1.5.3 - - - process-thrift-sources - process-sources - - replace - - - - - ${basedir}/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ - - FieldSchema.java - Partition.java - SerDeInfo.java - StorageDescriptor.java - - ${basedir}/src/main/resources/thrift-replacements.txt - true - false - - - - - - protobuf @@ -404,7 +376,6 @@ src/model - src/gen/thrift/gen-javabean src/gen/protobuf/gen-java diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp deleted file mode 100644 index f4cc70f..0000000 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp +++ /dev/null @@ -1,73653 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -#include "ThriftHiveMetastore.h" - -namespace Apache { namespace Hadoop { namespace Hive { - - -ThriftHiveMetastore_getMetaConf_args::~ThriftHiveMetastore_getMetaConf_args() throw() { -} - - -uint32_t ThriftHiveMetastore_getMetaConf_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->key); - this->__isset.key = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_getMetaConf_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_getMetaConf_args"); - - xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->key); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_getMetaConf_pargs::~ThriftHiveMetastore_getMetaConf_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_getMetaConf_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_getMetaConf_pargs"); - - xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->key))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_getMetaConf_result::~ThriftHiveMetastore_getMetaConf_result() throw() { -} - - -uint32_t ThriftHiveMetastore_getMetaConf_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_getMetaConf_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_getMetaConf_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_getMetaConf_presult::~ThriftHiveMetastore_getMetaConf_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_getMetaConf_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_setMetaConf_args::~ThriftHiveMetastore_setMetaConf_args() throw() { -} - - -uint32_t ThriftHiveMetastore_setMetaConf_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->key); - this->__isset.key = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->value); - this->__isset.value = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_setMetaConf_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_setMetaConf_args"); - - xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->key); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->value); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_setMetaConf_pargs::~ThriftHiveMetastore_setMetaConf_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_setMetaConf_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_setMetaConf_pargs"); - - xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->key))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->value))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_setMetaConf_result::~ThriftHiveMetastore_setMetaConf_result() throw() { -} - - -uint32_t ThriftHiveMetastore_setMetaConf_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_setMetaConf_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_setMetaConf_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_setMetaConf_presult::~ThriftHiveMetastore_setMetaConf_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_setMetaConf_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_create_database_args::~ThriftHiveMetastore_create_database_args() throw() { -} - - -uint32_t ThriftHiveMetastore_create_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->database.read(iprot); - this->__isset.database = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_create_database_pargs::~ThriftHiveMetastore_create_database_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_create_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_create_database_result::~ThriftHiveMetastore_create_database_result() throw() { -} - - -uint32_t ThriftHiveMetastore_create_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_database_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_database_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_create_database_presult::~ThriftHiveMetastore_create_database_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_create_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_database_args::~ThriftHiveMetastore_get_database_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_database_pargs::~ThriftHiveMetastore_get_database_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_database_result::~ThriftHiveMetastore_get_database_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_database_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_database_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_database_presult::~ThriftHiveMetastore_get_database_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_database_args::~ThriftHiveMetastore_drop_database_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->cascade); - this->__isset.cascade = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_drop_database_pargs::~ThriftHiveMetastore_drop_database_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_drop_database_result::~ThriftHiveMetastore_drop_database_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_database_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_database_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_database_presult::~ThriftHiveMetastore_drop_database_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_databases_args::~ThriftHiveMetastore_get_databases_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_databases_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->pattern); - this->__isset.pattern = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_databases_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_databases_pargs::~ThriftHiveMetastore_get_databases_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_databases_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_databases_result::~ThriftHiveMetastore_get_databases_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_databases_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size861; - ::apache::thrift::protocol::TType _etype864; - xfer += iprot->readListBegin(_etype864, _size861); - this->success.resize(_size861); - uint32_t _i865; - for (_i865 = 0; _i865 < _size861; ++_i865) - { - xfer += iprot->readString(this->success[_i865]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_databases_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_databases_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter866; - for (_iter866 = this->success.begin(); _iter866 != this->success.end(); ++_iter866) - { - xfer += oprot->writeString((*_iter866)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_databases_presult::~ThriftHiveMetastore_get_databases_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_databases_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size867; - ::apache::thrift::protocol::TType _etype870; - xfer += iprot->readListBegin(_etype870, _size867); - (*(this->success)).resize(_size867); - uint32_t _i871; - for (_i871 = 0; _i871 < _size867; ++_i871) - { - xfer += iprot->readString((*(this->success))[_i871]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_all_databases_args::~ThriftHiveMetastore_get_all_databases_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_databases_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_all_databases_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_args"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_all_databases_pargs::~ThriftHiveMetastore_get_all_databases_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_databases_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_pargs"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_all_databases_result::~ThriftHiveMetastore_get_all_databases_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_databases_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size872; - ::apache::thrift::protocol::TType _etype875; - xfer += iprot->readListBegin(_etype875, _size872); - this->success.resize(_size872); - uint32_t _i876; - for (_i876 = 0; _i876 < _size872; ++_i876) - { - xfer += iprot->readString(this->success[_i876]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_all_databases_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter877; - for (_iter877 = this->success.begin(); _iter877 != this->success.end(); ++_iter877) - { - xfer += oprot->writeString((*_iter877)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_all_databases_presult::~ThriftHiveMetastore_get_all_databases_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_databases_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size878; - ::apache::thrift::protocol::TType _etype881; - xfer += iprot->readListBegin(_etype881, _size878); - (*(this->success)).resize(_size878); - uint32_t _i882; - for (_i882 = 0; _i882 < _size878; ++_i882) - { - xfer += iprot->readString((*(this->success))[_i882]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_alter_database_args::~ThriftHiveMetastore_alter_database_args() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->db.read(iprot); - this->__isset.db = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_alter_database_pargs::~ThriftHiveMetastore_alter_database_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_alter_database_result::~ThriftHiveMetastore_alter_database_result() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_database_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_database_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_database_presult::~ThriftHiveMetastore_alter_database_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_type_args::~ThriftHiveMetastore_get_type_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_type_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_type_pargs::~ThriftHiveMetastore_get_type_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_type_result::~ThriftHiveMetastore_get_type_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_type_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_type_presult::~ThriftHiveMetastore_get_type_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_create_type_args::~ThriftHiveMetastore_create_type_args() throw() { -} - - -uint32_t ThriftHiveMetastore_create_type_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->type.read(iprot); - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_create_type_pargs::~ThriftHiveMetastore_create_type_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_create_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_create_type_result::~ThriftHiveMetastore_create_type_result() throw() { -} - - -uint32_t ThriftHiveMetastore_create_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_type_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_type_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_create_type_presult::~ThriftHiveMetastore_create_type_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_create_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_type_args::~ThriftHiveMetastore_drop_type_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_type_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->type); - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_drop_type_pargs::~ThriftHiveMetastore_drop_type_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_drop_type_result::~ThriftHiveMetastore_drop_type_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_type_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_type_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_type_presult::~ThriftHiveMetastore_drop_type_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_type_all_args::~ThriftHiveMetastore_get_type_all_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_type_all_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_type_all_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_type_all_pargs::~ThriftHiveMetastore_get_type_all_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_type_all_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_type_all_result::~ThriftHiveMetastore_get_type_all_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_type_all_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->success.clear(); - uint32_t _size883; - ::apache::thrift::protocol::TType _ktype884; - ::apache::thrift::protocol::TType _vtype885; - xfer += iprot->readMapBegin(_ktype884, _vtype885, _size883); - uint32_t _i887; - for (_i887 = 0; _i887 < _size883; ++_i887) - { - std::string _key888; - xfer += iprot->readString(_key888); - Type& _val889 = this->success[_key888]; - xfer += _val889.read(iprot); - } - xfer += iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_type_all_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_all_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::map ::const_iterator _iter890; - for (_iter890 = this->success.begin(); _iter890 != this->success.end(); ++_iter890) - { - xfer += oprot->writeString(_iter890->first); - xfer += _iter890->second.write(oprot); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_type_all_presult::~ThriftHiveMetastore_get_type_all_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_type_all_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - (*(this->success)).clear(); - uint32_t _size891; - ::apache::thrift::protocol::TType _ktype892; - ::apache::thrift::protocol::TType _vtype893; - xfer += iprot->readMapBegin(_ktype892, _vtype893, _size891); - uint32_t _i895; - for (_i895 = 0; _i895 < _size891; ++_i895) - { - std::string _key896; - xfer += iprot->readString(_key896); - Type& _val897 = (*(this->success))[_key896]; - xfer += _val897.read(iprot); - } - xfer += iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_fields_args::~ThriftHiveMetastore_get_fields_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_fields_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->table_name); - this->__isset.table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_fields_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_fields_pargs::~ThriftHiveMetastore_get_fields_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_fields_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_fields_result::~ThriftHiveMetastore_get_fields_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_fields_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size898; - ::apache::thrift::protocol::TType _etype901; - xfer += iprot->readListBegin(_etype901, _size898); - this->success.resize(_size898); - uint32_t _i902; - for (_i902 = 0; _i902 < _size898; ++_i902) - { - xfer += this->success[_i902].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_fields_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter903; - for (_iter903 = this->success.begin(); _iter903 != this->success.end(); ++_iter903) - { - xfer += (*_iter903).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_fields_presult::~ThriftHiveMetastore_get_fields_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_fields_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size904; - ::apache::thrift::protocol::TType _etype907; - xfer += iprot->readListBegin(_etype907, _size904); - (*(this->success)).resize(_size904); - uint32_t _i908; - for (_i908 = 0; _i908 < _size904; ++_i908) - { - xfer += (*(this->success))[_i908].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_fields_with_environment_context_args::~ThriftHiveMetastore_get_fields_with_environment_context_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_fields_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->table_name); - this->__isset.table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environment_context.read(iprot); - this->__isset.environment_context = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_fields_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_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("table_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->table_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->environment_context.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_fields_with_environment_context_pargs::~ThriftHiveMetastore_get_fields_with_environment_context_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_fields_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_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("table_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->table_name))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += (*(this->environment_context)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_fields_with_environment_context_result::~ThriftHiveMetastore_get_fields_with_environment_context_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_fields_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size909; - ::apache::thrift::protocol::TType _etype912; - xfer += iprot->readListBegin(_etype912, _size909); - this->success.resize(_size909); - uint32_t _i913; - for (_i913 = 0; _i913 < _size909; ++_i913) - { - xfer += this->success[_i913].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_fields_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_with_environment_context_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter914; - for (_iter914 = this->success.begin(); _iter914 != this->success.end(); ++_iter914) - { - xfer += (*_iter914).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_fields_with_environment_context_presult::~ThriftHiveMetastore_get_fields_with_environment_context_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_fields_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size915; - ::apache::thrift::protocol::TType _etype918; - xfer += iprot->readListBegin(_etype918, _size915); - (*(this->success)).resize(_size915); - uint32_t _i919; - for (_i919 = 0; _i919 < _size915; ++_i919) - { - xfer += (*(this->success))[_i919].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_schema_args::~ThriftHiveMetastore_get_schema_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_schema_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->table_name); - this->__isset.table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_schema_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_schema_pargs::~ThriftHiveMetastore_get_schema_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_schema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_schema_result::~ThriftHiveMetastore_get_schema_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_schema_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size920; - ::apache::thrift::protocol::TType _etype923; - xfer += iprot->readListBegin(_etype923, _size920); - this->success.resize(_size920); - uint32_t _i924; - for (_i924 = 0; _i924 < _size920; ++_i924) - { - xfer += this->success[_i924].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_schema_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter925; - for (_iter925 = this->success.begin(); _iter925 != this->success.end(); ++_iter925) - { - xfer += (*_iter925).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_schema_presult::~ThriftHiveMetastore_get_schema_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_schema_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size926; - ::apache::thrift::protocol::TType _etype929; - xfer += iprot->readListBegin(_etype929, _size926); - (*(this->success)).resize(_size926); - uint32_t _i930; - for (_i930 = 0; _i930 < _size926; ++_i930) - { - xfer += (*(this->success))[_i930].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_schema_with_environment_context_args::~ThriftHiveMetastore_get_schema_with_environment_context_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_schema_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->table_name); - this->__isset.table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environment_context.read(iprot); - this->__isset.environment_context = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_schema_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_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("table_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->table_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->environment_context.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_schema_with_environment_context_pargs::~ThriftHiveMetastore_get_schema_with_environment_context_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_schema_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_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("table_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->table_name))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += (*(this->environment_context)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_schema_with_environment_context_result::~ThriftHiveMetastore_get_schema_with_environment_context_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_schema_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size931; - ::apache::thrift::protocol::TType _etype934; - xfer += iprot->readListBegin(_etype934, _size931); - this->success.resize(_size931); - uint32_t _i935; - for (_i935 = 0; _i935 < _size931; ++_i935) - { - xfer += this->success[_i935].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_schema_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_with_environment_context_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter936; - for (_iter936 = this->success.begin(); _iter936 != this->success.end(); ++_iter936) - { - xfer += (*_iter936).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_schema_with_environment_context_presult::~ThriftHiveMetastore_get_schema_with_environment_context_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_schema_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size937; - ::apache::thrift::protocol::TType _etype940; - xfer += iprot->readListBegin(_etype940, _size937); - (*(this->success)).resize(_size937); - uint32_t _i941; - for (_i941 = 0; _i941 < _size937; ++_i941) - { - xfer += (*(this->success))[_i941].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_create_table_args::~ThriftHiveMetastore_create_table_args() throw() { -} - - -uint32_t ThriftHiveMetastore_create_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->tbl.read(iprot); - this->__isset.tbl = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_create_table_pargs::~ThriftHiveMetastore_create_table_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_create_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_create_table_result::~ThriftHiveMetastore_create_table_result() throw() { -} - - -uint32_t ThriftHiveMetastore_create_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_create_table_presult::~ThriftHiveMetastore_create_table_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_create_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_create_table_with_environment_context_args::~ThriftHiveMetastore_create_table_with_environment_context_args() throw() { -} - - -uint32_t ThriftHiveMetastore_create_table_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->tbl.read(iprot); - this->__isset.tbl = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environment_context.read(iprot); - this->__isset.environment_context = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_table_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_create_table_with_environment_context_pargs::~ThriftHiveMetastore_create_table_with_environment_context_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_create_table_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_create_table_with_environment_context_result::~ThriftHiveMetastore_create_table_with_environment_context_result() throw() { -} - - -uint32_t ThriftHiveMetastore_create_table_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_table_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_with_environment_context_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_create_table_with_environment_context_presult::~ThriftHiveMetastore_create_table_with_environment_context_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_create_table_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_create_table_with_constraints_args::~ThriftHiveMetastore_create_table_with_constraints_args() throw() { -} - - -uint32_t ThriftHiveMetastore_create_table_with_constraints_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->tbl.read(iprot); - this->__isset.tbl = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->primaryKeys.clear(); - uint32_t _size942; - ::apache::thrift::protocol::TType _etype945; - xfer += iprot->readListBegin(_etype945, _size942); - this->primaryKeys.resize(_size942); - uint32_t _i946; - for (_i946 = 0; _i946 < _size942; ++_i946) - { - xfer += this->primaryKeys[_i946].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.primaryKeys = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->foreignKeys.clear(); - uint32_t _size947; - ::apache::thrift::protocol::TType _etype950; - xfer += iprot->readListBegin(_etype950, _size947); - this->foreignKeys.resize(_size947); - uint32_t _i951; - for (_i951 = 0; _i951 < _size947; ++_i951) - { - xfer += this->foreignKeys[_i951].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.foreignKeys = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->uniqueConstraints.clear(); - uint32_t _size952; - ::apache::thrift::protocol::TType _etype955; - xfer += iprot->readListBegin(_etype955, _size952); - this->uniqueConstraints.resize(_size952); - uint32_t _i956; - for (_i956 = 0; _i956 < _size952; ++_i956) - { - xfer += this->uniqueConstraints[_i956].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.uniqueConstraints = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->notNullConstraints.clear(); - uint32_t _size957; - ::apache::thrift::protocol::TType _etype960; - xfer += iprot->readListBegin(_etype960, _size957); - this->notNullConstraints.resize(_size957); - uint32_t _i961; - for (_i961 = 0; _i961 < _size957; ++_i961) - { - xfer += this->notNullConstraints[_i961].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.notNullConstraints = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_table_with_constraints_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_with_constraints_args"); - - xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->tbl.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("primaryKeys", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->primaryKeys.size())); - std::vector ::const_iterator _iter962; - for (_iter962 = this->primaryKeys.begin(); _iter962 != this->primaryKeys.end(); ++_iter962) - { - xfer += (*_iter962).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("foreignKeys", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->foreignKeys.size())); - std::vector ::const_iterator _iter963; - for (_iter963 = this->foreignKeys.begin(); _iter963 != this->foreignKeys.end(); ++_iter963) - { - xfer += (*_iter963).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("uniqueConstraints", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->uniqueConstraints.size())); - std::vector ::const_iterator _iter964; - for (_iter964 = this->uniqueConstraints.begin(); _iter964 != this->uniqueConstraints.end(); ++_iter964) - { - xfer += (*_iter964).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("notNullConstraints", ::apache::thrift::protocol::T_LIST, 5); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->notNullConstraints.size())); - std::vector ::const_iterator _iter965; - for (_iter965 = this->notNullConstraints.begin(); _iter965 != this->notNullConstraints.end(); ++_iter965) - { - xfer += (*_iter965).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_create_table_with_constraints_pargs::~ThriftHiveMetastore_create_table_with_constraints_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_create_table_with_constraints_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_with_constraints_pargs"); - - xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->tbl)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("primaryKeys", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->primaryKeys)).size())); - std::vector ::const_iterator _iter966; - for (_iter966 = (*(this->primaryKeys)).begin(); _iter966 != (*(this->primaryKeys)).end(); ++_iter966) - { - xfer += (*_iter966).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("foreignKeys", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->foreignKeys)).size())); - std::vector ::const_iterator _iter967; - for (_iter967 = (*(this->foreignKeys)).begin(); _iter967 != (*(this->foreignKeys)).end(); ++_iter967) - { - xfer += (*_iter967).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("uniqueConstraints", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->uniqueConstraints)).size())); - std::vector ::const_iterator _iter968; - for (_iter968 = (*(this->uniqueConstraints)).begin(); _iter968 != (*(this->uniqueConstraints)).end(); ++_iter968) - { - xfer += (*_iter968).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("notNullConstraints", ::apache::thrift::protocol::T_LIST, 5); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->notNullConstraints)).size())); - std::vector ::const_iterator _iter969; - for (_iter969 = (*(this->notNullConstraints)).begin(); _iter969 != (*(this->notNullConstraints)).end(); ++_iter969) - { - xfer += (*_iter969).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_create_table_with_constraints_result::~ThriftHiveMetastore_create_table_with_constraints_result() throw() { -} - - -uint32_t ThriftHiveMetastore_create_table_with_constraints_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_table_with_constraints_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_with_constraints_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_create_table_with_constraints_presult::~ThriftHiveMetastore_create_table_with_constraints_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_create_table_with_constraints_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_constraint_args::~ThriftHiveMetastore_drop_constraint_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_constraint_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_constraint_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_constraint_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_constraint_pargs::~ThriftHiveMetastore_drop_constraint_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_constraint_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_constraint_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_constraint_result::~ThriftHiveMetastore_drop_constraint_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_constraint_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_constraint_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_constraint_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_constraint_presult::~ThriftHiveMetastore_drop_constraint_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_constraint_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_primary_key_args::~ThriftHiveMetastore_add_primary_key_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_primary_key_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_primary_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_primary_key_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_primary_key_pargs::~ThriftHiveMetastore_add_primary_key_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_primary_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_primary_key_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_primary_key_result::~ThriftHiveMetastore_add_primary_key_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_primary_key_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_primary_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_primary_key_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_primary_key_presult::~ThriftHiveMetastore_add_primary_key_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_primary_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_foreign_key_args::~ThriftHiveMetastore_add_foreign_key_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_foreign_key_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_foreign_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_foreign_key_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_foreign_key_pargs::~ThriftHiveMetastore_add_foreign_key_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_foreign_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_foreign_key_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_foreign_key_result::~ThriftHiveMetastore_add_foreign_key_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_foreign_key_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_foreign_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_foreign_key_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_foreign_key_presult::~ThriftHiveMetastore_add_foreign_key_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_foreign_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_unique_constraint_args::~ThriftHiveMetastore_add_unique_constraint_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_unique_constraint_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_unique_constraint_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_unique_constraint_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_unique_constraint_pargs::~ThriftHiveMetastore_add_unique_constraint_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_unique_constraint_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_unique_constraint_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_unique_constraint_result::~ThriftHiveMetastore_add_unique_constraint_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_unique_constraint_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_unique_constraint_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_unique_constraint_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_unique_constraint_presult::~ThriftHiveMetastore_add_unique_constraint_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_unique_constraint_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_not_null_constraint_args::~ThriftHiveMetastore_add_not_null_constraint_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_not_null_constraint_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_not_null_constraint_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_not_null_constraint_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_not_null_constraint_pargs::~ThriftHiveMetastore_add_not_null_constraint_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_not_null_constraint_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_not_null_constraint_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_not_null_constraint_result::~ThriftHiveMetastore_add_not_null_constraint_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_not_null_constraint_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_not_null_constraint_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_not_null_constraint_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_not_null_constraint_presult::~ThriftHiveMetastore_add_not_null_constraint_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_not_null_constraint_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_table_args::~ThriftHiveMetastore_drop_table_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_drop_table_pargs::~ThriftHiveMetastore_drop_table_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_drop_table_result::~ThriftHiveMetastore_drop_table_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_table_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_table_presult::~ThriftHiveMetastore_drop_table_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_table_with_environment_context_args::~ThriftHiveMetastore_drop_table_with_environment_context_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_table_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environment_context.read(iprot); - this->__isset.environment_context = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_table_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_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("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->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; -} - - -ThriftHiveMetastore_drop_table_with_environment_context_pargs::~ThriftHiveMetastore_drop_table_with_environment_context_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_table_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_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("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->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; -} - - -ThriftHiveMetastore_drop_table_with_environment_context_result::~ThriftHiveMetastore_drop_table_with_environment_context_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_table_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_table_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_table_with_environment_context_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_table_with_environment_context_presult::~ThriftHiveMetastore_drop_table_with_environment_context_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_table_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_truncate_table_args::~ThriftHiveMetastore_truncate_table_args() throw() { -} - - -uint32_t ThriftHiveMetastore_truncate_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableName); - this->__isset.tableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partNames.clear(); - uint32_t _size970; - ::apache::thrift::protocol::TType _etype973; - xfer += iprot->readListBegin(_etype973, _size970); - this->partNames.resize(_size970); - uint32_t _i974; - for (_i974 = 0; _i974 < _size970; ++_i974) - { - xfer += iprot->readString(this->partNames[_i974]); - } - xfer += iprot->readListEnd(); - } - this->__isset.partNames = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_truncate_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_truncate_table_args"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tableName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("partNames", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->partNames.size())); - std::vector ::const_iterator _iter975; - for (_iter975 = this->partNames.begin(); _iter975 != this->partNames.end(); ++_iter975) - { - xfer += oprot->writeString((*_iter975)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_truncate_table_pargs::~ThriftHiveMetastore_truncate_table_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_truncate_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_truncate_table_pargs"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->dbName))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tableName))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("partNames", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->partNames)).size())); - std::vector ::const_iterator _iter976; - for (_iter976 = (*(this->partNames)).begin(); _iter976 != (*(this->partNames)).end(); ++_iter976) - { - xfer += oprot->writeString((*_iter976)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_truncate_table_result::~ThriftHiveMetastore_truncate_table_result() throw() { -} - - -uint32_t ThriftHiveMetastore_truncate_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_truncate_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_truncate_table_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_truncate_table_presult::~ThriftHiveMetastore_truncate_table_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_truncate_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_tables_args::~ThriftHiveMetastore_get_tables_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_tables_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->pattern); - this->__isset.pattern = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_tables_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_tables_pargs::~ThriftHiveMetastore_get_tables_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_tables_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_tables_result::~ThriftHiveMetastore_get_tables_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_tables_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size977; - ::apache::thrift::protocol::TType _etype980; - xfer += iprot->readListBegin(_etype980, _size977); - this->success.resize(_size977); - uint32_t _i981; - for (_i981 = 0; _i981 < _size977; ++_i981) - { - xfer += iprot->readString(this->success[_i981]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_tables_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter982; - for (_iter982 = this->success.begin(); _iter982 != this->success.end(); ++_iter982) - { - xfer += oprot->writeString((*_iter982)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_tables_presult::~ThriftHiveMetastore_get_tables_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_tables_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size983; - ::apache::thrift::protocol::TType _etype986; - xfer += iprot->readListBegin(_etype986, _size983); - (*(this->success)).resize(_size983); - uint32_t _i987; - for (_i987 = 0; _i987 < _size983; ++_i987) - { - xfer += iprot->readString((*(this->success))[_i987]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_tables_by_type_args::~ThriftHiveMetastore_get_tables_by_type_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_tables_by_type_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->pattern); - this->__isset.pattern = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableType); - this->__isset.tableType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_tables_by_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_by_type_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->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->tableType); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_tables_by_type_pargs::~ThriftHiveMetastore_get_tables_by_type_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_tables_by_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_by_type_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->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->tableType))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_tables_by_type_result::~ThriftHiveMetastore_get_tables_by_type_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_tables_by_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size988; - ::apache::thrift::protocol::TType _etype991; - xfer += iprot->readListBegin(_etype991, _size988); - this->success.resize(_size988); - uint32_t _i992; - for (_i992 = 0; _i992 < _size988; ++_i992) - { - xfer += iprot->readString(this->success[_i992]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_tables_by_type_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_by_type_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter993; - for (_iter993 = this->success.begin(); _iter993 != this->success.end(); ++_iter993) - { - xfer += oprot->writeString((*_iter993)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_tables_by_type_presult::~ThriftHiveMetastore_get_tables_by_type_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_tables_by_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size994; - ::apache::thrift::protocol::TType _etype997; - xfer += iprot->readListBegin(_etype997, _size994); - (*(this->success)).resize(_size994); - uint32_t _i998; - for (_i998 = 0; _i998 < _size994; ++_i998) - { - xfer += iprot->readString((*(this->success))[_i998]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_table_meta_args::~ThriftHiveMetastore_get_table_meta_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_meta_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_patterns); - this->__isset.db_patterns = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_patterns); - this->__isset.tbl_patterns = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->tbl_types.clear(); - uint32_t _size999; - ::apache::thrift::protocol::TType _etype1002; - xfer += iprot->readListBegin(_etype1002, _size999); - this->tbl_types.resize(_size999); - uint32_t _i1003; - for (_i1003 = 0; _i1003 < _size999; ++_i1003) - { - xfer += iprot->readString(this->tbl_types[_i1003]); - } - xfer += iprot->readListEnd(); - } - this->__isset.tbl_types = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_meta_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_meta_args"); - - xfer += oprot->writeFieldBegin("db_patterns", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->db_patterns); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tbl_patterns", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_patterns); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tbl_types", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->tbl_types.size())); - std::vector ::const_iterator _iter1004; - for (_iter1004 = this->tbl_types.begin(); _iter1004 != this->tbl_types.end(); ++_iter1004) - { - xfer += oprot->writeString((*_iter1004)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_meta_pargs::~ThriftHiveMetastore_get_table_meta_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_meta_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_meta_pargs"); - - xfer += oprot->writeFieldBegin("db_patterns", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->db_patterns))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tbl_patterns", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_patterns))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tbl_types", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->tbl_types)).size())); - std::vector ::const_iterator _iter1005; - for (_iter1005 = (*(this->tbl_types)).begin(); _iter1005 != (*(this->tbl_types)).end(); ++_iter1005) - { - xfer += oprot->writeString((*_iter1005)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_meta_result::~ThriftHiveMetastore_get_table_meta_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_meta_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1006; - ::apache::thrift::protocol::TType _etype1009; - xfer += iprot->readListBegin(_etype1009, _size1006); - this->success.resize(_size1006); - uint32_t _i1010; - for (_i1010 = 0; _i1010 < _size1006; ++_i1010) - { - xfer += this->success[_i1010].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_meta_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_meta_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1011; - for (_iter1011 = this->success.begin(); _iter1011 != this->success.end(); ++_iter1011) - { - xfer += (*_iter1011).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_meta_presult::~ThriftHiveMetastore_get_table_meta_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_meta_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1012; - ::apache::thrift::protocol::TType _etype1015; - xfer += iprot->readListBegin(_etype1015, _size1012); - (*(this->success)).resize(_size1012); - uint32_t _i1016; - for (_i1016 = 0; _i1016 < _size1012; ++_i1016) - { - xfer += (*(this->success))[_i1016].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_all_tables_args::~ThriftHiveMetastore_get_all_tables_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_tables_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_all_tables_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_all_tables_pargs::~ThriftHiveMetastore_get_all_tables_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_tables_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_all_tables_result::~ThriftHiveMetastore_get_all_tables_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_tables_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1017; - ::apache::thrift::protocol::TType _etype1020; - xfer += iprot->readListBegin(_etype1020, _size1017); - this->success.resize(_size1017); - uint32_t _i1021; - for (_i1021 = 0; _i1021 < _size1017; ++_i1021) - { - xfer += iprot->readString(this->success[_i1021]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_all_tables_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_tables_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter1022; - for (_iter1022 = this->success.begin(); _iter1022 != this->success.end(); ++_iter1022) - { - xfer += oprot->writeString((*_iter1022)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_all_tables_presult::~ThriftHiveMetastore_get_all_tables_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_tables_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1023; - ::apache::thrift::protocol::TType _etype1026; - xfer += iprot->readListBegin(_etype1026, _size1023); - (*(this->success)).resize(_size1023); - uint32_t _i1027; - for (_i1027 = 0; _i1027 < _size1023; ++_i1027) - { - xfer += iprot->readString((*(this->success))[_i1027]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_table_args::~ThriftHiveMetastore_get_table_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_table_pargs::~ThriftHiveMetastore_get_table_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_table_result::~ThriftHiveMetastore_get_table_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_presult::~ThriftHiveMetastore_get_table_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_table_objects_by_name_args::~ThriftHiveMetastore_get_table_objects_by_name_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->tbl_names.clear(); - uint32_t _size1028; - ::apache::thrift::protocol::TType _etype1031; - xfer += iprot->readListBegin(_etype1031, _size1028); - this->tbl_names.resize(_size1028); - uint32_t _i1032; - for (_i1032 = 0; _i1032 < _size1028; ++_i1032) - { - xfer += iprot->readString(this->tbl_names[_i1032]); - } - xfer += iprot->readListEnd(); - } - this->__isset.tbl_names = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1033; - for (_iter1033 = this->tbl_names.begin(); _iter1033 != this->tbl_names.end(); ++_iter1033) - { - xfer += oprot->writeString((*_iter1033)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_objects_by_name_pargs::~ThriftHiveMetastore_get_table_objects_by_name_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_objects_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1034; - for (_iter1034 = (*(this->tbl_names)).begin(); _iter1034 != (*(this->tbl_names)).end(); ++_iter1034) - { - xfer += oprot->writeString((*_iter1034)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_objects_by_name_result::~ThriftHiveMetastore_get_table_objects_by_name_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1035; - ::apache::thrift::protocol::TType _etype1038; - xfer += iprot->readListBegin(_etype1038, _size1035); - this->success.resize(_size1035); - uint32_t _i1039; - for (_i1039 = 0; _i1039 < _size1035; ++_i1039) - { - xfer += this->success[_i1039].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_objects_by_name_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector
::const_iterator _iter1040; - for (_iter1040 = this->success.begin(); _iter1040 != this->success.end(); ++_iter1040) - { - xfer += (*_iter1040).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_objects_by_name_presult::~ThriftHiveMetastore_get_table_objects_by_name_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_objects_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1041; - ::apache::thrift::protocol::TType _etype1044; - xfer += iprot->readListBegin(_etype1044, _size1041); - (*(this->success)).resize(_size1041); - uint32_t _i1045; - for (_i1045 = 0; _i1045 < _size1041; ++_i1045) - { - xfer += (*(this->success))[_i1045].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_table_req_args::~ThriftHiveMetastore_get_table_req_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_req_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_req_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_req_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_req_pargs::~ThriftHiveMetastore_get_table_req_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_req_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_req_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_req_result::~ThriftHiveMetastore_get_table_req_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_req_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_req_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_req_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_req_presult::~ThriftHiveMetastore_get_table_req_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_req_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_table_objects_by_name_req_args::~ThriftHiveMetastore_get_table_objects_by_name_req_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_objects_by_name_req_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_objects_by_name_req_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_objects_by_name_req_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_objects_by_name_req_pargs::~ThriftHiveMetastore_get_table_objects_by_name_req_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_objects_by_name_req_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_objects_by_name_req_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_objects_by_name_req_result::~ThriftHiveMetastore_get_table_objects_by_name_req_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_objects_by_name_req_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_objects_by_name_req_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_objects_by_name_req_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_objects_by_name_req_presult::~ThriftHiveMetastore_get_table_objects_by_name_req_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_objects_by_name_req_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_table_names_by_filter_args::~ThriftHiveMetastore_get_table_names_by_filter_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_names_by_filter_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->filter); - this->__isset.filter = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_tables); - this->__isset.max_tables = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_names_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_table_names_by_filter_pargs::~ThriftHiveMetastore_get_table_names_by_filter_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_names_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_table_names_by_filter_result::~ThriftHiveMetastore_get_table_names_by_filter_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1046; - ::apache::thrift::protocol::TType _etype1049; - xfer += iprot->readListBegin(_etype1049, _size1046); - this->success.resize(_size1046); - uint32_t _i1050; - for (_i1050 = 0; _i1050 < _size1046; ++_i1050) - { - xfer += iprot->readString(this->success[_i1050]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_names_by_filter_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter1051; - for (_iter1051 = this->success.begin(); _iter1051 != this->success.end(); ++_iter1051) - { - xfer += oprot->writeString((*_iter1051)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_names_by_filter_presult::~ThriftHiveMetastore_get_table_names_by_filter_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_names_by_filter_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1052; - ::apache::thrift::protocol::TType _etype1055; - xfer += iprot->readListBegin(_etype1055, _size1052); - (*(this->success)).resize(_size1052); - uint32_t _i1056; - for (_i1056 = 0; _i1056 < _size1052; ++_i1056) - { - xfer += iprot->readString((*(this->success))[_i1056]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_alter_table_args::~ThriftHiveMetastore_alter_table_args() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_tbl.read(iprot); - this->__isset.new_tbl = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_alter_table_pargs::~ThriftHiveMetastore_alter_table_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_alter_table_result::~ThriftHiveMetastore_alter_table_result() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_table_presult::~ThriftHiveMetastore_alter_table_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_alter_table_with_environment_context_args::~ThriftHiveMetastore_alter_table_with_environment_context_args() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_table_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_tbl.read(iprot); - this->__isset.new_tbl = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environment_context.read(iprot); - this->__isset.environment_context = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_table_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_alter_table_with_environment_context_pargs::~ThriftHiveMetastore_alter_table_with_environment_context_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_table_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_alter_table_with_environment_context_result::~ThriftHiveMetastore_alter_table_with_environment_context_result() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_table_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_table_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_with_environment_context_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_table_with_environment_context_presult::~ThriftHiveMetastore_alter_table_with_environment_context_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_table_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_alter_table_with_cascade_args::~ThriftHiveMetastore_alter_table_with_cascade_args() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_table_with_cascade_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_tbl.read(iprot); - this->__isset.new_tbl = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->cascade); - this->__isset.cascade = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_table_with_cascade_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_with_cascade_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("cascade", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->cascade); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_table_with_cascade_pargs::~ThriftHiveMetastore_alter_table_with_cascade_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_table_with_cascade_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_with_cascade_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("cascade", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool((*(this->cascade))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_table_with_cascade_result::~ThriftHiveMetastore_alter_table_with_cascade_result() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_table_with_cascade_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_table_with_cascade_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_with_cascade_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_table_with_cascade_presult::~ThriftHiveMetastore_alter_table_with_cascade_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_table_with_cascade_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_partition_args::~ThriftHiveMetastore_add_partition_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_part.read(iprot); - this->__isset.new_part = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_add_partition_pargs::~ThriftHiveMetastore_add_partition_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_add_partition_result::~ThriftHiveMetastore_add_partition_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_partition_presult::~ThriftHiveMetastore_add_partition_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_partition_with_environment_context_args::~ThriftHiveMetastore_add_partition_with_environment_context_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partition_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_part.read(iprot); - this->__isset.new_part = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environment_context.read(iprot); - this->__isset.environment_context = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partition_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_add_partition_with_environment_context_pargs::~ThriftHiveMetastore_add_partition_with_environment_context_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partition_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_add_partition_with_environment_context_result::~ThriftHiveMetastore_add_partition_with_environment_context_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partition_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partition_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_with_environment_context_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_partition_with_environment_context_presult::~ThriftHiveMetastore_add_partition_with_environment_context_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partition_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_partitions_args::~ThriftHiveMetastore_add_partitions_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->new_parts.clear(); - uint32_t _size1057; - ::apache::thrift::protocol::TType _etype1060; - xfer += iprot->readListBegin(_etype1060, _size1057); - this->new_parts.resize(_size1057); - uint32_t _i1061; - for (_i1061 = 0; _i1061 < _size1057; ++_i1061) - { - xfer += this->new_parts[_i1061].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.new_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1062; - for (_iter1062 = this->new_parts.begin(); _iter1062 != this->new_parts.end(); ++_iter1062) - { - xfer += (*_iter1062).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_partitions_pargs::~ThriftHiveMetastore_add_partitions_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1063; - for (_iter1063 = (*(this->new_parts)).begin(); _iter1063 != (*(this->new_parts)).end(); ++_iter1063) - { - xfer += (*_iter1063).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_partitions_result::~ThriftHiveMetastore_add_partitions_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); - xfer += oprot->writeI32(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_partitions_presult::~ThriftHiveMetastore_add_partitions_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_partitions_pspec_args::~ThriftHiveMetastore_add_partitions_pspec_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partitions_pspec_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->new_parts.clear(); - uint32_t _size1064; - ::apache::thrift::protocol::TType _etype1067; - xfer += iprot->readListBegin(_etype1067, _size1064); - this->new_parts.resize(_size1064); - uint32_t _i1068; - for (_i1068 = 0; _i1068 < _size1064; ++_i1068) - { - xfer += this->new_parts[_i1068].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.new_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partitions_pspec_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_pspec_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())); - std::vector ::const_iterator _iter1069; - for (_iter1069 = this->new_parts.begin(); _iter1069 != this->new_parts.end(); ++_iter1069) - { - xfer += (*_iter1069).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_partitions_pspec_pargs::~ThriftHiveMetastore_add_partitions_pspec_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partitions_pspec_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_pspec_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())); - std::vector ::const_iterator _iter1070; - for (_iter1070 = (*(this->new_parts)).begin(); _iter1070 != (*(this->new_parts)).end(); ++_iter1070) - { - xfer += (*_iter1070).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_partitions_pspec_result::~ThriftHiveMetastore_add_partitions_pspec_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partitions_pspec_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partitions_pspec_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_pspec_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); - xfer += oprot->writeI32(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_partitions_pspec_presult::~ThriftHiveMetastore_add_partitions_pspec_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partitions_pspec_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_append_partition_args::~ThriftHiveMetastore_append_partition_args() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size1071; - ::apache::thrift::protocol::TType _etype1074; - xfer += iprot->readListBegin(_etype1074, _size1071); - this->part_vals.resize(_size1071); - uint32_t _i1075; - for (_i1075 = 0; _i1075 < _size1071; ++_i1075) - { - xfer += iprot->readString(this->part_vals[_i1075]); - } - xfer += iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_append_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1076; - for (_iter1076 = this->part_vals.begin(); _iter1076 != this->part_vals.end(); ++_iter1076) - { - xfer += oprot->writeString((*_iter1076)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_append_partition_pargs::~ThriftHiveMetastore_append_partition_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1077; - for (_iter1077 = (*(this->part_vals)).begin(); _iter1077 != (*(this->part_vals)).end(); ++_iter1077) - { - xfer += oprot->writeString((*_iter1077)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_append_partition_result::~ThriftHiveMetastore_append_partition_result() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_append_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_append_partition_presult::~ThriftHiveMetastore_append_partition_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_partitions_req_args::~ThriftHiveMetastore_add_partitions_req_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partitions_req_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partitions_req_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_req_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_partitions_req_pargs::~ThriftHiveMetastore_add_partitions_req_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partitions_req_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_req_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_partitions_req_result::~ThriftHiveMetastore_add_partitions_req_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partitions_req_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_partitions_req_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_req_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_partitions_req_presult::~ThriftHiveMetastore_add_partitions_req_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_partitions_req_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_append_partition_with_environment_context_args::~ThriftHiveMetastore_append_partition_with_environment_context_args() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size1078; - ::apache::thrift::protocol::TType _etype1081; - xfer += iprot->readListBegin(_etype1081, _size1078); - this->part_vals.resize(_size1078); - uint32_t _i1082; - for (_i1082 = 0; _i1082 < _size1078; ++_i1082) - { - xfer += iprot->readString(this->part_vals[_i1082]); - } - xfer += iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environment_context.read(iprot); - this->__isset.environment_context = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_append_partition_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_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("part_vals", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter1083; - for (_iter1083 = this->part_vals.begin(); _iter1083 != this->part_vals.end(); ++_iter1083) - { - xfer += oprot->writeString((*_iter1083)); - } - xfer += oprot->writeListEnd(); - } - 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; -} - - -ThriftHiveMetastore_append_partition_with_environment_context_pargs::~ThriftHiveMetastore_append_partition_with_environment_context_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_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("part_vals", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter1084; - for (_iter1084 = (*(this->part_vals)).begin(); _iter1084 != (*(this->part_vals)).end(); ++_iter1084) - { - xfer += oprot->writeString((*_iter1084)); - } - xfer += oprot->writeListEnd(); - } - 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; -} - - -ThriftHiveMetastore_append_partition_with_environment_context_result::~ThriftHiveMetastore_append_partition_with_environment_context_result() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_append_partition_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_with_environment_context_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_append_partition_with_environment_context_presult::~ThriftHiveMetastore_append_partition_with_environment_context_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_append_partition_by_name_args::~ThriftHiveMetastore_append_partition_by_name_args() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_append_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_append_partition_by_name_pargs::~ThriftHiveMetastore_append_partition_by_name_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_append_partition_by_name_result::~ThriftHiveMetastore_append_partition_by_name_result() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_append_partition_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_append_partition_by_name_presult::~ThriftHiveMetastore_append_partition_by_name_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_append_partition_by_name_with_environment_context_args::~ThriftHiveMetastore_append_partition_by_name_with_environment_context_args() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_by_name_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environment_context.read(iprot); - this->__isset.environment_context = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_append_partition_by_name_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_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("part_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->part_name); - 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; -} - - -ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs::~ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_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("part_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->part_name))); - 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; -} - - -ThriftHiveMetastore_append_partition_by_name_with_environment_context_result::~ThriftHiveMetastore_append_partition_by_name_with_environment_context_result() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_by_name_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_append_partition_by_name_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_with_environment_context_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult::~ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_partition_args::~ThriftHiveMetastore_drop_partition_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size1085; - ::apache::thrift::protocol::TType _etype1088; - xfer += iprot->readListBegin(_etype1088, _size1085); - this->part_vals.resize(_size1085); - uint32_t _i1089; - for (_i1089 = 0; _i1089 < _size1085; ++_i1089) - { - xfer += iprot->readString(this->part_vals[_i1089]); - } - xfer += iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1090; - for (_iter1090 = this->part_vals.begin(); _iter1090 != this->part_vals.end(); ++_iter1090) - { - xfer += oprot->writeString((*_iter1090)); - } - 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; -} - - -ThriftHiveMetastore_drop_partition_pargs::~ThriftHiveMetastore_drop_partition_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1091; - for (_iter1091 = (*(this->part_vals)).begin(); _iter1091 != (*(this->part_vals)).end(); ++_iter1091) - { - xfer += oprot->writeString((*_iter1091)); - } - 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; -} - - -ThriftHiveMetastore_drop_partition_result::~ThriftHiveMetastore_drop_partition_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_partition_presult::~ThriftHiveMetastore_drop_partition_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_partition_with_environment_context_args::~ThriftHiveMetastore_drop_partition_with_environment_context_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size1092; - ::apache::thrift::protocol::TType _etype1095; - xfer += iprot->readListBegin(_etype1095, _size1092); - this->part_vals.resize(_size1092); - uint32_t _i1096; - for (_i1096 = 0; _i1096 < _size1092; ++_i1096) - { - xfer += iprot->readString(this->part_vals[_i1096]); - } - xfer += iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environment_context.read(iprot); - this->__isset.environment_context = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_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("part_vals", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter1097; - for (_iter1097 = this->part_vals.begin(); _iter1097 != this->part_vals.end(); ++_iter1097) - { - xfer += oprot->writeString((*_iter1097)); - } - 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->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 5); - xfer += this->environment_context.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_partition_with_environment_context_pargs::~ThriftHiveMetastore_drop_partition_with_environment_context_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_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("part_vals", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter1098; - for (_iter1098 = (*(this->part_vals)).begin(); _iter1098 != (*(this->part_vals)).end(); ++_iter1098) - { - xfer += oprot->writeString((*_iter1098)); - } - 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->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 5); - xfer += (*(this->environment_context)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_partition_with_environment_context_result::~ThriftHiveMetastore_drop_partition_with_environment_context_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_with_environment_context_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_partition_with_environment_context_presult::~ThriftHiveMetastore_drop_partition_with_environment_context_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_partition_by_name_args::~ThriftHiveMetastore_drop_partition_by_name_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_drop_partition_by_name_pargs::~ThriftHiveMetastore_drop_partition_by_name_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_drop_partition_by_name_result::~ThriftHiveMetastore_drop_partition_by_name_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partition_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_partition_by_name_presult::~ThriftHiveMetastore_drop_partition_by_name_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args::~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environment_context.read(iprot); - this->__isset.environment_context = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_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("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->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 5); - xfer += this->environment_context.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs::~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_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("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->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 5); - xfer += (*(this->environment_context)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result::~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult::~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_partitions_req_args::~ThriftHiveMetastore_drop_partitions_req_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partitions_req_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partitions_req_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partitions_req_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_partitions_req_pargs::~ThriftHiveMetastore_drop_partitions_req_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partitions_req_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partitions_req_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_partitions_req_result::~ThriftHiveMetastore_drop_partitions_req_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partitions_req_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_partitions_req_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partitions_req_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_partitions_req_presult::~ThriftHiveMetastore_drop_partitions_req_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_partitions_req_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partition_args::~ThriftHiveMetastore_get_partition_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size1099; - ::apache::thrift::protocol::TType _etype1102; - xfer += iprot->readListBegin(_etype1102, _size1099); - this->part_vals.resize(_size1099); - uint32_t _i1103; - for (_i1103 = 0; _i1103 < _size1099; ++_i1103) - { - xfer += iprot->readString(this->part_vals[_i1103]); - } - xfer += iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1104; - for (_iter1104 = this->part_vals.begin(); _iter1104 != this->part_vals.end(); ++_iter1104) - { - xfer += oprot->writeString((*_iter1104)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partition_pargs::~ThriftHiveMetastore_get_partition_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1105; - for (_iter1105 = (*(this->part_vals)).begin(); _iter1105 != (*(this->part_vals)).end(); ++_iter1105) - { - xfer += oprot->writeString((*_iter1105)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partition_result::~ThriftHiveMetastore_get_partition_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partition_presult::~ThriftHiveMetastore_get_partition_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_exchange_partition_args::~ThriftHiveMetastore_exchange_partition_args() throw() { -} - - -uint32_t ThriftHiveMetastore_exchange_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->partitionSpecs.clear(); - uint32_t _size1106; - ::apache::thrift::protocol::TType _ktype1107; - ::apache::thrift::protocol::TType _vtype1108; - xfer += iprot->readMapBegin(_ktype1107, _vtype1108, _size1106); - uint32_t _i1110; - for (_i1110 = 0; _i1110 < _size1106; ++_i1110) - { - std::string _key1111; - xfer += iprot->readString(_key1111); - std::string& _val1112 = this->partitionSpecs[_key1111]; - xfer += iprot->readString(_val1112); - } - xfer += iprot->readMapEnd(); - } - this->__isset.partitionSpecs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->source_db); - this->__isset.source_db = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->source_table_name); - this->__isset.source_table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dest_db); - this->__isset.dest_db = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dest_table_name); - this->__isset.dest_table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_exchange_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_exchange_partition_args"); - - xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->partitionSpecs.size())); - std::map ::const_iterator _iter1113; - for (_iter1113 = this->partitionSpecs.begin(); _iter1113 != this->partitionSpecs.end(); ++_iter1113) - { - xfer += oprot->writeString(_iter1113->first); - xfer += oprot->writeString(_iter1113->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("source_db", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->source_db); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("source_table_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->source_table_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("dest_db", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->dest_db); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("dest_table_name", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->dest_table_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_exchange_partition_pargs::~ThriftHiveMetastore_exchange_partition_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_exchange_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_exchange_partition_pargs"); - - xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->partitionSpecs)).size())); - std::map ::const_iterator _iter1114; - for (_iter1114 = (*(this->partitionSpecs)).begin(); _iter1114 != (*(this->partitionSpecs)).end(); ++_iter1114) - { - xfer += oprot->writeString(_iter1114->first); - xfer += oprot->writeString(_iter1114->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("source_db", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->source_db))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("source_table_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->source_table_name))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("dest_db", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString((*(this->dest_db))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("dest_table_name", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString((*(this->dest_table_name))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_exchange_partition_result::~ThriftHiveMetastore_exchange_partition_result() throw() { -} - - -uint32_t ThriftHiveMetastore_exchange_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_exchange_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_exchange_partition_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_exchange_partition_presult::~ThriftHiveMetastore_exchange_partition_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_exchange_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_exchange_partitions_args::~ThriftHiveMetastore_exchange_partitions_args() throw() { -} - - -uint32_t ThriftHiveMetastore_exchange_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->partitionSpecs.clear(); - uint32_t _size1115; - ::apache::thrift::protocol::TType _ktype1116; - ::apache::thrift::protocol::TType _vtype1117; - xfer += iprot->readMapBegin(_ktype1116, _vtype1117, _size1115); - uint32_t _i1119; - for (_i1119 = 0; _i1119 < _size1115; ++_i1119) - { - std::string _key1120; - xfer += iprot->readString(_key1120); - std::string& _val1121 = this->partitionSpecs[_key1120]; - xfer += iprot->readString(_val1121); - } - xfer += iprot->readMapEnd(); - } - this->__isset.partitionSpecs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->source_db); - this->__isset.source_db = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->source_table_name); - this->__isset.source_table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dest_db); - this->__isset.dest_db = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dest_table_name); - this->__isset.dest_table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_exchange_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_exchange_partitions_args"); - - xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->partitionSpecs.size())); - std::map ::const_iterator _iter1122; - for (_iter1122 = this->partitionSpecs.begin(); _iter1122 != this->partitionSpecs.end(); ++_iter1122) - { - xfer += oprot->writeString(_iter1122->first); - xfer += oprot->writeString(_iter1122->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("source_db", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->source_db); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("source_table_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->source_table_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("dest_db", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->dest_db); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("dest_table_name", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->dest_table_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_exchange_partitions_pargs::~ThriftHiveMetastore_exchange_partitions_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_exchange_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_exchange_partitions_pargs"); - - xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->partitionSpecs)).size())); - std::map ::const_iterator _iter1123; - for (_iter1123 = (*(this->partitionSpecs)).begin(); _iter1123 != (*(this->partitionSpecs)).end(); ++_iter1123) - { - xfer += oprot->writeString(_iter1123->first); - xfer += oprot->writeString(_iter1123->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("source_db", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->source_db))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("source_table_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->source_table_name))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("dest_db", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString((*(this->dest_db))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("dest_table_name", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString((*(this->dest_table_name))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_exchange_partitions_result::~ThriftHiveMetastore_exchange_partitions_result() throw() { -} - - -uint32_t ThriftHiveMetastore_exchange_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1124; - ::apache::thrift::protocol::TType _etype1127; - xfer += iprot->readListBegin(_etype1127, _size1124); - this->success.resize(_size1124); - uint32_t _i1128; - for (_i1128 = 0; _i1128 < _size1124; ++_i1128) - { - xfer += this->success[_i1128].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_exchange_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_exchange_partitions_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1129; - for (_iter1129 = this->success.begin(); _iter1129 != this->success.end(); ++_iter1129) - { - xfer += (*_iter1129).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_exchange_partitions_presult::~ThriftHiveMetastore_exchange_partitions_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_exchange_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1130; - ::apache::thrift::protocol::TType _etype1133; - xfer += iprot->readListBegin(_etype1133, _size1130); - (*(this->success)).resize(_size1130); - uint32_t _i1134; - for (_i1134 = 0; _i1134 < _size1130; ++_i1134) - { - xfer += (*(this->success))[_i1134].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partition_with_auth_args::~ThriftHiveMetastore_get_partition_with_auth_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_with_auth_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size1135; - ::apache::thrift::protocol::TType _etype1138; - xfer += iprot->readListBegin(_etype1138, _size1135); - this->part_vals.resize(_size1135); - uint32_t _i1139; - for (_i1139 = 0; _i1139 < _size1135; ++_i1139) - { - xfer += iprot->readString(this->part_vals[_i1139]); - } - xfer += iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user_name); - this->__isset.user_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->group_names.clear(); - uint32_t _size1140; - ::apache::thrift::protocol::TType _etype1143; - xfer += iprot->readListBegin(_etype1143, _size1140); - this->group_names.resize(_size1140); - uint32_t _i1144; - for (_i1144 = 0; _i1144 < _size1140; ++_i1144) - { - xfer += iprot->readString(this->group_names[_i1144]); - } - xfer += iprot->readListEnd(); - } - this->__isset.group_names = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1145; - for (_iter1145 = this->part_vals.begin(); _iter1145 != this->part_vals.end(); ++_iter1145) - { - xfer += oprot->writeString((*_iter1145)); - } - 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())); - std::vector ::const_iterator _iter1146; - for (_iter1146 = this->group_names.begin(); _iter1146 != this->group_names.end(); ++_iter1146) - { - xfer += oprot->writeString((*_iter1146)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partition_with_auth_pargs::~ThriftHiveMetastore_get_partition_with_auth_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1147; - for (_iter1147 = (*(this->part_vals)).begin(); _iter1147 != (*(this->part_vals)).end(); ++_iter1147) - { - xfer += oprot->writeString((*_iter1147)); - } - 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())); - std::vector ::const_iterator _iter1148; - for (_iter1148 = (*(this->group_names)).begin(); _iter1148 != (*(this->group_names)).end(); ++_iter1148) - { - xfer += oprot->writeString((*_iter1148)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partition_with_auth_result::~ThriftHiveMetastore_get_partition_with_auth_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_with_auth_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_with_auth_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_with_auth_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partition_with_auth_presult::~ThriftHiveMetastore_get_partition_with_auth_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_with_auth_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partition_by_name_args::~ThriftHiveMetastore_get_partition_by_name_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_partition_by_name_pargs::~ThriftHiveMetastore_get_partition_by_name_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_partition_by_name_result::~ThriftHiveMetastore_get_partition_by_name_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partition_by_name_presult::~ThriftHiveMetastore_get_partition_by_name_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partitions_args::~ThriftHiveMetastore_get_partitions_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_partitions_pargs::~ThriftHiveMetastore_get_partitions_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_partitions_result::~ThriftHiveMetastore_get_partitions_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1149; - ::apache::thrift::protocol::TType _etype1152; - xfer += iprot->readListBegin(_etype1152, _size1149); - this->success.resize(_size1149); - uint32_t _i1153; - for (_i1153 = 0; _i1153 < _size1149; ++_i1153) - { - xfer += this->success[_i1153].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1154; - for (_iter1154 = this->success.begin(); _iter1154 != this->success.end(); ++_iter1154) - { - xfer += (*_iter1154).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_presult::~ThriftHiveMetastore_get_partitions_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1155; - ::apache::thrift::protocol::TType _etype1158; - xfer += iprot->readListBegin(_etype1158, _size1155); - (*(this->success)).resize(_size1155); - uint32_t _i1159; - for (_i1159 = 0; _i1159 < _size1155; ++_i1159) - { - xfer += (*(this->success))[_i1159].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partitions_with_auth_args::~ThriftHiveMetastore_get_partitions_with_auth_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user_name); - this->__isset.user_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->group_names.clear(); - uint32_t _size1160; - ::apache::thrift::protocol::TType _etype1163; - xfer += iprot->readListBegin(_etype1163, _size1160); - this->group_names.resize(_size1160); - uint32_t _i1164; - for (_i1164 = 0; _i1164 < _size1160; ++_i1164) - { - xfer += iprot->readString(this->group_names[_i1164]); - } - xfer += iprot->readListEnd(); - } - this->__isset.group_names = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1165; - for (_iter1165 = this->group_names.begin(); _iter1165 != this->group_names.end(); ++_iter1165) - { - xfer += oprot->writeString((*_iter1165)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_with_auth_pargs::~ThriftHiveMetastore_get_partitions_with_auth_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1166; - for (_iter1166 = (*(this->group_names)).begin(); _iter1166 != (*(this->group_names)).end(); ++_iter1166) - { - xfer += oprot->writeString((*_iter1166)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_with_auth_result::~ThriftHiveMetastore_get_partitions_with_auth_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1167; - ::apache::thrift::protocol::TType _etype1170; - xfer += iprot->readListBegin(_etype1170, _size1167); - this->success.resize(_size1167); - uint32_t _i1171; - for (_i1171 = 0; _i1171 < _size1167; ++_i1171) - { - xfer += this->success[_i1171].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_with_auth_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1172; - for (_iter1172 = this->success.begin(); _iter1172 != this->success.end(); ++_iter1172) - { - xfer += (*_iter1172).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_with_auth_presult::~ThriftHiveMetastore_get_partitions_with_auth_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_with_auth_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1173; - ::apache::thrift::protocol::TType _etype1176; - xfer += iprot->readListBegin(_etype1176, _size1173); - (*(this->success)).resize(_size1173); - uint32_t _i1177; - for (_i1177 = 0; _i1177 < _size1173; ++_i1177) - { - xfer += (*(this->success))[_i1177].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partitions_pspec_args::~ThriftHiveMetastore_get_partitions_pspec_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_pspec_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_pspec_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pspec_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_I32, 3); - xfer += oprot->writeI32(this->max_parts); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_pspec_pargs::~ThriftHiveMetastore_get_partitions_pspec_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_pspec_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pspec_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_I32, 3); - xfer += oprot->writeI32((*(this->max_parts))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_pspec_result::~ThriftHiveMetastore_get_partitions_pspec_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_pspec_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1178; - ::apache::thrift::protocol::TType _etype1181; - xfer += iprot->readListBegin(_etype1181, _size1178); - this->success.resize(_size1178); - uint32_t _i1182; - for (_i1182 = 0; _i1182 < _size1178; ++_i1182) - { - xfer += this->success[_i1182].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_pspec_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pspec_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1183; - for (_iter1183 = this->success.begin(); _iter1183 != this->success.end(); ++_iter1183) - { - xfer += (*_iter1183).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_pspec_presult::~ThriftHiveMetastore_get_partitions_pspec_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_pspec_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1184; - ::apache::thrift::protocol::TType _etype1187; - xfer += iprot->readListBegin(_etype1187, _size1184); - (*(this->success)).resize(_size1184); - uint32_t _i1188; - for (_i1188 = 0; _i1188 < _size1184; ++_i1188) - { - xfer += (*(this->success))[_i1188].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partition_names_args::~ThriftHiveMetastore_get_partition_names_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_partition_names_pargs::~ThriftHiveMetastore_get_partition_names_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_partition_names_result::~ThriftHiveMetastore_get_partition_names_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1189; - ::apache::thrift::protocol::TType _etype1192; - xfer += iprot->readListBegin(_etype1192, _size1189); - this->success.resize(_size1189); - uint32_t _i1193; - for (_i1193 = 0; _i1193 < _size1189; ++_i1193) - { - xfer += iprot->readString(this->success[_i1193]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter1194; - for (_iter1194 = this->success.begin(); _iter1194 != this->success.end(); ++_iter1194) - { - xfer += oprot->writeString((*_iter1194)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partition_names_presult::~ThriftHiveMetastore_get_partition_names_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1195; - ::apache::thrift::protocol::TType _etype1198; - xfer += iprot->readListBegin(_etype1198, _size1195); - (*(this->success)).resize(_size1195); - uint32_t _i1199; - for (_i1199 = 0; _i1199 < _size1195; ++_i1199) - { - xfer += iprot->readString((*(this->success))[_i1199]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partitions_ps_args::~ThriftHiveMetastore_get_partitions_ps_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size1200; - ::apache::thrift::protocol::TType _etype1203; - xfer += iprot->readListBegin(_etype1203, _size1200); - this->part_vals.resize(_size1200); - uint32_t _i1204; - for (_i1204 = 0; _i1204 < _size1200; ++_i1204) - { - xfer += iprot->readString(this->part_vals[_i1204]); - } - xfer += iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1205; - for (_iter1205 = this->part_vals.begin(); _iter1205 != this->part_vals.end(); ++_iter1205) - { - xfer += oprot->writeString((*_iter1205)); - } - 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; -} - - -ThriftHiveMetastore_get_partitions_ps_pargs::~ThriftHiveMetastore_get_partitions_ps_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1206; - for (_iter1206 = (*(this->part_vals)).begin(); _iter1206 != (*(this->part_vals)).end(); ++_iter1206) - { - xfer += oprot->writeString((*_iter1206)); - } - 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; -} - - -ThriftHiveMetastore_get_partitions_ps_result::~ThriftHiveMetastore_get_partitions_ps_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1207; - ::apache::thrift::protocol::TType _etype1210; - xfer += iprot->readListBegin(_etype1210, _size1207); - this->success.resize(_size1207); - uint32_t _i1211; - for (_i1211 = 0; _i1211 < _size1207; ++_i1211) - { - xfer += this->success[_i1211].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1212; - for (_iter1212 = this->success.begin(); _iter1212 != this->success.end(); ++_iter1212) - { - xfer += (*_iter1212).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_ps_presult::~ThriftHiveMetastore_get_partitions_ps_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1213; - ::apache::thrift::protocol::TType _etype1216; - xfer += iprot->readListBegin(_etype1216, _size1213); - (*(this->success)).resize(_size1213); - uint32_t _i1217; - for (_i1217 = 0; _i1217 < _size1213; ++_i1217) - { - xfer += (*(this->success))[_i1217].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partitions_ps_with_auth_args::~ThriftHiveMetastore_get_partitions_ps_with_auth_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size1218; - ::apache::thrift::protocol::TType _etype1221; - xfer += iprot->readListBegin(_etype1221, _size1218); - this->part_vals.resize(_size1218); - uint32_t _i1222; - for (_i1222 = 0; _i1222 < _size1218; ++_i1222) - { - xfer += iprot->readString(this->part_vals[_i1222]); - } - xfer += iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user_name); - this->__isset.user_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->group_names.clear(); - uint32_t _size1223; - ::apache::thrift::protocol::TType _etype1226; - xfer += iprot->readListBegin(_etype1226, _size1223); - this->group_names.resize(_size1223); - uint32_t _i1227; - for (_i1227 = 0; _i1227 < _size1223; ++_i1227) - { - xfer += iprot->readString(this->group_names[_i1227]); - } - xfer += iprot->readListEnd(); - } - this->__isset.group_names = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1228; - for (_iter1228 = this->part_vals.begin(); _iter1228 != this->part_vals.end(); ++_iter1228) - { - xfer += oprot->writeString((*_iter1228)); - } - 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())); - std::vector ::const_iterator _iter1229; - for (_iter1229 = this->group_names.begin(); _iter1229 != this->group_names.end(); ++_iter1229) - { - xfer += oprot->writeString((*_iter1229)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_ps_with_auth_pargs::~ThriftHiveMetastore_get_partitions_ps_with_auth_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1230; - for (_iter1230 = (*(this->part_vals)).begin(); _iter1230 != (*(this->part_vals)).end(); ++_iter1230) - { - xfer += oprot->writeString((*_iter1230)); - } - 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())); - std::vector ::const_iterator _iter1231; - for (_iter1231 = (*(this->group_names)).begin(); _iter1231 != (*(this->group_names)).end(); ++_iter1231) - { - xfer += oprot->writeString((*_iter1231)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_ps_with_auth_result::~ThriftHiveMetastore_get_partitions_ps_with_auth_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1232; - ::apache::thrift::protocol::TType _etype1235; - xfer += iprot->readListBegin(_etype1235, _size1232); - this->success.resize(_size1232); - uint32_t _i1236; - for (_i1236 = 0; _i1236 < _size1232; ++_i1236) - { - xfer += this->success[_i1236].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_with_auth_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1237; - for (_iter1237 = this->success.begin(); _iter1237 != this->success.end(); ++_iter1237) - { - xfer += (*_iter1237).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_ps_with_auth_presult::~ThriftHiveMetastore_get_partitions_ps_with_auth_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1238; - ::apache::thrift::protocol::TType _etype1241; - xfer += iprot->readListBegin(_etype1241, _size1238); - (*(this->success)).resize(_size1238); - uint32_t _i1242; - for (_i1242 = 0; _i1242 < _size1238; ++_i1242) - { - xfer += (*(this->success))[_i1242].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partition_names_ps_args::~ThriftHiveMetastore_get_partition_names_ps_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size1243; - ::apache::thrift::protocol::TType _etype1246; - xfer += iprot->readListBegin(_etype1246, _size1243); - this->part_vals.resize(_size1243); - uint32_t _i1247; - for (_i1247 = 0; _i1247 < _size1243; ++_i1247) - { - xfer += iprot->readString(this->part_vals[_i1247]); - } - xfer += iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1248; - for (_iter1248 = this->part_vals.begin(); _iter1248 != this->part_vals.end(); ++_iter1248) - { - xfer += oprot->writeString((*_iter1248)); - } - 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; -} - - -ThriftHiveMetastore_get_partition_names_ps_pargs::~ThriftHiveMetastore_get_partition_names_ps_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1249; - for (_iter1249 = (*(this->part_vals)).begin(); _iter1249 != (*(this->part_vals)).end(); ++_iter1249) - { - xfer += oprot->writeString((*_iter1249)); - } - 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; -} - - -ThriftHiveMetastore_get_partition_names_ps_result::~ThriftHiveMetastore_get_partition_names_ps_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1250; - ::apache::thrift::protocol::TType _etype1253; - xfer += iprot->readListBegin(_etype1253, _size1250); - this->success.resize(_size1250); - uint32_t _i1254; - for (_i1254 = 0; _i1254 < _size1250; ++_i1254) - { - xfer += iprot->readString(this->success[_i1254]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter1255; - for (_iter1255 = this->success.begin(); _iter1255 != this->success.end(); ++_iter1255) - { - xfer += oprot->writeString((*_iter1255)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partition_names_ps_presult::~ThriftHiveMetastore_get_partition_names_ps_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1256; - ::apache::thrift::protocol::TType _etype1259; - xfer += iprot->readListBegin(_etype1259, _size1256); - (*(this->success)).resize(_size1256); - uint32_t _i1260; - for (_i1260 = 0; _i1260 < _size1256; ++_i1260) - { - xfer += iprot->readString((*(this->success))[_i1260]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partitions_by_filter_args::~ThriftHiveMetastore_get_partitions_by_filter_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->filter); - this->__isset.filter = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_partitions_by_filter_pargs::~ThriftHiveMetastore_get_partitions_by_filter_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_partitions_by_filter_result::~ThriftHiveMetastore_get_partitions_by_filter_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1261; - ::apache::thrift::protocol::TType _etype1264; - xfer += iprot->readListBegin(_etype1264, _size1261); - this->success.resize(_size1261); - uint32_t _i1265; - for (_i1265 = 0; _i1265 < _size1261; ++_i1265) - { - xfer += this->success[_i1265].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1266; - for (_iter1266 = this->success.begin(); _iter1266 != this->success.end(); ++_iter1266) - { - xfer += (*_iter1266).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_by_filter_presult::~ThriftHiveMetastore_get_partitions_by_filter_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1267; - ::apache::thrift::protocol::TType _etype1270; - xfer += iprot->readListBegin(_etype1270, _size1267); - (*(this->success)).resize(_size1267); - uint32_t _i1271; - for (_i1271 = 0; _i1271 < _size1267; ++_i1271) - { - xfer += (*(this->success))[_i1271].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_part_specs_by_filter_args::~ThriftHiveMetastore_get_part_specs_by_filter_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_part_specs_by_filter_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->filter); - this->__isset.filter = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->max_parts); - this->__isset.max_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_part_specs_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_part_specs_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_I32, 4); - xfer += oprot->writeI32(this->max_parts); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_part_specs_by_filter_pargs::~ThriftHiveMetastore_get_part_specs_by_filter_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_part_specs_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_part_specs_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_I32, 4); - xfer += oprot->writeI32((*(this->max_parts))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_part_specs_by_filter_result::~ThriftHiveMetastore_get_part_specs_by_filter_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_part_specs_by_filter_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1272; - ::apache::thrift::protocol::TType _etype1275; - xfer += iprot->readListBegin(_etype1275, _size1272); - this->success.resize(_size1272); - uint32_t _i1276; - for (_i1276 = 0; _i1276 < _size1272; ++_i1276) - { - xfer += this->success[_i1276].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_part_specs_by_filter_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_part_specs_by_filter_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1277; - for (_iter1277 = this->success.begin(); _iter1277 != this->success.end(); ++_iter1277) - { - xfer += (*_iter1277).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_part_specs_by_filter_presult::~ThriftHiveMetastore_get_part_specs_by_filter_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_part_specs_by_filter_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1278; - ::apache::thrift::protocol::TType _etype1281; - xfer += iprot->readListBegin(_etype1281, _size1278); - (*(this->success)).resize(_size1278); - uint32_t _i1282; - for (_i1282 = 0; _i1282 < _size1278; ++_i1282) - { - xfer += (*(this->success))[_i1282].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partitions_by_expr_args::~ThriftHiveMetastore_get_partitions_by_expr_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_by_expr_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_by_expr_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_expr_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_by_expr_pargs::~ThriftHiveMetastore_get_partitions_by_expr_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_by_expr_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_expr_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_by_expr_result::~ThriftHiveMetastore_get_partitions_by_expr_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_by_expr_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_by_expr_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_expr_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_by_expr_presult::~ThriftHiveMetastore_get_partitions_by_expr_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_by_expr_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_num_partitions_by_filter_args::~ThriftHiveMetastore_get_num_partitions_by_filter_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_num_partitions_by_filter_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->filter); - this->__isset.filter = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_num_partitions_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_num_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->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_num_partitions_by_filter_pargs::~ThriftHiveMetastore_get_num_partitions_by_filter_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_num_partitions_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_num_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->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_num_partitions_by_filter_result::~ThriftHiveMetastore_get_num_partitions_by_filter_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_num_partitions_by_filter_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_num_partitions_by_filter_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_num_partitions_by_filter_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); - xfer += oprot->writeI32(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_num_partitions_by_filter_presult::~ThriftHiveMetastore_get_num_partitions_by_filter_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_num_partitions_by_filter_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partitions_by_names_args::~ThriftHiveMetastore_get_partitions_by_names_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_by_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->names.clear(); - uint32_t _size1283; - ::apache::thrift::protocol::TType _etype1286; - xfer += iprot->readListBegin(_etype1286, _size1283); - this->names.resize(_size1283); - uint32_t _i1287; - for (_i1287 = 0; _i1287 < _size1283; ++_i1287) - { - xfer += iprot->readString(this->names[_i1287]); - } - xfer += iprot->readListEnd(); - } - this->__isset.names = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_by_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1288; - for (_iter1288 = this->names.begin(); _iter1288 != this->names.end(); ++_iter1288) - { - xfer += oprot->writeString((*_iter1288)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_by_names_pargs::~ThriftHiveMetastore_get_partitions_by_names_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_by_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1289; - for (_iter1289 = (*(this->names)).begin(); _iter1289 != (*(this->names)).end(); ++_iter1289) - { - xfer += oprot->writeString((*_iter1289)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_by_names_result::~ThriftHiveMetastore_get_partitions_by_names_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_by_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1290; - ::apache::thrift::protocol::TType _etype1293; - xfer += iprot->readListBegin(_etype1293, _size1290); - this->success.resize(_size1290); - uint32_t _i1294; - for (_i1294 = 0; _i1294 < _size1290; ++_i1294) - { - xfer += this->success[_i1294].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_by_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_names_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1295; - for (_iter1295 = this->success.begin(); _iter1295 != this->success.end(); ++_iter1295) - { - xfer += (*_iter1295).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_by_names_presult::~ThriftHiveMetastore_get_partitions_by_names_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_by_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1296; - ::apache::thrift::protocol::TType _etype1299; - xfer += iprot->readListBegin(_etype1299, _size1296); - (*(this->success)).resize(_size1296); - uint32_t _i1300; - for (_i1300 = 0; _i1300 < _size1296; ++_i1300) - { - xfer += (*(this->success))[_i1300].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_alter_partition_args::~ThriftHiveMetastore_alter_partition_args() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_part.read(iprot); - this->__isset.new_part = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_alter_partition_pargs::~ThriftHiveMetastore_alter_partition_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_alter_partition_result::~ThriftHiveMetastore_alter_partition_result() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_partition_presult::~ThriftHiveMetastore_alter_partition_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_alter_partitions_args::~ThriftHiveMetastore_alter_partitions_args() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->new_parts.clear(); - uint32_t _size1301; - ::apache::thrift::protocol::TType _etype1304; - xfer += iprot->readListBegin(_etype1304, _size1301); - this->new_parts.resize(_size1301); - uint32_t _i1305; - for (_i1305 = 0; _i1305 < _size1301; ++_i1305) - { - xfer += this->new_parts[_i1305].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.new_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1306; - for (_iter1306 = this->new_parts.begin(); _iter1306 != this->new_parts.end(); ++_iter1306) - { - xfer += (*_iter1306).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_partitions_pargs::~ThriftHiveMetastore_alter_partitions_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1307; - for (_iter1307 = (*(this->new_parts)).begin(); _iter1307 != (*(this->new_parts)).end(); ++_iter1307) - { - xfer += (*_iter1307).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_partitions_result::~ThriftHiveMetastore_alter_partitions_result() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partitions_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_partitions_presult::~ThriftHiveMetastore_alter_partitions_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_alter_partitions_with_environment_context_args::~ThriftHiveMetastore_alter_partitions_with_environment_context_args() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partitions_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->new_parts.clear(); - uint32_t _size1308; - ::apache::thrift::protocol::TType _etype1311; - xfer += iprot->readListBegin(_etype1311, _size1308); - this->new_parts.resize(_size1308); - uint32_t _i1312; - for (_i1312 = 0; _i1312 < _size1308; ++_i1312) - { - xfer += this->new_parts[_i1312].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.new_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environment_context.read(iprot); - this->__isset.environment_context = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_partitions_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partitions_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_parts", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->new_parts.size())); - std::vector ::const_iterator _iter1313; - for (_iter1313 = this->new_parts.begin(); _iter1313 != this->new_parts.end(); ++_iter1313) - { - xfer += (*_iter1313).write(oprot); - } - xfer += oprot->writeListEnd(); - } - 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; -} - - -ThriftHiveMetastore_alter_partitions_with_environment_context_pargs::~ThriftHiveMetastore_alter_partitions_with_environment_context_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partitions_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partitions_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_parts", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->new_parts)).size())); - std::vector ::const_iterator _iter1314; - for (_iter1314 = (*(this->new_parts)).begin(); _iter1314 != (*(this->new_parts)).end(); ++_iter1314) - { - xfer += (*_iter1314).write(oprot); - } - xfer += oprot->writeListEnd(); - } - 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; -} - - -ThriftHiveMetastore_alter_partitions_with_environment_context_result::~ThriftHiveMetastore_alter_partitions_with_environment_context_result() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partitions_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_partitions_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partitions_with_environment_context_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_partitions_with_environment_context_presult::~ThriftHiveMetastore_alter_partitions_with_environment_context_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partitions_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_alter_partition_with_environment_context_args::~ThriftHiveMetastore_alter_partition_with_environment_context_args() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_part.read(iprot); - this->__isset.new_part = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environment_context.read(iprot); - this->__isset.environment_context = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_alter_partition_with_environment_context_pargs::~ThriftHiveMetastore_alter_partition_with_environment_context_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_alter_partition_with_environment_context_result::~ThriftHiveMetastore_alter_partition_with_environment_context_result() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_with_environment_context_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_partition_with_environment_context_presult::~ThriftHiveMetastore_alter_partition_with_environment_context_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_rename_partition_args::~ThriftHiveMetastore_rename_partition_args() throw() { -} - - -uint32_t ThriftHiveMetastore_rename_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size1315; - ::apache::thrift::protocol::TType _etype1318; - xfer += iprot->readListBegin(_etype1318, _size1315); - this->part_vals.resize(_size1315); - uint32_t _i1319; - for (_i1319 = 0; _i1319 < _size1315; ++_i1319) - { - xfer += iprot->readString(this->part_vals[_i1319]); - } - xfer += iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_part.read(iprot); - this->__isset.new_part = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_rename_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1320; - for (_iter1320 = this->part_vals.begin(); _iter1320 != this->part_vals.end(); ++_iter1320) - { - xfer += oprot->writeString((*_iter1320)); - } - 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; -} - - -ThriftHiveMetastore_rename_partition_pargs::~ThriftHiveMetastore_rename_partition_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_rename_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1321; - for (_iter1321 = (*(this->part_vals)).begin(); _iter1321 != (*(this->part_vals)).end(); ++_iter1321) - { - xfer += oprot->writeString((*_iter1321)); - } - 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; -} - - -ThriftHiveMetastore_rename_partition_result::~ThriftHiveMetastore_rename_partition_result() throw() { -} - - -uint32_t ThriftHiveMetastore_rename_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_rename_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_rename_partition_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_rename_partition_presult::~ThriftHiveMetastore_rename_partition_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_rename_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_partition_name_has_valid_characters_args::~ThriftHiveMetastore_partition_name_has_valid_characters_args() throw() { -} - - -uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size1322; - ::apache::thrift::protocol::TType _etype1325; - xfer += iprot->readListBegin(_etype1325, _size1322); - this->part_vals.resize(_size1322); - uint32_t _i1326; - for (_i1326 = 0; _i1326 < _size1322; ++_i1326) - { - xfer += iprot->readString(this->part_vals[_i1326]); - } - xfer += iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->throw_exception); - this->__isset.throw_exception = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_has_valid_characters_args"); - - xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter1327; - for (_iter1327 = this->part_vals.begin(); _iter1327 != this->part_vals.end(); ++_iter1327) - { - xfer += oprot->writeString((*_iter1327)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("throw_exception", ::apache::thrift::protocol::T_BOOL, 2); - xfer += oprot->writeBool(this->throw_exception); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_partition_name_has_valid_characters_pargs::~ThriftHiveMetastore_partition_name_has_valid_characters_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_has_valid_characters_pargs"); - - xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter1328; - for (_iter1328 = (*(this->part_vals)).begin(); _iter1328 != (*(this->part_vals)).end(); ++_iter1328) - { - xfer += oprot->writeString((*_iter1328)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("throw_exception", ::apache::thrift::protocol::T_BOOL, 2); - xfer += oprot->writeBool((*(this->throw_exception))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_partition_name_has_valid_characters_result::~ThriftHiveMetastore_partition_name_has_valid_characters_result() throw() { -} - - -uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_has_valid_characters_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_partition_name_has_valid_characters_presult::~ThriftHiveMetastore_partition_name_has_valid_characters_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_config_value_args::~ThriftHiveMetastore_get_config_value_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_config_value_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->defaultValue); - this->__isset.defaultValue = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_config_value_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_config_value_pargs::~ThriftHiveMetastore_get_config_value_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_config_value_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_config_value_result::~ThriftHiveMetastore_get_config_value_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_config_value_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_config_value_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_config_value_presult::~ThriftHiveMetastore_get_config_value_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_config_value_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_partition_name_to_vals_args::~ThriftHiveMetastore_partition_name_to_vals_args() throw() { -} - - -uint32_t ThriftHiveMetastore_partition_name_to_vals_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_partition_name_to_vals_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_partition_name_to_vals_pargs::~ThriftHiveMetastore_partition_name_to_vals_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_partition_name_to_vals_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_partition_name_to_vals_result::~ThriftHiveMetastore_partition_name_to_vals_result() throw() { -} - - -uint32_t ThriftHiveMetastore_partition_name_to_vals_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1329; - ::apache::thrift::protocol::TType _etype1332; - xfer += iprot->readListBegin(_etype1332, _size1329); - this->success.resize(_size1329); - uint32_t _i1333; - for (_i1333 = 0; _i1333 < _size1329; ++_i1333) - { - xfer += iprot->readString(this->success[_i1333]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter1334; - for (_iter1334 = this->success.begin(); _iter1334 != this->success.end(); ++_iter1334) - { - xfer += oprot->writeString((*_iter1334)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_partition_name_to_vals_presult::~ThriftHiveMetastore_partition_name_to_vals_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1335; - ::apache::thrift::protocol::TType _etype1338; - xfer += iprot->readListBegin(_etype1338, _size1335); - (*(this->success)).resize(_size1335); - uint32_t _i1339; - for (_i1339 = 0; _i1339 < _size1335; ++_i1339) - { - xfer += iprot->readString((*(this->success))[_i1339]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_partition_name_to_spec_args::~ThriftHiveMetastore_partition_name_to_spec_args() throw() { -} - - -uint32_t ThriftHiveMetastore_partition_name_to_spec_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_partition_name_to_spec_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_partition_name_to_spec_pargs::~ThriftHiveMetastore_partition_name_to_spec_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_partition_name_to_spec_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_partition_name_to_spec_result::~ThriftHiveMetastore_partition_name_to_spec_result() throw() { -} - - -uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->success.clear(); - uint32_t _size1340; - ::apache::thrift::protocol::TType _ktype1341; - ::apache::thrift::protocol::TType _vtype1342; - xfer += iprot->readMapBegin(_ktype1341, _vtype1342, _size1340); - uint32_t _i1344; - for (_i1344 = 0; _i1344 < _size1340; ++_i1344) - { - std::string _key1345; - xfer += iprot->readString(_key1345); - std::string& _val1346 = this->success[_key1345]; - xfer += iprot->readString(_val1346); - } - xfer += iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::map ::const_iterator _iter1347; - for (_iter1347 = this->success.begin(); _iter1347 != this->success.end(); ++_iter1347) - { - xfer += oprot->writeString(_iter1347->first); - xfer += oprot->writeString(_iter1347->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_partition_name_to_spec_presult::~ThriftHiveMetastore_partition_name_to_spec_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - (*(this->success)).clear(); - uint32_t _size1348; - ::apache::thrift::protocol::TType _ktype1349; - ::apache::thrift::protocol::TType _vtype1350; - xfer += iprot->readMapBegin(_ktype1349, _vtype1350, _size1348); - uint32_t _i1352; - for (_i1352 = 0; _i1352 < _size1348; ++_i1352) - { - std::string _key1353; - xfer += iprot->readString(_key1353); - std::string& _val1354 = (*(this->success))[_key1353]; - xfer += iprot->readString(_val1354); - } - xfer += iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_markPartitionForEvent_args::~ThriftHiveMetastore_markPartitionForEvent_args() throw() { -} - - -uint32_t ThriftHiveMetastore_markPartitionForEvent_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->part_vals.clear(); - uint32_t _size1355; - ::apache::thrift::protocol::TType _ktype1356; - ::apache::thrift::protocol::TType _vtype1357; - xfer += iprot->readMapBegin(_ktype1356, _vtype1357, _size1355); - uint32_t _i1359; - for (_i1359 = 0; _i1359 < _size1355; ++_i1359) - { - std::string _key1360; - xfer += iprot->readString(_key1360); - std::string& _val1361 = this->part_vals[_key1360]; - xfer += iprot->readString(_val1361); - } - xfer += iprot->readMapEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast1362; - xfer += iprot->readI32(ecast1362); - this->eventType = (PartitionEventType::type)ecast1362; - this->__isset.eventType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_markPartitionForEvent_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::map ::const_iterator _iter1363; - for (_iter1363 = this->part_vals.begin(); _iter1363 != this->part_vals.end(); ++_iter1363) - { - xfer += oprot->writeString(_iter1363->first); - xfer += oprot->writeString(_iter1363->second); - } - 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; -} - - -ThriftHiveMetastore_markPartitionForEvent_pargs::~ThriftHiveMetastore_markPartitionForEvent_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_markPartitionForEvent_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::map ::const_iterator _iter1364; - for (_iter1364 = (*(this->part_vals)).begin(); _iter1364 != (*(this->part_vals)).end(); ++_iter1364) - { - xfer += oprot->writeString(_iter1364->first); - xfer += oprot->writeString(_iter1364->second); - } - 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; -} - - -ThriftHiveMetastore_markPartitionForEvent_result::~ThriftHiveMetastore_markPartitionForEvent_result() throw() { -} - - -uint32_t ThriftHiveMetastore_markPartitionForEvent_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o5.read(iprot); - this->__isset.o5 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o6.read(iprot); - this->__isset.o6 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_markPartitionForEvent_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_markPartitionForEvent_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o5) { - xfer += oprot->writeFieldBegin("o5", ::apache::thrift::protocol::T_STRUCT, 5); - xfer += this->o5.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o6) { - xfer += oprot->writeFieldBegin("o6", ::apache::thrift::protocol::T_STRUCT, 6); - xfer += this->o6.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_markPartitionForEvent_presult::~ThriftHiveMetastore_markPartitionForEvent_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_markPartitionForEvent_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o5.read(iprot); - this->__isset.o5 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o6.read(iprot); - this->__isset.o6 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_isPartitionMarkedForEvent_args::~ThriftHiveMetastore_isPartitionMarkedForEvent_args() throw() { -} - - -uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->part_vals.clear(); - uint32_t _size1365; - ::apache::thrift::protocol::TType _ktype1366; - ::apache::thrift::protocol::TType _vtype1367; - xfer += iprot->readMapBegin(_ktype1366, _vtype1367, _size1365); - uint32_t _i1369; - for (_i1369 = 0; _i1369 < _size1365; ++_i1369) - { - std::string _key1370; - xfer += iprot->readString(_key1370); - std::string& _val1371 = this->part_vals[_key1370]; - xfer += iprot->readString(_val1371); - } - xfer += iprot->readMapEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast1372; - xfer += iprot->readI32(ecast1372); - this->eventType = (PartitionEventType::type)ecast1372; - this->__isset.eventType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::map ::const_iterator _iter1373; - for (_iter1373 = this->part_vals.begin(); _iter1373 != this->part_vals.end(); ++_iter1373) - { - xfer += oprot->writeString(_iter1373->first); - xfer += oprot->writeString(_iter1373->second); - } - 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; -} - - -ThriftHiveMetastore_isPartitionMarkedForEvent_pargs::~ThriftHiveMetastore_isPartitionMarkedForEvent_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::map ::const_iterator _iter1374; - for (_iter1374 = (*(this->part_vals)).begin(); _iter1374 != (*(this->part_vals)).end(); ++_iter1374) - { - xfer += oprot->writeString(_iter1374->first); - xfer += oprot->writeString(_iter1374->second); - } - 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; -} - - -ThriftHiveMetastore_isPartitionMarkedForEvent_result::~ThriftHiveMetastore_isPartitionMarkedForEvent_result() throw() { -} - - -uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o5.read(iprot); - this->__isset.o5 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o6.read(iprot); - this->__isset.o6 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_isPartitionMarkedForEvent_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o5) { - xfer += oprot->writeFieldBegin("o5", ::apache::thrift::protocol::T_STRUCT, 5); - xfer += this->o5.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o6) { - xfer += oprot->writeFieldBegin("o6", ::apache::thrift::protocol::T_STRUCT, 6); - xfer += this->o6.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_isPartitionMarkedForEvent_presult::~ThriftHiveMetastore_isPartitionMarkedForEvent_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o5.read(iprot); - this->__isset.o5 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o6.read(iprot); - this->__isset.o6 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_index_args::~ThriftHiveMetastore_add_index_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_index_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_index.read(iprot); - this->__isset.new_index = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->index_table.read(iprot); - this->__isset.index_table = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_add_index_pargs::~ThriftHiveMetastore_add_index_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_add_index_result::~ThriftHiveMetastore_add_index_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_index_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_index_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_index_presult::~ThriftHiveMetastore_add_index_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_index_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_alter_index_args::~ThriftHiveMetastore_alter_index_args() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_index_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->base_tbl_name); - this->__isset.base_tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->idx_name); - this->__isset.idx_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_idx.read(iprot); - this->__isset.new_idx = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_alter_index_pargs::~ThriftHiveMetastore_alter_index_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_alter_index_result::~ThriftHiveMetastore_alter_index_result() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_index_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_index_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_index_presult::~ThriftHiveMetastore_alter_index_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_index_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_index_by_name_args::~ThriftHiveMetastore_drop_index_by_name_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_index_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->index_name); - this->__isset.index_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_drop_index_by_name_pargs::~ThriftHiveMetastore_drop_index_by_name_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_drop_index_by_name_result::~ThriftHiveMetastore_drop_index_by_name_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_index_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_index_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_index_by_name_presult::~ThriftHiveMetastore_drop_index_by_name_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_index_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_index_by_name_args::~ThriftHiveMetastore_get_index_by_name_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_index_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->index_name); - this->__isset.index_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_index_by_name_pargs::~ThriftHiveMetastore_get_index_by_name_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_index_by_name_result::~ThriftHiveMetastore_get_index_by_name_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_index_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_index_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_index_by_name_presult::~ThriftHiveMetastore_get_index_by_name_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_index_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_indexes_args::~ThriftHiveMetastore_get_indexes_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_indexes_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_indexes); - this->__isset.max_indexes = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_indexes_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_indexes_pargs::~ThriftHiveMetastore_get_indexes_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_indexes_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_indexes_result::~ThriftHiveMetastore_get_indexes_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_indexes_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1375; - ::apache::thrift::protocol::TType _etype1378; - xfer += iprot->readListBegin(_etype1378, _size1375); - this->success.resize(_size1375); - uint32_t _i1379; - for (_i1379 = 0; _i1379 < _size1375; ++_i1379) - { - xfer += this->success[_i1379].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_indexes_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1380; - for (_iter1380 = this->success.begin(); _iter1380 != this->success.end(); ++_iter1380) - { - xfer += (*_iter1380).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_indexes_presult::~ThriftHiveMetastore_get_indexes_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_indexes_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1381; - ::apache::thrift::protocol::TType _etype1384; - xfer += iprot->readListBegin(_etype1384, _size1381); - (*(this->success)).resize(_size1381); - uint32_t _i1385; - for (_i1385 = 0; _i1385 < _size1381; ++_i1385) - { - xfer += (*(this->success))[_i1385].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_index_names_args::~ThriftHiveMetastore_get_index_names_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_index_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_indexes); - this->__isset.max_indexes = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_index_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_index_names_pargs::~ThriftHiveMetastore_get_index_names_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_index_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_index_names_result::~ThriftHiveMetastore_get_index_names_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_index_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1386; - ::apache::thrift::protocol::TType _etype1389; - xfer += iprot->readListBegin(_etype1389, _size1386); - this->success.resize(_size1386); - uint32_t _i1390; - for (_i1390 = 0; _i1390 < _size1386; ++_i1390) - { - xfer += iprot->readString(this->success[_i1390]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_index_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter1391; - for (_iter1391 = this->success.begin(); _iter1391 != this->success.end(); ++_iter1391) - { - xfer += oprot->writeString((*_iter1391)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_index_names_presult::~ThriftHiveMetastore_get_index_names_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_index_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1392; - ::apache::thrift::protocol::TType _etype1395; - xfer += iprot->readListBegin(_etype1395, _size1392); - (*(this->success)).resize(_size1392); - uint32_t _i1396; - for (_i1396 = 0; _i1396 < _size1392; ++_i1396) - { - xfer += iprot->readString((*(this->success))[_i1396]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_primary_keys_args::~ThriftHiveMetastore_get_primary_keys_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_primary_keys_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_primary_keys_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_primary_keys_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_primary_keys_pargs::~ThriftHiveMetastore_get_primary_keys_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_primary_keys_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_primary_keys_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_primary_keys_result::~ThriftHiveMetastore_get_primary_keys_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_primary_keys_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_primary_keys_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_primary_keys_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_primary_keys_presult::~ThriftHiveMetastore_get_primary_keys_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_primary_keys_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_foreign_keys_args::~ThriftHiveMetastore_get_foreign_keys_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_foreign_keys_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_foreign_keys_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_foreign_keys_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_foreign_keys_pargs::~ThriftHiveMetastore_get_foreign_keys_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_foreign_keys_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_foreign_keys_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_foreign_keys_result::~ThriftHiveMetastore_get_foreign_keys_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_foreign_keys_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_foreign_keys_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_foreign_keys_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_foreign_keys_presult::~ThriftHiveMetastore_get_foreign_keys_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_foreign_keys_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_unique_constraints_args::~ThriftHiveMetastore_get_unique_constraints_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_unique_constraints_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_unique_constraints_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_unique_constraints_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_unique_constraints_pargs::~ThriftHiveMetastore_get_unique_constraints_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_unique_constraints_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_unique_constraints_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_unique_constraints_result::~ThriftHiveMetastore_get_unique_constraints_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_unique_constraints_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_unique_constraints_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_unique_constraints_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_unique_constraints_presult::~ThriftHiveMetastore_get_unique_constraints_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_unique_constraints_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_not_null_constraints_args::~ThriftHiveMetastore_get_not_null_constraints_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_not_null_constraints_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_not_null_constraints_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_not_null_constraints_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_not_null_constraints_pargs::~ThriftHiveMetastore_get_not_null_constraints_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_not_null_constraints_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_not_null_constraints_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_not_null_constraints_result::~ThriftHiveMetastore_get_not_null_constraints_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_not_null_constraints_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_not_null_constraints_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_not_null_constraints_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_not_null_constraints_presult::~ThriftHiveMetastore_get_not_null_constraints_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_not_null_constraints_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_update_table_column_statistics_args::~ThriftHiveMetastore_update_table_column_statistics_args() throw() { -} - - -uint32_t ThriftHiveMetastore_update_table_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->stats_obj.read(iprot); - this->__isset.stats_obj = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_update_table_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_table_column_statistics_args"); - - xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->stats_obj.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_update_table_column_statistics_pargs::~ThriftHiveMetastore_update_table_column_statistics_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_update_table_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_table_column_statistics_pargs"); - - xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->stats_obj)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_update_table_column_statistics_result::~ThriftHiveMetastore_update_table_column_statistics_result() throw() { -} - - -uint32_t ThriftHiveMetastore_update_table_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_update_table_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_table_column_statistics_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_update_table_column_statistics_presult::~ThriftHiveMetastore_update_table_column_statistics_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_update_table_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_update_partition_column_statistics_args::~ThriftHiveMetastore_update_partition_column_statistics_args() throw() { -} - - -uint32_t ThriftHiveMetastore_update_partition_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->stats_obj.read(iprot); - this->__isset.stats_obj = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_update_partition_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_partition_column_statistics_args"); - - xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->stats_obj.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_update_partition_column_statistics_pargs::~ThriftHiveMetastore_update_partition_column_statistics_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_update_partition_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_partition_column_statistics_pargs"); - - xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->stats_obj)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_update_partition_column_statistics_result::~ThriftHiveMetastore_update_partition_column_statistics_result() throw() { -} - - -uint32_t ThriftHiveMetastore_update_partition_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_update_partition_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_partition_column_statistics_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_update_partition_column_statistics_presult::~ThriftHiveMetastore_update_partition_column_statistics_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_update_partition_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_table_column_statistics_args::~ThriftHiveMetastore_get_table_column_statistics_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->col_name); - this->__isset.col_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->col_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_column_statistics_pargs::~ThriftHiveMetastore_get_table_column_statistics_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->col_name))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_column_statistics_result::~ThriftHiveMetastore_get_table_column_statistics_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_column_statistics_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_column_statistics_presult::~ThriftHiveMetastore_get_table_column_statistics_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partition_column_statistics_args::~ThriftHiveMetastore_get_partition_column_statistics_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->col_name); - this->__isset.col_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->col_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partition_column_statistics_pargs::~ThriftHiveMetastore_get_partition_column_statistics_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString((*(this->col_name))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partition_column_statistics_result::~ThriftHiveMetastore_get_partition_column_statistics_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partition_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_column_statistics_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partition_column_statistics_presult::~ThriftHiveMetastore_get_partition_column_statistics_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partition_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_table_statistics_req_args::~ThriftHiveMetastore_get_table_statistics_req_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_statistics_req_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_statistics_req_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_statistics_req_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_statistics_req_pargs::~ThriftHiveMetastore_get_table_statistics_req_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_statistics_req_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_statistics_req_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_statistics_req_result::~ThriftHiveMetastore_get_table_statistics_req_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_statistics_req_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_table_statistics_req_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_statistics_req_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_table_statistics_req_presult::~ThriftHiveMetastore_get_table_statistics_req_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_table_statistics_req_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_partitions_statistics_req_args::~ThriftHiveMetastore_get_partitions_statistics_req_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_statistics_req_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_statistics_req_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_statistics_req_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_statistics_req_pargs::~ThriftHiveMetastore_get_partitions_statistics_req_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_statistics_req_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_statistics_req_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_statistics_req_result::~ThriftHiveMetastore_get_partitions_statistics_req_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_statistics_req_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_partitions_statistics_req_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_statistics_req_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_partitions_statistics_req_presult::~ThriftHiveMetastore_get_partitions_statistics_req_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_partitions_statistics_req_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_aggr_stats_for_args::~ThriftHiveMetastore_get_aggr_stats_for_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_aggr_stats_for_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_aggr_stats_for_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_aggr_stats_for_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_aggr_stats_for_pargs::~ThriftHiveMetastore_get_aggr_stats_for_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_aggr_stats_for_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_aggr_stats_for_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_aggr_stats_for_result::~ThriftHiveMetastore_get_aggr_stats_for_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_aggr_stats_for_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_aggr_stats_for_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_aggr_stats_for_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_aggr_stats_for_presult::~ThriftHiveMetastore_get_aggr_stats_for_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_aggr_stats_for_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_set_aggr_stats_for_args::~ThriftHiveMetastore_set_aggr_stats_for_args() throw() { -} - - -uint32_t ThriftHiveMetastore_set_aggr_stats_for_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_set_aggr_stats_for_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_aggr_stats_for_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_set_aggr_stats_for_pargs::~ThriftHiveMetastore_set_aggr_stats_for_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_set_aggr_stats_for_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_aggr_stats_for_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_set_aggr_stats_for_result::~ThriftHiveMetastore_set_aggr_stats_for_result() throw() { -} - - -uint32_t ThriftHiveMetastore_set_aggr_stats_for_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_set_aggr_stats_for_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_aggr_stats_for_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_set_aggr_stats_for_presult::~ThriftHiveMetastore_set_aggr_stats_for_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_set_aggr_stats_for_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_delete_partition_column_statistics_args::~ThriftHiveMetastore_delete_partition_column_statistics_args() throw() { -} - - -uint32_t ThriftHiveMetastore_delete_partition_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->col_name); - this->__isset.col_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_delete_partition_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_partition_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->col_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_delete_partition_column_statistics_pargs::~ThriftHiveMetastore_delete_partition_column_statistics_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_delete_partition_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_partition_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString((*(this->col_name))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_delete_partition_column_statistics_result::~ThriftHiveMetastore_delete_partition_column_statistics_result() throw() { -} - - -uint32_t ThriftHiveMetastore_delete_partition_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_delete_partition_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_partition_column_statistics_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_delete_partition_column_statistics_presult::~ThriftHiveMetastore_delete_partition_column_statistics_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_delete_partition_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_delete_table_column_statistics_args::~ThriftHiveMetastore_delete_table_column_statistics_args() throw() { -} - - -uint32_t ThriftHiveMetastore_delete_table_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->col_name); - this->__isset.col_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_delete_table_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_table_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->col_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_delete_table_column_statistics_pargs::~ThriftHiveMetastore_delete_table_column_statistics_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_delete_table_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_table_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->col_name))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_delete_table_column_statistics_result::~ThriftHiveMetastore_delete_table_column_statistics_result() throw() { -} - - -uint32_t ThriftHiveMetastore_delete_table_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_delete_table_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_table_column_statistics_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_delete_table_column_statistics_presult::~ThriftHiveMetastore_delete_table_column_statistics_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_delete_table_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_create_function_args::~ThriftHiveMetastore_create_function_args() throw() { -} - - -uint32_t ThriftHiveMetastore_create_function_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->func.read(iprot); - this->__isset.func = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_function_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_function_args"); - - xfer += oprot->writeFieldBegin("func", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->func.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_create_function_pargs::~ThriftHiveMetastore_create_function_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_create_function_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_function_pargs"); - - xfer += oprot->writeFieldBegin("func", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->func)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_create_function_result::~ThriftHiveMetastore_create_function_result() throw() { -} - - -uint32_t ThriftHiveMetastore_create_function_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_function_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_function_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o4) { - xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->o4.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_create_function_presult::~ThriftHiveMetastore_create_function_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_create_function_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o4.read(iprot); - this->__isset.o4 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_function_args::~ThriftHiveMetastore_drop_function_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_function_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->funcName); - this->__isset.funcName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_function_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_function_args"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->funcName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_function_pargs::~ThriftHiveMetastore_drop_function_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_function_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_function_pargs"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->dbName))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->funcName))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_function_result::~ThriftHiveMetastore_drop_function_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_function_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_function_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_function_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_function_presult::~ThriftHiveMetastore_drop_function_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_function_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_alter_function_args::~ThriftHiveMetastore_alter_function_args() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_function_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->funcName); - this->__isset.funcName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->newFunc.read(iprot); - this->__isset.newFunc = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_function_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_function_args"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->funcName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("newFunc", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->newFunc.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_function_pargs::~ThriftHiveMetastore_alter_function_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_function_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_function_pargs"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->dbName))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->funcName))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("newFunc", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += (*(this->newFunc)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_function_result::~ThriftHiveMetastore_alter_function_result() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_function_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_alter_function_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_function_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_alter_function_presult::~ThriftHiveMetastore_alter_function_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_alter_function_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_functions_args::~ThriftHiveMetastore_get_functions_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_functions_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->pattern); - this->__isset.pattern = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_functions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_functions_args"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - 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; -} - - -ThriftHiveMetastore_get_functions_pargs::~ThriftHiveMetastore_get_functions_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_functions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_functions_pargs"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->dbName))); - 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; -} - - -ThriftHiveMetastore_get_functions_result::~ThriftHiveMetastore_get_functions_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_functions_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1397; - ::apache::thrift::protocol::TType _etype1400; - xfer += iprot->readListBegin(_etype1400, _size1397); - this->success.resize(_size1397); - uint32_t _i1401; - for (_i1401 = 0; _i1401 < _size1397; ++_i1401) - { - xfer += iprot->readString(this->success[_i1401]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_functions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_functions_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter1402; - for (_iter1402 = this->success.begin(); _iter1402 != this->success.end(); ++_iter1402) - { - xfer += oprot->writeString((*_iter1402)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_functions_presult::~ThriftHiveMetastore_get_functions_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_functions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1403; - ::apache::thrift::protocol::TType _etype1406; - xfer += iprot->readListBegin(_etype1406, _size1403); - (*(this->success)).resize(_size1403); - uint32_t _i1407; - for (_i1407 = 0; _i1407 < _size1403; ++_i1407) - { - xfer += iprot->readString((*(this->success))[_i1407]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_function_args::~ThriftHiveMetastore_get_function_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_function_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->funcName); - this->__isset.funcName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_function_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_function_args"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->funcName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_function_pargs::~ThriftHiveMetastore_get_function_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_function_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_function_pargs"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->dbName))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->funcName))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_function_result::~ThriftHiveMetastore_get_function_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_function_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_function_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_function_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_function_presult::~ThriftHiveMetastore_get_function_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_function_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_all_functions_args::~ThriftHiveMetastore_get_all_functions_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_functions_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_all_functions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_functions_args"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_all_functions_pargs::~ThriftHiveMetastore_get_all_functions_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_functions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_functions_pargs"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_all_functions_result::~ThriftHiveMetastore_get_all_functions_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_functions_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_all_functions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_functions_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_all_functions_presult::~ThriftHiveMetastore_get_all_functions_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_functions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_create_role_args::~ThriftHiveMetastore_create_role_args() throw() { -} - - -uint32_t ThriftHiveMetastore_create_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->role.read(iprot); - this->__isset.role = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_create_role_pargs::~ThriftHiveMetastore_create_role_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_create_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_create_role_result::~ThriftHiveMetastore_create_role_result() throw() { -} - - -uint32_t ThriftHiveMetastore_create_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_create_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_create_role_presult::~ThriftHiveMetastore_create_role_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_create_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_drop_role_args::~ThriftHiveMetastore_drop_role_args() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->role_name); - this->__isset.role_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_drop_role_pargs::~ThriftHiveMetastore_drop_role_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_drop_role_result::~ThriftHiveMetastore_drop_role_result() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_drop_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_drop_role_presult::~ThriftHiveMetastore_drop_role_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_drop_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_role_names_args::~ThriftHiveMetastore_get_role_names_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_role_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_role_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_args"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_role_names_pargs::~ThriftHiveMetastore_get_role_names_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_role_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_pargs"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_role_names_result::~ThriftHiveMetastore_get_role_names_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_role_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1408; - ::apache::thrift::protocol::TType _etype1411; - xfer += iprot->readListBegin(_etype1411, _size1408); - this->success.resize(_size1408); - uint32_t _i1412; - for (_i1412 = 0; _i1412 < _size1408; ++_i1412) - { - xfer += iprot->readString(this->success[_i1412]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_role_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter1413; - for (_iter1413 = this->success.begin(); _iter1413 != this->success.end(); ++_iter1413) - { - xfer += oprot->writeString((*_iter1413)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_role_names_presult::~ThriftHiveMetastore_get_role_names_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_role_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1414; - ::apache::thrift::protocol::TType _etype1417; - xfer += iprot->readListBegin(_etype1417, _size1414); - (*(this->success)).resize(_size1414); - uint32_t _i1418; - for (_i1418 = 0; _i1418 < _size1414; ++_i1418) - { - xfer += iprot->readString((*(this->success))[_i1418]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_grant_role_args::~ThriftHiveMetastore_grant_role_args() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->role_name); - this->__isset.role_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - this->__isset.principal_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast1419; - xfer += iprot->readI32(ecast1419); - this->principal_type = (PrincipalType::type)ecast1419; - this->__isset.principal_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->grantor); - this->__isset.grantor = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast1420; - xfer += iprot->readI32(ecast1420); - this->grantorType = (PrincipalType::type)ecast1420; - this->__isset.grantorType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->grant_option); - this->__isset.grant_option = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_grant_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_grant_role_pargs::~ThriftHiveMetastore_grant_role_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_grant_role_result::~ThriftHiveMetastore_grant_role_result() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_grant_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_grant_role_presult::~ThriftHiveMetastore_grant_role_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_revoke_role_args::~ThriftHiveMetastore_revoke_role_args() throw() { -} - - -uint32_t ThriftHiveMetastore_revoke_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->role_name); - this->__isset.role_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - this->__isset.principal_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast1421; - xfer += iprot->readI32(ecast1421); - this->principal_type = (PrincipalType::type)ecast1421; - this->__isset.principal_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_revoke_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_revoke_role_pargs::~ThriftHiveMetastore_revoke_role_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_revoke_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_revoke_role_result::~ThriftHiveMetastore_revoke_role_result() throw() { -} - - -uint32_t ThriftHiveMetastore_revoke_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_revoke_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_revoke_role_presult::~ThriftHiveMetastore_revoke_role_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_revoke_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_list_roles_args::~ThriftHiveMetastore_list_roles_args() throw() { -} - - -uint32_t ThriftHiveMetastore_list_roles_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - this->__isset.principal_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast1422; - xfer += iprot->readI32(ecast1422); - this->principal_type = (PrincipalType::type)ecast1422; - this->__isset.principal_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_list_roles_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_list_roles_pargs::~ThriftHiveMetastore_list_roles_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_list_roles_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_list_roles_result::~ThriftHiveMetastore_list_roles_result() throw() { -} - - -uint32_t ThriftHiveMetastore_list_roles_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1423; - ::apache::thrift::protocol::TType _etype1426; - xfer += iprot->readListBegin(_etype1426, _size1423); - this->success.resize(_size1423); - uint32_t _i1427; - for (_i1427 = 0; _i1427 < _size1423; ++_i1427) - { - xfer += this->success[_i1427].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_list_roles_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1428; - for (_iter1428 = this->success.begin(); _iter1428 != this->success.end(); ++_iter1428) - { - xfer += (*_iter1428).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_list_roles_presult::~ThriftHiveMetastore_list_roles_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1429; - ::apache::thrift::protocol::TType _etype1432; - xfer += iprot->readListBegin(_etype1432, _size1429); - (*(this->success)).resize(_size1429); - uint32_t _i1433; - for (_i1433 = 0; _i1433 < _size1429; ++_i1433) - { - xfer += (*(this->success))[_i1433].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_grant_revoke_role_args::~ThriftHiveMetastore_grant_revoke_role_args() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_revoke_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_grant_revoke_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_role_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_grant_revoke_role_pargs::~ThriftHiveMetastore_grant_revoke_role_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_revoke_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_role_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_grant_revoke_role_result::~ThriftHiveMetastore_grant_revoke_role_result() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_revoke_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_grant_revoke_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_role_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_grant_revoke_role_presult::~ThriftHiveMetastore_grant_revoke_role_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_revoke_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_principals_in_role_args::~ThriftHiveMetastore_get_principals_in_role_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_principals_in_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_principals_in_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_principals_in_role_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_principals_in_role_pargs::~ThriftHiveMetastore_get_principals_in_role_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_principals_in_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_principals_in_role_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_principals_in_role_result::~ThriftHiveMetastore_get_principals_in_role_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_principals_in_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_principals_in_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_principals_in_role_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_principals_in_role_presult::~ThriftHiveMetastore_get_principals_in_role_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_principals_in_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_role_grants_for_principal_args::~ThriftHiveMetastore_get_role_grants_for_principal_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_role_grants_for_principal_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_role_grants_for_principal_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_grants_for_principal_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_role_grants_for_principal_pargs::~ThriftHiveMetastore_get_role_grants_for_principal_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_role_grants_for_principal_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_grants_for_principal_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_role_grants_for_principal_result::~ThriftHiveMetastore_get_role_grants_for_principal_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_role_grants_for_principal_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_role_grants_for_principal_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_grants_for_principal_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_role_grants_for_principal_presult::~ThriftHiveMetastore_get_role_grants_for_principal_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_role_grants_for_principal_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_privilege_set_args::~ThriftHiveMetastore_get_privilege_set_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_privilege_set_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->hiveObject.read(iprot); - this->__isset.hiveObject = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user_name); - this->__isset.user_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->group_names.clear(); - uint32_t _size1434; - ::apache::thrift::protocol::TType _etype1437; - xfer += iprot->readListBegin(_etype1437, _size1434); - this->group_names.resize(_size1434); - uint32_t _i1438; - for (_i1438 = 0; _i1438 < _size1434; ++_i1438) - { - xfer += iprot->readString(this->group_names[_i1438]); - } - xfer += iprot->readListEnd(); - } - this->__isset.group_names = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1439; - for (_iter1439 = this->group_names.begin(); _iter1439 != this->group_names.end(); ++_iter1439) - { - xfer += oprot->writeString((*_iter1439)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_privilege_set_pargs::~ThriftHiveMetastore_get_privilege_set_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1440; - for (_iter1440 = (*(this->group_names)).begin(); _iter1440 != (*(this->group_names)).end(); ++_iter1440) - { - xfer += oprot->writeString((*_iter1440)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_privilege_set_result::~ThriftHiveMetastore_get_privilege_set_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_privilege_set_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_privilege_set_presult::~ThriftHiveMetastore_get_privilege_set_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_privilege_set_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_list_privileges_args::~ThriftHiveMetastore_list_privileges_args() throw() { -} - - -uint32_t ThriftHiveMetastore_list_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - this->__isset.principal_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast1441; - xfer += iprot->readI32(ecast1441); - this->principal_type = (PrincipalType::type)ecast1441; - this->__isset.principal_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->hiveObject.read(iprot); - this->__isset.hiveObject = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_list_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_list_privileges_pargs::~ThriftHiveMetastore_list_privileges_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_list_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_list_privileges_result::~ThriftHiveMetastore_list_privileges_result() throw() { -} - - -uint32_t ThriftHiveMetastore_list_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1442; - ::apache::thrift::protocol::TType _etype1445; - xfer += iprot->readListBegin(_etype1445, _size1442); - this->success.resize(_size1442); - uint32_t _i1446; - for (_i1446 = 0; _i1446 < _size1442; ++_i1446) - { - xfer += this->success[_i1446].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_list_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter1447; - for (_iter1447 = this->success.begin(); _iter1447 != this->success.end(); ++_iter1447) - { - xfer += (*_iter1447).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_list_privileges_presult::~ThriftHiveMetastore_list_privileges_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_list_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1448; - ::apache::thrift::protocol::TType _etype1451; - xfer += iprot->readListBegin(_etype1451, _size1448); - (*(this->success)).resize(_size1448); - uint32_t _i1452; - for (_i1452 = 0; _i1452 < _size1448; ++_i1452) - { - xfer += (*(this->success))[_i1452].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_grant_privileges_args::~ThriftHiveMetastore_grant_privileges_args() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->privileges.read(iprot); - this->__isset.privileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_grant_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_grant_privileges_pargs::~ThriftHiveMetastore_grant_privileges_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_grant_privileges_result::~ThriftHiveMetastore_grant_privileges_result() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_grant_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_grant_privileges_presult::~ThriftHiveMetastore_grant_privileges_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_revoke_privileges_args::~ThriftHiveMetastore_revoke_privileges_args() throw() { -} - - -uint32_t ThriftHiveMetastore_revoke_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->privileges.read(iprot); - this->__isset.privileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_revoke_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_revoke_privileges_pargs::~ThriftHiveMetastore_revoke_privileges_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_revoke_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_revoke_privileges_result::~ThriftHiveMetastore_revoke_privileges_result() throw() { -} - - -uint32_t ThriftHiveMetastore_revoke_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_revoke_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_revoke_privileges_presult::~ThriftHiveMetastore_revoke_privileges_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_revoke_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_grant_revoke_privileges_args::~ThriftHiveMetastore_grant_revoke_privileges_args() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_revoke_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_grant_revoke_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_privileges_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_grant_revoke_privileges_pargs::~ThriftHiveMetastore_grant_revoke_privileges_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_revoke_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_privileges_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_grant_revoke_privileges_result::~ThriftHiveMetastore_grant_revoke_privileges_result() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_revoke_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_grant_revoke_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_privileges_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_grant_revoke_privileges_presult::~ThriftHiveMetastore_grant_revoke_privileges_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_grant_revoke_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_set_ugi_args::~ThriftHiveMetastore_set_ugi_args() throw() { -} - - -uint32_t ThriftHiveMetastore_set_ugi_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user_name); - this->__isset.user_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->group_names.clear(); - uint32_t _size1453; - ::apache::thrift::protocol::TType _etype1456; - xfer += iprot->readListBegin(_etype1456, _size1453); - this->group_names.resize(_size1453); - uint32_t _i1457; - for (_i1457 = 0; _i1457 < _size1453; ++_i1457) - { - xfer += iprot->readString(this->group_names[_i1457]); - } - xfer += iprot->readListEnd(); - } - this->__isset.group_names = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_set_ugi_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1458; - for (_iter1458 = this->group_names.begin(); _iter1458 != this->group_names.end(); ++_iter1458) - { - xfer += oprot->writeString((*_iter1458)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_set_ugi_pargs::~ThriftHiveMetastore_set_ugi_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_set_ugi_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter1459; - for (_iter1459 = (*(this->group_names)).begin(); _iter1459 != (*(this->group_names)).end(); ++_iter1459) - { - xfer += oprot->writeString((*_iter1459)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_set_ugi_result::~ThriftHiveMetastore_set_ugi_result() throw() { -} - - -uint32_t ThriftHiveMetastore_set_ugi_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1460; - ::apache::thrift::protocol::TType _etype1463; - xfer += iprot->readListBegin(_etype1463, _size1460); - this->success.resize(_size1460); - uint32_t _i1464; - for (_i1464 = 0; _i1464 < _size1460; ++_i1464) - { - xfer += iprot->readString(this->success[_i1464]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_set_ugi_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter1465; - for (_iter1465 = this->success.begin(); _iter1465 != this->success.end(); ++_iter1465) - { - xfer += oprot->writeString((*_iter1465)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_set_ugi_presult::~ThriftHiveMetastore_set_ugi_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_set_ugi_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1466; - ::apache::thrift::protocol::TType _etype1469; - xfer += iprot->readListBegin(_etype1469, _size1466); - (*(this->success)).resize(_size1466); - uint32_t _i1470; - for (_i1470 = 0; _i1470 < _size1466; ++_i1470) - { - xfer += iprot->readString((*(this->success))[_i1470]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_delegation_token_args::~ThriftHiveMetastore_get_delegation_token_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_owner); - this->__isset.token_owner = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->renewer_kerberos_principal_name); - this->__isset.renewer_kerberos_principal_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_delegation_token_pargs::~ThriftHiveMetastore_get_delegation_token_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_get_delegation_token_result::~ThriftHiveMetastore_get_delegation_token_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_delegation_token_presult::~ThriftHiveMetastore_get_delegation_token_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_renew_delegation_token_args::~ThriftHiveMetastore_renew_delegation_token_args() throw() { -} - - -uint32_t ThriftHiveMetastore_renew_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_str_form); - this->__isset.token_str_form = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_renew_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_renew_delegation_token_pargs::~ThriftHiveMetastore_renew_delegation_token_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_renew_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_renew_delegation_token_result::~ThriftHiveMetastore_renew_delegation_token_result() throw() { -} - - -uint32_t ThriftHiveMetastore_renew_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_renew_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0); - xfer += oprot->writeI64(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_renew_delegation_token_presult::~ThriftHiveMetastore_renew_delegation_token_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_renew_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_cancel_delegation_token_args::~ThriftHiveMetastore_cancel_delegation_token_args() throw() { -} - - -uint32_t ThriftHiveMetastore_cancel_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_str_form); - this->__isset.token_str_form = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_cancel_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_cancel_delegation_token_pargs::~ThriftHiveMetastore_cancel_delegation_token_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_cancel_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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; -} - - -ThriftHiveMetastore_cancel_delegation_token_result::~ThriftHiveMetastore_cancel_delegation_token_result() throw() { -} - - -uint32_t ThriftHiveMetastore_cancel_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_cancel_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_cancel_delegation_token_presult::~ThriftHiveMetastore_cancel_delegation_token_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_cancel_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_token_args::~ThriftHiveMetastore_add_token_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_identifier); - this->__isset.token_identifier = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->delegation_token); - this->__isset.delegation_token = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_token_args"); - - xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->token_identifier); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("delegation_token", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->delegation_token); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_token_pargs::~ThriftHiveMetastore_add_token_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_token_pargs"); - - xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->token_identifier))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("delegation_token", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->delegation_token))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_token_result::~ThriftHiveMetastore_add_token_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_token_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_token_presult::~ThriftHiveMetastore_add_token_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_remove_token_args::~ThriftHiveMetastore_remove_token_args() throw() { -} - - -uint32_t ThriftHiveMetastore_remove_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_identifier); - this->__isset.token_identifier = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_remove_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_token_args"); - - xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->token_identifier); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_remove_token_pargs::~ThriftHiveMetastore_remove_token_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_remove_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_token_pargs"); - - xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->token_identifier))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_remove_token_result::~ThriftHiveMetastore_remove_token_result() throw() { -} - - -uint32_t ThriftHiveMetastore_remove_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_remove_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_token_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_remove_token_presult::~ThriftHiveMetastore_remove_token_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_remove_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_token_args::~ThriftHiveMetastore_get_token_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_identifier); - this->__isset.token_identifier = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_token_args"); - - xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->token_identifier); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_token_pargs::~ThriftHiveMetastore_get_token_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_token_pargs"); - - xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->token_identifier))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_token_result::~ThriftHiveMetastore_get_token_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_token_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_token_presult::~ThriftHiveMetastore_get_token_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_all_token_identifiers_args::~ThriftHiveMetastore_get_all_token_identifiers_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_token_identifiers_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_all_token_identifiers_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_token_identifiers_args"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_all_token_identifiers_pargs::~ThriftHiveMetastore_get_all_token_identifiers_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_token_identifiers_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_token_identifiers_pargs"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_all_token_identifiers_result::~ThriftHiveMetastore_get_all_token_identifiers_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_token_identifiers_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1471; - ::apache::thrift::protocol::TType _etype1474; - xfer += iprot->readListBegin(_etype1474, _size1471); - this->success.resize(_size1471); - uint32_t _i1475; - for (_i1475 = 0; _i1475 < _size1471; ++_i1475) - { - xfer += iprot->readString(this->success[_i1475]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_all_token_identifiers_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_token_identifiers_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter1476; - for (_iter1476 = this->success.begin(); _iter1476 != this->success.end(); ++_iter1476) - { - xfer += oprot->writeString((*_iter1476)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_all_token_identifiers_presult::~ThriftHiveMetastore_get_all_token_identifiers_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_all_token_identifiers_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1477; - ::apache::thrift::protocol::TType _etype1480; - xfer += iprot->readListBegin(_etype1480, _size1477); - (*(this->success)).resize(_size1477); - uint32_t _i1481; - for (_i1481 = 0; _i1481 < _size1477; ++_i1481) - { - xfer += iprot->readString((*(this->success))[_i1481]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_master_key_args::~ThriftHiveMetastore_add_master_key_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_master_key_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->key); - this->__isset.key = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_master_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_master_key_args"); - - xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->key); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_master_key_pargs::~ThriftHiveMetastore_add_master_key_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_master_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_master_key_pargs"); - - xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->key))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_master_key_result::~ThriftHiveMetastore_add_master_key_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_master_key_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_master_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_master_key_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); - xfer += oprot->writeI32(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_master_key_presult::~ThriftHiveMetastore_add_master_key_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_master_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_update_master_key_args::~ThriftHiveMetastore_update_master_key_args() throw() { -} - - -uint32_t ThriftHiveMetastore_update_master_key_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->seq_number); - this->__isset.seq_number = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->key); - this->__isset.key = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_update_master_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_master_key_args"); - - xfer += oprot->writeFieldBegin("seq_number", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->seq_number); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->key); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_update_master_key_pargs::~ThriftHiveMetastore_update_master_key_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_update_master_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_master_key_pargs"); - - xfer += oprot->writeFieldBegin("seq_number", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((*(this->seq_number))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->key))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_update_master_key_result::~ThriftHiveMetastore_update_master_key_result() throw() { -} - - -uint32_t ThriftHiveMetastore_update_master_key_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_update_master_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_master_key_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_update_master_key_presult::~ThriftHiveMetastore_update_master_key_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_update_master_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_remove_master_key_args::~ThriftHiveMetastore_remove_master_key_args() throw() { -} - - -uint32_t ThriftHiveMetastore_remove_master_key_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->key_seq); - this->__isset.key_seq = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_remove_master_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_master_key_args"); - - xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->key_seq); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_remove_master_key_pargs::~ThriftHiveMetastore_remove_master_key_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_remove_master_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_master_key_pargs"); - - xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((*(this->key_seq))); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_remove_master_key_result::~ThriftHiveMetastore_remove_master_key_result() throw() { -} - - -uint32_t ThriftHiveMetastore_remove_master_key_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_remove_master_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_master_key_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_remove_master_key_presult::~ThriftHiveMetastore_remove_master_key_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_remove_master_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_master_keys_args::~ThriftHiveMetastore_get_master_keys_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_master_keys_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_master_keys_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_master_keys_args"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_master_keys_pargs::~ThriftHiveMetastore_get_master_keys_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_master_keys_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_master_keys_pargs"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_master_keys_result::~ThriftHiveMetastore_get_master_keys_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_master_keys_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1482; - ::apache::thrift::protocol::TType _etype1485; - xfer += iprot->readListBegin(_etype1485, _size1482); - this->success.resize(_size1482); - uint32_t _i1486; - for (_i1486 = 0; _i1486 < _size1482; ++_i1486) - { - xfer += iprot->readString(this->success[_i1486]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_master_keys_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_master_keys_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter1487; - for (_iter1487 = this->success.begin(); _iter1487 != this->success.end(); ++_iter1487) - { - xfer += oprot->writeString((*_iter1487)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_master_keys_presult::~ThriftHiveMetastore_get_master_keys_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_master_keys_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size1488; - ::apache::thrift::protocol::TType _etype1491; - xfer += iprot->readListBegin(_etype1491, _size1488); - (*(this->success)).resize(_size1488); - uint32_t _i1492; - for (_i1492 = 0; _i1492 < _size1488; ++_i1492) - { - xfer += iprot->readString((*(this->success))[_i1492]); - } - xfer += iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_open_txns_args::~ThriftHiveMetastore_get_open_txns_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_open_txns_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_open_txns_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_args"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_open_txns_pargs::~ThriftHiveMetastore_get_open_txns_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_open_txns_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_pargs"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_open_txns_result::~ThriftHiveMetastore_get_open_txns_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_open_txns_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_open_txns_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_open_txns_presult::~ThriftHiveMetastore_get_open_txns_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_open_txns_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_open_txns_info_args::~ThriftHiveMetastore_get_open_txns_info_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_open_txns_info_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_open_txns_info_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_info_args"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_open_txns_info_pargs::~ThriftHiveMetastore_get_open_txns_info_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_open_txns_info_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_info_pargs"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_open_txns_info_result::~ThriftHiveMetastore_get_open_txns_info_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_open_txns_info_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_open_txns_info_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_info_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_open_txns_info_presult::~ThriftHiveMetastore_get_open_txns_info_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_open_txns_info_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_open_txns_args::~ThriftHiveMetastore_open_txns_args() throw() { -} - - -uint32_t ThriftHiveMetastore_open_txns_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_open_txns_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_open_txns_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_open_txns_pargs::~ThriftHiveMetastore_open_txns_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_open_txns_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_open_txns_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_open_txns_result::~ThriftHiveMetastore_open_txns_result() throw() { -} - - -uint32_t ThriftHiveMetastore_open_txns_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_open_txns_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_open_txns_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_open_txns_presult::~ThriftHiveMetastore_open_txns_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_open_txns_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_abort_txn_args::~ThriftHiveMetastore_abort_txn_args() throw() { -} - - -uint32_t ThriftHiveMetastore_abort_txn_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_abort_txn_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txn_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_abort_txn_pargs::~ThriftHiveMetastore_abort_txn_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_abort_txn_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txn_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_abort_txn_result::~ThriftHiveMetastore_abort_txn_result() throw() { -} - - -uint32_t ThriftHiveMetastore_abort_txn_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_abort_txn_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txn_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_abort_txn_presult::~ThriftHiveMetastore_abort_txn_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_abort_txn_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_abort_txns_args::~ThriftHiveMetastore_abort_txns_args() throw() { -} - - -uint32_t ThriftHiveMetastore_abort_txns_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_abort_txns_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txns_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_abort_txns_pargs::~ThriftHiveMetastore_abort_txns_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_abort_txns_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txns_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_abort_txns_result::~ThriftHiveMetastore_abort_txns_result() throw() { -} - - -uint32_t ThriftHiveMetastore_abort_txns_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_abort_txns_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txns_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_abort_txns_presult::~ThriftHiveMetastore_abort_txns_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_abort_txns_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_commit_txn_args::~ThriftHiveMetastore_commit_txn_args() throw() { -} - - -uint32_t ThriftHiveMetastore_commit_txn_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_commit_txn_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_commit_txn_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_commit_txn_pargs::~ThriftHiveMetastore_commit_txn_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_commit_txn_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_commit_txn_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_commit_txn_result::~ThriftHiveMetastore_commit_txn_result() throw() { -} - - -uint32_t ThriftHiveMetastore_commit_txn_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_commit_txn_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_commit_txn_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_commit_txn_presult::~ThriftHiveMetastore_commit_txn_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_commit_txn_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_lock_args::~ThriftHiveMetastore_lock_args() throw() { -} - - -uint32_t ThriftHiveMetastore_lock_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_lock_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_lock_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_lock_pargs::~ThriftHiveMetastore_lock_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_lock_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_lock_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_lock_result::~ThriftHiveMetastore_lock_result() throw() { -} - - -uint32_t ThriftHiveMetastore_lock_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_lock_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_lock_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_lock_presult::~ThriftHiveMetastore_lock_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_lock_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_check_lock_args::~ThriftHiveMetastore_check_lock_args() throw() { -} - - -uint32_t ThriftHiveMetastore_check_lock_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_check_lock_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_check_lock_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_check_lock_pargs::~ThriftHiveMetastore_check_lock_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_check_lock_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_check_lock_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_check_lock_result::~ThriftHiveMetastore_check_lock_result() throw() { -} - - -uint32_t ThriftHiveMetastore_check_lock_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_check_lock_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_check_lock_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_check_lock_presult::~ThriftHiveMetastore_check_lock_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_check_lock_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_unlock_args::~ThriftHiveMetastore_unlock_args() throw() { -} - - -uint32_t ThriftHiveMetastore_unlock_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_unlock_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_unlock_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_unlock_pargs::~ThriftHiveMetastore_unlock_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_unlock_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_unlock_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_unlock_result::~ThriftHiveMetastore_unlock_result() throw() { -} - - -uint32_t ThriftHiveMetastore_unlock_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_unlock_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_unlock_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_unlock_presult::~ThriftHiveMetastore_unlock_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_unlock_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_show_locks_args::~ThriftHiveMetastore_show_locks_args() throw() { -} - - -uint32_t ThriftHiveMetastore_show_locks_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_show_locks_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_locks_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_show_locks_pargs::~ThriftHiveMetastore_show_locks_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_show_locks_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_locks_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_show_locks_result::~ThriftHiveMetastore_show_locks_result() throw() { -} - - -uint32_t ThriftHiveMetastore_show_locks_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_show_locks_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_locks_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_show_locks_presult::~ThriftHiveMetastore_show_locks_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_show_locks_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_heartbeat_args::~ThriftHiveMetastore_heartbeat_args() throw() { -} - - -uint32_t ThriftHiveMetastore_heartbeat_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->ids.read(iprot); - this->__isset.ids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_heartbeat_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_args"); - - xfer += oprot->writeFieldBegin("ids", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->ids.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_heartbeat_pargs::~ThriftHiveMetastore_heartbeat_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_heartbeat_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_pargs"); - - xfer += oprot->writeFieldBegin("ids", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->ids)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_heartbeat_result::~ThriftHiveMetastore_heartbeat_result() throw() { -} - - -uint32_t ThriftHiveMetastore_heartbeat_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_heartbeat_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_heartbeat_presult::~ThriftHiveMetastore_heartbeat_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_heartbeat_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_heartbeat_txn_range_args::~ThriftHiveMetastore_heartbeat_txn_range_args() throw() { -} - - -uint32_t ThriftHiveMetastore_heartbeat_txn_range_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->txns.read(iprot); - this->__isset.txns = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_heartbeat_txn_range_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_txn_range_args"); - - xfer += oprot->writeFieldBegin("txns", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->txns.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_heartbeat_txn_range_pargs::~ThriftHiveMetastore_heartbeat_txn_range_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_heartbeat_txn_range_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_txn_range_pargs"); - - xfer += oprot->writeFieldBegin("txns", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->txns)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_heartbeat_txn_range_result::~ThriftHiveMetastore_heartbeat_txn_range_result() throw() { -} - - -uint32_t ThriftHiveMetastore_heartbeat_txn_range_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_heartbeat_txn_range_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_txn_range_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_heartbeat_txn_range_presult::~ThriftHiveMetastore_heartbeat_txn_range_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_heartbeat_txn_range_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_compact_args::~ThriftHiveMetastore_compact_args() throw() { -} - - -uint32_t ThriftHiveMetastore_compact_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_compact_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_compact_pargs::~ThriftHiveMetastore_compact_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_compact_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_compact_result::~ThriftHiveMetastore_compact_result() throw() { -} - - -uint32_t ThriftHiveMetastore_compact_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_compact_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact_result"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_compact_presult::~ThriftHiveMetastore_compact_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_compact_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_compact2_args::~ThriftHiveMetastore_compact2_args() throw() { -} - - -uint32_t ThriftHiveMetastore_compact2_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_compact2_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact2_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_compact2_pargs::~ThriftHiveMetastore_compact2_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_compact2_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact2_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_compact2_result::~ThriftHiveMetastore_compact2_result() throw() { -} - - -uint32_t ThriftHiveMetastore_compact2_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_compact2_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact2_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_compact2_presult::~ThriftHiveMetastore_compact2_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_compact2_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_show_compact_args::~ThriftHiveMetastore_show_compact_args() throw() { -} - - -uint32_t ThriftHiveMetastore_show_compact_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_show_compact_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_compact_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_show_compact_pargs::~ThriftHiveMetastore_show_compact_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_show_compact_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_compact_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_show_compact_result::~ThriftHiveMetastore_show_compact_result() throw() { -} - - -uint32_t ThriftHiveMetastore_show_compact_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_show_compact_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_compact_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_show_compact_presult::~ThriftHiveMetastore_show_compact_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_show_compact_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_add_dynamic_partitions_args::~ThriftHiveMetastore_add_dynamic_partitions_args() throw() { -} - - -uint32_t ThriftHiveMetastore_add_dynamic_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_dynamic_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_dynamic_partitions_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_dynamic_partitions_pargs::~ThriftHiveMetastore_add_dynamic_partitions_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_add_dynamic_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_dynamic_partitions_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_dynamic_partitions_result::~ThriftHiveMetastore_add_dynamic_partitions_result() throw() { -} - - -uint32_t ThriftHiveMetastore_add_dynamic_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_add_dynamic_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_dynamic_partitions_result"); - - if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_add_dynamic_partitions_presult::~ThriftHiveMetastore_add_dynamic_partitions_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_add_dynamic_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_next_notification_args::~ThriftHiveMetastore_get_next_notification_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_next_notification_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_next_notification_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_next_notification_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_next_notification_pargs::~ThriftHiveMetastore_get_next_notification_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_next_notification_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_next_notification_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_next_notification_result::~ThriftHiveMetastore_get_next_notification_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_next_notification_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_next_notification_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_next_notification_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_next_notification_presult::~ThriftHiveMetastore_get_next_notification_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_next_notification_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_current_notificationEventId_args::~ThriftHiveMetastore_get_current_notificationEventId_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_current_notificationEventId_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_current_notificationEventId_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_current_notificationEventId_args"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_current_notificationEventId_pargs::~ThriftHiveMetastore_get_current_notificationEventId_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_current_notificationEventId_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_current_notificationEventId_pargs"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_current_notificationEventId_result::~ThriftHiveMetastore_get_current_notificationEventId_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_current_notificationEventId_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_current_notificationEventId_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_current_notificationEventId_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_current_notificationEventId_presult::~ThriftHiveMetastore_get_current_notificationEventId_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_current_notificationEventId_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_fire_listener_event_args::~ThriftHiveMetastore_fire_listener_event_args() throw() { -} - - -uint32_t ThriftHiveMetastore_fire_listener_event_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->rqst.read(iprot); - this->__isset.rqst = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_fire_listener_event_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_fire_listener_event_args"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->rqst.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_fire_listener_event_pargs::~ThriftHiveMetastore_fire_listener_event_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_fire_listener_event_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_fire_listener_event_pargs"); - - xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->rqst)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_fire_listener_event_result::~ThriftHiveMetastore_fire_listener_event_result() throw() { -} - - -uint32_t ThriftHiveMetastore_fire_listener_event_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_fire_listener_event_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_fire_listener_event_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_fire_listener_event_presult::~ThriftHiveMetastore_fire_listener_event_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_fire_listener_event_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_flushCache_args::~ThriftHiveMetastore_flushCache_args() throw() { -} - - -uint32_t ThriftHiveMetastore_flushCache_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_flushCache_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_flushCache_args"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_flushCache_pargs::~ThriftHiveMetastore_flushCache_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_flushCache_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_flushCache_pargs"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_flushCache_result::~ThriftHiveMetastore_flushCache_result() throw() { -} - - -uint32_t ThriftHiveMetastore_flushCache_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_flushCache_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_flushCache_result"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_flushCache_presult::~ThriftHiveMetastore_flushCache_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_flushCache_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_cm_recycle_args::~ThriftHiveMetastore_cm_recycle_args() throw() { -} - - -uint32_t ThriftHiveMetastore_cm_recycle_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->request.read(iprot); - this->__isset.request = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_cm_recycle_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cm_recycle_args"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->request.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_cm_recycle_pargs::~ThriftHiveMetastore_cm_recycle_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_cm_recycle_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cm_recycle_pargs"); - - xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->request)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_cm_recycle_result::~ThriftHiveMetastore_cm_recycle_result() throw() { -} - - -uint32_t ThriftHiveMetastore_cm_recycle_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_cm_recycle_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cm_recycle_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_cm_recycle_presult::~ThriftHiveMetastore_cm_recycle_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_cm_recycle_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_file_metadata_by_expr_args::~ThriftHiveMetastore_get_file_metadata_by_expr_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_file_metadata_by_expr_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_file_metadata_by_expr_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_file_metadata_by_expr_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_file_metadata_by_expr_pargs::~ThriftHiveMetastore_get_file_metadata_by_expr_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_file_metadata_by_expr_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_file_metadata_by_expr_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_file_metadata_by_expr_result::~ThriftHiveMetastore_get_file_metadata_by_expr_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_file_metadata_by_expr_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_file_metadata_by_expr_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_file_metadata_by_expr_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_file_metadata_by_expr_presult::~ThriftHiveMetastore_get_file_metadata_by_expr_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_file_metadata_by_expr_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_file_metadata_args::~ThriftHiveMetastore_get_file_metadata_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_file_metadata_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_file_metadata_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_file_metadata_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_file_metadata_pargs::~ThriftHiveMetastore_get_file_metadata_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_file_metadata_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_file_metadata_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_file_metadata_result::~ThriftHiveMetastore_get_file_metadata_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_file_metadata_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_file_metadata_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_file_metadata_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_file_metadata_presult::~ThriftHiveMetastore_get_file_metadata_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_file_metadata_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_put_file_metadata_args::~ThriftHiveMetastore_put_file_metadata_args() throw() { -} - - -uint32_t ThriftHiveMetastore_put_file_metadata_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_put_file_metadata_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_put_file_metadata_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_put_file_metadata_pargs::~ThriftHiveMetastore_put_file_metadata_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_put_file_metadata_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_put_file_metadata_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_put_file_metadata_result::~ThriftHiveMetastore_put_file_metadata_result() throw() { -} - - -uint32_t ThriftHiveMetastore_put_file_metadata_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_put_file_metadata_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_put_file_metadata_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_put_file_metadata_presult::~ThriftHiveMetastore_put_file_metadata_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_put_file_metadata_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_clear_file_metadata_args::~ThriftHiveMetastore_clear_file_metadata_args() throw() { -} - - -uint32_t ThriftHiveMetastore_clear_file_metadata_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_clear_file_metadata_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_clear_file_metadata_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_clear_file_metadata_pargs::~ThriftHiveMetastore_clear_file_metadata_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_clear_file_metadata_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_clear_file_metadata_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_clear_file_metadata_result::~ThriftHiveMetastore_clear_file_metadata_result() throw() { -} - - -uint32_t ThriftHiveMetastore_clear_file_metadata_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_clear_file_metadata_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_clear_file_metadata_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_clear_file_metadata_presult::~ThriftHiveMetastore_clear_file_metadata_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_clear_file_metadata_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_cache_file_metadata_args::~ThriftHiveMetastore_cache_file_metadata_args() throw() { -} - - -uint32_t ThriftHiveMetastore_cache_file_metadata_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->req.read(iprot); - this->__isset.req = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_cache_file_metadata_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cache_file_metadata_args"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->req.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_cache_file_metadata_pargs::~ThriftHiveMetastore_cache_file_metadata_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_cache_file_metadata_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cache_file_metadata_pargs"); - - xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->req)).write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_cache_file_metadata_result::~ThriftHiveMetastore_cache_file_metadata_result() throw() { -} - - -uint32_t ThriftHiveMetastore_cache_file_metadata_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_cache_file_metadata_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cache_file_metadata_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_cache_file_metadata_presult::~ThriftHiveMetastore_cache_file_metadata_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_cache_file_metadata_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - - -ThriftHiveMetastore_get_metastore_db_uuid_args::~ThriftHiveMetastore_get_metastore_db_uuid_args() throw() { -} - - -uint32_t ThriftHiveMetastore_get_metastore_db_uuid_args::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_metastore_db_uuid_args::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_metastore_db_uuid_args"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_metastore_db_uuid_pargs::~ThriftHiveMetastore_get_metastore_db_uuid_pargs() throw() { -} - - -uint32_t ThriftHiveMetastore_get_metastore_db_uuid_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_metastore_db_uuid_pargs"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_metastore_db_uuid_result::~ThriftHiveMetastore_get_metastore_db_uuid_result() throw() { -} - - -uint32_t ThriftHiveMetastore_get_metastore_db_uuid_result::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHiveMetastore_get_metastore_db_uuid_result::write(::apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_metastore_db_uuid_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - - -ThriftHiveMetastore_get_metastore_db_uuid_presult::~ThriftHiveMetastore_get_metastore_db_uuid_presult() throw() { -} - - -uint32_t ThriftHiveMetastore_get_metastore_db_uuid_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -void ThriftHiveMetastoreClient::getMetaConf(std::string& _return, const std::string& key) -{ - send_getMetaConf(key); - recv_getMetaConf(_return); -} - -void ThriftHiveMetastoreClient::send_getMetaConf(const std::string& key) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getMetaConf", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_getMetaConf_pargs args; - args.key = &key; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_getMetaConf(std::string& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("getMetaConf") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_getMetaConf_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getMetaConf failed: unknown result"); -} - -void ThriftHiveMetastoreClient::setMetaConf(const std::string& key, const std::string& value) -{ - send_setMetaConf(key, value); - recv_setMetaConf(); -} - -void ThriftHiveMetastoreClient::send_setMetaConf(const std::string& key, const std::string& value) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("setMetaConf", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_setMetaConf_pargs args; - args.key = &key; - args.value = &value; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_setMetaConf() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("setMetaConf") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_setMetaConf_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - return; -} - -void ThriftHiveMetastoreClient::create_database(const Database& database) -{ - send_create_database(database); - recv_create_database(); -} - -void ThriftHiveMetastoreClient::send_create_database(const Database& database) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_database_pargs args; - args.database = &database; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_create_database() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_database") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_create_database_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - return; -} - -void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name) -{ - send_get_database(name); - recv_get_database(_return); -} - -void ThriftHiveMetastoreClient::send_get_database(const std::string& name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_database_pargs args; - args.name = &name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_database(Database& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_database") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_database_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); -} - -void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData, const bool cascade) -{ - send_drop_database(name, deleteData, cascade); - recv_drop_database(); -} - -void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData, const bool cascade) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_database_pargs args; - args.name = &name; - args.deleteData = &deleteData; - args.cascade = &cascade; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_drop_database() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_database") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_drop_database_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - return; -} - -void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) -{ - send_get_databases(pattern); - recv_get_databases(_return); -} - -void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_databases_pargs args; - args.pattern = &pattern; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_databases") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_databases_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) -{ - send_get_all_databases(); - recv_get_all_databases(_return); -} - -void ThriftHiveMetastoreClient::send_get_all_databases() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_all_databases_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_all_databases") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_all_databases_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); -} - -void ThriftHiveMetastoreClient::alter_database(const std::string& dbname, const Database& db) -{ - send_alter_database(dbname, db); - recv_alter_database(); -} - -void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, const Database& db) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_database_pargs args; - args.dbname = &dbname; - args.db = &db; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_alter_database() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_database") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_alter_database_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) -{ - send_get_type(name); - recv_get_type(_return); -} - -void ThriftHiveMetastoreClient::send_get_type(const std::string& name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_type_pargs args; - args.name = &name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_type(Type& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_type") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_type_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::create_type(const Type& type) -{ - send_create_type(type); - return recv_create_type(); -} - -void ThriftHiveMetastoreClient::send_create_type(const Type& type) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_type_pargs args; - args.type = &type; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_create_type() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_type") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_create_type_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::drop_type(const std::string& type) -{ - send_drop_type(type); - return recv_drop_type(); -} - -void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_type_pargs args; - args.type = &type; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_drop_type() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_type") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_drop_type_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) -{ - send_get_type_all(name); - recv_get_type_all(_return); -} - -void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_type_all_pargs args; - args.name = &name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_type_all") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_type_all_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) -{ - send_get_fields(db_name, table_name); - recv_get_fields(_return); -} - -void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_fields_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_fields") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_fields_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) -{ - send_get_fields_with_environment_context(db_name, table_name, environment_context); - recv_get_fields_with_environment_context(_return); -} - -void ThriftHiveMetastoreClient::send_get_fields_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_fields_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_fields_with_environment_context_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_fields_with_environment_context(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_fields_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_fields_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields_with_environment_context failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) -{ - send_get_schema(db_name, table_name); - recv_get_schema(_return); -} - -void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_schema_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_schema") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_schema_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) -{ - send_get_schema_with_environment_context(db_name, table_name, environment_context); - recv_get_schema_with_environment_context(_return); -} - -void ThriftHiveMetastoreClient::send_get_schema_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_schema_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_schema_with_environment_context_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_schema_with_environment_context(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_schema_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_schema_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema_with_environment_context failed: unknown result"); -} - -void ThriftHiveMetastoreClient::create_table(const Table& tbl) -{ - send_create_table(tbl); - recv_create_table(); -} - -void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_table_pargs args; - args.tbl = &tbl; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_create_table() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_table") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_create_table_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - return; -} - -void ThriftHiveMetastoreClient::create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) -{ - send_create_table_with_environment_context(tbl, environment_context); - recv_create_table_with_environment_context(); -} - -void ThriftHiveMetastoreClient::send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_table_with_environment_context_pargs args; - args.tbl = &tbl; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_create_table_with_environment_context() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_table_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_create_table_with_environment_context_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - return; -} - -void ThriftHiveMetastoreClient::create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) -{ - send_create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints); - recv_create_table_with_constraints(); -} - -void ThriftHiveMetastoreClient::send_create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table_with_constraints", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_table_with_constraints_pargs args; - args.tbl = &tbl; - args.primaryKeys = &primaryKeys; - args.foreignKeys = &foreignKeys; - args.uniqueConstraints = &uniqueConstraints; - args.notNullConstraints = ¬NullConstraints; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_create_table_with_constraints() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_table_with_constraints") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_create_table_with_constraints_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - return; -} - -void ThriftHiveMetastoreClient::drop_constraint(const DropConstraintRequest& req) -{ - send_drop_constraint(req); - recv_drop_constraint(); -} - -void ThriftHiveMetastoreClient::send_drop_constraint(const DropConstraintRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_constraint", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_constraint_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_drop_constraint() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_constraint") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_drop_constraint_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o3) { - throw result.o3; - } - return; -} - -void ThriftHiveMetastoreClient::add_primary_key(const AddPrimaryKeyRequest& req) -{ - send_add_primary_key(req); - recv_add_primary_key(); -} - -void ThriftHiveMetastoreClient::send_add_primary_key(const AddPrimaryKeyRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_primary_key", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_primary_key_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_add_primary_key() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_primary_key") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_add_primary_key_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::add_foreign_key(const AddForeignKeyRequest& req) -{ - send_add_foreign_key(req); - recv_add_foreign_key(); -} - -void ThriftHiveMetastoreClient::send_add_foreign_key(const AddForeignKeyRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_foreign_key", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_foreign_key_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_add_foreign_key() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_foreign_key") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_add_foreign_key_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::add_unique_constraint(const AddUniqueConstraintRequest& req) -{ - send_add_unique_constraint(req); - recv_add_unique_constraint(); -} - -void ThriftHiveMetastoreClient::send_add_unique_constraint(const AddUniqueConstraintRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_unique_constraint", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_unique_constraint_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_add_unique_constraint() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_unique_constraint") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_add_unique_constraint_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::add_not_null_constraint(const AddNotNullConstraintRequest& req) -{ - send_add_not_null_constraint(req); - recv_add_not_null_constraint(); -} - -void ThriftHiveMetastoreClient::send_add_not_null_constraint(const AddNotNullConstraintRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_not_null_constraint", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_not_null_constraint_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_add_not_null_constraint() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_not_null_constraint") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_add_not_null_constraint_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) -{ - send_drop_table(dbname, name, deleteData); - recv_drop_table(); -} - -void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_table_pargs args; - args.dbname = &dbname; - args.name = &name; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_drop_table() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_table") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_drop_table_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o3) { - throw result.o3; - } - return; -} - -void ThriftHiveMetastoreClient::drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) -{ - send_drop_table_with_environment_context(dbname, name, deleteData, environment_context); - recv_drop_table_with_environment_context(); -} - -void ThriftHiveMetastoreClient::send_drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_table_with_environment_context_pargs args; - args.dbname = &dbname; - args.name = &name; - args.deleteData = &deleteData; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_drop_table_with_environment_context() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_table_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_drop_table_with_environment_context_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o3) { - throw result.o3; - } - return; -} - -void ThriftHiveMetastoreClient::truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) -{ - send_truncate_table(dbName, tableName, partNames); - recv_truncate_table(); -} - -void ThriftHiveMetastoreClient::send_truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("truncate_table", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_truncate_table_pargs args; - args.dbName = &dbName; - args.tableName = &tableName; - args.partNames = &partNames; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_truncate_table() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("truncate_table") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_truncate_table_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - return; -} - -void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) -{ - send_get_tables(db_name, pattern); - recv_get_tables(_return); -} - -void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_tables_pargs args; - args.db_name = &db_name; - args.pattern = &pattern; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_tables") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_tables_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType) -{ - send_get_tables_by_type(db_name, pattern, tableType); - recv_get_tables_by_type(_return); -} - -void ThriftHiveMetastoreClient::send_get_tables_by_type(const std::string& db_name, const std::string& pattern, const std::string& tableType) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_tables_by_type", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_tables_by_type_pargs args; - args.db_name = &db_name; - args.pattern = &pattern; - args.tableType = &tableType; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_tables_by_type(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_tables_by_type") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_tables_by_type_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables_by_type failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) -{ - send_get_table_meta(db_patterns, tbl_patterns, tbl_types); - recv_get_table_meta(_return); -} - -void ThriftHiveMetastoreClient::send_get_table_meta(const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_meta", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_meta_pargs args; - args.db_patterns = &db_patterns; - args.tbl_patterns = &tbl_patterns; - args.tbl_types = &tbl_types; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_table_meta(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_meta") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_table_meta_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_meta failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) -{ - send_get_all_tables(db_name); - recv_get_all_tables(_return); -} - -void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_all_tables_pargs args; - args.db_name = &db_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_all_tables") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_all_tables_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) -{ - send_get_table(dbname, tbl_name); - recv_get_table(_return); -} - -void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_table(Table& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_table_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names) -{ - send_get_table_objects_by_name(dbname, tbl_names); - recv_get_table_objects_by_name(_return); -} - -void ThriftHiveMetastoreClient::send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_objects_by_name_pargs args; - args.dbname = &dbname; - args.tbl_names = &tbl_names; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_table_objects_by_name(std::vector
& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_objects_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_table_objects_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_table_req(GetTableResult& _return, const GetTableRequest& req) -{ - send_get_table_req(req); - recv_get_table_req(_return); -} - -void ThriftHiveMetastoreClient::send_get_table_req(const GetTableRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_req", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_req_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_table_req(GetTableResult& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_req") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_table_req_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_req failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req) -{ - send_get_table_objects_by_name_req(req); - recv_get_table_objects_by_name_req(_return); -} - -void ThriftHiveMetastoreClient::send_get_table_objects_by_name_req(const GetTablesRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_objects_by_name_req", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_objects_by_name_req_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_table_objects_by_name_req(GetTablesResult& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_objects_by_name_req") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_table_objects_by_name_req_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_objects_by_name_req failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) -{ - send_get_table_names_by_filter(dbname, filter, max_tables); - recv_get_table_names_by_filter(_return); -} - -void ThriftHiveMetastoreClient::send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_names_by_filter_pargs args; - args.dbname = &dbname; - args.filter = &filter; - args.max_tables = &max_tables; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_names_by_filter") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_table_names_by_filter_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); -} - -void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) -{ - send_alter_table(dbname, tbl_name, new_tbl); - recv_alter_table(); -} - -void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_table_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_alter_table() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_table") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_alter_table_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) -{ - send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); - recv_alter_table_with_environment_context(); -} - -void ThriftHiveMetastoreClient::send_alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_table_with_environment_context_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_alter_table_with_environment_context() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_table_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_alter_table_with_environment_context_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) -{ - send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade); - recv_alter_table_with_cascade(); -} - -void ThriftHiveMetastoreClient::send_alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_table_with_cascade", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_table_with_cascade_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; - args.cascade = &cascade; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_alter_table_with_cascade() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_table_with_cascade") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_alter_table_with_cascade_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) -{ - send_add_partition(new_part); - recv_add_partition(_return); -} - -void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_partition_pargs args; - args.new_part = &new_part; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_add_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); -} - -void ThriftHiveMetastoreClient::add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) -{ - send_add_partition_with_environment_context(new_part, environment_context); - recv_add_partition_with_environment_context(_return); -} - -void ThriftHiveMetastoreClient::send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_partition_with_environment_context_pargs args; - args.new_part = &new_part; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_add_partition_with_environment_context(Partition& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_partition_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_add_partition_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition_with_environment_context failed: unknown result"); -} - -int32_t ThriftHiveMetastoreClient::add_partitions(const std::vector & new_parts) -{ - send_add_partitions(new_parts); - return recv_add_partitions(); -} - -void ThriftHiveMetastoreClient::send_add_partitions(const std::vector & new_parts) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_partitions_pargs args; - args.new_parts = &new_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -int32_t ThriftHiveMetastoreClient::recv_add_partitions() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_partitions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - int32_t _return; - ThriftHiveMetastore_add_partitions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions failed: unknown result"); -} - -int32_t ThriftHiveMetastoreClient::add_partitions_pspec(const std::vector & new_parts) -{ - send_add_partitions_pspec(new_parts); - return recv_add_partitions_pspec(); -} - -void ThriftHiveMetastoreClient::send_add_partitions_pspec(const std::vector & new_parts) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partitions_pspec", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_partitions_pspec_pargs args; - args.new_parts = &new_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -int32_t ThriftHiveMetastoreClient::recv_add_partitions_pspec() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_partitions_pspec") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - int32_t _return; - ThriftHiveMetastore_add_partitions_pspec_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions_pspec failed: unknown result"); -} - -void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) -{ - send_append_partition(db_name, tbl_name, part_vals); - recv_append_partition(_return); -} - -void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_append_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("append_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_append_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result"); -} - -void ThriftHiveMetastoreClient::add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request) -{ - send_add_partitions_req(request); - recv_add_partitions_req(_return); -} - -void ThriftHiveMetastoreClient::send_add_partitions_req(const AddPartitionsRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_partitions_req_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_add_partitions_req(AddPartitionsResult& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_partitions_req") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_add_partitions_req_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions_req failed: unknown result"); -} - -void ThriftHiveMetastoreClient::append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) -{ - send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context); - recv_append_partition_with_environment_context(_return); -} - -void ThriftHiveMetastoreClient::send_append_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_append_partition_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_append_partition_with_environment_context(Partition& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("append_partition_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_append_partition_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_with_environment_context failed: unknown result"); -} - -void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) -{ - send_append_partition_by_name(db_name, tbl_name, part_name); - recv_append_partition_by_name(_return); -} - -void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_append_partition_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("append_partition_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_append_partition_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result"); -} - -void ThriftHiveMetastoreClient::append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) -{ - send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context); - recv_append_partition_by_name_with_environment_context(_return); -} - -void ThriftHiveMetastoreClient::send_append_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_append_partition_by_name_with_environment_context(Partition& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("append_partition_by_name_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name_with_environment_context failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) -{ - send_drop_partition(db_name, tbl_name, part_vals, deleteData); - return recv_drop_partition(); -} - -void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_drop_partition() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_drop_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) -{ - send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); - return recv_drop_partition_with_environment_context(); -} - -void ThriftHiveMetastoreClient::send_drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_partition_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.deleteData = &deleteData; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_drop_partition_with_environment_context() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_partition_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_drop_partition_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_with_environment_context failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) -{ - send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - return recv_drop_partition_by_name(); -} - -void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_partition_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_partition_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_drop_partition_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) -{ - send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); - return recv_drop_partition_by_name_with_environment_context(); -} - -void ThriftHiveMetastoreClient::send_drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.deleteData = &deleteData; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_drop_partition_by_name_with_environment_context() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_partition_by_name_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name_with_environment_context failed: unknown result"); -} - -void ThriftHiveMetastoreClient::drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req) -{ - send_drop_partitions_req(req); - recv_drop_partitions_req(_return); -} - -void ThriftHiveMetastoreClient::send_drop_partitions_req(const DropPartitionsRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partitions_req", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_partitions_req_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_drop_partitions_req(DropPartitionsResult& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_partitions_req") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_drop_partitions_req_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partitions_req failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) -{ - send_get_partition(db_name, tbl_name, part_vals); - recv_get_partition(_return); -} - -void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); -} - -void ThriftHiveMetastoreClient::exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) -{ - send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); - recv_exchange_partition(_return); -} - -void ThriftHiveMetastoreClient::send_exchange_partition(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_exchange_partition_pargs args; - args.partitionSpecs = &partitionSpecs; - args.source_db = &source_db; - args.source_table_name = &source_table_name; - args.dest_db = &dest_db; - args.dest_table_name = &dest_table_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_exchange_partition(Partition& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("exchange_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_exchange_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "exchange_partition failed: unknown result"); -} - -void ThriftHiveMetastoreClient::exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) -{ - send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); - recv_exchange_partitions(_return); -} - -void ThriftHiveMetastoreClient::send_exchange_partitions(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("exchange_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_exchange_partitions_pargs args; - args.partitionSpecs = &partitionSpecs; - args.source_db = &source_db; - args.source_table_name = &source_table_name; - args.dest_db = &dest_db; - args.dest_table_name = &dest_table_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_exchange_partitions(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("exchange_partitions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_exchange_partitions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "exchange_partitions failed: unknown result"); -} - -void ThriftHiveMetastoreClient::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) -{ - send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); - recv_get_partition_with_auth(_return); -} - -void ThriftHiveMetastoreClient::send_get_partition_with_auth(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) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partition_with_auth_pargs 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; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partition_with_auth") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partition_with_auth_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_with_auth failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) -{ - send_get_partition_by_name(db_name, tbl_name, part_name); - recv_get_partition_by_name(_return); -} - -void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partition_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partition_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partition_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) -{ - send_get_partitions(db_name, tbl_name, max_parts); - recv_get_partitions(_return); -} - -void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partitions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); -} - -void ThriftHiveMetastoreClient::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) -{ - send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); - recv_get_partitions_with_auth(_return); -} - -void ThriftHiveMetastoreClient::send_get_partitions_with_auth(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) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_with_auth_pargs 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; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_with_auth") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partitions_with_auth_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) -{ - send_get_partitions_pspec(db_name, tbl_name, max_parts); - recv_get_partitions_pspec(_return); -} - -void ThriftHiveMetastoreClient::send_get_partitions_pspec(const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_pspec", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_pspec_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partitions_pspec(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_pspec") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partitions_pspec_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_pspec failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) -{ - send_get_partition_names(db_name, tbl_name, max_parts); - recv_get_partition_names(_return); -} - -void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partition_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partition_names") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partition_names_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); -} - -void ThriftHiveMetastoreClient::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) -{ - send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partitions_ps(_return); -} - -void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_ps_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_ps") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partitions_ps_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); -} - -void ThriftHiveMetastoreClient::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) -{ - send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); - recv_get_partitions_ps_with_auth(_return); -} - -void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(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) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_ps_with_auth_pargs 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; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_ps_with_auth") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partitions_ps_with_auth_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); -} - -void ThriftHiveMetastoreClient::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) -{ - send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partition_names_ps(_return); -} - -void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partition_names_ps_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partition_names_ps") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partition_names_ps_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); -} - -void ThriftHiveMetastoreClient::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) -{ - send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); - recv_get_partitions_by_filter(_return); -} - -void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_by_filter_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.filter = &filter; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_by_filter") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partitions_by_filter_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) -{ - send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts); - recv_get_part_specs_by_filter(_return); -} - -void ThriftHiveMetastoreClient::send_get_part_specs_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_part_specs_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_part_specs_by_filter_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.filter = &filter; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_part_specs_by_filter(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_part_specs_by_filter") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_part_specs_by_filter_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_part_specs_by_filter failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req) -{ - send_get_partitions_by_expr(req); - recv_get_partitions_by_expr(_return); -} - -void ThriftHiveMetastoreClient::send_get_partitions_by_expr(const PartitionsByExprRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_by_expr_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partitions_by_expr(PartitionsByExprResult& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_by_expr") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partitions_by_expr_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_expr failed: unknown result"); -} - -int32_t ThriftHiveMetastoreClient::get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) -{ - send_get_num_partitions_by_filter(db_name, tbl_name, filter); - return recv_get_num_partitions_by_filter(); -} - -void ThriftHiveMetastoreClient::send_get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_num_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_num_partitions_by_filter_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.filter = &filter; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -int32_t ThriftHiveMetastoreClient::recv_get_num_partitions_by_filter() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_num_partitions_by_filter") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - int32_t _return; - ThriftHiveMetastore_get_num_partitions_by_filter_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_num_partitions_by_filter failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) -{ - send_get_partitions_by_names(db_name, tbl_name, names); - recv_get_partitions_by_names(_return); -} - -void ThriftHiveMetastoreClient::send_get_partitions_by_names(const std::string& db_name, const std::string& tbl_name, const std::vector & names) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_by_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.names = &names; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partitions_by_names(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_by_names") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partitions_by_names_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_names failed: unknown result"); -} - -void ThriftHiveMetastoreClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) -{ - send_alter_partition(db_name, tbl_name, new_part); - recv_alter_partition(); -} - -void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_part = &new_part; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_alter_partition() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_alter_partition_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) -{ - send_alter_partitions(db_name, tbl_name, new_parts); - recv_alter_partitions(); -} - -void ThriftHiveMetastoreClient::send_alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_partitions_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_parts = &new_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_alter_partitions() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_partitions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_alter_partitions_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) -{ - send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context); - recv_alter_partitions_with_environment_context(); -} - -void ThriftHiveMetastoreClient::send_alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partitions_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_partitions_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_parts = &new_parts; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_alter_partitions_with_environment_context() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_partitions_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_alter_partitions_with_environment_context_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) -{ - send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); - recv_alter_partition_with_environment_context(); -} - -void ThriftHiveMetastoreClient::send_alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_partition_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_part = &new_part; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_alter_partition_with_environment_context() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_partition_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_alter_partition_with_environment_context_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) -{ - send_rename_partition(db_name, tbl_name, part_vals, new_part); - recv_rename_partition(); -} - -void ThriftHiveMetastoreClient::send_rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_rename_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.new_part = &new_part; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_rename_partition() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("rename_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_rename_partition_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -bool ThriftHiveMetastoreClient::partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) -{ - send_partition_name_has_valid_characters(part_vals, throw_exception); - return recv_partition_name_has_valid_characters(); -} - -void ThriftHiveMetastoreClient::send_partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_partition_name_has_valid_characters_pargs args; - args.part_vals = &part_vals; - args.throw_exception = &throw_exception; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_partition_name_has_valid_characters() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("partition_name_has_valid_characters") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_partition_name_has_valid_characters_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_has_valid_characters failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) -{ - send_get_config_value(name, defaultValue); - recv_get_config_value(_return); -} - -void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_config_value_pargs args; - args.name = &name; - args.defaultValue = &defaultValue; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_config_value") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_config_value_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); -} - -void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) -{ - send_partition_name_to_vals(part_name); - recv_partition_name_to_vals(_return); -} - -void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_partition_name_to_vals_pargs args; - args.part_name = &part_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("partition_name_to_vals") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_partition_name_to_vals_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); -} - -void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) -{ - send_partition_name_to_spec(part_name); - recv_partition_name_to_spec(_return); -} - -void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_partition_name_to_spec_pargs args; - args.part_name = &part_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("partition_name_to_spec") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_partition_name_to_spec_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); -} - -void ThriftHiveMetastoreClient::markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) -{ - send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); - recv_markPartitionForEvent(); -} - -void ThriftHiveMetastoreClient::send_markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_markPartitionForEvent_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.eventType = &eventType; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_markPartitionForEvent() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("markPartitionForEvent") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_markPartitionForEvent_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - if (result.__isset.o5) { - throw result.o5; - } - if (result.__isset.o6) { - throw result.o6; - } - return; -} - -bool ThriftHiveMetastoreClient::isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) -{ - send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); - return recv_isPartitionMarkedForEvent(); -} - -void ThriftHiveMetastoreClient::send_isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_isPartitionMarkedForEvent_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.eventType = &eventType; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_isPartitionMarkedForEvent() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("isPartitionMarkedForEvent") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_isPartitionMarkedForEvent_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - if (result.__isset.o5) { - throw result.o5; - } - if (result.__isset.o6) { - throw result.o6; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result"); -} - -void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) -{ - send_add_index(new_index, index_table); - recv_add_index(_return); -} - -void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_index_pargs args; - args.new_index = &new_index; - args.index_table = &index_table; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_add_index(Index& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_index") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_add_index_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); -} - -void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) -{ - send_alter_index(dbname, base_tbl_name, idx_name, new_idx); - recv_alter_index(); -} - -void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_index_pargs args; - args.dbname = &dbname; - args.base_tbl_name = &base_tbl_name; - args.idx_name = &idx_name; - args.new_idx = &new_idx; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_alter_index() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_index") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_alter_index_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) -{ - send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); - return recv_drop_index_by_name(); -} - -void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_index_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.index_name = &index_name; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_drop_index_by_name() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_index_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_drop_index_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) -{ - send_get_index_by_name(db_name, tbl_name, index_name); - recv_get_index_by_name(_return); -} - -void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_index_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.index_name = &index_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_index_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_index_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_by_name failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) -{ - send_get_indexes(db_name, tbl_name, max_indexes); - recv_get_indexes(_return); -} - -void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_indexes_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_indexes") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_indexes_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) -{ - send_get_index_names(db_name, tbl_name, max_indexes); - recv_get_index_names(_return); -} - -void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_index_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_index_names") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_index_names_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request) -{ - send_get_primary_keys(request); - recv_get_primary_keys(_return); -} - -void ThriftHiveMetastoreClient::send_get_primary_keys(const PrimaryKeysRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_primary_keys", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_primary_keys_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_primary_keys(PrimaryKeysResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_primary_keys") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_primary_keys_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_primary_keys failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request) -{ - send_get_foreign_keys(request); - recv_get_foreign_keys(_return); -} - -void ThriftHiveMetastoreClient::send_get_foreign_keys(const ForeignKeysRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_foreign_keys", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_foreign_keys_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_foreign_keys(ForeignKeysResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_foreign_keys") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_foreign_keys_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_foreign_keys failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request) -{ - send_get_unique_constraints(request); - recv_get_unique_constraints(_return); -} - -void ThriftHiveMetastoreClient::send_get_unique_constraints(const UniqueConstraintsRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_unique_constraints", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_unique_constraints_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_unique_constraints(UniqueConstraintsResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_unique_constraints") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_unique_constraints_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_unique_constraints failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request) -{ - send_get_not_null_constraints(request); - recv_get_not_null_constraints(_return); -} - -void ThriftHiveMetastoreClient::send_get_not_null_constraints(const NotNullConstraintsRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_not_null_constraints", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_not_null_constraints_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_not_null_constraints(NotNullConstraintsResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_not_null_constraints") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_not_null_constraints_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_not_null_constraints failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::update_table_column_statistics(const ColumnStatistics& stats_obj) -{ - send_update_table_column_statistics(stats_obj); - return recv_update_table_column_statistics(); -} - -void ThriftHiveMetastoreClient::send_update_table_column_statistics(const ColumnStatistics& stats_obj) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_update_table_column_statistics_pargs args; - args.stats_obj = &stats_obj; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_update_table_column_statistics() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("update_table_column_statistics") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_update_table_column_statistics_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_table_column_statistics failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::update_partition_column_statistics(const ColumnStatistics& stats_obj) -{ - send_update_partition_column_statistics(stats_obj); - return recv_update_partition_column_statistics(); -} - -void ThriftHiveMetastoreClient::send_update_partition_column_statistics(const ColumnStatistics& stats_obj) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_update_partition_column_statistics_pargs args; - args.stats_obj = &stats_obj; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_update_partition_column_statistics() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("update_partition_column_statistics") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_update_partition_column_statistics_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_partition_column_statistics failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) -{ - send_get_table_column_statistics(db_name, tbl_name, col_name); - recv_get_table_column_statistics(_return); -} - -void ThriftHiveMetastoreClient::send_get_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_column_statistics_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.col_name = &col_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_table_column_statistics(ColumnStatistics& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_column_statistics") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_table_column_statistics_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_column_statistics failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) -{ - send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name); - recv_get_partition_column_statistics(_return); -} - -void ThriftHiveMetastoreClient::send_get_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partition_column_statistics_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.col_name = &col_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partition_column_statistics(ColumnStatistics& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partition_column_statistics") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partition_column_statistics_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_column_statistics failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request) -{ - send_get_table_statistics_req(request); - recv_get_table_statistics_req(_return); -} - -void ThriftHiveMetastoreClient::send_get_table_statistics_req(const TableStatsRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_statistics_req", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_statistics_req_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_table_statistics_req(TableStatsResult& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_statistics_req") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_table_statistics_req_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_statistics_req failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request) -{ - send_get_partitions_statistics_req(request); - recv_get_partitions_statistics_req(_return); -} - -void ThriftHiveMetastoreClient::send_get_partitions_statistics_req(const PartitionsStatsRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_statistics_req", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_statistics_req_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_partitions_statistics_req(PartitionsStatsResult& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_statistics_req") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_partitions_statistics_req_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_statistics_req failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request) -{ - send_get_aggr_stats_for(request); - recv_get_aggr_stats_for(_return); -} - -void ThriftHiveMetastoreClient::send_get_aggr_stats_for(const PartitionsStatsRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_aggr_stats_for", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_aggr_stats_for_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_aggr_stats_for(AggrStats& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_aggr_stats_for") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_aggr_stats_for_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_aggr_stats_for failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::set_aggr_stats_for(const SetPartitionsStatsRequest& request) -{ - send_set_aggr_stats_for(request); - return recv_set_aggr_stats_for(); -} - -void ThriftHiveMetastoreClient::send_set_aggr_stats_for(const SetPartitionsStatsRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("set_aggr_stats_for", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_set_aggr_stats_for_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_set_aggr_stats_for() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("set_aggr_stats_for") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_set_aggr_stats_for_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "set_aggr_stats_for failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) -{ - send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); - return recv_delete_partition_column_statistics(); -} - -void ThriftHiveMetastoreClient::send_delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_delete_partition_column_statistics_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.col_name = &col_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_delete_partition_column_statistics() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("delete_partition_column_statistics") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_delete_partition_column_statistics_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_partition_column_statistics failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) -{ - send_delete_table_column_statistics(db_name, tbl_name, col_name); - return recv_delete_table_column_statistics(); -} - -void ThriftHiveMetastoreClient::send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_delete_table_column_statistics_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.col_name = &col_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_delete_table_column_statistics() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("delete_table_column_statistics") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_delete_table_column_statistics_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); -} - -void ThriftHiveMetastoreClient::create_function(const Function& func) -{ - send_create_function(func); - recv_create_function(); -} - -void ThriftHiveMetastoreClient::send_create_function(const Function& func) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("create_function", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_function_pargs args; - args.func = &func; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_create_function() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_function") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_create_function_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - return; -} - -void ThriftHiveMetastoreClient::drop_function(const std::string& dbName, const std::string& funcName) -{ - send_drop_function(dbName, funcName); - recv_drop_function(); -} - -void ThriftHiveMetastoreClient::send_drop_function(const std::string& dbName, const std::string& funcName) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_function", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_function_pargs args; - args.dbName = &dbName; - args.funcName = &funcName; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_drop_function() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_function") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_drop_function_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o3) { - throw result.o3; - } - return; -} - -void ThriftHiveMetastoreClient::alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) -{ - send_alter_function(dbName, funcName, newFunc); - recv_alter_function(); -} - -void ThriftHiveMetastoreClient::send_alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_function", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_function_pargs args; - args.dbName = &dbName; - args.funcName = &funcName; - args.newFunc = &newFunc; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_alter_function() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_function") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_alter_function_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) -{ - send_get_functions(dbName, pattern); - recv_get_functions(_return); -} - -void ThriftHiveMetastoreClient::send_get_functions(const std::string& dbName, const std::string& pattern) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_functions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_functions_pargs args; - args.dbName = &dbName; - args.pattern = &pattern; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_functions(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_functions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_functions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_functions failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_function(Function& _return, const std::string& dbName, const std::string& funcName) -{ - send_get_function(dbName, funcName); - recv_get_function(_return); -} - -void ThriftHiveMetastoreClient::send_get_function(const std::string& dbName, const std::string& funcName) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_function", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_function_pargs args; - args.dbName = &dbName; - args.funcName = &funcName; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_function(Function& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_function") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_function_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_function failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_all_functions(GetAllFunctionsResponse& _return) -{ - send_get_all_functions(); - recv_get_all_functions(_return); -} - -void ThriftHiveMetastoreClient::send_get_all_functions() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_functions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_all_functions_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_all_functions(GetAllFunctionsResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_all_functions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_all_functions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_functions failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::create_role(const Role& role) -{ - send_create_role(role); - return recv_create_role(); -} - -void ThriftHiveMetastoreClient::send_create_role(const Role& role) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("create_role", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_role_pargs args; - args.role = &role; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_create_role() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_role") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_create_role_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_role failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::drop_role(const std::string& role_name) -{ - send_drop_role(role_name); - return recv_drop_role(); -} - -void ThriftHiveMetastoreClient::send_drop_role(const std::string& role_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_role_pargs args; - args.role_name = &role_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_drop_role() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_role") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_drop_role_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_role failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_role_names(std::vector & _return) -{ - send_get_role_names(); - recv_get_role_names(_return); -} - -void ThriftHiveMetastoreClient::send_get_role_names() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_role_names", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_role_names_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_role_names(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_role_names") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_role_names_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_role_names failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::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) -{ - send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); - return recv_grant_role(); -} - -void ThriftHiveMetastoreClient::send_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) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_grant_role_pargs 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; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_grant_role() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("grant_role") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_grant_role_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_role failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) -{ - send_revoke_role(role_name, principal_name, principal_type); - return recv_revoke_role(); -} - -void ThriftHiveMetastoreClient::send_revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_revoke_role_pargs args; - args.role_name = &role_name; - args.principal_name = &principal_name; - args.principal_type = &principal_type; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_revoke_role() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("revoke_role") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_revoke_role_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_role failed: unknown result"); -} - -void ThriftHiveMetastoreClient::list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) -{ - send_list_roles(principal_name, principal_type); - recv_list_roles(_return); -} - -void ThriftHiveMetastoreClient::send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_list_roles_pargs args; - args.principal_name = &principal_name; - args.principal_type = &principal_type; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_list_roles(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("list_roles") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_list_roles_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_roles failed: unknown result"); -} - -void ThriftHiveMetastoreClient::grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) -{ - send_grant_revoke_role(request); - recv_grant_revoke_role(_return); -} - -void ThriftHiveMetastoreClient::send_grant_revoke_role(const GrantRevokeRoleRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("grant_revoke_role", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_grant_revoke_role_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_grant_revoke_role(GrantRevokeRoleResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("grant_revoke_role") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_grant_revoke_role_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_revoke_role failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) -{ - send_get_principals_in_role(request); - recv_get_principals_in_role(_return); -} - -void ThriftHiveMetastoreClient::send_get_principals_in_role(const GetPrincipalsInRoleRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_principals_in_role", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_principals_in_role_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_principals_in_role(GetPrincipalsInRoleResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_principals_in_role") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_principals_in_role_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_principals_in_role failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request) -{ - send_get_role_grants_for_principal(request); - recv_get_role_grants_for_principal(_return); -} - -void ThriftHiveMetastoreClient::send_get_role_grants_for_principal(const GetRoleGrantsForPrincipalRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_role_grants_for_principal", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_role_grants_for_principal_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_role_grants_for_principal") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_role_grants_for_principal_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_role_grants_for_principal failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) -{ - send_get_privilege_set(hiveObject, user_name, group_names); - recv_get_privilege_set(_return); -} - -void ThriftHiveMetastoreClient::send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_privilege_set_pargs args; - args.hiveObject = &hiveObject; - args.user_name = &user_name; - args.group_names = &group_names; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_privilege_set(PrincipalPrivilegeSet& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_privilege_set") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_privilege_set_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_privilege_set failed: unknown result"); -} - -void ThriftHiveMetastoreClient::list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) -{ - send_list_privileges(principal_name, principal_type, hiveObject); - recv_list_privileges(_return); -} - -void ThriftHiveMetastoreClient::send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_list_privileges_pargs args; - args.principal_name = &principal_name; - args.principal_type = &principal_type; - args.hiveObject = &hiveObject; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_list_privileges(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("list_privileges") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_list_privileges_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_privileges failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::grant_privileges(const PrivilegeBag& privileges) -{ - send_grant_privileges(privileges); - return recv_grant_privileges(); -} - -void ThriftHiveMetastoreClient::send_grant_privileges(const PrivilegeBag& privileges) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_grant_privileges_pargs args; - args.privileges = &privileges; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_grant_privileges() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("grant_privileges") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_grant_privileges_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_privileges failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::revoke_privileges(const PrivilegeBag& privileges) -{ - send_revoke_privileges(privileges); - return recv_revoke_privileges(); -} - -void ThriftHiveMetastoreClient::send_revoke_privileges(const PrivilegeBag& privileges) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_revoke_privileges_pargs args; - args.privileges = &privileges; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_revoke_privileges() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("revoke_privileges") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_revoke_privileges_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_privileges failed: unknown result"); -} - -void ThriftHiveMetastoreClient::grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) -{ - send_grant_revoke_privileges(request); - recv_grant_revoke_privileges(_return); -} - -void ThriftHiveMetastoreClient::send_grant_revoke_privileges(const GrantRevokePrivilegeRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("grant_revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_grant_revoke_privileges_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_grant_revoke_privileges(GrantRevokePrivilegeResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("grant_revoke_privileges") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_grant_revoke_privileges_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_revoke_privileges failed: unknown result"); -} - -void ThriftHiveMetastoreClient::set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) -{ - send_set_ugi(user_name, group_names); - recv_set_ugi(_return); -} - -void ThriftHiveMetastoreClient::send_set_ugi(const std::string& user_name, const std::vector & group_names) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("set_ugi", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_set_ugi_pargs args; - args.user_name = &user_name; - args.group_names = &group_names; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_set_ugi(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("set_ugi") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_set_ugi_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "set_ugi failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) -{ - send_get_delegation_token(token_owner, renewer_kerberos_principal_name); - recv_get_delegation_token(_return); -} - -void ThriftHiveMetastoreClient::send_get_delegation_token(const std::string& token_owner, const std::string& renewer_kerberos_principal_name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_delegation_token_pargs args; - args.token_owner = &token_owner; - args.renewer_kerberos_principal_name = &renewer_kerberos_principal_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_delegation_token(std::string& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_delegation_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_delegation_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_delegation_token failed: unknown result"); -} - -int64_t ThriftHiveMetastoreClient::renew_delegation_token(const std::string& token_str_form) -{ - send_renew_delegation_token(token_str_form); - return recv_renew_delegation_token(); -} - -void ThriftHiveMetastoreClient::send_renew_delegation_token(const std::string& token_str_form) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_renew_delegation_token_pargs args; - args.token_str_form = &token_str_form; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -int64_t ThriftHiveMetastoreClient::recv_renew_delegation_token() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("renew_delegation_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - int64_t _return; - ThriftHiveMetastore_renew_delegation_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "renew_delegation_token failed: unknown result"); -} - -void ThriftHiveMetastoreClient::cancel_delegation_token(const std::string& token_str_form) -{ - send_cancel_delegation_token(token_str_form); - recv_cancel_delegation_token(); -} - -void ThriftHiveMetastoreClient::send_cancel_delegation_token(const std::string& token_str_form) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_cancel_delegation_token_pargs args; - args.token_str_form = &token_str_form; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_cancel_delegation_token() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("cancel_delegation_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_cancel_delegation_token_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - return; -} - -bool ThriftHiveMetastoreClient::add_token(const std::string& token_identifier, const std::string& delegation_token) -{ - send_add_token(token_identifier, delegation_token); - return recv_add_token(); -} - -void ThriftHiveMetastoreClient::send_add_token(const std::string& token_identifier, const std::string& delegation_token) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_token", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_token_pargs args; - args.token_identifier = &token_identifier; - args.delegation_token = &delegation_token; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_add_token() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_add_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_token failed: unknown result"); -} - -bool ThriftHiveMetastoreClient::remove_token(const std::string& token_identifier) -{ - send_remove_token(token_identifier); - return recv_remove_token(); -} - -void ThriftHiveMetastoreClient::send_remove_token(const std::string& token_identifier) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("remove_token", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_remove_token_pargs args; - args.token_identifier = &token_identifier; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_remove_token() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("remove_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_remove_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "remove_token failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_token(std::string& _return, const std::string& token_identifier) -{ - send_get_token(token_identifier); - recv_get_token(_return); -} - -void ThriftHiveMetastoreClient::send_get_token(const std::string& token_identifier) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_token", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_token_pargs args; - args.token_identifier = &token_identifier; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_token(std::string& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_token failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_all_token_identifiers(std::vector & _return) -{ - send_get_all_token_identifiers(); - recv_get_all_token_identifiers(_return); -} - -void ThriftHiveMetastoreClient::send_get_all_token_identifiers() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_token_identifiers", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_all_token_identifiers_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_all_token_identifiers(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_all_token_identifiers") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_all_token_identifiers_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_token_identifiers failed: unknown result"); -} - -int32_t ThriftHiveMetastoreClient::add_master_key(const std::string& key) -{ - send_add_master_key(key); - return recv_add_master_key(); -} - -void ThriftHiveMetastoreClient::send_add_master_key(const std::string& key) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_master_key", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_master_key_pargs args; - args.key = &key; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -int32_t ThriftHiveMetastoreClient::recv_add_master_key() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_master_key") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - int32_t _return; - ThriftHiveMetastore_add_master_key_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_master_key failed: unknown result"); -} - -void ThriftHiveMetastoreClient::update_master_key(const int32_t seq_number, const std::string& key) -{ - send_update_master_key(seq_number, key); - recv_update_master_key(); -} - -void ThriftHiveMetastoreClient::send_update_master_key(const int32_t seq_number, const std::string& key) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("update_master_key", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_update_master_key_pargs args; - args.seq_number = &seq_number; - args.key = &key; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_update_master_key() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("update_master_key") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_update_master_key_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -bool ThriftHiveMetastoreClient::remove_master_key(const int32_t key_seq) -{ - send_remove_master_key(key_seq); - return recv_remove_master_key(); -} - -void ThriftHiveMetastoreClient::send_remove_master_key(const int32_t key_seq) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("remove_master_key", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_remove_master_key_pargs args; - args.key_seq = &key_seq; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -bool ThriftHiveMetastoreClient::recv_remove_master_key() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("remove_master_key") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - bool _return; - ThriftHiveMetastore_remove_master_key_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "remove_master_key failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_master_keys(std::vector & _return) -{ - send_get_master_keys(); - recv_get_master_keys(_return); -} - -void ThriftHiveMetastoreClient::send_get_master_keys() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_master_keys", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_master_keys_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_master_keys(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_master_keys") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_master_keys_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_master_keys failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_open_txns(GetOpenTxnsResponse& _return) -{ - send_get_open_txns(); - recv_get_open_txns(_return); -} - -void ThriftHiveMetastoreClient::send_get_open_txns() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_open_txns", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_open_txns_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_open_txns(GetOpenTxnsResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_open_txns") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_open_txns_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_open_txns failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_open_txns_info(GetOpenTxnsInfoResponse& _return) -{ - send_get_open_txns_info(); - recv_get_open_txns_info(_return); -} - -void ThriftHiveMetastoreClient::send_get_open_txns_info() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_open_txns_info", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_open_txns_info_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_open_txns_info(GetOpenTxnsInfoResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_open_txns_info") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_open_txns_info_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_open_txns_info failed: unknown result"); -} - -void ThriftHiveMetastoreClient::open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst) -{ - send_open_txns(rqst); - recv_open_txns(_return); -} - -void ThriftHiveMetastoreClient::send_open_txns(const OpenTxnRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("open_txns", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_open_txns_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_open_txns(OpenTxnsResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("open_txns") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_open_txns_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "open_txns failed: unknown result"); -} - -void ThriftHiveMetastoreClient::abort_txn(const AbortTxnRequest& rqst) -{ - send_abort_txn(rqst); - recv_abort_txn(); -} - -void ThriftHiveMetastoreClient::send_abort_txn(const AbortTxnRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("abort_txn", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_abort_txn_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_abort_txn() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("abort_txn") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_abort_txn_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - return; -} - -void ThriftHiveMetastoreClient::abort_txns(const AbortTxnsRequest& rqst) -{ - send_abort_txns(rqst); - recv_abort_txns(); -} - -void ThriftHiveMetastoreClient::send_abort_txns(const AbortTxnsRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("abort_txns", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_abort_txns_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_abort_txns() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("abort_txns") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_abort_txns_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - return; -} - -void ThriftHiveMetastoreClient::commit_txn(const CommitTxnRequest& rqst) -{ - send_commit_txn(rqst); - recv_commit_txn(); -} - -void ThriftHiveMetastoreClient::send_commit_txn(const CommitTxnRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("commit_txn", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_commit_txn_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_commit_txn() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("commit_txn") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_commit_txn_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::lock(LockResponse& _return, const LockRequest& rqst) -{ - send_lock(rqst); - recv_lock(_return); -} - -void ThriftHiveMetastoreClient::send_lock(const LockRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("lock", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_lock_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_lock(LockResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("lock") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_lock_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "lock failed: unknown result"); -} - -void ThriftHiveMetastoreClient::check_lock(LockResponse& _return, const CheckLockRequest& rqst) -{ - send_check_lock(rqst); - recv_check_lock(_return); -} - -void ThriftHiveMetastoreClient::send_check_lock(const CheckLockRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("check_lock", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_check_lock_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_check_lock(LockResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("check_lock") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_check_lock_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "check_lock failed: unknown result"); -} - -void ThriftHiveMetastoreClient::unlock(const UnlockRequest& rqst) -{ - send_unlock(rqst); - recv_unlock(); -} - -void ThriftHiveMetastoreClient::send_unlock(const UnlockRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("unlock", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_unlock_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_unlock() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("unlock") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_unlock_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst) -{ - send_show_locks(rqst); - recv_show_locks(_return); -} - -void ThriftHiveMetastoreClient::send_show_locks(const ShowLocksRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("show_locks", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_show_locks_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_show_locks(ShowLocksResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("show_locks") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_show_locks_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "show_locks failed: unknown result"); -} - -void ThriftHiveMetastoreClient::heartbeat(const HeartbeatRequest& ids) -{ - send_heartbeat(ids); - recv_heartbeat(); -} - -void ThriftHiveMetastoreClient::send_heartbeat(const HeartbeatRequest& ids) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("heartbeat", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_heartbeat_pargs args; - args.ids = &ids; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_heartbeat() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("heartbeat") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_heartbeat_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - return; -} - -void ThriftHiveMetastoreClient::heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns) -{ - send_heartbeat_txn_range(txns); - recv_heartbeat_txn_range(_return); -} - -void ThriftHiveMetastoreClient::send_heartbeat_txn_range(const HeartbeatTxnRangeRequest& txns) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("heartbeat_txn_range", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_heartbeat_txn_range_pargs args; - args.txns = &txns; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_heartbeat_txn_range(HeartbeatTxnRangeResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("heartbeat_txn_range") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_heartbeat_txn_range_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "heartbeat_txn_range failed: unknown result"); -} - -void ThriftHiveMetastoreClient::compact(const CompactionRequest& rqst) -{ - send_compact(rqst); - recv_compact(); -} - -void ThriftHiveMetastoreClient::send_compact(const CompactionRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("compact", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_compact_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_compact() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("compact") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_compact_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - return; -} - -void ThriftHiveMetastoreClient::compact2(CompactionResponse& _return, const CompactionRequest& rqst) -{ - send_compact2(rqst); - recv_compact2(_return); -} - -void ThriftHiveMetastoreClient::send_compact2(const CompactionRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("compact2", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_compact2_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_compact2(CompactionResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("compact2") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_compact2_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "compact2 failed: unknown result"); -} - -void ThriftHiveMetastoreClient::show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst) -{ - send_show_compact(rqst); - recv_show_compact(_return); -} - -void ThriftHiveMetastoreClient::send_show_compact(const ShowCompactRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("show_compact", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_show_compact_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_show_compact(ShowCompactResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("show_compact") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_show_compact_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "show_compact failed: unknown result"); -} - -void ThriftHiveMetastoreClient::add_dynamic_partitions(const AddDynamicPartitions& rqst) -{ - send_add_dynamic_partitions(rqst); - recv_add_dynamic_partitions(); -} - -void ThriftHiveMetastoreClient::send_add_dynamic_partitions(const AddDynamicPartitions& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_dynamic_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_dynamic_partitions_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_add_dynamic_partitions() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_dynamic_partitions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_add_dynamic_partitions_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; -} - -void ThriftHiveMetastoreClient::get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst) -{ - send_get_next_notification(rqst); - recv_get_next_notification(_return); -} - -void ThriftHiveMetastoreClient::send_get_next_notification(const NotificationEventRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_next_notification", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_next_notification_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_next_notification(NotificationEventResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_next_notification") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_next_notification_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_next_notification failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_current_notificationEventId(CurrentNotificationEventId& _return) -{ - send_get_current_notificationEventId(); - recv_get_current_notificationEventId(_return); -} - -void ThriftHiveMetastoreClient::send_get_current_notificationEventId() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_current_notificationEventId", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_current_notificationEventId_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_current_notificationEventId(CurrentNotificationEventId& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_current_notificationEventId") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_current_notificationEventId_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_current_notificationEventId failed: unknown result"); -} - -void ThriftHiveMetastoreClient::fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst) -{ - send_fire_listener_event(rqst); - recv_fire_listener_event(_return); -} - -void ThriftHiveMetastoreClient::send_fire_listener_event(const FireEventRequest& rqst) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("fire_listener_event", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_fire_listener_event_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_fire_listener_event(FireEventResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("fire_listener_event") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_fire_listener_event_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fire_listener_event failed: unknown result"); -} - -void ThriftHiveMetastoreClient::flushCache() -{ - send_flushCache(); - recv_flushCache(); -} - -void ThriftHiveMetastoreClient::send_flushCache() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("flushCache", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_flushCache_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_flushCache() -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("flushCache") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_flushCache_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - return; -} - -void ThriftHiveMetastoreClient::cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request) -{ - send_cm_recycle(request); - recv_cm_recycle(_return); -} - -void ThriftHiveMetastoreClient::send_cm_recycle(const CmRecycleRequest& request) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("cm_recycle", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_cm_recycle_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_cm_recycle(CmRecycleResponse& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("cm_recycle") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_cm_recycle_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "cm_recycle failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req) -{ - send_get_file_metadata_by_expr(req); - recv_get_file_metadata_by_expr(_return); -} - -void ThriftHiveMetastoreClient::send_get_file_metadata_by_expr(const GetFileMetadataByExprRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_file_metadata_by_expr", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_file_metadata_by_expr_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_file_metadata_by_expr(GetFileMetadataByExprResult& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_file_metadata_by_expr") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_file_metadata_by_expr_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_file_metadata_by_expr failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req) -{ - send_get_file_metadata(req); - recv_get_file_metadata(_return); -} - -void ThriftHiveMetastoreClient::send_get_file_metadata(const GetFileMetadataRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_file_metadata_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_file_metadata(GetFileMetadataResult& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_file_metadata") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_file_metadata_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_file_metadata failed: unknown result"); -} - -void ThriftHiveMetastoreClient::put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req) -{ - send_put_file_metadata(req); - recv_put_file_metadata(_return); -} - -void ThriftHiveMetastoreClient::send_put_file_metadata(const PutFileMetadataRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("put_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_put_file_metadata_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_put_file_metadata(PutFileMetadataResult& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("put_file_metadata") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_put_file_metadata_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "put_file_metadata failed: unknown result"); -} - -void ThriftHiveMetastoreClient::clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req) -{ - send_clear_file_metadata(req); - recv_clear_file_metadata(_return); -} - -void ThriftHiveMetastoreClient::send_clear_file_metadata(const ClearFileMetadataRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("clear_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_clear_file_metadata_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_clear_file_metadata(ClearFileMetadataResult& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("clear_file_metadata") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_clear_file_metadata_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "clear_file_metadata failed: unknown result"); -} - -void ThriftHiveMetastoreClient::cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) -{ - send_cache_file_metadata(req); - recv_cache_file_metadata(_return); -} - -void ThriftHiveMetastoreClient::send_cache_file_metadata(const CacheFileMetadataRequest& req) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("cache_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_cache_file_metadata_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_cache_file_metadata(CacheFileMetadataResult& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("cache_file_metadata") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_cache_file_metadata_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "cache_file_metadata failed: unknown result"); -} - -void ThriftHiveMetastoreClient::get_metastore_db_uuid(std::string& _return) -{ - send_get_metastore_db_uuid(); - recv_get_metastore_db_uuid(_return); -} - -void ThriftHiveMetastoreClient::send_get_metastore_db_uuid() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_metastore_db_uuid", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_metastore_db_uuid_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} - -void ThriftHiveMetastoreClient::recv_get_metastore_db_uuid(std::string& _return) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_metastore_db_uuid") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_metastore_db_uuid_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_metastore_db_uuid failed: unknown result"); -} - -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::dispatchCall(iprot, oprot, fname, seqid, callContext); - } - (this->*(pfn->second))(seqid, iprot, oprot, callContext); - return true; -} - -void ThriftHiveMetastoreProcessor::process_getMetaConf(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.getMetaConf", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.getMetaConf"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.getMetaConf"); - } - - ThriftHiveMetastore_getMetaConf_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.getMetaConf", bytes); - } - - ThriftHiveMetastore_getMetaConf_result result; - try { - iface_->getMetaConf(result.success, args.key); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.getMetaConf"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getMetaConf", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.getMetaConf"); - } - - oprot->writeMessageBegin("getMetaConf", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.getMetaConf", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_setMetaConf(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.setMetaConf", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.setMetaConf"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.setMetaConf"); - } - - ThriftHiveMetastore_setMetaConf_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.setMetaConf", bytes); - } - - ThriftHiveMetastore_setMetaConf_result result; - try { - iface_->setMetaConf(args.key, args.value); - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.setMetaConf"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("setMetaConf", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.setMetaConf"); - } - - oprot->writeMessageBegin("setMetaConf", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.setMetaConf", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_database", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_database"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_database"); - } - - ThriftHiveMetastore_create_database_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_database", bytes); - } - - ThriftHiveMetastore_create_database_result result; - try { - iface_->create_database(args.database); - } catch (AlreadyExistsException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_database"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_database"); - } - - oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_database", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_database"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_database"); - } - - ThriftHiveMetastore_get_database_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_database", bytes); - } - - ThriftHiveMetastore_get_database_result result; - try { - iface_->get_database(result.success, args.name); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_database"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_database"); - } - - oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_database", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_database"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_database"); - } - - ThriftHiveMetastore_drop_database_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_database", bytes); - } - - ThriftHiveMetastore_drop_database_result result; - try { - iface_->drop_database(args.name, args.deleteData, args.cascade); - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_database"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_database"); - } - - oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_databases", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_databases"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_databases"); - } - - ThriftHiveMetastore_get_databases_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_databases", bytes); - } - - ThriftHiveMetastore_get_databases_result result; - try { - iface_->get_databases(result.success, args.pattern); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_databases"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_databases"); - } - - oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_databases", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_databases"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_databases"); - } - - ThriftHiveMetastore_get_all_databases_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_databases", bytes); - } - - ThriftHiveMetastore_get_all_databases_result result; - try { - iface_->get_all_databases(result.success); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_databases"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_databases"); - } - - oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_database", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_database"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_database"); - } - - ThriftHiveMetastore_alter_database_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_database", bytes); - } - - ThriftHiveMetastore_alter_database_result result; - try { - iface_->alter_database(args.dbname, args.db); - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_database"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_database"); - } - - oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_type", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type"); - } - - ThriftHiveMetastore_get_type_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type", bytes); - } - - ThriftHiveMetastore_get_type_result result; - try { - iface_->get_type(result.success, args.name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type"); - } - - oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_type", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_type"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_type"); - } - - ThriftHiveMetastore_create_type_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_type", bytes); - } - - ThriftHiveMetastore_create_type_result result; - try { - result.success = iface_->create_type(args.type); - result.__isset.success = true; - } catch (AlreadyExistsException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_type"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_type"); - } - - oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_type", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_type"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_type"); - } - - ThriftHiveMetastore_drop_type_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_type", bytes); - } - - ThriftHiveMetastore_drop_type_result result; - try { - result.success = iface_->drop_type(args.type); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_type"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_type"); - } - - oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_type_all", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type_all"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type_all"); - } - - ThriftHiveMetastore_get_type_all_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type_all", bytes); - } - - ThriftHiveMetastore_get_type_all_result result; - try { - iface_->get_type_all(result.success, args.name); - result.__isset.success = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type_all"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type_all"); - } - - oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_fields", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_fields"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_fields"); - } - - ThriftHiveMetastore_get_fields_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_fields", bytes); - } - - ThriftHiveMetastore_get_fields_result result; - try { - iface_->get_fields(result.success, args.db_name, args.table_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (UnknownTableException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_fields"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_fields"); - } - - oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_fields", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_fields_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_fields_with_environment_context", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_fields_with_environment_context"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_fields_with_environment_context"); - } - - ThriftHiveMetastore_get_fields_with_environment_context_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_fields_with_environment_context", bytes); - } - - ThriftHiveMetastore_get_fields_with_environment_context_result result; - try { - iface_->get_fields_with_environment_context(result.success, args.db_name, args.table_name, args.environment_context); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (UnknownTableException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_fields_with_environment_context"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_fields_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_fields_with_environment_context"); - } - - oprot->writeMessageBegin("get_fields_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_fields_with_environment_context", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_schema", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_schema"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_schema"); - } - - ThriftHiveMetastore_get_schema_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_schema", bytes); - } - - ThriftHiveMetastore_get_schema_result result; - try { - iface_->get_schema(result.success, args.db_name, args.table_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (UnknownTableException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_schema"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_schema"); - } - - oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_schema", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_schema_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_schema_with_environment_context", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_schema_with_environment_context"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_schema_with_environment_context"); - } - - ThriftHiveMetastore_get_schema_with_environment_context_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_schema_with_environment_context", bytes); - } - - ThriftHiveMetastore_get_schema_with_environment_context_result result; - try { - iface_->get_schema_with_environment_context(result.success, args.db_name, args.table_name, args.environment_context); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (UnknownTableException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_schema_with_environment_context"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_schema_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_schema_with_environment_context"); - } - - oprot->writeMessageBegin("get_schema_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_schema_with_environment_context", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table"); - } - - ThriftHiveMetastore_create_table_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table", bytes); - } - - ThriftHiveMetastore_create_table_result result; - try { - iface_->create_table(args.tbl); - } catch (AlreadyExistsException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (NoSuchObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table"); - } - - oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table_with_environment_context", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); - } - - ThriftHiveMetastore_create_table_with_environment_context_result result; - try { - iface_->create_table_with_environment_context(args.tbl, args.environment_context); - } catch (AlreadyExistsException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (NoSuchObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_create_table_with_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table_with_constraints", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table_with_constraints"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table_with_constraints"); - } - - ThriftHiveMetastore_create_table_with_constraints_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table_with_constraints", bytes); - } - - ThriftHiveMetastore_create_table_with_constraints_result result; - try { - iface_->create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys, args.uniqueConstraints, args.notNullConstraints); - } catch (AlreadyExistsException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (NoSuchObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table_with_constraints"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_table_with_constraints", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table_with_constraints"); - } - - oprot->writeMessageBegin("create_table_with_constraints", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table_with_constraints", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_drop_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_constraint", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_constraint"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_constraint"); - } - - ThriftHiveMetastore_drop_constraint_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_constraint", bytes); - } - - ThriftHiveMetastore_drop_constraint_result result; - try { - iface_->drop_constraint(args.req); - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_constraint"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_constraint", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_constraint"); - } - - oprot->writeMessageBegin("drop_constraint", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_constraint", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_add_primary_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_primary_key", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_primary_key"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_primary_key"); - } - - ThriftHiveMetastore_add_primary_key_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_primary_key", bytes); - } - - ThriftHiveMetastore_add_primary_key_result result; - try { - iface_->add_primary_key(args.req); - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_primary_key"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_primary_key", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_primary_key"); - } - - oprot->writeMessageBegin("add_primary_key", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_primary_key", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_add_foreign_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_foreign_key", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_foreign_key"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_foreign_key"); - } - - ThriftHiveMetastore_add_foreign_key_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_foreign_key", bytes); - } - - ThriftHiveMetastore_add_foreign_key_result result; - try { - iface_->add_foreign_key(args.req); - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_foreign_key"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_foreign_key", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_foreign_key"); - } - - oprot->writeMessageBegin("add_foreign_key", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_foreign_key", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_add_unique_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_unique_constraint", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_unique_constraint"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_unique_constraint"); - } - - ThriftHiveMetastore_add_unique_constraint_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_unique_constraint", bytes); - } - - ThriftHiveMetastore_add_unique_constraint_result result; - try { - iface_->add_unique_constraint(args.req); - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_unique_constraint"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_unique_constraint", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_unique_constraint"); - } - - oprot->writeMessageBegin("add_unique_constraint", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_unique_constraint", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_add_not_null_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_not_null_constraint", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_not_null_constraint"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_not_null_constraint"); - } - - ThriftHiveMetastore_add_not_null_constraint_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_not_null_constraint", bytes); - } - - ThriftHiveMetastore_add_not_null_constraint_result result; - try { - iface_->add_not_null_constraint(args.req); - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_not_null_constraint"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_not_null_constraint", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_not_null_constraint"); - } - - oprot->writeMessageBegin("add_not_null_constraint", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_not_null_constraint", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_table", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table"); - } - - ThriftHiveMetastore_drop_table_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table", bytes); - } - - ThriftHiveMetastore_drop_table_result result; - try { - iface_->drop_table(args.dbname, args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table"); - } - - oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_drop_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_table_with_environment_context", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); - } - - ThriftHiveMetastore_drop_table_with_environment_context_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table_with_environment_context", bytes); - } - - ThriftHiveMetastore_drop_table_with_environment_context_result result; - try { - iface_->drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context); - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); - } - - oprot->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table_with_environment_context", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_truncate_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.truncate_table", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.truncate_table"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.truncate_table"); - } - - ThriftHiveMetastore_truncate_table_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.truncate_table", bytes); - } - - ThriftHiveMetastore_truncate_table_result result; - try { - iface_->truncate_table(args.dbName, args.tableName, args.partNames); - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.truncate_table"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("truncate_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.truncate_table"); - } - - oprot->writeMessageBegin("truncate_table", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.truncate_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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_tables", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_tables"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_tables"); - } - - ThriftHiveMetastore_get_tables_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_tables", bytes); - } - - ThriftHiveMetastore_get_tables_result result; - try { - iface_->get_tables(result.success, args.db_name, args.pattern); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_tables"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_tables"); - } - - oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_tables", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_tables_by_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_tables_by_type", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_tables_by_type"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_tables_by_type"); - } - - ThriftHiveMetastore_get_tables_by_type_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_tables_by_type", bytes); - } - - ThriftHiveMetastore_get_tables_by_type_result result; - try { - iface_->get_tables_by_type(result.success, args.db_name, args.pattern, args.tableType); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_tables_by_type"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_tables_by_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_tables_by_type"); - } - - oprot->writeMessageBegin("get_tables_by_type", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_tables_by_type", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_table_meta(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_meta", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_meta"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_meta"); - } - - ThriftHiveMetastore_get_table_meta_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_meta", bytes); - } - - ThriftHiveMetastore_get_table_meta_result result; - try { - iface_->get_table_meta(result.success, args.db_patterns, args.tbl_patterns, args.tbl_types); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_meta"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table_meta", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_meta"); - } - - oprot->writeMessageBegin("get_table_meta", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_meta", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_tables", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_tables"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_tables"); - } - - ThriftHiveMetastore_get_all_tables_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_tables", bytes); - } - - ThriftHiveMetastore_get_all_tables_result result; - try { - iface_->get_all_tables(result.success, args.db_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_tables"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_tables"); - } - - oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table"); - } - - ThriftHiveMetastore_get_table_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table", bytes); - } - - ThriftHiveMetastore_get_table_result result; - try { - iface_->get_table(result.success, args.dbname, args.tbl_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table"); - } - - oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_objects_by_name", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); - } - - ThriftHiveMetastore_get_table_objects_by_name_result result; - try { - iface_->get_table_objects_by_name(result.success, args.dbname, args.tbl_names); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_table_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_req", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_req"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_req"); - } - - ThriftHiveMetastore_get_table_req_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_req", bytes); - } - - ThriftHiveMetastore_get_table_req_result result; - try { - iface_->get_table_req(result.success, args.req); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_req"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_req"); - } - - oprot->writeMessageBegin("get_table_req", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_req", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_table_objects_by_name_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_objects_by_name_req", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_objects_by_name_req"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name_req"); - } - - ThriftHiveMetastore_get_table_objects_by_name_req_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name_req", bytes); - } - - ThriftHiveMetastore_get_table_objects_by_name_req_result result; - try { - iface_->get_table_objects_by_name_req(result.success, args.req); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_objects_by_name_req"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table_objects_by_name_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name_req"); - } - - oprot->writeMessageBegin("get_table_objects_by_name_req", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name_req", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_names_by_filter", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); - } - - ThriftHiveMetastore_get_table_names_by_filter_result result; - try { - iface_->get_table_names_by_filter(result.success, args.dbname, args.filter, args.max_tables); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table"); - } - - ThriftHiveMetastore_alter_table_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table", bytes); - } - - ThriftHiveMetastore_alter_table_result result; - try { - iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table"); - } - - oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table_with_environment_context", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); - } - - ThriftHiveMetastore_alter_table_with_environment_context_result result; - try { - iface_->alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_alter_table_with_cascade(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table_with_cascade", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table_with_cascade"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table_with_cascade"); - } - - ThriftHiveMetastore_alter_table_with_cascade_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table_with_cascade", bytes); - } - - ThriftHiveMetastore_alter_table_with_cascade_result result; - try { - iface_->alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table_with_cascade"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_table_with_cascade", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table_with_cascade"); - } - - oprot->writeMessageBegin("alter_table_with_cascade", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table_with_cascade", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partition", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition"); - } - - ThriftHiveMetastore_add_partition_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition", bytes); - } - - ThriftHiveMetastore_add_partition_result result; - try { - iface_->add_partition(result.success, args.new_part); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition"); - } - - oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partition_with_environment_context", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); - } - - ThriftHiveMetastore_add_partition_with_environment_context_result result; - try { - iface_->add_partition_with_environment_context(result.success, args.new_part, args.environment_context); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partitions", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions"); - } - - ThriftHiveMetastore_add_partitions_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions", bytes); - } - - ThriftHiveMetastore_add_partitions_result result; - try { - result.success = iface_->add_partitions(args.new_parts); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions"); - } - - oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_add_partitions_pspec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partitions_pspec", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions_pspec"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions_pspec"); - } - - ThriftHiveMetastore_add_partitions_pspec_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions_pspec", bytes); - } - - ThriftHiveMetastore_add_partitions_pspec_result result; - try { - result.success = iface_->add_partitions_pspec(args.new_parts); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions_pspec"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partitions_pspec", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions_pspec"); - } - - oprot->writeMessageBegin("add_partitions_pspec", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions_pspec", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition"); - } - - ThriftHiveMetastore_append_partition_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition", bytes); - } - - ThriftHiveMetastore_append_partition_result result; - try { - iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition"); - } - - oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_add_partitions_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partitions_req", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions_req"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions_req"); - } - - ThriftHiveMetastore_add_partitions_req_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions_req", bytes); - } - - ThriftHiveMetastore_add_partitions_req_result result; - try { - iface_->add_partitions_req(result.success, args.request); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions_req"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions_req"); - } - - oprot->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions_req", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_append_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_with_environment_context", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); - } - - ThriftHiveMetastore_append_partition_with_environment_context_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_with_environment_context", bytes); - } - - ThriftHiveMetastore_append_partition_with_environment_context_result result; - try { - iface_->append_partition_with_environment_context(result.success, args.db_name, args.tbl_name, args.part_vals, args.environment_context); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); - } - - oprot->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_with_environment_context", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); - } - - ThriftHiveMetastore_append_partition_by_name_result result; - try { - iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_append_partition_by_name_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name_with_environment_context", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); - } - - ThriftHiveMetastore_append_partition_by_name_with_environment_context_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context", bytes); - } - - ThriftHiveMetastore_append_partition_by_name_with_environment_context_result result; - try { - iface_->append_partition_by_name_with_environment_context(result.success, args.db_name, args.tbl_name, args.part_name, args.environment_context); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); - } - - oprot->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition"); - } - - ThriftHiveMetastore_drop_partition_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition", bytes); - } - - ThriftHiveMetastore_drop_partition_result result; - try { - result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition"); - } - - oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_drop_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_with_environment_context", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); - } - - ThriftHiveMetastore_drop_partition_with_environment_context_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context", bytes); - } - - ThriftHiveMetastore_drop_partition_with_environment_context_result result; - try { - result.success = iface_->drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); - } - - oprot->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); - } - - ThriftHiveMetastore_drop_partition_by_name_result result; - try { - result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_drop_partition_by_name_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name_with_environment_context", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); - } - - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context", bytes); - } - - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result result; - try { - result.success = iface_->drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); - } - - oprot->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_drop_partitions_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partitions_req", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partitions_req"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partitions_req"); - } - - ThriftHiveMetastore_drop_partitions_req_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partitions_req", bytes); - } - - ThriftHiveMetastore_drop_partitions_req_result result; - try { - iface_->drop_partitions_req(result.success, args.req); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partitions_req"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partitions_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partitions_req"); - } - - oprot->writeMessageBegin("drop_partitions_req", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partitions_req", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition"); - } - - ThriftHiveMetastore_get_partition_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition", bytes); - } - - ThriftHiveMetastore_get_partition_result result; - try { - iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition"); - } - - oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_exchange_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.exchange_partition", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.exchange_partition"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.exchange_partition"); - } - - ThriftHiveMetastore_exchange_partition_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.exchange_partition", bytes); - } - - ThriftHiveMetastore_exchange_partition_result result; - try { - iface_->exchange_partition(result.success, args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (InvalidObjectException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidInputException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.exchange_partition"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.exchange_partition"); - } - - oprot->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.exchange_partition", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_exchange_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.exchange_partitions", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.exchange_partitions"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.exchange_partitions"); - } - - ThriftHiveMetastore_exchange_partitions_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.exchange_partitions", bytes); - } - - ThriftHiveMetastore_exchange_partitions_result result; - try { - iface_->exchange_partitions(result.success, args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (InvalidObjectException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidInputException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.exchange_partitions"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("exchange_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.exchange_partitions"); - } - - oprot->writeMessageBegin("exchange_partitions", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.exchange_partitions", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_with_auth", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); - } - - ThriftHiveMetastore_get_partition_with_auth_result result; - try { - iface_->get_partition_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_with_auth"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_by_name", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); - } - - ThriftHiveMetastore_get_partition_by_name_result result; - try { - iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_by_name"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions"); - } - - ThriftHiveMetastore_get_partitions_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions", bytes); - } - - ThriftHiveMetastore_get_partitions_result result; - try { - iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions"); - } - - oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_with_auth", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); - } - - ThriftHiveMetastore_get_partitions_with_auth_result result; - try { - iface_->get_partitions_with_auth(result.success, args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_partitions_pspec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_pspec", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_pspec"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_pspec"); - } - - ThriftHiveMetastore_get_partitions_pspec_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_pspec", bytes); - } - - ThriftHiveMetastore_get_partitions_pspec_result result; - try { - iface_->get_partitions_pspec(result.success, args.db_name, args.tbl_name, args.max_parts); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_pspec"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_pspec", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_pspec"); - } - - oprot->writeMessageBegin("get_partitions_pspec", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_pspec", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_names", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names"); - } - - ThriftHiveMetastore_get_partition_names_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names", bytes); - } - - ThriftHiveMetastore_get_partition_names_result result; - try { - iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names"); - } - - oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps"); - } - - ThriftHiveMetastore_get_partitions_ps_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); - } - - ThriftHiveMetastore_get_partitions_ps_result result; - try { - iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps"); - } - - oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps_with_auth", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); - } - - ThriftHiveMetastore_get_partitions_ps_with_auth_result result; - try { - iface_->get_partitions_ps_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_names_ps", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); - } - - ThriftHiveMetastore_get_partition_names_ps_result result; - try { - iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names_ps"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_filter", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); - } - - ThriftHiveMetastore_get_partitions_by_filter_result result; - try { - iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_part_specs_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_part_specs_by_filter", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_part_specs_by_filter"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_part_specs_by_filter"); - } - - ThriftHiveMetastore_get_part_specs_by_filter_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_part_specs_by_filter", bytes); - } - - ThriftHiveMetastore_get_part_specs_by_filter_result result; - try { - iface_->get_part_specs_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_part_specs_by_filter"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_part_specs_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_part_specs_by_filter"); - } - - oprot->writeMessageBegin("get_part_specs_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_part_specs_by_filter", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_partitions_by_expr(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_expr", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_expr"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_expr"); - } - - ThriftHiveMetastore_get_partitions_by_expr_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_expr", bytes); - } - - ThriftHiveMetastore_get_partitions_by_expr_result result; - try { - iface_->get_partitions_by_expr(result.success, args.req); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_expr"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_expr"); - } - - oprot->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_expr", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_num_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_num_partitions_by_filter", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_num_partitions_by_filter"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_num_partitions_by_filter"); - } - - ThriftHiveMetastore_get_num_partitions_by_filter_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_num_partitions_by_filter", bytes); - } - - ThriftHiveMetastore_get_num_partitions_by_filter_result result; - try { - result.success = iface_->get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_num_partitions_by_filter"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_num_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_num_partitions_by_filter"); - } - - oprot->writeMessageBegin("get_num_partitions_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_num_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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_names", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); - } - - ThriftHiveMetastore_get_partitions_by_names_result result; - try { - iface_->get_partitions_by_names(result.success, args.db_name, args.tbl_name, args.names); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_names"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partition", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition"); - } - - ThriftHiveMetastore_alter_partition_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition", bytes); - } - - ThriftHiveMetastore_alter_partition_result result; - try { - iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition"); - } - - oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partitions", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partitions"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partitions"); - } - - ThriftHiveMetastore_alter_partitions_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partitions", bytes); - } - - ThriftHiveMetastore_alter_partitions_result result; - try { - iface_->alter_partitions(args.db_name, args.tbl_name, args.new_parts); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partitions"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partitions"); - } - - oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partitions", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_alter_partitions_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partitions_with_environment_context", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partitions_with_environment_context"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partitions_with_environment_context"); - } - - ThriftHiveMetastore_alter_partitions_with_environment_context_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partitions_with_environment_context", bytes); - } - - ThriftHiveMetastore_alter_partitions_with_environment_context_result result; - try { - iface_->alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partitions_with_environment_context"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partitions_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partitions_with_environment_context"); - } - - oprot->writeMessageBegin("alter_partitions_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partitions_with_environment_context", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partition_with_environment_context", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); - } - - ThriftHiveMetastore_alter_partition_with_environment_context_result result; - try { - iface_->alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.rename_partition", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.rename_partition"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.rename_partition"); - } - - ThriftHiveMetastore_rename_partition_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.rename_partition", bytes); - } - - ThriftHiveMetastore_rename_partition_result result; - try { - iface_->rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.rename_partition"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.rename_partition"); - } - - oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.rename_partition", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_partition_name_has_valid_characters(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_has_valid_characters", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); - } - - ThriftHiveMetastore_partition_name_has_valid_characters_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters", bytes); - } - - ThriftHiveMetastore_partition_name_has_valid_characters_result result; - try { - result.success = iface_->partition_name_has_valid_characters(args.part_vals, args.throw_exception); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); - } - - oprot->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_config_value", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_config_value"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_config_value"); - } - - ThriftHiveMetastore_get_config_value_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_config_value", bytes); - } - - ThriftHiveMetastore_get_config_value_result result; - try { - iface_->get_config_value(result.success, args.name, args.defaultValue); - result.__isset.success = true; - } catch (ConfigValSecurityException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_config_value"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_config_value"); - } - - oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_vals", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); - } - - ThriftHiveMetastore_partition_name_to_vals_result result; - try { - iface_->partition_name_to_vals(result.success, args.part_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_vals"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_spec", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); - } - - ThriftHiveMetastore_partition_name_to_spec_result result; - try { - iface_->partition_name_to_spec(result.success, args.part_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_spec"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.markPartitionForEvent", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.markPartitionForEvent"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.markPartitionForEvent"); - } - - ThriftHiveMetastore_markPartitionForEvent_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); - } - - ThriftHiveMetastore_markPartitionForEvent_result result; - try { - iface_->markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (UnknownTableException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (UnknownPartitionException &o5) { - result.o5 = o5; - result.__isset.o5 = true; - } catch (InvalidPartitionException &o6) { - result.o6 = o6; - result.__isset.o6 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.markPartitionForEvent"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent"); - } - - oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.isPartitionMarkedForEvent", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); - } - - ThriftHiveMetastore_isPartitionMarkedForEvent_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); - } - - ThriftHiveMetastore_isPartitionMarkedForEvent_result result; - try { - result.success = iface_->isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (UnknownTableException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (UnknownPartitionException &o5) { - result.o5 = o5; - result.__isset.o5 = true; - } catch (InvalidPartitionException &o6) { - result.o6 = o6; - result.__isset.o6 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); - } - - oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_index", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_index"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_index"); - } - - ThriftHiveMetastore_add_index_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_index", bytes); - } - - ThriftHiveMetastore_add_index_result result; - try { - iface_->add_index(result.success, args.new_index, args.index_table); - result.__isset.success = true; - } catch (InvalidObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_index"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_index"); - } - - oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_index", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_index"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_index"); - } - - ThriftHiveMetastore_alter_index_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_index", bytes); - } - - ThriftHiveMetastore_alter_index_result result; - try { - iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_index"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_index"); - } - - oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_index_by_name", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); - } - - ThriftHiveMetastore_drop_index_by_name_result result; - try { - result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_index_by_name"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_index_by_name", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); - } - - ThriftHiveMetastore_get_index_by_name_result result; - try { - iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_by_name"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - 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); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_indexes", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_indexes"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_indexes"); - } - - ThriftHiveMetastore_get_indexes_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_indexes", bytes); - } - - ThriftHiveMetastore_get_indexes_result result; - try { - iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_indexes"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_indexes"); - } - - oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_index_names", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_names"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_names"); - } - - ThriftHiveMetastore_get_index_names_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_names", bytes); - } - - ThriftHiveMetastore_get_index_names_result result; - try { - iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); - result.__isset.success = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_names"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_names"); - } - - oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_names", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_primary_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_primary_keys", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_primary_keys"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_primary_keys"); - } - - ThriftHiveMetastore_get_primary_keys_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_primary_keys", bytes); - } - - ThriftHiveMetastore_get_primary_keys_result result; - try { - iface_->get_primary_keys(result.success, args.request); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_primary_keys"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_primary_keys", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_primary_keys"); - } - - oprot->writeMessageBegin("get_primary_keys", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_primary_keys", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_foreign_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_foreign_keys", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_foreign_keys"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_foreign_keys"); - } - - ThriftHiveMetastore_get_foreign_keys_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_foreign_keys", bytes); - } - - ThriftHiveMetastore_get_foreign_keys_result result; - try { - iface_->get_foreign_keys(result.success, args.request); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_foreign_keys"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_foreign_keys", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_foreign_keys"); - } - - oprot->writeMessageBegin("get_foreign_keys", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_foreign_keys", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_unique_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_unique_constraints", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_unique_constraints"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_unique_constraints"); - } - - ThriftHiveMetastore_get_unique_constraints_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_unique_constraints", bytes); - } - - ThriftHiveMetastore_get_unique_constraints_result result; - try { - iface_->get_unique_constraints(result.success, args.request); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_unique_constraints"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_unique_constraints", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_unique_constraints"); - } - - oprot->writeMessageBegin("get_unique_constraints", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_unique_constraints", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_not_null_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_not_null_constraints", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_not_null_constraints"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_not_null_constraints"); - } - - ThriftHiveMetastore_get_not_null_constraints_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_not_null_constraints", bytes); - } - - ThriftHiveMetastore_get_not_null_constraints_result result; - try { - iface_->get_not_null_constraints(result.success, args.request); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_not_null_constraints"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_not_null_constraints", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_not_null_constraints"); - } - - oprot->writeMessageBegin("get_not_null_constraints", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_not_null_constraints", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_update_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.update_table_column_statistics", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.update_table_column_statistics"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_table_column_statistics"); - } - - ThriftHiveMetastore_update_table_column_statistics_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); - } - - ThriftHiveMetastore_update_table_column_statistics_result result; - try { - result.success = iface_->update_table_column_statistics(args.stats_obj); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidInputException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_table_column_statistics"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics"); - } - - oprot->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_update_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.update_partition_column_statistics", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.update_partition_column_statistics"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); - } - - ThriftHiveMetastore_update_partition_column_statistics_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); - } - - ThriftHiveMetastore_update_partition_column_statistics_result result; - try { - result.success = iface_->update_partition_column_statistics(args.stats_obj); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidInputException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); - } - - oprot->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_column_statistics", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_column_statistics"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_column_statistics"); - } - - ThriftHiveMetastore_get_table_column_statistics_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); - } - - ThriftHiveMetastore_get_table_column_statistics_result result; - try { - iface_->get_table_column_statistics(result.success, args.db_name, args.tbl_name, args.col_name); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (InvalidInputException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_column_statistics"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics"); - } - - oprot->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_column_statistics", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_column_statistics"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); - } - - ThriftHiveMetastore_get_partition_column_statistics_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); - } - - ThriftHiveMetastore_get_partition_column_statistics_result result; - try { - iface_->get_partition_column_statistics(result.success, args.db_name, args.tbl_name, args.part_name, args.col_name); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (InvalidInputException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); - } - - oprot->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_table_statistics_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_statistics_req", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_statistics_req"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_statistics_req"); - } - - ThriftHiveMetastore_get_table_statistics_req_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_statistics_req", bytes); - } - - ThriftHiveMetastore_get_table_statistics_req_result result; - try { - iface_->get_table_statistics_req(result.success, args.request); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_statistics_req"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table_statistics_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_statistics_req"); - } - - oprot->writeMessageBegin("get_table_statistics_req", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_statistics_req", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_partitions_statistics_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_statistics_req", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_statistics_req"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_statistics_req"); - } - - ThriftHiveMetastore_get_partitions_statistics_req_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_statistics_req", bytes); - } - - ThriftHiveMetastore_get_partitions_statistics_req_result result; - try { - iface_->get_partitions_statistics_req(result.success, args.request); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_statistics_req"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_statistics_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_statistics_req"); - } - - oprot->writeMessageBegin("get_partitions_statistics_req", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_statistics_req", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_aggr_stats_for(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_aggr_stats_for", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_aggr_stats_for"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_aggr_stats_for"); - } - - ThriftHiveMetastore_get_aggr_stats_for_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_aggr_stats_for", bytes); - } - - ThriftHiveMetastore_get_aggr_stats_for_result result; - try { - iface_->get_aggr_stats_for(result.success, args.request); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_aggr_stats_for"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_aggr_stats_for", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_aggr_stats_for"); - } - - oprot->writeMessageBegin("get_aggr_stats_for", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_aggr_stats_for", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_set_aggr_stats_for(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.set_aggr_stats_for", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.set_aggr_stats_for"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.set_aggr_stats_for"); - } - - ThriftHiveMetastore_set_aggr_stats_for_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.set_aggr_stats_for", bytes); - } - - ThriftHiveMetastore_set_aggr_stats_for_result result; - try { - result.success = iface_->set_aggr_stats_for(args.request); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidInputException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.set_aggr_stats_for"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("set_aggr_stats_for", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.set_aggr_stats_for"); - } - - oprot->writeMessageBegin("set_aggr_stats_for", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.set_aggr_stats_for", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_delete_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.delete_partition_column_statistics", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); - } - - ThriftHiveMetastore_delete_partition_column_statistics_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); - } - - ThriftHiveMetastore_delete_partition_column_statistics_result result; - try { - result.success = iface_->delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (InvalidObjectException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidInputException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); - } - - oprot->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_delete_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.delete_table_column_statistics", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_table_column_statistics"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); - } - - ThriftHiveMetastore_delete_table_column_statistics_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); - } - - ThriftHiveMetastore_delete_table_column_statistics_result result; - try { - result.success = iface_->delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (InvalidObjectException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (InvalidInputException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); - } - - oprot->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_create_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_function", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_function"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_function"); - } - - ThriftHiveMetastore_create_function_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_function", bytes); - } - - ThriftHiveMetastore_create_function_result result; - try { - iface_->create_function(args.func); - } catch (AlreadyExistsException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (NoSuchObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_function"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_function", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_function"); - } - - oprot->writeMessageBegin("create_function", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_function", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_drop_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_function", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_function"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_function"); - } - - ThriftHiveMetastore_drop_function_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_function", bytes); - } - - ThriftHiveMetastore_drop_function_result result; - try { - iface_->drop_function(args.dbName, args.funcName); - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_function"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_function", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_function"); - } - - oprot->writeMessageBegin("drop_function", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_function", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_alter_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_function", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_function"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_function"); - } - - ThriftHiveMetastore_alter_function_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_function", bytes); - } - - ThriftHiveMetastore_alter_function_result result; - try { - iface_->alter_function(args.dbName, args.funcName, args.newFunc); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_function"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_function", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_function"); - } - - oprot->writeMessageBegin("alter_function", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_function", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_functions", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_functions"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_functions"); - } - - ThriftHiveMetastore_get_functions_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_functions", bytes); - } - - ThriftHiveMetastore_get_functions_result result; - try { - iface_->get_functions(result.success, args.dbName, args.pattern); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_functions"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_functions", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_functions"); - } - - oprot->writeMessageBegin("get_functions", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_functions", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_function", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_function"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_function"); - } - - ThriftHiveMetastore_get_function_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_function", bytes); - } - - ThriftHiveMetastore_get_function_result result; - try { - iface_->get_function(result.success, args.dbName, args.funcName); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_function"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_function", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_function"); - } - - oprot->writeMessageBegin("get_function", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_function", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_all_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_functions", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_functions"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_functions"); - } - - ThriftHiveMetastore_get_all_functions_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_functions", bytes); - } - - ThriftHiveMetastore_get_all_functions_result result; - try { - iface_->get_all_functions(result.success); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_functions"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_functions", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_functions"); - } - - oprot->writeMessageBegin("get_all_functions", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_functions", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_role", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_role"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_role"); - } - - ThriftHiveMetastore_create_role_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_role", bytes); - } - - ThriftHiveMetastore_create_role_result result; - try { - result.success = iface_->create_role(args.role); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_role"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_role"); - } - - oprot->writeMessageBegin("create_role", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_role", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_role"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_role"); - } - - ThriftHiveMetastore_drop_role_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_role", bytes); - } - - ThriftHiveMetastore_drop_role_result result; - try { - result.success = iface_->drop_role(args.role_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_role"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_role"); - } - - oprot->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_role_names", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_role_names"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_role_names"); - } - - ThriftHiveMetastore_get_role_names_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_role_names", bytes); - } - - ThriftHiveMetastore_get_role_names_result result; - try { - iface_->get_role_names(result.success); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_role_names"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_role_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_role_names"); - } - - oprot->writeMessageBegin("get_role_names", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_role", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_role"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_role"); - } - - ThriftHiveMetastore_grant_role_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_role", bytes); - } - - ThriftHiveMetastore_grant_role_result result; - try { - result.success = iface_->grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_role"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_role"); - } - - oprot->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.revoke_role", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.revoke_role"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.revoke_role"); - } - - ThriftHiveMetastore_revoke_role_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.revoke_role", bytes); - } - - ThriftHiveMetastore_revoke_role_result result; - try { - result.success = iface_->revoke_role(args.role_name, args.principal_name, args.principal_type); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.revoke_role"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.revoke_role"); - } - - oprot->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.list_roles", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.list_roles"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.list_roles"); - } - - ThriftHiveMetastore_list_roles_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.list_roles", bytes); - } - - ThriftHiveMetastore_list_roles_result result; - try { - iface_->list_roles(result.success, args.principal_name, args.principal_type); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.list_roles"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.list_roles"); - } - - oprot->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.list_roles", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_grant_revoke_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_revoke_role", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_revoke_role"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_revoke_role"); - } - - ThriftHiveMetastore_grant_revoke_role_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_revoke_role", bytes); - } - - ThriftHiveMetastore_grant_revoke_role_result result; - try { - iface_->grant_revoke_role(result.success, args.request); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_revoke_role"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("grant_revoke_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_revoke_role"); - } - - oprot->writeMessageBegin("grant_revoke_role", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_revoke_role", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_principals_in_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_principals_in_role", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_principals_in_role"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_principals_in_role"); - } - - ThriftHiveMetastore_get_principals_in_role_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_principals_in_role", bytes); - } - - ThriftHiveMetastore_get_principals_in_role_result result; - try { - iface_->get_principals_in_role(result.success, args.request); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_principals_in_role"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_principals_in_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_principals_in_role"); - } - - oprot->writeMessageBegin("get_principals_in_role", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_principals_in_role", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_role_grants_for_principal(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_role_grants_for_principal", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_role_grants_for_principal"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_role_grants_for_principal"); - } - - ThriftHiveMetastore_get_role_grants_for_principal_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_role_grants_for_principal", bytes); - } - - ThriftHiveMetastore_get_role_grants_for_principal_result result; - try { - iface_->get_role_grants_for_principal(result.success, args.request); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_role_grants_for_principal"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_role_grants_for_principal", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_role_grants_for_principal"); - } - - oprot->writeMessageBegin("get_role_grants_for_principal", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_role_grants_for_principal", 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_privilege_set", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_privilege_set"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_privilege_set"); - } - - ThriftHiveMetastore_get_privilege_set_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_privilege_set", bytes); - } - - ThriftHiveMetastore_get_privilege_set_result result; - try { - iface_->get_privilege_set(result.success, args.hiveObject, args.user_name, args.group_names); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_privilege_set"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_privilege_set"); - } - - oprot->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.list_privileges", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.list_privileges"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.list_privileges"); - } - - ThriftHiveMetastore_list_privileges_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.list_privileges", bytes); - } - - ThriftHiveMetastore_list_privileges_result result; - try { - iface_->list_privileges(result.success, args.principal_name, args.principal_type, args.hiveObject); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.list_privileges"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.list_privileges"); - } - - oprot->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_privileges", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_privileges"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_privileges"); - } - - ThriftHiveMetastore_grant_privileges_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_privileges", bytes); - } - - ThriftHiveMetastore_grant_privileges_result result; - try { - result.success = iface_->grant_privileges(args.privileges); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_privileges"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_privileges"); - } - - oprot->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.revoke_privileges", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.revoke_privileges"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.revoke_privileges"); - } - - ThriftHiveMetastore_revoke_privileges_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.revoke_privileges", bytes); - } - - ThriftHiveMetastore_revoke_privileges_result result; - try { - result.success = iface_->revoke_privileges(args.privileges); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.revoke_privileges"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.revoke_privileges"); - } - - oprot->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.revoke_privileges", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_grant_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_revoke_privileges", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_revoke_privileges"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_revoke_privileges"); - } - - ThriftHiveMetastore_grant_revoke_privileges_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_revoke_privileges", bytes); - } - - ThriftHiveMetastore_grant_revoke_privileges_result result; - try { - iface_->grant_revoke_privileges(result.success, args.request); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_revoke_privileges"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("grant_revoke_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_revoke_privileges"); - } - - oprot->writeMessageBegin("grant_revoke_privileges", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.set_ugi", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.set_ugi"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.set_ugi"); - } - - ThriftHiveMetastore_set_ugi_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.set_ugi", bytes); - } - - ThriftHiveMetastore_set_ugi_result result; - try { - iface_->set_ugi(result.success, args.user_name, args.group_names); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.set_ugi"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("set_ugi", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.set_ugi"); - } - - oprot->writeMessageBegin("set_ugi", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_delegation_token", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_delegation_token"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_delegation_token"); - } - - ThriftHiveMetastore_get_delegation_token_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_delegation_token", bytes); - } - - ThriftHiveMetastore_get_delegation_token_result result; - try { - iface_->get_delegation_token(result.success, args.token_owner, args.renewer_kerberos_principal_name); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_delegation_token"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_delegation_token"); - } - - oprot->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.renew_delegation_token", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.renew_delegation_token"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.renew_delegation_token"); - } - - ThriftHiveMetastore_renew_delegation_token_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.renew_delegation_token", bytes); - } - - ThriftHiveMetastore_renew_delegation_token_result result; - try { - result.success = iface_->renew_delegation_token(args.token_str_form); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.renew_delegation_token"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.renew_delegation_token"); - } - - oprot->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - 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 (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.cancel_delegation_token", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.cancel_delegation_token"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.cancel_delegation_token"); - } - - ThriftHiveMetastore_cancel_delegation_token_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.cancel_delegation_token", bytes); - } - - ThriftHiveMetastore_cancel_delegation_token_result result; - try { - iface_->cancel_delegation_token(args.token_str_form); - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.cancel_delegation_token"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.cancel_delegation_token"); - } - - oprot->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.cancel_delegation_token", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_add_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_token", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_token"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_token"); - } - - ThriftHiveMetastore_add_token_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_token", bytes); - } - - ThriftHiveMetastore_add_token_result result; - try { - result.success = iface_->add_token(args.token_identifier, args.delegation_token); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_token"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_token", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_token"); - } - - oprot->writeMessageBegin("add_token", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_token", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_remove_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.remove_token", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.remove_token"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.remove_token"); - } - - ThriftHiveMetastore_remove_token_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.remove_token", bytes); - } - - ThriftHiveMetastore_remove_token_result result; - try { - result.success = iface_->remove_token(args.token_identifier); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.remove_token"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("remove_token", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.remove_token"); - } - - oprot->writeMessageBegin("remove_token", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.remove_token", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_token", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_token"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_token"); - } - - ThriftHiveMetastore_get_token_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_token", bytes); - } - - ThriftHiveMetastore_get_token_result result; - try { - iface_->get_token(result.success, args.token_identifier); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_token"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_token", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_token"); - } - - oprot->writeMessageBegin("get_token", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_token", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_all_token_identifiers(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_token_identifiers", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_token_identifiers"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_token_identifiers"); - } - - ThriftHiveMetastore_get_all_token_identifiers_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_token_identifiers", bytes); - } - - ThriftHiveMetastore_get_all_token_identifiers_result result; - try { - iface_->get_all_token_identifiers(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_token_identifiers"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_token_identifiers", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_token_identifiers"); - } - - oprot->writeMessageBegin("get_all_token_identifiers", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_token_identifiers", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_add_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_master_key", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_master_key"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_master_key"); - } - - ThriftHiveMetastore_add_master_key_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_master_key", bytes); - } - - ThriftHiveMetastore_add_master_key_result result; - try { - result.success = iface_->add_master_key(args.key); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_master_key"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_master_key", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_master_key"); - } - - oprot->writeMessageBegin("add_master_key", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_master_key", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_update_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.update_master_key", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.update_master_key"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_master_key"); - } - - ThriftHiveMetastore_update_master_key_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_master_key", bytes); - } - - ThriftHiveMetastore_update_master_key_result result; - try { - iface_->update_master_key(args.seq_number, args.key); - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_master_key"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("update_master_key", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_master_key"); - } - - oprot->writeMessageBegin("update_master_key", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_master_key", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_remove_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.remove_master_key", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.remove_master_key"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.remove_master_key"); - } - - ThriftHiveMetastore_remove_master_key_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.remove_master_key", bytes); - } - - ThriftHiveMetastore_remove_master_key_result result; - try { - result.success = iface_->remove_master_key(args.key_seq); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.remove_master_key"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("remove_master_key", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.remove_master_key"); - } - - oprot->writeMessageBegin("remove_master_key", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.remove_master_key", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_master_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_master_keys", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_master_keys"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_master_keys"); - } - - ThriftHiveMetastore_get_master_keys_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_master_keys", bytes); - } - - ThriftHiveMetastore_get_master_keys_result result; - try { - iface_->get_master_keys(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_master_keys"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_master_keys", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_master_keys"); - } - - oprot->writeMessageBegin("get_master_keys", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_master_keys", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_open_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_open_txns", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_open_txns"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_open_txns"); - } - - ThriftHiveMetastore_get_open_txns_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_open_txns", bytes); - } - - ThriftHiveMetastore_get_open_txns_result result; - try { - iface_->get_open_txns(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_open_txns"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_open_txns", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_open_txns"); - } - - oprot->writeMessageBegin("get_open_txns", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_open_txns", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_open_txns_info(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_open_txns_info", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_open_txns_info"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_open_txns_info"); - } - - ThriftHiveMetastore_get_open_txns_info_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_open_txns_info", bytes); - } - - ThriftHiveMetastore_get_open_txns_info_result result; - try { - iface_->get_open_txns_info(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_open_txns_info"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_open_txns_info", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_open_txns_info"); - } - - oprot->writeMessageBegin("get_open_txns_info", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_open_txns_info", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_open_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.open_txns", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.open_txns"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.open_txns"); - } - - ThriftHiveMetastore_open_txns_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.open_txns", bytes); - } - - ThriftHiveMetastore_open_txns_result result; - try { - iface_->open_txns(result.success, args.rqst); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.open_txns"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("open_txns", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.open_txns"); - } - - oprot->writeMessageBegin("open_txns", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.open_txns", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_abort_txn(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.abort_txn", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.abort_txn"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.abort_txn"); - } - - ThriftHiveMetastore_abort_txn_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.abort_txn", bytes); - } - - ThriftHiveMetastore_abort_txn_result result; - try { - iface_->abort_txn(args.rqst); - } catch (NoSuchTxnException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.abort_txn"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("abort_txn", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.abort_txn"); - } - - oprot->writeMessageBegin("abort_txn", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.abort_txn", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_abort_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.abort_txns", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.abort_txns"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.abort_txns"); - } - - ThriftHiveMetastore_abort_txns_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.abort_txns", bytes); - } - - ThriftHiveMetastore_abort_txns_result result; - try { - iface_->abort_txns(args.rqst); - } catch (NoSuchTxnException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.abort_txns"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("abort_txns", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.abort_txns"); - } - - oprot->writeMessageBegin("abort_txns", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.abort_txns", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_commit_txn(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.commit_txn", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.commit_txn"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.commit_txn"); - } - - ThriftHiveMetastore_commit_txn_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.commit_txn", bytes); - } - - ThriftHiveMetastore_commit_txn_result result; - try { - iface_->commit_txn(args.rqst); - } catch (NoSuchTxnException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (TxnAbortedException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.commit_txn"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("commit_txn", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.commit_txn"); - } - - oprot->writeMessageBegin("commit_txn", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.commit_txn", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_lock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.lock", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.lock"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.lock"); - } - - ThriftHiveMetastore_lock_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.lock", bytes); - } - - ThriftHiveMetastore_lock_result result; - try { - iface_->lock(result.success, args.rqst); - result.__isset.success = true; - } catch (NoSuchTxnException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (TxnAbortedException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.lock"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("lock", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.lock"); - } - - oprot->writeMessageBegin("lock", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.lock", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_check_lock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.check_lock", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.check_lock"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.check_lock"); - } - - ThriftHiveMetastore_check_lock_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.check_lock", bytes); - } - - ThriftHiveMetastore_check_lock_result result; - try { - iface_->check_lock(result.success, args.rqst); - result.__isset.success = true; - } catch (NoSuchTxnException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (TxnAbortedException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (NoSuchLockException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.check_lock"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("check_lock", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.check_lock"); - } - - oprot->writeMessageBegin("check_lock", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.check_lock", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_unlock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.unlock", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.unlock"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.unlock"); - } - - ThriftHiveMetastore_unlock_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.unlock", bytes); - } - - ThriftHiveMetastore_unlock_result result; - try { - iface_->unlock(args.rqst); - } catch (NoSuchLockException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (TxnOpenException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.unlock"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("unlock", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.unlock"); - } - - oprot->writeMessageBegin("unlock", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.unlock", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_show_locks(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.show_locks", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.show_locks"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.show_locks"); - } - - ThriftHiveMetastore_show_locks_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.show_locks", bytes); - } - - ThriftHiveMetastore_show_locks_result result; - try { - iface_->show_locks(result.success, args.rqst); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.show_locks"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("show_locks", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.show_locks"); - } - - oprot->writeMessageBegin("show_locks", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.show_locks", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_heartbeat(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.heartbeat", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.heartbeat"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.heartbeat"); - } - - ThriftHiveMetastore_heartbeat_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.heartbeat", bytes); - } - - ThriftHiveMetastore_heartbeat_result result; - try { - iface_->heartbeat(args.ids); - } catch (NoSuchLockException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchTxnException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (TxnAbortedException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.heartbeat"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("heartbeat", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.heartbeat"); - } - - oprot->writeMessageBegin("heartbeat", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.heartbeat", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_heartbeat_txn_range(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.heartbeat_txn_range", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.heartbeat_txn_range"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.heartbeat_txn_range"); - } - - ThriftHiveMetastore_heartbeat_txn_range_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.heartbeat_txn_range", bytes); - } - - ThriftHiveMetastore_heartbeat_txn_range_result result; - try { - iface_->heartbeat_txn_range(result.success, args.txns); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.heartbeat_txn_range"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("heartbeat_txn_range", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.heartbeat_txn_range"); - } - - oprot->writeMessageBegin("heartbeat_txn_range", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.heartbeat_txn_range", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_compact(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.compact", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.compact"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.compact"); - } - - ThriftHiveMetastore_compact_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.compact", bytes); - } - - ThriftHiveMetastore_compact_result result; - try { - iface_->compact(args.rqst); - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.compact"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("compact", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.compact"); - } - - oprot->writeMessageBegin("compact", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.compact", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_compact2(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.compact2", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.compact2"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.compact2"); - } - - ThriftHiveMetastore_compact2_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.compact2", bytes); - } - - ThriftHiveMetastore_compact2_result result; - try { - iface_->compact2(result.success, args.rqst); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.compact2"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("compact2", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.compact2"); - } - - oprot->writeMessageBegin("compact2", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.compact2", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_show_compact(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.show_compact", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.show_compact"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.show_compact"); - } - - ThriftHiveMetastore_show_compact_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.show_compact", bytes); - } - - ThriftHiveMetastore_show_compact_result result; - try { - iface_->show_compact(result.success, args.rqst); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.show_compact"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("show_compact", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.show_compact"); - } - - oprot->writeMessageBegin("show_compact", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.show_compact", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_add_dynamic_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_dynamic_partitions", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_dynamic_partitions"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_dynamic_partitions"); - } - - ThriftHiveMetastore_add_dynamic_partitions_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_dynamic_partitions", bytes); - } - - ThriftHiveMetastore_add_dynamic_partitions_result result; - try { - iface_->add_dynamic_partitions(args.rqst); - } catch (NoSuchTxnException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (TxnAbortedException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_dynamic_partitions"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_dynamic_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_dynamic_partitions"); - } - - oprot->writeMessageBegin("add_dynamic_partitions", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_dynamic_partitions", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_next_notification(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_next_notification", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_next_notification"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_next_notification"); - } - - ThriftHiveMetastore_get_next_notification_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_next_notification", bytes); - } - - ThriftHiveMetastore_get_next_notification_result result; - try { - iface_->get_next_notification(result.success, args.rqst); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_next_notification"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_next_notification", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_next_notification"); - } - - oprot->writeMessageBegin("get_next_notification", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_next_notification", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_current_notificationEventId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_current_notificationEventId", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_current_notificationEventId"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_current_notificationEventId"); - } - - ThriftHiveMetastore_get_current_notificationEventId_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_current_notificationEventId", bytes); - } - - ThriftHiveMetastore_get_current_notificationEventId_result result; - try { - iface_->get_current_notificationEventId(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_current_notificationEventId"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_current_notificationEventId", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_current_notificationEventId"); - } - - oprot->writeMessageBegin("get_current_notificationEventId", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_current_notificationEventId", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_fire_listener_event(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.fire_listener_event", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.fire_listener_event"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.fire_listener_event"); - } - - ThriftHiveMetastore_fire_listener_event_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.fire_listener_event", bytes); - } - - ThriftHiveMetastore_fire_listener_event_result result; - try { - iface_->fire_listener_event(result.success, args.rqst); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.fire_listener_event"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("fire_listener_event", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.fire_listener_event"); - } - - oprot->writeMessageBegin("fire_listener_event", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.fire_listener_event", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_flushCache(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.flushCache", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.flushCache"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.flushCache"); - } - - ThriftHiveMetastore_flushCache_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.flushCache", bytes); - } - - ThriftHiveMetastore_flushCache_result result; - try { - iface_->flushCache(); - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.flushCache"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("flushCache", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.flushCache"); - } - - oprot->writeMessageBegin("flushCache", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.flushCache", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_cm_recycle(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.cm_recycle", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.cm_recycle"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.cm_recycle"); - } - - ThriftHiveMetastore_cm_recycle_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.cm_recycle", bytes); - } - - ThriftHiveMetastore_cm_recycle_result result; - try { - iface_->cm_recycle(result.success, args.request); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.cm_recycle"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("cm_recycle", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.cm_recycle"); - } - - oprot->writeMessageBegin("cm_recycle", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.cm_recycle", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_file_metadata_by_expr(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_file_metadata_by_expr", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_file_metadata_by_expr"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_file_metadata_by_expr"); - } - - ThriftHiveMetastore_get_file_metadata_by_expr_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_file_metadata_by_expr", bytes); - } - - ThriftHiveMetastore_get_file_metadata_by_expr_result result; - try { - iface_->get_file_metadata_by_expr(result.success, args.req); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_file_metadata_by_expr"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_file_metadata_by_expr", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_file_metadata_by_expr"); - } - - oprot->writeMessageBegin("get_file_metadata_by_expr", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_file_metadata_by_expr", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_file_metadata", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_file_metadata"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_file_metadata"); - } - - ThriftHiveMetastore_get_file_metadata_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_file_metadata", bytes); - } - - ThriftHiveMetastore_get_file_metadata_result result; - try { - iface_->get_file_metadata(result.success, args.req); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_file_metadata"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_file_metadata", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_file_metadata"); - } - - oprot->writeMessageBegin("get_file_metadata", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_file_metadata", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_put_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.put_file_metadata", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.put_file_metadata"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.put_file_metadata"); - } - - ThriftHiveMetastore_put_file_metadata_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.put_file_metadata", bytes); - } - - ThriftHiveMetastore_put_file_metadata_result result; - try { - iface_->put_file_metadata(result.success, args.req); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.put_file_metadata"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("put_file_metadata", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.put_file_metadata"); - } - - oprot->writeMessageBegin("put_file_metadata", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.put_file_metadata", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_clear_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.clear_file_metadata", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.clear_file_metadata"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.clear_file_metadata"); - } - - ThriftHiveMetastore_clear_file_metadata_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.clear_file_metadata", bytes); - } - - ThriftHiveMetastore_clear_file_metadata_result result; - try { - iface_->clear_file_metadata(result.success, args.req); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.clear_file_metadata"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("clear_file_metadata", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.clear_file_metadata"); - } - - oprot->writeMessageBegin("clear_file_metadata", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.clear_file_metadata", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_cache_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.cache_file_metadata", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.cache_file_metadata"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.cache_file_metadata"); - } - - ThriftHiveMetastore_cache_file_metadata_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.cache_file_metadata", bytes); - } - - ThriftHiveMetastore_cache_file_metadata_result result; - try { - iface_->cache_file_metadata(result.success, args.req); - result.__isset.success = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.cache_file_metadata"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("cache_file_metadata", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.cache_file_metadata"); - } - - oprot->writeMessageBegin("cache_file_metadata", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.cache_file_metadata", bytes); - } -} - -void ThriftHiveMetastoreProcessor::process_get_metastore_db_uuid(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) -{ - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { - ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_metastore_db_uuid", callContext); - } - ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_metastore_db_uuid"); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_metastore_db_uuid"); - } - - ThriftHiveMetastore_get_metastore_db_uuid_args args; - args.read(iprot); - iprot->readMessageEnd(); - uint32_t bytes = iprot->getTransport()->readEnd(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_metastore_db_uuid", bytes); - } - - ThriftHiveMetastore_get_metastore_db_uuid_result result; - try { - iface_->get_metastore_db_uuid(result.success); - result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_metastore_db_uuid"); - } - - ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_metastore_db_uuid", ::apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - return; - } - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_metastore_db_uuid"); - } - - oprot->writeMessageBegin("get_metastore_db_uuid", ::apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - bytes = oprot->getTransport()->writeEnd(); - oprot->getTransport()->flush(); - - if (this->eventHandler_.get() != NULL) { - this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_metastore_db_uuid", 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; -} - -void ThriftHiveMetastoreConcurrentClient::getMetaConf(std::string& _return, const std::string& key) -{ - int32_t seqid = send_getMetaConf(key); - recv_getMetaConf(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_getMetaConf(const std::string& key) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("getMetaConf", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_getMetaConf_pargs args; - args.key = &key; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_getMetaConf(std::string& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("getMetaConf") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_getMetaConf_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getMetaConf failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::setMetaConf(const std::string& key, const std::string& value) -{ - int32_t seqid = send_setMetaConf(key, value); - recv_setMetaConf(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_setMetaConf(const std::string& key, const std::string& value) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("setMetaConf", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_setMetaConf_pargs args; - args.key = &key; - args.value = &value; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_setMetaConf(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("setMetaConf") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_setMetaConf_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::create_database(const Database& database) -{ - int32_t seqid = send_create_database(database); - recv_create_database(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_create_database(const Database& database) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_database_pargs args; - args.database = &database; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_create_database(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_database") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_create_database_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_database(Database& _return, const std::string& name) -{ - int32_t seqid = send_get_database(name); - recv_get_database(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_database(const std::string& name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_database_pargs args; - args.name = &name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_database(Database& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_database") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_database_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::drop_database(const std::string& name, const bool deleteData, const bool cascade) -{ - int32_t seqid = send_drop_database(name, deleteData, cascade); - recv_drop_database(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_database(const std::string& name, const bool deleteData, const bool cascade) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_database_pargs args; - args.name = &name; - args.deleteData = &deleteData; - args.cascade = &cascade; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_drop_database(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_database") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_drop_database_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_databases(std::vector & _return, const std::string& pattern) -{ - int32_t seqid = send_get_databases(pattern); - recv_get_databases(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_databases(const std::string& pattern) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_databases_pargs args; - args.pattern = &pattern; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_databases(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_databases") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_databases_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_all_databases(std::vector & _return) -{ - int32_t seqid = send_get_all_databases(); - recv_get_all_databases(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_all_databases() -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_all_databases_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_all_databases(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_all_databases") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_all_databases_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::alter_database(const std::string& dbname, const Database& db) -{ - int32_t seqid = send_alter_database(dbname, db); - recv_alter_database(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_alter_database(const std::string& dbname, const Database& db) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_database_pargs args; - args.dbname = &dbname; - args.db = &db; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_alter_database(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_database") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_alter_database_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_type(Type& _return, const std::string& name) -{ - int32_t seqid = send_get_type(name); - recv_get_type(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_type(const std::string& name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_type_pargs args; - args.name = &name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_type(Type& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_type") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_type_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::create_type(const Type& type) -{ - int32_t seqid = send_create_type(type); - return recv_create_type(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_create_type(const Type& type) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_type_pargs args; - args.type = &type; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_create_type(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_type") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_create_type_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::drop_type(const std::string& type) -{ - int32_t seqid = send_drop_type(type); - return recv_drop_type(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_type(const std::string& type) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_type_pargs args; - args.type = &type; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_drop_type(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_type") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_drop_type_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_type_all(std::map & _return, const std::string& name) -{ - int32_t seqid = send_get_type_all(name); - recv_get_type_all(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_type_all(const std::string& name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_type_all_pargs args; - args.name = &name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_type_all(std::map & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_type_all") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_type_all_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) -{ - int32_t seqid = send_get_fields(db_name, table_name); - recv_get_fields(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_fields(const std::string& db_name, const std::string& table_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_fields_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_fields(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_fields") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_fields_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) -{ - int32_t seqid = send_get_fields_with_environment_context(db_name, table_name, environment_context); - recv_get_fields_with_environment_context(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_fields_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_fields_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_fields_with_environment_context_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_fields_with_environment_context(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_fields_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_fields_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields_with_environment_context failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) -{ - int32_t seqid = send_get_schema(db_name, table_name); - recv_get_schema(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_schema(const std::string& db_name, const std::string& table_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_schema_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_schema(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_schema") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_schema_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) -{ - int32_t seqid = send_get_schema_with_environment_context(db_name, table_name, environment_context); - recv_get_schema_with_environment_context(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_schema_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_schema_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_schema_with_environment_context_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_schema_with_environment_context(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_schema_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_schema_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema_with_environment_context failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::create_table(const Table& tbl) -{ - int32_t seqid = send_create_table(tbl); - recv_create_table(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_create_table(const Table& tbl) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_table_pargs args; - args.tbl = &tbl; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_create_table(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_table") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_create_table_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) -{ - int32_t seqid = send_create_table_with_environment_context(tbl, environment_context); - recv_create_table_with_environment_context(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_table_with_environment_context_pargs args; - args.tbl = &tbl; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_create_table_with_environment_context(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_table_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_create_table_with_environment_context_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) -{ - int32_t seqid = send_create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints); - recv_create_table_with_constraints(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("create_table_with_constraints", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_table_with_constraints_pargs args; - args.tbl = &tbl; - args.primaryKeys = &primaryKeys; - args.foreignKeys = &foreignKeys; - args.uniqueConstraints = &uniqueConstraints; - args.notNullConstraints = ¬NullConstraints; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_create_table_with_constraints(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_table_with_constraints") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_create_table_with_constraints_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::drop_constraint(const DropConstraintRequest& req) -{ - int32_t seqid = send_drop_constraint(req); - recv_drop_constraint(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_constraint(const DropConstraintRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_constraint", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_constraint_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_drop_constraint(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_constraint") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_drop_constraint_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::add_primary_key(const AddPrimaryKeyRequest& req) -{ - int32_t seqid = send_add_primary_key(req); - recv_add_primary_key(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_primary_key(const AddPrimaryKeyRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_primary_key", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_primary_key_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_add_primary_key(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_primary_key") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_add_primary_key_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::add_foreign_key(const AddForeignKeyRequest& req) -{ - int32_t seqid = send_add_foreign_key(req); - recv_add_foreign_key(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_foreign_key(const AddForeignKeyRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_foreign_key", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_foreign_key_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_add_foreign_key(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_foreign_key") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_add_foreign_key_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::add_unique_constraint(const AddUniqueConstraintRequest& req) -{ - int32_t seqid = send_add_unique_constraint(req); - recv_add_unique_constraint(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_unique_constraint(const AddUniqueConstraintRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_unique_constraint", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_unique_constraint_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_add_unique_constraint(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_unique_constraint") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_add_unique_constraint_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::add_not_null_constraint(const AddNotNullConstraintRequest& req) -{ - int32_t seqid = send_add_not_null_constraint(req); - recv_add_not_null_constraint(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_not_null_constraint(const AddNotNullConstraintRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_not_null_constraint", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_not_null_constraint_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_add_not_null_constraint(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_not_null_constraint") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_add_not_null_constraint_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) -{ - int32_t seqid = send_drop_table(dbname, name, deleteData); - recv_drop_table(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_table_pargs args; - args.dbname = &dbname; - args.name = &name; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_drop_table(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_table") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_drop_table_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) -{ - int32_t seqid = send_drop_table_with_environment_context(dbname, name, deleteData, environment_context); - recv_drop_table_with_environment_context(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_table_with_environment_context_pargs args; - args.dbname = &dbname; - args.name = &name; - args.deleteData = &deleteData; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_drop_table_with_environment_context(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_table_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_drop_table_with_environment_context_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) -{ - int32_t seqid = send_truncate_table(dbName, tableName, partNames); - recv_truncate_table(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("truncate_table", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_truncate_table_pargs args; - args.dbName = &dbName; - args.tableName = &tableName; - args.partNames = &partNames; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_truncate_table(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("truncate_table") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_truncate_table_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) -{ - int32_t seqid = send_get_tables(db_name, pattern); - recv_get_tables(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_tables(const std::string& db_name, const std::string& pattern) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_tables_pargs args; - args.db_name = &db_name; - args.pattern = &pattern; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_tables(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_tables") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_tables_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType) -{ - int32_t seqid = send_get_tables_by_type(db_name, pattern, tableType); - recv_get_tables_by_type(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_tables_by_type(const std::string& db_name, const std::string& pattern, const std::string& tableType) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_tables_by_type", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_tables_by_type_pargs args; - args.db_name = &db_name; - args.pattern = &pattern; - args.tableType = &tableType; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_tables_by_type(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_tables_by_type") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_tables_by_type_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables_by_type failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) -{ - int32_t seqid = send_get_table_meta(db_patterns, tbl_patterns, tbl_types); - recv_get_table_meta(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_meta(const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_table_meta", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_meta_pargs args; - args.db_patterns = &db_patterns; - args.tbl_patterns = &tbl_patterns; - args.tbl_types = &tbl_types; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_table_meta(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_meta") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_table_meta_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_meta failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_all_tables(std::vector & _return, const std::string& db_name) -{ - int32_t seqid = send_get_all_tables(db_name); - recv_get_all_tables(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_all_tables(const std::string& db_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_all_tables_pargs args; - args.db_name = &db_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_all_tables(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_all_tables") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_all_tables_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) -{ - int32_t seqid = send_get_table(dbname, tbl_name); - recv_get_table(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_table(const std::string& dbname, const std::string& tbl_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_table(Table& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_table_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names) -{ - int32_t seqid = send_get_table_objects_by_name(dbname, tbl_names); - recv_get_table_objects_by_name(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_objects_by_name_pargs args; - args.dbname = &dbname; - args.tbl_names = &tbl_names; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_table_objects_by_name(std::vector
& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_objects_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_table_objects_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_table_req(GetTableResult& _return, const GetTableRequest& req) -{ - int32_t seqid = send_get_table_req(req); - recv_get_table_req(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_req(const GetTableRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_table_req", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_req_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_table_req(GetTableResult& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_req") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_table_req_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_req failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req) -{ - int32_t seqid = send_get_table_objects_by_name_req(req); - recv_get_table_objects_by_name_req(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_objects_by_name_req(const GetTablesRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_table_objects_by_name_req", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_objects_by_name_req_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_table_objects_by_name_req(GetTablesResult& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_objects_by_name_req") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_table_objects_by_name_req_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_objects_by_name_req failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) -{ - int32_t seqid = send_get_table_names_by_filter(dbname, filter, max_tables); - recv_get_table_names_by_filter(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_names_by_filter_pargs args; - args.dbname = &dbname; - args.filter = &filter; - args.max_tables = &max_tables; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_table_names_by_filter(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_names_by_filter") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_table_names_by_filter_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) -{ - int32_t seqid = send_alter_table(dbname, tbl_name, new_tbl); - recv_alter_table(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_table_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_alter_table(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_table") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_alter_table_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) -{ - int32_t seqid = send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); - recv_alter_table_with_environment_context(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_table_with_environment_context_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_alter_table_with_environment_context(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_table_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_alter_table_with_environment_context_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) -{ - int32_t seqid = send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade); - recv_alter_table_with_cascade(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("alter_table_with_cascade", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_table_with_cascade_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; - args.cascade = &cascade; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_alter_table_with_cascade(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_table_with_cascade") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_alter_table_with_cascade_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::add_partition(Partition& _return, const Partition& new_part) -{ - int32_t seqid = send_add_partition(new_part); - recv_add_partition(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_partition(const Partition& new_part) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_partition_pargs args; - args.new_part = &new_part; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_add_partition(Partition& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_add_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) -{ - int32_t seqid = send_add_partition_with_environment_context(new_part, environment_context); - recv_add_partition_with_environment_context(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_partition_with_environment_context_pargs args; - args.new_part = &new_part; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_add_partition_with_environment_context(Partition& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_partition_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_add_partition_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition_with_environment_context failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -int32_t ThriftHiveMetastoreConcurrentClient::add_partitions(const std::vector & new_parts) -{ - int32_t seqid = send_add_partitions(new_parts); - return recv_add_partitions(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_partitions(const std::vector & new_parts) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_partitions_pargs args; - args.new_parts = &new_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -int32_t ThriftHiveMetastoreConcurrentClient::recv_add_partitions(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_partitions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - int32_t _return; - ThriftHiveMetastore_add_partitions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -int32_t ThriftHiveMetastoreConcurrentClient::add_partitions_pspec(const std::vector & new_parts) -{ - int32_t seqid = send_add_partitions_pspec(new_parts); - return recv_add_partitions_pspec(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_partitions_pspec(const std::vector & new_parts) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_partitions_pspec", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_partitions_pspec_pargs args; - args.new_parts = &new_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -int32_t ThriftHiveMetastoreConcurrentClient::recv_add_partitions_pspec(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_partitions_pspec") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - int32_t _return; - ThriftHiveMetastore_add_partitions_pspec_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions_pspec failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) -{ - int32_t seqid = send_append_partition(db_name, tbl_name, part_vals); - recv_append_partition(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_append_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_append_partition(Partition& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("append_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_append_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request) -{ - int32_t seqid = send_add_partitions_req(request); - recv_add_partitions_req(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_partitions_req(const AddPartitionsRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_partitions_req_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_add_partitions_req(AddPartitionsResult& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_partitions_req") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_add_partitions_req_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions_req failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) -{ - int32_t seqid = send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context); - recv_append_partition_with_environment_context(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_append_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_append_partition_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_append_partition_with_environment_context(Partition& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("append_partition_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_append_partition_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_with_environment_context failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) -{ - int32_t seqid = send_append_partition_by_name(db_name, tbl_name, part_name); - recv_append_partition_by_name(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_append_partition_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_append_partition_by_name(Partition& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("append_partition_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_append_partition_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) -{ - int32_t seqid = send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context); - recv_append_partition_by_name_with_environment_context(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_append_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_append_partition_by_name_with_environment_context(Partition& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("append_partition_by_name_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name_with_environment_context failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) -{ - int32_t seqid = send_drop_partition(db_name, tbl_name, part_vals, deleteData); - return recv_drop_partition(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_drop_partition(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_drop_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) -{ - int32_t seqid = send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); - return recv_drop_partition_with_environment_context(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_partition_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.deleteData = &deleteData; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_drop_partition_with_environment_context(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_partition_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_drop_partition_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_with_environment_context failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) -{ - int32_t seqid = send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - return recv_drop_partition_by_name(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_partition_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_drop_partition_by_name(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_partition_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_drop_partition_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) -{ - int32_t seqid = send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); - return recv_drop_partition_by_name_with_environment_context(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.deleteData = &deleteData; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_drop_partition_by_name_with_environment_context(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_partition_by_name_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name_with_environment_context failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req) -{ - int32_t seqid = send_drop_partitions_req(req); - recv_drop_partitions_req(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_partitions_req(const DropPartitionsRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_partitions_req", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_partitions_req_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_drop_partitions_req(DropPartitionsResult& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_partitions_req") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_drop_partitions_req_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partitions_req failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) -{ - int32_t seqid = send_get_partition(db_name, tbl_name, part_vals); - recv_get_partition(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partition(Partition& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) -{ - int32_t seqid = send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); - recv_exchange_partition(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_exchange_partition(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_exchange_partition_pargs args; - args.partitionSpecs = &partitionSpecs; - args.source_db = &source_db; - args.source_table_name = &source_table_name; - args.dest_db = &dest_db; - args.dest_table_name = &dest_table_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_exchange_partition(Partition& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("exchange_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_exchange_partition_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "exchange_partition failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) -{ - int32_t seqid = send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); - recv_exchange_partitions(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_exchange_partitions(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("exchange_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_exchange_partitions_pargs args; - args.partitionSpecs = &partitionSpecs; - args.source_db = &source_db; - args.source_table_name = &source_table_name; - args.dest_db = &dest_db; - args.dest_table_name = &dest_table_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_exchange_partitions(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("exchange_partitions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_exchange_partitions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "exchange_partitions failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::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) -{ - int32_t seqid = send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); - recv_get_partition_with_auth(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partition_with_auth(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) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partition_with_auth_pargs 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; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partition_with_auth(Partition& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partition_with_auth") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partition_with_auth_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_with_auth failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) -{ - int32_t seqid = send_get_partition_by_name(db_name, tbl_name, part_name); - recv_get_partition_by_name(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partition_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partition_by_name(Partition& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partition_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partition_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) -{ - int32_t seqid = send_get_partitions(db_name, tbl_name, max_parts); - recv_get_partitions(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partitions(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partitions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::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) -{ - int32_t seqid = send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); - recv_get_partitions_with_auth(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_with_auth(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) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_with_auth_pargs 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; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_with_auth(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_with_auth") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partitions_with_auth_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) -{ - int32_t seqid = send_get_partitions_pspec(db_name, tbl_name, max_parts); - recv_get_partitions_pspec(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_pspec(const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partitions_pspec", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_pspec_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_pspec(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_pspec") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partitions_pspec_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_pspec failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) -{ - int32_t seqid = send_get_partition_names(db_name, tbl_name, max_parts); - recv_get_partition_names(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partition_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partition_names(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partition_names") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partition_names_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::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) -{ - int32_t seqid = send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partitions_ps(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_ps_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_ps(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_ps") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partitions_ps_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::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) -{ - int32_t seqid = send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); - recv_get_partitions_ps_with_auth(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_ps_with_auth(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) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_ps_with_auth_pargs 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; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_ps_with_auth(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_ps_with_auth") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partitions_ps_with_auth_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::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) -{ - int32_t seqid = send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partition_names_ps(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partition_names_ps_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partition_names_ps(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partition_names_ps") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partition_names_ps_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::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) -{ - int32_t seqid = send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); - recv_get_partitions_by_filter(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_by_filter_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.filter = &filter; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_by_filter(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_by_filter") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partitions_by_filter_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) -{ - int32_t seqid = send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts); - recv_get_part_specs_by_filter(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_part_specs_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_part_specs_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_part_specs_by_filter_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.filter = &filter; - args.max_parts = &max_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_part_specs_by_filter(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_part_specs_by_filter") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_part_specs_by_filter_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_part_specs_by_filter failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req) -{ - int32_t seqid = send_get_partitions_by_expr(req); - recv_get_partitions_by_expr(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_by_expr(const PartitionsByExprRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_by_expr_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_by_expr(PartitionsByExprResult& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_by_expr") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partitions_by_expr_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_expr failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -int32_t ThriftHiveMetastoreConcurrentClient::get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) -{ - int32_t seqid = send_get_num_partitions_by_filter(db_name, tbl_name, filter); - return recv_get_num_partitions_by_filter(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_num_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_num_partitions_by_filter_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.filter = &filter; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -int32_t ThriftHiveMetastoreConcurrentClient::recv_get_num_partitions_by_filter(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_num_partitions_by_filter") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - int32_t _return; - ThriftHiveMetastore_get_num_partitions_by_filter_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_num_partitions_by_filter failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) -{ - int32_t seqid = send_get_partitions_by_names(db_name, tbl_name, names); - recv_get_partitions_by_names(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_by_names(const std::string& db_name, const std::string& tbl_name, const std::vector & names) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_by_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.names = &names; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_by_names(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_by_names") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partitions_by_names_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_names failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) -{ - int32_t seqid = send_alter_partition(db_name, tbl_name, new_part); - recv_alter_partition(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_part = &new_part; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_alter_partition(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_alter_partition_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) -{ - int32_t seqid = send_alter_partitions(db_name, tbl_name, new_parts); - recv_alter_partitions(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_partitions_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_parts = &new_parts; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_alter_partitions(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_partitions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_alter_partitions_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) -{ - int32_t seqid = send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context); - recv_alter_partitions_with_environment_context(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("alter_partitions_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_partitions_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_parts = &new_parts; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_alter_partitions_with_environment_context(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_partitions_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_alter_partitions_with_environment_context_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) -{ - int32_t seqid = send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); - recv_alter_partition_with_environment_context(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_partition_with_environment_context_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_part = &new_part; - args.environment_context = &environment_context; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_alter_partition_with_environment_context(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_partition_with_environment_context") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_alter_partition_with_environment_context_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) -{ - int32_t seqid = send_rename_partition(db_name, tbl_name, part_vals, new_part); - recv_rename_partition(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_rename_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.new_part = &new_part; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_rename_partition(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("rename_partition") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_rename_partition_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) -{ - int32_t seqid = send_partition_name_has_valid_characters(part_vals, throw_exception); - return recv_partition_name_has_valid_characters(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_partition_name_has_valid_characters_pargs args; - args.part_vals = &part_vals; - args.throw_exception = &throw_exception; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_partition_name_has_valid_characters(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("partition_name_has_valid_characters") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_partition_name_has_valid_characters_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_has_valid_characters failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) -{ - int32_t seqid = send_get_config_value(name, defaultValue); - recv_get_config_value(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_config_value(const std::string& name, const std::string& defaultValue) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_config_value_pargs args; - args.name = &name; - args.defaultValue = &defaultValue; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_config_value(std::string& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_config_value") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_config_value_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) -{ - int32_t seqid = send_partition_name_to_vals(part_name); - recv_partition_name_to_vals(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_partition_name_to_vals(const std::string& part_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_partition_name_to_vals_pargs args; - args.part_name = &part_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_partition_name_to_vals(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("partition_name_to_vals") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_partition_name_to_vals_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::partition_name_to_spec(std::map & _return, const std::string& part_name) -{ - int32_t seqid = send_partition_name_to_spec(part_name); - recv_partition_name_to_spec(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_partition_name_to_spec(const std::string& part_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_partition_name_to_spec_pargs args; - args.part_name = &part_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_partition_name_to_spec(std::map & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("partition_name_to_spec") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_partition_name_to_spec_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) -{ - int32_t seqid = send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); - recv_markPartitionForEvent(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_markPartitionForEvent_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.eventType = &eventType; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_markPartitionForEvent(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("markPartitionForEvent") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_markPartitionForEvent_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - if (result.__isset.o5) { - sentry.commit(); - throw result.o5; - } - if (result.__isset.o6) { - sentry.commit(); - throw result.o6; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) -{ - int32_t seqid = send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); - return recv_isPartitionMarkedForEvent(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_isPartitionMarkedForEvent_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.eventType = &eventType; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_isPartitionMarkedForEvent(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("isPartitionMarkedForEvent") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_isPartitionMarkedForEvent_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - if (result.__isset.o5) { - sentry.commit(); - throw result.o5; - } - if (result.__isset.o6) { - sentry.commit(); - throw result.o6; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::add_index(Index& _return, const Index& new_index, const Table& index_table) -{ - int32_t seqid = send_add_index(new_index, index_table); - recv_add_index(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_index(const Index& new_index, const Table& index_table) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_index_pargs args; - args.new_index = &new_index; - args.index_table = &index_table; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_add_index(Index& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_index") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_add_index_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) -{ - int32_t seqid = send_alter_index(dbname, base_tbl_name, idx_name, new_idx); - recv_alter_index(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_index_pargs args; - args.dbname = &dbname; - args.base_tbl_name = &base_tbl_name; - args.idx_name = &idx_name; - args.new_idx = &new_idx; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_alter_index(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_index") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_alter_index_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) -{ - int32_t seqid = send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); - return recv_drop_index_by_name(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_index_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.index_name = &index_name; - args.deleteData = &deleteData; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_drop_index_by_name(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_index_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_drop_index_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) -{ - int32_t seqid = send_get_index_by_name(db_name, tbl_name, index_name); - recv_get_index_by_name(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_index_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.index_name = &index_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_index_by_name(Index& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_index_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_index_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_by_name failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) -{ - int32_t seqid = send_get_indexes(db_name, tbl_name, max_indexes); - recv_get_indexes(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_indexes_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_indexes(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_indexes") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_indexes_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) -{ - int32_t seqid = send_get_index_names(db_name, tbl_name, max_indexes); - recv_get_index_names(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_index_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_index_names(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_index_names") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_index_names_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request) -{ - int32_t seqid = send_get_primary_keys(request); - recv_get_primary_keys(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_primary_keys(const PrimaryKeysRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_primary_keys", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_primary_keys_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_primary_keys(PrimaryKeysResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_primary_keys") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_primary_keys_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_primary_keys failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request) -{ - int32_t seqid = send_get_foreign_keys(request); - recv_get_foreign_keys(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_foreign_keys(const ForeignKeysRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_foreign_keys", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_foreign_keys_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_foreign_keys(ForeignKeysResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_foreign_keys") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_foreign_keys_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_foreign_keys failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request) -{ - int32_t seqid = send_get_unique_constraints(request); - recv_get_unique_constraints(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_unique_constraints(const UniqueConstraintsRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_unique_constraints", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_unique_constraints_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_unique_constraints(UniqueConstraintsResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_unique_constraints") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_unique_constraints_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_unique_constraints failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request) -{ - int32_t seqid = send_get_not_null_constraints(request); - recv_get_not_null_constraints(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_not_null_constraints(const NotNullConstraintsRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_not_null_constraints", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_not_null_constraints_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_not_null_constraints(NotNullConstraintsResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_not_null_constraints") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_not_null_constraints_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_not_null_constraints failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::update_table_column_statistics(const ColumnStatistics& stats_obj) -{ - int32_t seqid = send_update_table_column_statistics(stats_obj); - return recv_update_table_column_statistics(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_update_table_column_statistics(const ColumnStatistics& stats_obj) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_update_table_column_statistics_pargs args; - args.stats_obj = &stats_obj; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_update_table_column_statistics(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("update_table_column_statistics") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_update_table_column_statistics_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_table_column_statistics failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::update_partition_column_statistics(const ColumnStatistics& stats_obj) -{ - int32_t seqid = send_update_partition_column_statistics(stats_obj); - return recv_update_partition_column_statistics(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_update_partition_column_statistics(const ColumnStatistics& stats_obj) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_update_partition_column_statistics_pargs args; - args.stats_obj = &stats_obj; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_update_partition_column_statistics(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("update_partition_column_statistics") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_update_partition_column_statistics_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_partition_column_statistics failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) -{ - int32_t seqid = send_get_table_column_statistics(db_name, tbl_name, col_name); - recv_get_table_column_statistics(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_column_statistics_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.col_name = &col_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_table_column_statistics(ColumnStatistics& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_column_statistics") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_table_column_statistics_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_column_statistics failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) -{ - int32_t seqid = send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name); - recv_get_partition_column_statistics(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partition_column_statistics_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.col_name = &col_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partition_column_statistics(ColumnStatistics& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partition_column_statistics") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partition_column_statistics_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_column_statistics failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request) -{ - int32_t seqid = send_get_table_statistics_req(request); - recv_get_table_statistics_req(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_statistics_req(const TableStatsRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_table_statistics_req", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_table_statistics_req_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_table_statistics_req(TableStatsResult& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_table_statistics_req") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_table_statistics_req_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_statistics_req failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request) -{ - int32_t seqid = send_get_partitions_statistics_req(request); - recv_get_partitions_statistics_req(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_statistics_req(const PartitionsStatsRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_partitions_statistics_req", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_partitions_statistics_req_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_statistics_req(PartitionsStatsResult& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_partitions_statistics_req") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_partitions_statistics_req_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_statistics_req failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request) -{ - int32_t seqid = send_get_aggr_stats_for(request); - recv_get_aggr_stats_for(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_aggr_stats_for(const PartitionsStatsRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_aggr_stats_for", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_aggr_stats_for_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_aggr_stats_for(AggrStats& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_aggr_stats_for") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_aggr_stats_for_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_aggr_stats_for failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::set_aggr_stats_for(const SetPartitionsStatsRequest& request) -{ - int32_t seqid = send_set_aggr_stats_for(request); - return recv_set_aggr_stats_for(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_set_aggr_stats_for(const SetPartitionsStatsRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("set_aggr_stats_for", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_set_aggr_stats_for_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_set_aggr_stats_for(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("set_aggr_stats_for") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_set_aggr_stats_for_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "set_aggr_stats_for failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) -{ - int32_t seqid = send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); - return recv_delete_partition_column_statistics(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_delete_partition_column_statistics_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.col_name = &col_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_delete_partition_column_statistics(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("delete_partition_column_statistics") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_delete_partition_column_statistics_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_partition_column_statistics failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) -{ - int32_t seqid = send_delete_table_column_statistics(db_name, tbl_name, col_name); - return recv_delete_table_column_statistics(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_delete_table_column_statistics_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.col_name = &col_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_delete_table_column_statistics(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("delete_table_column_statistics") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_delete_table_column_statistics_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::create_function(const Function& func) -{ - int32_t seqid = send_create_function(func); - recv_create_function(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_create_function(const Function& func) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("create_function", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_function_pargs args; - args.func = &func; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_create_function(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_function") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_create_function_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - if (result.__isset.o4) { - sentry.commit(); - throw result.o4; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::drop_function(const std::string& dbName, const std::string& funcName) -{ - int32_t seqid = send_drop_function(dbName, funcName); - recv_drop_function(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_function(const std::string& dbName, const std::string& funcName) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_function", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_function_pargs args; - args.dbName = &dbName; - args.funcName = &funcName; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_drop_function(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_function") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_drop_function_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) -{ - int32_t seqid = send_alter_function(dbName, funcName, newFunc); - recv_alter_function(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("alter_function", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_alter_function_pargs args; - args.dbName = &dbName; - args.funcName = &funcName; - args.newFunc = &newFunc; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_alter_function(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("alter_function") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_alter_function_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) -{ - int32_t seqid = send_get_functions(dbName, pattern); - recv_get_functions(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_functions(const std::string& dbName, const std::string& pattern) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_functions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_functions_pargs args; - args.dbName = &dbName; - args.pattern = &pattern; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_functions(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_functions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_functions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_functions failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_function(Function& _return, const std::string& dbName, const std::string& funcName) -{ - int32_t seqid = send_get_function(dbName, funcName); - recv_get_function(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_function(const std::string& dbName, const std::string& funcName) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_function", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_function_pargs args; - args.dbName = &dbName; - args.funcName = &funcName; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_function(Function& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_function") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_function_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_function failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_all_functions(GetAllFunctionsResponse& _return) -{ - int32_t seqid = send_get_all_functions(); - recv_get_all_functions(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_all_functions() -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_all_functions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_all_functions_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_all_functions(GetAllFunctionsResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_all_functions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_all_functions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_functions failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::create_role(const Role& role) -{ - int32_t seqid = send_create_role(role); - return recv_create_role(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_create_role(const Role& role) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("create_role", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_create_role_pargs args; - args.role = &role; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_create_role(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_role") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_create_role_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_role failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::drop_role(const std::string& role_name) -{ - int32_t seqid = send_drop_role(role_name); - return recv_drop_role(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_drop_role(const std::string& role_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_drop_role_pargs args; - args.role_name = &role_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_drop_role(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("drop_role") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_drop_role_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_role failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_role_names(std::vector & _return) -{ - int32_t seqid = send_get_role_names(); - recv_get_role_names(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_role_names() -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_role_names", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_role_names_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_role_names(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_role_names") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_role_names_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_role_names failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::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) -{ - int32_t seqid = send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); - return recv_grant_role(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_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) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_grant_role_pargs 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; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_grant_role(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("grant_role") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_grant_role_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_role failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) -{ - int32_t seqid = send_revoke_role(role_name, principal_name, principal_type); - return recv_revoke_role(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_revoke_role_pargs args; - args.role_name = &role_name; - args.principal_name = &principal_name; - args.principal_type = &principal_type; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_revoke_role(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("revoke_role") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_revoke_role_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_role failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) -{ - int32_t seqid = send_list_roles(principal_name, principal_type); - recv_list_roles(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_list_roles_pargs args; - args.principal_name = &principal_name; - args.principal_type = &principal_type; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_list_roles(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("list_roles") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_list_roles_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_roles failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) -{ - int32_t seqid = send_grant_revoke_role(request); - recv_grant_revoke_role(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_grant_revoke_role(const GrantRevokeRoleRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("grant_revoke_role", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_grant_revoke_role_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_grant_revoke_role(GrantRevokeRoleResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("grant_revoke_role") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_grant_revoke_role_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_revoke_role failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) -{ - int32_t seqid = send_get_principals_in_role(request); - recv_get_principals_in_role(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_principals_in_role(const GetPrincipalsInRoleRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_principals_in_role", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_principals_in_role_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_principals_in_role(GetPrincipalsInRoleResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_principals_in_role") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_principals_in_role_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_principals_in_role failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request) -{ - int32_t seqid = send_get_role_grants_for_principal(request); - recv_get_role_grants_for_principal(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_role_grants_for_principal(const GetRoleGrantsForPrincipalRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_role_grants_for_principal", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_role_grants_for_principal_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_role_grants_for_principal") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_role_grants_for_principal_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_role_grants_for_principal failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) -{ - int32_t seqid = send_get_privilege_set(hiveObject, user_name, group_names); - recv_get_privilege_set(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_privilege_set_pargs args; - args.hiveObject = &hiveObject; - args.user_name = &user_name; - args.group_names = &group_names; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_privilege_set(PrincipalPrivilegeSet& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_privilege_set") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_privilege_set_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_privilege_set failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) -{ - int32_t seqid = send_list_privileges(principal_name, principal_type, hiveObject); - recv_list_privileges(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_list_privileges_pargs args; - args.principal_name = &principal_name; - args.principal_type = &principal_type; - args.hiveObject = &hiveObject; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_list_privileges(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("list_privileges") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_list_privileges_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_privileges failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::grant_privileges(const PrivilegeBag& privileges) -{ - int32_t seqid = send_grant_privileges(privileges); - return recv_grant_privileges(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_grant_privileges(const PrivilegeBag& privileges) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_grant_privileges_pargs args; - args.privileges = &privileges; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_grant_privileges(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("grant_privileges") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_grant_privileges_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_privileges failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::revoke_privileges(const PrivilegeBag& privileges) -{ - int32_t seqid = send_revoke_privileges(privileges); - return recv_revoke_privileges(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_revoke_privileges(const PrivilegeBag& privileges) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_revoke_privileges_pargs args; - args.privileges = &privileges; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_revoke_privileges(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("revoke_privileges") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_revoke_privileges_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_privileges failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) -{ - int32_t seqid = send_grant_revoke_privileges(request); - recv_grant_revoke_privileges(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_grant_revoke_privileges(const GrantRevokePrivilegeRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("grant_revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_grant_revoke_privileges_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("grant_revoke_privileges") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_grant_revoke_privileges_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_revoke_privileges failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) -{ - int32_t seqid = send_set_ugi(user_name, group_names); - recv_set_ugi(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_set_ugi(const std::string& user_name, const std::vector & group_names) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("set_ugi", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_set_ugi_pargs args; - args.user_name = &user_name; - args.group_names = &group_names; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_set_ugi(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("set_ugi") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_set_ugi_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "set_ugi failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) -{ - int32_t seqid = send_get_delegation_token(token_owner, renewer_kerberos_principal_name); - recv_get_delegation_token(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_delegation_token(const std::string& token_owner, const std::string& renewer_kerberos_principal_name) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_delegation_token_pargs args; - args.token_owner = &token_owner; - args.renewer_kerberos_principal_name = &renewer_kerberos_principal_name; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_delegation_token(std::string& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_delegation_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_delegation_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_delegation_token failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -int64_t ThriftHiveMetastoreConcurrentClient::renew_delegation_token(const std::string& token_str_form) -{ - int32_t seqid = send_renew_delegation_token(token_str_form); - return recv_renew_delegation_token(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_renew_delegation_token(const std::string& token_str_form) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_renew_delegation_token_pargs args; - args.token_str_form = &token_str_form; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -int64_t ThriftHiveMetastoreConcurrentClient::recv_renew_delegation_token(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("renew_delegation_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - int64_t _return; - ThriftHiveMetastore_renew_delegation_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "renew_delegation_token failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::cancel_delegation_token(const std::string& token_str_form) -{ - int32_t seqid = send_cancel_delegation_token(token_str_form); - recv_cancel_delegation_token(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_cancel_delegation_token(const std::string& token_str_form) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_cancel_delegation_token_pargs args; - args.token_str_form = &token_str_form; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_cancel_delegation_token(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("cancel_delegation_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_cancel_delegation_token_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::add_token(const std::string& token_identifier, const std::string& delegation_token) -{ - int32_t seqid = send_add_token(token_identifier, delegation_token); - return recv_add_token(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_token(const std::string& token_identifier, const std::string& delegation_token) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_token", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_token_pargs args; - args.token_identifier = &token_identifier; - args.delegation_token = &delegation_token; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_add_token(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_add_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_token failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::remove_token(const std::string& token_identifier) -{ - int32_t seqid = send_remove_token(token_identifier); - return recv_remove_token(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_remove_token(const std::string& token_identifier) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("remove_token", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_remove_token_pargs args; - args.token_identifier = &token_identifier; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_remove_token(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("remove_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_remove_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "remove_token failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_token(std::string& _return, const std::string& token_identifier) -{ - int32_t seqid = send_get_token(token_identifier); - recv_get_token(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_token(const std::string& token_identifier) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_token", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_token_pargs args; - args.token_identifier = &token_identifier; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_token(std::string& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_token failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_all_token_identifiers(std::vector & _return) -{ - int32_t seqid = send_get_all_token_identifiers(); - recv_get_all_token_identifiers(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_all_token_identifiers() -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_all_token_identifiers", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_all_token_identifiers_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_all_token_identifiers(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_all_token_identifiers") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_all_token_identifiers_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_token_identifiers failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -int32_t ThriftHiveMetastoreConcurrentClient::add_master_key(const std::string& key) -{ - int32_t seqid = send_add_master_key(key); - return recv_add_master_key(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_master_key(const std::string& key) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_master_key", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_master_key_pargs args; - args.key = &key; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -int32_t ThriftHiveMetastoreConcurrentClient::recv_add_master_key(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_master_key") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - int32_t _return; - ThriftHiveMetastore_add_master_key_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_master_key failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::update_master_key(const int32_t seq_number, const std::string& key) -{ - int32_t seqid = send_update_master_key(seq_number, key); - recv_update_master_key(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_update_master_key(const int32_t seq_number, const std::string& key) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("update_master_key", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_update_master_key_pargs args; - args.seq_number = &seq_number; - args.key = &key; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_update_master_key(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("update_master_key") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_update_master_key_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -bool ThriftHiveMetastoreConcurrentClient::remove_master_key(const int32_t key_seq) -{ - int32_t seqid = send_remove_master_key(key_seq); - return recv_remove_master_key(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_remove_master_key(const int32_t key_seq) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("remove_master_key", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_remove_master_key_pargs args; - args.key_seq = &key_seq; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -bool ThriftHiveMetastoreConcurrentClient::recv_remove_master_key(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("remove_master_key") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - bool _return; - ThriftHiveMetastore_remove_master_key_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - sentry.commit(); - return _return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "remove_master_key failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_master_keys(std::vector & _return) -{ - int32_t seqid = send_get_master_keys(); - recv_get_master_keys(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_master_keys() -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_master_keys", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_master_keys_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_master_keys(std::vector & _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_master_keys") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_master_keys_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_master_keys failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_open_txns(GetOpenTxnsResponse& _return) -{ - int32_t seqid = send_get_open_txns(); - recv_get_open_txns(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_open_txns() -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_open_txns", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_open_txns_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_open_txns(GetOpenTxnsResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_open_txns") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_open_txns_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_open_txns failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_open_txns_info(GetOpenTxnsInfoResponse& _return) -{ - int32_t seqid = send_get_open_txns_info(); - recv_get_open_txns_info(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_open_txns_info() -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_open_txns_info", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_open_txns_info_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_open_txns_info(GetOpenTxnsInfoResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_open_txns_info") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_open_txns_info_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_open_txns_info failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst) -{ - int32_t seqid = send_open_txns(rqst); - recv_open_txns(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_open_txns(const OpenTxnRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("open_txns", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_open_txns_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_open_txns(OpenTxnsResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("open_txns") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_open_txns_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "open_txns failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::abort_txn(const AbortTxnRequest& rqst) -{ - int32_t seqid = send_abort_txn(rqst); - recv_abort_txn(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_abort_txn(const AbortTxnRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("abort_txn", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_abort_txn_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_abort_txn(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("abort_txn") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_abort_txn_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::abort_txns(const AbortTxnsRequest& rqst) -{ - int32_t seqid = send_abort_txns(rqst); - recv_abort_txns(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_abort_txns(const AbortTxnsRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("abort_txns", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_abort_txns_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_abort_txns(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("abort_txns") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_abort_txns_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::commit_txn(const CommitTxnRequest& rqst) -{ - int32_t seqid = send_commit_txn(rqst); - recv_commit_txn(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_commit_txn(const CommitTxnRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("commit_txn", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_commit_txn_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_commit_txn(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("commit_txn") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_commit_txn_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::lock(LockResponse& _return, const LockRequest& rqst) -{ - int32_t seqid = send_lock(rqst); - recv_lock(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_lock(const LockRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("lock", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_lock_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_lock(LockResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("lock") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_lock_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "lock failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::check_lock(LockResponse& _return, const CheckLockRequest& rqst) -{ - int32_t seqid = send_check_lock(rqst); - recv_check_lock(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_check_lock(const CheckLockRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("check_lock", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_check_lock_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_check_lock(LockResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("check_lock") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_check_lock_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "check_lock failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::unlock(const UnlockRequest& rqst) -{ - int32_t seqid = send_unlock(rqst); - recv_unlock(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_unlock(const UnlockRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("unlock", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_unlock_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_unlock(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("unlock") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_unlock_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst) -{ - int32_t seqid = send_show_locks(rqst); - recv_show_locks(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_show_locks(const ShowLocksRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("show_locks", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_show_locks_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_show_locks(ShowLocksResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("show_locks") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_show_locks_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "show_locks failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::heartbeat(const HeartbeatRequest& ids) -{ - int32_t seqid = send_heartbeat(ids); - recv_heartbeat(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_heartbeat(const HeartbeatRequest& ids) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("heartbeat", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_heartbeat_pargs args; - args.ids = &ids; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_heartbeat(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("heartbeat") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_heartbeat_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - if (result.__isset.o3) { - sentry.commit(); - throw result.o3; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns) -{ - int32_t seqid = send_heartbeat_txn_range(txns); - recv_heartbeat_txn_range(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_heartbeat_txn_range(const HeartbeatTxnRangeRequest& txns) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("heartbeat_txn_range", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_heartbeat_txn_range_pargs args; - args.txns = &txns; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("heartbeat_txn_range") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_heartbeat_txn_range_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "heartbeat_txn_range failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::compact(const CompactionRequest& rqst) -{ - int32_t seqid = send_compact(rqst); - recv_compact(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_compact(const CompactionRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("compact", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_compact_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_compact(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("compact") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_compact_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::compact2(CompactionResponse& _return, const CompactionRequest& rqst) -{ - int32_t seqid = send_compact2(rqst); - recv_compact2(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_compact2(const CompactionRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("compact2", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_compact2_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_compact2(CompactionResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("compact2") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_compact2_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "compact2 failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst) -{ - int32_t seqid = send_show_compact(rqst); - recv_show_compact(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_show_compact(const ShowCompactRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("show_compact", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_show_compact_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_show_compact(ShowCompactResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("show_compact") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_show_compact_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "show_compact failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::add_dynamic_partitions(const AddDynamicPartitions& rqst) -{ - int32_t seqid = send_add_dynamic_partitions(rqst); - recv_add_dynamic_partitions(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_add_dynamic_partitions(const AddDynamicPartitions& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("add_dynamic_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_add_dynamic_partitions_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_add_dynamic_partitions(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("add_dynamic_partitions") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_add_dynamic_partitions_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - if (result.__isset.o2) { - sentry.commit(); - throw result.o2; - } - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst) -{ - int32_t seqid = send_get_next_notification(rqst); - recv_get_next_notification(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_next_notification(const NotificationEventRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_next_notification", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_next_notification_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_next_notification(NotificationEventResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_next_notification") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_next_notification_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_next_notification failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_current_notificationEventId(CurrentNotificationEventId& _return) -{ - int32_t seqid = send_get_current_notificationEventId(); - recv_get_current_notificationEventId(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_current_notificationEventId() -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_current_notificationEventId", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_current_notificationEventId_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_current_notificationEventId(CurrentNotificationEventId& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_current_notificationEventId") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_current_notificationEventId_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_current_notificationEventId failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst) -{ - int32_t seqid = send_fire_listener_event(rqst); - recv_fire_listener_event(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_fire_listener_event(const FireEventRequest& rqst) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("fire_listener_event", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_fire_listener_event_pargs args; - args.rqst = &rqst; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_fire_listener_event(FireEventResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("fire_listener_event") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_fire_listener_event_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fire_listener_event failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::flushCache() -{ - int32_t seqid = send_flushCache(); - recv_flushCache(seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_flushCache() -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("flushCache", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_flushCache_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_flushCache(const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("flushCache") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_flushCache_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - sentry.commit(); - return; - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request) -{ - int32_t seqid = send_cm_recycle(request); - recv_cm_recycle(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_cm_recycle(const CmRecycleRequest& request) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("cm_recycle", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_cm_recycle_pargs args; - args.request = &request; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_cm_recycle(CmRecycleResponse& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("cm_recycle") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_cm_recycle_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "cm_recycle failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req) -{ - int32_t seqid = send_get_file_metadata_by_expr(req); - recv_get_file_metadata_by_expr(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_file_metadata_by_expr(const GetFileMetadataByExprRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_file_metadata_by_expr", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_file_metadata_by_expr_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_file_metadata_by_expr") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_file_metadata_by_expr_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_file_metadata_by_expr failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req) -{ - int32_t seqid = send_get_file_metadata(req); - recv_get_file_metadata(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_file_metadata(const GetFileMetadataRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_file_metadata_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_file_metadata(GetFileMetadataResult& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_file_metadata") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_file_metadata_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_file_metadata failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req) -{ - int32_t seqid = send_put_file_metadata(req); - recv_put_file_metadata(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_put_file_metadata(const PutFileMetadataRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("put_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_put_file_metadata_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_put_file_metadata(PutFileMetadataResult& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("put_file_metadata") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_put_file_metadata_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "put_file_metadata failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req) -{ - int32_t seqid = send_clear_file_metadata(req); - recv_clear_file_metadata(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_clear_file_metadata(const ClearFileMetadataRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("clear_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_clear_file_metadata_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_clear_file_metadata(ClearFileMetadataResult& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("clear_file_metadata") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_clear_file_metadata_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "clear_file_metadata failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) -{ - int32_t seqid = send_cache_file_metadata(req); - recv_cache_file_metadata(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_cache_file_metadata(const CacheFileMetadataRequest& req) -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("cache_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_cache_file_metadata_pargs args; - args.req = &req; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_cache_file_metadata(CacheFileMetadataResult& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("cache_file_metadata") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_cache_file_metadata_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "cache_file_metadata failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -void ThriftHiveMetastoreConcurrentClient::get_metastore_db_uuid(std::string& _return) -{ - int32_t seqid = send_get_metastore_db_uuid(); - recv_get_metastore_db_uuid(_return, seqid); -} - -int32_t ThriftHiveMetastoreConcurrentClient::send_get_metastore_db_uuid() -{ - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); - oprot_->writeMessageBegin("get_metastore_db_uuid", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_metastore_db_uuid_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); - - sentry.commit(); - return cseqid; -} - -void ThriftHiveMetastoreConcurrentClient::recv_get_metastore_db_uuid(std::string& _return, const int32_t seqid) -{ - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - // the read mutex gets dropped and reacquired as part of waitForWork() - // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); - - while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { - iprot_->readMessageBegin(fname, mtype, rseqid); - } - if(seqid == rseqid) { - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - sentry.commit(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_metastore_db_uuid") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - // in a bad state, don't commit - using ::apache::thrift::protocol::TProtocolException; - throw TProtocolException(TProtocolException::INVALID_DATA); - } - ThriftHiveMetastore_get_metastore_db_uuid_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - sentry.commit(); - return; - } - if (result.__isset.o1) { - sentry.commit(); - throw result.o1; - } - // in a bad state, don't commit - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_metastore_db_uuid failed: unknown result"); - } - // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); - - // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); - } // end while(true) -} - -}}} // namespace - diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h deleted file mode 100644 index 8406b42..0000000 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h +++ /dev/null @@ -1,23336 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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 { - -#ifdef _WIN32 - #pragma warning( push ) - #pragma warning (disable : 4250 ) //inheriting methods via dominance -#endif - -class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookServiceIf { - public: - virtual ~ThriftHiveMetastoreIf() {} - virtual void getMetaConf(std::string& _return, const std::string& key) = 0; - virtual void setMetaConf(const std::string& key, const std::string& value) = 0; - virtual void create_database(const Database& database) = 0; - virtual void get_database(Database& _return, const std::string& name) = 0; - virtual void drop_database(const std::string& name, const bool deleteData, const bool cascade) = 0; - virtual void get_databases(std::vector & _return, const std::string& pattern) = 0; - virtual void get_all_databases(std::vector & _return) = 0; - virtual void alter_database(const std::string& dbname, const Database& db) = 0; - virtual void get_type(Type& _return, const std::string& name) = 0; - virtual bool create_type(const Type& type) = 0; - virtual bool drop_type(const std::string& type) = 0; - virtual void get_type_all(std::map & _return, const std::string& name) = 0; - virtual void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) = 0; - virtual void get_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) = 0; - virtual void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) = 0; - virtual void get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) = 0; - virtual void create_table(const Table& tbl) = 0; - virtual void create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) = 0; - virtual void create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) = 0; - virtual void drop_constraint(const DropConstraintRequest& req) = 0; - virtual void add_primary_key(const AddPrimaryKeyRequest& req) = 0; - virtual void add_foreign_key(const AddForeignKeyRequest& req) = 0; - virtual void add_unique_constraint(const AddUniqueConstraintRequest& req) = 0; - virtual void add_not_null_constraint(const AddNotNullConstraintRequest& req) = 0; - virtual void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) = 0; - virtual void drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) = 0; - virtual void truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) = 0; - virtual void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) = 0; - virtual void get_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType) = 0; - virtual void get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) = 0; - virtual void get_all_tables(std::vector & _return, const std::string& db_name) = 0; - virtual void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) = 0; - virtual void get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names) = 0; - virtual void get_table_req(GetTableResult& _return, const GetTableRequest& req) = 0; - virtual void get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req) = 0; - virtual void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) = 0; - virtual void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) = 0; - virtual void alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) = 0; - virtual void alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) = 0; - virtual void add_partition(Partition& _return, const Partition& new_part) = 0; - virtual void add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) = 0; - virtual int32_t add_partitions(const std::vector & new_parts) = 0; - virtual int32_t add_partitions_pspec(const std::vector & new_parts) = 0; - virtual void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) = 0; - virtual void add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request) = 0; - virtual void append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) = 0; - virtual void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) = 0; - virtual void append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) = 0; - virtual bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) = 0; - virtual bool drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) = 0; - virtual bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) = 0; - virtual bool drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) = 0; - virtual void drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req) = 0; - virtual void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) = 0; - virtual void exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) = 0; - virtual void exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) = 0; - virtual 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) = 0; - virtual void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) = 0; - virtual void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) = 0; - virtual 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) = 0; - virtual void get_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) = 0; - virtual void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) = 0; - virtual 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) = 0; - virtual 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) = 0; - virtual 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) = 0; - virtual 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) = 0; - virtual void get_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) = 0; - virtual void get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req) = 0; - virtual int32_t get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) = 0; - virtual void get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) = 0; - virtual void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) = 0; - virtual void alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) = 0; - virtual void alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) = 0; - virtual void alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) = 0; - virtual void rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) = 0; - virtual bool partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) = 0; - virtual void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) = 0; - virtual void partition_name_to_vals(std::vector & _return, const std::string& part_name) = 0; - virtual void partition_name_to_spec(std::map & _return, const std::string& part_name) = 0; - virtual void markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) = 0; - virtual bool isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) = 0; - virtual void add_index(Index& _return, const Index& new_index, const Table& index_table) = 0; - virtual void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) = 0; - virtual bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) = 0; - virtual void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) = 0; - virtual void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; - virtual void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; - virtual void get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request) = 0; - virtual void get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request) = 0; - virtual void get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request) = 0; - virtual void get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request) = 0; - virtual bool update_table_column_statistics(const ColumnStatistics& stats_obj) = 0; - virtual bool update_partition_column_statistics(const ColumnStatistics& stats_obj) = 0; - virtual void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) = 0; - virtual void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) = 0; - virtual void get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request) = 0; - virtual void get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request) = 0; - virtual void get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request) = 0; - virtual bool set_aggr_stats_for(const SetPartitionsStatsRequest& request) = 0; - virtual bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) = 0; - virtual bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) = 0; - virtual void create_function(const Function& func) = 0; - virtual void drop_function(const std::string& dbName, const std::string& funcName) = 0; - virtual void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) = 0; - virtual void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) = 0; - virtual void get_function(Function& _return, const std::string& dbName, const std::string& funcName) = 0; - virtual void get_all_functions(GetAllFunctionsResponse& _return) = 0; - virtual bool create_role(const Role& role) = 0; - virtual bool drop_role(const std::string& role_name) = 0; - virtual void get_role_names(std::vector & _return) = 0; - virtual 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) = 0; - virtual bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) = 0; - virtual void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) = 0; - virtual void grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) = 0; - virtual void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) = 0; - virtual void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request) = 0; - virtual void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) = 0; - virtual void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) = 0; - virtual bool grant_privileges(const PrivilegeBag& privileges) = 0; - virtual bool revoke_privileges(const PrivilegeBag& privileges) = 0; - virtual void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) = 0; - virtual void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) = 0; - virtual void get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) = 0; - virtual int64_t renew_delegation_token(const std::string& token_str_form) = 0; - virtual void cancel_delegation_token(const std::string& token_str_form) = 0; - virtual bool add_token(const std::string& token_identifier, const std::string& delegation_token) = 0; - virtual bool remove_token(const std::string& token_identifier) = 0; - virtual void get_token(std::string& _return, const std::string& token_identifier) = 0; - virtual void get_all_token_identifiers(std::vector & _return) = 0; - virtual int32_t add_master_key(const std::string& key) = 0; - virtual void update_master_key(const int32_t seq_number, const std::string& key) = 0; - virtual bool remove_master_key(const int32_t key_seq) = 0; - virtual void get_master_keys(std::vector & _return) = 0; - virtual void get_open_txns(GetOpenTxnsResponse& _return) = 0; - virtual void get_open_txns_info(GetOpenTxnsInfoResponse& _return) = 0; - virtual void open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst) = 0; - virtual void abort_txn(const AbortTxnRequest& rqst) = 0; - virtual void abort_txns(const AbortTxnsRequest& rqst) = 0; - virtual void commit_txn(const CommitTxnRequest& rqst) = 0; - virtual void lock(LockResponse& _return, const LockRequest& rqst) = 0; - virtual void check_lock(LockResponse& _return, const CheckLockRequest& rqst) = 0; - virtual void unlock(const UnlockRequest& rqst) = 0; - virtual void show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst) = 0; - virtual void heartbeat(const HeartbeatRequest& ids) = 0; - virtual void heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns) = 0; - virtual void compact(const CompactionRequest& rqst) = 0; - virtual void compact2(CompactionResponse& _return, const CompactionRequest& rqst) = 0; - virtual void show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst) = 0; - virtual void add_dynamic_partitions(const AddDynamicPartitions& rqst) = 0; - virtual void get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst) = 0; - virtual void get_current_notificationEventId(CurrentNotificationEventId& _return) = 0; - virtual void fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst) = 0; - virtual void flushCache() = 0; - virtual void cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request) = 0; - virtual void get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req) = 0; - virtual void get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req) = 0; - virtual void put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req) = 0; - virtual void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req) = 0; - virtual void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) = 0; - virtual void get_metastore_db_uuid(std::string& _return) = 0; -}; - -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 getMetaConf(std::string& /* _return */, const std::string& /* key */) { - return; - } - void setMetaConf(const std::string& /* key */, const std::string& /* value */) { - return; - } - void create_database(const Database& /* database */) { - return; - } - void get_database(Database& /* _return */, const std::string& /* name */) { - return; - } - void drop_database(const std::string& /* name */, const bool /* deleteData */, const bool /* cascade */) { - return; - } - void get_databases(std::vector & /* _return */, const std::string& /* pattern */) { - return; - } - void get_all_databases(std::vector & /* _return */) { - return; - } - void alter_database(const std::string& /* dbname */, const Database& /* db */) { - return; - } - void get_type(Type& /* _return */, const std::string& /* name */) { - return; - } - bool create_type(const Type& /* type */) { - bool _return = false; - return _return; - } - bool drop_type(const std::string& /* type */) { - bool _return = false; - return _return; - } - void get_type_all(std::map & /* _return */, const std::string& /* name */) { - return; - } - void get_fields(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* table_name */) { - return; - } - void get_fields_with_environment_context(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* table_name */, const EnvironmentContext& /* environment_context */) { - return; - } - void get_schema(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* table_name */) { - return; - } - void get_schema_with_environment_context(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* table_name */, const EnvironmentContext& /* environment_context */) { - return; - } - void create_table(const Table& /* tbl */) { - return; - } - void create_table_with_environment_context(const Table& /* tbl */, const EnvironmentContext& /* environment_context */) { - return; - } - void create_table_with_constraints(const Table& /* tbl */, const std::vector & /* primaryKeys */, const std::vector & /* foreignKeys */, const std::vector & /* uniqueConstraints */, const std::vector & /* notNullConstraints */) { - return; - } - void drop_constraint(const DropConstraintRequest& /* req */) { - return; - } - void add_primary_key(const AddPrimaryKeyRequest& /* req */) { - return; - } - void add_foreign_key(const AddForeignKeyRequest& /* req */) { - return; - } - void add_unique_constraint(const AddUniqueConstraintRequest& /* req */) { - return; - } - void add_not_null_constraint(const AddNotNullConstraintRequest& /* req */) { - return; - } - void drop_table(const std::string& /* dbname */, const std::string& /* name */, const bool /* deleteData */) { - return; - } - void drop_table_with_environment_context(const std::string& /* dbname */, const std::string& /* name */, const bool /* deleteData */, const EnvironmentContext& /* environment_context */) { - return; - } - void truncate_table(const std::string& /* dbName */, const std::string& /* tableName */, const std::vector & /* partNames */) { - return; - } - void get_tables(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* pattern */) { - return; - } - void get_tables_by_type(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* pattern */, const std::string& /* tableType */) { - return; - } - void get_table_meta(std::vector & /* _return */, const std::string& /* db_patterns */, const std::string& /* tbl_patterns */, const std::vector & /* tbl_types */) { - return; - } - void get_all_tables(std::vector & /* _return */, const std::string& /* db_name */) { - return; - } - void get_table(Table& /* _return */, const std::string& /* dbname */, const std::string& /* tbl_name */) { - return; - } - void get_table_objects_by_name(std::vector
& /* _return */, const std::string& /* dbname */, const std::vector & /* tbl_names */) { - return; - } - void get_table_req(GetTableResult& /* _return */, const GetTableRequest& /* req */) { - return; - } - void get_table_objects_by_name_req(GetTablesResult& /* _return */, const GetTablesRequest& /* req */) { - return; - } - void get_table_names_by_filter(std::vector & /* _return */, const std::string& /* dbname */, const std::string& /* filter */, const int16_t /* max_tables */) { - return; - } - void alter_table(const std::string& /* dbname */, const std::string& /* tbl_name */, const Table& /* new_tbl */) { - return; - } - void alter_table_with_environment_context(const std::string& /* dbname */, const std::string& /* tbl_name */, const Table& /* new_tbl */, const EnvironmentContext& /* environment_context */) { - return; - } - void alter_table_with_cascade(const std::string& /* dbname */, const std::string& /* tbl_name */, const Table& /* new_tbl */, const bool /* cascade */) { - return; - } - void add_partition(Partition& /* _return */, const Partition& /* new_part */) { - return; - } - void add_partition_with_environment_context(Partition& /* _return */, const Partition& /* new_part */, const EnvironmentContext& /* environment_context */) { - return; - } - int32_t add_partitions(const std::vector & /* new_parts */) { - int32_t _return = 0; - return _return; - } - int32_t add_partitions_pspec(const std::vector & /* new_parts */) { - int32_t _return = 0; - return _return; - } - void append_partition(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */) { - return; - } - void add_partitions_req(AddPartitionsResult& /* _return */, const AddPartitionsRequest& /* request */) { - return; - } - void append_partition_with_environment_context(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const EnvironmentContext& /* environment_context */) { - return; - } - void append_partition_by_name(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */) { - return; - } - void append_partition_by_name_with_environment_context(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const EnvironmentContext& /* environment_context */) { - return; - } - bool drop_partition(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const bool /* deleteData */) { - bool _return = false; - return _return; - } - bool drop_partition_with_environment_context(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const bool /* deleteData */, const EnvironmentContext& /* environment_context */) { - bool _return = false; - return _return; - } - bool drop_partition_by_name(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const bool /* deleteData */) { - bool _return = false; - return _return; - } - bool drop_partition_by_name_with_environment_context(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const bool /* deleteData */, const EnvironmentContext& /* environment_context */) { - bool _return = false; - return _return; - } - void drop_partitions_req(DropPartitionsResult& /* _return */, const DropPartitionsRequest& /* req */) { - return; - } - void get_partition(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */) { - return; - } - void exchange_partition(Partition& /* _return */, const std::map & /* partitionSpecs */, const std::string& /* source_db */, const std::string& /* source_table_name */, const std::string& /* dest_db */, const std::string& /* dest_table_name */) { - return; - } - void exchange_partitions(std::vector & /* _return */, const std::map & /* partitionSpecs */, const std::string& /* source_db */, const std::string& /* source_table_name */, const std::string& /* dest_db */, const std::string& /* dest_table_name */) { - 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 */) { - return; - } - void get_partition_by_name(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */) { - return; - } - void get_partitions(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* 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 */) { - return; - } - void get_partitions_pspec(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int32_t /* max_parts */) { - return; - } - void get_partition_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* 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 */) { - 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 */) { - 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 */) { - 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 */) { - return; - } - void get_part_specs_by_filter(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* filter */, const int32_t /* max_parts */) { - return; - } - void get_partitions_by_expr(PartitionsByExprResult& /* _return */, const PartitionsByExprRequest& /* req */) { - return; - } - int32_t get_num_partitions_by_filter(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* filter */) { - int32_t _return = 0; - return _return; - } - void get_partitions_by_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* names */) { - return; - } - void alter_partition(const std::string& /* db_name */, const std::string& /* tbl_name */, const Partition& /* new_part */) { - return; - } - void alter_partitions(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* new_parts */) { - return; - } - void alter_partitions_with_environment_context(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* new_parts */, const EnvironmentContext& /* environment_context */) { - return; - } - void alter_partition_with_environment_context(const std::string& /* db_name */, const std::string& /* tbl_name */, const Partition& /* new_part */, const EnvironmentContext& /* environment_context */) { - return; - } - void rename_partition(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const Partition& /* new_part */) { - return; - } - bool partition_name_has_valid_characters(const std::vector & /* part_vals */, const bool /* throw_exception */) { - bool _return = false; - return _return; - } - void get_config_value(std::string& /* _return */, const std::string& /* name */, const std::string& /* defaultValue */) { - return; - } - void partition_name_to_vals(std::vector & /* _return */, const std::string& /* part_name */) { - return; - } - void partition_name_to_spec(std::map & /* _return */, const std::string& /* part_name */) { - return; - } - void markPartitionForEvent(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::map & /* part_vals */, const PartitionEventType::type /* eventType */) { - return; - } - bool isPartitionMarkedForEvent(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::map & /* part_vals */, const PartitionEventType::type /* eventType */) { - bool _return = false; - return _return; - } - void add_index(Index& /* _return */, const Index& /* new_index */, const Table& /* 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 */) { - return; - } - bool drop_index_by_name(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* index_name */, const bool /* deleteData */) { - bool _return = false; - return _return; - } - void get_index_by_name(Index& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* index_name */) { - return; - } - void get_indexes(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* 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 */) { - return; - } - void get_primary_keys(PrimaryKeysResponse& /* _return */, const PrimaryKeysRequest& /* request */) { - return; - } - void get_foreign_keys(ForeignKeysResponse& /* _return */, const ForeignKeysRequest& /* request */) { - return; - } - void get_unique_constraints(UniqueConstraintsResponse& /* _return */, const UniqueConstraintsRequest& /* request */) { - return; - } - void get_not_null_constraints(NotNullConstraintsResponse& /* _return */, const NotNullConstraintsRequest& /* request */) { - return; - } - bool update_table_column_statistics(const ColumnStatistics& /* stats_obj */) { - bool _return = false; - return _return; - } - bool update_partition_column_statistics(const ColumnStatistics& /* stats_obj */) { - bool _return = false; - return _return; - } - void get_table_column_statistics(ColumnStatistics& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* col_name */) { - return; - } - void get_partition_column_statistics(ColumnStatistics& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const std::string& /* col_name */) { - return; - } - void get_table_statistics_req(TableStatsResult& /* _return */, const TableStatsRequest& /* request */) { - return; - } - void get_partitions_statistics_req(PartitionsStatsResult& /* _return */, const PartitionsStatsRequest& /* request */) { - return; - } - void get_aggr_stats_for(AggrStats& /* _return */, const PartitionsStatsRequest& /* request */) { - return; - } - bool set_aggr_stats_for(const SetPartitionsStatsRequest& /* request */) { - bool _return = false; - return _return; - } - bool delete_partition_column_statistics(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const std::string& /* col_name */) { - bool _return = false; - return _return; - } - bool delete_table_column_statistics(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* col_name */) { - bool _return = false; - return _return; - } - void create_function(const Function& /* func */) { - return; - } - void drop_function(const std::string& /* dbName */, const std::string& /* funcName */) { - return; - } - void alter_function(const std::string& /* dbName */, const std::string& /* funcName */, const Function& /* newFunc */) { - return; - } - void get_functions(std::vector & /* _return */, const std::string& /* dbName */, const std::string& /* pattern */) { - return; - } - void get_function(Function& /* _return */, const std::string& /* dbName */, const std::string& /* funcName */) { - return; - } - void get_all_functions(GetAllFunctionsResponse& /* _return */) { - return; - } - bool create_role(const Role& /* role */) { - bool _return = false; - return _return; - } - bool drop_role(const std::string& /* role_name */) { - bool _return = false; - return _return; - } - void get_role_names(std::vector & /* _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 */) { - bool _return = false; - return _return; - } - bool revoke_role(const std::string& /* role_name */, const std::string& /* principal_name */, const PrincipalType::type /* principal_type */) { - bool _return = false; - return _return; - } - void list_roles(std::vector & /* _return */, const std::string& /* principal_name */, const PrincipalType::type /* principal_type */) { - return; - } - void grant_revoke_role(GrantRevokeRoleResponse& /* _return */, const GrantRevokeRoleRequest& /* request */) { - return; - } - void get_principals_in_role(GetPrincipalsInRoleResponse& /* _return */, const GetPrincipalsInRoleRequest& /* request */) { - return; - } - void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& /* _return */, const GetRoleGrantsForPrincipalRequest& /* request */) { - return; - } - void get_privilege_set(PrincipalPrivilegeSet& /* _return */, const HiveObjectRef& /* hiveObject */, const std::string& /* user_name */, const std::vector & /* group_names */) { - return; - } - void list_privileges(std::vector & /* _return */, const std::string& /* principal_name */, const PrincipalType::type /* principal_type */, const HiveObjectRef& /* hiveObject */) { - return; - } - bool grant_privileges(const PrivilegeBag& /* privileges */) { - bool _return = false; - return _return; - } - bool revoke_privileges(const PrivilegeBag& /* privileges */) { - bool _return = false; - return _return; - } - void grant_revoke_privileges(GrantRevokePrivilegeResponse& /* _return */, const GrantRevokePrivilegeRequest& /* request */) { - return; - } - void set_ugi(std::vector & /* _return */, const std::string& /* user_name */, const std::vector & /* group_names */) { - return; - } - void get_delegation_token(std::string& /* _return */, const std::string& /* token_owner */, const std::string& /* renewer_kerberos_principal_name */) { - return; - } - int64_t renew_delegation_token(const std::string& /* token_str_form */) { - int64_t _return = 0; - return _return; - } - void cancel_delegation_token(const std::string& /* token_str_form */) { - return; - } - bool add_token(const std::string& /* token_identifier */, const std::string& /* delegation_token */) { - bool _return = false; - return _return; - } - bool remove_token(const std::string& /* token_identifier */) { - bool _return = false; - return _return; - } - void get_token(std::string& /* _return */, const std::string& /* token_identifier */) { - return; - } - void get_all_token_identifiers(std::vector & /* _return */) { - return; - } - int32_t add_master_key(const std::string& /* key */) { - int32_t _return = 0; - return _return; - } - void update_master_key(const int32_t /* seq_number */, const std::string& /* key */) { - return; - } - bool remove_master_key(const int32_t /* key_seq */) { - bool _return = false; - return _return; - } - void get_master_keys(std::vector & /* _return */) { - return; - } - void get_open_txns(GetOpenTxnsResponse& /* _return */) { - return; - } - void get_open_txns_info(GetOpenTxnsInfoResponse& /* _return */) { - return; - } - void open_txns(OpenTxnsResponse& /* _return */, const OpenTxnRequest& /* rqst */) { - return; - } - void abort_txn(const AbortTxnRequest& /* rqst */) { - return; - } - void abort_txns(const AbortTxnsRequest& /* rqst */) { - return; - } - void commit_txn(const CommitTxnRequest& /* rqst */) { - return; - } - void lock(LockResponse& /* _return */, const LockRequest& /* rqst */) { - return; - } - void check_lock(LockResponse& /* _return */, const CheckLockRequest& /* rqst */) { - return; - } - void unlock(const UnlockRequest& /* rqst */) { - return; - } - void show_locks(ShowLocksResponse& /* _return */, const ShowLocksRequest& /* rqst */) { - return; - } - void heartbeat(const HeartbeatRequest& /* ids */) { - return; - } - void heartbeat_txn_range(HeartbeatTxnRangeResponse& /* _return */, const HeartbeatTxnRangeRequest& /* txns */) { - return; - } - void compact(const CompactionRequest& /* rqst */) { - return; - } - void compact2(CompactionResponse& /* _return */, const CompactionRequest& /* rqst */) { - return; - } - void show_compact(ShowCompactResponse& /* _return */, const ShowCompactRequest& /* rqst */) { - return; - } - void add_dynamic_partitions(const AddDynamicPartitions& /* rqst */) { - return; - } - void get_next_notification(NotificationEventResponse& /* _return */, const NotificationEventRequest& /* rqst */) { - return; - } - void get_current_notificationEventId(CurrentNotificationEventId& /* _return */) { - return; - } - void fire_listener_event(FireEventResponse& /* _return */, const FireEventRequest& /* rqst */) { - return; - } - void flushCache() { - return; - } - void cm_recycle(CmRecycleResponse& /* _return */, const CmRecycleRequest& /* request */) { - return; - } - void get_file_metadata_by_expr(GetFileMetadataByExprResult& /* _return */, const GetFileMetadataByExprRequest& /* req */) { - return; - } - void get_file_metadata(GetFileMetadataResult& /* _return */, const GetFileMetadataRequest& /* req */) { - return; - } - void put_file_metadata(PutFileMetadataResult& /* _return */, const PutFileMetadataRequest& /* req */) { - return; - } - void clear_file_metadata(ClearFileMetadataResult& /* _return */, const ClearFileMetadataRequest& /* req */) { - return; - } - void cache_file_metadata(CacheFileMetadataResult& /* _return */, const CacheFileMetadataRequest& /* req */) { - return; - } - void get_metastore_db_uuid(std::string& /* _return */) { - return; - } -}; - -typedef struct _ThriftHiveMetastore_getMetaConf_args__isset { - _ThriftHiveMetastore_getMetaConf_args__isset() : key(false) {} - bool key :1; -} _ThriftHiveMetastore_getMetaConf_args__isset; - -class ThriftHiveMetastore_getMetaConf_args { - public: - - ThriftHiveMetastore_getMetaConf_args(const ThriftHiveMetastore_getMetaConf_args&); - ThriftHiveMetastore_getMetaConf_args& operator=(const ThriftHiveMetastore_getMetaConf_args&); - ThriftHiveMetastore_getMetaConf_args() : key() { - } - - virtual ~ThriftHiveMetastore_getMetaConf_args() throw(); - std::string key; - - _ThriftHiveMetastore_getMetaConf_args__isset __isset; - - void __set_key(const std::string& val); - - bool operator == (const ThriftHiveMetastore_getMetaConf_args & rhs) const - { - if (!(key == rhs.key)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_getMetaConf_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_getMetaConf_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_getMetaConf_pargs { - public: - - - virtual ~ThriftHiveMetastore_getMetaConf_pargs() throw(); - const std::string* key; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_getMetaConf_result__isset { - _ThriftHiveMetastore_getMetaConf_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_getMetaConf_result__isset; - -class ThriftHiveMetastore_getMetaConf_result { - public: - - ThriftHiveMetastore_getMetaConf_result(const ThriftHiveMetastore_getMetaConf_result&); - ThriftHiveMetastore_getMetaConf_result& operator=(const ThriftHiveMetastore_getMetaConf_result&); - ThriftHiveMetastore_getMetaConf_result() : success() { - } - - virtual ~ThriftHiveMetastore_getMetaConf_result() throw(); - std::string success; - MetaException o1; - - _ThriftHiveMetastore_getMetaConf_result__isset __isset; - - void __set_success(const std::string& val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_getMetaConf_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_getMetaConf_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_getMetaConf_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_getMetaConf_presult__isset { - _ThriftHiveMetastore_getMetaConf_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_getMetaConf_presult__isset; - -class ThriftHiveMetastore_getMetaConf_presult { - public: - - - virtual ~ThriftHiveMetastore_getMetaConf_presult() throw(); - std::string* success; - MetaException o1; - - _ThriftHiveMetastore_getMetaConf_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_setMetaConf_args__isset { - _ThriftHiveMetastore_setMetaConf_args__isset() : key(false), value(false) {} - bool key :1; - bool value :1; -} _ThriftHiveMetastore_setMetaConf_args__isset; - -class ThriftHiveMetastore_setMetaConf_args { - public: - - ThriftHiveMetastore_setMetaConf_args(const ThriftHiveMetastore_setMetaConf_args&); - ThriftHiveMetastore_setMetaConf_args& operator=(const ThriftHiveMetastore_setMetaConf_args&); - ThriftHiveMetastore_setMetaConf_args() : key(), value() { - } - - virtual ~ThriftHiveMetastore_setMetaConf_args() throw(); - std::string key; - std::string value; - - _ThriftHiveMetastore_setMetaConf_args__isset __isset; - - void __set_key(const std::string& val); - - void __set_value(const std::string& val); - - bool operator == (const ThriftHiveMetastore_setMetaConf_args & rhs) const - { - if (!(key == rhs.key)) - return false; - if (!(value == rhs.value)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_setMetaConf_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_setMetaConf_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_setMetaConf_pargs { - public: - - - virtual ~ThriftHiveMetastore_setMetaConf_pargs() throw(); - const std::string* key; - const std::string* value; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_setMetaConf_result__isset { - _ThriftHiveMetastore_setMetaConf_result__isset() : o1(false) {} - bool o1 :1; -} _ThriftHiveMetastore_setMetaConf_result__isset; - -class ThriftHiveMetastore_setMetaConf_result { - public: - - ThriftHiveMetastore_setMetaConf_result(const ThriftHiveMetastore_setMetaConf_result&); - ThriftHiveMetastore_setMetaConf_result& operator=(const ThriftHiveMetastore_setMetaConf_result&); - ThriftHiveMetastore_setMetaConf_result() { - } - - virtual ~ThriftHiveMetastore_setMetaConf_result() throw(); - MetaException o1; - - _ThriftHiveMetastore_setMetaConf_result__isset __isset; - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_setMetaConf_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_setMetaConf_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_setMetaConf_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_setMetaConf_presult__isset { - _ThriftHiveMetastore_setMetaConf_presult__isset() : o1(false) {} - bool o1 :1; -} _ThriftHiveMetastore_setMetaConf_presult__isset; - -class ThriftHiveMetastore_setMetaConf_presult { - public: - - - virtual ~ThriftHiveMetastore_setMetaConf_presult() throw(); - MetaException o1; - - _ThriftHiveMetastore_setMetaConf_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_create_database_args__isset { - _ThriftHiveMetastore_create_database_args__isset() : database(false) {} - bool database :1; -} _ThriftHiveMetastore_create_database_args__isset; - -class ThriftHiveMetastore_create_database_args { - public: - - ThriftHiveMetastore_create_database_args(const ThriftHiveMetastore_create_database_args&); - ThriftHiveMetastore_create_database_args& operator=(const ThriftHiveMetastore_create_database_args&); - ThriftHiveMetastore_create_database_args() { - } - - virtual ~ThriftHiveMetastore_create_database_args() throw(); - Database database; - - _ThriftHiveMetastore_create_database_args__isset __isset; - - void __set_database(const Database& val); - - bool operator == (const ThriftHiveMetastore_create_database_args & rhs) const - { - if (!(database == rhs.database)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_database_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_database_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_create_database_pargs { - public: - - - virtual ~ThriftHiveMetastore_create_database_pargs() throw(); - const Database* database; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_database_result__isset { - _ThriftHiveMetastore_create_database_result__isset() : o1(false), o2(false), o3(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_create_database_result__isset; - -class ThriftHiveMetastore_create_database_result { - public: - - ThriftHiveMetastore_create_database_result(const ThriftHiveMetastore_create_database_result&); - ThriftHiveMetastore_create_database_result& operator=(const ThriftHiveMetastore_create_database_result&); - ThriftHiveMetastore_create_database_result() { - } - - virtual ~ThriftHiveMetastore_create_database_result() throw(); - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - - _ThriftHiveMetastore_create_database_result__isset __isset; - - void __set_o1(const AlreadyExistsException& val); - - void __set_o2(const InvalidObjectException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_create_database_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_database_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_database_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_database_presult__isset { - _ThriftHiveMetastore_create_database_presult__isset() : o1(false), o2(false), o3(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_create_database_presult__isset; - -class ThriftHiveMetastore_create_database_presult { - public: - - - virtual ~ThriftHiveMetastore_create_database_presult() throw(); - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - - _ThriftHiveMetastore_create_database_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_database_args__isset { - _ThriftHiveMetastore_get_database_args__isset() : name(false) {} - bool name :1; -} _ThriftHiveMetastore_get_database_args__isset; - -class ThriftHiveMetastore_get_database_args { - public: - - ThriftHiveMetastore_get_database_args(const ThriftHiveMetastore_get_database_args&); - ThriftHiveMetastore_get_database_args& operator=(const ThriftHiveMetastore_get_database_args&); - ThriftHiveMetastore_get_database_args() : name() { - } - - virtual ~ThriftHiveMetastore_get_database_args() throw(); - std::string name; - - _ThriftHiveMetastore_get_database_args__isset __isset; - - void __set_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_database_args & rhs) const - { - if (!(name == rhs.name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_database_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_database_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_database_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_database_pargs() throw(); - const std::string* name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_database_result__isset { - _ThriftHiveMetastore_get_database_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_database_result__isset; - -class ThriftHiveMetastore_get_database_result { - public: - - ThriftHiveMetastore_get_database_result(const ThriftHiveMetastore_get_database_result&); - ThriftHiveMetastore_get_database_result& operator=(const ThriftHiveMetastore_get_database_result&); - ThriftHiveMetastore_get_database_result() { - } - - virtual ~ThriftHiveMetastore_get_database_result() throw(); - Database success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_database_result__isset __isset; - - void __set_success(const Database& val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_database_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_database_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_database_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_database_presult__isset { - _ThriftHiveMetastore_get_database_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_database_presult__isset; - -class ThriftHiveMetastore_get_database_presult { - public: - - - virtual ~ThriftHiveMetastore_get_database_presult() throw(); - Database* success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_database_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_database_args__isset { - _ThriftHiveMetastore_drop_database_args__isset() : name(false), deleteData(false), cascade(false) {} - bool name :1; - bool deleteData :1; - bool cascade :1; -} _ThriftHiveMetastore_drop_database_args__isset; - -class ThriftHiveMetastore_drop_database_args { - public: - - ThriftHiveMetastore_drop_database_args(const ThriftHiveMetastore_drop_database_args&); - ThriftHiveMetastore_drop_database_args& operator=(const ThriftHiveMetastore_drop_database_args&); - ThriftHiveMetastore_drop_database_args() : name(), deleteData(0), cascade(0) { - } - - virtual ~ThriftHiveMetastore_drop_database_args() throw(); - std::string name; - bool deleteData; - bool cascade; - - _ThriftHiveMetastore_drop_database_args__isset __isset; - - void __set_name(const std::string& val); - - void __set_deleteData(const bool val); - - void __set_cascade(const bool val); - - bool operator == (const ThriftHiveMetastore_drop_database_args & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - if (!(cascade == rhs.cascade)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_database_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_database_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_database_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_database_pargs() throw(); - const std::string* name; - const bool* deleteData; - const bool* cascade; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_database_result__isset { - _ThriftHiveMetastore_drop_database_result__isset() : o1(false), o2(false), o3(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_drop_database_result__isset; - -class ThriftHiveMetastore_drop_database_result { - public: - - ThriftHiveMetastore_drop_database_result(const ThriftHiveMetastore_drop_database_result&); - ThriftHiveMetastore_drop_database_result& operator=(const ThriftHiveMetastore_drop_database_result&); - ThriftHiveMetastore_drop_database_result() { - } - - virtual ~ThriftHiveMetastore_drop_database_result() throw(); - NoSuchObjectException o1; - InvalidOperationException o2; - MetaException o3; - - _ThriftHiveMetastore_drop_database_result__isset __isset; - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const InvalidOperationException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_drop_database_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_database_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_database_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_database_presult__isset { - _ThriftHiveMetastore_drop_database_presult__isset() : o1(false), o2(false), o3(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_drop_database_presult__isset; - -class ThriftHiveMetastore_drop_database_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_database_presult() throw(); - NoSuchObjectException o1; - InvalidOperationException o2; - MetaException o3; - - _ThriftHiveMetastore_drop_database_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_databases_args__isset { - _ThriftHiveMetastore_get_databases_args__isset() : pattern(false) {} - bool pattern :1; -} _ThriftHiveMetastore_get_databases_args__isset; - -class ThriftHiveMetastore_get_databases_args { - public: - - ThriftHiveMetastore_get_databases_args(const ThriftHiveMetastore_get_databases_args&); - ThriftHiveMetastore_get_databases_args& operator=(const ThriftHiveMetastore_get_databases_args&); - ThriftHiveMetastore_get_databases_args() : pattern() { - } - - virtual ~ThriftHiveMetastore_get_databases_args() throw(); - std::string pattern; - - _ThriftHiveMetastore_get_databases_args__isset __isset; - - void __set_pattern(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_databases_args & rhs) const - { - if (!(pattern == rhs.pattern)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_databases_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_databases_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_databases_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_databases_pargs() throw(); - const std::string* pattern; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_databases_result__isset { - _ThriftHiveMetastore_get_databases_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_databases_result__isset; - -class ThriftHiveMetastore_get_databases_result { - public: - - ThriftHiveMetastore_get_databases_result(const ThriftHiveMetastore_get_databases_result&); - ThriftHiveMetastore_get_databases_result& operator=(const ThriftHiveMetastore_get_databases_result&); - ThriftHiveMetastore_get_databases_result() { - } - - virtual ~ThriftHiveMetastore_get_databases_result() throw(); - std::vector success; - MetaException o1; - - _ThriftHiveMetastore_get_databases_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_databases_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_databases_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_databases_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_databases_presult__isset { - _ThriftHiveMetastore_get_databases_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_databases_presult__isset; - -class ThriftHiveMetastore_get_databases_presult { - public: - - - virtual ~ThriftHiveMetastore_get_databases_presult() throw(); - std::vector * success; - MetaException o1; - - _ThriftHiveMetastore_get_databases_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - - -class ThriftHiveMetastore_get_all_databases_args { - public: - - ThriftHiveMetastore_get_all_databases_args(const ThriftHiveMetastore_get_all_databases_args&); - ThriftHiveMetastore_get_all_databases_args& operator=(const ThriftHiveMetastore_get_all_databases_args&); - ThriftHiveMetastore_get_all_databases_args() { - } - - virtual ~ThriftHiveMetastore_get_all_databases_args() throw(); - - bool operator == (const ThriftHiveMetastore_get_all_databases_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_get_all_databases_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_all_databases_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_all_databases_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_all_databases_pargs() throw(); - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_all_databases_result__isset { - _ThriftHiveMetastore_get_all_databases_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_all_databases_result__isset; - -class ThriftHiveMetastore_get_all_databases_result { - public: - - ThriftHiveMetastore_get_all_databases_result(const ThriftHiveMetastore_get_all_databases_result&); - ThriftHiveMetastore_get_all_databases_result& operator=(const ThriftHiveMetastore_get_all_databases_result&); - ThriftHiveMetastore_get_all_databases_result() { - } - - virtual ~ThriftHiveMetastore_get_all_databases_result() throw(); - std::vector success; - MetaException o1; - - _ThriftHiveMetastore_get_all_databases_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_all_databases_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_all_databases_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_all_databases_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_all_databases_presult__isset { - _ThriftHiveMetastore_get_all_databases_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_all_databases_presult__isset; - -class ThriftHiveMetastore_get_all_databases_presult { - public: - - - virtual ~ThriftHiveMetastore_get_all_databases_presult() throw(); - std::vector * success; - MetaException o1; - - _ThriftHiveMetastore_get_all_databases_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_alter_database_args__isset { - _ThriftHiveMetastore_alter_database_args__isset() : dbname(false), db(false) {} - bool dbname :1; - bool db :1; -} _ThriftHiveMetastore_alter_database_args__isset; - -class ThriftHiveMetastore_alter_database_args { - public: - - ThriftHiveMetastore_alter_database_args(const ThriftHiveMetastore_alter_database_args&); - ThriftHiveMetastore_alter_database_args& operator=(const ThriftHiveMetastore_alter_database_args&); - ThriftHiveMetastore_alter_database_args() : dbname() { - } - - virtual ~ThriftHiveMetastore_alter_database_args() throw(); - std::string dbname; - Database db; - - _ThriftHiveMetastore_alter_database_args__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_db(const Database& val); - - bool operator == (const ThriftHiveMetastore_alter_database_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(db == rhs.db)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_database_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_database_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_alter_database_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_database_pargs() throw(); - const std::string* dbname; - const Database* db; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_database_result__isset { - _ThriftHiveMetastore_alter_database_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_database_result__isset; - -class ThriftHiveMetastore_alter_database_result { - public: - - ThriftHiveMetastore_alter_database_result(const ThriftHiveMetastore_alter_database_result&); - ThriftHiveMetastore_alter_database_result& operator=(const ThriftHiveMetastore_alter_database_result&); - ThriftHiveMetastore_alter_database_result() { - } - - virtual ~ThriftHiveMetastore_alter_database_result() throw(); - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_alter_database_result__isset __isset; - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_alter_database_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_database_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_database_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_database_presult__isset { - _ThriftHiveMetastore_alter_database_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_database_presult__isset; - -class ThriftHiveMetastore_alter_database_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_database_presult() throw(); - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_alter_database_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_type_args__isset { - _ThriftHiveMetastore_get_type_args__isset() : name(false) {} - bool name :1; -} _ThriftHiveMetastore_get_type_args__isset; - -class ThriftHiveMetastore_get_type_args { - public: - - ThriftHiveMetastore_get_type_args(const ThriftHiveMetastore_get_type_args&); - ThriftHiveMetastore_get_type_args& operator=(const ThriftHiveMetastore_get_type_args&); - ThriftHiveMetastore_get_type_args() : name() { - } - - virtual ~ThriftHiveMetastore_get_type_args() throw(); - std::string name; - - _ThriftHiveMetastore_get_type_args__isset __isset; - - void __set_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_type_args & rhs) const - { - if (!(name == rhs.name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_type_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_type_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_type_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_type_pargs() throw(); - const std::string* name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_type_result__isset { - _ThriftHiveMetastore_get_type_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_type_result__isset; - -class ThriftHiveMetastore_get_type_result { - public: - - ThriftHiveMetastore_get_type_result(const ThriftHiveMetastore_get_type_result&); - ThriftHiveMetastore_get_type_result& operator=(const ThriftHiveMetastore_get_type_result&); - ThriftHiveMetastore_get_type_result() { - } - - virtual ~ThriftHiveMetastore_get_type_result() throw(); - Type success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_type_result__isset __isset; - - void __set_success(const Type& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_type_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_type_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_type_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_type_presult__isset { - _ThriftHiveMetastore_get_type_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_type_presult__isset; - -class ThriftHiveMetastore_get_type_presult { - public: - - - virtual ~ThriftHiveMetastore_get_type_presult() throw(); - Type* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_type_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_create_type_args__isset { - _ThriftHiveMetastore_create_type_args__isset() : type(false) {} - bool type :1; -} _ThriftHiveMetastore_create_type_args__isset; - -class ThriftHiveMetastore_create_type_args { - public: - - ThriftHiveMetastore_create_type_args(const ThriftHiveMetastore_create_type_args&); - ThriftHiveMetastore_create_type_args& operator=(const ThriftHiveMetastore_create_type_args&); - ThriftHiveMetastore_create_type_args() { - } - - virtual ~ThriftHiveMetastore_create_type_args() throw(); - Type type; - - _ThriftHiveMetastore_create_type_args__isset __isset; - - void __set_type(const Type& val); - - bool operator == (const ThriftHiveMetastore_create_type_args & rhs) const - { - if (!(type == rhs.type)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_type_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_type_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_create_type_pargs { - public: - - - virtual ~ThriftHiveMetastore_create_type_pargs() throw(); - const Type* type; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_type_result__isset { - _ThriftHiveMetastore_create_type_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_create_type_result__isset; - -class ThriftHiveMetastore_create_type_result { - public: - - ThriftHiveMetastore_create_type_result(const ThriftHiveMetastore_create_type_result&); - ThriftHiveMetastore_create_type_result& operator=(const ThriftHiveMetastore_create_type_result&); - ThriftHiveMetastore_create_type_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_create_type_result() throw(); - bool success; - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - - _ThriftHiveMetastore_create_type_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const AlreadyExistsException& val); - - void __set_o2(const InvalidObjectException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_create_type_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_type_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_type_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_type_presult__isset { - _ThriftHiveMetastore_create_type_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_create_type_presult__isset; - -class ThriftHiveMetastore_create_type_presult { - public: - - - virtual ~ThriftHiveMetastore_create_type_presult() throw(); - bool* success; - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - - _ThriftHiveMetastore_create_type_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_type_args__isset { - _ThriftHiveMetastore_drop_type_args__isset() : type(false) {} - bool type :1; -} _ThriftHiveMetastore_drop_type_args__isset; - -class ThriftHiveMetastore_drop_type_args { - public: - - ThriftHiveMetastore_drop_type_args(const ThriftHiveMetastore_drop_type_args&); - ThriftHiveMetastore_drop_type_args& operator=(const ThriftHiveMetastore_drop_type_args&); - ThriftHiveMetastore_drop_type_args() : type() { - } - - virtual ~ThriftHiveMetastore_drop_type_args() throw(); - std::string type; - - _ThriftHiveMetastore_drop_type_args__isset __isset; - - void __set_type(const std::string& val); - - bool operator == (const ThriftHiveMetastore_drop_type_args & rhs) const - { - if (!(type == rhs.type)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_type_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_type_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_type_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_type_pargs() throw(); - const std::string* type; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_type_result__isset { - _ThriftHiveMetastore_drop_type_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_type_result__isset; - -class ThriftHiveMetastore_drop_type_result { - public: - - ThriftHiveMetastore_drop_type_result(const ThriftHiveMetastore_drop_type_result&); - ThriftHiveMetastore_drop_type_result& operator=(const ThriftHiveMetastore_drop_type_result&); - ThriftHiveMetastore_drop_type_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_drop_type_result() throw(); - bool success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_drop_type_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_drop_type_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_type_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_type_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_type_presult__isset { - _ThriftHiveMetastore_drop_type_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_type_presult__isset; - -class ThriftHiveMetastore_drop_type_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_type_presult() throw(); - bool* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_drop_type_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_type_all_args__isset { - _ThriftHiveMetastore_get_type_all_args__isset() : name(false) {} - bool name :1; -} _ThriftHiveMetastore_get_type_all_args__isset; - -class ThriftHiveMetastore_get_type_all_args { - public: - - ThriftHiveMetastore_get_type_all_args(const ThriftHiveMetastore_get_type_all_args&); - ThriftHiveMetastore_get_type_all_args& operator=(const ThriftHiveMetastore_get_type_all_args&); - ThriftHiveMetastore_get_type_all_args() : name() { - } - - virtual ~ThriftHiveMetastore_get_type_all_args() throw(); - std::string name; - - _ThriftHiveMetastore_get_type_all_args__isset __isset; - - void __set_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_type_all_args & rhs) const - { - if (!(name == rhs.name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_type_all_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_type_all_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_type_all_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_type_all_pargs() throw(); - const std::string* name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_type_all_result__isset { - _ThriftHiveMetastore_get_type_all_result__isset() : success(false), o2(false) {} - bool success :1; - bool o2 :1; -} _ThriftHiveMetastore_get_type_all_result__isset; - -class ThriftHiveMetastore_get_type_all_result { - public: - - ThriftHiveMetastore_get_type_all_result(const ThriftHiveMetastore_get_type_all_result&); - ThriftHiveMetastore_get_type_all_result& operator=(const ThriftHiveMetastore_get_type_all_result&); - ThriftHiveMetastore_get_type_all_result() { - } - - virtual ~ThriftHiveMetastore_get_type_all_result() throw(); - std::map success; - MetaException o2; - - _ThriftHiveMetastore_get_type_all_result__isset __isset; - - void __set_success(const std::map & val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_type_all_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_type_all_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_type_all_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_type_all_presult__isset { - _ThriftHiveMetastore_get_type_all_presult__isset() : success(false), o2(false) {} - bool success :1; - bool o2 :1; -} _ThriftHiveMetastore_get_type_all_presult__isset; - -class ThriftHiveMetastore_get_type_all_presult { - public: - - - virtual ~ThriftHiveMetastore_get_type_all_presult() throw(); - std::map * success; - MetaException o2; - - _ThriftHiveMetastore_get_type_all_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_fields_args__isset { - _ThriftHiveMetastore_get_fields_args__isset() : db_name(false), table_name(false) {} - bool db_name :1; - bool table_name :1; -} _ThriftHiveMetastore_get_fields_args__isset; - -class ThriftHiveMetastore_get_fields_args { - public: - - ThriftHiveMetastore_get_fields_args(const ThriftHiveMetastore_get_fields_args&); - ThriftHiveMetastore_get_fields_args& operator=(const ThriftHiveMetastore_get_fields_args&); - ThriftHiveMetastore_get_fields_args() : db_name(), table_name() { - } - - virtual ~ThriftHiveMetastore_get_fields_args() throw(); - std::string db_name; - std::string table_name; - - _ThriftHiveMetastore_get_fields_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_table_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_fields_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(table_name == rhs.table_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_fields_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_fields_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_fields_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_fields_pargs() throw(); - const std::string* db_name; - const std::string* table_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_fields_result__isset { - _ThriftHiveMetastore_get_fields_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_get_fields_result__isset; - -class ThriftHiveMetastore_get_fields_result { - public: - - ThriftHiveMetastore_get_fields_result(const ThriftHiveMetastore_get_fields_result&); - ThriftHiveMetastore_get_fields_result& operator=(const ThriftHiveMetastore_get_fields_result&); - ThriftHiveMetastore_get_fields_result() { - } - - virtual ~ThriftHiveMetastore_get_fields_result() throw(); - std::vector success; - MetaException o1; - UnknownTableException o2; - UnknownDBException o3; - - _ThriftHiveMetastore_get_fields_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - void __set_o2(const UnknownTableException& val); - - void __set_o3(const UnknownDBException& val); - - bool operator == (const ThriftHiveMetastore_get_fields_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_fields_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_fields_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_fields_presult__isset { - _ThriftHiveMetastore_get_fields_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_get_fields_presult__isset; - -class ThriftHiveMetastore_get_fields_presult { - public: - - - virtual ~ThriftHiveMetastore_get_fields_presult() throw(); - std::vector * success; - MetaException o1; - UnknownTableException o2; - UnknownDBException o3; - - _ThriftHiveMetastore_get_fields_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_fields_with_environment_context_args__isset { - _ThriftHiveMetastore_get_fields_with_environment_context_args__isset() : db_name(false), table_name(false), environment_context(false) {} - bool db_name :1; - bool table_name :1; - bool environment_context :1; -} _ThriftHiveMetastore_get_fields_with_environment_context_args__isset; - -class ThriftHiveMetastore_get_fields_with_environment_context_args { - public: - - ThriftHiveMetastore_get_fields_with_environment_context_args(const ThriftHiveMetastore_get_fields_with_environment_context_args&); - ThriftHiveMetastore_get_fields_with_environment_context_args& operator=(const ThriftHiveMetastore_get_fields_with_environment_context_args&); - ThriftHiveMetastore_get_fields_with_environment_context_args() : db_name(), table_name() { - } - - virtual ~ThriftHiveMetastore_get_fields_with_environment_context_args() throw(); - std::string db_name; - std::string table_name; - EnvironmentContext environment_context; - - _ThriftHiveMetastore_get_fields_with_environment_context_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_table_name(const std::string& val); - - void __set_environment_context(const EnvironmentContext& val); - - bool operator == (const ThriftHiveMetastore_get_fields_with_environment_context_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(table_name == rhs.table_name)) - return false; - if (!(environment_context == rhs.environment_context)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_fields_with_environment_context_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_fields_with_environment_context_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_fields_with_environment_context_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_fields_with_environment_context_pargs() throw(); - const std::string* db_name; - const std::string* table_name; - const EnvironmentContext* environment_context; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_fields_with_environment_context_result__isset { - _ThriftHiveMetastore_get_fields_with_environment_context_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_get_fields_with_environment_context_result__isset; - -class ThriftHiveMetastore_get_fields_with_environment_context_result { - public: - - ThriftHiveMetastore_get_fields_with_environment_context_result(const ThriftHiveMetastore_get_fields_with_environment_context_result&); - ThriftHiveMetastore_get_fields_with_environment_context_result& operator=(const ThriftHiveMetastore_get_fields_with_environment_context_result&); - ThriftHiveMetastore_get_fields_with_environment_context_result() { - } - - virtual ~ThriftHiveMetastore_get_fields_with_environment_context_result() throw(); - std::vector success; - MetaException o1; - UnknownTableException o2; - UnknownDBException o3; - - _ThriftHiveMetastore_get_fields_with_environment_context_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - void __set_o2(const UnknownTableException& val); - - void __set_o3(const UnknownDBException& val); - - bool operator == (const ThriftHiveMetastore_get_fields_with_environment_context_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_fields_with_environment_context_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_fields_with_environment_context_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_fields_with_environment_context_presult__isset { - _ThriftHiveMetastore_get_fields_with_environment_context_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_get_fields_with_environment_context_presult__isset; - -class ThriftHiveMetastore_get_fields_with_environment_context_presult { - public: - - - virtual ~ThriftHiveMetastore_get_fields_with_environment_context_presult() throw(); - std::vector * success; - MetaException o1; - UnknownTableException o2; - UnknownDBException o3; - - _ThriftHiveMetastore_get_fields_with_environment_context_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_schema_args__isset { - _ThriftHiveMetastore_get_schema_args__isset() : db_name(false), table_name(false) {} - bool db_name :1; - bool table_name :1; -} _ThriftHiveMetastore_get_schema_args__isset; - -class ThriftHiveMetastore_get_schema_args { - public: - - ThriftHiveMetastore_get_schema_args(const ThriftHiveMetastore_get_schema_args&); - ThriftHiveMetastore_get_schema_args& operator=(const ThriftHiveMetastore_get_schema_args&); - ThriftHiveMetastore_get_schema_args() : db_name(), table_name() { - } - - virtual ~ThriftHiveMetastore_get_schema_args() throw(); - std::string db_name; - std::string table_name; - - _ThriftHiveMetastore_get_schema_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_table_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_schema_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(table_name == rhs.table_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_schema_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_schema_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_schema_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_schema_pargs() throw(); - const std::string* db_name; - const std::string* table_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_schema_result__isset { - _ThriftHiveMetastore_get_schema_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_get_schema_result__isset; - -class ThriftHiveMetastore_get_schema_result { - public: - - ThriftHiveMetastore_get_schema_result(const ThriftHiveMetastore_get_schema_result&); - ThriftHiveMetastore_get_schema_result& operator=(const ThriftHiveMetastore_get_schema_result&); - ThriftHiveMetastore_get_schema_result() { - } - - virtual ~ThriftHiveMetastore_get_schema_result() throw(); - std::vector success; - MetaException o1; - UnknownTableException o2; - UnknownDBException o3; - - _ThriftHiveMetastore_get_schema_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - void __set_o2(const UnknownTableException& val); - - void __set_o3(const UnknownDBException& val); - - bool operator == (const ThriftHiveMetastore_get_schema_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_schema_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_schema_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_schema_presult__isset { - _ThriftHiveMetastore_get_schema_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_get_schema_presult__isset; - -class ThriftHiveMetastore_get_schema_presult { - public: - - - virtual ~ThriftHiveMetastore_get_schema_presult() throw(); - std::vector * success; - MetaException o1; - UnknownTableException o2; - UnknownDBException o3; - - _ThriftHiveMetastore_get_schema_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_schema_with_environment_context_args__isset { - _ThriftHiveMetastore_get_schema_with_environment_context_args__isset() : db_name(false), table_name(false), environment_context(false) {} - bool db_name :1; - bool table_name :1; - bool environment_context :1; -} _ThriftHiveMetastore_get_schema_with_environment_context_args__isset; - -class ThriftHiveMetastore_get_schema_with_environment_context_args { - public: - - ThriftHiveMetastore_get_schema_with_environment_context_args(const ThriftHiveMetastore_get_schema_with_environment_context_args&); - ThriftHiveMetastore_get_schema_with_environment_context_args& operator=(const ThriftHiveMetastore_get_schema_with_environment_context_args&); - ThriftHiveMetastore_get_schema_with_environment_context_args() : db_name(), table_name() { - } - - virtual ~ThriftHiveMetastore_get_schema_with_environment_context_args() throw(); - std::string db_name; - std::string table_name; - EnvironmentContext environment_context; - - _ThriftHiveMetastore_get_schema_with_environment_context_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_table_name(const std::string& val); - - void __set_environment_context(const EnvironmentContext& val); - - bool operator == (const ThriftHiveMetastore_get_schema_with_environment_context_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(table_name == rhs.table_name)) - return false; - if (!(environment_context == rhs.environment_context)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_schema_with_environment_context_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_schema_with_environment_context_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_schema_with_environment_context_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_schema_with_environment_context_pargs() throw(); - const std::string* db_name; - const std::string* table_name; - const EnvironmentContext* environment_context; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_schema_with_environment_context_result__isset { - _ThriftHiveMetastore_get_schema_with_environment_context_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_get_schema_with_environment_context_result__isset; - -class ThriftHiveMetastore_get_schema_with_environment_context_result { - public: - - ThriftHiveMetastore_get_schema_with_environment_context_result(const ThriftHiveMetastore_get_schema_with_environment_context_result&); - ThriftHiveMetastore_get_schema_with_environment_context_result& operator=(const ThriftHiveMetastore_get_schema_with_environment_context_result&); - ThriftHiveMetastore_get_schema_with_environment_context_result() { - } - - virtual ~ThriftHiveMetastore_get_schema_with_environment_context_result() throw(); - std::vector success; - MetaException o1; - UnknownTableException o2; - UnknownDBException o3; - - _ThriftHiveMetastore_get_schema_with_environment_context_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - void __set_o2(const UnknownTableException& val); - - void __set_o3(const UnknownDBException& val); - - bool operator == (const ThriftHiveMetastore_get_schema_with_environment_context_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_schema_with_environment_context_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_schema_with_environment_context_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_schema_with_environment_context_presult__isset { - _ThriftHiveMetastore_get_schema_with_environment_context_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_get_schema_with_environment_context_presult__isset; - -class ThriftHiveMetastore_get_schema_with_environment_context_presult { - public: - - - virtual ~ThriftHiveMetastore_get_schema_with_environment_context_presult() throw(); - std::vector * success; - MetaException o1; - UnknownTableException o2; - UnknownDBException o3; - - _ThriftHiveMetastore_get_schema_with_environment_context_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_create_table_args__isset { - _ThriftHiveMetastore_create_table_args__isset() : tbl(false) {} - bool tbl :1; -} _ThriftHiveMetastore_create_table_args__isset; - -class ThriftHiveMetastore_create_table_args { - public: - - ThriftHiveMetastore_create_table_args(const ThriftHiveMetastore_create_table_args&); - ThriftHiveMetastore_create_table_args& operator=(const ThriftHiveMetastore_create_table_args&); - ThriftHiveMetastore_create_table_args() { - } - - virtual ~ThriftHiveMetastore_create_table_args() throw(); - Table tbl; - - _ThriftHiveMetastore_create_table_args__isset __isset; - - void __set_tbl(const Table& val); - - bool operator == (const ThriftHiveMetastore_create_table_args & rhs) const - { - if (!(tbl == rhs.tbl)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_table_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_table_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_create_table_pargs { - public: - - - virtual ~ThriftHiveMetastore_create_table_pargs() throw(); - const Table* tbl; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_table_result__isset { - _ThriftHiveMetastore_create_table_result__isset() : o1(false), o2(false), o3(false), o4(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_create_table_result__isset; - -class ThriftHiveMetastore_create_table_result { - public: - - ThriftHiveMetastore_create_table_result(const ThriftHiveMetastore_create_table_result&); - ThriftHiveMetastore_create_table_result& operator=(const ThriftHiveMetastore_create_table_result&); - ThriftHiveMetastore_create_table_result() { - } - - virtual ~ThriftHiveMetastore_create_table_result() throw(); - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - NoSuchObjectException o4; - - _ThriftHiveMetastore_create_table_result__isset __isset; - - void __set_o1(const AlreadyExistsException& val); - - void __set_o2(const InvalidObjectException& val); - - void __set_o3(const MetaException& val); - - void __set_o4(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_create_table_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_table_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_table_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_table_presult__isset { - _ThriftHiveMetastore_create_table_presult__isset() : o1(false), o2(false), o3(false), o4(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_create_table_presult__isset; - -class ThriftHiveMetastore_create_table_presult { - public: - - - virtual ~ThriftHiveMetastore_create_table_presult() throw(); - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - NoSuchObjectException o4; - - _ThriftHiveMetastore_create_table_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_create_table_with_environment_context_args__isset { - _ThriftHiveMetastore_create_table_with_environment_context_args__isset() : tbl(false), environment_context(false) {} - bool tbl :1; - bool environment_context :1; -} _ThriftHiveMetastore_create_table_with_environment_context_args__isset; - -class ThriftHiveMetastore_create_table_with_environment_context_args { - public: - - ThriftHiveMetastore_create_table_with_environment_context_args(const ThriftHiveMetastore_create_table_with_environment_context_args&); - ThriftHiveMetastore_create_table_with_environment_context_args& operator=(const ThriftHiveMetastore_create_table_with_environment_context_args&); - ThriftHiveMetastore_create_table_with_environment_context_args() { - } - - virtual ~ThriftHiveMetastore_create_table_with_environment_context_args() throw(); - Table tbl; - EnvironmentContext environment_context; - - _ThriftHiveMetastore_create_table_with_environment_context_args__isset __isset; - - void __set_tbl(const Table& val); - - void __set_environment_context(const EnvironmentContext& val); - - bool operator == (const ThriftHiveMetastore_create_table_with_environment_context_args & rhs) const - { - if (!(tbl == rhs.tbl)) - return false; - if (!(environment_context == rhs.environment_context)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_table_with_environment_context_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_table_with_environment_context_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_create_table_with_environment_context_pargs { - public: - - - virtual ~ThriftHiveMetastore_create_table_with_environment_context_pargs() throw(); - const Table* tbl; - const EnvironmentContext* environment_context; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_table_with_environment_context_result__isset { - _ThriftHiveMetastore_create_table_with_environment_context_result__isset() : o1(false), o2(false), o3(false), o4(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_create_table_with_environment_context_result__isset; - -class ThriftHiveMetastore_create_table_with_environment_context_result { - public: - - ThriftHiveMetastore_create_table_with_environment_context_result(const ThriftHiveMetastore_create_table_with_environment_context_result&); - ThriftHiveMetastore_create_table_with_environment_context_result& operator=(const ThriftHiveMetastore_create_table_with_environment_context_result&); - ThriftHiveMetastore_create_table_with_environment_context_result() { - } - - virtual ~ThriftHiveMetastore_create_table_with_environment_context_result() throw(); - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - NoSuchObjectException o4; - - _ThriftHiveMetastore_create_table_with_environment_context_result__isset __isset; - - void __set_o1(const AlreadyExistsException& val); - - void __set_o2(const InvalidObjectException& val); - - void __set_o3(const MetaException& val); - - void __set_o4(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_create_table_with_environment_context_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_table_with_environment_context_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_table_with_environment_context_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_table_with_environment_context_presult__isset { - _ThriftHiveMetastore_create_table_with_environment_context_presult__isset() : o1(false), o2(false), o3(false), o4(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_create_table_with_environment_context_presult__isset; - -class ThriftHiveMetastore_create_table_with_environment_context_presult { - public: - - - virtual ~ThriftHiveMetastore_create_table_with_environment_context_presult() throw(); - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - NoSuchObjectException o4; - - _ThriftHiveMetastore_create_table_with_environment_context_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_create_table_with_constraints_args__isset { - _ThriftHiveMetastore_create_table_with_constraints_args__isset() : tbl(false), primaryKeys(false), foreignKeys(false), uniqueConstraints(false), notNullConstraints(false) {} - bool tbl :1; - bool primaryKeys :1; - bool foreignKeys :1; - bool uniqueConstraints :1; - bool notNullConstraints :1; -} _ThriftHiveMetastore_create_table_with_constraints_args__isset; - -class ThriftHiveMetastore_create_table_with_constraints_args { - public: - - ThriftHiveMetastore_create_table_with_constraints_args(const ThriftHiveMetastore_create_table_with_constraints_args&); - ThriftHiveMetastore_create_table_with_constraints_args& operator=(const ThriftHiveMetastore_create_table_with_constraints_args&); - ThriftHiveMetastore_create_table_with_constraints_args() { - } - - virtual ~ThriftHiveMetastore_create_table_with_constraints_args() throw(); - Table tbl; - std::vector primaryKeys; - std::vector foreignKeys; - std::vector uniqueConstraints; - std::vector notNullConstraints; - - _ThriftHiveMetastore_create_table_with_constraints_args__isset __isset; - - void __set_tbl(const Table& val); - - void __set_primaryKeys(const std::vector & val); - - void __set_foreignKeys(const std::vector & val); - - void __set_uniqueConstraints(const std::vector & val); - - void __set_notNullConstraints(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_create_table_with_constraints_args & rhs) const - { - if (!(tbl == rhs.tbl)) - return false; - if (!(primaryKeys == rhs.primaryKeys)) - return false; - if (!(foreignKeys == rhs.foreignKeys)) - return false; - if (!(uniqueConstraints == rhs.uniqueConstraints)) - return false; - if (!(notNullConstraints == rhs.notNullConstraints)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_table_with_constraints_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_table_with_constraints_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_create_table_with_constraints_pargs { - public: - - - virtual ~ThriftHiveMetastore_create_table_with_constraints_pargs() throw(); - const Table* tbl; - const std::vector * primaryKeys; - const std::vector * foreignKeys; - const std::vector * uniqueConstraints; - const std::vector * notNullConstraints; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_table_with_constraints_result__isset { - _ThriftHiveMetastore_create_table_with_constraints_result__isset() : o1(false), o2(false), o3(false), o4(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_create_table_with_constraints_result__isset; - -class ThriftHiveMetastore_create_table_with_constraints_result { - public: - - ThriftHiveMetastore_create_table_with_constraints_result(const ThriftHiveMetastore_create_table_with_constraints_result&); - ThriftHiveMetastore_create_table_with_constraints_result& operator=(const ThriftHiveMetastore_create_table_with_constraints_result&); - ThriftHiveMetastore_create_table_with_constraints_result() { - } - - virtual ~ThriftHiveMetastore_create_table_with_constraints_result() throw(); - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - NoSuchObjectException o4; - - _ThriftHiveMetastore_create_table_with_constraints_result__isset __isset; - - void __set_o1(const AlreadyExistsException& val); - - void __set_o2(const InvalidObjectException& val); - - void __set_o3(const MetaException& val); - - void __set_o4(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_create_table_with_constraints_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_table_with_constraints_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_table_with_constraints_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_table_with_constraints_presult__isset { - _ThriftHiveMetastore_create_table_with_constraints_presult__isset() : o1(false), o2(false), o3(false), o4(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_create_table_with_constraints_presult__isset; - -class ThriftHiveMetastore_create_table_with_constraints_presult { - public: - - - virtual ~ThriftHiveMetastore_create_table_with_constraints_presult() throw(); - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - NoSuchObjectException o4; - - _ThriftHiveMetastore_create_table_with_constraints_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_constraint_args__isset { - _ThriftHiveMetastore_drop_constraint_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_drop_constraint_args__isset; - -class ThriftHiveMetastore_drop_constraint_args { - public: - - ThriftHiveMetastore_drop_constraint_args(const ThriftHiveMetastore_drop_constraint_args&); - ThriftHiveMetastore_drop_constraint_args& operator=(const ThriftHiveMetastore_drop_constraint_args&); - ThriftHiveMetastore_drop_constraint_args() { - } - - virtual ~ThriftHiveMetastore_drop_constraint_args() throw(); - DropConstraintRequest req; - - _ThriftHiveMetastore_drop_constraint_args__isset __isset; - - void __set_req(const DropConstraintRequest& val); - - bool operator == (const ThriftHiveMetastore_drop_constraint_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_constraint_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_constraint_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_constraint_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_constraint_pargs() throw(); - const DropConstraintRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_constraint_result__isset { - _ThriftHiveMetastore_drop_constraint_result__isset() : o1(false), o3(false) {} - bool o1 :1; - bool o3 :1; -} _ThriftHiveMetastore_drop_constraint_result__isset; - -class ThriftHiveMetastore_drop_constraint_result { - public: - - ThriftHiveMetastore_drop_constraint_result(const ThriftHiveMetastore_drop_constraint_result&); - ThriftHiveMetastore_drop_constraint_result& operator=(const ThriftHiveMetastore_drop_constraint_result&); - ThriftHiveMetastore_drop_constraint_result() { - } - - virtual ~ThriftHiveMetastore_drop_constraint_result() throw(); - NoSuchObjectException o1; - MetaException o3; - - _ThriftHiveMetastore_drop_constraint_result__isset __isset; - - void __set_o1(const NoSuchObjectException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_drop_constraint_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_constraint_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_constraint_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_constraint_presult__isset { - _ThriftHiveMetastore_drop_constraint_presult__isset() : o1(false), o3(false) {} - bool o1 :1; - bool o3 :1; -} _ThriftHiveMetastore_drop_constraint_presult__isset; - -class ThriftHiveMetastore_drop_constraint_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_constraint_presult() throw(); - NoSuchObjectException o1; - MetaException o3; - - _ThriftHiveMetastore_drop_constraint_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_primary_key_args__isset { - _ThriftHiveMetastore_add_primary_key_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_add_primary_key_args__isset; - -class ThriftHiveMetastore_add_primary_key_args { - public: - - ThriftHiveMetastore_add_primary_key_args(const ThriftHiveMetastore_add_primary_key_args&); - ThriftHiveMetastore_add_primary_key_args& operator=(const ThriftHiveMetastore_add_primary_key_args&); - ThriftHiveMetastore_add_primary_key_args() { - } - - virtual ~ThriftHiveMetastore_add_primary_key_args() throw(); - AddPrimaryKeyRequest req; - - _ThriftHiveMetastore_add_primary_key_args__isset __isset; - - void __set_req(const AddPrimaryKeyRequest& val); - - bool operator == (const ThriftHiveMetastore_add_primary_key_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_primary_key_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_primary_key_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_primary_key_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_primary_key_pargs() throw(); - const AddPrimaryKeyRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_primary_key_result__isset { - _ThriftHiveMetastore_add_primary_key_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_add_primary_key_result__isset; - -class ThriftHiveMetastore_add_primary_key_result { - public: - - ThriftHiveMetastore_add_primary_key_result(const ThriftHiveMetastore_add_primary_key_result&); - ThriftHiveMetastore_add_primary_key_result& operator=(const ThriftHiveMetastore_add_primary_key_result&); - ThriftHiveMetastore_add_primary_key_result() { - } - - virtual ~ThriftHiveMetastore_add_primary_key_result() throw(); - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_add_primary_key_result__isset __isset; - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_add_primary_key_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_primary_key_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_primary_key_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_primary_key_presult__isset { - _ThriftHiveMetastore_add_primary_key_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_add_primary_key_presult__isset; - -class ThriftHiveMetastore_add_primary_key_presult { - public: - - - virtual ~ThriftHiveMetastore_add_primary_key_presult() throw(); - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_add_primary_key_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_foreign_key_args__isset { - _ThriftHiveMetastore_add_foreign_key_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_add_foreign_key_args__isset; - -class ThriftHiveMetastore_add_foreign_key_args { - public: - - ThriftHiveMetastore_add_foreign_key_args(const ThriftHiveMetastore_add_foreign_key_args&); - ThriftHiveMetastore_add_foreign_key_args& operator=(const ThriftHiveMetastore_add_foreign_key_args&); - ThriftHiveMetastore_add_foreign_key_args() { - } - - virtual ~ThriftHiveMetastore_add_foreign_key_args() throw(); - AddForeignKeyRequest req; - - _ThriftHiveMetastore_add_foreign_key_args__isset __isset; - - void __set_req(const AddForeignKeyRequest& val); - - bool operator == (const ThriftHiveMetastore_add_foreign_key_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_foreign_key_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_foreign_key_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_foreign_key_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_foreign_key_pargs() throw(); - const AddForeignKeyRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_foreign_key_result__isset { - _ThriftHiveMetastore_add_foreign_key_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_add_foreign_key_result__isset; - -class ThriftHiveMetastore_add_foreign_key_result { - public: - - ThriftHiveMetastore_add_foreign_key_result(const ThriftHiveMetastore_add_foreign_key_result&); - ThriftHiveMetastore_add_foreign_key_result& operator=(const ThriftHiveMetastore_add_foreign_key_result&); - ThriftHiveMetastore_add_foreign_key_result() { - } - - virtual ~ThriftHiveMetastore_add_foreign_key_result() throw(); - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_add_foreign_key_result__isset __isset; - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_add_foreign_key_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_foreign_key_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_foreign_key_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_foreign_key_presult__isset { - _ThriftHiveMetastore_add_foreign_key_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_add_foreign_key_presult__isset; - -class ThriftHiveMetastore_add_foreign_key_presult { - public: - - - virtual ~ThriftHiveMetastore_add_foreign_key_presult() throw(); - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_add_foreign_key_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_unique_constraint_args__isset { - _ThriftHiveMetastore_add_unique_constraint_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_add_unique_constraint_args__isset; - -class ThriftHiveMetastore_add_unique_constraint_args { - public: - - ThriftHiveMetastore_add_unique_constraint_args(const ThriftHiveMetastore_add_unique_constraint_args&); - ThriftHiveMetastore_add_unique_constraint_args& operator=(const ThriftHiveMetastore_add_unique_constraint_args&); - ThriftHiveMetastore_add_unique_constraint_args() { - } - - virtual ~ThriftHiveMetastore_add_unique_constraint_args() throw(); - AddUniqueConstraintRequest req; - - _ThriftHiveMetastore_add_unique_constraint_args__isset __isset; - - void __set_req(const AddUniqueConstraintRequest& val); - - bool operator == (const ThriftHiveMetastore_add_unique_constraint_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_unique_constraint_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_unique_constraint_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_unique_constraint_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_unique_constraint_pargs() throw(); - const AddUniqueConstraintRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_unique_constraint_result__isset { - _ThriftHiveMetastore_add_unique_constraint_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_add_unique_constraint_result__isset; - -class ThriftHiveMetastore_add_unique_constraint_result { - public: - - ThriftHiveMetastore_add_unique_constraint_result(const ThriftHiveMetastore_add_unique_constraint_result&); - ThriftHiveMetastore_add_unique_constraint_result& operator=(const ThriftHiveMetastore_add_unique_constraint_result&); - ThriftHiveMetastore_add_unique_constraint_result() { - } - - virtual ~ThriftHiveMetastore_add_unique_constraint_result() throw(); - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_add_unique_constraint_result__isset __isset; - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_add_unique_constraint_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_unique_constraint_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_unique_constraint_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_unique_constraint_presult__isset { - _ThriftHiveMetastore_add_unique_constraint_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_add_unique_constraint_presult__isset; - -class ThriftHiveMetastore_add_unique_constraint_presult { - public: - - - virtual ~ThriftHiveMetastore_add_unique_constraint_presult() throw(); - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_add_unique_constraint_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_not_null_constraint_args__isset { - _ThriftHiveMetastore_add_not_null_constraint_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_add_not_null_constraint_args__isset; - -class ThriftHiveMetastore_add_not_null_constraint_args { - public: - - ThriftHiveMetastore_add_not_null_constraint_args(const ThriftHiveMetastore_add_not_null_constraint_args&); - ThriftHiveMetastore_add_not_null_constraint_args& operator=(const ThriftHiveMetastore_add_not_null_constraint_args&); - ThriftHiveMetastore_add_not_null_constraint_args() { - } - - virtual ~ThriftHiveMetastore_add_not_null_constraint_args() throw(); - AddNotNullConstraintRequest req; - - _ThriftHiveMetastore_add_not_null_constraint_args__isset __isset; - - void __set_req(const AddNotNullConstraintRequest& val); - - bool operator == (const ThriftHiveMetastore_add_not_null_constraint_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_not_null_constraint_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_not_null_constraint_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_not_null_constraint_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_not_null_constraint_pargs() throw(); - const AddNotNullConstraintRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_not_null_constraint_result__isset { - _ThriftHiveMetastore_add_not_null_constraint_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_add_not_null_constraint_result__isset; - -class ThriftHiveMetastore_add_not_null_constraint_result { - public: - - ThriftHiveMetastore_add_not_null_constraint_result(const ThriftHiveMetastore_add_not_null_constraint_result&); - ThriftHiveMetastore_add_not_null_constraint_result& operator=(const ThriftHiveMetastore_add_not_null_constraint_result&); - ThriftHiveMetastore_add_not_null_constraint_result() { - } - - virtual ~ThriftHiveMetastore_add_not_null_constraint_result() throw(); - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_add_not_null_constraint_result__isset __isset; - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_add_not_null_constraint_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_not_null_constraint_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_not_null_constraint_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_not_null_constraint_presult__isset { - _ThriftHiveMetastore_add_not_null_constraint_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_add_not_null_constraint_presult__isset; - -class ThriftHiveMetastore_add_not_null_constraint_presult { - public: - - - virtual ~ThriftHiveMetastore_add_not_null_constraint_presult() throw(); - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_add_not_null_constraint_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_table_args__isset { - _ThriftHiveMetastore_drop_table_args__isset() : dbname(false), name(false), deleteData(false) {} - bool dbname :1; - bool name :1; - bool deleteData :1; -} _ThriftHiveMetastore_drop_table_args__isset; - -class ThriftHiveMetastore_drop_table_args { - public: - - ThriftHiveMetastore_drop_table_args(const ThriftHiveMetastore_drop_table_args&); - ThriftHiveMetastore_drop_table_args& operator=(const ThriftHiveMetastore_drop_table_args&); - ThriftHiveMetastore_drop_table_args() : dbname(), name(), deleteData(0) { - } - - virtual ~ThriftHiveMetastore_drop_table_args() throw(); - std::string dbname; - std::string name; - bool deleteData; - - _ThriftHiveMetastore_drop_table_args__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_name(const std::string& val); - - void __set_deleteData(const bool val); - - bool operator == (const ThriftHiveMetastore_drop_table_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(name == rhs.name)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_table_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_table_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_table_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_table_pargs() throw(); - const std::string* dbname; - const std::string* name; - const bool* deleteData; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_table_result__isset { - _ThriftHiveMetastore_drop_table_result__isset() : o1(false), o3(false) {} - bool o1 :1; - bool o3 :1; -} _ThriftHiveMetastore_drop_table_result__isset; - -class ThriftHiveMetastore_drop_table_result { - public: - - ThriftHiveMetastore_drop_table_result(const ThriftHiveMetastore_drop_table_result&); - ThriftHiveMetastore_drop_table_result& operator=(const ThriftHiveMetastore_drop_table_result&); - ThriftHiveMetastore_drop_table_result() { - } - - virtual ~ThriftHiveMetastore_drop_table_result() throw(); - NoSuchObjectException o1; - MetaException o3; - - _ThriftHiveMetastore_drop_table_result__isset __isset; - - void __set_o1(const NoSuchObjectException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_drop_table_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_table_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_table_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_table_presult__isset { - _ThriftHiveMetastore_drop_table_presult__isset() : o1(false), o3(false) {} - bool o1 :1; - bool o3 :1; -} _ThriftHiveMetastore_drop_table_presult__isset; - -class ThriftHiveMetastore_drop_table_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_table_presult() throw(); - NoSuchObjectException o1; - MetaException o3; - - _ThriftHiveMetastore_drop_table_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_table_with_environment_context_args__isset { - _ThriftHiveMetastore_drop_table_with_environment_context_args__isset() : dbname(false), name(false), deleteData(false), environment_context(false) {} - bool dbname :1; - bool name :1; - bool deleteData :1; - bool environment_context :1; -} _ThriftHiveMetastore_drop_table_with_environment_context_args__isset; - -class ThriftHiveMetastore_drop_table_with_environment_context_args { - public: - - ThriftHiveMetastore_drop_table_with_environment_context_args(const ThriftHiveMetastore_drop_table_with_environment_context_args&); - ThriftHiveMetastore_drop_table_with_environment_context_args& operator=(const ThriftHiveMetastore_drop_table_with_environment_context_args&); - ThriftHiveMetastore_drop_table_with_environment_context_args() : dbname(), name(), deleteData(0) { - } - - virtual ~ThriftHiveMetastore_drop_table_with_environment_context_args() throw(); - std::string dbname; - std::string name; - bool deleteData; - EnvironmentContext environment_context; - - _ThriftHiveMetastore_drop_table_with_environment_context_args__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_name(const std::string& val); - - void __set_deleteData(const bool val); - - void __set_environment_context(const EnvironmentContext& val); - - bool operator == (const ThriftHiveMetastore_drop_table_with_environment_context_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(name == rhs.name)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - if (!(environment_context == rhs.environment_context)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_table_with_environment_context_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_table_with_environment_context_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_table_with_environment_context_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_table_with_environment_context_pargs() throw(); - const std::string* dbname; - const std::string* name; - const bool* deleteData; - const EnvironmentContext* environment_context; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_table_with_environment_context_result__isset { - _ThriftHiveMetastore_drop_table_with_environment_context_result__isset() : o1(false), o3(false) {} - bool o1 :1; - bool o3 :1; -} _ThriftHiveMetastore_drop_table_with_environment_context_result__isset; - -class ThriftHiveMetastore_drop_table_with_environment_context_result { - public: - - ThriftHiveMetastore_drop_table_with_environment_context_result(const ThriftHiveMetastore_drop_table_with_environment_context_result&); - ThriftHiveMetastore_drop_table_with_environment_context_result& operator=(const ThriftHiveMetastore_drop_table_with_environment_context_result&); - ThriftHiveMetastore_drop_table_with_environment_context_result() { - } - - virtual ~ThriftHiveMetastore_drop_table_with_environment_context_result() throw(); - NoSuchObjectException o1; - MetaException o3; - - _ThriftHiveMetastore_drop_table_with_environment_context_result__isset __isset; - - void __set_o1(const NoSuchObjectException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_drop_table_with_environment_context_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_table_with_environment_context_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_table_with_environment_context_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_table_with_environment_context_presult__isset { - _ThriftHiveMetastore_drop_table_with_environment_context_presult__isset() : o1(false), o3(false) {} - bool o1 :1; - bool o3 :1; -} _ThriftHiveMetastore_drop_table_with_environment_context_presult__isset; - -class ThriftHiveMetastore_drop_table_with_environment_context_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_table_with_environment_context_presult() throw(); - NoSuchObjectException o1; - MetaException o3; - - _ThriftHiveMetastore_drop_table_with_environment_context_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_truncate_table_args__isset { - _ThriftHiveMetastore_truncate_table_args__isset() : dbName(false), tableName(false), partNames(false) {} - bool dbName :1; - bool tableName :1; - bool partNames :1; -} _ThriftHiveMetastore_truncate_table_args__isset; - -class ThriftHiveMetastore_truncate_table_args { - public: - - ThriftHiveMetastore_truncate_table_args(const ThriftHiveMetastore_truncate_table_args&); - ThriftHiveMetastore_truncate_table_args& operator=(const ThriftHiveMetastore_truncate_table_args&); - ThriftHiveMetastore_truncate_table_args() : dbName(), tableName() { - } - - virtual ~ThriftHiveMetastore_truncate_table_args() throw(); - std::string dbName; - std::string tableName; - std::vector partNames; - - _ThriftHiveMetastore_truncate_table_args__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_tableName(const std::string& val); - - void __set_partNames(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_truncate_table_args & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(tableName == rhs.tableName)) - return false; - if (!(partNames == rhs.partNames)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_truncate_table_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_truncate_table_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_truncate_table_pargs { - public: - - - virtual ~ThriftHiveMetastore_truncate_table_pargs() throw(); - const std::string* dbName; - const std::string* tableName; - const std::vector * partNames; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_truncate_table_result__isset { - _ThriftHiveMetastore_truncate_table_result__isset() : o1(false) {} - bool o1 :1; -} _ThriftHiveMetastore_truncate_table_result__isset; - -class ThriftHiveMetastore_truncate_table_result { - public: - - ThriftHiveMetastore_truncate_table_result(const ThriftHiveMetastore_truncate_table_result&); - ThriftHiveMetastore_truncate_table_result& operator=(const ThriftHiveMetastore_truncate_table_result&); - ThriftHiveMetastore_truncate_table_result() { - } - - virtual ~ThriftHiveMetastore_truncate_table_result() throw(); - MetaException o1; - - _ThriftHiveMetastore_truncate_table_result__isset __isset; - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_truncate_table_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_truncate_table_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_truncate_table_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_truncate_table_presult__isset { - _ThriftHiveMetastore_truncate_table_presult__isset() : o1(false) {} - bool o1 :1; -} _ThriftHiveMetastore_truncate_table_presult__isset; - -class ThriftHiveMetastore_truncate_table_presult { - public: - - - virtual ~ThriftHiveMetastore_truncate_table_presult() throw(); - MetaException o1; - - _ThriftHiveMetastore_truncate_table_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_tables_args__isset { - _ThriftHiveMetastore_get_tables_args__isset() : db_name(false), pattern(false) {} - bool db_name :1; - bool pattern :1; -} _ThriftHiveMetastore_get_tables_args__isset; - -class ThriftHiveMetastore_get_tables_args { - public: - - ThriftHiveMetastore_get_tables_args(const ThriftHiveMetastore_get_tables_args&); - ThriftHiveMetastore_get_tables_args& operator=(const ThriftHiveMetastore_get_tables_args&); - ThriftHiveMetastore_get_tables_args() : db_name(), pattern() { - } - - virtual ~ThriftHiveMetastore_get_tables_args() throw(); - std::string db_name; - std::string pattern; - - _ThriftHiveMetastore_get_tables_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_pattern(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_tables_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(pattern == rhs.pattern)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_tables_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_tables_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_tables_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_tables_pargs() throw(); - const std::string* db_name; - const std::string* pattern; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_tables_result__isset { - _ThriftHiveMetastore_get_tables_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_tables_result__isset; - -class ThriftHiveMetastore_get_tables_result { - public: - - ThriftHiveMetastore_get_tables_result(const ThriftHiveMetastore_get_tables_result&); - ThriftHiveMetastore_get_tables_result& operator=(const ThriftHiveMetastore_get_tables_result&); - ThriftHiveMetastore_get_tables_result() { - } - - virtual ~ThriftHiveMetastore_get_tables_result() throw(); - std::vector success; - MetaException o1; - - _ThriftHiveMetastore_get_tables_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_tables_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_tables_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_tables_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_tables_presult__isset { - _ThriftHiveMetastore_get_tables_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_tables_presult__isset; - -class ThriftHiveMetastore_get_tables_presult { - public: - - - virtual ~ThriftHiveMetastore_get_tables_presult() throw(); - std::vector * success; - MetaException o1; - - _ThriftHiveMetastore_get_tables_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_tables_by_type_args__isset { - _ThriftHiveMetastore_get_tables_by_type_args__isset() : db_name(false), pattern(false), tableType(false) {} - bool db_name :1; - bool pattern :1; - bool tableType :1; -} _ThriftHiveMetastore_get_tables_by_type_args__isset; - -class ThriftHiveMetastore_get_tables_by_type_args { - public: - - ThriftHiveMetastore_get_tables_by_type_args(const ThriftHiveMetastore_get_tables_by_type_args&); - ThriftHiveMetastore_get_tables_by_type_args& operator=(const ThriftHiveMetastore_get_tables_by_type_args&); - ThriftHiveMetastore_get_tables_by_type_args() : db_name(), pattern(), tableType() { - } - - virtual ~ThriftHiveMetastore_get_tables_by_type_args() throw(); - std::string db_name; - std::string pattern; - std::string tableType; - - _ThriftHiveMetastore_get_tables_by_type_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_pattern(const std::string& val); - - void __set_tableType(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_tables_by_type_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(pattern == rhs.pattern)) - return false; - if (!(tableType == rhs.tableType)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_tables_by_type_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_tables_by_type_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_tables_by_type_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_tables_by_type_pargs() throw(); - const std::string* db_name; - const std::string* pattern; - const std::string* tableType; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_tables_by_type_result__isset { - _ThriftHiveMetastore_get_tables_by_type_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_tables_by_type_result__isset; - -class ThriftHiveMetastore_get_tables_by_type_result { - public: - - ThriftHiveMetastore_get_tables_by_type_result(const ThriftHiveMetastore_get_tables_by_type_result&); - ThriftHiveMetastore_get_tables_by_type_result& operator=(const ThriftHiveMetastore_get_tables_by_type_result&); - ThriftHiveMetastore_get_tables_by_type_result() { - } - - virtual ~ThriftHiveMetastore_get_tables_by_type_result() throw(); - std::vector success; - MetaException o1; - - _ThriftHiveMetastore_get_tables_by_type_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_tables_by_type_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_tables_by_type_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_tables_by_type_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_tables_by_type_presult__isset { - _ThriftHiveMetastore_get_tables_by_type_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_tables_by_type_presult__isset; - -class ThriftHiveMetastore_get_tables_by_type_presult { - public: - - - virtual ~ThriftHiveMetastore_get_tables_by_type_presult() throw(); - std::vector * success; - MetaException o1; - - _ThriftHiveMetastore_get_tables_by_type_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_table_meta_args__isset { - _ThriftHiveMetastore_get_table_meta_args__isset() : db_patterns(false), tbl_patterns(false), tbl_types(false) {} - bool db_patterns :1; - bool tbl_patterns :1; - bool tbl_types :1; -} _ThriftHiveMetastore_get_table_meta_args__isset; - -class ThriftHiveMetastore_get_table_meta_args { - public: - - ThriftHiveMetastore_get_table_meta_args(const ThriftHiveMetastore_get_table_meta_args&); - ThriftHiveMetastore_get_table_meta_args& operator=(const ThriftHiveMetastore_get_table_meta_args&); - ThriftHiveMetastore_get_table_meta_args() : db_patterns(), tbl_patterns() { - } - - virtual ~ThriftHiveMetastore_get_table_meta_args() throw(); - std::string db_patterns; - std::string tbl_patterns; - std::vector tbl_types; - - _ThriftHiveMetastore_get_table_meta_args__isset __isset; - - void __set_db_patterns(const std::string& val); - - void __set_tbl_patterns(const std::string& val); - - void __set_tbl_types(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_get_table_meta_args & rhs) const - { - if (!(db_patterns == rhs.db_patterns)) - return false; - if (!(tbl_patterns == rhs.tbl_patterns)) - return false; - if (!(tbl_types == rhs.tbl_types)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_meta_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_meta_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_table_meta_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_table_meta_pargs() throw(); - const std::string* db_patterns; - const std::string* tbl_patterns; - const std::vector * tbl_types; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_meta_result__isset { - _ThriftHiveMetastore_get_table_meta_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_table_meta_result__isset; - -class ThriftHiveMetastore_get_table_meta_result { - public: - - ThriftHiveMetastore_get_table_meta_result(const ThriftHiveMetastore_get_table_meta_result&); - ThriftHiveMetastore_get_table_meta_result& operator=(const ThriftHiveMetastore_get_table_meta_result&); - ThriftHiveMetastore_get_table_meta_result() { - } - - virtual ~ThriftHiveMetastore_get_table_meta_result() throw(); - std::vector success; - MetaException o1; - - _ThriftHiveMetastore_get_table_meta_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_table_meta_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_meta_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_meta_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_meta_presult__isset { - _ThriftHiveMetastore_get_table_meta_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_table_meta_presult__isset; - -class ThriftHiveMetastore_get_table_meta_presult { - public: - - - virtual ~ThriftHiveMetastore_get_table_meta_presult() throw(); - std::vector * success; - MetaException o1; - - _ThriftHiveMetastore_get_table_meta_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_all_tables_args__isset { - _ThriftHiveMetastore_get_all_tables_args__isset() : db_name(false) {} - bool db_name :1; -} _ThriftHiveMetastore_get_all_tables_args__isset; - -class ThriftHiveMetastore_get_all_tables_args { - public: - - ThriftHiveMetastore_get_all_tables_args(const ThriftHiveMetastore_get_all_tables_args&); - ThriftHiveMetastore_get_all_tables_args& operator=(const ThriftHiveMetastore_get_all_tables_args&); - ThriftHiveMetastore_get_all_tables_args() : db_name() { - } - - virtual ~ThriftHiveMetastore_get_all_tables_args() throw(); - std::string db_name; - - _ThriftHiveMetastore_get_all_tables_args__isset __isset; - - void __set_db_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_all_tables_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_all_tables_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_all_tables_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_all_tables_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_all_tables_pargs() throw(); - const std::string* db_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_all_tables_result__isset { - _ThriftHiveMetastore_get_all_tables_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_all_tables_result__isset; - -class ThriftHiveMetastore_get_all_tables_result { - public: - - ThriftHiveMetastore_get_all_tables_result(const ThriftHiveMetastore_get_all_tables_result&); - ThriftHiveMetastore_get_all_tables_result& operator=(const ThriftHiveMetastore_get_all_tables_result&); - ThriftHiveMetastore_get_all_tables_result() { - } - - virtual ~ThriftHiveMetastore_get_all_tables_result() throw(); - std::vector success; - MetaException o1; - - _ThriftHiveMetastore_get_all_tables_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_all_tables_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_all_tables_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_all_tables_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_all_tables_presult__isset { - _ThriftHiveMetastore_get_all_tables_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_all_tables_presult__isset; - -class ThriftHiveMetastore_get_all_tables_presult { - public: - - - virtual ~ThriftHiveMetastore_get_all_tables_presult() throw(); - std::vector * success; - MetaException o1; - - _ThriftHiveMetastore_get_all_tables_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_table_args__isset { - _ThriftHiveMetastore_get_table_args__isset() : dbname(false), tbl_name(false) {} - bool dbname :1; - bool tbl_name :1; -} _ThriftHiveMetastore_get_table_args__isset; - -class ThriftHiveMetastore_get_table_args { - public: - - ThriftHiveMetastore_get_table_args(const ThriftHiveMetastore_get_table_args&); - ThriftHiveMetastore_get_table_args& operator=(const ThriftHiveMetastore_get_table_args&); - ThriftHiveMetastore_get_table_args() : dbname(), tbl_name() { - } - - virtual ~ThriftHiveMetastore_get_table_args() throw(); - std::string dbname; - std::string tbl_name; - - _ThriftHiveMetastore_get_table_args__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_tbl_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_table_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_table_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_table_pargs() throw(); - const std::string* dbname; - const std::string* tbl_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_result__isset { - _ThriftHiveMetastore_get_table_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_table_result__isset; - -class ThriftHiveMetastore_get_table_result { - public: - - ThriftHiveMetastore_get_table_result(const ThriftHiveMetastore_get_table_result&); - ThriftHiveMetastore_get_table_result& operator=(const ThriftHiveMetastore_get_table_result&); - ThriftHiveMetastore_get_table_result() { - } - - virtual ~ThriftHiveMetastore_get_table_result() throw(); - Table success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_table_result__isset __isset; - - void __set_success(const Table& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_table_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_presult__isset { - _ThriftHiveMetastore_get_table_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_table_presult__isset; - -class ThriftHiveMetastore_get_table_presult { - public: - - - virtual ~ThriftHiveMetastore_get_table_presult() throw(); - Table* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_table_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_table_objects_by_name_args__isset { - _ThriftHiveMetastore_get_table_objects_by_name_args__isset() : dbname(false), tbl_names(false) {} - bool dbname :1; - bool tbl_names :1; -} _ThriftHiveMetastore_get_table_objects_by_name_args__isset; - -class ThriftHiveMetastore_get_table_objects_by_name_args { - public: - - ThriftHiveMetastore_get_table_objects_by_name_args(const ThriftHiveMetastore_get_table_objects_by_name_args&); - ThriftHiveMetastore_get_table_objects_by_name_args& operator=(const ThriftHiveMetastore_get_table_objects_by_name_args&); - ThriftHiveMetastore_get_table_objects_by_name_args() : dbname() { - } - - virtual ~ThriftHiveMetastore_get_table_objects_by_name_args() throw(); - std::string dbname; - std::vector tbl_names; - - _ThriftHiveMetastore_get_table_objects_by_name_args__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_tbl_names(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_get_table_objects_by_name_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(tbl_names == rhs.tbl_names)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_objects_by_name_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_objects_by_name_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_table_objects_by_name_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_table_objects_by_name_pargs() throw(); - const std::string* dbname; - const std::vector * tbl_names; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_objects_by_name_result__isset { - _ThriftHiveMetastore_get_table_objects_by_name_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_table_objects_by_name_result__isset; - -class ThriftHiveMetastore_get_table_objects_by_name_result { - public: - - ThriftHiveMetastore_get_table_objects_by_name_result(const ThriftHiveMetastore_get_table_objects_by_name_result&); - ThriftHiveMetastore_get_table_objects_by_name_result& operator=(const ThriftHiveMetastore_get_table_objects_by_name_result&); - ThriftHiveMetastore_get_table_objects_by_name_result() { - } - - virtual ~ThriftHiveMetastore_get_table_objects_by_name_result() throw(); - std::vector
success; - - _ThriftHiveMetastore_get_table_objects_by_name_result__isset __isset; - - void __set_success(const std::vector
& val); - - bool operator == (const ThriftHiveMetastore_get_table_objects_by_name_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_objects_by_name_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_objects_by_name_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_objects_by_name_presult__isset { - _ThriftHiveMetastore_get_table_objects_by_name_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_table_objects_by_name_presult__isset; - -class ThriftHiveMetastore_get_table_objects_by_name_presult { - public: - - - virtual ~ThriftHiveMetastore_get_table_objects_by_name_presult() throw(); - std::vector
* success; - - _ThriftHiveMetastore_get_table_objects_by_name_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_table_req_args__isset { - _ThriftHiveMetastore_get_table_req_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_get_table_req_args__isset; - -class ThriftHiveMetastore_get_table_req_args { - public: - - ThriftHiveMetastore_get_table_req_args(const ThriftHiveMetastore_get_table_req_args&); - ThriftHiveMetastore_get_table_req_args& operator=(const ThriftHiveMetastore_get_table_req_args&); - ThriftHiveMetastore_get_table_req_args() { - } - - virtual ~ThriftHiveMetastore_get_table_req_args() throw(); - GetTableRequest req; - - _ThriftHiveMetastore_get_table_req_args__isset __isset; - - void __set_req(const GetTableRequest& val); - - bool operator == (const ThriftHiveMetastore_get_table_req_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_req_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_req_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_table_req_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_table_req_pargs() throw(); - const GetTableRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_req_result__isset { - _ThriftHiveMetastore_get_table_req_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_table_req_result__isset; - -class ThriftHiveMetastore_get_table_req_result { - public: - - ThriftHiveMetastore_get_table_req_result(const ThriftHiveMetastore_get_table_req_result&); - ThriftHiveMetastore_get_table_req_result& operator=(const ThriftHiveMetastore_get_table_req_result&); - ThriftHiveMetastore_get_table_req_result() { - } - - virtual ~ThriftHiveMetastore_get_table_req_result() throw(); - GetTableResult success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_table_req_result__isset __isset; - - void __set_success(const GetTableResult& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_table_req_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_req_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_req_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_req_presult__isset { - _ThriftHiveMetastore_get_table_req_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_table_req_presult__isset; - -class ThriftHiveMetastore_get_table_req_presult { - public: - - - virtual ~ThriftHiveMetastore_get_table_req_presult() throw(); - GetTableResult* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_table_req_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_table_objects_by_name_req_args__isset { - _ThriftHiveMetastore_get_table_objects_by_name_req_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_get_table_objects_by_name_req_args__isset; - -class ThriftHiveMetastore_get_table_objects_by_name_req_args { - public: - - ThriftHiveMetastore_get_table_objects_by_name_req_args(const ThriftHiveMetastore_get_table_objects_by_name_req_args&); - ThriftHiveMetastore_get_table_objects_by_name_req_args& operator=(const ThriftHiveMetastore_get_table_objects_by_name_req_args&); - ThriftHiveMetastore_get_table_objects_by_name_req_args() { - } - - virtual ~ThriftHiveMetastore_get_table_objects_by_name_req_args() throw(); - GetTablesRequest req; - - _ThriftHiveMetastore_get_table_objects_by_name_req_args__isset __isset; - - void __set_req(const GetTablesRequest& val); - - bool operator == (const ThriftHiveMetastore_get_table_objects_by_name_req_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_objects_by_name_req_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_objects_by_name_req_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_table_objects_by_name_req_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_table_objects_by_name_req_pargs() throw(); - const GetTablesRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_objects_by_name_req_result__isset { - _ThriftHiveMetastore_get_table_objects_by_name_req_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_get_table_objects_by_name_req_result__isset; - -class ThriftHiveMetastore_get_table_objects_by_name_req_result { - public: - - ThriftHiveMetastore_get_table_objects_by_name_req_result(const ThriftHiveMetastore_get_table_objects_by_name_req_result&); - ThriftHiveMetastore_get_table_objects_by_name_req_result& operator=(const ThriftHiveMetastore_get_table_objects_by_name_req_result&); - ThriftHiveMetastore_get_table_objects_by_name_req_result() { - } - - virtual ~ThriftHiveMetastore_get_table_objects_by_name_req_result() throw(); - GetTablesResult success; - MetaException o1; - InvalidOperationException o2; - UnknownDBException o3; - - _ThriftHiveMetastore_get_table_objects_by_name_req_result__isset __isset; - - void __set_success(const GetTablesResult& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const InvalidOperationException& val); - - void __set_o3(const UnknownDBException& val); - - bool operator == (const ThriftHiveMetastore_get_table_objects_by_name_req_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_objects_by_name_req_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_objects_by_name_req_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_objects_by_name_req_presult__isset { - _ThriftHiveMetastore_get_table_objects_by_name_req_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_get_table_objects_by_name_req_presult__isset; - -class ThriftHiveMetastore_get_table_objects_by_name_req_presult { - public: - - - virtual ~ThriftHiveMetastore_get_table_objects_by_name_req_presult() throw(); - GetTablesResult* success; - MetaException o1; - InvalidOperationException o2; - UnknownDBException o3; - - _ThriftHiveMetastore_get_table_objects_by_name_req_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_table_names_by_filter_args__isset { - _ThriftHiveMetastore_get_table_names_by_filter_args__isset() : dbname(false), filter(false), max_tables(true) {} - bool dbname :1; - bool filter :1; - bool max_tables :1; -} _ThriftHiveMetastore_get_table_names_by_filter_args__isset; - -class ThriftHiveMetastore_get_table_names_by_filter_args { - public: - - ThriftHiveMetastore_get_table_names_by_filter_args(const ThriftHiveMetastore_get_table_names_by_filter_args&); - ThriftHiveMetastore_get_table_names_by_filter_args& operator=(const ThriftHiveMetastore_get_table_names_by_filter_args&); - ThriftHiveMetastore_get_table_names_by_filter_args() : dbname(), filter(), max_tables(-1) { - } - - virtual ~ThriftHiveMetastore_get_table_names_by_filter_args() throw(); - std::string dbname; - std::string filter; - int16_t max_tables; - - _ThriftHiveMetastore_get_table_names_by_filter_args__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_filter(const std::string& val); - - void __set_max_tables(const int16_t val); - - bool operator == (const ThriftHiveMetastore_get_table_names_by_filter_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(filter == rhs.filter)) - return false; - if (!(max_tables == rhs.max_tables)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_names_by_filter_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_names_by_filter_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_table_names_by_filter_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_table_names_by_filter_pargs() throw(); - const std::string* dbname; - const std::string* filter; - const int16_t* max_tables; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_names_by_filter_result__isset { - _ThriftHiveMetastore_get_table_names_by_filter_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_get_table_names_by_filter_result__isset; - -class ThriftHiveMetastore_get_table_names_by_filter_result { - public: - - ThriftHiveMetastore_get_table_names_by_filter_result(const ThriftHiveMetastore_get_table_names_by_filter_result&); - ThriftHiveMetastore_get_table_names_by_filter_result& operator=(const ThriftHiveMetastore_get_table_names_by_filter_result&); - ThriftHiveMetastore_get_table_names_by_filter_result() { - } - - virtual ~ThriftHiveMetastore_get_table_names_by_filter_result() throw(); - std::vector success; - MetaException o1; - InvalidOperationException o2; - UnknownDBException o3; - - _ThriftHiveMetastore_get_table_names_by_filter_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - void __set_o2(const InvalidOperationException& val); - - void __set_o3(const UnknownDBException& val); - - bool operator == (const ThriftHiveMetastore_get_table_names_by_filter_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_names_by_filter_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_names_by_filter_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_names_by_filter_presult__isset { - _ThriftHiveMetastore_get_table_names_by_filter_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_get_table_names_by_filter_presult__isset; - -class ThriftHiveMetastore_get_table_names_by_filter_presult { - public: - - - virtual ~ThriftHiveMetastore_get_table_names_by_filter_presult() throw(); - std::vector * success; - MetaException o1; - InvalidOperationException o2; - UnknownDBException o3; - - _ThriftHiveMetastore_get_table_names_by_filter_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_alter_table_args__isset { - _ThriftHiveMetastore_alter_table_args__isset() : dbname(false), tbl_name(false), new_tbl(false) {} - bool dbname :1; - bool tbl_name :1; - bool new_tbl :1; -} _ThriftHiveMetastore_alter_table_args__isset; - -class ThriftHiveMetastore_alter_table_args { - public: - - ThriftHiveMetastore_alter_table_args(const ThriftHiveMetastore_alter_table_args&); - ThriftHiveMetastore_alter_table_args& operator=(const ThriftHiveMetastore_alter_table_args&); - ThriftHiveMetastore_alter_table_args() : dbname(), tbl_name() { - } - - virtual ~ThriftHiveMetastore_alter_table_args() throw(); - std::string dbname; - std::string tbl_name; - Table new_tbl; - - _ThriftHiveMetastore_alter_table_args__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_new_tbl(const Table& val); - - bool operator == (const ThriftHiveMetastore_alter_table_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(new_tbl == rhs.new_tbl)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_table_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_table_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_alter_table_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_table_pargs() throw(); - const std::string* dbname; - const std::string* tbl_name; - const Table* new_tbl; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_table_result__isset { - _ThriftHiveMetastore_alter_table_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_table_result__isset; - -class ThriftHiveMetastore_alter_table_result { - public: - - ThriftHiveMetastore_alter_table_result(const ThriftHiveMetastore_alter_table_result&); - ThriftHiveMetastore_alter_table_result& operator=(const ThriftHiveMetastore_alter_table_result&); - ThriftHiveMetastore_alter_table_result() { - } - - virtual ~ThriftHiveMetastore_alter_table_result() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_table_result__isset __isset; - - void __set_o1(const InvalidOperationException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_alter_table_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_table_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_table_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_table_presult__isset { - _ThriftHiveMetastore_alter_table_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_table_presult__isset; - -class ThriftHiveMetastore_alter_table_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_table_presult() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_table_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_alter_table_with_environment_context_args__isset { - _ThriftHiveMetastore_alter_table_with_environment_context_args__isset() : dbname(false), tbl_name(false), new_tbl(false), environment_context(false) {} - bool dbname :1; - bool tbl_name :1; - bool new_tbl :1; - bool environment_context :1; -} _ThriftHiveMetastore_alter_table_with_environment_context_args__isset; - -class ThriftHiveMetastore_alter_table_with_environment_context_args { - public: - - ThriftHiveMetastore_alter_table_with_environment_context_args(const ThriftHiveMetastore_alter_table_with_environment_context_args&); - ThriftHiveMetastore_alter_table_with_environment_context_args& operator=(const ThriftHiveMetastore_alter_table_with_environment_context_args&); - ThriftHiveMetastore_alter_table_with_environment_context_args() : dbname(), tbl_name() { - } - - virtual ~ThriftHiveMetastore_alter_table_with_environment_context_args() throw(); - std::string dbname; - std::string tbl_name; - Table new_tbl; - EnvironmentContext environment_context; - - _ThriftHiveMetastore_alter_table_with_environment_context_args__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_new_tbl(const Table& val); - - void __set_environment_context(const EnvironmentContext& val); - - bool operator == (const ThriftHiveMetastore_alter_table_with_environment_context_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(new_tbl == rhs.new_tbl)) - return false; - if (!(environment_context == rhs.environment_context)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_table_with_environment_context_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_table_with_environment_context_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_alter_table_with_environment_context_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_table_with_environment_context_pargs() throw(); - const std::string* dbname; - const std::string* tbl_name; - const Table* new_tbl; - const EnvironmentContext* environment_context; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_table_with_environment_context_result__isset { - _ThriftHiveMetastore_alter_table_with_environment_context_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_table_with_environment_context_result__isset; - -class ThriftHiveMetastore_alter_table_with_environment_context_result { - public: - - ThriftHiveMetastore_alter_table_with_environment_context_result(const ThriftHiveMetastore_alter_table_with_environment_context_result&); - ThriftHiveMetastore_alter_table_with_environment_context_result& operator=(const ThriftHiveMetastore_alter_table_with_environment_context_result&); - ThriftHiveMetastore_alter_table_with_environment_context_result() { - } - - virtual ~ThriftHiveMetastore_alter_table_with_environment_context_result() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_table_with_environment_context_result__isset __isset; - - void __set_o1(const InvalidOperationException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_alter_table_with_environment_context_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_table_with_environment_context_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_table_with_environment_context_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_table_with_environment_context_presult__isset { - _ThriftHiveMetastore_alter_table_with_environment_context_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_table_with_environment_context_presult__isset; - -class ThriftHiveMetastore_alter_table_with_environment_context_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_table_with_environment_context_presult() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_table_with_environment_context_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_alter_table_with_cascade_args__isset { - _ThriftHiveMetastore_alter_table_with_cascade_args__isset() : dbname(false), tbl_name(false), new_tbl(false), cascade(false) {} - bool dbname :1; - bool tbl_name :1; - bool new_tbl :1; - bool cascade :1; -} _ThriftHiveMetastore_alter_table_with_cascade_args__isset; - -class ThriftHiveMetastore_alter_table_with_cascade_args { - public: - - ThriftHiveMetastore_alter_table_with_cascade_args(const ThriftHiveMetastore_alter_table_with_cascade_args&); - ThriftHiveMetastore_alter_table_with_cascade_args& operator=(const ThriftHiveMetastore_alter_table_with_cascade_args&); - ThriftHiveMetastore_alter_table_with_cascade_args() : dbname(), tbl_name(), cascade(0) { - } - - virtual ~ThriftHiveMetastore_alter_table_with_cascade_args() throw(); - std::string dbname; - std::string tbl_name; - Table new_tbl; - bool cascade; - - _ThriftHiveMetastore_alter_table_with_cascade_args__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_new_tbl(const Table& val); - - void __set_cascade(const bool val); - - bool operator == (const ThriftHiveMetastore_alter_table_with_cascade_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(new_tbl == rhs.new_tbl)) - return false; - if (!(cascade == rhs.cascade)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_table_with_cascade_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_table_with_cascade_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_alter_table_with_cascade_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_table_with_cascade_pargs() throw(); - const std::string* dbname; - const std::string* tbl_name; - const Table* new_tbl; - const bool* cascade; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_table_with_cascade_result__isset { - _ThriftHiveMetastore_alter_table_with_cascade_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_table_with_cascade_result__isset; - -class ThriftHiveMetastore_alter_table_with_cascade_result { - public: - - ThriftHiveMetastore_alter_table_with_cascade_result(const ThriftHiveMetastore_alter_table_with_cascade_result&); - ThriftHiveMetastore_alter_table_with_cascade_result& operator=(const ThriftHiveMetastore_alter_table_with_cascade_result&); - ThriftHiveMetastore_alter_table_with_cascade_result() { - } - - virtual ~ThriftHiveMetastore_alter_table_with_cascade_result() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_table_with_cascade_result__isset __isset; - - void __set_o1(const InvalidOperationException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_alter_table_with_cascade_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_table_with_cascade_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_table_with_cascade_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_table_with_cascade_presult__isset { - _ThriftHiveMetastore_alter_table_with_cascade_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_table_with_cascade_presult__isset; - -class ThriftHiveMetastore_alter_table_with_cascade_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_table_with_cascade_presult() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_table_with_cascade_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_partition_args__isset { - _ThriftHiveMetastore_add_partition_args__isset() : new_part(false) {} - bool new_part :1; -} _ThriftHiveMetastore_add_partition_args__isset; - -class ThriftHiveMetastore_add_partition_args { - public: - - ThriftHiveMetastore_add_partition_args(const ThriftHiveMetastore_add_partition_args&); - ThriftHiveMetastore_add_partition_args& operator=(const ThriftHiveMetastore_add_partition_args&); - ThriftHiveMetastore_add_partition_args() { - } - - virtual ~ThriftHiveMetastore_add_partition_args() throw(); - Partition new_part; - - _ThriftHiveMetastore_add_partition_args__isset __isset; - - void __set_new_part(const Partition& val); - - bool operator == (const ThriftHiveMetastore_add_partition_args & rhs) const - { - if (!(new_part == rhs.new_part)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_partition_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_partition_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_partition_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_partition_pargs() throw(); - const Partition* new_part; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_partition_result__isset { - _ThriftHiveMetastore_add_partition_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_add_partition_result__isset; - -class ThriftHiveMetastore_add_partition_result { - public: - - ThriftHiveMetastore_add_partition_result(const ThriftHiveMetastore_add_partition_result&); - ThriftHiveMetastore_add_partition_result& operator=(const ThriftHiveMetastore_add_partition_result&); - ThriftHiveMetastore_add_partition_result() { - } - - virtual ~ThriftHiveMetastore_add_partition_result() throw(); - Partition success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_add_partition_result__isset __isset; - - void __set_success(const Partition& val); - - void __set_o1(const InvalidObjectException& val); - - void __set_o2(const AlreadyExistsException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_add_partition_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_partition_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_partition_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_partition_presult__isset { - _ThriftHiveMetastore_add_partition_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_add_partition_presult__isset; - -class ThriftHiveMetastore_add_partition_presult { - public: - - - virtual ~ThriftHiveMetastore_add_partition_presult() throw(); - Partition* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_add_partition_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_partition_with_environment_context_args__isset { - _ThriftHiveMetastore_add_partition_with_environment_context_args__isset() : new_part(false), environment_context(false) {} - bool new_part :1; - bool environment_context :1; -} _ThriftHiveMetastore_add_partition_with_environment_context_args__isset; - -class ThriftHiveMetastore_add_partition_with_environment_context_args { - public: - - ThriftHiveMetastore_add_partition_with_environment_context_args(const ThriftHiveMetastore_add_partition_with_environment_context_args&); - ThriftHiveMetastore_add_partition_with_environment_context_args& operator=(const ThriftHiveMetastore_add_partition_with_environment_context_args&); - ThriftHiveMetastore_add_partition_with_environment_context_args() { - } - - virtual ~ThriftHiveMetastore_add_partition_with_environment_context_args() throw(); - Partition new_part; - EnvironmentContext environment_context; - - _ThriftHiveMetastore_add_partition_with_environment_context_args__isset __isset; - - void __set_new_part(const Partition& val); - - void __set_environment_context(const EnvironmentContext& val); - - bool operator == (const ThriftHiveMetastore_add_partition_with_environment_context_args & rhs) const - { - if (!(new_part == rhs.new_part)) - return false; - if (!(environment_context == rhs.environment_context)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_partition_with_environment_context_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_partition_with_environment_context_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_partition_with_environment_context_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_partition_with_environment_context_pargs() throw(); - const Partition* new_part; - const EnvironmentContext* environment_context; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_partition_with_environment_context_result__isset { - _ThriftHiveMetastore_add_partition_with_environment_context_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_add_partition_with_environment_context_result__isset; - -class ThriftHiveMetastore_add_partition_with_environment_context_result { - public: - - ThriftHiveMetastore_add_partition_with_environment_context_result(const ThriftHiveMetastore_add_partition_with_environment_context_result&); - ThriftHiveMetastore_add_partition_with_environment_context_result& operator=(const ThriftHiveMetastore_add_partition_with_environment_context_result&); - ThriftHiveMetastore_add_partition_with_environment_context_result() { - } - - virtual ~ThriftHiveMetastore_add_partition_with_environment_context_result() throw(); - Partition success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_add_partition_with_environment_context_result__isset __isset; - - void __set_success(const Partition& val); - - void __set_o1(const InvalidObjectException& val); - - void __set_o2(const AlreadyExistsException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_add_partition_with_environment_context_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_partition_with_environment_context_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_partition_with_environment_context_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_partition_with_environment_context_presult__isset { - _ThriftHiveMetastore_add_partition_with_environment_context_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_add_partition_with_environment_context_presult__isset; - -class ThriftHiveMetastore_add_partition_with_environment_context_presult { - public: - - - virtual ~ThriftHiveMetastore_add_partition_with_environment_context_presult() throw(); - Partition* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_add_partition_with_environment_context_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_partitions_args__isset { - _ThriftHiveMetastore_add_partitions_args__isset() : new_parts(false) {} - bool new_parts :1; -} _ThriftHiveMetastore_add_partitions_args__isset; - -class ThriftHiveMetastore_add_partitions_args { - public: - - ThriftHiveMetastore_add_partitions_args(const ThriftHiveMetastore_add_partitions_args&); - ThriftHiveMetastore_add_partitions_args& operator=(const ThriftHiveMetastore_add_partitions_args&); - ThriftHiveMetastore_add_partitions_args() { - } - - virtual ~ThriftHiveMetastore_add_partitions_args() throw(); - std::vector new_parts; - - _ThriftHiveMetastore_add_partitions_args__isset __isset; - - void __set_new_parts(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_add_partitions_args & rhs) const - { - if (!(new_parts == rhs.new_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_partitions_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_partitions_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_partitions_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_partitions_pargs() throw(); - const std::vector * new_parts; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_partitions_result__isset { - _ThriftHiveMetastore_add_partitions_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_add_partitions_result__isset; - -class ThriftHiveMetastore_add_partitions_result { - public: - - ThriftHiveMetastore_add_partitions_result(const ThriftHiveMetastore_add_partitions_result&); - ThriftHiveMetastore_add_partitions_result& operator=(const ThriftHiveMetastore_add_partitions_result&); - ThriftHiveMetastore_add_partitions_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_add_partitions_result() throw(); - int32_t success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_add_partitions_result__isset __isset; - - void __set_success(const int32_t val); - - void __set_o1(const InvalidObjectException& val); - - void __set_o2(const AlreadyExistsException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_add_partitions_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_partitions_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_partitions_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_partitions_presult__isset { - _ThriftHiveMetastore_add_partitions_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_add_partitions_presult__isset; - -class ThriftHiveMetastore_add_partitions_presult { - public: - - - virtual ~ThriftHiveMetastore_add_partitions_presult() throw(); - int32_t* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_add_partitions_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_partitions_pspec_args__isset { - _ThriftHiveMetastore_add_partitions_pspec_args__isset() : new_parts(false) {} - bool new_parts :1; -} _ThriftHiveMetastore_add_partitions_pspec_args__isset; - -class ThriftHiveMetastore_add_partitions_pspec_args { - public: - - ThriftHiveMetastore_add_partitions_pspec_args(const ThriftHiveMetastore_add_partitions_pspec_args&); - ThriftHiveMetastore_add_partitions_pspec_args& operator=(const ThriftHiveMetastore_add_partitions_pspec_args&); - ThriftHiveMetastore_add_partitions_pspec_args() { - } - - virtual ~ThriftHiveMetastore_add_partitions_pspec_args() throw(); - std::vector new_parts; - - _ThriftHiveMetastore_add_partitions_pspec_args__isset __isset; - - void __set_new_parts(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_add_partitions_pspec_args & rhs) const - { - if (!(new_parts == rhs.new_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_partitions_pspec_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_partitions_pspec_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_partitions_pspec_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_partitions_pspec_pargs() throw(); - const std::vector * new_parts; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_partitions_pspec_result__isset { - _ThriftHiveMetastore_add_partitions_pspec_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_add_partitions_pspec_result__isset; - -class ThriftHiveMetastore_add_partitions_pspec_result { - public: - - ThriftHiveMetastore_add_partitions_pspec_result(const ThriftHiveMetastore_add_partitions_pspec_result&); - ThriftHiveMetastore_add_partitions_pspec_result& operator=(const ThriftHiveMetastore_add_partitions_pspec_result&); - ThriftHiveMetastore_add_partitions_pspec_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_add_partitions_pspec_result() throw(); - int32_t success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_add_partitions_pspec_result__isset __isset; - - void __set_success(const int32_t val); - - void __set_o1(const InvalidObjectException& val); - - void __set_o2(const AlreadyExistsException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_add_partitions_pspec_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_partitions_pspec_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_partitions_pspec_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_partitions_pspec_presult__isset { - _ThriftHiveMetastore_add_partitions_pspec_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_add_partitions_pspec_presult__isset; - -class ThriftHiveMetastore_add_partitions_pspec_presult { - public: - - - virtual ~ThriftHiveMetastore_add_partitions_pspec_presult() throw(); - int32_t* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_add_partitions_pspec_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_append_partition_args__isset { - _ThriftHiveMetastore_append_partition_args__isset() : db_name(false), tbl_name(false), part_vals(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_vals :1; -} _ThriftHiveMetastore_append_partition_args__isset; - -class ThriftHiveMetastore_append_partition_args { - public: - - ThriftHiveMetastore_append_partition_args(const ThriftHiveMetastore_append_partition_args&); - ThriftHiveMetastore_append_partition_args& operator=(const ThriftHiveMetastore_append_partition_args&); - ThriftHiveMetastore_append_partition_args() : db_name(), tbl_name() { - } - - virtual ~ThriftHiveMetastore_append_partition_args() throw(); - std::string db_name; - std::string tbl_name; - std::vector part_vals; - - _ThriftHiveMetastore_append_partition_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_vals(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_append_partition_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_append_partition_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_append_partition_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_append_partition_pargs { - public: - - - virtual ~ThriftHiveMetastore_append_partition_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_append_partition_result__isset { - _ThriftHiveMetastore_append_partition_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_append_partition_result__isset; - -class ThriftHiveMetastore_append_partition_result { - public: - - ThriftHiveMetastore_append_partition_result(const ThriftHiveMetastore_append_partition_result&); - ThriftHiveMetastore_append_partition_result& operator=(const ThriftHiveMetastore_append_partition_result&); - ThriftHiveMetastore_append_partition_result() { - } - - virtual ~ThriftHiveMetastore_append_partition_result() throw(); - Partition success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_append_partition_result__isset __isset; - - void __set_success(const Partition& val); - - void __set_o1(const InvalidObjectException& val); - - void __set_o2(const AlreadyExistsException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_append_partition_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_append_partition_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_append_partition_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_append_partition_presult__isset { - _ThriftHiveMetastore_append_partition_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_append_partition_presult__isset; - -class ThriftHiveMetastore_append_partition_presult { - public: - - - virtual ~ThriftHiveMetastore_append_partition_presult() throw(); - Partition* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_append_partition_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_partitions_req_args__isset { - _ThriftHiveMetastore_add_partitions_req_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_add_partitions_req_args__isset; - -class ThriftHiveMetastore_add_partitions_req_args { - public: - - ThriftHiveMetastore_add_partitions_req_args(const ThriftHiveMetastore_add_partitions_req_args&); - ThriftHiveMetastore_add_partitions_req_args& operator=(const ThriftHiveMetastore_add_partitions_req_args&); - ThriftHiveMetastore_add_partitions_req_args() { - } - - virtual ~ThriftHiveMetastore_add_partitions_req_args() throw(); - AddPartitionsRequest request; - - _ThriftHiveMetastore_add_partitions_req_args__isset __isset; - - void __set_request(const AddPartitionsRequest& val); - - bool operator == (const ThriftHiveMetastore_add_partitions_req_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_partitions_req_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_partitions_req_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_partitions_req_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_partitions_req_pargs() throw(); - const AddPartitionsRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_partitions_req_result__isset { - _ThriftHiveMetastore_add_partitions_req_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_add_partitions_req_result__isset; - -class ThriftHiveMetastore_add_partitions_req_result { - public: - - ThriftHiveMetastore_add_partitions_req_result(const ThriftHiveMetastore_add_partitions_req_result&); - ThriftHiveMetastore_add_partitions_req_result& operator=(const ThriftHiveMetastore_add_partitions_req_result&); - ThriftHiveMetastore_add_partitions_req_result() { - } - - virtual ~ThriftHiveMetastore_add_partitions_req_result() throw(); - AddPartitionsResult success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_add_partitions_req_result__isset __isset; - - void __set_success(const AddPartitionsResult& val); - - void __set_o1(const InvalidObjectException& val); - - void __set_o2(const AlreadyExistsException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_add_partitions_req_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_partitions_req_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_partitions_req_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_partitions_req_presult__isset { - _ThriftHiveMetastore_add_partitions_req_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_add_partitions_req_presult__isset; - -class ThriftHiveMetastore_add_partitions_req_presult { - public: - - - virtual ~ThriftHiveMetastore_add_partitions_req_presult() throw(); - AddPartitionsResult* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_add_partitions_req_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_append_partition_with_environment_context_args__isset { - _ThriftHiveMetastore_append_partition_with_environment_context_args__isset() : db_name(false), tbl_name(false), part_vals(false), environment_context(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_vals :1; - bool environment_context :1; -} _ThriftHiveMetastore_append_partition_with_environment_context_args__isset; - -class ThriftHiveMetastore_append_partition_with_environment_context_args { - public: - - ThriftHiveMetastore_append_partition_with_environment_context_args(const ThriftHiveMetastore_append_partition_with_environment_context_args&); - ThriftHiveMetastore_append_partition_with_environment_context_args& operator=(const ThriftHiveMetastore_append_partition_with_environment_context_args&); - ThriftHiveMetastore_append_partition_with_environment_context_args() : db_name(), tbl_name() { - } - - virtual ~ThriftHiveMetastore_append_partition_with_environment_context_args() throw(); - std::string db_name; - std::string tbl_name; - std::vector part_vals; - EnvironmentContext environment_context; - - _ThriftHiveMetastore_append_partition_with_environment_context_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_vals(const std::vector & val); - - void __set_environment_context(const EnvironmentContext& val); - - bool operator == (const ThriftHiveMetastore_append_partition_with_environment_context_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(environment_context == rhs.environment_context)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_append_partition_with_environment_context_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_append_partition_with_environment_context_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_append_partition_with_environment_context_pargs { - public: - - - virtual ~ThriftHiveMetastore_append_partition_with_environment_context_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - const EnvironmentContext* environment_context; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_append_partition_with_environment_context_result__isset { - _ThriftHiveMetastore_append_partition_with_environment_context_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_append_partition_with_environment_context_result__isset; - -class ThriftHiveMetastore_append_partition_with_environment_context_result { - public: - - ThriftHiveMetastore_append_partition_with_environment_context_result(const ThriftHiveMetastore_append_partition_with_environment_context_result&); - ThriftHiveMetastore_append_partition_with_environment_context_result& operator=(const ThriftHiveMetastore_append_partition_with_environment_context_result&); - ThriftHiveMetastore_append_partition_with_environment_context_result() { - } - - virtual ~ThriftHiveMetastore_append_partition_with_environment_context_result() throw(); - Partition success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_append_partition_with_environment_context_result__isset __isset; - - void __set_success(const Partition& val); - - void __set_o1(const InvalidObjectException& val); - - void __set_o2(const AlreadyExistsException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_append_partition_with_environment_context_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_append_partition_with_environment_context_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_append_partition_with_environment_context_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_append_partition_with_environment_context_presult__isset { - _ThriftHiveMetastore_append_partition_with_environment_context_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_append_partition_with_environment_context_presult__isset; - -class ThriftHiveMetastore_append_partition_with_environment_context_presult { - public: - - - virtual ~ThriftHiveMetastore_append_partition_with_environment_context_presult() throw(); - Partition* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_append_partition_with_environment_context_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_append_partition_by_name_args__isset { - _ThriftHiveMetastore_append_partition_by_name_args__isset() : db_name(false), tbl_name(false), part_name(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_name :1; -} _ThriftHiveMetastore_append_partition_by_name_args__isset; - -class ThriftHiveMetastore_append_partition_by_name_args { - public: - - ThriftHiveMetastore_append_partition_by_name_args(const ThriftHiveMetastore_append_partition_by_name_args&); - ThriftHiveMetastore_append_partition_by_name_args& operator=(const ThriftHiveMetastore_append_partition_by_name_args&); - ThriftHiveMetastore_append_partition_by_name_args() : db_name(), tbl_name(), part_name() { - } - - virtual ~ThriftHiveMetastore_append_partition_by_name_args() throw(); - std::string db_name; - std::string tbl_name; - std::string part_name; - - _ThriftHiveMetastore_append_partition_by_name_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_append_partition_by_name_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_name == rhs.part_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_append_partition_by_name_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_append_partition_by_name_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_append_partition_by_name_pargs { - public: - - - virtual ~ThriftHiveMetastore_append_partition_by_name_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* part_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_append_partition_by_name_result__isset { - _ThriftHiveMetastore_append_partition_by_name_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_append_partition_by_name_result__isset; - -class ThriftHiveMetastore_append_partition_by_name_result { - public: - - ThriftHiveMetastore_append_partition_by_name_result(const ThriftHiveMetastore_append_partition_by_name_result&); - ThriftHiveMetastore_append_partition_by_name_result& operator=(const ThriftHiveMetastore_append_partition_by_name_result&); - ThriftHiveMetastore_append_partition_by_name_result() { - } - - virtual ~ThriftHiveMetastore_append_partition_by_name_result() throw(); - Partition success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_append_partition_by_name_result__isset __isset; - - void __set_success(const Partition& val); - - void __set_o1(const InvalidObjectException& val); - - void __set_o2(const AlreadyExistsException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_append_partition_by_name_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_append_partition_by_name_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_append_partition_by_name_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_append_partition_by_name_presult__isset { - _ThriftHiveMetastore_append_partition_by_name_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_append_partition_by_name_presult__isset; - -class ThriftHiveMetastore_append_partition_by_name_presult { - public: - - - virtual ~ThriftHiveMetastore_append_partition_by_name_presult() throw(); - Partition* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_append_partition_by_name_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_append_partition_by_name_with_environment_context_args__isset { - _ThriftHiveMetastore_append_partition_by_name_with_environment_context_args__isset() : db_name(false), tbl_name(false), part_name(false), environment_context(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_name :1; - bool environment_context :1; -} _ThriftHiveMetastore_append_partition_by_name_with_environment_context_args__isset; - -class ThriftHiveMetastore_append_partition_by_name_with_environment_context_args { - public: - - ThriftHiveMetastore_append_partition_by_name_with_environment_context_args(const ThriftHiveMetastore_append_partition_by_name_with_environment_context_args&); - ThriftHiveMetastore_append_partition_by_name_with_environment_context_args& operator=(const ThriftHiveMetastore_append_partition_by_name_with_environment_context_args&); - ThriftHiveMetastore_append_partition_by_name_with_environment_context_args() : db_name(), tbl_name(), part_name() { - } - - virtual ~ThriftHiveMetastore_append_partition_by_name_with_environment_context_args() throw(); - std::string db_name; - std::string tbl_name; - std::string part_name; - EnvironmentContext environment_context; - - _ThriftHiveMetastore_append_partition_by_name_with_environment_context_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_name(const std::string& val); - - void __set_environment_context(const EnvironmentContext& val); - - bool operator == (const ThriftHiveMetastore_append_partition_by_name_with_environment_context_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_name == rhs.part_name)) - return false; - if (!(environment_context == rhs.environment_context)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_append_partition_by_name_with_environment_context_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_append_partition_by_name_with_environment_context_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs { - public: - - - virtual ~ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* part_name; - const EnvironmentContext* environment_context; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_append_partition_by_name_with_environment_context_result__isset { - _ThriftHiveMetastore_append_partition_by_name_with_environment_context_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_append_partition_by_name_with_environment_context_result__isset; - -class ThriftHiveMetastore_append_partition_by_name_with_environment_context_result { - public: - - ThriftHiveMetastore_append_partition_by_name_with_environment_context_result(const ThriftHiveMetastore_append_partition_by_name_with_environment_context_result&); - ThriftHiveMetastore_append_partition_by_name_with_environment_context_result& operator=(const ThriftHiveMetastore_append_partition_by_name_with_environment_context_result&); - ThriftHiveMetastore_append_partition_by_name_with_environment_context_result() { - } - - virtual ~ThriftHiveMetastore_append_partition_by_name_with_environment_context_result() throw(); - Partition success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_append_partition_by_name_with_environment_context_result__isset __isset; - - void __set_success(const Partition& val); - - void __set_o1(const InvalidObjectException& val); - - void __set_o2(const AlreadyExistsException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_append_partition_by_name_with_environment_context_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_append_partition_by_name_with_environment_context_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_append_partition_by_name_with_environment_context_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult__isset { - _ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult__isset; - -class ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult { - public: - - - virtual ~ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult() throw(); - Partition* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_partition_args__isset { - _ThriftHiveMetastore_drop_partition_args__isset() : db_name(false), tbl_name(false), part_vals(false), deleteData(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_vals :1; - bool deleteData :1; -} _ThriftHiveMetastore_drop_partition_args__isset; - -class ThriftHiveMetastore_drop_partition_args { - public: - - ThriftHiveMetastore_drop_partition_args(const ThriftHiveMetastore_drop_partition_args&); - ThriftHiveMetastore_drop_partition_args& operator=(const ThriftHiveMetastore_drop_partition_args&); - ThriftHiveMetastore_drop_partition_args() : db_name(), tbl_name(), deleteData(0) { - } - - virtual ~ThriftHiveMetastore_drop_partition_args() throw(); - std::string db_name; - std::string tbl_name; - std::vector part_vals; - bool deleteData; - - _ThriftHiveMetastore_drop_partition_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_vals(const std::vector & val); - - void __set_deleteData(const bool val); - - bool operator == (const ThriftHiveMetastore_drop_partition_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partition_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_partition_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_partition_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_partition_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - const bool* deleteData; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_partition_result__isset { - _ThriftHiveMetastore_drop_partition_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_partition_result__isset; - -class ThriftHiveMetastore_drop_partition_result { - public: - - ThriftHiveMetastore_drop_partition_result(const ThriftHiveMetastore_drop_partition_result&); - ThriftHiveMetastore_drop_partition_result& operator=(const ThriftHiveMetastore_drop_partition_result&); - ThriftHiveMetastore_drop_partition_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_drop_partition_result() throw(); - bool success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_drop_partition_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_drop_partition_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partition_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_partition_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_partition_presult__isset { - _ThriftHiveMetastore_drop_partition_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_partition_presult__isset; - -class ThriftHiveMetastore_drop_partition_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_partition_presult() throw(); - bool* success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_drop_partition_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_partition_with_environment_context_args__isset { - _ThriftHiveMetastore_drop_partition_with_environment_context_args__isset() : db_name(false), tbl_name(false), part_vals(false), deleteData(false), environment_context(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_vals :1; - bool deleteData :1; - bool environment_context :1; -} _ThriftHiveMetastore_drop_partition_with_environment_context_args__isset; - -class ThriftHiveMetastore_drop_partition_with_environment_context_args { - public: - - ThriftHiveMetastore_drop_partition_with_environment_context_args(const ThriftHiveMetastore_drop_partition_with_environment_context_args&); - ThriftHiveMetastore_drop_partition_with_environment_context_args& operator=(const ThriftHiveMetastore_drop_partition_with_environment_context_args&); - ThriftHiveMetastore_drop_partition_with_environment_context_args() : db_name(), tbl_name(), deleteData(0) { - } - - virtual ~ThriftHiveMetastore_drop_partition_with_environment_context_args() throw(); - std::string db_name; - std::string tbl_name; - std::vector part_vals; - bool deleteData; - EnvironmentContext environment_context; - - _ThriftHiveMetastore_drop_partition_with_environment_context_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_vals(const std::vector & val); - - void __set_deleteData(const bool val); - - void __set_environment_context(const EnvironmentContext& val); - - bool operator == (const ThriftHiveMetastore_drop_partition_with_environment_context_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - if (!(environment_context == rhs.environment_context)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partition_with_environment_context_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_partition_with_environment_context_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_partition_with_environment_context_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_partition_with_environment_context_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - const bool* deleteData; - const EnvironmentContext* environment_context; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_partition_with_environment_context_result__isset { - _ThriftHiveMetastore_drop_partition_with_environment_context_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_partition_with_environment_context_result__isset; - -class ThriftHiveMetastore_drop_partition_with_environment_context_result { - public: - - ThriftHiveMetastore_drop_partition_with_environment_context_result(const ThriftHiveMetastore_drop_partition_with_environment_context_result&); - ThriftHiveMetastore_drop_partition_with_environment_context_result& operator=(const ThriftHiveMetastore_drop_partition_with_environment_context_result&); - ThriftHiveMetastore_drop_partition_with_environment_context_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_drop_partition_with_environment_context_result() throw(); - bool success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_drop_partition_with_environment_context_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_drop_partition_with_environment_context_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partition_with_environment_context_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_partition_with_environment_context_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_partition_with_environment_context_presult__isset { - _ThriftHiveMetastore_drop_partition_with_environment_context_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_partition_with_environment_context_presult__isset; - -class ThriftHiveMetastore_drop_partition_with_environment_context_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_partition_with_environment_context_presult() throw(); - bool* success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_drop_partition_with_environment_context_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_partition_by_name_args__isset { - _ThriftHiveMetastore_drop_partition_by_name_args__isset() : db_name(false), tbl_name(false), part_name(false), deleteData(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_name :1; - bool deleteData :1; -} _ThriftHiveMetastore_drop_partition_by_name_args__isset; - -class ThriftHiveMetastore_drop_partition_by_name_args { - public: - - ThriftHiveMetastore_drop_partition_by_name_args(const ThriftHiveMetastore_drop_partition_by_name_args&); - ThriftHiveMetastore_drop_partition_by_name_args& operator=(const ThriftHiveMetastore_drop_partition_by_name_args&); - ThriftHiveMetastore_drop_partition_by_name_args() : db_name(), tbl_name(), part_name(), deleteData(0) { - } - - virtual ~ThriftHiveMetastore_drop_partition_by_name_args() throw(); - std::string db_name; - std::string tbl_name; - std::string part_name; - bool deleteData; - - _ThriftHiveMetastore_drop_partition_by_name_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_name(const std::string& val); - - void __set_deleteData(const bool val); - - bool operator == (const ThriftHiveMetastore_drop_partition_by_name_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_name == rhs.part_name)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partition_by_name_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_partition_by_name_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_partition_by_name_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_partition_by_name_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* part_name; - const bool* deleteData; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_partition_by_name_result__isset { - _ThriftHiveMetastore_drop_partition_by_name_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_partition_by_name_result__isset; - -class ThriftHiveMetastore_drop_partition_by_name_result { - public: - - ThriftHiveMetastore_drop_partition_by_name_result(const ThriftHiveMetastore_drop_partition_by_name_result&); - ThriftHiveMetastore_drop_partition_by_name_result& operator=(const ThriftHiveMetastore_drop_partition_by_name_result&); - ThriftHiveMetastore_drop_partition_by_name_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_drop_partition_by_name_result() throw(); - bool success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_drop_partition_by_name_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_drop_partition_by_name_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partition_by_name_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_partition_by_name_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_partition_by_name_presult__isset { - _ThriftHiveMetastore_drop_partition_by_name_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_partition_by_name_presult__isset; - -class ThriftHiveMetastore_drop_partition_by_name_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_partition_by_name_presult() throw(); - bool* success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_drop_partition_by_name_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args__isset { - _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args__isset() : db_name(false), tbl_name(false), part_name(false), deleteData(false), environment_context(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_name :1; - bool deleteData :1; - bool environment_context :1; -} _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args__isset; - -class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args { - public: - - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args(const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args&); - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args& operator=(const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args&); - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args() : db_name(), tbl_name(), part_name(), deleteData(0) { - } - - virtual ~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args() throw(); - std::string db_name; - std::string tbl_name; - std::string part_name; - bool deleteData; - EnvironmentContext environment_context; - - _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_name(const std::string& val); - - void __set_deleteData(const bool val); - - void __set_environment_context(const EnvironmentContext& val); - - bool operator == (const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_name == rhs.part_name)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - if (!(environment_context == rhs.environment_context)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* part_name; - const bool* deleteData; - const EnvironmentContext* environment_context; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result__isset { - _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result__isset; - -class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result { - public: - - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result(const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result&); - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result& operator=(const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result&); - ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result() throw(); - bool success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult__isset { - _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult__isset; - -class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult() throw(); - bool* success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_partitions_req_args__isset { - _ThriftHiveMetastore_drop_partitions_req_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_drop_partitions_req_args__isset; - -class ThriftHiveMetastore_drop_partitions_req_args { - public: - - ThriftHiveMetastore_drop_partitions_req_args(const ThriftHiveMetastore_drop_partitions_req_args&); - ThriftHiveMetastore_drop_partitions_req_args& operator=(const ThriftHiveMetastore_drop_partitions_req_args&); - ThriftHiveMetastore_drop_partitions_req_args() { - } - - virtual ~ThriftHiveMetastore_drop_partitions_req_args() throw(); - DropPartitionsRequest req; - - _ThriftHiveMetastore_drop_partitions_req_args__isset __isset; - - void __set_req(const DropPartitionsRequest& val); - - bool operator == (const ThriftHiveMetastore_drop_partitions_req_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partitions_req_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_partitions_req_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_partitions_req_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_partitions_req_pargs() throw(); - const DropPartitionsRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_partitions_req_result__isset { - _ThriftHiveMetastore_drop_partitions_req_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_partitions_req_result__isset; - -class ThriftHiveMetastore_drop_partitions_req_result { - public: - - ThriftHiveMetastore_drop_partitions_req_result(const ThriftHiveMetastore_drop_partitions_req_result&); - ThriftHiveMetastore_drop_partitions_req_result& operator=(const ThriftHiveMetastore_drop_partitions_req_result&); - ThriftHiveMetastore_drop_partitions_req_result() { - } - - virtual ~ThriftHiveMetastore_drop_partitions_req_result() throw(); - DropPartitionsResult success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_drop_partitions_req_result__isset __isset; - - void __set_success(const DropPartitionsResult& val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_drop_partitions_req_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_partitions_req_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_partitions_req_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_partitions_req_presult__isset { - _ThriftHiveMetastore_drop_partitions_req_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_partitions_req_presult__isset; - -class ThriftHiveMetastore_drop_partitions_req_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_partitions_req_presult() throw(); - DropPartitionsResult* success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_drop_partitions_req_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_partition_args__isset { - _ThriftHiveMetastore_get_partition_args__isset() : db_name(false), tbl_name(false), part_vals(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_vals :1; -} _ThriftHiveMetastore_get_partition_args__isset; - -class ThriftHiveMetastore_get_partition_args { - public: - - ThriftHiveMetastore_get_partition_args(const ThriftHiveMetastore_get_partition_args&); - ThriftHiveMetastore_get_partition_args& operator=(const ThriftHiveMetastore_get_partition_args&); - ThriftHiveMetastore_get_partition_args() : db_name(), tbl_name() { - } - - virtual ~ThriftHiveMetastore_get_partition_args() throw(); - std::string db_name; - std::string tbl_name; - std::vector part_vals; - - _ThriftHiveMetastore_get_partition_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_vals(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_get_partition_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partition_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partition_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partition_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partition_result__isset { - _ThriftHiveMetastore_get_partition_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partition_result__isset; - -class ThriftHiveMetastore_get_partition_result { - public: - - ThriftHiveMetastore_get_partition_result(const ThriftHiveMetastore_get_partition_result&); - ThriftHiveMetastore_get_partition_result& operator=(const ThriftHiveMetastore_get_partition_result&); - ThriftHiveMetastore_get_partition_result() { - } - - virtual ~ThriftHiveMetastore_get_partition_result() throw(); - Partition success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partition_result__isset __isset; - - void __set_success(const Partition& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_partition_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partition_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partition_presult__isset { - _ThriftHiveMetastore_get_partition_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partition_presult__isset; - -class ThriftHiveMetastore_get_partition_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partition_presult() throw(); - Partition* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partition_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_exchange_partition_args__isset { - _ThriftHiveMetastore_exchange_partition_args__isset() : partitionSpecs(false), source_db(false), source_table_name(false), dest_db(false), dest_table_name(false) {} - bool partitionSpecs :1; - bool source_db :1; - bool source_table_name :1; - bool dest_db :1; - bool dest_table_name :1; -} _ThriftHiveMetastore_exchange_partition_args__isset; - -class ThriftHiveMetastore_exchange_partition_args { - public: - - ThriftHiveMetastore_exchange_partition_args(const ThriftHiveMetastore_exchange_partition_args&); - ThriftHiveMetastore_exchange_partition_args& operator=(const ThriftHiveMetastore_exchange_partition_args&); - ThriftHiveMetastore_exchange_partition_args() : source_db(), source_table_name(), dest_db(), dest_table_name() { - } - - virtual ~ThriftHiveMetastore_exchange_partition_args() throw(); - std::map partitionSpecs; - std::string source_db; - std::string source_table_name; - std::string dest_db; - std::string dest_table_name; - - _ThriftHiveMetastore_exchange_partition_args__isset __isset; - - void __set_partitionSpecs(const std::map & val); - - void __set_source_db(const std::string& val); - - void __set_source_table_name(const std::string& val); - - void __set_dest_db(const std::string& val); - - void __set_dest_table_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_exchange_partition_args & rhs) const - { - if (!(partitionSpecs == rhs.partitionSpecs)) - return false; - if (!(source_db == rhs.source_db)) - return false; - if (!(source_table_name == rhs.source_table_name)) - return false; - if (!(dest_db == rhs.dest_db)) - return false; - if (!(dest_table_name == rhs.dest_table_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_exchange_partition_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_exchange_partition_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_exchange_partition_pargs { - public: - - - virtual ~ThriftHiveMetastore_exchange_partition_pargs() throw(); - const std::map * partitionSpecs; - const std::string* source_db; - const std::string* source_table_name; - const std::string* dest_db; - const std::string* dest_table_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_exchange_partition_result__isset { - _ThriftHiveMetastore_exchange_partition_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_exchange_partition_result__isset; - -class ThriftHiveMetastore_exchange_partition_result { - public: - - ThriftHiveMetastore_exchange_partition_result(const ThriftHiveMetastore_exchange_partition_result&); - ThriftHiveMetastore_exchange_partition_result& operator=(const ThriftHiveMetastore_exchange_partition_result&); - ThriftHiveMetastore_exchange_partition_result() { - } - - virtual ~ThriftHiveMetastore_exchange_partition_result() throw(); - Partition success; - MetaException o1; - NoSuchObjectException o2; - InvalidObjectException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_exchange_partition_result__isset __isset; - - void __set_success(const Partition& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - void __set_o3(const InvalidObjectException& val); - - void __set_o4(const InvalidInputException& val); - - bool operator == (const ThriftHiveMetastore_exchange_partition_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_exchange_partition_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_exchange_partition_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_exchange_partition_presult__isset { - _ThriftHiveMetastore_exchange_partition_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_exchange_partition_presult__isset; - -class ThriftHiveMetastore_exchange_partition_presult { - public: - - - virtual ~ThriftHiveMetastore_exchange_partition_presult() throw(); - Partition* success; - MetaException o1; - NoSuchObjectException o2; - InvalidObjectException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_exchange_partition_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_exchange_partitions_args__isset { - _ThriftHiveMetastore_exchange_partitions_args__isset() : partitionSpecs(false), source_db(false), source_table_name(false), dest_db(false), dest_table_name(false) {} - bool partitionSpecs :1; - bool source_db :1; - bool source_table_name :1; - bool dest_db :1; - bool dest_table_name :1; -} _ThriftHiveMetastore_exchange_partitions_args__isset; - -class ThriftHiveMetastore_exchange_partitions_args { - public: - - ThriftHiveMetastore_exchange_partitions_args(const ThriftHiveMetastore_exchange_partitions_args&); - ThriftHiveMetastore_exchange_partitions_args& operator=(const ThriftHiveMetastore_exchange_partitions_args&); - ThriftHiveMetastore_exchange_partitions_args() : source_db(), source_table_name(), dest_db(), dest_table_name() { - } - - virtual ~ThriftHiveMetastore_exchange_partitions_args() throw(); - std::map partitionSpecs; - std::string source_db; - std::string source_table_name; - std::string dest_db; - std::string dest_table_name; - - _ThriftHiveMetastore_exchange_partitions_args__isset __isset; - - void __set_partitionSpecs(const std::map & val); - - void __set_source_db(const std::string& val); - - void __set_source_table_name(const std::string& val); - - void __set_dest_db(const std::string& val); - - void __set_dest_table_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_exchange_partitions_args & rhs) const - { - if (!(partitionSpecs == rhs.partitionSpecs)) - return false; - if (!(source_db == rhs.source_db)) - return false; - if (!(source_table_name == rhs.source_table_name)) - return false; - if (!(dest_db == rhs.dest_db)) - return false; - if (!(dest_table_name == rhs.dest_table_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_exchange_partitions_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_exchange_partitions_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_exchange_partitions_pargs { - public: - - - virtual ~ThriftHiveMetastore_exchange_partitions_pargs() throw(); - const std::map * partitionSpecs; - const std::string* source_db; - const std::string* source_table_name; - const std::string* dest_db; - const std::string* dest_table_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_exchange_partitions_result__isset { - _ThriftHiveMetastore_exchange_partitions_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_exchange_partitions_result__isset; - -class ThriftHiveMetastore_exchange_partitions_result { - public: - - ThriftHiveMetastore_exchange_partitions_result(const ThriftHiveMetastore_exchange_partitions_result&); - ThriftHiveMetastore_exchange_partitions_result& operator=(const ThriftHiveMetastore_exchange_partitions_result&); - ThriftHiveMetastore_exchange_partitions_result() { - } - - virtual ~ThriftHiveMetastore_exchange_partitions_result() throw(); - std::vector success; - MetaException o1; - NoSuchObjectException o2; - InvalidObjectException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_exchange_partitions_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - void __set_o3(const InvalidObjectException& val); - - void __set_o4(const InvalidInputException& val); - - bool operator == (const ThriftHiveMetastore_exchange_partitions_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_exchange_partitions_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_exchange_partitions_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_exchange_partitions_presult__isset { - _ThriftHiveMetastore_exchange_partitions_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_exchange_partitions_presult__isset; - -class ThriftHiveMetastore_exchange_partitions_presult { - public: - - - virtual ~ThriftHiveMetastore_exchange_partitions_presult() throw(); - std::vector * success; - MetaException o1; - NoSuchObjectException o2; - InvalidObjectException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_exchange_partitions_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_partition_with_auth_args__isset { - _ThriftHiveMetastore_get_partition_with_auth_args__isset() : db_name(false), tbl_name(false), part_vals(false), user_name(false), group_names(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_vals :1; - bool user_name :1; - bool group_names :1; -} _ThriftHiveMetastore_get_partition_with_auth_args__isset; - -class ThriftHiveMetastore_get_partition_with_auth_args { - public: - - ThriftHiveMetastore_get_partition_with_auth_args(const ThriftHiveMetastore_get_partition_with_auth_args&); - ThriftHiveMetastore_get_partition_with_auth_args& operator=(const ThriftHiveMetastore_get_partition_with_auth_args&); - ThriftHiveMetastore_get_partition_with_auth_args() : db_name(), tbl_name(), user_name() { - } - - virtual ~ThriftHiveMetastore_get_partition_with_auth_args() throw(); - std::string db_name; - std::string tbl_name; - std::vector part_vals; - std::string user_name; - std::vector group_names; - - _ThriftHiveMetastore_get_partition_with_auth_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_vals(const std::vector & val); - - void __set_user_name(const std::string& val); - - void __set_group_names(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_get_partition_with_auth_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(user_name == rhs.user_name)) - return false; - if (!(group_names == rhs.group_names)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_with_auth_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partition_with_auth_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partition_with_auth_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partition_with_auth_pargs() throw(); - 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; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partition_with_auth_result__isset { - _ThriftHiveMetastore_get_partition_with_auth_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partition_with_auth_result__isset; - -class ThriftHiveMetastore_get_partition_with_auth_result { - public: - - ThriftHiveMetastore_get_partition_with_auth_result(const ThriftHiveMetastore_get_partition_with_auth_result&); - ThriftHiveMetastore_get_partition_with_auth_result& operator=(const ThriftHiveMetastore_get_partition_with_auth_result&); - ThriftHiveMetastore_get_partition_with_auth_result() { - } - - virtual ~ThriftHiveMetastore_get_partition_with_auth_result() throw(); - Partition success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partition_with_auth_result__isset __isset; - - void __set_success(const Partition& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_partition_with_auth_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_with_auth_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partition_with_auth_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partition_with_auth_presult__isset { - _ThriftHiveMetastore_get_partition_with_auth_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partition_with_auth_presult__isset; - -class ThriftHiveMetastore_get_partition_with_auth_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partition_with_auth_presult() throw(); - Partition* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partition_with_auth_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_partition_by_name_args__isset { - _ThriftHiveMetastore_get_partition_by_name_args__isset() : db_name(false), tbl_name(false), part_name(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_name :1; -} _ThriftHiveMetastore_get_partition_by_name_args__isset; - -class ThriftHiveMetastore_get_partition_by_name_args { - public: - - ThriftHiveMetastore_get_partition_by_name_args(const ThriftHiveMetastore_get_partition_by_name_args&); - ThriftHiveMetastore_get_partition_by_name_args& operator=(const ThriftHiveMetastore_get_partition_by_name_args&); - ThriftHiveMetastore_get_partition_by_name_args() : db_name(), tbl_name(), part_name() { - } - - virtual ~ThriftHiveMetastore_get_partition_by_name_args() throw(); - std::string db_name; - std::string tbl_name; - std::string part_name; - - _ThriftHiveMetastore_get_partition_by_name_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_partition_by_name_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_name == rhs.part_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_by_name_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partition_by_name_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partition_by_name_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partition_by_name_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* part_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partition_by_name_result__isset { - _ThriftHiveMetastore_get_partition_by_name_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partition_by_name_result__isset; - -class ThriftHiveMetastore_get_partition_by_name_result { - public: - - ThriftHiveMetastore_get_partition_by_name_result(const ThriftHiveMetastore_get_partition_by_name_result&); - ThriftHiveMetastore_get_partition_by_name_result& operator=(const ThriftHiveMetastore_get_partition_by_name_result&); - ThriftHiveMetastore_get_partition_by_name_result() { - } - - virtual ~ThriftHiveMetastore_get_partition_by_name_result() throw(); - Partition success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partition_by_name_result__isset __isset; - - void __set_success(const Partition& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_partition_by_name_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_by_name_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partition_by_name_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partition_by_name_presult__isset { - _ThriftHiveMetastore_get_partition_by_name_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partition_by_name_presult__isset; - -class ThriftHiveMetastore_get_partition_by_name_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partition_by_name_presult() throw(); - Partition* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partition_by_name_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_args__isset { - _ThriftHiveMetastore_get_partitions_args__isset() : db_name(false), tbl_name(false), max_parts(true) {} - bool db_name :1; - bool tbl_name :1; - bool max_parts :1; -} _ThriftHiveMetastore_get_partitions_args__isset; - -class ThriftHiveMetastore_get_partitions_args { - public: - - ThriftHiveMetastore_get_partitions_args(const ThriftHiveMetastore_get_partitions_args&); - ThriftHiveMetastore_get_partitions_args& operator=(const ThriftHiveMetastore_get_partitions_args&); - ThriftHiveMetastore_get_partitions_args() : db_name(), tbl_name(), max_parts(-1) { - } - - virtual ~ThriftHiveMetastore_get_partitions_args() throw(); - std::string db_name; - std::string tbl_name; - int16_t max_parts; - - _ThriftHiveMetastore_get_partitions_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_max_parts(const int16_t val); - - bool operator == (const ThriftHiveMetastore_get_partitions_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partitions_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const int16_t* max_parts; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_result__isset { - _ThriftHiveMetastore_get_partitions_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_result__isset; - -class ThriftHiveMetastore_get_partitions_result { - public: - - ThriftHiveMetastore_get_partitions_result(const ThriftHiveMetastore_get_partitions_result&); - ThriftHiveMetastore_get_partitions_result& operator=(const ThriftHiveMetastore_get_partitions_result&); - ThriftHiveMetastore_get_partitions_result() { - } - - virtual ~ThriftHiveMetastore_get_partitions_result() throw(); - std::vector success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_partitions_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_partitions_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_presult__isset { - _ThriftHiveMetastore_get_partitions_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_presult__isset; - -class ThriftHiveMetastore_get_partitions_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_presult() throw(); - std::vector * success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_partitions_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_with_auth_args__isset { - _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 :1; - bool tbl_name :1; - bool max_parts :1; - bool user_name :1; - bool group_names :1; -} _ThriftHiveMetastore_get_partitions_with_auth_args__isset; - -class ThriftHiveMetastore_get_partitions_with_auth_args { - public: - - ThriftHiveMetastore_get_partitions_with_auth_args(const ThriftHiveMetastore_get_partitions_with_auth_args&); - ThriftHiveMetastore_get_partitions_with_auth_args& operator=(const ThriftHiveMetastore_get_partitions_with_auth_args&); - ThriftHiveMetastore_get_partitions_with_auth_args() : db_name(), tbl_name(), max_parts(-1), user_name() { - } - - virtual ~ThriftHiveMetastore_get_partitions_with_auth_args() throw(); - std::string db_name; - std::string tbl_name; - int16_t max_parts; - std::string user_name; - std::vector group_names; - - _ThriftHiveMetastore_get_partitions_with_auth_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_max_parts(const int16_t val); - - void __set_user_name(const std::string& val); - - void __set_group_names(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_get_partitions_with_auth_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - if (!(user_name == rhs.user_name)) - return false; - if (!(group_names == rhs.group_names)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_with_auth_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_with_auth_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partitions_with_auth_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_with_auth_pargs() throw(); - 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; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_with_auth_result__isset { - _ThriftHiveMetastore_get_partitions_with_auth_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_with_auth_result__isset; - -class ThriftHiveMetastore_get_partitions_with_auth_result { - public: - - ThriftHiveMetastore_get_partitions_with_auth_result(const ThriftHiveMetastore_get_partitions_with_auth_result&); - ThriftHiveMetastore_get_partitions_with_auth_result& operator=(const ThriftHiveMetastore_get_partitions_with_auth_result&); - ThriftHiveMetastore_get_partitions_with_auth_result() { - } - - virtual ~ThriftHiveMetastore_get_partitions_with_auth_result() throw(); - std::vector success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_partitions_with_auth_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_partitions_with_auth_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_with_auth_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_with_auth_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_with_auth_presult__isset { - _ThriftHiveMetastore_get_partitions_with_auth_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_with_auth_presult__isset; - -class ThriftHiveMetastore_get_partitions_with_auth_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_with_auth_presult() throw(); - std::vector * success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_partitions_with_auth_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_pspec_args__isset { - _ThriftHiveMetastore_get_partitions_pspec_args__isset() : db_name(false), tbl_name(false), max_parts(true) {} - bool db_name :1; - bool tbl_name :1; - bool max_parts :1; -} _ThriftHiveMetastore_get_partitions_pspec_args__isset; - -class ThriftHiveMetastore_get_partitions_pspec_args { - public: - - ThriftHiveMetastore_get_partitions_pspec_args(const ThriftHiveMetastore_get_partitions_pspec_args&); - ThriftHiveMetastore_get_partitions_pspec_args& operator=(const ThriftHiveMetastore_get_partitions_pspec_args&); - ThriftHiveMetastore_get_partitions_pspec_args() : db_name(), tbl_name(), max_parts(-1) { - } - - virtual ~ThriftHiveMetastore_get_partitions_pspec_args() throw(); - std::string db_name; - std::string tbl_name; - int32_t max_parts; - - _ThriftHiveMetastore_get_partitions_pspec_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_max_parts(const int32_t val); - - bool operator == (const ThriftHiveMetastore_get_partitions_pspec_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_pspec_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_pspec_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partitions_pspec_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_pspec_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const int32_t* max_parts; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_pspec_result__isset { - _ThriftHiveMetastore_get_partitions_pspec_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_pspec_result__isset; - -class ThriftHiveMetastore_get_partitions_pspec_result { - public: - - ThriftHiveMetastore_get_partitions_pspec_result(const ThriftHiveMetastore_get_partitions_pspec_result&); - ThriftHiveMetastore_get_partitions_pspec_result& operator=(const ThriftHiveMetastore_get_partitions_pspec_result&); - ThriftHiveMetastore_get_partitions_pspec_result() { - } - - virtual ~ThriftHiveMetastore_get_partitions_pspec_result() throw(); - std::vector success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_partitions_pspec_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_partitions_pspec_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_pspec_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_pspec_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_pspec_presult__isset { - _ThriftHiveMetastore_get_partitions_pspec_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_pspec_presult__isset; - -class ThriftHiveMetastore_get_partitions_pspec_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_pspec_presult() throw(); - std::vector * success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_partitions_pspec_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_partition_names_args__isset { - _ThriftHiveMetastore_get_partition_names_args__isset() : db_name(false), tbl_name(false), max_parts(true) {} - bool db_name :1; - bool tbl_name :1; - bool max_parts :1; -} _ThriftHiveMetastore_get_partition_names_args__isset; - -class ThriftHiveMetastore_get_partition_names_args { - public: - - ThriftHiveMetastore_get_partition_names_args(const ThriftHiveMetastore_get_partition_names_args&); - ThriftHiveMetastore_get_partition_names_args& operator=(const ThriftHiveMetastore_get_partition_names_args&); - ThriftHiveMetastore_get_partition_names_args() : db_name(), tbl_name(), max_parts(-1) { - } - - virtual ~ThriftHiveMetastore_get_partition_names_args() throw(); - std::string db_name; - std::string tbl_name; - int16_t max_parts; - - _ThriftHiveMetastore_get_partition_names_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_max_parts(const int16_t val); - - bool operator == (const ThriftHiveMetastore_get_partition_names_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_names_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partition_names_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partition_names_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partition_names_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const int16_t* max_parts; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partition_names_result__isset { - _ThriftHiveMetastore_get_partition_names_result__isset() : success(false), o2(false) {} - bool success :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partition_names_result__isset; - -class ThriftHiveMetastore_get_partition_names_result { - public: - - ThriftHiveMetastore_get_partition_names_result(const ThriftHiveMetastore_get_partition_names_result&); - ThriftHiveMetastore_get_partition_names_result& operator=(const ThriftHiveMetastore_get_partition_names_result&); - ThriftHiveMetastore_get_partition_names_result() { - } - - virtual ~ThriftHiveMetastore_get_partition_names_result() throw(); - std::vector success; - MetaException o2; - - _ThriftHiveMetastore_get_partition_names_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_partition_names_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_names_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partition_names_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partition_names_presult__isset { - _ThriftHiveMetastore_get_partition_names_presult__isset() : success(false), o2(false) {} - bool success :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partition_names_presult__isset; - -class ThriftHiveMetastore_get_partition_names_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partition_names_presult() throw(); - std::vector * success; - MetaException o2; - - _ThriftHiveMetastore_get_partition_names_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -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(true) {} - bool db_name :1; - bool tbl_name :1; - bool part_vals :1; - bool max_parts :1; -} _ThriftHiveMetastore_get_partitions_ps_args__isset; - -class ThriftHiveMetastore_get_partitions_ps_args { - public: - - ThriftHiveMetastore_get_partitions_ps_args(const ThriftHiveMetastore_get_partitions_ps_args&); - ThriftHiveMetastore_get_partitions_ps_args& operator=(const ThriftHiveMetastore_get_partitions_ps_args&); - ThriftHiveMetastore_get_partitions_ps_args() : db_name(), tbl_name(), max_parts(-1) { - } - - virtual ~ThriftHiveMetastore_get_partitions_ps_args() throw(); - std::string db_name; - std::string tbl_name; - std::vector part_vals; - int16_t max_parts; - - _ThriftHiveMetastore_get_partitions_ps_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_vals(const std::vector & val); - - void __set_max_parts(const int16_t val); - - bool operator == (const ThriftHiveMetastore_get_partitions_ps_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_ps_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_ps_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partitions_ps_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_ps_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - const int16_t* max_parts; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_ps_result__isset { - _ThriftHiveMetastore_get_partitions_ps_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_ps_result__isset; - -class ThriftHiveMetastore_get_partitions_ps_result { - public: - - ThriftHiveMetastore_get_partitions_ps_result(const ThriftHiveMetastore_get_partitions_ps_result&); - ThriftHiveMetastore_get_partitions_ps_result& operator=(const ThriftHiveMetastore_get_partitions_ps_result&); - ThriftHiveMetastore_get_partitions_ps_result() { - } - - virtual ~ThriftHiveMetastore_get_partitions_ps_result() throw(); - std::vector success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partitions_ps_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_partitions_ps_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_ps_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_ps_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_ps_presult__isset { - _ThriftHiveMetastore_get_partitions_ps_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_ps_presult__isset; - -class ThriftHiveMetastore_get_partitions_ps_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_ps_presult() throw(); - std::vector * success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partitions_ps_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -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(true), user_name(false), group_names(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_vals :1; - bool max_parts :1; - bool user_name :1; - bool group_names :1; -} _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset; - -class ThriftHiveMetastore_get_partitions_ps_with_auth_args { - public: - - ThriftHiveMetastore_get_partitions_ps_with_auth_args(const ThriftHiveMetastore_get_partitions_ps_with_auth_args&); - ThriftHiveMetastore_get_partitions_ps_with_auth_args& operator=(const ThriftHiveMetastore_get_partitions_ps_with_auth_args&); - 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(); - std::string db_name; - std::string tbl_name; - std::vector part_vals; - int16_t max_parts; - std::string user_name; - std::vector group_names; - - _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_vals(const std::vector & val); - - void __set_max_parts(const int16_t val); - - void __set_user_name(const std::string& val); - - void __set_group_names(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_get_partitions_ps_with_auth_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - if (!(user_name == rhs.user_name)) - return false; - if (!(group_names == rhs.group_names)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_ps_with_auth_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_ps_with_auth_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partitions_ps_with_auth_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_pargs() throw(); - 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; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset { - _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset; - -class ThriftHiveMetastore_get_partitions_ps_with_auth_result { - public: - - ThriftHiveMetastore_get_partitions_ps_with_auth_result(const ThriftHiveMetastore_get_partitions_ps_with_auth_result&); - ThriftHiveMetastore_get_partitions_ps_with_auth_result& operator=(const ThriftHiveMetastore_get_partitions_ps_with_auth_result&); - ThriftHiveMetastore_get_partitions_ps_with_auth_result() { - } - - virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_result() throw(); - std::vector success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_partitions_ps_with_auth_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_ps_with_auth_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_ps_with_auth_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_ps_with_auth_presult__isset { - _ThriftHiveMetastore_get_partitions_ps_with_auth_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_ps_with_auth_presult__isset; - -class ThriftHiveMetastore_get_partitions_ps_with_auth_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_presult() throw(); - std::vector * success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_partitions_ps_with_auth_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -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(true) {} - bool db_name :1; - bool tbl_name :1; - bool part_vals :1; - bool max_parts :1; -} _ThriftHiveMetastore_get_partition_names_ps_args__isset; - -class ThriftHiveMetastore_get_partition_names_ps_args { - public: - - ThriftHiveMetastore_get_partition_names_ps_args(const ThriftHiveMetastore_get_partition_names_ps_args&); - ThriftHiveMetastore_get_partition_names_ps_args& operator=(const ThriftHiveMetastore_get_partition_names_ps_args&); - ThriftHiveMetastore_get_partition_names_ps_args() : db_name(), tbl_name(), max_parts(-1) { - } - - virtual ~ThriftHiveMetastore_get_partition_names_ps_args() throw(); - std::string db_name; - std::string tbl_name; - std::vector part_vals; - int16_t max_parts; - - _ThriftHiveMetastore_get_partition_names_ps_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_vals(const std::vector & val); - - void __set_max_parts(const int16_t val); - - bool operator == (const ThriftHiveMetastore_get_partition_names_ps_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_names_ps_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partition_names_ps_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partition_names_ps_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partition_names_ps_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - const int16_t* max_parts; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partition_names_ps_result__isset { - _ThriftHiveMetastore_get_partition_names_ps_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partition_names_ps_result__isset; - -class ThriftHiveMetastore_get_partition_names_ps_result { - public: - - ThriftHiveMetastore_get_partition_names_ps_result(const ThriftHiveMetastore_get_partition_names_ps_result&); - ThriftHiveMetastore_get_partition_names_ps_result& operator=(const ThriftHiveMetastore_get_partition_names_ps_result&); - ThriftHiveMetastore_get_partition_names_ps_result() { - } - - virtual ~ThriftHiveMetastore_get_partition_names_ps_result() throw(); - std::vector success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partition_names_ps_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_partition_names_ps_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_names_ps_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partition_names_ps_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partition_names_ps_presult__isset { - _ThriftHiveMetastore_get_partition_names_ps_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partition_names_ps_presult__isset; - -class ThriftHiveMetastore_get_partition_names_ps_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partition_names_ps_presult() throw(); - std::vector * success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partition_names_ps_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -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(true) {} - bool db_name :1; - bool tbl_name :1; - bool filter :1; - bool max_parts :1; -} _ThriftHiveMetastore_get_partitions_by_filter_args__isset; - -class ThriftHiveMetastore_get_partitions_by_filter_args { - public: - - ThriftHiveMetastore_get_partitions_by_filter_args(const ThriftHiveMetastore_get_partitions_by_filter_args&); - ThriftHiveMetastore_get_partitions_by_filter_args& operator=(const ThriftHiveMetastore_get_partitions_by_filter_args&); - ThriftHiveMetastore_get_partitions_by_filter_args() : db_name(), tbl_name(), filter(), max_parts(-1) { - } - - virtual ~ThriftHiveMetastore_get_partitions_by_filter_args() throw(); - std::string db_name; - std::string tbl_name; - std::string filter; - int16_t max_parts; - - _ThriftHiveMetastore_get_partitions_by_filter_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_filter(const std::string& val); - - void __set_max_parts(const int16_t val); - - bool operator == (const ThriftHiveMetastore_get_partitions_by_filter_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(filter == rhs.filter)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_by_filter_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_by_filter_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partitions_by_filter_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_by_filter_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* filter; - const int16_t* max_parts; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_by_filter_result__isset { - _ThriftHiveMetastore_get_partitions_by_filter_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_by_filter_result__isset; - -class ThriftHiveMetastore_get_partitions_by_filter_result { - public: - - ThriftHiveMetastore_get_partitions_by_filter_result(const ThriftHiveMetastore_get_partitions_by_filter_result&); - ThriftHiveMetastore_get_partitions_by_filter_result& operator=(const ThriftHiveMetastore_get_partitions_by_filter_result&); - ThriftHiveMetastore_get_partitions_by_filter_result() { - } - - virtual ~ThriftHiveMetastore_get_partitions_by_filter_result() throw(); - std::vector success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partitions_by_filter_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_partitions_by_filter_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_by_filter_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_by_filter_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_by_filter_presult__isset { - _ThriftHiveMetastore_get_partitions_by_filter_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_by_filter_presult__isset; - -class ThriftHiveMetastore_get_partitions_by_filter_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_by_filter_presult() throw(); - std::vector * success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partitions_by_filter_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_part_specs_by_filter_args__isset { - _ThriftHiveMetastore_get_part_specs_by_filter_args__isset() : db_name(false), tbl_name(false), filter(false), max_parts(true) {} - bool db_name :1; - bool tbl_name :1; - bool filter :1; - bool max_parts :1; -} _ThriftHiveMetastore_get_part_specs_by_filter_args__isset; - -class ThriftHiveMetastore_get_part_specs_by_filter_args { - public: - - ThriftHiveMetastore_get_part_specs_by_filter_args(const ThriftHiveMetastore_get_part_specs_by_filter_args&); - ThriftHiveMetastore_get_part_specs_by_filter_args& operator=(const ThriftHiveMetastore_get_part_specs_by_filter_args&); - ThriftHiveMetastore_get_part_specs_by_filter_args() : db_name(), tbl_name(), filter(), max_parts(-1) { - } - - virtual ~ThriftHiveMetastore_get_part_specs_by_filter_args() throw(); - std::string db_name; - std::string tbl_name; - std::string filter; - int32_t max_parts; - - _ThriftHiveMetastore_get_part_specs_by_filter_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_filter(const std::string& val); - - void __set_max_parts(const int32_t val); - - bool operator == (const ThriftHiveMetastore_get_part_specs_by_filter_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(filter == rhs.filter)) - return false; - if (!(max_parts == rhs.max_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_part_specs_by_filter_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_part_specs_by_filter_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_part_specs_by_filter_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_part_specs_by_filter_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* filter; - const int32_t* max_parts; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_part_specs_by_filter_result__isset { - _ThriftHiveMetastore_get_part_specs_by_filter_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_part_specs_by_filter_result__isset; - -class ThriftHiveMetastore_get_part_specs_by_filter_result { - public: - - ThriftHiveMetastore_get_part_specs_by_filter_result(const ThriftHiveMetastore_get_part_specs_by_filter_result&); - ThriftHiveMetastore_get_part_specs_by_filter_result& operator=(const ThriftHiveMetastore_get_part_specs_by_filter_result&); - ThriftHiveMetastore_get_part_specs_by_filter_result() { - } - - virtual ~ThriftHiveMetastore_get_part_specs_by_filter_result() throw(); - std::vector success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_part_specs_by_filter_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_part_specs_by_filter_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_part_specs_by_filter_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_part_specs_by_filter_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_part_specs_by_filter_presult__isset { - _ThriftHiveMetastore_get_part_specs_by_filter_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_part_specs_by_filter_presult__isset; - -class ThriftHiveMetastore_get_part_specs_by_filter_presult { - public: - - - virtual ~ThriftHiveMetastore_get_part_specs_by_filter_presult() throw(); - std::vector * success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_part_specs_by_filter_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_by_expr_args__isset { - _ThriftHiveMetastore_get_partitions_by_expr_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_get_partitions_by_expr_args__isset; - -class ThriftHiveMetastore_get_partitions_by_expr_args { - public: - - ThriftHiveMetastore_get_partitions_by_expr_args(const ThriftHiveMetastore_get_partitions_by_expr_args&); - ThriftHiveMetastore_get_partitions_by_expr_args& operator=(const ThriftHiveMetastore_get_partitions_by_expr_args&); - ThriftHiveMetastore_get_partitions_by_expr_args() { - } - - virtual ~ThriftHiveMetastore_get_partitions_by_expr_args() throw(); - PartitionsByExprRequest req; - - _ThriftHiveMetastore_get_partitions_by_expr_args__isset __isset; - - void __set_req(const PartitionsByExprRequest& val); - - bool operator == (const ThriftHiveMetastore_get_partitions_by_expr_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_by_expr_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_by_expr_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partitions_by_expr_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_by_expr_pargs() throw(); - const PartitionsByExprRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_by_expr_result__isset { - _ThriftHiveMetastore_get_partitions_by_expr_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_by_expr_result__isset; - -class ThriftHiveMetastore_get_partitions_by_expr_result { - public: - - ThriftHiveMetastore_get_partitions_by_expr_result(const ThriftHiveMetastore_get_partitions_by_expr_result&); - ThriftHiveMetastore_get_partitions_by_expr_result& operator=(const ThriftHiveMetastore_get_partitions_by_expr_result&); - ThriftHiveMetastore_get_partitions_by_expr_result() { - } - - virtual ~ThriftHiveMetastore_get_partitions_by_expr_result() throw(); - PartitionsByExprResult success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partitions_by_expr_result__isset __isset; - - void __set_success(const PartitionsByExprResult& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_partitions_by_expr_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_by_expr_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_by_expr_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_by_expr_presult__isset { - _ThriftHiveMetastore_get_partitions_by_expr_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_by_expr_presult__isset; - -class ThriftHiveMetastore_get_partitions_by_expr_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_by_expr_presult() throw(); - PartitionsByExprResult* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partitions_by_expr_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_num_partitions_by_filter_args__isset { - _ThriftHiveMetastore_get_num_partitions_by_filter_args__isset() : db_name(false), tbl_name(false), filter(false) {} - bool db_name :1; - bool tbl_name :1; - bool filter :1; -} _ThriftHiveMetastore_get_num_partitions_by_filter_args__isset; - -class ThriftHiveMetastore_get_num_partitions_by_filter_args { - public: - - ThriftHiveMetastore_get_num_partitions_by_filter_args(const ThriftHiveMetastore_get_num_partitions_by_filter_args&); - ThriftHiveMetastore_get_num_partitions_by_filter_args& operator=(const ThriftHiveMetastore_get_num_partitions_by_filter_args&); - ThriftHiveMetastore_get_num_partitions_by_filter_args() : db_name(), tbl_name(), filter() { - } - - virtual ~ThriftHiveMetastore_get_num_partitions_by_filter_args() throw(); - std::string db_name; - std::string tbl_name; - std::string filter; - - _ThriftHiveMetastore_get_num_partitions_by_filter_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_filter(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_num_partitions_by_filter_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(filter == rhs.filter)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_num_partitions_by_filter_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_num_partitions_by_filter_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_num_partitions_by_filter_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_num_partitions_by_filter_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* filter; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_num_partitions_by_filter_result__isset { - _ThriftHiveMetastore_get_num_partitions_by_filter_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_num_partitions_by_filter_result__isset; - -class ThriftHiveMetastore_get_num_partitions_by_filter_result { - public: - - ThriftHiveMetastore_get_num_partitions_by_filter_result(const ThriftHiveMetastore_get_num_partitions_by_filter_result&); - ThriftHiveMetastore_get_num_partitions_by_filter_result& operator=(const ThriftHiveMetastore_get_num_partitions_by_filter_result&); - ThriftHiveMetastore_get_num_partitions_by_filter_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_get_num_partitions_by_filter_result() throw(); - int32_t success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_num_partitions_by_filter_result__isset __isset; - - void __set_success(const int32_t val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_num_partitions_by_filter_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_num_partitions_by_filter_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_num_partitions_by_filter_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_num_partitions_by_filter_presult__isset { - _ThriftHiveMetastore_get_num_partitions_by_filter_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_num_partitions_by_filter_presult__isset; - -class ThriftHiveMetastore_get_num_partitions_by_filter_presult { - public: - - - virtual ~ThriftHiveMetastore_get_num_partitions_by_filter_presult() throw(); - int32_t* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_num_partitions_by_filter_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_by_names_args__isset { - _ThriftHiveMetastore_get_partitions_by_names_args__isset() : db_name(false), tbl_name(false), names(false) {} - bool db_name :1; - bool tbl_name :1; - bool names :1; -} _ThriftHiveMetastore_get_partitions_by_names_args__isset; - -class ThriftHiveMetastore_get_partitions_by_names_args { - public: - - ThriftHiveMetastore_get_partitions_by_names_args(const ThriftHiveMetastore_get_partitions_by_names_args&); - ThriftHiveMetastore_get_partitions_by_names_args& operator=(const ThriftHiveMetastore_get_partitions_by_names_args&); - ThriftHiveMetastore_get_partitions_by_names_args() : db_name(), tbl_name() { - } - - virtual ~ThriftHiveMetastore_get_partitions_by_names_args() throw(); - std::string db_name; - std::string tbl_name; - std::vector names; - - _ThriftHiveMetastore_get_partitions_by_names_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_names(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_get_partitions_by_names_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(names == rhs.names)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_by_names_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_by_names_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partitions_by_names_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_by_names_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::vector * names; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_by_names_result__isset { - _ThriftHiveMetastore_get_partitions_by_names_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_by_names_result__isset; - -class ThriftHiveMetastore_get_partitions_by_names_result { - public: - - ThriftHiveMetastore_get_partitions_by_names_result(const ThriftHiveMetastore_get_partitions_by_names_result&); - ThriftHiveMetastore_get_partitions_by_names_result& operator=(const ThriftHiveMetastore_get_partitions_by_names_result&); - ThriftHiveMetastore_get_partitions_by_names_result() { - } - - virtual ~ThriftHiveMetastore_get_partitions_by_names_result() throw(); - std::vector success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partitions_by_names_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_partitions_by_names_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_by_names_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_by_names_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_by_names_presult__isset { - _ThriftHiveMetastore_get_partitions_by_names_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_by_names_presult__isset; - -class ThriftHiveMetastore_get_partitions_by_names_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_by_names_presult() throw(); - std::vector * success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_partitions_by_names_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_alter_partition_args__isset { - _ThriftHiveMetastore_alter_partition_args__isset() : db_name(false), tbl_name(false), new_part(false) {} - bool db_name :1; - bool tbl_name :1; - bool new_part :1; -} _ThriftHiveMetastore_alter_partition_args__isset; - -class ThriftHiveMetastore_alter_partition_args { - public: - - ThriftHiveMetastore_alter_partition_args(const ThriftHiveMetastore_alter_partition_args&); - ThriftHiveMetastore_alter_partition_args& operator=(const ThriftHiveMetastore_alter_partition_args&); - ThriftHiveMetastore_alter_partition_args() : db_name(), tbl_name() { - } - - virtual ~ThriftHiveMetastore_alter_partition_args() throw(); - std::string db_name; - std::string tbl_name; - Partition new_part; - - _ThriftHiveMetastore_alter_partition_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_new_part(const Partition& val); - - bool operator == (const ThriftHiveMetastore_alter_partition_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(new_part == rhs.new_part)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_partition_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_partition_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_alter_partition_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_partition_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const Partition* new_part; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_partition_result__isset { - _ThriftHiveMetastore_alter_partition_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_partition_result__isset; - -class ThriftHiveMetastore_alter_partition_result { - public: - - ThriftHiveMetastore_alter_partition_result(const ThriftHiveMetastore_alter_partition_result&); - ThriftHiveMetastore_alter_partition_result& operator=(const ThriftHiveMetastore_alter_partition_result&); - ThriftHiveMetastore_alter_partition_result() { - } - - virtual ~ThriftHiveMetastore_alter_partition_result() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_partition_result__isset __isset; - - void __set_o1(const InvalidOperationException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_alter_partition_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_partition_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_partition_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_partition_presult__isset { - _ThriftHiveMetastore_alter_partition_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_partition_presult__isset; - -class ThriftHiveMetastore_alter_partition_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_partition_presult() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_partition_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_alter_partitions_args__isset { - _ThriftHiveMetastore_alter_partitions_args__isset() : db_name(false), tbl_name(false), new_parts(false) {} - bool db_name :1; - bool tbl_name :1; - bool new_parts :1; -} _ThriftHiveMetastore_alter_partitions_args__isset; - -class ThriftHiveMetastore_alter_partitions_args { - public: - - ThriftHiveMetastore_alter_partitions_args(const ThriftHiveMetastore_alter_partitions_args&); - ThriftHiveMetastore_alter_partitions_args& operator=(const ThriftHiveMetastore_alter_partitions_args&); - ThriftHiveMetastore_alter_partitions_args() : db_name(), tbl_name() { - } - - virtual ~ThriftHiveMetastore_alter_partitions_args() throw(); - std::string db_name; - std::string tbl_name; - std::vector new_parts; - - _ThriftHiveMetastore_alter_partitions_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_new_parts(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_alter_partitions_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(new_parts == rhs.new_parts)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_partitions_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_partitions_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_alter_partitions_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_partitions_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::vector * new_parts; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_partitions_result__isset { - _ThriftHiveMetastore_alter_partitions_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_partitions_result__isset; - -class ThriftHiveMetastore_alter_partitions_result { - public: - - ThriftHiveMetastore_alter_partitions_result(const ThriftHiveMetastore_alter_partitions_result&); - ThriftHiveMetastore_alter_partitions_result& operator=(const ThriftHiveMetastore_alter_partitions_result&); - ThriftHiveMetastore_alter_partitions_result() { - } - - virtual ~ThriftHiveMetastore_alter_partitions_result() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_partitions_result__isset __isset; - - void __set_o1(const InvalidOperationException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_alter_partitions_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_partitions_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_partitions_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_partitions_presult__isset { - _ThriftHiveMetastore_alter_partitions_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_partitions_presult__isset; - -class ThriftHiveMetastore_alter_partitions_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_partitions_presult() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_partitions_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_alter_partitions_with_environment_context_args__isset { - _ThriftHiveMetastore_alter_partitions_with_environment_context_args__isset() : db_name(false), tbl_name(false), new_parts(false), environment_context(false) {} - bool db_name :1; - bool tbl_name :1; - bool new_parts :1; - bool environment_context :1; -} _ThriftHiveMetastore_alter_partitions_with_environment_context_args__isset; - -class ThriftHiveMetastore_alter_partitions_with_environment_context_args { - public: - - ThriftHiveMetastore_alter_partitions_with_environment_context_args(const ThriftHiveMetastore_alter_partitions_with_environment_context_args&); - ThriftHiveMetastore_alter_partitions_with_environment_context_args& operator=(const ThriftHiveMetastore_alter_partitions_with_environment_context_args&); - ThriftHiveMetastore_alter_partitions_with_environment_context_args() : db_name(), tbl_name() { - } - - virtual ~ThriftHiveMetastore_alter_partitions_with_environment_context_args() throw(); - std::string db_name; - std::string tbl_name; - std::vector new_parts; - EnvironmentContext environment_context; - - _ThriftHiveMetastore_alter_partitions_with_environment_context_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_new_parts(const std::vector & val); - - void __set_environment_context(const EnvironmentContext& val); - - bool operator == (const ThriftHiveMetastore_alter_partitions_with_environment_context_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(new_parts == rhs.new_parts)) - return false; - if (!(environment_context == rhs.environment_context)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_partitions_with_environment_context_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_partitions_with_environment_context_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_alter_partitions_with_environment_context_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_partitions_with_environment_context_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::vector * new_parts; - const EnvironmentContext* environment_context; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_partitions_with_environment_context_result__isset { - _ThriftHiveMetastore_alter_partitions_with_environment_context_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_partitions_with_environment_context_result__isset; - -class ThriftHiveMetastore_alter_partitions_with_environment_context_result { - public: - - ThriftHiveMetastore_alter_partitions_with_environment_context_result(const ThriftHiveMetastore_alter_partitions_with_environment_context_result&); - ThriftHiveMetastore_alter_partitions_with_environment_context_result& operator=(const ThriftHiveMetastore_alter_partitions_with_environment_context_result&); - ThriftHiveMetastore_alter_partitions_with_environment_context_result() { - } - - virtual ~ThriftHiveMetastore_alter_partitions_with_environment_context_result() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_partitions_with_environment_context_result__isset __isset; - - void __set_o1(const InvalidOperationException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_alter_partitions_with_environment_context_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_partitions_with_environment_context_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_partitions_with_environment_context_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_partitions_with_environment_context_presult__isset { - _ThriftHiveMetastore_alter_partitions_with_environment_context_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_partitions_with_environment_context_presult__isset; - -class ThriftHiveMetastore_alter_partitions_with_environment_context_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_partitions_with_environment_context_presult() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_partitions_with_environment_context_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_alter_partition_with_environment_context_args__isset { - _ThriftHiveMetastore_alter_partition_with_environment_context_args__isset() : db_name(false), tbl_name(false), new_part(false), environment_context(false) {} - bool db_name :1; - bool tbl_name :1; - bool new_part :1; - bool environment_context :1; -} _ThriftHiveMetastore_alter_partition_with_environment_context_args__isset; - -class ThriftHiveMetastore_alter_partition_with_environment_context_args { - public: - - ThriftHiveMetastore_alter_partition_with_environment_context_args(const ThriftHiveMetastore_alter_partition_with_environment_context_args&); - ThriftHiveMetastore_alter_partition_with_environment_context_args& operator=(const ThriftHiveMetastore_alter_partition_with_environment_context_args&); - ThriftHiveMetastore_alter_partition_with_environment_context_args() : db_name(), tbl_name() { - } - - virtual ~ThriftHiveMetastore_alter_partition_with_environment_context_args() throw(); - std::string db_name; - std::string tbl_name; - Partition new_part; - EnvironmentContext environment_context; - - _ThriftHiveMetastore_alter_partition_with_environment_context_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_new_part(const Partition& val); - - void __set_environment_context(const EnvironmentContext& val); - - bool operator == (const ThriftHiveMetastore_alter_partition_with_environment_context_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(new_part == rhs.new_part)) - return false; - if (!(environment_context == rhs.environment_context)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_partition_with_environment_context_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_partition_with_environment_context_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_alter_partition_with_environment_context_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_partition_with_environment_context_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const Partition* new_part; - const EnvironmentContext* environment_context; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_partition_with_environment_context_result__isset { - _ThriftHiveMetastore_alter_partition_with_environment_context_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_partition_with_environment_context_result__isset; - -class ThriftHiveMetastore_alter_partition_with_environment_context_result { - public: - - ThriftHiveMetastore_alter_partition_with_environment_context_result(const ThriftHiveMetastore_alter_partition_with_environment_context_result&); - ThriftHiveMetastore_alter_partition_with_environment_context_result& operator=(const ThriftHiveMetastore_alter_partition_with_environment_context_result&); - ThriftHiveMetastore_alter_partition_with_environment_context_result() { - } - - virtual ~ThriftHiveMetastore_alter_partition_with_environment_context_result() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_partition_with_environment_context_result__isset __isset; - - void __set_o1(const InvalidOperationException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_alter_partition_with_environment_context_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_partition_with_environment_context_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_partition_with_environment_context_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_partition_with_environment_context_presult__isset { - _ThriftHiveMetastore_alter_partition_with_environment_context_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_partition_with_environment_context_presult__isset; - -class ThriftHiveMetastore_alter_partition_with_environment_context_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_partition_with_environment_context_presult() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_partition_with_environment_context_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_rename_partition_args__isset { - _ThriftHiveMetastore_rename_partition_args__isset() : db_name(false), tbl_name(false), part_vals(false), new_part(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_vals :1; - bool new_part :1; -} _ThriftHiveMetastore_rename_partition_args__isset; - -class ThriftHiveMetastore_rename_partition_args { - public: - - ThriftHiveMetastore_rename_partition_args(const ThriftHiveMetastore_rename_partition_args&); - ThriftHiveMetastore_rename_partition_args& operator=(const ThriftHiveMetastore_rename_partition_args&); - ThriftHiveMetastore_rename_partition_args() : db_name(), tbl_name() { - } - - virtual ~ThriftHiveMetastore_rename_partition_args() throw(); - std::string db_name; - std::string tbl_name; - std::vector part_vals; - Partition new_part; - - _ThriftHiveMetastore_rename_partition_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_vals(const std::vector & val); - - void __set_new_part(const Partition& val); - - bool operator == (const ThriftHiveMetastore_rename_partition_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(new_part == rhs.new_part)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_rename_partition_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_rename_partition_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_rename_partition_pargs { - public: - - - virtual ~ThriftHiveMetastore_rename_partition_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::vector * part_vals; - const Partition* new_part; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_rename_partition_result__isset { - _ThriftHiveMetastore_rename_partition_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_rename_partition_result__isset; - -class ThriftHiveMetastore_rename_partition_result { - public: - - ThriftHiveMetastore_rename_partition_result(const ThriftHiveMetastore_rename_partition_result&); - ThriftHiveMetastore_rename_partition_result& operator=(const ThriftHiveMetastore_rename_partition_result&); - ThriftHiveMetastore_rename_partition_result() { - } - - virtual ~ThriftHiveMetastore_rename_partition_result() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_rename_partition_result__isset __isset; - - void __set_o1(const InvalidOperationException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_rename_partition_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_rename_partition_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_rename_partition_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_rename_partition_presult__isset { - _ThriftHiveMetastore_rename_partition_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_rename_partition_presult__isset; - -class ThriftHiveMetastore_rename_partition_presult { - public: - - - virtual ~ThriftHiveMetastore_rename_partition_presult() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_rename_partition_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_partition_name_has_valid_characters_args__isset { - _ThriftHiveMetastore_partition_name_has_valid_characters_args__isset() : part_vals(false), throw_exception(false) {} - bool part_vals :1; - bool throw_exception :1; -} _ThriftHiveMetastore_partition_name_has_valid_characters_args__isset; - -class ThriftHiveMetastore_partition_name_has_valid_characters_args { - public: - - ThriftHiveMetastore_partition_name_has_valid_characters_args(const ThriftHiveMetastore_partition_name_has_valid_characters_args&); - ThriftHiveMetastore_partition_name_has_valid_characters_args& operator=(const ThriftHiveMetastore_partition_name_has_valid_characters_args&); - ThriftHiveMetastore_partition_name_has_valid_characters_args() : throw_exception(0) { - } - - virtual ~ThriftHiveMetastore_partition_name_has_valid_characters_args() throw(); - std::vector part_vals; - bool throw_exception; - - _ThriftHiveMetastore_partition_name_has_valid_characters_args__isset __isset; - - void __set_part_vals(const std::vector & val); - - void __set_throw_exception(const bool val); - - bool operator == (const ThriftHiveMetastore_partition_name_has_valid_characters_args & rhs) const - { - if (!(part_vals == rhs.part_vals)) - return false; - if (!(throw_exception == rhs.throw_exception)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_partition_name_has_valid_characters_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_partition_name_has_valid_characters_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_partition_name_has_valid_characters_pargs { - public: - - - virtual ~ThriftHiveMetastore_partition_name_has_valid_characters_pargs() throw(); - const std::vector * part_vals; - const bool* throw_exception; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_partition_name_has_valid_characters_result__isset { - _ThriftHiveMetastore_partition_name_has_valid_characters_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_partition_name_has_valid_characters_result__isset; - -class ThriftHiveMetastore_partition_name_has_valid_characters_result { - public: - - ThriftHiveMetastore_partition_name_has_valid_characters_result(const ThriftHiveMetastore_partition_name_has_valid_characters_result&); - ThriftHiveMetastore_partition_name_has_valid_characters_result& operator=(const ThriftHiveMetastore_partition_name_has_valid_characters_result&); - ThriftHiveMetastore_partition_name_has_valid_characters_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_partition_name_has_valid_characters_result() throw(); - bool success; - MetaException o1; - - _ThriftHiveMetastore_partition_name_has_valid_characters_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_partition_name_has_valid_characters_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_partition_name_has_valid_characters_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_partition_name_has_valid_characters_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_partition_name_has_valid_characters_presult__isset { - _ThriftHiveMetastore_partition_name_has_valid_characters_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_partition_name_has_valid_characters_presult__isset; - -class ThriftHiveMetastore_partition_name_has_valid_characters_presult { - public: - - - virtual ~ThriftHiveMetastore_partition_name_has_valid_characters_presult() throw(); - bool* success; - MetaException o1; - - _ThriftHiveMetastore_partition_name_has_valid_characters_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_config_value_args__isset { - _ThriftHiveMetastore_get_config_value_args__isset() : name(false), defaultValue(false) {} - bool name :1; - bool defaultValue :1; -} _ThriftHiveMetastore_get_config_value_args__isset; - -class ThriftHiveMetastore_get_config_value_args { - public: - - ThriftHiveMetastore_get_config_value_args(const ThriftHiveMetastore_get_config_value_args&); - ThriftHiveMetastore_get_config_value_args& operator=(const ThriftHiveMetastore_get_config_value_args&); - ThriftHiveMetastore_get_config_value_args() : name(), defaultValue() { - } - - virtual ~ThriftHiveMetastore_get_config_value_args() throw(); - std::string name; - std::string defaultValue; - - _ThriftHiveMetastore_get_config_value_args__isset __isset; - - void __set_name(const std::string& val); - - void __set_defaultValue(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_config_value_args & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(defaultValue == rhs.defaultValue)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_config_value_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_config_value_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_config_value_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_config_value_pargs() throw(); - const std::string* name; - const std::string* defaultValue; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_config_value_result__isset { - _ThriftHiveMetastore_get_config_value_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_config_value_result__isset; - -class ThriftHiveMetastore_get_config_value_result { - public: - - ThriftHiveMetastore_get_config_value_result(const ThriftHiveMetastore_get_config_value_result&); - ThriftHiveMetastore_get_config_value_result& operator=(const ThriftHiveMetastore_get_config_value_result&); - ThriftHiveMetastore_get_config_value_result() : success() { - } - - virtual ~ThriftHiveMetastore_get_config_value_result() throw(); - std::string success; - ConfigValSecurityException o1; - - _ThriftHiveMetastore_get_config_value_result__isset __isset; - - void __set_success(const std::string& val); - - void __set_o1(const ConfigValSecurityException& val); - - bool operator == (const ThriftHiveMetastore_get_config_value_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_config_value_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_config_value_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_config_value_presult__isset { - _ThriftHiveMetastore_get_config_value_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_config_value_presult__isset; - -class ThriftHiveMetastore_get_config_value_presult { - public: - - - virtual ~ThriftHiveMetastore_get_config_value_presult() throw(); - std::string* success; - ConfigValSecurityException o1; - - _ThriftHiveMetastore_get_config_value_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_partition_name_to_vals_args__isset { - _ThriftHiveMetastore_partition_name_to_vals_args__isset() : part_name(false) {} - bool part_name :1; -} _ThriftHiveMetastore_partition_name_to_vals_args__isset; - -class ThriftHiveMetastore_partition_name_to_vals_args { - public: - - ThriftHiveMetastore_partition_name_to_vals_args(const ThriftHiveMetastore_partition_name_to_vals_args&); - ThriftHiveMetastore_partition_name_to_vals_args& operator=(const ThriftHiveMetastore_partition_name_to_vals_args&); - ThriftHiveMetastore_partition_name_to_vals_args() : part_name() { - } - - virtual ~ThriftHiveMetastore_partition_name_to_vals_args() throw(); - std::string part_name; - - _ThriftHiveMetastore_partition_name_to_vals_args__isset __isset; - - void __set_part_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_partition_name_to_vals_args & rhs) const - { - if (!(part_name == rhs.part_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_partition_name_to_vals_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_partition_name_to_vals_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_partition_name_to_vals_pargs { - public: - - - virtual ~ThriftHiveMetastore_partition_name_to_vals_pargs() throw(); - const std::string* part_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_partition_name_to_vals_result__isset { - _ThriftHiveMetastore_partition_name_to_vals_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_partition_name_to_vals_result__isset; - -class ThriftHiveMetastore_partition_name_to_vals_result { - public: - - ThriftHiveMetastore_partition_name_to_vals_result(const ThriftHiveMetastore_partition_name_to_vals_result&); - ThriftHiveMetastore_partition_name_to_vals_result& operator=(const ThriftHiveMetastore_partition_name_to_vals_result&); - ThriftHiveMetastore_partition_name_to_vals_result() { - } - - virtual ~ThriftHiveMetastore_partition_name_to_vals_result() throw(); - std::vector success; - MetaException o1; - - _ThriftHiveMetastore_partition_name_to_vals_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_partition_name_to_vals_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_partition_name_to_vals_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_partition_name_to_vals_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_partition_name_to_vals_presult__isset { - _ThriftHiveMetastore_partition_name_to_vals_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_partition_name_to_vals_presult__isset; - -class ThriftHiveMetastore_partition_name_to_vals_presult { - public: - - - virtual ~ThriftHiveMetastore_partition_name_to_vals_presult() throw(); - std::vector * success; - MetaException o1; - - _ThriftHiveMetastore_partition_name_to_vals_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_partition_name_to_spec_args__isset { - _ThriftHiveMetastore_partition_name_to_spec_args__isset() : part_name(false) {} - bool part_name :1; -} _ThriftHiveMetastore_partition_name_to_spec_args__isset; - -class ThriftHiveMetastore_partition_name_to_spec_args { - public: - - ThriftHiveMetastore_partition_name_to_spec_args(const ThriftHiveMetastore_partition_name_to_spec_args&); - ThriftHiveMetastore_partition_name_to_spec_args& operator=(const ThriftHiveMetastore_partition_name_to_spec_args&); - ThriftHiveMetastore_partition_name_to_spec_args() : part_name() { - } - - virtual ~ThriftHiveMetastore_partition_name_to_spec_args() throw(); - std::string part_name; - - _ThriftHiveMetastore_partition_name_to_spec_args__isset __isset; - - void __set_part_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_partition_name_to_spec_args & rhs) const - { - if (!(part_name == rhs.part_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_partition_name_to_spec_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_partition_name_to_spec_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_partition_name_to_spec_pargs { - public: - - - virtual ~ThriftHiveMetastore_partition_name_to_spec_pargs() throw(); - const std::string* part_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_partition_name_to_spec_result__isset { - _ThriftHiveMetastore_partition_name_to_spec_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_partition_name_to_spec_result__isset; - -class ThriftHiveMetastore_partition_name_to_spec_result { - public: - - ThriftHiveMetastore_partition_name_to_spec_result(const ThriftHiveMetastore_partition_name_to_spec_result&); - ThriftHiveMetastore_partition_name_to_spec_result& operator=(const ThriftHiveMetastore_partition_name_to_spec_result&); - ThriftHiveMetastore_partition_name_to_spec_result() { - } - - virtual ~ThriftHiveMetastore_partition_name_to_spec_result() throw(); - std::map success; - MetaException o1; - - _ThriftHiveMetastore_partition_name_to_spec_result__isset __isset; - - void __set_success(const std::map & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_partition_name_to_spec_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_partition_name_to_spec_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_partition_name_to_spec_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_partition_name_to_spec_presult__isset { - _ThriftHiveMetastore_partition_name_to_spec_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_partition_name_to_spec_presult__isset; - -class ThriftHiveMetastore_partition_name_to_spec_presult { - public: - - - virtual ~ThriftHiveMetastore_partition_name_to_spec_presult() throw(); - std::map * success; - MetaException o1; - - _ThriftHiveMetastore_partition_name_to_spec_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_markPartitionForEvent_args__isset { - _ThriftHiveMetastore_markPartitionForEvent_args__isset() : db_name(false), tbl_name(false), part_vals(false), eventType(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_vals :1; - bool eventType :1; -} _ThriftHiveMetastore_markPartitionForEvent_args__isset; - -class ThriftHiveMetastore_markPartitionForEvent_args { - public: - - ThriftHiveMetastore_markPartitionForEvent_args(const ThriftHiveMetastore_markPartitionForEvent_args&); - ThriftHiveMetastore_markPartitionForEvent_args& operator=(const ThriftHiveMetastore_markPartitionForEvent_args&); - ThriftHiveMetastore_markPartitionForEvent_args() : db_name(), tbl_name(), eventType((PartitionEventType::type)0) { - } - - virtual ~ThriftHiveMetastore_markPartitionForEvent_args() throw(); - std::string db_name; - std::string tbl_name; - std::map part_vals; - PartitionEventType::type eventType; - - _ThriftHiveMetastore_markPartitionForEvent_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_vals(const std::map & val); - - void __set_eventType(const PartitionEventType::type val); - - bool operator == (const ThriftHiveMetastore_markPartitionForEvent_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(eventType == rhs.eventType)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_markPartitionForEvent_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_markPartitionForEvent_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_markPartitionForEvent_pargs { - public: - - - virtual ~ThriftHiveMetastore_markPartitionForEvent_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::map * part_vals; - const PartitionEventType::type* eventType; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_markPartitionForEvent_result__isset { - _ThriftHiveMetastore_markPartitionForEvent_result__isset() : o1(false), o2(false), o3(false), o4(false), o5(false), o6(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; - bool o5 :1; - bool o6 :1; -} _ThriftHiveMetastore_markPartitionForEvent_result__isset; - -class ThriftHiveMetastore_markPartitionForEvent_result { - public: - - ThriftHiveMetastore_markPartitionForEvent_result(const ThriftHiveMetastore_markPartitionForEvent_result&); - ThriftHiveMetastore_markPartitionForEvent_result& operator=(const ThriftHiveMetastore_markPartitionForEvent_result&); - ThriftHiveMetastore_markPartitionForEvent_result() { - } - - virtual ~ThriftHiveMetastore_markPartitionForEvent_result() throw(); - MetaException o1; - NoSuchObjectException o2; - UnknownDBException o3; - UnknownTableException o4; - UnknownPartitionException o5; - InvalidPartitionException o6; - - _ThriftHiveMetastore_markPartitionForEvent_result__isset __isset; - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - void __set_o3(const UnknownDBException& val); - - void __set_o4(const UnknownTableException& val); - - void __set_o5(const UnknownPartitionException& val); - - void __set_o6(const InvalidPartitionException& val); - - bool operator == (const ThriftHiveMetastore_markPartitionForEvent_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - if (!(o5 == rhs.o5)) - return false; - if (!(o6 == rhs.o6)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_markPartitionForEvent_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_markPartitionForEvent_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_markPartitionForEvent_presult__isset { - _ThriftHiveMetastore_markPartitionForEvent_presult__isset() : o1(false), o2(false), o3(false), o4(false), o5(false), o6(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; - bool o5 :1; - bool o6 :1; -} _ThriftHiveMetastore_markPartitionForEvent_presult__isset; - -class ThriftHiveMetastore_markPartitionForEvent_presult { - public: - - - virtual ~ThriftHiveMetastore_markPartitionForEvent_presult() throw(); - MetaException o1; - NoSuchObjectException o2; - UnknownDBException o3; - UnknownTableException o4; - UnknownPartitionException o5; - InvalidPartitionException o6; - - _ThriftHiveMetastore_markPartitionForEvent_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_isPartitionMarkedForEvent_args__isset { - _ThriftHiveMetastore_isPartitionMarkedForEvent_args__isset() : db_name(false), tbl_name(false), part_vals(false), eventType(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_vals :1; - bool eventType :1; -} _ThriftHiveMetastore_isPartitionMarkedForEvent_args__isset; - -class ThriftHiveMetastore_isPartitionMarkedForEvent_args { - public: - - ThriftHiveMetastore_isPartitionMarkedForEvent_args(const ThriftHiveMetastore_isPartitionMarkedForEvent_args&); - ThriftHiveMetastore_isPartitionMarkedForEvent_args& operator=(const ThriftHiveMetastore_isPartitionMarkedForEvent_args&); - ThriftHiveMetastore_isPartitionMarkedForEvent_args() : db_name(), tbl_name(), eventType((PartitionEventType::type)0) { - } - - virtual ~ThriftHiveMetastore_isPartitionMarkedForEvent_args() throw(); - std::string db_name; - std::string tbl_name; - std::map part_vals; - PartitionEventType::type eventType; - - _ThriftHiveMetastore_isPartitionMarkedForEvent_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_vals(const std::map & val); - - void __set_eventType(const PartitionEventType::type val); - - bool operator == (const ThriftHiveMetastore_isPartitionMarkedForEvent_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_vals == rhs.part_vals)) - return false; - if (!(eventType == rhs.eventType)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_isPartitionMarkedForEvent_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_isPartitionMarkedForEvent_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_isPartitionMarkedForEvent_pargs { - public: - - - virtual ~ThriftHiveMetastore_isPartitionMarkedForEvent_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::map * part_vals; - const PartitionEventType::type* eventType; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_isPartitionMarkedForEvent_result__isset { - _ThriftHiveMetastore_isPartitionMarkedForEvent_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false), o5(false), o6(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; - bool o5 :1; - bool o6 :1; -} _ThriftHiveMetastore_isPartitionMarkedForEvent_result__isset; - -class ThriftHiveMetastore_isPartitionMarkedForEvent_result { - public: - - ThriftHiveMetastore_isPartitionMarkedForEvent_result(const ThriftHiveMetastore_isPartitionMarkedForEvent_result&); - ThriftHiveMetastore_isPartitionMarkedForEvent_result& operator=(const ThriftHiveMetastore_isPartitionMarkedForEvent_result&); - ThriftHiveMetastore_isPartitionMarkedForEvent_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_isPartitionMarkedForEvent_result() throw(); - bool success; - MetaException o1; - NoSuchObjectException o2; - UnknownDBException o3; - UnknownTableException o4; - UnknownPartitionException o5; - InvalidPartitionException o6; - - _ThriftHiveMetastore_isPartitionMarkedForEvent_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - void __set_o3(const UnknownDBException& val); - - void __set_o4(const UnknownTableException& val); - - void __set_o5(const UnknownPartitionException& val); - - void __set_o6(const InvalidPartitionException& val); - - bool operator == (const ThriftHiveMetastore_isPartitionMarkedForEvent_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - if (!(o5 == rhs.o5)) - return false; - if (!(o6 == rhs.o6)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_isPartitionMarkedForEvent_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_isPartitionMarkedForEvent_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_isPartitionMarkedForEvent_presult__isset { - _ThriftHiveMetastore_isPartitionMarkedForEvent_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false), o5(false), o6(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; - bool o5 :1; - bool o6 :1; -} _ThriftHiveMetastore_isPartitionMarkedForEvent_presult__isset; - -class ThriftHiveMetastore_isPartitionMarkedForEvent_presult { - public: - - - virtual ~ThriftHiveMetastore_isPartitionMarkedForEvent_presult() throw(); - bool* success; - MetaException o1; - NoSuchObjectException o2; - UnknownDBException o3; - UnknownTableException o4; - UnknownPartitionException o5; - InvalidPartitionException o6; - - _ThriftHiveMetastore_isPartitionMarkedForEvent_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_index_args__isset { - _ThriftHiveMetastore_add_index_args__isset() : new_index(false), index_table(false) {} - bool new_index :1; - bool index_table :1; -} _ThriftHiveMetastore_add_index_args__isset; - -class ThriftHiveMetastore_add_index_args { - public: - - ThriftHiveMetastore_add_index_args(const ThriftHiveMetastore_add_index_args&); - ThriftHiveMetastore_add_index_args& operator=(const ThriftHiveMetastore_add_index_args&); - ThriftHiveMetastore_add_index_args() { - } - - virtual ~ThriftHiveMetastore_add_index_args() throw(); - Index new_index; - Table index_table; - - _ThriftHiveMetastore_add_index_args__isset __isset; - - void __set_new_index(const Index& val); - - void __set_index_table(const Table& val); - - bool operator == (const ThriftHiveMetastore_add_index_args & rhs) const - { - if (!(new_index == rhs.new_index)) - return false; - if (!(index_table == rhs.index_table)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_index_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_index_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_index_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_index_pargs() throw(); - const Index* new_index; - const Table* index_table; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_index_result__isset { - _ThriftHiveMetastore_add_index_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_add_index_result__isset; - -class ThriftHiveMetastore_add_index_result { - public: - - ThriftHiveMetastore_add_index_result(const ThriftHiveMetastore_add_index_result&); - ThriftHiveMetastore_add_index_result& operator=(const ThriftHiveMetastore_add_index_result&); - ThriftHiveMetastore_add_index_result() { - } - - virtual ~ThriftHiveMetastore_add_index_result() throw(); - Index success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_add_index_result__isset __isset; - - void __set_success(const Index& val); - - void __set_o1(const InvalidObjectException& val); - - void __set_o2(const AlreadyExistsException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_add_index_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_index_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_index_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_index_presult__isset { - _ThriftHiveMetastore_add_index_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_add_index_presult__isset; - -class ThriftHiveMetastore_add_index_presult { - public: - - - virtual ~ThriftHiveMetastore_add_index_presult() throw(); - Index* success; - InvalidObjectException o1; - AlreadyExistsException o2; - MetaException o3; - - _ThriftHiveMetastore_add_index_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_alter_index_args__isset { - _ThriftHiveMetastore_alter_index_args__isset() : dbname(false), base_tbl_name(false), idx_name(false), new_idx(false) {} - bool dbname :1; - bool base_tbl_name :1; - bool idx_name :1; - bool new_idx :1; -} _ThriftHiveMetastore_alter_index_args__isset; - -class ThriftHiveMetastore_alter_index_args { - public: - - ThriftHiveMetastore_alter_index_args(const ThriftHiveMetastore_alter_index_args&); - ThriftHiveMetastore_alter_index_args& operator=(const ThriftHiveMetastore_alter_index_args&); - ThriftHiveMetastore_alter_index_args() : dbname(), base_tbl_name(), idx_name() { - } - - virtual ~ThriftHiveMetastore_alter_index_args() throw(); - std::string dbname; - std::string base_tbl_name; - std::string idx_name; - Index new_idx; - - _ThriftHiveMetastore_alter_index_args__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_base_tbl_name(const std::string& val); - - void __set_idx_name(const std::string& val); - - void __set_new_idx(const Index& val); - - bool operator == (const ThriftHiveMetastore_alter_index_args & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(base_tbl_name == rhs.base_tbl_name)) - return false; - if (!(idx_name == rhs.idx_name)) - return false; - if (!(new_idx == rhs.new_idx)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_index_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_index_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_alter_index_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_index_pargs() throw(); - const std::string* dbname; - const std::string* base_tbl_name; - const std::string* idx_name; - const Index* new_idx; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_index_result__isset { - _ThriftHiveMetastore_alter_index_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_index_result__isset; - -class ThriftHiveMetastore_alter_index_result { - public: - - ThriftHiveMetastore_alter_index_result(const ThriftHiveMetastore_alter_index_result&); - ThriftHiveMetastore_alter_index_result& operator=(const ThriftHiveMetastore_alter_index_result&); - ThriftHiveMetastore_alter_index_result() { - } - - virtual ~ThriftHiveMetastore_alter_index_result() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_index_result__isset __isset; - - void __set_o1(const InvalidOperationException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_alter_index_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_index_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_index_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_index_presult__isset { - _ThriftHiveMetastore_alter_index_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_index_presult__isset; - -class ThriftHiveMetastore_alter_index_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_index_presult() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_index_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_index_by_name_args__isset { - _ThriftHiveMetastore_drop_index_by_name_args__isset() : db_name(false), tbl_name(false), index_name(false), deleteData(false) {} - bool db_name :1; - bool tbl_name :1; - bool index_name :1; - bool deleteData :1; -} _ThriftHiveMetastore_drop_index_by_name_args__isset; - -class ThriftHiveMetastore_drop_index_by_name_args { - public: - - ThriftHiveMetastore_drop_index_by_name_args(const ThriftHiveMetastore_drop_index_by_name_args&); - ThriftHiveMetastore_drop_index_by_name_args& operator=(const ThriftHiveMetastore_drop_index_by_name_args&); - ThriftHiveMetastore_drop_index_by_name_args() : db_name(), tbl_name(), index_name(), deleteData(0) { - } - - virtual ~ThriftHiveMetastore_drop_index_by_name_args() throw(); - std::string db_name; - std::string tbl_name; - std::string index_name; - bool deleteData; - - _ThriftHiveMetastore_drop_index_by_name_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_index_name(const std::string& val); - - void __set_deleteData(const bool val); - - bool operator == (const ThriftHiveMetastore_drop_index_by_name_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(index_name == rhs.index_name)) - return false; - if (!(deleteData == rhs.deleteData)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_index_by_name_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_index_by_name_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_index_by_name_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_index_by_name_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* index_name; - const bool* deleteData; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_index_by_name_result__isset { - _ThriftHiveMetastore_drop_index_by_name_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_index_by_name_result__isset; - -class ThriftHiveMetastore_drop_index_by_name_result { - public: - - ThriftHiveMetastore_drop_index_by_name_result(const ThriftHiveMetastore_drop_index_by_name_result&); - ThriftHiveMetastore_drop_index_by_name_result& operator=(const ThriftHiveMetastore_drop_index_by_name_result&); - ThriftHiveMetastore_drop_index_by_name_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_drop_index_by_name_result() throw(); - bool success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_drop_index_by_name_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_drop_index_by_name_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_index_by_name_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_index_by_name_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_index_by_name_presult__isset { - _ThriftHiveMetastore_drop_index_by_name_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_drop_index_by_name_presult__isset; - -class ThriftHiveMetastore_drop_index_by_name_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_index_by_name_presult() throw(); - bool* success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_drop_index_by_name_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_index_by_name_args__isset { - _ThriftHiveMetastore_get_index_by_name_args__isset() : db_name(false), tbl_name(false), index_name(false) {} - bool db_name :1; - bool tbl_name :1; - bool index_name :1; -} _ThriftHiveMetastore_get_index_by_name_args__isset; - -class ThriftHiveMetastore_get_index_by_name_args { - public: - - ThriftHiveMetastore_get_index_by_name_args(const ThriftHiveMetastore_get_index_by_name_args&); - ThriftHiveMetastore_get_index_by_name_args& operator=(const ThriftHiveMetastore_get_index_by_name_args&); - ThriftHiveMetastore_get_index_by_name_args() : db_name(), tbl_name(), index_name() { - } - - virtual ~ThriftHiveMetastore_get_index_by_name_args() throw(); - std::string db_name; - std::string tbl_name; - std::string index_name; - - _ThriftHiveMetastore_get_index_by_name_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_index_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_index_by_name_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(index_name == rhs.index_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_index_by_name_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_index_by_name_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_index_by_name_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_index_by_name_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* index_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_index_by_name_result__isset { - _ThriftHiveMetastore_get_index_by_name_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_index_by_name_result__isset; - -class ThriftHiveMetastore_get_index_by_name_result { - public: - - ThriftHiveMetastore_get_index_by_name_result(const ThriftHiveMetastore_get_index_by_name_result&); - ThriftHiveMetastore_get_index_by_name_result& operator=(const ThriftHiveMetastore_get_index_by_name_result&); - ThriftHiveMetastore_get_index_by_name_result() { - } - - virtual ~ThriftHiveMetastore_get_index_by_name_result() throw(); - Index success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_index_by_name_result__isset __isset; - - void __set_success(const Index& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_index_by_name_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_index_by_name_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_index_by_name_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_index_by_name_presult__isset { - _ThriftHiveMetastore_get_index_by_name_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_index_by_name_presult__isset; - -class ThriftHiveMetastore_get_index_by_name_presult { - public: - - - virtual ~ThriftHiveMetastore_get_index_by_name_presult() throw(); - Index* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_index_by_name_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_indexes_args__isset { - _ThriftHiveMetastore_get_indexes_args__isset() : db_name(false), tbl_name(false), max_indexes(true) {} - bool db_name :1; - bool tbl_name :1; - bool max_indexes :1; -} _ThriftHiveMetastore_get_indexes_args__isset; - -class ThriftHiveMetastore_get_indexes_args { - public: - - ThriftHiveMetastore_get_indexes_args(const ThriftHiveMetastore_get_indexes_args&); - ThriftHiveMetastore_get_indexes_args& operator=(const ThriftHiveMetastore_get_indexes_args&); - ThriftHiveMetastore_get_indexes_args() : db_name(), tbl_name(), max_indexes(-1) { - } - - virtual ~ThriftHiveMetastore_get_indexes_args() throw(); - std::string db_name; - std::string tbl_name; - int16_t max_indexes; - - _ThriftHiveMetastore_get_indexes_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_max_indexes(const int16_t val); - - bool operator == (const ThriftHiveMetastore_get_indexes_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(max_indexes == rhs.max_indexes)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_indexes_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_indexes_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_indexes_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_indexes_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const int16_t* max_indexes; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_indexes_result__isset { - _ThriftHiveMetastore_get_indexes_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_indexes_result__isset; - -class ThriftHiveMetastore_get_indexes_result { - public: - - ThriftHiveMetastore_get_indexes_result(const ThriftHiveMetastore_get_indexes_result&); - ThriftHiveMetastore_get_indexes_result& operator=(const ThriftHiveMetastore_get_indexes_result&); - ThriftHiveMetastore_get_indexes_result() { - } - - virtual ~ThriftHiveMetastore_get_indexes_result() throw(); - std::vector success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_indexes_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_indexes_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_indexes_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_indexes_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_indexes_presult__isset { - _ThriftHiveMetastore_get_indexes_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_indexes_presult__isset; - -class ThriftHiveMetastore_get_indexes_presult { - public: - - - virtual ~ThriftHiveMetastore_get_indexes_presult() throw(); - std::vector * success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_indexes_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_index_names_args__isset { - _ThriftHiveMetastore_get_index_names_args__isset() : db_name(false), tbl_name(false), max_indexes(true) {} - bool db_name :1; - bool tbl_name :1; - bool max_indexes :1; -} _ThriftHiveMetastore_get_index_names_args__isset; - -class ThriftHiveMetastore_get_index_names_args { - public: - - ThriftHiveMetastore_get_index_names_args(const ThriftHiveMetastore_get_index_names_args&); - ThriftHiveMetastore_get_index_names_args& operator=(const ThriftHiveMetastore_get_index_names_args&); - ThriftHiveMetastore_get_index_names_args() : db_name(), tbl_name(), max_indexes(-1) { - } - - virtual ~ThriftHiveMetastore_get_index_names_args() throw(); - std::string db_name; - std::string tbl_name; - int16_t max_indexes; - - _ThriftHiveMetastore_get_index_names_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_max_indexes(const int16_t val); - - bool operator == (const ThriftHiveMetastore_get_index_names_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(max_indexes == rhs.max_indexes)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_index_names_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_index_names_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_index_names_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_index_names_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const int16_t* max_indexes; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_index_names_result__isset { - _ThriftHiveMetastore_get_index_names_result__isset() : success(false), o2(false) {} - bool success :1; - bool o2 :1; -} _ThriftHiveMetastore_get_index_names_result__isset; - -class ThriftHiveMetastore_get_index_names_result { - public: - - ThriftHiveMetastore_get_index_names_result(const ThriftHiveMetastore_get_index_names_result&); - ThriftHiveMetastore_get_index_names_result& operator=(const ThriftHiveMetastore_get_index_names_result&); - ThriftHiveMetastore_get_index_names_result() { - } - - virtual ~ThriftHiveMetastore_get_index_names_result() throw(); - std::vector success; - MetaException o2; - - _ThriftHiveMetastore_get_index_names_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_index_names_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_index_names_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_index_names_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_index_names_presult__isset { - _ThriftHiveMetastore_get_index_names_presult__isset() : success(false), o2(false) {} - bool success :1; - bool o2 :1; -} _ThriftHiveMetastore_get_index_names_presult__isset; - -class ThriftHiveMetastore_get_index_names_presult { - public: - - - virtual ~ThriftHiveMetastore_get_index_names_presult() throw(); - std::vector * success; - MetaException o2; - - _ThriftHiveMetastore_get_index_names_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_primary_keys_args__isset { - _ThriftHiveMetastore_get_primary_keys_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_get_primary_keys_args__isset; - -class ThriftHiveMetastore_get_primary_keys_args { - public: - - ThriftHiveMetastore_get_primary_keys_args(const ThriftHiveMetastore_get_primary_keys_args&); - ThriftHiveMetastore_get_primary_keys_args& operator=(const ThriftHiveMetastore_get_primary_keys_args&); - ThriftHiveMetastore_get_primary_keys_args() { - } - - virtual ~ThriftHiveMetastore_get_primary_keys_args() throw(); - PrimaryKeysRequest request; - - _ThriftHiveMetastore_get_primary_keys_args__isset __isset; - - void __set_request(const PrimaryKeysRequest& val); - - bool operator == (const ThriftHiveMetastore_get_primary_keys_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_primary_keys_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_primary_keys_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_primary_keys_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_primary_keys_pargs() throw(); - const PrimaryKeysRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_primary_keys_result__isset { - _ThriftHiveMetastore_get_primary_keys_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_primary_keys_result__isset; - -class ThriftHiveMetastore_get_primary_keys_result { - public: - - ThriftHiveMetastore_get_primary_keys_result(const ThriftHiveMetastore_get_primary_keys_result&); - ThriftHiveMetastore_get_primary_keys_result& operator=(const ThriftHiveMetastore_get_primary_keys_result&); - ThriftHiveMetastore_get_primary_keys_result() { - } - - virtual ~ThriftHiveMetastore_get_primary_keys_result() throw(); - PrimaryKeysResponse success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_primary_keys_result__isset __isset; - - void __set_success(const PrimaryKeysResponse& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_primary_keys_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_primary_keys_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_primary_keys_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_primary_keys_presult__isset { - _ThriftHiveMetastore_get_primary_keys_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_primary_keys_presult__isset; - -class ThriftHiveMetastore_get_primary_keys_presult { - public: - - - virtual ~ThriftHiveMetastore_get_primary_keys_presult() throw(); - PrimaryKeysResponse* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_primary_keys_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_foreign_keys_args__isset { - _ThriftHiveMetastore_get_foreign_keys_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_get_foreign_keys_args__isset; - -class ThriftHiveMetastore_get_foreign_keys_args { - public: - - ThriftHiveMetastore_get_foreign_keys_args(const ThriftHiveMetastore_get_foreign_keys_args&); - ThriftHiveMetastore_get_foreign_keys_args& operator=(const ThriftHiveMetastore_get_foreign_keys_args&); - ThriftHiveMetastore_get_foreign_keys_args() { - } - - virtual ~ThriftHiveMetastore_get_foreign_keys_args() throw(); - ForeignKeysRequest request; - - _ThriftHiveMetastore_get_foreign_keys_args__isset __isset; - - void __set_request(const ForeignKeysRequest& val); - - bool operator == (const ThriftHiveMetastore_get_foreign_keys_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_foreign_keys_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_foreign_keys_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_foreign_keys_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_foreign_keys_pargs() throw(); - const ForeignKeysRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_foreign_keys_result__isset { - _ThriftHiveMetastore_get_foreign_keys_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_foreign_keys_result__isset; - -class ThriftHiveMetastore_get_foreign_keys_result { - public: - - ThriftHiveMetastore_get_foreign_keys_result(const ThriftHiveMetastore_get_foreign_keys_result&); - ThriftHiveMetastore_get_foreign_keys_result& operator=(const ThriftHiveMetastore_get_foreign_keys_result&); - ThriftHiveMetastore_get_foreign_keys_result() { - } - - virtual ~ThriftHiveMetastore_get_foreign_keys_result() throw(); - ForeignKeysResponse success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_foreign_keys_result__isset __isset; - - void __set_success(const ForeignKeysResponse& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_foreign_keys_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_foreign_keys_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_foreign_keys_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_foreign_keys_presult__isset { - _ThriftHiveMetastore_get_foreign_keys_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_foreign_keys_presult__isset; - -class ThriftHiveMetastore_get_foreign_keys_presult { - public: - - - virtual ~ThriftHiveMetastore_get_foreign_keys_presult() throw(); - ForeignKeysResponse* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_foreign_keys_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_unique_constraints_args__isset { - _ThriftHiveMetastore_get_unique_constraints_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_get_unique_constraints_args__isset; - -class ThriftHiveMetastore_get_unique_constraints_args { - public: - - ThriftHiveMetastore_get_unique_constraints_args(const ThriftHiveMetastore_get_unique_constraints_args&); - ThriftHiveMetastore_get_unique_constraints_args& operator=(const ThriftHiveMetastore_get_unique_constraints_args&); - ThriftHiveMetastore_get_unique_constraints_args() { - } - - virtual ~ThriftHiveMetastore_get_unique_constraints_args() throw(); - UniqueConstraintsRequest request; - - _ThriftHiveMetastore_get_unique_constraints_args__isset __isset; - - void __set_request(const UniqueConstraintsRequest& val); - - bool operator == (const ThriftHiveMetastore_get_unique_constraints_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_unique_constraints_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_unique_constraints_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_unique_constraints_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_unique_constraints_pargs() throw(); - const UniqueConstraintsRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_unique_constraints_result__isset { - _ThriftHiveMetastore_get_unique_constraints_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_unique_constraints_result__isset; - -class ThriftHiveMetastore_get_unique_constraints_result { - public: - - ThriftHiveMetastore_get_unique_constraints_result(const ThriftHiveMetastore_get_unique_constraints_result&); - ThriftHiveMetastore_get_unique_constraints_result& operator=(const ThriftHiveMetastore_get_unique_constraints_result&); - ThriftHiveMetastore_get_unique_constraints_result() { - } - - virtual ~ThriftHiveMetastore_get_unique_constraints_result() throw(); - UniqueConstraintsResponse success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_unique_constraints_result__isset __isset; - - void __set_success(const UniqueConstraintsResponse& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_unique_constraints_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_unique_constraints_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_unique_constraints_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_unique_constraints_presult__isset { - _ThriftHiveMetastore_get_unique_constraints_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_unique_constraints_presult__isset; - -class ThriftHiveMetastore_get_unique_constraints_presult { - public: - - - virtual ~ThriftHiveMetastore_get_unique_constraints_presult() throw(); - UniqueConstraintsResponse* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_unique_constraints_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_not_null_constraints_args__isset { - _ThriftHiveMetastore_get_not_null_constraints_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_get_not_null_constraints_args__isset; - -class ThriftHiveMetastore_get_not_null_constraints_args { - public: - - ThriftHiveMetastore_get_not_null_constraints_args(const ThriftHiveMetastore_get_not_null_constraints_args&); - ThriftHiveMetastore_get_not_null_constraints_args& operator=(const ThriftHiveMetastore_get_not_null_constraints_args&); - ThriftHiveMetastore_get_not_null_constraints_args() { - } - - virtual ~ThriftHiveMetastore_get_not_null_constraints_args() throw(); - NotNullConstraintsRequest request; - - _ThriftHiveMetastore_get_not_null_constraints_args__isset __isset; - - void __set_request(const NotNullConstraintsRequest& val); - - bool operator == (const ThriftHiveMetastore_get_not_null_constraints_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_not_null_constraints_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_not_null_constraints_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_not_null_constraints_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_not_null_constraints_pargs() throw(); - const NotNullConstraintsRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_not_null_constraints_result__isset { - _ThriftHiveMetastore_get_not_null_constraints_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_not_null_constraints_result__isset; - -class ThriftHiveMetastore_get_not_null_constraints_result { - public: - - ThriftHiveMetastore_get_not_null_constraints_result(const ThriftHiveMetastore_get_not_null_constraints_result&); - ThriftHiveMetastore_get_not_null_constraints_result& operator=(const ThriftHiveMetastore_get_not_null_constraints_result&); - ThriftHiveMetastore_get_not_null_constraints_result() { - } - - virtual ~ThriftHiveMetastore_get_not_null_constraints_result() throw(); - NotNullConstraintsResponse success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_not_null_constraints_result__isset __isset; - - void __set_success(const NotNullConstraintsResponse& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_not_null_constraints_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_not_null_constraints_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_not_null_constraints_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_not_null_constraints_presult__isset { - _ThriftHiveMetastore_get_not_null_constraints_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_not_null_constraints_presult__isset; - -class ThriftHiveMetastore_get_not_null_constraints_presult { - public: - - - virtual ~ThriftHiveMetastore_get_not_null_constraints_presult() throw(); - NotNullConstraintsResponse* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_not_null_constraints_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_update_table_column_statistics_args__isset { - _ThriftHiveMetastore_update_table_column_statistics_args__isset() : stats_obj(false) {} - bool stats_obj :1; -} _ThriftHiveMetastore_update_table_column_statistics_args__isset; - -class ThriftHiveMetastore_update_table_column_statistics_args { - public: - - ThriftHiveMetastore_update_table_column_statistics_args(const ThriftHiveMetastore_update_table_column_statistics_args&); - ThriftHiveMetastore_update_table_column_statistics_args& operator=(const ThriftHiveMetastore_update_table_column_statistics_args&); - ThriftHiveMetastore_update_table_column_statistics_args() { - } - - virtual ~ThriftHiveMetastore_update_table_column_statistics_args() throw(); - ColumnStatistics stats_obj; - - _ThriftHiveMetastore_update_table_column_statistics_args__isset __isset; - - void __set_stats_obj(const ColumnStatistics& val); - - bool operator == (const ThriftHiveMetastore_update_table_column_statistics_args & rhs) const - { - if (!(stats_obj == rhs.stats_obj)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_update_table_column_statistics_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_update_table_column_statistics_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_update_table_column_statistics_pargs { - public: - - - virtual ~ThriftHiveMetastore_update_table_column_statistics_pargs() throw(); - const ColumnStatistics* stats_obj; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_update_table_column_statistics_result__isset { - _ThriftHiveMetastore_update_table_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_update_table_column_statistics_result__isset; - -class ThriftHiveMetastore_update_table_column_statistics_result { - public: - - ThriftHiveMetastore_update_table_column_statistics_result(const ThriftHiveMetastore_update_table_column_statistics_result&); - ThriftHiveMetastore_update_table_column_statistics_result& operator=(const ThriftHiveMetastore_update_table_column_statistics_result&); - ThriftHiveMetastore_update_table_column_statistics_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_update_table_column_statistics_result() throw(); - bool success; - NoSuchObjectException o1; - InvalidObjectException o2; - MetaException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_update_table_column_statistics_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const InvalidObjectException& val); - - void __set_o3(const MetaException& val); - - void __set_o4(const InvalidInputException& val); - - bool operator == (const ThriftHiveMetastore_update_table_column_statistics_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_update_table_column_statistics_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_update_table_column_statistics_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_update_table_column_statistics_presult__isset { - _ThriftHiveMetastore_update_table_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_update_table_column_statistics_presult__isset; - -class ThriftHiveMetastore_update_table_column_statistics_presult { - public: - - - virtual ~ThriftHiveMetastore_update_table_column_statistics_presult() throw(); - bool* success; - NoSuchObjectException o1; - InvalidObjectException o2; - MetaException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_update_table_column_statistics_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_update_partition_column_statistics_args__isset { - _ThriftHiveMetastore_update_partition_column_statistics_args__isset() : stats_obj(false) {} - bool stats_obj :1; -} _ThriftHiveMetastore_update_partition_column_statistics_args__isset; - -class ThriftHiveMetastore_update_partition_column_statistics_args { - public: - - ThriftHiveMetastore_update_partition_column_statistics_args(const ThriftHiveMetastore_update_partition_column_statistics_args&); - ThriftHiveMetastore_update_partition_column_statistics_args& operator=(const ThriftHiveMetastore_update_partition_column_statistics_args&); - ThriftHiveMetastore_update_partition_column_statistics_args() { - } - - virtual ~ThriftHiveMetastore_update_partition_column_statistics_args() throw(); - ColumnStatistics stats_obj; - - _ThriftHiveMetastore_update_partition_column_statistics_args__isset __isset; - - void __set_stats_obj(const ColumnStatistics& val); - - bool operator == (const ThriftHiveMetastore_update_partition_column_statistics_args & rhs) const - { - if (!(stats_obj == rhs.stats_obj)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_update_partition_column_statistics_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_update_partition_column_statistics_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_update_partition_column_statistics_pargs { - public: - - - virtual ~ThriftHiveMetastore_update_partition_column_statistics_pargs() throw(); - const ColumnStatistics* stats_obj; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_update_partition_column_statistics_result__isset { - _ThriftHiveMetastore_update_partition_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_update_partition_column_statistics_result__isset; - -class ThriftHiveMetastore_update_partition_column_statistics_result { - public: - - ThriftHiveMetastore_update_partition_column_statistics_result(const ThriftHiveMetastore_update_partition_column_statistics_result&); - ThriftHiveMetastore_update_partition_column_statistics_result& operator=(const ThriftHiveMetastore_update_partition_column_statistics_result&); - ThriftHiveMetastore_update_partition_column_statistics_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_update_partition_column_statistics_result() throw(); - bool success; - NoSuchObjectException o1; - InvalidObjectException o2; - MetaException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_update_partition_column_statistics_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const InvalidObjectException& val); - - void __set_o3(const MetaException& val); - - void __set_o4(const InvalidInputException& val); - - bool operator == (const ThriftHiveMetastore_update_partition_column_statistics_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_update_partition_column_statistics_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_update_partition_column_statistics_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_update_partition_column_statistics_presult__isset { - _ThriftHiveMetastore_update_partition_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_update_partition_column_statistics_presult__isset; - -class ThriftHiveMetastore_update_partition_column_statistics_presult { - public: - - - virtual ~ThriftHiveMetastore_update_partition_column_statistics_presult() throw(); - bool* success; - NoSuchObjectException o1; - InvalidObjectException o2; - MetaException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_update_partition_column_statistics_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_table_column_statistics_args__isset { - _ThriftHiveMetastore_get_table_column_statistics_args__isset() : db_name(false), tbl_name(false), col_name(false) {} - bool db_name :1; - bool tbl_name :1; - bool col_name :1; -} _ThriftHiveMetastore_get_table_column_statistics_args__isset; - -class ThriftHiveMetastore_get_table_column_statistics_args { - public: - - ThriftHiveMetastore_get_table_column_statistics_args(const ThriftHiveMetastore_get_table_column_statistics_args&); - ThriftHiveMetastore_get_table_column_statistics_args& operator=(const ThriftHiveMetastore_get_table_column_statistics_args&); - ThriftHiveMetastore_get_table_column_statistics_args() : db_name(), tbl_name(), col_name() { - } - - virtual ~ThriftHiveMetastore_get_table_column_statistics_args() throw(); - std::string db_name; - std::string tbl_name; - std::string col_name; - - _ThriftHiveMetastore_get_table_column_statistics_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_col_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_table_column_statistics_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(col_name == rhs.col_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_column_statistics_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_column_statistics_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_table_column_statistics_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_table_column_statistics_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* col_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_column_statistics_result__isset { - _ThriftHiveMetastore_get_table_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_get_table_column_statistics_result__isset; - -class ThriftHiveMetastore_get_table_column_statistics_result { - public: - - ThriftHiveMetastore_get_table_column_statistics_result(const ThriftHiveMetastore_get_table_column_statistics_result&); - ThriftHiveMetastore_get_table_column_statistics_result& operator=(const ThriftHiveMetastore_get_table_column_statistics_result&); - ThriftHiveMetastore_get_table_column_statistics_result() { - } - - virtual ~ThriftHiveMetastore_get_table_column_statistics_result() throw(); - ColumnStatistics success; - NoSuchObjectException o1; - MetaException o2; - InvalidInputException o3; - InvalidObjectException o4; - - _ThriftHiveMetastore_get_table_column_statistics_result__isset __isset; - - void __set_success(const ColumnStatistics& val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - void __set_o3(const InvalidInputException& val); - - void __set_o4(const InvalidObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_table_column_statistics_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_column_statistics_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_column_statistics_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_column_statistics_presult__isset { - _ThriftHiveMetastore_get_table_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_get_table_column_statistics_presult__isset; - -class ThriftHiveMetastore_get_table_column_statistics_presult { - public: - - - virtual ~ThriftHiveMetastore_get_table_column_statistics_presult() throw(); - ColumnStatistics* success; - NoSuchObjectException o1; - MetaException o2; - InvalidInputException o3; - InvalidObjectException o4; - - _ThriftHiveMetastore_get_table_column_statistics_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_partition_column_statistics_args__isset { - _ThriftHiveMetastore_get_partition_column_statistics_args__isset() : db_name(false), tbl_name(false), part_name(false), col_name(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_name :1; - bool col_name :1; -} _ThriftHiveMetastore_get_partition_column_statistics_args__isset; - -class ThriftHiveMetastore_get_partition_column_statistics_args { - public: - - ThriftHiveMetastore_get_partition_column_statistics_args(const ThriftHiveMetastore_get_partition_column_statistics_args&); - ThriftHiveMetastore_get_partition_column_statistics_args& operator=(const ThriftHiveMetastore_get_partition_column_statistics_args&); - ThriftHiveMetastore_get_partition_column_statistics_args() : db_name(), tbl_name(), part_name(), col_name() { - } - - virtual ~ThriftHiveMetastore_get_partition_column_statistics_args() throw(); - std::string db_name; - std::string tbl_name; - std::string part_name; - std::string col_name; - - _ThriftHiveMetastore_get_partition_column_statistics_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_name(const std::string& val); - - void __set_col_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_partition_column_statistics_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_name == rhs.part_name)) - return false; - if (!(col_name == rhs.col_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_column_statistics_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partition_column_statistics_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partition_column_statistics_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partition_column_statistics_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* part_name; - const std::string* col_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partition_column_statistics_result__isset { - _ThriftHiveMetastore_get_partition_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_get_partition_column_statistics_result__isset; - -class ThriftHiveMetastore_get_partition_column_statistics_result { - public: - - ThriftHiveMetastore_get_partition_column_statistics_result(const ThriftHiveMetastore_get_partition_column_statistics_result&); - ThriftHiveMetastore_get_partition_column_statistics_result& operator=(const ThriftHiveMetastore_get_partition_column_statistics_result&); - ThriftHiveMetastore_get_partition_column_statistics_result() { - } - - virtual ~ThriftHiveMetastore_get_partition_column_statistics_result() throw(); - ColumnStatistics success; - NoSuchObjectException o1; - MetaException o2; - InvalidInputException o3; - InvalidObjectException o4; - - _ThriftHiveMetastore_get_partition_column_statistics_result__isset __isset; - - void __set_success(const ColumnStatistics& val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - void __set_o3(const InvalidInputException& val); - - void __set_o4(const InvalidObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_partition_column_statistics_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partition_column_statistics_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partition_column_statistics_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partition_column_statistics_presult__isset { - _ThriftHiveMetastore_get_partition_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_get_partition_column_statistics_presult__isset; - -class ThriftHiveMetastore_get_partition_column_statistics_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partition_column_statistics_presult() throw(); - ColumnStatistics* success; - NoSuchObjectException o1; - MetaException o2; - InvalidInputException o3; - InvalidObjectException o4; - - _ThriftHiveMetastore_get_partition_column_statistics_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_table_statistics_req_args__isset { - _ThriftHiveMetastore_get_table_statistics_req_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_get_table_statistics_req_args__isset; - -class ThriftHiveMetastore_get_table_statistics_req_args { - public: - - ThriftHiveMetastore_get_table_statistics_req_args(const ThriftHiveMetastore_get_table_statistics_req_args&); - ThriftHiveMetastore_get_table_statistics_req_args& operator=(const ThriftHiveMetastore_get_table_statistics_req_args&); - ThriftHiveMetastore_get_table_statistics_req_args() { - } - - virtual ~ThriftHiveMetastore_get_table_statistics_req_args() throw(); - TableStatsRequest request; - - _ThriftHiveMetastore_get_table_statistics_req_args__isset __isset; - - void __set_request(const TableStatsRequest& val); - - bool operator == (const ThriftHiveMetastore_get_table_statistics_req_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_statistics_req_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_statistics_req_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_table_statistics_req_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_table_statistics_req_pargs() throw(); - const TableStatsRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_statistics_req_result__isset { - _ThriftHiveMetastore_get_table_statistics_req_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_table_statistics_req_result__isset; - -class ThriftHiveMetastore_get_table_statistics_req_result { - public: - - ThriftHiveMetastore_get_table_statistics_req_result(const ThriftHiveMetastore_get_table_statistics_req_result&); - ThriftHiveMetastore_get_table_statistics_req_result& operator=(const ThriftHiveMetastore_get_table_statistics_req_result&); - ThriftHiveMetastore_get_table_statistics_req_result() { - } - - virtual ~ThriftHiveMetastore_get_table_statistics_req_result() throw(); - TableStatsResult success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_table_statistics_req_result__isset __isset; - - void __set_success(const TableStatsResult& val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_table_statistics_req_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_table_statistics_req_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_table_statistics_req_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_table_statistics_req_presult__isset { - _ThriftHiveMetastore_get_table_statistics_req_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_table_statistics_req_presult__isset; - -class ThriftHiveMetastore_get_table_statistics_req_presult { - public: - - - virtual ~ThriftHiveMetastore_get_table_statistics_req_presult() throw(); - TableStatsResult* success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_table_statistics_req_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_statistics_req_args__isset { - _ThriftHiveMetastore_get_partitions_statistics_req_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_get_partitions_statistics_req_args__isset; - -class ThriftHiveMetastore_get_partitions_statistics_req_args { - public: - - ThriftHiveMetastore_get_partitions_statistics_req_args(const ThriftHiveMetastore_get_partitions_statistics_req_args&); - ThriftHiveMetastore_get_partitions_statistics_req_args& operator=(const ThriftHiveMetastore_get_partitions_statistics_req_args&); - ThriftHiveMetastore_get_partitions_statistics_req_args() { - } - - virtual ~ThriftHiveMetastore_get_partitions_statistics_req_args() throw(); - PartitionsStatsRequest request; - - _ThriftHiveMetastore_get_partitions_statistics_req_args__isset __isset; - - void __set_request(const PartitionsStatsRequest& val); - - bool operator == (const ThriftHiveMetastore_get_partitions_statistics_req_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_statistics_req_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_statistics_req_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_partitions_statistics_req_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_statistics_req_pargs() throw(); - const PartitionsStatsRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_statistics_req_result__isset { - _ThriftHiveMetastore_get_partitions_statistics_req_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_statistics_req_result__isset; - -class ThriftHiveMetastore_get_partitions_statistics_req_result { - public: - - ThriftHiveMetastore_get_partitions_statistics_req_result(const ThriftHiveMetastore_get_partitions_statistics_req_result&); - ThriftHiveMetastore_get_partitions_statistics_req_result& operator=(const ThriftHiveMetastore_get_partitions_statistics_req_result&); - ThriftHiveMetastore_get_partitions_statistics_req_result() { - } - - virtual ~ThriftHiveMetastore_get_partitions_statistics_req_result() throw(); - PartitionsStatsResult success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_partitions_statistics_req_result__isset __isset; - - void __set_success(const PartitionsStatsResult& val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_partitions_statistics_req_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_partitions_statistics_req_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_partitions_statistics_req_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_partitions_statistics_req_presult__isset { - _ThriftHiveMetastore_get_partitions_statistics_req_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_partitions_statistics_req_presult__isset; - -class ThriftHiveMetastore_get_partitions_statistics_req_presult { - public: - - - virtual ~ThriftHiveMetastore_get_partitions_statistics_req_presult() throw(); - PartitionsStatsResult* success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_partitions_statistics_req_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_aggr_stats_for_args__isset { - _ThriftHiveMetastore_get_aggr_stats_for_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_get_aggr_stats_for_args__isset; - -class ThriftHiveMetastore_get_aggr_stats_for_args { - public: - - ThriftHiveMetastore_get_aggr_stats_for_args(const ThriftHiveMetastore_get_aggr_stats_for_args&); - ThriftHiveMetastore_get_aggr_stats_for_args& operator=(const ThriftHiveMetastore_get_aggr_stats_for_args&); - ThriftHiveMetastore_get_aggr_stats_for_args() { - } - - virtual ~ThriftHiveMetastore_get_aggr_stats_for_args() throw(); - PartitionsStatsRequest request; - - _ThriftHiveMetastore_get_aggr_stats_for_args__isset __isset; - - void __set_request(const PartitionsStatsRequest& val); - - bool operator == (const ThriftHiveMetastore_get_aggr_stats_for_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_aggr_stats_for_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_aggr_stats_for_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_aggr_stats_for_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_aggr_stats_for_pargs() throw(); - const PartitionsStatsRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_aggr_stats_for_result__isset { - _ThriftHiveMetastore_get_aggr_stats_for_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_aggr_stats_for_result__isset; - -class ThriftHiveMetastore_get_aggr_stats_for_result { - public: - - ThriftHiveMetastore_get_aggr_stats_for_result(const ThriftHiveMetastore_get_aggr_stats_for_result&); - ThriftHiveMetastore_get_aggr_stats_for_result& operator=(const ThriftHiveMetastore_get_aggr_stats_for_result&); - ThriftHiveMetastore_get_aggr_stats_for_result() { - } - - virtual ~ThriftHiveMetastore_get_aggr_stats_for_result() throw(); - AggrStats success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_aggr_stats_for_result__isset __isset; - - void __set_success(const AggrStats& val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_aggr_stats_for_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_aggr_stats_for_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_aggr_stats_for_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_aggr_stats_for_presult__isset { - _ThriftHiveMetastore_get_aggr_stats_for_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_aggr_stats_for_presult__isset; - -class ThriftHiveMetastore_get_aggr_stats_for_presult { - public: - - - virtual ~ThriftHiveMetastore_get_aggr_stats_for_presult() throw(); - AggrStats* success; - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_get_aggr_stats_for_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_set_aggr_stats_for_args__isset { - _ThriftHiveMetastore_set_aggr_stats_for_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_set_aggr_stats_for_args__isset; - -class ThriftHiveMetastore_set_aggr_stats_for_args { - public: - - ThriftHiveMetastore_set_aggr_stats_for_args(const ThriftHiveMetastore_set_aggr_stats_for_args&); - ThriftHiveMetastore_set_aggr_stats_for_args& operator=(const ThriftHiveMetastore_set_aggr_stats_for_args&); - ThriftHiveMetastore_set_aggr_stats_for_args() { - } - - virtual ~ThriftHiveMetastore_set_aggr_stats_for_args() throw(); - SetPartitionsStatsRequest request; - - _ThriftHiveMetastore_set_aggr_stats_for_args__isset __isset; - - void __set_request(const SetPartitionsStatsRequest& val); - - bool operator == (const ThriftHiveMetastore_set_aggr_stats_for_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_set_aggr_stats_for_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_set_aggr_stats_for_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_set_aggr_stats_for_pargs { - public: - - - virtual ~ThriftHiveMetastore_set_aggr_stats_for_pargs() throw(); - const SetPartitionsStatsRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_set_aggr_stats_for_result__isset { - _ThriftHiveMetastore_set_aggr_stats_for_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_set_aggr_stats_for_result__isset; - -class ThriftHiveMetastore_set_aggr_stats_for_result { - public: - - ThriftHiveMetastore_set_aggr_stats_for_result(const ThriftHiveMetastore_set_aggr_stats_for_result&); - ThriftHiveMetastore_set_aggr_stats_for_result& operator=(const ThriftHiveMetastore_set_aggr_stats_for_result&); - ThriftHiveMetastore_set_aggr_stats_for_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_set_aggr_stats_for_result() throw(); - bool success; - NoSuchObjectException o1; - InvalidObjectException o2; - MetaException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_set_aggr_stats_for_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const InvalidObjectException& val); - - void __set_o3(const MetaException& val); - - void __set_o4(const InvalidInputException& val); - - bool operator == (const ThriftHiveMetastore_set_aggr_stats_for_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_set_aggr_stats_for_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_set_aggr_stats_for_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_set_aggr_stats_for_presult__isset { - _ThriftHiveMetastore_set_aggr_stats_for_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_set_aggr_stats_for_presult__isset; - -class ThriftHiveMetastore_set_aggr_stats_for_presult { - public: - - - virtual ~ThriftHiveMetastore_set_aggr_stats_for_presult() throw(); - bool* success; - NoSuchObjectException o1; - InvalidObjectException o2; - MetaException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_set_aggr_stats_for_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_delete_partition_column_statistics_args__isset { - _ThriftHiveMetastore_delete_partition_column_statistics_args__isset() : db_name(false), tbl_name(false), part_name(false), col_name(false) {} - bool db_name :1; - bool tbl_name :1; - bool part_name :1; - bool col_name :1; -} _ThriftHiveMetastore_delete_partition_column_statistics_args__isset; - -class ThriftHiveMetastore_delete_partition_column_statistics_args { - public: - - ThriftHiveMetastore_delete_partition_column_statistics_args(const ThriftHiveMetastore_delete_partition_column_statistics_args&); - ThriftHiveMetastore_delete_partition_column_statistics_args& operator=(const ThriftHiveMetastore_delete_partition_column_statistics_args&); - ThriftHiveMetastore_delete_partition_column_statistics_args() : db_name(), tbl_name(), part_name(), col_name() { - } - - virtual ~ThriftHiveMetastore_delete_partition_column_statistics_args() throw(); - std::string db_name; - std::string tbl_name; - std::string part_name; - std::string col_name; - - _ThriftHiveMetastore_delete_partition_column_statistics_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_part_name(const std::string& val); - - void __set_col_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_delete_partition_column_statistics_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(part_name == rhs.part_name)) - return false; - if (!(col_name == rhs.col_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_delete_partition_column_statistics_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_delete_partition_column_statistics_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_delete_partition_column_statistics_pargs { - public: - - - virtual ~ThriftHiveMetastore_delete_partition_column_statistics_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* part_name; - const std::string* col_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_delete_partition_column_statistics_result__isset { - _ThriftHiveMetastore_delete_partition_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_delete_partition_column_statistics_result__isset; - -class ThriftHiveMetastore_delete_partition_column_statistics_result { - public: - - ThriftHiveMetastore_delete_partition_column_statistics_result(const ThriftHiveMetastore_delete_partition_column_statistics_result&); - ThriftHiveMetastore_delete_partition_column_statistics_result& operator=(const ThriftHiveMetastore_delete_partition_column_statistics_result&); - ThriftHiveMetastore_delete_partition_column_statistics_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_delete_partition_column_statistics_result() throw(); - bool success; - NoSuchObjectException o1; - MetaException o2; - InvalidObjectException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_delete_partition_column_statistics_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - void __set_o3(const InvalidObjectException& val); - - void __set_o4(const InvalidInputException& val); - - bool operator == (const ThriftHiveMetastore_delete_partition_column_statistics_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_delete_partition_column_statistics_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_delete_partition_column_statistics_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_delete_partition_column_statistics_presult__isset { - _ThriftHiveMetastore_delete_partition_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_delete_partition_column_statistics_presult__isset; - -class ThriftHiveMetastore_delete_partition_column_statistics_presult { - public: - - - virtual ~ThriftHiveMetastore_delete_partition_column_statistics_presult() throw(); - bool* success; - NoSuchObjectException o1; - MetaException o2; - InvalidObjectException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_delete_partition_column_statistics_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_delete_table_column_statistics_args__isset { - _ThriftHiveMetastore_delete_table_column_statistics_args__isset() : db_name(false), tbl_name(false), col_name(false) {} - bool db_name :1; - bool tbl_name :1; - bool col_name :1; -} _ThriftHiveMetastore_delete_table_column_statistics_args__isset; - -class ThriftHiveMetastore_delete_table_column_statistics_args { - public: - - ThriftHiveMetastore_delete_table_column_statistics_args(const ThriftHiveMetastore_delete_table_column_statistics_args&); - ThriftHiveMetastore_delete_table_column_statistics_args& operator=(const ThriftHiveMetastore_delete_table_column_statistics_args&); - ThriftHiveMetastore_delete_table_column_statistics_args() : db_name(), tbl_name(), col_name() { - } - - virtual ~ThriftHiveMetastore_delete_table_column_statistics_args() throw(); - std::string db_name; - std::string tbl_name; - std::string col_name; - - _ThriftHiveMetastore_delete_table_column_statistics_args__isset __isset; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - void __set_col_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_delete_table_column_statistics_args & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - if (!(col_name == rhs.col_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_delete_table_column_statistics_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_delete_table_column_statistics_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_delete_table_column_statistics_pargs { - public: - - - virtual ~ThriftHiveMetastore_delete_table_column_statistics_pargs() throw(); - const std::string* db_name; - const std::string* tbl_name; - const std::string* col_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_delete_table_column_statistics_result__isset { - _ThriftHiveMetastore_delete_table_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_delete_table_column_statistics_result__isset; - -class ThriftHiveMetastore_delete_table_column_statistics_result { - public: - - ThriftHiveMetastore_delete_table_column_statistics_result(const ThriftHiveMetastore_delete_table_column_statistics_result&); - ThriftHiveMetastore_delete_table_column_statistics_result& operator=(const ThriftHiveMetastore_delete_table_column_statistics_result&); - ThriftHiveMetastore_delete_table_column_statistics_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_delete_table_column_statistics_result() throw(); - bool success; - NoSuchObjectException o1; - MetaException o2; - InvalidObjectException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_delete_table_column_statistics_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - void __set_o3(const InvalidObjectException& val); - - void __set_o4(const InvalidInputException& val); - - bool operator == (const ThriftHiveMetastore_delete_table_column_statistics_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_delete_table_column_statistics_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_delete_table_column_statistics_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_delete_table_column_statistics_presult__isset { - _ThriftHiveMetastore_delete_table_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_delete_table_column_statistics_presult__isset; - -class ThriftHiveMetastore_delete_table_column_statistics_presult { - public: - - - virtual ~ThriftHiveMetastore_delete_table_column_statistics_presult() throw(); - bool* success; - NoSuchObjectException o1; - MetaException o2; - InvalidObjectException o3; - InvalidInputException o4; - - _ThriftHiveMetastore_delete_table_column_statistics_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_create_function_args__isset { - _ThriftHiveMetastore_create_function_args__isset() : func(false) {} - bool func :1; -} _ThriftHiveMetastore_create_function_args__isset; - -class ThriftHiveMetastore_create_function_args { - public: - - ThriftHiveMetastore_create_function_args(const ThriftHiveMetastore_create_function_args&); - ThriftHiveMetastore_create_function_args& operator=(const ThriftHiveMetastore_create_function_args&); - ThriftHiveMetastore_create_function_args() { - } - - virtual ~ThriftHiveMetastore_create_function_args() throw(); - Function func; - - _ThriftHiveMetastore_create_function_args__isset __isset; - - void __set_func(const Function& val); - - bool operator == (const ThriftHiveMetastore_create_function_args & rhs) const - { - if (!(func == rhs.func)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_function_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_function_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_create_function_pargs { - public: - - - virtual ~ThriftHiveMetastore_create_function_pargs() throw(); - const Function* func; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_function_result__isset { - _ThriftHiveMetastore_create_function_result__isset() : o1(false), o2(false), o3(false), o4(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_create_function_result__isset; - -class ThriftHiveMetastore_create_function_result { - public: - - ThriftHiveMetastore_create_function_result(const ThriftHiveMetastore_create_function_result&); - ThriftHiveMetastore_create_function_result& operator=(const ThriftHiveMetastore_create_function_result&); - ThriftHiveMetastore_create_function_result() { - } - - virtual ~ThriftHiveMetastore_create_function_result() throw(); - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - NoSuchObjectException o4; - - _ThriftHiveMetastore_create_function_result__isset __isset; - - void __set_o1(const AlreadyExistsException& val); - - void __set_o2(const InvalidObjectException& val); - - void __set_o3(const MetaException& val); - - void __set_o4(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_create_function_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - if (!(o4 == rhs.o4)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_function_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_function_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_function_presult__isset { - _ThriftHiveMetastore_create_function_presult__isset() : o1(false), o2(false), o3(false), o4(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; - bool o4 :1; -} _ThriftHiveMetastore_create_function_presult__isset; - -class ThriftHiveMetastore_create_function_presult { - public: - - - virtual ~ThriftHiveMetastore_create_function_presult() throw(); - AlreadyExistsException o1; - InvalidObjectException o2; - MetaException o3; - NoSuchObjectException o4; - - _ThriftHiveMetastore_create_function_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_function_args__isset { - _ThriftHiveMetastore_drop_function_args__isset() : dbName(false), funcName(false) {} - bool dbName :1; - bool funcName :1; -} _ThriftHiveMetastore_drop_function_args__isset; - -class ThriftHiveMetastore_drop_function_args { - public: - - ThriftHiveMetastore_drop_function_args(const ThriftHiveMetastore_drop_function_args&); - ThriftHiveMetastore_drop_function_args& operator=(const ThriftHiveMetastore_drop_function_args&); - ThriftHiveMetastore_drop_function_args() : dbName(), funcName() { - } - - virtual ~ThriftHiveMetastore_drop_function_args() throw(); - std::string dbName; - std::string funcName; - - _ThriftHiveMetastore_drop_function_args__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_funcName(const std::string& val); - - bool operator == (const ThriftHiveMetastore_drop_function_args & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(funcName == rhs.funcName)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_function_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_function_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_function_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_function_pargs() throw(); - const std::string* dbName; - const std::string* funcName; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_function_result__isset { - _ThriftHiveMetastore_drop_function_result__isset() : o1(false), o3(false) {} - bool o1 :1; - bool o3 :1; -} _ThriftHiveMetastore_drop_function_result__isset; - -class ThriftHiveMetastore_drop_function_result { - public: - - ThriftHiveMetastore_drop_function_result(const ThriftHiveMetastore_drop_function_result&); - ThriftHiveMetastore_drop_function_result& operator=(const ThriftHiveMetastore_drop_function_result&); - ThriftHiveMetastore_drop_function_result() { - } - - virtual ~ThriftHiveMetastore_drop_function_result() throw(); - NoSuchObjectException o1; - MetaException o3; - - _ThriftHiveMetastore_drop_function_result__isset __isset; - - void __set_o1(const NoSuchObjectException& val); - - void __set_o3(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_drop_function_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_function_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_function_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_function_presult__isset { - _ThriftHiveMetastore_drop_function_presult__isset() : o1(false), o3(false) {} - bool o1 :1; - bool o3 :1; -} _ThriftHiveMetastore_drop_function_presult__isset; - -class ThriftHiveMetastore_drop_function_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_function_presult() throw(); - NoSuchObjectException o1; - MetaException o3; - - _ThriftHiveMetastore_drop_function_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_alter_function_args__isset { - _ThriftHiveMetastore_alter_function_args__isset() : dbName(false), funcName(false), newFunc(false) {} - bool dbName :1; - bool funcName :1; - bool newFunc :1; -} _ThriftHiveMetastore_alter_function_args__isset; - -class ThriftHiveMetastore_alter_function_args { - public: - - ThriftHiveMetastore_alter_function_args(const ThriftHiveMetastore_alter_function_args&); - ThriftHiveMetastore_alter_function_args& operator=(const ThriftHiveMetastore_alter_function_args&); - ThriftHiveMetastore_alter_function_args() : dbName(), funcName() { - } - - virtual ~ThriftHiveMetastore_alter_function_args() throw(); - std::string dbName; - std::string funcName; - Function newFunc; - - _ThriftHiveMetastore_alter_function_args__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_funcName(const std::string& val); - - void __set_newFunc(const Function& val); - - bool operator == (const ThriftHiveMetastore_alter_function_args & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(funcName == rhs.funcName)) - return false; - if (!(newFunc == rhs.newFunc)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_function_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_function_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_alter_function_pargs { - public: - - - virtual ~ThriftHiveMetastore_alter_function_pargs() throw(); - const std::string* dbName; - const std::string* funcName; - const Function* newFunc; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_function_result__isset { - _ThriftHiveMetastore_alter_function_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_function_result__isset; - -class ThriftHiveMetastore_alter_function_result { - public: - - ThriftHiveMetastore_alter_function_result(const ThriftHiveMetastore_alter_function_result&); - ThriftHiveMetastore_alter_function_result& operator=(const ThriftHiveMetastore_alter_function_result&); - ThriftHiveMetastore_alter_function_result() { - } - - virtual ~ThriftHiveMetastore_alter_function_result() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_function_result__isset __isset; - - void __set_o1(const InvalidOperationException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_alter_function_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_alter_function_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_alter_function_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_alter_function_presult__isset { - _ThriftHiveMetastore_alter_function_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_alter_function_presult__isset; - -class ThriftHiveMetastore_alter_function_presult { - public: - - - virtual ~ThriftHiveMetastore_alter_function_presult() throw(); - InvalidOperationException o1; - MetaException o2; - - _ThriftHiveMetastore_alter_function_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_functions_args__isset { - _ThriftHiveMetastore_get_functions_args__isset() : dbName(false), pattern(false) {} - bool dbName :1; - bool pattern :1; -} _ThriftHiveMetastore_get_functions_args__isset; - -class ThriftHiveMetastore_get_functions_args { - public: - - ThriftHiveMetastore_get_functions_args(const ThriftHiveMetastore_get_functions_args&); - ThriftHiveMetastore_get_functions_args& operator=(const ThriftHiveMetastore_get_functions_args&); - ThriftHiveMetastore_get_functions_args() : dbName(), pattern() { - } - - virtual ~ThriftHiveMetastore_get_functions_args() throw(); - std::string dbName; - std::string pattern; - - _ThriftHiveMetastore_get_functions_args__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_pattern(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_functions_args & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(pattern == rhs.pattern)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_functions_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_functions_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_functions_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_functions_pargs() throw(); - const std::string* dbName; - const std::string* pattern; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_functions_result__isset { - _ThriftHiveMetastore_get_functions_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_functions_result__isset; - -class ThriftHiveMetastore_get_functions_result { - public: - - ThriftHiveMetastore_get_functions_result(const ThriftHiveMetastore_get_functions_result&); - ThriftHiveMetastore_get_functions_result& operator=(const ThriftHiveMetastore_get_functions_result&); - ThriftHiveMetastore_get_functions_result() { - } - - virtual ~ThriftHiveMetastore_get_functions_result() throw(); - std::vector success; - MetaException o1; - - _ThriftHiveMetastore_get_functions_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_functions_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_functions_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_functions_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_functions_presult__isset { - _ThriftHiveMetastore_get_functions_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_functions_presult__isset; - -class ThriftHiveMetastore_get_functions_presult { - public: - - - virtual ~ThriftHiveMetastore_get_functions_presult() throw(); - std::vector * success; - MetaException o1; - - _ThriftHiveMetastore_get_functions_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_function_args__isset { - _ThriftHiveMetastore_get_function_args__isset() : dbName(false), funcName(false) {} - bool dbName :1; - bool funcName :1; -} _ThriftHiveMetastore_get_function_args__isset; - -class ThriftHiveMetastore_get_function_args { - public: - - ThriftHiveMetastore_get_function_args(const ThriftHiveMetastore_get_function_args&); - ThriftHiveMetastore_get_function_args& operator=(const ThriftHiveMetastore_get_function_args&); - ThriftHiveMetastore_get_function_args() : dbName(), funcName() { - } - - virtual ~ThriftHiveMetastore_get_function_args() throw(); - std::string dbName; - std::string funcName; - - _ThriftHiveMetastore_get_function_args__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_funcName(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_function_args & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(funcName == rhs.funcName)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_function_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_function_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_function_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_function_pargs() throw(); - const std::string* dbName; - const std::string* funcName; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_function_result__isset { - _ThriftHiveMetastore_get_function_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_function_result__isset; - -class ThriftHiveMetastore_get_function_result { - public: - - ThriftHiveMetastore_get_function_result(const ThriftHiveMetastore_get_function_result&); - ThriftHiveMetastore_get_function_result& operator=(const ThriftHiveMetastore_get_function_result&); - ThriftHiveMetastore_get_function_result() { - } - - virtual ~ThriftHiveMetastore_get_function_result() throw(); - Function success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_function_result__isset __isset; - - void __set_success(const Function& val); - - void __set_o1(const MetaException& val); - - void __set_o2(const NoSuchObjectException& val); - - bool operator == (const ThriftHiveMetastore_get_function_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_function_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_function_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_function_presult__isset { - _ThriftHiveMetastore_get_function_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_get_function_presult__isset; - -class ThriftHiveMetastore_get_function_presult { - public: - - - virtual ~ThriftHiveMetastore_get_function_presult() throw(); - Function* success; - MetaException o1; - NoSuchObjectException o2; - - _ThriftHiveMetastore_get_function_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - - -class ThriftHiveMetastore_get_all_functions_args { - public: - - ThriftHiveMetastore_get_all_functions_args(const ThriftHiveMetastore_get_all_functions_args&); - ThriftHiveMetastore_get_all_functions_args& operator=(const ThriftHiveMetastore_get_all_functions_args&); - ThriftHiveMetastore_get_all_functions_args() { - } - - virtual ~ThriftHiveMetastore_get_all_functions_args() throw(); - - bool operator == (const ThriftHiveMetastore_get_all_functions_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_get_all_functions_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_all_functions_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_all_functions_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_all_functions_pargs() throw(); - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_all_functions_result__isset { - _ThriftHiveMetastore_get_all_functions_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_all_functions_result__isset; - -class ThriftHiveMetastore_get_all_functions_result { - public: - - ThriftHiveMetastore_get_all_functions_result(const ThriftHiveMetastore_get_all_functions_result&); - ThriftHiveMetastore_get_all_functions_result& operator=(const ThriftHiveMetastore_get_all_functions_result&); - ThriftHiveMetastore_get_all_functions_result() { - } - - virtual ~ThriftHiveMetastore_get_all_functions_result() throw(); - GetAllFunctionsResponse success; - MetaException o1; - - _ThriftHiveMetastore_get_all_functions_result__isset __isset; - - void __set_success(const GetAllFunctionsResponse& val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_all_functions_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_all_functions_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_all_functions_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_all_functions_presult__isset { - _ThriftHiveMetastore_get_all_functions_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_all_functions_presult__isset; - -class ThriftHiveMetastore_get_all_functions_presult { - public: - - - virtual ~ThriftHiveMetastore_get_all_functions_presult() throw(); - GetAllFunctionsResponse* success; - MetaException o1; - - _ThriftHiveMetastore_get_all_functions_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_create_role_args__isset { - _ThriftHiveMetastore_create_role_args__isset() : role(false) {} - bool role :1; -} _ThriftHiveMetastore_create_role_args__isset; - -class ThriftHiveMetastore_create_role_args { - public: - - ThriftHiveMetastore_create_role_args(const ThriftHiveMetastore_create_role_args&); - ThriftHiveMetastore_create_role_args& operator=(const ThriftHiveMetastore_create_role_args&); - ThriftHiveMetastore_create_role_args() { - } - - virtual ~ThriftHiveMetastore_create_role_args() throw(); - Role role; - - _ThriftHiveMetastore_create_role_args__isset __isset; - - void __set_role(const Role& val); - - bool operator == (const ThriftHiveMetastore_create_role_args & rhs) const - { - if (!(role == rhs.role)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_role_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_role_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_create_role_pargs { - public: - - - virtual ~ThriftHiveMetastore_create_role_pargs() throw(); - const Role* role; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_role_result__isset { - _ThriftHiveMetastore_create_role_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_create_role_result__isset; - -class ThriftHiveMetastore_create_role_result { - public: - - ThriftHiveMetastore_create_role_result(const ThriftHiveMetastore_create_role_result&); - ThriftHiveMetastore_create_role_result& operator=(const ThriftHiveMetastore_create_role_result&); - ThriftHiveMetastore_create_role_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_create_role_result() throw(); - bool success; - MetaException o1; - - _ThriftHiveMetastore_create_role_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_create_role_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_create_role_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_create_role_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_create_role_presult__isset { - _ThriftHiveMetastore_create_role_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_create_role_presult__isset; - -class ThriftHiveMetastore_create_role_presult { - public: - - - virtual ~ThriftHiveMetastore_create_role_presult() throw(); - bool* success; - MetaException o1; - - _ThriftHiveMetastore_create_role_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_drop_role_args__isset { - _ThriftHiveMetastore_drop_role_args__isset() : role_name(false) {} - bool role_name :1; -} _ThriftHiveMetastore_drop_role_args__isset; - -class ThriftHiveMetastore_drop_role_args { - public: - - ThriftHiveMetastore_drop_role_args(const ThriftHiveMetastore_drop_role_args&); - ThriftHiveMetastore_drop_role_args& operator=(const ThriftHiveMetastore_drop_role_args&); - ThriftHiveMetastore_drop_role_args() : role_name() { - } - - virtual ~ThriftHiveMetastore_drop_role_args() throw(); - std::string role_name; - - _ThriftHiveMetastore_drop_role_args__isset __isset; - - void __set_role_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_drop_role_args & rhs) const - { - if (!(role_name == rhs.role_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_role_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_role_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_drop_role_pargs { - public: - - - virtual ~ThriftHiveMetastore_drop_role_pargs() throw(); - const std::string* role_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_role_result__isset { - _ThriftHiveMetastore_drop_role_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_drop_role_result__isset; - -class ThriftHiveMetastore_drop_role_result { - public: - - ThriftHiveMetastore_drop_role_result(const ThriftHiveMetastore_drop_role_result&); - ThriftHiveMetastore_drop_role_result& operator=(const ThriftHiveMetastore_drop_role_result&); - ThriftHiveMetastore_drop_role_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_drop_role_result() throw(); - bool success; - MetaException o1; - - _ThriftHiveMetastore_drop_role_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_drop_role_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_drop_role_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_drop_role_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_drop_role_presult__isset { - _ThriftHiveMetastore_drop_role_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_drop_role_presult__isset; - -class ThriftHiveMetastore_drop_role_presult { - public: - - - virtual ~ThriftHiveMetastore_drop_role_presult() throw(); - bool* success; - MetaException o1; - - _ThriftHiveMetastore_drop_role_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - - -class ThriftHiveMetastore_get_role_names_args { - public: - - ThriftHiveMetastore_get_role_names_args(const ThriftHiveMetastore_get_role_names_args&); - ThriftHiveMetastore_get_role_names_args& operator=(const ThriftHiveMetastore_get_role_names_args&); - ThriftHiveMetastore_get_role_names_args() { - } - - virtual ~ThriftHiveMetastore_get_role_names_args() throw(); - - bool operator == (const ThriftHiveMetastore_get_role_names_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_get_role_names_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_role_names_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_role_names_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_role_names_pargs() throw(); - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_role_names_result__isset { - _ThriftHiveMetastore_get_role_names_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_role_names_result__isset; - -class ThriftHiveMetastore_get_role_names_result { - public: - - ThriftHiveMetastore_get_role_names_result(const ThriftHiveMetastore_get_role_names_result&); - ThriftHiveMetastore_get_role_names_result& operator=(const ThriftHiveMetastore_get_role_names_result&); - ThriftHiveMetastore_get_role_names_result() { - } - - virtual ~ThriftHiveMetastore_get_role_names_result() throw(); - std::vector success; - MetaException o1; - - _ThriftHiveMetastore_get_role_names_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_role_names_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_role_names_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_role_names_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_role_names_presult__isset { - _ThriftHiveMetastore_get_role_names_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_role_names_presult__isset; - -class ThriftHiveMetastore_get_role_names_presult { - public: - - - virtual ~ThriftHiveMetastore_get_role_names_presult() throw(); - std::vector * success; - MetaException o1; - - _ThriftHiveMetastore_get_role_names_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_grant_role_args__isset { - _ThriftHiveMetastore_grant_role_args__isset() : role_name(false), principal_name(false), principal_type(false), grantor(false), grantorType(false), grant_option(false) {} - bool role_name :1; - bool principal_name :1; - bool principal_type :1; - bool grantor :1; - bool grantorType :1; - bool grant_option :1; -} _ThriftHiveMetastore_grant_role_args__isset; - -class ThriftHiveMetastore_grant_role_args { - public: - - ThriftHiveMetastore_grant_role_args(const ThriftHiveMetastore_grant_role_args&); - ThriftHiveMetastore_grant_role_args& operator=(const ThriftHiveMetastore_grant_role_args&); - 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(); - std::string role_name; - std::string principal_name; - PrincipalType::type principal_type; - std::string grantor; - PrincipalType::type grantorType; - bool grant_option; - - _ThriftHiveMetastore_grant_role_args__isset __isset; - - void __set_role_name(const std::string& val); - - void __set_principal_name(const std::string& val); - - void __set_principal_type(const PrincipalType::type val); - - void __set_grantor(const std::string& val); - - void __set_grantorType(const PrincipalType::type val); - - void __set_grant_option(const bool val); - - bool operator == (const ThriftHiveMetastore_grant_role_args & rhs) const - { - if (!(role_name == rhs.role_name)) - return false; - if (!(principal_name == rhs.principal_name)) - return false; - if (!(principal_type == rhs.principal_type)) - return false; - if (!(grantor == rhs.grantor)) - return false; - if (!(grantorType == rhs.grantorType)) - return false; - if (!(grant_option == rhs.grant_option)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_grant_role_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_grant_role_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_grant_role_pargs { - public: - - - virtual ~ThriftHiveMetastore_grant_role_pargs() throw(); - 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; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_grant_role_result__isset { - _ThriftHiveMetastore_grant_role_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_grant_role_result__isset; - -class ThriftHiveMetastore_grant_role_result { - public: - - ThriftHiveMetastore_grant_role_result(const ThriftHiveMetastore_grant_role_result&); - ThriftHiveMetastore_grant_role_result& operator=(const ThriftHiveMetastore_grant_role_result&); - ThriftHiveMetastore_grant_role_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_grant_role_result() throw(); - bool success; - MetaException o1; - - _ThriftHiveMetastore_grant_role_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_grant_role_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_grant_role_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_grant_role_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_grant_role_presult__isset { - _ThriftHiveMetastore_grant_role_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_grant_role_presult__isset; - -class ThriftHiveMetastore_grant_role_presult { - public: - - - virtual ~ThriftHiveMetastore_grant_role_presult() throw(); - bool* success; - MetaException o1; - - _ThriftHiveMetastore_grant_role_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_revoke_role_args__isset { - _ThriftHiveMetastore_revoke_role_args__isset() : role_name(false), principal_name(false), principal_type(false) {} - bool role_name :1; - bool principal_name :1; - bool principal_type :1; -} _ThriftHiveMetastore_revoke_role_args__isset; - -class ThriftHiveMetastore_revoke_role_args { - public: - - ThriftHiveMetastore_revoke_role_args(const ThriftHiveMetastore_revoke_role_args&); - ThriftHiveMetastore_revoke_role_args& operator=(const ThriftHiveMetastore_revoke_role_args&); - ThriftHiveMetastore_revoke_role_args() : role_name(), principal_name(), principal_type((PrincipalType::type)0) { - } - - virtual ~ThriftHiveMetastore_revoke_role_args() throw(); - std::string role_name; - std::string principal_name; - PrincipalType::type principal_type; - - _ThriftHiveMetastore_revoke_role_args__isset __isset; - - void __set_role_name(const std::string& val); - - void __set_principal_name(const std::string& val); - - void __set_principal_type(const PrincipalType::type val); - - bool operator == (const ThriftHiveMetastore_revoke_role_args & rhs) const - { - if (!(role_name == rhs.role_name)) - return false; - if (!(principal_name == rhs.principal_name)) - return false; - if (!(principal_type == rhs.principal_type)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_revoke_role_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_revoke_role_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_revoke_role_pargs { - public: - - - virtual ~ThriftHiveMetastore_revoke_role_pargs() throw(); - const std::string* role_name; - const std::string* principal_name; - const PrincipalType::type* principal_type; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_revoke_role_result__isset { - _ThriftHiveMetastore_revoke_role_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_revoke_role_result__isset; - -class ThriftHiveMetastore_revoke_role_result { - public: - - ThriftHiveMetastore_revoke_role_result(const ThriftHiveMetastore_revoke_role_result&); - ThriftHiveMetastore_revoke_role_result& operator=(const ThriftHiveMetastore_revoke_role_result&); - ThriftHiveMetastore_revoke_role_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_revoke_role_result() throw(); - bool success; - MetaException o1; - - _ThriftHiveMetastore_revoke_role_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_revoke_role_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_revoke_role_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_revoke_role_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_revoke_role_presult__isset { - _ThriftHiveMetastore_revoke_role_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_revoke_role_presult__isset; - -class ThriftHiveMetastore_revoke_role_presult { - public: - - - virtual ~ThriftHiveMetastore_revoke_role_presult() throw(); - bool* success; - MetaException o1; - - _ThriftHiveMetastore_revoke_role_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_list_roles_args__isset { - _ThriftHiveMetastore_list_roles_args__isset() : principal_name(false), principal_type(false) {} - bool principal_name :1; - bool principal_type :1; -} _ThriftHiveMetastore_list_roles_args__isset; - -class ThriftHiveMetastore_list_roles_args { - public: - - ThriftHiveMetastore_list_roles_args(const ThriftHiveMetastore_list_roles_args&); - ThriftHiveMetastore_list_roles_args& operator=(const ThriftHiveMetastore_list_roles_args&); - ThriftHiveMetastore_list_roles_args() : principal_name(), principal_type((PrincipalType::type)0) { - } - - virtual ~ThriftHiveMetastore_list_roles_args() throw(); - std::string principal_name; - PrincipalType::type principal_type; - - _ThriftHiveMetastore_list_roles_args__isset __isset; - - void __set_principal_name(const std::string& val); - - void __set_principal_type(const PrincipalType::type val); - - bool operator == (const ThriftHiveMetastore_list_roles_args & rhs) const - { - if (!(principal_name == rhs.principal_name)) - return false; - if (!(principal_type == rhs.principal_type)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_list_roles_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_list_roles_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_list_roles_pargs { - public: - - - virtual ~ThriftHiveMetastore_list_roles_pargs() throw(); - const std::string* principal_name; - const PrincipalType::type* principal_type; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_list_roles_result__isset { - _ThriftHiveMetastore_list_roles_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_list_roles_result__isset; - -class ThriftHiveMetastore_list_roles_result { - public: - - ThriftHiveMetastore_list_roles_result(const ThriftHiveMetastore_list_roles_result&); - ThriftHiveMetastore_list_roles_result& operator=(const ThriftHiveMetastore_list_roles_result&); - ThriftHiveMetastore_list_roles_result() { - } - - virtual ~ThriftHiveMetastore_list_roles_result() throw(); - std::vector success; - MetaException o1; - - _ThriftHiveMetastore_list_roles_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_list_roles_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_list_roles_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_list_roles_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_list_roles_presult__isset { - _ThriftHiveMetastore_list_roles_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_list_roles_presult__isset; - -class ThriftHiveMetastore_list_roles_presult { - public: - - - virtual ~ThriftHiveMetastore_list_roles_presult() throw(); - std::vector * success; - MetaException o1; - - _ThriftHiveMetastore_list_roles_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_grant_revoke_role_args__isset { - _ThriftHiveMetastore_grant_revoke_role_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_grant_revoke_role_args__isset; - -class ThriftHiveMetastore_grant_revoke_role_args { - public: - - ThriftHiveMetastore_grant_revoke_role_args(const ThriftHiveMetastore_grant_revoke_role_args&); - ThriftHiveMetastore_grant_revoke_role_args& operator=(const ThriftHiveMetastore_grant_revoke_role_args&); - ThriftHiveMetastore_grant_revoke_role_args() { - } - - virtual ~ThriftHiveMetastore_grant_revoke_role_args() throw(); - GrantRevokeRoleRequest request; - - _ThriftHiveMetastore_grant_revoke_role_args__isset __isset; - - void __set_request(const GrantRevokeRoleRequest& val); - - bool operator == (const ThriftHiveMetastore_grant_revoke_role_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_grant_revoke_role_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_grant_revoke_role_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_grant_revoke_role_pargs { - public: - - - virtual ~ThriftHiveMetastore_grant_revoke_role_pargs() throw(); - const GrantRevokeRoleRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_grant_revoke_role_result__isset { - _ThriftHiveMetastore_grant_revoke_role_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_grant_revoke_role_result__isset; - -class ThriftHiveMetastore_grant_revoke_role_result { - public: - - ThriftHiveMetastore_grant_revoke_role_result(const ThriftHiveMetastore_grant_revoke_role_result&); - ThriftHiveMetastore_grant_revoke_role_result& operator=(const ThriftHiveMetastore_grant_revoke_role_result&); - ThriftHiveMetastore_grant_revoke_role_result() { - } - - virtual ~ThriftHiveMetastore_grant_revoke_role_result() throw(); - GrantRevokeRoleResponse success; - MetaException o1; - - _ThriftHiveMetastore_grant_revoke_role_result__isset __isset; - - void __set_success(const GrantRevokeRoleResponse& val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_grant_revoke_role_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_grant_revoke_role_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_grant_revoke_role_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_grant_revoke_role_presult__isset { - _ThriftHiveMetastore_grant_revoke_role_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_grant_revoke_role_presult__isset; - -class ThriftHiveMetastore_grant_revoke_role_presult { - public: - - - virtual ~ThriftHiveMetastore_grant_revoke_role_presult() throw(); - GrantRevokeRoleResponse* success; - MetaException o1; - - _ThriftHiveMetastore_grant_revoke_role_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_principals_in_role_args__isset { - _ThriftHiveMetastore_get_principals_in_role_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_get_principals_in_role_args__isset; - -class ThriftHiveMetastore_get_principals_in_role_args { - public: - - ThriftHiveMetastore_get_principals_in_role_args(const ThriftHiveMetastore_get_principals_in_role_args&); - ThriftHiveMetastore_get_principals_in_role_args& operator=(const ThriftHiveMetastore_get_principals_in_role_args&); - ThriftHiveMetastore_get_principals_in_role_args() { - } - - virtual ~ThriftHiveMetastore_get_principals_in_role_args() throw(); - GetPrincipalsInRoleRequest request; - - _ThriftHiveMetastore_get_principals_in_role_args__isset __isset; - - void __set_request(const GetPrincipalsInRoleRequest& val); - - bool operator == (const ThriftHiveMetastore_get_principals_in_role_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_principals_in_role_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_principals_in_role_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_principals_in_role_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_principals_in_role_pargs() throw(); - const GetPrincipalsInRoleRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_principals_in_role_result__isset { - _ThriftHiveMetastore_get_principals_in_role_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_principals_in_role_result__isset; - -class ThriftHiveMetastore_get_principals_in_role_result { - public: - - ThriftHiveMetastore_get_principals_in_role_result(const ThriftHiveMetastore_get_principals_in_role_result&); - ThriftHiveMetastore_get_principals_in_role_result& operator=(const ThriftHiveMetastore_get_principals_in_role_result&); - ThriftHiveMetastore_get_principals_in_role_result() { - } - - virtual ~ThriftHiveMetastore_get_principals_in_role_result() throw(); - GetPrincipalsInRoleResponse success; - MetaException o1; - - _ThriftHiveMetastore_get_principals_in_role_result__isset __isset; - - void __set_success(const GetPrincipalsInRoleResponse& val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_principals_in_role_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_principals_in_role_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_principals_in_role_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_principals_in_role_presult__isset { - _ThriftHiveMetastore_get_principals_in_role_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_principals_in_role_presult__isset; - -class ThriftHiveMetastore_get_principals_in_role_presult { - public: - - - virtual ~ThriftHiveMetastore_get_principals_in_role_presult() throw(); - GetPrincipalsInRoleResponse* success; - MetaException o1; - - _ThriftHiveMetastore_get_principals_in_role_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_role_grants_for_principal_args__isset { - _ThriftHiveMetastore_get_role_grants_for_principal_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_get_role_grants_for_principal_args__isset; - -class ThriftHiveMetastore_get_role_grants_for_principal_args { - public: - - ThriftHiveMetastore_get_role_grants_for_principal_args(const ThriftHiveMetastore_get_role_grants_for_principal_args&); - ThriftHiveMetastore_get_role_grants_for_principal_args& operator=(const ThriftHiveMetastore_get_role_grants_for_principal_args&); - ThriftHiveMetastore_get_role_grants_for_principal_args() { - } - - virtual ~ThriftHiveMetastore_get_role_grants_for_principal_args() throw(); - GetRoleGrantsForPrincipalRequest request; - - _ThriftHiveMetastore_get_role_grants_for_principal_args__isset __isset; - - void __set_request(const GetRoleGrantsForPrincipalRequest& val); - - bool operator == (const ThriftHiveMetastore_get_role_grants_for_principal_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_role_grants_for_principal_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_role_grants_for_principal_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_role_grants_for_principal_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_role_grants_for_principal_pargs() throw(); - const GetRoleGrantsForPrincipalRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_role_grants_for_principal_result__isset { - _ThriftHiveMetastore_get_role_grants_for_principal_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_role_grants_for_principal_result__isset; - -class ThriftHiveMetastore_get_role_grants_for_principal_result { - public: - - ThriftHiveMetastore_get_role_grants_for_principal_result(const ThriftHiveMetastore_get_role_grants_for_principal_result&); - ThriftHiveMetastore_get_role_grants_for_principal_result& operator=(const ThriftHiveMetastore_get_role_grants_for_principal_result&); - ThriftHiveMetastore_get_role_grants_for_principal_result() { - } - - virtual ~ThriftHiveMetastore_get_role_grants_for_principal_result() throw(); - GetRoleGrantsForPrincipalResponse success; - MetaException o1; - - _ThriftHiveMetastore_get_role_grants_for_principal_result__isset __isset; - - void __set_success(const GetRoleGrantsForPrincipalResponse& val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_role_grants_for_principal_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_role_grants_for_principal_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_role_grants_for_principal_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_role_grants_for_principal_presult__isset { - _ThriftHiveMetastore_get_role_grants_for_principal_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_role_grants_for_principal_presult__isset; - -class ThriftHiveMetastore_get_role_grants_for_principal_presult { - public: - - - virtual ~ThriftHiveMetastore_get_role_grants_for_principal_presult() throw(); - GetRoleGrantsForPrincipalResponse* success; - MetaException o1; - - _ThriftHiveMetastore_get_role_grants_for_principal_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_privilege_set_args__isset { - _ThriftHiveMetastore_get_privilege_set_args__isset() : hiveObject(false), user_name(false), group_names(false) {} - bool hiveObject :1; - bool user_name :1; - bool group_names :1; -} _ThriftHiveMetastore_get_privilege_set_args__isset; - -class ThriftHiveMetastore_get_privilege_set_args { - public: - - ThriftHiveMetastore_get_privilege_set_args(const ThriftHiveMetastore_get_privilege_set_args&); - ThriftHiveMetastore_get_privilege_set_args& operator=(const ThriftHiveMetastore_get_privilege_set_args&); - ThriftHiveMetastore_get_privilege_set_args() : user_name() { - } - - virtual ~ThriftHiveMetastore_get_privilege_set_args() throw(); - HiveObjectRef hiveObject; - std::string user_name; - std::vector group_names; - - _ThriftHiveMetastore_get_privilege_set_args__isset __isset; - - void __set_hiveObject(const HiveObjectRef& val); - - void __set_user_name(const std::string& val); - - void __set_group_names(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_get_privilege_set_args & rhs) const - { - if (!(hiveObject == rhs.hiveObject)) - return false; - if (!(user_name == rhs.user_name)) - return false; - if (!(group_names == rhs.group_names)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_privilege_set_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_privilege_set_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_privilege_set_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_privilege_set_pargs() throw(); - const HiveObjectRef* hiveObject; - const std::string* user_name; - const std::vector * group_names; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_privilege_set_result__isset { - _ThriftHiveMetastore_get_privilege_set_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_privilege_set_result__isset; - -class ThriftHiveMetastore_get_privilege_set_result { - public: - - ThriftHiveMetastore_get_privilege_set_result(const ThriftHiveMetastore_get_privilege_set_result&); - ThriftHiveMetastore_get_privilege_set_result& operator=(const ThriftHiveMetastore_get_privilege_set_result&); - ThriftHiveMetastore_get_privilege_set_result() { - } - - virtual ~ThriftHiveMetastore_get_privilege_set_result() throw(); - PrincipalPrivilegeSet success; - MetaException o1; - - _ThriftHiveMetastore_get_privilege_set_result__isset __isset; - - void __set_success(const PrincipalPrivilegeSet& val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_privilege_set_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_privilege_set_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_privilege_set_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_privilege_set_presult__isset { - _ThriftHiveMetastore_get_privilege_set_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_privilege_set_presult__isset; - -class ThriftHiveMetastore_get_privilege_set_presult { - public: - - - virtual ~ThriftHiveMetastore_get_privilege_set_presult() throw(); - PrincipalPrivilegeSet* success; - MetaException o1; - - _ThriftHiveMetastore_get_privilege_set_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_list_privileges_args__isset { - _ThriftHiveMetastore_list_privileges_args__isset() : principal_name(false), principal_type(false), hiveObject(false) {} - bool principal_name :1; - bool principal_type :1; - bool hiveObject :1; -} _ThriftHiveMetastore_list_privileges_args__isset; - -class ThriftHiveMetastore_list_privileges_args { - public: - - ThriftHiveMetastore_list_privileges_args(const ThriftHiveMetastore_list_privileges_args&); - ThriftHiveMetastore_list_privileges_args& operator=(const ThriftHiveMetastore_list_privileges_args&); - ThriftHiveMetastore_list_privileges_args() : principal_name(), principal_type((PrincipalType::type)0) { - } - - virtual ~ThriftHiveMetastore_list_privileges_args() throw(); - std::string principal_name; - PrincipalType::type principal_type; - HiveObjectRef hiveObject; - - _ThriftHiveMetastore_list_privileges_args__isset __isset; - - void __set_principal_name(const std::string& val); - - void __set_principal_type(const PrincipalType::type val); - - void __set_hiveObject(const HiveObjectRef& val); - - bool operator == (const ThriftHiveMetastore_list_privileges_args & rhs) const - { - if (!(principal_name == rhs.principal_name)) - return false; - if (!(principal_type == rhs.principal_type)) - return false; - if (!(hiveObject == rhs.hiveObject)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_list_privileges_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_list_privileges_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_list_privileges_pargs { - public: - - - virtual ~ThriftHiveMetastore_list_privileges_pargs() throw(); - const std::string* principal_name; - const PrincipalType::type* principal_type; - const HiveObjectRef* hiveObject; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_list_privileges_result__isset { - _ThriftHiveMetastore_list_privileges_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_list_privileges_result__isset; - -class ThriftHiveMetastore_list_privileges_result { - public: - - ThriftHiveMetastore_list_privileges_result(const ThriftHiveMetastore_list_privileges_result&); - ThriftHiveMetastore_list_privileges_result& operator=(const ThriftHiveMetastore_list_privileges_result&); - ThriftHiveMetastore_list_privileges_result() { - } - - virtual ~ThriftHiveMetastore_list_privileges_result() throw(); - std::vector success; - MetaException o1; - - _ThriftHiveMetastore_list_privileges_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_list_privileges_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_list_privileges_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_list_privileges_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_list_privileges_presult__isset { - _ThriftHiveMetastore_list_privileges_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_list_privileges_presult__isset; - -class ThriftHiveMetastore_list_privileges_presult { - public: - - - virtual ~ThriftHiveMetastore_list_privileges_presult() throw(); - std::vector * success; - MetaException o1; - - _ThriftHiveMetastore_list_privileges_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_grant_privileges_args__isset { - _ThriftHiveMetastore_grant_privileges_args__isset() : privileges(false) {} - bool privileges :1; -} _ThriftHiveMetastore_grant_privileges_args__isset; - -class ThriftHiveMetastore_grant_privileges_args { - public: - - ThriftHiveMetastore_grant_privileges_args(const ThriftHiveMetastore_grant_privileges_args&); - ThriftHiveMetastore_grant_privileges_args& operator=(const ThriftHiveMetastore_grant_privileges_args&); - ThriftHiveMetastore_grant_privileges_args() { - } - - virtual ~ThriftHiveMetastore_grant_privileges_args() throw(); - PrivilegeBag privileges; - - _ThriftHiveMetastore_grant_privileges_args__isset __isset; - - void __set_privileges(const PrivilegeBag& val); - - bool operator == (const ThriftHiveMetastore_grant_privileges_args & rhs) const - { - if (!(privileges == rhs.privileges)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_grant_privileges_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_grant_privileges_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_grant_privileges_pargs { - public: - - - virtual ~ThriftHiveMetastore_grant_privileges_pargs() throw(); - const PrivilegeBag* privileges; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_grant_privileges_result__isset { - _ThriftHiveMetastore_grant_privileges_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_grant_privileges_result__isset; - -class ThriftHiveMetastore_grant_privileges_result { - public: - - ThriftHiveMetastore_grant_privileges_result(const ThriftHiveMetastore_grant_privileges_result&); - ThriftHiveMetastore_grant_privileges_result& operator=(const ThriftHiveMetastore_grant_privileges_result&); - ThriftHiveMetastore_grant_privileges_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_grant_privileges_result() throw(); - bool success; - MetaException o1; - - _ThriftHiveMetastore_grant_privileges_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_grant_privileges_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_grant_privileges_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_grant_privileges_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_grant_privileges_presult__isset { - _ThriftHiveMetastore_grant_privileges_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_grant_privileges_presult__isset; - -class ThriftHiveMetastore_grant_privileges_presult { - public: - - - virtual ~ThriftHiveMetastore_grant_privileges_presult() throw(); - bool* success; - MetaException o1; - - _ThriftHiveMetastore_grant_privileges_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_revoke_privileges_args__isset { - _ThriftHiveMetastore_revoke_privileges_args__isset() : privileges(false) {} - bool privileges :1; -} _ThriftHiveMetastore_revoke_privileges_args__isset; - -class ThriftHiveMetastore_revoke_privileges_args { - public: - - ThriftHiveMetastore_revoke_privileges_args(const ThriftHiveMetastore_revoke_privileges_args&); - ThriftHiveMetastore_revoke_privileges_args& operator=(const ThriftHiveMetastore_revoke_privileges_args&); - ThriftHiveMetastore_revoke_privileges_args() { - } - - virtual ~ThriftHiveMetastore_revoke_privileges_args() throw(); - PrivilegeBag privileges; - - _ThriftHiveMetastore_revoke_privileges_args__isset __isset; - - void __set_privileges(const PrivilegeBag& val); - - bool operator == (const ThriftHiveMetastore_revoke_privileges_args & rhs) const - { - if (!(privileges == rhs.privileges)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_revoke_privileges_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_revoke_privileges_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_revoke_privileges_pargs { - public: - - - virtual ~ThriftHiveMetastore_revoke_privileges_pargs() throw(); - const PrivilegeBag* privileges; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_revoke_privileges_result__isset { - _ThriftHiveMetastore_revoke_privileges_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_revoke_privileges_result__isset; - -class ThriftHiveMetastore_revoke_privileges_result { - public: - - ThriftHiveMetastore_revoke_privileges_result(const ThriftHiveMetastore_revoke_privileges_result&); - ThriftHiveMetastore_revoke_privileges_result& operator=(const ThriftHiveMetastore_revoke_privileges_result&); - ThriftHiveMetastore_revoke_privileges_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_revoke_privileges_result() throw(); - bool success; - MetaException o1; - - _ThriftHiveMetastore_revoke_privileges_result__isset __isset; - - void __set_success(const bool val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_revoke_privileges_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_revoke_privileges_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_revoke_privileges_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_revoke_privileges_presult__isset { - _ThriftHiveMetastore_revoke_privileges_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_revoke_privileges_presult__isset; - -class ThriftHiveMetastore_revoke_privileges_presult { - public: - - - virtual ~ThriftHiveMetastore_revoke_privileges_presult() throw(); - bool* success; - MetaException o1; - - _ThriftHiveMetastore_revoke_privileges_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_grant_revoke_privileges_args__isset { - _ThriftHiveMetastore_grant_revoke_privileges_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_grant_revoke_privileges_args__isset; - -class ThriftHiveMetastore_grant_revoke_privileges_args { - public: - - ThriftHiveMetastore_grant_revoke_privileges_args(const ThriftHiveMetastore_grant_revoke_privileges_args&); - ThriftHiveMetastore_grant_revoke_privileges_args& operator=(const ThriftHiveMetastore_grant_revoke_privileges_args&); - ThriftHiveMetastore_grant_revoke_privileges_args() { - } - - virtual ~ThriftHiveMetastore_grant_revoke_privileges_args() throw(); - GrantRevokePrivilegeRequest request; - - _ThriftHiveMetastore_grant_revoke_privileges_args__isset __isset; - - void __set_request(const GrantRevokePrivilegeRequest& val); - - bool operator == (const ThriftHiveMetastore_grant_revoke_privileges_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_grant_revoke_privileges_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_grant_revoke_privileges_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_grant_revoke_privileges_pargs { - public: - - - virtual ~ThriftHiveMetastore_grant_revoke_privileges_pargs() throw(); - const GrantRevokePrivilegeRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_grant_revoke_privileges_result__isset { - _ThriftHiveMetastore_grant_revoke_privileges_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_grant_revoke_privileges_result__isset; - -class ThriftHiveMetastore_grant_revoke_privileges_result { - public: - - ThriftHiveMetastore_grant_revoke_privileges_result(const ThriftHiveMetastore_grant_revoke_privileges_result&); - ThriftHiveMetastore_grant_revoke_privileges_result& operator=(const ThriftHiveMetastore_grant_revoke_privileges_result&); - ThriftHiveMetastore_grant_revoke_privileges_result() { - } - - virtual ~ThriftHiveMetastore_grant_revoke_privileges_result() throw(); - GrantRevokePrivilegeResponse success; - MetaException o1; - - _ThriftHiveMetastore_grant_revoke_privileges_result__isset __isset; - - void __set_success(const GrantRevokePrivilegeResponse& val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_grant_revoke_privileges_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_grant_revoke_privileges_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_grant_revoke_privileges_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_grant_revoke_privileges_presult__isset { - _ThriftHiveMetastore_grant_revoke_privileges_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_grant_revoke_privileges_presult__isset; - -class ThriftHiveMetastore_grant_revoke_privileges_presult { - public: - - - virtual ~ThriftHiveMetastore_grant_revoke_privileges_presult() throw(); - GrantRevokePrivilegeResponse* success; - MetaException o1; - - _ThriftHiveMetastore_grant_revoke_privileges_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_set_ugi_args__isset { - _ThriftHiveMetastore_set_ugi_args__isset() : user_name(false), group_names(false) {} - bool user_name :1; - bool group_names :1; -} _ThriftHiveMetastore_set_ugi_args__isset; - -class ThriftHiveMetastore_set_ugi_args { - public: - - ThriftHiveMetastore_set_ugi_args(const ThriftHiveMetastore_set_ugi_args&); - ThriftHiveMetastore_set_ugi_args& operator=(const ThriftHiveMetastore_set_ugi_args&); - ThriftHiveMetastore_set_ugi_args() : user_name() { - } - - virtual ~ThriftHiveMetastore_set_ugi_args() throw(); - std::string user_name; - std::vector group_names; - - _ThriftHiveMetastore_set_ugi_args__isset __isset; - - void __set_user_name(const std::string& val); - - void __set_group_names(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_set_ugi_args & rhs) const - { - if (!(user_name == rhs.user_name)) - return false; - if (!(group_names == rhs.group_names)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_set_ugi_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_set_ugi_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_set_ugi_pargs { - public: - - - virtual ~ThriftHiveMetastore_set_ugi_pargs() throw(); - const std::string* user_name; - const std::vector * group_names; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_set_ugi_result__isset { - _ThriftHiveMetastore_set_ugi_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_set_ugi_result__isset; - -class ThriftHiveMetastore_set_ugi_result { - public: - - ThriftHiveMetastore_set_ugi_result(const ThriftHiveMetastore_set_ugi_result&); - ThriftHiveMetastore_set_ugi_result& operator=(const ThriftHiveMetastore_set_ugi_result&); - ThriftHiveMetastore_set_ugi_result() { - } - - virtual ~ThriftHiveMetastore_set_ugi_result() throw(); - std::vector success; - MetaException o1; - - _ThriftHiveMetastore_set_ugi_result__isset __isset; - - void __set_success(const std::vector & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_set_ugi_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_set_ugi_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_set_ugi_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_set_ugi_presult__isset { - _ThriftHiveMetastore_set_ugi_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_set_ugi_presult__isset; - -class ThriftHiveMetastore_set_ugi_presult { - public: - - - virtual ~ThriftHiveMetastore_set_ugi_presult() throw(); - std::vector * success; - MetaException o1; - - _ThriftHiveMetastore_set_ugi_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_delegation_token_args__isset { - _ThriftHiveMetastore_get_delegation_token_args__isset() : token_owner(false), renewer_kerberos_principal_name(false) {} - bool token_owner :1; - bool renewer_kerberos_principal_name :1; -} _ThriftHiveMetastore_get_delegation_token_args__isset; - -class ThriftHiveMetastore_get_delegation_token_args { - public: - - ThriftHiveMetastore_get_delegation_token_args(const ThriftHiveMetastore_get_delegation_token_args&); - ThriftHiveMetastore_get_delegation_token_args& operator=(const ThriftHiveMetastore_get_delegation_token_args&); - ThriftHiveMetastore_get_delegation_token_args() : token_owner(), renewer_kerberos_principal_name() { - } - - virtual ~ThriftHiveMetastore_get_delegation_token_args() throw(); - std::string token_owner; - std::string renewer_kerberos_principal_name; - - _ThriftHiveMetastore_get_delegation_token_args__isset __isset; - - void __set_token_owner(const std::string& val); - - void __set_renewer_kerberos_principal_name(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_delegation_token_args & rhs) const - { - if (!(token_owner == rhs.token_owner)) - return false; - if (!(renewer_kerberos_principal_name == rhs.renewer_kerberos_principal_name)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_delegation_token_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_delegation_token_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_delegation_token_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_delegation_token_pargs() throw(); - const std::string* token_owner; - const std::string* renewer_kerberos_principal_name; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_delegation_token_result__isset { - _ThriftHiveMetastore_get_delegation_token_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_delegation_token_result__isset; - -class ThriftHiveMetastore_get_delegation_token_result { - public: - - ThriftHiveMetastore_get_delegation_token_result(const ThriftHiveMetastore_get_delegation_token_result&); - ThriftHiveMetastore_get_delegation_token_result& operator=(const ThriftHiveMetastore_get_delegation_token_result&); - ThriftHiveMetastore_get_delegation_token_result() : success() { - } - - virtual ~ThriftHiveMetastore_get_delegation_token_result() throw(); - std::string success; - MetaException o1; - - _ThriftHiveMetastore_get_delegation_token_result__isset __isset; - - void __set_success(const std::string& val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_delegation_token_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_delegation_token_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_delegation_token_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_delegation_token_presult__isset { - _ThriftHiveMetastore_get_delegation_token_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_delegation_token_presult__isset; - -class ThriftHiveMetastore_get_delegation_token_presult { - public: - - - virtual ~ThriftHiveMetastore_get_delegation_token_presult() throw(); - std::string* success; - MetaException o1; - - _ThriftHiveMetastore_get_delegation_token_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_renew_delegation_token_args__isset { - _ThriftHiveMetastore_renew_delegation_token_args__isset() : token_str_form(false) {} - bool token_str_form :1; -} _ThriftHiveMetastore_renew_delegation_token_args__isset; - -class ThriftHiveMetastore_renew_delegation_token_args { - public: - - ThriftHiveMetastore_renew_delegation_token_args(const ThriftHiveMetastore_renew_delegation_token_args&); - ThriftHiveMetastore_renew_delegation_token_args& operator=(const ThriftHiveMetastore_renew_delegation_token_args&); - ThriftHiveMetastore_renew_delegation_token_args() : token_str_form() { - } - - virtual ~ThriftHiveMetastore_renew_delegation_token_args() throw(); - std::string token_str_form; - - _ThriftHiveMetastore_renew_delegation_token_args__isset __isset; - - void __set_token_str_form(const std::string& val); - - bool operator == (const ThriftHiveMetastore_renew_delegation_token_args & rhs) const - { - if (!(token_str_form == rhs.token_str_form)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_renew_delegation_token_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_renew_delegation_token_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_renew_delegation_token_pargs { - public: - - - virtual ~ThriftHiveMetastore_renew_delegation_token_pargs() throw(); - const std::string* token_str_form; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_renew_delegation_token_result__isset { - _ThriftHiveMetastore_renew_delegation_token_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_renew_delegation_token_result__isset; - -class ThriftHiveMetastore_renew_delegation_token_result { - public: - - ThriftHiveMetastore_renew_delegation_token_result(const ThriftHiveMetastore_renew_delegation_token_result&); - ThriftHiveMetastore_renew_delegation_token_result& operator=(const ThriftHiveMetastore_renew_delegation_token_result&); - ThriftHiveMetastore_renew_delegation_token_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_renew_delegation_token_result() throw(); - int64_t success; - MetaException o1; - - _ThriftHiveMetastore_renew_delegation_token_result__isset __isset; - - void __set_success(const int64_t val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_renew_delegation_token_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_renew_delegation_token_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_renew_delegation_token_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_renew_delegation_token_presult__isset { - _ThriftHiveMetastore_renew_delegation_token_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_renew_delegation_token_presult__isset; - -class ThriftHiveMetastore_renew_delegation_token_presult { - public: - - - virtual ~ThriftHiveMetastore_renew_delegation_token_presult() throw(); - int64_t* success; - MetaException o1; - - _ThriftHiveMetastore_renew_delegation_token_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_cancel_delegation_token_args__isset { - _ThriftHiveMetastore_cancel_delegation_token_args__isset() : token_str_form(false) {} - bool token_str_form :1; -} _ThriftHiveMetastore_cancel_delegation_token_args__isset; - -class ThriftHiveMetastore_cancel_delegation_token_args { - public: - - ThriftHiveMetastore_cancel_delegation_token_args(const ThriftHiveMetastore_cancel_delegation_token_args&); - ThriftHiveMetastore_cancel_delegation_token_args& operator=(const ThriftHiveMetastore_cancel_delegation_token_args&); - ThriftHiveMetastore_cancel_delegation_token_args() : token_str_form() { - } - - virtual ~ThriftHiveMetastore_cancel_delegation_token_args() throw(); - std::string token_str_form; - - _ThriftHiveMetastore_cancel_delegation_token_args__isset __isset; - - void __set_token_str_form(const std::string& val); - - bool operator == (const ThriftHiveMetastore_cancel_delegation_token_args & rhs) const - { - if (!(token_str_form == rhs.token_str_form)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_cancel_delegation_token_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_cancel_delegation_token_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_cancel_delegation_token_pargs { - public: - - - virtual ~ThriftHiveMetastore_cancel_delegation_token_pargs() throw(); - const std::string* token_str_form; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_cancel_delegation_token_result__isset { - _ThriftHiveMetastore_cancel_delegation_token_result__isset() : o1(false) {} - bool o1 :1; -} _ThriftHiveMetastore_cancel_delegation_token_result__isset; - -class ThriftHiveMetastore_cancel_delegation_token_result { - public: - - ThriftHiveMetastore_cancel_delegation_token_result(const ThriftHiveMetastore_cancel_delegation_token_result&); - ThriftHiveMetastore_cancel_delegation_token_result& operator=(const ThriftHiveMetastore_cancel_delegation_token_result&); - ThriftHiveMetastore_cancel_delegation_token_result() { - } - - virtual ~ThriftHiveMetastore_cancel_delegation_token_result() throw(); - MetaException o1; - - _ThriftHiveMetastore_cancel_delegation_token_result__isset __isset; - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_cancel_delegation_token_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_cancel_delegation_token_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_cancel_delegation_token_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_cancel_delegation_token_presult__isset { - _ThriftHiveMetastore_cancel_delegation_token_presult__isset() : o1(false) {} - bool o1 :1; -} _ThriftHiveMetastore_cancel_delegation_token_presult__isset; - -class ThriftHiveMetastore_cancel_delegation_token_presult { - public: - - - virtual ~ThriftHiveMetastore_cancel_delegation_token_presult() throw(); - MetaException o1; - - _ThriftHiveMetastore_cancel_delegation_token_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_token_args__isset { - _ThriftHiveMetastore_add_token_args__isset() : token_identifier(false), delegation_token(false) {} - bool token_identifier :1; - bool delegation_token :1; -} _ThriftHiveMetastore_add_token_args__isset; - -class ThriftHiveMetastore_add_token_args { - public: - - ThriftHiveMetastore_add_token_args(const ThriftHiveMetastore_add_token_args&); - ThriftHiveMetastore_add_token_args& operator=(const ThriftHiveMetastore_add_token_args&); - ThriftHiveMetastore_add_token_args() : token_identifier(), delegation_token() { - } - - virtual ~ThriftHiveMetastore_add_token_args() throw(); - std::string token_identifier; - std::string delegation_token; - - _ThriftHiveMetastore_add_token_args__isset __isset; - - void __set_token_identifier(const std::string& val); - - void __set_delegation_token(const std::string& val); - - bool operator == (const ThriftHiveMetastore_add_token_args & rhs) const - { - if (!(token_identifier == rhs.token_identifier)) - return false; - if (!(delegation_token == rhs.delegation_token)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_token_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_token_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_token_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_token_pargs() throw(); - const std::string* token_identifier; - const std::string* delegation_token; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_token_result__isset { - _ThriftHiveMetastore_add_token_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_add_token_result__isset; - -class ThriftHiveMetastore_add_token_result { - public: - - ThriftHiveMetastore_add_token_result(const ThriftHiveMetastore_add_token_result&); - ThriftHiveMetastore_add_token_result& operator=(const ThriftHiveMetastore_add_token_result&); - ThriftHiveMetastore_add_token_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_add_token_result() throw(); - bool success; - - _ThriftHiveMetastore_add_token_result__isset __isset; - - void __set_success(const bool val); - - bool operator == (const ThriftHiveMetastore_add_token_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_token_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_token_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_token_presult__isset { - _ThriftHiveMetastore_add_token_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_add_token_presult__isset; - -class ThriftHiveMetastore_add_token_presult { - public: - - - virtual ~ThriftHiveMetastore_add_token_presult() throw(); - bool* success; - - _ThriftHiveMetastore_add_token_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_remove_token_args__isset { - _ThriftHiveMetastore_remove_token_args__isset() : token_identifier(false) {} - bool token_identifier :1; -} _ThriftHiveMetastore_remove_token_args__isset; - -class ThriftHiveMetastore_remove_token_args { - public: - - ThriftHiveMetastore_remove_token_args(const ThriftHiveMetastore_remove_token_args&); - ThriftHiveMetastore_remove_token_args& operator=(const ThriftHiveMetastore_remove_token_args&); - ThriftHiveMetastore_remove_token_args() : token_identifier() { - } - - virtual ~ThriftHiveMetastore_remove_token_args() throw(); - std::string token_identifier; - - _ThriftHiveMetastore_remove_token_args__isset __isset; - - void __set_token_identifier(const std::string& val); - - bool operator == (const ThriftHiveMetastore_remove_token_args & rhs) const - { - if (!(token_identifier == rhs.token_identifier)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_remove_token_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_remove_token_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_remove_token_pargs { - public: - - - virtual ~ThriftHiveMetastore_remove_token_pargs() throw(); - const std::string* token_identifier; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_remove_token_result__isset { - _ThriftHiveMetastore_remove_token_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_remove_token_result__isset; - -class ThriftHiveMetastore_remove_token_result { - public: - - ThriftHiveMetastore_remove_token_result(const ThriftHiveMetastore_remove_token_result&); - ThriftHiveMetastore_remove_token_result& operator=(const ThriftHiveMetastore_remove_token_result&); - ThriftHiveMetastore_remove_token_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_remove_token_result() throw(); - bool success; - - _ThriftHiveMetastore_remove_token_result__isset __isset; - - void __set_success(const bool val); - - bool operator == (const ThriftHiveMetastore_remove_token_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_remove_token_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_remove_token_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_remove_token_presult__isset { - _ThriftHiveMetastore_remove_token_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_remove_token_presult__isset; - -class ThriftHiveMetastore_remove_token_presult { - public: - - - virtual ~ThriftHiveMetastore_remove_token_presult() throw(); - bool* success; - - _ThriftHiveMetastore_remove_token_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_token_args__isset { - _ThriftHiveMetastore_get_token_args__isset() : token_identifier(false) {} - bool token_identifier :1; -} _ThriftHiveMetastore_get_token_args__isset; - -class ThriftHiveMetastore_get_token_args { - public: - - ThriftHiveMetastore_get_token_args(const ThriftHiveMetastore_get_token_args&); - ThriftHiveMetastore_get_token_args& operator=(const ThriftHiveMetastore_get_token_args&); - ThriftHiveMetastore_get_token_args() : token_identifier() { - } - - virtual ~ThriftHiveMetastore_get_token_args() throw(); - std::string token_identifier; - - _ThriftHiveMetastore_get_token_args__isset __isset; - - void __set_token_identifier(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_token_args & rhs) const - { - if (!(token_identifier == rhs.token_identifier)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_token_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_token_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_token_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_token_pargs() throw(); - const std::string* token_identifier; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_token_result__isset { - _ThriftHiveMetastore_get_token_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_token_result__isset; - -class ThriftHiveMetastore_get_token_result { - public: - - ThriftHiveMetastore_get_token_result(const ThriftHiveMetastore_get_token_result&); - ThriftHiveMetastore_get_token_result& operator=(const ThriftHiveMetastore_get_token_result&); - ThriftHiveMetastore_get_token_result() : success() { - } - - virtual ~ThriftHiveMetastore_get_token_result() throw(); - std::string success; - - _ThriftHiveMetastore_get_token_result__isset __isset; - - void __set_success(const std::string& val); - - bool operator == (const ThriftHiveMetastore_get_token_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_token_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_token_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_token_presult__isset { - _ThriftHiveMetastore_get_token_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_token_presult__isset; - -class ThriftHiveMetastore_get_token_presult { - public: - - - virtual ~ThriftHiveMetastore_get_token_presult() throw(); - std::string* success; - - _ThriftHiveMetastore_get_token_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - - -class ThriftHiveMetastore_get_all_token_identifiers_args { - public: - - ThriftHiveMetastore_get_all_token_identifiers_args(const ThriftHiveMetastore_get_all_token_identifiers_args&); - ThriftHiveMetastore_get_all_token_identifiers_args& operator=(const ThriftHiveMetastore_get_all_token_identifiers_args&); - ThriftHiveMetastore_get_all_token_identifiers_args() { - } - - virtual ~ThriftHiveMetastore_get_all_token_identifiers_args() throw(); - - bool operator == (const ThriftHiveMetastore_get_all_token_identifiers_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_get_all_token_identifiers_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_all_token_identifiers_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_all_token_identifiers_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_all_token_identifiers_pargs() throw(); - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_all_token_identifiers_result__isset { - _ThriftHiveMetastore_get_all_token_identifiers_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_all_token_identifiers_result__isset; - -class ThriftHiveMetastore_get_all_token_identifiers_result { - public: - - ThriftHiveMetastore_get_all_token_identifiers_result(const ThriftHiveMetastore_get_all_token_identifiers_result&); - ThriftHiveMetastore_get_all_token_identifiers_result& operator=(const ThriftHiveMetastore_get_all_token_identifiers_result&); - ThriftHiveMetastore_get_all_token_identifiers_result() { - } - - virtual ~ThriftHiveMetastore_get_all_token_identifiers_result() throw(); - std::vector success; - - _ThriftHiveMetastore_get_all_token_identifiers_result__isset __isset; - - void __set_success(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_get_all_token_identifiers_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_all_token_identifiers_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_all_token_identifiers_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_all_token_identifiers_presult__isset { - _ThriftHiveMetastore_get_all_token_identifiers_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_all_token_identifiers_presult__isset; - -class ThriftHiveMetastore_get_all_token_identifiers_presult { - public: - - - virtual ~ThriftHiveMetastore_get_all_token_identifiers_presult() throw(); - std::vector * success; - - _ThriftHiveMetastore_get_all_token_identifiers_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_master_key_args__isset { - _ThriftHiveMetastore_add_master_key_args__isset() : key(false) {} - bool key :1; -} _ThriftHiveMetastore_add_master_key_args__isset; - -class ThriftHiveMetastore_add_master_key_args { - public: - - ThriftHiveMetastore_add_master_key_args(const ThriftHiveMetastore_add_master_key_args&); - ThriftHiveMetastore_add_master_key_args& operator=(const ThriftHiveMetastore_add_master_key_args&); - ThriftHiveMetastore_add_master_key_args() : key() { - } - - virtual ~ThriftHiveMetastore_add_master_key_args() throw(); - std::string key; - - _ThriftHiveMetastore_add_master_key_args__isset __isset; - - void __set_key(const std::string& val); - - bool operator == (const ThriftHiveMetastore_add_master_key_args & rhs) const - { - if (!(key == rhs.key)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_master_key_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_master_key_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_master_key_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_master_key_pargs() throw(); - const std::string* key; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_master_key_result__isset { - _ThriftHiveMetastore_add_master_key_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_add_master_key_result__isset; - -class ThriftHiveMetastore_add_master_key_result { - public: - - ThriftHiveMetastore_add_master_key_result(const ThriftHiveMetastore_add_master_key_result&); - ThriftHiveMetastore_add_master_key_result& operator=(const ThriftHiveMetastore_add_master_key_result&); - ThriftHiveMetastore_add_master_key_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_add_master_key_result() throw(); - int32_t success; - MetaException o1; - - _ThriftHiveMetastore_add_master_key_result__isset __isset; - - void __set_success(const int32_t val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_add_master_key_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_master_key_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_master_key_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_master_key_presult__isset { - _ThriftHiveMetastore_add_master_key_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_add_master_key_presult__isset; - -class ThriftHiveMetastore_add_master_key_presult { - public: - - - virtual ~ThriftHiveMetastore_add_master_key_presult() throw(); - int32_t* success; - MetaException o1; - - _ThriftHiveMetastore_add_master_key_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_update_master_key_args__isset { - _ThriftHiveMetastore_update_master_key_args__isset() : seq_number(false), key(false) {} - bool seq_number :1; - bool key :1; -} _ThriftHiveMetastore_update_master_key_args__isset; - -class ThriftHiveMetastore_update_master_key_args { - public: - - ThriftHiveMetastore_update_master_key_args(const ThriftHiveMetastore_update_master_key_args&); - ThriftHiveMetastore_update_master_key_args& operator=(const ThriftHiveMetastore_update_master_key_args&); - ThriftHiveMetastore_update_master_key_args() : seq_number(0), key() { - } - - virtual ~ThriftHiveMetastore_update_master_key_args() throw(); - int32_t seq_number; - std::string key; - - _ThriftHiveMetastore_update_master_key_args__isset __isset; - - void __set_seq_number(const int32_t val); - - void __set_key(const std::string& val); - - bool operator == (const ThriftHiveMetastore_update_master_key_args & rhs) const - { - if (!(seq_number == rhs.seq_number)) - return false; - if (!(key == rhs.key)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_update_master_key_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_update_master_key_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_update_master_key_pargs { - public: - - - virtual ~ThriftHiveMetastore_update_master_key_pargs() throw(); - const int32_t* seq_number; - const std::string* key; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_update_master_key_result__isset { - _ThriftHiveMetastore_update_master_key_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_update_master_key_result__isset; - -class ThriftHiveMetastore_update_master_key_result { - public: - - ThriftHiveMetastore_update_master_key_result(const ThriftHiveMetastore_update_master_key_result&); - ThriftHiveMetastore_update_master_key_result& operator=(const ThriftHiveMetastore_update_master_key_result&); - ThriftHiveMetastore_update_master_key_result() { - } - - virtual ~ThriftHiveMetastore_update_master_key_result() throw(); - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_update_master_key_result__isset __isset; - - void __set_o1(const NoSuchObjectException& val); - - void __set_o2(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_update_master_key_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_update_master_key_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_update_master_key_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_update_master_key_presult__isset { - _ThriftHiveMetastore_update_master_key_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_update_master_key_presult__isset; - -class ThriftHiveMetastore_update_master_key_presult { - public: - - - virtual ~ThriftHiveMetastore_update_master_key_presult() throw(); - NoSuchObjectException o1; - MetaException o2; - - _ThriftHiveMetastore_update_master_key_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_remove_master_key_args__isset { - _ThriftHiveMetastore_remove_master_key_args__isset() : key_seq(false) {} - bool key_seq :1; -} _ThriftHiveMetastore_remove_master_key_args__isset; - -class ThriftHiveMetastore_remove_master_key_args { - public: - - ThriftHiveMetastore_remove_master_key_args(const ThriftHiveMetastore_remove_master_key_args&); - ThriftHiveMetastore_remove_master_key_args& operator=(const ThriftHiveMetastore_remove_master_key_args&); - ThriftHiveMetastore_remove_master_key_args() : key_seq(0) { - } - - virtual ~ThriftHiveMetastore_remove_master_key_args() throw(); - int32_t key_seq; - - _ThriftHiveMetastore_remove_master_key_args__isset __isset; - - void __set_key_seq(const int32_t val); - - bool operator == (const ThriftHiveMetastore_remove_master_key_args & rhs) const - { - if (!(key_seq == rhs.key_seq)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_remove_master_key_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_remove_master_key_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_remove_master_key_pargs { - public: - - - virtual ~ThriftHiveMetastore_remove_master_key_pargs() throw(); - const int32_t* key_seq; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_remove_master_key_result__isset { - _ThriftHiveMetastore_remove_master_key_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_remove_master_key_result__isset; - -class ThriftHiveMetastore_remove_master_key_result { - public: - - ThriftHiveMetastore_remove_master_key_result(const ThriftHiveMetastore_remove_master_key_result&); - ThriftHiveMetastore_remove_master_key_result& operator=(const ThriftHiveMetastore_remove_master_key_result&); - ThriftHiveMetastore_remove_master_key_result() : success(0) { - } - - virtual ~ThriftHiveMetastore_remove_master_key_result() throw(); - bool success; - - _ThriftHiveMetastore_remove_master_key_result__isset __isset; - - void __set_success(const bool val); - - bool operator == (const ThriftHiveMetastore_remove_master_key_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_remove_master_key_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_remove_master_key_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_remove_master_key_presult__isset { - _ThriftHiveMetastore_remove_master_key_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_remove_master_key_presult__isset; - -class ThriftHiveMetastore_remove_master_key_presult { - public: - - - virtual ~ThriftHiveMetastore_remove_master_key_presult() throw(); - bool* success; - - _ThriftHiveMetastore_remove_master_key_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - - -class ThriftHiveMetastore_get_master_keys_args { - public: - - ThriftHiveMetastore_get_master_keys_args(const ThriftHiveMetastore_get_master_keys_args&); - ThriftHiveMetastore_get_master_keys_args& operator=(const ThriftHiveMetastore_get_master_keys_args&); - ThriftHiveMetastore_get_master_keys_args() { - } - - virtual ~ThriftHiveMetastore_get_master_keys_args() throw(); - - bool operator == (const ThriftHiveMetastore_get_master_keys_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_get_master_keys_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_master_keys_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_master_keys_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_master_keys_pargs() throw(); - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_master_keys_result__isset { - _ThriftHiveMetastore_get_master_keys_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_master_keys_result__isset; - -class ThriftHiveMetastore_get_master_keys_result { - public: - - ThriftHiveMetastore_get_master_keys_result(const ThriftHiveMetastore_get_master_keys_result&); - ThriftHiveMetastore_get_master_keys_result& operator=(const ThriftHiveMetastore_get_master_keys_result&); - ThriftHiveMetastore_get_master_keys_result() { - } - - virtual ~ThriftHiveMetastore_get_master_keys_result() throw(); - std::vector success; - - _ThriftHiveMetastore_get_master_keys_result__isset __isset; - - void __set_success(const std::vector & val); - - bool operator == (const ThriftHiveMetastore_get_master_keys_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_master_keys_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_master_keys_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_master_keys_presult__isset { - _ThriftHiveMetastore_get_master_keys_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_master_keys_presult__isset; - -class ThriftHiveMetastore_get_master_keys_presult { - public: - - - virtual ~ThriftHiveMetastore_get_master_keys_presult() throw(); - std::vector * success; - - _ThriftHiveMetastore_get_master_keys_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - - -class ThriftHiveMetastore_get_open_txns_args { - public: - - ThriftHiveMetastore_get_open_txns_args(const ThriftHiveMetastore_get_open_txns_args&); - ThriftHiveMetastore_get_open_txns_args& operator=(const ThriftHiveMetastore_get_open_txns_args&); - ThriftHiveMetastore_get_open_txns_args() { - } - - virtual ~ThriftHiveMetastore_get_open_txns_args() throw(); - - bool operator == (const ThriftHiveMetastore_get_open_txns_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_get_open_txns_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_open_txns_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_open_txns_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_open_txns_pargs() throw(); - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_open_txns_result__isset { - _ThriftHiveMetastore_get_open_txns_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_open_txns_result__isset; - -class ThriftHiveMetastore_get_open_txns_result { - public: - - ThriftHiveMetastore_get_open_txns_result(const ThriftHiveMetastore_get_open_txns_result&); - ThriftHiveMetastore_get_open_txns_result& operator=(const ThriftHiveMetastore_get_open_txns_result&); - ThriftHiveMetastore_get_open_txns_result() { - } - - virtual ~ThriftHiveMetastore_get_open_txns_result() throw(); - GetOpenTxnsResponse success; - - _ThriftHiveMetastore_get_open_txns_result__isset __isset; - - void __set_success(const GetOpenTxnsResponse& val); - - bool operator == (const ThriftHiveMetastore_get_open_txns_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_open_txns_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_open_txns_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_open_txns_presult__isset { - _ThriftHiveMetastore_get_open_txns_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_open_txns_presult__isset; - -class ThriftHiveMetastore_get_open_txns_presult { - public: - - - virtual ~ThriftHiveMetastore_get_open_txns_presult() throw(); - GetOpenTxnsResponse* success; - - _ThriftHiveMetastore_get_open_txns_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - - -class ThriftHiveMetastore_get_open_txns_info_args { - public: - - ThriftHiveMetastore_get_open_txns_info_args(const ThriftHiveMetastore_get_open_txns_info_args&); - ThriftHiveMetastore_get_open_txns_info_args& operator=(const ThriftHiveMetastore_get_open_txns_info_args&); - ThriftHiveMetastore_get_open_txns_info_args() { - } - - virtual ~ThriftHiveMetastore_get_open_txns_info_args() throw(); - - bool operator == (const ThriftHiveMetastore_get_open_txns_info_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_get_open_txns_info_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_open_txns_info_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_open_txns_info_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_open_txns_info_pargs() throw(); - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_open_txns_info_result__isset { - _ThriftHiveMetastore_get_open_txns_info_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_open_txns_info_result__isset; - -class ThriftHiveMetastore_get_open_txns_info_result { - public: - - ThriftHiveMetastore_get_open_txns_info_result(const ThriftHiveMetastore_get_open_txns_info_result&); - ThriftHiveMetastore_get_open_txns_info_result& operator=(const ThriftHiveMetastore_get_open_txns_info_result&); - ThriftHiveMetastore_get_open_txns_info_result() { - } - - virtual ~ThriftHiveMetastore_get_open_txns_info_result() throw(); - GetOpenTxnsInfoResponse success; - - _ThriftHiveMetastore_get_open_txns_info_result__isset __isset; - - void __set_success(const GetOpenTxnsInfoResponse& val); - - bool operator == (const ThriftHiveMetastore_get_open_txns_info_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_open_txns_info_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_open_txns_info_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_open_txns_info_presult__isset { - _ThriftHiveMetastore_get_open_txns_info_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_open_txns_info_presult__isset; - -class ThriftHiveMetastore_get_open_txns_info_presult { - public: - - - virtual ~ThriftHiveMetastore_get_open_txns_info_presult() throw(); - GetOpenTxnsInfoResponse* success; - - _ThriftHiveMetastore_get_open_txns_info_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_open_txns_args__isset { - _ThriftHiveMetastore_open_txns_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_open_txns_args__isset; - -class ThriftHiveMetastore_open_txns_args { - public: - - ThriftHiveMetastore_open_txns_args(const ThriftHiveMetastore_open_txns_args&); - ThriftHiveMetastore_open_txns_args& operator=(const ThriftHiveMetastore_open_txns_args&); - ThriftHiveMetastore_open_txns_args() { - } - - virtual ~ThriftHiveMetastore_open_txns_args() throw(); - OpenTxnRequest rqst; - - _ThriftHiveMetastore_open_txns_args__isset __isset; - - void __set_rqst(const OpenTxnRequest& val); - - bool operator == (const ThriftHiveMetastore_open_txns_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_open_txns_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_open_txns_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_open_txns_pargs { - public: - - - virtual ~ThriftHiveMetastore_open_txns_pargs() throw(); - const OpenTxnRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_open_txns_result__isset { - _ThriftHiveMetastore_open_txns_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_open_txns_result__isset; - -class ThriftHiveMetastore_open_txns_result { - public: - - ThriftHiveMetastore_open_txns_result(const ThriftHiveMetastore_open_txns_result&); - ThriftHiveMetastore_open_txns_result& operator=(const ThriftHiveMetastore_open_txns_result&); - ThriftHiveMetastore_open_txns_result() { - } - - virtual ~ThriftHiveMetastore_open_txns_result() throw(); - OpenTxnsResponse success; - - _ThriftHiveMetastore_open_txns_result__isset __isset; - - void __set_success(const OpenTxnsResponse& val); - - bool operator == (const ThriftHiveMetastore_open_txns_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_open_txns_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_open_txns_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_open_txns_presult__isset { - _ThriftHiveMetastore_open_txns_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_open_txns_presult__isset; - -class ThriftHiveMetastore_open_txns_presult { - public: - - - virtual ~ThriftHiveMetastore_open_txns_presult() throw(); - OpenTxnsResponse* success; - - _ThriftHiveMetastore_open_txns_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_abort_txn_args__isset { - _ThriftHiveMetastore_abort_txn_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_abort_txn_args__isset; - -class ThriftHiveMetastore_abort_txn_args { - public: - - ThriftHiveMetastore_abort_txn_args(const ThriftHiveMetastore_abort_txn_args&); - ThriftHiveMetastore_abort_txn_args& operator=(const ThriftHiveMetastore_abort_txn_args&); - ThriftHiveMetastore_abort_txn_args() { - } - - virtual ~ThriftHiveMetastore_abort_txn_args() throw(); - AbortTxnRequest rqst; - - _ThriftHiveMetastore_abort_txn_args__isset __isset; - - void __set_rqst(const AbortTxnRequest& val); - - bool operator == (const ThriftHiveMetastore_abort_txn_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_abort_txn_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_abort_txn_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_abort_txn_pargs { - public: - - - virtual ~ThriftHiveMetastore_abort_txn_pargs() throw(); - const AbortTxnRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_abort_txn_result__isset { - _ThriftHiveMetastore_abort_txn_result__isset() : o1(false) {} - bool o1 :1; -} _ThriftHiveMetastore_abort_txn_result__isset; - -class ThriftHiveMetastore_abort_txn_result { - public: - - ThriftHiveMetastore_abort_txn_result(const ThriftHiveMetastore_abort_txn_result&); - ThriftHiveMetastore_abort_txn_result& operator=(const ThriftHiveMetastore_abort_txn_result&); - ThriftHiveMetastore_abort_txn_result() { - } - - virtual ~ThriftHiveMetastore_abort_txn_result() throw(); - NoSuchTxnException o1; - - _ThriftHiveMetastore_abort_txn_result__isset __isset; - - void __set_o1(const NoSuchTxnException& val); - - bool operator == (const ThriftHiveMetastore_abort_txn_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_abort_txn_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_abort_txn_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_abort_txn_presult__isset { - _ThriftHiveMetastore_abort_txn_presult__isset() : o1(false) {} - bool o1 :1; -} _ThriftHiveMetastore_abort_txn_presult__isset; - -class ThriftHiveMetastore_abort_txn_presult { - public: - - - virtual ~ThriftHiveMetastore_abort_txn_presult() throw(); - NoSuchTxnException o1; - - _ThriftHiveMetastore_abort_txn_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_abort_txns_args__isset { - _ThriftHiveMetastore_abort_txns_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_abort_txns_args__isset; - -class ThriftHiveMetastore_abort_txns_args { - public: - - ThriftHiveMetastore_abort_txns_args(const ThriftHiveMetastore_abort_txns_args&); - ThriftHiveMetastore_abort_txns_args& operator=(const ThriftHiveMetastore_abort_txns_args&); - ThriftHiveMetastore_abort_txns_args() { - } - - virtual ~ThriftHiveMetastore_abort_txns_args() throw(); - AbortTxnsRequest rqst; - - _ThriftHiveMetastore_abort_txns_args__isset __isset; - - void __set_rqst(const AbortTxnsRequest& val); - - bool operator == (const ThriftHiveMetastore_abort_txns_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_abort_txns_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_abort_txns_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_abort_txns_pargs { - public: - - - virtual ~ThriftHiveMetastore_abort_txns_pargs() throw(); - const AbortTxnsRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_abort_txns_result__isset { - _ThriftHiveMetastore_abort_txns_result__isset() : o1(false) {} - bool o1 :1; -} _ThriftHiveMetastore_abort_txns_result__isset; - -class ThriftHiveMetastore_abort_txns_result { - public: - - ThriftHiveMetastore_abort_txns_result(const ThriftHiveMetastore_abort_txns_result&); - ThriftHiveMetastore_abort_txns_result& operator=(const ThriftHiveMetastore_abort_txns_result&); - ThriftHiveMetastore_abort_txns_result() { - } - - virtual ~ThriftHiveMetastore_abort_txns_result() throw(); - NoSuchTxnException o1; - - _ThriftHiveMetastore_abort_txns_result__isset __isset; - - void __set_o1(const NoSuchTxnException& val); - - bool operator == (const ThriftHiveMetastore_abort_txns_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_abort_txns_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_abort_txns_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_abort_txns_presult__isset { - _ThriftHiveMetastore_abort_txns_presult__isset() : o1(false) {} - bool o1 :1; -} _ThriftHiveMetastore_abort_txns_presult__isset; - -class ThriftHiveMetastore_abort_txns_presult { - public: - - - virtual ~ThriftHiveMetastore_abort_txns_presult() throw(); - NoSuchTxnException o1; - - _ThriftHiveMetastore_abort_txns_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_commit_txn_args__isset { - _ThriftHiveMetastore_commit_txn_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_commit_txn_args__isset; - -class ThriftHiveMetastore_commit_txn_args { - public: - - ThriftHiveMetastore_commit_txn_args(const ThriftHiveMetastore_commit_txn_args&); - ThriftHiveMetastore_commit_txn_args& operator=(const ThriftHiveMetastore_commit_txn_args&); - ThriftHiveMetastore_commit_txn_args() { - } - - virtual ~ThriftHiveMetastore_commit_txn_args() throw(); - CommitTxnRequest rqst; - - _ThriftHiveMetastore_commit_txn_args__isset __isset; - - void __set_rqst(const CommitTxnRequest& val); - - bool operator == (const ThriftHiveMetastore_commit_txn_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_commit_txn_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_commit_txn_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_commit_txn_pargs { - public: - - - virtual ~ThriftHiveMetastore_commit_txn_pargs() throw(); - const CommitTxnRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_commit_txn_result__isset { - _ThriftHiveMetastore_commit_txn_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_commit_txn_result__isset; - -class ThriftHiveMetastore_commit_txn_result { - public: - - ThriftHiveMetastore_commit_txn_result(const ThriftHiveMetastore_commit_txn_result&); - ThriftHiveMetastore_commit_txn_result& operator=(const ThriftHiveMetastore_commit_txn_result&); - ThriftHiveMetastore_commit_txn_result() { - } - - virtual ~ThriftHiveMetastore_commit_txn_result() throw(); - NoSuchTxnException o1; - TxnAbortedException o2; - - _ThriftHiveMetastore_commit_txn_result__isset __isset; - - void __set_o1(const NoSuchTxnException& val); - - void __set_o2(const TxnAbortedException& val); - - bool operator == (const ThriftHiveMetastore_commit_txn_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_commit_txn_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_commit_txn_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_commit_txn_presult__isset { - _ThriftHiveMetastore_commit_txn_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_commit_txn_presult__isset; - -class ThriftHiveMetastore_commit_txn_presult { - public: - - - virtual ~ThriftHiveMetastore_commit_txn_presult() throw(); - NoSuchTxnException o1; - TxnAbortedException o2; - - _ThriftHiveMetastore_commit_txn_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_lock_args__isset { - _ThriftHiveMetastore_lock_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_lock_args__isset; - -class ThriftHiveMetastore_lock_args { - public: - - ThriftHiveMetastore_lock_args(const ThriftHiveMetastore_lock_args&); - ThriftHiveMetastore_lock_args& operator=(const ThriftHiveMetastore_lock_args&); - ThriftHiveMetastore_lock_args() { - } - - virtual ~ThriftHiveMetastore_lock_args() throw(); - LockRequest rqst; - - _ThriftHiveMetastore_lock_args__isset __isset; - - void __set_rqst(const LockRequest& val); - - bool operator == (const ThriftHiveMetastore_lock_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_lock_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_lock_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_lock_pargs { - public: - - - virtual ~ThriftHiveMetastore_lock_pargs() throw(); - const LockRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_lock_result__isset { - _ThriftHiveMetastore_lock_result__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_lock_result__isset; - -class ThriftHiveMetastore_lock_result { - public: - - ThriftHiveMetastore_lock_result(const ThriftHiveMetastore_lock_result&); - ThriftHiveMetastore_lock_result& operator=(const ThriftHiveMetastore_lock_result&); - ThriftHiveMetastore_lock_result() { - } - - virtual ~ThriftHiveMetastore_lock_result() throw(); - LockResponse success; - NoSuchTxnException o1; - TxnAbortedException o2; - - _ThriftHiveMetastore_lock_result__isset __isset; - - void __set_success(const LockResponse& val); - - void __set_o1(const NoSuchTxnException& val); - - void __set_o2(const TxnAbortedException& val); - - bool operator == (const ThriftHiveMetastore_lock_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_lock_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_lock_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_lock_presult__isset { - _ThriftHiveMetastore_lock_presult__isset() : success(false), o1(false), o2(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_lock_presult__isset; - -class ThriftHiveMetastore_lock_presult { - public: - - - virtual ~ThriftHiveMetastore_lock_presult() throw(); - LockResponse* success; - NoSuchTxnException o1; - TxnAbortedException o2; - - _ThriftHiveMetastore_lock_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_check_lock_args__isset { - _ThriftHiveMetastore_check_lock_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_check_lock_args__isset; - -class ThriftHiveMetastore_check_lock_args { - public: - - ThriftHiveMetastore_check_lock_args(const ThriftHiveMetastore_check_lock_args&); - ThriftHiveMetastore_check_lock_args& operator=(const ThriftHiveMetastore_check_lock_args&); - ThriftHiveMetastore_check_lock_args() { - } - - virtual ~ThriftHiveMetastore_check_lock_args() throw(); - CheckLockRequest rqst; - - _ThriftHiveMetastore_check_lock_args__isset __isset; - - void __set_rqst(const CheckLockRequest& val); - - bool operator == (const ThriftHiveMetastore_check_lock_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_check_lock_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_check_lock_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_check_lock_pargs { - public: - - - virtual ~ThriftHiveMetastore_check_lock_pargs() throw(); - const CheckLockRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_check_lock_result__isset { - _ThriftHiveMetastore_check_lock_result__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_check_lock_result__isset; - -class ThriftHiveMetastore_check_lock_result { - public: - - ThriftHiveMetastore_check_lock_result(const ThriftHiveMetastore_check_lock_result&); - ThriftHiveMetastore_check_lock_result& operator=(const ThriftHiveMetastore_check_lock_result&); - ThriftHiveMetastore_check_lock_result() { - } - - virtual ~ThriftHiveMetastore_check_lock_result() throw(); - LockResponse success; - NoSuchTxnException o1; - TxnAbortedException o2; - NoSuchLockException o3; - - _ThriftHiveMetastore_check_lock_result__isset __isset; - - void __set_success(const LockResponse& val); - - void __set_o1(const NoSuchTxnException& val); - - void __set_o2(const TxnAbortedException& val); - - void __set_o3(const NoSuchLockException& val); - - bool operator == (const ThriftHiveMetastore_check_lock_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_check_lock_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_check_lock_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_check_lock_presult__isset { - _ThriftHiveMetastore_check_lock_presult__isset() : success(false), o1(false), o2(false), o3(false) {} - bool success :1; - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_check_lock_presult__isset; - -class ThriftHiveMetastore_check_lock_presult { - public: - - - virtual ~ThriftHiveMetastore_check_lock_presult() throw(); - LockResponse* success; - NoSuchTxnException o1; - TxnAbortedException o2; - NoSuchLockException o3; - - _ThriftHiveMetastore_check_lock_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_unlock_args__isset { - _ThriftHiveMetastore_unlock_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_unlock_args__isset; - -class ThriftHiveMetastore_unlock_args { - public: - - ThriftHiveMetastore_unlock_args(const ThriftHiveMetastore_unlock_args&); - ThriftHiveMetastore_unlock_args& operator=(const ThriftHiveMetastore_unlock_args&); - ThriftHiveMetastore_unlock_args() { - } - - virtual ~ThriftHiveMetastore_unlock_args() throw(); - UnlockRequest rqst; - - _ThriftHiveMetastore_unlock_args__isset __isset; - - void __set_rqst(const UnlockRequest& val); - - bool operator == (const ThriftHiveMetastore_unlock_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_unlock_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_unlock_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_unlock_pargs { - public: - - - virtual ~ThriftHiveMetastore_unlock_pargs() throw(); - const UnlockRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_unlock_result__isset { - _ThriftHiveMetastore_unlock_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_unlock_result__isset; - -class ThriftHiveMetastore_unlock_result { - public: - - ThriftHiveMetastore_unlock_result(const ThriftHiveMetastore_unlock_result&); - ThriftHiveMetastore_unlock_result& operator=(const ThriftHiveMetastore_unlock_result&); - ThriftHiveMetastore_unlock_result() { - } - - virtual ~ThriftHiveMetastore_unlock_result() throw(); - NoSuchLockException o1; - TxnOpenException o2; - - _ThriftHiveMetastore_unlock_result__isset __isset; - - void __set_o1(const NoSuchLockException& val); - - void __set_o2(const TxnOpenException& val); - - bool operator == (const ThriftHiveMetastore_unlock_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_unlock_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_unlock_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_unlock_presult__isset { - _ThriftHiveMetastore_unlock_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_unlock_presult__isset; - -class ThriftHiveMetastore_unlock_presult { - public: - - - virtual ~ThriftHiveMetastore_unlock_presult() throw(); - NoSuchLockException o1; - TxnOpenException o2; - - _ThriftHiveMetastore_unlock_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_show_locks_args__isset { - _ThriftHiveMetastore_show_locks_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_show_locks_args__isset; - -class ThriftHiveMetastore_show_locks_args { - public: - - ThriftHiveMetastore_show_locks_args(const ThriftHiveMetastore_show_locks_args&); - ThriftHiveMetastore_show_locks_args& operator=(const ThriftHiveMetastore_show_locks_args&); - ThriftHiveMetastore_show_locks_args() { - } - - virtual ~ThriftHiveMetastore_show_locks_args() throw(); - ShowLocksRequest rqst; - - _ThriftHiveMetastore_show_locks_args__isset __isset; - - void __set_rqst(const ShowLocksRequest& val); - - bool operator == (const ThriftHiveMetastore_show_locks_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_show_locks_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_show_locks_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_show_locks_pargs { - public: - - - virtual ~ThriftHiveMetastore_show_locks_pargs() throw(); - const ShowLocksRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_show_locks_result__isset { - _ThriftHiveMetastore_show_locks_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_show_locks_result__isset; - -class ThriftHiveMetastore_show_locks_result { - public: - - ThriftHiveMetastore_show_locks_result(const ThriftHiveMetastore_show_locks_result&); - ThriftHiveMetastore_show_locks_result& operator=(const ThriftHiveMetastore_show_locks_result&); - ThriftHiveMetastore_show_locks_result() { - } - - virtual ~ThriftHiveMetastore_show_locks_result() throw(); - ShowLocksResponse success; - - _ThriftHiveMetastore_show_locks_result__isset __isset; - - void __set_success(const ShowLocksResponse& val); - - bool operator == (const ThriftHiveMetastore_show_locks_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_show_locks_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_show_locks_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_show_locks_presult__isset { - _ThriftHiveMetastore_show_locks_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_show_locks_presult__isset; - -class ThriftHiveMetastore_show_locks_presult { - public: - - - virtual ~ThriftHiveMetastore_show_locks_presult() throw(); - ShowLocksResponse* success; - - _ThriftHiveMetastore_show_locks_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_heartbeat_args__isset { - _ThriftHiveMetastore_heartbeat_args__isset() : ids(false) {} - bool ids :1; -} _ThriftHiveMetastore_heartbeat_args__isset; - -class ThriftHiveMetastore_heartbeat_args { - public: - - ThriftHiveMetastore_heartbeat_args(const ThriftHiveMetastore_heartbeat_args&); - ThriftHiveMetastore_heartbeat_args& operator=(const ThriftHiveMetastore_heartbeat_args&); - ThriftHiveMetastore_heartbeat_args() { - } - - virtual ~ThriftHiveMetastore_heartbeat_args() throw(); - HeartbeatRequest ids; - - _ThriftHiveMetastore_heartbeat_args__isset __isset; - - void __set_ids(const HeartbeatRequest& val); - - bool operator == (const ThriftHiveMetastore_heartbeat_args & rhs) const - { - if (!(ids == rhs.ids)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_heartbeat_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_heartbeat_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_heartbeat_pargs { - public: - - - virtual ~ThriftHiveMetastore_heartbeat_pargs() throw(); - const HeartbeatRequest* ids; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_heartbeat_result__isset { - _ThriftHiveMetastore_heartbeat_result__isset() : o1(false), o2(false), o3(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_heartbeat_result__isset; - -class ThriftHiveMetastore_heartbeat_result { - public: - - ThriftHiveMetastore_heartbeat_result(const ThriftHiveMetastore_heartbeat_result&); - ThriftHiveMetastore_heartbeat_result& operator=(const ThriftHiveMetastore_heartbeat_result&); - ThriftHiveMetastore_heartbeat_result() { - } - - virtual ~ThriftHiveMetastore_heartbeat_result() throw(); - NoSuchLockException o1; - NoSuchTxnException o2; - TxnAbortedException o3; - - _ThriftHiveMetastore_heartbeat_result__isset __isset; - - void __set_o1(const NoSuchLockException& val); - - void __set_o2(const NoSuchTxnException& val); - - void __set_o3(const TxnAbortedException& val); - - bool operator == (const ThriftHiveMetastore_heartbeat_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - if (!(o3 == rhs.o3)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_heartbeat_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_heartbeat_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_heartbeat_presult__isset { - _ThriftHiveMetastore_heartbeat_presult__isset() : o1(false), o2(false), o3(false) {} - bool o1 :1; - bool o2 :1; - bool o3 :1; -} _ThriftHiveMetastore_heartbeat_presult__isset; - -class ThriftHiveMetastore_heartbeat_presult { - public: - - - virtual ~ThriftHiveMetastore_heartbeat_presult() throw(); - NoSuchLockException o1; - NoSuchTxnException o2; - TxnAbortedException o3; - - _ThriftHiveMetastore_heartbeat_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_heartbeat_txn_range_args__isset { - _ThriftHiveMetastore_heartbeat_txn_range_args__isset() : txns(false) {} - bool txns :1; -} _ThriftHiveMetastore_heartbeat_txn_range_args__isset; - -class ThriftHiveMetastore_heartbeat_txn_range_args { - public: - - ThriftHiveMetastore_heartbeat_txn_range_args(const ThriftHiveMetastore_heartbeat_txn_range_args&); - ThriftHiveMetastore_heartbeat_txn_range_args& operator=(const ThriftHiveMetastore_heartbeat_txn_range_args&); - ThriftHiveMetastore_heartbeat_txn_range_args() { - } - - virtual ~ThriftHiveMetastore_heartbeat_txn_range_args() throw(); - HeartbeatTxnRangeRequest txns; - - _ThriftHiveMetastore_heartbeat_txn_range_args__isset __isset; - - void __set_txns(const HeartbeatTxnRangeRequest& val); - - bool operator == (const ThriftHiveMetastore_heartbeat_txn_range_args & rhs) const - { - if (!(txns == rhs.txns)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_heartbeat_txn_range_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_heartbeat_txn_range_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_heartbeat_txn_range_pargs { - public: - - - virtual ~ThriftHiveMetastore_heartbeat_txn_range_pargs() throw(); - const HeartbeatTxnRangeRequest* txns; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_heartbeat_txn_range_result__isset { - _ThriftHiveMetastore_heartbeat_txn_range_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_heartbeat_txn_range_result__isset; - -class ThriftHiveMetastore_heartbeat_txn_range_result { - public: - - ThriftHiveMetastore_heartbeat_txn_range_result(const ThriftHiveMetastore_heartbeat_txn_range_result&); - ThriftHiveMetastore_heartbeat_txn_range_result& operator=(const ThriftHiveMetastore_heartbeat_txn_range_result&); - ThriftHiveMetastore_heartbeat_txn_range_result() { - } - - virtual ~ThriftHiveMetastore_heartbeat_txn_range_result() throw(); - HeartbeatTxnRangeResponse success; - - _ThriftHiveMetastore_heartbeat_txn_range_result__isset __isset; - - void __set_success(const HeartbeatTxnRangeResponse& val); - - bool operator == (const ThriftHiveMetastore_heartbeat_txn_range_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_heartbeat_txn_range_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_heartbeat_txn_range_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_heartbeat_txn_range_presult__isset { - _ThriftHiveMetastore_heartbeat_txn_range_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_heartbeat_txn_range_presult__isset; - -class ThriftHiveMetastore_heartbeat_txn_range_presult { - public: - - - virtual ~ThriftHiveMetastore_heartbeat_txn_range_presult() throw(); - HeartbeatTxnRangeResponse* success; - - _ThriftHiveMetastore_heartbeat_txn_range_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_compact_args__isset { - _ThriftHiveMetastore_compact_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_compact_args__isset; - -class ThriftHiveMetastore_compact_args { - public: - - ThriftHiveMetastore_compact_args(const ThriftHiveMetastore_compact_args&); - ThriftHiveMetastore_compact_args& operator=(const ThriftHiveMetastore_compact_args&); - ThriftHiveMetastore_compact_args() { - } - - virtual ~ThriftHiveMetastore_compact_args() throw(); - CompactionRequest rqst; - - _ThriftHiveMetastore_compact_args__isset __isset; - - void __set_rqst(const CompactionRequest& val); - - bool operator == (const ThriftHiveMetastore_compact_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_compact_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_compact_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_compact_pargs { - public: - - - virtual ~ThriftHiveMetastore_compact_pargs() throw(); - const CompactionRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_compact_result { - public: - - ThriftHiveMetastore_compact_result(const ThriftHiveMetastore_compact_result&); - ThriftHiveMetastore_compact_result& operator=(const ThriftHiveMetastore_compact_result&); - ThriftHiveMetastore_compact_result() { - } - - virtual ~ThriftHiveMetastore_compact_result() throw(); - - bool operator == (const ThriftHiveMetastore_compact_result & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_compact_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_compact_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_compact_presult { - public: - - - virtual ~ThriftHiveMetastore_compact_presult() throw(); - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_compact2_args__isset { - _ThriftHiveMetastore_compact2_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_compact2_args__isset; - -class ThriftHiveMetastore_compact2_args { - public: - - ThriftHiveMetastore_compact2_args(const ThriftHiveMetastore_compact2_args&); - ThriftHiveMetastore_compact2_args& operator=(const ThriftHiveMetastore_compact2_args&); - ThriftHiveMetastore_compact2_args() { - } - - virtual ~ThriftHiveMetastore_compact2_args() throw(); - CompactionRequest rqst; - - _ThriftHiveMetastore_compact2_args__isset __isset; - - void __set_rqst(const CompactionRequest& val); - - bool operator == (const ThriftHiveMetastore_compact2_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_compact2_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_compact2_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_compact2_pargs { - public: - - - virtual ~ThriftHiveMetastore_compact2_pargs() throw(); - const CompactionRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_compact2_result__isset { - _ThriftHiveMetastore_compact2_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_compact2_result__isset; - -class ThriftHiveMetastore_compact2_result { - public: - - ThriftHiveMetastore_compact2_result(const ThriftHiveMetastore_compact2_result&); - ThriftHiveMetastore_compact2_result& operator=(const ThriftHiveMetastore_compact2_result&); - ThriftHiveMetastore_compact2_result() { - } - - virtual ~ThriftHiveMetastore_compact2_result() throw(); - CompactionResponse success; - - _ThriftHiveMetastore_compact2_result__isset __isset; - - void __set_success(const CompactionResponse& val); - - bool operator == (const ThriftHiveMetastore_compact2_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_compact2_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_compact2_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_compact2_presult__isset { - _ThriftHiveMetastore_compact2_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_compact2_presult__isset; - -class ThriftHiveMetastore_compact2_presult { - public: - - - virtual ~ThriftHiveMetastore_compact2_presult() throw(); - CompactionResponse* success; - - _ThriftHiveMetastore_compact2_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_show_compact_args__isset { - _ThriftHiveMetastore_show_compact_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_show_compact_args__isset; - -class ThriftHiveMetastore_show_compact_args { - public: - - ThriftHiveMetastore_show_compact_args(const ThriftHiveMetastore_show_compact_args&); - ThriftHiveMetastore_show_compact_args& operator=(const ThriftHiveMetastore_show_compact_args&); - ThriftHiveMetastore_show_compact_args() { - } - - virtual ~ThriftHiveMetastore_show_compact_args() throw(); - ShowCompactRequest rqst; - - _ThriftHiveMetastore_show_compact_args__isset __isset; - - void __set_rqst(const ShowCompactRequest& val); - - bool operator == (const ThriftHiveMetastore_show_compact_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_show_compact_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_show_compact_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_show_compact_pargs { - public: - - - virtual ~ThriftHiveMetastore_show_compact_pargs() throw(); - const ShowCompactRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_show_compact_result__isset { - _ThriftHiveMetastore_show_compact_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_show_compact_result__isset; - -class ThriftHiveMetastore_show_compact_result { - public: - - ThriftHiveMetastore_show_compact_result(const ThriftHiveMetastore_show_compact_result&); - ThriftHiveMetastore_show_compact_result& operator=(const ThriftHiveMetastore_show_compact_result&); - ThriftHiveMetastore_show_compact_result() { - } - - virtual ~ThriftHiveMetastore_show_compact_result() throw(); - ShowCompactResponse success; - - _ThriftHiveMetastore_show_compact_result__isset __isset; - - void __set_success(const ShowCompactResponse& val); - - bool operator == (const ThriftHiveMetastore_show_compact_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_show_compact_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_show_compact_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_show_compact_presult__isset { - _ThriftHiveMetastore_show_compact_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_show_compact_presult__isset; - -class ThriftHiveMetastore_show_compact_presult { - public: - - - virtual ~ThriftHiveMetastore_show_compact_presult() throw(); - ShowCompactResponse* success; - - _ThriftHiveMetastore_show_compact_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_add_dynamic_partitions_args__isset { - _ThriftHiveMetastore_add_dynamic_partitions_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_add_dynamic_partitions_args__isset; - -class ThriftHiveMetastore_add_dynamic_partitions_args { - public: - - ThriftHiveMetastore_add_dynamic_partitions_args(const ThriftHiveMetastore_add_dynamic_partitions_args&); - ThriftHiveMetastore_add_dynamic_partitions_args& operator=(const ThriftHiveMetastore_add_dynamic_partitions_args&); - ThriftHiveMetastore_add_dynamic_partitions_args() { - } - - virtual ~ThriftHiveMetastore_add_dynamic_partitions_args() throw(); - AddDynamicPartitions rqst; - - _ThriftHiveMetastore_add_dynamic_partitions_args__isset __isset; - - void __set_rqst(const AddDynamicPartitions& val); - - bool operator == (const ThriftHiveMetastore_add_dynamic_partitions_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_dynamic_partitions_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_dynamic_partitions_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_dynamic_partitions_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_dynamic_partitions_pargs() throw(); - const AddDynamicPartitions* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_dynamic_partitions_result__isset { - _ThriftHiveMetastore_add_dynamic_partitions_result__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_add_dynamic_partitions_result__isset; - -class ThriftHiveMetastore_add_dynamic_partitions_result { - public: - - ThriftHiveMetastore_add_dynamic_partitions_result(const ThriftHiveMetastore_add_dynamic_partitions_result&); - ThriftHiveMetastore_add_dynamic_partitions_result& operator=(const ThriftHiveMetastore_add_dynamic_partitions_result&); - ThriftHiveMetastore_add_dynamic_partitions_result() { - } - - virtual ~ThriftHiveMetastore_add_dynamic_partitions_result() throw(); - NoSuchTxnException o1; - TxnAbortedException o2; - - _ThriftHiveMetastore_add_dynamic_partitions_result__isset __isset; - - void __set_o1(const NoSuchTxnException& val); - - void __set_o2(const TxnAbortedException& val); - - bool operator == (const ThriftHiveMetastore_add_dynamic_partitions_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - if (!(o2 == rhs.o2)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_dynamic_partitions_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_dynamic_partitions_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_dynamic_partitions_presult__isset { - _ThriftHiveMetastore_add_dynamic_partitions_presult__isset() : o1(false), o2(false) {} - bool o1 :1; - bool o2 :1; -} _ThriftHiveMetastore_add_dynamic_partitions_presult__isset; - -class ThriftHiveMetastore_add_dynamic_partitions_presult { - public: - - - virtual ~ThriftHiveMetastore_add_dynamic_partitions_presult() throw(); - NoSuchTxnException o1; - TxnAbortedException o2; - - _ThriftHiveMetastore_add_dynamic_partitions_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_next_notification_args__isset { - _ThriftHiveMetastore_get_next_notification_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_get_next_notification_args__isset; - -class ThriftHiveMetastore_get_next_notification_args { - public: - - ThriftHiveMetastore_get_next_notification_args(const ThriftHiveMetastore_get_next_notification_args&); - ThriftHiveMetastore_get_next_notification_args& operator=(const ThriftHiveMetastore_get_next_notification_args&); - ThriftHiveMetastore_get_next_notification_args() { - } - - virtual ~ThriftHiveMetastore_get_next_notification_args() throw(); - NotificationEventRequest rqst; - - _ThriftHiveMetastore_get_next_notification_args__isset __isset; - - void __set_rqst(const NotificationEventRequest& val); - - bool operator == (const ThriftHiveMetastore_get_next_notification_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_next_notification_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_next_notification_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_next_notification_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_next_notification_pargs() throw(); - const NotificationEventRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_next_notification_result__isset { - _ThriftHiveMetastore_get_next_notification_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_next_notification_result__isset; - -class ThriftHiveMetastore_get_next_notification_result { - public: - - ThriftHiveMetastore_get_next_notification_result(const ThriftHiveMetastore_get_next_notification_result&); - ThriftHiveMetastore_get_next_notification_result& operator=(const ThriftHiveMetastore_get_next_notification_result&); - ThriftHiveMetastore_get_next_notification_result() { - } - - virtual ~ThriftHiveMetastore_get_next_notification_result() throw(); - NotificationEventResponse success; - - _ThriftHiveMetastore_get_next_notification_result__isset __isset; - - void __set_success(const NotificationEventResponse& val); - - bool operator == (const ThriftHiveMetastore_get_next_notification_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_next_notification_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_next_notification_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_next_notification_presult__isset { - _ThriftHiveMetastore_get_next_notification_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_next_notification_presult__isset; - -class ThriftHiveMetastore_get_next_notification_presult { - public: - - - virtual ~ThriftHiveMetastore_get_next_notification_presult() throw(); - NotificationEventResponse* success; - - _ThriftHiveMetastore_get_next_notification_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - - -class ThriftHiveMetastore_get_current_notificationEventId_args { - public: - - ThriftHiveMetastore_get_current_notificationEventId_args(const ThriftHiveMetastore_get_current_notificationEventId_args&); - ThriftHiveMetastore_get_current_notificationEventId_args& operator=(const ThriftHiveMetastore_get_current_notificationEventId_args&); - ThriftHiveMetastore_get_current_notificationEventId_args() { - } - - virtual ~ThriftHiveMetastore_get_current_notificationEventId_args() throw(); - - bool operator == (const ThriftHiveMetastore_get_current_notificationEventId_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_get_current_notificationEventId_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_current_notificationEventId_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_current_notificationEventId_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_current_notificationEventId_pargs() throw(); - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_current_notificationEventId_result__isset { - _ThriftHiveMetastore_get_current_notificationEventId_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_current_notificationEventId_result__isset; - -class ThriftHiveMetastore_get_current_notificationEventId_result { - public: - - ThriftHiveMetastore_get_current_notificationEventId_result(const ThriftHiveMetastore_get_current_notificationEventId_result&); - ThriftHiveMetastore_get_current_notificationEventId_result& operator=(const ThriftHiveMetastore_get_current_notificationEventId_result&); - ThriftHiveMetastore_get_current_notificationEventId_result() { - } - - virtual ~ThriftHiveMetastore_get_current_notificationEventId_result() throw(); - CurrentNotificationEventId success; - - _ThriftHiveMetastore_get_current_notificationEventId_result__isset __isset; - - void __set_success(const CurrentNotificationEventId& val); - - bool operator == (const ThriftHiveMetastore_get_current_notificationEventId_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_current_notificationEventId_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_current_notificationEventId_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_current_notificationEventId_presult__isset { - _ThriftHiveMetastore_get_current_notificationEventId_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_current_notificationEventId_presult__isset; - -class ThriftHiveMetastore_get_current_notificationEventId_presult { - public: - - - virtual ~ThriftHiveMetastore_get_current_notificationEventId_presult() throw(); - CurrentNotificationEventId* success; - - _ThriftHiveMetastore_get_current_notificationEventId_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_fire_listener_event_args__isset { - _ThriftHiveMetastore_fire_listener_event_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_fire_listener_event_args__isset; - -class ThriftHiveMetastore_fire_listener_event_args { - public: - - ThriftHiveMetastore_fire_listener_event_args(const ThriftHiveMetastore_fire_listener_event_args&); - ThriftHiveMetastore_fire_listener_event_args& operator=(const ThriftHiveMetastore_fire_listener_event_args&); - ThriftHiveMetastore_fire_listener_event_args() { - } - - virtual ~ThriftHiveMetastore_fire_listener_event_args() throw(); - FireEventRequest rqst; - - _ThriftHiveMetastore_fire_listener_event_args__isset __isset; - - void __set_rqst(const FireEventRequest& val); - - bool operator == (const ThriftHiveMetastore_fire_listener_event_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_fire_listener_event_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_fire_listener_event_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_fire_listener_event_pargs { - public: - - - virtual ~ThriftHiveMetastore_fire_listener_event_pargs() throw(); - const FireEventRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_fire_listener_event_result__isset { - _ThriftHiveMetastore_fire_listener_event_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_fire_listener_event_result__isset; - -class ThriftHiveMetastore_fire_listener_event_result { - public: - - ThriftHiveMetastore_fire_listener_event_result(const ThriftHiveMetastore_fire_listener_event_result&); - ThriftHiveMetastore_fire_listener_event_result& operator=(const ThriftHiveMetastore_fire_listener_event_result&); - ThriftHiveMetastore_fire_listener_event_result() { - } - - virtual ~ThriftHiveMetastore_fire_listener_event_result() throw(); - FireEventResponse success; - - _ThriftHiveMetastore_fire_listener_event_result__isset __isset; - - void __set_success(const FireEventResponse& val); - - bool operator == (const ThriftHiveMetastore_fire_listener_event_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_fire_listener_event_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_fire_listener_event_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_fire_listener_event_presult__isset { - _ThriftHiveMetastore_fire_listener_event_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_fire_listener_event_presult__isset; - -class ThriftHiveMetastore_fire_listener_event_presult { - public: - - - virtual ~ThriftHiveMetastore_fire_listener_event_presult() throw(); - FireEventResponse* success; - - _ThriftHiveMetastore_fire_listener_event_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - - -class ThriftHiveMetastore_flushCache_args { - public: - - ThriftHiveMetastore_flushCache_args(const ThriftHiveMetastore_flushCache_args&); - ThriftHiveMetastore_flushCache_args& operator=(const ThriftHiveMetastore_flushCache_args&); - ThriftHiveMetastore_flushCache_args() { - } - - virtual ~ThriftHiveMetastore_flushCache_args() throw(); - - bool operator == (const ThriftHiveMetastore_flushCache_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_flushCache_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_flushCache_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_flushCache_pargs { - public: - - - virtual ~ThriftHiveMetastore_flushCache_pargs() throw(); - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_flushCache_result { - public: - - ThriftHiveMetastore_flushCache_result(const ThriftHiveMetastore_flushCache_result&); - ThriftHiveMetastore_flushCache_result& operator=(const ThriftHiveMetastore_flushCache_result&); - ThriftHiveMetastore_flushCache_result() { - } - - virtual ~ThriftHiveMetastore_flushCache_result() throw(); - - bool operator == (const ThriftHiveMetastore_flushCache_result & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_flushCache_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_flushCache_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_flushCache_presult { - public: - - - virtual ~ThriftHiveMetastore_flushCache_presult() throw(); - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_cm_recycle_args__isset { - _ThriftHiveMetastore_cm_recycle_args__isset() : request(false) {} - bool request :1; -} _ThriftHiveMetastore_cm_recycle_args__isset; - -class ThriftHiveMetastore_cm_recycle_args { - public: - - ThriftHiveMetastore_cm_recycle_args(const ThriftHiveMetastore_cm_recycle_args&); - ThriftHiveMetastore_cm_recycle_args& operator=(const ThriftHiveMetastore_cm_recycle_args&); - ThriftHiveMetastore_cm_recycle_args() { - } - - virtual ~ThriftHiveMetastore_cm_recycle_args() throw(); - CmRecycleRequest request; - - _ThriftHiveMetastore_cm_recycle_args__isset __isset; - - void __set_request(const CmRecycleRequest& val); - - bool operator == (const ThriftHiveMetastore_cm_recycle_args & rhs) const - { - if (!(request == rhs.request)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_cm_recycle_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_cm_recycle_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_cm_recycle_pargs { - public: - - - virtual ~ThriftHiveMetastore_cm_recycle_pargs() throw(); - const CmRecycleRequest* request; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_cm_recycle_result__isset { - _ThriftHiveMetastore_cm_recycle_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_cm_recycle_result__isset; - -class ThriftHiveMetastore_cm_recycle_result { - public: - - ThriftHiveMetastore_cm_recycle_result(const ThriftHiveMetastore_cm_recycle_result&); - ThriftHiveMetastore_cm_recycle_result& operator=(const ThriftHiveMetastore_cm_recycle_result&); - ThriftHiveMetastore_cm_recycle_result() { - } - - virtual ~ThriftHiveMetastore_cm_recycle_result() throw(); - CmRecycleResponse success; - MetaException o1; - - _ThriftHiveMetastore_cm_recycle_result__isset __isset; - - void __set_success(const CmRecycleResponse& val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_cm_recycle_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_cm_recycle_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_cm_recycle_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_cm_recycle_presult__isset { - _ThriftHiveMetastore_cm_recycle_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_cm_recycle_presult__isset; - -class ThriftHiveMetastore_cm_recycle_presult { - public: - - - virtual ~ThriftHiveMetastore_cm_recycle_presult() throw(); - CmRecycleResponse* success; - MetaException o1; - - _ThriftHiveMetastore_cm_recycle_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_file_metadata_by_expr_args__isset { - _ThriftHiveMetastore_get_file_metadata_by_expr_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_get_file_metadata_by_expr_args__isset; - -class ThriftHiveMetastore_get_file_metadata_by_expr_args { - public: - - ThriftHiveMetastore_get_file_metadata_by_expr_args(const ThriftHiveMetastore_get_file_metadata_by_expr_args&); - ThriftHiveMetastore_get_file_metadata_by_expr_args& operator=(const ThriftHiveMetastore_get_file_metadata_by_expr_args&); - ThriftHiveMetastore_get_file_metadata_by_expr_args() { - } - - virtual ~ThriftHiveMetastore_get_file_metadata_by_expr_args() throw(); - GetFileMetadataByExprRequest req; - - _ThriftHiveMetastore_get_file_metadata_by_expr_args__isset __isset; - - void __set_req(const GetFileMetadataByExprRequest& val); - - bool operator == (const ThriftHiveMetastore_get_file_metadata_by_expr_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_file_metadata_by_expr_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_file_metadata_by_expr_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_file_metadata_by_expr_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_file_metadata_by_expr_pargs() throw(); - const GetFileMetadataByExprRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_file_metadata_by_expr_result__isset { - _ThriftHiveMetastore_get_file_metadata_by_expr_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_file_metadata_by_expr_result__isset; - -class ThriftHiveMetastore_get_file_metadata_by_expr_result { - public: - - ThriftHiveMetastore_get_file_metadata_by_expr_result(const ThriftHiveMetastore_get_file_metadata_by_expr_result&); - ThriftHiveMetastore_get_file_metadata_by_expr_result& operator=(const ThriftHiveMetastore_get_file_metadata_by_expr_result&); - ThriftHiveMetastore_get_file_metadata_by_expr_result() { - } - - virtual ~ThriftHiveMetastore_get_file_metadata_by_expr_result() throw(); - GetFileMetadataByExprResult success; - - _ThriftHiveMetastore_get_file_metadata_by_expr_result__isset __isset; - - void __set_success(const GetFileMetadataByExprResult& val); - - bool operator == (const ThriftHiveMetastore_get_file_metadata_by_expr_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_file_metadata_by_expr_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_file_metadata_by_expr_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_file_metadata_by_expr_presult__isset { - _ThriftHiveMetastore_get_file_metadata_by_expr_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_file_metadata_by_expr_presult__isset; - -class ThriftHiveMetastore_get_file_metadata_by_expr_presult { - public: - - - virtual ~ThriftHiveMetastore_get_file_metadata_by_expr_presult() throw(); - GetFileMetadataByExprResult* success; - - _ThriftHiveMetastore_get_file_metadata_by_expr_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_file_metadata_args__isset { - _ThriftHiveMetastore_get_file_metadata_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_get_file_metadata_args__isset; - -class ThriftHiveMetastore_get_file_metadata_args { - public: - - ThriftHiveMetastore_get_file_metadata_args(const ThriftHiveMetastore_get_file_metadata_args&); - ThriftHiveMetastore_get_file_metadata_args& operator=(const ThriftHiveMetastore_get_file_metadata_args&); - ThriftHiveMetastore_get_file_metadata_args() { - } - - virtual ~ThriftHiveMetastore_get_file_metadata_args() throw(); - GetFileMetadataRequest req; - - _ThriftHiveMetastore_get_file_metadata_args__isset __isset; - - void __set_req(const GetFileMetadataRequest& val); - - bool operator == (const ThriftHiveMetastore_get_file_metadata_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_file_metadata_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_file_metadata_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_file_metadata_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_file_metadata_pargs() throw(); - const GetFileMetadataRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_file_metadata_result__isset { - _ThriftHiveMetastore_get_file_metadata_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_file_metadata_result__isset; - -class ThriftHiveMetastore_get_file_metadata_result { - public: - - ThriftHiveMetastore_get_file_metadata_result(const ThriftHiveMetastore_get_file_metadata_result&); - ThriftHiveMetastore_get_file_metadata_result& operator=(const ThriftHiveMetastore_get_file_metadata_result&); - ThriftHiveMetastore_get_file_metadata_result() { - } - - virtual ~ThriftHiveMetastore_get_file_metadata_result() throw(); - GetFileMetadataResult success; - - _ThriftHiveMetastore_get_file_metadata_result__isset __isset; - - void __set_success(const GetFileMetadataResult& val); - - bool operator == (const ThriftHiveMetastore_get_file_metadata_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_file_metadata_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_file_metadata_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_file_metadata_presult__isset { - _ThriftHiveMetastore_get_file_metadata_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_get_file_metadata_presult__isset; - -class ThriftHiveMetastore_get_file_metadata_presult { - public: - - - virtual ~ThriftHiveMetastore_get_file_metadata_presult() throw(); - GetFileMetadataResult* success; - - _ThriftHiveMetastore_get_file_metadata_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_put_file_metadata_args__isset { - _ThriftHiveMetastore_put_file_metadata_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_put_file_metadata_args__isset; - -class ThriftHiveMetastore_put_file_metadata_args { - public: - - ThriftHiveMetastore_put_file_metadata_args(const ThriftHiveMetastore_put_file_metadata_args&); - ThriftHiveMetastore_put_file_metadata_args& operator=(const ThriftHiveMetastore_put_file_metadata_args&); - ThriftHiveMetastore_put_file_metadata_args() { - } - - virtual ~ThriftHiveMetastore_put_file_metadata_args() throw(); - PutFileMetadataRequest req; - - _ThriftHiveMetastore_put_file_metadata_args__isset __isset; - - void __set_req(const PutFileMetadataRequest& val); - - bool operator == (const ThriftHiveMetastore_put_file_metadata_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_put_file_metadata_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_put_file_metadata_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_put_file_metadata_pargs { - public: - - - virtual ~ThriftHiveMetastore_put_file_metadata_pargs() throw(); - const PutFileMetadataRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_put_file_metadata_result__isset { - _ThriftHiveMetastore_put_file_metadata_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_put_file_metadata_result__isset; - -class ThriftHiveMetastore_put_file_metadata_result { - public: - - ThriftHiveMetastore_put_file_metadata_result(const ThriftHiveMetastore_put_file_metadata_result&); - ThriftHiveMetastore_put_file_metadata_result& operator=(const ThriftHiveMetastore_put_file_metadata_result&); - ThriftHiveMetastore_put_file_metadata_result() { - } - - virtual ~ThriftHiveMetastore_put_file_metadata_result() throw(); - PutFileMetadataResult success; - - _ThriftHiveMetastore_put_file_metadata_result__isset __isset; - - void __set_success(const PutFileMetadataResult& val); - - bool operator == (const ThriftHiveMetastore_put_file_metadata_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_put_file_metadata_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_put_file_metadata_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_put_file_metadata_presult__isset { - _ThriftHiveMetastore_put_file_metadata_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_put_file_metadata_presult__isset; - -class ThriftHiveMetastore_put_file_metadata_presult { - public: - - - virtual ~ThriftHiveMetastore_put_file_metadata_presult() throw(); - PutFileMetadataResult* success; - - _ThriftHiveMetastore_put_file_metadata_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_clear_file_metadata_args__isset { - _ThriftHiveMetastore_clear_file_metadata_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_clear_file_metadata_args__isset; - -class ThriftHiveMetastore_clear_file_metadata_args { - public: - - ThriftHiveMetastore_clear_file_metadata_args(const ThriftHiveMetastore_clear_file_metadata_args&); - ThriftHiveMetastore_clear_file_metadata_args& operator=(const ThriftHiveMetastore_clear_file_metadata_args&); - ThriftHiveMetastore_clear_file_metadata_args() { - } - - virtual ~ThriftHiveMetastore_clear_file_metadata_args() throw(); - ClearFileMetadataRequest req; - - _ThriftHiveMetastore_clear_file_metadata_args__isset __isset; - - void __set_req(const ClearFileMetadataRequest& val); - - bool operator == (const ThriftHiveMetastore_clear_file_metadata_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_clear_file_metadata_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_clear_file_metadata_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_clear_file_metadata_pargs { - public: - - - virtual ~ThriftHiveMetastore_clear_file_metadata_pargs() throw(); - const ClearFileMetadataRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_clear_file_metadata_result__isset { - _ThriftHiveMetastore_clear_file_metadata_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_clear_file_metadata_result__isset; - -class ThriftHiveMetastore_clear_file_metadata_result { - public: - - ThriftHiveMetastore_clear_file_metadata_result(const ThriftHiveMetastore_clear_file_metadata_result&); - ThriftHiveMetastore_clear_file_metadata_result& operator=(const ThriftHiveMetastore_clear_file_metadata_result&); - ThriftHiveMetastore_clear_file_metadata_result() { - } - - virtual ~ThriftHiveMetastore_clear_file_metadata_result() throw(); - ClearFileMetadataResult success; - - _ThriftHiveMetastore_clear_file_metadata_result__isset __isset; - - void __set_success(const ClearFileMetadataResult& val); - - bool operator == (const ThriftHiveMetastore_clear_file_metadata_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_clear_file_metadata_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_clear_file_metadata_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_clear_file_metadata_presult__isset { - _ThriftHiveMetastore_clear_file_metadata_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_clear_file_metadata_presult__isset; - -class ThriftHiveMetastore_clear_file_metadata_presult { - public: - - - virtual ~ThriftHiveMetastore_clear_file_metadata_presult() throw(); - ClearFileMetadataResult* success; - - _ThriftHiveMetastore_clear_file_metadata_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_cache_file_metadata_args__isset { - _ThriftHiveMetastore_cache_file_metadata_args__isset() : req(false) {} - bool req :1; -} _ThriftHiveMetastore_cache_file_metadata_args__isset; - -class ThriftHiveMetastore_cache_file_metadata_args { - public: - - ThriftHiveMetastore_cache_file_metadata_args(const ThriftHiveMetastore_cache_file_metadata_args&); - ThriftHiveMetastore_cache_file_metadata_args& operator=(const ThriftHiveMetastore_cache_file_metadata_args&); - ThriftHiveMetastore_cache_file_metadata_args() { - } - - virtual ~ThriftHiveMetastore_cache_file_metadata_args() throw(); - CacheFileMetadataRequest req; - - _ThriftHiveMetastore_cache_file_metadata_args__isset __isset; - - void __set_req(const CacheFileMetadataRequest& val); - - bool operator == (const ThriftHiveMetastore_cache_file_metadata_args & rhs) const - { - if (!(req == rhs.req)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_cache_file_metadata_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_cache_file_metadata_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_cache_file_metadata_pargs { - public: - - - virtual ~ThriftHiveMetastore_cache_file_metadata_pargs() throw(); - const CacheFileMetadataRequest* req; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_cache_file_metadata_result__isset { - _ThriftHiveMetastore_cache_file_metadata_result__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_cache_file_metadata_result__isset; - -class ThriftHiveMetastore_cache_file_metadata_result { - public: - - ThriftHiveMetastore_cache_file_metadata_result(const ThriftHiveMetastore_cache_file_metadata_result&); - ThriftHiveMetastore_cache_file_metadata_result& operator=(const ThriftHiveMetastore_cache_file_metadata_result&); - ThriftHiveMetastore_cache_file_metadata_result() { - } - - virtual ~ThriftHiveMetastore_cache_file_metadata_result() throw(); - CacheFileMetadataResult success; - - _ThriftHiveMetastore_cache_file_metadata_result__isset __isset; - - void __set_success(const CacheFileMetadataResult& val); - - bool operator == (const ThriftHiveMetastore_cache_file_metadata_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_cache_file_metadata_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_cache_file_metadata_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_cache_file_metadata_presult__isset { - _ThriftHiveMetastore_cache_file_metadata_presult__isset() : success(false) {} - bool success :1; -} _ThriftHiveMetastore_cache_file_metadata_presult__isset; - -class ThriftHiveMetastore_cache_file_metadata_presult { - public: - - - virtual ~ThriftHiveMetastore_cache_file_metadata_presult() throw(); - CacheFileMetadataResult* success; - - _ThriftHiveMetastore_cache_file_metadata_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - - -class ThriftHiveMetastore_get_metastore_db_uuid_args { - public: - - ThriftHiveMetastore_get_metastore_db_uuid_args(const ThriftHiveMetastore_get_metastore_db_uuid_args&); - ThriftHiveMetastore_get_metastore_db_uuid_args& operator=(const ThriftHiveMetastore_get_metastore_db_uuid_args&); - ThriftHiveMetastore_get_metastore_db_uuid_args() { - } - - virtual ~ThriftHiveMetastore_get_metastore_db_uuid_args() throw(); - - bool operator == (const ThriftHiveMetastore_get_metastore_db_uuid_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHiveMetastore_get_metastore_db_uuid_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_metastore_db_uuid_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_metastore_db_uuid_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_metastore_db_uuid_pargs() throw(); - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_metastore_db_uuid_result__isset { - _ThriftHiveMetastore_get_metastore_db_uuid_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_metastore_db_uuid_result__isset; - -class ThriftHiveMetastore_get_metastore_db_uuid_result { - public: - - ThriftHiveMetastore_get_metastore_db_uuid_result(const ThriftHiveMetastore_get_metastore_db_uuid_result&); - ThriftHiveMetastore_get_metastore_db_uuid_result& operator=(const ThriftHiveMetastore_get_metastore_db_uuid_result&); - ThriftHiveMetastore_get_metastore_db_uuid_result() : success() { - } - - virtual ~ThriftHiveMetastore_get_metastore_db_uuid_result() throw(); - std::string success; - MetaException o1; - - _ThriftHiveMetastore_get_metastore_db_uuid_result__isset __isset; - - void __set_success(const std::string& val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_metastore_db_uuid_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_metastore_db_uuid_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_metastore_db_uuid_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_metastore_db_uuid_presult__isset { - _ThriftHiveMetastore_get_metastore_db_uuid_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_metastore_db_uuid_presult__isset; - -class ThriftHiveMetastore_get_metastore_db_uuid_presult { - public: - - - virtual ~ThriftHiveMetastore_get_metastore_db_uuid_presult() throw(); - std::string* success; - MetaException o1; - - _ThriftHiveMetastore_get_metastore_db_uuid_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public ::facebook::fb303::FacebookServiceClient { - public: - ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> 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) {} - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { - return piprot_; - } - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { - return poprot_; - } - void getMetaConf(std::string& _return, const std::string& key); - void send_getMetaConf(const std::string& key); - void recv_getMetaConf(std::string& _return); - void setMetaConf(const std::string& key, const std::string& value); - void send_setMetaConf(const std::string& key, const std::string& value); - void recv_setMetaConf(); - void create_database(const Database& database); - void send_create_database(const Database& database); - void recv_create_database(); - void get_database(Database& _return, const std::string& name); - void send_get_database(const std::string& name); - void recv_get_database(Database& _return); - void drop_database(const std::string& name, const bool deleteData, const bool cascade); - void send_drop_database(const std::string& name, const bool deleteData, const bool cascade); - void recv_drop_database(); - void get_databases(std::vector & _return, const std::string& pattern); - void send_get_databases(const std::string& pattern); - void recv_get_databases(std::vector & _return); - void get_all_databases(std::vector & _return); - void send_get_all_databases(); - void recv_get_all_databases(std::vector & _return); - void alter_database(const std::string& dbname, const Database& db); - void send_alter_database(const std::string& dbname, const Database& db); - void recv_alter_database(); - void get_type(Type& _return, const std::string& name); - void send_get_type(const std::string& name); - void recv_get_type(Type& _return); - bool create_type(const Type& type); - void send_create_type(const Type& type); - bool recv_create_type(); - bool drop_type(const std::string& type); - void send_drop_type(const std::string& type); - bool recv_drop_type(); - void get_type_all(std::map & _return, const std::string& name); - void send_get_type_all(const std::string& name); - void recv_get_type_all(std::map & _return); - void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name); - void send_get_fields(const std::string& db_name, const std::string& table_name); - void recv_get_fields(std::vector & _return); - void get_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); - void send_get_fields_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); - void recv_get_fields_with_environment_context(std::vector & _return); - void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name); - void send_get_schema(const std::string& db_name, const std::string& table_name); - void recv_get_schema(std::vector & _return); - void get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); - void send_get_schema_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); - void recv_get_schema_with_environment_context(std::vector & _return); - void create_table(const Table& tbl); - void send_create_table(const Table& tbl); - void recv_create_table(); - void create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context); - void send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context); - void recv_create_table_with_environment_context(); - void create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints); - void send_create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints); - void recv_create_table_with_constraints(); - void drop_constraint(const DropConstraintRequest& req); - void send_drop_constraint(const DropConstraintRequest& req); - void recv_drop_constraint(); - void add_primary_key(const AddPrimaryKeyRequest& req); - void send_add_primary_key(const AddPrimaryKeyRequest& req); - void recv_add_primary_key(); - void add_foreign_key(const AddForeignKeyRequest& req); - void send_add_foreign_key(const AddForeignKeyRequest& req); - void recv_add_foreign_key(); - void add_unique_constraint(const AddUniqueConstraintRequest& req); - void send_add_unique_constraint(const AddUniqueConstraintRequest& req); - void recv_add_unique_constraint(); - void add_not_null_constraint(const AddNotNullConstraintRequest& req); - void send_add_not_null_constraint(const AddNotNullConstraintRequest& req); - void recv_add_not_null_constraint(); - void drop_table(const std::string& dbname, const std::string& name, const bool deleteData); - void send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData); - void recv_drop_table(); - void drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context); - void send_drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context); - void recv_drop_table_with_environment_context(); - void truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames); - void send_truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames); - void recv_truncate_table(); - void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern); - void send_get_tables(const std::string& db_name, const std::string& pattern); - void recv_get_tables(std::vector & _return); - void get_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType); - void send_get_tables_by_type(const std::string& db_name, const std::string& pattern, const std::string& tableType); - void recv_get_tables_by_type(std::vector & _return); - void get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types); - void send_get_table_meta(const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types); - void recv_get_table_meta(std::vector & _return); - void get_all_tables(std::vector & _return, const std::string& db_name); - void send_get_all_tables(const std::string& db_name); - void recv_get_all_tables(std::vector & _return); - void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name); - void send_get_table(const std::string& dbname, const std::string& tbl_name); - void recv_get_table(Table& _return); - void get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names); - void send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names); - void recv_get_table_objects_by_name(std::vector
& _return); - void get_table_req(GetTableResult& _return, const GetTableRequest& req); - void send_get_table_req(const GetTableRequest& req); - void recv_get_table_req(GetTableResult& _return); - void get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req); - void send_get_table_objects_by_name_req(const GetTablesRequest& req); - void recv_get_table_objects_by_name_req(GetTablesResult& _return); - void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables); - void send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables); - void recv_get_table_names_by_filter(std::vector & _return); - void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); - void send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); - void recv_alter_table(); - void alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context); - void send_alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context); - void recv_alter_table_with_environment_context(); - void alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade); - void send_alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade); - void recv_alter_table_with_cascade(); - void add_partition(Partition& _return, const Partition& new_part); - void send_add_partition(const Partition& new_part); - void recv_add_partition(Partition& _return); - void add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context); - void send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context); - void recv_add_partition_with_environment_context(Partition& _return); - int32_t add_partitions(const std::vector & new_parts); - void send_add_partitions(const std::vector & new_parts); - int32_t recv_add_partitions(); - int32_t add_partitions_pspec(const std::vector & new_parts); - void send_add_partitions_pspec(const std::vector & new_parts); - int32_t recv_add_partitions_pspec(); - void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void recv_append_partition(Partition& _return); - void add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request); - void send_add_partitions_req(const AddPartitionsRequest& request); - void recv_add_partitions_req(AddPartitionsResult& _return); - void append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context); - void send_append_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context); - void recv_append_partition_with_environment_context(Partition& _return); - void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void recv_append_partition_by_name(Partition& _return); - void append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context); - void send_append_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context); - void recv_append_partition_by_name_with_environment_context(Partition& _return); - bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); - void send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); - bool recv_drop_partition(); - bool drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context); - void send_drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context); - bool recv_drop_partition_with_environment_context(); - bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); - void send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); - bool recv_drop_partition_by_name(); - bool drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context); - void send_drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context); - bool recv_drop_partition_by_name_with_environment_context(); - void drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req); - void send_drop_partitions_req(const DropPartitionsRequest& req); - void recv_drop_partitions_req(DropPartitionsResult& _return); - void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void recv_get_partition(Partition& _return); - void exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); - void send_exchange_partition(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); - void recv_exchange_partition(Partition& _return); - void exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); - void send_exchange_partitions(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); - void recv_exchange_partitions(std::vector & _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); - void send_get_partition_with_auth(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); - void recv_get_partition_with_auth(Partition& _return); - void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void recv_get_partition_by_name(Partition& _return); - void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void recv_get_partitions(std::vector & _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); - void send_get_partitions_with_auth(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); - void recv_get_partitions_with_auth(std::vector & _return); - void get_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts); - void send_get_partitions_pspec(const std::string& db_name, const std::string& tbl_name, const int32_t max_parts); - void recv_get_partitions_pspec(std::vector & _return); - void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void recv_get_partition_names(std::vector & _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); - void send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void recv_get_partitions_ps(std::vector & _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); - void send_get_partitions_ps_with_auth(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); - void recv_get_partitions_ps_with_auth(std::vector & _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); - void send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void recv_get_partition_names_ps(std::vector & _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); - void send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); - void recv_get_partitions_by_filter(std::vector & _return); - void get_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts); - void send_get_part_specs_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts); - void recv_get_part_specs_by_filter(std::vector & _return); - void get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req); - void send_get_partitions_by_expr(const PartitionsByExprRequest& req); - void recv_get_partitions_by_expr(PartitionsByExprResult& _return); - int32_t get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter); - void send_get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter); - int32_t recv_get_num_partitions_by_filter(); - void get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names); - void send_get_partitions_by_names(const std::string& db_name, const std::string& tbl_name, const std::vector & names); - void recv_get_partitions_by_names(std::vector & _return); - void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); - void send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); - void recv_alter_partition(); - void alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts); - void send_alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts); - void recv_alter_partitions(); - void alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context); - void send_alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context); - void recv_alter_partitions_with_environment_context(); - void alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context); - void send_alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context); - void recv_alter_partition_with_environment_context(); - void rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part); - void send_rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part); - void recv_rename_partition(); - bool partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception); - void send_partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception); - bool recv_partition_name_has_valid_characters(); - void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue); - void send_get_config_value(const std::string& name, const std::string& defaultValue); - void recv_get_config_value(std::string& _return); - void partition_name_to_vals(std::vector & _return, const std::string& part_name); - void send_partition_name_to_vals(const std::string& part_name); - void recv_partition_name_to_vals(std::vector & _return); - void partition_name_to_spec(std::map & _return, const std::string& part_name); - void send_partition_name_to_spec(const std::string& part_name); - void recv_partition_name_to_spec(std::map & _return); - void markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); - void send_markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); - void recv_markPartitionForEvent(); - bool isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); - void send_isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); - bool recv_isPartitionMarkedForEvent(); - void add_index(Index& _return, const Index& new_index, const Table& index_table); - void send_add_index(const Index& new_index, const Table& index_table); - void recv_add_index(Index& _return); - void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); - void send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); - void recv_alter_index(); - bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); - void send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); - bool recv_drop_index_by_name(); - void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name); - void send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name); - void recv_get_index_by_name(Index& _return); - void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void recv_get_indexes(std::vector & _return); - void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void recv_get_index_names(std::vector & _return); - void get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request); - void send_get_primary_keys(const PrimaryKeysRequest& request); - void recv_get_primary_keys(PrimaryKeysResponse& _return); - void get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request); - void send_get_foreign_keys(const ForeignKeysRequest& request); - void recv_get_foreign_keys(ForeignKeysResponse& _return); - void get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request); - void send_get_unique_constraints(const UniqueConstraintsRequest& request); - void recv_get_unique_constraints(UniqueConstraintsResponse& _return); - void get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request); - void send_get_not_null_constraints(const NotNullConstraintsRequest& request); - void recv_get_not_null_constraints(NotNullConstraintsResponse& _return); - bool update_table_column_statistics(const ColumnStatistics& stats_obj); - void send_update_table_column_statistics(const ColumnStatistics& stats_obj); - bool recv_update_table_column_statistics(); - bool update_partition_column_statistics(const ColumnStatistics& stats_obj); - void send_update_partition_column_statistics(const ColumnStatistics& stats_obj); - bool recv_update_partition_column_statistics(); - void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name); - void send_get_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); - void recv_get_table_column_statistics(ColumnStatistics& _return); - void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); - void send_get_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); - void recv_get_partition_column_statistics(ColumnStatistics& _return); - void get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request); - void send_get_table_statistics_req(const TableStatsRequest& request); - void recv_get_table_statistics_req(TableStatsResult& _return); - void get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request); - void send_get_partitions_statistics_req(const PartitionsStatsRequest& request); - void recv_get_partitions_statistics_req(PartitionsStatsResult& _return); - void get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request); - void send_get_aggr_stats_for(const PartitionsStatsRequest& request); - void recv_get_aggr_stats_for(AggrStats& _return); - bool set_aggr_stats_for(const SetPartitionsStatsRequest& request); - void send_set_aggr_stats_for(const SetPartitionsStatsRequest& request); - bool recv_set_aggr_stats_for(); - bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); - void send_delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); - bool recv_delete_partition_column_statistics(); - bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); - void send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); - bool recv_delete_table_column_statistics(); - void create_function(const Function& func); - void send_create_function(const Function& func); - void recv_create_function(); - void drop_function(const std::string& dbName, const std::string& funcName); - void send_drop_function(const std::string& dbName, const std::string& funcName); - void recv_drop_function(); - void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc); - void send_alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc); - void recv_alter_function(); - void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern); - void send_get_functions(const std::string& dbName, const std::string& pattern); - void recv_get_functions(std::vector & _return); - void get_function(Function& _return, const std::string& dbName, const std::string& funcName); - void send_get_function(const std::string& dbName, const std::string& funcName); - void recv_get_function(Function& _return); - void get_all_functions(GetAllFunctionsResponse& _return); - void send_get_all_functions(); - void recv_get_all_functions(GetAllFunctionsResponse& _return); - bool create_role(const Role& role); - void send_create_role(const Role& role); - bool recv_create_role(); - bool drop_role(const std::string& role_name); - void send_drop_role(const std::string& role_name); - bool recv_drop_role(); - void get_role_names(std::vector & _return); - void send_get_role_names(); - void recv_get_role_names(std::vector & _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); - void send_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); - bool recv_grant_role(); - bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type); - void send_revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type); - bool recv_revoke_role(); - void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type); - void send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type); - void recv_list_roles(std::vector & _return); - void grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request); - void send_grant_revoke_role(const GrantRevokeRoleRequest& request); - void recv_grant_revoke_role(GrantRevokeRoleResponse& _return); - void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request); - void send_get_principals_in_role(const GetPrincipalsInRoleRequest& request); - void recv_get_principals_in_role(GetPrincipalsInRoleResponse& _return); - void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request); - void send_get_role_grants_for_principal(const GetRoleGrantsForPrincipalRequest& request); - void recv_get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return); - void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names); - void send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names); - void recv_get_privilege_set(PrincipalPrivilegeSet& _return); - void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject); - void send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject); - void recv_list_privileges(std::vector & _return); - bool grant_privileges(const PrivilegeBag& privileges); - void send_grant_privileges(const PrivilegeBag& privileges); - bool recv_grant_privileges(); - bool revoke_privileges(const PrivilegeBag& privileges); - void send_revoke_privileges(const PrivilegeBag& privileges); - bool recv_revoke_privileges(); - void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request); - void send_grant_revoke_privileges(const GrantRevokePrivilegeRequest& request); - void recv_grant_revoke_privileges(GrantRevokePrivilegeResponse& _return); - void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names); - void send_set_ugi(const std::string& user_name, const std::vector & group_names); - void recv_set_ugi(std::vector & _return); - void get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name); - void send_get_delegation_token(const std::string& token_owner, const std::string& renewer_kerberos_principal_name); - void recv_get_delegation_token(std::string& _return); - int64_t renew_delegation_token(const std::string& token_str_form); - void send_renew_delegation_token(const std::string& token_str_form); - int64_t recv_renew_delegation_token(); - void cancel_delegation_token(const std::string& token_str_form); - void send_cancel_delegation_token(const std::string& token_str_form); - void recv_cancel_delegation_token(); - bool add_token(const std::string& token_identifier, const std::string& delegation_token); - void send_add_token(const std::string& token_identifier, const std::string& delegation_token); - bool recv_add_token(); - bool remove_token(const std::string& token_identifier); - void send_remove_token(const std::string& token_identifier); - bool recv_remove_token(); - void get_token(std::string& _return, const std::string& token_identifier); - void send_get_token(const std::string& token_identifier); - void recv_get_token(std::string& _return); - void get_all_token_identifiers(std::vector & _return); - void send_get_all_token_identifiers(); - void recv_get_all_token_identifiers(std::vector & _return); - int32_t add_master_key(const std::string& key); - void send_add_master_key(const std::string& key); - int32_t recv_add_master_key(); - void update_master_key(const int32_t seq_number, const std::string& key); - void send_update_master_key(const int32_t seq_number, const std::string& key); - void recv_update_master_key(); - bool remove_master_key(const int32_t key_seq); - void send_remove_master_key(const int32_t key_seq); - bool recv_remove_master_key(); - void get_master_keys(std::vector & _return); - void send_get_master_keys(); - void recv_get_master_keys(std::vector & _return); - void get_open_txns(GetOpenTxnsResponse& _return); - void send_get_open_txns(); - void recv_get_open_txns(GetOpenTxnsResponse& _return); - void get_open_txns_info(GetOpenTxnsInfoResponse& _return); - void send_get_open_txns_info(); - void recv_get_open_txns_info(GetOpenTxnsInfoResponse& _return); - void open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst); - void send_open_txns(const OpenTxnRequest& rqst); - void recv_open_txns(OpenTxnsResponse& _return); - void abort_txn(const AbortTxnRequest& rqst); - void send_abort_txn(const AbortTxnRequest& rqst); - void recv_abort_txn(); - void abort_txns(const AbortTxnsRequest& rqst); - void send_abort_txns(const AbortTxnsRequest& rqst); - void recv_abort_txns(); - void commit_txn(const CommitTxnRequest& rqst); - void send_commit_txn(const CommitTxnRequest& rqst); - void recv_commit_txn(); - void lock(LockResponse& _return, const LockRequest& rqst); - void send_lock(const LockRequest& rqst); - void recv_lock(LockResponse& _return); - void check_lock(LockResponse& _return, const CheckLockRequest& rqst); - void send_check_lock(const CheckLockRequest& rqst); - void recv_check_lock(LockResponse& _return); - void unlock(const UnlockRequest& rqst); - void send_unlock(const UnlockRequest& rqst); - void recv_unlock(); - void show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst); - void send_show_locks(const ShowLocksRequest& rqst); - void recv_show_locks(ShowLocksResponse& _return); - void heartbeat(const HeartbeatRequest& ids); - void send_heartbeat(const HeartbeatRequest& ids); - void recv_heartbeat(); - void heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns); - void send_heartbeat_txn_range(const HeartbeatTxnRangeRequest& txns); - void recv_heartbeat_txn_range(HeartbeatTxnRangeResponse& _return); - void compact(const CompactionRequest& rqst); - void send_compact(const CompactionRequest& rqst); - void recv_compact(); - void compact2(CompactionResponse& _return, const CompactionRequest& rqst); - void send_compact2(const CompactionRequest& rqst); - void recv_compact2(CompactionResponse& _return); - void show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst); - void send_show_compact(const ShowCompactRequest& rqst); - void recv_show_compact(ShowCompactResponse& _return); - void add_dynamic_partitions(const AddDynamicPartitions& rqst); - void send_add_dynamic_partitions(const AddDynamicPartitions& rqst); - void recv_add_dynamic_partitions(); - void get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst); - void send_get_next_notification(const NotificationEventRequest& rqst); - void recv_get_next_notification(NotificationEventResponse& _return); - void get_current_notificationEventId(CurrentNotificationEventId& _return); - void send_get_current_notificationEventId(); - void recv_get_current_notificationEventId(CurrentNotificationEventId& _return); - void fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst); - void send_fire_listener_event(const FireEventRequest& rqst); - void recv_fire_listener_event(FireEventResponse& _return); - void flushCache(); - void send_flushCache(); - void recv_flushCache(); - void cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request); - void send_cm_recycle(const CmRecycleRequest& request); - void recv_cm_recycle(CmRecycleResponse& _return); - void get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req); - void send_get_file_metadata_by_expr(const GetFileMetadataByExprRequest& req); - void recv_get_file_metadata_by_expr(GetFileMetadataByExprResult& _return); - void get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req); - void send_get_file_metadata(const GetFileMetadataRequest& req); - void recv_get_file_metadata(GetFileMetadataResult& _return); - void put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req); - void send_put_file_metadata(const PutFileMetadataRequest& req); - void recv_put_file_metadata(PutFileMetadataResult& _return); - void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req); - void send_clear_file_metadata(const ClearFileMetadataRequest& req); - void recv_clear_file_metadata(ClearFileMetadataResult& _return); - void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req); - void send_cache_file_metadata(const CacheFileMetadataRequest& req); - void recv_cache_file_metadata(CacheFileMetadataResult& _return); - void get_metastore_db_uuid(std::string& _return); - void send_get_metastore_db_uuid(); - void recv_get_metastore_db_uuid(std::string& _return); -}; - -class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceProcessor { - protected: - boost::shared_ptr iface_; - virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); - private: - typedef void (ThriftHiveMetastoreProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); - typedef std::map ProcessMap; - ProcessMap processMap_; - void process_getMetaConf(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_setMetaConf(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - 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); - void process_get_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_all_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_alter_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_create_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_type_all(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_fields(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_fields_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_schema_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_create_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_create_table_with_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_drop_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_primary_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_foreign_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_unique_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_not_null_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_drop_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_truncate_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_tables_by_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_table_meta(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_table_objects_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_table_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_table_objects_by_name_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_table_names_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_alter_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_alter_table_with_cascade(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_partitions_pspec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_partitions_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_append_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_append_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_append_partition_by_name_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_drop_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_drop_partition_by_name_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_drop_partitions_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_exchange_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_exchange_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partition_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partitions_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partitions_pspec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partition_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partitions_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partitions_ps_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partition_names_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_part_specs_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partitions_by_expr(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_num_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partitions_by_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_alter_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_alter_partitions_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_alter_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_rename_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_partition_name_has_valid_characters(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_config_value(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_partition_name_to_vals(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_partition_name_to_spec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_markPartitionForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_isPartitionMarkedForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_alter_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_drop_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_primary_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_foreign_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_unique_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_not_null_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_update_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_update_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_table_statistics_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_partitions_statistics_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_aggr_stats_for(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_set_aggr_stats_for(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_delete_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_delete_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_create_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_drop_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_alter_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_all_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_create_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_drop_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_role_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_grant_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_revoke_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_list_roles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_grant_revoke_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_principals_in_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_role_grants_for_principal(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_list_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_grant_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_grant_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_set_ugi(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_renew_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_cancel_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_remove_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_all_token_identifiers(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_update_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_remove_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_master_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_open_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_open_txns_info(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_open_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_abort_txn(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_abort_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_commit_txn(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_lock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_check_lock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_unlock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_show_locks(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_heartbeat(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_heartbeat_txn_range(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_compact(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_compact2(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_show_compact(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_dynamic_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_next_notification(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_current_notificationEventId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_fire_listener_event(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_flushCache(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_cm_recycle(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_file_metadata_by_expr(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_put_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_clear_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_cache_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_metastore_db_uuid(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), - iface_(iface) { - processMap_["getMetaConf"] = &ThriftHiveMetastoreProcessor::process_getMetaConf; - processMap_["setMetaConf"] = &ThriftHiveMetastoreProcessor::process_setMetaConf; - processMap_["create_database"] = &ThriftHiveMetastoreProcessor::process_create_database; - processMap_["get_database"] = &ThriftHiveMetastoreProcessor::process_get_database; - processMap_["drop_database"] = &ThriftHiveMetastoreProcessor::process_drop_database; - processMap_["get_databases"] = &ThriftHiveMetastoreProcessor::process_get_databases; - processMap_["get_all_databases"] = &ThriftHiveMetastoreProcessor::process_get_all_databases; - processMap_["alter_database"] = &ThriftHiveMetastoreProcessor::process_alter_database; - processMap_["get_type"] = &ThriftHiveMetastoreProcessor::process_get_type; - processMap_["create_type"] = &ThriftHiveMetastoreProcessor::process_create_type; - processMap_["drop_type"] = &ThriftHiveMetastoreProcessor::process_drop_type; - processMap_["get_type_all"] = &ThriftHiveMetastoreProcessor::process_get_type_all; - processMap_["get_fields"] = &ThriftHiveMetastoreProcessor::process_get_fields; - processMap_["get_fields_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_get_fields_with_environment_context; - processMap_["get_schema"] = &ThriftHiveMetastoreProcessor::process_get_schema; - processMap_["get_schema_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_get_schema_with_environment_context; - processMap_["create_table"] = &ThriftHiveMetastoreProcessor::process_create_table; - processMap_["create_table_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_create_table_with_environment_context; - processMap_["create_table_with_constraints"] = &ThriftHiveMetastoreProcessor::process_create_table_with_constraints; - processMap_["drop_constraint"] = &ThriftHiveMetastoreProcessor::process_drop_constraint; - processMap_["add_primary_key"] = &ThriftHiveMetastoreProcessor::process_add_primary_key; - processMap_["add_foreign_key"] = &ThriftHiveMetastoreProcessor::process_add_foreign_key; - processMap_["add_unique_constraint"] = &ThriftHiveMetastoreProcessor::process_add_unique_constraint; - processMap_["add_not_null_constraint"] = &ThriftHiveMetastoreProcessor::process_add_not_null_constraint; - processMap_["drop_table"] = &ThriftHiveMetastoreProcessor::process_drop_table; - processMap_["drop_table_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_drop_table_with_environment_context; - processMap_["truncate_table"] = &ThriftHiveMetastoreProcessor::process_truncate_table; - processMap_["get_tables"] = &ThriftHiveMetastoreProcessor::process_get_tables; - processMap_["get_tables_by_type"] = &ThriftHiveMetastoreProcessor::process_get_tables_by_type; - processMap_["get_table_meta"] = &ThriftHiveMetastoreProcessor::process_get_table_meta; - processMap_["get_all_tables"] = &ThriftHiveMetastoreProcessor::process_get_all_tables; - processMap_["get_table"] = &ThriftHiveMetastoreProcessor::process_get_table; - processMap_["get_table_objects_by_name"] = &ThriftHiveMetastoreProcessor::process_get_table_objects_by_name; - processMap_["get_table_req"] = &ThriftHiveMetastoreProcessor::process_get_table_req; - processMap_["get_table_objects_by_name_req"] = &ThriftHiveMetastoreProcessor::process_get_table_objects_by_name_req; - processMap_["get_table_names_by_filter"] = &ThriftHiveMetastoreProcessor::process_get_table_names_by_filter; - processMap_["alter_table"] = &ThriftHiveMetastoreProcessor::process_alter_table; - processMap_["alter_table_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_alter_table_with_environment_context; - processMap_["alter_table_with_cascade"] = &ThriftHiveMetastoreProcessor::process_alter_table_with_cascade; - processMap_["add_partition"] = &ThriftHiveMetastoreProcessor::process_add_partition; - processMap_["add_partition_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_add_partition_with_environment_context; - processMap_["add_partitions"] = &ThriftHiveMetastoreProcessor::process_add_partitions; - processMap_["add_partitions_pspec"] = &ThriftHiveMetastoreProcessor::process_add_partitions_pspec; - processMap_["append_partition"] = &ThriftHiveMetastoreProcessor::process_append_partition; - processMap_["add_partitions_req"] = &ThriftHiveMetastoreProcessor::process_add_partitions_req; - processMap_["append_partition_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_append_partition_with_environment_context; - processMap_["append_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_append_partition_by_name; - processMap_["append_partition_by_name_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_append_partition_by_name_with_environment_context; - processMap_["drop_partition"] = &ThriftHiveMetastoreProcessor::process_drop_partition; - processMap_["drop_partition_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_drop_partition_with_environment_context; - processMap_["drop_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_drop_partition_by_name; - processMap_["drop_partition_by_name_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_drop_partition_by_name_with_environment_context; - processMap_["drop_partitions_req"] = &ThriftHiveMetastoreProcessor::process_drop_partitions_req; - processMap_["get_partition"] = &ThriftHiveMetastoreProcessor::process_get_partition; - processMap_["exchange_partition"] = &ThriftHiveMetastoreProcessor::process_exchange_partition; - processMap_["exchange_partitions"] = &ThriftHiveMetastoreProcessor::process_exchange_partitions; - processMap_["get_partition_with_auth"] = &ThriftHiveMetastoreProcessor::process_get_partition_with_auth; - processMap_["get_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_get_partition_by_name; - processMap_["get_partitions"] = &ThriftHiveMetastoreProcessor::process_get_partitions; - processMap_["get_partitions_with_auth"] = &ThriftHiveMetastoreProcessor::process_get_partitions_with_auth; - processMap_["get_partitions_pspec"] = &ThriftHiveMetastoreProcessor::process_get_partitions_pspec; - processMap_["get_partition_names"] = &ThriftHiveMetastoreProcessor::process_get_partition_names; - processMap_["get_partitions_ps"] = &ThriftHiveMetastoreProcessor::process_get_partitions_ps; - processMap_["get_partitions_ps_with_auth"] = &ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth; - processMap_["get_partition_names_ps"] = &ThriftHiveMetastoreProcessor::process_get_partition_names_ps; - processMap_["get_partitions_by_filter"] = &ThriftHiveMetastoreProcessor::process_get_partitions_by_filter; - processMap_["get_part_specs_by_filter"] = &ThriftHiveMetastoreProcessor::process_get_part_specs_by_filter; - processMap_["get_partitions_by_expr"] = &ThriftHiveMetastoreProcessor::process_get_partitions_by_expr; - processMap_["get_num_partitions_by_filter"] = &ThriftHiveMetastoreProcessor::process_get_num_partitions_by_filter; - processMap_["get_partitions_by_names"] = &ThriftHiveMetastoreProcessor::process_get_partitions_by_names; - processMap_["alter_partition"] = &ThriftHiveMetastoreProcessor::process_alter_partition; - processMap_["alter_partitions"] = &ThriftHiveMetastoreProcessor::process_alter_partitions; - processMap_["alter_partitions_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_alter_partitions_with_environment_context; - processMap_["alter_partition_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_alter_partition_with_environment_context; - processMap_["rename_partition"] = &ThriftHiveMetastoreProcessor::process_rename_partition; - processMap_["partition_name_has_valid_characters"] = &ThriftHiveMetastoreProcessor::process_partition_name_has_valid_characters; - processMap_["get_config_value"] = &ThriftHiveMetastoreProcessor::process_get_config_value; - processMap_["partition_name_to_vals"] = &ThriftHiveMetastoreProcessor::process_partition_name_to_vals; - processMap_["partition_name_to_spec"] = &ThriftHiveMetastoreProcessor::process_partition_name_to_spec; - processMap_["markPartitionForEvent"] = &ThriftHiveMetastoreProcessor::process_markPartitionForEvent; - processMap_["isPartitionMarkedForEvent"] = &ThriftHiveMetastoreProcessor::process_isPartitionMarkedForEvent; - processMap_["add_index"] = &ThriftHiveMetastoreProcessor::process_add_index; - processMap_["alter_index"] = &ThriftHiveMetastoreProcessor::process_alter_index; - processMap_["drop_index_by_name"] = &ThriftHiveMetastoreProcessor::process_drop_index_by_name; - processMap_["get_index_by_name"] = &ThriftHiveMetastoreProcessor::process_get_index_by_name; - processMap_["get_indexes"] = &ThriftHiveMetastoreProcessor::process_get_indexes; - processMap_["get_index_names"] = &ThriftHiveMetastoreProcessor::process_get_index_names; - processMap_["get_primary_keys"] = &ThriftHiveMetastoreProcessor::process_get_primary_keys; - processMap_["get_foreign_keys"] = &ThriftHiveMetastoreProcessor::process_get_foreign_keys; - processMap_["get_unique_constraints"] = &ThriftHiveMetastoreProcessor::process_get_unique_constraints; - processMap_["get_not_null_constraints"] = &ThriftHiveMetastoreProcessor::process_get_not_null_constraints; - processMap_["update_table_column_statistics"] = &ThriftHiveMetastoreProcessor::process_update_table_column_statistics; - processMap_["update_partition_column_statistics"] = &ThriftHiveMetastoreProcessor::process_update_partition_column_statistics; - processMap_["get_table_column_statistics"] = &ThriftHiveMetastoreProcessor::process_get_table_column_statistics; - processMap_["get_partition_column_statistics"] = &ThriftHiveMetastoreProcessor::process_get_partition_column_statistics; - processMap_["get_table_statistics_req"] = &ThriftHiveMetastoreProcessor::process_get_table_statistics_req; - processMap_["get_partitions_statistics_req"] = &ThriftHiveMetastoreProcessor::process_get_partitions_statistics_req; - processMap_["get_aggr_stats_for"] = &ThriftHiveMetastoreProcessor::process_get_aggr_stats_for; - processMap_["set_aggr_stats_for"] = &ThriftHiveMetastoreProcessor::process_set_aggr_stats_for; - processMap_["delete_partition_column_statistics"] = &ThriftHiveMetastoreProcessor::process_delete_partition_column_statistics; - processMap_["delete_table_column_statistics"] = &ThriftHiveMetastoreProcessor::process_delete_table_column_statistics; - processMap_["create_function"] = &ThriftHiveMetastoreProcessor::process_create_function; - processMap_["drop_function"] = &ThriftHiveMetastoreProcessor::process_drop_function; - processMap_["alter_function"] = &ThriftHiveMetastoreProcessor::process_alter_function; - processMap_["get_functions"] = &ThriftHiveMetastoreProcessor::process_get_functions; - processMap_["get_function"] = &ThriftHiveMetastoreProcessor::process_get_function; - processMap_["get_all_functions"] = &ThriftHiveMetastoreProcessor::process_get_all_functions; - processMap_["create_role"] = &ThriftHiveMetastoreProcessor::process_create_role; - processMap_["drop_role"] = &ThriftHiveMetastoreProcessor::process_drop_role; - processMap_["get_role_names"] = &ThriftHiveMetastoreProcessor::process_get_role_names; - processMap_["grant_role"] = &ThriftHiveMetastoreProcessor::process_grant_role; - processMap_["revoke_role"] = &ThriftHiveMetastoreProcessor::process_revoke_role; - processMap_["list_roles"] = &ThriftHiveMetastoreProcessor::process_list_roles; - processMap_["grant_revoke_role"] = &ThriftHiveMetastoreProcessor::process_grant_revoke_role; - processMap_["get_principals_in_role"] = &ThriftHiveMetastoreProcessor::process_get_principals_in_role; - processMap_["get_role_grants_for_principal"] = &ThriftHiveMetastoreProcessor::process_get_role_grants_for_principal; - processMap_["get_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_privilege_set; - processMap_["list_privileges"] = &ThriftHiveMetastoreProcessor::process_list_privileges; - processMap_["grant_privileges"] = &ThriftHiveMetastoreProcessor::process_grant_privileges; - processMap_["revoke_privileges"] = &ThriftHiveMetastoreProcessor::process_revoke_privileges; - processMap_["grant_revoke_privileges"] = &ThriftHiveMetastoreProcessor::process_grant_revoke_privileges; - processMap_["set_ugi"] = &ThriftHiveMetastoreProcessor::process_set_ugi; - processMap_["get_delegation_token"] = &ThriftHiveMetastoreProcessor::process_get_delegation_token; - processMap_["renew_delegation_token"] = &ThriftHiveMetastoreProcessor::process_renew_delegation_token; - processMap_["cancel_delegation_token"] = &ThriftHiveMetastoreProcessor::process_cancel_delegation_token; - processMap_["add_token"] = &ThriftHiveMetastoreProcessor::process_add_token; - processMap_["remove_token"] = &ThriftHiveMetastoreProcessor::process_remove_token; - processMap_["get_token"] = &ThriftHiveMetastoreProcessor::process_get_token; - processMap_["get_all_token_identifiers"] = &ThriftHiveMetastoreProcessor::process_get_all_token_identifiers; - processMap_["add_master_key"] = &ThriftHiveMetastoreProcessor::process_add_master_key; - processMap_["update_master_key"] = &ThriftHiveMetastoreProcessor::process_update_master_key; - processMap_["remove_master_key"] = &ThriftHiveMetastoreProcessor::process_remove_master_key; - processMap_["get_master_keys"] = &ThriftHiveMetastoreProcessor::process_get_master_keys; - processMap_["get_open_txns"] = &ThriftHiveMetastoreProcessor::process_get_open_txns; - processMap_["get_open_txns_info"] = &ThriftHiveMetastoreProcessor::process_get_open_txns_info; - processMap_["open_txns"] = &ThriftHiveMetastoreProcessor::process_open_txns; - processMap_["abort_txn"] = &ThriftHiveMetastoreProcessor::process_abort_txn; - processMap_["abort_txns"] = &ThriftHiveMetastoreProcessor::process_abort_txns; - processMap_["commit_txn"] = &ThriftHiveMetastoreProcessor::process_commit_txn; - processMap_["lock"] = &ThriftHiveMetastoreProcessor::process_lock; - processMap_["check_lock"] = &ThriftHiveMetastoreProcessor::process_check_lock; - processMap_["unlock"] = &ThriftHiveMetastoreProcessor::process_unlock; - processMap_["show_locks"] = &ThriftHiveMetastoreProcessor::process_show_locks; - processMap_["heartbeat"] = &ThriftHiveMetastoreProcessor::process_heartbeat; - processMap_["heartbeat_txn_range"] = &ThriftHiveMetastoreProcessor::process_heartbeat_txn_range; - processMap_["compact"] = &ThriftHiveMetastoreProcessor::process_compact; - processMap_["compact2"] = &ThriftHiveMetastoreProcessor::process_compact2; - processMap_["show_compact"] = &ThriftHiveMetastoreProcessor::process_show_compact; - processMap_["add_dynamic_partitions"] = &ThriftHiveMetastoreProcessor::process_add_dynamic_partitions; - processMap_["get_next_notification"] = &ThriftHiveMetastoreProcessor::process_get_next_notification; - processMap_["get_current_notificationEventId"] = &ThriftHiveMetastoreProcessor::process_get_current_notificationEventId; - processMap_["fire_listener_event"] = &ThriftHiveMetastoreProcessor::process_fire_listener_event; - processMap_["flushCache"] = &ThriftHiveMetastoreProcessor::process_flushCache; - processMap_["cm_recycle"] = &ThriftHiveMetastoreProcessor::process_cm_recycle; - processMap_["get_file_metadata_by_expr"] = &ThriftHiveMetastoreProcessor::process_get_file_metadata_by_expr; - processMap_["get_file_metadata"] = &ThriftHiveMetastoreProcessor::process_get_file_metadata; - processMap_["put_file_metadata"] = &ThriftHiveMetastoreProcessor::process_put_file_metadata; - processMap_["clear_file_metadata"] = &ThriftHiveMetastoreProcessor::process_clear_file_metadata; - processMap_["cache_file_metadata"] = &ThriftHiveMetastoreProcessor::process_cache_file_metadata; - processMap_["get_metastore_db_uuid"] = &ThriftHiveMetastoreProcessor::process_get_metastore_db_uuid; - } - - virtual ~ThriftHiveMetastoreProcessor() {} -}; - -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); - } - } - virtual ~ThriftHiveMetastoreMultiface() {} - protected: - std::vector > ifaces_; - ThriftHiveMetastoreMultiface() {} - void add(boost::shared_ptr iface) { - ::facebook::fb303::FacebookServiceMultiface::add(iface); - ifaces_.push_back(iface); - } - public: - void getMetaConf(std::string& _return, const std::string& key) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->getMetaConf(_return, key); - } - ifaces_[i]->getMetaConf(_return, key); - return; - } - - void setMetaConf(const std::string& key, const std::string& value) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->setMetaConf(key, value); - } - ifaces_[i]->setMetaConf(key, value); - } - - void create_database(const Database& database) { - size_t sz = ifaces_.size(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_fields_with_environment_context(_return, db_name, table_name, environment_context); - } - ifaces_[i]->get_fields_with_environment_context(_return, db_name, table_name, environment_context); - return; - } - - void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { - size_t sz = ifaces_.size(); - 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 get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_schema_with_environment_context(_return, db_name, table_name, environment_context); - } - ifaces_[i]->get_schema_with_environment_context(_return, db_name, table_name, environment_context); - return; - } - - void create_table(const Table& tbl) { - size_t sz = ifaces_.size(); - 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(); - 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 create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints); - } - ifaces_[i]->create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints); - } - - void drop_constraint(const DropConstraintRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->drop_constraint(req); - } - ifaces_[i]->drop_constraint(req); - } - - void add_primary_key(const AddPrimaryKeyRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->add_primary_key(req); - } - ifaces_[i]->add_primary_key(req); - } - - void add_foreign_key(const AddForeignKeyRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->add_foreign_key(req); - } - ifaces_[i]->add_foreign_key(req); - } - - void add_unique_constraint(const AddUniqueConstraintRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->add_unique_constraint(req); - } - ifaces_[i]->add_unique_constraint(req); - } - - void add_not_null_constraint(const AddNotNullConstraintRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->add_not_null_constraint(req); - } - ifaces_[i]->add_not_null_constraint(req); - } - - void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->drop_table(dbname, name, deleteData); - } - ifaces_[i]->drop_table(dbname, name, deleteData); - } - - void drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->drop_table_with_environment_context(dbname, name, deleteData, environment_context); - } - ifaces_[i]->drop_table_with_environment_context(dbname, name, deleteData, environment_context); - } - - void truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->truncate_table(dbName, tableName, partNames); - } - ifaces_[i]->truncate_table(dbName, tableName, partNames); - } - - void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { - size_t sz = ifaces_.size(); - 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_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_tables_by_type(_return, db_name, pattern, tableType); - } - ifaces_[i]->get_tables_by_type(_return, db_name, pattern, tableType); - return; - } - - void get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_table_meta(_return, db_patterns, tbl_patterns, tbl_types); - } - ifaces_[i]->get_table_meta(_return, db_patterns, tbl_patterns, tbl_types); - return; - } - - void get_all_tables(std::vector & _return, const std::string& db_name) { - size_t sz = ifaces_.size(); - 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(); - 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(); - 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_req(GetTableResult& _return, const GetTableRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_table_req(_return, req); - } - ifaces_[i]->get_table_req(_return, req); - return; - } - - void get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_table_objects_by_name_req(_return, req); - } - ifaces_[i]->get_table_objects_by_name_req(_return, req); - 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(); - 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(); - 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(); - 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 alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade); - } - ifaces_[i]->alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade); - } - - void add_partition(Partition& _return, const Partition& new_part) { - size_t sz = ifaces_.size(); - 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(); - 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(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->add_partitions(new_parts); - } - return ifaces_[i]->add_partitions(new_parts); - } - - int32_t add_partitions_pspec(const std::vector & new_parts) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->add_partitions_pspec(new_parts); - } - return ifaces_[i]->add_partitions_pspec(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(); - 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 add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->add_partitions_req(_return, request); - } - ifaces_[i]->add_partitions_req(_return, request); - return; - } - - void append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->append_partition_with_environment_context(_return, db_name, tbl_name, part_vals, environment_context); - } - ifaces_[i]->append_partition_with_environment_context(_return, db_name, tbl_name, part_vals, environment_context); - 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(); - 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; - } - - void append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->append_partition_by_name_with_environment_context(_return, db_name, tbl_name, part_name, environment_context); - } - ifaces_[i]->append_partition_by_name_with_environment_context(_return, db_name, tbl_name, part_name, environment_context); - 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(); - 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_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); - } - return ifaces_[i]->drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); - } - - 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(); - 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); - } - - bool drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); - } - return ifaces_[i]->drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); - } - - void drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->drop_partitions_req(_return, req); - } - ifaces_[i]->drop_partitions_req(_return, req); - return; - } - - 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(); - 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 exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->exchange_partition(_return, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); - } - ifaces_[i]->exchange_partition(_return, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); - return; - } - - void exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->exchange_partitions(_return, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); - } - ifaces_[i]->exchange_partitions(_return, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); - 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(); - 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(); - 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(); - 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(); - 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_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_partitions_pspec(_return, db_name, tbl_name, max_parts); - } - ifaces_[i]->get_partitions_pspec(_return, db_name, tbl_name, max_parts); - 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(); - 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(); - 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(); - 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(); - 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(); - 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_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_part_specs_by_filter(_return, db_name, tbl_name, filter, max_parts); - } - ifaces_[i]->get_part_specs_by_filter(_return, db_name, tbl_name, filter, max_parts); - return; - } - - void get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_partitions_by_expr(_return, req); - } - ifaces_[i]->get_partitions_by_expr(_return, req); - return; - } - - int32_t get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_num_partitions_by_filter(db_name, tbl_name, filter); - } - return ifaces_[i]->get_num_partitions_by_filter(db_name, tbl_name, filter); - } - - 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(); - 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(); - 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(); - 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_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context); - } - ifaces_[i]->alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context); - } - - 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(); - 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(); - 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); - } - - bool partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->partition_name_has_valid_characters(part_vals, throw_exception); - } - return ifaces_[i]->partition_name_has_valid_characters(part_vals, throw_exception); - } - - void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { - size_t sz = ifaces_.size(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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; - } - - void get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_primary_keys(_return, request); - } - ifaces_[i]->get_primary_keys(_return, request); - return; - } - - void get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_foreign_keys(_return, request); - } - ifaces_[i]->get_foreign_keys(_return, request); - return; - } - - void get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_unique_constraints(_return, request); - } - ifaces_[i]->get_unique_constraints(_return, request); - return; - } - - void get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_not_null_constraints(_return, request); - } - ifaces_[i]->get_not_null_constraints(_return, request); - return; - } - - bool update_table_column_statistics(const ColumnStatistics& stats_obj) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->update_table_column_statistics(stats_obj); - } - return ifaces_[i]->update_table_column_statistics(stats_obj); - } - - bool update_partition_column_statistics(const ColumnStatistics& stats_obj) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->update_partition_column_statistics(stats_obj); - } - return ifaces_[i]->update_partition_column_statistics(stats_obj); - } - - void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_table_column_statistics(_return, db_name, tbl_name, col_name); - } - ifaces_[i]->get_table_column_statistics(_return, db_name, tbl_name, col_name); - return; - } - - void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_partition_column_statistics(_return, db_name, tbl_name, part_name, col_name); - } - ifaces_[i]->get_partition_column_statistics(_return, db_name, tbl_name, part_name, col_name); - return; - } - - void get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_table_statistics_req(_return, request); - } - ifaces_[i]->get_table_statistics_req(_return, request); - return; - } - - void get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_partitions_statistics_req(_return, request); - } - ifaces_[i]->get_partitions_statistics_req(_return, request); - return; - } - - void get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_aggr_stats_for(_return, request); - } - ifaces_[i]->get_aggr_stats_for(_return, request); - return; - } - - bool set_aggr_stats_for(const SetPartitionsStatsRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->set_aggr_stats_for(request); - } - return ifaces_[i]->set_aggr_stats_for(request); - } - - bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); - } - return ifaces_[i]->delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); - } - - bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->delete_table_column_statistics(db_name, tbl_name, col_name); - } - return ifaces_[i]->delete_table_column_statistics(db_name, tbl_name, col_name); - } - - void create_function(const Function& func) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->create_function(func); - } - ifaces_[i]->create_function(func); - } - - void drop_function(const std::string& dbName, const std::string& funcName) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->drop_function(dbName, funcName); - } - ifaces_[i]->drop_function(dbName, funcName); - } - - void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->alter_function(dbName, funcName, newFunc); - } - ifaces_[i]->alter_function(dbName, funcName, newFunc); - } - - void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_functions(_return, dbName, pattern); - } - ifaces_[i]->get_functions(_return, dbName, pattern); - return; - } - - void get_function(Function& _return, const std::string& dbName, const std::string& funcName) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_function(_return, dbName, funcName); - } - ifaces_[i]->get_function(_return, dbName, funcName); - return; - } - - void get_all_functions(GetAllFunctionsResponse& _return) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_all_functions(_return); - } - ifaces_[i]->get_all_functions(_return); - return; - } - - bool create_role(const Role& role) { - size_t sz = ifaces_.size(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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 grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->grant_revoke_role(_return, request); - } - ifaces_[i]->grant_revoke_role(_return, request); - return; - } - - void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_principals_in_role(_return, request); - } - ifaces_[i]->get_principals_in_role(_return, request); - return; - } - - void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_role_grants_for_principal(_return, request); - } - ifaces_[i]->get_role_grants_for_principal(_return, request); - 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(); - 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(); - 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(); - 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(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->revoke_privileges(privileges); - } - return ifaces_[i]->revoke_privileges(privileges); - } - - void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->grant_revoke_privileges(_return, request); - } - ifaces_[i]->grant_revoke_privileges(_return, request); - return; - } - - void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) { - size_t sz = ifaces_.size(); - 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(); - 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(); - 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(); - 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); - } - - bool add_token(const std::string& token_identifier, const std::string& delegation_token) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->add_token(token_identifier, delegation_token); - } - return ifaces_[i]->add_token(token_identifier, delegation_token); - } - - bool remove_token(const std::string& token_identifier) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->remove_token(token_identifier); - } - return ifaces_[i]->remove_token(token_identifier); - } - - void get_token(std::string& _return, const std::string& token_identifier) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_token(_return, token_identifier); - } - ifaces_[i]->get_token(_return, token_identifier); - return; - } - - void get_all_token_identifiers(std::vector & _return) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_all_token_identifiers(_return); - } - ifaces_[i]->get_all_token_identifiers(_return); - return; - } - - int32_t add_master_key(const std::string& key) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->add_master_key(key); - } - return ifaces_[i]->add_master_key(key); - } - - void update_master_key(const int32_t seq_number, const std::string& key) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->update_master_key(seq_number, key); - } - ifaces_[i]->update_master_key(seq_number, key); - } - - bool remove_master_key(const int32_t key_seq) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->remove_master_key(key_seq); - } - return ifaces_[i]->remove_master_key(key_seq); - } - - void get_master_keys(std::vector & _return) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_master_keys(_return); - } - ifaces_[i]->get_master_keys(_return); - return; - } - - void get_open_txns(GetOpenTxnsResponse& _return) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_open_txns(_return); - } - ifaces_[i]->get_open_txns(_return); - return; - } - - void get_open_txns_info(GetOpenTxnsInfoResponse& _return) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_open_txns_info(_return); - } - ifaces_[i]->get_open_txns_info(_return); - return; - } - - void open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->open_txns(_return, rqst); - } - ifaces_[i]->open_txns(_return, rqst); - return; - } - - void abort_txn(const AbortTxnRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->abort_txn(rqst); - } - ifaces_[i]->abort_txn(rqst); - } - - void abort_txns(const AbortTxnsRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->abort_txns(rqst); - } - ifaces_[i]->abort_txns(rqst); - } - - void commit_txn(const CommitTxnRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->commit_txn(rqst); - } - ifaces_[i]->commit_txn(rqst); - } - - void lock(LockResponse& _return, const LockRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->lock(_return, rqst); - } - ifaces_[i]->lock(_return, rqst); - return; - } - - void check_lock(LockResponse& _return, const CheckLockRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->check_lock(_return, rqst); - } - ifaces_[i]->check_lock(_return, rqst); - return; - } - - void unlock(const UnlockRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->unlock(rqst); - } - ifaces_[i]->unlock(rqst); - } - - void show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->show_locks(_return, rqst); - } - ifaces_[i]->show_locks(_return, rqst); - return; - } - - void heartbeat(const HeartbeatRequest& ids) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->heartbeat(ids); - } - ifaces_[i]->heartbeat(ids); - } - - void heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->heartbeat_txn_range(_return, txns); - } - ifaces_[i]->heartbeat_txn_range(_return, txns); - return; - } - - void compact(const CompactionRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->compact(rqst); - } - ifaces_[i]->compact(rqst); - } - - void compact2(CompactionResponse& _return, const CompactionRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->compact2(_return, rqst); - } - ifaces_[i]->compact2(_return, rqst); - return; - } - - void show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->show_compact(_return, rqst); - } - ifaces_[i]->show_compact(_return, rqst); - return; - } - - void add_dynamic_partitions(const AddDynamicPartitions& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->add_dynamic_partitions(rqst); - } - ifaces_[i]->add_dynamic_partitions(rqst); - } - - void get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_next_notification(_return, rqst); - } - ifaces_[i]->get_next_notification(_return, rqst); - return; - } - - void get_current_notificationEventId(CurrentNotificationEventId& _return) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_current_notificationEventId(_return); - } - ifaces_[i]->get_current_notificationEventId(_return); - return; - } - - void fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->fire_listener_event(_return, rqst); - } - ifaces_[i]->fire_listener_event(_return, rqst); - return; - } - - void flushCache() { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->flushCache(); - } - ifaces_[i]->flushCache(); - } - - void cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->cm_recycle(_return, request); - } - ifaces_[i]->cm_recycle(_return, request); - return; - } - - void get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_file_metadata_by_expr(_return, req); - } - ifaces_[i]->get_file_metadata_by_expr(_return, req); - return; - } - - void get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_file_metadata(_return, req); - } - ifaces_[i]->get_file_metadata(_return, req); - return; - } - - void put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->put_file_metadata(_return, req); - } - ifaces_[i]->put_file_metadata(_return, req); - return; - } - - void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->clear_file_metadata(_return, req); - } - ifaces_[i]->clear_file_metadata(_return, req); - return; - } - - void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->cache_file_metadata(_return, req); - } - ifaces_[i]->cache_file_metadata(_return, req); - return; - } - - void get_metastore_db_uuid(std::string& _return) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_metastore_db_uuid(_return); - } - ifaces_[i]->get_metastore_db_uuid(_return); - return; - } - -}; - -// The 'concurrent' client is a thread safe client that correctly handles -// out of order responses. It is slower than the regular client, so should -// only be used when you need to share a connection among multiple threads -class ThriftHiveMetastoreConcurrentClient : virtual public ThriftHiveMetastoreIf, public ::facebook::fb303::FacebookServiceConcurrentClient { - public: - ThriftHiveMetastoreConcurrentClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : - ::facebook::fb303::FacebookServiceConcurrentClient(prot, prot) {} - ThriftHiveMetastoreConcurrentClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : ::facebook::fb303::FacebookServiceConcurrentClient(iprot, oprot) {} - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { - return piprot_; - } - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { - return poprot_; - } - void getMetaConf(std::string& _return, const std::string& key); - int32_t send_getMetaConf(const std::string& key); - void recv_getMetaConf(std::string& _return, const int32_t seqid); - void setMetaConf(const std::string& key, const std::string& value); - int32_t send_setMetaConf(const std::string& key, const std::string& value); - void recv_setMetaConf(const int32_t seqid); - void create_database(const Database& database); - int32_t send_create_database(const Database& database); - void recv_create_database(const int32_t seqid); - void get_database(Database& _return, const std::string& name); - int32_t send_get_database(const std::string& name); - void recv_get_database(Database& _return, const int32_t seqid); - void drop_database(const std::string& name, const bool deleteData, const bool cascade); - int32_t send_drop_database(const std::string& name, const bool deleteData, const bool cascade); - void recv_drop_database(const int32_t seqid); - void get_databases(std::vector & _return, const std::string& pattern); - int32_t send_get_databases(const std::string& pattern); - void recv_get_databases(std::vector & _return, const int32_t seqid); - void get_all_databases(std::vector & _return); - int32_t send_get_all_databases(); - void recv_get_all_databases(std::vector & _return, const int32_t seqid); - void alter_database(const std::string& dbname, const Database& db); - int32_t send_alter_database(const std::string& dbname, const Database& db); - void recv_alter_database(const int32_t seqid); - void get_type(Type& _return, const std::string& name); - int32_t send_get_type(const std::string& name); - void recv_get_type(Type& _return, const int32_t seqid); - bool create_type(const Type& type); - int32_t send_create_type(const Type& type); - bool recv_create_type(const int32_t seqid); - bool drop_type(const std::string& type); - int32_t send_drop_type(const std::string& type); - bool recv_drop_type(const int32_t seqid); - void get_type_all(std::map & _return, const std::string& name); - int32_t send_get_type_all(const std::string& name); - void recv_get_type_all(std::map & _return, const int32_t seqid); - void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name); - int32_t send_get_fields(const std::string& db_name, const std::string& table_name); - void recv_get_fields(std::vector & _return, const int32_t seqid); - void get_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); - int32_t send_get_fields_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); - void recv_get_fields_with_environment_context(std::vector & _return, const int32_t seqid); - void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name); - int32_t send_get_schema(const std::string& db_name, const std::string& table_name); - void recv_get_schema(std::vector & _return, const int32_t seqid); - void get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); - int32_t send_get_schema_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); - void recv_get_schema_with_environment_context(std::vector & _return, const int32_t seqid); - void create_table(const Table& tbl); - int32_t send_create_table(const Table& tbl); - void recv_create_table(const int32_t seqid); - void create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context); - int32_t send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context); - void recv_create_table_with_environment_context(const int32_t seqid); - void create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints); - int32_t send_create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints); - void recv_create_table_with_constraints(const int32_t seqid); - void drop_constraint(const DropConstraintRequest& req); - int32_t send_drop_constraint(const DropConstraintRequest& req); - void recv_drop_constraint(const int32_t seqid); - void add_primary_key(const AddPrimaryKeyRequest& req); - int32_t send_add_primary_key(const AddPrimaryKeyRequest& req); - void recv_add_primary_key(const int32_t seqid); - void add_foreign_key(const AddForeignKeyRequest& req); - int32_t send_add_foreign_key(const AddForeignKeyRequest& req); - void recv_add_foreign_key(const int32_t seqid); - void add_unique_constraint(const AddUniqueConstraintRequest& req); - int32_t send_add_unique_constraint(const AddUniqueConstraintRequest& req); - void recv_add_unique_constraint(const int32_t seqid); - void add_not_null_constraint(const AddNotNullConstraintRequest& req); - int32_t send_add_not_null_constraint(const AddNotNullConstraintRequest& req); - void recv_add_not_null_constraint(const int32_t seqid); - void drop_table(const std::string& dbname, const std::string& name, const bool deleteData); - int32_t send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData); - void recv_drop_table(const int32_t seqid); - void drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context); - int32_t send_drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context); - void recv_drop_table_with_environment_context(const int32_t seqid); - void truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames); - int32_t send_truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames); - void recv_truncate_table(const int32_t seqid); - void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern); - int32_t send_get_tables(const std::string& db_name, const std::string& pattern); - void recv_get_tables(std::vector & _return, const int32_t seqid); - void get_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType); - int32_t send_get_tables_by_type(const std::string& db_name, const std::string& pattern, const std::string& tableType); - void recv_get_tables_by_type(std::vector & _return, const int32_t seqid); - void get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types); - int32_t send_get_table_meta(const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types); - void recv_get_table_meta(std::vector & _return, const int32_t seqid); - void get_all_tables(std::vector & _return, const std::string& db_name); - int32_t send_get_all_tables(const std::string& db_name); - void recv_get_all_tables(std::vector & _return, const int32_t seqid); - void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name); - int32_t send_get_table(const std::string& dbname, const std::string& tbl_name); - void recv_get_table(Table& _return, const int32_t seqid); - void get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names); - int32_t send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names); - void recv_get_table_objects_by_name(std::vector
& _return, const int32_t seqid); - void get_table_req(GetTableResult& _return, const GetTableRequest& req); - int32_t send_get_table_req(const GetTableRequest& req); - void recv_get_table_req(GetTableResult& _return, const int32_t seqid); - void get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req); - int32_t send_get_table_objects_by_name_req(const GetTablesRequest& req); - void recv_get_table_objects_by_name_req(GetTablesResult& _return, const int32_t seqid); - void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables); - int32_t send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables); - void recv_get_table_names_by_filter(std::vector & _return, const int32_t seqid); - void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); - int32_t send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); - void recv_alter_table(const int32_t seqid); - void alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context); - int32_t send_alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context); - void recv_alter_table_with_environment_context(const int32_t seqid); - void alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade); - int32_t send_alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade); - void recv_alter_table_with_cascade(const int32_t seqid); - void add_partition(Partition& _return, const Partition& new_part); - int32_t send_add_partition(const Partition& new_part); - void recv_add_partition(Partition& _return, const int32_t seqid); - void add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context); - int32_t send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context); - void recv_add_partition_with_environment_context(Partition& _return, const int32_t seqid); - int32_t add_partitions(const std::vector & new_parts); - int32_t send_add_partitions(const std::vector & new_parts); - int32_t recv_add_partitions(const int32_t seqid); - int32_t add_partitions_pspec(const std::vector & new_parts); - int32_t send_add_partitions_pspec(const std::vector & new_parts); - int32_t recv_add_partitions_pspec(const int32_t seqid); - void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - int32_t send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void recv_append_partition(Partition& _return, const int32_t seqid); - void add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request); - int32_t send_add_partitions_req(const AddPartitionsRequest& request); - void recv_add_partitions_req(AddPartitionsResult& _return, const int32_t seqid); - void append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context); - int32_t send_append_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context); - void recv_append_partition_with_environment_context(Partition& _return, const int32_t seqid); - void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - int32_t send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void recv_append_partition_by_name(Partition& _return, const int32_t seqid); - void append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context); - int32_t send_append_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context); - void recv_append_partition_by_name_with_environment_context(Partition& _return, const int32_t seqid); - bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); - int32_t send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); - bool recv_drop_partition(const int32_t seqid); - bool drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context); - int32_t send_drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context); - bool recv_drop_partition_with_environment_context(const int32_t seqid); - bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); - int32_t send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); - bool recv_drop_partition_by_name(const int32_t seqid); - bool drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context); - int32_t send_drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context); - bool recv_drop_partition_by_name_with_environment_context(const int32_t seqid); - void drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req); - int32_t send_drop_partitions_req(const DropPartitionsRequest& req); - void recv_drop_partitions_req(DropPartitionsResult& _return, const int32_t seqid); - void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - int32_t send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void recv_get_partition(Partition& _return, const int32_t seqid); - void exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); - int32_t send_exchange_partition(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); - void recv_exchange_partition(Partition& _return, const int32_t seqid); - void exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); - int32_t send_exchange_partitions(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); - void recv_exchange_partitions(std::vector & _return, const int32_t seqid); - 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); - int32_t send_get_partition_with_auth(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); - void recv_get_partition_with_auth(Partition& _return, const int32_t seqid); - void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - int32_t send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void recv_get_partition_by_name(Partition& _return, const int32_t seqid); - void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - int32_t send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void recv_get_partitions(std::vector & _return, const int32_t seqid); - 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); - int32_t send_get_partitions_with_auth(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); - void recv_get_partitions_with_auth(std::vector & _return, const int32_t seqid); - void get_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts); - int32_t send_get_partitions_pspec(const std::string& db_name, const std::string& tbl_name, const int32_t max_parts); - void recv_get_partitions_pspec(std::vector & _return, const int32_t seqid); - void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - int32_t send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void recv_get_partition_names(std::vector & _return, const int32_t seqid); - 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); - int32_t send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void recv_get_partitions_ps(std::vector & _return, const int32_t seqid); - 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); - int32_t send_get_partitions_ps_with_auth(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); - void recv_get_partitions_ps_with_auth(std::vector & _return, const int32_t seqid); - 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); - int32_t send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void recv_get_partition_names_ps(std::vector & _return, const int32_t seqid); - 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); - int32_t send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); - void recv_get_partitions_by_filter(std::vector & _return, const int32_t seqid); - void get_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts); - int32_t send_get_part_specs_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts); - void recv_get_part_specs_by_filter(std::vector & _return, const int32_t seqid); - void get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req); - int32_t send_get_partitions_by_expr(const PartitionsByExprRequest& req); - void recv_get_partitions_by_expr(PartitionsByExprResult& _return, const int32_t seqid); - int32_t get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter); - int32_t send_get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter); - int32_t recv_get_num_partitions_by_filter(const int32_t seqid); - void get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names); - int32_t send_get_partitions_by_names(const std::string& db_name, const std::string& tbl_name, const std::vector & names); - void recv_get_partitions_by_names(std::vector & _return, const int32_t seqid); - void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); - int32_t send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); - void recv_alter_partition(const int32_t seqid); - void alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts); - int32_t send_alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts); - void recv_alter_partitions(const int32_t seqid); - void alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context); - int32_t send_alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context); - void recv_alter_partitions_with_environment_context(const int32_t seqid); - void alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context); - int32_t send_alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context); - void recv_alter_partition_with_environment_context(const int32_t seqid); - void rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part); - int32_t send_rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part); - void recv_rename_partition(const int32_t seqid); - bool partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception); - int32_t send_partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception); - bool recv_partition_name_has_valid_characters(const int32_t seqid); - void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue); - int32_t send_get_config_value(const std::string& name, const std::string& defaultValue); - void recv_get_config_value(std::string& _return, const int32_t seqid); - void partition_name_to_vals(std::vector & _return, const std::string& part_name); - int32_t send_partition_name_to_vals(const std::string& part_name); - void recv_partition_name_to_vals(std::vector & _return, const int32_t seqid); - void partition_name_to_spec(std::map & _return, const std::string& part_name); - int32_t send_partition_name_to_spec(const std::string& part_name); - void recv_partition_name_to_spec(std::map & _return, const int32_t seqid); - void markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); - int32_t send_markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); - void recv_markPartitionForEvent(const int32_t seqid); - bool isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); - int32_t send_isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); - bool recv_isPartitionMarkedForEvent(const int32_t seqid); - void add_index(Index& _return, const Index& new_index, const Table& index_table); - int32_t send_add_index(const Index& new_index, const Table& index_table); - void recv_add_index(Index& _return, const int32_t seqid); - void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); - int32_t send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); - void recv_alter_index(const int32_t seqid); - bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); - int32_t send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); - bool recv_drop_index_by_name(const int32_t seqid); - void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name); - int32_t send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name); - void recv_get_index_by_name(Index& _return, const int32_t seqid); - void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - int32_t send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void recv_get_indexes(std::vector & _return, const int32_t seqid); - void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - int32_t send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void recv_get_index_names(std::vector & _return, const int32_t seqid); - void get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request); - int32_t send_get_primary_keys(const PrimaryKeysRequest& request); - void recv_get_primary_keys(PrimaryKeysResponse& _return, const int32_t seqid); - void get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request); - int32_t send_get_foreign_keys(const ForeignKeysRequest& request); - void recv_get_foreign_keys(ForeignKeysResponse& _return, const int32_t seqid); - void get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request); - int32_t send_get_unique_constraints(const UniqueConstraintsRequest& request); - void recv_get_unique_constraints(UniqueConstraintsResponse& _return, const int32_t seqid); - void get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request); - int32_t send_get_not_null_constraints(const NotNullConstraintsRequest& request); - void recv_get_not_null_constraints(NotNullConstraintsResponse& _return, const int32_t seqid); - bool update_table_column_statistics(const ColumnStatistics& stats_obj); - int32_t send_update_table_column_statistics(const ColumnStatistics& stats_obj); - bool recv_update_table_column_statistics(const int32_t seqid); - bool update_partition_column_statistics(const ColumnStatistics& stats_obj); - int32_t send_update_partition_column_statistics(const ColumnStatistics& stats_obj); - bool recv_update_partition_column_statistics(const int32_t seqid); - void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name); - int32_t send_get_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); - void recv_get_table_column_statistics(ColumnStatistics& _return, const int32_t seqid); - void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); - int32_t send_get_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); - void recv_get_partition_column_statistics(ColumnStatistics& _return, const int32_t seqid); - void get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request); - int32_t send_get_table_statistics_req(const TableStatsRequest& request); - void recv_get_table_statistics_req(TableStatsResult& _return, const int32_t seqid); - void get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request); - int32_t send_get_partitions_statistics_req(const PartitionsStatsRequest& request); - void recv_get_partitions_statistics_req(PartitionsStatsResult& _return, const int32_t seqid); - void get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request); - int32_t send_get_aggr_stats_for(const PartitionsStatsRequest& request); - void recv_get_aggr_stats_for(AggrStats& _return, const int32_t seqid); - bool set_aggr_stats_for(const SetPartitionsStatsRequest& request); - int32_t send_set_aggr_stats_for(const SetPartitionsStatsRequest& request); - bool recv_set_aggr_stats_for(const int32_t seqid); - bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); - int32_t send_delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); - bool recv_delete_partition_column_statistics(const int32_t seqid); - bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); - int32_t send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); - bool recv_delete_table_column_statistics(const int32_t seqid); - void create_function(const Function& func); - int32_t send_create_function(const Function& func); - void recv_create_function(const int32_t seqid); - void drop_function(const std::string& dbName, const std::string& funcName); - int32_t send_drop_function(const std::string& dbName, const std::string& funcName); - void recv_drop_function(const int32_t seqid); - void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc); - int32_t send_alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc); - void recv_alter_function(const int32_t seqid); - void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern); - int32_t send_get_functions(const std::string& dbName, const std::string& pattern); - void recv_get_functions(std::vector & _return, const int32_t seqid); - void get_function(Function& _return, const std::string& dbName, const std::string& funcName); - int32_t send_get_function(const std::string& dbName, const std::string& funcName); - void recv_get_function(Function& _return, const int32_t seqid); - void get_all_functions(GetAllFunctionsResponse& _return); - int32_t send_get_all_functions(); - void recv_get_all_functions(GetAllFunctionsResponse& _return, const int32_t seqid); - bool create_role(const Role& role); - int32_t send_create_role(const Role& role); - bool recv_create_role(const int32_t seqid); - bool drop_role(const std::string& role_name); - int32_t send_drop_role(const std::string& role_name); - bool recv_drop_role(const int32_t seqid); - void get_role_names(std::vector & _return); - int32_t send_get_role_names(); - void recv_get_role_names(std::vector & _return, const int32_t seqid); - 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); - int32_t send_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); - bool recv_grant_role(const int32_t seqid); - bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type); - int32_t send_revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type); - bool recv_revoke_role(const int32_t seqid); - void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type); - int32_t send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type); - void recv_list_roles(std::vector & _return, const int32_t seqid); - void grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request); - int32_t send_grant_revoke_role(const GrantRevokeRoleRequest& request); - void recv_grant_revoke_role(GrantRevokeRoleResponse& _return, const int32_t seqid); - void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request); - int32_t send_get_principals_in_role(const GetPrincipalsInRoleRequest& request); - void recv_get_principals_in_role(GetPrincipalsInRoleResponse& _return, const int32_t seqid); - void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request); - int32_t send_get_role_grants_for_principal(const GetRoleGrantsForPrincipalRequest& request); - void recv_get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const int32_t seqid); - void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names); - int32_t send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names); - void recv_get_privilege_set(PrincipalPrivilegeSet& _return, const int32_t seqid); - void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject); - int32_t send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject); - void recv_list_privileges(std::vector & _return, const int32_t seqid); - bool grant_privileges(const PrivilegeBag& privileges); - int32_t send_grant_privileges(const PrivilegeBag& privileges); - bool recv_grant_privileges(const int32_t seqid); - bool revoke_privileges(const PrivilegeBag& privileges); - int32_t send_revoke_privileges(const PrivilegeBag& privileges); - bool recv_revoke_privileges(const int32_t seqid); - void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request); - int32_t send_grant_revoke_privileges(const GrantRevokePrivilegeRequest& request); - void recv_grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const int32_t seqid); - void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names); - int32_t send_set_ugi(const std::string& user_name, const std::vector & group_names); - void recv_set_ugi(std::vector & _return, const int32_t seqid); - void get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name); - int32_t send_get_delegation_token(const std::string& token_owner, const std::string& renewer_kerberos_principal_name); - void recv_get_delegation_token(std::string& _return, const int32_t seqid); - int64_t renew_delegation_token(const std::string& token_str_form); - int32_t send_renew_delegation_token(const std::string& token_str_form); - int64_t recv_renew_delegation_token(const int32_t seqid); - void cancel_delegation_token(const std::string& token_str_form); - int32_t send_cancel_delegation_token(const std::string& token_str_form); - void recv_cancel_delegation_token(const int32_t seqid); - bool add_token(const std::string& token_identifier, const std::string& delegation_token); - int32_t send_add_token(const std::string& token_identifier, const std::string& delegation_token); - bool recv_add_token(const int32_t seqid); - bool remove_token(const std::string& token_identifier); - int32_t send_remove_token(const std::string& token_identifier); - bool recv_remove_token(const int32_t seqid); - void get_token(std::string& _return, const std::string& token_identifier); - int32_t send_get_token(const std::string& token_identifier); - void recv_get_token(std::string& _return, const int32_t seqid); - void get_all_token_identifiers(std::vector & _return); - int32_t send_get_all_token_identifiers(); - void recv_get_all_token_identifiers(std::vector & _return, const int32_t seqid); - int32_t add_master_key(const std::string& key); - int32_t send_add_master_key(const std::string& key); - int32_t recv_add_master_key(const int32_t seqid); - void update_master_key(const int32_t seq_number, const std::string& key); - int32_t send_update_master_key(const int32_t seq_number, const std::string& key); - void recv_update_master_key(const int32_t seqid); - bool remove_master_key(const int32_t key_seq); - int32_t send_remove_master_key(const int32_t key_seq); - bool recv_remove_master_key(const int32_t seqid); - void get_master_keys(std::vector & _return); - int32_t send_get_master_keys(); - void recv_get_master_keys(std::vector & _return, const int32_t seqid); - void get_open_txns(GetOpenTxnsResponse& _return); - int32_t send_get_open_txns(); - void recv_get_open_txns(GetOpenTxnsResponse& _return, const int32_t seqid); - void get_open_txns_info(GetOpenTxnsInfoResponse& _return); - int32_t send_get_open_txns_info(); - void recv_get_open_txns_info(GetOpenTxnsInfoResponse& _return, const int32_t seqid); - void open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst); - int32_t send_open_txns(const OpenTxnRequest& rqst); - void recv_open_txns(OpenTxnsResponse& _return, const int32_t seqid); - void abort_txn(const AbortTxnRequest& rqst); - int32_t send_abort_txn(const AbortTxnRequest& rqst); - void recv_abort_txn(const int32_t seqid); - void abort_txns(const AbortTxnsRequest& rqst); - int32_t send_abort_txns(const AbortTxnsRequest& rqst); - void recv_abort_txns(const int32_t seqid); - void commit_txn(const CommitTxnRequest& rqst); - int32_t send_commit_txn(const CommitTxnRequest& rqst); - void recv_commit_txn(const int32_t seqid); - void lock(LockResponse& _return, const LockRequest& rqst); - int32_t send_lock(const LockRequest& rqst); - void recv_lock(LockResponse& _return, const int32_t seqid); - void check_lock(LockResponse& _return, const CheckLockRequest& rqst); - int32_t send_check_lock(const CheckLockRequest& rqst); - void recv_check_lock(LockResponse& _return, const int32_t seqid); - void unlock(const UnlockRequest& rqst); - int32_t send_unlock(const UnlockRequest& rqst); - void recv_unlock(const int32_t seqid); - void show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst); - int32_t send_show_locks(const ShowLocksRequest& rqst); - void recv_show_locks(ShowLocksResponse& _return, const int32_t seqid); - void heartbeat(const HeartbeatRequest& ids); - int32_t send_heartbeat(const HeartbeatRequest& ids); - void recv_heartbeat(const int32_t seqid); - void heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns); - int32_t send_heartbeat_txn_range(const HeartbeatTxnRangeRequest& txns); - void recv_heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const int32_t seqid); - void compact(const CompactionRequest& rqst); - int32_t send_compact(const CompactionRequest& rqst); - void recv_compact(const int32_t seqid); - void compact2(CompactionResponse& _return, const CompactionRequest& rqst); - int32_t send_compact2(const CompactionRequest& rqst); - void recv_compact2(CompactionResponse& _return, const int32_t seqid); - void show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst); - int32_t send_show_compact(const ShowCompactRequest& rqst); - void recv_show_compact(ShowCompactResponse& _return, const int32_t seqid); - void add_dynamic_partitions(const AddDynamicPartitions& rqst); - int32_t send_add_dynamic_partitions(const AddDynamicPartitions& rqst); - void recv_add_dynamic_partitions(const int32_t seqid); - void get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst); - int32_t send_get_next_notification(const NotificationEventRequest& rqst); - void recv_get_next_notification(NotificationEventResponse& _return, const int32_t seqid); - void get_current_notificationEventId(CurrentNotificationEventId& _return); - int32_t send_get_current_notificationEventId(); - void recv_get_current_notificationEventId(CurrentNotificationEventId& _return, const int32_t seqid); - void fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst); - int32_t send_fire_listener_event(const FireEventRequest& rqst); - void recv_fire_listener_event(FireEventResponse& _return, const int32_t seqid); - void flushCache(); - int32_t send_flushCache(); - void recv_flushCache(const int32_t seqid); - void cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request); - int32_t send_cm_recycle(const CmRecycleRequest& request); - void recv_cm_recycle(CmRecycleResponse& _return, const int32_t seqid); - void get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req); - int32_t send_get_file_metadata_by_expr(const GetFileMetadataByExprRequest& req); - void recv_get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const int32_t seqid); - void get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req); - int32_t send_get_file_metadata(const GetFileMetadataRequest& req); - void recv_get_file_metadata(GetFileMetadataResult& _return, const int32_t seqid); - void put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req); - int32_t send_put_file_metadata(const PutFileMetadataRequest& req); - void recv_put_file_metadata(PutFileMetadataResult& _return, const int32_t seqid); - void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req); - int32_t send_clear_file_metadata(const ClearFileMetadataRequest& req); - void recv_clear_file_metadata(ClearFileMetadataResult& _return, const int32_t seqid); - void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req); - int32_t send_cache_file_metadata(const CacheFileMetadataRequest& req); - void recv_cache_file_metadata(CacheFileMetadataResult& _return, const int32_t seqid); - void get_metastore_db_uuid(std::string& _return); - int32_t send_get_metastore_db_uuid(); - void recv_get_metastore_db_uuid(std::string& _return, const int32_t seqid); -}; - -#ifdef _WIN32 - #pragma warning( pop ) -#endif - -}}} // namespace - -#endif diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp deleted file mode 100644 index ec2071a..0000000 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp +++ /dev/null @@ -1,839 +0,0 @@ -// This autogenerated skeleton file illustrates how to build a server. -// You should copy it to another filename to avoid overwriting it. - -#include "ThriftHiveMetastore.h" -#include -#include -#include -#include - -using namespace ::apache::thrift; -using namespace ::apache::thrift::protocol; -using namespace ::apache::thrift::transport; -using namespace ::apache::thrift::server; - -using boost::shared_ptr; - -using namespace ::Apache::Hadoop::Hive; - -class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { - public: - ThriftHiveMetastoreHandler() { - // Your initialization goes here - } - - void getMetaConf(std::string& _return, const std::string& key) { - // Your implementation goes here - printf("getMetaConf\n"); - } - - void setMetaConf(const std::string& key, const std::string& value) { - // Your implementation goes here - printf("setMetaConf\n"); - } - - void create_database(const Database& database) { - // Your implementation goes here - printf("create_database\n"); - } - - void get_database(Database& _return, const std::string& name) { - // Your implementation goes here - printf("get_database\n"); - } - - void drop_database(const std::string& name, const bool deleteData, const bool cascade) { - // Your implementation goes here - printf("drop_database\n"); - } - - void get_databases(std::vector & _return, const std::string& pattern) { - // Your implementation goes here - printf("get_databases\n"); - } - - void get_all_databases(std::vector & _return) { - // Your implementation goes here - printf("get_all_databases\n"); - } - - void alter_database(const std::string& dbname, const Database& db) { - // Your implementation goes here - printf("alter_database\n"); - } - - void get_type(Type& _return, const std::string& name) { - // Your implementation goes here - printf("get_type\n"); - } - - bool create_type(const Type& type) { - // Your implementation goes here - printf("create_type\n"); - } - - bool drop_type(const std::string& type) { - // Your implementation goes here - printf("drop_type\n"); - } - - void get_type_all(std::map & _return, const std::string& name) { - // Your implementation goes here - printf("get_type_all\n"); - } - - void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) { - // Your implementation goes here - printf("get_fields\n"); - } - - void get_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) { - // Your implementation goes here - printf("get_fields_with_environment_context\n"); - } - - void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { - // Your implementation goes here - printf("get_schema\n"); - } - - void get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) { - // Your implementation goes here - printf("get_schema_with_environment_context\n"); - } - - void create_table(const Table& tbl) { - // Your implementation goes here - printf("create_table\n"); - } - - void create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) { - // Your implementation goes here - printf("create_table_with_environment_context\n"); - } - - void create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) { - // Your implementation goes here - printf("create_table_with_constraints\n"); - } - - void drop_constraint(const DropConstraintRequest& req) { - // Your implementation goes here - printf("drop_constraint\n"); - } - - void add_primary_key(const AddPrimaryKeyRequest& req) { - // Your implementation goes here - printf("add_primary_key\n"); - } - - void add_foreign_key(const AddForeignKeyRequest& req) { - // Your implementation goes here - printf("add_foreign_key\n"); - } - - void add_unique_constraint(const AddUniqueConstraintRequest& req) { - // Your implementation goes here - printf("add_unique_constraint\n"); - } - - void add_not_null_constraint(const AddNotNullConstraintRequest& req) { - // Your implementation goes here - printf("add_not_null_constraint\n"); - } - - void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { - // Your implementation goes here - printf("drop_table\n"); - } - - void drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) { - // Your implementation goes here - printf("drop_table_with_environment_context\n"); - } - - void truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) { - // Your implementation goes here - printf("truncate_table\n"); - } - - void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { - // Your implementation goes here - printf("get_tables\n"); - } - - void get_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType) { - // Your implementation goes here - printf("get_tables_by_type\n"); - } - - void get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) { - // Your implementation goes here - printf("get_table_meta\n"); - } - - void get_all_tables(std::vector & _return, const std::string& db_name) { - // Your implementation goes here - printf("get_all_tables\n"); - } - - void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { - // Your implementation goes here - printf("get_table\n"); - } - - void get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names) { - // Your implementation goes here - printf("get_table_objects_by_name\n"); - } - - void get_table_req(GetTableResult& _return, const GetTableRequest& req) { - // Your implementation goes here - printf("get_table_req\n"); - } - - void get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req) { - // Your implementation goes here - printf("get_table_objects_by_name_req\n"); - } - - void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) { - // Your implementation goes here - printf("get_table_names_by_filter\n"); - } - - void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { - // Your implementation goes here - printf("alter_table\n"); - } - - void alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) { - // Your implementation goes here - printf("alter_table_with_environment_context\n"); - } - - void alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) { - // Your implementation goes here - printf("alter_table_with_cascade\n"); - } - - void add_partition(Partition& _return, const Partition& new_part) { - // Your implementation goes here - printf("add_partition\n"); - } - - void add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) { - // Your implementation goes here - printf("add_partition_with_environment_context\n"); - } - - int32_t add_partitions(const std::vector & new_parts) { - // Your implementation goes here - printf("add_partitions\n"); - } - - int32_t add_partitions_pspec(const std::vector & new_parts) { - // Your implementation goes here - printf("add_partitions_pspec\n"); - } - - void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - // Your implementation goes here - printf("append_partition\n"); - } - - void add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request) { - // Your implementation goes here - printf("add_partitions_req\n"); - } - - void append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) { - // Your implementation goes here - printf("append_partition_with_environment_context\n"); - } - - void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { - // Your implementation goes here - printf("append_partition_by_name\n"); - } - - void append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) { - // Your implementation goes here - printf("append_partition_by_name_with_environment_context\n"); - } - - bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { - // Your implementation goes here - printf("drop_partition\n"); - } - - bool drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) { - // Your implementation goes here - printf("drop_partition_with_environment_context\n"); - } - - bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) { - // Your implementation goes here - printf("drop_partition_by_name\n"); - } - - bool drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) { - // Your implementation goes here - printf("drop_partition_by_name_with_environment_context\n"); - } - - void drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req) { - // Your implementation goes here - printf("drop_partitions_req\n"); - } - - void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - // Your implementation goes here - printf("get_partition\n"); - } - - void exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) { - // Your implementation goes here - printf("exchange_partition\n"); - } - - void exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) { - // Your implementation goes here - printf("exchange_partitions\n"); - } - - 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) { - // Your implementation goes here - printf("get_partition_with_auth\n"); - } - - void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { - // Your implementation goes here - printf("get_partition_by_name\n"); - } - - void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - // Your implementation goes here - printf("get_partitions\n"); - } - - 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) { - // Your implementation goes here - printf("get_partitions_with_auth\n"); - } - - void get_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) { - // Your implementation goes here - printf("get_partitions_pspec\n"); - } - - void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - // Your implementation goes here - printf("get_partition_names\n"); - } - - 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) { - // Your implementation goes here - printf("get_partitions_ps\n"); - } - - 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) { - // Your implementation goes here - printf("get_partitions_ps_with_auth\n"); - } - - 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) { - // Your implementation goes here - printf("get_partition_names_ps\n"); - } - - 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) { - // Your implementation goes here - printf("get_partitions_by_filter\n"); - } - - void get_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) { - // Your implementation goes here - printf("get_part_specs_by_filter\n"); - } - - void get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req) { - // Your implementation goes here - printf("get_partitions_by_expr\n"); - } - - int32_t get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) { - // Your implementation goes here - printf("get_num_partitions_by_filter\n"); - } - - void get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) { - // Your implementation goes here - printf("get_partitions_by_names\n"); - } - - void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { - // Your implementation goes here - printf("alter_partition\n"); - } - - void alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) { - // Your implementation goes here - printf("alter_partitions\n"); - } - - void alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) { - // Your implementation goes here - printf("alter_partitions_with_environment_context\n"); - } - - void alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) { - // Your implementation goes here - printf("alter_partition_with_environment_context\n"); - } - - void rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) { - // Your implementation goes here - printf("rename_partition\n"); - } - - bool partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) { - // Your implementation goes here - printf("partition_name_has_valid_characters\n"); - } - - void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { - // Your implementation goes here - printf("get_config_value\n"); - } - - void partition_name_to_vals(std::vector & _return, const std::string& part_name) { - // Your implementation goes here - printf("partition_name_to_vals\n"); - } - - void partition_name_to_spec(std::map & _return, const std::string& part_name) { - // Your implementation goes here - printf("partition_name_to_spec\n"); - } - - void markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { - // Your implementation goes here - printf("markPartitionForEvent\n"); - } - - bool isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { - // Your implementation goes here - printf("isPartitionMarkedForEvent\n"); - } - - void add_index(Index& _return, const Index& new_index, const Table& index_table) { - // Your implementation goes here - printf("add_index\n"); - } - - void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { - // Your implementation goes here - printf("alter_index\n"); - } - - bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { - // Your implementation goes here - printf("drop_index_by_name\n"); - } - - void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { - // Your implementation goes here - printf("get_index_by_name\n"); - } - - void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - // Your implementation goes here - printf("get_indexes\n"); - } - - void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - // Your implementation goes here - printf("get_index_names\n"); - } - - void get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request) { - // Your implementation goes here - printf("get_primary_keys\n"); - } - - void get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request) { - // Your implementation goes here - printf("get_foreign_keys\n"); - } - - void get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request) { - // Your implementation goes here - printf("get_unique_constraints\n"); - } - - void get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request) { - // Your implementation goes here - printf("get_not_null_constraints\n"); - } - - bool update_table_column_statistics(const ColumnStatistics& stats_obj) { - // Your implementation goes here - printf("update_table_column_statistics\n"); - } - - bool update_partition_column_statistics(const ColumnStatistics& stats_obj) { - // Your implementation goes here - printf("update_partition_column_statistics\n"); - } - - void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { - // Your implementation goes here - printf("get_table_column_statistics\n"); - } - - void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { - // Your implementation goes here - printf("get_partition_column_statistics\n"); - } - - void get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request) { - // Your implementation goes here - printf("get_table_statistics_req\n"); - } - - void get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request) { - // Your implementation goes here - printf("get_partitions_statistics_req\n"); - } - - void get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request) { - // Your implementation goes here - printf("get_aggr_stats_for\n"); - } - - bool set_aggr_stats_for(const SetPartitionsStatsRequest& request) { - // Your implementation goes here - printf("set_aggr_stats_for\n"); - } - - bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { - // Your implementation goes here - printf("delete_partition_column_statistics\n"); - } - - bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { - // Your implementation goes here - printf("delete_table_column_statistics\n"); - } - - void create_function(const Function& func) { - // Your implementation goes here - printf("create_function\n"); - } - - void drop_function(const std::string& dbName, const std::string& funcName) { - // Your implementation goes here - printf("drop_function\n"); - } - - void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) { - // Your implementation goes here - printf("alter_function\n"); - } - - void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) { - // Your implementation goes here - printf("get_functions\n"); - } - - void get_function(Function& _return, const std::string& dbName, const std::string& funcName) { - // Your implementation goes here - printf("get_function\n"); - } - - void get_all_functions(GetAllFunctionsResponse& _return) { - // Your implementation goes here - printf("get_all_functions\n"); - } - - bool create_role(const Role& role) { - // Your implementation goes here - printf("create_role\n"); - } - - bool drop_role(const std::string& role_name) { - // Your implementation goes here - printf("drop_role\n"); - } - - void get_role_names(std::vector & _return) { - // Your implementation goes here - printf("get_role_names\n"); - } - - 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) { - // Your implementation goes here - printf("grant_role\n"); - } - - bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) { - // Your implementation goes here - printf("revoke_role\n"); - } - - void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) { - // Your implementation goes here - printf("list_roles\n"); - } - - void grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) { - // Your implementation goes here - printf("grant_revoke_role\n"); - } - - void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) { - // Your implementation goes here - printf("get_principals_in_role\n"); - } - - void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request) { - // Your implementation goes here - printf("get_role_grants_for_principal\n"); - } - - void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) { - // Your implementation goes here - printf("get_privilege_set\n"); - } - - void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) { - // Your implementation goes here - printf("list_privileges\n"); - } - - bool grant_privileges(const PrivilegeBag& privileges) { - // Your implementation goes here - printf("grant_privileges\n"); - } - - bool revoke_privileges(const PrivilegeBag& privileges) { - // Your implementation goes here - printf("revoke_privileges\n"); - } - - void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) { - // Your implementation goes here - printf("grant_revoke_privileges\n"); - } - - void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) { - // Your implementation goes here - printf("set_ugi\n"); - } - - void get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) { - // Your implementation goes here - printf("get_delegation_token\n"); - } - - int64_t renew_delegation_token(const std::string& token_str_form) { - // Your implementation goes here - printf("renew_delegation_token\n"); - } - - void cancel_delegation_token(const std::string& token_str_form) { - // Your implementation goes here - printf("cancel_delegation_token\n"); - } - - bool add_token(const std::string& token_identifier, const std::string& delegation_token) { - // Your implementation goes here - printf("add_token\n"); - } - - bool remove_token(const std::string& token_identifier) { - // Your implementation goes here - printf("remove_token\n"); - } - - void get_token(std::string& _return, const std::string& token_identifier) { - // Your implementation goes here - printf("get_token\n"); - } - - void get_all_token_identifiers(std::vector & _return) { - // Your implementation goes here - printf("get_all_token_identifiers\n"); - } - - int32_t add_master_key(const std::string& key) { - // Your implementation goes here - printf("add_master_key\n"); - } - - void update_master_key(const int32_t seq_number, const std::string& key) { - // Your implementation goes here - printf("update_master_key\n"); - } - - bool remove_master_key(const int32_t key_seq) { - // Your implementation goes here - printf("remove_master_key\n"); - } - - void get_master_keys(std::vector & _return) { - // Your implementation goes here - printf("get_master_keys\n"); - } - - void get_open_txns(GetOpenTxnsResponse& _return) { - // Your implementation goes here - printf("get_open_txns\n"); - } - - void get_open_txns_info(GetOpenTxnsInfoResponse& _return) { - // Your implementation goes here - printf("get_open_txns_info\n"); - } - - void open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst) { - // Your implementation goes here - printf("open_txns\n"); - } - - void abort_txn(const AbortTxnRequest& rqst) { - // Your implementation goes here - printf("abort_txn\n"); - } - - void abort_txns(const AbortTxnsRequest& rqst) { - // Your implementation goes here - printf("abort_txns\n"); - } - - void commit_txn(const CommitTxnRequest& rqst) { - // Your implementation goes here - printf("commit_txn\n"); - } - - void lock(LockResponse& _return, const LockRequest& rqst) { - // Your implementation goes here - printf("lock\n"); - } - - void check_lock(LockResponse& _return, const CheckLockRequest& rqst) { - // Your implementation goes here - printf("check_lock\n"); - } - - void unlock(const UnlockRequest& rqst) { - // Your implementation goes here - printf("unlock\n"); - } - - void show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst) { - // Your implementation goes here - printf("show_locks\n"); - } - - void heartbeat(const HeartbeatRequest& ids) { - // Your implementation goes here - printf("heartbeat\n"); - } - - void heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns) { - // Your implementation goes here - printf("heartbeat_txn_range\n"); - } - - void compact(const CompactionRequest& rqst) { - // Your implementation goes here - printf("compact\n"); - } - - void compact2(CompactionResponse& _return, const CompactionRequest& rqst) { - // Your implementation goes here - printf("compact2\n"); - } - - void show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst) { - // Your implementation goes here - printf("show_compact\n"); - } - - void add_dynamic_partitions(const AddDynamicPartitions& rqst) { - // Your implementation goes here - printf("add_dynamic_partitions\n"); - } - - void get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst) { - // Your implementation goes here - printf("get_next_notification\n"); - } - - void get_current_notificationEventId(CurrentNotificationEventId& _return) { - // Your implementation goes here - printf("get_current_notificationEventId\n"); - } - - void fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst) { - // Your implementation goes here - printf("fire_listener_event\n"); - } - - void flushCache() { - // Your implementation goes here - printf("flushCache\n"); - } - - void cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request) { - // Your implementation goes here - printf("cm_recycle\n"); - } - - void get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req) { - // Your implementation goes here - printf("get_file_metadata_by_expr\n"); - } - - void get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req) { - // Your implementation goes here - printf("get_file_metadata\n"); - } - - void put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req) { - // Your implementation goes here - printf("put_file_metadata\n"); - } - - void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req) { - // Your implementation goes here - printf("clear_file_metadata\n"); - } - - void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) { - // Your implementation goes here - printf("cache_file_metadata\n"); - } - - void get_metastore_db_uuid(std::string& _return) { - // Your implementation goes here - printf("get_metastore_db_uuid\n"); - } - -}; - -int main(int argc, char **argv) { - int port = 9090; - shared_ptr handler(new ThriftHiveMetastoreHandler()); - shared_ptr processor(new ThriftHiveMetastoreProcessor(handler)); - shared_ptr serverTransport(new TServerSocket(port)); - shared_ptr transportFactory(new TBufferedTransportFactory()); - shared_ptr protocolFactory(new TBinaryProtocolFactory()); - - TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory); - server.serve(); - return 0; -} - diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp deleted file mode 100644 index 1cbd176..0000000 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -#include "hive_metastore_constants.h" - -namespace Apache { namespace Hadoop { namespace Hive { - -const hive_metastoreConstants g_hive_metastore_constants; - -hive_metastoreConstants::hive_metastoreConstants() { - DDL_TIME = "transient_lastDdlTime"; - - HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__"; - - HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__"; - - HIVE_FILTER_FIELD_LAST_ACCESS = "hive_filter_field_last_access__"; - - IS_ARCHIVED = "is_archived"; - - ORIGINAL_LOCATION = "original_location"; - - IS_IMMUTABLE = "immutable"; - - META_TABLE_COLUMNS = "columns"; - - META_TABLE_COLUMN_TYPES = "columns.types"; - - BUCKET_FIELD_NAME = "bucket_field_name"; - - BUCKET_COUNT = "bucket_count"; - - FIELD_TO_DIMENSION = "field_to_dimension"; - - META_TABLE_NAME = "name"; - - META_TABLE_DB = "db"; - - META_TABLE_LOCATION = "location"; - - META_TABLE_SERDE = "serde"; - - META_TABLE_PARTITION_COLUMNS = "partition_columns"; - - META_TABLE_PARTITION_COLUMN_TYPES = "partition_columns.types"; - - FILE_INPUT_FORMAT = "file.inputformat"; - - FILE_OUTPUT_FORMAT = "file.outputformat"; - - META_TABLE_STORAGE = "storage_handler"; - - TABLE_IS_TRANSACTIONAL = "transactional"; - - TABLE_NO_AUTO_COMPACT = "no_auto_compaction"; - - TABLE_TRANSACTIONAL_PROPERTIES = "transactional_properties"; - -} - -}}} // namespace - diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h deleted file mode 100644 index 3d068c3..0000000 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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 - -#include "hive_metastore_types.h" - -namespace Apache { namespace Hadoop { namespace Hive { - -class hive_metastoreConstants { - public: - hive_metastoreConstants(); - - std::string DDL_TIME; - std::string HIVE_FILTER_FIELD_OWNER; - std::string HIVE_FILTER_FIELD_PARAMS; - std::string HIVE_FILTER_FIELD_LAST_ACCESS; - std::string IS_ARCHIVED; - std::string ORIGINAL_LOCATION; - std::string IS_IMMUTABLE; - std::string META_TABLE_COLUMNS; - std::string META_TABLE_COLUMN_TYPES; - std::string BUCKET_FIELD_NAME; - std::string BUCKET_COUNT; - std::string FIELD_TO_DIMENSION; - std::string META_TABLE_NAME; - std::string META_TABLE_DB; - std::string META_TABLE_LOCATION; - std::string META_TABLE_SERDE; - std::string META_TABLE_PARTITION_COLUMNS; - std::string META_TABLE_PARTITION_COLUMN_TYPES; - std::string FILE_INPUT_FORMAT; - std::string FILE_OUTPUT_FORMAT; - std::string META_TABLE_STORAGE; - std::string TABLE_IS_TRANSACTIONAL; - std::string TABLE_NO_AUTO_COMPACT; - std::string TABLE_TRANSACTIONAL_PROPERTIES; -}; - -extern const hive_metastoreConstants g_hive_metastore_constants; - -}}} // namespace - -#endif diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp deleted file mode 100644 index d178f10..0000000 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp +++ /dev/null @@ -1,21622 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -#include "hive_metastore_types.h" - -#include -#include - -#include - -namespace Apache { namespace Hadoop { namespace Hive { - -int _kHiveObjectTypeValues[] = { - HiveObjectType::GLOBAL, - HiveObjectType::DATABASE, - HiveObjectType::TABLE, - HiveObjectType::PARTITION, - HiveObjectType::COLUMN -}; -const char* _kHiveObjectTypeNames[] = { - "GLOBAL", - "DATABASE", - "TABLE", - "PARTITION", - "COLUMN" -}; -const std::map _HiveObjectType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kHiveObjectTypeValues, _kHiveObjectTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kPrincipalTypeValues[] = { - PrincipalType::USER, - PrincipalType::ROLE, - PrincipalType::GROUP -}; -const char* _kPrincipalTypeNames[] = { - "USER", - "ROLE", - "GROUP" -}; -const std::map _PrincipalType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kPrincipalTypeValues, _kPrincipalTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kPartitionEventTypeValues[] = { - PartitionEventType::LOAD_DONE -}; -const char* _kPartitionEventTypeNames[] = { - "LOAD_DONE" -}; -const std::map _PartitionEventType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kPartitionEventTypeValues, _kPartitionEventTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kTxnStateValues[] = { - TxnState::COMMITTED, - TxnState::ABORTED, - TxnState::OPEN -}; -const char* _kTxnStateNames[] = { - "COMMITTED", - "ABORTED", - "OPEN" -}; -const std::map _TxnState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kTxnStateValues, _kTxnStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kLockLevelValues[] = { - LockLevel::DB, - LockLevel::TABLE, - LockLevel::PARTITION -}; -const char* _kLockLevelNames[] = { - "DB", - "TABLE", - "PARTITION" -}; -const std::map _LockLevel_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kLockLevelValues, _kLockLevelNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kLockStateValues[] = { - LockState::ACQUIRED, - LockState::WAITING, - LockState::ABORT, - LockState::NOT_ACQUIRED -}; -const char* _kLockStateNames[] = { - "ACQUIRED", - "WAITING", - "ABORT", - "NOT_ACQUIRED" -}; -const std::map _LockState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kLockStateValues, _kLockStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kLockTypeValues[] = { - LockType::SHARED_READ, - LockType::SHARED_WRITE, - LockType::EXCLUSIVE -}; -const char* _kLockTypeNames[] = { - "SHARED_READ", - "SHARED_WRITE", - "EXCLUSIVE" -}; -const std::map _LockType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kLockTypeValues, _kLockTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kCompactionTypeValues[] = { - CompactionType::MINOR, - CompactionType::MAJOR -}; -const char* _kCompactionTypeNames[] = { - "MINOR", - "MAJOR" -}; -const std::map _CompactionType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kCompactionTypeValues, _kCompactionTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kGrantRevokeTypeValues[] = { - GrantRevokeType::GRANT, - GrantRevokeType::REVOKE -}; -const char* _kGrantRevokeTypeNames[] = { - "GRANT", - "REVOKE" -}; -const std::map _GrantRevokeType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kGrantRevokeTypeValues, _kGrantRevokeTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kDataOperationTypeValues[] = { - DataOperationType::SELECT, - DataOperationType::INSERT, - DataOperationType::UPDATE, - DataOperationType::DELETE, - DataOperationType::UNSET, - DataOperationType::NO_TXN -}; -const char* _kDataOperationTypeNames[] = { - "SELECT", - "INSERT", - "UPDATE", - "DELETE", - "UNSET", - "NO_TXN" -}; -const std::map _DataOperationType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kDataOperationTypeValues, _kDataOperationTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kEventRequestTypeValues[] = { - EventRequestType::INSERT, - EventRequestType::UPDATE, - EventRequestType::DELETE -}; -const char* _kEventRequestTypeNames[] = { - "INSERT", - "UPDATE", - "DELETE" -}; -const std::map _EventRequestType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kEventRequestTypeValues, _kEventRequestTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kFunctionTypeValues[] = { - FunctionType::JAVA -}; -const char* _kFunctionTypeNames[] = { - "JAVA" -}; -const std::map _FunctionType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kFunctionTypeValues, _kFunctionTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kResourceTypeValues[] = { - ResourceType::JAR, - ResourceType::FILE, - ResourceType::ARCHIVE -}; -const char* _kResourceTypeNames[] = { - "JAR", - "FILE", - "ARCHIVE" -}; -const std::map _ResourceType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kResourceTypeValues, _kResourceTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kFileMetadataExprTypeValues[] = { - FileMetadataExprType::ORC_SARG -}; -const char* _kFileMetadataExprTypeNames[] = { - "ORC_SARG" -}; -const std::map _FileMetadataExprType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kFileMetadataExprTypeValues, _kFileMetadataExprTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kClientCapabilityValues[] = { - ClientCapability::TEST_CAPABILITY -}; -const char* _kClientCapabilityNames[] = { - "TEST_CAPABILITY" -}; -const std::map _ClientCapability_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kClientCapabilityValues, _kClientCapabilityNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - - -Version::~Version() throw() { -} - - -void Version::__set_version(const std::string& val) { - this->version = val; -} - -void Version::__set_comments(const std::string& val) { - this->comments = val; -} - -uint32_t Version::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->version); - this->__isset.version = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->comments); - this->__isset.comments = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t Version::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -Version::Version(const Version& other0) { - version = other0.version; - comments = other0.comments; - __isset = other0.__isset; -} -Version& Version::operator=(const Version& other1) { - version = other1.version; - comments = other1.comments; - __isset = other1.__isset; - return *this; -} -void Version::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "Version("; - out << "version=" << to_string(version); - out << ", " << "comments=" << to_string(comments); - out << ")"; -} - - -FieldSchema::~FieldSchema() throw() { -} - - -void FieldSchema::__set_name(const std::string& val) { - this->name = val; -} - -void FieldSchema::__set_type(const std::string& val) { - this->type = val; -} - -void FieldSchema::__set_comment(const std::string& val) { - this->comment = val; -} - -uint32_t FieldSchema::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->type); - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->comment); - this->__isset.comment = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FieldSchema::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -FieldSchema::FieldSchema(const FieldSchema& other2) { - name = other2.name; - type = other2.type; - comment = other2.comment; - __isset = other2.__isset; -} -FieldSchema& FieldSchema::operator=(const FieldSchema& other3) { - name = other3.name; - type = other3.type; - comment = other3.comment; - __isset = other3.__isset; - return *this; -} -void FieldSchema::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "FieldSchema("; - out << "name=" << to_string(name); - out << ", " << "type=" << to_string(type); - out << ", " << "comment=" << to_string(comment); - out << ")"; -} - - -SQLPrimaryKey::~SQLPrimaryKey() throw() { -} - - -void SQLPrimaryKey::__set_table_db(const std::string& val) { - this->table_db = val; -} - -void SQLPrimaryKey::__set_table_name(const std::string& val) { - this->table_name = val; -} - -void SQLPrimaryKey::__set_column_name(const std::string& val) { - this->column_name = val; -} - -void SQLPrimaryKey::__set_key_seq(const int32_t val) { - this->key_seq = val; -} - -void SQLPrimaryKey::__set_pk_name(const std::string& val) { - this->pk_name = val; -} - -void SQLPrimaryKey::__set_enable_cstr(const bool val) { - this->enable_cstr = val; -} - -void SQLPrimaryKey::__set_validate_cstr(const bool val) { - this->validate_cstr = val; -} - -void SQLPrimaryKey::__set_rely_cstr(const bool val) { - this->rely_cstr = val; -} - -uint32_t SQLPrimaryKey::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->table_db); - this->__isset.table_db = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->table_name); - this->__isset.table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->column_name); - this->__isset.column_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->key_seq); - this->__isset.key_seq = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->pk_name); - this->__isset.pk_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->enable_cstr); - this->__isset.enable_cstr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->validate_cstr); - this->__isset.validate_cstr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->rely_cstr); - this->__isset.rely_cstr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t SQLPrimaryKey::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("SQLPrimaryKey"); - - xfer += oprot->writeFieldBegin("table_db", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->table_db); - 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->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->column_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32(this->key_seq); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("pk_name", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->pk_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("enable_cstr", ::apache::thrift::protocol::T_BOOL, 6); - xfer += oprot->writeBool(this->enable_cstr); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("validate_cstr", ::apache::thrift::protocol::T_BOOL, 7); - xfer += oprot->writeBool(this->validate_cstr); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("rely_cstr", ::apache::thrift::protocol::T_BOOL, 8); - xfer += oprot->writeBool(this->rely_cstr); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(SQLPrimaryKey &a, SQLPrimaryKey &b) { - using ::std::swap; - swap(a.table_db, b.table_db); - swap(a.table_name, b.table_name); - swap(a.column_name, b.column_name); - swap(a.key_seq, b.key_seq); - swap(a.pk_name, b.pk_name); - swap(a.enable_cstr, b.enable_cstr); - swap(a.validate_cstr, b.validate_cstr); - swap(a.rely_cstr, b.rely_cstr); - swap(a.__isset, b.__isset); -} - -SQLPrimaryKey::SQLPrimaryKey(const SQLPrimaryKey& other4) { - table_db = other4.table_db; - table_name = other4.table_name; - column_name = other4.column_name; - key_seq = other4.key_seq; - pk_name = other4.pk_name; - enable_cstr = other4.enable_cstr; - validate_cstr = other4.validate_cstr; - rely_cstr = other4.rely_cstr; - __isset = other4.__isset; -} -SQLPrimaryKey& SQLPrimaryKey::operator=(const SQLPrimaryKey& other5) { - table_db = other5.table_db; - table_name = other5.table_name; - column_name = other5.column_name; - key_seq = other5.key_seq; - pk_name = other5.pk_name; - enable_cstr = other5.enable_cstr; - validate_cstr = other5.validate_cstr; - rely_cstr = other5.rely_cstr; - __isset = other5.__isset; - return *this; -} -void SQLPrimaryKey::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "SQLPrimaryKey("; - out << "table_db=" << to_string(table_db); - out << ", " << "table_name=" << to_string(table_name); - out << ", " << "column_name=" << to_string(column_name); - out << ", " << "key_seq=" << to_string(key_seq); - out << ", " << "pk_name=" << to_string(pk_name); - out << ", " << "enable_cstr=" << to_string(enable_cstr); - out << ", " << "validate_cstr=" << to_string(validate_cstr); - out << ", " << "rely_cstr=" << to_string(rely_cstr); - out << ")"; -} - - -SQLForeignKey::~SQLForeignKey() throw() { -} - - -void SQLForeignKey::__set_pktable_db(const std::string& val) { - this->pktable_db = val; -} - -void SQLForeignKey::__set_pktable_name(const std::string& val) { - this->pktable_name = val; -} - -void SQLForeignKey::__set_pkcolumn_name(const std::string& val) { - this->pkcolumn_name = val; -} - -void SQLForeignKey::__set_fktable_db(const std::string& val) { - this->fktable_db = val; -} - -void SQLForeignKey::__set_fktable_name(const std::string& val) { - this->fktable_name = val; -} - -void SQLForeignKey::__set_fkcolumn_name(const std::string& val) { - this->fkcolumn_name = val; -} - -void SQLForeignKey::__set_key_seq(const int32_t val) { - this->key_seq = val; -} - -void SQLForeignKey::__set_update_rule(const int32_t val) { - this->update_rule = val; -} - -void SQLForeignKey::__set_delete_rule(const int32_t val) { - this->delete_rule = val; -} - -void SQLForeignKey::__set_fk_name(const std::string& val) { - this->fk_name = val; -} - -void SQLForeignKey::__set_pk_name(const std::string& val) { - this->pk_name = val; -} - -void SQLForeignKey::__set_enable_cstr(const bool val) { - this->enable_cstr = val; -} - -void SQLForeignKey::__set_validate_cstr(const bool val) { - this->validate_cstr = val; -} - -void SQLForeignKey::__set_rely_cstr(const bool val) { - this->rely_cstr = val; -} - -uint32_t SQLForeignKey::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->pktable_db); - this->__isset.pktable_db = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->pktable_name); - this->__isset.pktable_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->pkcolumn_name); - this->__isset.pkcolumn_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->fktable_db); - this->__isset.fktable_db = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->fktable_name); - this->__isset.fktable_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->fkcolumn_name); - this->__isset.fkcolumn_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->key_seq); - this->__isset.key_seq = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->update_rule); - this->__isset.update_rule = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->delete_rule); - this->__isset.delete_rule = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->fk_name); - this->__isset.fk_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 11: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->pk_name); - this->__isset.pk_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 12: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->enable_cstr); - this->__isset.enable_cstr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 13: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->validate_cstr); - this->__isset.validate_cstr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 14: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->rely_cstr); - this->__isset.rely_cstr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t SQLForeignKey::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("SQLForeignKey"); - - xfer += oprot->writeFieldBegin("pktable_db", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->pktable_db); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("pktable_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->pktable_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("pkcolumn_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->pkcolumn_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("fktable_db", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->fktable_db); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("fktable_name", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->fktable_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("fkcolumn_name", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->fkcolumn_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 7); - xfer += oprot->writeI32(this->key_seq); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("update_rule", ::apache::thrift::protocol::T_I32, 8); - xfer += oprot->writeI32(this->update_rule); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("delete_rule", ::apache::thrift::protocol::T_I32, 9); - xfer += oprot->writeI32(this->delete_rule); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("fk_name", ::apache::thrift::protocol::T_STRING, 10); - xfer += oprot->writeString(this->fk_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("pk_name", ::apache::thrift::protocol::T_STRING, 11); - xfer += oprot->writeString(this->pk_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("enable_cstr", ::apache::thrift::protocol::T_BOOL, 12); - xfer += oprot->writeBool(this->enable_cstr); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("validate_cstr", ::apache::thrift::protocol::T_BOOL, 13); - xfer += oprot->writeBool(this->validate_cstr); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("rely_cstr", ::apache::thrift::protocol::T_BOOL, 14); - xfer += oprot->writeBool(this->rely_cstr); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(SQLForeignKey &a, SQLForeignKey &b) { - using ::std::swap; - swap(a.pktable_db, b.pktable_db); - swap(a.pktable_name, b.pktable_name); - swap(a.pkcolumn_name, b.pkcolumn_name); - swap(a.fktable_db, b.fktable_db); - swap(a.fktable_name, b.fktable_name); - swap(a.fkcolumn_name, b.fkcolumn_name); - swap(a.key_seq, b.key_seq); - swap(a.update_rule, b.update_rule); - swap(a.delete_rule, b.delete_rule); - swap(a.fk_name, b.fk_name); - swap(a.pk_name, b.pk_name); - swap(a.enable_cstr, b.enable_cstr); - swap(a.validate_cstr, b.validate_cstr); - swap(a.rely_cstr, b.rely_cstr); - swap(a.__isset, b.__isset); -} - -SQLForeignKey::SQLForeignKey(const SQLForeignKey& other6) { - pktable_db = other6.pktable_db; - pktable_name = other6.pktable_name; - pkcolumn_name = other6.pkcolumn_name; - fktable_db = other6.fktable_db; - fktable_name = other6.fktable_name; - fkcolumn_name = other6.fkcolumn_name; - key_seq = other6.key_seq; - update_rule = other6.update_rule; - delete_rule = other6.delete_rule; - fk_name = other6.fk_name; - pk_name = other6.pk_name; - enable_cstr = other6.enable_cstr; - validate_cstr = other6.validate_cstr; - rely_cstr = other6.rely_cstr; - __isset = other6.__isset; -} -SQLForeignKey& SQLForeignKey::operator=(const SQLForeignKey& other7) { - pktable_db = other7.pktable_db; - pktable_name = other7.pktable_name; - pkcolumn_name = other7.pkcolumn_name; - fktable_db = other7.fktable_db; - fktable_name = other7.fktable_name; - fkcolumn_name = other7.fkcolumn_name; - key_seq = other7.key_seq; - update_rule = other7.update_rule; - delete_rule = other7.delete_rule; - fk_name = other7.fk_name; - pk_name = other7.pk_name; - enable_cstr = other7.enable_cstr; - validate_cstr = other7.validate_cstr; - rely_cstr = other7.rely_cstr; - __isset = other7.__isset; - return *this; -} -void SQLForeignKey::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "SQLForeignKey("; - out << "pktable_db=" << to_string(pktable_db); - out << ", " << "pktable_name=" << to_string(pktable_name); - out << ", " << "pkcolumn_name=" << to_string(pkcolumn_name); - out << ", " << "fktable_db=" << to_string(fktable_db); - out << ", " << "fktable_name=" << to_string(fktable_name); - out << ", " << "fkcolumn_name=" << to_string(fkcolumn_name); - out << ", " << "key_seq=" << to_string(key_seq); - out << ", " << "update_rule=" << to_string(update_rule); - out << ", " << "delete_rule=" << to_string(delete_rule); - out << ", " << "fk_name=" << to_string(fk_name); - out << ", " << "pk_name=" << to_string(pk_name); - out << ", " << "enable_cstr=" << to_string(enable_cstr); - out << ", " << "validate_cstr=" << to_string(validate_cstr); - out << ", " << "rely_cstr=" << to_string(rely_cstr); - out << ")"; -} - - -SQLUniqueConstraint::~SQLUniqueConstraint() throw() { -} - - -void SQLUniqueConstraint::__set_table_db(const std::string& val) { - this->table_db = val; -} - -void SQLUniqueConstraint::__set_table_name(const std::string& val) { - this->table_name = val; -} - -void SQLUniqueConstraint::__set_column_name(const std::string& val) { - this->column_name = val; -} - -void SQLUniqueConstraint::__set_key_seq(const int32_t val) { - this->key_seq = val; -} - -void SQLUniqueConstraint::__set_uk_name(const std::string& val) { - this->uk_name = val; -} - -void SQLUniqueConstraint::__set_enable_cstr(const bool val) { - this->enable_cstr = val; -} - -void SQLUniqueConstraint::__set_validate_cstr(const bool val) { - this->validate_cstr = val; -} - -void SQLUniqueConstraint::__set_rely_cstr(const bool val) { - this->rely_cstr = val; -} - -uint32_t SQLUniqueConstraint::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->table_db); - this->__isset.table_db = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->table_name); - this->__isset.table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->column_name); - this->__isset.column_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->key_seq); - this->__isset.key_seq = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->uk_name); - this->__isset.uk_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->enable_cstr); - this->__isset.enable_cstr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->validate_cstr); - this->__isset.validate_cstr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->rely_cstr); - this->__isset.rely_cstr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t SQLUniqueConstraint::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("SQLUniqueConstraint"); - - xfer += oprot->writeFieldBegin("table_db", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->table_db); - 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->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->column_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32(this->key_seq); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("uk_name", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->uk_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("enable_cstr", ::apache::thrift::protocol::T_BOOL, 6); - xfer += oprot->writeBool(this->enable_cstr); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("validate_cstr", ::apache::thrift::protocol::T_BOOL, 7); - xfer += oprot->writeBool(this->validate_cstr); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("rely_cstr", ::apache::thrift::protocol::T_BOOL, 8); - xfer += oprot->writeBool(this->rely_cstr); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(SQLUniqueConstraint &a, SQLUniqueConstraint &b) { - using ::std::swap; - swap(a.table_db, b.table_db); - swap(a.table_name, b.table_name); - swap(a.column_name, b.column_name); - swap(a.key_seq, b.key_seq); - swap(a.uk_name, b.uk_name); - swap(a.enable_cstr, b.enable_cstr); - swap(a.validate_cstr, b.validate_cstr); - swap(a.rely_cstr, b.rely_cstr); - swap(a.__isset, b.__isset); -} - -SQLUniqueConstraint::SQLUniqueConstraint(const SQLUniqueConstraint& other8) { - table_db = other8.table_db; - table_name = other8.table_name; - column_name = other8.column_name; - key_seq = other8.key_seq; - uk_name = other8.uk_name; - enable_cstr = other8.enable_cstr; - validate_cstr = other8.validate_cstr; - rely_cstr = other8.rely_cstr; - __isset = other8.__isset; -} -SQLUniqueConstraint& SQLUniqueConstraint::operator=(const SQLUniqueConstraint& other9) { - table_db = other9.table_db; - table_name = other9.table_name; - column_name = other9.column_name; - key_seq = other9.key_seq; - uk_name = other9.uk_name; - enable_cstr = other9.enable_cstr; - validate_cstr = other9.validate_cstr; - rely_cstr = other9.rely_cstr; - __isset = other9.__isset; - return *this; -} -void SQLUniqueConstraint::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "SQLUniqueConstraint("; - out << "table_db=" << to_string(table_db); - out << ", " << "table_name=" << to_string(table_name); - out << ", " << "column_name=" << to_string(column_name); - out << ", " << "key_seq=" << to_string(key_seq); - out << ", " << "uk_name=" << to_string(uk_name); - out << ", " << "enable_cstr=" << to_string(enable_cstr); - out << ", " << "validate_cstr=" << to_string(validate_cstr); - out << ", " << "rely_cstr=" << to_string(rely_cstr); - out << ")"; -} - - -SQLNotNullConstraint::~SQLNotNullConstraint() throw() { -} - - -void SQLNotNullConstraint::__set_table_db(const std::string& val) { - this->table_db = val; -} - -void SQLNotNullConstraint::__set_table_name(const std::string& val) { - this->table_name = val; -} - -void SQLNotNullConstraint::__set_column_name(const std::string& val) { - this->column_name = val; -} - -void SQLNotNullConstraint::__set_nn_name(const std::string& val) { - this->nn_name = val; -} - -void SQLNotNullConstraint::__set_enable_cstr(const bool val) { - this->enable_cstr = val; -} - -void SQLNotNullConstraint::__set_validate_cstr(const bool val) { - this->validate_cstr = val; -} - -void SQLNotNullConstraint::__set_rely_cstr(const bool val) { - this->rely_cstr = val; -} - -uint32_t SQLNotNullConstraint::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->table_db); - this->__isset.table_db = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->table_name); - this->__isset.table_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->column_name); - this->__isset.column_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->nn_name); - this->__isset.nn_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->enable_cstr); - this->__isset.enable_cstr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->validate_cstr); - this->__isset.validate_cstr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->rely_cstr); - this->__isset.rely_cstr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t SQLNotNullConstraint::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("SQLNotNullConstraint"); - - xfer += oprot->writeFieldBegin("table_db", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->table_db); - 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->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->column_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("nn_name", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->nn_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("enable_cstr", ::apache::thrift::protocol::T_BOOL, 5); - xfer += oprot->writeBool(this->enable_cstr); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("validate_cstr", ::apache::thrift::protocol::T_BOOL, 6); - xfer += oprot->writeBool(this->validate_cstr); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("rely_cstr", ::apache::thrift::protocol::T_BOOL, 7); - xfer += oprot->writeBool(this->rely_cstr); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(SQLNotNullConstraint &a, SQLNotNullConstraint &b) { - using ::std::swap; - swap(a.table_db, b.table_db); - swap(a.table_name, b.table_name); - swap(a.column_name, b.column_name); - swap(a.nn_name, b.nn_name); - swap(a.enable_cstr, b.enable_cstr); - swap(a.validate_cstr, b.validate_cstr); - swap(a.rely_cstr, b.rely_cstr); - swap(a.__isset, b.__isset); -} - -SQLNotNullConstraint::SQLNotNullConstraint(const SQLNotNullConstraint& other10) { - table_db = other10.table_db; - table_name = other10.table_name; - column_name = other10.column_name; - nn_name = other10.nn_name; - enable_cstr = other10.enable_cstr; - validate_cstr = other10.validate_cstr; - rely_cstr = other10.rely_cstr; - __isset = other10.__isset; -} -SQLNotNullConstraint& SQLNotNullConstraint::operator=(const SQLNotNullConstraint& other11) { - table_db = other11.table_db; - table_name = other11.table_name; - column_name = other11.column_name; - nn_name = other11.nn_name; - enable_cstr = other11.enable_cstr; - validate_cstr = other11.validate_cstr; - rely_cstr = other11.rely_cstr; - __isset = other11.__isset; - return *this; -} -void SQLNotNullConstraint::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "SQLNotNullConstraint("; - out << "table_db=" << to_string(table_db); - out << ", " << "table_name=" << to_string(table_name); - out << ", " << "column_name=" << to_string(column_name); - out << ", " << "nn_name=" << to_string(nn_name); - out << ", " << "enable_cstr=" << to_string(enable_cstr); - out << ", " << "validate_cstr=" << to_string(validate_cstr); - out << ", " << "rely_cstr=" << to_string(rely_cstr); - out << ")"; -} - - -Type::~Type() throw() { -} - - -void Type::__set_name(const std::string& val) { - this->name = val; -} - -void Type::__set_type1(const std::string& val) { - this->type1 = val; -__isset.type1 = true; -} - -void Type::__set_type2(const std::string& val) { - this->type2 = val; -__isset.type2 = true; -} - -void Type::__set_fields(const std::vector & val) { - this->fields = val; -__isset.fields = true; -} - -uint32_t Type::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->type1); - this->__isset.type1 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->type2); - this->__isset.type2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->fields.clear(); - uint32_t _size12; - ::apache::thrift::protocol::TType _etype15; - xfer += iprot->readListBegin(_etype15, _size12); - this->fields.resize(_size12); - uint32_t _i16; - for (_i16 = 0; _i16 < _size12; ++_i16) - { - xfer += this->fields[_i16].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.fields = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t Type::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.type2) { - xfer += oprot->writeFieldBegin("type2", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->type2); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.fields) { - xfer += oprot->writeFieldBegin("fields", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->fields.size())); - std::vector ::const_iterator _iter17; - for (_iter17 = this->fields.begin(); _iter17 != this->fields.end(); ++_iter17) - { - xfer += (*_iter17).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - 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); -} - -Type::Type(const Type& other18) { - name = other18.name; - type1 = other18.type1; - type2 = other18.type2; - fields = other18.fields; - __isset = other18.__isset; -} -Type& Type::operator=(const Type& other19) { - name = other19.name; - type1 = other19.type1; - type2 = other19.type2; - fields = other19.fields; - __isset = other19.__isset; - return *this; -} -void Type::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "Type("; - out << "name=" << to_string(name); - out << ", " << "type1="; (__isset.type1 ? (out << to_string(type1)) : (out << "")); - out << ", " << "type2="; (__isset.type2 ? (out << to_string(type2)) : (out << "")); - out << ", " << "fields="; (__isset.fields ? (out << to_string(fields)) : (out << "")); - out << ")"; -} - - -HiveObjectRef::~HiveObjectRef() throw() { -} - - -void HiveObjectRef::__set_objectType(const HiveObjectType::type val) { - this->objectType = val; -} - -void HiveObjectRef::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void HiveObjectRef::__set_objectName(const std::string& val) { - this->objectName = val; -} - -void HiveObjectRef::__set_partValues(const std::vector & val) { - this->partValues = val; -} - -void HiveObjectRef::__set_columnName(const std::string& val) { - this->columnName = val; -} - -uint32_t HiveObjectRef::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast20; - xfer += iprot->readI32(ecast20); - this->objectType = (HiveObjectType::type)ecast20; - this->__isset.objectType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->objectName); - this->__isset.objectName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partValues.clear(); - uint32_t _size21; - ::apache::thrift::protocol::TType _etype24; - xfer += iprot->readListBegin(_etype24, _size21); - this->partValues.resize(_size21); - uint32_t _i25; - for (_i25 = 0; _i25 < _size21; ++_i25) - { - xfer += iprot->readString(this->partValues[_i25]); - } - xfer += iprot->readListEnd(); - } - this->__isset.partValues = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->columnName); - this->__isset.columnName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t HiveObjectRef::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter26; - for (_iter26 = this->partValues.begin(); _iter26 != this->partValues.end(); ++_iter26) - { - xfer += oprot->writeString((*_iter26)); - } - 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); -} - -HiveObjectRef::HiveObjectRef(const HiveObjectRef& other27) { - objectType = other27.objectType; - dbName = other27.dbName; - objectName = other27.objectName; - partValues = other27.partValues; - columnName = other27.columnName; - __isset = other27.__isset; -} -HiveObjectRef& HiveObjectRef::operator=(const HiveObjectRef& other28) { - objectType = other28.objectType; - dbName = other28.dbName; - objectName = other28.objectName; - partValues = other28.partValues; - columnName = other28.columnName; - __isset = other28.__isset; - return *this; -} -void HiveObjectRef::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "HiveObjectRef("; - out << "objectType=" << to_string(objectType); - out << ", " << "dbName=" << to_string(dbName); - out << ", " << "objectName=" << to_string(objectName); - out << ", " << "partValues=" << to_string(partValues); - out << ", " << "columnName=" << to_string(columnName); - out << ")"; -} - - -PrivilegeGrantInfo::~PrivilegeGrantInfo() throw() { -} - - -void PrivilegeGrantInfo::__set_privilege(const std::string& val) { - this->privilege = val; -} - -void PrivilegeGrantInfo::__set_createTime(const int32_t val) { - this->createTime = val; -} - -void PrivilegeGrantInfo::__set_grantor(const std::string& val) { - this->grantor = val; -} - -void PrivilegeGrantInfo::__set_grantorType(const PrincipalType::type val) { - this->grantorType = val; -} - -void PrivilegeGrantInfo::__set_grantOption(const bool val) { - this->grantOption = val; -} - -uint32_t PrivilegeGrantInfo::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->privilege); - this->__isset.privilege = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->createTime); - this->__isset.createTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->grantor); - this->__isset.grantor = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast29; - xfer += iprot->readI32(ecast29); - this->grantorType = (PrincipalType::type)ecast29; - this->__isset.grantorType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->grantOption); - this->__isset.grantOption = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t PrivilegeGrantInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -PrivilegeGrantInfo::PrivilegeGrantInfo(const PrivilegeGrantInfo& other30) { - privilege = other30.privilege; - createTime = other30.createTime; - grantor = other30.grantor; - grantorType = other30.grantorType; - grantOption = other30.grantOption; - __isset = other30.__isset; -} -PrivilegeGrantInfo& PrivilegeGrantInfo::operator=(const PrivilegeGrantInfo& other31) { - privilege = other31.privilege; - createTime = other31.createTime; - grantor = other31.grantor; - grantorType = other31.grantorType; - grantOption = other31.grantOption; - __isset = other31.__isset; - return *this; -} -void PrivilegeGrantInfo::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PrivilegeGrantInfo("; - out << "privilege=" << to_string(privilege); - out << ", " << "createTime=" << to_string(createTime); - out << ", " << "grantor=" << to_string(grantor); - out << ", " << "grantorType=" << to_string(grantorType); - out << ", " << "grantOption=" << to_string(grantOption); - out << ")"; -} - - -HiveObjectPrivilege::~HiveObjectPrivilege() throw() { -} - - -void HiveObjectPrivilege::__set_hiveObject(const HiveObjectRef& val) { - this->hiveObject = val; -} - -void HiveObjectPrivilege::__set_principalName(const std::string& val) { - this->principalName = val; -} - -void HiveObjectPrivilege::__set_principalType(const PrincipalType::type val) { - this->principalType = val; -} - -void HiveObjectPrivilege::__set_grantInfo(const PrivilegeGrantInfo& val) { - this->grantInfo = val; -} - -uint32_t HiveObjectPrivilege::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->hiveObject.read(iprot); - this->__isset.hiveObject = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principalName); - this->__isset.principalName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast32; - xfer += iprot->readI32(ecast32); - this->principalType = (PrincipalType::type)ecast32; - this->__isset.principalType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->grantInfo.read(iprot); - this->__isset.grantInfo = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t HiveObjectPrivilege::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -HiveObjectPrivilege::HiveObjectPrivilege(const HiveObjectPrivilege& other33) { - hiveObject = other33.hiveObject; - principalName = other33.principalName; - principalType = other33.principalType; - grantInfo = other33.grantInfo; - __isset = other33.__isset; -} -HiveObjectPrivilege& HiveObjectPrivilege::operator=(const HiveObjectPrivilege& other34) { - hiveObject = other34.hiveObject; - principalName = other34.principalName; - principalType = other34.principalType; - grantInfo = other34.grantInfo; - __isset = other34.__isset; - return *this; -} -void HiveObjectPrivilege::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "HiveObjectPrivilege("; - out << "hiveObject=" << to_string(hiveObject); - out << ", " << "principalName=" << to_string(principalName); - out << ", " << "principalType=" << to_string(principalType); - out << ", " << "grantInfo=" << to_string(grantInfo); - out << ")"; -} - - -PrivilegeBag::~PrivilegeBag() throw() { -} - - -void PrivilegeBag::__set_privileges(const std::vector & val) { - this->privileges = val; -} - -uint32_t PrivilegeBag::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->privileges.clear(); - uint32_t _size35; - ::apache::thrift::protocol::TType _etype38; - xfer += iprot->readListBegin(_etype38, _size35); - this->privileges.resize(_size35); - uint32_t _i39; - for (_i39 = 0; _i39 < _size35; ++_i39) - { - xfer += this->privileges[_i39].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.privileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t PrivilegeBag::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter40; - for (_iter40 = this->privileges.begin(); _iter40 != this->privileges.end(); ++_iter40) - { - xfer += (*_iter40).write(oprot); - } - 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); -} - -PrivilegeBag::PrivilegeBag(const PrivilegeBag& other41) { - privileges = other41.privileges; - __isset = other41.__isset; -} -PrivilegeBag& PrivilegeBag::operator=(const PrivilegeBag& other42) { - privileges = other42.privileges; - __isset = other42.__isset; - return *this; -} -void PrivilegeBag::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PrivilegeBag("; - out << "privileges=" << to_string(privileges); - out << ")"; -} - - -PrincipalPrivilegeSet::~PrincipalPrivilegeSet() throw() { -} - - -void PrincipalPrivilegeSet::__set_userPrivileges(const std::map > & val) { - this->userPrivileges = val; -} - -void PrincipalPrivilegeSet::__set_groupPrivileges(const std::map > & val) { - this->groupPrivileges = val; -} - -void PrincipalPrivilegeSet::__set_rolePrivileges(const std::map > & val) { - this->rolePrivileges = val; -} - -uint32_t PrincipalPrivilegeSet::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->userPrivileges.clear(); - uint32_t _size43; - ::apache::thrift::protocol::TType _ktype44; - ::apache::thrift::protocol::TType _vtype45; - xfer += iprot->readMapBegin(_ktype44, _vtype45, _size43); - uint32_t _i47; - for (_i47 = 0; _i47 < _size43; ++_i47) - { - std::string _key48; - xfer += iprot->readString(_key48); - std::vector & _val49 = this->userPrivileges[_key48]; - { - _val49.clear(); - uint32_t _size50; - ::apache::thrift::protocol::TType _etype53; - xfer += iprot->readListBegin(_etype53, _size50); - _val49.resize(_size50); - uint32_t _i54; - for (_i54 = 0; _i54 < _size50; ++_i54) - { - xfer += _val49[_i54].read(iprot); - } - xfer += iprot->readListEnd(); - } - } - xfer += iprot->readMapEnd(); - } - this->__isset.userPrivileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->groupPrivileges.clear(); - uint32_t _size55; - ::apache::thrift::protocol::TType _ktype56; - ::apache::thrift::protocol::TType _vtype57; - xfer += iprot->readMapBegin(_ktype56, _vtype57, _size55); - uint32_t _i59; - for (_i59 = 0; _i59 < _size55; ++_i59) - { - std::string _key60; - xfer += iprot->readString(_key60); - std::vector & _val61 = this->groupPrivileges[_key60]; - { - _val61.clear(); - uint32_t _size62; - ::apache::thrift::protocol::TType _etype65; - xfer += iprot->readListBegin(_etype65, _size62); - _val61.resize(_size62); - uint32_t _i66; - for (_i66 = 0; _i66 < _size62; ++_i66) - { - xfer += _val61[_i66].read(iprot); - } - xfer += iprot->readListEnd(); - } - } - xfer += iprot->readMapEnd(); - } - this->__isset.groupPrivileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->rolePrivileges.clear(); - uint32_t _size67; - ::apache::thrift::protocol::TType _ktype68; - ::apache::thrift::protocol::TType _vtype69; - xfer += iprot->readMapBegin(_ktype68, _vtype69, _size67); - uint32_t _i71; - for (_i71 = 0; _i71 < _size67; ++_i71) - { - std::string _key72; - xfer += iprot->readString(_key72); - std::vector & _val73 = this->rolePrivileges[_key72]; - { - _val73.clear(); - uint32_t _size74; - ::apache::thrift::protocol::TType _etype77; - xfer += iprot->readListBegin(_etype77, _size74); - _val73.resize(_size74); - uint32_t _i78; - for (_i78 = 0; _i78 < _size74; ++_i78) - { - xfer += _val73[_i78].read(iprot); - } - xfer += iprot->readListEnd(); - } - } - xfer += iprot->readMapEnd(); - } - this->__isset.rolePrivileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t PrincipalPrivilegeSet::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::map > ::const_iterator _iter79; - for (_iter79 = this->userPrivileges.begin(); _iter79 != this->userPrivileges.end(); ++_iter79) - { - xfer += oprot->writeString(_iter79->first); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter79->second.size())); - std::vector ::const_iterator _iter80; - for (_iter80 = _iter79->second.begin(); _iter80 != _iter79->second.end(); ++_iter80) - { - xfer += (*_iter80).write(oprot); - } - xfer += oprot->writeListEnd(); - } - } - 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())); - std::map > ::const_iterator _iter81; - for (_iter81 = this->groupPrivileges.begin(); _iter81 != this->groupPrivileges.end(); ++_iter81) - { - xfer += oprot->writeString(_iter81->first); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter81->second.size())); - std::vector ::const_iterator _iter82; - for (_iter82 = _iter81->second.begin(); _iter82 != _iter81->second.end(); ++_iter82) - { - xfer += (*_iter82).write(oprot); - } - xfer += oprot->writeListEnd(); - } - } - 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())); - std::map > ::const_iterator _iter83; - for (_iter83 = this->rolePrivileges.begin(); _iter83 != this->rolePrivileges.end(); ++_iter83) - { - xfer += oprot->writeString(_iter83->first); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter83->second.size())); - std::vector ::const_iterator _iter84; - for (_iter84 = _iter83->second.begin(); _iter84 != _iter83->second.end(); ++_iter84) - { - xfer += (*_iter84).write(oprot); - } - xfer += oprot->writeListEnd(); - } - } - 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); -} - -PrincipalPrivilegeSet::PrincipalPrivilegeSet(const PrincipalPrivilegeSet& other85) { - userPrivileges = other85.userPrivileges; - groupPrivileges = other85.groupPrivileges; - rolePrivileges = other85.rolePrivileges; - __isset = other85.__isset; -} -PrincipalPrivilegeSet& PrincipalPrivilegeSet::operator=(const PrincipalPrivilegeSet& other86) { - userPrivileges = other86.userPrivileges; - groupPrivileges = other86.groupPrivileges; - rolePrivileges = other86.rolePrivileges; - __isset = other86.__isset; - return *this; -} -void PrincipalPrivilegeSet::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PrincipalPrivilegeSet("; - out << "userPrivileges=" << to_string(userPrivileges); - out << ", " << "groupPrivileges=" << to_string(groupPrivileges); - out << ", " << "rolePrivileges=" << to_string(rolePrivileges); - out << ")"; -} - - -GrantRevokePrivilegeRequest::~GrantRevokePrivilegeRequest() throw() { -} - - -void GrantRevokePrivilegeRequest::__set_requestType(const GrantRevokeType::type val) { - this->requestType = val; -} - -void GrantRevokePrivilegeRequest::__set_privileges(const PrivilegeBag& val) { - this->privileges = val; -} - -void GrantRevokePrivilegeRequest::__set_revokeGrantOption(const bool val) { - this->revokeGrantOption = val; -__isset.revokeGrantOption = true; -} - -uint32_t GrantRevokePrivilegeRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast87; - xfer += iprot->readI32(ecast87); - this->requestType = (GrantRevokeType::type)ecast87; - this->__isset.requestType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->privileges.read(iprot); - this->__isset.privileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->revokeGrantOption); - this->__isset.revokeGrantOption = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t GrantRevokePrivilegeRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GrantRevokePrivilegeRequest"); - - xfer += oprot->writeFieldBegin("requestType", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->requestType); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->privileges.write(oprot); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.revokeGrantOption) { - xfer += oprot->writeFieldBegin("revokeGrantOption", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->revokeGrantOption); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GrantRevokePrivilegeRequest &a, GrantRevokePrivilegeRequest &b) { - using ::std::swap; - swap(a.requestType, b.requestType); - swap(a.privileges, b.privileges); - swap(a.revokeGrantOption, b.revokeGrantOption); - swap(a.__isset, b.__isset); -} - -GrantRevokePrivilegeRequest::GrantRevokePrivilegeRequest(const GrantRevokePrivilegeRequest& other88) { - requestType = other88.requestType; - privileges = other88.privileges; - revokeGrantOption = other88.revokeGrantOption; - __isset = other88.__isset; -} -GrantRevokePrivilegeRequest& GrantRevokePrivilegeRequest::operator=(const GrantRevokePrivilegeRequest& other89) { - requestType = other89.requestType; - privileges = other89.privileges; - revokeGrantOption = other89.revokeGrantOption; - __isset = other89.__isset; - return *this; -} -void GrantRevokePrivilegeRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GrantRevokePrivilegeRequest("; - out << "requestType=" << to_string(requestType); - out << ", " << "privileges=" << to_string(privileges); - out << ", " << "revokeGrantOption="; (__isset.revokeGrantOption ? (out << to_string(revokeGrantOption)) : (out << "")); - out << ")"; -} - - -GrantRevokePrivilegeResponse::~GrantRevokePrivilegeResponse() throw() { -} - - -void GrantRevokePrivilegeResponse::__set_success(const bool val) { - this->success = val; -__isset.success = true; -} - -uint32_t GrantRevokePrivilegeResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t GrantRevokePrivilegeResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GrantRevokePrivilegeResponse"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 1); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GrantRevokePrivilegeResponse &a, GrantRevokePrivilegeResponse &b) { - using ::std::swap; - swap(a.success, b.success); - swap(a.__isset, b.__isset); -} - -GrantRevokePrivilegeResponse::GrantRevokePrivilegeResponse(const GrantRevokePrivilegeResponse& other90) { - success = other90.success; - __isset = other90.__isset; -} -GrantRevokePrivilegeResponse& GrantRevokePrivilegeResponse::operator=(const GrantRevokePrivilegeResponse& other91) { - success = other91.success; - __isset = other91.__isset; - return *this; -} -void GrantRevokePrivilegeResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GrantRevokePrivilegeResponse("; - out << "success="; (__isset.success ? (out << to_string(success)) : (out << "")); - out << ")"; -} - - -Role::~Role() throw() { -} - - -void Role::__set_roleName(const std::string& val) { - this->roleName = val; -} - -void Role::__set_createTime(const int32_t val) { - this->createTime = val; -} - -void Role::__set_ownerName(const std::string& val) { - this->ownerName = val; -} - -uint32_t Role::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->roleName); - this->__isset.roleName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->createTime); - this->__isset.createTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->ownerName); - this->__isset.ownerName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t Role::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -Role::Role(const Role& other92) { - roleName = other92.roleName; - createTime = other92.createTime; - ownerName = other92.ownerName; - __isset = other92.__isset; -} -Role& Role::operator=(const Role& other93) { - roleName = other93.roleName; - createTime = other93.createTime; - ownerName = other93.ownerName; - __isset = other93.__isset; - return *this; -} -void Role::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "Role("; - out << "roleName=" << to_string(roleName); - out << ", " << "createTime=" << to_string(createTime); - out << ", " << "ownerName=" << to_string(ownerName); - out << ")"; -} - - -RolePrincipalGrant::~RolePrincipalGrant() throw() { -} - - -void RolePrincipalGrant::__set_roleName(const std::string& val) { - this->roleName = val; -} - -void RolePrincipalGrant::__set_principalName(const std::string& val) { - this->principalName = val; -} - -void RolePrincipalGrant::__set_principalType(const PrincipalType::type val) { - this->principalType = val; -} - -void RolePrincipalGrant::__set_grantOption(const bool val) { - this->grantOption = val; -} - -void RolePrincipalGrant::__set_grantTime(const int32_t val) { - this->grantTime = val; -} - -void RolePrincipalGrant::__set_grantorName(const std::string& val) { - this->grantorName = val; -} - -void RolePrincipalGrant::__set_grantorPrincipalType(const PrincipalType::type val) { - this->grantorPrincipalType = val; -} - -uint32_t RolePrincipalGrant::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->roleName); - this->__isset.roleName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principalName); - this->__isset.principalName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast94; - xfer += iprot->readI32(ecast94); - this->principalType = (PrincipalType::type)ecast94; - this->__isset.principalType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->grantOption); - this->__isset.grantOption = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->grantTime); - this->__isset.grantTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->grantorName); - this->__isset.grantorName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast95; - xfer += iprot->readI32(ecast95); - this->grantorPrincipalType = (PrincipalType::type)ecast95; - this->__isset.grantorPrincipalType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t RolePrincipalGrant::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("RolePrincipalGrant"); - - xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->roleName); - 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("grantOption", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->grantOption); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("grantTime", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32(this->grantTime); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("grantorName", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->grantorName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("grantorPrincipalType", ::apache::thrift::protocol::T_I32, 7); - xfer += oprot->writeI32((int32_t)this->grantorPrincipalType); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(RolePrincipalGrant &a, RolePrincipalGrant &b) { - using ::std::swap; - swap(a.roleName, b.roleName); - swap(a.principalName, b.principalName); - swap(a.principalType, b.principalType); - swap(a.grantOption, b.grantOption); - swap(a.grantTime, b.grantTime); - swap(a.grantorName, b.grantorName); - swap(a.grantorPrincipalType, b.grantorPrincipalType); - swap(a.__isset, b.__isset); -} - -RolePrincipalGrant::RolePrincipalGrant(const RolePrincipalGrant& other96) { - roleName = other96.roleName; - principalName = other96.principalName; - principalType = other96.principalType; - grantOption = other96.grantOption; - grantTime = other96.grantTime; - grantorName = other96.grantorName; - grantorPrincipalType = other96.grantorPrincipalType; - __isset = other96.__isset; -} -RolePrincipalGrant& RolePrincipalGrant::operator=(const RolePrincipalGrant& other97) { - roleName = other97.roleName; - principalName = other97.principalName; - principalType = other97.principalType; - grantOption = other97.grantOption; - grantTime = other97.grantTime; - grantorName = other97.grantorName; - grantorPrincipalType = other97.grantorPrincipalType; - __isset = other97.__isset; - return *this; -} -void RolePrincipalGrant::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "RolePrincipalGrant("; - out << "roleName=" << to_string(roleName); - out << ", " << "principalName=" << to_string(principalName); - out << ", " << "principalType=" << to_string(principalType); - out << ", " << "grantOption=" << to_string(grantOption); - out << ", " << "grantTime=" << to_string(grantTime); - out << ", " << "grantorName=" << to_string(grantorName); - out << ", " << "grantorPrincipalType=" << to_string(grantorPrincipalType); - out << ")"; -} - - -GetRoleGrantsForPrincipalRequest::~GetRoleGrantsForPrincipalRequest() throw() { -} - - -void GetRoleGrantsForPrincipalRequest::__set_principal_name(const std::string& val) { - this->principal_name = val; -} - -void GetRoleGrantsForPrincipalRequest::__set_principal_type(const PrincipalType::type val) { - this->principal_type = val; -} - -uint32_t GetRoleGrantsForPrincipalRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_principal_name = false; - bool isset_principal_type = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - isset_principal_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast98; - xfer += iprot->readI32(ecast98); - this->principal_type = (PrincipalType::type)ecast98; - isset_principal_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_principal_name) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_principal_type) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetRoleGrantsForPrincipalRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetRoleGrantsForPrincipalRequest"); - - 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; -} - -void swap(GetRoleGrantsForPrincipalRequest &a, GetRoleGrantsForPrincipalRequest &b) { - using ::std::swap; - swap(a.principal_name, b.principal_name); - swap(a.principal_type, b.principal_type); -} - -GetRoleGrantsForPrincipalRequest::GetRoleGrantsForPrincipalRequest(const GetRoleGrantsForPrincipalRequest& other99) { - principal_name = other99.principal_name; - principal_type = other99.principal_type; -} -GetRoleGrantsForPrincipalRequest& GetRoleGrantsForPrincipalRequest::operator=(const GetRoleGrantsForPrincipalRequest& other100) { - principal_name = other100.principal_name; - principal_type = other100.principal_type; - return *this; -} -void GetRoleGrantsForPrincipalRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetRoleGrantsForPrincipalRequest("; - out << "principal_name=" << to_string(principal_name); - out << ", " << "principal_type=" << to_string(principal_type); - out << ")"; -} - - -GetRoleGrantsForPrincipalResponse::~GetRoleGrantsForPrincipalResponse() throw() { -} - - -void GetRoleGrantsForPrincipalResponse::__set_principalGrants(const std::vector & val) { - this->principalGrants = val; -} - -uint32_t GetRoleGrantsForPrincipalResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_principalGrants = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->principalGrants.clear(); - uint32_t _size101; - ::apache::thrift::protocol::TType _etype104; - xfer += iprot->readListBegin(_etype104, _size101); - this->principalGrants.resize(_size101); - uint32_t _i105; - for (_i105 = 0; _i105 < _size101; ++_i105) - { - xfer += this->principalGrants[_i105].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_principalGrants = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_principalGrants) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetRoleGrantsForPrincipalResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetRoleGrantsForPrincipalResponse"); - - xfer += oprot->writeFieldBegin("principalGrants", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->principalGrants.size())); - std::vector ::const_iterator _iter106; - for (_iter106 = this->principalGrants.begin(); _iter106 != this->principalGrants.end(); ++_iter106) - { - xfer += (*_iter106).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetRoleGrantsForPrincipalResponse &a, GetRoleGrantsForPrincipalResponse &b) { - using ::std::swap; - swap(a.principalGrants, b.principalGrants); -} - -GetRoleGrantsForPrincipalResponse::GetRoleGrantsForPrincipalResponse(const GetRoleGrantsForPrincipalResponse& other107) { - principalGrants = other107.principalGrants; -} -GetRoleGrantsForPrincipalResponse& GetRoleGrantsForPrincipalResponse::operator=(const GetRoleGrantsForPrincipalResponse& other108) { - principalGrants = other108.principalGrants; - return *this; -} -void GetRoleGrantsForPrincipalResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetRoleGrantsForPrincipalResponse("; - out << "principalGrants=" << to_string(principalGrants); - out << ")"; -} - - -GetPrincipalsInRoleRequest::~GetPrincipalsInRoleRequest() throw() { -} - - -void GetPrincipalsInRoleRequest::__set_roleName(const std::string& val) { - this->roleName = val; -} - -uint32_t GetPrincipalsInRoleRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_roleName = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->roleName); - isset_roleName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_roleName) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetPrincipalsInRoleRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetPrincipalsInRoleRequest"); - - xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->roleName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetPrincipalsInRoleRequest &a, GetPrincipalsInRoleRequest &b) { - using ::std::swap; - swap(a.roleName, b.roleName); -} - -GetPrincipalsInRoleRequest::GetPrincipalsInRoleRequest(const GetPrincipalsInRoleRequest& other109) { - roleName = other109.roleName; -} -GetPrincipalsInRoleRequest& GetPrincipalsInRoleRequest::operator=(const GetPrincipalsInRoleRequest& other110) { - roleName = other110.roleName; - return *this; -} -void GetPrincipalsInRoleRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetPrincipalsInRoleRequest("; - out << "roleName=" << to_string(roleName); - out << ")"; -} - - -GetPrincipalsInRoleResponse::~GetPrincipalsInRoleResponse() throw() { -} - - -void GetPrincipalsInRoleResponse::__set_principalGrants(const std::vector & val) { - this->principalGrants = val; -} - -uint32_t GetPrincipalsInRoleResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_principalGrants = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->principalGrants.clear(); - uint32_t _size111; - ::apache::thrift::protocol::TType _etype114; - xfer += iprot->readListBegin(_etype114, _size111); - this->principalGrants.resize(_size111); - uint32_t _i115; - for (_i115 = 0; _i115 < _size111; ++_i115) - { - xfer += this->principalGrants[_i115].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_principalGrants = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_principalGrants) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetPrincipalsInRoleResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetPrincipalsInRoleResponse"); - - xfer += oprot->writeFieldBegin("principalGrants", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->principalGrants.size())); - std::vector ::const_iterator _iter116; - for (_iter116 = this->principalGrants.begin(); _iter116 != this->principalGrants.end(); ++_iter116) - { - xfer += (*_iter116).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetPrincipalsInRoleResponse &a, GetPrincipalsInRoleResponse &b) { - using ::std::swap; - swap(a.principalGrants, b.principalGrants); -} - -GetPrincipalsInRoleResponse::GetPrincipalsInRoleResponse(const GetPrincipalsInRoleResponse& other117) { - principalGrants = other117.principalGrants; -} -GetPrincipalsInRoleResponse& GetPrincipalsInRoleResponse::operator=(const GetPrincipalsInRoleResponse& other118) { - principalGrants = other118.principalGrants; - return *this; -} -void GetPrincipalsInRoleResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetPrincipalsInRoleResponse("; - out << "principalGrants=" << to_string(principalGrants); - out << ")"; -} - - -GrantRevokeRoleRequest::~GrantRevokeRoleRequest() throw() { -} - - -void GrantRevokeRoleRequest::__set_requestType(const GrantRevokeType::type val) { - this->requestType = val; -} - -void GrantRevokeRoleRequest::__set_roleName(const std::string& val) { - this->roleName = val; -} - -void GrantRevokeRoleRequest::__set_principalName(const std::string& val) { - this->principalName = val; -} - -void GrantRevokeRoleRequest::__set_principalType(const PrincipalType::type val) { - this->principalType = val; -} - -void GrantRevokeRoleRequest::__set_grantor(const std::string& val) { - this->grantor = val; -__isset.grantor = true; -} - -void GrantRevokeRoleRequest::__set_grantorType(const PrincipalType::type val) { - this->grantorType = val; -__isset.grantorType = true; -} - -void GrantRevokeRoleRequest::__set_grantOption(const bool val) { - this->grantOption = val; -__isset.grantOption = true; -} - -uint32_t GrantRevokeRoleRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast119; - xfer += iprot->readI32(ecast119); - this->requestType = (GrantRevokeType::type)ecast119; - this->__isset.requestType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->roleName); - this->__isset.roleName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principalName); - this->__isset.principalName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast120; - xfer += iprot->readI32(ecast120); - this->principalType = (PrincipalType::type)ecast120; - this->__isset.principalType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->grantor); - this->__isset.grantor = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast121; - xfer += iprot->readI32(ecast121); - this->grantorType = (PrincipalType::type)ecast121; - this->__isset.grantorType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->grantOption); - this->__isset.grantOption = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t GrantRevokeRoleRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GrantRevokeRoleRequest"); - - xfer += oprot->writeFieldBegin("requestType", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->requestType); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->roleName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->principalName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32((int32_t)this->principalType); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.grantor) { - xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->grantor); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.grantorType) { - xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 6); - xfer += oprot->writeI32((int32_t)this->grantorType); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.grantOption) { - xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 7); - xfer += oprot->writeBool(this->grantOption); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GrantRevokeRoleRequest &a, GrantRevokeRoleRequest &b) { - using ::std::swap; - swap(a.requestType, b.requestType); - swap(a.roleName, b.roleName); - swap(a.principalName, b.principalName); - swap(a.principalType, b.principalType); - swap(a.grantor, b.grantor); - swap(a.grantorType, b.grantorType); - swap(a.grantOption, b.grantOption); - swap(a.__isset, b.__isset); -} - -GrantRevokeRoleRequest::GrantRevokeRoleRequest(const GrantRevokeRoleRequest& other122) { - requestType = other122.requestType; - roleName = other122.roleName; - principalName = other122.principalName; - principalType = other122.principalType; - grantor = other122.grantor; - grantorType = other122.grantorType; - grantOption = other122.grantOption; - __isset = other122.__isset; -} -GrantRevokeRoleRequest& GrantRevokeRoleRequest::operator=(const GrantRevokeRoleRequest& other123) { - requestType = other123.requestType; - roleName = other123.roleName; - principalName = other123.principalName; - principalType = other123.principalType; - grantor = other123.grantor; - grantorType = other123.grantorType; - grantOption = other123.grantOption; - __isset = other123.__isset; - return *this; -} -void GrantRevokeRoleRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GrantRevokeRoleRequest("; - out << "requestType=" << to_string(requestType); - out << ", " << "roleName=" << to_string(roleName); - out << ", " << "principalName=" << to_string(principalName); - out << ", " << "principalType=" << to_string(principalType); - out << ", " << "grantor="; (__isset.grantor ? (out << to_string(grantor)) : (out << "")); - out << ", " << "grantorType="; (__isset.grantorType ? (out << to_string(grantorType)) : (out << "")); - out << ", " << "grantOption="; (__isset.grantOption ? (out << to_string(grantOption)) : (out << "")); - out << ")"; -} - - -GrantRevokeRoleResponse::~GrantRevokeRoleResponse() throw() { -} - - -void GrantRevokeRoleResponse::__set_success(const bool val) { - this->success = val; -__isset.success = true; -} - -uint32_t GrantRevokeRoleResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t GrantRevokeRoleResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GrantRevokeRoleResponse"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 1); - xfer += oprot->writeBool(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GrantRevokeRoleResponse &a, GrantRevokeRoleResponse &b) { - using ::std::swap; - swap(a.success, b.success); - swap(a.__isset, b.__isset); -} - -GrantRevokeRoleResponse::GrantRevokeRoleResponse(const GrantRevokeRoleResponse& other124) { - success = other124.success; - __isset = other124.__isset; -} -GrantRevokeRoleResponse& GrantRevokeRoleResponse::operator=(const GrantRevokeRoleResponse& other125) { - success = other125.success; - __isset = other125.__isset; - return *this; -} -void GrantRevokeRoleResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GrantRevokeRoleResponse("; - out << "success="; (__isset.success ? (out << to_string(success)) : (out << "")); - out << ")"; -} - - -Database::~Database() throw() { -} - - -void Database::__set_name(const std::string& val) { - this->name = val; -} - -void Database::__set_description(const std::string& val) { - this->description = val; -} - -void Database::__set_locationUri(const std::string& val) { - this->locationUri = val; -} - -void Database::__set_parameters(const std::map & val) { - this->parameters = val; -} - -void Database::__set_privileges(const PrincipalPrivilegeSet& val) { - this->privileges = val; -__isset.privileges = true; -} - -void Database::__set_ownerName(const std::string& val) { - this->ownerName = val; -__isset.ownerName = true; -} - -void Database::__set_ownerType(const PrincipalType::type val) { - this->ownerType = val; -__isset.ownerType = true; -} - -uint32_t Database::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->description); - this->__isset.description = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->locationUri); - this->__isset.locationUri = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->parameters.clear(); - uint32_t _size126; - ::apache::thrift::protocol::TType _ktype127; - ::apache::thrift::protocol::TType _vtype128; - xfer += iprot->readMapBegin(_ktype127, _vtype128, _size126); - uint32_t _i130; - for (_i130 = 0; _i130 < _size126; ++_i130) - { - std::string _key131; - xfer += iprot->readString(_key131); - std::string& _val132 = this->parameters[_key131]; - xfer += iprot->readString(_val132); - } - xfer += iprot->readMapEnd(); - } - this->__isset.parameters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->privileges.read(iprot); - this->__isset.privileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->ownerName); - this->__isset.ownerName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast133; - xfer += iprot->readI32(ecast133); - this->ownerType = (PrincipalType::type)ecast133; - this->__isset.ownerType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t Database::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::map ::const_iterator _iter134; - for (_iter134 = this->parameters.begin(); _iter134 != this->parameters.end(); ++_iter134) - { - xfer += oprot->writeString(_iter134->first); - xfer += oprot->writeString(_iter134->second); - } - 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); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.ownerName) { - xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->ownerName); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.ownerType) { - xfer += oprot->writeFieldBegin("ownerType", ::apache::thrift::protocol::T_I32, 7); - xfer += oprot->writeI32((int32_t)this->ownerType); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - 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.ownerName, b.ownerName); - swap(a.ownerType, b.ownerType); - swap(a.__isset, b.__isset); -} - -Database::Database(const Database& other135) { - name = other135.name; - description = other135.description; - locationUri = other135.locationUri; - parameters = other135.parameters; - privileges = other135.privileges; - ownerName = other135.ownerName; - ownerType = other135.ownerType; - __isset = other135.__isset; -} -Database& Database::operator=(const Database& other136) { - name = other136.name; - description = other136.description; - locationUri = other136.locationUri; - parameters = other136.parameters; - privileges = other136.privileges; - ownerName = other136.ownerName; - ownerType = other136.ownerType; - __isset = other136.__isset; - return *this; -} -void Database::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "Database("; - out << "name=" << to_string(name); - out << ", " << "description=" << to_string(description); - out << ", " << "locationUri=" << to_string(locationUri); - out << ", " << "parameters=" << to_string(parameters); - out << ", " << "privileges="; (__isset.privileges ? (out << to_string(privileges)) : (out << "")); - out << ", " << "ownerName="; (__isset.ownerName ? (out << to_string(ownerName)) : (out << "")); - out << ", " << "ownerType="; (__isset.ownerType ? (out << to_string(ownerType)) : (out << "")); - out << ")"; -} - - -SerDeInfo::~SerDeInfo() throw() { -} - - -void SerDeInfo::__set_name(const std::string& val) { - this->name = val; -} - -void SerDeInfo::__set_serializationLib(const std::string& val) { - this->serializationLib = val; -} - -void SerDeInfo::__set_parameters(const std::map & val) { - this->parameters = val; -} - -uint32_t SerDeInfo::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->serializationLib); - this->__isset.serializationLib = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->parameters.clear(); - uint32_t _size137; - ::apache::thrift::protocol::TType _ktype138; - ::apache::thrift::protocol::TType _vtype139; - xfer += iprot->readMapBegin(_ktype138, _vtype139, _size137); - uint32_t _i141; - for (_i141 = 0; _i141 < _size137; ++_i141) - { - std::string _key142; - xfer += iprot->readString(_key142); - std::string& _val143 = this->parameters[_key142]; - xfer += iprot->readString(_val143); - } - xfer += iprot->readMapEnd(); - } - this->__isset.parameters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t SerDeInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::map ::const_iterator _iter144; - for (_iter144 = this->parameters.begin(); _iter144 != this->parameters.end(); ++_iter144) - { - xfer += oprot->writeString(_iter144->first); - xfer += oprot->writeString(_iter144->second); - } - 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); -} - -SerDeInfo::SerDeInfo(const SerDeInfo& other145) { - name = other145.name; - serializationLib = other145.serializationLib; - parameters = other145.parameters; - __isset = other145.__isset; -} -SerDeInfo& SerDeInfo::operator=(const SerDeInfo& other146) { - name = other146.name; - serializationLib = other146.serializationLib; - parameters = other146.parameters; - __isset = other146.__isset; - return *this; -} -void SerDeInfo::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "SerDeInfo("; - out << "name=" << to_string(name); - out << ", " << "serializationLib=" << to_string(serializationLib); - out << ", " << "parameters=" << to_string(parameters); - out << ")"; -} - - -Order::~Order() throw() { -} - - -void Order::__set_col(const std::string& val) { - this->col = val; -} - -void Order::__set_order(const int32_t val) { - this->order = val; -} - -uint32_t Order::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->col); - this->__isset.col = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->order); - this->__isset.order = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t Order::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -Order::Order(const Order& other147) { - col = other147.col; - order = other147.order; - __isset = other147.__isset; -} -Order& Order::operator=(const Order& other148) { - col = other148.col; - order = other148.order; - __isset = other148.__isset; - return *this; -} -void Order::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "Order("; - out << "col=" << to_string(col); - out << ", " << "order=" << to_string(order); - out << ")"; -} - - -SkewedInfo::~SkewedInfo() throw() { -} - - -void SkewedInfo::__set_skewedColNames(const std::vector & val) { - this->skewedColNames = val; -} - -void SkewedInfo::__set_skewedColValues(const std::vector > & val) { - this->skewedColValues = val; -} - -void SkewedInfo::__set_skewedColValueLocationMaps(const std::map , std::string> & val) { - this->skewedColValueLocationMaps = val; -} - -uint32_t SkewedInfo::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->skewedColNames.clear(); - uint32_t _size149; - ::apache::thrift::protocol::TType _etype152; - xfer += iprot->readListBegin(_etype152, _size149); - this->skewedColNames.resize(_size149); - uint32_t _i153; - for (_i153 = 0; _i153 < _size149; ++_i153) - { - xfer += iprot->readString(this->skewedColNames[_i153]); - } - xfer += iprot->readListEnd(); - } - this->__isset.skewedColNames = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->skewedColValues.clear(); - uint32_t _size154; - ::apache::thrift::protocol::TType _etype157; - xfer += iprot->readListBegin(_etype157, _size154); - this->skewedColValues.resize(_size154); - uint32_t _i158; - for (_i158 = 0; _i158 < _size154; ++_i158) - { - { - this->skewedColValues[_i158].clear(); - uint32_t _size159; - ::apache::thrift::protocol::TType _etype162; - xfer += iprot->readListBegin(_etype162, _size159); - this->skewedColValues[_i158].resize(_size159); - uint32_t _i163; - for (_i163 = 0; _i163 < _size159; ++_i163) - { - xfer += iprot->readString(this->skewedColValues[_i158][_i163]); - } - xfer += iprot->readListEnd(); - } - } - xfer += iprot->readListEnd(); - } - this->__isset.skewedColValues = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->skewedColValueLocationMaps.clear(); - uint32_t _size164; - ::apache::thrift::protocol::TType _ktype165; - ::apache::thrift::protocol::TType _vtype166; - xfer += iprot->readMapBegin(_ktype165, _vtype166, _size164); - uint32_t _i168; - for (_i168 = 0; _i168 < _size164; ++_i168) - { - std::vector _key169; - { - _key169.clear(); - uint32_t _size171; - ::apache::thrift::protocol::TType _etype174; - xfer += iprot->readListBegin(_etype174, _size171); - _key169.resize(_size171); - uint32_t _i175; - for (_i175 = 0; _i175 < _size171; ++_i175) - { - xfer += iprot->readString(_key169[_i175]); - } - xfer += iprot->readListEnd(); - } - std::string& _val170 = this->skewedColValueLocationMaps[_key169]; - xfer += iprot->readString(_val170); - } - xfer += iprot->readMapEnd(); - } - this->__isset.skewedColValueLocationMaps = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t SkewedInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter176; - for (_iter176 = this->skewedColNames.begin(); _iter176 != this->skewedColNames.end(); ++_iter176) - { - xfer += oprot->writeString((*_iter176)); - } - 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())); - std::vector > ::const_iterator _iter177; - for (_iter177 = this->skewedColValues.begin(); _iter177 != this->skewedColValues.end(); ++_iter177) - { - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*_iter177).size())); - std::vector ::const_iterator _iter178; - for (_iter178 = (*_iter177).begin(); _iter178 != (*_iter177).end(); ++_iter178) - { - xfer += oprot->writeString((*_iter178)); - } - xfer += oprot->writeListEnd(); - } - } - 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())); - std::map , std::string> ::const_iterator _iter179; - for (_iter179 = this->skewedColValueLocationMaps.begin(); _iter179 != this->skewedColValueLocationMaps.end(); ++_iter179) - { - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(_iter179->first.size())); - std::vector ::const_iterator _iter180; - for (_iter180 = _iter179->first.begin(); _iter180 != _iter179->first.end(); ++_iter180) - { - xfer += oprot->writeString((*_iter180)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeString(_iter179->second); - } - 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); -} - -SkewedInfo::SkewedInfo(const SkewedInfo& other181) { - skewedColNames = other181.skewedColNames; - skewedColValues = other181.skewedColValues; - skewedColValueLocationMaps = other181.skewedColValueLocationMaps; - __isset = other181.__isset; -} -SkewedInfo& SkewedInfo::operator=(const SkewedInfo& other182) { - skewedColNames = other182.skewedColNames; - skewedColValues = other182.skewedColValues; - skewedColValueLocationMaps = other182.skewedColValueLocationMaps; - __isset = other182.__isset; - return *this; -} -void SkewedInfo::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "SkewedInfo("; - out << "skewedColNames=" << to_string(skewedColNames); - out << ", " << "skewedColValues=" << to_string(skewedColValues); - out << ", " << "skewedColValueLocationMaps=" << to_string(skewedColValueLocationMaps); - out << ")"; -} - - -StorageDescriptor::~StorageDescriptor() throw() { -} - - -void StorageDescriptor::__set_cols(const std::vector & val) { - this->cols = val; -} - -void StorageDescriptor::__set_location(const std::string& val) { - this->location = val; -} - -void StorageDescriptor::__set_inputFormat(const std::string& val) { - this->inputFormat = val; -} - -void StorageDescriptor::__set_outputFormat(const std::string& val) { - this->outputFormat = val; -} - -void StorageDescriptor::__set_compressed(const bool val) { - this->compressed = val; -} - -void StorageDescriptor::__set_numBuckets(const int32_t val) { - this->numBuckets = val; -} - -void StorageDescriptor::__set_serdeInfo(const SerDeInfo& val) { - this->serdeInfo = val; -} - -void StorageDescriptor::__set_bucketCols(const std::vector & val) { - this->bucketCols = val; -} - -void StorageDescriptor::__set_sortCols(const std::vector & val) { - this->sortCols = val; -} - -void StorageDescriptor::__set_parameters(const std::map & val) { - this->parameters = val; -} - -void StorageDescriptor::__set_skewedInfo(const SkewedInfo& val) { - this->skewedInfo = val; -__isset.skewedInfo = true; -} - -void StorageDescriptor::__set_storedAsSubDirectories(const bool val) { - this->storedAsSubDirectories = val; -__isset.storedAsSubDirectories = true; -} - -uint32_t StorageDescriptor::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->cols.clear(); - uint32_t _size183; - ::apache::thrift::protocol::TType _etype186; - xfer += iprot->readListBegin(_etype186, _size183); - this->cols.resize(_size183); - uint32_t _i187; - for (_i187 = 0; _i187 < _size183; ++_i187) - { - xfer += this->cols[_i187].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.cols = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->location); - this->__isset.location = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->inputFormat); - this->__isset.inputFormat = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->outputFormat); - this->__isset.outputFormat = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->compressed); - this->__isset.compressed = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->numBuckets); - this->__isset.numBuckets = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->serdeInfo.read(iprot); - this->__isset.serdeInfo = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->bucketCols.clear(); - uint32_t _size188; - ::apache::thrift::protocol::TType _etype191; - xfer += iprot->readListBegin(_etype191, _size188); - this->bucketCols.resize(_size188); - uint32_t _i192; - for (_i192 = 0; _i192 < _size188; ++_i192) - { - xfer += iprot->readString(this->bucketCols[_i192]); - } - xfer += iprot->readListEnd(); - } - this->__isset.bucketCols = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->sortCols.clear(); - uint32_t _size193; - ::apache::thrift::protocol::TType _etype196; - xfer += iprot->readListBegin(_etype196, _size193); - this->sortCols.resize(_size193); - uint32_t _i197; - for (_i197 = 0; _i197 < _size193; ++_i197) - { - xfer += this->sortCols[_i197].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.sortCols = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->parameters.clear(); - uint32_t _size198; - ::apache::thrift::protocol::TType _ktype199; - ::apache::thrift::protocol::TType _vtype200; - xfer += iprot->readMapBegin(_ktype199, _vtype200, _size198); - uint32_t _i202; - for (_i202 = 0; _i202 < _size198; ++_i202) - { - std::string _key203; - xfer += iprot->readString(_key203); - std::string& _val204 = this->parameters[_key203]; - xfer += iprot->readString(_val204); - } - xfer += iprot->readMapEnd(); - } - this->__isset.parameters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 11: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->skewedInfo.read(iprot); - this->__isset.skewedInfo = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 12: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->storedAsSubDirectories); - this->__isset.storedAsSubDirectories = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t StorageDescriptor::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter205; - for (_iter205 = this->cols.begin(); _iter205 != this->cols.end(); ++_iter205) - { - xfer += (*_iter205).write(oprot); - } - 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())); - std::vector ::const_iterator _iter206; - for (_iter206 = this->bucketCols.begin(); _iter206 != this->bucketCols.end(); ++_iter206) - { - xfer += oprot->writeString((*_iter206)); - } - 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())); - std::vector ::const_iterator _iter207; - for (_iter207 = this->sortCols.begin(); _iter207 != this->sortCols.end(); ++_iter207) - { - xfer += (*_iter207).write(oprot); - } - 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())); - std::map ::const_iterator _iter208; - for (_iter208 = this->parameters.begin(); _iter208 != this->parameters.end(); ++_iter208) - { - xfer += oprot->writeString(_iter208->first); - xfer += oprot->writeString(_iter208->second); - } - 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); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.storedAsSubDirectories) { - xfer += oprot->writeFieldBegin("storedAsSubDirectories", ::apache::thrift::protocol::T_BOOL, 12); - xfer += oprot->writeBool(this->storedAsSubDirectories); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - 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.storedAsSubDirectories, b.storedAsSubDirectories); - swap(a.__isset, b.__isset); -} - -StorageDescriptor::StorageDescriptor(const StorageDescriptor& other209) { - cols = other209.cols; - location = other209.location; - inputFormat = other209.inputFormat; - outputFormat = other209.outputFormat; - compressed = other209.compressed; - numBuckets = other209.numBuckets; - serdeInfo = other209.serdeInfo; - bucketCols = other209.bucketCols; - sortCols = other209.sortCols; - parameters = other209.parameters; - skewedInfo = other209.skewedInfo; - storedAsSubDirectories = other209.storedAsSubDirectories; - __isset = other209.__isset; -} -StorageDescriptor& StorageDescriptor::operator=(const StorageDescriptor& other210) { - cols = other210.cols; - location = other210.location; - inputFormat = other210.inputFormat; - outputFormat = other210.outputFormat; - compressed = other210.compressed; - numBuckets = other210.numBuckets; - serdeInfo = other210.serdeInfo; - bucketCols = other210.bucketCols; - sortCols = other210.sortCols; - parameters = other210.parameters; - skewedInfo = other210.skewedInfo; - storedAsSubDirectories = other210.storedAsSubDirectories; - __isset = other210.__isset; - return *this; -} -void StorageDescriptor::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "StorageDescriptor("; - out << "cols=" << to_string(cols); - out << ", " << "location=" << to_string(location); - out << ", " << "inputFormat=" << to_string(inputFormat); - out << ", " << "outputFormat=" << to_string(outputFormat); - out << ", " << "compressed=" << to_string(compressed); - out << ", " << "numBuckets=" << to_string(numBuckets); - out << ", " << "serdeInfo=" << to_string(serdeInfo); - out << ", " << "bucketCols=" << to_string(bucketCols); - out << ", " << "sortCols=" << to_string(sortCols); - out << ", " << "parameters=" << to_string(parameters); - out << ", " << "skewedInfo="; (__isset.skewedInfo ? (out << to_string(skewedInfo)) : (out << "")); - out << ", " << "storedAsSubDirectories="; (__isset.storedAsSubDirectories ? (out << to_string(storedAsSubDirectories)) : (out << "")); - out << ")"; -} - - -Table::~Table() throw() { -} - - -void Table::__set_tableName(const std::string& val) { - this->tableName = val; -} - -void Table::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void Table::__set_owner(const std::string& val) { - this->owner = val; -} - -void Table::__set_createTime(const int32_t val) { - this->createTime = val; -} - -void Table::__set_lastAccessTime(const int32_t val) { - this->lastAccessTime = val; -} - -void Table::__set_retention(const int32_t val) { - this->retention = val; -} - -void Table::__set_sd(const StorageDescriptor& val) { - this->sd = val; -} - -void Table::__set_partitionKeys(const std::vector & val) { - this->partitionKeys = val; -} - -void Table::__set_parameters(const std::map & val) { - this->parameters = val; -} - -void Table::__set_viewOriginalText(const std::string& val) { - this->viewOriginalText = val; -} - -void Table::__set_viewExpandedText(const std::string& val) { - this->viewExpandedText = val; -} - -void Table::__set_tableType(const std::string& val) { - this->tableType = val; -} - -void Table::__set_privileges(const PrincipalPrivilegeSet& val) { - this->privileges = val; -__isset.privileges = true; -} - -void Table::__set_temporary(const bool val) { - this->temporary = val; -__isset.temporary = true; -} - -void Table::__set_rewriteEnabled(const bool val) { - this->rewriteEnabled = val; -__isset.rewriteEnabled = true; -} - -uint32_t Table::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableName); - this->__isset.tableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->owner); - this->__isset.owner = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->createTime); - this->__isset.createTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->lastAccessTime); - this->__isset.lastAccessTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->retention); - this->__isset.retention = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->sd.read(iprot); - this->__isset.sd = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitionKeys.clear(); - uint32_t _size211; - ::apache::thrift::protocol::TType _etype214; - xfer += iprot->readListBegin(_etype214, _size211); - this->partitionKeys.resize(_size211); - uint32_t _i215; - for (_i215 = 0; _i215 < _size211; ++_i215) - { - xfer += this->partitionKeys[_i215].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.partitionKeys = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->parameters.clear(); - uint32_t _size216; - ::apache::thrift::protocol::TType _ktype217; - ::apache::thrift::protocol::TType _vtype218; - xfer += iprot->readMapBegin(_ktype217, _vtype218, _size216); - uint32_t _i220; - for (_i220 = 0; _i220 < _size216; ++_i220) - { - std::string _key221; - xfer += iprot->readString(_key221); - std::string& _val222 = this->parameters[_key221]; - xfer += iprot->readString(_val222); - } - xfer += iprot->readMapEnd(); - } - this->__isset.parameters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->viewOriginalText); - this->__isset.viewOriginalText = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 11: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->viewExpandedText); - this->__isset.viewExpandedText = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 12: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableType); - this->__isset.tableType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 13: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->privileges.read(iprot); - this->__isset.privileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 14: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->temporary); - this->__isset.temporary = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 15: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->rewriteEnabled); - this->__isset.rewriteEnabled = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t Table::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter223; - for (_iter223 = this->partitionKeys.begin(); _iter223 != this->partitionKeys.end(); ++_iter223) - { - xfer += (*_iter223).write(oprot); - } - 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())); - std::map ::const_iterator _iter224; - for (_iter224 = this->parameters.begin(); _iter224 != this->parameters.end(); ++_iter224) - { - xfer += oprot->writeString(_iter224->first); - xfer += oprot->writeString(_iter224->second); - } - 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); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.temporary) { - xfer += oprot->writeFieldBegin("temporary", ::apache::thrift::protocol::T_BOOL, 14); - xfer += oprot->writeBool(this->temporary); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.rewriteEnabled) { - xfer += oprot->writeFieldBegin("rewriteEnabled", ::apache::thrift::protocol::T_BOOL, 15); - xfer += oprot->writeBool(this->rewriteEnabled); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - 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.temporary, b.temporary); - swap(a.rewriteEnabled, b.rewriteEnabled); - swap(a.__isset, b.__isset); -} - -Table::Table(const Table& other225) { - tableName = other225.tableName; - dbName = other225.dbName; - owner = other225.owner; - createTime = other225.createTime; - lastAccessTime = other225.lastAccessTime; - retention = other225.retention; - sd = other225.sd; - partitionKeys = other225.partitionKeys; - parameters = other225.parameters; - viewOriginalText = other225.viewOriginalText; - viewExpandedText = other225.viewExpandedText; - tableType = other225.tableType; - privileges = other225.privileges; - temporary = other225.temporary; - rewriteEnabled = other225.rewriteEnabled; - __isset = other225.__isset; -} -Table& Table::operator=(const Table& other226) { - tableName = other226.tableName; - dbName = other226.dbName; - owner = other226.owner; - createTime = other226.createTime; - lastAccessTime = other226.lastAccessTime; - retention = other226.retention; - sd = other226.sd; - partitionKeys = other226.partitionKeys; - parameters = other226.parameters; - viewOriginalText = other226.viewOriginalText; - viewExpandedText = other226.viewExpandedText; - tableType = other226.tableType; - privileges = other226.privileges; - temporary = other226.temporary; - rewriteEnabled = other226.rewriteEnabled; - __isset = other226.__isset; - return *this; -} -void Table::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "Table("; - out << "tableName=" << to_string(tableName); - out << ", " << "dbName=" << to_string(dbName); - out << ", " << "owner=" << to_string(owner); - out << ", " << "createTime=" << to_string(createTime); - out << ", " << "lastAccessTime=" << to_string(lastAccessTime); - out << ", " << "retention=" << to_string(retention); - out << ", " << "sd=" << to_string(sd); - out << ", " << "partitionKeys=" << to_string(partitionKeys); - out << ", " << "parameters=" << to_string(parameters); - out << ", " << "viewOriginalText=" << to_string(viewOriginalText); - out << ", " << "viewExpandedText=" << to_string(viewExpandedText); - out << ", " << "tableType=" << to_string(tableType); - out << ", " << "privileges="; (__isset.privileges ? (out << to_string(privileges)) : (out << "")); - out << ", " << "temporary="; (__isset.temporary ? (out << to_string(temporary)) : (out << "")); - out << ", " << "rewriteEnabled="; (__isset.rewriteEnabled ? (out << to_string(rewriteEnabled)) : (out << "")); - out << ")"; -} - - -Partition::~Partition() throw() { -} - - -void Partition::__set_values(const std::vector & val) { - this->values = val; -} - -void Partition::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void Partition::__set_tableName(const std::string& val) { - this->tableName = val; -} - -void Partition::__set_createTime(const int32_t val) { - this->createTime = val; -} - -void Partition::__set_lastAccessTime(const int32_t val) { - this->lastAccessTime = val; -} - -void Partition::__set_sd(const StorageDescriptor& val) { - this->sd = val; -} - -void Partition::__set_parameters(const std::map & val) { - this->parameters = val; -} - -void Partition::__set_privileges(const PrincipalPrivilegeSet& val) { - this->privileges = val; -__isset.privileges = true; -} - -uint32_t Partition::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->values.clear(); - uint32_t _size227; - ::apache::thrift::protocol::TType _etype230; - xfer += iprot->readListBegin(_etype230, _size227); - this->values.resize(_size227); - uint32_t _i231; - for (_i231 = 0; _i231 < _size227; ++_i231) - { - xfer += iprot->readString(this->values[_i231]); - } - xfer += iprot->readListEnd(); - } - this->__isset.values = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableName); - this->__isset.tableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->createTime); - this->__isset.createTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->lastAccessTime); - this->__isset.lastAccessTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->sd.read(iprot); - this->__isset.sd = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->parameters.clear(); - uint32_t _size232; - ::apache::thrift::protocol::TType _ktype233; - ::apache::thrift::protocol::TType _vtype234; - xfer += iprot->readMapBegin(_ktype233, _vtype234, _size232); - uint32_t _i236; - for (_i236 = 0; _i236 < _size232; ++_i236) - { - std::string _key237; - xfer += iprot->readString(_key237); - std::string& _val238 = this->parameters[_key237]; - xfer += iprot->readString(_val238); - } - xfer += iprot->readMapEnd(); - } - this->__isset.parameters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->privileges.read(iprot); - this->__isset.privileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t Partition::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter239; - for (_iter239 = this->values.begin(); _iter239 != this->values.end(); ++_iter239) - { - xfer += oprot->writeString((*_iter239)); - } - 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())); - std::map ::const_iterator _iter240; - for (_iter240 = this->parameters.begin(); _iter240 != this->parameters.end(); ++_iter240) - { - xfer += oprot->writeString(_iter240->first); - xfer += oprot->writeString(_iter240->second); - } - 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); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - 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); -} - -Partition::Partition(const Partition& other241) { - values = other241.values; - dbName = other241.dbName; - tableName = other241.tableName; - createTime = other241.createTime; - lastAccessTime = other241.lastAccessTime; - sd = other241.sd; - parameters = other241.parameters; - privileges = other241.privileges; - __isset = other241.__isset; -} -Partition& Partition::operator=(const Partition& other242) { - values = other242.values; - dbName = other242.dbName; - tableName = other242.tableName; - createTime = other242.createTime; - lastAccessTime = other242.lastAccessTime; - sd = other242.sd; - parameters = other242.parameters; - privileges = other242.privileges; - __isset = other242.__isset; - return *this; -} -void Partition::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "Partition("; - out << "values=" << to_string(values); - out << ", " << "dbName=" << to_string(dbName); - out << ", " << "tableName=" << to_string(tableName); - out << ", " << "createTime=" << to_string(createTime); - out << ", " << "lastAccessTime=" << to_string(lastAccessTime); - out << ", " << "sd=" << to_string(sd); - out << ", " << "parameters=" << to_string(parameters); - out << ", " << "privileges="; (__isset.privileges ? (out << to_string(privileges)) : (out << "")); - out << ")"; -} - - -PartitionWithoutSD::~PartitionWithoutSD() throw() { -} - - -void PartitionWithoutSD::__set_values(const std::vector & val) { - this->values = val; -} - -void PartitionWithoutSD::__set_createTime(const int32_t val) { - this->createTime = val; -} - -void PartitionWithoutSD::__set_lastAccessTime(const int32_t val) { - this->lastAccessTime = val; -} - -void PartitionWithoutSD::__set_relativePath(const std::string& val) { - this->relativePath = val; -} - -void PartitionWithoutSD::__set_parameters(const std::map & val) { - this->parameters = val; -} - -void PartitionWithoutSD::__set_privileges(const PrincipalPrivilegeSet& val) { - this->privileges = val; -__isset.privileges = true; -} - -uint32_t PartitionWithoutSD::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->values.clear(); - uint32_t _size243; - ::apache::thrift::protocol::TType _etype246; - xfer += iprot->readListBegin(_etype246, _size243); - this->values.resize(_size243); - uint32_t _i247; - for (_i247 = 0; _i247 < _size243; ++_i247) - { - xfer += iprot->readString(this->values[_i247]); - } - xfer += iprot->readListEnd(); - } - this->__isset.values = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->createTime); - this->__isset.createTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->lastAccessTime); - this->__isset.lastAccessTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->relativePath); - this->__isset.relativePath = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->parameters.clear(); - uint32_t _size248; - ::apache::thrift::protocol::TType _ktype249; - ::apache::thrift::protocol::TType _vtype250; - xfer += iprot->readMapBegin(_ktype249, _vtype250, _size248); - uint32_t _i252; - for (_i252 = 0; _i252 < _size248; ++_i252) - { - std::string _key253; - xfer += iprot->readString(_key253); - std::string& _val254 = this->parameters[_key253]; - xfer += iprot->readString(_val254); - } - xfer += iprot->readMapEnd(); - } - this->__isset.parameters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->privileges.read(iprot); - this->__isset.privileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t PartitionWithoutSD::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("PartitionWithoutSD"); - - xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->values.size())); - std::vector ::const_iterator _iter255; - for (_iter255 = this->values.begin(); _iter255 != this->values.end(); ++_iter255) - { - xfer += oprot->writeString((*_iter255)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->createTime); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->lastAccessTime); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("relativePath", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->relativePath); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 5); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); - std::map ::const_iterator _iter256; - for (_iter256 = this->parameters.begin(); _iter256 != this->parameters.end(); ++_iter256) - { - xfer += oprot->writeString(_iter256->first); - xfer += oprot->writeString(_iter256->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.privileges) { - xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 6); - xfer += this->privileges.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(PartitionWithoutSD &a, PartitionWithoutSD &b) { - using ::std::swap; - swap(a.values, b.values); - swap(a.createTime, b.createTime); - swap(a.lastAccessTime, b.lastAccessTime); - swap(a.relativePath, b.relativePath); - swap(a.parameters, b.parameters); - swap(a.privileges, b.privileges); - swap(a.__isset, b.__isset); -} - -PartitionWithoutSD::PartitionWithoutSD(const PartitionWithoutSD& other257) { - values = other257.values; - createTime = other257.createTime; - lastAccessTime = other257.lastAccessTime; - relativePath = other257.relativePath; - parameters = other257.parameters; - privileges = other257.privileges; - __isset = other257.__isset; -} -PartitionWithoutSD& PartitionWithoutSD::operator=(const PartitionWithoutSD& other258) { - values = other258.values; - createTime = other258.createTime; - lastAccessTime = other258.lastAccessTime; - relativePath = other258.relativePath; - parameters = other258.parameters; - privileges = other258.privileges; - __isset = other258.__isset; - return *this; -} -void PartitionWithoutSD::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PartitionWithoutSD("; - out << "values=" << to_string(values); - out << ", " << "createTime=" << to_string(createTime); - out << ", " << "lastAccessTime=" << to_string(lastAccessTime); - out << ", " << "relativePath=" << to_string(relativePath); - out << ", " << "parameters=" << to_string(parameters); - out << ", " << "privileges="; (__isset.privileges ? (out << to_string(privileges)) : (out << "")); - out << ")"; -} - - -PartitionSpecWithSharedSD::~PartitionSpecWithSharedSD() throw() { -} - - -void PartitionSpecWithSharedSD::__set_partitions(const std::vector & val) { - this->partitions = val; -} - -void PartitionSpecWithSharedSD::__set_sd(const StorageDescriptor& val) { - this->sd = val; -} - -uint32_t PartitionSpecWithSharedSD::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitions.clear(); - uint32_t _size259; - ::apache::thrift::protocol::TType _etype262; - xfer += iprot->readListBegin(_etype262, _size259); - this->partitions.resize(_size259); - uint32_t _i263; - for (_i263 = 0; _i263 < _size259; ++_i263) - { - xfer += this->partitions[_i263].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.partitions = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->sd.read(iprot); - this->__isset.sd = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t PartitionSpecWithSharedSD::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("PartitionSpecWithSharedSD"); - - xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); - std::vector ::const_iterator _iter264; - for (_iter264 = this->partitions.begin(); _iter264 != this->partitions.end(); ++_iter264) - { - xfer += (*_iter264).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->sd.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(PartitionSpecWithSharedSD &a, PartitionSpecWithSharedSD &b) { - using ::std::swap; - swap(a.partitions, b.partitions); - swap(a.sd, b.sd); - swap(a.__isset, b.__isset); -} - -PartitionSpecWithSharedSD::PartitionSpecWithSharedSD(const PartitionSpecWithSharedSD& other265) { - partitions = other265.partitions; - sd = other265.sd; - __isset = other265.__isset; -} -PartitionSpecWithSharedSD& PartitionSpecWithSharedSD::operator=(const PartitionSpecWithSharedSD& other266) { - partitions = other266.partitions; - sd = other266.sd; - __isset = other266.__isset; - return *this; -} -void PartitionSpecWithSharedSD::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PartitionSpecWithSharedSD("; - out << "partitions=" << to_string(partitions); - out << ", " << "sd=" << to_string(sd); - out << ")"; -} - - -PartitionListComposingSpec::~PartitionListComposingSpec() throw() { -} - - -void PartitionListComposingSpec::__set_partitions(const std::vector & val) { - this->partitions = val; -} - -uint32_t PartitionListComposingSpec::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitions.clear(); - uint32_t _size267; - ::apache::thrift::protocol::TType _etype270; - xfer += iprot->readListBegin(_etype270, _size267); - this->partitions.resize(_size267); - uint32_t _i271; - for (_i271 = 0; _i271 < _size267; ++_i271) - { - xfer += this->partitions[_i271].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.partitions = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t PartitionListComposingSpec::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("PartitionListComposingSpec"); - - xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); - std::vector ::const_iterator _iter272; - for (_iter272 = this->partitions.begin(); _iter272 != this->partitions.end(); ++_iter272) - { - xfer += (*_iter272).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(PartitionListComposingSpec &a, PartitionListComposingSpec &b) { - using ::std::swap; - swap(a.partitions, b.partitions); - swap(a.__isset, b.__isset); -} - -PartitionListComposingSpec::PartitionListComposingSpec(const PartitionListComposingSpec& other273) { - partitions = other273.partitions; - __isset = other273.__isset; -} -PartitionListComposingSpec& PartitionListComposingSpec::operator=(const PartitionListComposingSpec& other274) { - partitions = other274.partitions; - __isset = other274.__isset; - return *this; -} -void PartitionListComposingSpec::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PartitionListComposingSpec("; - out << "partitions=" << to_string(partitions); - out << ")"; -} - - -PartitionSpec::~PartitionSpec() throw() { -} - - -void PartitionSpec::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void PartitionSpec::__set_tableName(const std::string& val) { - this->tableName = val; -} - -void PartitionSpec::__set_rootPath(const std::string& val) { - this->rootPath = val; -} - -void PartitionSpec::__set_sharedSDPartitionSpec(const PartitionSpecWithSharedSD& val) { - this->sharedSDPartitionSpec = val; -__isset.sharedSDPartitionSpec = true; -} - -void PartitionSpec::__set_partitionList(const PartitionListComposingSpec& val) { - this->partitionList = val; -__isset.partitionList = true; -} - -uint32_t PartitionSpec::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableName); - this->__isset.tableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->rootPath); - this->__isset.rootPath = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->sharedSDPartitionSpec.read(iprot); - this->__isset.sharedSDPartitionSpec = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->partitionList.read(iprot); - this->__isset.partitionList = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t PartitionSpec::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("PartitionSpec"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tableName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("rootPath", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->rootPath); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.sharedSDPartitionSpec) { - xfer += oprot->writeFieldBegin("sharedSDPartitionSpec", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->sharedSDPartitionSpec.write(oprot); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.partitionList) { - xfer += oprot->writeFieldBegin("partitionList", ::apache::thrift::protocol::T_STRUCT, 5); - xfer += this->partitionList.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(PartitionSpec &a, PartitionSpec &b) { - using ::std::swap; - swap(a.dbName, b.dbName); - swap(a.tableName, b.tableName); - swap(a.rootPath, b.rootPath); - swap(a.sharedSDPartitionSpec, b.sharedSDPartitionSpec); - swap(a.partitionList, b.partitionList); - swap(a.__isset, b.__isset); -} - -PartitionSpec::PartitionSpec(const PartitionSpec& other275) { - dbName = other275.dbName; - tableName = other275.tableName; - rootPath = other275.rootPath; - sharedSDPartitionSpec = other275.sharedSDPartitionSpec; - partitionList = other275.partitionList; - __isset = other275.__isset; -} -PartitionSpec& PartitionSpec::operator=(const PartitionSpec& other276) { - dbName = other276.dbName; - tableName = other276.tableName; - rootPath = other276.rootPath; - sharedSDPartitionSpec = other276.sharedSDPartitionSpec; - partitionList = other276.partitionList; - __isset = other276.__isset; - return *this; -} -void PartitionSpec::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PartitionSpec("; - out << "dbName=" << to_string(dbName); - out << ", " << "tableName=" << to_string(tableName); - out << ", " << "rootPath=" << to_string(rootPath); - out << ", " << "sharedSDPartitionSpec="; (__isset.sharedSDPartitionSpec ? (out << to_string(sharedSDPartitionSpec)) : (out << "")); - out << ", " << "partitionList="; (__isset.partitionList ? (out << to_string(partitionList)) : (out << "")); - out << ")"; -} - - -Index::~Index() throw() { -} - - -void Index::__set_indexName(const std::string& val) { - this->indexName = val; -} - -void Index::__set_indexHandlerClass(const std::string& val) { - this->indexHandlerClass = val; -} - -void Index::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void Index::__set_origTableName(const std::string& val) { - this->origTableName = val; -} - -void Index::__set_createTime(const int32_t val) { - this->createTime = val; -} - -void Index::__set_lastAccessTime(const int32_t val) { - this->lastAccessTime = val; -} - -void Index::__set_indexTableName(const std::string& val) { - this->indexTableName = val; -} - -void Index::__set_sd(const StorageDescriptor& val) { - this->sd = val; -} - -void Index::__set_parameters(const std::map & val) { - this->parameters = val; -} - -void Index::__set_deferredRebuild(const bool val) { - this->deferredRebuild = val; -} - -uint32_t Index::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->indexName); - this->__isset.indexName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->indexHandlerClass); - this->__isset.indexHandlerClass = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->origTableName); - this->__isset.origTableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->createTime); - this->__isset.createTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->lastAccessTime); - this->__isset.lastAccessTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->indexTableName); - this->__isset.indexTableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->sd.read(iprot); - this->__isset.sd = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->parameters.clear(); - uint32_t _size277; - ::apache::thrift::protocol::TType _ktype278; - ::apache::thrift::protocol::TType _vtype279; - xfer += iprot->readMapBegin(_ktype278, _vtype279, _size277); - uint32_t _i281; - for (_i281 = 0; _i281 < _size277; ++_i281) - { - std::string _key282; - xfer += iprot->readString(_key282); - std::string& _val283 = this->parameters[_key282]; - xfer += iprot->readString(_val283); - } - xfer += iprot->readMapEnd(); - } - this->__isset.parameters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deferredRebuild); - this->__isset.deferredRebuild = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t Index::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::map ::const_iterator _iter284; - for (_iter284 = this->parameters.begin(); _iter284 != this->parameters.end(); ++_iter284) - { - xfer += oprot->writeString(_iter284->first); - xfer += oprot->writeString(_iter284->second); - } - 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); -} - -Index::Index(const Index& other285) { - indexName = other285.indexName; - indexHandlerClass = other285.indexHandlerClass; - dbName = other285.dbName; - origTableName = other285.origTableName; - createTime = other285.createTime; - lastAccessTime = other285.lastAccessTime; - indexTableName = other285.indexTableName; - sd = other285.sd; - parameters = other285.parameters; - deferredRebuild = other285.deferredRebuild; - __isset = other285.__isset; -} -Index& Index::operator=(const Index& other286) { - indexName = other286.indexName; - indexHandlerClass = other286.indexHandlerClass; - dbName = other286.dbName; - origTableName = other286.origTableName; - createTime = other286.createTime; - lastAccessTime = other286.lastAccessTime; - indexTableName = other286.indexTableName; - sd = other286.sd; - parameters = other286.parameters; - deferredRebuild = other286.deferredRebuild; - __isset = other286.__isset; - return *this; -} -void Index::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "Index("; - out << "indexName=" << to_string(indexName); - out << ", " << "indexHandlerClass=" << to_string(indexHandlerClass); - out << ", " << "dbName=" << to_string(dbName); - out << ", " << "origTableName=" << to_string(origTableName); - out << ", " << "createTime=" << to_string(createTime); - out << ", " << "lastAccessTime=" << to_string(lastAccessTime); - out << ", " << "indexTableName=" << to_string(indexTableName); - out << ", " << "sd=" << to_string(sd); - out << ", " << "parameters=" << to_string(parameters); - out << ", " << "deferredRebuild=" << to_string(deferredRebuild); - out << ")"; -} - - -BooleanColumnStatsData::~BooleanColumnStatsData() throw() { -} - - -void BooleanColumnStatsData::__set_numTrues(const int64_t val) { - this->numTrues = val; -} - -void BooleanColumnStatsData::__set_numFalses(const int64_t val) { - this->numFalses = val; -} - -void BooleanColumnStatsData::__set_numNulls(const int64_t val) { - this->numNulls = val; -} - -void BooleanColumnStatsData::__set_bitVectors(const std::string& val) { - this->bitVectors = val; -__isset.bitVectors = true; -} - -uint32_t BooleanColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_numTrues = false; - bool isset_numFalses = false; - bool isset_numNulls = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numTrues); - isset_numTrues = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numFalses); - isset_numFalses = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numNulls); - isset_numNulls = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->bitVectors); - this->__isset.bitVectors = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_numTrues) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_numFalses) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_numNulls) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t BooleanColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("BooleanColumnStatsData"); - - xfer += oprot->writeFieldBegin("numTrues", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->numTrues); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("numFalses", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->numFalses); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->numNulls); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.bitVectors) { - xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->bitVectors); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(BooleanColumnStatsData &a, BooleanColumnStatsData &b) { - using ::std::swap; - swap(a.numTrues, b.numTrues); - swap(a.numFalses, b.numFalses); - swap(a.numNulls, b.numNulls); - swap(a.bitVectors, b.bitVectors); - swap(a.__isset, b.__isset); -} - -BooleanColumnStatsData::BooleanColumnStatsData(const BooleanColumnStatsData& other287) { - numTrues = other287.numTrues; - numFalses = other287.numFalses; - numNulls = other287.numNulls; - bitVectors = other287.bitVectors; - __isset = other287.__isset; -} -BooleanColumnStatsData& BooleanColumnStatsData::operator=(const BooleanColumnStatsData& other288) { - numTrues = other288.numTrues; - numFalses = other288.numFalses; - numNulls = other288.numNulls; - bitVectors = other288.bitVectors; - __isset = other288.__isset; - return *this; -} -void BooleanColumnStatsData::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "BooleanColumnStatsData("; - out << "numTrues=" << to_string(numTrues); - out << ", " << "numFalses=" << to_string(numFalses); - out << ", " << "numNulls=" << to_string(numNulls); - out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); - out << ")"; -} - - -DoubleColumnStatsData::~DoubleColumnStatsData() throw() { -} - - -void DoubleColumnStatsData::__set_lowValue(const double val) { - this->lowValue = val; -__isset.lowValue = true; -} - -void DoubleColumnStatsData::__set_highValue(const double val) { - this->highValue = val; -__isset.highValue = true; -} - -void DoubleColumnStatsData::__set_numNulls(const int64_t val) { - this->numNulls = val; -} - -void DoubleColumnStatsData::__set_numDVs(const int64_t val) { - this->numDVs = val; -} - -void DoubleColumnStatsData::__set_bitVectors(const std::string& val) { - this->bitVectors = val; -__isset.bitVectors = true; -} - -uint32_t DoubleColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_numNulls = false; - bool isset_numDVs = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_DOUBLE) { - xfer += iprot->readDouble(this->lowValue); - this->__isset.lowValue = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_DOUBLE) { - xfer += iprot->readDouble(this->highValue); - this->__isset.highValue = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numNulls); - isset_numNulls = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numDVs); - isset_numDVs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->bitVectors); - this->__isset.bitVectors = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_numNulls) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_numDVs) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t DoubleColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("DoubleColumnStatsData"); - - if (this->__isset.lowValue) { - xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_DOUBLE, 1); - xfer += oprot->writeDouble(this->lowValue); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.highValue) { - xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_DOUBLE, 2); - xfer += oprot->writeDouble(this->highValue); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->numNulls); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->numDVs); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.bitVectors) { - xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->bitVectors); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(DoubleColumnStatsData &a, DoubleColumnStatsData &b) { - using ::std::swap; - swap(a.lowValue, b.lowValue); - swap(a.highValue, b.highValue); - swap(a.numNulls, b.numNulls); - swap(a.numDVs, b.numDVs); - swap(a.bitVectors, b.bitVectors); - swap(a.__isset, b.__isset); -} - -DoubleColumnStatsData::DoubleColumnStatsData(const DoubleColumnStatsData& other289) { - lowValue = other289.lowValue; - highValue = other289.highValue; - numNulls = other289.numNulls; - numDVs = other289.numDVs; - bitVectors = other289.bitVectors; - __isset = other289.__isset; -} -DoubleColumnStatsData& DoubleColumnStatsData::operator=(const DoubleColumnStatsData& other290) { - lowValue = other290.lowValue; - highValue = other290.highValue; - numNulls = other290.numNulls; - numDVs = other290.numDVs; - bitVectors = other290.bitVectors; - __isset = other290.__isset; - return *this; -} -void DoubleColumnStatsData::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "DoubleColumnStatsData("; - out << "lowValue="; (__isset.lowValue ? (out << to_string(lowValue)) : (out << "")); - out << ", " << "highValue="; (__isset.highValue ? (out << to_string(highValue)) : (out << "")); - out << ", " << "numNulls=" << to_string(numNulls); - out << ", " << "numDVs=" << to_string(numDVs); - out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); - out << ")"; -} - - -LongColumnStatsData::~LongColumnStatsData() throw() { -} - - -void LongColumnStatsData::__set_lowValue(const int64_t val) { - this->lowValue = val; -__isset.lowValue = true; -} - -void LongColumnStatsData::__set_highValue(const int64_t val) { - this->highValue = val; -__isset.highValue = true; -} - -void LongColumnStatsData::__set_numNulls(const int64_t val) { - this->numNulls = val; -} - -void LongColumnStatsData::__set_numDVs(const int64_t val) { - this->numDVs = val; -} - -void LongColumnStatsData::__set_bitVectors(const std::string& val) { - this->bitVectors = val; -__isset.bitVectors = true; -} - -uint32_t LongColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_numNulls = false; - bool isset_numDVs = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->lowValue); - this->__isset.lowValue = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->highValue); - this->__isset.highValue = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numNulls); - isset_numNulls = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numDVs); - isset_numDVs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->bitVectors); - this->__isset.bitVectors = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_numNulls) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_numDVs) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t LongColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("LongColumnStatsData"); - - if (this->__isset.lowValue) { - xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->lowValue); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.highValue) { - xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->highValue); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->numNulls); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->numDVs); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.bitVectors) { - xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->bitVectors); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(LongColumnStatsData &a, LongColumnStatsData &b) { - using ::std::swap; - swap(a.lowValue, b.lowValue); - swap(a.highValue, b.highValue); - swap(a.numNulls, b.numNulls); - swap(a.numDVs, b.numDVs); - swap(a.bitVectors, b.bitVectors); - swap(a.__isset, b.__isset); -} - -LongColumnStatsData::LongColumnStatsData(const LongColumnStatsData& other291) { - lowValue = other291.lowValue; - highValue = other291.highValue; - numNulls = other291.numNulls; - numDVs = other291.numDVs; - bitVectors = other291.bitVectors; - __isset = other291.__isset; -} -LongColumnStatsData& LongColumnStatsData::operator=(const LongColumnStatsData& other292) { - lowValue = other292.lowValue; - highValue = other292.highValue; - numNulls = other292.numNulls; - numDVs = other292.numDVs; - bitVectors = other292.bitVectors; - __isset = other292.__isset; - return *this; -} -void LongColumnStatsData::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "LongColumnStatsData("; - out << "lowValue="; (__isset.lowValue ? (out << to_string(lowValue)) : (out << "")); - out << ", " << "highValue="; (__isset.highValue ? (out << to_string(highValue)) : (out << "")); - out << ", " << "numNulls=" << to_string(numNulls); - out << ", " << "numDVs=" << to_string(numDVs); - out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); - out << ")"; -} - - -StringColumnStatsData::~StringColumnStatsData() throw() { -} - - -void StringColumnStatsData::__set_maxColLen(const int64_t val) { - this->maxColLen = val; -} - -void StringColumnStatsData::__set_avgColLen(const double val) { - this->avgColLen = val; -} - -void StringColumnStatsData::__set_numNulls(const int64_t val) { - this->numNulls = val; -} - -void StringColumnStatsData::__set_numDVs(const int64_t val) { - this->numDVs = val; -} - -void StringColumnStatsData::__set_bitVectors(const std::string& val) { - this->bitVectors = val; -__isset.bitVectors = true; -} - -uint32_t StringColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_maxColLen = false; - bool isset_avgColLen = false; - bool isset_numNulls = false; - bool isset_numDVs = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->maxColLen); - isset_maxColLen = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_DOUBLE) { - xfer += iprot->readDouble(this->avgColLen); - isset_avgColLen = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numNulls); - isset_numNulls = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numDVs); - isset_numDVs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->bitVectors); - this->__isset.bitVectors = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_maxColLen) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_avgColLen) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_numNulls) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_numDVs) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t StringColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("StringColumnStatsData"); - - xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->maxColLen); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 2); - xfer += oprot->writeDouble(this->avgColLen); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->numNulls); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->numDVs); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.bitVectors) { - xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->bitVectors); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(StringColumnStatsData &a, StringColumnStatsData &b) { - using ::std::swap; - swap(a.maxColLen, b.maxColLen); - swap(a.avgColLen, b.avgColLen); - swap(a.numNulls, b.numNulls); - swap(a.numDVs, b.numDVs); - swap(a.bitVectors, b.bitVectors); - swap(a.__isset, b.__isset); -} - -StringColumnStatsData::StringColumnStatsData(const StringColumnStatsData& other293) { - maxColLen = other293.maxColLen; - avgColLen = other293.avgColLen; - numNulls = other293.numNulls; - numDVs = other293.numDVs; - bitVectors = other293.bitVectors; - __isset = other293.__isset; -} -StringColumnStatsData& StringColumnStatsData::operator=(const StringColumnStatsData& other294) { - maxColLen = other294.maxColLen; - avgColLen = other294.avgColLen; - numNulls = other294.numNulls; - numDVs = other294.numDVs; - bitVectors = other294.bitVectors; - __isset = other294.__isset; - return *this; -} -void StringColumnStatsData::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "StringColumnStatsData("; - out << "maxColLen=" << to_string(maxColLen); - out << ", " << "avgColLen=" << to_string(avgColLen); - out << ", " << "numNulls=" << to_string(numNulls); - out << ", " << "numDVs=" << to_string(numDVs); - out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); - out << ")"; -} - - -BinaryColumnStatsData::~BinaryColumnStatsData() throw() { -} - - -void BinaryColumnStatsData::__set_maxColLen(const int64_t val) { - this->maxColLen = val; -} - -void BinaryColumnStatsData::__set_avgColLen(const double val) { - this->avgColLen = val; -} - -void BinaryColumnStatsData::__set_numNulls(const int64_t val) { - this->numNulls = val; -} - -void BinaryColumnStatsData::__set_bitVectors(const std::string& val) { - this->bitVectors = val; -__isset.bitVectors = true; -} - -uint32_t BinaryColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_maxColLen = false; - bool isset_avgColLen = false; - bool isset_numNulls = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->maxColLen); - isset_maxColLen = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_DOUBLE) { - xfer += iprot->readDouble(this->avgColLen); - isset_avgColLen = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numNulls); - isset_numNulls = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->bitVectors); - this->__isset.bitVectors = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_maxColLen) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_avgColLen) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_numNulls) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t BinaryColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("BinaryColumnStatsData"); - - xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->maxColLen); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 2); - xfer += oprot->writeDouble(this->avgColLen); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->numNulls); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.bitVectors) { - xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->bitVectors); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(BinaryColumnStatsData &a, BinaryColumnStatsData &b) { - using ::std::swap; - swap(a.maxColLen, b.maxColLen); - swap(a.avgColLen, b.avgColLen); - swap(a.numNulls, b.numNulls); - swap(a.bitVectors, b.bitVectors); - swap(a.__isset, b.__isset); -} - -BinaryColumnStatsData::BinaryColumnStatsData(const BinaryColumnStatsData& other295) { - maxColLen = other295.maxColLen; - avgColLen = other295.avgColLen; - numNulls = other295.numNulls; - bitVectors = other295.bitVectors; - __isset = other295.__isset; -} -BinaryColumnStatsData& BinaryColumnStatsData::operator=(const BinaryColumnStatsData& other296) { - maxColLen = other296.maxColLen; - avgColLen = other296.avgColLen; - numNulls = other296.numNulls; - bitVectors = other296.bitVectors; - __isset = other296.__isset; - return *this; -} -void BinaryColumnStatsData::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "BinaryColumnStatsData("; - out << "maxColLen=" << to_string(maxColLen); - out << ", " << "avgColLen=" << to_string(avgColLen); - out << ", " << "numNulls=" << to_string(numNulls); - out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); - out << ")"; -} - - -Decimal::~Decimal() throw() { -} - - -void Decimal::__set_unscaled(const std::string& val) { - this->unscaled = val; -} - -void Decimal::__set_scale(const int16_t val) { - this->scale = val; -} - -uint32_t Decimal::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_unscaled = false; - bool isset_scale = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readBinary(this->unscaled); - isset_unscaled = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->scale); - isset_scale = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_unscaled) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_scale) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t Decimal::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("Decimal"); - - xfer += oprot->writeFieldBegin("unscaled", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeBinary(this->unscaled); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("scale", ::apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16(this->scale); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(Decimal &a, Decimal &b) { - using ::std::swap; - swap(a.unscaled, b.unscaled); - swap(a.scale, b.scale); -} - -Decimal::Decimal(const Decimal& other297) { - unscaled = other297.unscaled; - scale = other297.scale; -} -Decimal& Decimal::operator=(const Decimal& other298) { - unscaled = other298.unscaled; - scale = other298.scale; - return *this; -} -void Decimal::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "Decimal("; - out << "unscaled=" << to_string(unscaled); - out << ", " << "scale=" << to_string(scale); - out << ")"; -} - - -DecimalColumnStatsData::~DecimalColumnStatsData() throw() { -} - - -void DecimalColumnStatsData::__set_lowValue(const Decimal& val) { - this->lowValue = val; -__isset.lowValue = true; -} - -void DecimalColumnStatsData::__set_highValue(const Decimal& val) { - this->highValue = val; -__isset.highValue = true; -} - -void DecimalColumnStatsData::__set_numNulls(const int64_t val) { - this->numNulls = val; -} - -void DecimalColumnStatsData::__set_numDVs(const int64_t val) { - this->numDVs = val; -} - -void DecimalColumnStatsData::__set_bitVectors(const std::string& val) { - this->bitVectors = val; -__isset.bitVectors = true; -} - -uint32_t DecimalColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_numNulls = false; - bool isset_numDVs = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->lowValue.read(iprot); - this->__isset.lowValue = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->highValue.read(iprot); - this->__isset.highValue = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numNulls); - isset_numNulls = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numDVs); - isset_numDVs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->bitVectors); - this->__isset.bitVectors = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_numNulls) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_numDVs) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t DecimalColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("DecimalColumnStatsData"); - - if (this->__isset.lowValue) { - xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->lowValue.write(oprot); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.highValue) { - xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->highValue.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->numNulls); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->numDVs); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.bitVectors) { - xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->bitVectors); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(DecimalColumnStatsData &a, DecimalColumnStatsData &b) { - using ::std::swap; - swap(a.lowValue, b.lowValue); - swap(a.highValue, b.highValue); - swap(a.numNulls, b.numNulls); - swap(a.numDVs, b.numDVs); - swap(a.bitVectors, b.bitVectors); - swap(a.__isset, b.__isset); -} - -DecimalColumnStatsData::DecimalColumnStatsData(const DecimalColumnStatsData& other299) { - lowValue = other299.lowValue; - highValue = other299.highValue; - numNulls = other299.numNulls; - numDVs = other299.numDVs; - bitVectors = other299.bitVectors; - __isset = other299.__isset; -} -DecimalColumnStatsData& DecimalColumnStatsData::operator=(const DecimalColumnStatsData& other300) { - lowValue = other300.lowValue; - highValue = other300.highValue; - numNulls = other300.numNulls; - numDVs = other300.numDVs; - bitVectors = other300.bitVectors; - __isset = other300.__isset; - return *this; -} -void DecimalColumnStatsData::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "DecimalColumnStatsData("; - out << "lowValue="; (__isset.lowValue ? (out << to_string(lowValue)) : (out << "")); - out << ", " << "highValue="; (__isset.highValue ? (out << to_string(highValue)) : (out << "")); - out << ", " << "numNulls=" << to_string(numNulls); - out << ", " << "numDVs=" << to_string(numDVs); - out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); - out << ")"; -} - - -Date::~Date() throw() { -} - - -void Date::__set_daysSinceEpoch(const int64_t val) { - this->daysSinceEpoch = val; -} - -uint32_t Date::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_daysSinceEpoch = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->daysSinceEpoch); - isset_daysSinceEpoch = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_daysSinceEpoch) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t Date::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("Date"); - - xfer += oprot->writeFieldBegin("daysSinceEpoch", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->daysSinceEpoch); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(Date &a, Date &b) { - using ::std::swap; - swap(a.daysSinceEpoch, b.daysSinceEpoch); -} - -Date::Date(const Date& other301) { - daysSinceEpoch = other301.daysSinceEpoch; -} -Date& Date::operator=(const Date& other302) { - daysSinceEpoch = other302.daysSinceEpoch; - return *this; -} -void Date::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "Date("; - out << "daysSinceEpoch=" << to_string(daysSinceEpoch); - out << ")"; -} - - -DateColumnStatsData::~DateColumnStatsData() throw() { -} - - -void DateColumnStatsData::__set_lowValue(const Date& val) { - this->lowValue = val; -__isset.lowValue = true; -} - -void DateColumnStatsData::__set_highValue(const Date& val) { - this->highValue = val; -__isset.highValue = true; -} - -void DateColumnStatsData::__set_numNulls(const int64_t val) { - this->numNulls = val; -} - -void DateColumnStatsData::__set_numDVs(const int64_t val) { - this->numDVs = val; -} - -void DateColumnStatsData::__set_bitVectors(const std::string& val) { - this->bitVectors = val; -__isset.bitVectors = true; -} - -uint32_t DateColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_numNulls = false; - bool isset_numDVs = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->lowValue.read(iprot); - this->__isset.lowValue = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->highValue.read(iprot); - this->__isset.highValue = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numNulls); - isset_numNulls = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->numDVs); - isset_numDVs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->bitVectors); - this->__isset.bitVectors = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_numNulls) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_numDVs) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t DateColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("DateColumnStatsData"); - - if (this->__isset.lowValue) { - xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->lowValue.write(oprot); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.highValue) { - xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->highValue.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->numNulls); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); - xfer += oprot->writeI64(this->numDVs); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.bitVectors) { - xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->bitVectors); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(DateColumnStatsData &a, DateColumnStatsData &b) { - using ::std::swap; - swap(a.lowValue, b.lowValue); - swap(a.highValue, b.highValue); - swap(a.numNulls, b.numNulls); - swap(a.numDVs, b.numDVs); - swap(a.bitVectors, b.bitVectors); - swap(a.__isset, b.__isset); -} - -DateColumnStatsData::DateColumnStatsData(const DateColumnStatsData& other303) { - lowValue = other303.lowValue; - highValue = other303.highValue; - numNulls = other303.numNulls; - numDVs = other303.numDVs; - bitVectors = other303.bitVectors; - __isset = other303.__isset; -} -DateColumnStatsData& DateColumnStatsData::operator=(const DateColumnStatsData& other304) { - lowValue = other304.lowValue; - highValue = other304.highValue; - numNulls = other304.numNulls; - numDVs = other304.numDVs; - bitVectors = other304.bitVectors; - __isset = other304.__isset; - return *this; -} -void DateColumnStatsData::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "DateColumnStatsData("; - out << "lowValue="; (__isset.lowValue ? (out << to_string(lowValue)) : (out << "")); - out << ", " << "highValue="; (__isset.highValue ? (out << to_string(highValue)) : (out << "")); - out << ", " << "numNulls=" << to_string(numNulls); - out << ", " << "numDVs=" << to_string(numDVs); - out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); - out << ")"; -} - - -ColumnStatisticsData::~ColumnStatisticsData() throw() { -} - - -void ColumnStatisticsData::__set_booleanStats(const BooleanColumnStatsData& val) { - this->booleanStats = val; -} - -void ColumnStatisticsData::__set_longStats(const LongColumnStatsData& val) { - this->longStats = val; -} - -void ColumnStatisticsData::__set_doubleStats(const DoubleColumnStatsData& val) { - this->doubleStats = val; -} - -void ColumnStatisticsData::__set_stringStats(const StringColumnStatsData& val) { - this->stringStats = val; -} - -void ColumnStatisticsData::__set_binaryStats(const BinaryColumnStatsData& val) { - this->binaryStats = val; -} - -void ColumnStatisticsData::__set_decimalStats(const DecimalColumnStatsData& val) { - this->decimalStats = val; -} - -void ColumnStatisticsData::__set_dateStats(const DateColumnStatsData& val) { - this->dateStats = val; -} - -uint32_t ColumnStatisticsData::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->booleanStats.read(iprot); - this->__isset.booleanStats = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->longStats.read(iprot); - this->__isset.longStats = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->doubleStats.read(iprot); - this->__isset.doubleStats = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->stringStats.read(iprot); - this->__isset.stringStats = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->binaryStats.read(iprot); - this->__isset.binaryStats = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->decimalStats.read(iprot); - this->__isset.decimalStats = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->dateStats.read(iprot); - this->__isset.dateStats = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ColumnStatisticsData::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ColumnStatisticsData"); - - xfer += oprot->writeFieldBegin("booleanStats", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->booleanStats.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("longStats", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->longStats.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("doubleStats", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->doubleStats.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("stringStats", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->stringStats.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("binaryStats", ::apache::thrift::protocol::T_STRUCT, 5); - xfer += this->binaryStats.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("decimalStats", ::apache::thrift::protocol::T_STRUCT, 6); - xfer += this->decimalStats.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("dateStats", ::apache::thrift::protocol::T_STRUCT, 7); - xfer += this->dateStats.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ColumnStatisticsData &a, ColumnStatisticsData &b) { - using ::std::swap; - swap(a.booleanStats, b.booleanStats); - swap(a.longStats, b.longStats); - swap(a.doubleStats, b.doubleStats); - swap(a.stringStats, b.stringStats); - swap(a.binaryStats, b.binaryStats); - swap(a.decimalStats, b.decimalStats); - swap(a.dateStats, b.dateStats); - swap(a.__isset, b.__isset); -} - -ColumnStatisticsData::ColumnStatisticsData(const ColumnStatisticsData& other305) { - booleanStats = other305.booleanStats; - longStats = other305.longStats; - doubleStats = other305.doubleStats; - stringStats = other305.stringStats; - binaryStats = other305.binaryStats; - decimalStats = other305.decimalStats; - dateStats = other305.dateStats; - __isset = other305.__isset; -} -ColumnStatisticsData& ColumnStatisticsData::operator=(const ColumnStatisticsData& other306) { - booleanStats = other306.booleanStats; - longStats = other306.longStats; - doubleStats = other306.doubleStats; - stringStats = other306.stringStats; - binaryStats = other306.binaryStats; - decimalStats = other306.decimalStats; - dateStats = other306.dateStats; - __isset = other306.__isset; - return *this; -} -void ColumnStatisticsData::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ColumnStatisticsData("; - out << "booleanStats=" << to_string(booleanStats); - out << ", " << "longStats=" << to_string(longStats); - out << ", " << "doubleStats=" << to_string(doubleStats); - out << ", " << "stringStats=" << to_string(stringStats); - out << ", " << "binaryStats=" << to_string(binaryStats); - out << ", " << "decimalStats=" << to_string(decimalStats); - out << ", " << "dateStats=" << to_string(dateStats); - out << ")"; -} - - -ColumnStatisticsObj::~ColumnStatisticsObj() throw() { -} - - -void ColumnStatisticsObj::__set_colName(const std::string& val) { - this->colName = val; -} - -void ColumnStatisticsObj::__set_colType(const std::string& val) { - this->colType = val; -} - -void ColumnStatisticsObj::__set_statsData(const ColumnStatisticsData& val) { - this->statsData = val; -} - -uint32_t ColumnStatisticsObj::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_colName = false; - bool isset_colType = false; - bool isset_statsData = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->colName); - isset_colName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->colType); - isset_colType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->statsData.read(iprot); - isset_statsData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_colName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_colType) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_statsData) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t ColumnStatisticsObj::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ColumnStatisticsObj"); - - xfer += oprot->writeFieldBegin("colName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->colName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("colType", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->colType); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("statsData", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->statsData.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ColumnStatisticsObj &a, ColumnStatisticsObj &b) { - using ::std::swap; - swap(a.colName, b.colName); - swap(a.colType, b.colType); - swap(a.statsData, b.statsData); -} - -ColumnStatisticsObj::ColumnStatisticsObj(const ColumnStatisticsObj& other307) { - colName = other307.colName; - colType = other307.colType; - statsData = other307.statsData; -} -ColumnStatisticsObj& ColumnStatisticsObj::operator=(const ColumnStatisticsObj& other308) { - colName = other308.colName; - colType = other308.colType; - statsData = other308.statsData; - return *this; -} -void ColumnStatisticsObj::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ColumnStatisticsObj("; - out << "colName=" << to_string(colName); - out << ", " << "colType=" << to_string(colType); - out << ", " << "statsData=" << to_string(statsData); - out << ")"; -} - - -ColumnStatisticsDesc::~ColumnStatisticsDesc() throw() { -} - - -void ColumnStatisticsDesc::__set_isTblLevel(const bool val) { - this->isTblLevel = val; -} - -void ColumnStatisticsDesc::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void ColumnStatisticsDesc::__set_tableName(const std::string& val) { - this->tableName = val; -} - -void ColumnStatisticsDesc::__set_partName(const std::string& val) { - this->partName = val; -__isset.partName = true; -} - -void ColumnStatisticsDesc::__set_lastAnalyzed(const int64_t val) { - this->lastAnalyzed = val; -__isset.lastAnalyzed = true; -} - -uint32_t ColumnStatisticsDesc::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_isTblLevel = false; - bool isset_dbName = false; - bool isset_tableName = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->isTblLevel); - isset_isTblLevel = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - isset_dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableName); - isset_tableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->partName); - this->__isset.partName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->lastAnalyzed); - this->__isset.lastAnalyzed = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_isTblLevel) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_dbName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tableName) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t ColumnStatisticsDesc::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ColumnStatisticsDesc"); - - xfer += oprot->writeFieldBegin("isTblLevel", ::apache::thrift::protocol::T_BOOL, 1); - xfer += oprot->writeBool(this->isTblLevel); - 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(); - - if (this->__isset.partName) { - xfer += oprot->writeFieldBegin("partName", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->partName); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.lastAnalyzed) { - xfer += oprot->writeFieldBegin("lastAnalyzed", ::apache::thrift::protocol::T_I64, 5); - xfer += oprot->writeI64(this->lastAnalyzed); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ColumnStatisticsDesc &a, ColumnStatisticsDesc &b) { - using ::std::swap; - swap(a.isTblLevel, b.isTblLevel); - swap(a.dbName, b.dbName); - swap(a.tableName, b.tableName); - swap(a.partName, b.partName); - swap(a.lastAnalyzed, b.lastAnalyzed); - swap(a.__isset, b.__isset); -} - -ColumnStatisticsDesc::ColumnStatisticsDesc(const ColumnStatisticsDesc& other309) { - isTblLevel = other309.isTblLevel; - dbName = other309.dbName; - tableName = other309.tableName; - partName = other309.partName; - lastAnalyzed = other309.lastAnalyzed; - __isset = other309.__isset; -} -ColumnStatisticsDesc& ColumnStatisticsDesc::operator=(const ColumnStatisticsDesc& other310) { - isTblLevel = other310.isTblLevel; - dbName = other310.dbName; - tableName = other310.tableName; - partName = other310.partName; - lastAnalyzed = other310.lastAnalyzed; - __isset = other310.__isset; - return *this; -} -void ColumnStatisticsDesc::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ColumnStatisticsDesc("; - out << "isTblLevel=" << to_string(isTblLevel); - out << ", " << "dbName=" << to_string(dbName); - out << ", " << "tableName=" << to_string(tableName); - out << ", " << "partName="; (__isset.partName ? (out << to_string(partName)) : (out << "")); - out << ", " << "lastAnalyzed="; (__isset.lastAnalyzed ? (out << to_string(lastAnalyzed)) : (out << "")); - out << ")"; -} - - -ColumnStatistics::~ColumnStatistics() throw() { -} - - -void ColumnStatistics::__set_statsDesc(const ColumnStatisticsDesc& val) { - this->statsDesc = val; -} - -void ColumnStatistics::__set_statsObj(const std::vector & val) { - this->statsObj = val; -} - -uint32_t ColumnStatistics::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_statsDesc = false; - bool isset_statsObj = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->statsDesc.read(iprot); - isset_statsDesc = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->statsObj.clear(); - uint32_t _size311; - ::apache::thrift::protocol::TType _etype314; - xfer += iprot->readListBegin(_etype314, _size311); - this->statsObj.resize(_size311); - uint32_t _i315; - for (_i315 = 0; _i315 < _size311; ++_i315) - { - xfer += this->statsObj[_i315].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_statsObj = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_statsDesc) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_statsObj) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t ColumnStatistics::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ColumnStatistics"); - - xfer += oprot->writeFieldBegin("statsDesc", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->statsDesc.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("statsObj", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->statsObj.size())); - std::vector ::const_iterator _iter316; - for (_iter316 = this->statsObj.begin(); _iter316 != this->statsObj.end(); ++_iter316) - { - xfer += (*_iter316).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ColumnStatistics &a, ColumnStatistics &b) { - using ::std::swap; - swap(a.statsDesc, b.statsDesc); - swap(a.statsObj, b.statsObj); -} - -ColumnStatistics::ColumnStatistics(const ColumnStatistics& other317) { - statsDesc = other317.statsDesc; - statsObj = other317.statsObj; -} -ColumnStatistics& ColumnStatistics::operator=(const ColumnStatistics& other318) { - statsDesc = other318.statsDesc; - statsObj = other318.statsObj; - return *this; -} -void ColumnStatistics::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ColumnStatistics("; - out << "statsDesc=" << to_string(statsDesc); - out << ", " << "statsObj=" << to_string(statsObj); - out << ")"; -} - - -AggrStats::~AggrStats() throw() { -} - - -void AggrStats::__set_colStats(const std::vector & val) { - this->colStats = val; -} - -void AggrStats::__set_partsFound(const int64_t val) { - this->partsFound = val; -} - -uint32_t AggrStats::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_colStats = false; - bool isset_partsFound = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->colStats.clear(); - uint32_t _size319; - ::apache::thrift::protocol::TType _etype322; - xfer += iprot->readListBegin(_etype322, _size319); - this->colStats.resize(_size319); - uint32_t _i323; - for (_i323 = 0; _i323 < _size319; ++_i323) - { - xfer += this->colStats[_i323].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_colStats = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->partsFound); - isset_partsFound = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_colStats) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_partsFound) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t AggrStats::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("AggrStats"); - - xfer += oprot->writeFieldBegin("colStats", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->colStats.size())); - std::vector ::const_iterator _iter324; - for (_iter324 = this->colStats.begin(); _iter324 != this->colStats.end(); ++_iter324) - { - xfer += (*_iter324).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("partsFound", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->partsFound); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(AggrStats &a, AggrStats &b) { - using ::std::swap; - swap(a.colStats, b.colStats); - swap(a.partsFound, b.partsFound); -} - -AggrStats::AggrStats(const AggrStats& other325) { - colStats = other325.colStats; - partsFound = other325.partsFound; -} -AggrStats& AggrStats::operator=(const AggrStats& other326) { - colStats = other326.colStats; - partsFound = other326.partsFound; - return *this; -} -void AggrStats::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "AggrStats("; - out << "colStats=" << to_string(colStats); - out << ", " << "partsFound=" << to_string(partsFound); - out << ")"; -} - - -SetPartitionsStatsRequest::~SetPartitionsStatsRequest() throw() { -} - - -void SetPartitionsStatsRequest::__set_colStats(const std::vector & val) { - this->colStats = val; -} - -void SetPartitionsStatsRequest::__set_needMerge(const bool val) { - this->needMerge = val; -__isset.needMerge = true; -} - -uint32_t SetPartitionsStatsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_colStats = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->colStats.clear(); - uint32_t _size327; - ::apache::thrift::protocol::TType _etype330; - xfer += iprot->readListBegin(_etype330, _size327); - this->colStats.resize(_size327); - uint32_t _i331; - for (_i331 = 0; _i331 < _size327; ++_i331) - { - xfer += this->colStats[_i331].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_colStats = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->needMerge); - this->__isset.needMerge = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_colStats) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t SetPartitionsStatsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("SetPartitionsStatsRequest"); - - xfer += oprot->writeFieldBegin("colStats", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->colStats.size())); - std::vector ::const_iterator _iter332; - for (_iter332 = this->colStats.begin(); _iter332 != this->colStats.end(); ++_iter332) - { - xfer += (*_iter332).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.needMerge) { - xfer += oprot->writeFieldBegin("needMerge", ::apache::thrift::protocol::T_BOOL, 2); - xfer += oprot->writeBool(this->needMerge); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(SetPartitionsStatsRequest &a, SetPartitionsStatsRequest &b) { - using ::std::swap; - swap(a.colStats, b.colStats); - swap(a.needMerge, b.needMerge); - swap(a.__isset, b.__isset); -} - -SetPartitionsStatsRequest::SetPartitionsStatsRequest(const SetPartitionsStatsRequest& other333) { - colStats = other333.colStats; - needMerge = other333.needMerge; - __isset = other333.__isset; -} -SetPartitionsStatsRequest& SetPartitionsStatsRequest::operator=(const SetPartitionsStatsRequest& other334) { - colStats = other334.colStats; - needMerge = other334.needMerge; - __isset = other334.__isset; - return *this; -} -void SetPartitionsStatsRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "SetPartitionsStatsRequest("; - out << "colStats=" << to_string(colStats); - out << ", " << "needMerge="; (__isset.needMerge ? (out << to_string(needMerge)) : (out << "")); - out << ")"; -} - - -Schema::~Schema() throw() { -} - - -void Schema::__set_fieldSchemas(const std::vector & val) { - this->fieldSchemas = val; -} - -void Schema::__set_properties(const std::map & val) { - this->properties = val; -} - -uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->fieldSchemas.clear(); - uint32_t _size335; - ::apache::thrift::protocol::TType _etype338; - xfer += iprot->readListBegin(_etype338, _size335); - this->fieldSchemas.resize(_size335); - uint32_t _i339; - for (_i339 = 0; _i339 < _size335; ++_i339) - { - xfer += this->fieldSchemas[_i339].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.fieldSchemas = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->properties.clear(); - uint32_t _size340; - ::apache::thrift::protocol::TType _ktype341; - ::apache::thrift::protocol::TType _vtype342; - xfer += iprot->readMapBegin(_ktype341, _vtype342, _size340); - uint32_t _i344; - for (_i344 = 0; _i344 < _size340; ++_i344) - { - std::string _key345; - xfer += iprot->readString(_key345); - std::string& _val346 = this->properties[_key345]; - xfer += iprot->readString(_val346); - } - xfer += iprot->readMapEnd(); - } - this->__isset.properties = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t Schema::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::vector ::const_iterator _iter347; - for (_iter347 = this->fieldSchemas.begin(); _iter347 != this->fieldSchemas.end(); ++_iter347) - { - xfer += (*_iter347).write(oprot); - } - 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())); - std::map ::const_iterator _iter348; - for (_iter348 = this->properties.begin(); _iter348 != this->properties.end(); ++_iter348) - { - xfer += oprot->writeString(_iter348->first); - xfer += oprot->writeString(_iter348->second); - } - 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); -} - -Schema::Schema(const Schema& other349) { - fieldSchemas = other349.fieldSchemas; - properties = other349.properties; - __isset = other349.__isset; -} -Schema& Schema::operator=(const Schema& other350) { - fieldSchemas = other350.fieldSchemas; - properties = other350.properties; - __isset = other350.__isset; - return *this; -} -void Schema::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "Schema("; - out << "fieldSchemas=" << to_string(fieldSchemas); - out << ", " << "properties=" << to_string(properties); - out << ")"; -} - - -EnvironmentContext::~EnvironmentContext() throw() { -} - - -void EnvironmentContext::__set_properties(const std::map & val) { - this->properties = val; -} - -uint32_t EnvironmentContext::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->properties.clear(); - uint32_t _size351; - ::apache::thrift::protocol::TType _ktype352; - ::apache::thrift::protocol::TType _vtype353; - xfer += iprot->readMapBegin(_ktype352, _vtype353, _size351); - uint32_t _i355; - for (_i355 = 0; _i355 < _size351; ++_i355) - { - std::string _key356; - xfer += iprot->readString(_key356); - std::string& _val357 = this->properties[_key356]; - xfer += iprot->readString(_val357); - } - xfer += iprot->readMapEnd(); - } - this->__isset.properties = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t EnvironmentContext::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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())); - std::map ::const_iterator _iter358; - for (_iter358 = this->properties.begin(); _iter358 != this->properties.end(); ++_iter358) - { - xfer += oprot->writeString(_iter358->first); - xfer += oprot->writeString(_iter358->second); - } - 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); -} - -EnvironmentContext::EnvironmentContext(const EnvironmentContext& other359) { - properties = other359.properties; - __isset = other359.__isset; -} -EnvironmentContext& EnvironmentContext::operator=(const EnvironmentContext& other360) { - properties = other360.properties; - __isset = other360.__isset; - return *this; -} -void EnvironmentContext::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "EnvironmentContext("; - out << "properties=" << to_string(properties); - out << ")"; -} - - -PrimaryKeysRequest::~PrimaryKeysRequest() throw() { -} - - -void PrimaryKeysRequest::__set_db_name(const std::string& val) { - this->db_name = val; -} - -void PrimaryKeysRequest::__set_tbl_name(const std::string& val) { - this->tbl_name = val; -} - -uint32_t PrimaryKeysRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_db_name = false; - bool isset_tbl_name = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - isset_db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - isset_tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_db_name) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tbl_name) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t PrimaryKeysRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("PrimaryKeysRequest"); - - 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->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(PrimaryKeysRequest &a, PrimaryKeysRequest &b) { - using ::std::swap; - swap(a.db_name, b.db_name); - swap(a.tbl_name, b.tbl_name); -} - -PrimaryKeysRequest::PrimaryKeysRequest(const PrimaryKeysRequest& other361) { - db_name = other361.db_name; - tbl_name = other361.tbl_name; -} -PrimaryKeysRequest& PrimaryKeysRequest::operator=(const PrimaryKeysRequest& other362) { - db_name = other362.db_name; - tbl_name = other362.tbl_name; - return *this; -} -void PrimaryKeysRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PrimaryKeysRequest("; - out << "db_name=" << to_string(db_name); - out << ", " << "tbl_name=" << to_string(tbl_name); - out << ")"; -} - - -PrimaryKeysResponse::~PrimaryKeysResponse() throw() { -} - - -void PrimaryKeysResponse::__set_primaryKeys(const std::vector & val) { - this->primaryKeys = val; -} - -uint32_t PrimaryKeysResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_primaryKeys = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->primaryKeys.clear(); - uint32_t _size363; - ::apache::thrift::protocol::TType _etype366; - xfer += iprot->readListBegin(_etype366, _size363); - this->primaryKeys.resize(_size363); - uint32_t _i367; - for (_i367 = 0; _i367 < _size363; ++_i367) - { - xfer += this->primaryKeys[_i367].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_primaryKeys = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_primaryKeys) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t PrimaryKeysResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("PrimaryKeysResponse"); - - xfer += oprot->writeFieldBegin("primaryKeys", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->primaryKeys.size())); - std::vector ::const_iterator _iter368; - for (_iter368 = this->primaryKeys.begin(); _iter368 != this->primaryKeys.end(); ++_iter368) - { - xfer += (*_iter368).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(PrimaryKeysResponse &a, PrimaryKeysResponse &b) { - using ::std::swap; - swap(a.primaryKeys, b.primaryKeys); -} - -PrimaryKeysResponse::PrimaryKeysResponse(const PrimaryKeysResponse& other369) { - primaryKeys = other369.primaryKeys; -} -PrimaryKeysResponse& PrimaryKeysResponse::operator=(const PrimaryKeysResponse& other370) { - primaryKeys = other370.primaryKeys; - return *this; -} -void PrimaryKeysResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PrimaryKeysResponse("; - out << "primaryKeys=" << to_string(primaryKeys); - out << ")"; -} - - -ForeignKeysRequest::~ForeignKeysRequest() throw() { -} - - -void ForeignKeysRequest::__set_parent_db_name(const std::string& val) { - this->parent_db_name = val; -} - -void ForeignKeysRequest::__set_parent_tbl_name(const std::string& val) { - this->parent_tbl_name = val; -} - -void ForeignKeysRequest::__set_foreign_db_name(const std::string& val) { - this->foreign_db_name = val; -} - -void ForeignKeysRequest::__set_foreign_tbl_name(const std::string& val) { - this->foreign_tbl_name = val; -} - -uint32_t ForeignKeysRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->parent_db_name); - this->__isset.parent_db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->parent_tbl_name); - this->__isset.parent_tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->foreign_db_name); - this->__isset.foreign_db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->foreign_tbl_name); - this->__isset.foreign_tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ForeignKeysRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ForeignKeysRequest"); - - xfer += oprot->writeFieldBegin("parent_db_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->parent_db_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("parent_tbl_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->parent_tbl_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("foreign_db_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->foreign_db_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("foreign_tbl_name", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->foreign_tbl_name); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ForeignKeysRequest &a, ForeignKeysRequest &b) { - using ::std::swap; - swap(a.parent_db_name, b.parent_db_name); - swap(a.parent_tbl_name, b.parent_tbl_name); - swap(a.foreign_db_name, b.foreign_db_name); - swap(a.foreign_tbl_name, b.foreign_tbl_name); - swap(a.__isset, b.__isset); -} - -ForeignKeysRequest::ForeignKeysRequest(const ForeignKeysRequest& other371) { - parent_db_name = other371.parent_db_name; - parent_tbl_name = other371.parent_tbl_name; - foreign_db_name = other371.foreign_db_name; - foreign_tbl_name = other371.foreign_tbl_name; - __isset = other371.__isset; -} -ForeignKeysRequest& ForeignKeysRequest::operator=(const ForeignKeysRequest& other372) { - parent_db_name = other372.parent_db_name; - parent_tbl_name = other372.parent_tbl_name; - foreign_db_name = other372.foreign_db_name; - foreign_tbl_name = other372.foreign_tbl_name; - __isset = other372.__isset; - return *this; -} -void ForeignKeysRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ForeignKeysRequest("; - out << "parent_db_name=" << to_string(parent_db_name); - out << ", " << "parent_tbl_name=" << to_string(parent_tbl_name); - out << ", " << "foreign_db_name=" << to_string(foreign_db_name); - out << ", " << "foreign_tbl_name=" << to_string(foreign_tbl_name); - out << ")"; -} - - -ForeignKeysResponse::~ForeignKeysResponse() throw() { -} - - -void ForeignKeysResponse::__set_foreignKeys(const std::vector & val) { - this->foreignKeys = val; -} - -uint32_t ForeignKeysResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_foreignKeys = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->foreignKeys.clear(); - uint32_t _size373; - ::apache::thrift::protocol::TType _etype376; - xfer += iprot->readListBegin(_etype376, _size373); - this->foreignKeys.resize(_size373); - uint32_t _i377; - for (_i377 = 0; _i377 < _size373; ++_i377) - { - xfer += this->foreignKeys[_i377].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_foreignKeys = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_foreignKeys) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t ForeignKeysResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ForeignKeysResponse"); - - xfer += oprot->writeFieldBegin("foreignKeys", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->foreignKeys.size())); - std::vector ::const_iterator _iter378; - for (_iter378 = this->foreignKeys.begin(); _iter378 != this->foreignKeys.end(); ++_iter378) - { - xfer += (*_iter378).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ForeignKeysResponse &a, ForeignKeysResponse &b) { - using ::std::swap; - swap(a.foreignKeys, b.foreignKeys); -} - -ForeignKeysResponse::ForeignKeysResponse(const ForeignKeysResponse& other379) { - foreignKeys = other379.foreignKeys; -} -ForeignKeysResponse& ForeignKeysResponse::operator=(const ForeignKeysResponse& other380) { - foreignKeys = other380.foreignKeys; - return *this; -} -void ForeignKeysResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ForeignKeysResponse("; - out << "foreignKeys=" << to_string(foreignKeys); - out << ")"; -} - - -UniqueConstraintsRequest::~UniqueConstraintsRequest() throw() { -} - - -void UniqueConstraintsRequest::__set_db_name(const std::string& val) { - this->db_name = val; -} - -void UniqueConstraintsRequest::__set_tbl_name(const std::string& val) { - this->tbl_name = val; -} - -uint32_t UniqueConstraintsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_db_name = false; - bool isset_tbl_name = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - isset_db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - isset_tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_db_name) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tbl_name) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t UniqueConstraintsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("UniqueConstraintsRequest"); - - 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->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(UniqueConstraintsRequest &a, UniqueConstraintsRequest &b) { - using ::std::swap; - swap(a.db_name, b.db_name); - swap(a.tbl_name, b.tbl_name); -} - -UniqueConstraintsRequest::UniqueConstraintsRequest(const UniqueConstraintsRequest& other381) { - db_name = other381.db_name; - tbl_name = other381.tbl_name; -} -UniqueConstraintsRequest& UniqueConstraintsRequest::operator=(const UniqueConstraintsRequest& other382) { - db_name = other382.db_name; - tbl_name = other382.tbl_name; - return *this; -} -void UniqueConstraintsRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "UniqueConstraintsRequest("; - out << "db_name=" << to_string(db_name); - out << ", " << "tbl_name=" << to_string(tbl_name); - out << ")"; -} - - -UniqueConstraintsResponse::~UniqueConstraintsResponse() throw() { -} - - -void UniqueConstraintsResponse::__set_uniqueConstraints(const std::vector & val) { - this->uniqueConstraints = val; -} - -uint32_t UniqueConstraintsResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_uniqueConstraints = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->uniqueConstraints.clear(); - uint32_t _size383; - ::apache::thrift::protocol::TType _etype386; - xfer += iprot->readListBegin(_etype386, _size383); - this->uniqueConstraints.resize(_size383); - uint32_t _i387; - for (_i387 = 0; _i387 < _size383; ++_i387) - { - xfer += this->uniqueConstraints[_i387].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_uniqueConstraints = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_uniqueConstraints) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t UniqueConstraintsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("UniqueConstraintsResponse"); - - xfer += oprot->writeFieldBegin("uniqueConstraints", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->uniqueConstraints.size())); - std::vector ::const_iterator _iter388; - for (_iter388 = this->uniqueConstraints.begin(); _iter388 != this->uniqueConstraints.end(); ++_iter388) - { - xfer += (*_iter388).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(UniqueConstraintsResponse &a, UniqueConstraintsResponse &b) { - using ::std::swap; - swap(a.uniqueConstraints, b.uniqueConstraints); -} - -UniqueConstraintsResponse::UniqueConstraintsResponse(const UniqueConstraintsResponse& other389) { - uniqueConstraints = other389.uniqueConstraints; -} -UniqueConstraintsResponse& UniqueConstraintsResponse::operator=(const UniqueConstraintsResponse& other390) { - uniqueConstraints = other390.uniqueConstraints; - return *this; -} -void UniqueConstraintsResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "UniqueConstraintsResponse("; - out << "uniqueConstraints=" << to_string(uniqueConstraints); - out << ")"; -} - - -NotNullConstraintsRequest::~NotNullConstraintsRequest() throw() { -} - - -void NotNullConstraintsRequest::__set_db_name(const std::string& val) { - this->db_name = val; -} - -void NotNullConstraintsRequest::__set_tbl_name(const std::string& val) { - this->tbl_name = val; -} - -uint32_t NotNullConstraintsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_db_name = false; - bool isset_tbl_name = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - isset_db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - isset_tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_db_name) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tbl_name) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t NotNullConstraintsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("NotNullConstraintsRequest"); - - 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->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(NotNullConstraintsRequest &a, NotNullConstraintsRequest &b) { - using ::std::swap; - swap(a.db_name, b.db_name); - swap(a.tbl_name, b.tbl_name); -} - -NotNullConstraintsRequest::NotNullConstraintsRequest(const NotNullConstraintsRequest& other391) { - db_name = other391.db_name; - tbl_name = other391.tbl_name; -} -NotNullConstraintsRequest& NotNullConstraintsRequest::operator=(const NotNullConstraintsRequest& other392) { - db_name = other392.db_name; - tbl_name = other392.tbl_name; - return *this; -} -void NotNullConstraintsRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "NotNullConstraintsRequest("; - out << "db_name=" << to_string(db_name); - out << ", " << "tbl_name=" << to_string(tbl_name); - out << ")"; -} - - -NotNullConstraintsResponse::~NotNullConstraintsResponse() throw() { -} - - -void NotNullConstraintsResponse::__set_notNullConstraints(const std::vector & val) { - this->notNullConstraints = val; -} - -uint32_t NotNullConstraintsResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_notNullConstraints = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->notNullConstraints.clear(); - uint32_t _size393; - ::apache::thrift::protocol::TType _etype396; - xfer += iprot->readListBegin(_etype396, _size393); - this->notNullConstraints.resize(_size393); - uint32_t _i397; - for (_i397 = 0; _i397 < _size393; ++_i397) - { - xfer += this->notNullConstraints[_i397].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_notNullConstraints = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_notNullConstraints) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t NotNullConstraintsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("NotNullConstraintsResponse"); - - xfer += oprot->writeFieldBegin("notNullConstraints", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->notNullConstraints.size())); - std::vector ::const_iterator _iter398; - for (_iter398 = this->notNullConstraints.begin(); _iter398 != this->notNullConstraints.end(); ++_iter398) - { - xfer += (*_iter398).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(NotNullConstraintsResponse &a, NotNullConstraintsResponse &b) { - using ::std::swap; - swap(a.notNullConstraints, b.notNullConstraints); -} - -NotNullConstraintsResponse::NotNullConstraintsResponse(const NotNullConstraintsResponse& other399) { - notNullConstraints = other399.notNullConstraints; -} -NotNullConstraintsResponse& NotNullConstraintsResponse::operator=(const NotNullConstraintsResponse& other400) { - notNullConstraints = other400.notNullConstraints; - return *this; -} -void NotNullConstraintsResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "NotNullConstraintsResponse("; - out << "notNullConstraints=" << to_string(notNullConstraints); - out << ")"; -} - - -DropConstraintRequest::~DropConstraintRequest() throw() { -} - - -void DropConstraintRequest::__set_dbname(const std::string& val) { - this->dbname = val; -} - -void DropConstraintRequest::__set_tablename(const std::string& val) { - this->tablename = val; -} - -void DropConstraintRequest::__set_constraintname(const std::string& val) { - this->constraintname = val; -} - -uint32_t DropConstraintRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dbname = false; - bool isset_tablename = false; - bool isset_constraintname = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - isset_dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tablename); - isset_tablename = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->constraintname); - isset_constraintname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dbname) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tablename) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_constraintname) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t DropConstraintRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("DropConstraintRequest"); - - xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbname); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tablename); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("constraintname", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->constraintname); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(DropConstraintRequest &a, DropConstraintRequest &b) { - using ::std::swap; - swap(a.dbname, b.dbname); - swap(a.tablename, b.tablename); - swap(a.constraintname, b.constraintname); -} - -DropConstraintRequest::DropConstraintRequest(const DropConstraintRequest& other401) { - dbname = other401.dbname; - tablename = other401.tablename; - constraintname = other401.constraintname; -} -DropConstraintRequest& DropConstraintRequest::operator=(const DropConstraintRequest& other402) { - dbname = other402.dbname; - tablename = other402.tablename; - constraintname = other402.constraintname; - return *this; -} -void DropConstraintRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "DropConstraintRequest("; - out << "dbname=" << to_string(dbname); - out << ", " << "tablename=" << to_string(tablename); - out << ", " << "constraintname=" << to_string(constraintname); - out << ")"; -} - - -AddPrimaryKeyRequest::~AddPrimaryKeyRequest() throw() { -} - - -void AddPrimaryKeyRequest::__set_primaryKeyCols(const std::vector & val) { - this->primaryKeyCols = val; -} - -uint32_t AddPrimaryKeyRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_primaryKeyCols = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->primaryKeyCols.clear(); - uint32_t _size403; - ::apache::thrift::protocol::TType _etype406; - xfer += iprot->readListBegin(_etype406, _size403); - this->primaryKeyCols.resize(_size403); - uint32_t _i407; - for (_i407 = 0; _i407 < _size403; ++_i407) - { - xfer += this->primaryKeyCols[_i407].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_primaryKeyCols = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_primaryKeyCols) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t AddPrimaryKeyRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("AddPrimaryKeyRequest"); - - xfer += oprot->writeFieldBegin("primaryKeyCols", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->primaryKeyCols.size())); - std::vector ::const_iterator _iter408; - for (_iter408 = this->primaryKeyCols.begin(); _iter408 != this->primaryKeyCols.end(); ++_iter408) - { - xfer += (*_iter408).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(AddPrimaryKeyRequest &a, AddPrimaryKeyRequest &b) { - using ::std::swap; - swap(a.primaryKeyCols, b.primaryKeyCols); -} - -AddPrimaryKeyRequest::AddPrimaryKeyRequest(const AddPrimaryKeyRequest& other409) { - primaryKeyCols = other409.primaryKeyCols; -} -AddPrimaryKeyRequest& AddPrimaryKeyRequest::operator=(const AddPrimaryKeyRequest& other410) { - primaryKeyCols = other410.primaryKeyCols; - return *this; -} -void AddPrimaryKeyRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "AddPrimaryKeyRequest("; - out << "primaryKeyCols=" << to_string(primaryKeyCols); - out << ")"; -} - - -AddForeignKeyRequest::~AddForeignKeyRequest() throw() { -} - - -void AddForeignKeyRequest::__set_foreignKeyCols(const std::vector & val) { - this->foreignKeyCols = val; -} - -uint32_t AddForeignKeyRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_foreignKeyCols = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->foreignKeyCols.clear(); - uint32_t _size411; - ::apache::thrift::protocol::TType _etype414; - xfer += iprot->readListBegin(_etype414, _size411); - this->foreignKeyCols.resize(_size411); - uint32_t _i415; - for (_i415 = 0; _i415 < _size411; ++_i415) - { - xfer += this->foreignKeyCols[_i415].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_foreignKeyCols = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_foreignKeyCols) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t AddForeignKeyRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("AddForeignKeyRequest"); - - xfer += oprot->writeFieldBegin("foreignKeyCols", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->foreignKeyCols.size())); - std::vector ::const_iterator _iter416; - for (_iter416 = this->foreignKeyCols.begin(); _iter416 != this->foreignKeyCols.end(); ++_iter416) - { - xfer += (*_iter416).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(AddForeignKeyRequest &a, AddForeignKeyRequest &b) { - using ::std::swap; - swap(a.foreignKeyCols, b.foreignKeyCols); -} - -AddForeignKeyRequest::AddForeignKeyRequest(const AddForeignKeyRequest& other417) { - foreignKeyCols = other417.foreignKeyCols; -} -AddForeignKeyRequest& AddForeignKeyRequest::operator=(const AddForeignKeyRequest& other418) { - foreignKeyCols = other418.foreignKeyCols; - return *this; -} -void AddForeignKeyRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "AddForeignKeyRequest("; - out << "foreignKeyCols=" << to_string(foreignKeyCols); - out << ")"; -} - - -AddUniqueConstraintRequest::~AddUniqueConstraintRequest() throw() { -} - - -void AddUniqueConstraintRequest::__set_uniqueConstraintCols(const std::vector & val) { - this->uniqueConstraintCols = val; -} - -uint32_t AddUniqueConstraintRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_uniqueConstraintCols = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->uniqueConstraintCols.clear(); - uint32_t _size419; - ::apache::thrift::protocol::TType _etype422; - xfer += iprot->readListBegin(_etype422, _size419); - this->uniqueConstraintCols.resize(_size419); - uint32_t _i423; - for (_i423 = 0; _i423 < _size419; ++_i423) - { - xfer += this->uniqueConstraintCols[_i423].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_uniqueConstraintCols = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_uniqueConstraintCols) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t AddUniqueConstraintRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("AddUniqueConstraintRequest"); - - xfer += oprot->writeFieldBegin("uniqueConstraintCols", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->uniqueConstraintCols.size())); - std::vector ::const_iterator _iter424; - for (_iter424 = this->uniqueConstraintCols.begin(); _iter424 != this->uniqueConstraintCols.end(); ++_iter424) - { - xfer += (*_iter424).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(AddUniqueConstraintRequest &a, AddUniqueConstraintRequest &b) { - using ::std::swap; - swap(a.uniqueConstraintCols, b.uniqueConstraintCols); -} - -AddUniqueConstraintRequest::AddUniqueConstraintRequest(const AddUniqueConstraintRequest& other425) { - uniqueConstraintCols = other425.uniqueConstraintCols; -} -AddUniqueConstraintRequest& AddUniqueConstraintRequest::operator=(const AddUniqueConstraintRequest& other426) { - uniqueConstraintCols = other426.uniqueConstraintCols; - return *this; -} -void AddUniqueConstraintRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "AddUniqueConstraintRequest("; - out << "uniqueConstraintCols=" << to_string(uniqueConstraintCols); - out << ")"; -} - - -AddNotNullConstraintRequest::~AddNotNullConstraintRequest() throw() { -} - - -void AddNotNullConstraintRequest::__set_notNullConstraintCols(const std::vector & val) { - this->notNullConstraintCols = val; -} - -uint32_t AddNotNullConstraintRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_notNullConstraintCols = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->notNullConstraintCols.clear(); - uint32_t _size427; - ::apache::thrift::protocol::TType _etype430; - xfer += iprot->readListBegin(_etype430, _size427); - this->notNullConstraintCols.resize(_size427); - uint32_t _i431; - for (_i431 = 0; _i431 < _size427; ++_i431) - { - xfer += this->notNullConstraintCols[_i431].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_notNullConstraintCols = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_notNullConstraintCols) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t AddNotNullConstraintRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("AddNotNullConstraintRequest"); - - xfer += oprot->writeFieldBegin("notNullConstraintCols", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->notNullConstraintCols.size())); - std::vector ::const_iterator _iter432; - for (_iter432 = this->notNullConstraintCols.begin(); _iter432 != this->notNullConstraintCols.end(); ++_iter432) - { - xfer += (*_iter432).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(AddNotNullConstraintRequest &a, AddNotNullConstraintRequest &b) { - using ::std::swap; - swap(a.notNullConstraintCols, b.notNullConstraintCols); -} - -AddNotNullConstraintRequest::AddNotNullConstraintRequest(const AddNotNullConstraintRequest& other433) { - notNullConstraintCols = other433.notNullConstraintCols; -} -AddNotNullConstraintRequest& AddNotNullConstraintRequest::operator=(const AddNotNullConstraintRequest& other434) { - notNullConstraintCols = other434.notNullConstraintCols; - return *this; -} -void AddNotNullConstraintRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "AddNotNullConstraintRequest("; - out << "notNullConstraintCols=" << to_string(notNullConstraintCols); - out << ")"; -} - - -PartitionsByExprResult::~PartitionsByExprResult() throw() { -} - - -void PartitionsByExprResult::__set_partitions(const std::vector & val) { - this->partitions = val; -} - -void PartitionsByExprResult::__set_hasUnknownPartitions(const bool val) { - this->hasUnknownPartitions = val; -} - -uint32_t PartitionsByExprResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_partitions = false; - bool isset_hasUnknownPartitions = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitions.clear(); - uint32_t _size435; - ::apache::thrift::protocol::TType _etype438; - xfer += iprot->readListBegin(_etype438, _size435); - this->partitions.resize(_size435); - uint32_t _i439; - for (_i439 = 0; _i439 < _size435; ++_i439) - { - xfer += this->partitions[_i439].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_partitions = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->hasUnknownPartitions); - isset_hasUnknownPartitions = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_partitions) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_hasUnknownPartitions) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t PartitionsByExprResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("PartitionsByExprResult"); - - xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); - std::vector ::const_iterator _iter440; - for (_iter440 = this->partitions.begin(); _iter440 != this->partitions.end(); ++_iter440) - { - xfer += (*_iter440).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("hasUnknownPartitions", ::apache::thrift::protocol::T_BOOL, 2); - xfer += oprot->writeBool(this->hasUnknownPartitions); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(PartitionsByExprResult &a, PartitionsByExprResult &b) { - using ::std::swap; - swap(a.partitions, b.partitions); - swap(a.hasUnknownPartitions, b.hasUnknownPartitions); -} - -PartitionsByExprResult::PartitionsByExprResult(const PartitionsByExprResult& other441) { - partitions = other441.partitions; - hasUnknownPartitions = other441.hasUnknownPartitions; -} -PartitionsByExprResult& PartitionsByExprResult::operator=(const PartitionsByExprResult& other442) { - partitions = other442.partitions; - hasUnknownPartitions = other442.hasUnknownPartitions; - return *this; -} -void PartitionsByExprResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PartitionsByExprResult("; - out << "partitions=" << to_string(partitions); - out << ", " << "hasUnknownPartitions=" << to_string(hasUnknownPartitions); - out << ")"; -} - - -PartitionsByExprRequest::~PartitionsByExprRequest() throw() { -} - - -void PartitionsByExprRequest::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void PartitionsByExprRequest::__set_tblName(const std::string& val) { - this->tblName = val; -} - -void PartitionsByExprRequest::__set_expr(const std::string& val) { - this->expr = val; -} - -void PartitionsByExprRequest::__set_defaultPartitionName(const std::string& val) { - this->defaultPartitionName = val; -__isset.defaultPartitionName = true; -} - -void PartitionsByExprRequest::__set_maxParts(const int16_t val) { - this->maxParts = val; -__isset.maxParts = true; -} - -uint32_t PartitionsByExprRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dbName = false; - bool isset_tblName = false; - bool isset_expr = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - isset_dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tblName); - isset_tblName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readBinary(this->expr); - isset_expr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->defaultPartitionName); - this->__isset.defaultPartitionName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->maxParts); - this->__isset.maxParts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dbName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tblName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_expr) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t PartitionsByExprRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("PartitionsByExprRequest"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tblName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("expr", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeBinary(this->expr); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.defaultPartitionName) { - xfer += oprot->writeFieldBegin("defaultPartitionName", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->defaultPartitionName); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.maxParts) { - xfer += oprot->writeFieldBegin("maxParts", ::apache::thrift::protocol::T_I16, 5); - xfer += oprot->writeI16(this->maxParts); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(PartitionsByExprRequest &a, PartitionsByExprRequest &b) { - using ::std::swap; - swap(a.dbName, b.dbName); - swap(a.tblName, b.tblName); - swap(a.expr, b.expr); - swap(a.defaultPartitionName, b.defaultPartitionName); - swap(a.maxParts, b.maxParts); - swap(a.__isset, b.__isset); -} - -PartitionsByExprRequest::PartitionsByExprRequest(const PartitionsByExprRequest& other443) { - dbName = other443.dbName; - tblName = other443.tblName; - expr = other443.expr; - defaultPartitionName = other443.defaultPartitionName; - maxParts = other443.maxParts; - __isset = other443.__isset; -} -PartitionsByExprRequest& PartitionsByExprRequest::operator=(const PartitionsByExprRequest& other444) { - dbName = other444.dbName; - tblName = other444.tblName; - expr = other444.expr; - defaultPartitionName = other444.defaultPartitionName; - maxParts = other444.maxParts; - __isset = other444.__isset; - return *this; -} -void PartitionsByExprRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PartitionsByExprRequest("; - out << "dbName=" << to_string(dbName); - out << ", " << "tblName=" << to_string(tblName); - out << ", " << "expr=" << to_string(expr); - out << ", " << "defaultPartitionName="; (__isset.defaultPartitionName ? (out << to_string(defaultPartitionName)) : (out << "")); - out << ", " << "maxParts="; (__isset.maxParts ? (out << to_string(maxParts)) : (out << "")); - out << ")"; -} - - -TableStatsResult::~TableStatsResult() throw() { -} - - -void TableStatsResult::__set_tableStats(const std::vector & val) { - this->tableStats = val; -} - -uint32_t TableStatsResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_tableStats = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->tableStats.clear(); - uint32_t _size445; - ::apache::thrift::protocol::TType _etype448; - xfer += iprot->readListBegin(_etype448, _size445); - this->tableStats.resize(_size445); - uint32_t _i449; - for (_i449 = 0; _i449 < _size445; ++_i449) - { - xfer += this->tableStats[_i449].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_tableStats = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_tableStats) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t TableStatsResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("TableStatsResult"); - - xfer += oprot->writeFieldBegin("tableStats", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->tableStats.size())); - std::vector ::const_iterator _iter450; - for (_iter450 = this->tableStats.begin(); _iter450 != this->tableStats.end(); ++_iter450) - { - xfer += (*_iter450).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(TableStatsResult &a, TableStatsResult &b) { - using ::std::swap; - swap(a.tableStats, b.tableStats); -} - -TableStatsResult::TableStatsResult(const TableStatsResult& other451) { - tableStats = other451.tableStats; -} -TableStatsResult& TableStatsResult::operator=(const TableStatsResult& other452) { - tableStats = other452.tableStats; - return *this; -} -void TableStatsResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "TableStatsResult("; - out << "tableStats=" << to_string(tableStats); - out << ")"; -} - - -PartitionsStatsResult::~PartitionsStatsResult() throw() { -} - - -void PartitionsStatsResult::__set_partStats(const std::map > & val) { - this->partStats = val; -} - -uint32_t PartitionsStatsResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_partStats = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->partStats.clear(); - uint32_t _size453; - ::apache::thrift::protocol::TType _ktype454; - ::apache::thrift::protocol::TType _vtype455; - xfer += iprot->readMapBegin(_ktype454, _vtype455, _size453); - uint32_t _i457; - for (_i457 = 0; _i457 < _size453; ++_i457) - { - std::string _key458; - xfer += iprot->readString(_key458); - std::vector & _val459 = this->partStats[_key458]; - { - _val459.clear(); - uint32_t _size460; - ::apache::thrift::protocol::TType _etype463; - xfer += iprot->readListBegin(_etype463, _size460); - _val459.resize(_size460); - uint32_t _i464; - for (_i464 = 0; _i464 < _size460; ++_i464) - { - xfer += _val459[_i464].read(iprot); - } - xfer += iprot->readListEnd(); - } - } - xfer += iprot->readMapEnd(); - } - isset_partStats = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_partStats) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t PartitionsStatsResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("PartitionsStatsResult"); - - xfer += oprot->writeFieldBegin("partStats", ::apache::thrift::protocol::T_MAP, 1); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast(this->partStats.size())); - std::map > ::const_iterator _iter465; - for (_iter465 = this->partStats.begin(); _iter465 != this->partStats.end(); ++_iter465) - { - xfer += oprot->writeString(_iter465->first); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter465->second.size())); - std::vector ::const_iterator _iter466; - for (_iter466 = _iter465->second.begin(); _iter466 != _iter465->second.end(); ++_iter466) - { - xfer += (*_iter466).write(oprot); - } - xfer += oprot->writeListEnd(); - } - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(PartitionsStatsResult &a, PartitionsStatsResult &b) { - using ::std::swap; - swap(a.partStats, b.partStats); -} - -PartitionsStatsResult::PartitionsStatsResult(const PartitionsStatsResult& other467) { - partStats = other467.partStats; -} -PartitionsStatsResult& PartitionsStatsResult::operator=(const PartitionsStatsResult& other468) { - partStats = other468.partStats; - return *this; -} -void PartitionsStatsResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PartitionsStatsResult("; - out << "partStats=" << to_string(partStats); - out << ")"; -} - - -TableStatsRequest::~TableStatsRequest() throw() { -} - - -void TableStatsRequest::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void TableStatsRequest::__set_tblName(const std::string& val) { - this->tblName = val; -} - -void TableStatsRequest::__set_colNames(const std::vector & val) { - this->colNames = val; -} - -uint32_t TableStatsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dbName = false; - bool isset_tblName = false; - bool isset_colNames = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - isset_dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tblName); - isset_tblName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->colNames.clear(); - uint32_t _size469; - ::apache::thrift::protocol::TType _etype472; - xfer += iprot->readListBegin(_etype472, _size469); - this->colNames.resize(_size469); - uint32_t _i473; - for (_i473 = 0; _i473 < _size469; ++_i473) - { - xfer += iprot->readString(this->colNames[_i473]); - } - xfer += iprot->readListEnd(); - } - isset_colNames = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dbName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tblName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_colNames) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t TableStatsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("TableStatsRequest"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tblName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("colNames", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->colNames.size())); - std::vector ::const_iterator _iter474; - for (_iter474 = this->colNames.begin(); _iter474 != this->colNames.end(); ++_iter474) - { - xfer += oprot->writeString((*_iter474)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(TableStatsRequest &a, TableStatsRequest &b) { - using ::std::swap; - swap(a.dbName, b.dbName); - swap(a.tblName, b.tblName); - swap(a.colNames, b.colNames); -} - -TableStatsRequest::TableStatsRequest(const TableStatsRequest& other475) { - dbName = other475.dbName; - tblName = other475.tblName; - colNames = other475.colNames; -} -TableStatsRequest& TableStatsRequest::operator=(const TableStatsRequest& other476) { - dbName = other476.dbName; - tblName = other476.tblName; - colNames = other476.colNames; - return *this; -} -void TableStatsRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "TableStatsRequest("; - out << "dbName=" << to_string(dbName); - out << ", " << "tblName=" << to_string(tblName); - out << ", " << "colNames=" << to_string(colNames); - out << ")"; -} - - -PartitionsStatsRequest::~PartitionsStatsRequest() throw() { -} - - -void PartitionsStatsRequest::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void PartitionsStatsRequest::__set_tblName(const std::string& val) { - this->tblName = val; -} - -void PartitionsStatsRequest::__set_colNames(const std::vector & val) { - this->colNames = val; -} - -void PartitionsStatsRequest::__set_partNames(const std::vector & val) { - this->partNames = val; -} - -uint32_t PartitionsStatsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dbName = false; - bool isset_tblName = false; - bool isset_colNames = false; - bool isset_partNames = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - isset_dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tblName); - isset_tblName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->colNames.clear(); - uint32_t _size477; - ::apache::thrift::protocol::TType _etype480; - xfer += iprot->readListBegin(_etype480, _size477); - this->colNames.resize(_size477); - uint32_t _i481; - for (_i481 = 0; _i481 < _size477; ++_i481) - { - xfer += iprot->readString(this->colNames[_i481]); - } - xfer += iprot->readListEnd(); - } - isset_colNames = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partNames.clear(); - uint32_t _size482; - ::apache::thrift::protocol::TType _etype485; - xfer += iprot->readListBegin(_etype485, _size482); - this->partNames.resize(_size482); - uint32_t _i486; - for (_i486 = 0; _i486 < _size482; ++_i486) - { - xfer += iprot->readString(this->partNames[_i486]); - } - xfer += iprot->readListEnd(); - } - isset_partNames = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dbName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tblName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_colNames) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_partNames) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t PartitionsStatsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("PartitionsStatsRequest"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tblName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("colNames", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->colNames.size())); - std::vector ::const_iterator _iter487; - for (_iter487 = this->colNames.begin(); _iter487 != this->colNames.end(); ++_iter487) - { - xfer += oprot->writeString((*_iter487)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("partNames", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->partNames.size())); - std::vector ::const_iterator _iter488; - for (_iter488 = this->partNames.begin(); _iter488 != this->partNames.end(); ++_iter488) - { - xfer += oprot->writeString((*_iter488)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(PartitionsStatsRequest &a, PartitionsStatsRequest &b) { - using ::std::swap; - swap(a.dbName, b.dbName); - swap(a.tblName, b.tblName); - swap(a.colNames, b.colNames); - swap(a.partNames, b.partNames); -} - -PartitionsStatsRequest::PartitionsStatsRequest(const PartitionsStatsRequest& other489) { - dbName = other489.dbName; - tblName = other489.tblName; - colNames = other489.colNames; - partNames = other489.partNames; -} -PartitionsStatsRequest& PartitionsStatsRequest::operator=(const PartitionsStatsRequest& other490) { - dbName = other490.dbName; - tblName = other490.tblName; - colNames = other490.colNames; - partNames = other490.partNames; - return *this; -} -void PartitionsStatsRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PartitionsStatsRequest("; - out << "dbName=" << to_string(dbName); - out << ", " << "tblName=" << to_string(tblName); - out << ", " << "colNames=" << to_string(colNames); - out << ", " << "partNames=" << to_string(partNames); - out << ")"; -} - - -AddPartitionsResult::~AddPartitionsResult() throw() { -} - - -void AddPartitionsResult::__set_partitions(const std::vector & val) { - this->partitions = val; -__isset.partitions = true; -} - -uint32_t AddPartitionsResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitions.clear(); - uint32_t _size491; - ::apache::thrift::protocol::TType _etype494; - xfer += iprot->readListBegin(_etype494, _size491); - this->partitions.resize(_size491); - uint32_t _i495; - for (_i495 = 0; _i495 < _size491; ++_i495) - { - xfer += this->partitions[_i495].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.partitions = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t AddPartitionsResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("AddPartitionsResult"); - - if (this->__isset.partitions) { - xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); - std::vector ::const_iterator _iter496; - for (_iter496 = this->partitions.begin(); _iter496 != this->partitions.end(); ++_iter496) - { - xfer += (*_iter496).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(AddPartitionsResult &a, AddPartitionsResult &b) { - using ::std::swap; - swap(a.partitions, b.partitions); - swap(a.__isset, b.__isset); -} - -AddPartitionsResult::AddPartitionsResult(const AddPartitionsResult& other497) { - partitions = other497.partitions; - __isset = other497.__isset; -} -AddPartitionsResult& AddPartitionsResult::operator=(const AddPartitionsResult& other498) { - partitions = other498.partitions; - __isset = other498.__isset; - return *this; -} -void AddPartitionsResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "AddPartitionsResult("; - out << "partitions="; (__isset.partitions ? (out << to_string(partitions)) : (out << "")); - out << ")"; -} - - -AddPartitionsRequest::~AddPartitionsRequest() throw() { -} - - -void AddPartitionsRequest::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void AddPartitionsRequest::__set_tblName(const std::string& val) { - this->tblName = val; -} - -void AddPartitionsRequest::__set_parts(const std::vector & val) { - this->parts = val; -} - -void AddPartitionsRequest::__set_ifNotExists(const bool val) { - this->ifNotExists = val; -} - -void AddPartitionsRequest::__set_needResult(const bool val) { - this->needResult = val; -__isset.needResult = true; -} - -uint32_t AddPartitionsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dbName = false; - bool isset_tblName = false; - bool isset_parts = false; - bool isset_ifNotExists = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - isset_dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tblName); - isset_tblName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->parts.clear(); - uint32_t _size499; - ::apache::thrift::protocol::TType _etype502; - xfer += iprot->readListBegin(_etype502, _size499); - this->parts.resize(_size499); - uint32_t _i503; - for (_i503 = 0; _i503 < _size499; ++_i503) - { - xfer += this->parts[_i503].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->ifNotExists); - isset_ifNotExists = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->needResult); - this->__isset.needResult = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dbName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tblName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_parts) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_ifNotExists) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t AddPartitionsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("AddPartitionsRequest"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tblName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("parts", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->parts.size())); - std::vector ::const_iterator _iter504; - for (_iter504 = this->parts.begin(); _iter504 != this->parts.end(); ++_iter504) - { - xfer += (*_iter504).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("ifNotExists", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->ifNotExists); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.needResult) { - xfer += oprot->writeFieldBegin("needResult", ::apache::thrift::protocol::T_BOOL, 5); - xfer += oprot->writeBool(this->needResult); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(AddPartitionsRequest &a, AddPartitionsRequest &b) { - using ::std::swap; - swap(a.dbName, b.dbName); - swap(a.tblName, b.tblName); - swap(a.parts, b.parts); - swap(a.ifNotExists, b.ifNotExists); - swap(a.needResult, b.needResult); - swap(a.__isset, b.__isset); -} - -AddPartitionsRequest::AddPartitionsRequest(const AddPartitionsRequest& other505) { - dbName = other505.dbName; - tblName = other505.tblName; - parts = other505.parts; - ifNotExists = other505.ifNotExists; - needResult = other505.needResult; - __isset = other505.__isset; -} -AddPartitionsRequest& AddPartitionsRequest::operator=(const AddPartitionsRequest& other506) { - dbName = other506.dbName; - tblName = other506.tblName; - parts = other506.parts; - ifNotExists = other506.ifNotExists; - needResult = other506.needResult; - __isset = other506.__isset; - return *this; -} -void AddPartitionsRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "AddPartitionsRequest("; - out << "dbName=" << to_string(dbName); - out << ", " << "tblName=" << to_string(tblName); - out << ", " << "parts=" << to_string(parts); - out << ", " << "ifNotExists=" << to_string(ifNotExists); - out << ", " << "needResult="; (__isset.needResult ? (out << to_string(needResult)) : (out << "")); - out << ")"; -} - - -DropPartitionsResult::~DropPartitionsResult() throw() { -} - - -void DropPartitionsResult::__set_partitions(const std::vector & val) { - this->partitions = val; -__isset.partitions = true; -} - -uint32_t DropPartitionsResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitions.clear(); - uint32_t _size507; - ::apache::thrift::protocol::TType _etype510; - xfer += iprot->readListBegin(_etype510, _size507); - this->partitions.resize(_size507); - uint32_t _i511; - for (_i511 = 0; _i511 < _size507; ++_i511) - { - xfer += this->partitions[_i511].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.partitions = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t DropPartitionsResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("DropPartitionsResult"); - - if (this->__isset.partitions) { - xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); - std::vector ::const_iterator _iter512; - for (_iter512 = this->partitions.begin(); _iter512 != this->partitions.end(); ++_iter512) - { - xfer += (*_iter512).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(DropPartitionsResult &a, DropPartitionsResult &b) { - using ::std::swap; - swap(a.partitions, b.partitions); - swap(a.__isset, b.__isset); -} - -DropPartitionsResult::DropPartitionsResult(const DropPartitionsResult& other513) { - partitions = other513.partitions; - __isset = other513.__isset; -} -DropPartitionsResult& DropPartitionsResult::operator=(const DropPartitionsResult& other514) { - partitions = other514.partitions; - __isset = other514.__isset; - return *this; -} -void DropPartitionsResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "DropPartitionsResult("; - out << "partitions="; (__isset.partitions ? (out << to_string(partitions)) : (out << "")); - out << ")"; -} - - -DropPartitionsExpr::~DropPartitionsExpr() throw() { -} - - -void DropPartitionsExpr::__set_expr(const std::string& val) { - this->expr = val; -} - -void DropPartitionsExpr::__set_partArchiveLevel(const int32_t val) { - this->partArchiveLevel = val; -__isset.partArchiveLevel = true; -} - -uint32_t DropPartitionsExpr::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_expr = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readBinary(this->expr); - isset_expr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partArchiveLevel); - this->__isset.partArchiveLevel = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_expr) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t DropPartitionsExpr::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("DropPartitionsExpr"); - - xfer += oprot->writeFieldBegin("expr", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeBinary(this->expr); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.partArchiveLevel) { - xfer += oprot->writeFieldBegin("partArchiveLevel", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->partArchiveLevel); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(DropPartitionsExpr &a, DropPartitionsExpr &b) { - using ::std::swap; - swap(a.expr, b.expr); - swap(a.partArchiveLevel, b.partArchiveLevel); - swap(a.__isset, b.__isset); -} - -DropPartitionsExpr::DropPartitionsExpr(const DropPartitionsExpr& other515) { - expr = other515.expr; - partArchiveLevel = other515.partArchiveLevel; - __isset = other515.__isset; -} -DropPartitionsExpr& DropPartitionsExpr::operator=(const DropPartitionsExpr& other516) { - expr = other516.expr; - partArchiveLevel = other516.partArchiveLevel; - __isset = other516.__isset; - return *this; -} -void DropPartitionsExpr::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "DropPartitionsExpr("; - out << "expr=" << to_string(expr); - out << ", " << "partArchiveLevel="; (__isset.partArchiveLevel ? (out << to_string(partArchiveLevel)) : (out << "")); - out << ")"; -} - - -RequestPartsSpec::~RequestPartsSpec() throw() { -} - - -void RequestPartsSpec::__set_names(const std::vector & val) { - this->names = val; -} - -void RequestPartsSpec::__set_exprs(const std::vector & val) { - this->exprs = val; -} - -uint32_t RequestPartsSpec::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->names.clear(); - uint32_t _size517; - ::apache::thrift::protocol::TType _etype520; - xfer += iprot->readListBegin(_etype520, _size517); - this->names.resize(_size517); - uint32_t _i521; - for (_i521 = 0; _i521 < _size517; ++_i521) - { - xfer += iprot->readString(this->names[_i521]); - } - xfer += iprot->readListEnd(); - } - this->__isset.names = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->exprs.clear(); - uint32_t _size522; - ::apache::thrift::protocol::TType _etype525; - xfer += iprot->readListBegin(_etype525, _size522); - this->exprs.resize(_size522); - uint32_t _i526; - for (_i526 = 0; _i526 < _size522; ++_i526) - { - xfer += this->exprs[_i526].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.exprs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t RequestPartsSpec::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("RequestPartsSpec"); - - xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->names.size())); - std::vector ::const_iterator _iter527; - for (_iter527 = this->names.begin(); _iter527 != this->names.end(); ++_iter527) - { - xfer += oprot->writeString((*_iter527)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("exprs", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->exprs.size())); - std::vector ::const_iterator _iter528; - for (_iter528 = this->exprs.begin(); _iter528 != this->exprs.end(); ++_iter528) - { - xfer += (*_iter528).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(RequestPartsSpec &a, RequestPartsSpec &b) { - using ::std::swap; - swap(a.names, b.names); - swap(a.exprs, b.exprs); - swap(a.__isset, b.__isset); -} - -RequestPartsSpec::RequestPartsSpec(const RequestPartsSpec& other529) { - names = other529.names; - exprs = other529.exprs; - __isset = other529.__isset; -} -RequestPartsSpec& RequestPartsSpec::operator=(const RequestPartsSpec& other530) { - names = other530.names; - exprs = other530.exprs; - __isset = other530.__isset; - return *this; -} -void RequestPartsSpec::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "RequestPartsSpec("; - out << "names=" << to_string(names); - out << ", " << "exprs=" << to_string(exprs); - out << ")"; -} - - -DropPartitionsRequest::~DropPartitionsRequest() throw() { -} - - -void DropPartitionsRequest::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void DropPartitionsRequest::__set_tblName(const std::string& val) { - this->tblName = val; -} - -void DropPartitionsRequest::__set_parts(const RequestPartsSpec& val) { - this->parts = val; -} - -void DropPartitionsRequest::__set_deleteData(const bool val) { - this->deleteData = val; -__isset.deleteData = true; -} - -void DropPartitionsRequest::__set_ifExists(const bool val) { - this->ifExists = val; -__isset.ifExists = true; -} - -void DropPartitionsRequest::__set_ignoreProtection(const bool val) { - this->ignoreProtection = val; -__isset.ignoreProtection = true; -} - -void DropPartitionsRequest::__set_environmentContext(const EnvironmentContext& val) { - this->environmentContext = val; -__isset.environmentContext = true; -} - -void DropPartitionsRequest::__set_needResult(const bool val) { - this->needResult = val; -__isset.needResult = true; -} - -uint32_t DropPartitionsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dbName = false; - bool isset_tblName = false; - bool isset_parts = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - isset_dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tblName); - isset_tblName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->parts.read(iprot); - isset_parts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->ifExists); - this->__isset.ifExists = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->ignoreProtection); - this->__isset.ignoreProtection = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->environmentContext.read(iprot); - this->__isset.environmentContext = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->needResult); - this->__isset.needResult = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dbName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tblName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_parts) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t DropPartitionsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("DropPartitionsRequest"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tblName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("parts", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->parts.write(oprot); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.deleteData) { - xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->deleteData); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.ifExists) { - xfer += oprot->writeFieldBegin("ifExists", ::apache::thrift::protocol::T_BOOL, 5); - xfer += oprot->writeBool(this->ifExists); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.ignoreProtection) { - xfer += oprot->writeFieldBegin("ignoreProtection", ::apache::thrift::protocol::T_BOOL, 6); - xfer += oprot->writeBool(this->ignoreProtection); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.environmentContext) { - xfer += oprot->writeFieldBegin("environmentContext", ::apache::thrift::protocol::T_STRUCT, 7); - xfer += this->environmentContext.write(oprot); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.needResult) { - xfer += oprot->writeFieldBegin("needResult", ::apache::thrift::protocol::T_BOOL, 8); - xfer += oprot->writeBool(this->needResult); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(DropPartitionsRequest &a, DropPartitionsRequest &b) { - using ::std::swap; - swap(a.dbName, b.dbName); - swap(a.tblName, b.tblName); - swap(a.parts, b.parts); - swap(a.deleteData, b.deleteData); - swap(a.ifExists, b.ifExists); - swap(a.ignoreProtection, b.ignoreProtection); - swap(a.environmentContext, b.environmentContext); - swap(a.needResult, b.needResult); - swap(a.__isset, b.__isset); -} - -DropPartitionsRequest::DropPartitionsRequest(const DropPartitionsRequest& other531) { - dbName = other531.dbName; - tblName = other531.tblName; - parts = other531.parts; - deleteData = other531.deleteData; - ifExists = other531.ifExists; - ignoreProtection = other531.ignoreProtection; - environmentContext = other531.environmentContext; - needResult = other531.needResult; - __isset = other531.__isset; -} -DropPartitionsRequest& DropPartitionsRequest::operator=(const DropPartitionsRequest& other532) { - dbName = other532.dbName; - tblName = other532.tblName; - parts = other532.parts; - deleteData = other532.deleteData; - ifExists = other532.ifExists; - ignoreProtection = other532.ignoreProtection; - environmentContext = other532.environmentContext; - needResult = other532.needResult; - __isset = other532.__isset; - return *this; -} -void DropPartitionsRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "DropPartitionsRequest("; - out << "dbName=" << to_string(dbName); - out << ", " << "tblName=" << to_string(tblName); - out << ", " << "parts=" << to_string(parts); - out << ", " << "deleteData="; (__isset.deleteData ? (out << to_string(deleteData)) : (out << "")); - out << ", " << "ifExists="; (__isset.ifExists ? (out << to_string(ifExists)) : (out << "")); - out << ", " << "ignoreProtection="; (__isset.ignoreProtection ? (out << to_string(ignoreProtection)) : (out << "")); - out << ", " << "environmentContext="; (__isset.environmentContext ? (out << to_string(environmentContext)) : (out << "")); - out << ", " << "needResult="; (__isset.needResult ? (out << to_string(needResult)) : (out << "")); - out << ")"; -} - - -ResourceUri::~ResourceUri() throw() { -} - - -void ResourceUri::__set_resourceType(const ResourceType::type val) { - this->resourceType = val; -} - -void ResourceUri::__set_uri(const std::string& val) { - this->uri = val; -} - -uint32_t ResourceUri::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast533; - xfer += iprot->readI32(ecast533); - this->resourceType = (ResourceType::type)ecast533; - this->__isset.resourceType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->uri); - this->__isset.uri = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ResourceUri::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ResourceUri"); - - xfer += oprot->writeFieldBegin("resourceType", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->resourceType); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("uri", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->uri); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ResourceUri &a, ResourceUri &b) { - using ::std::swap; - swap(a.resourceType, b.resourceType); - swap(a.uri, b.uri); - swap(a.__isset, b.__isset); -} - -ResourceUri::ResourceUri(const ResourceUri& other534) { - resourceType = other534.resourceType; - uri = other534.uri; - __isset = other534.__isset; -} -ResourceUri& ResourceUri::operator=(const ResourceUri& other535) { - resourceType = other535.resourceType; - uri = other535.uri; - __isset = other535.__isset; - return *this; -} -void ResourceUri::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ResourceUri("; - out << "resourceType=" << to_string(resourceType); - out << ", " << "uri=" << to_string(uri); - out << ")"; -} - - -Function::~Function() throw() { -} - - -void Function::__set_functionName(const std::string& val) { - this->functionName = val; -} - -void Function::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void Function::__set_className(const std::string& val) { - this->className = val; -} - -void Function::__set_ownerName(const std::string& val) { - this->ownerName = val; -} - -void Function::__set_ownerType(const PrincipalType::type val) { - this->ownerType = val; -} - -void Function::__set_createTime(const int32_t val) { - this->createTime = val; -} - -void Function::__set_functionType(const FunctionType::type val) { - this->functionType = val; -} - -void Function::__set_resourceUris(const std::vector & val) { - this->resourceUris = val; -} - -uint32_t Function::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->functionName); - this->__isset.functionName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->className); - this->__isset.className = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->ownerName); - this->__isset.ownerName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast536; - xfer += iprot->readI32(ecast536); - this->ownerType = (PrincipalType::type)ecast536; - this->__isset.ownerType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->createTime); - this->__isset.createTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast537; - xfer += iprot->readI32(ecast537); - this->functionType = (FunctionType::type)ecast537; - this->__isset.functionType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->resourceUris.clear(); - uint32_t _size538; - ::apache::thrift::protocol::TType _etype541; - xfer += iprot->readListBegin(_etype541, _size538); - this->resourceUris.resize(_size538); - uint32_t _i542; - for (_i542 = 0; _i542 < _size538; ++_i542) - { - xfer += this->resourceUris[_i542].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.resourceUris = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t Function::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("Function"); - - xfer += oprot->writeFieldBegin("functionName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->functionName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->className); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->ownerName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("ownerType", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32((int32_t)this->ownerType); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 6); - xfer += oprot->writeI32(this->createTime); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("functionType", ::apache::thrift::protocol::T_I32, 7); - xfer += oprot->writeI32((int32_t)this->functionType); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("resourceUris", ::apache::thrift::protocol::T_LIST, 8); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->resourceUris.size())); - std::vector ::const_iterator _iter543; - for (_iter543 = this->resourceUris.begin(); _iter543 != this->resourceUris.end(); ++_iter543) - { - xfer += (*_iter543).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(Function &a, Function &b) { - using ::std::swap; - swap(a.functionName, b.functionName); - swap(a.dbName, b.dbName); - swap(a.className, b.className); - swap(a.ownerName, b.ownerName); - swap(a.ownerType, b.ownerType); - swap(a.createTime, b.createTime); - swap(a.functionType, b.functionType); - swap(a.resourceUris, b.resourceUris); - swap(a.__isset, b.__isset); -} - -Function::Function(const Function& other544) { - functionName = other544.functionName; - dbName = other544.dbName; - className = other544.className; - ownerName = other544.ownerName; - ownerType = other544.ownerType; - createTime = other544.createTime; - functionType = other544.functionType; - resourceUris = other544.resourceUris; - __isset = other544.__isset; -} -Function& Function::operator=(const Function& other545) { - functionName = other545.functionName; - dbName = other545.dbName; - className = other545.className; - ownerName = other545.ownerName; - ownerType = other545.ownerType; - createTime = other545.createTime; - functionType = other545.functionType; - resourceUris = other545.resourceUris; - __isset = other545.__isset; - return *this; -} -void Function::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "Function("; - out << "functionName=" << to_string(functionName); - out << ", " << "dbName=" << to_string(dbName); - out << ", " << "className=" << to_string(className); - out << ", " << "ownerName=" << to_string(ownerName); - out << ", " << "ownerType=" << to_string(ownerType); - out << ", " << "createTime=" << to_string(createTime); - out << ", " << "functionType=" << to_string(functionType); - out << ", " << "resourceUris=" << to_string(resourceUris); - out << ")"; -} - - -TxnInfo::~TxnInfo() throw() { -} - - -void TxnInfo::__set_id(const int64_t val) { - this->id = val; -} - -void TxnInfo::__set_state(const TxnState::type val) { - this->state = val; -} - -void TxnInfo::__set_user(const std::string& val) { - this->user = val; -} - -void TxnInfo::__set_hostname(const std::string& val) { - this->hostname = val; -} - -void TxnInfo::__set_agentInfo(const std::string& val) { - this->agentInfo = val; -__isset.agentInfo = true; -} - -void TxnInfo::__set_heartbeatCount(const int32_t val) { - this->heartbeatCount = val; -__isset.heartbeatCount = true; -} - -void TxnInfo::__set_metaInfo(const std::string& val) { - this->metaInfo = val; -__isset.metaInfo = true; -} - -void TxnInfo::__set_startedTime(const int64_t val) { - this->startedTime = val; -__isset.startedTime = true; -} - -void TxnInfo::__set_lastHeartbeatTime(const int64_t val) { - this->lastHeartbeatTime = val; -__isset.lastHeartbeatTime = true; -} - -uint32_t TxnInfo::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_id = false; - bool isset_state = false; - bool isset_user = false; - bool isset_hostname = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->id); - isset_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast546; - xfer += iprot->readI32(ecast546); - this->state = (TxnState::type)ecast546; - isset_state = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user); - isset_user = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hostname); - isset_hostname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->agentInfo); - this->__isset.agentInfo = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->heartbeatCount); - this->__isset.heartbeatCount = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->metaInfo); - this->__isset.metaInfo = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->startedTime); - this->__isset.startedTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->lastHeartbeatTime); - this->__isset.lastHeartbeatTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_id) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_state) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_user) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_hostname) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t TxnInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("TxnInfo"); - - xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->id); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->state); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->user); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->hostname); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.agentInfo) { - xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->agentInfo); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.heartbeatCount) { - xfer += oprot->writeFieldBegin("heartbeatCount", ::apache::thrift::protocol::T_I32, 6); - xfer += oprot->writeI32(this->heartbeatCount); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.metaInfo) { - xfer += oprot->writeFieldBegin("metaInfo", ::apache::thrift::protocol::T_STRING, 7); - xfer += oprot->writeString(this->metaInfo); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.startedTime) { - xfer += oprot->writeFieldBegin("startedTime", ::apache::thrift::protocol::T_I64, 8); - xfer += oprot->writeI64(this->startedTime); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.lastHeartbeatTime) { - xfer += oprot->writeFieldBegin("lastHeartbeatTime", ::apache::thrift::protocol::T_I64, 9); - xfer += oprot->writeI64(this->lastHeartbeatTime); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(TxnInfo &a, TxnInfo &b) { - using ::std::swap; - swap(a.id, b.id); - swap(a.state, b.state); - swap(a.user, b.user); - swap(a.hostname, b.hostname); - swap(a.agentInfo, b.agentInfo); - swap(a.heartbeatCount, b.heartbeatCount); - swap(a.metaInfo, b.metaInfo); - swap(a.startedTime, b.startedTime); - swap(a.lastHeartbeatTime, b.lastHeartbeatTime); - swap(a.__isset, b.__isset); -} - -TxnInfo::TxnInfo(const TxnInfo& other547) { - id = other547.id; - state = other547.state; - user = other547.user; - hostname = other547.hostname; - agentInfo = other547.agentInfo; - heartbeatCount = other547.heartbeatCount; - metaInfo = other547.metaInfo; - startedTime = other547.startedTime; - lastHeartbeatTime = other547.lastHeartbeatTime; - __isset = other547.__isset; -} -TxnInfo& TxnInfo::operator=(const TxnInfo& other548) { - id = other548.id; - state = other548.state; - user = other548.user; - hostname = other548.hostname; - agentInfo = other548.agentInfo; - heartbeatCount = other548.heartbeatCount; - metaInfo = other548.metaInfo; - startedTime = other548.startedTime; - lastHeartbeatTime = other548.lastHeartbeatTime; - __isset = other548.__isset; - return *this; -} -void TxnInfo::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "TxnInfo("; - out << "id=" << to_string(id); - out << ", " << "state=" << to_string(state); - out << ", " << "user=" << to_string(user); - out << ", " << "hostname=" << to_string(hostname); - out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "")); - out << ", " << "heartbeatCount="; (__isset.heartbeatCount ? (out << to_string(heartbeatCount)) : (out << "")); - out << ", " << "metaInfo="; (__isset.metaInfo ? (out << to_string(metaInfo)) : (out << "")); - out << ", " << "startedTime="; (__isset.startedTime ? (out << to_string(startedTime)) : (out << "")); - out << ", " << "lastHeartbeatTime="; (__isset.lastHeartbeatTime ? (out << to_string(lastHeartbeatTime)) : (out << "")); - out << ")"; -} - - -GetOpenTxnsInfoResponse::~GetOpenTxnsInfoResponse() throw() { -} - - -void GetOpenTxnsInfoResponse::__set_txn_high_water_mark(const int64_t val) { - this->txn_high_water_mark = val; -} - -void GetOpenTxnsInfoResponse::__set_open_txns(const std::vector & val) { - this->open_txns = val; -} - -uint32_t GetOpenTxnsInfoResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_txn_high_water_mark = false; - bool isset_open_txns = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->txn_high_water_mark); - isset_txn_high_water_mark = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->open_txns.clear(); - uint32_t _size549; - ::apache::thrift::protocol::TType _etype552; - xfer += iprot->readListBegin(_etype552, _size549); - this->open_txns.resize(_size549); - uint32_t _i553; - for (_i553 = 0; _i553 < _size549; ++_i553) - { - xfer += this->open_txns[_i553].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_open_txns = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_txn_high_water_mark) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_open_txns) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetOpenTxnsInfoResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetOpenTxnsInfoResponse"); - - xfer += oprot->writeFieldBegin("txn_high_water_mark", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->txn_high_water_mark); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("open_txns", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->open_txns.size())); - std::vector ::const_iterator _iter554; - for (_iter554 = this->open_txns.begin(); _iter554 != this->open_txns.end(); ++_iter554) - { - xfer += (*_iter554).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetOpenTxnsInfoResponse &a, GetOpenTxnsInfoResponse &b) { - using ::std::swap; - swap(a.txn_high_water_mark, b.txn_high_water_mark); - swap(a.open_txns, b.open_txns); -} - -GetOpenTxnsInfoResponse::GetOpenTxnsInfoResponse(const GetOpenTxnsInfoResponse& other555) { - txn_high_water_mark = other555.txn_high_water_mark; - open_txns = other555.open_txns; -} -GetOpenTxnsInfoResponse& GetOpenTxnsInfoResponse::operator=(const GetOpenTxnsInfoResponse& other556) { - txn_high_water_mark = other556.txn_high_water_mark; - open_txns = other556.open_txns; - return *this; -} -void GetOpenTxnsInfoResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetOpenTxnsInfoResponse("; - out << "txn_high_water_mark=" << to_string(txn_high_water_mark); - out << ", " << "open_txns=" << to_string(open_txns); - out << ")"; -} - - -GetOpenTxnsResponse::~GetOpenTxnsResponse() throw() { -} - - -void GetOpenTxnsResponse::__set_txn_high_water_mark(const int64_t val) { - this->txn_high_water_mark = val; -} - -void GetOpenTxnsResponse::__set_open_txns(const std::vector & val) { - this->open_txns = val; -} - -void GetOpenTxnsResponse::__set_min_open_txn(const int64_t val) { - this->min_open_txn = val; -__isset.min_open_txn = true; -} - -void GetOpenTxnsResponse::__set_abortedBits(const std::string& val) { - this->abortedBits = val; -} - -uint32_t GetOpenTxnsResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_txn_high_water_mark = false; - bool isset_open_txns = false; - bool isset_abortedBits = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->txn_high_water_mark); - isset_txn_high_water_mark = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->open_txns.clear(); - uint32_t _size557; - ::apache::thrift::protocol::TType _etype560; - xfer += iprot->readListBegin(_etype560, _size557); - this->open_txns.resize(_size557); - uint32_t _i561; - for (_i561 = 0; _i561 < _size557; ++_i561) - { - xfer += iprot->readI64(this->open_txns[_i561]); - } - xfer += iprot->readListEnd(); - } - isset_open_txns = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->min_open_txn); - this->__isset.min_open_txn = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readBinary(this->abortedBits); - isset_abortedBits = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_txn_high_water_mark) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_open_txns) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_abortedBits) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetOpenTxnsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetOpenTxnsResponse"); - - xfer += oprot->writeFieldBegin("txn_high_water_mark", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->txn_high_water_mark); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("open_txns", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->open_txns.size())); - std::vector ::const_iterator _iter562; - for (_iter562 = this->open_txns.begin(); _iter562 != this->open_txns.end(); ++_iter562) - { - xfer += oprot->writeI64((*_iter562)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.min_open_txn) { - xfer += oprot->writeFieldBegin("min_open_txn", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->min_open_txn); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("abortedBits", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeBinary(this->abortedBits); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetOpenTxnsResponse &a, GetOpenTxnsResponse &b) { - using ::std::swap; - swap(a.txn_high_water_mark, b.txn_high_water_mark); - swap(a.open_txns, b.open_txns); - swap(a.min_open_txn, b.min_open_txn); - swap(a.abortedBits, b.abortedBits); - swap(a.__isset, b.__isset); -} - -GetOpenTxnsResponse::GetOpenTxnsResponse(const GetOpenTxnsResponse& other563) { - txn_high_water_mark = other563.txn_high_water_mark; - open_txns = other563.open_txns; - min_open_txn = other563.min_open_txn; - abortedBits = other563.abortedBits; - __isset = other563.__isset; -} -GetOpenTxnsResponse& GetOpenTxnsResponse::operator=(const GetOpenTxnsResponse& other564) { - txn_high_water_mark = other564.txn_high_water_mark; - open_txns = other564.open_txns; - min_open_txn = other564.min_open_txn; - abortedBits = other564.abortedBits; - __isset = other564.__isset; - return *this; -} -void GetOpenTxnsResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetOpenTxnsResponse("; - out << "txn_high_water_mark=" << to_string(txn_high_water_mark); - out << ", " << "open_txns=" << to_string(open_txns); - out << ", " << "min_open_txn="; (__isset.min_open_txn ? (out << to_string(min_open_txn)) : (out << "")); - out << ", " << "abortedBits=" << to_string(abortedBits); - out << ")"; -} - - -OpenTxnRequest::~OpenTxnRequest() throw() { -} - - -void OpenTxnRequest::__set_num_txns(const int32_t val) { - this->num_txns = val; -} - -void OpenTxnRequest::__set_user(const std::string& val) { - this->user = val; -} - -void OpenTxnRequest::__set_hostname(const std::string& val) { - this->hostname = val; -} - -void OpenTxnRequest::__set_agentInfo(const std::string& val) { - this->agentInfo = val; -__isset.agentInfo = true; -} - -uint32_t OpenTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_num_txns = false; - bool isset_user = false; - bool isset_hostname = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->num_txns); - isset_num_txns = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user); - isset_user = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hostname); - isset_hostname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->agentInfo); - this->__isset.agentInfo = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_num_txns) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_user) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_hostname) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t OpenTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("OpenTxnRequest"); - - xfer += oprot->writeFieldBegin("num_txns", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->num_txns); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->user); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->hostname); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.agentInfo) { - xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->agentInfo); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(OpenTxnRequest &a, OpenTxnRequest &b) { - using ::std::swap; - swap(a.num_txns, b.num_txns); - swap(a.user, b.user); - swap(a.hostname, b.hostname); - swap(a.agentInfo, b.agentInfo); - swap(a.__isset, b.__isset); -} - -OpenTxnRequest::OpenTxnRequest(const OpenTxnRequest& other565) { - num_txns = other565.num_txns; - user = other565.user; - hostname = other565.hostname; - agentInfo = other565.agentInfo; - __isset = other565.__isset; -} -OpenTxnRequest& OpenTxnRequest::operator=(const OpenTxnRequest& other566) { - num_txns = other566.num_txns; - user = other566.user; - hostname = other566.hostname; - agentInfo = other566.agentInfo; - __isset = other566.__isset; - return *this; -} -void OpenTxnRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "OpenTxnRequest("; - out << "num_txns=" << to_string(num_txns); - out << ", " << "user=" << to_string(user); - out << ", " << "hostname=" << to_string(hostname); - out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "")); - out << ")"; -} - - -OpenTxnsResponse::~OpenTxnsResponse() throw() { -} - - -void OpenTxnsResponse::__set_txn_ids(const std::vector & val) { - this->txn_ids = val; -} - -uint32_t OpenTxnsResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_txn_ids = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->txn_ids.clear(); - uint32_t _size567; - ::apache::thrift::protocol::TType _etype570; - xfer += iprot->readListBegin(_etype570, _size567); - this->txn_ids.resize(_size567); - uint32_t _i571; - for (_i571 = 0; _i571 < _size567; ++_i571) - { - xfer += iprot->readI64(this->txn_ids[_i571]); - } - xfer += iprot->readListEnd(); - } - isset_txn_ids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_txn_ids) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t OpenTxnsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("OpenTxnsResponse"); - - xfer += oprot->writeFieldBegin("txn_ids", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->txn_ids.size())); - std::vector ::const_iterator _iter572; - for (_iter572 = this->txn_ids.begin(); _iter572 != this->txn_ids.end(); ++_iter572) - { - xfer += oprot->writeI64((*_iter572)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(OpenTxnsResponse &a, OpenTxnsResponse &b) { - using ::std::swap; - swap(a.txn_ids, b.txn_ids); -} - -OpenTxnsResponse::OpenTxnsResponse(const OpenTxnsResponse& other573) { - txn_ids = other573.txn_ids; -} -OpenTxnsResponse& OpenTxnsResponse::operator=(const OpenTxnsResponse& other574) { - txn_ids = other574.txn_ids; - return *this; -} -void OpenTxnsResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "OpenTxnsResponse("; - out << "txn_ids=" << to_string(txn_ids); - out << ")"; -} - - -AbortTxnRequest::~AbortTxnRequest() throw() { -} - - -void AbortTxnRequest::__set_txnid(const int64_t val) { - this->txnid = val; -} - -uint32_t AbortTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_txnid = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->txnid); - isset_txnid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_txnid) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t AbortTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("AbortTxnRequest"); - - xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->txnid); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(AbortTxnRequest &a, AbortTxnRequest &b) { - using ::std::swap; - swap(a.txnid, b.txnid); -} - -AbortTxnRequest::AbortTxnRequest(const AbortTxnRequest& other575) { - txnid = other575.txnid; -} -AbortTxnRequest& AbortTxnRequest::operator=(const AbortTxnRequest& other576) { - txnid = other576.txnid; - return *this; -} -void AbortTxnRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "AbortTxnRequest("; - out << "txnid=" << to_string(txnid); - out << ")"; -} - - -AbortTxnsRequest::~AbortTxnsRequest() throw() { -} - - -void AbortTxnsRequest::__set_txn_ids(const std::vector & val) { - this->txn_ids = val; -} - -uint32_t AbortTxnsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_txn_ids = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->txn_ids.clear(); - uint32_t _size577; - ::apache::thrift::protocol::TType _etype580; - xfer += iprot->readListBegin(_etype580, _size577); - this->txn_ids.resize(_size577); - uint32_t _i581; - for (_i581 = 0; _i581 < _size577; ++_i581) - { - xfer += iprot->readI64(this->txn_ids[_i581]); - } - xfer += iprot->readListEnd(); - } - isset_txn_ids = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_txn_ids) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t AbortTxnsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("AbortTxnsRequest"); - - xfer += oprot->writeFieldBegin("txn_ids", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->txn_ids.size())); - std::vector ::const_iterator _iter582; - for (_iter582 = this->txn_ids.begin(); _iter582 != this->txn_ids.end(); ++_iter582) - { - xfer += oprot->writeI64((*_iter582)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(AbortTxnsRequest &a, AbortTxnsRequest &b) { - using ::std::swap; - swap(a.txn_ids, b.txn_ids); -} - -AbortTxnsRequest::AbortTxnsRequest(const AbortTxnsRequest& other583) { - txn_ids = other583.txn_ids; -} -AbortTxnsRequest& AbortTxnsRequest::operator=(const AbortTxnsRequest& other584) { - txn_ids = other584.txn_ids; - return *this; -} -void AbortTxnsRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "AbortTxnsRequest("; - out << "txn_ids=" << to_string(txn_ids); - out << ")"; -} - - -CommitTxnRequest::~CommitTxnRequest() throw() { -} - - -void CommitTxnRequest::__set_txnid(const int64_t val) { - this->txnid = val; -} - -uint32_t CommitTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_txnid = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->txnid); - isset_txnid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_txnid) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t CommitTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("CommitTxnRequest"); - - xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->txnid); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(CommitTxnRequest &a, CommitTxnRequest &b) { - using ::std::swap; - swap(a.txnid, b.txnid); -} - -CommitTxnRequest::CommitTxnRequest(const CommitTxnRequest& other585) { - txnid = other585.txnid; -} -CommitTxnRequest& CommitTxnRequest::operator=(const CommitTxnRequest& other586) { - txnid = other586.txnid; - return *this; -} -void CommitTxnRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "CommitTxnRequest("; - out << "txnid=" << to_string(txnid); - out << ")"; -} - - -LockComponent::~LockComponent() throw() { -} - - -void LockComponent::__set_type(const LockType::type val) { - this->type = val; -} - -void LockComponent::__set_level(const LockLevel::type val) { - this->level = val; -} - -void LockComponent::__set_dbname(const std::string& val) { - this->dbname = val; -} - -void LockComponent::__set_tablename(const std::string& val) { - this->tablename = val; -__isset.tablename = true; -} - -void LockComponent::__set_partitionname(const std::string& val) { - this->partitionname = val; -__isset.partitionname = true; -} - -void LockComponent::__set_operationType(const DataOperationType::type val) { - this->operationType = val; -__isset.operationType = true; -} - -void LockComponent::__set_isAcid(const bool val) { - this->isAcid = val; -__isset.isAcid = true; -} - -void LockComponent::__set_isDynamicPartitionWrite(const bool val) { - this->isDynamicPartitionWrite = val; -__isset.isDynamicPartitionWrite = true; -} - -uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_type = false; - bool isset_level = false; - bool isset_dbname = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast587; - xfer += iprot->readI32(ecast587); - this->type = (LockType::type)ecast587; - isset_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast588; - xfer += iprot->readI32(ecast588); - this->level = (LockLevel::type)ecast588; - isset_level = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - isset_dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tablename); - this->__isset.tablename = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->partitionname); - this->__isset.partitionname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast589; - xfer += iprot->readI32(ecast589); - this->operationType = (DataOperationType::type)ecast589; - this->__isset.operationType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->isAcid); - this->__isset.isAcid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->isDynamicPartitionWrite); - this->__isset.isDynamicPartitionWrite = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_type) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_level) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_dbname) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t LockComponent::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("LockComponent"); - - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->type); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("level", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->level); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->dbname); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.tablename) { - xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->tablename); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.partitionname) { - xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->partitionname); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.operationType) { - xfer += oprot->writeFieldBegin("operationType", ::apache::thrift::protocol::T_I32, 6); - xfer += oprot->writeI32((int32_t)this->operationType); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.isAcid) { - xfer += oprot->writeFieldBegin("isAcid", ::apache::thrift::protocol::T_BOOL, 7); - xfer += oprot->writeBool(this->isAcid); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.isDynamicPartitionWrite) { - xfer += oprot->writeFieldBegin("isDynamicPartitionWrite", ::apache::thrift::protocol::T_BOOL, 8); - xfer += oprot->writeBool(this->isDynamicPartitionWrite); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(LockComponent &a, LockComponent &b) { - using ::std::swap; - swap(a.type, b.type); - swap(a.level, b.level); - swap(a.dbname, b.dbname); - swap(a.tablename, b.tablename); - swap(a.partitionname, b.partitionname); - swap(a.operationType, b.operationType); - swap(a.isAcid, b.isAcid); - swap(a.isDynamicPartitionWrite, b.isDynamicPartitionWrite); - swap(a.__isset, b.__isset); -} - -LockComponent::LockComponent(const LockComponent& other590) { - type = other590.type; - level = other590.level; - dbname = other590.dbname; - tablename = other590.tablename; - partitionname = other590.partitionname; - operationType = other590.operationType; - isAcid = other590.isAcid; - isDynamicPartitionWrite = other590.isDynamicPartitionWrite; - __isset = other590.__isset; -} -LockComponent& LockComponent::operator=(const LockComponent& other591) { - type = other591.type; - level = other591.level; - dbname = other591.dbname; - tablename = other591.tablename; - partitionname = other591.partitionname; - operationType = other591.operationType; - isAcid = other591.isAcid; - isDynamicPartitionWrite = other591.isDynamicPartitionWrite; - __isset = other591.__isset; - return *this; -} -void LockComponent::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "LockComponent("; - out << "type=" << to_string(type); - out << ", " << "level=" << to_string(level); - out << ", " << "dbname=" << to_string(dbname); - out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "")); - out << ", " << "partitionname="; (__isset.partitionname ? (out << to_string(partitionname)) : (out << "")); - out << ", " << "operationType="; (__isset.operationType ? (out << to_string(operationType)) : (out << "")); - out << ", " << "isAcid="; (__isset.isAcid ? (out << to_string(isAcid)) : (out << "")); - out << ", " << "isDynamicPartitionWrite="; (__isset.isDynamicPartitionWrite ? (out << to_string(isDynamicPartitionWrite)) : (out << "")); - out << ")"; -} - - -LockRequest::~LockRequest() throw() { -} - - -void LockRequest::__set_component(const std::vector & val) { - this->component = val; -} - -void LockRequest::__set_txnid(const int64_t val) { - this->txnid = val; -__isset.txnid = true; -} - -void LockRequest::__set_user(const std::string& val) { - this->user = val; -} - -void LockRequest::__set_hostname(const std::string& val) { - this->hostname = val; -} - -void LockRequest::__set_agentInfo(const std::string& val) { - this->agentInfo = val; -__isset.agentInfo = true; -} - -uint32_t LockRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_component = false; - bool isset_user = false; - bool isset_hostname = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->component.clear(); - uint32_t _size592; - ::apache::thrift::protocol::TType _etype595; - xfer += iprot->readListBegin(_etype595, _size592); - this->component.resize(_size592); - uint32_t _i596; - for (_i596 = 0; _i596 < _size592; ++_i596) - { - xfer += this->component[_i596].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_component = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->txnid); - this->__isset.txnid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user); - isset_user = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hostname); - isset_hostname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->agentInfo); - this->__isset.agentInfo = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_component) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_user) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_hostname) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t LockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("LockRequest"); - - xfer += oprot->writeFieldBegin("component", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->component.size())); - std::vector ::const_iterator _iter597; - for (_iter597 = this->component.begin(); _iter597 != this->component.end(); ++_iter597) - { - xfer += (*_iter597).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.txnid) { - xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->txnid); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->user); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->hostname); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.agentInfo) { - xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->agentInfo); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(LockRequest &a, LockRequest &b) { - using ::std::swap; - swap(a.component, b.component); - swap(a.txnid, b.txnid); - swap(a.user, b.user); - swap(a.hostname, b.hostname); - swap(a.agentInfo, b.agentInfo); - swap(a.__isset, b.__isset); -} - -LockRequest::LockRequest(const LockRequest& other598) { - component = other598.component; - txnid = other598.txnid; - user = other598.user; - hostname = other598.hostname; - agentInfo = other598.agentInfo; - __isset = other598.__isset; -} -LockRequest& LockRequest::operator=(const LockRequest& other599) { - component = other599.component; - txnid = other599.txnid; - user = other599.user; - hostname = other599.hostname; - agentInfo = other599.agentInfo; - __isset = other599.__isset; - return *this; -} -void LockRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "LockRequest("; - out << "component=" << to_string(component); - out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "")); - out << ", " << "user=" << to_string(user); - out << ", " << "hostname=" << to_string(hostname); - out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "")); - out << ")"; -} - - -LockResponse::~LockResponse() throw() { -} - - -void LockResponse::__set_lockid(const int64_t val) { - this->lockid = val; -} - -void LockResponse::__set_state(const LockState::type val) { - this->state = val; -} - -uint32_t LockResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_lockid = false; - bool isset_state = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->lockid); - isset_lockid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast600; - xfer += iprot->readI32(ecast600); - this->state = (LockState::type)ecast600; - isset_state = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_lockid) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_state) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t LockResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("LockResponse"); - - xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->lockid); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->state); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(LockResponse &a, LockResponse &b) { - using ::std::swap; - swap(a.lockid, b.lockid); - swap(a.state, b.state); -} - -LockResponse::LockResponse(const LockResponse& other601) { - lockid = other601.lockid; - state = other601.state; -} -LockResponse& LockResponse::operator=(const LockResponse& other602) { - lockid = other602.lockid; - state = other602.state; - return *this; -} -void LockResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "LockResponse("; - out << "lockid=" << to_string(lockid); - out << ", " << "state=" << to_string(state); - out << ")"; -} - - -CheckLockRequest::~CheckLockRequest() throw() { -} - - -void CheckLockRequest::__set_lockid(const int64_t val) { - this->lockid = val; -} - -void CheckLockRequest::__set_txnid(const int64_t val) { - this->txnid = val; -__isset.txnid = true; -} - -void CheckLockRequest::__set_elapsed_ms(const int64_t val) { - this->elapsed_ms = val; -__isset.elapsed_ms = true; -} - -uint32_t CheckLockRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_lockid = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->lockid); - isset_lockid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->txnid); - this->__isset.txnid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->elapsed_ms); - this->__isset.elapsed_ms = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_lockid) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t CheckLockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("CheckLockRequest"); - - xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->lockid); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.txnid) { - xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->txnid); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.elapsed_ms) { - xfer += oprot->writeFieldBegin("elapsed_ms", ::apache::thrift::protocol::T_I64, 3); - xfer += oprot->writeI64(this->elapsed_ms); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(CheckLockRequest &a, CheckLockRequest &b) { - using ::std::swap; - swap(a.lockid, b.lockid); - swap(a.txnid, b.txnid); - swap(a.elapsed_ms, b.elapsed_ms); - swap(a.__isset, b.__isset); -} - -CheckLockRequest::CheckLockRequest(const CheckLockRequest& other603) { - lockid = other603.lockid; - txnid = other603.txnid; - elapsed_ms = other603.elapsed_ms; - __isset = other603.__isset; -} -CheckLockRequest& CheckLockRequest::operator=(const CheckLockRequest& other604) { - lockid = other604.lockid; - txnid = other604.txnid; - elapsed_ms = other604.elapsed_ms; - __isset = other604.__isset; - return *this; -} -void CheckLockRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "CheckLockRequest("; - out << "lockid=" << to_string(lockid); - out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "")); - out << ", " << "elapsed_ms="; (__isset.elapsed_ms ? (out << to_string(elapsed_ms)) : (out << "")); - out << ")"; -} - - -UnlockRequest::~UnlockRequest() throw() { -} - - -void UnlockRequest::__set_lockid(const int64_t val) { - this->lockid = val; -} - -uint32_t UnlockRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_lockid = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->lockid); - isset_lockid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_lockid) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t UnlockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("UnlockRequest"); - - xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->lockid); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(UnlockRequest &a, UnlockRequest &b) { - using ::std::swap; - swap(a.lockid, b.lockid); -} - -UnlockRequest::UnlockRequest(const UnlockRequest& other605) { - lockid = other605.lockid; -} -UnlockRequest& UnlockRequest::operator=(const UnlockRequest& other606) { - lockid = other606.lockid; - return *this; -} -void UnlockRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "UnlockRequest("; - out << "lockid=" << to_string(lockid); - out << ")"; -} - - -ShowLocksRequest::~ShowLocksRequest() throw() { -} - - -void ShowLocksRequest::__set_dbname(const std::string& val) { - this->dbname = val; -__isset.dbname = true; -} - -void ShowLocksRequest::__set_tablename(const std::string& val) { - this->tablename = val; -__isset.tablename = true; -} - -void ShowLocksRequest::__set_partname(const std::string& val) { - this->partname = val; -__isset.partname = true; -} - -void ShowLocksRequest::__set_isExtended(const bool val) { - this->isExtended = val; -__isset.isExtended = true; -} - -uint32_t ShowLocksRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tablename); - this->__isset.tablename = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->partname); - this->__isset.partname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->isExtended); - this->__isset.isExtended = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ShowLocksRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ShowLocksRequest"); - - if (this->__isset.dbname) { - xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbname); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.tablename) { - xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tablename); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.partname) { - xfer += oprot->writeFieldBegin("partname", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->partname); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.isExtended) { - xfer += oprot->writeFieldBegin("isExtended", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->isExtended); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ShowLocksRequest &a, ShowLocksRequest &b) { - using ::std::swap; - swap(a.dbname, b.dbname); - swap(a.tablename, b.tablename); - swap(a.partname, b.partname); - swap(a.isExtended, b.isExtended); - swap(a.__isset, b.__isset); -} - -ShowLocksRequest::ShowLocksRequest(const ShowLocksRequest& other607) { - dbname = other607.dbname; - tablename = other607.tablename; - partname = other607.partname; - isExtended = other607.isExtended; - __isset = other607.__isset; -} -ShowLocksRequest& ShowLocksRequest::operator=(const ShowLocksRequest& other608) { - dbname = other608.dbname; - tablename = other608.tablename; - partname = other608.partname; - isExtended = other608.isExtended; - __isset = other608.__isset; - return *this; -} -void ShowLocksRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ShowLocksRequest("; - out << "dbname="; (__isset.dbname ? (out << to_string(dbname)) : (out << "")); - out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "")); - out << ", " << "partname="; (__isset.partname ? (out << to_string(partname)) : (out << "")); - out << ", " << "isExtended="; (__isset.isExtended ? (out << to_string(isExtended)) : (out << "")); - out << ")"; -} - - -ShowLocksResponseElement::~ShowLocksResponseElement() throw() { -} - - -void ShowLocksResponseElement::__set_lockid(const int64_t val) { - this->lockid = val; -} - -void ShowLocksResponseElement::__set_dbname(const std::string& val) { - this->dbname = val; -} - -void ShowLocksResponseElement::__set_tablename(const std::string& val) { - this->tablename = val; -__isset.tablename = true; -} - -void ShowLocksResponseElement::__set_partname(const std::string& val) { - this->partname = val; -__isset.partname = true; -} - -void ShowLocksResponseElement::__set_state(const LockState::type val) { - this->state = val; -} - -void ShowLocksResponseElement::__set_type(const LockType::type val) { - this->type = val; -} - -void ShowLocksResponseElement::__set_txnid(const int64_t val) { - this->txnid = val; -__isset.txnid = true; -} - -void ShowLocksResponseElement::__set_lastheartbeat(const int64_t val) { - this->lastheartbeat = val; -} - -void ShowLocksResponseElement::__set_acquiredat(const int64_t val) { - this->acquiredat = val; -__isset.acquiredat = true; -} - -void ShowLocksResponseElement::__set_user(const std::string& val) { - this->user = val; -} - -void ShowLocksResponseElement::__set_hostname(const std::string& val) { - this->hostname = val; -} - -void ShowLocksResponseElement::__set_heartbeatCount(const int32_t val) { - this->heartbeatCount = val; -__isset.heartbeatCount = true; -} - -void ShowLocksResponseElement::__set_agentInfo(const std::string& val) { - this->agentInfo = val; -__isset.agentInfo = true; -} - -void ShowLocksResponseElement::__set_blockedByExtId(const int64_t val) { - this->blockedByExtId = val; -__isset.blockedByExtId = true; -} - -void ShowLocksResponseElement::__set_blockedByIntId(const int64_t val) { - this->blockedByIntId = val; -__isset.blockedByIntId = true; -} - -void ShowLocksResponseElement::__set_lockIdInternal(const int64_t val) { - this->lockIdInternal = val; -__isset.lockIdInternal = true; -} - -uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_lockid = false; - bool isset_dbname = false; - bool isset_state = false; - bool isset_type = false; - bool isset_lastheartbeat = false; - bool isset_user = false; - bool isset_hostname = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->lockid); - isset_lockid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - isset_dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tablename); - this->__isset.tablename = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->partname); - this->__isset.partname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast609; - xfer += iprot->readI32(ecast609); - this->state = (LockState::type)ecast609; - isset_state = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast610; - xfer += iprot->readI32(ecast610); - this->type = (LockType::type)ecast610; - isset_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->txnid); - this->__isset.txnid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->lastheartbeat); - isset_lastheartbeat = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->acquiredat); - this->__isset.acquiredat = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user); - isset_user = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 11: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hostname); - isset_hostname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 12: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->heartbeatCount); - this->__isset.heartbeatCount = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 13: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->agentInfo); - this->__isset.agentInfo = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 14: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->blockedByExtId); - this->__isset.blockedByExtId = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 15: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->blockedByIntId); - this->__isset.blockedByIntId = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 16: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->lockIdInternal); - this->__isset.lockIdInternal = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_lockid) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_dbname) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_state) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_type) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_lastheartbeat) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_user) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_hostname) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t ShowLocksResponseElement::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ShowLocksResponseElement"); - - xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->lockid); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->dbname); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.tablename) { - xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->tablename); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.partname) { - xfer += oprot->writeFieldBegin("partname", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->partname); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32((int32_t)this->state); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 6); - xfer += oprot->writeI32((int32_t)this->type); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.txnid) { - xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 7); - xfer += oprot->writeI64(this->txnid); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("lastheartbeat", ::apache::thrift::protocol::T_I64, 8); - xfer += oprot->writeI64(this->lastheartbeat); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.acquiredat) { - xfer += oprot->writeFieldBegin("acquiredat", ::apache::thrift::protocol::T_I64, 9); - xfer += oprot->writeI64(this->acquiredat); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 10); - xfer += oprot->writeString(this->user); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 11); - xfer += oprot->writeString(this->hostname); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.heartbeatCount) { - xfer += oprot->writeFieldBegin("heartbeatCount", ::apache::thrift::protocol::T_I32, 12); - xfer += oprot->writeI32(this->heartbeatCount); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.agentInfo) { - xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 13); - xfer += oprot->writeString(this->agentInfo); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.blockedByExtId) { - xfer += oprot->writeFieldBegin("blockedByExtId", ::apache::thrift::protocol::T_I64, 14); - xfer += oprot->writeI64(this->blockedByExtId); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.blockedByIntId) { - xfer += oprot->writeFieldBegin("blockedByIntId", ::apache::thrift::protocol::T_I64, 15); - xfer += oprot->writeI64(this->blockedByIntId); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.lockIdInternal) { - xfer += oprot->writeFieldBegin("lockIdInternal", ::apache::thrift::protocol::T_I64, 16); - xfer += oprot->writeI64(this->lockIdInternal); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ShowLocksResponseElement &a, ShowLocksResponseElement &b) { - using ::std::swap; - swap(a.lockid, b.lockid); - swap(a.dbname, b.dbname); - swap(a.tablename, b.tablename); - swap(a.partname, b.partname); - swap(a.state, b.state); - swap(a.type, b.type); - swap(a.txnid, b.txnid); - swap(a.lastheartbeat, b.lastheartbeat); - swap(a.acquiredat, b.acquiredat); - swap(a.user, b.user); - swap(a.hostname, b.hostname); - swap(a.heartbeatCount, b.heartbeatCount); - swap(a.agentInfo, b.agentInfo); - swap(a.blockedByExtId, b.blockedByExtId); - swap(a.blockedByIntId, b.blockedByIntId); - swap(a.lockIdInternal, b.lockIdInternal); - swap(a.__isset, b.__isset); -} - -ShowLocksResponseElement::ShowLocksResponseElement(const ShowLocksResponseElement& other611) { - lockid = other611.lockid; - dbname = other611.dbname; - tablename = other611.tablename; - partname = other611.partname; - state = other611.state; - type = other611.type; - txnid = other611.txnid; - lastheartbeat = other611.lastheartbeat; - acquiredat = other611.acquiredat; - user = other611.user; - hostname = other611.hostname; - heartbeatCount = other611.heartbeatCount; - agentInfo = other611.agentInfo; - blockedByExtId = other611.blockedByExtId; - blockedByIntId = other611.blockedByIntId; - lockIdInternal = other611.lockIdInternal; - __isset = other611.__isset; -} -ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksResponseElement& other612) { - lockid = other612.lockid; - dbname = other612.dbname; - tablename = other612.tablename; - partname = other612.partname; - state = other612.state; - type = other612.type; - txnid = other612.txnid; - lastheartbeat = other612.lastheartbeat; - acquiredat = other612.acquiredat; - user = other612.user; - hostname = other612.hostname; - heartbeatCount = other612.heartbeatCount; - agentInfo = other612.agentInfo; - blockedByExtId = other612.blockedByExtId; - blockedByIntId = other612.blockedByIntId; - lockIdInternal = other612.lockIdInternal; - __isset = other612.__isset; - return *this; -} -void ShowLocksResponseElement::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ShowLocksResponseElement("; - out << "lockid=" << to_string(lockid); - out << ", " << "dbname=" << to_string(dbname); - out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "")); - out << ", " << "partname="; (__isset.partname ? (out << to_string(partname)) : (out << "")); - out << ", " << "state=" << to_string(state); - out << ", " << "type=" << to_string(type); - out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "")); - out << ", " << "lastheartbeat=" << to_string(lastheartbeat); - out << ", " << "acquiredat="; (__isset.acquiredat ? (out << to_string(acquiredat)) : (out << "")); - out << ", " << "user=" << to_string(user); - out << ", " << "hostname=" << to_string(hostname); - out << ", " << "heartbeatCount="; (__isset.heartbeatCount ? (out << to_string(heartbeatCount)) : (out << "")); - out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "")); - out << ", " << "blockedByExtId="; (__isset.blockedByExtId ? (out << to_string(blockedByExtId)) : (out << "")); - out << ", " << "blockedByIntId="; (__isset.blockedByIntId ? (out << to_string(blockedByIntId)) : (out << "")); - out << ", " << "lockIdInternal="; (__isset.lockIdInternal ? (out << to_string(lockIdInternal)) : (out << "")); - out << ")"; -} - - -ShowLocksResponse::~ShowLocksResponse() throw() { -} - - -void ShowLocksResponse::__set_locks(const std::vector & val) { - this->locks = val; -} - -uint32_t ShowLocksResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->locks.clear(); - uint32_t _size613; - ::apache::thrift::protocol::TType _etype616; - xfer += iprot->readListBegin(_etype616, _size613); - this->locks.resize(_size613); - uint32_t _i617; - for (_i617 = 0; _i617 < _size613; ++_i617) - { - xfer += this->locks[_i617].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.locks = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ShowLocksResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ShowLocksResponse"); - - xfer += oprot->writeFieldBegin("locks", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->locks.size())); - std::vector ::const_iterator _iter618; - for (_iter618 = this->locks.begin(); _iter618 != this->locks.end(); ++_iter618) - { - xfer += (*_iter618).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ShowLocksResponse &a, ShowLocksResponse &b) { - using ::std::swap; - swap(a.locks, b.locks); - swap(a.__isset, b.__isset); -} - -ShowLocksResponse::ShowLocksResponse(const ShowLocksResponse& other619) { - locks = other619.locks; - __isset = other619.__isset; -} -ShowLocksResponse& ShowLocksResponse::operator=(const ShowLocksResponse& other620) { - locks = other620.locks; - __isset = other620.__isset; - return *this; -} -void ShowLocksResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ShowLocksResponse("; - out << "locks=" << to_string(locks); - out << ")"; -} - - -HeartbeatRequest::~HeartbeatRequest() throw() { -} - - -void HeartbeatRequest::__set_lockid(const int64_t val) { - this->lockid = val; -__isset.lockid = true; -} - -void HeartbeatRequest::__set_txnid(const int64_t val) { - this->txnid = val; -__isset.txnid = true; -} - -uint32_t HeartbeatRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->lockid); - this->__isset.lockid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->txnid); - this->__isset.txnid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t HeartbeatRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("HeartbeatRequest"); - - if (this->__isset.lockid) { - xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->lockid); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.txnid) { - xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->txnid); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(HeartbeatRequest &a, HeartbeatRequest &b) { - using ::std::swap; - swap(a.lockid, b.lockid); - swap(a.txnid, b.txnid); - swap(a.__isset, b.__isset); -} - -HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& other621) { - lockid = other621.lockid; - txnid = other621.txnid; - __isset = other621.__isset; -} -HeartbeatRequest& HeartbeatRequest::operator=(const HeartbeatRequest& other622) { - lockid = other622.lockid; - txnid = other622.txnid; - __isset = other622.__isset; - return *this; -} -void HeartbeatRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "HeartbeatRequest("; - out << "lockid="; (__isset.lockid ? (out << to_string(lockid)) : (out << "")); - out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "")); - out << ")"; -} - - -HeartbeatTxnRangeRequest::~HeartbeatTxnRangeRequest() throw() { -} - - -void HeartbeatTxnRangeRequest::__set_min(const int64_t val) { - this->min = val; -} - -void HeartbeatTxnRangeRequest::__set_max(const int64_t val) { - this->max = val; -} - -uint32_t HeartbeatTxnRangeRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_min = false; - bool isset_max = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->min); - isset_min = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->max); - isset_max = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_min) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_max) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t HeartbeatTxnRangeRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("HeartbeatTxnRangeRequest"); - - xfer += oprot->writeFieldBegin("min", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->min); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("max", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->max); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(HeartbeatTxnRangeRequest &a, HeartbeatTxnRangeRequest &b) { - using ::std::swap; - swap(a.min, b.min); - swap(a.max, b.max); -} - -HeartbeatTxnRangeRequest::HeartbeatTxnRangeRequest(const HeartbeatTxnRangeRequest& other623) { - min = other623.min; - max = other623.max; -} -HeartbeatTxnRangeRequest& HeartbeatTxnRangeRequest::operator=(const HeartbeatTxnRangeRequest& other624) { - min = other624.min; - max = other624.max; - return *this; -} -void HeartbeatTxnRangeRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "HeartbeatTxnRangeRequest("; - out << "min=" << to_string(min); - out << ", " << "max=" << to_string(max); - out << ")"; -} - - -HeartbeatTxnRangeResponse::~HeartbeatTxnRangeResponse() throw() { -} - - -void HeartbeatTxnRangeResponse::__set_aborted(const std::set & val) { - this->aborted = val; -} - -void HeartbeatTxnRangeResponse::__set_nosuch(const std::set & val) { - this->nosuch = val; -} - -uint32_t HeartbeatTxnRangeResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_aborted = false; - bool isset_nosuch = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_SET) { - { - this->aborted.clear(); - uint32_t _size625; - ::apache::thrift::protocol::TType _etype628; - xfer += iprot->readSetBegin(_etype628, _size625); - uint32_t _i629; - for (_i629 = 0; _i629 < _size625; ++_i629) - { - int64_t _elem630; - xfer += iprot->readI64(_elem630); - this->aborted.insert(_elem630); - } - xfer += iprot->readSetEnd(); - } - isset_aborted = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_SET) { - { - this->nosuch.clear(); - uint32_t _size631; - ::apache::thrift::protocol::TType _etype634; - xfer += iprot->readSetBegin(_etype634, _size631); - uint32_t _i635; - for (_i635 = 0; _i635 < _size631; ++_i635) - { - int64_t _elem636; - xfer += iprot->readI64(_elem636); - this->nosuch.insert(_elem636); - } - xfer += iprot->readSetEnd(); - } - isset_nosuch = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_aborted) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_nosuch) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t HeartbeatTxnRangeResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("HeartbeatTxnRangeResponse"); - - xfer += oprot->writeFieldBegin("aborted", ::apache::thrift::protocol::T_SET, 1); - { - xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast(this->aborted.size())); - std::set ::const_iterator _iter637; - for (_iter637 = this->aborted.begin(); _iter637 != this->aborted.end(); ++_iter637) - { - xfer += oprot->writeI64((*_iter637)); - } - xfer += oprot->writeSetEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("nosuch", ::apache::thrift::protocol::T_SET, 2); - { - xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast(this->nosuch.size())); - std::set ::const_iterator _iter638; - for (_iter638 = this->nosuch.begin(); _iter638 != this->nosuch.end(); ++_iter638) - { - xfer += oprot->writeI64((*_iter638)); - } - xfer += oprot->writeSetEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(HeartbeatTxnRangeResponse &a, HeartbeatTxnRangeResponse &b) { - using ::std::swap; - swap(a.aborted, b.aborted); - swap(a.nosuch, b.nosuch); -} - -HeartbeatTxnRangeResponse::HeartbeatTxnRangeResponse(const HeartbeatTxnRangeResponse& other639) { - aborted = other639.aborted; - nosuch = other639.nosuch; -} -HeartbeatTxnRangeResponse& HeartbeatTxnRangeResponse::operator=(const HeartbeatTxnRangeResponse& other640) { - aborted = other640.aborted; - nosuch = other640.nosuch; - return *this; -} -void HeartbeatTxnRangeResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "HeartbeatTxnRangeResponse("; - out << "aborted=" << to_string(aborted); - out << ", " << "nosuch=" << to_string(nosuch); - out << ")"; -} - - -CompactionRequest::~CompactionRequest() throw() { -} - - -void CompactionRequest::__set_dbname(const std::string& val) { - this->dbname = val; -} - -void CompactionRequest::__set_tablename(const std::string& val) { - this->tablename = val; -} - -void CompactionRequest::__set_partitionname(const std::string& val) { - this->partitionname = val; -__isset.partitionname = true; -} - -void CompactionRequest::__set_type(const CompactionType::type val) { - this->type = val; -} - -void CompactionRequest::__set_runas(const std::string& val) { - this->runas = val; -__isset.runas = true; -} - -void CompactionRequest::__set_properties(const std::map & val) { - this->properties = val; -__isset.properties = true; -} - -uint32_t CompactionRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dbname = false; - bool isset_tablename = false; - bool isset_type = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - isset_dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tablename); - isset_tablename = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->partitionname); - this->__isset.partitionname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast641; - xfer += iprot->readI32(ecast641); - this->type = (CompactionType::type)ecast641; - isset_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->runas); - this->__isset.runas = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->properties.clear(); - uint32_t _size642; - ::apache::thrift::protocol::TType _ktype643; - ::apache::thrift::protocol::TType _vtype644; - xfer += iprot->readMapBegin(_ktype643, _vtype644, _size642); - uint32_t _i646; - for (_i646 = 0; _i646 < _size642; ++_i646) - { - std::string _key647; - xfer += iprot->readString(_key647); - std::string& _val648 = this->properties[_key647]; - xfer += iprot->readString(_val648); - } - xfer += iprot->readMapEnd(); - } - this->__isset.properties = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dbname) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tablename) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_type) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t CompactionRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("CompactionRequest"); - - xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbname); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tablename); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.partitionname) { - xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->partitionname); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32((int32_t)this->type); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.runas) { - xfer += oprot->writeFieldBegin("runas", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->runas); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.properties) { - xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 6); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->properties.size())); - std::map ::const_iterator _iter649; - for (_iter649 = this->properties.begin(); _iter649 != this->properties.end(); ++_iter649) - { - xfer += oprot->writeString(_iter649->first); - xfer += oprot->writeString(_iter649->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(CompactionRequest &a, CompactionRequest &b) { - using ::std::swap; - swap(a.dbname, b.dbname); - swap(a.tablename, b.tablename); - swap(a.partitionname, b.partitionname); - swap(a.type, b.type); - swap(a.runas, b.runas); - swap(a.properties, b.properties); - swap(a.__isset, b.__isset); -} - -CompactionRequest::CompactionRequest(const CompactionRequest& other650) { - dbname = other650.dbname; - tablename = other650.tablename; - partitionname = other650.partitionname; - type = other650.type; - runas = other650.runas; - properties = other650.properties; - __isset = other650.__isset; -} -CompactionRequest& CompactionRequest::operator=(const CompactionRequest& other651) { - dbname = other651.dbname; - tablename = other651.tablename; - partitionname = other651.partitionname; - type = other651.type; - runas = other651.runas; - properties = other651.properties; - __isset = other651.__isset; - return *this; -} -void CompactionRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "CompactionRequest("; - out << "dbname=" << to_string(dbname); - out << ", " << "tablename=" << to_string(tablename); - out << ", " << "partitionname="; (__isset.partitionname ? (out << to_string(partitionname)) : (out << "")); - out << ", " << "type=" << to_string(type); - out << ", " << "runas="; (__isset.runas ? (out << to_string(runas)) : (out << "")); - out << ", " << "properties="; (__isset.properties ? (out << to_string(properties)) : (out << "")); - out << ")"; -} - - -CompactionResponse::~CompactionResponse() throw() { -} - - -void CompactionResponse::__set_id(const int64_t val) { - this->id = val; -} - -void CompactionResponse::__set_state(const std::string& val) { - this->state = val; -} - -void CompactionResponse::__set_accepted(const bool val) { - this->accepted = val; -} - -uint32_t CompactionResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_id = false; - bool isset_state = false; - bool isset_accepted = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->id); - isset_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->state); - isset_state = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->accepted); - isset_accepted = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_id) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_state) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_accepted) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t CompactionResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("CompactionResponse"); - - xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->id); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->state); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("accepted", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->accepted); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(CompactionResponse &a, CompactionResponse &b) { - using ::std::swap; - swap(a.id, b.id); - swap(a.state, b.state); - swap(a.accepted, b.accepted); -} - -CompactionResponse::CompactionResponse(const CompactionResponse& other652) { - id = other652.id; - state = other652.state; - accepted = other652.accepted; -} -CompactionResponse& CompactionResponse::operator=(const CompactionResponse& other653) { - id = other653.id; - state = other653.state; - accepted = other653.accepted; - return *this; -} -void CompactionResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "CompactionResponse("; - out << "id=" << to_string(id); - out << ", " << "state=" << to_string(state); - out << ", " << "accepted=" << to_string(accepted); - out << ")"; -} - - -ShowCompactRequest::~ShowCompactRequest() throw() { -} - - -uint32_t ShowCompactRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ShowCompactRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ShowCompactRequest"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ShowCompactRequest &a, ShowCompactRequest &b) { - using ::std::swap; - (void) a; - (void) b; -} - -ShowCompactRequest::ShowCompactRequest(const ShowCompactRequest& other654) { - (void) other654; -} -ShowCompactRequest& ShowCompactRequest::operator=(const ShowCompactRequest& other655) { - (void) other655; - return *this; -} -void ShowCompactRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ShowCompactRequest("; - out << ")"; -} - - -ShowCompactResponseElement::~ShowCompactResponseElement() throw() { -} - - -void ShowCompactResponseElement::__set_dbname(const std::string& val) { - this->dbname = val; -} - -void ShowCompactResponseElement::__set_tablename(const std::string& val) { - this->tablename = val; -} - -void ShowCompactResponseElement::__set_partitionname(const std::string& val) { - this->partitionname = val; -__isset.partitionname = true; -} - -void ShowCompactResponseElement::__set_type(const CompactionType::type val) { - this->type = val; -} - -void ShowCompactResponseElement::__set_state(const std::string& val) { - this->state = val; -} - -void ShowCompactResponseElement::__set_workerid(const std::string& val) { - this->workerid = val; -__isset.workerid = true; -} - -void ShowCompactResponseElement::__set_start(const int64_t val) { - this->start = val; -__isset.start = true; -} - -void ShowCompactResponseElement::__set_runAs(const std::string& val) { - this->runAs = val; -__isset.runAs = true; -} - -void ShowCompactResponseElement::__set_hightestTxnId(const int64_t val) { - this->hightestTxnId = val; -__isset.hightestTxnId = true; -} - -void ShowCompactResponseElement::__set_metaInfo(const std::string& val) { - this->metaInfo = val; -__isset.metaInfo = true; -} - -void ShowCompactResponseElement::__set_endTime(const int64_t val) { - this->endTime = val; -__isset.endTime = true; -} - -void ShowCompactResponseElement::__set_hadoopJobId(const std::string& val) { - this->hadoopJobId = val; -__isset.hadoopJobId = true; -} - -void ShowCompactResponseElement::__set_id(const int64_t val) { - this->id = val; -__isset.id = true; -} - -uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dbname = false; - bool isset_tablename = false; - bool isset_type = false; - bool isset_state = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - isset_dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tablename); - isset_tablename = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->partitionname); - this->__isset.partitionname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast656; - xfer += iprot->readI32(ecast656); - this->type = (CompactionType::type)ecast656; - isset_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->state); - isset_state = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->workerid); - this->__isset.workerid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->start); - this->__isset.start = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->runAs); - this->__isset.runAs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->hightestTxnId); - this->__isset.hightestTxnId = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->metaInfo); - this->__isset.metaInfo = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 11: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->endTime); - this->__isset.endTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 12: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->hadoopJobId); - this->__isset.hadoopJobId = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 13: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->id); - this->__isset.id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dbname) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tablename) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_type) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_state) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t ShowCompactResponseElement::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ShowCompactResponseElement"); - - xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbname); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tablename); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.partitionname) { - xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->partitionname); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32((int32_t)this->type); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->state); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.workerid) { - xfer += oprot->writeFieldBegin("workerid", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->workerid); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.start) { - xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_I64, 7); - xfer += oprot->writeI64(this->start); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.runAs) { - xfer += oprot->writeFieldBegin("runAs", ::apache::thrift::protocol::T_STRING, 8); - xfer += oprot->writeString(this->runAs); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.hightestTxnId) { - xfer += oprot->writeFieldBegin("hightestTxnId", ::apache::thrift::protocol::T_I64, 9); - xfer += oprot->writeI64(this->hightestTxnId); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.metaInfo) { - xfer += oprot->writeFieldBegin("metaInfo", ::apache::thrift::protocol::T_STRING, 10); - xfer += oprot->writeString(this->metaInfo); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.endTime) { - xfer += oprot->writeFieldBegin("endTime", ::apache::thrift::protocol::T_I64, 11); - xfer += oprot->writeI64(this->endTime); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.hadoopJobId) { - xfer += oprot->writeFieldBegin("hadoopJobId", ::apache::thrift::protocol::T_STRING, 12); - xfer += oprot->writeString(this->hadoopJobId); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.id) { - xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I64, 13); - xfer += oprot->writeI64(this->id); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ShowCompactResponseElement &a, ShowCompactResponseElement &b) { - using ::std::swap; - swap(a.dbname, b.dbname); - swap(a.tablename, b.tablename); - swap(a.partitionname, b.partitionname); - swap(a.type, b.type); - swap(a.state, b.state); - swap(a.workerid, b.workerid); - swap(a.start, b.start); - swap(a.runAs, b.runAs); - swap(a.hightestTxnId, b.hightestTxnId); - swap(a.metaInfo, b.metaInfo); - swap(a.endTime, b.endTime); - swap(a.hadoopJobId, b.hadoopJobId); - swap(a.id, b.id); - swap(a.__isset, b.__isset); -} - -ShowCompactResponseElement::ShowCompactResponseElement(const ShowCompactResponseElement& other657) { - dbname = other657.dbname; - tablename = other657.tablename; - partitionname = other657.partitionname; - type = other657.type; - state = other657.state; - workerid = other657.workerid; - start = other657.start; - runAs = other657.runAs; - hightestTxnId = other657.hightestTxnId; - metaInfo = other657.metaInfo; - endTime = other657.endTime; - hadoopJobId = other657.hadoopJobId; - id = other657.id; - __isset = other657.__isset; -} -ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowCompactResponseElement& other658) { - dbname = other658.dbname; - tablename = other658.tablename; - partitionname = other658.partitionname; - type = other658.type; - state = other658.state; - workerid = other658.workerid; - start = other658.start; - runAs = other658.runAs; - hightestTxnId = other658.hightestTxnId; - metaInfo = other658.metaInfo; - endTime = other658.endTime; - hadoopJobId = other658.hadoopJobId; - id = other658.id; - __isset = other658.__isset; - return *this; -} -void ShowCompactResponseElement::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ShowCompactResponseElement("; - out << "dbname=" << to_string(dbname); - out << ", " << "tablename=" << to_string(tablename); - out << ", " << "partitionname="; (__isset.partitionname ? (out << to_string(partitionname)) : (out << "")); - out << ", " << "type=" << to_string(type); - out << ", " << "state=" << to_string(state); - out << ", " << "workerid="; (__isset.workerid ? (out << to_string(workerid)) : (out << "")); - out << ", " << "start="; (__isset.start ? (out << to_string(start)) : (out << "")); - out << ", " << "runAs="; (__isset.runAs ? (out << to_string(runAs)) : (out << "")); - out << ", " << "hightestTxnId="; (__isset.hightestTxnId ? (out << to_string(hightestTxnId)) : (out << "")); - out << ", " << "metaInfo="; (__isset.metaInfo ? (out << to_string(metaInfo)) : (out << "")); - out << ", " << "endTime="; (__isset.endTime ? (out << to_string(endTime)) : (out << "")); - out << ", " << "hadoopJobId="; (__isset.hadoopJobId ? (out << to_string(hadoopJobId)) : (out << "")); - out << ", " << "id="; (__isset.id ? (out << to_string(id)) : (out << "")); - out << ")"; -} - - -ShowCompactResponse::~ShowCompactResponse() throw() { -} - - -void ShowCompactResponse::__set_compacts(const std::vector & val) { - this->compacts = val; -} - -uint32_t ShowCompactResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_compacts = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->compacts.clear(); - uint32_t _size659; - ::apache::thrift::protocol::TType _etype662; - xfer += iprot->readListBegin(_etype662, _size659); - this->compacts.resize(_size659); - uint32_t _i663; - for (_i663 = 0; _i663 < _size659; ++_i663) - { - xfer += this->compacts[_i663].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_compacts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_compacts) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t ShowCompactResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ShowCompactResponse"); - - xfer += oprot->writeFieldBegin("compacts", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->compacts.size())); - std::vector ::const_iterator _iter664; - for (_iter664 = this->compacts.begin(); _iter664 != this->compacts.end(); ++_iter664) - { - xfer += (*_iter664).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ShowCompactResponse &a, ShowCompactResponse &b) { - using ::std::swap; - swap(a.compacts, b.compacts); -} - -ShowCompactResponse::ShowCompactResponse(const ShowCompactResponse& other665) { - compacts = other665.compacts; -} -ShowCompactResponse& ShowCompactResponse::operator=(const ShowCompactResponse& other666) { - compacts = other666.compacts; - return *this; -} -void ShowCompactResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ShowCompactResponse("; - out << "compacts=" << to_string(compacts); - out << ")"; -} - - -AddDynamicPartitions::~AddDynamicPartitions() throw() { -} - - -void AddDynamicPartitions::__set_txnid(const int64_t val) { - this->txnid = val; -} - -void AddDynamicPartitions::__set_dbname(const std::string& val) { - this->dbname = val; -} - -void AddDynamicPartitions::__set_tablename(const std::string& val) { - this->tablename = val; -} - -void AddDynamicPartitions::__set_partitionnames(const std::vector & val) { - this->partitionnames = val; -} - -void AddDynamicPartitions::__set_operationType(const DataOperationType::type val) { - this->operationType = val; -__isset.operationType = true; -} - -uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_txnid = false; - bool isset_dbname = false; - bool isset_tablename = false; - bool isset_partitionnames = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->txnid); - isset_txnid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - isset_dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tablename); - isset_tablename = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitionnames.clear(); - uint32_t _size667; - ::apache::thrift::protocol::TType _etype670; - xfer += iprot->readListBegin(_etype670, _size667); - this->partitionnames.resize(_size667); - uint32_t _i671; - for (_i671 = 0; _i671 < _size667; ++_i671) - { - xfer += iprot->readString(this->partitionnames[_i671]); - } - xfer += iprot->readListEnd(); - } - isset_partitionnames = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast672; - xfer += iprot->readI32(ecast672); - this->operationType = (DataOperationType::type)ecast672; - this->__isset.operationType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_txnid) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_dbname) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tablename) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_partitionnames) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t AddDynamicPartitions::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("AddDynamicPartitions"); - - xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->txnid); - 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("partitionnames", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->partitionnames.size())); - std::vector ::const_iterator _iter673; - for (_iter673 = this->partitionnames.begin(); _iter673 != this->partitionnames.end(); ++_iter673) - { - xfer += oprot->writeString((*_iter673)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.operationType) { - xfer += oprot->writeFieldBegin("operationType", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32((int32_t)this->operationType); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(AddDynamicPartitions &a, AddDynamicPartitions &b) { - using ::std::swap; - swap(a.txnid, b.txnid); - swap(a.dbname, b.dbname); - swap(a.tablename, b.tablename); - swap(a.partitionnames, b.partitionnames); - swap(a.operationType, b.operationType); - swap(a.__isset, b.__isset); -} - -AddDynamicPartitions::AddDynamicPartitions(const AddDynamicPartitions& other674) { - txnid = other674.txnid; - dbname = other674.dbname; - tablename = other674.tablename; - partitionnames = other674.partitionnames; - operationType = other674.operationType; - __isset = other674.__isset; -} -AddDynamicPartitions& AddDynamicPartitions::operator=(const AddDynamicPartitions& other675) { - txnid = other675.txnid; - dbname = other675.dbname; - tablename = other675.tablename; - partitionnames = other675.partitionnames; - operationType = other675.operationType; - __isset = other675.__isset; - return *this; -} -void AddDynamicPartitions::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "AddDynamicPartitions("; - out << "txnid=" << to_string(txnid); - out << ", " << "dbname=" << to_string(dbname); - out << ", " << "tablename=" << to_string(tablename); - out << ", " << "partitionnames=" << to_string(partitionnames); - out << ", " << "operationType="; (__isset.operationType ? (out << to_string(operationType)) : (out << "")); - out << ")"; -} - - -NotificationEventRequest::~NotificationEventRequest() throw() { -} - - -void NotificationEventRequest::__set_lastEvent(const int64_t val) { - this->lastEvent = val; -} - -void NotificationEventRequest::__set_maxEvents(const int32_t val) { - this->maxEvents = val; -__isset.maxEvents = true; -} - -uint32_t NotificationEventRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_lastEvent = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->lastEvent); - isset_lastEvent = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->maxEvents); - this->__isset.maxEvents = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_lastEvent) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t NotificationEventRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("NotificationEventRequest"); - - xfer += oprot->writeFieldBegin("lastEvent", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->lastEvent); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.maxEvents) { - xfer += oprot->writeFieldBegin("maxEvents", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->maxEvents); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(NotificationEventRequest &a, NotificationEventRequest &b) { - using ::std::swap; - swap(a.lastEvent, b.lastEvent); - swap(a.maxEvents, b.maxEvents); - swap(a.__isset, b.__isset); -} - -NotificationEventRequest::NotificationEventRequest(const NotificationEventRequest& other676) { - lastEvent = other676.lastEvent; - maxEvents = other676.maxEvents; - __isset = other676.__isset; -} -NotificationEventRequest& NotificationEventRequest::operator=(const NotificationEventRequest& other677) { - lastEvent = other677.lastEvent; - maxEvents = other677.maxEvents; - __isset = other677.__isset; - return *this; -} -void NotificationEventRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "NotificationEventRequest("; - out << "lastEvent=" << to_string(lastEvent); - out << ", " << "maxEvents="; (__isset.maxEvents ? (out << to_string(maxEvents)) : (out << "")); - out << ")"; -} - - -NotificationEvent::~NotificationEvent() throw() { -} - - -void NotificationEvent::__set_eventId(const int64_t val) { - this->eventId = val; -} - -void NotificationEvent::__set_eventTime(const int32_t val) { - this->eventTime = val; -} - -void NotificationEvent::__set_eventType(const std::string& val) { - this->eventType = val; -} - -void NotificationEvent::__set_dbName(const std::string& val) { - this->dbName = val; -__isset.dbName = true; -} - -void NotificationEvent::__set_tableName(const std::string& val) { - this->tableName = val; -__isset.tableName = true; -} - -void NotificationEvent::__set_message(const std::string& val) { - this->message = val; -} - -void NotificationEvent::__set_messageFormat(const std::string& val) { - this->messageFormat = val; -__isset.messageFormat = true; -} - -uint32_t NotificationEvent::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_eventId = false; - bool isset_eventTime = false; - bool isset_eventType = false; - bool isset_message = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->eventId); - isset_eventId = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->eventTime); - isset_eventTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->eventType); - isset_eventType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableName); - this->__isset.tableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - isset_message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->messageFormat); - this->__isset.messageFormat = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_eventId) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_eventTime) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_eventType) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_message) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t NotificationEvent::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("NotificationEvent"); - - xfer += oprot->writeFieldBegin("eventId", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->eventId); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("eventTime", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->eventTime); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("eventType", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->eventType); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.dbName) { - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.tableName) { - xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->tableName); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->message); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.messageFormat) { - xfer += oprot->writeFieldBegin("messageFormat", ::apache::thrift::protocol::T_STRING, 7); - xfer += oprot->writeString(this->messageFormat); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(NotificationEvent &a, NotificationEvent &b) { - using ::std::swap; - swap(a.eventId, b.eventId); - swap(a.eventTime, b.eventTime); - swap(a.eventType, b.eventType); - swap(a.dbName, b.dbName); - swap(a.tableName, b.tableName); - swap(a.message, b.message); - swap(a.messageFormat, b.messageFormat); - swap(a.__isset, b.__isset); -} - -NotificationEvent::NotificationEvent(const NotificationEvent& other678) { - eventId = other678.eventId; - eventTime = other678.eventTime; - eventType = other678.eventType; - dbName = other678.dbName; - tableName = other678.tableName; - message = other678.message; - messageFormat = other678.messageFormat; - __isset = other678.__isset; -} -NotificationEvent& NotificationEvent::operator=(const NotificationEvent& other679) { - eventId = other679.eventId; - eventTime = other679.eventTime; - eventType = other679.eventType; - dbName = other679.dbName; - tableName = other679.tableName; - message = other679.message; - messageFormat = other679.messageFormat; - __isset = other679.__isset; - return *this; -} -void NotificationEvent::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "NotificationEvent("; - out << "eventId=" << to_string(eventId); - out << ", " << "eventTime=" << to_string(eventTime); - out << ", " << "eventType=" << to_string(eventType); - out << ", " << "dbName="; (__isset.dbName ? (out << to_string(dbName)) : (out << "")); - out << ", " << "tableName="; (__isset.tableName ? (out << to_string(tableName)) : (out << "")); - out << ", " << "message=" << to_string(message); - out << ", " << "messageFormat="; (__isset.messageFormat ? (out << to_string(messageFormat)) : (out << "")); - out << ")"; -} - - -NotificationEventResponse::~NotificationEventResponse() throw() { -} - - -void NotificationEventResponse::__set_events(const std::vector & val) { - this->events = val; -} - -uint32_t NotificationEventResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_events = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->events.clear(); - uint32_t _size680; - ::apache::thrift::protocol::TType _etype683; - xfer += iprot->readListBegin(_etype683, _size680); - this->events.resize(_size680); - uint32_t _i684; - for (_i684 = 0; _i684 < _size680; ++_i684) - { - xfer += this->events[_i684].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_events = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_events) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t NotificationEventResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("NotificationEventResponse"); - - xfer += oprot->writeFieldBegin("events", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->events.size())); - std::vector ::const_iterator _iter685; - for (_iter685 = this->events.begin(); _iter685 != this->events.end(); ++_iter685) - { - xfer += (*_iter685).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(NotificationEventResponse &a, NotificationEventResponse &b) { - using ::std::swap; - swap(a.events, b.events); -} - -NotificationEventResponse::NotificationEventResponse(const NotificationEventResponse& other686) { - events = other686.events; -} -NotificationEventResponse& NotificationEventResponse::operator=(const NotificationEventResponse& other687) { - events = other687.events; - return *this; -} -void NotificationEventResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "NotificationEventResponse("; - out << "events=" << to_string(events); - out << ")"; -} - - -CurrentNotificationEventId::~CurrentNotificationEventId() throw() { -} - - -void CurrentNotificationEventId::__set_eventId(const int64_t val) { - this->eventId = val; -} - -uint32_t CurrentNotificationEventId::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_eventId = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->eventId); - isset_eventId = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_eventId) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t CurrentNotificationEventId::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("CurrentNotificationEventId"); - - xfer += oprot->writeFieldBegin("eventId", ::apache::thrift::protocol::T_I64, 1); - xfer += oprot->writeI64(this->eventId); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(CurrentNotificationEventId &a, CurrentNotificationEventId &b) { - using ::std::swap; - swap(a.eventId, b.eventId); -} - -CurrentNotificationEventId::CurrentNotificationEventId(const CurrentNotificationEventId& other688) { - eventId = other688.eventId; -} -CurrentNotificationEventId& CurrentNotificationEventId::operator=(const CurrentNotificationEventId& other689) { - eventId = other689.eventId; - return *this; -} -void CurrentNotificationEventId::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "CurrentNotificationEventId("; - out << "eventId=" << to_string(eventId); - out << ")"; -} - - -InsertEventRequestData::~InsertEventRequestData() throw() { -} - - -void InsertEventRequestData::__set_replace(const bool val) { - this->replace = val; -__isset.replace = true; -} - -void InsertEventRequestData::__set_filesAdded(const std::vector & val) { - this->filesAdded = val; -} - -void InsertEventRequestData::__set_filesAddedChecksum(const std::vector & val) { - this->filesAddedChecksum = val; -__isset.filesAddedChecksum = true; -} - -uint32_t InsertEventRequestData::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_filesAdded = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->replace); - this->__isset.replace = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->filesAdded.clear(); - uint32_t _size690; - ::apache::thrift::protocol::TType _etype693; - xfer += iprot->readListBegin(_etype693, _size690); - this->filesAdded.resize(_size690); - uint32_t _i694; - for (_i694 = 0; _i694 < _size690; ++_i694) - { - xfer += iprot->readString(this->filesAdded[_i694]); - } - xfer += iprot->readListEnd(); - } - isset_filesAdded = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->filesAddedChecksum.clear(); - uint32_t _size695; - ::apache::thrift::protocol::TType _etype698; - xfer += iprot->readListBegin(_etype698, _size695); - this->filesAddedChecksum.resize(_size695); - uint32_t _i699; - for (_i699 = 0; _i699 < _size695; ++_i699) - { - xfer += iprot->readString(this->filesAddedChecksum[_i699]); - } - xfer += iprot->readListEnd(); - } - this->__isset.filesAddedChecksum = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_filesAdded) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t InsertEventRequestData::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("InsertEventRequestData"); - - if (this->__isset.replace) { - xfer += oprot->writeFieldBegin("replace", ::apache::thrift::protocol::T_BOOL, 1); - xfer += oprot->writeBool(this->replace); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("filesAdded", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->filesAdded.size())); - std::vector ::const_iterator _iter700; - for (_iter700 = this->filesAdded.begin(); _iter700 != this->filesAdded.end(); ++_iter700) - { - xfer += oprot->writeString((*_iter700)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.filesAddedChecksum) { - xfer += oprot->writeFieldBegin("filesAddedChecksum", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->filesAddedChecksum.size())); - std::vector ::const_iterator _iter701; - for (_iter701 = this->filesAddedChecksum.begin(); _iter701 != this->filesAddedChecksum.end(); ++_iter701) - { - xfer += oprot->writeString((*_iter701)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(InsertEventRequestData &a, InsertEventRequestData &b) { - using ::std::swap; - swap(a.replace, b.replace); - swap(a.filesAdded, b.filesAdded); - swap(a.filesAddedChecksum, b.filesAddedChecksum); - swap(a.__isset, b.__isset); -} - -InsertEventRequestData::InsertEventRequestData(const InsertEventRequestData& other702) { - replace = other702.replace; - filesAdded = other702.filesAdded; - filesAddedChecksum = other702.filesAddedChecksum; - __isset = other702.__isset; -} -InsertEventRequestData& InsertEventRequestData::operator=(const InsertEventRequestData& other703) { - replace = other703.replace; - filesAdded = other703.filesAdded; - filesAddedChecksum = other703.filesAddedChecksum; - __isset = other703.__isset; - return *this; -} -void InsertEventRequestData::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "InsertEventRequestData("; - out << "replace="; (__isset.replace ? (out << to_string(replace)) : (out << "")); - out << ", " << "filesAdded=" << to_string(filesAdded); - out << ", " << "filesAddedChecksum="; (__isset.filesAddedChecksum ? (out << to_string(filesAddedChecksum)) : (out << "")); - out << ")"; -} - - -FireEventRequestData::~FireEventRequestData() throw() { -} - - -void FireEventRequestData::__set_insertData(const InsertEventRequestData& val) { - this->insertData = val; -} - -uint32_t FireEventRequestData::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->insertData.read(iprot); - this->__isset.insertData = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FireEventRequestData::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("FireEventRequestData"); - - xfer += oprot->writeFieldBegin("insertData", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->insertData.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(FireEventRequestData &a, FireEventRequestData &b) { - using ::std::swap; - swap(a.insertData, b.insertData); - swap(a.__isset, b.__isset); -} - -FireEventRequestData::FireEventRequestData(const FireEventRequestData& other704) { - insertData = other704.insertData; - __isset = other704.__isset; -} -FireEventRequestData& FireEventRequestData::operator=(const FireEventRequestData& other705) { - insertData = other705.insertData; - __isset = other705.__isset; - return *this; -} -void FireEventRequestData::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "FireEventRequestData("; - out << "insertData=" << to_string(insertData); - out << ")"; -} - - -FireEventRequest::~FireEventRequest() throw() { -} - - -void FireEventRequest::__set_successful(const bool val) { - this->successful = val; -} - -void FireEventRequest::__set_data(const FireEventRequestData& val) { - this->data = val; -} - -void FireEventRequest::__set_dbName(const std::string& val) { - this->dbName = val; -__isset.dbName = true; -} - -void FireEventRequest::__set_tableName(const std::string& val) { - this->tableName = val; -__isset.tableName = true; -} - -void FireEventRequest::__set_partitionVals(const std::vector & val) { - this->partitionVals = val; -__isset.partitionVals = true; -} - -uint32_t FireEventRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_successful = false; - bool isset_data = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->successful); - isset_successful = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->data.read(iprot); - isset_data = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - this->__isset.dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableName); - this->__isset.tableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitionVals.clear(); - uint32_t _size706; - ::apache::thrift::protocol::TType _etype709; - xfer += iprot->readListBegin(_etype709, _size706); - this->partitionVals.resize(_size706); - uint32_t _i710; - for (_i710 = 0; _i710 < _size706; ++_i710) - { - xfer += iprot->readString(this->partitionVals[_i710]); - } - xfer += iprot->readListEnd(); - } - this->__isset.partitionVals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_successful) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_data) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t FireEventRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("FireEventRequest"); - - xfer += oprot->writeFieldBegin("successful", ::apache::thrift::protocol::T_BOOL, 1); - xfer += oprot->writeBool(this->successful); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->data.write(oprot); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.dbName) { - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.tableName) { - xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->tableName); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.partitionVals) { - xfer += oprot->writeFieldBegin("partitionVals", ::apache::thrift::protocol::T_LIST, 5); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->partitionVals.size())); - std::vector ::const_iterator _iter711; - for (_iter711 = this->partitionVals.begin(); _iter711 != this->partitionVals.end(); ++_iter711) - { - xfer += oprot->writeString((*_iter711)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(FireEventRequest &a, FireEventRequest &b) { - using ::std::swap; - swap(a.successful, b.successful); - swap(a.data, b.data); - swap(a.dbName, b.dbName); - swap(a.tableName, b.tableName); - swap(a.partitionVals, b.partitionVals); - swap(a.__isset, b.__isset); -} - -FireEventRequest::FireEventRequest(const FireEventRequest& other712) { - successful = other712.successful; - data = other712.data; - dbName = other712.dbName; - tableName = other712.tableName; - partitionVals = other712.partitionVals; - __isset = other712.__isset; -} -FireEventRequest& FireEventRequest::operator=(const FireEventRequest& other713) { - successful = other713.successful; - data = other713.data; - dbName = other713.dbName; - tableName = other713.tableName; - partitionVals = other713.partitionVals; - __isset = other713.__isset; - return *this; -} -void FireEventRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "FireEventRequest("; - out << "successful=" << to_string(successful); - out << ", " << "data=" << to_string(data); - out << ", " << "dbName="; (__isset.dbName ? (out << to_string(dbName)) : (out << "")); - out << ", " << "tableName="; (__isset.tableName ? (out << to_string(tableName)) : (out << "")); - out << ", " << "partitionVals="; (__isset.partitionVals ? (out << to_string(partitionVals)) : (out << "")); - out << ")"; -} - - -FireEventResponse::~FireEventResponse() throw() { -} - - -uint32_t FireEventResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FireEventResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("FireEventResponse"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(FireEventResponse &a, FireEventResponse &b) { - using ::std::swap; - (void) a; - (void) b; -} - -FireEventResponse::FireEventResponse(const FireEventResponse& other714) { - (void) other714; -} -FireEventResponse& FireEventResponse::operator=(const FireEventResponse& other715) { - (void) other715; - return *this; -} -void FireEventResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "FireEventResponse("; - out << ")"; -} - - -MetadataPpdResult::~MetadataPpdResult() throw() { -} - - -void MetadataPpdResult::__set_metadata(const std::string& val) { - this->metadata = val; -__isset.metadata = true; -} - -void MetadataPpdResult::__set_includeBitset(const std::string& val) { - this->includeBitset = val; -__isset.includeBitset = true; -} - -uint32_t MetadataPpdResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readBinary(this->metadata); - this->__isset.metadata = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readBinary(this->includeBitset); - this->__isset.includeBitset = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t MetadataPpdResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("MetadataPpdResult"); - - if (this->__isset.metadata) { - xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeBinary(this->metadata); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.includeBitset) { - xfer += oprot->writeFieldBegin("includeBitset", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeBinary(this->includeBitset); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(MetadataPpdResult &a, MetadataPpdResult &b) { - using ::std::swap; - swap(a.metadata, b.metadata); - swap(a.includeBitset, b.includeBitset); - swap(a.__isset, b.__isset); -} - -MetadataPpdResult::MetadataPpdResult(const MetadataPpdResult& other716) { - metadata = other716.metadata; - includeBitset = other716.includeBitset; - __isset = other716.__isset; -} -MetadataPpdResult& MetadataPpdResult::operator=(const MetadataPpdResult& other717) { - metadata = other717.metadata; - includeBitset = other717.includeBitset; - __isset = other717.__isset; - return *this; -} -void MetadataPpdResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "MetadataPpdResult("; - out << "metadata="; (__isset.metadata ? (out << to_string(metadata)) : (out << "")); - out << ", " << "includeBitset="; (__isset.includeBitset ? (out << to_string(includeBitset)) : (out << "")); - out << ")"; -} - - -GetFileMetadataByExprResult::~GetFileMetadataByExprResult() throw() { -} - - -void GetFileMetadataByExprResult::__set_metadata(const std::map & val) { - this->metadata = val; -} - -void GetFileMetadataByExprResult::__set_isSupported(const bool val) { - this->isSupported = val; -} - -uint32_t GetFileMetadataByExprResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_metadata = false; - bool isset_isSupported = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->metadata.clear(); - uint32_t _size718; - ::apache::thrift::protocol::TType _ktype719; - ::apache::thrift::protocol::TType _vtype720; - xfer += iprot->readMapBegin(_ktype719, _vtype720, _size718); - uint32_t _i722; - for (_i722 = 0; _i722 < _size718; ++_i722) - { - int64_t _key723; - xfer += iprot->readI64(_key723); - MetadataPpdResult& _val724 = this->metadata[_key723]; - xfer += _val724.read(iprot); - } - xfer += iprot->readMapEnd(); - } - isset_metadata = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->isSupported); - isset_isSupported = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_metadata) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_isSupported) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetFileMetadataByExprResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetFileMetadataByExprResult"); - - xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_MAP, 1); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I64, ::apache::thrift::protocol::T_STRUCT, static_cast(this->metadata.size())); - std::map ::const_iterator _iter725; - for (_iter725 = this->metadata.begin(); _iter725 != this->metadata.end(); ++_iter725) - { - xfer += oprot->writeI64(_iter725->first); - xfer += _iter725->second.write(oprot); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("isSupported", ::apache::thrift::protocol::T_BOOL, 2); - xfer += oprot->writeBool(this->isSupported); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetFileMetadataByExprResult &a, GetFileMetadataByExprResult &b) { - using ::std::swap; - swap(a.metadata, b.metadata); - swap(a.isSupported, b.isSupported); -} - -GetFileMetadataByExprResult::GetFileMetadataByExprResult(const GetFileMetadataByExprResult& other726) { - metadata = other726.metadata; - isSupported = other726.isSupported; -} -GetFileMetadataByExprResult& GetFileMetadataByExprResult::operator=(const GetFileMetadataByExprResult& other727) { - metadata = other727.metadata; - isSupported = other727.isSupported; - return *this; -} -void GetFileMetadataByExprResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetFileMetadataByExprResult("; - out << "metadata=" << to_string(metadata); - out << ", " << "isSupported=" << to_string(isSupported); - out << ")"; -} - - -GetFileMetadataByExprRequest::~GetFileMetadataByExprRequest() throw() { -} - - -void GetFileMetadataByExprRequest::__set_fileIds(const std::vector & val) { - this->fileIds = val; -} - -void GetFileMetadataByExprRequest::__set_expr(const std::string& val) { - this->expr = val; -} - -void GetFileMetadataByExprRequest::__set_doGetFooters(const bool val) { - this->doGetFooters = val; -__isset.doGetFooters = true; -} - -void GetFileMetadataByExprRequest::__set_type(const FileMetadataExprType::type val) { - this->type = val; -__isset.type = true; -} - -uint32_t GetFileMetadataByExprRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_fileIds = false; - bool isset_expr = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->fileIds.clear(); - uint32_t _size728; - ::apache::thrift::protocol::TType _etype731; - xfer += iprot->readListBegin(_etype731, _size728); - this->fileIds.resize(_size728); - uint32_t _i732; - for (_i732 = 0; _i732 < _size728; ++_i732) - { - xfer += iprot->readI64(this->fileIds[_i732]); - } - xfer += iprot->readListEnd(); - } - isset_fileIds = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readBinary(this->expr); - isset_expr = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->doGetFooters); - this->__isset.doGetFooters = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast733; - xfer += iprot->readI32(ecast733); - this->type = (FileMetadataExprType::type)ecast733; - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_fileIds) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_expr) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetFileMetadataByExprRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetFileMetadataByExprRequest"); - - xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->fileIds.size())); - std::vector ::const_iterator _iter734; - for (_iter734 = this->fileIds.begin(); _iter734 != this->fileIds.end(); ++_iter734) - { - xfer += oprot->writeI64((*_iter734)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("expr", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeBinary(this->expr); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.doGetFooters) { - xfer += oprot->writeFieldBegin("doGetFooters", ::apache::thrift::protocol::T_BOOL, 3); - xfer += oprot->writeBool(this->doGetFooters); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.type) { - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32((int32_t)this->type); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetFileMetadataByExprRequest &a, GetFileMetadataByExprRequest &b) { - using ::std::swap; - swap(a.fileIds, b.fileIds); - swap(a.expr, b.expr); - swap(a.doGetFooters, b.doGetFooters); - swap(a.type, b.type); - swap(a.__isset, b.__isset); -} - -GetFileMetadataByExprRequest::GetFileMetadataByExprRequest(const GetFileMetadataByExprRequest& other735) { - fileIds = other735.fileIds; - expr = other735.expr; - doGetFooters = other735.doGetFooters; - type = other735.type; - __isset = other735.__isset; -} -GetFileMetadataByExprRequest& GetFileMetadataByExprRequest::operator=(const GetFileMetadataByExprRequest& other736) { - fileIds = other736.fileIds; - expr = other736.expr; - doGetFooters = other736.doGetFooters; - type = other736.type; - __isset = other736.__isset; - return *this; -} -void GetFileMetadataByExprRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetFileMetadataByExprRequest("; - out << "fileIds=" << to_string(fileIds); - out << ", " << "expr=" << to_string(expr); - out << ", " << "doGetFooters="; (__isset.doGetFooters ? (out << to_string(doGetFooters)) : (out << "")); - out << ", " << "type="; (__isset.type ? (out << to_string(type)) : (out << "")); - out << ")"; -} - - -GetFileMetadataResult::~GetFileMetadataResult() throw() { -} - - -void GetFileMetadataResult::__set_metadata(const std::map & val) { - this->metadata = val; -} - -void GetFileMetadataResult::__set_isSupported(const bool val) { - this->isSupported = val; -} - -uint32_t GetFileMetadataResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_metadata = false; - bool isset_isSupported = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->metadata.clear(); - uint32_t _size737; - ::apache::thrift::protocol::TType _ktype738; - ::apache::thrift::protocol::TType _vtype739; - xfer += iprot->readMapBegin(_ktype738, _vtype739, _size737); - uint32_t _i741; - for (_i741 = 0; _i741 < _size737; ++_i741) - { - int64_t _key742; - xfer += iprot->readI64(_key742); - std::string& _val743 = this->metadata[_key742]; - xfer += iprot->readBinary(_val743); - } - xfer += iprot->readMapEnd(); - } - isset_metadata = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->isSupported); - isset_isSupported = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_metadata) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_isSupported) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetFileMetadataResult"); - - xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_MAP, 1); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I64, ::apache::thrift::protocol::T_STRING, static_cast(this->metadata.size())); - std::map ::const_iterator _iter744; - for (_iter744 = this->metadata.begin(); _iter744 != this->metadata.end(); ++_iter744) - { - xfer += oprot->writeI64(_iter744->first); - xfer += oprot->writeBinary(_iter744->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("isSupported", ::apache::thrift::protocol::T_BOOL, 2); - xfer += oprot->writeBool(this->isSupported); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetFileMetadataResult &a, GetFileMetadataResult &b) { - using ::std::swap; - swap(a.metadata, b.metadata); - swap(a.isSupported, b.isSupported); -} - -GetFileMetadataResult::GetFileMetadataResult(const GetFileMetadataResult& other745) { - metadata = other745.metadata; - isSupported = other745.isSupported; -} -GetFileMetadataResult& GetFileMetadataResult::operator=(const GetFileMetadataResult& other746) { - metadata = other746.metadata; - isSupported = other746.isSupported; - return *this; -} -void GetFileMetadataResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetFileMetadataResult("; - out << "metadata=" << to_string(metadata); - out << ", " << "isSupported=" << to_string(isSupported); - out << ")"; -} - - -GetFileMetadataRequest::~GetFileMetadataRequest() throw() { -} - - -void GetFileMetadataRequest::__set_fileIds(const std::vector & val) { - this->fileIds = val; -} - -uint32_t GetFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_fileIds = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->fileIds.clear(); - uint32_t _size747; - ::apache::thrift::protocol::TType _etype750; - xfer += iprot->readListBegin(_etype750, _size747); - this->fileIds.resize(_size747); - uint32_t _i751; - for (_i751 = 0; _i751 < _size747; ++_i751) - { - xfer += iprot->readI64(this->fileIds[_i751]); - } - xfer += iprot->readListEnd(); - } - isset_fileIds = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_fileIds) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetFileMetadataRequest"); - - xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->fileIds.size())); - std::vector ::const_iterator _iter752; - for (_iter752 = this->fileIds.begin(); _iter752 != this->fileIds.end(); ++_iter752) - { - xfer += oprot->writeI64((*_iter752)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetFileMetadataRequest &a, GetFileMetadataRequest &b) { - using ::std::swap; - swap(a.fileIds, b.fileIds); -} - -GetFileMetadataRequest::GetFileMetadataRequest(const GetFileMetadataRequest& other753) { - fileIds = other753.fileIds; -} -GetFileMetadataRequest& GetFileMetadataRequest::operator=(const GetFileMetadataRequest& other754) { - fileIds = other754.fileIds; - return *this; -} -void GetFileMetadataRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetFileMetadataRequest("; - out << "fileIds=" << to_string(fileIds); - out << ")"; -} - - -PutFileMetadataResult::~PutFileMetadataResult() throw() { -} - - -uint32_t PutFileMetadataResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t PutFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("PutFileMetadataResult"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(PutFileMetadataResult &a, PutFileMetadataResult &b) { - using ::std::swap; - (void) a; - (void) b; -} - -PutFileMetadataResult::PutFileMetadataResult(const PutFileMetadataResult& other755) { - (void) other755; -} -PutFileMetadataResult& PutFileMetadataResult::operator=(const PutFileMetadataResult& other756) { - (void) other756; - return *this; -} -void PutFileMetadataResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PutFileMetadataResult("; - out << ")"; -} - - -PutFileMetadataRequest::~PutFileMetadataRequest() throw() { -} - - -void PutFileMetadataRequest::__set_fileIds(const std::vector & val) { - this->fileIds = val; -} - -void PutFileMetadataRequest::__set_metadata(const std::vector & val) { - this->metadata = val; -} - -void PutFileMetadataRequest::__set_type(const FileMetadataExprType::type val) { - this->type = val; -__isset.type = true; -} - -uint32_t PutFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_fileIds = false; - bool isset_metadata = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->fileIds.clear(); - uint32_t _size757; - ::apache::thrift::protocol::TType _etype760; - xfer += iprot->readListBegin(_etype760, _size757); - this->fileIds.resize(_size757); - uint32_t _i761; - for (_i761 = 0; _i761 < _size757; ++_i761) - { - xfer += iprot->readI64(this->fileIds[_i761]); - } - xfer += iprot->readListEnd(); - } - isset_fileIds = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->metadata.clear(); - uint32_t _size762; - ::apache::thrift::protocol::TType _etype765; - xfer += iprot->readListBegin(_etype765, _size762); - this->metadata.resize(_size762); - uint32_t _i766; - for (_i766 = 0; _i766 < _size762; ++_i766) - { - xfer += iprot->readBinary(this->metadata[_i766]); - } - xfer += iprot->readListEnd(); - } - isset_metadata = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast767; - xfer += iprot->readI32(ecast767); - this->type = (FileMetadataExprType::type)ecast767; - this->__isset.type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_fileIds) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_metadata) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t PutFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("PutFileMetadataRequest"); - - xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->fileIds.size())); - std::vector ::const_iterator _iter768; - for (_iter768 = this->fileIds.begin(); _iter768 != this->fileIds.end(); ++_iter768) - { - xfer += oprot->writeI64((*_iter768)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->metadata.size())); - std::vector ::const_iterator _iter769; - for (_iter769 = this->metadata.begin(); _iter769 != this->metadata.end(); ++_iter769) - { - xfer += oprot->writeBinary((*_iter769)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.type) { - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->type); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(PutFileMetadataRequest &a, PutFileMetadataRequest &b) { - using ::std::swap; - swap(a.fileIds, b.fileIds); - swap(a.metadata, b.metadata); - swap(a.type, b.type); - swap(a.__isset, b.__isset); -} - -PutFileMetadataRequest::PutFileMetadataRequest(const PutFileMetadataRequest& other770) { - fileIds = other770.fileIds; - metadata = other770.metadata; - type = other770.type; - __isset = other770.__isset; -} -PutFileMetadataRequest& PutFileMetadataRequest::operator=(const PutFileMetadataRequest& other771) { - fileIds = other771.fileIds; - metadata = other771.metadata; - type = other771.type; - __isset = other771.__isset; - return *this; -} -void PutFileMetadataRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "PutFileMetadataRequest("; - out << "fileIds=" << to_string(fileIds); - out << ", " << "metadata=" << to_string(metadata); - out << ", " << "type="; (__isset.type ? (out << to_string(type)) : (out << "")); - out << ")"; -} - - -ClearFileMetadataResult::~ClearFileMetadataResult() throw() { -} - - -uint32_t ClearFileMetadataResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ClearFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ClearFileMetadataResult"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ClearFileMetadataResult &a, ClearFileMetadataResult &b) { - using ::std::swap; - (void) a; - (void) b; -} - -ClearFileMetadataResult::ClearFileMetadataResult(const ClearFileMetadataResult& other772) { - (void) other772; -} -ClearFileMetadataResult& ClearFileMetadataResult::operator=(const ClearFileMetadataResult& other773) { - (void) other773; - return *this; -} -void ClearFileMetadataResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ClearFileMetadataResult("; - out << ")"; -} - - -ClearFileMetadataRequest::~ClearFileMetadataRequest() throw() { -} - - -void ClearFileMetadataRequest::__set_fileIds(const std::vector & val) { - this->fileIds = val; -} - -uint32_t ClearFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_fileIds = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->fileIds.clear(); - uint32_t _size774; - ::apache::thrift::protocol::TType _etype777; - xfer += iprot->readListBegin(_etype777, _size774); - this->fileIds.resize(_size774); - uint32_t _i778; - for (_i778 = 0; _i778 < _size774; ++_i778) - { - xfer += iprot->readI64(this->fileIds[_i778]); - } - xfer += iprot->readListEnd(); - } - isset_fileIds = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_fileIds) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t ClearFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ClearFileMetadataRequest"); - - xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->fileIds.size())); - std::vector ::const_iterator _iter779; - for (_iter779 = this->fileIds.begin(); _iter779 != this->fileIds.end(); ++_iter779) - { - xfer += oprot->writeI64((*_iter779)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ClearFileMetadataRequest &a, ClearFileMetadataRequest &b) { - using ::std::swap; - swap(a.fileIds, b.fileIds); -} - -ClearFileMetadataRequest::ClearFileMetadataRequest(const ClearFileMetadataRequest& other780) { - fileIds = other780.fileIds; -} -ClearFileMetadataRequest& ClearFileMetadataRequest::operator=(const ClearFileMetadataRequest& other781) { - fileIds = other781.fileIds; - return *this; -} -void ClearFileMetadataRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ClearFileMetadataRequest("; - out << "fileIds=" << to_string(fileIds); - out << ")"; -} - - -CacheFileMetadataResult::~CacheFileMetadataResult() throw() { -} - - -void CacheFileMetadataResult::__set_isSupported(const bool val) { - this->isSupported = val; -} - -uint32_t CacheFileMetadataResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_isSupported = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->isSupported); - isset_isSupported = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_isSupported) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t CacheFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("CacheFileMetadataResult"); - - xfer += oprot->writeFieldBegin("isSupported", ::apache::thrift::protocol::T_BOOL, 1); - xfer += oprot->writeBool(this->isSupported); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(CacheFileMetadataResult &a, CacheFileMetadataResult &b) { - using ::std::swap; - swap(a.isSupported, b.isSupported); -} - -CacheFileMetadataResult::CacheFileMetadataResult(const CacheFileMetadataResult& other782) { - isSupported = other782.isSupported; -} -CacheFileMetadataResult& CacheFileMetadataResult::operator=(const CacheFileMetadataResult& other783) { - isSupported = other783.isSupported; - return *this; -} -void CacheFileMetadataResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "CacheFileMetadataResult("; - out << "isSupported=" << to_string(isSupported); - out << ")"; -} - - -CacheFileMetadataRequest::~CacheFileMetadataRequest() throw() { -} - - -void CacheFileMetadataRequest::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void CacheFileMetadataRequest::__set_tblName(const std::string& val) { - this->tblName = val; -} - -void CacheFileMetadataRequest::__set_partName(const std::string& val) { - this->partName = val; -__isset.partName = true; -} - -void CacheFileMetadataRequest::__set_isAllParts(const bool val) { - this->isAllParts = val; -__isset.isAllParts = true; -} - -uint32_t CacheFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dbName = false; - bool isset_tblName = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - isset_dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tblName); - isset_tblName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->partName); - this->__isset.partName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->isAllParts); - this->__isset.isAllParts = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dbName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tblName) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t CacheFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("CacheFileMetadataRequest"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tblName); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.partName) { - xfer += oprot->writeFieldBegin("partName", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->partName); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.isAllParts) { - xfer += oprot->writeFieldBegin("isAllParts", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->isAllParts); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(CacheFileMetadataRequest &a, CacheFileMetadataRequest &b) { - using ::std::swap; - swap(a.dbName, b.dbName); - swap(a.tblName, b.tblName); - swap(a.partName, b.partName); - swap(a.isAllParts, b.isAllParts); - swap(a.__isset, b.__isset); -} - -CacheFileMetadataRequest::CacheFileMetadataRequest(const CacheFileMetadataRequest& other784) { - dbName = other784.dbName; - tblName = other784.tblName; - partName = other784.partName; - isAllParts = other784.isAllParts; - __isset = other784.__isset; -} -CacheFileMetadataRequest& CacheFileMetadataRequest::operator=(const CacheFileMetadataRequest& other785) { - dbName = other785.dbName; - tblName = other785.tblName; - partName = other785.partName; - isAllParts = other785.isAllParts; - __isset = other785.__isset; - return *this; -} -void CacheFileMetadataRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "CacheFileMetadataRequest("; - out << "dbName=" << to_string(dbName); - out << ", " << "tblName=" << to_string(tblName); - out << ", " << "partName="; (__isset.partName ? (out << to_string(partName)) : (out << "")); - out << ", " << "isAllParts="; (__isset.isAllParts ? (out << to_string(isAllParts)) : (out << "")); - out << ")"; -} - - -GetAllFunctionsResponse::~GetAllFunctionsResponse() throw() { -} - - -void GetAllFunctionsResponse::__set_functions(const std::vector & val) { - this->functions = val; -__isset.functions = true; -} - -uint32_t GetAllFunctionsResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->functions.clear(); - uint32_t _size786; - ::apache::thrift::protocol::TType _etype789; - xfer += iprot->readListBegin(_etype789, _size786); - this->functions.resize(_size786); - uint32_t _i790; - for (_i790 = 0; _i790 < _size786; ++_i790) - { - xfer += this->functions[_i790].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.functions = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t GetAllFunctionsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetAllFunctionsResponse"); - - if (this->__isset.functions) { - xfer += oprot->writeFieldBegin("functions", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->functions.size())); - std::vector ::const_iterator _iter791; - for (_iter791 = this->functions.begin(); _iter791 != this->functions.end(); ++_iter791) - { - xfer += (*_iter791).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetAllFunctionsResponse &a, GetAllFunctionsResponse &b) { - using ::std::swap; - swap(a.functions, b.functions); - swap(a.__isset, b.__isset); -} - -GetAllFunctionsResponse::GetAllFunctionsResponse(const GetAllFunctionsResponse& other792) { - functions = other792.functions; - __isset = other792.__isset; -} -GetAllFunctionsResponse& GetAllFunctionsResponse::operator=(const GetAllFunctionsResponse& other793) { - functions = other793.functions; - __isset = other793.__isset; - return *this; -} -void GetAllFunctionsResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetAllFunctionsResponse("; - out << "functions="; (__isset.functions ? (out << to_string(functions)) : (out << "")); - out << ")"; -} - - -ClientCapabilities::~ClientCapabilities() throw() { -} - - -void ClientCapabilities::__set_values(const std::vector & val) { - this->values = val; -} - -uint32_t ClientCapabilities::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_values = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->values.clear(); - uint32_t _size794; - ::apache::thrift::protocol::TType _etype797; - xfer += iprot->readListBegin(_etype797, _size794); - this->values.resize(_size794); - uint32_t _i798; - for (_i798 = 0; _i798 < _size794; ++_i798) - { - int32_t ecast799; - xfer += iprot->readI32(ecast799); - this->values[_i798] = (ClientCapability::type)ecast799; - } - xfer += iprot->readListEnd(); - } - isset_values = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_values) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t ClientCapabilities::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("ClientCapabilities"); - - xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->values.size())); - std::vector ::const_iterator _iter800; - for (_iter800 = this->values.begin(); _iter800 != this->values.end(); ++_iter800) - { - xfer += oprot->writeI32((int32_t)(*_iter800)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(ClientCapabilities &a, ClientCapabilities &b) { - using ::std::swap; - swap(a.values, b.values); -} - -ClientCapabilities::ClientCapabilities(const ClientCapabilities& other801) { - values = other801.values; -} -ClientCapabilities& ClientCapabilities::operator=(const ClientCapabilities& other802) { - values = other802.values; - return *this; -} -void ClientCapabilities::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ClientCapabilities("; - out << "values=" << to_string(values); - out << ")"; -} - - -GetTableRequest::~GetTableRequest() throw() { -} - - -void GetTableRequest::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void GetTableRequest::__set_tblName(const std::string& val) { - this->tblName = val; -} - -void GetTableRequest::__set_capabilities(const ClientCapabilities& val) { - this->capabilities = val; -__isset.capabilities = true; -} - -uint32_t GetTableRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dbName = false; - bool isset_tblName = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - isset_dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tblName); - isset_tblName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->capabilities.read(iprot); - this->__isset.capabilities = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dbName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tblName) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetTableRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetTableRequest"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tblName); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.capabilities) { - xfer += oprot->writeFieldBegin("capabilities", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->capabilities.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetTableRequest &a, GetTableRequest &b) { - using ::std::swap; - swap(a.dbName, b.dbName); - swap(a.tblName, b.tblName); - swap(a.capabilities, b.capabilities); - swap(a.__isset, b.__isset); -} - -GetTableRequest::GetTableRequest(const GetTableRequest& other803) { - dbName = other803.dbName; - tblName = other803.tblName; - capabilities = other803.capabilities; - __isset = other803.__isset; -} -GetTableRequest& GetTableRequest::operator=(const GetTableRequest& other804) { - dbName = other804.dbName; - tblName = other804.tblName; - capabilities = other804.capabilities; - __isset = other804.__isset; - return *this; -} -void GetTableRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetTableRequest("; - out << "dbName=" << to_string(dbName); - out << ", " << "tblName=" << to_string(tblName); - out << ", " << "capabilities="; (__isset.capabilities ? (out << to_string(capabilities)) : (out << "")); - out << ")"; -} - - -GetTableResult::~GetTableResult() throw() { -} - - -void GetTableResult::__set_table(const Table& val) { - this->table = val; -} - -uint32_t GetTableResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_table = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->table.read(iprot); - isset_table = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_table) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetTableResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetTableResult"); - - xfer += oprot->writeFieldBegin("table", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->table.write(oprot); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetTableResult &a, GetTableResult &b) { - using ::std::swap; - swap(a.table, b.table); -} - -GetTableResult::GetTableResult(const GetTableResult& other805) { - table = other805.table; -} -GetTableResult& GetTableResult::operator=(const GetTableResult& other806) { - table = other806.table; - return *this; -} -void GetTableResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetTableResult("; - out << "table=" << to_string(table); - out << ")"; -} - - -GetTablesRequest::~GetTablesRequest() throw() { -} - - -void GetTablesRequest::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void GetTablesRequest::__set_tblNames(const std::vector & val) { - this->tblNames = val; -__isset.tblNames = true; -} - -void GetTablesRequest::__set_capabilities(const ClientCapabilities& val) { - this->capabilities = val; -__isset.capabilities = true; -} - -uint32_t GetTablesRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dbName = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - isset_dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->tblNames.clear(); - uint32_t _size807; - ::apache::thrift::protocol::TType _etype810; - xfer += iprot->readListBegin(_etype810, _size807); - this->tblNames.resize(_size807); - uint32_t _i811; - for (_i811 = 0; _i811 < _size807; ++_i811) - { - xfer += iprot->readString(this->tblNames[_i811]); - } - xfer += iprot->readListEnd(); - } - this->__isset.tblNames = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->capabilities.read(iprot); - this->__isset.capabilities = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dbName) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetTablesRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetTablesRequest"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.tblNames) { - xfer += oprot->writeFieldBegin("tblNames", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->tblNames.size())); - std::vector ::const_iterator _iter812; - for (_iter812 = this->tblNames.begin(); _iter812 != this->tblNames.end(); ++_iter812) - { - xfer += oprot->writeString((*_iter812)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.capabilities) { - xfer += oprot->writeFieldBegin("capabilities", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->capabilities.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetTablesRequest &a, GetTablesRequest &b) { - using ::std::swap; - swap(a.dbName, b.dbName); - swap(a.tblNames, b.tblNames); - swap(a.capabilities, b.capabilities); - swap(a.__isset, b.__isset); -} - -GetTablesRequest::GetTablesRequest(const GetTablesRequest& other813) { - dbName = other813.dbName; - tblNames = other813.tblNames; - capabilities = other813.capabilities; - __isset = other813.__isset; -} -GetTablesRequest& GetTablesRequest::operator=(const GetTablesRequest& other814) { - dbName = other814.dbName; - tblNames = other814.tblNames; - capabilities = other814.capabilities; - __isset = other814.__isset; - return *this; -} -void GetTablesRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetTablesRequest("; - out << "dbName=" << to_string(dbName); - out << ", " << "tblNames="; (__isset.tblNames ? (out << to_string(tblNames)) : (out << "")); - out << ", " << "capabilities="; (__isset.capabilities ? (out << to_string(capabilities)) : (out << "")); - out << ")"; -} - - -GetTablesResult::~GetTablesResult() throw() { -} - - -void GetTablesResult::__set_tables(const std::vector
& val) { - this->tables = val; -} - -uint32_t GetTablesResult::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_tables = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->tables.clear(); - uint32_t _size815; - ::apache::thrift::protocol::TType _etype818; - xfer += iprot->readListBegin(_etype818, _size815); - this->tables.resize(_size815); - uint32_t _i819; - for (_i819 = 0; _i819 < _size815; ++_i819) - { - xfer += this->tables[_i819].read(iprot); - } - xfer += iprot->readListEnd(); - } - isset_tables = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_tables) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t GetTablesResult::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetTablesResult"); - - xfer += oprot->writeFieldBegin("tables", ::apache::thrift::protocol::T_LIST, 1); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->tables.size())); - std::vector
::const_iterator _iter820; - for (_iter820 = this->tables.begin(); _iter820 != this->tables.end(); ++_iter820) - { - xfer += (*_iter820).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetTablesResult &a, GetTablesResult &b) { - using ::std::swap; - swap(a.tables, b.tables); -} - -GetTablesResult::GetTablesResult(const GetTablesResult& other821) { - tables = other821.tables; -} -GetTablesResult& GetTablesResult::operator=(const GetTablesResult& other822) { - tables = other822.tables; - return *this; -} -void GetTablesResult::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetTablesResult("; - out << "tables=" << to_string(tables); - out << ")"; -} - - -CmRecycleRequest::~CmRecycleRequest() throw() { -} - - -void CmRecycleRequest::__set_dataPath(const std::string& val) { - this->dataPath = val; -} - -void CmRecycleRequest::__set_purge(const bool val) { - this->purge = val; -} - -uint32_t CmRecycleRequest::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dataPath = false; - bool isset_purge = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dataPath); - isset_dataPath = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->purge); - isset_purge = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dataPath) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_purge) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t CmRecycleRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("CmRecycleRequest"); - - xfer += oprot->writeFieldBegin("dataPath", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dataPath); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("purge", ::apache::thrift::protocol::T_BOOL, 2); - xfer += oprot->writeBool(this->purge); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(CmRecycleRequest &a, CmRecycleRequest &b) { - using ::std::swap; - swap(a.dataPath, b.dataPath); - swap(a.purge, b.purge); -} - -CmRecycleRequest::CmRecycleRequest(const CmRecycleRequest& other823) { - dataPath = other823.dataPath; - purge = other823.purge; -} -CmRecycleRequest& CmRecycleRequest::operator=(const CmRecycleRequest& other824) { - dataPath = other824.dataPath; - purge = other824.purge; - return *this; -} -void CmRecycleRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "CmRecycleRequest("; - out << "dataPath=" << to_string(dataPath); - out << ", " << "purge=" << to_string(purge); - out << ")"; -} - - -CmRecycleResponse::~CmRecycleResponse() throw() { -} - - -uint32_t CmRecycleResponse::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t CmRecycleResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("CmRecycleResponse"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(CmRecycleResponse &a, CmRecycleResponse &b) { - using ::std::swap; - (void) a; - (void) b; -} - -CmRecycleResponse::CmRecycleResponse(const CmRecycleResponse& other825) { - (void) other825; -} -CmRecycleResponse& CmRecycleResponse::operator=(const CmRecycleResponse& other826) { - (void) other826; - return *this; -} -void CmRecycleResponse::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "CmRecycleResponse("; - out << ")"; -} - - -TableMeta::~TableMeta() throw() { -} - - -void TableMeta::__set_dbName(const std::string& val) { - this->dbName = val; -} - -void TableMeta::__set_tableName(const std::string& val) { - this->tableName = val; -} - -void TableMeta::__set_tableType(const std::string& val) { - this->tableType = val; -} - -void TableMeta::__set_comments(const std::string& val) { - this->comments = val; -__isset.comments = true; -} - -uint32_t TableMeta::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - bool isset_dbName = false; - bool isset_tableName = false; - bool isset_tableType = false; - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbName); - isset_dbName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableName); - isset_tableName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tableType); - isset_tableType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->comments); - this->__isset.comments = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_dbName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tableName) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tableType) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t TableMeta::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("TableMeta"); - - xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tableName); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->tableType); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.comments) { - xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->comments); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(TableMeta &a, TableMeta &b) { - using ::std::swap; - swap(a.dbName, b.dbName); - swap(a.tableName, b.tableName); - swap(a.tableType, b.tableType); - swap(a.comments, b.comments); - swap(a.__isset, b.__isset); -} - -TableMeta::TableMeta(const TableMeta& other827) { - dbName = other827.dbName; - tableName = other827.tableName; - tableType = other827.tableType; - comments = other827.comments; - __isset = other827.__isset; -} -TableMeta& TableMeta::operator=(const TableMeta& other828) { - dbName = other828.dbName; - tableName = other828.tableName; - tableType = other828.tableType; - comments = other828.comments; - __isset = other828.__isset; - return *this; -} -void TableMeta::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "TableMeta("; - out << "dbName=" << to_string(dbName); - out << ", " << "tableName=" << to_string(tableName); - out << ", " << "tableType=" << to_string(tableType); - out << ", " << "comments="; (__isset.comments ? (out << to_string(comments)) : (out << "")); - out << ")"; -} - - -MetaException::~MetaException() throw() { -} - - -void MetaException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t MetaException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t MetaException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -MetaException::MetaException(const MetaException& other829) : TException() { - message = other829.message; - __isset = other829.__isset; -} -MetaException& MetaException::operator=(const MetaException& other830) { - message = other830.message; - __isset = other830.__isset; - return *this; -} -void MetaException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "MetaException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* MetaException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: MetaException"; - } -} - - -UnknownTableException::~UnknownTableException() throw() { -} - - -void UnknownTableException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t UnknownTableException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t UnknownTableException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -UnknownTableException::UnknownTableException(const UnknownTableException& other831) : TException() { - message = other831.message; - __isset = other831.__isset; -} -UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other832) { - message = other832.message; - __isset = other832.__isset; - return *this; -} -void UnknownTableException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "UnknownTableException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* UnknownTableException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: UnknownTableException"; - } -} - - -UnknownDBException::~UnknownDBException() throw() { -} - - -void UnknownDBException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t UnknownDBException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t UnknownDBException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -UnknownDBException::UnknownDBException(const UnknownDBException& other833) : TException() { - message = other833.message; - __isset = other833.__isset; -} -UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other834) { - message = other834.message; - __isset = other834.__isset; - return *this; -} -void UnknownDBException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "UnknownDBException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* UnknownDBException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: UnknownDBException"; - } -} - - -AlreadyExistsException::~AlreadyExistsException() throw() { -} - - -void AlreadyExistsException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t AlreadyExistsException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t AlreadyExistsException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other835) : TException() { - message = other835.message; - __isset = other835.__isset; -} -AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other836) { - message = other836.message; - __isset = other836.__isset; - return *this; -} -void AlreadyExistsException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "AlreadyExistsException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* AlreadyExistsException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: AlreadyExistsException"; - } -} - - -InvalidPartitionException::~InvalidPartitionException() throw() { -} - - -void InvalidPartitionException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t InvalidPartitionException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t InvalidPartitionException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other837) : TException() { - message = other837.message; - __isset = other837.__isset; -} -InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other838) { - message = other838.message; - __isset = other838.__isset; - return *this; -} -void InvalidPartitionException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "InvalidPartitionException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* InvalidPartitionException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: InvalidPartitionException"; - } -} - - -UnknownPartitionException::~UnknownPartitionException() throw() { -} - - -void UnknownPartitionException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t UnknownPartitionException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t UnknownPartitionException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other839) : TException() { - message = other839.message; - __isset = other839.__isset; -} -UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other840) { - message = other840.message; - __isset = other840.__isset; - return *this; -} -void UnknownPartitionException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "UnknownPartitionException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* UnknownPartitionException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: UnknownPartitionException"; - } -} - - -InvalidObjectException::~InvalidObjectException() throw() { -} - - -void InvalidObjectException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t InvalidObjectException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t InvalidObjectException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -InvalidObjectException::InvalidObjectException(const InvalidObjectException& other841) : TException() { - message = other841.message; - __isset = other841.__isset; -} -InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other842) { - message = other842.message; - __isset = other842.__isset; - return *this; -} -void InvalidObjectException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "InvalidObjectException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* InvalidObjectException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: InvalidObjectException"; - } -} - - -NoSuchObjectException::~NoSuchObjectException() throw() { -} - - -void NoSuchObjectException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t NoSuchObjectException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t NoSuchObjectException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other843) : TException() { - message = other843.message; - __isset = other843.__isset; -} -NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other844) { - message = other844.message; - __isset = other844.__isset; - return *this; -} -void NoSuchObjectException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "NoSuchObjectException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* NoSuchObjectException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: NoSuchObjectException"; - } -} - - -IndexAlreadyExistsException::~IndexAlreadyExistsException() throw() { -} - - -void IndexAlreadyExistsException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t IndexAlreadyExistsException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t IndexAlreadyExistsException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -IndexAlreadyExistsException::IndexAlreadyExistsException(const IndexAlreadyExistsException& other845) : TException() { - message = other845.message; - __isset = other845.__isset; -} -IndexAlreadyExistsException& IndexAlreadyExistsException::operator=(const IndexAlreadyExistsException& other846) { - message = other846.message; - __isset = other846.__isset; - return *this; -} -void IndexAlreadyExistsException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "IndexAlreadyExistsException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* IndexAlreadyExistsException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: IndexAlreadyExistsException"; - } -} - - -InvalidOperationException::~InvalidOperationException() throw() { -} - - -void InvalidOperationException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t InvalidOperationException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t InvalidOperationException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -InvalidOperationException::InvalidOperationException(const InvalidOperationException& other847) : TException() { - message = other847.message; - __isset = other847.__isset; -} -InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other848) { - message = other848.message; - __isset = other848.__isset; - return *this; -} -void InvalidOperationException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "InvalidOperationException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* InvalidOperationException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: InvalidOperationException"; - } -} - - -ConfigValSecurityException::~ConfigValSecurityException() throw() { -} - - -void ConfigValSecurityException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t ConfigValSecurityException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ConfigValSecurityException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - 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); -} - -ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other849) : TException() { - message = other849.message; - __isset = other849.__isset; -} -ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other850) { - message = other850.message; - __isset = other850.__isset; - return *this; -} -void ConfigValSecurityException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "ConfigValSecurityException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* ConfigValSecurityException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: ConfigValSecurityException"; - } -} - - -InvalidInputException::~InvalidInputException() throw() { -} - - -void InvalidInputException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t InvalidInputException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t InvalidInputException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("InvalidInputException"); - - 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(InvalidInputException &a, InvalidInputException &b) { - using ::std::swap; - swap(a.message, b.message); - swap(a.__isset, b.__isset); -} - -InvalidInputException::InvalidInputException(const InvalidInputException& other851) : TException() { - message = other851.message; - __isset = other851.__isset; -} -InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other852) { - message = other852.message; - __isset = other852.__isset; - return *this; -} -void InvalidInputException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "InvalidInputException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* InvalidInputException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: InvalidInputException"; - } -} - - -NoSuchTxnException::~NoSuchTxnException() throw() { -} - - -void NoSuchTxnException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t NoSuchTxnException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t NoSuchTxnException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("NoSuchTxnException"); - - 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(NoSuchTxnException &a, NoSuchTxnException &b) { - using ::std::swap; - swap(a.message, b.message); - swap(a.__isset, b.__isset); -} - -NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other853) : TException() { - message = other853.message; - __isset = other853.__isset; -} -NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other854) { - message = other854.message; - __isset = other854.__isset; - return *this; -} -void NoSuchTxnException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "NoSuchTxnException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* NoSuchTxnException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: NoSuchTxnException"; - } -} - - -TxnAbortedException::~TxnAbortedException() throw() { -} - - -void TxnAbortedException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t TxnAbortedException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t TxnAbortedException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("TxnAbortedException"); - - 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(TxnAbortedException &a, TxnAbortedException &b) { - using ::std::swap; - swap(a.message, b.message); - swap(a.__isset, b.__isset); -} - -TxnAbortedException::TxnAbortedException(const TxnAbortedException& other855) : TException() { - message = other855.message; - __isset = other855.__isset; -} -TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other856) { - message = other856.message; - __isset = other856.__isset; - return *this; -} -void TxnAbortedException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "TxnAbortedException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* TxnAbortedException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: TxnAbortedException"; - } -} - - -TxnOpenException::~TxnOpenException() throw() { -} - - -void TxnOpenException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t TxnOpenException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t TxnOpenException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("TxnOpenException"); - - 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(TxnOpenException &a, TxnOpenException &b) { - using ::std::swap; - swap(a.message, b.message); - swap(a.__isset, b.__isset); -} - -TxnOpenException::TxnOpenException(const TxnOpenException& other857) : TException() { - message = other857.message; - __isset = other857.__isset; -} -TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other858) { - message = other858.message; - __isset = other858.__isset; - return *this; -} -void TxnOpenException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "TxnOpenException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* TxnOpenException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: TxnOpenException"; - } -} - - -NoSuchLockException::~NoSuchLockException() throw() { -} - - -void NoSuchLockException::__set_message(const std::string& val) { - this->message = val; -} - -uint32_t NoSuchLockException::read(::apache::thrift::protocol::TProtocol* iprot) { - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t NoSuchLockException::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("NoSuchLockException"); - - 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(NoSuchLockException &a, NoSuchLockException &b) { - using ::std::swap; - swap(a.message, b.message); - swap(a.__isset, b.__isset); -} - -NoSuchLockException::NoSuchLockException(const NoSuchLockException& other859) : TException() { - message = other859.message; - __isset = other859.__isset; -} -NoSuchLockException& NoSuchLockException::operator=(const NoSuchLockException& other860) { - message = other860.message; - __isset = other860.__isset; - return *this; -} -void NoSuchLockException::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "NoSuchLockException("; - out << "message=" << to_string(message); - out << ")"; -} - -const char* NoSuchLockException::what() const throw() { - try { - std::stringstream ss; - ss << "TException - service has thrown: " << *this; - this->thriftTExceptionMessageHolder_ = ss.str(); - return this->thriftTExceptionMessageHolder_.c_str(); - } catch (const std::exception&) { - return "TException - service has thrown: NoSuchLockException"; - } -} - -}}} // namespace diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h deleted file mode 100644 index 2bba534..0000000 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ /dev/null @@ -1,8944 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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 "fb303_types.h" - - -namespace Apache { namespace Hadoop { namespace Hive { - -struct HiveObjectType { - enum type { - GLOBAL = 1, - DATABASE = 2, - TABLE = 3, - PARTITION = 4, - COLUMN = 5 - }; -}; - -extern const std::map _HiveObjectType_VALUES_TO_NAMES; - -struct PrincipalType { - enum type { - USER = 1, - ROLE = 2, - GROUP = 3 - }; -}; - -extern const std::map _PrincipalType_VALUES_TO_NAMES; - -struct PartitionEventType { - enum type { - LOAD_DONE = 1 - }; -}; - -extern const std::map _PartitionEventType_VALUES_TO_NAMES; - -struct TxnState { - enum type { - COMMITTED = 1, - ABORTED = 2, - OPEN = 3 - }; -}; - -extern const std::map _TxnState_VALUES_TO_NAMES; - -struct LockLevel { - enum type { - DB = 1, - TABLE = 2, - PARTITION = 3 - }; -}; - -extern const std::map _LockLevel_VALUES_TO_NAMES; - -struct LockState { - enum type { - ACQUIRED = 1, - WAITING = 2, - ABORT = 3, - NOT_ACQUIRED = 4 - }; -}; - -extern const std::map _LockState_VALUES_TO_NAMES; - -struct LockType { - enum type { - SHARED_READ = 1, - SHARED_WRITE = 2, - EXCLUSIVE = 3 - }; -}; - -extern const std::map _LockType_VALUES_TO_NAMES; - -struct CompactionType { - enum type { - MINOR = 1, - MAJOR = 2 - }; -}; - -extern const std::map _CompactionType_VALUES_TO_NAMES; - -struct GrantRevokeType { - enum type { - GRANT = 1, - REVOKE = 2 - }; -}; - -extern const std::map _GrantRevokeType_VALUES_TO_NAMES; - -struct DataOperationType { - enum type { - SELECT = 1, - INSERT = 2, - UPDATE = 3, - DELETE = 4, - UNSET = 5, - NO_TXN = 6 - }; -}; - -extern const std::map _DataOperationType_VALUES_TO_NAMES; - -struct EventRequestType { - enum type { - INSERT = 1, - UPDATE = 2, - DELETE = 3 - }; -}; - -extern const std::map _EventRequestType_VALUES_TO_NAMES; - -struct FunctionType { - enum type { - JAVA = 1 - }; -}; - -extern const std::map _FunctionType_VALUES_TO_NAMES; - -struct ResourceType { - enum type { - JAR = 1, - FILE = 2, - ARCHIVE = 3 - }; -}; - -extern const std::map _ResourceType_VALUES_TO_NAMES; - -struct FileMetadataExprType { - enum type { - ORC_SARG = 1 - }; -}; - -extern const std::map _FileMetadataExprType_VALUES_TO_NAMES; - -struct ClientCapability { - enum type { - TEST_CAPABILITY = 1 - }; -}; - -extern const std::map _ClientCapability_VALUES_TO_NAMES; - -class Version; - -class FieldSchema; - -class SQLPrimaryKey; - -class SQLForeignKey; - -class SQLUniqueConstraint; - -class SQLNotNullConstraint; - -class Type; - -class HiveObjectRef; - -class PrivilegeGrantInfo; - -class HiveObjectPrivilege; - -class PrivilegeBag; - -class PrincipalPrivilegeSet; - -class GrantRevokePrivilegeRequest; - -class GrantRevokePrivilegeResponse; - -class Role; - -class RolePrincipalGrant; - -class GetRoleGrantsForPrincipalRequest; - -class GetRoleGrantsForPrincipalResponse; - -class GetPrincipalsInRoleRequest; - -class GetPrincipalsInRoleResponse; - -class GrantRevokeRoleRequest; - -class GrantRevokeRoleResponse; - -class Database; - -class SerDeInfo; - -class Order; - -class SkewedInfo; - -class StorageDescriptor; - -class Table; - -class Partition; - -class PartitionWithoutSD; - -class PartitionSpecWithSharedSD; - -class PartitionListComposingSpec; - -class PartitionSpec; - -class Index; - -class BooleanColumnStatsData; - -class DoubleColumnStatsData; - -class LongColumnStatsData; - -class StringColumnStatsData; - -class BinaryColumnStatsData; - -class Decimal; - -class DecimalColumnStatsData; - -class Date; - -class DateColumnStatsData; - -class ColumnStatisticsData; - -class ColumnStatisticsObj; - -class ColumnStatisticsDesc; - -class ColumnStatistics; - -class AggrStats; - -class SetPartitionsStatsRequest; - -class Schema; - -class EnvironmentContext; - -class PrimaryKeysRequest; - -class PrimaryKeysResponse; - -class ForeignKeysRequest; - -class ForeignKeysResponse; - -class UniqueConstraintsRequest; - -class UniqueConstraintsResponse; - -class NotNullConstraintsRequest; - -class NotNullConstraintsResponse; - -class DropConstraintRequest; - -class AddPrimaryKeyRequest; - -class AddForeignKeyRequest; - -class AddUniqueConstraintRequest; - -class AddNotNullConstraintRequest; - -class PartitionsByExprResult; - -class PartitionsByExprRequest; - -class TableStatsResult; - -class PartitionsStatsResult; - -class TableStatsRequest; - -class PartitionsStatsRequest; - -class AddPartitionsResult; - -class AddPartitionsRequest; - -class DropPartitionsResult; - -class DropPartitionsExpr; - -class RequestPartsSpec; - -class DropPartitionsRequest; - -class ResourceUri; - -class Function; - -class TxnInfo; - -class GetOpenTxnsInfoResponse; - -class GetOpenTxnsResponse; - -class OpenTxnRequest; - -class OpenTxnsResponse; - -class AbortTxnRequest; - -class AbortTxnsRequest; - -class CommitTxnRequest; - -class LockComponent; - -class LockRequest; - -class LockResponse; - -class CheckLockRequest; - -class UnlockRequest; - -class ShowLocksRequest; - -class ShowLocksResponseElement; - -class ShowLocksResponse; - -class HeartbeatRequest; - -class HeartbeatTxnRangeRequest; - -class HeartbeatTxnRangeResponse; - -class CompactionRequest; - -class CompactionResponse; - -class ShowCompactRequest; - -class ShowCompactResponseElement; - -class ShowCompactResponse; - -class AddDynamicPartitions; - -class NotificationEventRequest; - -class NotificationEvent; - -class NotificationEventResponse; - -class CurrentNotificationEventId; - -class InsertEventRequestData; - -class FireEventRequestData; - -class FireEventRequest; - -class FireEventResponse; - -class MetadataPpdResult; - -class GetFileMetadataByExprResult; - -class GetFileMetadataByExprRequest; - -class GetFileMetadataResult; - -class GetFileMetadataRequest; - -class PutFileMetadataResult; - -class PutFileMetadataRequest; - -class ClearFileMetadataResult; - -class ClearFileMetadataRequest; - -class CacheFileMetadataResult; - -class CacheFileMetadataRequest; - -class GetAllFunctionsResponse; - -class ClientCapabilities; - -class GetTableRequest; - -class GetTableResult; - -class GetTablesRequest; - -class GetTablesResult; - -class CmRecycleRequest; - -class CmRecycleResponse; - -class TableMeta; - -class MetaException; - -class UnknownTableException; - -class UnknownDBException; - -class AlreadyExistsException; - -class InvalidPartitionException; - -class UnknownPartitionException; - -class InvalidObjectException; - -class NoSuchObjectException; - -class IndexAlreadyExistsException; - -class InvalidOperationException; - -class ConfigValSecurityException; - -class InvalidInputException; - -class NoSuchTxnException; - -class TxnAbortedException; - -class TxnOpenException; - -class NoSuchLockException; - -typedef struct _Version__isset { - _Version__isset() : version(false), comments(false) {} - bool version :1; - bool comments :1; -} _Version__isset; - -class Version { - public: - - Version(const Version&); - Version& operator=(const Version&); - Version() : version(), comments() { - } - - virtual ~Version() throw(); - std::string version; - std::string comments; - - _Version__isset __isset; - - void __set_version(const std::string& val); - - void __set_comments(const std::string& val); - - bool operator == (const Version & rhs) const - { - if (!(version == rhs.version)) - return false; - if (!(comments == rhs.comments)) - return false; - return true; - } - bool operator != (const Version &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Version & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(Version &a, Version &b); - -inline std::ostream& operator<<(std::ostream& out, const Version& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _FieldSchema__isset { - _FieldSchema__isset() : name(false), type(false), comment(false) {} - bool name :1; - bool type :1; - bool comment :1; -} _FieldSchema__isset; - -class FieldSchema { - public: - - FieldSchema(const FieldSchema&); - FieldSchema& operator=(const FieldSchema&); - FieldSchema() : name(), type(), comment() { - } - - virtual ~FieldSchema() throw(); - std::string name; - std::string type; - std::string comment; - - _FieldSchema__isset __isset; - - void __set_name(const std::string& val); - - void __set_type(const std::string& val); - - void __set_comment(const std::string& val); - - bool operator == (const FieldSchema & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(type == rhs.type)) - return false; - if (!(comment == rhs.comment)) - return false; - return true; - } - bool operator != (const FieldSchema &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FieldSchema & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(FieldSchema &a, FieldSchema &b); - -inline std::ostream& operator<<(std::ostream& out, const FieldSchema& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _SQLPrimaryKey__isset { - _SQLPrimaryKey__isset() : table_db(false), table_name(false), column_name(false), key_seq(false), pk_name(false), enable_cstr(false), validate_cstr(false), rely_cstr(false) {} - bool table_db :1; - bool table_name :1; - bool column_name :1; - bool key_seq :1; - bool pk_name :1; - bool enable_cstr :1; - bool validate_cstr :1; - bool rely_cstr :1; -} _SQLPrimaryKey__isset; - -class SQLPrimaryKey { - public: - - SQLPrimaryKey(const SQLPrimaryKey&); - SQLPrimaryKey& operator=(const SQLPrimaryKey&); - SQLPrimaryKey() : table_db(), table_name(), column_name(), key_seq(0), pk_name(), enable_cstr(0), validate_cstr(0), rely_cstr(0) { - } - - virtual ~SQLPrimaryKey() throw(); - std::string table_db; - std::string table_name; - std::string column_name; - int32_t key_seq; - std::string pk_name; - bool enable_cstr; - bool validate_cstr; - bool rely_cstr; - - _SQLPrimaryKey__isset __isset; - - void __set_table_db(const std::string& val); - - void __set_table_name(const std::string& val); - - void __set_column_name(const std::string& val); - - void __set_key_seq(const int32_t val); - - void __set_pk_name(const std::string& val); - - void __set_enable_cstr(const bool val); - - void __set_validate_cstr(const bool val); - - void __set_rely_cstr(const bool val); - - bool operator == (const SQLPrimaryKey & rhs) const - { - if (!(table_db == rhs.table_db)) - return false; - if (!(table_name == rhs.table_name)) - return false; - if (!(column_name == rhs.column_name)) - return false; - if (!(key_seq == rhs.key_seq)) - return false; - if (!(pk_name == rhs.pk_name)) - return false; - if (!(enable_cstr == rhs.enable_cstr)) - return false; - if (!(validate_cstr == rhs.validate_cstr)) - return false; - if (!(rely_cstr == rhs.rely_cstr)) - return false; - return true; - } - bool operator != (const SQLPrimaryKey &rhs) const { - return !(*this == rhs); - } - - bool operator < (const SQLPrimaryKey & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(SQLPrimaryKey &a, SQLPrimaryKey &b); - -inline std::ostream& operator<<(std::ostream& out, const SQLPrimaryKey& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _SQLForeignKey__isset { - _SQLForeignKey__isset() : pktable_db(false), pktable_name(false), pkcolumn_name(false), fktable_db(false), fktable_name(false), fkcolumn_name(false), key_seq(false), update_rule(false), delete_rule(false), fk_name(false), pk_name(false), enable_cstr(false), validate_cstr(false), rely_cstr(false) {} - bool pktable_db :1; - bool pktable_name :1; - bool pkcolumn_name :1; - bool fktable_db :1; - bool fktable_name :1; - bool fkcolumn_name :1; - bool key_seq :1; - bool update_rule :1; - bool delete_rule :1; - bool fk_name :1; - bool pk_name :1; - bool enable_cstr :1; - bool validate_cstr :1; - bool rely_cstr :1; -} _SQLForeignKey__isset; - -class SQLForeignKey { - public: - - SQLForeignKey(const SQLForeignKey&); - SQLForeignKey& operator=(const SQLForeignKey&); - SQLForeignKey() : pktable_db(), pktable_name(), pkcolumn_name(), fktable_db(), fktable_name(), fkcolumn_name(), key_seq(0), update_rule(0), delete_rule(0), fk_name(), pk_name(), enable_cstr(0), validate_cstr(0), rely_cstr(0) { - } - - virtual ~SQLForeignKey() throw(); - std::string pktable_db; - std::string pktable_name; - std::string pkcolumn_name; - std::string fktable_db; - std::string fktable_name; - std::string fkcolumn_name; - int32_t key_seq; - int32_t update_rule; - int32_t delete_rule; - std::string fk_name; - std::string pk_name; - bool enable_cstr; - bool validate_cstr; - bool rely_cstr; - - _SQLForeignKey__isset __isset; - - void __set_pktable_db(const std::string& val); - - void __set_pktable_name(const std::string& val); - - void __set_pkcolumn_name(const std::string& val); - - void __set_fktable_db(const std::string& val); - - void __set_fktable_name(const std::string& val); - - void __set_fkcolumn_name(const std::string& val); - - void __set_key_seq(const int32_t val); - - void __set_update_rule(const int32_t val); - - void __set_delete_rule(const int32_t val); - - void __set_fk_name(const std::string& val); - - void __set_pk_name(const std::string& val); - - void __set_enable_cstr(const bool val); - - void __set_validate_cstr(const bool val); - - void __set_rely_cstr(const bool val); - - bool operator == (const SQLForeignKey & rhs) const - { - if (!(pktable_db == rhs.pktable_db)) - return false; - if (!(pktable_name == rhs.pktable_name)) - return false; - if (!(pkcolumn_name == rhs.pkcolumn_name)) - return false; - if (!(fktable_db == rhs.fktable_db)) - return false; - if (!(fktable_name == rhs.fktable_name)) - return false; - if (!(fkcolumn_name == rhs.fkcolumn_name)) - return false; - if (!(key_seq == rhs.key_seq)) - return false; - if (!(update_rule == rhs.update_rule)) - return false; - if (!(delete_rule == rhs.delete_rule)) - return false; - if (!(fk_name == rhs.fk_name)) - return false; - if (!(pk_name == rhs.pk_name)) - return false; - if (!(enable_cstr == rhs.enable_cstr)) - return false; - if (!(validate_cstr == rhs.validate_cstr)) - return false; - if (!(rely_cstr == rhs.rely_cstr)) - return false; - return true; - } - bool operator != (const SQLForeignKey &rhs) const { - return !(*this == rhs); - } - - bool operator < (const SQLForeignKey & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(SQLForeignKey &a, SQLForeignKey &b); - -inline std::ostream& operator<<(std::ostream& out, const SQLForeignKey& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _SQLUniqueConstraint__isset { - _SQLUniqueConstraint__isset() : table_db(false), table_name(false), column_name(false), key_seq(false), uk_name(false), enable_cstr(false), validate_cstr(false), rely_cstr(false) {} - bool table_db :1; - bool table_name :1; - bool column_name :1; - bool key_seq :1; - bool uk_name :1; - bool enable_cstr :1; - bool validate_cstr :1; - bool rely_cstr :1; -} _SQLUniqueConstraint__isset; - -class SQLUniqueConstraint { - public: - - SQLUniqueConstraint(const SQLUniqueConstraint&); - SQLUniqueConstraint& operator=(const SQLUniqueConstraint&); - SQLUniqueConstraint() : table_db(), table_name(), column_name(), key_seq(0), uk_name(), enable_cstr(0), validate_cstr(0), rely_cstr(0) { - } - - virtual ~SQLUniqueConstraint() throw(); - std::string table_db; - std::string table_name; - std::string column_name; - int32_t key_seq; - std::string uk_name; - bool enable_cstr; - bool validate_cstr; - bool rely_cstr; - - _SQLUniqueConstraint__isset __isset; - - void __set_table_db(const std::string& val); - - void __set_table_name(const std::string& val); - - void __set_column_name(const std::string& val); - - void __set_key_seq(const int32_t val); - - void __set_uk_name(const std::string& val); - - void __set_enable_cstr(const bool val); - - void __set_validate_cstr(const bool val); - - void __set_rely_cstr(const bool val); - - bool operator == (const SQLUniqueConstraint & rhs) const - { - if (!(table_db == rhs.table_db)) - return false; - if (!(table_name == rhs.table_name)) - return false; - if (!(column_name == rhs.column_name)) - return false; - if (!(key_seq == rhs.key_seq)) - return false; - if (!(uk_name == rhs.uk_name)) - return false; - if (!(enable_cstr == rhs.enable_cstr)) - return false; - if (!(validate_cstr == rhs.validate_cstr)) - return false; - if (!(rely_cstr == rhs.rely_cstr)) - return false; - return true; - } - bool operator != (const SQLUniqueConstraint &rhs) const { - return !(*this == rhs); - } - - bool operator < (const SQLUniqueConstraint & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(SQLUniqueConstraint &a, SQLUniqueConstraint &b); - -inline std::ostream& operator<<(std::ostream& out, const SQLUniqueConstraint& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _SQLNotNullConstraint__isset { - _SQLNotNullConstraint__isset() : table_db(false), table_name(false), column_name(false), nn_name(false), enable_cstr(false), validate_cstr(false), rely_cstr(false) {} - bool table_db :1; - bool table_name :1; - bool column_name :1; - bool nn_name :1; - bool enable_cstr :1; - bool validate_cstr :1; - bool rely_cstr :1; -} _SQLNotNullConstraint__isset; - -class SQLNotNullConstraint { - public: - - SQLNotNullConstraint(const SQLNotNullConstraint&); - SQLNotNullConstraint& operator=(const SQLNotNullConstraint&); - SQLNotNullConstraint() : table_db(), table_name(), column_name(), nn_name(), enable_cstr(0), validate_cstr(0), rely_cstr(0) { - } - - virtual ~SQLNotNullConstraint() throw(); - std::string table_db; - std::string table_name; - std::string column_name; - std::string nn_name; - bool enable_cstr; - bool validate_cstr; - bool rely_cstr; - - _SQLNotNullConstraint__isset __isset; - - void __set_table_db(const std::string& val); - - void __set_table_name(const std::string& val); - - void __set_column_name(const std::string& val); - - void __set_nn_name(const std::string& val); - - void __set_enable_cstr(const bool val); - - void __set_validate_cstr(const bool val); - - void __set_rely_cstr(const bool val); - - bool operator == (const SQLNotNullConstraint & rhs) const - { - if (!(table_db == rhs.table_db)) - return false; - if (!(table_name == rhs.table_name)) - return false; - if (!(column_name == rhs.column_name)) - return false; - if (!(nn_name == rhs.nn_name)) - return false; - if (!(enable_cstr == rhs.enable_cstr)) - return false; - if (!(validate_cstr == rhs.validate_cstr)) - return false; - if (!(rely_cstr == rhs.rely_cstr)) - return false; - return true; - } - bool operator != (const SQLNotNullConstraint &rhs) const { - return !(*this == rhs); - } - - bool operator < (const SQLNotNullConstraint & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(SQLNotNullConstraint &a, SQLNotNullConstraint &b); - -inline std::ostream& operator<<(std::ostream& out, const SQLNotNullConstraint& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _Type__isset { - _Type__isset() : name(false), type1(false), type2(false), fields(false) {} - bool name :1; - bool type1 :1; - bool type2 :1; - bool fields :1; -} _Type__isset; - -class Type { - public: - - Type(const Type&); - Type& operator=(const Type&); - Type() : name(), type1(), type2() { - } - - virtual ~Type() throw(); - std::string name; - std::string type1; - std::string type2; - std::vector fields; - - _Type__isset __isset; - - void __set_name(const std::string& val); - - void __set_type1(const std::string& val); - - void __set_type2(const std::string& val); - - void __set_fields(const std::vector & val); - - bool operator == (const Type & rhs) const - { - if (!(name == rhs.name)) - return false; - if (__isset.type1 != rhs.__isset.type1) - return false; - else if (__isset.type1 && !(type1 == rhs.type1)) - return false; - if (__isset.type2 != rhs.__isset.type2) - return false; - else if (__isset.type2 && !(type2 == rhs.type2)) - return false; - if (__isset.fields != rhs.__isset.fields) - return false; - else if (__isset.fields && !(fields == rhs.fields)) - return false; - return true; - } - bool operator != (const Type &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Type & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(Type &a, Type &b); - -inline std::ostream& operator<<(std::ostream& out, const Type& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _HiveObjectRef__isset { - _HiveObjectRef__isset() : objectType(false), dbName(false), objectName(false), partValues(false), columnName(false) {} - bool objectType :1; - bool dbName :1; - bool objectName :1; - bool partValues :1; - bool columnName :1; -} _HiveObjectRef__isset; - -class HiveObjectRef { - public: - - HiveObjectRef(const HiveObjectRef&); - HiveObjectRef& operator=(const HiveObjectRef&); - HiveObjectRef() : objectType((HiveObjectType::type)0), dbName(), objectName(), columnName() { - } - - virtual ~HiveObjectRef() throw(); - HiveObjectType::type objectType; - std::string dbName; - std::string objectName; - std::vector partValues; - std::string columnName; - - _HiveObjectRef__isset __isset; - - void __set_objectType(const HiveObjectType::type val); - - void __set_dbName(const std::string& val); - - void __set_objectName(const std::string& val); - - void __set_partValues(const std::vector & val); - - void __set_columnName(const std::string& val); - - bool operator == (const HiveObjectRef & rhs) const - { - if (!(objectType == rhs.objectType)) - return false; - if (!(dbName == rhs.dbName)) - return false; - if (!(objectName == rhs.objectName)) - return false; - if (!(partValues == rhs.partValues)) - return false; - if (!(columnName == rhs.columnName)) - return false; - return true; - } - bool operator != (const HiveObjectRef &rhs) const { - return !(*this == rhs); - } - - bool operator < (const HiveObjectRef & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(HiveObjectRef &a, HiveObjectRef &b); - -inline std::ostream& operator<<(std::ostream& out, const HiveObjectRef& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _PrivilegeGrantInfo__isset { - _PrivilegeGrantInfo__isset() : privilege(false), createTime(false), grantor(false), grantorType(false), grantOption(false) {} - bool privilege :1; - bool createTime :1; - bool grantor :1; - bool grantorType :1; - bool grantOption :1; -} _PrivilegeGrantInfo__isset; - -class PrivilegeGrantInfo { - public: - - PrivilegeGrantInfo(const PrivilegeGrantInfo&); - PrivilegeGrantInfo& operator=(const PrivilegeGrantInfo&); - PrivilegeGrantInfo() : privilege(), createTime(0), grantor(), grantorType((PrincipalType::type)0), grantOption(0) { - } - - virtual ~PrivilegeGrantInfo() throw(); - std::string privilege; - int32_t createTime; - std::string grantor; - PrincipalType::type grantorType; - bool grantOption; - - _PrivilegeGrantInfo__isset __isset; - - void __set_privilege(const std::string& val); - - void __set_createTime(const int32_t val); - - void __set_grantor(const std::string& val); - - void __set_grantorType(const PrincipalType::type val); - - void __set_grantOption(const bool val); - - bool operator == (const PrivilegeGrantInfo & rhs) const - { - if (!(privilege == rhs.privilege)) - return false; - if (!(createTime == rhs.createTime)) - return false; - if (!(grantor == rhs.grantor)) - return false; - if (!(grantorType == rhs.grantorType)) - return false; - if (!(grantOption == rhs.grantOption)) - return false; - return true; - } - bool operator != (const PrivilegeGrantInfo &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PrivilegeGrantInfo & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PrivilegeGrantInfo &a, PrivilegeGrantInfo &b); - -inline std::ostream& operator<<(std::ostream& out, const PrivilegeGrantInfo& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _HiveObjectPrivilege__isset { - _HiveObjectPrivilege__isset() : hiveObject(false), principalName(false), principalType(false), grantInfo(false) {} - bool hiveObject :1; - bool principalName :1; - bool principalType :1; - bool grantInfo :1; -} _HiveObjectPrivilege__isset; - -class HiveObjectPrivilege { - public: - - HiveObjectPrivilege(const HiveObjectPrivilege&); - HiveObjectPrivilege& operator=(const HiveObjectPrivilege&); - HiveObjectPrivilege() : principalName(), principalType((PrincipalType::type)0) { - } - - virtual ~HiveObjectPrivilege() throw(); - HiveObjectRef hiveObject; - std::string principalName; - PrincipalType::type principalType; - PrivilegeGrantInfo grantInfo; - - _HiveObjectPrivilege__isset __isset; - - void __set_hiveObject(const HiveObjectRef& val); - - void __set_principalName(const std::string& val); - - void __set_principalType(const PrincipalType::type val); - - void __set_grantInfo(const PrivilegeGrantInfo& val); - - bool operator == (const HiveObjectPrivilege & rhs) const - { - if (!(hiveObject == rhs.hiveObject)) - return false; - if (!(principalName == rhs.principalName)) - return false; - if (!(principalType == rhs.principalType)) - return false; - if (!(grantInfo == rhs.grantInfo)) - return false; - return true; - } - bool operator != (const HiveObjectPrivilege &rhs) const { - return !(*this == rhs); - } - - bool operator < (const HiveObjectPrivilege & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(HiveObjectPrivilege &a, HiveObjectPrivilege &b); - -inline std::ostream& operator<<(std::ostream& out, const HiveObjectPrivilege& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _PrivilegeBag__isset { - _PrivilegeBag__isset() : privileges(false) {} - bool privileges :1; -} _PrivilegeBag__isset; - -class PrivilegeBag { - public: - - PrivilegeBag(const PrivilegeBag&); - PrivilegeBag& operator=(const PrivilegeBag&); - PrivilegeBag() { - } - - virtual ~PrivilegeBag() throw(); - std::vector privileges; - - _PrivilegeBag__isset __isset; - - void __set_privileges(const std::vector & val); - - bool operator == (const PrivilegeBag & rhs) const - { - if (!(privileges == rhs.privileges)) - return false; - return true; - } - bool operator != (const PrivilegeBag &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PrivilegeBag & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PrivilegeBag &a, PrivilegeBag &b); - -inline std::ostream& operator<<(std::ostream& out, const PrivilegeBag& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _PrincipalPrivilegeSet__isset { - _PrincipalPrivilegeSet__isset() : userPrivileges(false), groupPrivileges(false), rolePrivileges(false) {} - bool userPrivileges :1; - bool groupPrivileges :1; - bool rolePrivileges :1; -} _PrincipalPrivilegeSet__isset; - -class PrincipalPrivilegeSet { - public: - - PrincipalPrivilegeSet(const PrincipalPrivilegeSet&); - PrincipalPrivilegeSet& operator=(const PrincipalPrivilegeSet&); - PrincipalPrivilegeSet() { - } - - virtual ~PrincipalPrivilegeSet() throw(); - std::map > userPrivileges; - std::map > groupPrivileges; - std::map > rolePrivileges; - - _PrincipalPrivilegeSet__isset __isset; - - void __set_userPrivileges(const std::map > & val); - - void __set_groupPrivileges(const std::map > & val); - - void __set_rolePrivileges(const std::map > & val); - - bool operator == (const PrincipalPrivilegeSet & rhs) const - { - if (!(userPrivileges == rhs.userPrivileges)) - return false; - if (!(groupPrivileges == rhs.groupPrivileges)) - return false; - if (!(rolePrivileges == rhs.rolePrivileges)) - return false; - return true; - } - bool operator != (const PrincipalPrivilegeSet &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PrincipalPrivilegeSet & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PrincipalPrivilegeSet &a, PrincipalPrivilegeSet &b); - -inline std::ostream& operator<<(std::ostream& out, const PrincipalPrivilegeSet& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _GrantRevokePrivilegeRequest__isset { - _GrantRevokePrivilegeRequest__isset() : requestType(false), privileges(false), revokeGrantOption(false) {} - bool requestType :1; - bool privileges :1; - bool revokeGrantOption :1; -} _GrantRevokePrivilegeRequest__isset; - -class GrantRevokePrivilegeRequest { - public: - - GrantRevokePrivilegeRequest(const GrantRevokePrivilegeRequest&); - GrantRevokePrivilegeRequest& operator=(const GrantRevokePrivilegeRequest&); - GrantRevokePrivilegeRequest() : requestType((GrantRevokeType::type)0), revokeGrantOption(0) { - } - - virtual ~GrantRevokePrivilegeRequest() throw(); - GrantRevokeType::type requestType; - PrivilegeBag privileges; - bool revokeGrantOption; - - _GrantRevokePrivilegeRequest__isset __isset; - - void __set_requestType(const GrantRevokeType::type val); - - void __set_privileges(const PrivilegeBag& val); - - void __set_revokeGrantOption(const bool val); - - bool operator == (const GrantRevokePrivilegeRequest & rhs) const - { - if (!(requestType == rhs.requestType)) - return false; - if (!(privileges == rhs.privileges)) - return false; - if (__isset.revokeGrantOption != rhs.__isset.revokeGrantOption) - return false; - else if (__isset.revokeGrantOption && !(revokeGrantOption == rhs.revokeGrantOption)) - return false; - return true; - } - bool operator != (const GrantRevokePrivilegeRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GrantRevokePrivilegeRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GrantRevokePrivilegeRequest &a, GrantRevokePrivilegeRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const GrantRevokePrivilegeRequest& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _GrantRevokePrivilegeResponse__isset { - _GrantRevokePrivilegeResponse__isset() : success(false) {} - bool success :1; -} _GrantRevokePrivilegeResponse__isset; - -class GrantRevokePrivilegeResponse { - public: - - GrantRevokePrivilegeResponse(const GrantRevokePrivilegeResponse&); - GrantRevokePrivilegeResponse& operator=(const GrantRevokePrivilegeResponse&); - GrantRevokePrivilegeResponse() : success(0) { - } - - virtual ~GrantRevokePrivilegeResponse() throw(); - bool success; - - _GrantRevokePrivilegeResponse__isset __isset; - - void __set_success(const bool val); - - bool operator == (const GrantRevokePrivilegeResponse & rhs) const - { - if (__isset.success != rhs.__isset.success) - return false; - else if (__isset.success && !(success == rhs.success)) - return false; - return true; - } - bool operator != (const GrantRevokePrivilegeResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GrantRevokePrivilegeResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GrantRevokePrivilegeResponse &a, GrantRevokePrivilegeResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const GrantRevokePrivilegeResponse& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _Role__isset { - _Role__isset() : roleName(false), createTime(false), ownerName(false) {} - bool roleName :1; - bool createTime :1; - bool ownerName :1; -} _Role__isset; - -class Role { - public: - - Role(const Role&); - Role& operator=(const Role&); - Role() : roleName(), createTime(0), ownerName() { - } - - virtual ~Role() throw(); - std::string roleName; - int32_t createTime; - std::string ownerName; - - _Role__isset __isset; - - void __set_roleName(const std::string& val); - - void __set_createTime(const int32_t val); - - void __set_ownerName(const std::string& val); - - bool operator == (const Role & rhs) const - { - if (!(roleName == rhs.roleName)) - return false; - if (!(createTime == rhs.createTime)) - return false; - if (!(ownerName == rhs.ownerName)) - return false; - return true; - } - bool operator != (const Role &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Role & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(Role &a, Role &b); - -inline std::ostream& operator<<(std::ostream& out, const Role& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _RolePrincipalGrant__isset { - _RolePrincipalGrant__isset() : roleName(false), principalName(false), principalType(false), grantOption(false), grantTime(false), grantorName(false), grantorPrincipalType(false) {} - bool roleName :1; - bool principalName :1; - bool principalType :1; - bool grantOption :1; - bool grantTime :1; - bool grantorName :1; - bool grantorPrincipalType :1; -} _RolePrincipalGrant__isset; - -class RolePrincipalGrant { - public: - - RolePrincipalGrant(const RolePrincipalGrant&); - RolePrincipalGrant& operator=(const RolePrincipalGrant&); - RolePrincipalGrant() : roleName(), principalName(), principalType((PrincipalType::type)0), grantOption(0), grantTime(0), grantorName(), grantorPrincipalType((PrincipalType::type)0) { - } - - virtual ~RolePrincipalGrant() throw(); - std::string roleName; - std::string principalName; - PrincipalType::type principalType; - bool grantOption; - int32_t grantTime; - std::string grantorName; - PrincipalType::type grantorPrincipalType; - - _RolePrincipalGrant__isset __isset; - - void __set_roleName(const std::string& val); - - void __set_principalName(const std::string& val); - - void __set_principalType(const PrincipalType::type val); - - void __set_grantOption(const bool val); - - void __set_grantTime(const int32_t val); - - void __set_grantorName(const std::string& val); - - void __set_grantorPrincipalType(const PrincipalType::type val); - - bool operator == (const RolePrincipalGrant & rhs) const - { - if (!(roleName == rhs.roleName)) - return false; - if (!(principalName == rhs.principalName)) - return false; - if (!(principalType == rhs.principalType)) - return false; - if (!(grantOption == rhs.grantOption)) - return false; - if (!(grantTime == rhs.grantTime)) - return false; - if (!(grantorName == rhs.grantorName)) - return false; - if (!(grantorPrincipalType == rhs.grantorPrincipalType)) - return false; - return true; - } - bool operator != (const RolePrincipalGrant &rhs) const { - return !(*this == rhs); - } - - bool operator < (const RolePrincipalGrant & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(RolePrincipalGrant &a, RolePrincipalGrant &b); - -inline std::ostream& operator<<(std::ostream& out, const RolePrincipalGrant& obj) -{ - obj.printTo(out); - return out; -} - - -class GetRoleGrantsForPrincipalRequest { - public: - - GetRoleGrantsForPrincipalRequest(const GetRoleGrantsForPrincipalRequest&); - GetRoleGrantsForPrincipalRequest& operator=(const GetRoleGrantsForPrincipalRequest&); - GetRoleGrantsForPrincipalRequest() : principal_name(), principal_type((PrincipalType::type)0) { - } - - virtual ~GetRoleGrantsForPrincipalRequest() throw(); - std::string principal_name; - PrincipalType::type principal_type; - - void __set_principal_name(const std::string& val); - - void __set_principal_type(const PrincipalType::type val); - - bool operator == (const GetRoleGrantsForPrincipalRequest & rhs) const - { - if (!(principal_name == rhs.principal_name)) - return false; - if (!(principal_type == rhs.principal_type)) - return false; - return true; - } - bool operator != (const GetRoleGrantsForPrincipalRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetRoleGrantsForPrincipalRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetRoleGrantsForPrincipalRequest &a, GetRoleGrantsForPrincipalRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const GetRoleGrantsForPrincipalRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class GetRoleGrantsForPrincipalResponse { - public: - - GetRoleGrantsForPrincipalResponse(const GetRoleGrantsForPrincipalResponse&); - GetRoleGrantsForPrincipalResponse& operator=(const GetRoleGrantsForPrincipalResponse&); - GetRoleGrantsForPrincipalResponse() { - } - - virtual ~GetRoleGrantsForPrincipalResponse() throw(); - std::vector principalGrants; - - void __set_principalGrants(const std::vector & val); - - bool operator == (const GetRoleGrantsForPrincipalResponse & rhs) const - { - if (!(principalGrants == rhs.principalGrants)) - return false; - return true; - } - bool operator != (const GetRoleGrantsForPrincipalResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetRoleGrantsForPrincipalResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetRoleGrantsForPrincipalResponse &a, GetRoleGrantsForPrincipalResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const GetRoleGrantsForPrincipalResponse& obj) -{ - obj.printTo(out); - return out; -} - - -class GetPrincipalsInRoleRequest { - public: - - GetPrincipalsInRoleRequest(const GetPrincipalsInRoleRequest&); - GetPrincipalsInRoleRequest& operator=(const GetPrincipalsInRoleRequest&); - GetPrincipalsInRoleRequest() : roleName() { - } - - virtual ~GetPrincipalsInRoleRequest() throw(); - std::string roleName; - - void __set_roleName(const std::string& val); - - bool operator == (const GetPrincipalsInRoleRequest & rhs) const - { - if (!(roleName == rhs.roleName)) - return false; - return true; - } - bool operator != (const GetPrincipalsInRoleRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetPrincipalsInRoleRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetPrincipalsInRoleRequest &a, GetPrincipalsInRoleRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const GetPrincipalsInRoleRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class GetPrincipalsInRoleResponse { - public: - - GetPrincipalsInRoleResponse(const GetPrincipalsInRoleResponse&); - GetPrincipalsInRoleResponse& operator=(const GetPrincipalsInRoleResponse&); - GetPrincipalsInRoleResponse() { - } - - virtual ~GetPrincipalsInRoleResponse() throw(); - std::vector principalGrants; - - void __set_principalGrants(const std::vector & val); - - bool operator == (const GetPrincipalsInRoleResponse & rhs) const - { - if (!(principalGrants == rhs.principalGrants)) - return false; - return true; - } - bool operator != (const GetPrincipalsInRoleResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetPrincipalsInRoleResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetPrincipalsInRoleResponse &a, GetPrincipalsInRoleResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const GetPrincipalsInRoleResponse& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _GrantRevokeRoleRequest__isset { - _GrantRevokeRoleRequest__isset() : requestType(false), roleName(false), principalName(false), principalType(false), grantor(false), grantorType(false), grantOption(false) {} - bool requestType :1; - bool roleName :1; - bool principalName :1; - bool principalType :1; - bool grantor :1; - bool grantorType :1; - bool grantOption :1; -} _GrantRevokeRoleRequest__isset; - -class GrantRevokeRoleRequest { - public: - - GrantRevokeRoleRequest(const GrantRevokeRoleRequest&); - GrantRevokeRoleRequest& operator=(const GrantRevokeRoleRequest&); - GrantRevokeRoleRequest() : requestType((GrantRevokeType::type)0), roleName(), principalName(), principalType((PrincipalType::type)0), grantor(), grantorType((PrincipalType::type)0), grantOption(0) { - } - - virtual ~GrantRevokeRoleRequest() throw(); - GrantRevokeType::type requestType; - std::string roleName; - std::string principalName; - PrincipalType::type principalType; - std::string grantor; - PrincipalType::type grantorType; - bool grantOption; - - _GrantRevokeRoleRequest__isset __isset; - - void __set_requestType(const GrantRevokeType::type val); - - void __set_roleName(const std::string& val); - - void __set_principalName(const std::string& val); - - void __set_principalType(const PrincipalType::type val); - - void __set_grantor(const std::string& val); - - void __set_grantorType(const PrincipalType::type val); - - void __set_grantOption(const bool val); - - bool operator == (const GrantRevokeRoleRequest & rhs) const - { - if (!(requestType == rhs.requestType)) - return false; - if (!(roleName == rhs.roleName)) - return false; - if (!(principalName == rhs.principalName)) - return false; - if (!(principalType == rhs.principalType)) - return false; - if (__isset.grantor != rhs.__isset.grantor) - return false; - else if (__isset.grantor && !(grantor == rhs.grantor)) - return false; - if (__isset.grantorType != rhs.__isset.grantorType) - return false; - else if (__isset.grantorType && !(grantorType == rhs.grantorType)) - return false; - if (__isset.grantOption != rhs.__isset.grantOption) - return false; - else if (__isset.grantOption && !(grantOption == rhs.grantOption)) - return false; - return true; - } - bool operator != (const GrantRevokeRoleRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GrantRevokeRoleRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GrantRevokeRoleRequest &a, GrantRevokeRoleRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const GrantRevokeRoleRequest& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _GrantRevokeRoleResponse__isset { - _GrantRevokeRoleResponse__isset() : success(false) {} - bool success :1; -} _GrantRevokeRoleResponse__isset; - -class GrantRevokeRoleResponse { - public: - - GrantRevokeRoleResponse(const GrantRevokeRoleResponse&); - GrantRevokeRoleResponse& operator=(const GrantRevokeRoleResponse&); - GrantRevokeRoleResponse() : success(0) { - } - - virtual ~GrantRevokeRoleResponse() throw(); - bool success; - - _GrantRevokeRoleResponse__isset __isset; - - void __set_success(const bool val); - - bool operator == (const GrantRevokeRoleResponse & rhs) const - { - if (__isset.success != rhs.__isset.success) - return false; - else if (__isset.success && !(success == rhs.success)) - return false; - return true; - } - bool operator != (const GrantRevokeRoleResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GrantRevokeRoleResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GrantRevokeRoleResponse &a, GrantRevokeRoleResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const GrantRevokeRoleResponse& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _Database__isset { - _Database__isset() : name(false), description(false), locationUri(false), parameters(false), privileges(false), ownerName(false), ownerType(false) {} - bool name :1; - bool description :1; - bool locationUri :1; - bool parameters :1; - bool privileges :1; - bool ownerName :1; - bool ownerType :1; -} _Database__isset; - -class Database { - public: - - Database(const Database&); - Database& operator=(const Database&); - Database() : name(), description(), locationUri(), ownerName(), ownerType((PrincipalType::type)0) { - } - - virtual ~Database() throw(); - std::string name; - std::string description; - std::string locationUri; - std::map parameters; - PrincipalPrivilegeSet privileges; - std::string ownerName; - PrincipalType::type ownerType; - - _Database__isset __isset; - - void __set_name(const std::string& val); - - void __set_description(const std::string& val); - - void __set_locationUri(const std::string& val); - - void __set_parameters(const std::map & val); - - void __set_privileges(const PrincipalPrivilegeSet& val); - - void __set_ownerName(const std::string& val); - - void __set_ownerType(const PrincipalType::type val); - - bool operator == (const Database & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(description == rhs.description)) - return false; - if (!(locationUri == rhs.locationUri)) - return false; - if (!(parameters == rhs.parameters)) - return false; - if (__isset.privileges != rhs.__isset.privileges) - return false; - else if (__isset.privileges && !(privileges == rhs.privileges)) - return false; - if (__isset.ownerName != rhs.__isset.ownerName) - return false; - else if (__isset.ownerName && !(ownerName == rhs.ownerName)) - return false; - if (__isset.ownerType != rhs.__isset.ownerType) - return false; - else if (__isset.ownerType && !(ownerType == rhs.ownerType)) - return false; - return true; - } - bool operator != (const Database &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Database & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(Database &a, Database &b); - -inline std::ostream& operator<<(std::ostream& out, const Database& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _SerDeInfo__isset { - _SerDeInfo__isset() : name(false), serializationLib(false), parameters(false) {} - bool name :1; - bool serializationLib :1; - bool parameters :1; -} _SerDeInfo__isset; - -class SerDeInfo { - public: - - SerDeInfo(const SerDeInfo&); - SerDeInfo& operator=(const SerDeInfo&); - SerDeInfo() : name(), serializationLib() { - } - - virtual ~SerDeInfo() throw(); - std::string name; - std::string serializationLib; - std::map parameters; - - _SerDeInfo__isset __isset; - - void __set_name(const std::string& val); - - void __set_serializationLib(const std::string& val); - - void __set_parameters(const std::map & val); - - bool operator == (const SerDeInfo & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(serializationLib == rhs.serializationLib)) - return false; - if (!(parameters == rhs.parameters)) - return false; - return true; - } - bool operator != (const SerDeInfo &rhs) const { - return !(*this == rhs); - } - - bool operator < (const SerDeInfo & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(SerDeInfo &a, SerDeInfo &b); - -inline std::ostream& operator<<(std::ostream& out, const SerDeInfo& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _Order__isset { - _Order__isset() : col(false), order(false) {} - bool col :1; - bool order :1; -} _Order__isset; - -class Order { - public: - - Order(const Order&); - Order& operator=(const Order&); - Order() : col(), order(0) { - } - - virtual ~Order() throw(); - std::string col; - int32_t order; - - _Order__isset __isset; - - void __set_col(const std::string& val); - - void __set_order(const int32_t val); - - bool operator == (const Order & rhs) const - { - if (!(col == rhs.col)) - return false; - if (!(order == rhs.order)) - return false; - return true; - } - bool operator != (const Order &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Order & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(Order &a, Order &b); - -inline std::ostream& operator<<(std::ostream& out, const Order& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _SkewedInfo__isset { - _SkewedInfo__isset() : skewedColNames(false), skewedColValues(false), skewedColValueLocationMaps(false) {} - bool skewedColNames :1; - bool skewedColValues :1; - bool skewedColValueLocationMaps :1; -} _SkewedInfo__isset; - -class SkewedInfo { - public: - - SkewedInfo(const SkewedInfo&); - SkewedInfo& operator=(const SkewedInfo&); - SkewedInfo() { - } - - virtual ~SkewedInfo() throw(); - std::vector skewedColNames; - std::vector > skewedColValues; - std::map , std::string> skewedColValueLocationMaps; - - _SkewedInfo__isset __isset; - - void __set_skewedColNames(const std::vector & val); - - void __set_skewedColValues(const std::vector > & val); - - void __set_skewedColValueLocationMaps(const std::map , std::string> & val); - - bool operator == (const SkewedInfo & rhs) const - { - if (!(skewedColNames == rhs.skewedColNames)) - return false; - if (!(skewedColValues == rhs.skewedColValues)) - return false; - if (!(skewedColValueLocationMaps == rhs.skewedColValueLocationMaps)) - return false; - return true; - } - bool operator != (const SkewedInfo &rhs) const { - return !(*this == rhs); - } - - bool operator < (const SkewedInfo & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(SkewedInfo &a, SkewedInfo &b); - -inline std::ostream& operator<<(std::ostream& out, const SkewedInfo& obj) -{ - obj.printTo(out); - return out; -} - -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), storedAsSubDirectories(false) {} - bool cols :1; - bool location :1; - bool inputFormat :1; - bool outputFormat :1; - bool compressed :1; - bool numBuckets :1; - bool serdeInfo :1; - bool bucketCols :1; - bool sortCols :1; - bool parameters :1; - bool skewedInfo :1; - bool storedAsSubDirectories :1; -} _StorageDescriptor__isset; - -class StorageDescriptor { - public: - - StorageDescriptor(const StorageDescriptor&); - StorageDescriptor& operator=(const StorageDescriptor&); - StorageDescriptor() : location(), inputFormat(), outputFormat(), compressed(0), numBuckets(0), storedAsSubDirectories(0) { - } - - virtual ~StorageDescriptor() throw(); - std::vector cols; - std::string location; - std::string inputFormat; - std::string outputFormat; - bool compressed; - int32_t numBuckets; - SerDeInfo serdeInfo; - std::vector bucketCols; - std::vector sortCols; - std::map parameters; - SkewedInfo skewedInfo; - bool storedAsSubDirectories; - - _StorageDescriptor__isset __isset; - - void __set_cols(const std::vector & val); - - void __set_location(const std::string& val); - - void __set_inputFormat(const std::string& val); - - void __set_outputFormat(const std::string& val); - - void __set_compressed(const bool val); - - void __set_numBuckets(const int32_t val); - - void __set_serdeInfo(const SerDeInfo& val); - - void __set_bucketCols(const std::vector & val); - - void __set_sortCols(const std::vector & val); - - void __set_parameters(const std::map & val); - - void __set_skewedInfo(const SkewedInfo& val); - - void __set_storedAsSubDirectories(const bool val); - - bool operator == (const StorageDescriptor & rhs) const - { - if (!(cols == rhs.cols)) - return false; - if (!(location == rhs.location)) - return false; - if (!(inputFormat == rhs.inputFormat)) - return false; - if (!(outputFormat == rhs.outputFormat)) - return false; - if (!(compressed == rhs.compressed)) - return false; - if (!(numBuckets == rhs.numBuckets)) - return false; - if (!(serdeInfo == rhs.serdeInfo)) - return false; - if (!(bucketCols == rhs.bucketCols)) - return false; - if (!(sortCols == rhs.sortCols)) - return false; - if (!(parameters == rhs.parameters)) - return false; - if (__isset.skewedInfo != rhs.__isset.skewedInfo) - return false; - else if (__isset.skewedInfo && !(skewedInfo == rhs.skewedInfo)) - return false; - if (__isset.storedAsSubDirectories != rhs.__isset.storedAsSubDirectories) - return false; - else if (__isset.storedAsSubDirectories && !(storedAsSubDirectories == rhs.storedAsSubDirectories)) - return false; - return true; - } - bool operator != (const StorageDescriptor &rhs) const { - return !(*this == rhs); - } - - bool operator < (const StorageDescriptor & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(StorageDescriptor &a, StorageDescriptor &b); - -inline std::ostream& operator<<(std::ostream& out, const StorageDescriptor& obj) -{ - obj.printTo(out); - return out; -} - -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), temporary(true), rewriteEnabled(false) {} - bool tableName :1; - bool dbName :1; - bool owner :1; - bool createTime :1; - bool lastAccessTime :1; - bool retention :1; - bool sd :1; - bool partitionKeys :1; - bool parameters :1; - bool viewOriginalText :1; - bool viewExpandedText :1; - bool tableType :1; - bool privileges :1; - bool temporary :1; - bool rewriteEnabled :1; -} _Table__isset; - -class Table { - public: - - Table(const Table&); - Table& operator=(const Table&); - Table() : tableName(), dbName(), owner(), createTime(0), lastAccessTime(0), retention(0), viewOriginalText(), viewExpandedText(), tableType(), temporary(false), rewriteEnabled(0) { - } - - virtual ~Table() throw(); - std::string tableName; - std::string dbName; - std::string owner; - int32_t createTime; - int32_t lastAccessTime; - int32_t retention; - StorageDescriptor sd; - std::vector partitionKeys; - std::map parameters; - std::string viewOriginalText; - std::string viewExpandedText; - std::string tableType; - PrincipalPrivilegeSet privileges; - bool temporary; - bool rewriteEnabled; - - _Table__isset __isset; - - void __set_tableName(const std::string& val); - - void __set_dbName(const std::string& val); - - void __set_owner(const std::string& val); - - void __set_createTime(const int32_t val); - - void __set_lastAccessTime(const int32_t val); - - void __set_retention(const int32_t val); - - void __set_sd(const StorageDescriptor& val); - - void __set_partitionKeys(const std::vector & val); - - void __set_parameters(const std::map & val); - - void __set_viewOriginalText(const std::string& val); - - void __set_viewExpandedText(const std::string& val); - - void __set_tableType(const std::string& val); - - void __set_privileges(const PrincipalPrivilegeSet& val); - - void __set_temporary(const bool val); - - void __set_rewriteEnabled(const bool val); - - bool operator == (const Table & rhs) const - { - if (!(tableName == rhs.tableName)) - return false; - if (!(dbName == rhs.dbName)) - return false; - if (!(owner == rhs.owner)) - return false; - if (!(createTime == rhs.createTime)) - return false; - if (!(lastAccessTime == rhs.lastAccessTime)) - return false; - if (!(retention == rhs.retention)) - return false; - if (!(sd == rhs.sd)) - return false; - if (!(partitionKeys == rhs.partitionKeys)) - return false; - if (!(parameters == rhs.parameters)) - return false; - if (!(viewOriginalText == rhs.viewOriginalText)) - return false; - if (!(viewExpandedText == rhs.viewExpandedText)) - return false; - if (!(tableType == rhs.tableType)) - return false; - if (__isset.privileges != rhs.__isset.privileges) - return false; - else if (__isset.privileges && !(privileges == rhs.privileges)) - return false; - if (__isset.temporary != rhs.__isset.temporary) - return false; - else if (__isset.temporary && !(temporary == rhs.temporary)) - return false; - if (__isset.rewriteEnabled != rhs.__isset.rewriteEnabled) - return false; - else if (__isset.rewriteEnabled && !(rewriteEnabled == rhs.rewriteEnabled)) - return false; - return true; - } - bool operator != (const Table &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Table & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(Table &a, Table &b); - -inline std::ostream& operator<<(std::ostream& out, const Table& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _Partition__isset { - _Partition__isset() : values(false), dbName(false), tableName(false), createTime(false), lastAccessTime(false), sd(false), parameters(false), privileges(false) {} - bool values :1; - bool dbName :1; - bool tableName :1; - bool createTime :1; - bool lastAccessTime :1; - bool sd :1; - bool parameters :1; - bool privileges :1; -} _Partition__isset; - -class Partition { - public: - - Partition(const Partition&); - Partition& operator=(const Partition&); - Partition() : dbName(), tableName(), createTime(0), lastAccessTime(0) { - } - - virtual ~Partition() throw(); - std::vector values; - std::string dbName; - std::string tableName; - int32_t createTime; - int32_t lastAccessTime; - StorageDescriptor sd; - std::map parameters; - PrincipalPrivilegeSet privileges; - - _Partition__isset __isset; - - void __set_values(const std::vector & val); - - void __set_dbName(const std::string& val); - - void __set_tableName(const std::string& val); - - void __set_createTime(const int32_t val); - - void __set_lastAccessTime(const int32_t val); - - void __set_sd(const StorageDescriptor& val); - - void __set_parameters(const std::map & val); - - void __set_privileges(const PrincipalPrivilegeSet& val); - - bool operator == (const Partition & rhs) const - { - if (!(values == rhs.values)) - return false; - if (!(dbName == rhs.dbName)) - return false; - if (!(tableName == rhs.tableName)) - return false; - if (!(createTime == rhs.createTime)) - return false; - if (!(lastAccessTime == rhs.lastAccessTime)) - return false; - if (!(sd == rhs.sd)) - return false; - if (!(parameters == rhs.parameters)) - return false; - if (__isset.privileges != rhs.__isset.privileges) - return false; - else if (__isset.privileges && !(privileges == rhs.privileges)) - return false; - return true; - } - bool operator != (const Partition &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Partition & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(Partition &a, Partition &b); - -inline std::ostream& operator<<(std::ostream& out, const Partition& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _PartitionWithoutSD__isset { - _PartitionWithoutSD__isset() : values(false), createTime(false), lastAccessTime(false), relativePath(false), parameters(false), privileges(false) {} - bool values :1; - bool createTime :1; - bool lastAccessTime :1; - bool relativePath :1; - bool parameters :1; - bool privileges :1; -} _PartitionWithoutSD__isset; - -class PartitionWithoutSD { - public: - - PartitionWithoutSD(const PartitionWithoutSD&); - PartitionWithoutSD& operator=(const PartitionWithoutSD&); - PartitionWithoutSD() : createTime(0), lastAccessTime(0), relativePath() { - } - - virtual ~PartitionWithoutSD() throw(); - std::vector values; - int32_t createTime; - int32_t lastAccessTime; - std::string relativePath; - std::map parameters; - PrincipalPrivilegeSet privileges; - - _PartitionWithoutSD__isset __isset; - - void __set_values(const std::vector & val); - - void __set_createTime(const int32_t val); - - void __set_lastAccessTime(const int32_t val); - - void __set_relativePath(const std::string& val); - - void __set_parameters(const std::map & val); - - void __set_privileges(const PrincipalPrivilegeSet& val); - - bool operator == (const PartitionWithoutSD & rhs) const - { - if (!(values == rhs.values)) - return false; - if (!(createTime == rhs.createTime)) - return false; - if (!(lastAccessTime == rhs.lastAccessTime)) - return false; - if (!(relativePath == rhs.relativePath)) - return false; - if (!(parameters == rhs.parameters)) - return false; - if (__isset.privileges != rhs.__isset.privileges) - return false; - else if (__isset.privileges && !(privileges == rhs.privileges)) - return false; - return true; - } - bool operator != (const PartitionWithoutSD &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PartitionWithoutSD & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PartitionWithoutSD &a, PartitionWithoutSD &b); - -inline std::ostream& operator<<(std::ostream& out, const PartitionWithoutSD& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _PartitionSpecWithSharedSD__isset { - _PartitionSpecWithSharedSD__isset() : partitions(false), sd(false) {} - bool partitions :1; - bool sd :1; -} _PartitionSpecWithSharedSD__isset; - -class PartitionSpecWithSharedSD { - public: - - PartitionSpecWithSharedSD(const PartitionSpecWithSharedSD&); - PartitionSpecWithSharedSD& operator=(const PartitionSpecWithSharedSD&); - PartitionSpecWithSharedSD() { - } - - virtual ~PartitionSpecWithSharedSD() throw(); - std::vector partitions; - StorageDescriptor sd; - - _PartitionSpecWithSharedSD__isset __isset; - - void __set_partitions(const std::vector & val); - - void __set_sd(const StorageDescriptor& val); - - bool operator == (const PartitionSpecWithSharedSD & rhs) const - { - if (!(partitions == rhs.partitions)) - return false; - if (!(sd == rhs.sd)) - return false; - return true; - } - bool operator != (const PartitionSpecWithSharedSD &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PartitionSpecWithSharedSD & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PartitionSpecWithSharedSD &a, PartitionSpecWithSharedSD &b); - -inline std::ostream& operator<<(std::ostream& out, const PartitionSpecWithSharedSD& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _PartitionListComposingSpec__isset { - _PartitionListComposingSpec__isset() : partitions(false) {} - bool partitions :1; -} _PartitionListComposingSpec__isset; - -class PartitionListComposingSpec { - public: - - PartitionListComposingSpec(const PartitionListComposingSpec&); - PartitionListComposingSpec& operator=(const PartitionListComposingSpec&); - PartitionListComposingSpec() { - } - - virtual ~PartitionListComposingSpec() throw(); - std::vector partitions; - - _PartitionListComposingSpec__isset __isset; - - void __set_partitions(const std::vector & val); - - bool operator == (const PartitionListComposingSpec & rhs) const - { - if (!(partitions == rhs.partitions)) - return false; - return true; - } - bool operator != (const PartitionListComposingSpec &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PartitionListComposingSpec & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PartitionListComposingSpec &a, PartitionListComposingSpec &b); - -inline std::ostream& operator<<(std::ostream& out, const PartitionListComposingSpec& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _PartitionSpec__isset { - _PartitionSpec__isset() : dbName(false), tableName(false), rootPath(false), sharedSDPartitionSpec(false), partitionList(false) {} - bool dbName :1; - bool tableName :1; - bool rootPath :1; - bool sharedSDPartitionSpec :1; - bool partitionList :1; -} _PartitionSpec__isset; - -class PartitionSpec { - public: - - PartitionSpec(const PartitionSpec&); - PartitionSpec& operator=(const PartitionSpec&); - PartitionSpec() : dbName(), tableName(), rootPath() { - } - - virtual ~PartitionSpec() throw(); - std::string dbName; - std::string tableName; - std::string rootPath; - PartitionSpecWithSharedSD sharedSDPartitionSpec; - PartitionListComposingSpec partitionList; - - _PartitionSpec__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_tableName(const std::string& val); - - void __set_rootPath(const std::string& val); - - void __set_sharedSDPartitionSpec(const PartitionSpecWithSharedSD& val); - - void __set_partitionList(const PartitionListComposingSpec& val); - - bool operator == (const PartitionSpec & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(tableName == rhs.tableName)) - return false; - if (!(rootPath == rhs.rootPath)) - return false; - if (__isset.sharedSDPartitionSpec != rhs.__isset.sharedSDPartitionSpec) - return false; - else if (__isset.sharedSDPartitionSpec && !(sharedSDPartitionSpec == rhs.sharedSDPartitionSpec)) - return false; - if (__isset.partitionList != rhs.__isset.partitionList) - return false; - else if (__isset.partitionList && !(partitionList == rhs.partitionList)) - return false; - return true; - } - bool operator != (const PartitionSpec &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PartitionSpec & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PartitionSpec &a, PartitionSpec &b); - -inline std::ostream& operator<<(std::ostream& out, const PartitionSpec& obj) -{ - obj.printTo(out); - return out; -} - -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 :1; - bool indexHandlerClass :1; - bool dbName :1; - bool origTableName :1; - bool createTime :1; - bool lastAccessTime :1; - bool indexTableName :1; - bool sd :1; - bool parameters :1; - bool deferredRebuild :1; -} _Index__isset; - -class Index { - public: - - Index(const Index&); - Index& operator=(const Index&); - Index() : indexName(), indexHandlerClass(), dbName(), origTableName(), createTime(0), lastAccessTime(0), indexTableName(), deferredRebuild(0) { - } - - virtual ~Index() throw(); - std::string indexName; - std::string indexHandlerClass; - std::string dbName; - std::string origTableName; - int32_t createTime; - int32_t lastAccessTime; - std::string indexTableName; - StorageDescriptor sd; - std::map parameters; - bool deferredRebuild; - - _Index__isset __isset; - - void __set_indexName(const std::string& val); - - void __set_indexHandlerClass(const std::string& val); - - void __set_dbName(const std::string& val); - - void __set_origTableName(const std::string& val); - - void __set_createTime(const int32_t val); - - void __set_lastAccessTime(const int32_t val); - - void __set_indexTableName(const std::string& val); - - void __set_sd(const StorageDescriptor& val); - - void __set_parameters(const std::map & val); - - void __set_deferredRebuild(const bool val); - - bool operator == (const Index & rhs) const - { - if (!(indexName == rhs.indexName)) - return false; - if (!(indexHandlerClass == rhs.indexHandlerClass)) - return false; - if (!(dbName == rhs.dbName)) - return false; - if (!(origTableName == rhs.origTableName)) - return false; - if (!(createTime == rhs.createTime)) - return false; - if (!(lastAccessTime == rhs.lastAccessTime)) - return false; - if (!(indexTableName == rhs.indexTableName)) - return false; - if (!(sd == rhs.sd)) - return false; - if (!(parameters == rhs.parameters)) - return false; - if (!(deferredRebuild == rhs.deferredRebuild)) - return false; - return true; - } - bool operator != (const Index &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Index & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(Index &a, Index &b); - -inline std::ostream& operator<<(std::ostream& out, const Index& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _BooleanColumnStatsData__isset { - _BooleanColumnStatsData__isset() : bitVectors(false) {} - bool bitVectors :1; -} _BooleanColumnStatsData__isset; - -class BooleanColumnStatsData { - public: - - BooleanColumnStatsData(const BooleanColumnStatsData&); - BooleanColumnStatsData& operator=(const BooleanColumnStatsData&); - BooleanColumnStatsData() : numTrues(0), numFalses(0), numNulls(0), bitVectors() { - } - - virtual ~BooleanColumnStatsData() throw(); - int64_t numTrues; - int64_t numFalses; - int64_t numNulls; - std::string bitVectors; - - _BooleanColumnStatsData__isset __isset; - - void __set_numTrues(const int64_t val); - - void __set_numFalses(const int64_t val); - - void __set_numNulls(const int64_t val); - - void __set_bitVectors(const std::string& val); - - bool operator == (const BooleanColumnStatsData & rhs) const - { - if (!(numTrues == rhs.numTrues)) - return false; - if (!(numFalses == rhs.numFalses)) - return false; - if (!(numNulls == rhs.numNulls)) - return false; - if (__isset.bitVectors != rhs.__isset.bitVectors) - return false; - else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) - return false; - return true; - } - bool operator != (const BooleanColumnStatsData &rhs) const { - return !(*this == rhs); - } - - bool operator < (const BooleanColumnStatsData & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(BooleanColumnStatsData &a, BooleanColumnStatsData &b); - -inline std::ostream& operator<<(std::ostream& out, const BooleanColumnStatsData& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _DoubleColumnStatsData__isset { - _DoubleColumnStatsData__isset() : lowValue(false), highValue(false), bitVectors(false) {} - bool lowValue :1; - bool highValue :1; - bool bitVectors :1; -} _DoubleColumnStatsData__isset; - -class DoubleColumnStatsData { - public: - - DoubleColumnStatsData(const DoubleColumnStatsData&); - DoubleColumnStatsData& operator=(const DoubleColumnStatsData&); - DoubleColumnStatsData() : lowValue(0), highValue(0), numNulls(0), numDVs(0), bitVectors() { - } - - virtual ~DoubleColumnStatsData() throw(); - double lowValue; - double highValue; - int64_t numNulls; - int64_t numDVs; - std::string bitVectors; - - _DoubleColumnStatsData__isset __isset; - - void __set_lowValue(const double val); - - void __set_highValue(const double val); - - void __set_numNulls(const int64_t val); - - void __set_numDVs(const int64_t val); - - void __set_bitVectors(const std::string& val); - - bool operator == (const DoubleColumnStatsData & rhs) const - { - if (__isset.lowValue != rhs.__isset.lowValue) - return false; - else if (__isset.lowValue && !(lowValue == rhs.lowValue)) - return false; - if (__isset.highValue != rhs.__isset.highValue) - return false; - else if (__isset.highValue && !(highValue == rhs.highValue)) - return false; - if (!(numNulls == rhs.numNulls)) - return false; - if (!(numDVs == rhs.numDVs)) - return false; - if (__isset.bitVectors != rhs.__isset.bitVectors) - return false; - else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) - return false; - return true; - } - bool operator != (const DoubleColumnStatsData &rhs) const { - return !(*this == rhs); - } - - bool operator < (const DoubleColumnStatsData & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(DoubleColumnStatsData &a, DoubleColumnStatsData &b); - -inline std::ostream& operator<<(std::ostream& out, const DoubleColumnStatsData& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _LongColumnStatsData__isset { - _LongColumnStatsData__isset() : lowValue(false), highValue(false), bitVectors(false) {} - bool lowValue :1; - bool highValue :1; - bool bitVectors :1; -} _LongColumnStatsData__isset; - -class LongColumnStatsData { - public: - - LongColumnStatsData(const LongColumnStatsData&); - LongColumnStatsData& operator=(const LongColumnStatsData&); - LongColumnStatsData() : lowValue(0), highValue(0), numNulls(0), numDVs(0), bitVectors() { - } - - virtual ~LongColumnStatsData() throw(); - int64_t lowValue; - int64_t highValue; - int64_t numNulls; - int64_t numDVs; - std::string bitVectors; - - _LongColumnStatsData__isset __isset; - - void __set_lowValue(const int64_t val); - - void __set_highValue(const int64_t val); - - void __set_numNulls(const int64_t val); - - void __set_numDVs(const int64_t val); - - void __set_bitVectors(const std::string& val); - - bool operator == (const LongColumnStatsData & rhs) const - { - if (__isset.lowValue != rhs.__isset.lowValue) - return false; - else if (__isset.lowValue && !(lowValue == rhs.lowValue)) - return false; - if (__isset.highValue != rhs.__isset.highValue) - return false; - else if (__isset.highValue && !(highValue == rhs.highValue)) - return false; - if (!(numNulls == rhs.numNulls)) - return false; - if (!(numDVs == rhs.numDVs)) - return false; - if (__isset.bitVectors != rhs.__isset.bitVectors) - return false; - else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) - return false; - return true; - } - bool operator != (const LongColumnStatsData &rhs) const { - return !(*this == rhs); - } - - bool operator < (const LongColumnStatsData & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(LongColumnStatsData &a, LongColumnStatsData &b); - -inline std::ostream& operator<<(std::ostream& out, const LongColumnStatsData& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _StringColumnStatsData__isset { - _StringColumnStatsData__isset() : bitVectors(false) {} - bool bitVectors :1; -} _StringColumnStatsData__isset; - -class StringColumnStatsData { - public: - - StringColumnStatsData(const StringColumnStatsData&); - StringColumnStatsData& operator=(const StringColumnStatsData&); - StringColumnStatsData() : maxColLen(0), avgColLen(0), numNulls(0), numDVs(0), bitVectors() { - } - - virtual ~StringColumnStatsData() throw(); - int64_t maxColLen; - double avgColLen; - int64_t numNulls; - int64_t numDVs; - std::string bitVectors; - - _StringColumnStatsData__isset __isset; - - void __set_maxColLen(const int64_t val); - - void __set_avgColLen(const double val); - - void __set_numNulls(const int64_t val); - - void __set_numDVs(const int64_t val); - - void __set_bitVectors(const std::string& val); - - bool operator == (const StringColumnStatsData & rhs) const - { - if (!(maxColLen == rhs.maxColLen)) - return false; - if (!(avgColLen == rhs.avgColLen)) - return false; - if (!(numNulls == rhs.numNulls)) - return false; - if (!(numDVs == rhs.numDVs)) - return false; - if (__isset.bitVectors != rhs.__isset.bitVectors) - return false; - else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) - return false; - return true; - } - bool operator != (const StringColumnStatsData &rhs) const { - return !(*this == rhs); - } - - bool operator < (const StringColumnStatsData & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(StringColumnStatsData &a, StringColumnStatsData &b); - -inline std::ostream& operator<<(std::ostream& out, const StringColumnStatsData& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _BinaryColumnStatsData__isset { - _BinaryColumnStatsData__isset() : bitVectors(false) {} - bool bitVectors :1; -} _BinaryColumnStatsData__isset; - -class BinaryColumnStatsData { - public: - - BinaryColumnStatsData(const BinaryColumnStatsData&); - BinaryColumnStatsData& operator=(const BinaryColumnStatsData&); - BinaryColumnStatsData() : maxColLen(0), avgColLen(0), numNulls(0), bitVectors() { - } - - virtual ~BinaryColumnStatsData() throw(); - int64_t maxColLen; - double avgColLen; - int64_t numNulls; - std::string bitVectors; - - _BinaryColumnStatsData__isset __isset; - - void __set_maxColLen(const int64_t val); - - void __set_avgColLen(const double val); - - void __set_numNulls(const int64_t val); - - void __set_bitVectors(const std::string& val); - - bool operator == (const BinaryColumnStatsData & rhs) const - { - if (!(maxColLen == rhs.maxColLen)) - return false; - if (!(avgColLen == rhs.avgColLen)) - return false; - if (!(numNulls == rhs.numNulls)) - return false; - if (__isset.bitVectors != rhs.__isset.bitVectors) - return false; - else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) - return false; - return true; - } - bool operator != (const BinaryColumnStatsData &rhs) const { - return !(*this == rhs); - } - - bool operator < (const BinaryColumnStatsData & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(BinaryColumnStatsData &a, BinaryColumnStatsData &b); - -inline std::ostream& operator<<(std::ostream& out, const BinaryColumnStatsData& obj) -{ - obj.printTo(out); - return out; -} - - -class Decimal { - public: - - Decimal(const Decimal&); - Decimal& operator=(const Decimal&); - Decimal() : unscaled(), scale(0) { - } - - virtual ~Decimal() throw(); - std::string unscaled; - int16_t scale; - - void __set_unscaled(const std::string& val); - - void __set_scale(const int16_t val); - - bool operator == (const Decimal & rhs) const - { - if (!(unscaled == rhs.unscaled)) - return false; - if (!(scale == rhs.scale)) - return false; - return true; - } - bool operator != (const Decimal &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Decimal & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(Decimal &a, Decimal &b); - -inline std::ostream& operator<<(std::ostream& out, const Decimal& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _DecimalColumnStatsData__isset { - _DecimalColumnStatsData__isset() : lowValue(false), highValue(false), bitVectors(false) {} - bool lowValue :1; - bool highValue :1; - bool bitVectors :1; -} _DecimalColumnStatsData__isset; - -class DecimalColumnStatsData { - public: - - DecimalColumnStatsData(const DecimalColumnStatsData&); - DecimalColumnStatsData& operator=(const DecimalColumnStatsData&); - DecimalColumnStatsData() : numNulls(0), numDVs(0), bitVectors() { - } - - virtual ~DecimalColumnStatsData() throw(); - Decimal lowValue; - Decimal highValue; - int64_t numNulls; - int64_t numDVs; - std::string bitVectors; - - _DecimalColumnStatsData__isset __isset; - - void __set_lowValue(const Decimal& val); - - void __set_highValue(const Decimal& val); - - void __set_numNulls(const int64_t val); - - void __set_numDVs(const int64_t val); - - void __set_bitVectors(const std::string& val); - - bool operator == (const DecimalColumnStatsData & rhs) const - { - if (__isset.lowValue != rhs.__isset.lowValue) - return false; - else if (__isset.lowValue && !(lowValue == rhs.lowValue)) - return false; - if (__isset.highValue != rhs.__isset.highValue) - return false; - else if (__isset.highValue && !(highValue == rhs.highValue)) - return false; - if (!(numNulls == rhs.numNulls)) - return false; - if (!(numDVs == rhs.numDVs)) - return false; - if (__isset.bitVectors != rhs.__isset.bitVectors) - return false; - else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) - return false; - return true; - } - bool operator != (const DecimalColumnStatsData &rhs) const { - return !(*this == rhs); - } - - bool operator < (const DecimalColumnStatsData & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(DecimalColumnStatsData &a, DecimalColumnStatsData &b); - -inline std::ostream& operator<<(std::ostream& out, const DecimalColumnStatsData& obj) -{ - obj.printTo(out); - return out; -} - - -class Date { - public: - - Date(const Date&); - Date& operator=(const Date&); - Date() : daysSinceEpoch(0) { - } - - virtual ~Date() throw(); - int64_t daysSinceEpoch; - - void __set_daysSinceEpoch(const int64_t val); - - bool operator == (const Date & rhs) const - { - if (!(daysSinceEpoch == rhs.daysSinceEpoch)) - return false; - return true; - } - bool operator != (const Date &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Date & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(Date &a, Date &b); - -inline std::ostream& operator<<(std::ostream& out, const Date& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _DateColumnStatsData__isset { - _DateColumnStatsData__isset() : lowValue(false), highValue(false), bitVectors(false) {} - bool lowValue :1; - bool highValue :1; - bool bitVectors :1; -} _DateColumnStatsData__isset; - -class DateColumnStatsData { - public: - - DateColumnStatsData(const DateColumnStatsData&); - DateColumnStatsData& operator=(const DateColumnStatsData&); - DateColumnStatsData() : numNulls(0), numDVs(0), bitVectors() { - } - - virtual ~DateColumnStatsData() throw(); - Date lowValue; - Date highValue; - int64_t numNulls; - int64_t numDVs; - std::string bitVectors; - - _DateColumnStatsData__isset __isset; - - void __set_lowValue(const Date& val); - - void __set_highValue(const Date& val); - - void __set_numNulls(const int64_t val); - - void __set_numDVs(const int64_t val); - - void __set_bitVectors(const std::string& val); - - bool operator == (const DateColumnStatsData & rhs) const - { - if (__isset.lowValue != rhs.__isset.lowValue) - return false; - else if (__isset.lowValue && !(lowValue == rhs.lowValue)) - return false; - if (__isset.highValue != rhs.__isset.highValue) - return false; - else if (__isset.highValue && !(highValue == rhs.highValue)) - return false; - if (!(numNulls == rhs.numNulls)) - return false; - if (!(numDVs == rhs.numDVs)) - return false; - if (__isset.bitVectors != rhs.__isset.bitVectors) - return false; - else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) - return false; - return true; - } - bool operator != (const DateColumnStatsData &rhs) const { - return !(*this == rhs); - } - - bool operator < (const DateColumnStatsData & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(DateColumnStatsData &a, DateColumnStatsData &b); - -inline std::ostream& operator<<(std::ostream& out, const DateColumnStatsData& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _ColumnStatisticsData__isset { - _ColumnStatisticsData__isset() : booleanStats(false), longStats(false), doubleStats(false), stringStats(false), binaryStats(false), decimalStats(false), dateStats(false) {} - bool booleanStats :1; - bool longStats :1; - bool doubleStats :1; - bool stringStats :1; - bool binaryStats :1; - bool decimalStats :1; - bool dateStats :1; -} _ColumnStatisticsData__isset; - -class ColumnStatisticsData { - public: - - ColumnStatisticsData(const ColumnStatisticsData&); - ColumnStatisticsData& operator=(const ColumnStatisticsData&); - ColumnStatisticsData() { - } - - virtual ~ColumnStatisticsData() throw(); - BooleanColumnStatsData booleanStats; - LongColumnStatsData longStats; - DoubleColumnStatsData doubleStats; - StringColumnStatsData stringStats; - BinaryColumnStatsData binaryStats; - DecimalColumnStatsData decimalStats; - DateColumnStatsData dateStats; - - _ColumnStatisticsData__isset __isset; - - void __set_booleanStats(const BooleanColumnStatsData& val); - - void __set_longStats(const LongColumnStatsData& val); - - void __set_doubleStats(const DoubleColumnStatsData& val); - - void __set_stringStats(const StringColumnStatsData& val); - - void __set_binaryStats(const BinaryColumnStatsData& val); - - void __set_decimalStats(const DecimalColumnStatsData& val); - - void __set_dateStats(const DateColumnStatsData& val); - - bool operator == (const ColumnStatisticsData & rhs) const - { - if (!(booleanStats == rhs.booleanStats)) - return false; - if (!(longStats == rhs.longStats)) - return false; - if (!(doubleStats == rhs.doubleStats)) - return false; - if (!(stringStats == rhs.stringStats)) - return false; - if (!(binaryStats == rhs.binaryStats)) - return false; - if (!(decimalStats == rhs.decimalStats)) - return false; - if (!(dateStats == rhs.dateStats)) - return false; - return true; - } - bool operator != (const ColumnStatisticsData &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ColumnStatisticsData & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ColumnStatisticsData &a, ColumnStatisticsData &b); - -inline std::ostream& operator<<(std::ostream& out, const ColumnStatisticsData& obj) -{ - obj.printTo(out); - return out; -} - - -class ColumnStatisticsObj { - public: - - ColumnStatisticsObj(const ColumnStatisticsObj&); - ColumnStatisticsObj& operator=(const ColumnStatisticsObj&); - ColumnStatisticsObj() : colName(), colType() { - } - - virtual ~ColumnStatisticsObj() throw(); - std::string colName; - std::string colType; - ColumnStatisticsData statsData; - - void __set_colName(const std::string& val); - - void __set_colType(const std::string& val); - - void __set_statsData(const ColumnStatisticsData& val); - - bool operator == (const ColumnStatisticsObj & rhs) const - { - if (!(colName == rhs.colName)) - return false; - if (!(colType == rhs.colType)) - return false; - if (!(statsData == rhs.statsData)) - return false; - return true; - } - bool operator != (const ColumnStatisticsObj &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ColumnStatisticsObj & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ColumnStatisticsObj &a, ColumnStatisticsObj &b); - -inline std::ostream& operator<<(std::ostream& out, const ColumnStatisticsObj& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _ColumnStatisticsDesc__isset { - _ColumnStatisticsDesc__isset() : partName(false), lastAnalyzed(false) {} - bool partName :1; - bool lastAnalyzed :1; -} _ColumnStatisticsDesc__isset; - -class ColumnStatisticsDesc { - public: - - ColumnStatisticsDesc(const ColumnStatisticsDesc&); - ColumnStatisticsDesc& operator=(const ColumnStatisticsDesc&); - ColumnStatisticsDesc() : isTblLevel(0), dbName(), tableName(), partName(), lastAnalyzed(0) { - } - - virtual ~ColumnStatisticsDesc() throw(); - bool isTblLevel; - std::string dbName; - std::string tableName; - std::string partName; - int64_t lastAnalyzed; - - _ColumnStatisticsDesc__isset __isset; - - void __set_isTblLevel(const bool val); - - void __set_dbName(const std::string& val); - - void __set_tableName(const std::string& val); - - void __set_partName(const std::string& val); - - void __set_lastAnalyzed(const int64_t val); - - bool operator == (const ColumnStatisticsDesc & rhs) const - { - if (!(isTblLevel == rhs.isTblLevel)) - return false; - if (!(dbName == rhs.dbName)) - return false; - if (!(tableName == rhs.tableName)) - return false; - if (__isset.partName != rhs.__isset.partName) - return false; - else if (__isset.partName && !(partName == rhs.partName)) - return false; - if (__isset.lastAnalyzed != rhs.__isset.lastAnalyzed) - return false; - else if (__isset.lastAnalyzed && !(lastAnalyzed == rhs.lastAnalyzed)) - return false; - return true; - } - bool operator != (const ColumnStatisticsDesc &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ColumnStatisticsDesc & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ColumnStatisticsDesc &a, ColumnStatisticsDesc &b); - -inline std::ostream& operator<<(std::ostream& out, const ColumnStatisticsDesc& obj) -{ - obj.printTo(out); - return out; -} - - -class ColumnStatistics { - public: - - ColumnStatistics(const ColumnStatistics&); - ColumnStatistics& operator=(const ColumnStatistics&); - ColumnStatistics() { - } - - virtual ~ColumnStatistics() throw(); - ColumnStatisticsDesc statsDesc; - std::vector statsObj; - - void __set_statsDesc(const ColumnStatisticsDesc& val); - - void __set_statsObj(const std::vector & val); - - bool operator == (const ColumnStatistics & rhs) const - { - if (!(statsDesc == rhs.statsDesc)) - return false; - if (!(statsObj == rhs.statsObj)) - return false; - return true; - } - bool operator != (const ColumnStatistics &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ColumnStatistics & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ColumnStatistics &a, ColumnStatistics &b); - -inline std::ostream& operator<<(std::ostream& out, const ColumnStatistics& obj) -{ - obj.printTo(out); - return out; -} - - -class AggrStats { - public: - - AggrStats(const AggrStats&); - AggrStats& operator=(const AggrStats&); - AggrStats() : partsFound(0) { - } - - virtual ~AggrStats() throw(); - std::vector colStats; - int64_t partsFound; - - void __set_colStats(const std::vector & val); - - void __set_partsFound(const int64_t val); - - bool operator == (const AggrStats & rhs) const - { - if (!(colStats == rhs.colStats)) - return false; - if (!(partsFound == rhs.partsFound)) - return false; - return true; - } - bool operator != (const AggrStats &rhs) const { - return !(*this == rhs); - } - - bool operator < (const AggrStats & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(AggrStats &a, AggrStats &b); - -inline std::ostream& operator<<(std::ostream& out, const AggrStats& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _SetPartitionsStatsRequest__isset { - _SetPartitionsStatsRequest__isset() : needMerge(false) {} - bool needMerge :1; -} _SetPartitionsStatsRequest__isset; - -class SetPartitionsStatsRequest { - public: - - SetPartitionsStatsRequest(const SetPartitionsStatsRequest&); - SetPartitionsStatsRequest& operator=(const SetPartitionsStatsRequest&); - SetPartitionsStatsRequest() : needMerge(0) { - } - - virtual ~SetPartitionsStatsRequest() throw(); - std::vector colStats; - bool needMerge; - - _SetPartitionsStatsRequest__isset __isset; - - void __set_colStats(const std::vector & val); - - void __set_needMerge(const bool val); - - bool operator == (const SetPartitionsStatsRequest & rhs) const - { - if (!(colStats == rhs.colStats)) - return false; - if (__isset.needMerge != rhs.__isset.needMerge) - return false; - else if (__isset.needMerge && !(needMerge == rhs.needMerge)) - return false; - return true; - } - bool operator != (const SetPartitionsStatsRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const SetPartitionsStatsRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(SetPartitionsStatsRequest &a, SetPartitionsStatsRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const SetPartitionsStatsRequest& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _Schema__isset { - _Schema__isset() : fieldSchemas(false), properties(false) {} - bool fieldSchemas :1; - bool properties :1; -} _Schema__isset; - -class Schema { - public: - - Schema(const Schema&); - Schema& operator=(const Schema&); - Schema() { - } - - virtual ~Schema() throw(); - std::vector fieldSchemas; - std::map properties; - - _Schema__isset __isset; - - void __set_fieldSchemas(const std::vector & val); - - void __set_properties(const std::map & val); - - bool operator == (const Schema & rhs) const - { - if (!(fieldSchemas == rhs.fieldSchemas)) - return false; - if (!(properties == rhs.properties)) - return false; - return true; - } - bool operator != (const Schema &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Schema & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(Schema &a, Schema &b); - -inline std::ostream& operator<<(std::ostream& out, const Schema& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _EnvironmentContext__isset { - _EnvironmentContext__isset() : properties(false) {} - bool properties :1; -} _EnvironmentContext__isset; - -class EnvironmentContext { - public: - - EnvironmentContext(const EnvironmentContext&); - EnvironmentContext& operator=(const EnvironmentContext&); - EnvironmentContext() { - } - - virtual ~EnvironmentContext() throw(); - std::map properties; - - _EnvironmentContext__isset __isset; - - void __set_properties(const std::map & val); - - bool operator == (const EnvironmentContext & rhs) const - { - if (!(properties == rhs.properties)) - return false; - return true; - } - bool operator != (const EnvironmentContext &rhs) const { - return !(*this == rhs); - } - - bool operator < (const EnvironmentContext & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(EnvironmentContext &a, EnvironmentContext &b); - -inline std::ostream& operator<<(std::ostream& out, const EnvironmentContext& obj) -{ - obj.printTo(out); - return out; -} - - -class PrimaryKeysRequest { - public: - - PrimaryKeysRequest(const PrimaryKeysRequest&); - PrimaryKeysRequest& operator=(const PrimaryKeysRequest&); - PrimaryKeysRequest() : db_name(), tbl_name() { - } - - virtual ~PrimaryKeysRequest() throw(); - std::string db_name; - std::string tbl_name; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - bool operator == (const PrimaryKeysRequest & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - return true; - } - bool operator != (const PrimaryKeysRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PrimaryKeysRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PrimaryKeysRequest &a, PrimaryKeysRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const PrimaryKeysRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class PrimaryKeysResponse { - public: - - PrimaryKeysResponse(const PrimaryKeysResponse&); - PrimaryKeysResponse& operator=(const PrimaryKeysResponse&); - PrimaryKeysResponse() { - } - - virtual ~PrimaryKeysResponse() throw(); - std::vector primaryKeys; - - void __set_primaryKeys(const std::vector & val); - - bool operator == (const PrimaryKeysResponse & rhs) const - { - if (!(primaryKeys == rhs.primaryKeys)) - return false; - return true; - } - bool operator != (const PrimaryKeysResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PrimaryKeysResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PrimaryKeysResponse &a, PrimaryKeysResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const PrimaryKeysResponse& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _ForeignKeysRequest__isset { - _ForeignKeysRequest__isset() : parent_db_name(false), parent_tbl_name(false), foreign_db_name(false), foreign_tbl_name(false) {} - bool parent_db_name :1; - bool parent_tbl_name :1; - bool foreign_db_name :1; - bool foreign_tbl_name :1; -} _ForeignKeysRequest__isset; - -class ForeignKeysRequest { - public: - - ForeignKeysRequest(const ForeignKeysRequest&); - ForeignKeysRequest& operator=(const ForeignKeysRequest&); - ForeignKeysRequest() : parent_db_name(), parent_tbl_name(), foreign_db_name(), foreign_tbl_name() { - } - - virtual ~ForeignKeysRequest() throw(); - std::string parent_db_name; - std::string parent_tbl_name; - std::string foreign_db_name; - std::string foreign_tbl_name; - - _ForeignKeysRequest__isset __isset; - - void __set_parent_db_name(const std::string& val); - - void __set_parent_tbl_name(const std::string& val); - - void __set_foreign_db_name(const std::string& val); - - void __set_foreign_tbl_name(const std::string& val); - - bool operator == (const ForeignKeysRequest & rhs) const - { - if (!(parent_db_name == rhs.parent_db_name)) - return false; - if (!(parent_tbl_name == rhs.parent_tbl_name)) - return false; - if (!(foreign_db_name == rhs.foreign_db_name)) - return false; - if (!(foreign_tbl_name == rhs.foreign_tbl_name)) - return false; - return true; - } - bool operator != (const ForeignKeysRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ForeignKeysRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ForeignKeysRequest &a, ForeignKeysRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const ForeignKeysRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class ForeignKeysResponse { - public: - - ForeignKeysResponse(const ForeignKeysResponse&); - ForeignKeysResponse& operator=(const ForeignKeysResponse&); - ForeignKeysResponse() { - } - - virtual ~ForeignKeysResponse() throw(); - std::vector foreignKeys; - - void __set_foreignKeys(const std::vector & val); - - bool operator == (const ForeignKeysResponse & rhs) const - { - if (!(foreignKeys == rhs.foreignKeys)) - return false; - return true; - } - bool operator != (const ForeignKeysResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ForeignKeysResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ForeignKeysResponse &a, ForeignKeysResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const ForeignKeysResponse& obj) -{ - obj.printTo(out); - return out; -} - - -class UniqueConstraintsRequest { - public: - - UniqueConstraintsRequest(const UniqueConstraintsRequest&); - UniqueConstraintsRequest& operator=(const UniqueConstraintsRequest&); - UniqueConstraintsRequest() : db_name(), tbl_name() { - } - - virtual ~UniqueConstraintsRequest() throw(); - std::string db_name; - std::string tbl_name; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - bool operator == (const UniqueConstraintsRequest & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - return true; - } - bool operator != (const UniqueConstraintsRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const UniqueConstraintsRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(UniqueConstraintsRequest &a, UniqueConstraintsRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const UniqueConstraintsRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class UniqueConstraintsResponse { - public: - - UniqueConstraintsResponse(const UniqueConstraintsResponse&); - UniqueConstraintsResponse& operator=(const UniqueConstraintsResponse&); - UniqueConstraintsResponse() { - } - - virtual ~UniqueConstraintsResponse() throw(); - std::vector uniqueConstraints; - - void __set_uniqueConstraints(const std::vector & val); - - bool operator == (const UniqueConstraintsResponse & rhs) const - { - if (!(uniqueConstraints == rhs.uniqueConstraints)) - return false; - return true; - } - bool operator != (const UniqueConstraintsResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const UniqueConstraintsResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(UniqueConstraintsResponse &a, UniqueConstraintsResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const UniqueConstraintsResponse& obj) -{ - obj.printTo(out); - return out; -} - - -class NotNullConstraintsRequest { - public: - - NotNullConstraintsRequest(const NotNullConstraintsRequest&); - NotNullConstraintsRequest& operator=(const NotNullConstraintsRequest&); - NotNullConstraintsRequest() : db_name(), tbl_name() { - } - - virtual ~NotNullConstraintsRequest() throw(); - std::string db_name; - std::string tbl_name; - - void __set_db_name(const std::string& val); - - void __set_tbl_name(const std::string& val); - - bool operator == (const NotNullConstraintsRequest & rhs) const - { - if (!(db_name == rhs.db_name)) - return false; - if (!(tbl_name == rhs.tbl_name)) - return false; - return true; - } - bool operator != (const NotNullConstraintsRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const NotNullConstraintsRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(NotNullConstraintsRequest &a, NotNullConstraintsRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const NotNullConstraintsRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class NotNullConstraintsResponse { - public: - - NotNullConstraintsResponse(const NotNullConstraintsResponse&); - NotNullConstraintsResponse& operator=(const NotNullConstraintsResponse&); - NotNullConstraintsResponse() { - } - - virtual ~NotNullConstraintsResponse() throw(); - std::vector notNullConstraints; - - void __set_notNullConstraints(const std::vector & val); - - bool operator == (const NotNullConstraintsResponse & rhs) const - { - if (!(notNullConstraints == rhs.notNullConstraints)) - return false; - return true; - } - bool operator != (const NotNullConstraintsResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const NotNullConstraintsResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(NotNullConstraintsResponse &a, NotNullConstraintsResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const NotNullConstraintsResponse& obj) -{ - obj.printTo(out); - return out; -} - - -class DropConstraintRequest { - public: - - DropConstraintRequest(const DropConstraintRequest&); - DropConstraintRequest& operator=(const DropConstraintRequest&); - DropConstraintRequest() : dbname(), tablename(), constraintname() { - } - - virtual ~DropConstraintRequest() throw(); - std::string dbname; - std::string tablename; - std::string constraintname; - - void __set_dbname(const std::string& val); - - void __set_tablename(const std::string& val); - - void __set_constraintname(const std::string& val); - - bool operator == (const DropConstraintRequest & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(tablename == rhs.tablename)) - return false; - if (!(constraintname == rhs.constraintname)) - return false; - return true; - } - bool operator != (const DropConstraintRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const DropConstraintRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(DropConstraintRequest &a, DropConstraintRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const DropConstraintRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class AddPrimaryKeyRequest { - public: - - AddPrimaryKeyRequest(const AddPrimaryKeyRequest&); - AddPrimaryKeyRequest& operator=(const AddPrimaryKeyRequest&); - AddPrimaryKeyRequest() { - } - - virtual ~AddPrimaryKeyRequest() throw(); - std::vector primaryKeyCols; - - void __set_primaryKeyCols(const std::vector & val); - - bool operator == (const AddPrimaryKeyRequest & rhs) const - { - if (!(primaryKeyCols == rhs.primaryKeyCols)) - return false; - return true; - } - bool operator != (const AddPrimaryKeyRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const AddPrimaryKeyRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(AddPrimaryKeyRequest &a, AddPrimaryKeyRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const AddPrimaryKeyRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class AddForeignKeyRequest { - public: - - AddForeignKeyRequest(const AddForeignKeyRequest&); - AddForeignKeyRequest& operator=(const AddForeignKeyRequest&); - AddForeignKeyRequest() { - } - - virtual ~AddForeignKeyRequest() throw(); - std::vector foreignKeyCols; - - void __set_foreignKeyCols(const std::vector & val); - - bool operator == (const AddForeignKeyRequest & rhs) const - { - if (!(foreignKeyCols == rhs.foreignKeyCols)) - return false; - return true; - } - bool operator != (const AddForeignKeyRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const AddForeignKeyRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(AddForeignKeyRequest &a, AddForeignKeyRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const AddForeignKeyRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class AddUniqueConstraintRequest { - public: - - AddUniqueConstraintRequest(const AddUniqueConstraintRequest&); - AddUniqueConstraintRequest& operator=(const AddUniqueConstraintRequest&); - AddUniqueConstraintRequest() { - } - - virtual ~AddUniqueConstraintRequest() throw(); - std::vector uniqueConstraintCols; - - void __set_uniqueConstraintCols(const std::vector & val); - - bool operator == (const AddUniqueConstraintRequest & rhs) const - { - if (!(uniqueConstraintCols == rhs.uniqueConstraintCols)) - return false; - return true; - } - bool operator != (const AddUniqueConstraintRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const AddUniqueConstraintRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(AddUniqueConstraintRequest &a, AddUniqueConstraintRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const AddUniqueConstraintRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class AddNotNullConstraintRequest { - public: - - AddNotNullConstraintRequest(const AddNotNullConstraintRequest&); - AddNotNullConstraintRequest& operator=(const AddNotNullConstraintRequest&); - AddNotNullConstraintRequest() { - } - - virtual ~AddNotNullConstraintRequest() throw(); - std::vector notNullConstraintCols; - - void __set_notNullConstraintCols(const std::vector & val); - - bool operator == (const AddNotNullConstraintRequest & rhs) const - { - if (!(notNullConstraintCols == rhs.notNullConstraintCols)) - return false; - return true; - } - bool operator != (const AddNotNullConstraintRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const AddNotNullConstraintRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(AddNotNullConstraintRequest &a, AddNotNullConstraintRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const AddNotNullConstraintRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class PartitionsByExprResult { - public: - - PartitionsByExprResult(const PartitionsByExprResult&); - PartitionsByExprResult& operator=(const PartitionsByExprResult&); - PartitionsByExprResult() : hasUnknownPartitions(0) { - } - - virtual ~PartitionsByExprResult() throw(); - std::vector partitions; - bool hasUnknownPartitions; - - void __set_partitions(const std::vector & val); - - void __set_hasUnknownPartitions(const bool val); - - bool operator == (const PartitionsByExprResult & rhs) const - { - if (!(partitions == rhs.partitions)) - return false; - if (!(hasUnknownPartitions == rhs.hasUnknownPartitions)) - return false; - return true; - } - bool operator != (const PartitionsByExprResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PartitionsByExprResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PartitionsByExprResult &a, PartitionsByExprResult &b); - -inline std::ostream& operator<<(std::ostream& out, const PartitionsByExprResult& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _PartitionsByExprRequest__isset { - _PartitionsByExprRequest__isset() : defaultPartitionName(false), maxParts(true) {} - bool defaultPartitionName :1; - bool maxParts :1; -} _PartitionsByExprRequest__isset; - -class PartitionsByExprRequest { - public: - - PartitionsByExprRequest(const PartitionsByExprRequest&); - PartitionsByExprRequest& operator=(const PartitionsByExprRequest&); - PartitionsByExprRequest() : dbName(), tblName(), expr(), defaultPartitionName(), maxParts(-1) { - } - - virtual ~PartitionsByExprRequest() throw(); - std::string dbName; - std::string tblName; - std::string expr; - std::string defaultPartitionName; - int16_t maxParts; - - _PartitionsByExprRequest__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_tblName(const std::string& val); - - void __set_expr(const std::string& val); - - void __set_defaultPartitionName(const std::string& val); - - void __set_maxParts(const int16_t val); - - bool operator == (const PartitionsByExprRequest & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(tblName == rhs.tblName)) - return false; - if (!(expr == rhs.expr)) - return false; - if (__isset.defaultPartitionName != rhs.__isset.defaultPartitionName) - return false; - else if (__isset.defaultPartitionName && !(defaultPartitionName == rhs.defaultPartitionName)) - return false; - if (__isset.maxParts != rhs.__isset.maxParts) - return false; - else if (__isset.maxParts && !(maxParts == rhs.maxParts)) - return false; - return true; - } - bool operator != (const PartitionsByExprRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PartitionsByExprRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PartitionsByExprRequest &a, PartitionsByExprRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const PartitionsByExprRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class TableStatsResult { - public: - - TableStatsResult(const TableStatsResult&); - TableStatsResult& operator=(const TableStatsResult&); - TableStatsResult() { - } - - virtual ~TableStatsResult() throw(); - std::vector tableStats; - - void __set_tableStats(const std::vector & val); - - bool operator == (const TableStatsResult & rhs) const - { - if (!(tableStats == rhs.tableStats)) - return false; - return true; - } - bool operator != (const TableStatsResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const TableStatsResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(TableStatsResult &a, TableStatsResult &b); - -inline std::ostream& operator<<(std::ostream& out, const TableStatsResult& obj) -{ - obj.printTo(out); - return out; -} - - -class PartitionsStatsResult { - public: - - PartitionsStatsResult(const PartitionsStatsResult&); - PartitionsStatsResult& operator=(const PartitionsStatsResult&); - PartitionsStatsResult() { - } - - virtual ~PartitionsStatsResult() throw(); - std::map > partStats; - - void __set_partStats(const std::map > & val); - - bool operator == (const PartitionsStatsResult & rhs) const - { - if (!(partStats == rhs.partStats)) - return false; - return true; - } - bool operator != (const PartitionsStatsResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PartitionsStatsResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PartitionsStatsResult &a, PartitionsStatsResult &b); - -inline std::ostream& operator<<(std::ostream& out, const PartitionsStatsResult& obj) -{ - obj.printTo(out); - return out; -} - - -class TableStatsRequest { - public: - - TableStatsRequest(const TableStatsRequest&); - TableStatsRequest& operator=(const TableStatsRequest&); - TableStatsRequest() : dbName(), tblName() { - } - - virtual ~TableStatsRequest() throw(); - std::string dbName; - std::string tblName; - std::vector colNames; - - void __set_dbName(const std::string& val); - - void __set_tblName(const std::string& val); - - void __set_colNames(const std::vector & val); - - bool operator == (const TableStatsRequest & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(tblName == rhs.tblName)) - return false; - if (!(colNames == rhs.colNames)) - return false; - return true; - } - bool operator != (const TableStatsRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const TableStatsRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(TableStatsRequest &a, TableStatsRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const TableStatsRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class PartitionsStatsRequest { - public: - - PartitionsStatsRequest(const PartitionsStatsRequest&); - PartitionsStatsRequest& operator=(const PartitionsStatsRequest&); - PartitionsStatsRequest() : dbName(), tblName() { - } - - virtual ~PartitionsStatsRequest() throw(); - std::string dbName; - std::string tblName; - std::vector colNames; - std::vector partNames; - - void __set_dbName(const std::string& val); - - void __set_tblName(const std::string& val); - - void __set_colNames(const std::vector & val); - - void __set_partNames(const std::vector & val); - - bool operator == (const PartitionsStatsRequest & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(tblName == rhs.tblName)) - return false; - if (!(colNames == rhs.colNames)) - return false; - if (!(partNames == rhs.partNames)) - return false; - return true; - } - bool operator != (const PartitionsStatsRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PartitionsStatsRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PartitionsStatsRequest &a, PartitionsStatsRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const PartitionsStatsRequest& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _AddPartitionsResult__isset { - _AddPartitionsResult__isset() : partitions(false) {} - bool partitions :1; -} _AddPartitionsResult__isset; - -class AddPartitionsResult { - public: - - AddPartitionsResult(const AddPartitionsResult&); - AddPartitionsResult& operator=(const AddPartitionsResult&); - AddPartitionsResult() { - } - - virtual ~AddPartitionsResult() throw(); - std::vector partitions; - - _AddPartitionsResult__isset __isset; - - void __set_partitions(const std::vector & val); - - bool operator == (const AddPartitionsResult & rhs) const - { - if (__isset.partitions != rhs.__isset.partitions) - return false; - else if (__isset.partitions && !(partitions == rhs.partitions)) - return false; - return true; - } - bool operator != (const AddPartitionsResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const AddPartitionsResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(AddPartitionsResult &a, AddPartitionsResult &b); - -inline std::ostream& operator<<(std::ostream& out, const AddPartitionsResult& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _AddPartitionsRequest__isset { - _AddPartitionsRequest__isset() : needResult(true) {} - bool needResult :1; -} _AddPartitionsRequest__isset; - -class AddPartitionsRequest { - public: - - AddPartitionsRequest(const AddPartitionsRequest&); - AddPartitionsRequest& operator=(const AddPartitionsRequest&); - AddPartitionsRequest() : dbName(), tblName(), ifNotExists(0), needResult(true) { - } - - virtual ~AddPartitionsRequest() throw(); - std::string dbName; - std::string tblName; - std::vector parts; - bool ifNotExists; - bool needResult; - - _AddPartitionsRequest__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_tblName(const std::string& val); - - void __set_parts(const std::vector & val); - - void __set_ifNotExists(const bool val); - - void __set_needResult(const bool val); - - bool operator == (const AddPartitionsRequest & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(tblName == rhs.tblName)) - return false; - if (!(parts == rhs.parts)) - return false; - if (!(ifNotExists == rhs.ifNotExists)) - return false; - if (__isset.needResult != rhs.__isset.needResult) - return false; - else if (__isset.needResult && !(needResult == rhs.needResult)) - return false; - return true; - } - bool operator != (const AddPartitionsRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const AddPartitionsRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(AddPartitionsRequest &a, AddPartitionsRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const AddPartitionsRequest& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _DropPartitionsResult__isset { - _DropPartitionsResult__isset() : partitions(false) {} - bool partitions :1; -} _DropPartitionsResult__isset; - -class DropPartitionsResult { - public: - - DropPartitionsResult(const DropPartitionsResult&); - DropPartitionsResult& operator=(const DropPartitionsResult&); - DropPartitionsResult() { - } - - virtual ~DropPartitionsResult() throw(); - std::vector partitions; - - _DropPartitionsResult__isset __isset; - - void __set_partitions(const std::vector & val); - - bool operator == (const DropPartitionsResult & rhs) const - { - if (__isset.partitions != rhs.__isset.partitions) - return false; - else if (__isset.partitions && !(partitions == rhs.partitions)) - return false; - return true; - } - bool operator != (const DropPartitionsResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const DropPartitionsResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(DropPartitionsResult &a, DropPartitionsResult &b); - -inline std::ostream& operator<<(std::ostream& out, const DropPartitionsResult& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _DropPartitionsExpr__isset { - _DropPartitionsExpr__isset() : partArchiveLevel(false) {} - bool partArchiveLevel :1; -} _DropPartitionsExpr__isset; - -class DropPartitionsExpr { - public: - - DropPartitionsExpr(const DropPartitionsExpr&); - DropPartitionsExpr& operator=(const DropPartitionsExpr&); - DropPartitionsExpr() : expr(), partArchiveLevel(0) { - } - - virtual ~DropPartitionsExpr() throw(); - std::string expr; - int32_t partArchiveLevel; - - _DropPartitionsExpr__isset __isset; - - void __set_expr(const std::string& val); - - void __set_partArchiveLevel(const int32_t val); - - bool operator == (const DropPartitionsExpr & rhs) const - { - if (!(expr == rhs.expr)) - return false; - if (__isset.partArchiveLevel != rhs.__isset.partArchiveLevel) - return false; - else if (__isset.partArchiveLevel && !(partArchiveLevel == rhs.partArchiveLevel)) - return false; - return true; - } - bool operator != (const DropPartitionsExpr &rhs) const { - return !(*this == rhs); - } - - bool operator < (const DropPartitionsExpr & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(DropPartitionsExpr &a, DropPartitionsExpr &b); - -inline std::ostream& operator<<(std::ostream& out, const DropPartitionsExpr& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _RequestPartsSpec__isset { - _RequestPartsSpec__isset() : names(false), exprs(false) {} - bool names :1; - bool exprs :1; -} _RequestPartsSpec__isset; - -class RequestPartsSpec { - public: - - RequestPartsSpec(const RequestPartsSpec&); - RequestPartsSpec& operator=(const RequestPartsSpec&); - RequestPartsSpec() { - } - - virtual ~RequestPartsSpec() throw(); - std::vector names; - std::vector exprs; - - _RequestPartsSpec__isset __isset; - - void __set_names(const std::vector & val); - - void __set_exprs(const std::vector & val); - - bool operator == (const RequestPartsSpec & rhs) const - { - if (!(names == rhs.names)) - return false; - if (!(exprs == rhs.exprs)) - return false; - return true; - } - bool operator != (const RequestPartsSpec &rhs) const { - return !(*this == rhs); - } - - bool operator < (const RequestPartsSpec & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(RequestPartsSpec &a, RequestPartsSpec &b); - -inline std::ostream& operator<<(std::ostream& out, const RequestPartsSpec& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _DropPartitionsRequest__isset { - _DropPartitionsRequest__isset() : deleteData(false), ifExists(true), ignoreProtection(false), environmentContext(false), needResult(true) {} - bool deleteData :1; - bool ifExists :1; - bool ignoreProtection :1; - bool environmentContext :1; - bool needResult :1; -} _DropPartitionsRequest__isset; - -class DropPartitionsRequest { - public: - - DropPartitionsRequest(const DropPartitionsRequest&); - DropPartitionsRequest& operator=(const DropPartitionsRequest&); - DropPartitionsRequest() : dbName(), tblName(), deleteData(0), ifExists(true), ignoreProtection(0), needResult(true) { - } - - virtual ~DropPartitionsRequest() throw(); - std::string dbName; - std::string tblName; - RequestPartsSpec parts; - bool deleteData; - bool ifExists; - bool ignoreProtection; - EnvironmentContext environmentContext; - bool needResult; - - _DropPartitionsRequest__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_tblName(const std::string& val); - - void __set_parts(const RequestPartsSpec& val); - - void __set_deleteData(const bool val); - - void __set_ifExists(const bool val); - - void __set_ignoreProtection(const bool val); - - void __set_environmentContext(const EnvironmentContext& val); - - void __set_needResult(const bool val); - - bool operator == (const DropPartitionsRequest & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(tblName == rhs.tblName)) - return false; - if (!(parts == rhs.parts)) - return false; - if (__isset.deleteData != rhs.__isset.deleteData) - return false; - else if (__isset.deleteData && !(deleteData == rhs.deleteData)) - return false; - if (__isset.ifExists != rhs.__isset.ifExists) - return false; - else if (__isset.ifExists && !(ifExists == rhs.ifExists)) - return false; - if (__isset.ignoreProtection != rhs.__isset.ignoreProtection) - return false; - else if (__isset.ignoreProtection && !(ignoreProtection == rhs.ignoreProtection)) - return false; - if (__isset.environmentContext != rhs.__isset.environmentContext) - return false; - else if (__isset.environmentContext && !(environmentContext == rhs.environmentContext)) - return false; - if (__isset.needResult != rhs.__isset.needResult) - return false; - else if (__isset.needResult && !(needResult == rhs.needResult)) - return false; - return true; - } - bool operator != (const DropPartitionsRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const DropPartitionsRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(DropPartitionsRequest &a, DropPartitionsRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const DropPartitionsRequest& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _ResourceUri__isset { - _ResourceUri__isset() : resourceType(false), uri(false) {} - bool resourceType :1; - bool uri :1; -} _ResourceUri__isset; - -class ResourceUri { - public: - - ResourceUri(const ResourceUri&); - ResourceUri& operator=(const ResourceUri&); - ResourceUri() : resourceType((ResourceType::type)0), uri() { - } - - virtual ~ResourceUri() throw(); - ResourceType::type resourceType; - std::string uri; - - _ResourceUri__isset __isset; - - void __set_resourceType(const ResourceType::type val); - - void __set_uri(const std::string& val); - - bool operator == (const ResourceUri & rhs) const - { - if (!(resourceType == rhs.resourceType)) - return false; - if (!(uri == rhs.uri)) - return false; - return true; - } - bool operator != (const ResourceUri &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ResourceUri & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ResourceUri &a, ResourceUri &b); - -inline std::ostream& operator<<(std::ostream& out, const ResourceUri& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _Function__isset { - _Function__isset() : functionName(false), dbName(false), className(false), ownerName(false), ownerType(false), createTime(false), functionType(false), resourceUris(false) {} - bool functionName :1; - bool dbName :1; - bool className :1; - bool ownerName :1; - bool ownerType :1; - bool createTime :1; - bool functionType :1; - bool resourceUris :1; -} _Function__isset; - -class Function { - public: - - Function(const Function&); - Function& operator=(const Function&); - Function() : functionName(), dbName(), className(), ownerName(), ownerType((PrincipalType::type)0), createTime(0), functionType((FunctionType::type)0) { - } - - virtual ~Function() throw(); - std::string functionName; - std::string dbName; - std::string className; - std::string ownerName; - PrincipalType::type ownerType; - int32_t createTime; - FunctionType::type functionType; - std::vector resourceUris; - - _Function__isset __isset; - - void __set_functionName(const std::string& val); - - void __set_dbName(const std::string& val); - - void __set_className(const std::string& val); - - void __set_ownerName(const std::string& val); - - void __set_ownerType(const PrincipalType::type val); - - void __set_createTime(const int32_t val); - - void __set_functionType(const FunctionType::type val); - - void __set_resourceUris(const std::vector & val); - - bool operator == (const Function & rhs) const - { - if (!(functionName == rhs.functionName)) - return false; - if (!(dbName == rhs.dbName)) - return false; - if (!(className == rhs.className)) - return false; - if (!(ownerName == rhs.ownerName)) - return false; - if (!(ownerType == rhs.ownerType)) - return false; - if (!(createTime == rhs.createTime)) - return false; - if (!(functionType == rhs.functionType)) - return false; - if (!(resourceUris == rhs.resourceUris)) - return false; - return true; - } - bool operator != (const Function &rhs) const { - return !(*this == rhs); - } - - bool operator < (const Function & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(Function &a, Function &b); - -inline std::ostream& operator<<(std::ostream& out, const Function& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _TxnInfo__isset { - _TxnInfo__isset() : agentInfo(true), heartbeatCount(true), metaInfo(false), startedTime(false), lastHeartbeatTime(false) {} - bool agentInfo :1; - bool heartbeatCount :1; - bool metaInfo :1; - bool startedTime :1; - bool lastHeartbeatTime :1; -} _TxnInfo__isset; - -class TxnInfo { - public: - - TxnInfo(const TxnInfo&); - TxnInfo& operator=(const TxnInfo&); - TxnInfo() : id(0), state((TxnState::type)0), user(), hostname(), agentInfo("Unknown"), heartbeatCount(0), metaInfo(), startedTime(0), lastHeartbeatTime(0) { - } - - virtual ~TxnInfo() throw(); - int64_t id; - TxnState::type state; - std::string user; - std::string hostname; - std::string agentInfo; - int32_t heartbeatCount; - std::string metaInfo; - int64_t startedTime; - int64_t lastHeartbeatTime; - - _TxnInfo__isset __isset; - - void __set_id(const int64_t val); - - void __set_state(const TxnState::type val); - - void __set_user(const std::string& val); - - void __set_hostname(const std::string& val); - - void __set_agentInfo(const std::string& val); - - void __set_heartbeatCount(const int32_t val); - - void __set_metaInfo(const std::string& val); - - void __set_startedTime(const int64_t val); - - void __set_lastHeartbeatTime(const int64_t val); - - bool operator == (const TxnInfo & rhs) const - { - if (!(id == rhs.id)) - return false; - if (!(state == rhs.state)) - return false; - if (!(user == rhs.user)) - return false; - if (!(hostname == rhs.hostname)) - return false; - if (__isset.agentInfo != rhs.__isset.agentInfo) - return false; - else if (__isset.agentInfo && !(agentInfo == rhs.agentInfo)) - return false; - if (__isset.heartbeatCount != rhs.__isset.heartbeatCount) - return false; - else if (__isset.heartbeatCount && !(heartbeatCount == rhs.heartbeatCount)) - return false; - if (__isset.metaInfo != rhs.__isset.metaInfo) - return false; - else if (__isset.metaInfo && !(metaInfo == rhs.metaInfo)) - return false; - if (__isset.startedTime != rhs.__isset.startedTime) - return false; - else if (__isset.startedTime && !(startedTime == rhs.startedTime)) - return false; - if (__isset.lastHeartbeatTime != rhs.__isset.lastHeartbeatTime) - return false; - else if (__isset.lastHeartbeatTime && !(lastHeartbeatTime == rhs.lastHeartbeatTime)) - return false; - return true; - } - bool operator != (const TxnInfo &rhs) const { - return !(*this == rhs); - } - - bool operator < (const TxnInfo & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(TxnInfo &a, TxnInfo &b); - -inline std::ostream& operator<<(std::ostream& out, const TxnInfo& obj) -{ - obj.printTo(out); - return out; -} - - -class GetOpenTxnsInfoResponse { - public: - - GetOpenTxnsInfoResponse(const GetOpenTxnsInfoResponse&); - GetOpenTxnsInfoResponse& operator=(const GetOpenTxnsInfoResponse&); - GetOpenTxnsInfoResponse() : txn_high_water_mark(0) { - } - - virtual ~GetOpenTxnsInfoResponse() throw(); - int64_t txn_high_water_mark; - std::vector open_txns; - - void __set_txn_high_water_mark(const int64_t val); - - void __set_open_txns(const std::vector & val); - - bool operator == (const GetOpenTxnsInfoResponse & rhs) const - { - if (!(txn_high_water_mark == rhs.txn_high_water_mark)) - return false; - if (!(open_txns == rhs.open_txns)) - return false; - return true; - } - bool operator != (const GetOpenTxnsInfoResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetOpenTxnsInfoResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetOpenTxnsInfoResponse &a, GetOpenTxnsInfoResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const GetOpenTxnsInfoResponse& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _GetOpenTxnsResponse__isset { - _GetOpenTxnsResponse__isset() : min_open_txn(false) {} - bool min_open_txn :1; -} _GetOpenTxnsResponse__isset; - -class GetOpenTxnsResponse { - public: - - GetOpenTxnsResponse(const GetOpenTxnsResponse&); - GetOpenTxnsResponse& operator=(const GetOpenTxnsResponse&); - GetOpenTxnsResponse() : txn_high_water_mark(0), min_open_txn(0), abortedBits() { - } - - virtual ~GetOpenTxnsResponse() throw(); - int64_t txn_high_water_mark; - std::vector open_txns; - int64_t min_open_txn; - std::string abortedBits; - - _GetOpenTxnsResponse__isset __isset; - - void __set_txn_high_water_mark(const int64_t val); - - void __set_open_txns(const std::vector & val); - - void __set_min_open_txn(const int64_t val); - - void __set_abortedBits(const std::string& val); - - bool operator == (const GetOpenTxnsResponse & rhs) const - { - if (!(txn_high_water_mark == rhs.txn_high_water_mark)) - return false; - if (!(open_txns == rhs.open_txns)) - return false; - if (__isset.min_open_txn != rhs.__isset.min_open_txn) - return false; - else if (__isset.min_open_txn && !(min_open_txn == rhs.min_open_txn)) - return false; - if (!(abortedBits == rhs.abortedBits)) - return false; - return true; - } - bool operator != (const GetOpenTxnsResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetOpenTxnsResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetOpenTxnsResponse &a, GetOpenTxnsResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const GetOpenTxnsResponse& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _OpenTxnRequest__isset { - _OpenTxnRequest__isset() : agentInfo(true) {} - bool agentInfo :1; -} _OpenTxnRequest__isset; - -class OpenTxnRequest { - public: - - OpenTxnRequest(const OpenTxnRequest&); - OpenTxnRequest& operator=(const OpenTxnRequest&); - OpenTxnRequest() : num_txns(0), user(), hostname(), agentInfo("Unknown") { - } - - virtual ~OpenTxnRequest() throw(); - int32_t num_txns; - std::string user; - std::string hostname; - std::string agentInfo; - - _OpenTxnRequest__isset __isset; - - void __set_num_txns(const int32_t val); - - void __set_user(const std::string& val); - - void __set_hostname(const std::string& val); - - void __set_agentInfo(const std::string& val); - - bool operator == (const OpenTxnRequest & rhs) const - { - if (!(num_txns == rhs.num_txns)) - return false; - if (!(user == rhs.user)) - return false; - if (!(hostname == rhs.hostname)) - return false; - if (__isset.agentInfo != rhs.__isset.agentInfo) - return false; - else if (__isset.agentInfo && !(agentInfo == rhs.agentInfo)) - return false; - return true; - } - bool operator != (const OpenTxnRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const OpenTxnRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(OpenTxnRequest &a, OpenTxnRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const OpenTxnRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class OpenTxnsResponse { - public: - - OpenTxnsResponse(const OpenTxnsResponse&); - OpenTxnsResponse& operator=(const OpenTxnsResponse&); - OpenTxnsResponse() { - } - - virtual ~OpenTxnsResponse() throw(); - std::vector txn_ids; - - void __set_txn_ids(const std::vector & val); - - bool operator == (const OpenTxnsResponse & rhs) const - { - if (!(txn_ids == rhs.txn_ids)) - return false; - return true; - } - bool operator != (const OpenTxnsResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const OpenTxnsResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(OpenTxnsResponse &a, OpenTxnsResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const OpenTxnsResponse& obj) -{ - obj.printTo(out); - return out; -} - - -class AbortTxnRequest { - public: - - AbortTxnRequest(const AbortTxnRequest&); - AbortTxnRequest& operator=(const AbortTxnRequest&); - AbortTxnRequest() : txnid(0) { - } - - virtual ~AbortTxnRequest() throw(); - int64_t txnid; - - void __set_txnid(const int64_t val); - - bool operator == (const AbortTxnRequest & rhs) const - { - if (!(txnid == rhs.txnid)) - return false; - return true; - } - bool operator != (const AbortTxnRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const AbortTxnRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(AbortTxnRequest &a, AbortTxnRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const AbortTxnRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class AbortTxnsRequest { - public: - - AbortTxnsRequest(const AbortTxnsRequest&); - AbortTxnsRequest& operator=(const AbortTxnsRequest&); - AbortTxnsRequest() { - } - - virtual ~AbortTxnsRequest() throw(); - std::vector txn_ids; - - void __set_txn_ids(const std::vector & val); - - bool operator == (const AbortTxnsRequest & rhs) const - { - if (!(txn_ids == rhs.txn_ids)) - return false; - return true; - } - bool operator != (const AbortTxnsRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const AbortTxnsRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(AbortTxnsRequest &a, AbortTxnsRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const AbortTxnsRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class CommitTxnRequest { - public: - - CommitTxnRequest(const CommitTxnRequest&); - CommitTxnRequest& operator=(const CommitTxnRequest&); - CommitTxnRequest() : txnid(0) { - } - - virtual ~CommitTxnRequest() throw(); - int64_t txnid; - - void __set_txnid(const int64_t val); - - bool operator == (const CommitTxnRequest & rhs) const - { - if (!(txnid == rhs.txnid)) - return false; - return true; - } - bool operator != (const CommitTxnRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const CommitTxnRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(CommitTxnRequest &a, CommitTxnRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const CommitTxnRequest& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _LockComponent__isset { - _LockComponent__isset() : tablename(false), partitionname(false), operationType(true), isAcid(true), isDynamicPartitionWrite(true) {} - bool tablename :1; - bool partitionname :1; - bool operationType :1; - bool isAcid :1; - bool isDynamicPartitionWrite :1; -} _LockComponent__isset; - -class LockComponent { - public: - - LockComponent(const LockComponent&); - LockComponent& operator=(const LockComponent&); - LockComponent() : type((LockType::type)0), level((LockLevel::type)0), dbname(), tablename(), partitionname(), operationType((DataOperationType::type)5), isAcid(false), isDynamicPartitionWrite(false) { - operationType = (DataOperationType::type)5; - - } - - virtual ~LockComponent() throw(); - LockType::type type; - LockLevel::type level; - std::string dbname; - std::string tablename; - std::string partitionname; - DataOperationType::type operationType; - bool isAcid; - bool isDynamicPartitionWrite; - - _LockComponent__isset __isset; - - void __set_type(const LockType::type val); - - void __set_level(const LockLevel::type val); - - void __set_dbname(const std::string& val); - - void __set_tablename(const std::string& val); - - void __set_partitionname(const std::string& val); - - void __set_operationType(const DataOperationType::type val); - - void __set_isAcid(const bool val); - - void __set_isDynamicPartitionWrite(const bool val); - - bool operator == (const LockComponent & rhs) const - { - if (!(type == rhs.type)) - return false; - if (!(level == rhs.level)) - return false; - if (!(dbname == rhs.dbname)) - return false; - if (__isset.tablename != rhs.__isset.tablename) - return false; - else if (__isset.tablename && !(tablename == rhs.tablename)) - return false; - if (__isset.partitionname != rhs.__isset.partitionname) - return false; - else if (__isset.partitionname && !(partitionname == rhs.partitionname)) - return false; - if (__isset.operationType != rhs.__isset.operationType) - return false; - else if (__isset.operationType && !(operationType == rhs.operationType)) - return false; - if (__isset.isAcid != rhs.__isset.isAcid) - return false; - else if (__isset.isAcid && !(isAcid == rhs.isAcid)) - return false; - if (__isset.isDynamicPartitionWrite != rhs.__isset.isDynamicPartitionWrite) - return false; - else if (__isset.isDynamicPartitionWrite && !(isDynamicPartitionWrite == rhs.isDynamicPartitionWrite)) - return false; - return true; - } - bool operator != (const LockComponent &rhs) const { - return !(*this == rhs); - } - - bool operator < (const LockComponent & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(LockComponent &a, LockComponent &b); - -inline std::ostream& operator<<(std::ostream& out, const LockComponent& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _LockRequest__isset { - _LockRequest__isset() : txnid(false), agentInfo(true) {} - bool txnid :1; - bool agentInfo :1; -} _LockRequest__isset; - -class LockRequest { - public: - - LockRequest(const LockRequest&); - LockRequest& operator=(const LockRequest&); - LockRequest() : txnid(0), user(), hostname(), agentInfo("Unknown") { - } - - virtual ~LockRequest() throw(); - std::vector component; - int64_t txnid; - std::string user; - std::string hostname; - std::string agentInfo; - - _LockRequest__isset __isset; - - void __set_component(const std::vector & val); - - void __set_txnid(const int64_t val); - - void __set_user(const std::string& val); - - void __set_hostname(const std::string& val); - - void __set_agentInfo(const std::string& val); - - bool operator == (const LockRequest & rhs) const - { - if (!(component == rhs.component)) - return false; - if (__isset.txnid != rhs.__isset.txnid) - return false; - else if (__isset.txnid && !(txnid == rhs.txnid)) - return false; - if (!(user == rhs.user)) - return false; - if (!(hostname == rhs.hostname)) - return false; - if (__isset.agentInfo != rhs.__isset.agentInfo) - return false; - else if (__isset.agentInfo && !(agentInfo == rhs.agentInfo)) - return false; - return true; - } - bool operator != (const LockRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const LockRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(LockRequest &a, LockRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const LockRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class LockResponse { - public: - - LockResponse(const LockResponse&); - LockResponse& operator=(const LockResponse&); - LockResponse() : lockid(0), state((LockState::type)0) { - } - - virtual ~LockResponse() throw(); - int64_t lockid; - LockState::type state; - - void __set_lockid(const int64_t val); - - void __set_state(const LockState::type val); - - bool operator == (const LockResponse & rhs) const - { - if (!(lockid == rhs.lockid)) - return false; - if (!(state == rhs.state)) - return false; - return true; - } - bool operator != (const LockResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const LockResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(LockResponse &a, LockResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const LockResponse& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _CheckLockRequest__isset { - _CheckLockRequest__isset() : txnid(false), elapsed_ms(false) {} - bool txnid :1; - bool elapsed_ms :1; -} _CheckLockRequest__isset; - -class CheckLockRequest { - public: - - CheckLockRequest(const CheckLockRequest&); - CheckLockRequest& operator=(const CheckLockRequest&); - CheckLockRequest() : lockid(0), txnid(0), elapsed_ms(0) { - } - - virtual ~CheckLockRequest() throw(); - int64_t lockid; - int64_t txnid; - int64_t elapsed_ms; - - _CheckLockRequest__isset __isset; - - void __set_lockid(const int64_t val); - - void __set_txnid(const int64_t val); - - void __set_elapsed_ms(const int64_t val); - - bool operator == (const CheckLockRequest & rhs) const - { - if (!(lockid == rhs.lockid)) - return false; - if (__isset.txnid != rhs.__isset.txnid) - return false; - else if (__isset.txnid && !(txnid == rhs.txnid)) - return false; - if (__isset.elapsed_ms != rhs.__isset.elapsed_ms) - return false; - else if (__isset.elapsed_ms && !(elapsed_ms == rhs.elapsed_ms)) - return false; - return true; - } - bool operator != (const CheckLockRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const CheckLockRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(CheckLockRequest &a, CheckLockRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const CheckLockRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class UnlockRequest { - public: - - UnlockRequest(const UnlockRequest&); - UnlockRequest& operator=(const UnlockRequest&); - UnlockRequest() : lockid(0) { - } - - virtual ~UnlockRequest() throw(); - int64_t lockid; - - void __set_lockid(const int64_t val); - - bool operator == (const UnlockRequest & rhs) const - { - if (!(lockid == rhs.lockid)) - return false; - return true; - } - bool operator != (const UnlockRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const UnlockRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(UnlockRequest &a, UnlockRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const UnlockRequest& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _ShowLocksRequest__isset { - _ShowLocksRequest__isset() : dbname(false), tablename(false), partname(false), isExtended(true) {} - bool dbname :1; - bool tablename :1; - bool partname :1; - bool isExtended :1; -} _ShowLocksRequest__isset; - -class ShowLocksRequest { - public: - - ShowLocksRequest(const ShowLocksRequest&); - ShowLocksRequest& operator=(const ShowLocksRequest&); - ShowLocksRequest() : dbname(), tablename(), partname(), isExtended(false) { - } - - virtual ~ShowLocksRequest() throw(); - std::string dbname; - std::string tablename; - std::string partname; - bool isExtended; - - _ShowLocksRequest__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_tablename(const std::string& val); - - void __set_partname(const std::string& val); - - void __set_isExtended(const bool val); - - bool operator == (const ShowLocksRequest & rhs) const - { - if (__isset.dbname != rhs.__isset.dbname) - return false; - else if (__isset.dbname && !(dbname == rhs.dbname)) - return false; - if (__isset.tablename != rhs.__isset.tablename) - return false; - else if (__isset.tablename && !(tablename == rhs.tablename)) - return false; - if (__isset.partname != rhs.__isset.partname) - return false; - else if (__isset.partname && !(partname == rhs.partname)) - return false; - if (__isset.isExtended != rhs.__isset.isExtended) - return false; - else if (__isset.isExtended && !(isExtended == rhs.isExtended)) - return false; - return true; - } - bool operator != (const ShowLocksRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ShowLocksRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ShowLocksRequest &a, ShowLocksRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const ShowLocksRequest& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _ShowLocksResponseElement__isset { - _ShowLocksResponseElement__isset() : tablename(false), partname(false), txnid(false), acquiredat(false), heartbeatCount(true), agentInfo(false), blockedByExtId(false), blockedByIntId(false), lockIdInternal(false) {} - bool tablename :1; - bool partname :1; - bool txnid :1; - bool acquiredat :1; - bool heartbeatCount :1; - bool agentInfo :1; - bool blockedByExtId :1; - bool blockedByIntId :1; - bool lockIdInternal :1; -} _ShowLocksResponseElement__isset; - -class ShowLocksResponseElement { - public: - - ShowLocksResponseElement(const ShowLocksResponseElement&); - ShowLocksResponseElement& operator=(const ShowLocksResponseElement&); - ShowLocksResponseElement() : lockid(0), dbname(), tablename(), partname(), state((LockState::type)0), type((LockType::type)0), txnid(0), lastheartbeat(0), acquiredat(0), user(), hostname(), heartbeatCount(0), agentInfo(), blockedByExtId(0), blockedByIntId(0), lockIdInternal(0) { - } - - virtual ~ShowLocksResponseElement() throw(); - int64_t lockid; - std::string dbname; - std::string tablename; - std::string partname; - LockState::type state; - LockType::type type; - int64_t txnid; - int64_t lastheartbeat; - int64_t acquiredat; - std::string user; - std::string hostname; - int32_t heartbeatCount; - std::string agentInfo; - int64_t blockedByExtId; - int64_t blockedByIntId; - int64_t lockIdInternal; - - _ShowLocksResponseElement__isset __isset; - - void __set_lockid(const int64_t val); - - void __set_dbname(const std::string& val); - - void __set_tablename(const std::string& val); - - void __set_partname(const std::string& val); - - void __set_state(const LockState::type val); - - void __set_type(const LockType::type val); - - void __set_txnid(const int64_t val); - - void __set_lastheartbeat(const int64_t val); - - void __set_acquiredat(const int64_t val); - - void __set_user(const std::string& val); - - void __set_hostname(const std::string& val); - - void __set_heartbeatCount(const int32_t val); - - void __set_agentInfo(const std::string& val); - - void __set_blockedByExtId(const int64_t val); - - void __set_blockedByIntId(const int64_t val); - - void __set_lockIdInternal(const int64_t val); - - bool operator == (const ShowLocksResponseElement & rhs) const - { - if (!(lockid == rhs.lockid)) - return false; - if (!(dbname == rhs.dbname)) - return false; - if (__isset.tablename != rhs.__isset.tablename) - return false; - else if (__isset.tablename && !(tablename == rhs.tablename)) - return false; - if (__isset.partname != rhs.__isset.partname) - return false; - else if (__isset.partname && !(partname == rhs.partname)) - return false; - if (!(state == rhs.state)) - return false; - if (!(type == rhs.type)) - return false; - if (__isset.txnid != rhs.__isset.txnid) - return false; - else if (__isset.txnid && !(txnid == rhs.txnid)) - return false; - if (!(lastheartbeat == rhs.lastheartbeat)) - return false; - if (__isset.acquiredat != rhs.__isset.acquiredat) - return false; - else if (__isset.acquiredat && !(acquiredat == rhs.acquiredat)) - return false; - if (!(user == rhs.user)) - return false; - if (!(hostname == rhs.hostname)) - return false; - if (__isset.heartbeatCount != rhs.__isset.heartbeatCount) - return false; - else if (__isset.heartbeatCount && !(heartbeatCount == rhs.heartbeatCount)) - return false; - if (__isset.agentInfo != rhs.__isset.agentInfo) - return false; - else if (__isset.agentInfo && !(agentInfo == rhs.agentInfo)) - return false; - if (__isset.blockedByExtId != rhs.__isset.blockedByExtId) - return false; - else if (__isset.blockedByExtId && !(blockedByExtId == rhs.blockedByExtId)) - return false; - if (__isset.blockedByIntId != rhs.__isset.blockedByIntId) - return false; - else if (__isset.blockedByIntId && !(blockedByIntId == rhs.blockedByIntId)) - return false; - if (__isset.lockIdInternal != rhs.__isset.lockIdInternal) - return false; - else if (__isset.lockIdInternal && !(lockIdInternal == rhs.lockIdInternal)) - return false; - return true; - } - bool operator != (const ShowLocksResponseElement &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ShowLocksResponseElement & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ShowLocksResponseElement &a, ShowLocksResponseElement &b); - -inline std::ostream& operator<<(std::ostream& out, const ShowLocksResponseElement& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _ShowLocksResponse__isset { - _ShowLocksResponse__isset() : locks(false) {} - bool locks :1; -} _ShowLocksResponse__isset; - -class ShowLocksResponse { - public: - - ShowLocksResponse(const ShowLocksResponse&); - ShowLocksResponse& operator=(const ShowLocksResponse&); - ShowLocksResponse() { - } - - virtual ~ShowLocksResponse() throw(); - std::vector locks; - - _ShowLocksResponse__isset __isset; - - void __set_locks(const std::vector & val); - - bool operator == (const ShowLocksResponse & rhs) const - { - if (!(locks == rhs.locks)) - return false; - return true; - } - bool operator != (const ShowLocksResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ShowLocksResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ShowLocksResponse &a, ShowLocksResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const ShowLocksResponse& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _HeartbeatRequest__isset { - _HeartbeatRequest__isset() : lockid(false), txnid(false) {} - bool lockid :1; - bool txnid :1; -} _HeartbeatRequest__isset; - -class HeartbeatRequest { - public: - - HeartbeatRequest(const HeartbeatRequest&); - HeartbeatRequest& operator=(const HeartbeatRequest&); - HeartbeatRequest() : lockid(0), txnid(0) { - } - - virtual ~HeartbeatRequest() throw(); - int64_t lockid; - int64_t txnid; - - _HeartbeatRequest__isset __isset; - - void __set_lockid(const int64_t val); - - void __set_txnid(const int64_t val); - - bool operator == (const HeartbeatRequest & rhs) const - { - if (__isset.lockid != rhs.__isset.lockid) - return false; - else if (__isset.lockid && !(lockid == rhs.lockid)) - return false; - if (__isset.txnid != rhs.__isset.txnid) - return false; - else if (__isset.txnid && !(txnid == rhs.txnid)) - return false; - return true; - } - bool operator != (const HeartbeatRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const HeartbeatRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(HeartbeatRequest &a, HeartbeatRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const HeartbeatRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class HeartbeatTxnRangeRequest { - public: - - HeartbeatTxnRangeRequest(const HeartbeatTxnRangeRequest&); - HeartbeatTxnRangeRequest& operator=(const HeartbeatTxnRangeRequest&); - HeartbeatTxnRangeRequest() : min(0), max(0) { - } - - virtual ~HeartbeatTxnRangeRequest() throw(); - int64_t min; - int64_t max; - - void __set_min(const int64_t val); - - void __set_max(const int64_t val); - - bool operator == (const HeartbeatTxnRangeRequest & rhs) const - { - if (!(min == rhs.min)) - return false; - if (!(max == rhs.max)) - return false; - return true; - } - bool operator != (const HeartbeatTxnRangeRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const HeartbeatTxnRangeRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(HeartbeatTxnRangeRequest &a, HeartbeatTxnRangeRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const HeartbeatTxnRangeRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class HeartbeatTxnRangeResponse { - public: - - HeartbeatTxnRangeResponse(const HeartbeatTxnRangeResponse&); - HeartbeatTxnRangeResponse& operator=(const HeartbeatTxnRangeResponse&); - HeartbeatTxnRangeResponse() { - } - - virtual ~HeartbeatTxnRangeResponse() throw(); - std::set aborted; - std::set nosuch; - - void __set_aborted(const std::set & val); - - void __set_nosuch(const std::set & val); - - bool operator == (const HeartbeatTxnRangeResponse & rhs) const - { - if (!(aborted == rhs.aborted)) - return false; - if (!(nosuch == rhs.nosuch)) - return false; - return true; - } - bool operator != (const HeartbeatTxnRangeResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const HeartbeatTxnRangeResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(HeartbeatTxnRangeResponse &a, HeartbeatTxnRangeResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const HeartbeatTxnRangeResponse& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _CompactionRequest__isset { - _CompactionRequest__isset() : partitionname(false), runas(false), properties(false) {} - bool partitionname :1; - bool runas :1; - bool properties :1; -} _CompactionRequest__isset; - -class CompactionRequest { - public: - - CompactionRequest(const CompactionRequest&); - CompactionRequest& operator=(const CompactionRequest&); - CompactionRequest() : dbname(), tablename(), partitionname(), type((CompactionType::type)0), runas() { - } - - virtual ~CompactionRequest() throw(); - std::string dbname; - std::string tablename; - std::string partitionname; - CompactionType::type type; - std::string runas; - std::map properties; - - _CompactionRequest__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_tablename(const std::string& val); - - void __set_partitionname(const std::string& val); - - void __set_type(const CompactionType::type val); - - void __set_runas(const std::string& val); - - void __set_properties(const std::map & val); - - bool operator == (const CompactionRequest & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(tablename == rhs.tablename)) - return false; - if (__isset.partitionname != rhs.__isset.partitionname) - return false; - else if (__isset.partitionname && !(partitionname == rhs.partitionname)) - return false; - if (!(type == rhs.type)) - return false; - if (__isset.runas != rhs.__isset.runas) - return false; - else if (__isset.runas && !(runas == rhs.runas)) - return false; - if (__isset.properties != rhs.__isset.properties) - return false; - else if (__isset.properties && !(properties == rhs.properties)) - return false; - return true; - } - bool operator != (const CompactionRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const CompactionRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(CompactionRequest &a, CompactionRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const CompactionRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class CompactionResponse { - public: - - CompactionResponse(const CompactionResponse&); - CompactionResponse& operator=(const CompactionResponse&); - CompactionResponse() : id(0), state(), accepted(0) { - } - - virtual ~CompactionResponse() throw(); - int64_t id; - std::string state; - bool accepted; - - void __set_id(const int64_t val); - - void __set_state(const std::string& val); - - void __set_accepted(const bool val); - - bool operator == (const CompactionResponse & rhs) const - { - if (!(id == rhs.id)) - return false; - if (!(state == rhs.state)) - return false; - if (!(accepted == rhs.accepted)) - return false; - return true; - } - bool operator != (const CompactionResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const CompactionResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(CompactionResponse &a, CompactionResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const CompactionResponse& obj) -{ - obj.printTo(out); - return out; -} - - -class ShowCompactRequest { - public: - - ShowCompactRequest(const ShowCompactRequest&); - ShowCompactRequest& operator=(const ShowCompactRequest&); - ShowCompactRequest() { - } - - virtual ~ShowCompactRequest() throw(); - - bool operator == (const ShowCompactRequest & /* rhs */) const - { - return true; - } - bool operator != (const ShowCompactRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ShowCompactRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ShowCompactRequest &a, ShowCompactRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const ShowCompactRequest& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _ShowCompactResponseElement__isset { - _ShowCompactResponseElement__isset() : partitionname(false), workerid(false), start(false), runAs(false), hightestTxnId(false), metaInfo(false), endTime(false), hadoopJobId(true), id(false) {} - bool partitionname :1; - bool workerid :1; - bool start :1; - bool runAs :1; - bool hightestTxnId :1; - bool metaInfo :1; - bool endTime :1; - bool hadoopJobId :1; - bool id :1; -} _ShowCompactResponseElement__isset; - -class ShowCompactResponseElement { - public: - - ShowCompactResponseElement(const ShowCompactResponseElement&); - ShowCompactResponseElement& operator=(const ShowCompactResponseElement&); - ShowCompactResponseElement() : dbname(), tablename(), partitionname(), type((CompactionType::type)0), state(), workerid(), start(0), runAs(), hightestTxnId(0), metaInfo(), endTime(0), hadoopJobId("None"), id(0) { - } - - virtual ~ShowCompactResponseElement() throw(); - std::string dbname; - std::string tablename; - std::string partitionname; - CompactionType::type type; - std::string state; - std::string workerid; - int64_t start; - std::string runAs; - int64_t hightestTxnId; - std::string metaInfo; - int64_t endTime; - std::string hadoopJobId; - int64_t id; - - _ShowCompactResponseElement__isset __isset; - - void __set_dbname(const std::string& val); - - void __set_tablename(const std::string& val); - - void __set_partitionname(const std::string& val); - - void __set_type(const CompactionType::type val); - - void __set_state(const std::string& val); - - void __set_workerid(const std::string& val); - - void __set_start(const int64_t val); - - void __set_runAs(const std::string& val); - - void __set_hightestTxnId(const int64_t val); - - void __set_metaInfo(const std::string& val); - - void __set_endTime(const int64_t val); - - void __set_hadoopJobId(const std::string& val); - - void __set_id(const int64_t val); - - bool operator == (const ShowCompactResponseElement & rhs) const - { - if (!(dbname == rhs.dbname)) - return false; - if (!(tablename == rhs.tablename)) - return false; - if (__isset.partitionname != rhs.__isset.partitionname) - return false; - else if (__isset.partitionname && !(partitionname == rhs.partitionname)) - return false; - if (!(type == rhs.type)) - return false; - if (!(state == rhs.state)) - return false; - if (__isset.workerid != rhs.__isset.workerid) - return false; - else if (__isset.workerid && !(workerid == rhs.workerid)) - return false; - if (__isset.start != rhs.__isset.start) - return false; - else if (__isset.start && !(start == rhs.start)) - return false; - if (__isset.runAs != rhs.__isset.runAs) - return false; - else if (__isset.runAs && !(runAs == rhs.runAs)) - return false; - if (__isset.hightestTxnId != rhs.__isset.hightestTxnId) - return false; - else if (__isset.hightestTxnId && !(hightestTxnId == rhs.hightestTxnId)) - return false; - if (__isset.metaInfo != rhs.__isset.metaInfo) - return false; - else if (__isset.metaInfo && !(metaInfo == rhs.metaInfo)) - return false; - if (__isset.endTime != rhs.__isset.endTime) - return false; - else if (__isset.endTime && !(endTime == rhs.endTime)) - return false; - if (__isset.hadoopJobId != rhs.__isset.hadoopJobId) - return false; - else if (__isset.hadoopJobId && !(hadoopJobId == rhs.hadoopJobId)) - return false; - if (__isset.id != rhs.__isset.id) - return false; - else if (__isset.id && !(id == rhs.id)) - return false; - return true; - } - bool operator != (const ShowCompactResponseElement &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ShowCompactResponseElement & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ShowCompactResponseElement &a, ShowCompactResponseElement &b); - -inline std::ostream& operator<<(std::ostream& out, const ShowCompactResponseElement& obj) -{ - obj.printTo(out); - return out; -} - - -class ShowCompactResponse { - public: - - ShowCompactResponse(const ShowCompactResponse&); - ShowCompactResponse& operator=(const ShowCompactResponse&); - ShowCompactResponse() { - } - - virtual ~ShowCompactResponse() throw(); - std::vector compacts; - - void __set_compacts(const std::vector & val); - - bool operator == (const ShowCompactResponse & rhs) const - { - if (!(compacts == rhs.compacts)) - return false; - return true; - } - bool operator != (const ShowCompactResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ShowCompactResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ShowCompactResponse &a, ShowCompactResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const ShowCompactResponse& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _AddDynamicPartitions__isset { - _AddDynamicPartitions__isset() : operationType(true) {} - bool operationType :1; -} _AddDynamicPartitions__isset; - -class AddDynamicPartitions { - public: - - AddDynamicPartitions(const AddDynamicPartitions&); - AddDynamicPartitions& operator=(const AddDynamicPartitions&); - AddDynamicPartitions() : txnid(0), dbname(), tablename(), operationType((DataOperationType::type)5) { - operationType = (DataOperationType::type)5; - - } - - virtual ~AddDynamicPartitions() throw(); - int64_t txnid; - std::string dbname; - std::string tablename; - std::vector partitionnames; - DataOperationType::type operationType; - - _AddDynamicPartitions__isset __isset; - - void __set_txnid(const int64_t val); - - void __set_dbname(const std::string& val); - - void __set_tablename(const std::string& val); - - void __set_partitionnames(const std::vector & val); - - void __set_operationType(const DataOperationType::type val); - - bool operator == (const AddDynamicPartitions & rhs) const - { - if (!(txnid == rhs.txnid)) - return false; - if (!(dbname == rhs.dbname)) - return false; - if (!(tablename == rhs.tablename)) - return false; - if (!(partitionnames == rhs.partitionnames)) - return false; - if (__isset.operationType != rhs.__isset.operationType) - return false; - else if (__isset.operationType && !(operationType == rhs.operationType)) - return false; - return true; - } - bool operator != (const AddDynamicPartitions &rhs) const { - return !(*this == rhs); - } - - bool operator < (const AddDynamicPartitions & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(AddDynamicPartitions &a, AddDynamicPartitions &b); - -inline std::ostream& operator<<(std::ostream& out, const AddDynamicPartitions& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _NotificationEventRequest__isset { - _NotificationEventRequest__isset() : maxEvents(false) {} - bool maxEvents :1; -} _NotificationEventRequest__isset; - -class NotificationEventRequest { - public: - - NotificationEventRequest(const NotificationEventRequest&); - NotificationEventRequest& operator=(const NotificationEventRequest&); - NotificationEventRequest() : lastEvent(0), maxEvents(0) { - } - - virtual ~NotificationEventRequest() throw(); - int64_t lastEvent; - int32_t maxEvents; - - _NotificationEventRequest__isset __isset; - - void __set_lastEvent(const int64_t val); - - void __set_maxEvents(const int32_t val); - - bool operator == (const NotificationEventRequest & rhs) const - { - if (!(lastEvent == rhs.lastEvent)) - return false; - if (__isset.maxEvents != rhs.__isset.maxEvents) - return false; - else if (__isset.maxEvents && !(maxEvents == rhs.maxEvents)) - return false; - return true; - } - bool operator != (const NotificationEventRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const NotificationEventRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(NotificationEventRequest &a, NotificationEventRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const NotificationEventRequest& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _NotificationEvent__isset { - _NotificationEvent__isset() : dbName(false), tableName(false), messageFormat(false) {} - bool dbName :1; - bool tableName :1; - bool messageFormat :1; -} _NotificationEvent__isset; - -class NotificationEvent { - public: - - NotificationEvent(const NotificationEvent&); - NotificationEvent& operator=(const NotificationEvent&); - NotificationEvent() : eventId(0), eventTime(0), eventType(), dbName(), tableName(), message(), messageFormat() { - } - - virtual ~NotificationEvent() throw(); - int64_t eventId; - int32_t eventTime; - std::string eventType; - std::string dbName; - std::string tableName; - std::string message; - std::string messageFormat; - - _NotificationEvent__isset __isset; - - void __set_eventId(const int64_t val); - - void __set_eventTime(const int32_t val); - - void __set_eventType(const std::string& val); - - void __set_dbName(const std::string& val); - - void __set_tableName(const std::string& val); - - void __set_message(const std::string& val); - - void __set_messageFormat(const std::string& val); - - bool operator == (const NotificationEvent & rhs) const - { - if (!(eventId == rhs.eventId)) - return false; - if (!(eventTime == rhs.eventTime)) - return false; - if (!(eventType == rhs.eventType)) - return false; - if (__isset.dbName != rhs.__isset.dbName) - return false; - else if (__isset.dbName && !(dbName == rhs.dbName)) - return false; - if (__isset.tableName != rhs.__isset.tableName) - return false; - else if (__isset.tableName && !(tableName == rhs.tableName)) - return false; - if (!(message == rhs.message)) - return false; - if (__isset.messageFormat != rhs.__isset.messageFormat) - return false; - else if (__isset.messageFormat && !(messageFormat == rhs.messageFormat)) - return false; - return true; - } - bool operator != (const NotificationEvent &rhs) const { - return !(*this == rhs); - } - - bool operator < (const NotificationEvent & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(NotificationEvent &a, NotificationEvent &b); - -inline std::ostream& operator<<(std::ostream& out, const NotificationEvent& obj) -{ - obj.printTo(out); - return out; -} - - -class NotificationEventResponse { - public: - - NotificationEventResponse(const NotificationEventResponse&); - NotificationEventResponse& operator=(const NotificationEventResponse&); - NotificationEventResponse() { - } - - virtual ~NotificationEventResponse() throw(); - std::vector events; - - void __set_events(const std::vector & val); - - bool operator == (const NotificationEventResponse & rhs) const - { - if (!(events == rhs.events)) - return false; - return true; - } - bool operator != (const NotificationEventResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const NotificationEventResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(NotificationEventResponse &a, NotificationEventResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const NotificationEventResponse& obj) -{ - obj.printTo(out); - return out; -} - - -class CurrentNotificationEventId { - public: - - CurrentNotificationEventId(const CurrentNotificationEventId&); - CurrentNotificationEventId& operator=(const CurrentNotificationEventId&); - CurrentNotificationEventId() : eventId(0) { - } - - virtual ~CurrentNotificationEventId() throw(); - int64_t eventId; - - void __set_eventId(const int64_t val); - - bool operator == (const CurrentNotificationEventId & rhs) const - { - if (!(eventId == rhs.eventId)) - return false; - return true; - } - bool operator != (const CurrentNotificationEventId &rhs) const { - return !(*this == rhs); - } - - bool operator < (const CurrentNotificationEventId & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(CurrentNotificationEventId &a, CurrentNotificationEventId &b); - -inline std::ostream& operator<<(std::ostream& out, const CurrentNotificationEventId& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _InsertEventRequestData__isset { - _InsertEventRequestData__isset() : replace(false), filesAddedChecksum(false) {} - bool replace :1; - bool filesAddedChecksum :1; -} _InsertEventRequestData__isset; - -class InsertEventRequestData { - public: - - InsertEventRequestData(const InsertEventRequestData&); - InsertEventRequestData& operator=(const InsertEventRequestData&); - InsertEventRequestData() : replace(0) { - } - - virtual ~InsertEventRequestData() throw(); - bool replace; - std::vector filesAdded; - std::vector filesAddedChecksum; - - _InsertEventRequestData__isset __isset; - - void __set_replace(const bool val); - - void __set_filesAdded(const std::vector & val); - - void __set_filesAddedChecksum(const std::vector & val); - - bool operator == (const InsertEventRequestData & rhs) const - { - if (__isset.replace != rhs.__isset.replace) - return false; - else if (__isset.replace && !(replace == rhs.replace)) - return false; - if (!(filesAdded == rhs.filesAdded)) - return false; - if (__isset.filesAddedChecksum != rhs.__isset.filesAddedChecksum) - return false; - else if (__isset.filesAddedChecksum && !(filesAddedChecksum == rhs.filesAddedChecksum)) - return false; - return true; - } - bool operator != (const InsertEventRequestData &rhs) const { - return !(*this == rhs); - } - - bool operator < (const InsertEventRequestData & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(InsertEventRequestData &a, InsertEventRequestData &b); - -inline std::ostream& operator<<(std::ostream& out, const InsertEventRequestData& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _FireEventRequestData__isset { - _FireEventRequestData__isset() : insertData(false) {} - bool insertData :1; -} _FireEventRequestData__isset; - -class FireEventRequestData { - public: - - FireEventRequestData(const FireEventRequestData&); - FireEventRequestData& operator=(const FireEventRequestData&); - FireEventRequestData() { - } - - virtual ~FireEventRequestData() throw(); - InsertEventRequestData insertData; - - _FireEventRequestData__isset __isset; - - void __set_insertData(const InsertEventRequestData& val); - - bool operator == (const FireEventRequestData & rhs) const - { - if (!(insertData == rhs.insertData)) - return false; - return true; - } - bool operator != (const FireEventRequestData &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FireEventRequestData & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(FireEventRequestData &a, FireEventRequestData &b); - -inline std::ostream& operator<<(std::ostream& out, const FireEventRequestData& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _FireEventRequest__isset { - _FireEventRequest__isset() : dbName(false), tableName(false), partitionVals(false) {} - bool dbName :1; - bool tableName :1; - bool partitionVals :1; -} _FireEventRequest__isset; - -class FireEventRequest { - public: - - FireEventRequest(const FireEventRequest&); - FireEventRequest& operator=(const FireEventRequest&); - FireEventRequest() : successful(0), dbName(), tableName() { - } - - virtual ~FireEventRequest() throw(); - bool successful; - FireEventRequestData data; - std::string dbName; - std::string tableName; - std::vector partitionVals; - - _FireEventRequest__isset __isset; - - void __set_successful(const bool val); - - void __set_data(const FireEventRequestData& val); - - void __set_dbName(const std::string& val); - - void __set_tableName(const std::string& val); - - void __set_partitionVals(const std::vector & val); - - bool operator == (const FireEventRequest & rhs) const - { - if (!(successful == rhs.successful)) - return false; - if (!(data == rhs.data)) - return false; - if (__isset.dbName != rhs.__isset.dbName) - return false; - else if (__isset.dbName && !(dbName == rhs.dbName)) - return false; - if (__isset.tableName != rhs.__isset.tableName) - return false; - else if (__isset.tableName && !(tableName == rhs.tableName)) - return false; - if (__isset.partitionVals != rhs.__isset.partitionVals) - return false; - else if (__isset.partitionVals && !(partitionVals == rhs.partitionVals)) - return false; - return true; - } - bool operator != (const FireEventRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FireEventRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(FireEventRequest &a, FireEventRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const FireEventRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class FireEventResponse { - public: - - FireEventResponse(const FireEventResponse&); - FireEventResponse& operator=(const FireEventResponse&); - FireEventResponse() { - } - - virtual ~FireEventResponse() throw(); - - bool operator == (const FireEventResponse & /* rhs */) const - { - return true; - } - bool operator != (const FireEventResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FireEventResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(FireEventResponse &a, FireEventResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const FireEventResponse& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _MetadataPpdResult__isset { - _MetadataPpdResult__isset() : metadata(false), includeBitset(false) {} - bool metadata :1; - bool includeBitset :1; -} _MetadataPpdResult__isset; - -class MetadataPpdResult { - public: - - MetadataPpdResult(const MetadataPpdResult&); - MetadataPpdResult& operator=(const MetadataPpdResult&); - MetadataPpdResult() : metadata(), includeBitset() { - } - - virtual ~MetadataPpdResult() throw(); - std::string metadata; - std::string includeBitset; - - _MetadataPpdResult__isset __isset; - - void __set_metadata(const std::string& val); - - void __set_includeBitset(const std::string& val); - - bool operator == (const MetadataPpdResult & rhs) const - { - if (__isset.metadata != rhs.__isset.metadata) - return false; - else if (__isset.metadata && !(metadata == rhs.metadata)) - return false; - if (__isset.includeBitset != rhs.__isset.includeBitset) - return false; - else if (__isset.includeBitset && !(includeBitset == rhs.includeBitset)) - return false; - return true; - } - bool operator != (const MetadataPpdResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const MetadataPpdResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(MetadataPpdResult &a, MetadataPpdResult &b); - -inline std::ostream& operator<<(std::ostream& out, const MetadataPpdResult& obj) -{ - obj.printTo(out); - return out; -} - - -class GetFileMetadataByExprResult { - public: - - GetFileMetadataByExprResult(const GetFileMetadataByExprResult&); - GetFileMetadataByExprResult& operator=(const GetFileMetadataByExprResult&); - GetFileMetadataByExprResult() : isSupported(0) { - } - - virtual ~GetFileMetadataByExprResult() throw(); - std::map metadata; - bool isSupported; - - void __set_metadata(const std::map & val); - - void __set_isSupported(const bool val); - - bool operator == (const GetFileMetadataByExprResult & rhs) const - { - if (!(metadata == rhs.metadata)) - return false; - if (!(isSupported == rhs.isSupported)) - return false; - return true; - } - bool operator != (const GetFileMetadataByExprResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetFileMetadataByExprResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetFileMetadataByExprResult &a, GetFileMetadataByExprResult &b); - -inline std::ostream& operator<<(std::ostream& out, const GetFileMetadataByExprResult& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _GetFileMetadataByExprRequest__isset { - _GetFileMetadataByExprRequest__isset() : doGetFooters(false), type(false) {} - bool doGetFooters :1; - bool type :1; -} _GetFileMetadataByExprRequest__isset; - -class GetFileMetadataByExprRequest { - public: - - GetFileMetadataByExprRequest(const GetFileMetadataByExprRequest&); - GetFileMetadataByExprRequest& operator=(const GetFileMetadataByExprRequest&); - GetFileMetadataByExprRequest() : expr(), doGetFooters(0), type((FileMetadataExprType::type)0) { - } - - virtual ~GetFileMetadataByExprRequest() throw(); - std::vector fileIds; - std::string expr; - bool doGetFooters; - FileMetadataExprType::type type; - - _GetFileMetadataByExprRequest__isset __isset; - - void __set_fileIds(const std::vector & val); - - void __set_expr(const std::string& val); - - void __set_doGetFooters(const bool val); - - void __set_type(const FileMetadataExprType::type val); - - bool operator == (const GetFileMetadataByExprRequest & rhs) const - { - if (!(fileIds == rhs.fileIds)) - return false; - if (!(expr == rhs.expr)) - return false; - if (__isset.doGetFooters != rhs.__isset.doGetFooters) - return false; - else if (__isset.doGetFooters && !(doGetFooters == rhs.doGetFooters)) - return false; - if (__isset.type != rhs.__isset.type) - return false; - else if (__isset.type && !(type == rhs.type)) - return false; - return true; - } - bool operator != (const GetFileMetadataByExprRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetFileMetadataByExprRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetFileMetadataByExprRequest &a, GetFileMetadataByExprRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const GetFileMetadataByExprRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class GetFileMetadataResult { - public: - - GetFileMetadataResult(const GetFileMetadataResult&); - GetFileMetadataResult& operator=(const GetFileMetadataResult&); - GetFileMetadataResult() : isSupported(0) { - } - - virtual ~GetFileMetadataResult() throw(); - std::map metadata; - bool isSupported; - - void __set_metadata(const std::map & val); - - void __set_isSupported(const bool val); - - bool operator == (const GetFileMetadataResult & rhs) const - { - if (!(metadata == rhs.metadata)) - return false; - if (!(isSupported == rhs.isSupported)) - return false; - return true; - } - bool operator != (const GetFileMetadataResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetFileMetadataResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetFileMetadataResult &a, GetFileMetadataResult &b); - -inline std::ostream& operator<<(std::ostream& out, const GetFileMetadataResult& obj) -{ - obj.printTo(out); - return out; -} - - -class GetFileMetadataRequest { - public: - - GetFileMetadataRequest(const GetFileMetadataRequest&); - GetFileMetadataRequest& operator=(const GetFileMetadataRequest&); - GetFileMetadataRequest() { - } - - virtual ~GetFileMetadataRequest() throw(); - std::vector fileIds; - - void __set_fileIds(const std::vector & val); - - bool operator == (const GetFileMetadataRequest & rhs) const - { - if (!(fileIds == rhs.fileIds)) - return false; - return true; - } - bool operator != (const GetFileMetadataRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetFileMetadataRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetFileMetadataRequest &a, GetFileMetadataRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const GetFileMetadataRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class PutFileMetadataResult { - public: - - PutFileMetadataResult(const PutFileMetadataResult&); - PutFileMetadataResult& operator=(const PutFileMetadataResult&); - PutFileMetadataResult() { - } - - virtual ~PutFileMetadataResult() throw(); - - bool operator == (const PutFileMetadataResult & /* rhs */) const - { - return true; - } - bool operator != (const PutFileMetadataResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PutFileMetadataResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PutFileMetadataResult &a, PutFileMetadataResult &b); - -inline std::ostream& operator<<(std::ostream& out, const PutFileMetadataResult& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _PutFileMetadataRequest__isset { - _PutFileMetadataRequest__isset() : type(false) {} - bool type :1; -} _PutFileMetadataRequest__isset; - -class PutFileMetadataRequest { - public: - - PutFileMetadataRequest(const PutFileMetadataRequest&); - PutFileMetadataRequest& operator=(const PutFileMetadataRequest&); - PutFileMetadataRequest() : type((FileMetadataExprType::type)0) { - } - - virtual ~PutFileMetadataRequest() throw(); - std::vector fileIds; - std::vector metadata; - FileMetadataExprType::type type; - - _PutFileMetadataRequest__isset __isset; - - void __set_fileIds(const std::vector & val); - - void __set_metadata(const std::vector & val); - - void __set_type(const FileMetadataExprType::type val); - - bool operator == (const PutFileMetadataRequest & rhs) const - { - if (!(fileIds == rhs.fileIds)) - return false; - if (!(metadata == rhs.metadata)) - return false; - if (__isset.type != rhs.__isset.type) - return false; - else if (__isset.type && !(type == rhs.type)) - return false; - return true; - } - bool operator != (const PutFileMetadataRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const PutFileMetadataRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(PutFileMetadataRequest &a, PutFileMetadataRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const PutFileMetadataRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class ClearFileMetadataResult { - public: - - ClearFileMetadataResult(const ClearFileMetadataResult&); - ClearFileMetadataResult& operator=(const ClearFileMetadataResult&); - ClearFileMetadataResult() { - } - - virtual ~ClearFileMetadataResult() throw(); - - bool operator == (const ClearFileMetadataResult & /* rhs */) const - { - return true; - } - bool operator != (const ClearFileMetadataResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ClearFileMetadataResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ClearFileMetadataResult &a, ClearFileMetadataResult &b); - -inline std::ostream& operator<<(std::ostream& out, const ClearFileMetadataResult& obj) -{ - obj.printTo(out); - return out; -} - - -class ClearFileMetadataRequest { - public: - - ClearFileMetadataRequest(const ClearFileMetadataRequest&); - ClearFileMetadataRequest& operator=(const ClearFileMetadataRequest&); - ClearFileMetadataRequest() { - } - - virtual ~ClearFileMetadataRequest() throw(); - std::vector fileIds; - - void __set_fileIds(const std::vector & val); - - bool operator == (const ClearFileMetadataRequest & rhs) const - { - if (!(fileIds == rhs.fileIds)) - return false; - return true; - } - bool operator != (const ClearFileMetadataRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ClearFileMetadataRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ClearFileMetadataRequest &a, ClearFileMetadataRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const ClearFileMetadataRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class CacheFileMetadataResult { - public: - - CacheFileMetadataResult(const CacheFileMetadataResult&); - CacheFileMetadataResult& operator=(const CacheFileMetadataResult&); - CacheFileMetadataResult() : isSupported(0) { - } - - virtual ~CacheFileMetadataResult() throw(); - bool isSupported; - - void __set_isSupported(const bool val); - - bool operator == (const CacheFileMetadataResult & rhs) const - { - if (!(isSupported == rhs.isSupported)) - return false; - return true; - } - bool operator != (const CacheFileMetadataResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const CacheFileMetadataResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(CacheFileMetadataResult &a, CacheFileMetadataResult &b); - -inline std::ostream& operator<<(std::ostream& out, const CacheFileMetadataResult& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _CacheFileMetadataRequest__isset { - _CacheFileMetadataRequest__isset() : partName(false), isAllParts(false) {} - bool partName :1; - bool isAllParts :1; -} _CacheFileMetadataRequest__isset; - -class CacheFileMetadataRequest { - public: - - CacheFileMetadataRequest(const CacheFileMetadataRequest&); - CacheFileMetadataRequest& operator=(const CacheFileMetadataRequest&); - CacheFileMetadataRequest() : dbName(), tblName(), partName(), isAllParts(0) { - } - - virtual ~CacheFileMetadataRequest() throw(); - std::string dbName; - std::string tblName; - std::string partName; - bool isAllParts; - - _CacheFileMetadataRequest__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_tblName(const std::string& val); - - void __set_partName(const std::string& val); - - void __set_isAllParts(const bool val); - - bool operator == (const CacheFileMetadataRequest & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(tblName == rhs.tblName)) - return false; - if (__isset.partName != rhs.__isset.partName) - return false; - else if (__isset.partName && !(partName == rhs.partName)) - return false; - if (__isset.isAllParts != rhs.__isset.isAllParts) - return false; - else if (__isset.isAllParts && !(isAllParts == rhs.isAllParts)) - return false; - return true; - } - bool operator != (const CacheFileMetadataRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const CacheFileMetadataRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(CacheFileMetadataRequest &a, CacheFileMetadataRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const CacheFileMetadataRequest& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _GetAllFunctionsResponse__isset { - _GetAllFunctionsResponse__isset() : functions(false) {} - bool functions :1; -} _GetAllFunctionsResponse__isset; - -class GetAllFunctionsResponse { - public: - - GetAllFunctionsResponse(const GetAllFunctionsResponse&); - GetAllFunctionsResponse& operator=(const GetAllFunctionsResponse&); - GetAllFunctionsResponse() { - } - - virtual ~GetAllFunctionsResponse() throw(); - std::vector functions; - - _GetAllFunctionsResponse__isset __isset; - - void __set_functions(const std::vector & val); - - bool operator == (const GetAllFunctionsResponse & rhs) const - { - if (__isset.functions != rhs.__isset.functions) - return false; - else if (__isset.functions && !(functions == rhs.functions)) - return false; - return true; - } - bool operator != (const GetAllFunctionsResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetAllFunctionsResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetAllFunctionsResponse &a, GetAllFunctionsResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const GetAllFunctionsResponse& obj) -{ - obj.printTo(out); - return out; -} - - -class ClientCapabilities { - public: - - ClientCapabilities(const ClientCapabilities&); - ClientCapabilities& operator=(const ClientCapabilities&); - ClientCapabilities() { - } - - virtual ~ClientCapabilities() throw(); - std::vector values; - - void __set_values(const std::vector & val); - - bool operator == (const ClientCapabilities & rhs) const - { - if (!(values == rhs.values)) - return false; - return true; - } - bool operator != (const ClientCapabilities &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ClientCapabilities & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(ClientCapabilities &a, ClientCapabilities &b); - -inline std::ostream& operator<<(std::ostream& out, const ClientCapabilities& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _GetTableRequest__isset { - _GetTableRequest__isset() : capabilities(false) {} - bool capabilities :1; -} _GetTableRequest__isset; - -class GetTableRequest { - public: - - GetTableRequest(const GetTableRequest&); - GetTableRequest& operator=(const GetTableRequest&); - GetTableRequest() : dbName(), tblName() { - } - - virtual ~GetTableRequest() throw(); - std::string dbName; - std::string tblName; - ClientCapabilities capabilities; - - _GetTableRequest__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_tblName(const std::string& val); - - void __set_capabilities(const ClientCapabilities& val); - - bool operator == (const GetTableRequest & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(tblName == rhs.tblName)) - return false; - if (__isset.capabilities != rhs.__isset.capabilities) - return false; - else if (__isset.capabilities && !(capabilities == rhs.capabilities)) - return false; - return true; - } - bool operator != (const GetTableRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetTableRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetTableRequest &a, GetTableRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const GetTableRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class GetTableResult { - public: - - GetTableResult(const GetTableResult&); - GetTableResult& operator=(const GetTableResult&); - GetTableResult() { - } - - virtual ~GetTableResult() throw(); - Table table; - - void __set_table(const Table& val); - - bool operator == (const GetTableResult & rhs) const - { - if (!(table == rhs.table)) - return false; - return true; - } - bool operator != (const GetTableResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetTableResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetTableResult &a, GetTableResult &b); - -inline std::ostream& operator<<(std::ostream& out, const GetTableResult& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _GetTablesRequest__isset { - _GetTablesRequest__isset() : tblNames(false), capabilities(false) {} - bool tblNames :1; - bool capabilities :1; -} _GetTablesRequest__isset; - -class GetTablesRequest { - public: - - GetTablesRequest(const GetTablesRequest&); - GetTablesRequest& operator=(const GetTablesRequest&); - GetTablesRequest() : dbName() { - } - - virtual ~GetTablesRequest() throw(); - std::string dbName; - std::vector tblNames; - ClientCapabilities capabilities; - - _GetTablesRequest__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_tblNames(const std::vector & val); - - void __set_capabilities(const ClientCapabilities& val); - - bool operator == (const GetTablesRequest & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (__isset.tblNames != rhs.__isset.tblNames) - return false; - else if (__isset.tblNames && !(tblNames == rhs.tblNames)) - return false; - if (__isset.capabilities != rhs.__isset.capabilities) - return false; - else if (__isset.capabilities && !(capabilities == rhs.capabilities)) - return false; - return true; - } - bool operator != (const GetTablesRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetTablesRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetTablesRequest &a, GetTablesRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const GetTablesRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class GetTablesResult { - public: - - GetTablesResult(const GetTablesResult&); - GetTablesResult& operator=(const GetTablesResult&); - GetTablesResult() { - } - - virtual ~GetTablesResult() throw(); - std::vector
tables; - - void __set_tables(const std::vector
& val); - - bool operator == (const GetTablesResult & rhs) const - { - if (!(tables == rhs.tables)) - return false; - return true; - } - bool operator != (const GetTablesResult &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetTablesResult & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(GetTablesResult &a, GetTablesResult &b); - -inline std::ostream& operator<<(std::ostream& out, const GetTablesResult& obj) -{ - obj.printTo(out); - return out; -} - - -class CmRecycleRequest { - public: - - CmRecycleRequest(const CmRecycleRequest&); - CmRecycleRequest& operator=(const CmRecycleRequest&); - CmRecycleRequest() : dataPath(), purge(0) { - } - - virtual ~CmRecycleRequest() throw(); - std::string dataPath; - bool purge; - - void __set_dataPath(const std::string& val); - - void __set_purge(const bool val); - - bool operator == (const CmRecycleRequest & rhs) const - { - if (!(dataPath == rhs.dataPath)) - return false; - if (!(purge == rhs.purge)) - return false; - return true; - } - bool operator != (const CmRecycleRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const CmRecycleRequest & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(CmRecycleRequest &a, CmRecycleRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const CmRecycleRequest& obj) -{ - obj.printTo(out); - return out; -} - - -class CmRecycleResponse { - public: - - CmRecycleResponse(const CmRecycleResponse&); - CmRecycleResponse& operator=(const CmRecycleResponse&); - CmRecycleResponse() { - } - - virtual ~CmRecycleResponse() throw(); - - bool operator == (const CmRecycleResponse & /* rhs */) const - { - return true; - } - bool operator != (const CmRecycleResponse &rhs) const { - return !(*this == rhs); - } - - bool operator < (const CmRecycleResponse & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(CmRecycleResponse &a, CmRecycleResponse &b); - -inline std::ostream& operator<<(std::ostream& out, const CmRecycleResponse& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _TableMeta__isset { - _TableMeta__isset() : comments(false) {} - bool comments :1; -} _TableMeta__isset; - -class TableMeta { - public: - - TableMeta(const TableMeta&); - TableMeta& operator=(const TableMeta&); - TableMeta() : dbName(), tableName(), tableType(), comments() { - } - - virtual ~TableMeta() throw(); - std::string dbName; - std::string tableName; - std::string tableType; - std::string comments; - - _TableMeta__isset __isset; - - void __set_dbName(const std::string& val); - - void __set_tableName(const std::string& val); - - void __set_tableType(const std::string& val); - - void __set_comments(const std::string& val); - - bool operator == (const TableMeta & rhs) const - { - if (!(dbName == rhs.dbName)) - return false; - if (!(tableName == rhs.tableName)) - return false; - if (!(tableType == rhs.tableType)) - return false; - if (__isset.comments != rhs.__isset.comments) - return false; - else if (__isset.comments && !(comments == rhs.comments)) - return false; - return true; - } - bool operator != (const TableMeta &rhs) const { - return !(*this == rhs); - } - - bool operator < (const TableMeta & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(TableMeta &a, TableMeta &b); - -inline std::ostream& operator<<(std::ostream& out, const TableMeta& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _MetaException__isset { - _MetaException__isset() : message(false) {} - bool message :1; -} _MetaException__isset; - -class MetaException : public ::apache::thrift::TException { - public: - - MetaException(const MetaException&); - MetaException& operator=(const MetaException&); - MetaException() : message() { - } - - virtual ~MetaException() throw(); - std::string message; - - _MetaException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const MetaException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const MetaException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const MetaException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(MetaException &a, MetaException &b); - -inline std::ostream& operator<<(std::ostream& out, const MetaException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _UnknownTableException__isset { - _UnknownTableException__isset() : message(false) {} - bool message :1; -} _UnknownTableException__isset; - -class UnknownTableException : public ::apache::thrift::TException { - public: - - UnknownTableException(const UnknownTableException&); - UnknownTableException& operator=(const UnknownTableException&); - UnknownTableException() : message() { - } - - virtual ~UnknownTableException() throw(); - std::string message; - - _UnknownTableException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const UnknownTableException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const UnknownTableException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const UnknownTableException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(UnknownTableException &a, UnknownTableException &b); - -inline std::ostream& operator<<(std::ostream& out, const UnknownTableException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _UnknownDBException__isset { - _UnknownDBException__isset() : message(false) {} - bool message :1; -} _UnknownDBException__isset; - -class UnknownDBException : public ::apache::thrift::TException { - public: - - UnknownDBException(const UnknownDBException&); - UnknownDBException& operator=(const UnknownDBException&); - UnknownDBException() : message() { - } - - virtual ~UnknownDBException() throw(); - std::string message; - - _UnknownDBException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const UnknownDBException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const UnknownDBException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const UnknownDBException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(UnknownDBException &a, UnknownDBException &b); - -inline std::ostream& operator<<(std::ostream& out, const UnknownDBException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _AlreadyExistsException__isset { - _AlreadyExistsException__isset() : message(false) {} - bool message :1; -} _AlreadyExistsException__isset; - -class AlreadyExistsException : public ::apache::thrift::TException { - public: - - AlreadyExistsException(const AlreadyExistsException&); - AlreadyExistsException& operator=(const AlreadyExistsException&); - AlreadyExistsException() : message() { - } - - virtual ~AlreadyExistsException() throw(); - std::string message; - - _AlreadyExistsException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const AlreadyExistsException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const AlreadyExistsException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const AlreadyExistsException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(AlreadyExistsException &a, AlreadyExistsException &b); - -inline std::ostream& operator<<(std::ostream& out, const AlreadyExistsException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _InvalidPartitionException__isset { - _InvalidPartitionException__isset() : message(false) {} - bool message :1; -} _InvalidPartitionException__isset; - -class InvalidPartitionException : public ::apache::thrift::TException { - public: - - InvalidPartitionException(const InvalidPartitionException&); - InvalidPartitionException& operator=(const InvalidPartitionException&); - InvalidPartitionException() : message() { - } - - virtual ~InvalidPartitionException() throw(); - std::string message; - - _InvalidPartitionException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const InvalidPartitionException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const InvalidPartitionException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const InvalidPartitionException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(InvalidPartitionException &a, InvalidPartitionException &b); - -inline std::ostream& operator<<(std::ostream& out, const InvalidPartitionException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _UnknownPartitionException__isset { - _UnknownPartitionException__isset() : message(false) {} - bool message :1; -} _UnknownPartitionException__isset; - -class UnknownPartitionException : public ::apache::thrift::TException { - public: - - UnknownPartitionException(const UnknownPartitionException&); - UnknownPartitionException& operator=(const UnknownPartitionException&); - UnknownPartitionException() : message() { - } - - virtual ~UnknownPartitionException() throw(); - std::string message; - - _UnknownPartitionException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const UnknownPartitionException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const UnknownPartitionException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const UnknownPartitionException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(UnknownPartitionException &a, UnknownPartitionException &b); - -inline std::ostream& operator<<(std::ostream& out, const UnknownPartitionException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _InvalidObjectException__isset { - _InvalidObjectException__isset() : message(false) {} - bool message :1; -} _InvalidObjectException__isset; - -class InvalidObjectException : public ::apache::thrift::TException { - public: - - InvalidObjectException(const InvalidObjectException&); - InvalidObjectException& operator=(const InvalidObjectException&); - InvalidObjectException() : message() { - } - - virtual ~InvalidObjectException() throw(); - std::string message; - - _InvalidObjectException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const InvalidObjectException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const InvalidObjectException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const InvalidObjectException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(InvalidObjectException &a, InvalidObjectException &b); - -inline std::ostream& operator<<(std::ostream& out, const InvalidObjectException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _NoSuchObjectException__isset { - _NoSuchObjectException__isset() : message(false) {} - bool message :1; -} _NoSuchObjectException__isset; - -class NoSuchObjectException : public ::apache::thrift::TException { - public: - - NoSuchObjectException(const NoSuchObjectException&); - NoSuchObjectException& operator=(const NoSuchObjectException&); - NoSuchObjectException() : message() { - } - - virtual ~NoSuchObjectException() throw(); - std::string message; - - _NoSuchObjectException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const NoSuchObjectException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const NoSuchObjectException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const NoSuchObjectException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(NoSuchObjectException &a, NoSuchObjectException &b); - -inline std::ostream& operator<<(std::ostream& out, const NoSuchObjectException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _IndexAlreadyExistsException__isset { - _IndexAlreadyExistsException__isset() : message(false) {} - bool message :1; -} _IndexAlreadyExistsException__isset; - -class IndexAlreadyExistsException : public ::apache::thrift::TException { - public: - - IndexAlreadyExistsException(const IndexAlreadyExistsException&); - IndexAlreadyExistsException& operator=(const IndexAlreadyExistsException&); - IndexAlreadyExistsException() : message() { - } - - virtual ~IndexAlreadyExistsException() throw(); - std::string message; - - _IndexAlreadyExistsException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const IndexAlreadyExistsException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const IndexAlreadyExistsException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const IndexAlreadyExistsException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(IndexAlreadyExistsException &a, IndexAlreadyExistsException &b); - -inline std::ostream& operator<<(std::ostream& out, const IndexAlreadyExistsException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _InvalidOperationException__isset { - _InvalidOperationException__isset() : message(false) {} - bool message :1; -} _InvalidOperationException__isset; - -class InvalidOperationException : public ::apache::thrift::TException { - public: - - InvalidOperationException(const InvalidOperationException&); - InvalidOperationException& operator=(const InvalidOperationException&); - InvalidOperationException() : message() { - } - - virtual ~InvalidOperationException() throw(); - std::string message; - - _InvalidOperationException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const InvalidOperationException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const InvalidOperationException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const InvalidOperationException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(InvalidOperationException &a, InvalidOperationException &b); - -inline std::ostream& operator<<(std::ostream& out, const InvalidOperationException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _ConfigValSecurityException__isset { - _ConfigValSecurityException__isset() : message(false) {} - bool message :1; -} _ConfigValSecurityException__isset; - -class ConfigValSecurityException : public ::apache::thrift::TException { - public: - - ConfigValSecurityException(const ConfigValSecurityException&); - ConfigValSecurityException& operator=(const ConfigValSecurityException&); - ConfigValSecurityException() : message() { - } - - virtual ~ConfigValSecurityException() throw(); - std::string message; - - _ConfigValSecurityException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const ConfigValSecurityException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const ConfigValSecurityException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ConfigValSecurityException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(ConfigValSecurityException &a, ConfigValSecurityException &b); - -inline std::ostream& operator<<(std::ostream& out, const ConfigValSecurityException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _InvalidInputException__isset { - _InvalidInputException__isset() : message(false) {} - bool message :1; -} _InvalidInputException__isset; - -class InvalidInputException : public ::apache::thrift::TException { - public: - - InvalidInputException(const InvalidInputException&); - InvalidInputException& operator=(const InvalidInputException&); - InvalidInputException() : message() { - } - - virtual ~InvalidInputException() throw(); - std::string message; - - _InvalidInputException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const InvalidInputException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const InvalidInputException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const InvalidInputException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(InvalidInputException &a, InvalidInputException &b); - -inline std::ostream& operator<<(std::ostream& out, const InvalidInputException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _NoSuchTxnException__isset { - _NoSuchTxnException__isset() : message(false) {} - bool message :1; -} _NoSuchTxnException__isset; - -class NoSuchTxnException : public ::apache::thrift::TException { - public: - - NoSuchTxnException(const NoSuchTxnException&); - NoSuchTxnException& operator=(const NoSuchTxnException&); - NoSuchTxnException() : message() { - } - - virtual ~NoSuchTxnException() throw(); - std::string message; - - _NoSuchTxnException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const NoSuchTxnException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const NoSuchTxnException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const NoSuchTxnException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(NoSuchTxnException &a, NoSuchTxnException &b); - -inline std::ostream& operator<<(std::ostream& out, const NoSuchTxnException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _TxnAbortedException__isset { - _TxnAbortedException__isset() : message(false) {} - bool message :1; -} _TxnAbortedException__isset; - -class TxnAbortedException : public ::apache::thrift::TException { - public: - - TxnAbortedException(const TxnAbortedException&); - TxnAbortedException& operator=(const TxnAbortedException&); - TxnAbortedException() : message() { - } - - virtual ~TxnAbortedException() throw(); - std::string message; - - _TxnAbortedException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const TxnAbortedException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const TxnAbortedException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const TxnAbortedException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(TxnAbortedException &a, TxnAbortedException &b); - -inline std::ostream& operator<<(std::ostream& out, const TxnAbortedException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _TxnOpenException__isset { - _TxnOpenException__isset() : message(false) {} - bool message :1; -} _TxnOpenException__isset; - -class TxnOpenException : public ::apache::thrift::TException { - public: - - TxnOpenException(const TxnOpenException&); - TxnOpenException& operator=(const TxnOpenException&); - TxnOpenException() : message() { - } - - virtual ~TxnOpenException() throw(); - std::string message; - - _TxnOpenException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const TxnOpenException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const TxnOpenException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const TxnOpenException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(TxnOpenException &a, TxnOpenException &b); - -inline std::ostream& operator<<(std::ostream& out, const TxnOpenException& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _NoSuchLockException__isset { - _NoSuchLockException__isset() : message(false) {} - bool message :1; -} _NoSuchLockException__isset; - -class NoSuchLockException : public ::apache::thrift::TException { - public: - - NoSuchLockException(const NoSuchLockException&); - NoSuchLockException& operator=(const NoSuchLockException&); - NoSuchLockException() : message() { - } - - virtual ~NoSuchLockException() throw(); - std::string message; - - _NoSuchLockException__isset __isset; - - void __set_message(const std::string& val); - - bool operator == (const NoSuchLockException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const NoSuchLockException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const NoSuchLockException & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; - mutable std::string thriftTExceptionMessageHolder_; - const char* what() const throw(); -}; - -void swap(NoSuchLockException &a, NoSuchLockException &b); - -inline std::ostream& operator<<(std::ostream& out, const NoSuchLockException& obj) -{ - obj.printTo(out); - return out; -} - -}}} // namespace - -#endif diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnRequest.java deleted file mode 100644 index 8e3a0ae..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnRequest.java +++ /dev/null @@ -1,387 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class AbortTxnRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AbortTxnRequest"); - - private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AbortTxnRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AbortTxnRequestTupleSchemeFactory()); - } - - private long txnid; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TXNID((short)1, "txnid"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TXNID - return TXNID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TXNID_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AbortTxnRequest.class, metaDataMap); - } - - public AbortTxnRequest() { - } - - public AbortTxnRequest( - long txnid) - { - this(); - this.txnid = txnid; - setTxnidIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public AbortTxnRequest(AbortTxnRequest other) { - __isset_bitfield = other.__isset_bitfield; - this.txnid = other.txnid; - } - - public AbortTxnRequest deepCopy() { - return new AbortTxnRequest(this); - } - - @Override - public void clear() { - setTxnidIsSet(false); - this.txnid = 0; - } - - public long getTxnid() { - return this.txnid; - } - - public void setTxnid(long txnid) { - this.txnid = txnid; - setTxnidIsSet(true); - } - - public void unsetTxnid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ - public boolean isSetTxnid() { - return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - public void setTxnidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TXNID: - if (value == null) { - unsetTxnid(); - } else { - setTxnid((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TXNID: - return getTxnid(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TXNID: - return isSetTxnid(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AbortTxnRequest) - return this.equals((AbortTxnRequest)that); - return false; - } - - public boolean equals(AbortTxnRequest that) { - if (that == null) - return false; - - boolean this_present_txnid = true; - boolean that_present_txnid = true; - if (this_present_txnid || that_present_txnid) { - if (!(this_present_txnid && that_present_txnid)) - return false; - if (this.txnid != that.txnid) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_txnid = true; - list.add(present_txnid); - if (present_txnid) - list.add(txnid); - - return list.hashCode(); - } - - @Override - public int compareTo(AbortTxnRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTxnid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("AbortTxnRequest("); - boolean first = true; - - sb.append("txnid:"); - sb.append(this.txnid); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetTxnid()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnid' is unset! Struct:" + toString()); - } - - // 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 { - // 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 AbortTxnRequestStandardSchemeFactory implements SchemeFactory { - public AbortTxnRequestStandardScheme getScheme() { - return new AbortTxnRequestStandardScheme(); - } - } - - private static class AbortTxnRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, AbortTxnRequest 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: // TXNID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(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, AbortTxnRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TXNID_FIELD_DESC); - oprot.writeI64(struct.txnid); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AbortTxnRequestTupleSchemeFactory implements SchemeFactory { - public AbortTxnRequestTupleScheme getScheme() { - return new AbortTxnRequestTupleScheme(); - } - } - - private static class AbortTxnRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AbortTxnRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.txnid); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AbortTxnRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnsRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnsRequest.java deleted file mode 100644 index eee1e64..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnsRequest.java +++ /dev/null @@ -1,438 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class AbortTxnsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AbortTxnsRequest"); - - private static final org.apache.thrift.protocol.TField TXN_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("txn_ids", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AbortTxnsRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AbortTxnsRequestTupleSchemeFactory()); - } - - private List txn_ids; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TXN_IDS((short)1, "txn_ids"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TXN_IDS - return TXN_IDS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TXN_IDS, new org.apache.thrift.meta_data.FieldMetaData("txn_ids", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AbortTxnsRequest.class, metaDataMap); - } - - public AbortTxnsRequest() { - } - - public AbortTxnsRequest( - List txn_ids) - { - this(); - this.txn_ids = txn_ids; - } - - /** - * Performs a deep copy on other. - */ - public AbortTxnsRequest(AbortTxnsRequest other) { - if (other.isSetTxn_ids()) { - List __this__txn_ids = new ArrayList(other.txn_ids); - this.txn_ids = __this__txn_ids; - } - } - - public AbortTxnsRequest deepCopy() { - return new AbortTxnsRequest(this); - } - - @Override - public void clear() { - this.txn_ids = null; - } - - public int getTxn_idsSize() { - return (this.txn_ids == null) ? 0 : this.txn_ids.size(); - } - - public java.util.Iterator getTxn_idsIterator() { - return (this.txn_ids == null) ? null : this.txn_ids.iterator(); - } - - public void addToTxn_ids(long elem) { - if (this.txn_ids == null) { - this.txn_ids = new ArrayList(); - } - this.txn_ids.add(elem); - } - - public List getTxn_ids() { - return this.txn_ids; - } - - public void setTxn_ids(List txn_ids) { - this.txn_ids = txn_ids; - } - - public void unsetTxn_ids() { - this.txn_ids = null; - } - - /** Returns true if field txn_ids is set (has been assigned a value) and false otherwise */ - public boolean isSetTxn_ids() { - return this.txn_ids != null; - } - - public void setTxn_idsIsSet(boolean value) { - if (!value) { - this.txn_ids = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TXN_IDS: - if (value == null) { - unsetTxn_ids(); - } else { - setTxn_ids((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TXN_IDS: - return getTxn_ids(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TXN_IDS: - return isSetTxn_ids(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AbortTxnsRequest) - return this.equals((AbortTxnsRequest)that); - return false; - } - - public boolean equals(AbortTxnsRequest that) { - if (that == null) - return false; - - boolean this_present_txn_ids = true && this.isSetTxn_ids(); - boolean that_present_txn_ids = true && that.isSetTxn_ids(); - if (this_present_txn_ids || that_present_txn_ids) { - if (!(this_present_txn_ids && that_present_txn_ids)) - return false; - if (!this.txn_ids.equals(that.txn_ids)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_txn_ids = true && (isSetTxn_ids()); - list.add(present_txn_ids); - if (present_txn_ids) - list.add(txn_ids); - - return list.hashCode(); - } - - @Override - public int compareTo(AbortTxnsRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTxn_ids()).compareTo(other.isSetTxn_ids()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTxn_ids()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txn_ids, other.txn_ids); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("AbortTxnsRequest("); - boolean first = true; - - sb.append("txn_ids:"); - if (this.txn_ids == null) { - sb.append("null"); - } else { - sb.append(this.txn_ids); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetTxn_ids()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'txn_ids' is unset! Struct:" + toString()); - } - - // 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 AbortTxnsRequestStandardSchemeFactory implements SchemeFactory { - public AbortTxnsRequestStandardScheme getScheme() { - return new AbortTxnsRequestStandardScheme(); - } - } - - private static class AbortTxnsRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, AbortTxnsRequest 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: // TXN_IDS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list516 = iprot.readListBegin(); - struct.txn_ids = new ArrayList(_list516.size); - long _elem517; - for (int _i518 = 0; _i518 < _list516.size; ++_i518) - { - _elem517 = iprot.readI64(); - struct.txn_ids.add(_elem517); - } - iprot.readListEnd(); - } - struct.setTxn_idsIsSet(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, AbortTxnsRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.txn_ids != null) { - oprot.writeFieldBegin(TXN_IDS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.txn_ids.size())); - for (long _iter519 : struct.txn_ids) - { - oprot.writeI64(_iter519); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AbortTxnsRequestTupleSchemeFactory implements SchemeFactory { - public AbortTxnsRequestTupleScheme getScheme() { - return new AbortTxnsRequestTupleScheme(); - } - } - - private static class AbortTxnsRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AbortTxnsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.txn_ids.size()); - for (long _iter520 : struct.txn_ids) - { - oprot.writeI64(_iter520); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AbortTxnsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list521 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.txn_ids = new ArrayList(_list521.size); - long _elem522; - for (int _i523 = 0; _i523 < _list521.size; ++_i523) - { - _elem522 = iprot.readI64(); - struct.txn_ids.add(_elem522); - } - } - struct.setTxn_idsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java deleted file mode 100644 index 054cf1b..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java +++ /dev/null @@ -1,864 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class AddDynamicPartitions implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddDynamicPartitions"); - - private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)1); - 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)2); - private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField PARTITIONNAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionnames", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.I32, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AddDynamicPartitionsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AddDynamicPartitionsTupleSchemeFactory()); - } - - private long txnid; // required - private String dbname; // required - private String tablename; // required - private List partitionnames; // required - private DataOperationType operationType; // 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 { - TXNID((short)1, "txnid"), - DBNAME((short)2, "dbname"), - TABLENAME((short)3, "tablename"), - PARTITIONNAMES((short)4, "partitionnames"), - /** - * - * @see DataOperationType - */ - OPERATION_TYPE((short)5, "operationType"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TXNID - return TXNID; - case 2: // DBNAME - return DBNAME; - case 3: // TABLENAME - return TABLENAME; - case 4: // PARTITIONNAMES - return PARTITIONNAMES; - case 5: // OPERATION_TYPE - return OPERATION_TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TXNID_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.OPERATION_TYPE}; - 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); - tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARTITIONNAMES, new org.apache.thrift.meta_data.FieldMetaData("partitionnames", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.OPERATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("operationType", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DataOperationType.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddDynamicPartitions.class, metaDataMap); - } - - public AddDynamicPartitions() { - this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET; - - } - - public AddDynamicPartitions( - long txnid, - String dbname, - String tablename, - List partitionnames) - { - this(); - this.txnid = txnid; - setTxnidIsSet(true); - this.dbname = dbname; - this.tablename = tablename; - this.partitionnames = partitionnames; - } - - /** - * Performs a deep copy on other. - */ - public AddDynamicPartitions(AddDynamicPartitions other) { - __isset_bitfield = other.__isset_bitfield; - this.txnid = other.txnid; - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTablename()) { - this.tablename = other.tablename; - } - if (other.isSetPartitionnames()) { - List __this__partitionnames = new ArrayList(other.partitionnames); - this.partitionnames = __this__partitionnames; - } - if (other.isSetOperationType()) { - this.operationType = other.operationType; - } - } - - public AddDynamicPartitions deepCopy() { - return new AddDynamicPartitions(this); - } - - @Override - public void clear() { - setTxnidIsSet(false); - this.txnid = 0; - this.dbname = null; - this.tablename = null; - this.partitionnames = null; - this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET; - - } - - public long getTxnid() { - return this.txnid; - } - - public void setTxnid(long txnid) { - this.txnid = txnid; - setTxnidIsSet(true); - } - - public void unsetTxnid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ - public boolean isSetTxnid() { - return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - public void setTxnidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getTablename() { - return this.tablename; - } - - public void setTablename(String tablename) { - this.tablename = tablename; - } - - public void unsetTablename() { - this.tablename = null; - } - - /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ - public boolean isSetTablename() { - return this.tablename != null; - } - - public void setTablenameIsSet(boolean value) { - if (!value) { - this.tablename = null; - } - } - - public int getPartitionnamesSize() { - return (this.partitionnames == null) ? 0 : this.partitionnames.size(); - } - - public java.util.Iterator getPartitionnamesIterator() { - return (this.partitionnames == null) ? null : this.partitionnames.iterator(); - } - - public void addToPartitionnames(String elem) { - if (this.partitionnames == null) { - this.partitionnames = new ArrayList(); - } - this.partitionnames.add(elem); - } - - public List getPartitionnames() { - return this.partitionnames; - } - - public void setPartitionnames(List partitionnames) { - this.partitionnames = partitionnames; - } - - public void unsetPartitionnames() { - this.partitionnames = null; - } - - /** Returns true if field partitionnames is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitionnames() { - return this.partitionnames != null; - } - - public void setPartitionnamesIsSet(boolean value) { - if (!value) { - this.partitionnames = null; - } - } - - /** - * - * @see DataOperationType - */ - public DataOperationType getOperationType() { - return this.operationType; - } - - /** - * - * @see DataOperationType - */ - public void setOperationType(DataOperationType operationType) { - this.operationType = operationType; - } - - public void unsetOperationType() { - this.operationType = null; - } - - /** Returns true if field operationType is set (has been assigned a value) and false otherwise */ - public boolean isSetOperationType() { - return this.operationType != null; - } - - public void setOperationTypeIsSet(boolean value) { - if (!value) { - this.operationType = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TXNID: - if (value == null) { - unsetTxnid(); - } else { - setTxnid((Long)value); - } - break; - - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TABLENAME: - if (value == null) { - unsetTablename(); - } else { - setTablename((String)value); - } - break; - - case PARTITIONNAMES: - if (value == null) { - unsetPartitionnames(); - } else { - setPartitionnames((List)value); - } - break; - - case OPERATION_TYPE: - if (value == null) { - unsetOperationType(); - } else { - setOperationType((DataOperationType)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TXNID: - return getTxnid(); - - case DBNAME: - return getDbname(); - - case TABLENAME: - return getTablename(); - - case PARTITIONNAMES: - return getPartitionnames(); - - case OPERATION_TYPE: - return getOperationType(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TXNID: - return isSetTxnid(); - case DBNAME: - return isSetDbname(); - case TABLENAME: - return isSetTablename(); - case PARTITIONNAMES: - return isSetPartitionnames(); - case OPERATION_TYPE: - return isSetOperationType(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AddDynamicPartitions) - return this.equals((AddDynamicPartitions)that); - return false; - } - - public boolean equals(AddDynamicPartitions that) { - if (that == null) - return false; - - boolean this_present_txnid = true; - boolean that_present_txnid = true; - if (this_present_txnid || that_present_txnid) { - if (!(this_present_txnid && that_present_txnid)) - return false; - if (this.txnid != that.txnid) - return false; - } - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tablename = true && this.isSetTablename(); - boolean that_present_tablename = true && that.isSetTablename(); - if (this_present_tablename || that_present_tablename) { - if (!(this_present_tablename && that_present_tablename)) - return false; - if (!this.tablename.equals(that.tablename)) - return false; - } - - boolean this_present_partitionnames = true && this.isSetPartitionnames(); - boolean that_present_partitionnames = true && that.isSetPartitionnames(); - if (this_present_partitionnames || that_present_partitionnames) { - if (!(this_present_partitionnames && that_present_partitionnames)) - return false; - if (!this.partitionnames.equals(that.partitionnames)) - return false; - } - - boolean this_present_operationType = true && this.isSetOperationType(); - boolean that_present_operationType = true && that.isSetOperationType(); - if (this_present_operationType || that_present_operationType) { - if (!(this_present_operationType && that_present_operationType)) - return false; - if (!this.operationType.equals(that.operationType)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_txnid = true; - list.add(present_txnid); - if (present_txnid) - list.add(txnid); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_tablename = true && (isSetTablename()); - list.add(present_tablename); - if (present_tablename) - list.add(tablename); - - boolean present_partitionnames = true && (isSetPartitionnames()); - list.add(present_partitionnames); - if (present_partitionnames) - list.add(partitionnames); - - boolean present_operationType = true && (isSetOperationType()); - list.add(present_operationType); - if (present_operationType) - list.add(operationType.getValue()); - - return list.hashCode(); - } - - @Override - public int compareTo(AddDynamicPartitions other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTxnid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTablename()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartitionnames()).compareTo(other.isSetPartitionnames()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitionnames()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionnames, other.partitionnames); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(other.isSetOperationType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOperationType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("AddDynamicPartitions("); - boolean first = true; - - sb.append("txnid:"); - sb.append(this.txnid); - first = false; - if (!first) sb.append(", "); - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tablename:"); - if (this.tablename == null) { - sb.append("null"); - } else { - sb.append(this.tablename); - } - first = false; - if (!first) sb.append(", "); - sb.append("partitionnames:"); - if (this.partitionnames == null) { - sb.append("null"); - } else { - sb.append(this.partitionnames); - } - first = false; - if (isSetOperationType()) { - if (!first) sb.append(", "); - sb.append("operationType:"); - if (this.operationType == null) { - sb.append("null"); - } else { - sb.append(this.operationType); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetTxnid()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnid' is unset! Struct:" + toString()); - } - - if (!isSetDbname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); - } - - if (!isSetTablename()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString()); - } - - if (!isSetPartitionnames()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'partitionnames' is unset! Struct:" + toString()); - } - - // 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 { - // 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 AddDynamicPartitionsStandardSchemeFactory implements SchemeFactory { - public AddDynamicPartitionsStandardScheme getScheme() { - return new AddDynamicPartitionsStandardScheme(); - } - } - - private static class AddDynamicPartitionsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, AddDynamicPartitions 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: // TXNID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // 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 3: // TABLENAME - 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: // PARTITIONNAMES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list574 = iprot.readListBegin(); - struct.partitionnames = new ArrayList(_list574.size); - String _elem575; - for (int _i576 = 0; _i576 < _list574.size; ++_i576) - { - _elem575 = iprot.readString(); - struct.partitionnames.add(_elem575); - } - iprot.readListEnd(); - } - struct.setPartitionnamesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // OPERATION_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32()); - struct.setOperationTypeIsSet(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, AddDynamicPartitions struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TXNID_FIELD_DESC); - oprot.writeI64(struct.txnid); - oprot.writeFieldEnd(); - if (struct.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(struct.dbname); - oprot.writeFieldEnd(); - } - if (struct.tablename != null) { - oprot.writeFieldBegin(TABLENAME_FIELD_DESC); - oprot.writeString(struct.tablename); - oprot.writeFieldEnd(); - } - if (struct.partitionnames != null) { - oprot.writeFieldBegin(PARTITIONNAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partitionnames.size())); - for (String _iter577 : struct.partitionnames) - { - oprot.writeString(_iter577); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.operationType != null) { - if (struct.isSetOperationType()) { - oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC); - oprot.writeI32(struct.operationType.getValue()); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AddDynamicPartitionsTupleSchemeFactory implements SchemeFactory { - public AddDynamicPartitionsTupleScheme getScheme() { - return new AddDynamicPartitionsTupleScheme(); - } - } - - private static class AddDynamicPartitionsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AddDynamicPartitions struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.txnid); - oprot.writeString(struct.dbname); - oprot.writeString(struct.tablename); - { - oprot.writeI32(struct.partitionnames.size()); - for (String _iter578 : struct.partitionnames) - { - oprot.writeString(_iter578); - } - } - BitSet optionals = new BitSet(); - if (struct.isSetOperationType()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetOperationType()) { - oprot.writeI32(struct.operationType.getValue()); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AddDynamicPartitions struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(true); - struct.dbname = iprot.readString(); - struct.setDbnameIsSet(true); - struct.tablename = iprot.readString(); - struct.setTablenameIsSet(true); - { - org.apache.thrift.protocol.TList _list579 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.partitionnames = new ArrayList(_list579.size); - String _elem580; - for (int _i581 = 0; _i581 < _list579.size; ++_i581) - { - _elem580 = iprot.readString(); - struct.partitionnames.add(_elem580); - } - } - struct.setPartitionnamesIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32()); - struct.setOperationTypeIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddForeignKeyRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddForeignKeyRequest.java deleted file mode 100644 index 3123787..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddForeignKeyRequest.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class AddForeignKeyRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddForeignKeyRequest"); - - private static final org.apache.thrift.protocol.TField FOREIGN_KEY_COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignKeyCols", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AddForeignKeyRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AddForeignKeyRequestTupleSchemeFactory()); - } - - private List foreignKeyCols; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FOREIGN_KEY_COLS((short)1, "foreignKeyCols"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FOREIGN_KEY_COLS - return FOREIGN_KEY_COLS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.FOREIGN_KEY_COLS, new org.apache.thrift.meta_data.FieldMetaData("foreignKeyCols", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLForeignKey.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddForeignKeyRequest.class, metaDataMap); - } - - public AddForeignKeyRequest() { - } - - public AddForeignKeyRequest( - List foreignKeyCols) - { - this(); - this.foreignKeyCols = foreignKeyCols; - } - - /** - * Performs a deep copy on other. - */ - public AddForeignKeyRequest(AddForeignKeyRequest other) { - if (other.isSetForeignKeyCols()) { - List __this__foreignKeyCols = new ArrayList(other.foreignKeyCols.size()); - for (SQLForeignKey other_element : other.foreignKeyCols) { - __this__foreignKeyCols.add(new SQLForeignKey(other_element)); - } - this.foreignKeyCols = __this__foreignKeyCols; - } - } - - public AddForeignKeyRequest deepCopy() { - return new AddForeignKeyRequest(this); - } - - @Override - public void clear() { - this.foreignKeyCols = null; - } - - public int getForeignKeyColsSize() { - return (this.foreignKeyCols == null) ? 0 : this.foreignKeyCols.size(); - } - - public java.util.Iterator getForeignKeyColsIterator() { - return (this.foreignKeyCols == null) ? null : this.foreignKeyCols.iterator(); - } - - public void addToForeignKeyCols(SQLForeignKey elem) { - if (this.foreignKeyCols == null) { - this.foreignKeyCols = new ArrayList(); - } - this.foreignKeyCols.add(elem); - } - - public List getForeignKeyCols() { - return this.foreignKeyCols; - } - - public void setForeignKeyCols(List foreignKeyCols) { - this.foreignKeyCols = foreignKeyCols; - } - - public void unsetForeignKeyCols() { - this.foreignKeyCols = null; - } - - /** Returns true if field foreignKeyCols is set (has been assigned a value) and false otherwise */ - public boolean isSetForeignKeyCols() { - return this.foreignKeyCols != null; - } - - public void setForeignKeyColsIsSet(boolean value) { - if (!value) { - this.foreignKeyCols = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case FOREIGN_KEY_COLS: - if (value == null) { - unsetForeignKeyCols(); - } else { - setForeignKeyCols((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case FOREIGN_KEY_COLS: - return getForeignKeyCols(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case FOREIGN_KEY_COLS: - return isSetForeignKeyCols(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AddForeignKeyRequest) - return this.equals((AddForeignKeyRequest)that); - return false; - } - - public boolean equals(AddForeignKeyRequest that) { - if (that == null) - return false; - - boolean this_present_foreignKeyCols = true && this.isSetForeignKeyCols(); - boolean that_present_foreignKeyCols = true && that.isSetForeignKeyCols(); - if (this_present_foreignKeyCols || that_present_foreignKeyCols) { - if (!(this_present_foreignKeyCols && that_present_foreignKeyCols)) - return false; - if (!this.foreignKeyCols.equals(that.foreignKeyCols)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_foreignKeyCols = true && (isSetForeignKeyCols()); - list.add(present_foreignKeyCols); - if (present_foreignKeyCols) - list.add(foreignKeyCols); - - return list.hashCode(); - } - - @Override - public int compareTo(AddForeignKeyRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetForeignKeyCols()).compareTo(other.isSetForeignKeyCols()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetForeignKeyCols()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignKeyCols, other.foreignKeyCols); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("AddForeignKeyRequest("); - boolean first = true; - - sb.append("foreignKeyCols:"); - if (this.foreignKeyCols == null) { - sb.append("null"); - } else { - sb.append(this.foreignKeyCols); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetForeignKeyCols()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'foreignKeyCols' is unset! Struct:" + toString()); - } - - // 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 AddForeignKeyRequestStandardSchemeFactory implements SchemeFactory { - public AddForeignKeyRequestStandardScheme getScheme() { - return new AddForeignKeyRequestStandardScheme(); - } - } - - private static class AddForeignKeyRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, AddForeignKeyRequest 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: // FOREIGN_KEY_COLS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list362 = iprot.readListBegin(); - struct.foreignKeyCols = new ArrayList(_list362.size); - SQLForeignKey _elem363; - for (int _i364 = 0; _i364 < _list362.size; ++_i364) - { - _elem363 = new SQLForeignKey(); - _elem363.read(iprot); - struct.foreignKeyCols.add(_elem363); - } - iprot.readListEnd(); - } - struct.setForeignKeyColsIsSet(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, AddForeignKeyRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.foreignKeyCols != null) { - oprot.writeFieldBegin(FOREIGN_KEY_COLS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeyCols.size())); - for (SQLForeignKey _iter365 : struct.foreignKeyCols) - { - _iter365.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AddForeignKeyRequestTupleSchemeFactory implements SchemeFactory { - public AddForeignKeyRequestTupleScheme getScheme() { - return new AddForeignKeyRequestTupleScheme(); - } - } - - private static class AddForeignKeyRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AddForeignKeyRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.foreignKeyCols.size()); - for (SQLForeignKey _iter366 : struct.foreignKeyCols) - { - _iter366.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AddForeignKeyRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list367 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.foreignKeyCols = new ArrayList(_list367.size); - SQLForeignKey _elem368; - for (int _i369 = 0; _i369 < _list367.size; ++_i369) - { - _elem368 = new SQLForeignKey(); - _elem368.read(iprot); - struct.foreignKeyCols.add(_elem368); - } - } - struct.setForeignKeyColsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddNotNullConstraintRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddNotNullConstraintRequest.java deleted file mode 100644 index 3b79e98..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddNotNullConstraintRequest.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class AddNotNullConstraintRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddNotNullConstraintRequest"); - - private static final org.apache.thrift.protocol.TField NOT_NULL_CONSTRAINT_COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("notNullConstraintCols", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AddNotNullConstraintRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AddNotNullConstraintRequestTupleSchemeFactory()); - } - - private List notNullConstraintCols; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NOT_NULL_CONSTRAINT_COLS((short)1, "notNullConstraintCols"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NOT_NULL_CONSTRAINT_COLS - return NOT_NULL_CONSTRAINT_COLS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NOT_NULL_CONSTRAINT_COLS, new org.apache.thrift.meta_data.FieldMetaData("notNullConstraintCols", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLNotNullConstraint.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddNotNullConstraintRequest.class, metaDataMap); - } - - public AddNotNullConstraintRequest() { - } - - public AddNotNullConstraintRequest( - List notNullConstraintCols) - { - this(); - this.notNullConstraintCols = notNullConstraintCols; - } - - /** - * Performs a deep copy on other. - */ - public AddNotNullConstraintRequest(AddNotNullConstraintRequest other) { - if (other.isSetNotNullConstraintCols()) { - List __this__notNullConstraintCols = new ArrayList(other.notNullConstraintCols.size()); - for (SQLNotNullConstraint other_element : other.notNullConstraintCols) { - __this__notNullConstraintCols.add(new SQLNotNullConstraint(other_element)); - } - this.notNullConstraintCols = __this__notNullConstraintCols; - } - } - - public AddNotNullConstraintRequest deepCopy() { - return new AddNotNullConstraintRequest(this); - } - - @Override - public void clear() { - this.notNullConstraintCols = null; - } - - public int getNotNullConstraintColsSize() { - return (this.notNullConstraintCols == null) ? 0 : this.notNullConstraintCols.size(); - } - - public java.util.Iterator getNotNullConstraintColsIterator() { - return (this.notNullConstraintCols == null) ? null : this.notNullConstraintCols.iterator(); - } - - public void addToNotNullConstraintCols(SQLNotNullConstraint elem) { - if (this.notNullConstraintCols == null) { - this.notNullConstraintCols = new ArrayList(); - } - this.notNullConstraintCols.add(elem); - } - - public List getNotNullConstraintCols() { - return this.notNullConstraintCols; - } - - public void setNotNullConstraintCols(List notNullConstraintCols) { - this.notNullConstraintCols = notNullConstraintCols; - } - - public void unsetNotNullConstraintCols() { - this.notNullConstraintCols = null; - } - - /** Returns true if field notNullConstraintCols is set (has been assigned a value) and false otherwise */ - public boolean isSetNotNullConstraintCols() { - return this.notNullConstraintCols != null; - } - - public void setNotNullConstraintColsIsSet(boolean value) { - if (!value) { - this.notNullConstraintCols = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NOT_NULL_CONSTRAINT_COLS: - if (value == null) { - unsetNotNullConstraintCols(); - } else { - setNotNullConstraintCols((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NOT_NULL_CONSTRAINT_COLS: - return getNotNullConstraintCols(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NOT_NULL_CONSTRAINT_COLS: - return isSetNotNullConstraintCols(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AddNotNullConstraintRequest) - return this.equals((AddNotNullConstraintRequest)that); - return false; - } - - public boolean equals(AddNotNullConstraintRequest that) { - if (that == null) - return false; - - boolean this_present_notNullConstraintCols = true && this.isSetNotNullConstraintCols(); - boolean that_present_notNullConstraintCols = true && that.isSetNotNullConstraintCols(); - if (this_present_notNullConstraintCols || that_present_notNullConstraintCols) { - if (!(this_present_notNullConstraintCols && that_present_notNullConstraintCols)) - return false; - if (!this.notNullConstraintCols.equals(that.notNullConstraintCols)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_notNullConstraintCols = true && (isSetNotNullConstraintCols()); - list.add(present_notNullConstraintCols); - if (present_notNullConstraintCols) - list.add(notNullConstraintCols); - - return list.hashCode(); - } - - @Override - public int compareTo(AddNotNullConstraintRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetNotNullConstraintCols()).compareTo(other.isSetNotNullConstraintCols()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNotNullConstraintCols()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notNullConstraintCols, other.notNullConstraintCols); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("AddNotNullConstraintRequest("); - boolean first = true; - - sb.append("notNullConstraintCols:"); - if (this.notNullConstraintCols == null) { - sb.append("null"); - } else { - sb.append(this.notNullConstraintCols); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetNotNullConstraintCols()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'notNullConstraintCols' is unset! Struct:" + toString()); - } - - // 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 AddNotNullConstraintRequestStandardSchemeFactory implements SchemeFactory { - public AddNotNullConstraintRequestStandardScheme getScheme() { - return new AddNotNullConstraintRequestStandardScheme(); - } - } - - private static class AddNotNullConstraintRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, AddNotNullConstraintRequest 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: // NOT_NULL_CONSTRAINT_COLS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list378 = iprot.readListBegin(); - struct.notNullConstraintCols = new ArrayList(_list378.size); - SQLNotNullConstraint _elem379; - for (int _i380 = 0; _i380 < _list378.size; ++_i380) - { - _elem379 = new SQLNotNullConstraint(); - _elem379.read(iprot); - struct.notNullConstraintCols.add(_elem379); - } - iprot.readListEnd(); - } - struct.setNotNullConstraintColsIsSet(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, AddNotNullConstraintRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.notNullConstraintCols != null) { - oprot.writeFieldBegin(NOT_NULL_CONSTRAINT_COLS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.notNullConstraintCols.size())); - for (SQLNotNullConstraint _iter381 : struct.notNullConstraintCols) - { - _iter381.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AddNotNullConstraintRequestTupleSchemeFactory implements SchemeFactory { - public AddNotNullConstraintRequestTupleScheme getScheme() { - return new AddNotNullConstraintRequestTupleScheme(); - } - } - - private static class AddNotNullConstraintRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AddNotNullConstraintRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.notNullConstraintCols.size()); - for (SQLNotNullConstraint _iter382 : struct.notNullConstraintCols) - { - _iter382.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AddNotNullConstraintRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list383 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.notNullConstraintCols = new ArrayList(_list383.size); - SQLNotNullConstraint _elem384; - for (int _i385 = 0; _i385 < _list383.size; ++_i385) - { - _elem384 = new SQLNotNullConstraint(); - _elem384.read(iprot); - struct.notNullConstraintCols.add(_elem384); - } - } - struct.setNotNullConstraintColsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java deleted file mode 100644 index 6e9ac48..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java +++ /dev/null @@ -1,849 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class AddPartitionsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddPartitionsRequest"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("parts", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField IF_NOT_EXISTS_FIELD_DESC = new org.apache.thrift.protocol.TField("ifNotExists", org.apache.thrift.protocol.TType.BOOL, (short)4); - private static final org.apache.thrift.protocol.TField NEED_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("needResult", org.apache.thrift.protocol.TType.BOOL, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AddPartitionsRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AddPartitionsRequestTupleSchemeFactory()); - } - - private String dbName; // required - private String tblName; // required - private List parts; // required - private boolean ifNotExists; // required - private boolean needResult; // 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 { - DB_NAME((short)1, "dbName"), - TBL_NAME((short)2, "tblName"), - PARTS((short)3, "parts"), - IF_NOT_EXISTS((short)4, "ifNotExists"), - NEED_RESULT((short)5, "needResult"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PARTS - return PARTS; - case 4: // IF_NOT_EXISTS - return IF_NOT_EXISTS; - case 5: // NEED_RESULT - return NEED_RESULT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __IFNOTEXISTS_ISSET_ID = 0; - private static final int __NEEDRESULT_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.NEED_RESULT}; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARTS, new org.apache.thrift.meta_data.FieldMetaData("parts", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.IF_NOT_EXISTS, new org.apache.thrift.meta_data.FieldMetaData("ifNotExists", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.NEED_RESULT, new org.apache.thrift.meta_data.FieldMetaData("needResult", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddPartitionsRequest.class, metaDataMap); - } - - public AddPartitionsRequest() { - this.needResult = true; - - } - - public AddPartitionsRequest( - String dbName, - String tblName, - List parts, - boolean ifNotExists) - { - this(); - this.dbName = dbName; - this.tblName = tblName; - this.parts = parts; - this.ifNotExists = ifNotExists; - setIfNotExistsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public AddPartitionsRequest(AddPartitionsRequest other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTblName()) { - this.tblName = other.tblName; - } - if (other.isSetParts()) { - List __this__parts = new ArrayList(other.parts.size()); - for (Partition other_element : other.parts) { - __this__parts.add(new Partition(other_element)); - } - this.parts = __this__parts; - } - this.ifNotExists = other.ifNotExists; - this.needResult = other.needResult; - } - - public AddPartitionsRequest deepCopy() { - return new AddPartitionsRequest(this); - } - - @Override - public void clear() { - this.dbName = null; - this.tblName = null; - this.parts = null; - setIfNotExistsIsSet(false); - this.ifNotExists = false; - this.needResult = true; - - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTblName() { - return this.tblName; - } - - public void setTblName(String tblName) { - this.tblName = tblName; - } - - public void unsetTblName() { - this.tblName = null; - } - - /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ - public boolean isSetTblName() { - return this.tblName != null; - } - - public void setTblNameIsSet(boolean value) { - if (!value) { - this.tblName = null; - } - } - - public int getPartsSize() { - return (this.parts == null) ? 0 : this.parts.size(); - } - - public java.util.Iterator getPartsIterator() { - return (this.parts == null) ? null : this.parts.iterator(); - } - - public void addToParts(Partition elem) { - if (this.parts == null) { - this.parts = new ArrayList(); - } - this.parts.add(elem); - } - - public List getParts() { - return this.parts; - } - - public void setParts(List parts) { - this.parts = parts; - } - - public void unsetParts() { - this.parts = null; - } - - /** Returns true if field parts is set (has been assigned a value) and false otherwise */ - public boolean isSetParts() { - return this.parts != null; - } - - public void setPartsIsSet(boolean value) { - if (!value) { - this.parts = null; - } - } - - public boolean isIfNotExists() { - return this.ifNotExists; - } - - public void setIfNotExists(boolean ifNotExists) { - this.ifNotExists = ifNotExists; - setIfNotExistsIsSet(true); - } - - public void unsetIfNotExists() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IFNOTEXISTS_ISSET_ID); - } - - /** Returns true if field ifNotExists is set (has been assigned a value) and false otherwise */ - public boolean isSetIfNotExists() { - return EncodingUtils.testBit(__isset_bitfield, __IFNOTEXISTS_ISSET_ID); - } - - public void setIfNotExistsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IFNOTEXISTS_ISSET_ID, value); - } - - public boolean isNeedResult() { - return this.needResult; - } - - public void setNeedResult(boolean needResult) { - this.needResult = needResult; - setNeedResultIsSet(true); - } - - public void unsetNeedResult() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NEEDRESULT_ISSET_ID); - } - - /** Returns true if field needResult is set (has been assigned a value) and false otherwise */ - public boolean isSetNeedResult() { - return EncodingUtils.testBit(__isset_bitfield, __NEEDRESULT_ISSET_ID); - } - - public void setNeedResultIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NEEDRESULT_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTblName(); - } else { - setTblName((String)value); - } - break; - - case PARTS: - if (value == null) { - unsetParts(); - } else { - setParts((List)value); - } - break; - - case IF_NOT_EXISTS: - if (value == null) { - unsetIfNotExists(); - } else { - setIfNotExists((Boolean)value); - } - break; - - case NEED_RESULT: - if (value == null) { - unsetNeedResult(); - } else { - setNeedResult((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case TBL_NAME: - return getTblName(); - - case PARTS: - return getParts(); - - case IF_NOT_EXISTS: - return isIfNotExists(); - - case NEED_RESULT: - return isNeedResult(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case TBL_NAME: - return isSetTblName(); - case PARTS: - return isSetParts(); - case IF_NOT_EXISTS: - return isSetIfNotExists(); - case NEED_RESULT: - return isSetNeedResult(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AddPartitionsRequest) - return this.equals((AddPartitionsRequest)that); - return false; - } - - public boolean equals(AddPartitionsRequest that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tblName = true && this.isSetTblName(); - boolean that_present_tblName = true && that.isSetTblName(); - if (this_present_tblName || that_present_tblName) { - if (!(this_present_tblName && that_present_tblName)) - return false; - if (!this.tblName.equals(that.tblName)) - return false; - } - - boolean this_present_parts = true && this.isSetParts(); - boolean that_present_parts = true && that.isSetParts(); - if (this_present_parts || that_present_parts) { - if (!(this_present_parts && that_present_parts)) - return false; - if (!this.parts.equals(that.parts)) - return false; - } - - boolean this_present_ifNotExists = true; - boolean that_present_ifNotExists = true; - if (this_present_ifNotExists || that_present_ifNotExists) { - if (!(this_present_ifNotExists && that_present_ifNotExists)) - return false; - if (this.ifNotExists != that.ifNotExists) - return false; - } - - boolean this_present_needResult = true && this.isSetNeedResult(); - boolean that_present_needResult = true && that.isSetNeedResult(); - if (this_present_needResult || that_present_needResult) { - if (!(this_present_needResult && that_present_needResult)) - return false; - if (this.needResult != that.needResult) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tblName = true && (isSetTblName()); - list.add(present_tblName); - if (present_tblName) - list.add(tblName); - - boolean present_parts = true && (isSetParts()); - list.add(present_parts); - if (present_parts) - list.add(parts); - - boolean present_ifNotExists = true; - list.add(present_ifNotExists); - if (present_ifNotExists) - list.add(ifNotExists); - - boolean present_needResult = true && (isSetNeedResult()); - list.add(present_needResult); - if (present_needResult) - list.add(needResult); - - return list.hashCode(); - } - - @Override - public int compareTo(AddPartitionsRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTblName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParts()).compareTo(other.isSetParts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parts, other.parts); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIfNotExists()).compareTo(other.isSetIfNotExists()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIfNotExists()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ifNotExists, other.ifNotExists); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNeedResult()).compareTo(other.isSetNeedResult()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNeedResult()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.needResult, other.needResult); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("AddPartitionsRequest("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tblName:"); - if (this.tblName == null) { - sb.append("null"); - } else { - sb.append(this.tblName); - } - first = false; - if (!first) sb.append(", "); - sb.append("parts:"); - if (this.parts == null) { - sb.append("null"); - } else { - sb.append(this.parts); - } - first = false; - if (!first) sb.append(", "); - sb.append("ifNotExists:"); - sb.append(this.ifNotExists); - first = false; - if (isSetNeedResult()) { - if (!first) sb.append(", "); - sb.append("needResult:"); - sb.append(this.needResult); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDbName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); - } - - if (!isSetTblName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); - } - - if (!isSetParts()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'parts' is unset! Struct:" + toString()); - } - - if (!isSetIfNotExists()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'ifNotExists' is unset! Struct:" + toString()); - } - - // 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 { - // 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 AddPartitionsRequestStandardSchemeFactory implements SchemeFactory { - public AddPartitionsRequestStandardScheme getScheme() { - return new AddPartitionsRequestStandardScheme(); - } - } - - private static class AddPartitionsRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, AddPartitionsRequest 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.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.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PARTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list452 = iprot.readListBegin(); - struct.parts = new ArrayList(_list452.size); - Partition _elem453; - for (int _i454 = 0; _i454 < _list452.size; ++_i454) - { - _elem453 = new Partition(); - _elem453.read(iprot); - struct.parts.add(_elem453); - } - iprot.readListEnd(); - } - struct.setPartsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // IF_NOT_EXISTS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.ifNotExists = iprot.readBool(); - struct.setIfNotExistsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // NEED_RESULT - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.needResult = iprot.readBool(); - struct.setNeedResultIsSet(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, AddPartitionsRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - if (struct.tblName != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(struct.tblName); - oprot.writeFieldEnd(); - } - if (struct.parts != null) { - oprot.writeFieldBegin(PARTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.parts.size())); - for (Partition _iter455 : struct.parts) - { - _iter455.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(IF_NOT_EXISTS_FIELD_DESC); - oprot.writeBool(struct.ifNotExists); - oprot.writeFieldEnd(); - if (struct.isSetNeedResult()) { - oprot.writeFieldBegin(NEED_RESULT_FIELD_DESC); - oprot.writeBool(struct.needResult); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AddPartitionsRequestTupleSchemeFactory implements SchemeFactory { - public AddPartitionsRequestTupleScheme getScheme() { - return new AddPartitionsRequestTupleScheme(); - } - } - - private static class AddPartitionsRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AddPartitionsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dbName); - oprot.writeString(struct.tblName); - { - oprot.writeI32(struct.parts.size()); - for (Partition _iter456 : struct.parts) - { - _iter456.write(oprot); - } - } - oprot.writeBool(struct.ifNotExists); - BitSet optionals = new BitSet(); - if (struct.isSetNeedResult()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetNeedResult()) { - oprot.writeBool(struct.needResult); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AddPartitionsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - struct.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - { - org.apache.thrift.protocol.TList _list457 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.parts = new ArrayList(_list457.size); - Partition _elem458; - for (int _i459 = 0; _i459 < _list457.size; ++_i459) - { - _elem458 = new Partition(); - _elem458.read(iprot); - struct.parts.add(_elem458); - } - } - struct.setPartsIsSet(true); - struct.ifNotExists = iprot.readBool(); - struct.setIfNotExistsIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.needResult = iprot.readBool(); - struct.setNeedResultIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java deleted file mode 100644 index 0dfed78..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java +++ /dev/null @@ -1,447 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class AddPartitionsResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddPartitionsResult"); - - private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AddPartitionsResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AddPartitionsResultTupleSchemeFactory()); - } - - private List partitions; // 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 { - PARTITIONS((short)1, "partitions"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PARTITIONS - return PARTITIONS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.PARTITIONS}; - 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); - tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddPartitionsResult.class, metaDataMap); - } - - public AddPartitionsResult() { - } - - /** - * Performs a deep copy on other. - */ - public AddPartitionsResult(AddPartitionsResult other) { - if (other.isSetPartitions()) { - List __this__partitions = new ArrayList(other.partitions.size()); - for (Partition other_element : other.partitions) { - __this__partitions.add(new Partition(other_element)); - } - this.partitions = __this__partitions; - } - } - - public AddPartitionsResult deepCopy() { - return new AddPartitionsResult(this); - } - - @Override - public void clear() { - this.partitions = null; - } - - public int getPartitionsSize() { - return (this.partitions == null) ? 0 : this.partitions.size(); - } - - public java.util.Iterator getPartitionsIterator() { - return (this.partitions == null) ? null : this.partitions.iterator(); - } - - public void addToPartitions(Partition elem) { - if (this.partitions == null) { - this.partitions = new ArrayList(); - } - this.partitions.add(elem); - } - - public List getPartitions() { - return this.partitions; - } - - public void setPartitions(List partitions) { - this.partitions = partitions; - } - - public void unsetPartitions() { - this.partitions = null; - } - - /** Returns true if field partitions is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitions() { - return this.partitions != null; - } - - public void setPartitionsIsSet(boolean value) { - if (!value) { - this.partitions = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PARTITIONS: - if (value == null) { - unsetPartitions(); - } else { - setPartitions((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PARTITIONS: - return getPartitions(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PARTITIONS: - return isSetPartitions(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AddPartitionsResult) - return this.equals((AddPartitionsResult)that); - return false; - } - - public boolean equals(AddPartitionsResult that) { - if (that == null) - return false; - - boolean this_present_partitions = true && this.isSetPartitions(); - boolean that_present_partitions = true && that.isSetPartitions(); - if (this_present_partitions || that_present_partitions) { - if (!(this_present_partitions && that_present_partitions)) - return false; - if (!this.partitions.equals(that.partitions)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_partitions = true && (isSetPartitions()); - list.add(present_partitions); - if (present_partitions) - list.add(partitions); - - return list.hashCode(); - } - - @Override - public int compareTo(AddPartitionsResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPartitions()).compareTo(other.isSetPartitions()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitions()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("AddPartitionsResult("); - boolean first = true; - - if (isSetPartitions()) { - sb.append("partitions:"); - if (this.partitions == null) { - sb.append("null"); - } else { - sb.append(this.partitions); - } - 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 AddPartitionsResultStandardSchemeFactory implements SchemeFactory { - public AddPartitionsResultStandardScheme getScheme() { - return new AddPartitionsResultStandardScheme(); - } - } - - private static class AddPartitionsResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, AddPartitionsResult 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: // PARTITIONS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list444 = iprot.readListBegin(); - struct.partitions = new ArrayList(_list444.size); - Partition _elem445; - for (int _i446 = 0; _i446 < _list444.size; ++_i446) - { - _elem445 = new Partition(); - _elem445.read(iprot); - struct.partitions.add(_elem445); - } - iprot.readListEnd(); - } - struct.setPartitionsIsSet(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, AddPartitionsResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.partitions != null) { - if (struct.isSetPartitions()) { - oprot.writeFieldBegin(PARTITIONS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size())); - for (Partition _iter447 : struct.partitions) - { - _iter447.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AddPartitionsResultTupleSchemeFactory implements SchemeFactory { - public AddPartitionsResultTupleScheme getScheme() { - return new AddPartitionsResultTupleScheme(); - } - } - - private static class AddPartitionsResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AddPartitionsResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPartitions()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetPartitions()) { - { - oprot.writeI32(struct.partitions.size()); - for (Partition _iter448 : struct.partitions) - { - _iter448.write(oprot); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AddPartitionsResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list449 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.partitions = new ArrayList(_list449.size); - Partition _elem450; - for (int _i451 = 0; _i451 < _list449.size; ++_i451) - { - _elem450 = new Partition(); - _elem450.read(iprot); - struct.partitions.add(_elem450); - } - } - struct.setPartitionsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPrimaryKeyRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPrimaryKeyRequest.java deleted file mode 100644 index 55e606d..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPrimaryKeyRequest.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class AddPrimaryKeyRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddPrimaryKeyRequest"); - - private static final org.apache.thrift.protocol.TField PRIMARY_KEY_COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("primaryKeyCols", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AddPrimaryKeyRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AddPrimaryKeyRequestTupleSchemeFactory()); - } - - private List primaryKeyCols; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PRIMARY_KEY_COLS((short)1, "primaryKeyCols"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PRIMARY_KEY_COLS - return PRIMARY_KEY_COLS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PRIMARY_KEY_COLS, new org.apache.thrift.meta_data.FieldMetaData("primaryKeyCols", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLPrimaryKey.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddPrimaryKeyRequest.class, metaDataMap); - } - - public AddPrimaryKeyRequest() { - } - - public AddPrimaryKeyRequest( - List primaryKeyCols) - { - this(); - this.primaryKeyCols = primaryKeyCols; - } - - /** - * Performs a deep copy on other. - */ - public AddPrimaryKeyRequest(AddPrimaryKeyRequest other) { - if (other.isSetPrimaryKeyCols()) { - List __this__primaryKeyCols = new ArrayList(other.primaryKeyCols.size()); - for (SQLPrimaryKey other_element : other.primaryKeyCols) { - __this__primaryKeyCols.add(new SQLPrimaryKey(other_element)); - } - this.primaryKeyCols = __this__primaryKeyCols; - } - } - - public AddPrimaryKeyRequest deepCopy() { - return new AddPrimaryKeyRequest(this); - } - - @Override - public void clear() { - this.primaryKeyCols = null; - } - - public int getPrimaryKeyColsSize() { - return (this.primaryKeyCols == null) ? 0 : this.primaryKeyCols.size(); - } - - public java.util.Iterator getPrimaryKeyColsIterator() { - return (this.primaryKeyCols == null) ? null : this.primaryKeyCols.iterator(); - } - - public void addToPrimaryKeyCols(SQLPrimaryKey elem) { - if (this.primaryKeyCols == null) { - this.primaryKeyCols = new ArrayList(); - } - this.primaryKeyCols.add(elem); - } - - public List getPrimaryKeyCols() { - return this.primaryKeyCols; - } - - public void setPrimaryKeyCols(List primaryKeyCols) { - this.primaryKeyCols = primaryKeyCols; - } - - public void unsetPrimaryKeyCols() { - this.primaryKeyCols = null; - } - - /** Returns true if field primaryKeyCols is set (has been assigned a value) and false otherwise */ - public boolean isSetPrimaryKeyCols() { - return this.primaryKeyCols != null; - } - - public void setPrimaryKeyColsIsSet(boolean value) { - if (!value) { - this.primaryKeyCols = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PRIMARY_KEY_COLS: - if (value == null) { - unsetPrimaryKeyCols(); - } else { - setPrimaryKeyCols((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PRIMARY_KEY_COLS: - return getPrimaryKeyCols(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PRIMARY_KEY_COLS: - return isSetPrimaryKeyCols(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AddPrimaryKeyRequest) - return this.equals((AddPrimaryKeyRequest)that); - return false; - } - - public boolean equals(AddPrimaryKeyRequest that) { - if (that == null) - return false; - - boolean this_present_primaryKeyCols = true && this.isSetPrimaryKeyCols(); - boolean that_present_primaryKeyCols = true && that.isSetPrimaryKeyCols(); - if (this_present_primaryKeyCols || that_present_primaryKeyCols) { - if (!(this_present_primaryKeyCols && that_present_primaryKeyCols)) - return false; - if (!this.primaryKeyCols.equals(that.primaryKeyCols)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_primaryKeyCols = true && (isSetPrimaryKeyCols()); - list.add(present_primaryKeyCols); - if (present_primaryKeyCols) - list.add(primaryKeyCols); - - return list.hashCode(); - } - - @Override - public int compareTo(AddPrimaryKeyRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPrimaryKeyCols()).compareTo(other.isSetPrimaryKeyCols()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrimaryKeyCols()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.primaryKeyCols, other.primaryKeyCols); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("AddPrimaryKeyRequest("); - boolean first = true; - - sb.append("primaryKeyCols:"); - if (this.primaryKeyCols == null) { - sb.append("null"); - } else { - sb.append(this.primaryKeyCols); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetPrimaryKeyCols()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'primaryKeyCols' is unset! Struct:" + toString()); - } - - // 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 AddPrimaryKeyRequestStandardSchemeFactory implements SchemeFactory { - public AddPrimaryKeyRequestStandardScheme getScheme() { - return new AddPrimaryKeyRequestStandardScheme(); - } - } - - private static class AddPrimaryKeyRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, AddPrimaryKeyRequest 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: // PRIMARY_KEY_COLS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list354 = iprot.readListBegin(); - struct.primaryKeyCols = new ArrayList(_list354.size); - SQLPrimaryKey _elem355; - for (int _i356 = 0; _i356 < _list354.size; ++_i356) - { - _elem355 = new SQLPrimaryKey(); - _elem355.read(iprot); - struct.primaryKeyCols.add(_elem355); - } - iprot.readListEnd(); - } - struct.setPrimaryKeyColsIsSet(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, AddPrimaryKeyRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.primaryKeyCols != null) { - oprot.writeFieldBegin(PRIMARY_KEY_COLS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.primaryKeyCols.size())); - for (SQLPrimaryKey _iter357 : struct.primaryKeyCols) - { - _iter357.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AddPrimaryKeyRequestTupleSchemeFactory implements SchemeFactory { - public AddPrimaryKeyRequestTupleScheme getScheme() { - return new AddPrimaryKeyRequestTupleScheme(); - } - } - - private static class AddPrimaryKeyRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AddPrimaryKeyRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.primaryKeyCols.size()); - for (SQLPrimaryKey _iter358 : struct.primaryKeyCols) - { - _iter358.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AddPrimaryKeyRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list359 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.primaryKeyCols = new ArrayList(_list359.size); - SQLPrimaryKey _elem360; - for (int _i361 = 0; _i361 < _list359.size; ++_i361) - { - _elem360 = new SQLPrimaryKey(); - _elem360.read(iprot); - struct.primaryKeyCols.add(_elem360); - } - } - struct.setPrimaryKeyColsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddUniqueConstraintRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddUniqueConstraintRequest.java deleted file mode 100644 index 71d1451..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddUniqueConstraintRequest.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class AddUniqueConstraintRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddUniqueConstraintRequest"); - - private static final org.apache.thrift.protocol.TField UNIQUE_CONSTRAINT_COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("uniqueConstraintCols", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AddUniqueConstraintRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AddUniqueConstraintRequestTupleSchemeFactory()); - } - - private List uniqueConstraintCols; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - UNIQUE_CONSTRAINT_COLS((short)1, "uniqueConstraintCols"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // UNIQUE_CONSTRAINT_COLS - return UNIQUE_CONSTRAINT_COLS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.UNIQUE_CONSTRAINT_COLS, new org.apache.thrift.meta_data.FieldMetaData("uniqueConstraintCols", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLUniqueConstraint.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddUniqueConstraintRequest.class, metaDataMap); - } - - public AddUniqueConstraintRequest() { - } - - public AddUniqueConstraintRequest( - List uniqueConstraintCols) - { - this(); - this.uniqueConstraintCols = uniqueConstraintCols; - } - - /** - * Performs a deep copy on other. - */ - public AddUniqueConstraintRequest(AddUniqueConstraintRequest other) { - if (other.isSetUniqueConstraintCols()) { - List __this__uniqueConstraintCols = new ArrayList(other.uniqueConstraintCols.size()); - for (SQLUniqueConstraint other_element : other.uniqueConstraintCols) { - __this__uniqueConstraintCols.add(new SQLUniqueConstraint(other_element)); - } - this.uniqueConstraintCols = __this__uniqueConstraintCols; - } - } - - public AddUniqueConstraintRequest deepCopy() { - return new AddUniqueConstraintRequest(this); - } - - @Override - public void clear() { - this.uniqueConstraintCols = null; - } - - public int getUniqueConstraintColsSize() { - return (this.uniqueConstraintCols == null) ? 0 : this.uniqueConstraintCols.size(); - } - - public java.util.Iterator getUniqueConstraintColsIterator() { - return (this.uniqueConstraintCols == null) ? null : this.uniqueConstraintCols.iterator(); - } - - public void addToUniqueConstraintCols(SQLUniqueConstraint elem) { - if (this.uniqueConstraintCols == null) { - this.uniqueConstraintCols = new ArrayList(); - } - this.uniqueConstraintCols.add(elem); - } - - public List getUniqueConstraintCols() { - return this.uniqueConstraintCols; - } - - public void setUniqueConstraintCols(List uniqueConstraintCols) { - this.uniqueConstraintCols = uniqueConstraintCols; - } - - public void unsetUniqueConstraintCols() { - this.uniqueConstraintCols = null; - } - - /** Returns true if field uniqueConstraintCols is set (has been assigned a value) and false otherwise */ - public boolean isSetUniqueConstraintCols() { - return this.uniqueConstraintCols != null; - } - - public void setUniqueConstraintColsIsSet(boolean value) { - if (!value) { - this.uniqueConstraintCols = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case UNIQUE_CONSTRAINT_COLS: - if (value == null) { - unsetUniqueConstraintCols(); - } else { - setUniqueConstraintCols((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case UNIQUE_CONSTRAINT_COLS: - return getUniqueConstraintCols(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case UNIQUE_CONSTRAINT_COLS: - return isSetUniqueConstraintCols(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AddUniqueConstraintRequest) - return this.equals((AddUniqueConstraintRequest)that); - return false; - } - - public boolean equals(AddUniqueConstraintRequest that) { - if (that == null) - return false; - - boolean this_present_uniqueConstraintCols = true && this.isSetUniqueConstraintCols(); - boolean that_present_uniqueConstraintCols = true && that.isSetUniqueConstraintCols(); - if (this_present_uniqueConstraintCols || that_present_uniqueConstraintCols) { - if (!(this_present_uniqueConstraintCols && that_present_uniqueConstraintCols)) - return false; - if (!this.uniqueConstraintCols.equals(that.uniqueConstraintCols)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_uniqueConstraintCols = true && (isSetUniqueConstraintCols()); - list.add(present_uniqueConstraintCols); - if (present_uniqueConstraintCols) - list.add(uniqueConstraintCols); - - return list.hashCode(); - } - - @Override - public int compareTo(AddUniqueConstraintRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetUniqueConstraintCols()).compareTo(other.isSetUniqueConstraintCols()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUniqueConstraintCols()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uniqueConstraintCols, other.uniqueConstraintCols); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("AddUniqueConstraintRequest("); - boolean first = true; - - sb.append("uniqueConstraintCols:"); - if (this.uniqueConstraintCols == null) { - sb.append("null"); - } else { - sb.append(this.uniqueConstraintCols); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetUniqueConstraintCols()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'uniqueConstraintCols' is unset! Struct:" + toString()); - } - - // 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 AddUniqueConstraintRequestStandardSchemeFactory implements SchemeFactory { - public AddUniqueConstraintRequestStandardScheme getScheme() { - return new AddUniqueConstraintRequestStandardScheme(); - } - } - - private static class AddUniqueConstraintRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, AddUniqueConstraintRequest 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: // UNIQUE_CONSTRAINT_COLS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list370 = iprot.readListBegin(); - struct.uniqueConstraintCols = new ArrayList(_list370.size); - SQLUniqueConstraint _elem371; - for (int _i372 = 0; _i372 < _list370.size; ++_i372) - { - _elem371 = new SQLUniqueConstraint(); - _elem371.read(iprot); - struct.uniqueConstraintCols.add(_elem371); - } - iprot.readListEnd(); - } - struct.setUniqueConstraintColsIsSet(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, AddUniqueConstraintRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.uniqueConstraintCols != null) { - oprot.writeFieldBegin(UNIQUE_CONSTRAINT_COLS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.uniqueConstraintCols.size())); - for (SQLUniqueConstraint _iter373 : struct.uniqueConstraintCols) - { - _iter373.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AddUniqueConstraintRequestTupleSchemeFactory implements SchemeFactory { - public AddUniqueConstraintRequestTupleScheme getScheme() { - return new AddUniqueConstraintRequestTupleScheme(); - } - } - - private static class AddUniqueConstraintRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AddUniqueConstraintRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.uniqueConstraintCols.size()); - for (SQLUniqueConstraint _iter374 : struct.uniqueConstraintCols) - { - _iter374.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AddUniqueConstraintRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list375 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.uniqueConstraintCols = new ArrayList(_list375.size); - SQLUniqueConstraint _elem376; - for (int _i377 = 0; _i377 < _list375.size; ++_i377) - { - _elem376 = new SQLUniqueConstraint(); - _elem376.read(iprot); - struct.uniqueConstraintCols.add(_elem376); - } - } - struct.setUniqueConstraintColsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AggrStats.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AggrStats.java deleted file mode 100644 index bfd1206..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AggrStats.java +++ /dev/null @@ -1,542 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class AggrStats implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AggrStats"); - - private static final org.apache.thrift.protocol.TField COL_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("colStats", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField PARTS_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("partsFound", org.apache.thrift.protocol.TType.I64, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AggrStatsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AggrStatsTupleSchemeFactory()); - } - - private List colStats; // required - private long partsFound; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - COL_STATS((short)1, "colStats"), - PARTS_FOUND((short)2, "partsFound"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // COL_STATS - return COL_STATS; - case 2: // PARTS_FOUND - return PARTS_FOUND; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __PARTSFOUND_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.COL_STATS, new org.apache.thrift.meta_data.FieldMetaData("colStats", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsObj.class)))); - tmpMap.put(_Fields.PARTS_FOUND, new org.apache.thrift.meta_data.FieldMetaData("partsFound", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AggrStats.class, metaDataMap); - } - - public AggrStats() { - } - - public AggrStats( - List colStats, - long partsFound) - { - this(); - this.colStats = colStats; - this.partsFound = partsFound; - setPartsFoundIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public AggrStats(AggrStats other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetColStats()) { - List __this__colStats = new ArrayList(other.colStats.size()); - for (ColumnStatisticsObj other_element : other.colStats) { - __this__colStats.add(new ColumnStatisticsObj(other_element)); - } - this.colStats = __this__colStats; - } - this.partsFound = other.partsFound; - } - - public AggrStats deepCopy() { - return new AggrStats(this); - } - - @Override - public void clear() { - this.colStats = null; - setPartsFoundIsSet(false); - this.partsFound = 0; - } - - public int getColStatsSize() { - return (this.colStats == null) ? 0 : this.colStats.size(); - } - - public java.util.Iterator getColStatsIterator() { - return (this.colStats == null) ? null : this.colStats.iterator(); - } - - public void addToColStats(ColumnStatisticsObj elem) { - if (this.colStats == null) { - this.colStats = new ArrayList(); - } - this.colStats.add(elem); - } - - public List getColStats() { - return this.colStats; - } - - public void setColStats(List colStats) { - this.colStats = colStats; - } - - public void unsetColStats() { - this.colStats = null; - } - - /** Returns true if field colStats is set (has been assigned a value) and false otherwise */ - public boolean isSetColStats() { - return this.colStats != null; - } - - public void setColStatsIsSet(boolean value) { - if (!value) { - this.colStats = null; - } - } - - public long getPartsFound() { - return this.partsFound; - } - - public void setPartsFound(long partsFound) { - this.partsFound = partsFound; - setPartsFoundIsSet(true); - } - - public void unsetPartsFound() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARTSFOUND_ISSET_ID); - } - - /** Returns true if field partsFound is set (has been assigned a value) and false otherwise */ - public boolean isSetPartsFound() { - return EncodingUtils.testBit(__isset_bitfield, __PARTSFOUND_ISSET_ID); - } - - public void setPartsFoundIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARTSFOUND_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case COL_STATS: - if (value == null) { - unsetColStats(); - } else { - setColStats((List)value); - } - break; - - case PARTS_FOUND: - if (value == null) { - unsetPartsFound(); - } else { - setPartsFound((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case COL_STATS: - return getColStats(); - - case PARTS_FOUND: - return getPartsFound(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case COL_STATS: - return isSetColStats(); - case PARTS_FOUND: - return isSetPartsFound(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AggrStats) - return this.equals((AggrStats)that); - return false; - } - - public boolean equals(AggrStats that) { - if (that == null) - return false; - - boolean this_present_colStats = true && this.isSetColStats(); - boolean that_present_colStats = true && that.isSetColStats(); - if (this_present_colStats || that_present_colStats) { - if (!(this_present_colStats && that_present_colStats)) - return false; - if (!this.colStats.equals(that.colStats)) - return false; - } - - boolean this_present_partsFound = true; - boolean that_present_partsFound = true; - if (this_present_partsFound || that_present_partsFound) { - if (!(this_present_partsFound && that_present_partsFound)) - return false; - if (this.partsFound != that.partsFound) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_colStats = true && (isSetColStats()); - list.add(present_colStats); - if (present_colStats) - list.add(colStats); - - boolean present_partsFound = true; - list.add(present_partsFound); - if (present_partsFound) - list.add(partsFound); - - return list.hashCode(); - } - - @Override - public int compareTo(AggrStats other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetColStats()).compareTo(other.isSetColStats()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColStats()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colStats, other.colStats); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartsFound()).compareTo(other.isSetPartsFound()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartsFound()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partsFound, other.partsFound); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("AggrStats("); - boolean first = true; - - sb.append("colStats:"); - if (this.colStats == null) { - sb.append("null"); - } else { - sb.append(this.colStats); - } - first = false; - if (!first) sb.append(", "); - sb.append("partsFound:"); - sb.append(this.partsFound); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetColStats()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'colStats' is unset! Struct:" + toString()); - } - - if (!isSetPartsFound()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'partsFound' is unset! Struct:" + toString()); - } - - // 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 { - // 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 AggrStatsStandardSchemeFactory implements SchemeFactory { - public AggrStatsStandardScheme getScheme() { - return new AggrStatsStandardScheme(); - } - } - - private static class AggrStatsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, AggrStats 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_STATS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list278 = iprot.readListBegin(); - struct.colStats = new ArrayList(_list278.size); - ColumnStatisticsObj _elem279; - for (int _i280 = 0; _i280 < _list278.size; ++_i280) - { - _elem279 = new ColumnStatisticsObj(); - _elem279.read(iprot); - struct.colStats.add(_elem279); - } - iprot.readListEnd(); - } - struct.setColStatsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PARTS_FOUND - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.partsFound = iprot.readI64(); - struct.setPartsFoundIsSet(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, AggrStats struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.colStats != null) { - oprot.writeFieldBegin(COL_STATS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.colStats.size())); - for (ColumnStatisticsObj _iter281 : struct.colStats) - { - _iter281.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(PARTS_FOUND_FIELD_DESC); - oprot.writeI64(struct.partsFound); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AggrStatsTupleSchemeFactory implements SchemeFactory { - public AggrStatsTupleScheme getScheme() { - return new AggrStatsTupleScheme(); - } - } - - private static class AggrStatsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AggrStats struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.colStats.size()); - for (ColumnStatisticsObj _iter282 : struct.colStats) - { - _iter282.write(oprot); - } - } - oprot.writeI64(struct.partsFound); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AggrStats struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list283 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.colStats = new ArrayList(_list283.size); - ColumnStatisticsObj _elem284; - for (int _i285 = 0; _i285 < _list283.size; ++_i285) - { - _elem284 = new ColumnStatisticsObj(); - _elem284.read(iprot); - struct.colStats.add(_elem284); - } - } - struct.setColStatsIsSet(true); - struct.partsFound = iprot.readI64(); - struct.setPartsFoundIsSet(true); - } - } - -} - diff --git 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 deleted file mode 100644 index 4032f19..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class AlreadyExistsException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AlreadyExistsException.class, metaDataMap); - } - - public AlreadyExistsException() { - } - - public AlreadyExistsException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public AlreadyExistsException(AlreadyExistsException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public AlreadyExistsException deepCopy() { - return new AlreadyExistsException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AlreadyExistsException) - return this.equals((AlreadyExistsException)that); - return false; - } - - public boolean equals(AlreadyExistsException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(AlreadyExistsException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("AlreadyExistsException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 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); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java deleted file mode 100644 index eeb5105..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java +++ /dev/null @@ -1,687 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class BinaryColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BinaryColumnStatsData"); - - private static final org.apache.thrift.protocol.TField MAX_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("maxColLen", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField AVG_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("avgColLen", org.apache.thrift.protocol.TType.DOUBLE, (short)2); - private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new BinaryColumnStatsDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new BinaryColumnStatsDataTupleSchemeFactory()); - } - - private long maxColLen; // required - private double avgColLen; // required - private long numNulls; // required - private String bitVectors; // 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 { - MAX_COL_LEN((short)1, "maxColLen"), - AVG_COL_LEN((short)2, "avgColLen"), - NUM_NULLS((short)3, "numNulls"), - BIT_VECTORS((short)4, "bitVectors"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MAX_COL_LEN - return MAX_COL_LEN; - case 2: // AVG_COL_LEN - return AVG_COL_LEN; - case 3: // NUM_NULLS - return NUM_NULLS; - case 4: // BIT_VECTORS - return BIT_VECTORS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAXCOLLEN_ISSET_ID = 0; - private static final int __AVGCOLLEN_ISSET_ID = 1; - private static final int __NUMNULLS_ISSET_ID = 2; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.BIT_VECTORS}; - 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); - tmpMap.put(_Fields.MAX_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("maxColLen", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.AVG_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("avgColLen", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); - tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BinaryColumnStatsData.class, metaDataMap); - } - - public BinaryColumnStatsData() { - } - - public BinaryColumnStatsData( - long maxColLen, - double avgColLen, - long numNulls) - { - this(); - this.maxColLen = maxColLen; - setMaxColLenIsSet(true); - this.avgColLen = avgColLen; - setAvgColLenIsSet(true); - this.numNulls = numNulls; - setNumNullsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public BinaryColumnStatsData(BinaryColumnStatsData other) { - __isset_bitfield = other.__isset_bitfield; - this.maxColLen = other.maxColLen; - this.avgColLen = other.avgColLen; - this.numNulls = other.numNulls; - if (other.isSetBitVectors()) { - this.bitVectors = other.bitVectors; - } - } - - public BinaryColumnStatsData deepCopy() { - return new BinaryColumnStatsData(this); - } - - @Override - public void clear() { - setMaxColLenIsSet(false); - this.maxColLen = 0; - setAvgColLenIsSet(false); - this.avgColLen = 0.0; - setNumNullsIsSet(false); - this.numNulls = 0; - this.bitVectors = null; - } - - public long getMaxColLen() { - return this.maxColLen; - } - - public void setMaxColLen(long maxColLen) { - this.maxColLen = maxColLen; - setMaxColLenIsSet(true); - } - - public void unsetMaxColLen() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID); - } - - /** Returns true if field maxColLen is set (has been assigned a value) and false otherwise */ - public boolean isSetMaxColLen() { - return EncodingUtils.testBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID); - } - - public void setMaxColLenIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID, value); - } - - public double getAvgColLen() { - return this.avgColLen; - } - - public void setAvgColLen(double avgColLen) { - this.avgColLen = avgColLen; - setAvgColLenIsSet(true); - } - - public void unsetAvgColLen() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID); - } - - /** Returns true if field avgColLen is set (has been assigned a value) and false otherwise */ - public boolean isSetAvgColLen() { - return EncodingUtils.testBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID); - } - - public void setAvgColLenIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID, value); - } - - public long getNumNulls() { - return this.numNulls; - } - - public void setNumNulls(long numNulls) { - this.numNulls = numNulls; - setNumNullsIsSet(true); - } - - public void unsetNumNulls() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ - public boolean isSetNumNulls() { - return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - public void setNumNullsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); - } - - public String getBitVectors() { - return this.bitVectors; - } - - public void setBitVectors(String bitVectors) { - this.bitVectors = bitVectors; - } - - public void unsetBitVectors() { - this.bitVectors = null; - } - - /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ - public boolean isSetBitVectors() { - return this.bitVectors != null; - } - - public void setBitVectorsIsSet(boolean value) { - if (!value) { - this.bitVectors = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MAX_COL_LEN: - if (value == null) { - unsetMaxColLen(); - } else { - setMaxColLen((Long)value); - } - break; - - case AVG_COL_LEN: - if (value == null) { - unsetAvgColLen(); - } else { - setAvgColLen((Double)value); - } - break; - - case NUM_NULLS: - if (value == null) { - unsetNumNulls(); - } else { - setNumNulls((Long)value); - } - break; - - case BIT_VECTORS: - if (value == null) { - unsetBitVectors(); - } else { - setBitVectors((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MAX_COL_LEN: - return getMaxColLen(); - - case AVG_COL_LEN: - return getAvgColLen(); - - case NUM_NULLS: - return getNumNulls(); - - case BIT_VECTORS: - return getBitVectors(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MAX_COL_LEN: - return isSetMaxColLen(); - case AVG_COL_LEN: - return isSetAvgColLen(); - case NUM_NULLS: - return isSetNumNulls(); - case BIT_VECTORS: - return isSetBitVectors(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof BinaryColumnStatsData) - return this.equals((BinaryColumnStatsData)that); - return false; - } - - public boolean equals(BinaryColumnStatsData that) { - if (that == null) - return false; - - boolean this_present_maxColLen = true; - boolean that_present_maxColLen = true; - if (this_present_maxColLen || that_present_maxColLen) { - if (!(this_present_maxColLen && that_present_maxColLen)) - return false; - if (this.maxColLen != that.maxColLen) - return false; - } - - boolean this_present_avgColLen = true; - boolean that_present_avgColLen = true; - if (this_present_avgColLen || that_present_avgColLen) { - if (!(this_present_avgColLen && that_present_avgColLen)) - return false; - if (this.avgColLen != that.avgColLen) - return false; - } - - boolean this_present_numNulls = true; - boolean that_present_numNulls = true; - if (this_present_numNulls || that_present_numNulls) { - if (!(this_present_numNulls && that_present_numNulls)) - return false; - if (this.numNulls != that.numNulls) - return false; - } - - boolean this_present_bitVectors = true && this.isSetBitVectors(); - boolean that_present_bitVectors = true && that.isSetBitVectors(); - if (this_present_bitVectors || that_present_bitVectors) { - if (!(this_present_bitVectors && that_present_bitVectors)) - return false; - if (!this.bitVectors.equals(that.bitVectors)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_maxColLen = true; - list.add(present_maxColLen); - if (present_maxColLen) - list.add(maxColLen); - - boolean present_avgColLen = true; - list.add(present_avgColLen); - if (present_avgColLen) - list.add(avgColLen); - - boolean present_numNulls = true; - list.add(present_numNulls); - if (present_numNulls) - list.add(numNulls); - - boolean present_bitVectors = true && (isSetBitVectors()); - list.add(present_bitVectors); - if (present_bitVectors) - list.add(bitVectors); - - return list.hashCode(); - } - - @Override - public int compareTo(BinaryColumnStatsData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMaxColLen()).compareTo(other.isSetMaxColLen()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMaxColLen()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxColLen, other.maxColLen); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAvgColLen()).compareTo(other.isSetAvgColLen()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAvgColLen()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.avgColLen, other.avgColLen); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBitVectors()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("BinaryColumnStatsData("); - boolean first = true; - - sb.append("maxColLen:"); - sb.append(this.maxColLen); - first = false; - if (!first) sb.append(", "); - sb.append("avgColLen:"); - sb.append(this.avgColLen); - first = false; - if (!first) sb.append(", "); - sb.append("numNulls:"); - sb.append(this.numNulls); - first = false; - if (isSetBitVectors()) { - if (!first) sb.append(", "); - sb.append("bitVectors:"); - if (this.bitVectors == null) { - sb.append("null"); - } else { - sb.append(this.bitVectors); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetMaxColLen()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxColLen' is unset! Struct:" + toString()); - } - - if (!isSetAvgColLen()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'avgColLen' is unset! Struct:" + toString()); - } - - if (!isSetNumNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); - } - - // 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 { - // 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 BinaryColumnStatsDataStandardSchemeFactory implements SchemeFactory { - public BinaryColumnStatsDataStandardScheme getScheme() { - return new BinaryColumnStatsDataStandardScheme(); - } - } - - private static class BinaryColumnStatsDataStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, BinaryColumnStatsData 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: // MAX_COL_LEN - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.maxColLen = iprot.readI64(); - struct.setMaxColLenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // AVG_COL_LEN - if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { - struct.avgColLen = iprot.readDouble(); - struct.setAvgColLenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NUM_NULLS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // BIT_VECTORS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(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, BinaryColumnStatsData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(MAX_COL_LEN_FIELD_DESC); - oprot.writeI64(struct.maxColLen); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(AVG_COL_LEN_FIELD_DESC); - oprot.writeDouble(struct.avgColLen); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); - oprot.writeI64(struct.numNulls); - oprot.writeFieldEnd(); - if (struct.bitVectors != null) { - if (struct.isSetBitVectors()) { - oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); - oprot.writeString(struct.bitVectors); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class BinaryColumnStatsDataTupleSchemeFactory implements SchemeFactory { - public BinaryColumnStatsDataTupleScheme getScheme() { - return new BinaryColumnStatsDataTupleScheme(); - } - } - - private static class BinaryColumnStatsDataTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, BinaryColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.maxColLen); - oprot.writeDouble(struct.avgColLen); - oprot.writeI64(struct.numNulls); - BitSet optionals = new BitSet(); - if (struct.isSetBitVectors()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetBitVectors()) { - oprot.writeString(struct.bitVectors); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, BinaryColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.maxColLen = iprot.readI64(); - struct.setMaxColLenIsSet(true); - struct.avgColLen = iprot.readDouble(); - struct.setAvgColLenIsSet(true); - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java deleted file mode 100644 index de39d21..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java +++ /dev/null @@ -1,687 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class BooleanColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BooleanColumnStatsData"); - - private static final org.apache.thrift.protocol.TField NUM_TRUES_FIELD_DESC = new org.apache.thrift.protocol.TField("numTrues", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField NUM_FALSES_FIELD_DESC = new org.apache.thrift.protocol.TField("numFalses", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new BooleanColumnStatsDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new BooleanColumnStatsDataTupleSchemeFactory()); - } - - private long numTrues; // required - private long numFalses; // required - private long numNulls; // required - private String bitVectors; // 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 { - NUM_TRUES((short)1, "numTrues"), - NUM_FALSES((short)2, "numFalses"), - NUM_NULLS((short)3, "numNulls"), - BIT_VECTORS((short)4, "bitVectors"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NUM_TRUES - return NUM_TRUES; - case 2: // NUM_FALSES - return NUM_FALSES; - case 3: // NUM_NULLS - return NUM_NULLS; - case 4: // BIT_VECTORS - return BIT_VECTORS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __NUMTRUES_ISSET_ID = 0; - private static final int __NUMFALSES_ISSET_ID = 1; - private static final int __NUMNULLS_ISSET_ID = 2; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.BIT_VECTORS}; - 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); - tmpMap.put(_Fields.NUM_TRUES, new org.apache.thrift.meta_data.FieldMetaData("numTrues", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NUM_FALSES, new org.apache.thrift.meta_data.FieldMetaData("numFalses", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BooleanColumnStatsData.class, metaDataMap); - } - - public BooleanColumnStatsData() { - } - - public BooleanColumnStatsData( - long numTrues, - long numFalses, - long numNulls) - { - this(); - this.numTrues = numTrues; - setNumTruesIsSet(true); - this.numFalses = numFalses; - setNumFalsesIsSet(true); - this.numNulls = numNulls; - setNumNullsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public BooleanColumnStatsData(BooleanColumnStatsData other) { - __isset_bitfield = other.__isset_bitfield; - this.numTrues = other.numTrues; - this.numFalses = other.numFalses; - this.numNulls = other.numNulls; - if (other.isSetBitVectors()) { - this.bitVectors = other.bitVectors; - } - } - - public BooleanColumnStatsData deepCopy() { - return new BooleanColumnStatsData(this); - } - - @Override - public void clear() { - setNumTruesIsSet(false); - this.numTrues = 0; - setNumFalsesIsSet(false); - this.numFalses = 0; - setNumNullsIsSet(false); - this.numNulls = 0; - this.bitVectors = null; - } - - public long getNumTrues() { - return this.numTrues; - } - - public void setNumTrues(long numTrues) { - this.numTrues = numTrues; - setNumTruesIsSet(true); - } - - public void unsetNumTrues() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMTRUES_ISSET_ID); - } - - /** Returns true if field numTrues is set (has been assigned a value) and false otherwise */ - public boolean isSetNumTrues() { - return EncodingUtils.testBit(__isset_bitfield, __NUMTRUES_ISSET_ID); - } - - public void setNumTruesIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMTRUES_ISSET_ID, value); - } - - public long getNumFalses() { - return this.numFalses; - } - - public void setNumFalses(long numFalses) { - this.numFalses = numFalses; - setNumFalsesIsSet(true); - } - - public void unsetNumFalses() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMFALSES_ISSET_ID); - } - - /** Returns true if field numFalses is set (has been assigned a value) and false otherwise */ - public boolean isSetNumFalses() { - return EncodingUtils.testBit(__isset_bitfield, __NUMFALSES_ISSET_ID); - } - - public void setNumFalsesIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMFALSES_ISSET_ID, value); - } - - public long getNumNulls() { - return this.numNulls; - } - - public void setNumNulls(long numNulls) { - this.numNulls = numNulls; - setNumNullsIsSet(true); - } - - public void unsetNumNulls() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ - public boolean isSetNumNulls() { - return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - public void setNumNullsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); - } - - public String getBitVectors() { - return this.bitVectors; - } - - public void setBitVectors(String bitVectors) { - this.bitVectors = bitVectors; - } - - public void unsetBitVectors() { - this.bitVectors = null; - } - - /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ - public boolean isSetBitVectors() { - return this.bitVectors != null; - } - - public void setBitVectorsIsSet(boolean value) { - if (!value) { - this.bitVectors = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NUM_TRUES: - if (value == null) { - unsetNumTrues(); - } else { - setNumTrues((Long)value); - } - break; - - case NUM_FALSES: - if (value == null) { - unsetNumFalses(); - } else { - setNumFalses((Long)value); - } - break; - - case NUM_NULLS: - if (value == null) { - unsetNumNulls(); - } else { - setNumNulls((Long)value); - } - break; - - case BIT_VECTORS: - if (value == null) { - unsetBitVectors(); - } else { - setBitVectors((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NUM_TRUES: - return getNumTrues(); - - case NUM_FALSES: - return getNumFalses(); - - case NUM_NULLS: - return getNumNulls(); - - case BIT_VECTORS: - return getBitVectors(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NUM_TRUES: - return isSetNumTrues(); - case NUM_FALSES: - return isSetNumFalses(); - case NUM_NULLS: - return isSetNumNulls(); - case BIT_VECTORS: - return isSetBitVectors(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof BooleanColumnStatsData) - return this.equals((BooleanColumnStatsData)that); - return false; - } - - public boolean equals(BooleanColumnStatsData that) { - if (that == null) - return false; - - boolean this_present_numTrues = true; - boolean that_present_numTrues = true; - if (this_present_numTrues || that_present_numTrues) { - if (!(this_present_numTrues && that_present_numTrues)) - return false; - if (this.numTrues != that.numTrues) - return false; - } - - boolean this_present_numFalses = true; - boolean that_present_numFalses = true; - if (this_present_numFalses || that_present_numFalses) { - if (!(this_present_numFalses && that_present_numFalses)) - return false; - if (this.numFalses != that.numFalses) - return false; - } - - boolean this_present_numNulls = true; - boolean that_present_numNulls = true; - if (this_present_numNulls || that_present_numNulls) { - if (!(this_present_numNulls && that_present_numNulls)) - return false; - if (this.numNulls != that.numNulls) - return false; - } - - boolean this_present_bitVectors = true && this.isSetBitVectors(); - boolean that_present_bitVectors = true && that.isSetBitVectors(); - if (this_present_bitVectors || that_present_bitVectors) { - if (!(this_present_bitVectors && that_present_bitVectors)) - return false; - if (!this.bitVectors.equals(that.bitVectors)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_numTrues = true; - list.add(present_numTrues); - if (present_numTrues) - list.add(numTrues); - - boolean present_numFalses = true; - list.add(present_numFalses); - if (present_numFalses) - list.add(numFalses); - - boolean present_numNulls = true; - list.add(present_numNulls); - if (present_numNulls) - list.add(numNulls); - - boolean present_bitVectors = true && (isSetBitVectors()); - list.add(present_bitVectors); - if (present_bitVectors) - list.add(bitVectors); - - return list.hashCode(); - } - - @Override - public int compareTo(BooleanColumnStatsData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetNumTrues()).compareTo(other.isSetNumTrues()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumTrues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numTrues, other.numTrues); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumFalses()).compareTo(other.isSetNumFalses()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumFalses()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numFalses, other.numFalses); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBitVectors()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("BooleanColumnStatsData("); - boolean first = true; - - sb.append("numTrues:"); - sb.append(this.numTrues); - first = false; - if (!first) sb.append(", "); - sb.append("numFalses:"); - sb.append(this.numFalses); - first = false; - if (!first) sb.append(", "); - sb.append("numNulls:"); - sb.append(this.numNulls); - first = false; - if (isSetBitVectors()) { - if (!first) sb.append(", "); - sb.append("bitVectors:"); - if (this.bitVectors == null) { - sb.append("null"); - } else { - sb.append(this.bitVectors); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetNumTrues()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numTrues' is unset! Struct:" + toString()); - } - - if (!isSetNumFalses()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numFalses' is unset! Struct:" + toString()); - } - - if (!isSetNumNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); - } - - // 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 { - // 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 BooleanColumnStatsDataStandardSchemeFactory implements SchemeFactory { - public BooleanColumnStatsDataStandardScheme getScheme() { - return new BooleanColumnStatsDataStandardScheme(); - } - } - - private static class BooleanColumnStatsDataStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, BooleanColumnStatsData 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_TRUES - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numTrues = iprot.readI64(); - struct.setNumTruesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // NUM_FALSES - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numFalses = iprot.readI64(); - struct.setNumFalsesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NUM_NULLS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // BIT_VECTORS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(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, BooleanColumnStatsData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(NUM_TRUES_FIELD_DESC); - oprot.writeI64(struct.numTrues); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_FALSES_FIELD_DESC); - oprot.writeI64(struct.numFalses); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); - oprot.writeI64(struct.numNulls); - oprot.writeFieldEnd(); - if (struct.bitVectors != null) { - if (struct.isSetBitVectors()) { - oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); - oprot.writeString(struct.bitVectors); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class BooleanColumnStatsDataTupleSchemeFactory implements SchemeFactory { - public BooleanColumnStatsDataTupleScheme getScheme() { - return new BooleanColumnStatsDataTupleScheme(); - } - } - - private static class BooleanColumnStatsDataTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, BooleanColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.numTrues); - oprot.writeI64(struct.numFalses); - oprot.writeI64(struct.numNulls); - BitSet optionals = new BitSet(); - if (struct.isSetBitVectors()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetBitVectors()) { - oprot.writeString(struct.bitVectors); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, BooleanColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.numTrues = iprot.readI64(); - struct.setNumTruesIsSet(true); - struct.numFalses = iprot.readI64(); - struct.setNumFalsesIsSet(true); - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataRequest.java deleted file mode 100644 index a008acc..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataRequest.java +++ /dev/null @@ -1,703 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class CacheFileMetadataRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CacheFileMetadataRequest"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", 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("partName", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField IS_ALL_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("isAllParts", org.apache.thrift.protocol.TType.BOOL, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CacheFileMetadataRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CacheFileMetadataRequestTupleSchemeFactory()); - } - - private String dbName; // required - private String tblName; // required - private String partName; // optional - private boolean isAllParts; // 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 { - DB_NAME((short)1, "dbName"), - TBL_NAME((short)2, "tblName"), - PART_NAME((short)3, "partName"), - IS_ALL_PARTS((short)4, "isAllParts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_NAME - return PART_NAME; - case 4: // IS_ALL_PARTS - return IS_ALL_PARTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ISALLPARTS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.PART_NAME,_Fields.IS_ALL_PARTS}; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("partName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IS_ALL_PARTS, new org.apache.thrift.meta_data.FieldMetaData("isAllParts", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CacheFileMetadataRequest.class, metaDataMap); - } - - public CacheFileMetadataRequest() { - } - - public CacheFileMetadataRequest( - String dbName, - String tblName) - { - this(); - this.dbName = dbName; - this.tblName = tblName; - } - - /** - * Performs a deep copy on other. - */ - public CacheFileMetadataRequest(CacheFileMetadataRequest other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTblName()) { - this.tblName = other.tblName; - } - if (other.isSetPartName()) { - this.partName = other.partName; - } - this.isAllParts = other.isAllParts; - } - - public CacheFileMetadataRequest deepCopy() { - return new CacheFileMetadataRequest(this); - } - - @Override - public void clear() { - this.dbName = null; - this.tblName = null; - this.partName = null; - setIsAllPartsIsSet(false); - this.isAllParts = false; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTblName() { - return this.tblName; - } - - public void setTblName(String tblName) { - this.tblName = tblName; - } - - public void unsetTblName() { - this.tblName = null; - } - - /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ - public boolean isSetTblName() { - return this.tblName != null; - } - - public void setTblNameIsSet(boolean value) { - if (!value) { - this.tblName = null; - } - } - - public String getPartName() { - return this.partName; - } - - public void setPartName(String partName) { - this.partName = partName; - } - - public void unsetPartName() { - this.partName = null; - } - - /** Returns true if field partName is set (has been assigned a value) and false otherwise */ - public boolean isSetPartName() { - return this.partName != null; - } - - public void setPartNameIsSet(boolean value) { - if (!value) { - this.partName = null; - } - } - - public boolean isIsAllParts() { - return this.isAllParts; - } - - public void setIsAllParts(boolean isAllParts) { - this.isAllParts = isAllParts; - setIsAllPartsIsSet(true); - } - - public void unsetIsAllParts() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISALLPARTS_ISSET_ID); - } - - /** Returns true if field isAllParts is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAllParts() { - return EncodingUtils.testBit(__isset_bitfield, __ISALLPARTS_ISSET_ID); - } - - public void setIsAllPartsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISALLPARTS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTblName(); - } else { - setTblName((String)value); - } - break; - - case PART_NAME: - if (value == null) { - unsetPartName(); - } else { - setPartName((String)value); - } - break; - - case IS_ALL_PARTS: - if (value == null) { - unsetIsAllParts(); - } else { - setIsAllParts((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case TBL_NAME: - return getTblName(); - - case PART_NAME: - return getPartName(); - - case IS_ALL_PARTS: - return isIsAllParts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case TBL_NAME: - return isSetTblName(); - case PART_NAME: - return isSetPartName(); - case IS_ALL_PARTS: - return isSetIsAllParts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CacheFileMetadataRequest) - return this.equals((CacheFileMetadataRequest)that); - return false; - } - - public boolean equals(CacheFileMetadataRequest that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tblName = true && this.isSetTblName(); - boolean that_present_tblName = true && that.isSetTblName(); - if (this_present_tblName || that_present_tblName) { - if (!(this_present_tblName && that_present_tblName)) - return false; - if (!this.tblName.equals(that.tblName)) - return false; - } - - boolean this_present_partName = true && this.isSetPartName(); - boolean that_present_partName = true && that.isSetPartName(); - if (this_present_partName || that_present_partName) { - if (!(this_present_partName && that_present_partName)) - return false; - if (!this.partName.equals(that.partName)) - return false; - } - - boolean this_present_isAllParts = true && this.isSetIsAllParts(); - boolean that_present_isAllParts = true && that.isSetIsAllParts(); - if (this_present_isAllParts || that_present_isAllParts) { - if (!(this_present_isAllParts && that_present_isAllParts)) - return false; - if (this.isAllParts != that.isAllParts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tblName = true && (isSetTblName()); - list.add(present_tblName); - if (present_tblName) - list.add(tblName); - - boolean present_partName = true && (isSetPartName()); - list.add(present_partName); - if (present_partName) - list.add(partName); - - boolean present_isAllParts = true && (isSetIsAllParts()); - list.add(present_isAllParts); - if (present_isAllParts) - list.add(isAllParts); - - return list.hashCode(); - } - - @Override - public int compareTo(CacheFileMetadataRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTblName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartName()).compareTo(other.isSetPartName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partName, other.partName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsAllParts()).compareTo(other.isSetIsAllParts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAllParts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAllParts, other.isAllParts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("CacheFileMetadataRequest("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tblName:"); - if (this.tblName == null) { - sb.append("null"); - } else { - sb.append(this.tblName); - } - first = false; - if (isSetPartName()) { - if (!first) sb.append(", "); - sb.append("partName:"); - if (this.partName == null) { - sb.append("null"); - } else { - sb.append(this.partName); - } - first = false; - } - if (isSetIsAllParts()) { - if (!first) sb.append(", "); - sb.append("isAllParts:"); - sb.append(this.isAllParts); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDbName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); - } - - if (!isSetTblName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); - } - - // 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 { - // 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 CacheFileMetadataRequestStandardSchemeFactory implements SchemeFactory { - public CacheFileMetadataRequestStandardScheme getScheme() { - return new CacheFileMetadataRequestStandardScheme(); - } - } - - private static class CacheFileMetadataRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CacheFileMetadataRequest 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.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.tblName = iprot.readString(); - struct.setTblNameIsSet(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.partName = iprot.readString(); - struct.setPartNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // IS_ALL_PARTS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAllParts = iprot.readBool(); - struct.setIsAllPartsIsSet(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, CacheFileMetadataRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - if (struct.tblName != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(struct.tblName); - oprot.writeFieldEnd(); - } - if (struct.partName != null) { - if (struct.isSetPartName()) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(struct.partName); - oprot.writeFieldEnd(); - } - } - if (struct.isSetIsAllParts()) { - oprot.writeFieldBegin(IS_ALL_PARTS_FIELD_DESC); - oprot.writeBool(struct.isAllParts); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CacheFileMetadataRequestTupleSchemeFactory implements SchemeFactory { - public CacheFileMetadataRequestTupleScheme getScheme() { - return new CacheFileMetadataRequestTupleScheme(); - } - } - - private static class CacheFileMetadataRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dbName); - oprot.writeString(struct.tblName); - BitSet optionals = new BitSet(); - if (struct.isSetPartName()) { - optionals.set(0); - } - if (struct.isSetIsAllParts()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetPartName()) { - oprot.writeString(struct.partName); - } - if (struct.isSetIsAllParts()) { - oprot.writeBool(struct.isAllParts); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - struct.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.partName = iprot.readString(); - struct.setPartNameIsSet(true); - } - if (incoming.get(1)) { - struct.isAllParts = iprot.readBool(); - struct.setIsAllPartsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataResult.java deleted file mode 100644 index a1466ae..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataResult.java +++ /dev/null @@ -1,387 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class CacheFileMetadataResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CacheFileMetadataResult"); - - private static final org.apache.thrift.protocol.TField IS_SUPPORTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isSupported", org.apache.thrift.protocol.TType.BOOL, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CacheFileMetadataResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CacheFileMetadataResultTupleSchemeFactory()); - } - - private boolean isSupported; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - IS_SUPPORTED((short)1, "isSupported"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // IS_SUPPORTED - return IS_SUPPORTED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ISSUPPORTED_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.IS_SUPPORTED, new org.apache.thrift.meta_data.FieldMetaData("isSupported", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CacheFileMetadataResult.class, metaDataMap); - } - - public CacheFileMetadataResult() { - } - - public CacheFileMetadataResult( - boolean isSupported) - { - this(); - this.isSupported = isSupported; - setIsSupportedIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public CacheFileMetadataResult(CacheFileMetadataResult other) { - __isset_bitfield = other.__isset_bitfield; - this.isSupported = other.isSupported; - } - - public CacheFileMetadataResult deepCopy() { - return new CacheFileMetadataResult(this); - } - - @Override - public void clear() { - setIsSupportedIsSet(false); - this.isSupported = false; - } - - public boolean isIsSupported() { - return this.isSupported; - } - - public void setIsSupported(boolean isSupported) { - this.isSupported = isSupported; - setIsSupportedIsSet(true); - } - - public void unsetIsSupported() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); - } - - /** Returns true if field isSupported is set (has been assigned a value) and false otherwise */ - public boolean isSetIsSupported() { - return EncodingUtils.testBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); - } - - public void setIsSupportedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case IS_SUPPORTED: - if (value == null) { - unsetIsSupported(); - } else { - setIsSupported((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case IS_SUPPORTED: - return isIsSupported(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case IS_SUPPORTED: - return isSetIsSupported(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CacheFileMetadataResult) - return this.equals((CacheFileMetadataResult)that); - return false; - } - - public boolean equals(CacheFileMetadataResult that) { - if (that == null) - return false; - - boolean this_present_isSupported = true; - boolean that_present_isSupported = true; - if (this_present_isSupported || that_present_isSupported) { - if (!(this_present_isSupported && that_present_isSupported)) - return false; - if (this.isSupported != that.isSupported) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_isSupported = true; - list.add(present_isSupported); - if (present_isSupported) - list.add(isSupported); - - return list.hashCode(); - } - - @Override - public int compareTo(CacheFileMetadataResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetIsSupported()).compareTo(other.isSetIsSupported()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsSupported()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isSupported, other.isSupported); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("CacheFileMetadataResult("); - boolean first = true; - - sb.append("isSupported:"); - sb.append(this.isSupported); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetIsSupported()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'isSupported' is unset! Struct:" + toString()); - } - - // 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 { - // 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 CacheFileMetadataResultStandardSchemeFactory implements SchemeFactory { - public CacheFileMetadataResultStandardScheme getScheme() { - return new CacheFileMetadataResultStandardScheme(); - } - } - - private static class CacheFileMetadataResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CacheFileMetadataResult 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: // IS_SUPPORTED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isSupported = iprot.readBool(); - struct.setIsSupportedIsSet(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, CacheFileMetadataResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(IS_SUPPORTED_FIELD_DESC); - oprot.writeBool(struct.isSupported); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CacheFileMetadataResultTupleSchemeFactory implements SchemeFactory { - public CacheFileMetadataResultTupleScheme getScheme() { - return new CacheFileMetadataResultTupleScheme(); - } - } - - private static class CacheFileMetadataResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBool(struct.isSupported); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.isSupported = iprot.readBool(); - struct.setIsSupportedIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckLockRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckLockRequest.java deleted file mode 100644 index bcef2ff..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckLockRequest.java +++ /dev/null @@ -1,589 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class CheckLockRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CheckLockRequest"); - - private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField ELAPSED_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("elapsed_ms", org.apache.thrift.protocol.TType.I64, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CheckLockRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CheckLockRequestTupleSchemeFactory()); - } - - private long lockid; // required - private long txnid; // optional - private long elapsed_ms; // 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 { - LOCKID((short)1, "lockid"), - TXNID((short)2, "txnid"), - ELAPSED_MS((short)3, "elapsed_ms"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // LOCKID - return LOCKID; - case 2: // TXNID - return TXNID; - case 3: // ELAPSED_MS - return ELAPSED_MS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __LOCKID_ISSET_ID = 0; - private static final int __TXNID_ISSET_ID = 1; - private static final int __ELAPSED_MS_ISSET_ID = 2; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.TXNID,_Fields.ELAPSED_MS}; - 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); - tmpMap.put(_Fields.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.ELAPSED_MS, new org.apache.thrift.meta_data.FieldMetaData("elapsed_ms", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CheckLockRequest.class, metaDataMap); - } - - public CheckLockRequest() { - } - - public CheckLockRequest( - long lockid) - { - this(); - this.lockid = lockid; - setLockidIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public CheckLockRequest(CheckLockRequest other) { - __isset_bitfield = other.__isset_bitfield; - this.lockid = other.lockid; - this.txnid = other.txnid; - this.elapsed_ms = other.elapsed_ms; - } - - public CheckLockRequest deepCopy() { - return new CheckLockRequest(this); - } - - @Override - public void clear() { - setLockidIsSet(false); - this.lockid = 0; - setTxnidIsSet(false); - this.txnid = 0; - setElapsed_msIsSet(false); - this.elapsed_ms = 0; - } - - public long getLockid() { - return this.lockid; - } - - public void setLockid(long lockid) { - this.lockid = lockid; - setLockidIsSet(true); - } - - public void unsetLockid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKID_ISSET_ID); - } - - /** Returns true if field lockid is set (has been assigned a value) and false otherwise */ - public boolean isSetLockid() { - return EncodingUtils.testBit(__isset_bitfield, __LOCKID_ISSET_ID); - } - - public void setLockidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value); - } - - public long getTxnid() { - return this.txnid; - } - - public void setTxnid(long txnid) { - this.txnid = txnid; - setTxnidIsSet(true); - } - - public void unsetTxnid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ - public boolean isSetTxnid() { - return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - public void setTxnidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); - } - - public long getElapsed_ms() { - return this.elapsed_ms; - } - - public void setElapsed_ms(long elapsed_ms) { - this.elapsed_ms = elapsed_ms; - setElapsed_msIsSet(true); - } - - public void unsetElapsed_ms() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ELAPSED_MS_ISSET_ID); - } - - /** Returns true if field elapsed_ms is set (has been assigned a value) and false otherwise */ - public boolean isSetElapsed_ms() { - return EncodingUtils.testBit(__isset_bitfield, __ELAPSED_MS_ISSET_ID); - } - - public void setElapsed_msIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ELAPSED_MS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LOCKID: - if (value == null) { - unsetLockid(); - } else { - setLockid((Long)value); - } - break; - - case TXNID: - if (value == null) { - unsetTxnid(); - } else { - setTxnid((Long)value); - } - break; - - case ELAPSED_MS: - if (value == null) { - unsetElapsed_ms(); - } else { - setElapsed_ms((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LOCKID: - return getLockid(); - - case TXNID: - return getTxnid(); - - case ELAPSED_MS: - return getElapsed_ms(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LOCKID: - return isSetLockid(); - case TXNID: - return isSetTxnid(); - case ELAPSED_MS: - return isSetElapsed_ms(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CheckLockRequest) - return this.equals((CheckLockRequest)that); - return false; - } - - public boolean equals(CheckLockRequest that) { - if (that == null) - return false; - - boolean this_present_lockid = true; - boolean that_present_lockid = true; - if (this_present_lockid || that_present_lockid) { - if (!(this_present_lockid && that_present_lockid)) - return false; - if (this.lockid != that.lockid) - return false; - } - - boolean this_present_txnid = true && this.isSetTxnid(); - boolean that_present_txnid = true && that.isSetTxnid(); - if (this_present_txnid || that_present_txnid) { - if (!(this_present_txnid && that_present_txnid)) - return false; - if (this.txnid != that.txnid) - return false; - } - - boolean this_present_elapsed_ms = true && this.isSetElapsed_ms(); - boolean that_present_elapsed_ms = true && that.isSetElapsed_ms(); - if (this_present_elapsed_ms || that_present_elapsed_ms) { - if (!(this_present_elapsed_ms && that_present_elapsed_ms)) - return false; - if (this.elapsed_ms != that.elapsed_ms) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_lockid = true; - list.add(present_lockid); - if (present_lockid) - list.add(lockid); - - boolean present_txnid = true && (isSetTxnid()); - list.add(present_txnid); - if (present_txnid) - list.add(txnid); - - boolean present_elapsed_ms = true && (isSetElapsed_ms()); - list.add(present_elapsed_ms); - if (present_elapsed_ms) - list.add(elapsed_ms); - - return list.hashCode(); - } - - @Override - public int compareTo(CheckLockRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLockid()).compareTo(other.isSetLockid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLockid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, other.lockid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTxnid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetElapsed_ms()).compareTo(other.isSetElapsed_ms()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetElapsed_ms()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.elapsed_ms, other.elapsed_ms); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("CheckLockRequest("); - boolean first = true; - - sb.append("lockid:"); - sb.append(this.lockid); - first = false; - if (isSetTxnid()) { - if (!first) sb.append(", "); - sb.append("txnid:"); - sb.append(this.txnid); - first = false; - } - if (isSetElapsed_ms()) { - if (!first) sb.append(", "); - sb.append("elapsed_ms:"); - sb.append(this.elapsed_ms); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetLockid()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'lockid' is unset! Struct:" + toString()); - } - - // 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 { - // 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 CheckLockRequestStandardSchemeFactory implements SchemeFactory { - public CheckLockRequestStandardScheme getScheme() { - return new CheckLockRequestStandardScheme(); - } - } - - private static class CheckLockRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CheckLockRequest 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: // LOCKID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.lockid = iprot.readI64(); - struct.setLockidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TXNID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ELAPSED_MS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.elapsed_ms = iprot.readI64(); - struct.setElapsed_msIsSet(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, CheckLockRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(LOCKID_FIELD_DESC); - oprot.writeI64(struct.lockid); - oprot.writeFieldEnd(); - if (struct.isSetTxnid()) { - oprot.writeFieldBegin(TXNID_FIELD_DESC); - oprot.writeI64(struct.txnid); - oprot.writeFieldEnd(); - } - if (struct.isSetElapsed_ms()) { - oprot.writeFieldBegin(ELAPSED_MS_FIELD_DESC); - oprot.writeI64(struct.elapsed_ms); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CheckLockRequestTupleSchemeFactory implements SchemeFactory { - public CheckLockRequestTupleScheme getScheme() { - return new CheckLockRequestTupleScheme(); - } - } - - private static class CheckLockRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CheckLockRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.lockid); - BitSet optionals = new BitSet(); - if (struct.isSetTxnid()) { - optionals.set(0); - } - if (struct.isSetElapsed_ms()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetTxnid()) { - oprot.writeI64(struct.txnid); - } - if (struct.isSetElapsed_ms()) { - oprot.writeI64(struct.elapsed_ms); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CheckLockRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.lockid = iprot.readI64(); - struct.setLockidIsSet(true); - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(true); - } - if (incoming.get(1)) { - struct.elapsed_ms = iprot.readI64(); - struct.setElapsed_msIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java deleted file mode 100644 index 0b6574d..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java +++ /dev/null @@ -1,438 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ClearFileMetadataRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClearFileMetadataRequest"); - - private static final org.apache.thrift.protocol.TField FILE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fileIds", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ClearFileMetadataRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ClearFileMetadataRequestTupleSchemeFactory()); - } - - private List fileIds; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_IDS((short)1, "fileIds"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FILE_IDS - return FILE_IDS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.FILE_IDS, new org.apache.thrift.meta_data.FieldMetaData("fileIds", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClearFileMetadataRequest.class, metaDataMap); - } - - public ClearFileMetadataRequest() { - } - - public ClearFileMetadataRequest( - List fileIds) - { - this(); - this.fileIds = fileIds; - } - - /** - * Performs a deep copy on other. - */ - public ClearFileMetadataRequest(ClearFileMetadataRequest other) { - if (other.isSetFileIds()) { - List __this__fileIds = new ArrayList(other.fileIds); - this.fileIds = __this__fileIds; - } - } - - public ClearFileMetadataRequest deepCopy() { - return new ClearFileMetadataRequest(this); - } - - @Override - public void clear() { - this.fileIds = null; - } - - public int getFileIdsSize() { - return (this.fileIds == null) ? 0 : this.fileIds.size(); - } - - public java.util.Iterator getFileIdsIterator() { - return (this.fileIds == null) ? null : this.fileIds.iterator(); - } - - public void addToFileIds(long elem) { - if (this.fileIds == null) { - this.fileIds = new ArrayList(); - } - this.fileIds.add(elem); - } - - public List getFileIds() { - return this.fileIds; - } - - public void setFileIds(List fileIds) { - this.fileIds = fileIds; - } - - public void unsetFileIds() { - this.fileIds = null; - } - - /** Returns true if field fileIds is set (has been assigned a value) and false otherwise */ - public boolean isSetFileIds() { - return this.fileIds != null; - } - - public void setFileIdsIsSet(boolean value) { - if (!value) { - this.fileIds = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case FILE_IDS: - if (value == null) { - unsetFileIds(); - } else { - setFileIds((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case FILE_IDS: - return getFileIds(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case FILE_IDS: - return isSetFileIds(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ClearFileMetadataRequest) - return this.equals((ClearFileMetadataRequest)that); - return false; - } - - public boolean equals(ClearFileMetadataRequest that) { - if (that == null) - return false; - - boolean this_present_fileIds = true && this.isSetFileIds(); - boolean that_present_fileIds = true && that.isSetFileIds(); - if (this_present_fileIds || that_present_fileIds) { - if (!(this_present_fileIds && that_present_fileIds)) - return false; - if (!this.fileIds.equals(that.fileIds)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_fileIds = true && (isSetFileIds()); - list.add(present_fileIds); - if (present_fileIds) - list.add(fileIds); - - return list.hashCode(); - } - - @Override - public int compareTo(ClearFileMetadataRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetFileIds()).compareTo(other.isSetFileIds()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFileIds()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileIds, other.fileIds); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ClearFileMetadataRequest("); - boolean first = true; - - sb.append("fileIds:"); - if (this.fileIds == null) { - sb.append("null"); - } else { - sb.append(this.fileIds); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetFileIds()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'fileIds' is unset! Struct:" + toString()); - } - - // 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 ClearFileMetadataRequestStandardSchemeFactory implements SchemeFactory { - public ClearFileMetadataRequestStandardScheme getScheme() { - return new ClearFileMetadataRequestStandardScheme(); - } - } - - private static class ClearFileMetadataRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ClearFileMetadataRequest 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: // FILE_IDS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list666 = iprot.readListBegin(); - struct.fileIds = new ArrayList(_list666.size); - long _elem667; - for (int _i668 = 0; _i668 < _list666.size; ++_i668) - { - _elem667 = iprot.readI64(); - struct.fileIds.add(_elem667); - } - iprot.readListEnd(); - } - struct.setFileIdsIsSet(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, ClearFileMetadataRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.fileIds != null) { - oprot.writeFieldBegin(FILE_IDS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size())); - for (long _iter669 : struct.fileIds) - { - oprot.writeI64(_iter669); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ClearFileMetadataRequestTupleSchemeFactory implements SchemeFactory { - public ClearFileMetadataRequestTupleScheme getScheme() { - return new ClearFileMetadataRequestTupleScheme(); - } - } - - private static class ClearFileMetadataRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ClearFileMetadataRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.fileIds.size()); - for (long _iter670 : struct.fileIds) - { - oprot.writeI64(_iter670); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ClearFileMetadataRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list671 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.fileIds = new ArrayList(_list671.size); - long _elem672; - for (int _i673 = 0; _i673 < _list671.size; ++_i673) - { - _elem672 = iprot.readI64(); - struct.fileIds.add(_elem672); - } - } - struct.setFileIdsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataResult.java deleted file mode 100644 index 8e46d83..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataResult.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ClearFileMetadataResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClearFileMetadataResult"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ClearFileMetadataResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ClearFileMetadataResultTupleSchemeFactory()); - } - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClearFileMetadataResult.class, metaDataMap); - } - - public ClearFileMetadataResult() { - } - - /** - * Performs a deep copy on other. - */ - public ClearFileMetadataResult(ClearFileMetadataResult other) { - } - - public ClearFileMetadataResult deepCopy() { - return new ClearFileMetadataResult(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ClearFileMetadataResult) - return this.equals((ClearFileMetadataResult)that); - return false; - } - - public boolean equals(ClearFileMetadataResult that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(ClearFileMetadataResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ClearFileMetadataResult("); - boolean first = true; - - 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 ClearFileMetadataResultStandardSchemeFactory implements SchemeFactory { - public ClearFileMetadataResultStandardScheme getScheme() { - return new ClearFileMetadataResultStandardScheme(); - } - } - - private static class ClearFileMetadataResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ClearFileMetadataResult 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, ClearFileMetadataResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ClearFileMetadataResultTupleSchemeFactory implements SchemeFactory { - public ClearFileMetadataResultTupleScheme getScheme() { - return new ClearFileMetadataResultTupleScheme(); - } - } - - private static class ClearFileMetadataResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ClearFileMetadataResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ClearFileMetadataResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java deleted file mode 100644 index 19e671b..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ClientCapabilities implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClientCapabilities"); - - private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ClientCapabilitiesStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ClientCapabilitiesTupleSchemeFactory()); - } - - private List values; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - VALUES((short)1, "values"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // VALUES - return VALUES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ClientCapability.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClientCapabilities.class, metaDataMap); - } - - public ClientCapabilities() { - } - - public ClientCapabilities( - List values) - { - this(); - this.values = values; - } - - /** - * Performs a deep copy on other. - */ - public ClientCapabilities(ClientCapabilities other) { - if (other.isSetValues()) { - List __this__values = new ArrayList(other.values.size()); - for (ClientCapability other_element : other.values) { - __this__values.add(other_element); - } - this.values = __this__values; - } - } - - public ClientCapabilities deepCopy() { - return new ClientCapabilities(this); - } - - @Override - public void clear() { - this.values = null; - } - - public int getValuesSize() { - return (this.values == null) ? 0 : this.values.size(); - } - - public java.util.Iterator getValuesIterator() { - return (this.values == null) ? null : this.values.iterator(); - } - - public void addToValues(ClientCapability elem) { - if (this.values == null) { - this.values = new ArrayList(); - } - this.values.add(elem); - } - - public List getValues() { - return this.values; - } - - public void setValues(List values) { - this.values = values; - } - - public void unsetValues() { - this.values = null; - } - - /** Returns true if field values is set (has been assigned a value) and false otherwise */ - public boolean isSetValues() { - return this.values != null; - } - - public void setValuesIsSet(boolean value) { - if (!value) { - this.values = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case VALUES: - if (value == null) { - unsetValues(); - } else { - setValues((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case VALUES: - return getValues(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case VALUES: - return isSetValues(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ClientCapabilities) - return this.equals((ClientCapabilities)that); - return false; - } - - public boolean equals(ClientCapabilities that) { - if (that == null) - return false; - - boolean this_present_values = true && this.isSetValues(); - boolean that_present_values = true && that.isSetValues(); - if (this_present_values || that_present_values) { - if (!(this_present_values && that_present_values)) - return false; - if (!this.values.equals(that.values)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_values = true && (isSetValues()); - list.add(present_values); - if (present_values) - list.add(values); - - return list.hashCode(); - } - - @Override - public int compareTo(ClientCapabilities other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ClientCapabilities("); - boolean first = true; - - sb.append("values:"); - if (this.values == null) { - sb.append("null"); - } else { - sb.append(this.values); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetValues()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' is unset! Struct:" + toString()); - } - - // 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 ClientCapabilitiesStandardSchemeFactory implements SchemeFactory { - public ClientCapabilitiesStandardScheme getScheme() { - return new ClientCapabilitiesStandardScheme(); - } - } - - private static class ClientCapabilitiesStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ClientCapabilities 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 _list682 = iprot.readListBegin(); - struct.values = new ArrayList(_list682.size); - ClientCapability _elem683; - for (int _i684 = 0; _i684 < _list682.size; ++_i684) - { - _elem683 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32()); - struct.values.add(_elem683); - } - iprot.readListEnd(); - } - struct.setValuesIsSet(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, ClientCapabilities 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.I32, struct.values.size())); - for (ClientCapability _iter685 : struct.values) - { - oprot.writeI32(_iter685.getValue()); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ClientCapabilitiesTupleSchemeFactory implements SchemeFactory { - public ClientCapabilitiesTupleScheme getScheme() { - return new ClientCapabilitiesTupleScheme(); - } - } - - private static class ClientCapabilitiesTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ClientCapabilities struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.values.size()); - for (ClientCapability _iter686 : struct.values) - { - oprot.writeI32(_iter686.getValue()); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ClientCapabilities struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list687 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); - struct.values = new ArrayList(_list687.size); - ClientCapability _elem688; - for (int _i689 = 0; _i689 < _list687.size; ++_i689) - { - _elem688 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32()); - struct.values.add(_elem688); - } - } - struct.setValuesIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapability.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapability.java deleted file mode 100644 index f53bd82..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapability.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum ClientCapability implements org.apache.thrift.TEnum { - TEST_CAPABILITY(1); - - private final int value; - - private ClientCapability(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static ClientCapability findByValue(int value) { - switch (value) { - case 1: - return TEST_CAPABILITY; - default: - return null; - } - } -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleRequest.java deleted file mode 100644 index d84f236..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleRequest.java +++ /dev/null @@ -1,488 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class CmRecycleRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CmRecycleRequest"); - - private static final org.apache.thrift.protocol.TField DATA_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("dataPath", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField PURGE_FIELD_DESC = new org.apache.thrift.protocol.TField("purge", org.apache.thrift.protocol.TType.BOOL, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CmRecycleRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CmRecycleRequestTupleSchemeFactory()); - } - - private String dataPath; // required - private boolean purge; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DATA_PATH((short)1, "dataPath"), - PURGE((short)2, "purge"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DATA_PATH - return DATA_PATH; - case 2: // PURGE - return PURGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __PURGE_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DATA_PATH, new org.apache.thrift.meta_data.FieldMetaData("dataPath", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PURGE, new org.apache.thrift.meta_data.FieldMetaData("purge", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CmRecycleRequest.class, metaDataMap); - } - - public CmRecycleRequest() { - } - - public CmRecycleRequest( - String dataPath, - boolean purge) - { - this(); - this.dataPath = dataPath; - this.purge = purge; - setPurgeIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public CmRecycleRequest(CmRecycleRequest other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDataPath()) { - this.dataPath = other.dataPath; - } - this.purge = other.purge; - } - - public CmRecycleRequest deepCopy() { - return new CmRecycleRequest(this); - } - - @Override - public void clear() { - this.dataPath = null; - setPurgeIsSet(false); - this.purge = false; - } - - public String getDataPath() { - return this.dataPath; - } - - public void setDataPath(String dataPath) { - this.dataPath = dataPath; - } - - public void unsetDataPath() { - this.dataPath = null; - } - - /** Returns true if field dataPath is set (has been assigned a value) and false otherwise */ - public boolean isSetDataPath() { - return this.dataPath != null; - } - - public void setDataPathIsSet(boolean value) { - if (!value) { - this.dataPath = null; - } - } - - public boolean isPurge() { - return this.purge; - } - - public void setPurge(boolean purge) { - this.purge = purge; - setPurgeIsSet(true); - } - - public void unsetPurge() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PURGE_ISSET_ID); - } - - /** Returns true if field purge is set (has been assigned a value) and false otherwise */ - public boolean isSetPurge() { - return EncodingUtils.testBit(__isset_bitfield, __PURGE_ISSET_ID); - } - - public void setPurgeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PURGE_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DATA_PATH: - if (value == null) { - unsetDataPath(); - } else { - setDataPath((String)value); - } - break; - - case PURGE: - if (value == null) { - unsetPurge(); - } else { - setPurge((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DATA_PATH: - return getDataPath(); - - case PURGE: - return isPurge(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DATA_PATH: - return isSetDataPath(); - case PURGE: - return isSetPurge(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CmRecycleRequest) - return this.equals((CmRecycleRequest)that); - return false; - } - - public boolean equals(CmRecycleRequest that) { - if (that == null) - return false; - - boolean this_present_dataPath = true && this.isSetDataPath(); - boolean that_present_dataPath = true && that.isSetDataPath(); - if (this_present_dataPath || that_present_dataPath) { - if (!(this_present_dataPath && that_present_dataPath)) - return false; - if (!this.dataPath.equals(that.dataPath)) - return false; - } - - boolean this_present_purge = true; - boolean that_present_purge = true; - if (this_present_purge || that_present_purge) { - if (!(this_present_purge && that_present_purge)) - return false; - if (this.purge != that.purge) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dataPath = true && (isSetDataPath()); - list.add(present_dataPath); - if (present_dataPath) - list.add(dataPath); - - boolean present_purge = true; - list.add(present_purge); - if (present_purge) - list.add(purge); - - return list.hashCode(); - } - - @Override - public int compareTo(CmRecycleRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDataPath()).compareTo(other.isSetDataPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataPath, other.dataPath); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPurge()).compareTo(other.isSetPurge()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPurge()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purge, other.purge); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("CmRecycleRequest("); - boolean first = true; - - sb.append("dataPath:"); - if (this.dataPath == null) { - sb.append("null"); - } else { - sb.append(this.dataPath); - } - first = false; - if (!first) sb.append(", "); - sb.append("purge:"); - sb.append(this.purge); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDataPath()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataPath' is unset! Struct:" + toString()); - } - - if (!isSetPurge()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'purge' is unset! Struct:" + toString()); - } - - // 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 { - // 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 CmRecycleRequestStandardSchemeFactory implements SchemeFactory { - public CmRecycleRequestStandardScheme getScheme() { - return new CmRecycleRequestStandardScheme(); - } - } - - private static class CmRecycleRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CmRecycleRequest 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: // DATA_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.dataPath = iprot.readString(); - struct.setDataPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PURGE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.purge = iprot.readBool(); - struct.setPurgeIsSet(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, CmRecycleRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dataPath != null) { - oprot.writeFieldBegin(DATA_PATH_FIELD_DESC); - oprot.writeString(struct.dataPath); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(PURGE_FIELD_DESC); - oprot.writeBool(struct.purge); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CmRecycleRequestTupleSchemeFactory implements SchemeFactory { - public CmRecycleRequestTupleScheme getScheme() { - return new CmRecycleRequestTupleScheme(); - } - } - - private static class CmRecycleRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CmRecycleRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dataPath); - oprot.writeBool(struct.purge); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CmRecycleRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dataPath = iprot.readString(); - struct.setDataPathIsSet(true); - struct.purge = iprot.readBool(); - struct.setPurgeIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleResponse.java deleted file mode 100644 index 313559a..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleResponse.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class CmRecycleResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CmRecycleResponse"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CmRecycleResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CmRecycleResponseTupleSchemeFactory()); - } - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CmRecycleResponse.class, metaDataMap); - } - - public CmRecycleResponse() { - } - - /** - * Performs a deep copy on other. - */ - public CmRecycleResponse(CmRecycleResponse other) { - } - - public CmRecycleResponse deepCopy() { - return new CmRecycleResponse(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CmRecycleResponse) - return this.equals((CmRecycleResponse)that); - return false; - } - - public boolean equals(CmRecycleResponse that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(CmRecycleResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("CmRecycleResponse("); - boolean first = true; - - 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 CmRecycleResponseStandardSchemeFactory implements SchemeFactory { - public CmRecycleResponseStandardScheme getScheme() { - return new CmRecycleResponseStandardScheme(); - } - } - - private static class CmRecycleResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CmRecycleResponse 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, CmRecycleResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CmRecycleResponseTupleSchemeFactory implements SchemeFactory { - public CmRecycleResponseTupleScheme getScheme() { - return new CmRecycleResponseTupleScheme(); - } - } - - private static class CmRecycleResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CmRecycleResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CmRecycleResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java deleted file mode 100644 index ba059fe..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java +++ /dev/null @@ -1,549 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ColumnStatistics implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatistics"); - - private static final org.apache.thrift.protocol.TField STATS_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("statsDesc", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("statsObj", org.apache.thrift.protocol.TType.LIST, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ColumnStatisticsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ColumnStatisticsTupleSchemeFactory()); - } - - private ColumnStatisticsDesc statsDesc; // required - private List statsObj; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - STATS_DESC((short)1, "statsDesc"), - STATS_OBJ((short)2, "statsObj"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STATS_DESC - return STATS_DESC; - case 2: // STATS_OBJ - return STATS_OBJ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.STATS_DESC, new org.apache.thrift.meta_data.FieldMetaData("statsDesc", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsDesc.class))); - tmpMap.put(_Fields.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("statsObj", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsObj.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatistics.class, metaDataMap); - } - - public ColumnStatistics() { - } - - public ColumnStatistics( - ColumnStatisticsDesc statsDesc, - List statsObj) - { - this(); - this.statsDesc = statsDesc; - this.statsObj = statsObj; - } - - /** - * Performs a deep copy on other. - */ - public ColumnStatistics(ColumnStatistics other) { - if (other.isSetStatsDesc()) { - this.statsDesc = new ColumnStatisticsDesc(other.statsDesc); - } - if (other.isSetStatsObj()) { - List __this__statsObj = new ArrayList(other.statsObj.size()); - for (ColumnStatisticsObj other_element : other.statsObj) { - __this__statsObj.add(new ColumnStatisticsObj(other_element)); - } - this.statsObj = __this__statsObj; - } - } - - public ColumnStatistics deepCopy() { - return new ColumnStatistics(this); - } - - @Override - public void clear() { - this.statsDesc = null; - this.statsObj = null; - } - - public ColumnStatisticsDesc getStatsDesc() { - return this.statsDesc; - } - - public void setStatsDesc(ColumnStatisticsDesc statsDesc) { - this.statsDesc = statsDesc; - } - - public void unsetStatsDesc() { - this.statsDesc = null; - } - - /** Returns true if field statsDesc is set (has been assigned a value) and false otherwise */ - public boolean isSetStatsDesc() { - return this.statsDesc != null; - } - - public void setStatsDescIsSet(boolean value) { - if (!value) { - this.statsDesc = null; - } - } - - public int getStatsObjSize() { - return (this.statsObj == null) ? 0 : this.statsObj.size(); - } - - public java.util.Iterator getStatsObjIterator() { - return (this.statsObj == null) ? null : this.statsObj.iterator(); - } - - public void addToStatsObj(ColumnStatisticsObj elem) { - if (this.statsObj == null) { - this.statsObj = new ArrayList(); - } - this.statsObj.add(elem); - } - - public List getStatsObj() { - return this.statsObj; - } - - public void setStatsObj(List statsObj) { - this.statsObj = statsObj; - } - - public void unsetStatsObj() { - this.statsObj = null; - } - - /** Returns true if field statsObj is set (has been assigned a value) and false otherwise */ - public boolean isSetStatsObj() { - return this.statsObj != null; - } - - public void setStatsObjIsSet(boolean value) { - if (!value) { - this.statsObj = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case STATS_DESC: - if (value == null) { - unsetStatsDesc(); - } else { - setStatsDesc((ColumnStatisticsDesc)value); - } - break; - - case STATS_OBJ: - if (value == null) { - unsetStatsObj(); - } else { - setStatsObj((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case STATS_DESC: - return getStatsDesc(); - - case STATS_OBJ: - return getStatsObj(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case STATS_DESC: - return isSetStatsDesc(); - case STATS_OBJ: - return isSetStatsObj(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ColumnStatistics) - return this.equals((ColumnStatistics)that); - return false; - } - - public boolean equals(ColumnStatistics that) { - if (that == null) - return false; - - boolean this_present_statsDesc = true && this.isSetStatsDesc(); - boolean that_present_statsDesc = true && that.isSetStatsDesc(); - if (this_present_statsDesc || that_present_statsDesc) { - if (!(this_present_statsDesc && that_present_statsDesc)) - return false; - if (!this.statsDesc.equals(that.statsDesc)) - return false; - } - - boolean this_present_statsObj = true && this.isSetStatsObj(); - boolean that_present_statsObj = true && that.isSetStatsObj(); - if (this_present_statsObj || that_present_statsObj) { - if (!(this_present_statsObj && that_present_statsObj)) - return false; - if (!this.statsObj.equals(that.statsObj)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_statsDesc = true && (isSetStatsDesc()); - list.add(present_statsDesc); - if (present_statsDesc) - list.add(statsDesc); - - boolean present_statsObj = true && (isSetStatsObj()); - list.add(present_statsObj); - if (present_statsObj) - list.add(statsObj); - - return list.hashCode(); - } - - @Override - public int compareTo(ColumnStatistics other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetStatsDesc()).compareTo(other.isSetStatsDesc()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatsDesc()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statsDesc, other.statsDesc); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStatsObj()).compareTo(other.isSetStatsObj()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatsObj()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statsObj, other.statsObj); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ColumnStatistics("); - boolean first = true; - - sb.append("statsDesc:"); - if (this.statsDesc == null) { - sb.append("null"); - } else { - sb.append(this.statsDesc); - } - first = false; - if (!first) sb.append(", "); - sb.append("statsObj:"); - if (this.statsObj == null) { - sb.append("null"); - } else { - sb.append(this.statsObj); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetStatsDesc()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsDesc' is unset! Struct:" + toString()); - } - - if (!isSetStatsObj()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsObj' is unset! Struct:" + toString()); - } - - // check for sub-struct validity - if (statsDesc != null) { - statsDesc.validate(); - } - } - - 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 ColumnStatisticsStandardSchemeFactory implements SchemeFactory { - public ColumnStatisticsStandardScheme getScheme() { - return new ColumnStatisticsStandardScheme(); - } - } - - private static class ColumnStatisticsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatistics 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: // STATS_DESC - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.statsDesc = new ColumnStatisticsDesc(); - struct.statsDesc.read(iprot); - struct.setStatsDescIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STATS_OBJ - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list270 = iprot.readListBegin(); - struct.statsObj = new ArrayList(_list270.size); - ColumnStatisticsObj _elem271; - for (int _i272 = 0; _i272 < _list270.size; ++_i272) - { - _elem271 = new ColumnStatisticsObj(); - _elem271.read(iprot); - struct.statsObj.add(_elem271); - } - iprot.readListEnd(); - } - struct.setStatsObjIsSet(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, ColumnStatistics struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.statsDesc != null) { - oprot.writeFieldBegin(STATS_DESC_FIELD_DESC); - struct.statsDesc.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.statsObj != null) { - oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.statsObj.size())); - for (ColumnStatisticsObj _iter273 : struct.statsObj) - { - _iter273.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ColumnStatisticsTupleSchemeFactory implements SchemeFactory { - public ColumnStatisticsTupleScheme getScheme() { - return new ColumnStatisticsTupleScheme(); - } - } - - private static class ColumnStatisticsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatistics struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - struct.statsDesc.write(oprot); - { - oprot.writeI32(struct.statsObj.size()); - for (ColumnStatisticsObj _iter274 : struct.statsObj) - { - _iter274.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatistics struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.statsDesc = new ColumnStatisticsDesc(); - struct.statsDesc.read(iprot); - struct.setStatsDescIsSet(true); - { - org.apache.thrift.protocol.TList _list275 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.statsObj = new ArrayList(_list275.size); - ColumnStatisticsObj _elem276; - for (int _i277 = 0; _i277 < _list275.size; ++_i277) - { - _elem276 = new ColumnStatisticsObj(); - _elem276.read(iprot); - struct.statsObj.add(_elem276); - } - } - struct.setStatsObjIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java deleted file mode 100644 index 036d438..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java +++ /dev/null @@ -1,675 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -public class ColumnStatisticsData extends org.apache.thrift.TUnion { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatisticsData"); - private static final org.apache.thrift.protocol.TField BOOLEAN_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("booleanStats", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField LONG_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("longStats", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField DOUBLE_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("doubleStats", org.apache.thrift.protocol.TType.STRUCT, (short)3); - private static final org.apache.thrift.protocol.TField STRING_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("stringStats", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private static final org.apache.thrift.protocol.TField BINARY_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("binaryStats", org.apache.thrift.protocol.TType.STRUCT, (short)5); - private static final org.apache.thrift.protocol.TField DECIMAL_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("decimalStats", org.apache.thrift.protocol.TType.STRUCT, (short)6); - private static final org.apache.thrift.protocol.TField DATE_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("dateStats", org.apache.thrift.protocol.TType.STRUCT, (short)7); - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - BOOLEAN_STATS((short)1, "booleanStats"), - LONG_STATS((short)2, "longStats"), - DOUBLE_STATS((short)3, "doubleStats"), - STRING_STATS((short)4, "stringStats"), - BINARY_STATS((short)5, "binaryStats"), - DECIMAL_STATS((short)6, "decimalStats"), - DATE_STATS((short)7, "dateStats"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // BOOLEAN_STATS - return BOOLEAN_STATS; - case 2: // LONG_STATS - return LONG_STATS; - case 3: // DOUBLE_STATS - return DOUBLE_STATS; - case 4: // STRING_STATS - return STRING_STATS; - case 5: // BINARY_STATS - return BINARY_STATS; - case 6: // DECIMAL_STATS - return DECIMAL_STATS; - case 7: // DATE_STATS - return DATE_STATS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - 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); - tmpMap.put(_Fields.BOOLEAN_STATS, new org.apache.thrift.meta_data.FieldMetaData("booleanStats", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BooleanColumnStatsData.class))); - tmpMap.put(_Fields.LONG_STATS, new org.apache.thrift.meta_data.FieldMetaData("longStats", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LongColumnStatsData.class))); - tmpMap.put(_Fields.DOUBLE_STATS, new org.apache.thrift.meta_data.FieldMetaData("doubleStats", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DoubleColumnStatsData.class))); - tmpMap.put(_Fields.STRING_STATS, new org.apache.thrift.meta_data.FieldMetaData("stringStats", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StringColumnStatsData.class))); - tmpMap.put(_Fields.BINARY_STATS, new org.apache.thrift.meta_data.FieldMetaData("binaryStats", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BinaryColumnStatsData.class))); - tmpMap.put(_Fields.DECIMAL_STATS, new org.apache.thrift.meta_data.FieldMetaData("decimalStats", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DecimalColumnStatsData.class))); - tmpMap.put(_Fields.DATE_STATS, new org.apache.thrift.meta_data.FieldMetaData("dateStats", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DateColumnStatsData.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatisticsData.class, metaDataMap); - } - - public ColumnStatisticsData() { - super(); - } - - public ColumnStatisticsData(_Fields setField, Object value) { - super(setField, value); - } - - public ColumnStatisticsData(ColumnStatisticsData other) { - super(other); - } - public ColumnStatisticsData deepCopy() { - return new ColumnStatisticsData(this); - } - - public static ColumnStatisticsData booleanStats(BooleanColumnStatsData value) { - ColumnStatisticsData x = new ColumnStatisticsData(); - x.setBooleanStats(value); - return x; - } - - public static ColumnStatisticsData longStats(LongColumnStatsData value) { - ColumnStatisticsData x = new ColumnStatisticsData(); - x.setLongStats(value); - return x; - } - - public static ColumnStatisticsData doubleStats(DoubleColumnStatsData value) { - ColumnStatisticsData x = new ColumnStatisticsData(); - x.setDoubleStats(value); - return x; - } - - public static ColumnStatisticsData stringStats(StringColumnStatsData value) { - ColumnStatisticsData x = new ColumnStatisticsData(); - x.setStringStats(value); - return x; - } - - public static ColumnStatisticsData binaryStats(BinaryColumnStatsData value) { - ColumnStatisticsData x = new ColumnStatisticsData(); - x.setBinaryStats(value); - return x; - } - - public static ColumnStatisticsData decimalStats(DecimalColumnStatsData value) { - ColumnStatisticsData x = new ColumnStatisticsData(); - x.setDecimalStats(value); - return x; - } - - public static ColumnStatisticsData dateStats(DateColumnStatsData value) { - ColumnStatisticsData x = new ColumnStatisticsData(); - x.setDateStats(value); - return x; - } - - - @Override - protected void checkType(_Fields setField, Object value) throws ClassCastException { - switch (setField) { - case BOOLEAN_STATS: - if (value instanceof BooleanColumnStatsData) { - break; - } - throw new ClassCastException("Was expecting value of type BooleanColumnStatsData for field 'booleanStats', but got " + value.getClass().getSimpleName()); - case LONG_STATS: - if (value instanceof LongColumnStatsData) { - break; - } - throw new ClassCastException("Was expecting value of type LongColumnStatsData for field 'longStats', but got " + value.getClass().getSimpleName()); - case DOUBLE_STATS: - if (value instanceof DoubleColumnStatsData) { - break; - } - throw new ClassCastException("Was expecting value of type DoubleColumnStatsData for field 'doubleStats', but got " + value.getClass().getSimpleName()); - case STRING_STATS: - if (value instanceof StringColumnStatsData) { - break; - } - throw new ClassCastException("Was expecting value of type StringColumnStatsData for field 'stringStats', but got " + value.getClass().getSimpleName()); - case BINARY_STATS: - if (value instanceof BinaryColumnStatsData) { - break; - } - throw new ClassCastException("Was expecting value of type BinaryColumnStatsData for field 'binaryStats', but got " + value.getClass().getSimpleName()); - case DECIMAL_STATS: - if (value instanceof DecimalColumnStatsData) { - break; - } - throw new ClassCastException("Was expecting value of type DecimalColumnStatsData for field 'decimalStats', but got " + value.getClass().getSimpleName()); - case DATE_STATS: - if (value instanceof DateColumnStatsData) { - break; - } - throw new ClassCastException("Was expecting value of type DateColumnStatsData for field 'dateStats', but got " + value.getClass().getSimpleName()); - default: - throw new IllegalArgumentException("Unknown field id " + setField); - } - } - - @Override - protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { - _Fields setField = _Fields.findByThriftId(field.id); - if (setField != null) { - switch (setField) { - case BOOLEAN_STATS: - if (field.type == BOOLEAN_STATS_FIELD_DESC.type) { - BooleanColumnStatsData booleanStats; - booleanStats = new BooleanColumnStatsData(); - booleanStats.read(iprot); - return booleanStats; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case LONG_STATS: - if (field.type == LONG_STATS_FIELD_DESC.type) { - LongColumnStatsData longStats; - longStats = new LongColumnStatsData(); - longStats.read(iprot); - return longStats; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case DOUBLE_STATS: - if (field.type == DOUBLE_STATS_FIELD_DESC.type) { - DoubleColumnStatsData doubleStats; - doubleStats = new DoubleColumnStatsData(); - doubleStats.read(iprot); - return doubleStats; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case STRING_STATS: - if (field.type == STRING_STATS_FIELD_DESC.type) { - StringColumnStatsData stringStats; - stringStats = new StringColumnStatsData(); - stringStats.read(iprot); - return stringStats; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case BINARY_STATS: - if (field.type == BINARY_STATS_FIELD_DESC.type) { - BinaryColumnStatsData binaryStats; - binaryStats = new BinaryColumnStatsData(); - binaryStats.read(iprot); - return binaryStats; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case DECIMAL_STATS: - if (field.type == DECIMAL_STATS_FIELD_DESC.type) { - DecimalColumnStatsData decimalStats; - decimalStats = new DecimalColumnStatsData(); - decimalStats.read(iprot); - return decimalStats; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case DATE_STATS: - if (field.type == DATE_STATS_FIELD_DESC.type) { - DateColumnStatsData dateStats; - dateStats = new DateColumnStatsData(); - dateStats.read(iprot); - return dateStats; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - default: - throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - } - - @Override - protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - switch (setField_) { - case BOOLEAN_STATS: - BooleanColumnStatsData booleanStats = (BooleanColumnStatsData)value_; - booleanStats.write(oprot); - return; - case LONG_STATS: - LongColumnStatsData longStats = (LongColumnStatsData)value_; - longStats.write(oprot); - return; - case DOUBLE_STATS: - DoubleColumnStatsData doubleStats = (DoubleColumnStatsData)value_; - doubleStats.write(oprot); - return; - case STRING_STATS: - StringColumnStatsData stringStats = (StringColumnStatsData)value_; - stringStats.write(oprot); - return; - case BINARY_STATS: - BinaryColumnStatsData binaryStats = (BinaryColumnStatsData)value_; - binaryStats.write(oprot); - return; - case DECIMAL_STATS: - DecimalColumnStatsData decimalStats = (DecimalColumnStatsData)value_; - decimalStats.write(oprot); - return; - case DATE_STATS: - DateColumnStatsData dateStats = (DateColumnStatsData)value_; - dateStats.write(oprot); - return; - default: - throw new IllegalStateException("Cannot write union with unknown field " + setField_); - } - } - - @Override - protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { - _Fields setField = _Fields.findByThriftId(fieldID); - if (setField != null) { - switch (setField) { - case BOOLEAN_STATS: - BooleanColumnStatsData booleanStats; - booleanStats = new BooleanColumnStatsData(); - booleanStats.read(iprot); - return booleanStats; - case LONG_STATS: - LongColumnStatsData longStats; - longStats = new LongColumnStatsData(); - longStats.read(iprot); - return longStats; - case DOUBLE_STATS: - DoubleColumnStatsData doubleStats; - doubleStats = new DoubleColumnStatsData(); - doubleStats.read(iprot); - return doubleStats; - case STRING_STATS: - StringColumnStatsData stringStats; - stringStats = new StringColumnStatsData(); - stringStats.read(iprot); - return stringStats; - case BINARY_STATS: - BinaryColumnStatsData binaryStats; - binaryStats = new BinaryColumnStatsData(); - binaryStats.read(iprot); - return binaryStats; - case DECIMAL_STATS: - DecimalColumnStatsData decimalStats; - decimalStats = new DecimalColumnStatsData(); - decimalStats.read(iprot); - return decimalStats; - case DATE_STATS: - DateColumnStatsData dateStats; - dateStats = new DateColumnStatsData(); - dateStats.read(iprot); - return dateStats; - default: - throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); - } - } else { - throw new TProtocolException("Couldn't find a field with field id " + fieldID); - } - } - - @Override - protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - switch (setField_) { - case BOOLEAN_STATS: - BooleanColumnStatsData booleanStats = (BooleanColumnStatsData)value_; - booleanStats.write(oprot); - return; - case LONG_STATS: - LongColumnStatsData longStats = (LongColumnStatsData)value_; - longStats.write(oprot); - return; - case DOUBLE_STATS: - DoubleColumnStatsData doubleStats = (DoubleColumnStatsData)value_; - doubleStats.write(oprot); - return; - case STRING_STATS: - StringColumnStatsData stringStats = (StringColumnStatsData)value_; - stringStats.write(oprot); - return; - case BINARY_STATS: - BinaryColumnStatsData binaryStats = (BinaryColumnStatsData)value_; - binaryStats.write(oprot); - return; - case DECIMAL_STATS: - DecimalColumnStatsData decimalStats = (DecimalColumnStatsData)value_; - decimalStats.write(oprot); - return; - case DATE_STATS: - DateColumnStatsData dateStats = (DateColumnStatsData)value_; - dateStats.write(oprot); - return; - default: - throw new IllegalStateException("Cannot write union with unknown field " + setField_); - } - } - - @Override - protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { - switch (setField) { - case BOOLEAN_STATS: - return BOOLEAN_STATS_FIELD_DESC; - case LONG_STATS: - return LONG_STATS_FIELD_DESC; - case DOUBLE_STATS: - return DOUBLE_STATS_FIELD_DESC; - case STRING_STATS: - return STRING_STATS_FIELD_DESC; - case BINARY_STATS: - return BINARY_STATS_FIELD_DESC; - case DECIMAL_STATS: - return DECIMAL_STATS_FIELD_DESC; - case DATE_STATS: - return DATE_STATS_FIELD_DESC; - default: - throw new IllegalArgumentException("Unknown field id " + setField); - } - } - - @Override - protected org.apache.thrift.protocol.TStruct getStructDesc() { - return STRUCT_DESC; - } - - @Override - protected _Fields enumForId(short id) { - return _Fields.findByThriftIdOrThrow(id); - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - - public BooleanColumnStatsData getBooleanStats() { - if (getSetField() == _Fields.BOOLEAN_STATS) { - return (BooleanColumnStatsData)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'booleanStats' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void setBooleanStats(BooleanColumnStatsData value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.BOOLEAN_STATS; - value_ = value; - } - - public LongColumnStatsData getLongStats() { - if (getSetField() == _Fields.LONG_STATS) { - return (LongColumnStatsData)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'longStats' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void setLongStats(LongColumnStatsData value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.LONG_STATS; - value_ = value; - } - - public DoubleColumnStatsData getDoubleStats() { - if (getSetField() == _Fields.DOUBLE_STATS) { - return (DoubleColumnStatsData)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'doubleStats' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void setDoubleStats(DoubleColumnStatsData value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.DOUBLE_STATS; - value_ = value; - } - - public StringColumnStatsData getStringStats() { - if (getSetField() == _Fields.STRING_STATS) { - return (StringColumnStatsData)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'stringStats' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void setStringStats(StringColumnStatsData value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.STRING_STATS; - value_ = value; - } - - public BinaryColumnStatsData getBinaryStats() { - if (getSetField() == _Fields.BINARY_STATS) { - return (BinaryColumnStatsData)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'binaryStats' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void setBinaryStats(BinaryColumnStatsData value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.BINARY_STATS; - value_ = value; - } - - public DecimalColumnStatsData getDecimalStats() { - if (getSetField() == _Fields.DECIMAL_STATS) { - return (DecimalColumnStatsData)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'decimalStats' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void setDecimalStats(DecimalColumnStatsData value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.DECIMAL_STATS; - value_ = value; - } - - public DateColumnStatsData getDateStats() { - if (getSetField() == _Fields.DATE_STATS) { - return (DateColumnStatsData)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'dateStats' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void setDateStats(DateColumnStatsData value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.DATE_STATS; - value_ = value; - } - - public boolean isSetBooleanStats() { - return setField_ == _Fields.BOOLEAN_STATS; - } - - - public boolean isSetLongStats() { - return setField_ == _Fields.LONG_STATS; - } - - - public boolean isSetDoubleStats() { - return setField_ == _Fields.DOUBLE_STATS; - } - - - public boolean isSetStringStats() { - return setField_ == _Fields.STRING_STATS; - } - - - public boolean isSetBinaryStats() { - return setField_ == _Fields.BINARY_STATS; - } - - - public boolean isSetDecimalStats() { - return setField_ == _Fields.DECIMAL_STATS; - } - - - public boolean isSetDateStats() { - return setField_ == _Fields.DATE_STATS; - } - - - public boolean equals(Object other) { - if (other instanceof ColumnStatisticsData) { - return equals((ColumnStatisticsData)other); - } else { - return false; - } - } - - public boolean equals(ColumnStatisticsData other) { - return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); - } - - @Override - public int compareTo(ColumnStatisticsData other) { - int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); - if (lastComparison == 0) { - return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); - } - return lastComparison; - } - - - @Override - public int hashCode() { - List list = new ArrayList(); - list.add(this.getClass().getName()); - org.apache.thrift.TFieldIdEnum setField = getSetField(); - if (setField != null) { - list.add(setField.getThriftFieldId()); - Object value = getFieldValue(); - if (value instanceof org.apache.thrift.TEnum) { - list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); - } else { - list.add(value); - } - } - return list.hashCode(); - } - 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); - } - } - - -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java deleted file mode 100644 index daf3d10..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java +++ /dev/null @@ -1,798 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ColumnStatisticsDesc implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatisticsDesc"); - - private static final org.apache.thrift.protocol.TField IS_TBL_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("isTblLevel", org.apache.thrift.protocol.TType.BOOL, (short)1); - private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partName", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField LAST_ANALYZED_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAnalyzed", org.apache.thrift.protocol.TType.I64, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ColumnStatisticsDescStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ColumnStatisticsDescTupleSchemeFactory()); - } - - private boolean isTblLevel; // required - private String dbName; // required - private String tableName; // required - private String partName; // optional - private long lastAnalyzed; // 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 { - IS_TBL_LEVEL((short)1, "isTblLevel"), - DB_NAME((short)2, "dbName"), - TABLE_NAME((short)3, "tableName"), - PART_NAME((short)4, "partName"), - LAST_ANALYZED((short)5, "lastAnalyzed"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // IS_TBL_LEVEL - return IS_TBL_LEVEL; - case 2: // DB_NAME - return DB_NAME; - case 3: // TABLE_NAME - return TABLE_NAME; - case 4: // PART_NAME - return PART_NAME; - case 5: // LAST_ANALYZED - return LAST_ANALYZED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ISTBLLEVEL_ISSET_ID = 0; - private static final int __LASTANALYZED_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.PART_NAME,_Fields.LAST_ANALYZED}; - 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); - tmpMap.put(_Fields.IS_TBL_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("isTblLevel", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("partName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.LAST_ANALYZED, new org.apache.thrift.meta_data.FieldMetaData("lastAnalyzed", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatisticsDesc.class, metaDataMap); - } - - public ColumnStatisticsDesc() { - } - - public ColumnStatisticsDesc( - boolean isTblLevel, - String dbName, - String tableName) - { - this(); - this.isTblLevel = isTblLevel; - setIsTblLevelIsSet(true); - this.dbName = dbName; - this.tableName = tableName; - } - - /** - * Performs a deep copy on other. - */ - public ColumnStatisticsDesc(ColumnStatisticsDesc other) { - __isset_bitfield = other.__isset_bitfield; - this.isTblLevel = other.isTblLevel; - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTableName()) { - this.tableName = other.tableName; - } - if (other.isSetPartName()) { - this.partName = other.partName; - } - this.lastAnalyzed = other.lastAnalyzed; - } - - public ColumnStatisticsDesc deepCopy() { - return new ColumnStatisticsDesc(this); - } - - @Override - public void clear() { - setIsTblLevelIsSet(false); - this.isTblLevel = false; - this.dbName = null; - this.tableName = null; - this.partName = null; - setLastAnalyzedIsSet(false); - this.lastAnalyzed = 0; - } - - public boolean isIsTblLevel() { - return this.isTblLevel; - } - - public void setIsTblLevel(boolean isTblLevel) { - this.isTblLevel = isTblLevel; - setIsTblLevelIsSet(true); - } - - public void unsetIsTblLevel() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTBLLEVEL_ISSET_ID); - } - - /** Returns true if field isTblLevel is set (has been assigned a value) and false otherwise */ - public boolean isSetIsTblLevel() { - return EncodingUtils.testBit(__isset_bitfield, __ISTBLLEVEL_ISSET_ID); - } - - public void setIsTblLevelIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTBLLEVEL_ISSET_ID, value); - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTableName() { - return this.tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public void unsetTableName() { - this.tableName = null; - } - - /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ - public boolean isSetTableName() { - return this.tableName != null; - } - - public void setTableNameIsSet(boolean value) { - if (!value) { - this.tableName = null; - } - } - - public String getPartName() { - return this.partName; - } - - public void setPartName(String partName) { - this.partName = partName; - } - - public void unsetPartName() { - this.partName = null; - } - - /** Returns true if field partName is set (has been assigned a value) and false otherwise */ - public boolean isSetPartName() { - return this.partName != null; - } - - public void setPartNameIsSet(boolean value) { - if (!value) { - this.partName = null; - } - } - - public long getLastAnalyzed() { - return this.lastAnalyzed; - } - - public void setLastAnalyzed(long lastAnalyzed) { - this.lastAnalyzed = lastAnalyzed; - setLastAnalyzedIsSet(true); - } - - public void unsetLastAnalyzed() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTANALYZED_ISSET_ID); - } - - /** Returns true if field lastAnalyzed is set (has been assigned a value) and false otherwise */ - public boolean isSetLastAnalyzed() { - return EncodingUtils.testBit(__isset_bitfield, __LASTANALYZED_ISSET_ID); - } - - public void setLastAnalyzedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTANALYZED_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case IS_TBL_LEVEL: - if (value == null) { - unsetIsTblLevel(); - } else { - setIsTblLevel((Boolean)value); - } - break; - - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTableName(); - } else { - setTableName((String)value); - } - break; - - case PART_NAME: - if (value == null) { - unsetPartName(); - } else { - setPartName((String)value); - } - break; - - case LAST_ANALYZED: - if (value == null) { - unsetLastAnalyzed(); - } else { - setLastAnalyzed((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case IS_TBL_LEVEL: - return isIsTblLevel(); - - case DB_NAME: - return getDbName(); - - case TABLE_NAME: - return getTableName(); - - case PART_NAME: - return getPartName(); - - case LAST_ANALYZED: - return getLastAnalyzed(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case IS_TBL_LEVEL: - return isSetIsTblLevel(); - case DB_NAME: - return isSetDbName(); - case TABLE_NAME: - return isSetTableName(); - case PART_NAME: - return isSetPartName(); - case LAST_ANALYZED: - return isSetLastAnalyzed(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ColumnStatisticsDesc) - return this.equals((ColumnStatisticsDesc)that); - return false; - } - - public boolean equals(ColumnStatisticsDesc that) { - if (that == null) - return false; - - boolean this_present_isTblLevel = true; - boolean that_present_isTblLevel = true; - if (this_present_isTblLevel || that_present_isTblLevel) { - if (!(this_present_isTblLevel && that_present_isTblLevel)) - return false; - if (this.isTblLevel != that.isTblLevel) - return false; - } - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tableName = true && this.isSetTableName(); - boolean that_present_tableName = true && that.isSetTableName(); - if (this_present_tableName || that_present_tableName) { - if (!(this_present_tableName && that_present_tableName)) - return false; - if (!this.tableName.equals(that.tableName)) - return false; - } - - boolean this_present_partName = true && this.isSetPartName(); - boolean that_present_partName = true && that.isSetPartName(); - if (this_present_partName || that_present_partName) { - if (!(this_present_partName && that_present_partName)) - return false; - if (!this.partName.equals(that.partName)) - return false; - } - - boolean this_present_lastAnalyzed = true && this.isSetLastAnalyzed(); - boolean that_present_lastAnalyzed = true && that.isSetLastAnalyzed(); - if (this_present_lastAnalyzed || that_present_lastAnalyzed) { - if (!(this_present_lastAnalyzed && that_present_lastAnalyzed)) - return false; - if (this.lastAnalyzed != that.lastAnalyzed) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_isTblLevel = true; - list.add(present_isTblLevel); - if (present_isTblLevel) - list.add(isTblLevel); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tableName = true && (isSetTableName()); - list.add(present_tableName); - if (present_tableName) - list.add(tableName); - - boolean present_partName = true && (isSetPartName()); - list.add(present_partName); - if (present_partName) - list.add(partName); - - boolean present_lastAnalyzed = true && (isSetLastAnalyzed()); - list.add(present_lastAnalyzed); - if (present_lastAnalyzed) - list.add(lastAnalyzed); - - return list.hashCode(); - } - - @Override - public int compareTo(ColumnStatisticsDesc other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetIsTblLevel()).compareTo(other.isSetIsTblLevel()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsTblLevel()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTblLevel, other.isTblLevel); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartName()).compareTo(other.isSetPartName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partName, other.partName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLastAnalyzed()).compareTo(other.isSetLastAnalyzed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLastAnalyzed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastAnalyzed, other.lastAnalyzed); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ColumnStatisticsDesc("); - boolean first = true; - - sb.append("isTblLevel:"); - sb.append(this.isTblLevel); - first = false; - if (!first) sb.append(", "); - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tableName:"); - if (this.tableName == null) { - sb.append("null"); - } else { - sb.append(this.tableName); - } - first = false; - if (isSetPartName()) { - if (!first) sb.append(", "); - sb.append("partName:"); - if (this.partName == null) { - sb.append("null"); - } else { - sb.append(this.partName); - } - first = false; - } - if (isSetLastAnalyzed()) { - if (!first) sb.append(", "); - sb.append("lastAnalyzed:"); - sb.append(this.lastAnalyzed); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetIsTblLevel()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'isTblLevel' is unset! Struct:" + toString()); - } - - if (!isSetDbName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); - } - - if (!isSetTableName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' is unset! Struct:" + toString()); - } - - // 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 { - // 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 ColumnStatisticsDescStandardSchemeFactory implements SchemeFactory { - public ColumnStatisticsDescStandardScheme getScheme() { - return new ColumnStatisticsDescStandardScheme(); - } - } - - private static class ColumnStatisticsDescStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatisticsDesc 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: // IS_TBL_LEVEL - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isTblLevel = iprot.readBool(); - struct.setIsTblLevelIsSet(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: // PART_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.partName = iprot.readString(); - struct.setPartNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // LAST_ANALYZED - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.lastAnalyzed = iprot.readI64(); - struct.setLastAnalyzedIsSet(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, ColumnStatisticsDesc struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(IS_TBL_LEVEL_FIELD_DESC); - oprot.writeBool(struct.isTblLevel); - 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(); - } - if (struct.partName != null) { - if (struct.isSetPartName()) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(struct.partName); - oprot.writeFieldEnd(); - } - } - if (struct.isSetLastAnalyzed()) { - oprot.writeFieldBegin(LAST_ANALYZED_FIELD_DESC); - oprot.writeI64(struct.lastAnalyzed); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ColumnStatisticsDescTupleSchemeFactory implements SchemeFactory { - public ColumnStatisticsDescTupleScheme getScheme() { - return new ColumnStatisticsDescTupleScheme(); - } - } - - private static class ColumnStatisticsDescTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsDesc struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBool(struct.isTblLevel); - oprot.writeString(struct.dbName); - oprot.writeString(struct.tableName); - BitSet optionals = new BitSet(); - if (struct.isSetPartName()) { - optionals.set(0); - } - if (struct.isSetLastAnalyzed()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetPartName()) { - oprot.writeString(struct.partName); - } - if (struct.isSetLastAnalyzed()) { - oprot.writeI64(struct.lastAnalyzed); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsDesc struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.isTblLevel = iprot.readBool(); - struct.setIsTblLevelIsSet(true); - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - struct.tableName = iprot.readString(); - struct.setTableNameIsSet(true); - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.partName = iprot.readString(); - struct.setPartNameIsSet(true); - } - if (incoming.get(1)) { - struct.lastAnalyzed = iprot.readI64(); - struct.setLastAnalyzedIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java deleted file mode 100644 index 4191beb..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java +++ /dev/null @@ -1,593 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ColumnStatisticsObj implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatisticsObj"); - - private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("colName", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField COL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("colType", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField STATS_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("statsData", org.apache.thrift.protocol.TType.STRUCT, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ColumnStatisticsObjStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ColumnStatisticsObjTupleSchemeFactory()); - } - - private String colName; // required - private String colType; // required - private ColumnStatisticsData statsData; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - COL_NAME((short)1, "colName"), - COL_TYPE((short)2, "colType"), - STATS_DATA((short)3, "statsData"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // COL_NAME - return COL_NAME; - case 2: // COL_TYPE - return COL_TYPE; - case 3: // STATS_DATA - return STATS_DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("colName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("colType", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.STATS_DATA, new org.apache.thrift.meta_data.FieldMetaData("statsData", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsData.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatisticsObj.class, metaDataMap); - } - - public ColumnStatisticsObj() { - } - - public ColumnStatisticsObj( - String colName, - String colType, - ColumnStatisticsData statsData) - { - this(); - this.colName = colName; - this.colType = colType; - this.statsData = statsData; - } - - /** - * Performs a deep copy on other. - */ - public ColumnStatisticsObj(ColumnStatisticsObj other) { - if (other.isSetColName()) { - this.colName = other.colName; - } - if (other.isSetColType()) { - this.colType = other.colType; - } - if (other.isSetStatsData()) { - this.statsData = new ColumnStatisticsData(other.statsData); - } - } - - public ColumnStatisticsObj deepCopy() { - return new ColumnStatisticsObj(this); - } - - @Override - public void clear() { - this.colName = null; - this.colType = null; - this.statsData = null; - } - - public String getColName() { - return this.colName; - } - - public void setColName(String colName) { - this.colName = colName; - } - - public void unsetColName() { - this.colName = null; - } - - /** Returns true if field colName is set (has been assigned a value) and false otherwise */ - public boolean isSetColName() { - return this.colName != null; - } - - public void setColNameIsSet(boolean value) { - if (!value) { - this.colName = null; - } - } - - public String getColType() { - return this.colType; - } - - public void setColType(String colType) { - this.colType = colType; - } - - public void unsetColType() { - this.colType = null; - } - - /** Returns true if field colType is set (has been assigned a value) and false otherwise */ - public boolean isSetColType() { - return this.colType != null; - } - - public void setColTypeIsSet(boolean value) { - if (!value) { - this.colType = null; - } - } - - public ColumnStatisticsData getStatsData() { - return this.statsData; - } - - public void setStatsData(ColumnStatisticsData statsData) { - this.statsData = statsData; - } - - public void unsetStatsData() { - this.statsData = null; - } - - /** Returns true if field statsData is set (has been assigned a value) and false otherwise */ - public boolean isSetStatsData() { - return this.statsData != null; - } - - public void setStatsDataIsSet(boolean value) { - if (!value) { - this.statsData = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case COL_NAME: - if (value == null) { - unsetColName(); - } else { - setColName((String)value); - } - break; - - case COL_TYPE: - if (value == null) { - unsetColType(); - } else { - setColType((String)value); - } - break; - - case STATS_DATA: - if (value == null) { - unsetStatsData(); - } else { - setStatsData((ColumnStatisticsData)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case COL_NAME: - return getColName(); - - case COL_TYPE: - return getColType(); - - case STATS_DATA: - return getStatsData(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case COL_NAME: - return isSetColName(); - case COL_TYPE: - return isSetColType(); - case STATS_DATA: - return isSetStatsData(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ColumnStatisticsObj) - return this.equals((ColumnStatisticsObj)that); - return false; - } - - public boolean equals(ColumnStatisticsObj that) { - if (that == null) - return false; - - boolean this_present_colName = true && this.isSetColName(); - boolean that_present_colName = true && that.isSetColName(); - if (this_present_colName || that_present_colName) { - if (!(this_present_colName && that_present_colName)) - return false; - if (!this.colName.equals(that.colName)) - return false; - } - - boolean this_present_colType = true && this.isSetColType(); - boolean that_present_colType = true && that.isSetColType(); - if (this_present_colType || that_present_colType) { - if (!(this_present_colType && that_present_colType)) - return false; - if (!this.colType.equals(that.colType)) - return false; - } - - boolean this_present_statsData = true && this.isSetStatsData(); - boolean that_present_statsData = true && that.isSetStatsData(); - if (this_present_statsData || that_present_statsData) { - if (!(this_present_statsData && that_present_statsData)) - return false; - if (!this.statsData.equals(that.statsData)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_colName = true && (isSetColName()); - list.add(present_colName); - if (present_colName) - list.add(colName); - - boolean present_colType = true && (isSetColType()); - list.add(present_colType); - if (present_colType) - list.add(colType); - - boolean present_statsData = true && (isSetStatsData()); - list.add(present_statsData); - if (present_statsData) - list.add(statsData); - - return list.hashCode(); - } - - @Override - public int compareTo(ColumnStatisticsObj other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetColName()).compareTo(other.isSetColName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colName, other.colName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetColType()).compareTo(other.isSetColType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colType, other.colType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStatsData()).compareTo(other.isSetStatsData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatsData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statsData, other.statsData); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ColumnStatisticsObj("); - boolean first = true; - - sb.append("colName:"); - if (this.colName == null) { - sb.append("null"); - } else { - sb.append(this.colName); - } - first = false; - if (!first) sb.append(", "); - sb.append("colType:"); - if (this.colType == null) { - sb.append("null"); - } else { - sb.append(this.colType); - } - first = false; - if (!first) sb.append(", "); - sb.append("statsData:"); - if (this.statsData == null) { - sb.append("null"); - } else { - sb.append(this.statsData); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetColName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'colName' is unset! Struct:" + toString()); - } - - if (!isSetColType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'colType' is unset! Struct:" + toString()); - } - - if (!isSetStatsData()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsData' is unset! Struct:" + toString()); - } - - // 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 ColumnStatisticsObjStandardSchemeFactory implements SchemeFactory { - public ColumnStatisticsObjStandardScheme getScheme() { - return new ColumnStatisticsObjStandardScheme(); - } - } - - private static class ColumnStatisticsObjStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatisticsObj 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_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.colName = iprot.readString(); - struct.setColNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COL_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.colType = iprot.readString(); - struct.setColTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // STATS_DATA - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.statsData = new ColumnStatisticsData(); - struct.statsData.read(iprot); - struct.setStatsDataIsSet(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, ColumnStatisticsObj struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.colName != null) { - oprot.writeFieldBegin(COL_NAME_FIELD_DESC); - oprot.writeString(struct.colName); - oprot.writeFieldEnd(); - } - if (struct.colType != null) { - oprot.writeFieldBegin(COL_TYPE_FIELD_DESC); - oprot.writeString(struct.colType); - oprot.writeFieldEnd(); - } - if (struct.statsData != null) { - oprot.writeFieldBegin(STATS_DATA_FIELD_DESC); - struct.statsData.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ColumnStatisticsObjTupleSchemeFactory implements SchemeFactory { - public ColumnStatisticsObjTupleScheme getScheme() { - return new ColumnStatisticsObjTupleScheme(); - } - } - - private static class ColumnStatisticsObjTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsObj struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.colName); - oprot.writeString(struct.colType); - struct.statsData.write(oprot); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsObj struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.colName = iprot.readString(); - struct.setColNameIsSet(true); - struct.colType = iprot.readString(); - struct.setColTypeIsSet(true); - struct.statsData = new ColumnStatisticsData(); - struct.statsData.read(iprot); - struct.setStatsDataIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java deleted file mode 100644 index 77554b7..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java +++ /dev/null @@ -1,387 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class CommitTxnRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CommitTxnRequest"); - - private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CommitTxnRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CommitTxnRequestTupleSchemeFactory()); - } - - private long txnid; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TXNID((short)1, "txnid"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TXNID - return TXNID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TXNID_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CommitTxnRequest.class, metaDataMap); - } - - public CommitTxnRequest() { - } - - public CommitTxnRequest( - long txnid) - { - this(); - this.txnid = txnid; - setTxnidIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public CommitTxnRequest(CommitTxnRequest other) { - __isset_bitfield = other.__isset_bitfield; - this.txnid = other.txnid; - } - - public CommitTxnRequest deepCopy() { - return new CommitTxnRequest(this); - } - - @Override - public void clear() { - setTxnidIsSet(false); - this.txnid = 0; - } - - public long getTxnid() { - return this.txnid; - } - - public void setTxnid(long txnid) { - this.txnid = txnid; - setTxnidIsSet(true); - } - - public void unsetTxnid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ - public boolean isSetTxnid() { - return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - public void setTxnidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TXNID: - if (value == null) { - unsetTxnid(); - } else { - setTxnid((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TXNID: - return getTxnid(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TXNID: - return isSetTxnid(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CommitTxnRequest) - return this.equals((CommitTxnRequest)that); - return false; - } - - public boolean equals(CommitTxnRequest that) { - if (that == null) - return false; - - boolean this_present_txnid = true; - boolean that_present_txnid = true; - if (this_present_txnid || that_present_txnid) { - if (!(this_present_txnid && that_present_txnid)) - return false; - if (this.txnid != that.txnid) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_txnid = true; - list.add(present_txnid); - if (present_txnid) - list.add(txnid); - - return list.hashCode(); - } - - @Override - public int compareTo(CommitTxnRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTxnid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("CommitTxnRequest("); - boolean first = true; - - sb.append("txnid:"); - sb.append(this.txnid); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetTxnid()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnid' is unset! Struct:" + toString()); - } - - // 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 { - // 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 CommitTxnRequestStandardSchemeFactory implements SchemeFactory { - public CommitTxnRequestStandardScheme getScheme() { - return new CommitTxnRequestStandardScheme(); - } - } - - private static class CommitTxnRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CommitTxnRequest 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: // TXNID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(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, CommitTxnRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TXNID_FIELD_DESC); - oprot.writeI64(struct.txnid); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CommitTxnRequestTupleSchemeFactory implements SchemeFactory { - public CommitTxnRequestTupleScheme getScheme() { - return new CommitTxnRequestTupleScheme(); - } - } - - private static class CommitTxnRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CommitTxnRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.txnid); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CommitTxnRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java deleted file mode 100644 index 3acb203..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java +++ /dev/null @@ -1,977 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class CompactionRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CompactionRequest"); - - 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 TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PARTITIONNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionname", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField RUNAS_FIELD_DESC = new org.apache.thrift.protocol.TField("runas", org.apache.thrift.protocol.TType.STRING, (short)5); - 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)6); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CompactionRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CompactionRequestTupleSchemeFactory()); - } - - private String dbname; // required - private String tablename; // required - private String partitionname; // optional - private CompactionType type; // required - private String runas; // optional - private Map properties; // 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 { - DBNAME((short)1, "dbname"), - TABLENAME((short)2, "tablename"), - PARTITIONNAME((short)3, "partitionname"), - /** - * - * @see CompactionType - */ - TYPE((short)4, "type"), - RUNAS((short)5, "runas"), - PROPERTIES((short)6, "properties"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // TABLENAME - return TABLENAME; - case 3: // PARTITIONNAME - return PARTITIONNAME; - case 4: // TYPE - return TYPE; - case 5: // RUNAS - return RUNAS; - case 6: // PROPERTIES - return PROPERTIES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.PARTITIONNAME,_Fields.RUNAS,_Fields.PROPERTIES}; - 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CompactionType.class))); - tmpMap.put(_Fields.RUNAS, new org.apache.thrift.meta_data.FieldMetaData("runas", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("properties", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CompactionRequest.class, metaDataMap); - } - - public CompactionRequest() { - } - - public CompactionRequest( - String dbname, - String tablename, - CompactionType type) - { - this(); - this.dbname = dbname; - this.tablename = tablename; - this.type = type; - } - - /** - * Performs a deep copy on other. - */ - public CompactionRequest(CompactionRequest other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTablename()) { - this.tablename = other.tablename; - } - if (other.isSetPartitionname()) { - this.partitionname = other.partitionname; - } - if (other.isSetType()) { - this.type = other.type; - } - if (other.isSetRunas()) { - this.runas = other.runas; - } - if (other.isSetProperties()) { - Map __this__properties = new HashMap(other.properties); - this.properties = __this__properties; - } - } - - public CompactionRequest deepCopy() { - return new CompactionRequest(this); - } - - @Override - public void clear() { - this.dbname = null; - this.tablename = null; - this.partitionname = null; - this.type = null; - this.runas = null; - this.properties = null; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getTablename() { - return this.tablename; - } - - public void setTablename(String tablename) { - this.tablename = tablename; - } - - public void unsetTablename() { - this.tablename = null; - } - - /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ - public boolean isSetTablename() { - return this.tablename != null; - } - - public void setTablenameIsSet(boolean value) { - if (!value) { - this.tablename = null; - } - } - - public String getPartitionname() { - return this.partitionname; - } - - public void setPartitionname(String partitionname) { - this.partitionname = partitionname; - } - - public void unsetPartitionname() { - this.partitionname = null; - } - - /** Returns true if field partitionname is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitionname() { - return this.partitionname != null; - } - - public void setPartitionnameIsSet(boolean value) { - if (!value) { - this.partitionname = null; - } - } - - /** - * - * @see CompactionType - */ - public CompactionType getType() { - return this.type; - } - - /** - * - * @see CompactionType - */ - public void setType(CompactionType type) { - this.type = type; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - public String getRunas() { - return this.runas; - } - - public void setRunas(String runas) { - this.runas = runas; - } - - public void unsetRunas() { - this.runas = null; - } - - /** Returns true if field runas is set (has been assigned a value) and false otherwise */ - public boolean isSetRunas() { - return this.runas != null; - } - - public void setRunasIsSet(boolean value) { - if (!value) { - this.runas = null; - } - } - - public int getPropertiesSize() { - return (this.properties == null) ? 0 : this.properties.size(); - } - - public void putToProperties(String key, String val) { - if (this.properties == null) { - this.properties = new HashMap(); - } - this.properties.put(key, val); - } - - public Map getProperties() { - return this.properties; - } - - public void setProperties(Map properties) { - this.properties = properties; - } - - public void unsetProperties() { - this.properties = null; - } - - /** Returns true if field properties is set (has been assigned a value) and false otherwise */ - public boolean isSetProperties() { - return this.properties != null; - } - - public void setPropertiesIsSet(boolean value) { - if (!value) { - this.properties = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TABLENAME: - if (value == null) { - unsetTablename(); - } else { - setTablename((String)value); - } - break; - - case PARTITIONNAME: - if (value == null) { - unsetPartitionname(); - } else { - setPartitionname((String)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((CompactionType)value); - } - break; - - case RUNAS: - if (value == null) { - unsetRunas(); - } else { - setRunas((String)value); - } - break; - - case PROPERTIES: - if (value == null) { - unsetProperties(); - } else { - setProperties((Map)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case TABLENAME: - return getTablename(); - - case PARTITIONNAME: - return getPartitionname(); - - case TYPE: - return getType(); - - case RUNAS: - return getRunas(); - - case PROPERTIES: - return getProperties(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case TABLENAME: - return isSetTablename(); - case PARTITIONNAME: - return isSetPartitionname(); - case TYPE: - return isSetType(); - case RUNAS: - return isSetRunas(); - case PROPERTIES: - return isSetProperties(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CompactionRequest) - return this.equals((CompactionRequest)that); - return false; - } - - public boolean equals(CompactionRequest that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tablename = true && this.isSetTablename(); - boolean that_present_tablename = true && that.isSetTablename(); - if (this_present_tablename || that_present_tablename) { - if (!(this_present_tablename && that_present_tablename)) - return false; - if (!this.tablename.equals(that.tablename)) - return false; - } - - boolean this_present_partitionname = true && this.isSetPartitionname(); - boolean that_present_partitionname = true && that.isSetPartitionname(); - if (this_present_partitionname || that_present_partitionname) { - if (!(this_present_partitionname && that_present_partitionname)) - return false; - if (!this.partitionname.equals(that.partitionname)) - return false; - } - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - boolean this_present_runas = true && this.isSetRunas(); - boolean that_present_runas = true && that.isSetRunas(); - if (this_present_runas || that_present_runas) { - if (!(this_present_runas && that_present_runas)) - return false; - if (!this.runas.equals(that.runas)) - return false; - } - - boolean this_present_properties = true && this.isSetProperties(); - boolean that_present_properties = true && that.isSetProperties(); - if (this_present_properties || that_present_properties) { - if (!(this_present_properties && that_present_properties)) - return false; - if (!this.properties.equals(that.properties)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_tablename = true && (isSetTablename()); - list.add(present_tablename); - if (present_tablename) - list.add(tablename); - - boolean present_partitionname = true && (isSetPartitionname()); - list.add(present_partitionname); - if (present_partitionname) - list.add(partitionname); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type.getValue()); - - boolean present_runas = true && (isSetRunas()); - list.add(present_runas); - if (present_runas) - list.add(runas); - - boolean present_properties = true && (isSetProperties()); - list.add(present_properties); - if (present_properties) - list.add(properties); - - return list.hashCode(); - } - - @Override - public int compareTo(CompactionRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTablename()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartitionname()).compareTo(other.isSetPartitionname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitionname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionname, other.partitionname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRunas()).compareTo(other.isSetRunas()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRunas()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runas, other.runas); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetProperties()).compareTo(other.isSetProperties()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProperties()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.properties, other.properties); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("CompactionRequest("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tablename:"); - if (this.tablename == null) { - sb.append("null"); - } else { - sb.append(this.tablename); - } - first = false; - if (isSetPartitionname()) { - if (!first) sb.append(", "); - sb.append("partitionname:"); - if (this.partitionname == null) { - sb.append("null"); - } else { - sb.append(this.partitionname); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - if (isSetRunas()) { - if (!first) sb.append(", "); - sb.append("runas:"); - if (this.runas == null) { - sb.append("null"); - } else { - sb.append(this.runas); - } - first = false; - } - if (isSetProperties()) { - if (!first) sb.append(", "); - sb.append("properties:"); - if (this.properties == null) { - sb.append("null"); - } else { - sb.append(this.properties); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDbname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); - } - - if (!isSetTablename()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString()); - } - - if (!isSetType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); - } - - // 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 CompactionRequestStandardSchemeFactory implements SchemeFactory { - public CompactionRequestStandardScheme getScheme() { - return new CompactionRequestStandardScheme(); - } - } - - private static class CompactionRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CompactionRequest 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: // TABLENAME - 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 3: // PARTITIONNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.partitionname = iprot.readString(); - struct.setPartitionnameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.type = org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // RUNAS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.runas = iprot.readString(); - struct.setRunasIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // PROPERTIES - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map556 = iprot.readMapBegin(); - struct.properties = new HashMap(2*_map556.size); - String _key557; - String _val558; - for (int _i559 = 0; _i559 < _map556.size; ++_i559) - { - _key557 = iprot.readString(); - _val558 = iprot.readString(); - struct.properties.put(_key557, _val558); - } - 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, CompactionRequest 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.tablename != null) { - oprot.writeFieldBegin(TABLENAME_FIELD_DESC); - oprot.writeString(struct.tablename); - oprot.writeFieldEnd(); - } - if (struct.partitionname != null) { - if (struct.isSetPartitionname()) { - oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC); - oprot.writeString(struct.partitionname); - oprot.writeFieldEnd(); - } - } - if (struct.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI32(struct.type.getValue()); - oprot.writeFieldEnd(); - } - if (struct.runas != null) { - if (struct.isSetRunas()) { - oprot.writeFieldBegin(RUNAS_FIELD_DESC); - oprot.writeString(struct.runas); - oprot.writeFieldEnd(); - } - } - if (struct.properties != null) { - if (struct.isSetProperties()) { - 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 _iter560 : struct.properties.entrySet()) - { - oprot.writeString(_iter560.getKey()); - oprot.writeString(_iter560.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CompactionRequestTupleSchemeFactory implements SchemeFactory { - public CompactionRequestTupleScheme getScheme() { - return new CompactionRequestTupleScheme(); - } - } - - private static class CompactionRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CompactionRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dbname); - oprot.writeString(struct.tablename); - oprot.writeI32(struct.type.getValue()); - BitSet optionals = new BitSet(); - if (struct.isSetPartitionname()) { - optionals.set(0); - } - if (struct.isSetRunas()) { - optionals.set(1); - } - if (struct.isSetProperties()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetPartitionname()) { - oprot.writeString(struct.partitionname); - } - if (struct.isSetRunas()) { - oprot.writeString(struct.runas); - } - if (struct.isSetProperties()) { - { - oprot.writeI32(struct.properties.size()); - for (Map.Entry _iter561 : struct.properties.entrySet()) - { - oprot.writeString(_iter561.getKey()); - oprot.writeString(_iter561.getValue()); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CompactionRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dbname = iprot.readString(); - struct.setDbnameIsSet(true); - struct.tablename = iprot.readString(); - struct.setTablenameIsSet(true); - struct.type = org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.partitionname = iprot.readString(); - struct.setPartitionnameIsSet(true); - } - if (incoming.get(1)) { - struct.runas = iprot.readString(); - struct.setRunasIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TMap _map562 = 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*_map562.size); - String _key563; - String _val564; - for (int _i565 = 0; _i565 < _map562.size; ++_i565) - { - _key563 = iprot.readString(); - _val564 = iprot.readString(); - struct.properties.put(_key563, _val564); - } - } - struct.setPropertiesIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionResponse.java deleted file mode 100644 index 157ff53..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionResponse.java +++ /dev/null @@ -1,583 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class CompactionResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CompactionResponse"); - - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField ACCEPTED_FIELD_DESC = new org.apache.thrift.protocol.TField("accepted", org.apache.thrift.protocol.TType.BOOL, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CompactionResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CompactionResponseTupleSchemeFactory()); - } - - private long id; // required - private String state; // required - private boolean accepted; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"), - STATE((short)2, "state"), - ACCEPTED((short)3, "accepted"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ID - return ID; - case 2: // STATE - return STATE; - case 3: // ACCEPTED - return ACCEPTED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ID_ISSET_ID = 0; - private static final int __ACCEPTED_ISSET_ID = 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); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ACCEPTED, new org.apache.thrift.meta_data.FieldMetaData("accepted", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CompactionResponse.class, metaDataMap); - } - - public CompactionResponse() { - } - - public CompactionResponse( - long id, - String state, - boolean accepted) - { - this(); - this.id = id; - setIdIsSet(true); - this.state = state; - this.accepted = accepted; - setAcceptedIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public CompactionResponse(CompactionResponse other) { - __isset_bitfield = other.__isset_bitfield; - this.id = other.id; - if (other.isSetState()) { - this.state = other.state; - } - this.accepted = other.accepted; - } - - public CompactionResponse deepCopy() { - return new CompactionResponse(this); - } - - @Override - public void clear() { - setIdIsSet(false); - this.id = 0; - this.state = null; - setAcceptedIsSet(false); - this.accepted = false; - } - - public long getId() { - return this.id; - } - - public void setId(long id) { - this.id = id; - setIdIsSet(true); - } - - public void unsetId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); - } - - public void setIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); - } - - public String getState() { - return this.state; - } - - public void setState(String state) { - this.state = state; - } - - public void unsetState() { - this.state = null; - } - - /** Returns true if field state is set (has been assigned a value) and false otherwise */ - public boolean isSetState() { - return this.state != null; - } - - public void setStateIsSet(boolean value) { - if (!value) { - this.state = null; - } - } - - public boolean isAccepted() { - return this.accepted; - } - - public void setAccepted(boolean accepted) { - this.accepted = accepted; - setAcceptedIsSet(true); - } - - public void unsetAccepted() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ACCEPTED_ISSET_ID); - } - - /** Returns true if field accepted is set (has been assigned a value) and false otherwise */ - public boolean isSetAccepted() { - return EncodingUtils.testBit(__isset_bitfield, __ACCEPTED_ISSET_ID); - } - - public void setAcceptedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ACCEPTED_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((Long)value); - } - break; - - case STATE: - if (value == null) { - unsetState(); - } else { - setState((String)value); - } - break; - - case ACCEPTED: - if (value == null) { - unsetAccepted(); - } else { - setAccepted((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - case STATE: - return getState(); - - case ACCEPTED: - return isAccepted(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ID: - return isSetId(); - case STATE: - return isSetState(); - case ACCEPTED: - return isSetAccepted(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CompactionResponse) - return this.equals((CompactionResponse)that); - return false; - } - - public boolean equals(CompactionResponse that) { - if (that == null) - return false; - - boolean this_present_id = true; - boolean that_present_id = true; - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (this.id != that.id) - return false; - } - - boolean this_present_state = true && this.isSetState(); - boolean that_present_state = true && that.isSetState(); - if (this_present_state || that_present_state) { - if (!(this_present_state && that_present_state)) - return false; - if (!this.state.equals(that.state)) - return false; - } - - boolean this_present_accepted = true; - boolean that_present_accepted = true; - if (this_present_accepted || that_present_accepted) { - if (!(this_present_accepted && that_present_accepted)) - return false; - if (this.accepted != that.accepted) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_id = true; - list.add(present_id); - if (present_id) - list.add(id); - - boolean present_state = true && (isSetState()); - list.add(present_state); - if (present_state) - list.add(state); - - boolean present_accepted = true; - list.add(present_accepted); - if (present_accepted) - list.add(accepted); - - return list.hashCode(); - } - - @Override - public int compareTo(CompactionResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetState()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAccepted()).compareTo(other.isSetAccepted()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAccepted()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.accepted, other.accepted); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("CompactionResponse("); - boolean first = true; - - sb.append("id:"); - sb.append(this.id); - first = false; - if (!first) sb.append(", "); - sb.append("state:"); - if (this.state == null) { - sb.append("null"); - } else { - sb.append(this.state); - } - first = false; - if (!first) sb.append(", "); - sb.append("accepted:"); - sb.append(this.accepted); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString()); - } - - if (!isSetState()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); - } - - if (!isSetAccepted()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'accepted' is unset! Struct:" + toString()); - } - - // 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 { - // 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 CompactionResponseStandardSchemeFactory implements SchemeFactory { - public CompactionResponseStandardScheme getScheme() { - return new CompactionResponseStandardScheme(); - } - } - - private static class CompactionResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CompactionResponse 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: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.id = iprot.readI64(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STATE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.state = iprot.readString(); - struct.setStateIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ACCEPTED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.accepted = iprot.readBool(); - struct.setAcceptedIsSet(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, CompactionResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeI64(struct.id); - oprot.writeFieldEnd(); - if (struct.state != null) { - oprot.writeFieldBegin(STATE_FIELD_DESC); - oprot.writeString(struct.state); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ACCEPTED_FIELD_DESC); - oprot.writeBool(struct.accepted); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CompactionResponseTupleSchemeFactory implements SchemeFactory { - public CompactionResponseTupleScheme getScheme() { - return new CompactionResponseTupleScheme(); - } - } - - private static class CompactionResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CompactionResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.id); - oprot.writeString(struct.state); - oprot.writeBool(struct.accepted); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CompactionResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.id = iprot.readI64(); - struct.setIdIsSet(true); - struct.state = iprot.readString(); - struct.setStateIsSet(true); - struct.accepted = iprot.readBool(); - struct.setAcceptedIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionType.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionType.java deleted file mode 100644 index 7450b27..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionType.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum CompactionType implements org.apache.thrift.TEnum { - MINOR(1), - MAJOR(2); - - private final int value; - - private CompactionType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static CompactionType findByValue(int value) { - switch (value) { - case 1: - return MINOR; - case 2: - return MAJOR; - default: - return null; - } - } -} diff --git 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 deleted file mode 100644 index d454a96..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ConfigValSecurityException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ConfigValSecurityException.class, metaDataMap); - } - - public ConfigValSecurityException() { - } - - public ConfigValSecurityException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public ConfigValSecurityException(ConfigValSecurityException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public ConfigValSecurityException deepCopy() { - return new ConfigValSecurityException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ConfigValSecurityException) - return this.equals((ConfigValSecurityException)that); - return false; - } - - public boolean equals(ConfigValSecurityException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(ConfigValSecurityException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ConfigValSecurityException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 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); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CurrentNotificationEventId.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CurrentNotificationEventId.java deleted file mode 100644 index 2565a08..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CurrentNotificationEventId.java +++ /dev/null @@ -1,387 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class CurrentNotificationEventId implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CurrentNotificationEventId"); - - private static final org.apache.thrift.protocol.TField EVENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("eventId", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CurrentNotificationEventIdStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CurrentNotificationEventIdTupleSchemeFactory()); - } - - private long eventId; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - EVENT_ID((short)1, "eventId"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // EVENT_ID - return EVENT_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __EVENTID_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.EVENT_ID, new org.apache.thrift.meta_data.FieldMetaData("eventId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CurrentNotificationEventId.class, metaDataMap); - } - - public CurrentNotificationEventId() { - } - - public CurrentNotificationEventId( - long eventId) - { - this(); - this.eventId = eventId; - setEventIdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public CurrentNotificationEventId(CurrentNotificationEventId other) { - __isset_bitfield = other.__isset_bitfield; - this.eventId = other.eventId; - } - - public CurrentNotificationEventId deepCopy() { - return new CurrentNotificationEventId(this); - } - - @Override - public void clear() { - setEventIdIsSet(false); - this.eventId = 0; - } - - public long getEventId() { - return this.eventId; - } - - public void setEventId(long eventId) { - this.eventId = eventId; - setEventIdIsSet(true); - } - - public void unsetEventId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EVENTID_ISSET_ID); - } - - /** Returns true if field eventId is set (has been assigned a value) and false otherwise */ - public boolean isSetEventId() { - return EncodingUtils.testBit(__isset_bitfield, __EVENTID_ISSET_ID); - } - - public void setEventIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EVENTID_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case EVENT_ID: - if (value == null) { - unsetEventId(); - } else { - setEventId((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case EVENT_ID: - return getEventId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case EVENT_ID: - return isSetEventId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CurrentNotificationEventId) - return this.equals((CurrentNotificationEventId)that); - return false; - } - - public boolean equals(CurrentNotificationEventId that) { - if (that == null) - return false; - - boolean this_present_eventId = true; - boolean that_present_eventId = true; - if (this_present_eventId || that_present_eventId) { - if (!(this_present_eventId && that_present_eventId)) - return false; - if (this.eventId != that.eventId) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_eventId = true; - list.add(present_eventId); - if (present_eventId) - list.add(eventId); - - return list.hashCode(); - } - - @Override - public int compareTo(CurrentNotificationEventId other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetEventId()).compareTo(other.isSetEventId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEventId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventId, other.eventId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("CurrentNotificationEventId("); - boolean first = true; - - sb.append("eventId:"); - sb.append(this.eventId); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetEventId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'eventId' is unset! Struct:" + toString()); - } - - // 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 { - // 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 CurrentNotificationEventIdStandardSchemeFactory implements SchemeFactory { - public CurrentNotificationEventIdStandardScheme getScheme() { - return new CurrentNotificationEventIdStandardScheme(); - } - } - - private static class CurrentNotificationEventIdStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CurrentNotificationEventId 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: // EVENT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.eventId = iprot.readI64(); - struct.setEventIdIsSet(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, CurrentNotificationEventId struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(EVENT_ID_FIELD_DESC); - oprot.writeI64(struct.eventId); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CurrentNotificationEventIdTupleSchemeFactory implements SchemeFactory { - public CurrentNotificationEventIdTupleScheme getScheme() { - return new CurrentNotificationEventIdTupleScheme(); - } - } - - private static class CurrentNotificationEventIdTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CurrentNotificationEventId struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.eventId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CurrentNotificationEventId struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.eventId = iprot.readI64(); - struct.setEventIdIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java deleted file mode 100644 index 15a6e9a..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum DataOperationType implements org.apache.thrift.TEnum { - SELECT(1), - INSERT(2), - UPDATE(3), - DELETE(4), - UNSET(5), - NO_TXN(6); - - private final int value; - - private DataOperationType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static DataOperationType findByValue(int value) { - switch (value) { - case 1: - return SELECT; - case 2: - return INSERT; - case 3: - return UPDATE; - case 4: - return DELETE; - case 5: - return UNSET; - case 6: - return NO_TXN; - default: - return null; - } - } -} diff --git 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 deleted file mode 100644 index 2769845..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java +++ /dev/null @@ -1,1095 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class Database implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Database"); - - 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 DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField LOCATION_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("locationUri", org.apache.thrift.protocol.TType.STRING, (short)3); - 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 org.apache.thrift.protocol.TField OWNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerName", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField OWNER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerType", org.apache.thrift.protocol.TType.I32, (short)7); - - 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; // optional - private String ownerName; // optional - private PrincipalType ownerType; // 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 { - NAME((short)1, "name"), - DESCRIPTION((short)2, "description"), - LOCATION_URI((short)3, "locationUri"), - PARAMETERS((short)4, "parameters"), - PRIVILEGES((short)5, "privileges"), - OWNER_NAME((short)6, "ownerName"), - /** - * - * @see PrincipalType - */ - OWNER_TYPE((short)7, "ownerType"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // DESCRIPTION - return DESCRIPTION; - case 3: // LOCATION_URI - return LOCATION_URI; - case 4: // PARAMETERS - return PARAMETERS; - case 5: // PRIVILEGES - return PRIVILEGES; - case 6: // OWNER_NAME - return OWNER_NAME; - case 7: // OWNER_TYPE - return OWNER_TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.PRIVILEGES,_Fields.OWNER_NAME,_Fields.OWNER_TYPE}; - 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); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.LOCATION_URI, new org.apache.thrift.meta_data.FieldMetaData("locationUri", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrincipalPrivilegeSet.class))); - tmpMap.put(_Fields.OWNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("ownerName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.OWNER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("ownerType", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Database.class, metaDataMap); - } - - public Database() { - } - - public Database( - String name, - String description, - String locationUri, - Map parameters) - { - this(); - this.name = name; - this.description = description; - this.locationUri = locationUri; - this.parameters = parameters; - } - - /** - * Performs a deep copy on other. - */ - public Database(Database other) { - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetDescription()) { - this.description = other.description; - } - if (other.isSetLocationUri()) { - this.locationUri = other.locationUri; - } - if (other.isSetParameters()) { - Map __this__parameters = new HashMap(other.parameters); - this.parameters = __this__parameters; - } - if (other.isSetPrivileges()) { - this.privileges = new PrincipalPrivilegeSet(other.privileges); - } - if (other.isSetOwnerName()) { - this.ownerName = other.ownerName; - } - if (other.isSetOwnerType()) { - this.ownerType = other.ownerType; - } - } - - public Database deepCopy() { - return new Database(this); - } - - @Override - public void clear() { - this.name = null; - this.description = null; - this.locationUri = null; - this.parameters = null; - this.privileges = null; - this.ownerName = null; - this.ownerType = null; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public String getDescription() { - return this.description; - } - - public void setDescription(String description) { - this.description = description; - } - - public void unsetDescription() { - this.description = null; - } - - /** Returns true if field description is set (has been assigned a value) and false otherwise */ - public boolean isSetDescription() { - return this.description != null; - } - - public void setDescriptionIsSet(boolean value) { - if (!value) { - this.description = null; - } - } - - public String getLocationUri() { - return this.locationUri; - } - - public void setLocationUri(String locationUri) { - this.locationUri = locationUri; - } - - public void unsetLocationUri() { - this.locationUri = null; - } - - /** Returns true if field locationUri is set (has been assigned a value) and false otherwise */ - public boolean isSetLocationUri() { - return this.locationUri != null; - } - - public void setLocationUriIsSet(boolean value) { - if (!value) { - this.locationUri = null; - } - } - - public int getParametersSize() { - return (this.parameters == null) ? 0 : this.parameters.size(); - } - - public void putToParameters(String key, String val) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(key, val); - } - - public Map getParameters() { - return this.parameters; - } - - public void setParameters(Map parameters) { - this.parameters = parameters; - } - - public void unsetParameters() { - this.parameters = null; - } - - /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ - public boolean isSetParameters() { - return this.parameters != null; - } - - public void setParametersIsSet(boolean value) { - if (!value) { - this.parameters = null; - } - } - - public PrincipalPrivilegeSet getPrivileges() { - return this.privileges; - } - - public void setPrivileges(PrincipalPrivilegeSet privileges) { - this.privileges = privileges; - } - - public void unsetPrivileges() { - this.privileges = null; - } - - /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ - public boolean isSetPrivileges() { - return this.privileges != null; - } - - public void setPrivilegesIsSet(boolean value) { - if (!value) { - this.privileges = null; - } - } - - public String getOwnerName() { - return this.ownerName; - } - - public void setOwnerName(String ownerName) { - this.ownerName = ownerName; - } - - public void unsetOwnerName() { - this.ownerName = null; - } - - /** Returns true if field ownerName is set (has been assigned a value) and false otherwise */ - public boolean isSetOwnerName() { - return this.ownerName != null; - } - - public void setOwnerNameIsSet(boolean value) { - if (!value) { - this.ownerName = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getOwnerType() { - return this.ownerType; - } - - /** - * - * @see PrincipalType - */ - public void setOwnerType(PrincipalType ownerType) { - this.ownerType = ownerType; - } - - public void unsetOwnerType() { - this.ownerType = null; - } - - /** Returns true if field ownerType is set (has been assigned a value) and false otherwise */ - public boolean isSetOwnerType() { - return this.ownerType != null; - } - - public void setOwnerTypeIsSet(boolean value) { - if (!value) { - this.ownerType = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case DESCRIPTION: - if (value == null) { - unsetDescription(); - } else { - setDescription((String)value); - } - break; - - case LOCATION_URI: - if (value == null) { - unsetLocationUri(); - } else { - setLocationUri((String)value); - } - break; - - case PARAMETERS: - if (value == null) { - unsetParameters(); - } else { - setParameters((Map)value); - } - break; - - case PRIVILEGES: - if (value == null) { - unsetPrivileges(); - } else { - setPrivileges((PrincipalPrivilegeSet)value); - } - break; - - case OWNER_NAME: - if (value == null) { - unsetOwnerName(); - } else { - setOwnerName((String)value); - } - break; - - case OWNER_TYPE: - if (value == null) { - unsetOwnerType(); - } else { - setOwnerType((PrincipalType)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - case DESCRIPTION: - return getDescription(); - - case LOCATION_URI: - return getLocationUri(); - - case PARAMETERS: - return getParameters(); - - case PRIVILEGES: - return getPrivileges(); - - case OWNER_NAME: - return getOwnerName(); - - case OWNER_TYPE: - return getOwnerType(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - case DESCRIPTION: - return isSetDescription(); - case LOCATION_URI: - return isSetLocationUri(); - case PARAMETERS: - return isSetParameters(); - case PRIVILEGES: - return isSetPrivileges(); - case OWNER_NAME: - return isSetOwnerName(); - case OWNER_TYPE: - return isSetOwnerType(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Database) - return this.equals((Database)that); - return false; - } - - public boolean equals(Database that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_description = true && this.isSetDescription(); - boolean that_present_description = true && that.isSetDescription(); - if (this_present_description || that_present_description) { - if (!(this_present_description && that_present_description)) - return false; - if (!this.description.equals(that.description)) - return false; - } - - boolean this_present_locationUri = true && this.isSetLocationUri(); - boolean that_present_locationUri = true && that.isSetLocationUri(); - if (this_present_locationUri || that_present_locationUri) { - if (!(this_present_locationUri && that_present_locationUri)) - return false; - if (!this.locationUri.equals(that.locationUri)) - return false; - } - - boolean this_present_parameters = true && this.isSetParameters(); - boolean that_present_parameters = true && that.isSetParameters(); - if (this_present_parameters || that_present_parameters) { - if (!(this_present_parameters && that_present_parameters)) - return false; - if (!this.parameters.equals(that.parameters)) - return false; - } - - boolean this_present_privileges = true && this.isSetPrivileges(); - boolean that_present_privileges = true && that.isSetPrivileges(); - if (this_present_privileges || that_present_privileges) { - if (!(this_present_privileges && that_present_privileges)) - return false; - if (!this.privileges.equals(that.privileges)) - return false; - } - - boolean this_present_ownerName = true && this.isSetOwnerName(); - boolean that_present_ownerName = true && that.isSetOwnerName(); - if (this_present_ownerName || that_present_ownerName) { - if (!(this_present_ownerName && that_present_ownerName)) - return false; - if (!this.ownerName.equals(that.ownerName)) - return false; - } - - boolean this_present_ownerType = true && this.isSetOwnerType(); - boolean that_present_ownerType = true && that.isSetOwnerType(); - if (this_present_ownerType || that_present_ownerType) { - if (!(this_present_ownerType && that_present_ownerType)) - return false; - if (!this.ownerType.equals(that.ownerType)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); - - boolean present_description = true && (isSetDescription()); - list.add(present_description); - if (present_description) - list.add(description); - - boolean present_locationUri = true && (isSetLocationUri()); - list.add(present_locationUri); - if (present_locationUri) - list.add(locationUri); - - boolean present_parameters = true && (isSetParameters()); - list.add(present_parameters); - if (present_parameters) - list.add(parameters); - - boolean present_privileges = true && (isSetPrivileges()); - list.add(present_privileges); - if (present_privileges) - list.add(privileges); - - boolean present_ownerName = true && (isSetOwnerName()); - list.add(present_ownerName); - if (present_ownerName) - list.add(ownerName); - - boolean present_ownerType = true && (isSetOwnerType()); - list.add(present_ownerType); - if (present_ownerType) - list.add(ownerType.getValue()); - - return list.hashCode(); - } - - @Override - public int compareTo(Database other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDescription()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLocationUri()).compareTo(other.isSetLocationUri()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLocationUri()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.locationUri, other.locationUri); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParameters()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrivileges()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOwnerName()).compareTo(other.isSetOwnerName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOwnerName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerName, other.ownerName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOwnerType()).compareTo(other.isSetOwnerType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOwnerType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerType, other.ownerType); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("Database("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("description:"); - if (this.description == null) { - sb.append("null"); - } else { - sb.append(this.description); - } - first = false; - if (!first) sb.append(", "); - sb.append("locationUri:"); - if (this.locationUri == null) { - sb.append("null"); - } else { - sb.append(this.locationUri); - } - first = false; - if (!first) sb.append(", "); - sb.append("parameters:"); - if (this.parameters == null) { - sb.append("null"); - } else { - sb.append(this.parameters); - } - first = false; - if (isSetPrivileges()) { - if (!first) sb.append(", "); - sb.append("privileges:"); - if (this.privileges == null) { - sb.append("null"); - } else { - sb.append(this.privileges); - } - first = false; - } - if (isSetOwnerName()) { - if (!first) sb.append(", "); - sb.append("ownerName:"); - if (this.ownerName == null) { - sb.append("null"); - } else { - sb.append(this.ownerName); - } - first = false; - } - if (isSetOwnerType()) { - if (!first) sb.append(", "); - sb.append("ownerType:"); - if (this.ownerType == null) { - sb.append("null"); - } else { - sb.append(this.ownerType); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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 _map94 = iprot.readMapBegin(); - struct.parameters = new HashMap(2*_map94.size); - String _key95; - String _val96; - for (int _i97 = 0; _i97 < _map94.size; ++_i97) - { - _key95 = iprot.readString(); - _val96 = iprot.readString(); - struct.parameters.put(_key95, _val96); - } - 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; - case 6: // 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; - case 7: // OWNER_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.ownerType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setOwnerTypeIsSet(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 _iter98 : struct.parameters.entrySet()) - { - oprot.writeString(_iter98.getKey()); - oprot.writeString(_iter98.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.privileges != null) { - if (struct.isSetPrivileges()) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - struct.privileges.write(oprot); - oprot.writeFieldEnd(); - } - } - if (struct.ownerName != null) { - if (struct.isSetOwnerName()) { - oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); - oprot.writeString(struct.ownerName); - oprot.writeFieldEnd(); - } - } - if (struct.ownerType != null) { - if (struct.isSetOwnerType()) { - oprot.writeFieldBegin(OWNER_TYPE_FIELD_DESC); - oprot.writeI32(struct.ownerType.getValue()); - 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); - } - if (struct.isSetOwnerName()) { - optionals.set(5); - } - if (struct.isSetOwnerType()) { - optionals.set(6); - } - oprot.writeBitSet(optionals, 7); - 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 _iter99 : struct.parameters.entrySet()) - { - oprot.writeString(_iter99.getKey()); - oprot.writeString(_iter99.getValue()); - } - } - } - if (struct.isSetPrivileges()) { - struct.privileges.write(oprot); - } - if (struct.isSetOwnerName()) { - oprot.writeString(struct.ownerName); - } - if (struct.isSetOwnerType()) { - oprot.writeI32(struct.ownerType.getValue()); - } - } - - @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(7); - 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 _map100 = 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*_map100.size); - String _key101; - String _val102; - for (int _i103 = 0; _i103 < _map100.size; ++_i103) - { - _key101 = iprot.readString(); - _val102 = iprot.readString(); - struct.parameters.put(_key101, _val102); - } - } - struct.setParametersIsSet(true); - } - if (incoming.get(4)) { - struct.privileges = new PrincipalPrivilegeSet(); - struct.privileges.read(iprot); - struct.setPrivilegesIsSet(true); - } - if (incoming.get(5)) { - struct.ownerName = iprot.readString(); - struct.setOwnerNameIsSet(true); - } - if (incoming.get(6)) { - struct.ownerType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setOwnerTypeIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Date.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Date.java deleted file mode 100644 index bf064e5..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Date.java +++ /dev/null @@ -1,387 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class Date implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Date"); - - private static final org.apache.thrift.protocol.TField DAYS_SINCE_EPOCH_FIELD_DESC = new org.apache.thrift.protocol.TField("daysSinceEpoch", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DateStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DateTupleSchemeFactory()); - } - - private long daysSinceEpoch; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DAYS_SINCE_EPOCH((short)1, "daysSinceEpoch"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DAYS_SINCE_EPOCH - return DAYS_SINCE_EPOCH; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DAYSSINCEEPOCH_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DAYS_SINCE_EPOCH, new org.apache.thrift.meta_data.FieldMetaData("daysSinceEpoch", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Date.class, metaDataMap); - } - - public Date() { - } - - public Date( - long daysSinceEpoch) - { - this(); - this.daysSinceEpoch = daysSinceEpoch; - setDaysSinceEpochIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public Date(Date other) { - __isset_bitfield = other.__isset_bitfield; - this.daysSinceEpoch = other.daysSinceEpoch; - } - - public Date deepCopy() { - return new Date(this); - } - - @Override - public void clear() { - setDaysSinceEpochIsSet(false); - this.daysSinceEpoch = 0; - } - - public long getDaysSinceEpoch() { - return this.daysSinceEpoch; - } - - public void setDaysSinceEpoch(long daysSinceEpoch) { - this.daysSinceEpoch = daysSinceEpoch; - setDaysSinceEpochIsSet(true); - } - - public void unsetDaysSinceEpoch() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DAYSSINCEEPOCH_ISSET_ID); - } - - /** Returns true if field daysSinceEpoch is set (has been assigned a value) and false otherwise */ - public boolean isSetDaysSinceEpoch() { - return EncodingUtils.testBit(__isset_bitfield, __DAYSSINCEEPOCH_ISSET_ID); - } - - public void setDaysSinceEpochIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DAYSSINCEEPOCH_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DAYS_SINCE_EPOCH: - if (value == null) { - unsetDaysSinceEpoch(); - } else { - setDaysSinceEpoch((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DAYS_SINCE_EPOCH: - return getDaysSinceEpoch(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DAYS_SINCE_EPOCH: - return isSetDaysSinceEpoch(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Date) - return this.equals((Date)that); - return false; - } - - public boolean equals(Date that) { - if (that == null) - return false; - - boolean this_present_daysSinceEpoch = true; - boolean that_present_daysSinceEpoch = true; - if (this_present_daysSinceEpoch || that_present_daysSinceEpoch) { - if (!(this_present_daysSinceEpoch && that_present_daysSinceEpoch)) - return false; - if (this.daysSinceEpoch != that.daysSinceEpoch) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_daysSinceEpoch = true; - list.add(present_daysSinceEpoch); - if (present_daysSinceEpoch) - list.add(daysSinceEpoch); - - return list.hashCode(); - } - - @Override - public int compareTo(Date other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDaysSinceEpoch()).compareTo(other.isSetDaysSinceEpoch()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDaysSinceEpoch()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.daysSinceEpoch, other.daysSinceEpoch); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("Date("); - boolean first = true; - - sb.append("daysSinceEpoch:"); - sb.append(this.daysSinceEpoch); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDaysSinceEpoch()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'daysSinceEpoch' is unset! Struct:" + toString()); - } - - // 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 { - // 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 DateStandardSchemeFactory implements SchemeFactory { - public DateStandardScheme getScheme() { - return new DateStandardScheme(); - } - } - - private static class DateStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, Date 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: // DAYS_SINCE_EPOCH - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.daysSinceEpoch = iprot.readI64(); - struct.setDaysSinceEpochIsSet(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, Date struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(DAYS_SINCE_EPOCH_FIELD_DESC); - oprot.writeI64(struct.daysSinceEpoch); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DateTupleSchemeFactory implements SchemeFactory { - public DateTupleScheme getScheme() { - return new DateTupleScheme(); - } - } - - private static class DateTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Date struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.daysSinceEpoch); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Date struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.daysSinceEpoch = iprot.readI64(); - struct.setDaysSinceEpochIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DateColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DateColumnStatsData.java deleted file mode 100644 index edc87a1..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DateColumnStatsData.java +++ /dev/null @@ -1,814 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class DateColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DateColumnStatsData"); - - private static final org.apache.thrift.protocol.TField LOW_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("lowValue", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField HIGH_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("highValue", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DateColumnStatsDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DateColumnStatsDataTupleSchemeFactory()); - } - - private Date lowValue; // optional - private Date highValue; // optional - private long numNulls; // required - private long numDVs; // required - private String bitVectors; // 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 { - LOW_VALUE((short)1, "lowValue"), - HIGH_VALUE((short)2, "highValue"), - NUM_NULLS((short)3, "numNulls"), - NUM_DVS((short)4, "numDVs"), - BIT_VECTORS((short)5, "bitVectors"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // LOW_VALUE - return LOW_VALUE; - case 2: // HIGH_VALUE - return HIGH_VALUE; - case 3: // NUM_NULLS - return NUM_NULLS; - case 4: // NUM_DVS - return NUM_DVS; - case 5: // BIT_VECTORS - return BIT_VECTORS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __NUMNULLS_ISSET_ID = 0; - private static final int __NUMDVS_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.LOW_VALUE,_Fields.HIGH_VALUE,_Fields.BIT_VECTORS}; - 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); - tmpMap.put(_Fields.LOW_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lowValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Date.class))); - tmpMap.put(_Fields.HIGH_VALUE, new org.apache.thrift.meta_data.FieldMetaData("highValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Date.class))); - tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DateColumnStatsData.class, metaDataMap); - } - - public DateColumnStatsData() { - } - - public DateColumnStatsData( - long numNulls, - long numDVs) - { - this(); - this.numNulls = numNulls; - setNumNullsIsSet(true); - this.numDVs = numDVs; - setNumDVsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public DateColumnStatsData(DateColumnStatsData other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetLowValue()) { - this.lowValue = new Date(other.lowValue); - } - if (other.isSetHighValue()) { - this.highValue = new Date(other.highValue); - } - this.numNulls = other.numNulls; - this.numDVs = other.numDVs; - if (other.isSetBitVectors()) { - this.bitVectors = other.bitVectors; - } - } - - public DateColumnStatsData deepCopy() { - return new DateColumnStatsData(this); - } - - @Override - public void clear() { - this.lowValue = null; - this.highValue = null; - setNumNullsIsSet(false); - this.numNulls = 0; - setNumDVsIsSet(false); - this.numDVs = 0; - this.bitVectors = null; - } - - public Date getLowValue() { - return this.lowValue; - } - - public void setLowValue(Date lowValue) { - this.lowValue = lowValue; - } - - public void unsetLowValue() { - this.lowValue = null; - } - - /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ - public boolean isSetLowValue() { - return this.lowValue != null; - } - - public void setLowValueIsSet(boolean value) { - if (!value) { - this.lowValue = null; - } - } - - public Date getHighValue() { - return this.highValue; - } - - public void setHighValue(Date highValue) { - this.highValue = highValue; - } - - public void unsetHighValue() { - this.highValue = null; - } - - /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ - public boolean isSetHighValue() { - return this.highValue != null; - } - - public void setHighValueIsSet(boolean value) { - if (!value) { - this.highValue = null; - } - } - - public long getNumNulls() { - return this.numNulls; - } - - public void setNumNulls(long numNulls) { - this.numNulls = numNulls; - setNumNullsIsSet(true); - } - - public void unsetNumNulls() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ - public boolean isSetNumNulls() { - return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - public void setNumNullsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); - } - - public long getNumDVs() { - return this.numDVs; - } - - public void setNumDVs(long numDVs) { - this.numDVs = numDVs; - setNumDVsIsSet(true); - } - - public void unsetNumDVs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); - } - - /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ - public boolean isSetNumDVs() { - return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); - } - - public void setNumDVsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); - } - - public String getBitVectors() { - return this.bitVectors; - } - - public void setBitVectors(String bitVectors) { - this.bitVectors = bitVectors; - } - - public void unsetBitVectors() { - this.bitVectors = null; - } - - /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ - public boolean isSetBitVectors() { - return this.bitVectors != null; - } - - public void setBitVectorsIsSet(boolean value) { - if (!value) { - this.bitVectors = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LOW_VALUE: - if (value == null) { - unsetLowValue(); - } else { - setLowValue((Date)value); - } - break; - - case HIGH_VALUE: - if (value == null) { - unsetHighValue(); - } else { - setHighValue((Date)value); - } - break; - - case NUM_NULLS: - if (value == null) { - unsetNumNulls(); - } else { - setNumNulls((Long)value); - } - break; - - case NUM_DVS: - if (value == null) { - unsetNumDVs(); - } else { - setNumDVs((Long)value); - } - break; - - case BIT_VECTORS: - if (value == null) { - unsetBitVectors(); - } else { - setBitVectors((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LOW_VALUE: - return getLowValue(); - - case HIGH_VALUE: - return getHighValue(); - - case NUM_NULLS: - return getNumNulls(); - - case NUM_DVS: - return getNumDVs(); - - case BIT_VECTORS: - return getBitVectors(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LOW_VALUE: - return isSetLowValue(); - case HIGH_VALUE: - return isSetHighValue(); - case NUM_NULLS: - return isSetNumNulls(); - case NUM_DVS: - return isSetNumDVs(); - case BIT_VECTORS: - return isSetBitVectors(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DateColumnStatsData) - return this.equals((DateColumnStatsData)that); - return false; - } - - public boolean equals(DateColumnStatsData that) { - if (that == null) - return false; - - boolean this_present_lowValue = true && this.isSetLowValue(); - boolean that_present_lowValue = true && that.isSetLowValue(); - if (this_present_lowValue || that_present_lowValue) { - if (!(this_present_lowValue && that_present_lowValue)) - return false; - if (!this.lowValue.equals(that.lowValue)) - return false; - } - - boolean this_present_highValue = true && this.isSetHighValue(); - boolean that_present_highValue = true && that.isSetHighValue(); - if (this_present_highValue || that_present_highValue) { - if (!(this_present_highValue && that_present_highValue)) - return false; - if (!this.highValue.equals(that.highValue)) - return false; - } - - boolean this_present_numNulls = true; - boolean that_present_numNulls = true; - if (this_present_numNulls || that_present_numNulls) { - if (!(this_present_numNulls && that_present_numNulls)) - return false; - if (this.numNulls != that.numNulls) - return false; - } - - boolean this_present_numDVs = true; - boolean that_present_numDVs = true; - if (this_present_numDVs || that_present_numDVs) { - if (!(this_present_numDVs && that_present_numDVs)) - return false; - if (this.numDVs != that.numDVs) - return false; - } - - boolean this_present_bitVectors = true && this.isSetBitVectors(); - boolean that_present_bitVectors = true && that.isSetBitVectors(); - if (this_present_bitVectors || that_present_bitVectors) { - if (!(this_present_bitVectors && that_present_bitVectors)) - return false; - if (!this.bitVectors.equals(that.bitVectors)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_lowValue = true && (isSetLowValue()); - list.add(present_lowValue); - if (present_lowValue) - list.add(lowValue); - - boolean present_highValue = true && (isSetHighValue()); - list.add(present_highValue); - if (present_highValue) - list.add(highValue); - - boolean present_numNulls = true; - list.add(present_numNulls); - if (present_numNulls) - list.add(numNulls); - - boolean present_numDVs = true; - list.add(present_numDVs); - if (present_numDVs) - list.add(numDVs); - - boolean present_bitVectors = true && (isSetBitVectors()); - list.add(present_bitVectors); - if (present_bitVectors) - list.add(bitVectors); - - return list.hashCode(); - } - - @Override - public int compareTo(DateColumnStatsData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLowValue()).compareTo(other.isSetLowValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLowValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lowValue, other.lowValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHighValue()).compareTo(other.isSetHighValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHighValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.highValue, other.highValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(other.isSetNumDVs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumDVs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, other.numDVs); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBitVectors()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("DateColumnStatsData("); - boolean first = true; - - if (isSetLowValue()) { - sb.append("lowValue:"); - if (this.lowValue == null) { - sb.append("null"); - } else { - sb.append(this.lowValue); - } - first = false; - } - if (isSetHighValue()) { - if (!first) sb.append(", "); - sb.append("highValue:"); - if (this.highValue == null) { - sb.append("null"); - } else { - sb.append(this.highValue); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("numNulls:"); - sb.append(this.numNulls); - first = false; - if (!first) sb.append(", "); - sb.append("numDVs:"); - sb.append(this.numDVs); - first = false; - if (isSetBitVectors()) { - if (!first) sb.append(", "); - sb.append("bitVectors:"); - if (this.bitVectors == null) { - sb.append("null"); - } else { - sb.append(this.bitVectors); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetNumNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); - } - - if (!isSetNumDVs()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); - } - - // check for sub-struct validity - if (lowValue != null) { - lowValue.validate(); - } - if (highValue != null) { - highValue.validate(); - } - } - - 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 { - // 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 DateColumnStatsDataStandardSchemeFactory implements SchemeFactory { - public DateColumnStatsDataStandardScheme getScheme() { - return new DateColumnStatsDataStandardScheme(); - } - } - - private static class DateColumnStatsDataStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DateColumnStatsData 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: // LOW_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.lowValue = new Date(); - struct.lowValue.read(iprot); - struct.setLowValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // HIGH_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.highValue = new Date(); - struct.highValue.read(iprot); - struct.setHighValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NUM_NULLS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // NUM_DVS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numDVs = iprot.readI64(); - struct.setNumDVsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // BIT_VECTORS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(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, DateColumnStatsData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.lowValue != null) { - if (struct.isSetLowValue()) { - oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); - struct.lowValue.write(oprot); - oprot.writeFieldEnd(); - } - } - if (struct.highValue != null) { - if (struct.isSetHighValue()) { - oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); - struct.highValue.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); - oprot.writeI64(struct.numNulls); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); - oprot.writeI64(struct.numDVs); - oprot.writeFieldEnd(); - if (struct.bitVectors != null) { - if (struct.isSetBitVectors()) { - oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); - oprot.writeString(struct.bitVectors); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DateColumnStatsDataTupleSchemeFactory implements SchemeFactory { - public DateColumnStatsDataTupleScheme getScheme() { - return new DateColumnStatsDataTupleScheme(); - } - } - - private static class DateColumnStatsDataTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DateColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.numNulls); - oprot.writeI64(struct.numDVs); - BitSet optionals = new BitSet(); - if (struct.isSetLowValue()) { - optionals.set(0); - } - if (struct.isSetHighValue()) { - optionals.set(1); - } - if (struct.isSetBitVectors()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetLowValue()) { - struct.lowValue.write(oprot); - } - if (struct.isSetHighValue()) { - struct.highValue.write(oprot); - } - if (struct.isSetBitVectors()) { - oprot.writeString(struct.bitVectors); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, DateColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - struct.numDVs = iprot.readI64(); - struct.setNumDVsIsSet(true); - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.lowValue = new Date(); - struct.lowValue.read(iprot); - struct.setLowValueIsSet(true); - } - if (incoming.get(1)) { - struct.highValue = new Date(); - struct.highValue.read(iprot); - struct.setHighValueIsSet(true); - } - if (incoming.get(2)) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Decimal.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Decimal.java deleted file mode 100644 index 5b23dba..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Decimal.java +++ /dev/null @@ -1,497 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class Decimal implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Decimal"); - - private static final org.apache.thrift.protocol.TField UNSCALED_FIELD_DESC = new org.apache.thrift.protocol.TField("unscaled", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField SCALE_FIELD_DESC = new org.apache.thrift.protocol.TField("scale", org.apache.thrift.protocol.TType.I16, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DecimalStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DecimalTupleSchemeFactory()); - } - - private ByteBuffer unscaled; // required - private short scale; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - UNSCALED((short)1, "unscaled"), - SCALE((short)3, "scale"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // UNSCALED - return UNSCALED; - case 3: // SCALE - return SCALE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SCALE_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.UNSCALED, new org.apache.thrift.meta_data.FieldMetaData("unscaled", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.SCALE, new org.apache.thrift.meta_data.FieldMetaData("scale", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Decimal.class, metaDataMap); - } - - public Decimal() { - } - - public Decimal( - ByteBuffer unscaled, - short scale) - { - this(); - this.unscaled = org.apache.thrift.TBaseHelper.copyBinary(unscaled); - this.scale = scale; - setScaleIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public Decimal(Decimal other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetUnscaled()) { - this.unscaled = org.apache.thrift.TBaseHelper.copyBinary(other.unscaled); - } - this.scale = other.scale; - } - - public Decimal deepCopy() { - return new Decimal(this); - } - - @Override - public void clear() { - this.unscaled = null; - setScaleIsSet(false); - this.scale = 0; - } - - public byte[] getUnscaled() { - setUnscaled(org.apache.thrift.TBaseHelper.rightSize(unscaled)); - return unscaled == null ? null : unscaled.array(); - } - - public ByteBuffer bufferForUnscaled() { - return org.apache.thrift.TBaseHelper.copyBinary(unscaled); - } - - public void setUnscaled(byte[] unscaled) { - this.unscaled = unscaled == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(unscaled, unscaled.length)); - } - - public void setUnscaled(ByteBuffer unscaled) { - this.unscaled = org.apache.thrift.TBaseHelper.copyBinary(unscaled); - } - - public void unsetUnscaled() { - this.unscaled = null; - } - - /** Returns true if field unscaled is set (has been assigned a value) and false otherwise */ - public boolean isSetUnscaled() { - return this.unscaled != null; - } - - public void setUnscaledIsSet(boolean value) { - if (!value) { - this.unscaled = null; - } - } - - public short getScale() { - return this.scale; - } - - public void setScale(short scale) { - this.scale = scale; - setScaleIsSet(true); - } - - public void unsetScale() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCALE_ISSET_ID); - } - - /** Returns true if field scale is set (has been assigned a value) and false otherwise */ - public boolean isSetScale() { - return EncodingUtils.testBit(__isset_bitfield, __SCALE_ISSET_ID); - } - - public void setScaleIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCALE_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case UNSCALED: - if (value == null) { - unsetUnscaled(); - } else { - setUnscaled((ByteBuffer)value); - } - break; - - case SCALE: - if (value == null) { - unsetScale(); - } else { - setScale((Short)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case UNSCALED: - return getUnscaled(); - - case SCALE: - return getScale(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case UNSCALED: - return isSetUnscaled(); - case SCALE: - return isSetScale(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Decimal) - return this.equals((Decimal)that); - return false; - } - - public boolean equals(Decimal that) { - if (that == null) - return false; - - boolean this_present_unscaled = true && this.isSetUnscaled(); - boolean that_present_unscaled = true && that.isSetUnscaled(); - if (this_present_unscaled || that_present_unscaled) { - if (!(this_present_unscaled && that_present_unscaled)) - return false; - if (!this.unscaled.equals(that.unscaled)) - return false; - } - - boolean this_present_scale = true; - boolean that_present_scale = true; - if (this_present_scale || that_present_scale) { - if (!(this_present_scale && that_present_scale)) - return false; - if (this.scale != that.scale) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_unscaled = true && (isSetUnscaled()); - list.add(present_unscaled); - if (present_unscaled) - list.add(unscaled); - - boolean present_scale = true; - list.add(present_scale); - if (present_scale) - list.add(scale); - - return list.hashCode(); - } - - @Override - public int compareTo(Decimal other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetUnscaled()).compareTo(other.isSetUnscaled()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUnscaled()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unscaled, other.unscaled); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetScale()).compareTo(other.isSetScale()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetScale()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scale, other.scale); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("Decimal("); - boolean first = true; - - sb.append("unscaled:"); - if (this.unscaled == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.unscaled, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("scale:"); - sb.append(this.scale); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetUnscaled()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'unscaled' is unset! Struct:" + toString()); - } - - if (!isSetScale()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'scale' is unset! Struct:" + toString()); - } - - // 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 { - // 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 DecimalStandardSchemeFactory implements SchemeFactory { - public DecimalStandardScheme getScheme() { - return new DecimalStandardScheme(); - } - } - - private static class DecimalStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, Decimal 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: // UNSCALED - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.unscaled = iprot.readBinary(); - struct.setUnscaledIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // SCALE - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.scale = iprot.readI16(); - struct.setScaleIsSet(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, Decimal struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.unscaled != null) { - oprot.writeFieldBegin(UNSCALED_FIELD_DESC); - oprot.writeBinary(struct.unscaled); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(SCALE_FIELD_DESC); - oprot.writeI16(struct.scale); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DecimalTupleSchemeFactory implements SchemeFactory { - public DecimalTupleScheme getScheme() { - return new DecimalTupleScheme(); - } - } - - private static class DecimalTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Decimal struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.unscaled); - oprot.writeI16(struct.scale); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Decimal struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.unscaled = iprot.readBinary(); - struct.setUnscaledIsSet(true); - struct.scale = iprot.readI16(); - struct.setScaleIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DecimalColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DecimalColumnStatsData.java deleted file mode 100644 index ec363dc..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DecimalColumnStatsData.java +++ /dev/null @@ -1,814 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class DecimalColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DecimalColumnStatsData"); - - private static final org.apache.thrift.protocol.TField LOW_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("lowValue", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField HIGH_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("highValue", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DecimalColumnStatsDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DecimalColumnStatsDataTupleSchemeFactory()); - } - - private Decimal lowValue; // optional - private Decimal highValue; // optional - private long numNulls; // required - private long numDVs; // required - private String bitVectors; // 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 { - LOW_VALUE((short)1, "lowValue"), - HIGH_VALUE((short)2, "highValue"), - NUM_NULLS((short)3, "numNulls"), - NUM_DVS((short)4, "numDVs"), - BIT_VECTORS((short)5, "bitVectors"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // LOW_VALUE - return LOW_VALUE; - case 2: // HIGH_VALUE - return HIGH_VALUE; - case 3: // NUM_NULLS - return NUM_NULLS; - case 4: // NUM_DVS - return NUM_DVS; - case 5: // BIT_VECTORS - return BIT_VECTORS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __NUMNULLS_ISSET_ID = 0; - private static final int __NUMDVS_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.LOW_VALUE,_Fields.HIGH_VALUE,_Fields.BIT_VECTORS}; - 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); - tmpMap.put(_Fields.LOW_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lowValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Decimal.class))); - tmpMap.put(_Fields.HIGH_VALUE, new org.apache.thrift.meta_data.FieldMetaData("highValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Decimal.class))); - tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DecimalColumnStatsData.class, metaDataMap); - } - - public DecimalColumnStatsData() { - } - - public DecimalColumnStatsData( - long numNulls, - long numDVs) - { - this(); - this.numNulls = numNulls; - setNumNullsIsSet(true); - this.numDVs = numDVs; - setNumDVsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public DecimalColumnStatsData(DecimalColumnStatsData other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetLowValue()) { - this.lowValue = new Decimal(other.lowValue); - } - if (other.isSetHighValue()) { - this.highValue = new Decimal(other.highValue); - } - this.numNulls = other.numNulls; - this.numDVs = other.numDVs; - if (other.isSetBitVectors()) { - this.bitVectors = other.bitVectors; - } - } - - public DecimalColumnStatsData deepCopy() { - return new DecimalColumnStatsData(this); - } - - @Override - public void clear() { - this.lowValue = null; - this.highValue = null; - setNumNullsIsSet(false); - this.numNulls = 0; - setNumDVsIsSet(false); - this.numDVs = 0; - this.bitVectors = null; - } - - public Decimal getLowValue() { - return this.lowValue; - } - - public void setLowValue(Decimal lowValue) { - this.lowValue = lowValue; - } - - public void unsetLowValue() { - this.lowValue = null; - } - - /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ - public boolean isSetLowValue() { - return this.lowValue != null; - } - - public void setLowValueIsSet(boolean value) { - if (!value) { - this.lowValue = null; - } - } - - public Decimal getHighValue() { - return this.highValue; - } - - public void setHighValue(Decimal highValue) { - this.highValue = highValue; - } - - public void unsetHighValue() { - this.highValue = null; - } - - /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ - public boolean isSetHighValue() { - return this.highValue != null; - } - - public void setHighValueIsSet(boolean value) { - if (!value) { - this.highValue = null; - } - } - - public long getNumNulls() { - return this.numNulls; - } - - public void setNumNulls(long numNulls) { - this.numNulls = numNulls; - setNumNullsIsSet(true); - } - - public void unsetNumNulls() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ - public boolean isSetNumNulls() { - return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - public void setNumNullsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); - } - - public long getNumDVs() { - return this.numDVs; - } - - public void setNumDVs(long numDVs) { - this.numDVs = numDVs; - setNumDVsIsSet(true); - } - - public void unsetNumDVs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); - } - - /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ - public boolean isSetNumDVs() { - return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); - } - - public void setNumDVsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); - } - - public String getBitVectors() { - return this.bitVectors; - } - - public void setBitVectors(String bitVectors) { - this.bitVectors = bitVectors; - } - - public void unsetBitVectors() { - this.bitVectors = null; - } - - /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ - public boolean isSetBitVectors() { - return this.bitVectors != null; - } - - public void setBitVectorsIsSet(boolean value) { - if (!value) { - this.bitVectors = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LOW_VALUE: - if (value == null) { - unsetLowValue(); - } else { - setLowValue((Decimal)value); - } - break; - - case HIGH_VALUE: - if (value == null) { - unsetHighValue(); - } else { - setHighValue((Decimal)value); - } - break; - - case NUM_NULLS: - if (value == null) { - unsetNumNulls(); - } else { - setNumNulls((Long)value); - } - break; - - case NUM_DVS: - if (value == null) { - unsetNumDVs(); - } else { - setNumDVs((Long)value); - } - break; - - case BIT_VECTORS: - if (value == null) { - unsetBitVectors(); - } else { - setBitVectors((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LOW_VALUE: - return getLowValue(); - - case HIGH_VALUE: - return getHighValue(); - - case NUM_NULLS: - return getNumNulls(); - - case NUM_DVS: - return getNumDVs(); - - case BIT_VECTORS: - return getBitVectors(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LOW_VALUE: - return isSetLowValue(); - case HIGH_VALUE: - return isSetHighValue(); - case NUM_NULLS: - return isSetNumNulls(); - case NUM_DVS: - return isSetNumDVs(); - case BIT_VECTORS: - return isSetBitVectors(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DecimalColumnStatsData) - return this.equals((DecimalColumnStatsData)that); - return false; - } - - public boolean equals(DecimalColumnStatsData that) { - if (that == null) - return false; - - boolean this_present_lowValue = true && this.isSetLowValue(); - boolean that_present_lowValue = true && that.isSetLowValue(); - if (this_present_lowValue || that_present_lowValue) { - if (!(this_present_lowValue && that_present_lowValue)) - return false; - if (!this.lowValue.equals(that.lowValue)) - return false; - } - - boolean this_present_highValue = true && this.isSetHighValue(); - boolean that_present_highValue = true && that.isSetHighValue(); - if (this_present_highValue || that_present_highValue) { - if (!(this_present_highValue && that_present_highValue)) - return false; - if (!this.highValue.equals(that.highValue)) - return false; - } - - boolean this_present_numNulls = true; - boolean that_present_numNulls = true; - if (this_present_numNulls || that_present_numNulls) { - if (!(this_present_numNulls && that_present_numNulls)) - return false; - if (this.numNulls != that.numNulls) - return false; - } - - boolean this_present_numDVs = true; - boolean that_present_numDVs = true; - if (this_present_numDVs || that_present_numDVs) { - if (!(this_present_numDVs && that_present_numDVs)) - return false; - if (this.numDVs != that.numDVs) - return false; - } - - boolean this_present_bitVectors = true && this.isSetBitVectors(); - boolean that_present_bitVectors = true && that.isSetBitVectors(); - if (this_present_bitVectors || that_present_bitVectors) { - if (!(this_present_bitVectors && that_present_bitVectors)) - return false; - if (!this.bitVectors.equals(that.bitVectors)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_lowValue = true && (isSetLowValue()); - list.add(present_lowValue); - if (present_lowValue) - list.add(lowValue); - - boolean present_highValue = true && (isSetHighValue()); - list.add(present_highValue); - if (present_highValue) - list.add(highValue); - - boolean present_numNulls = true; - list.add(present_numNulls); - if (present_numNulls) - list.add(numNulls); - - boolean present_numDVs = true; - list.add(present_numDVs); - if (present_numDVs) - list.add(numDVs); - - boolean present_bitVectors = true && (isSetBitVectors()); - list.add(present_bitVectors); - if (present_bitVectors) - list.add(bitVectors); - - return list.hashCode(); - } - - @Override - public int compareTo(DecimalColumnStatsData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLowValue()).compareTo(other.isSetLowValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLowValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lowValue, other.lowValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHighValue()).compareTo(other.isSetHighValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHighValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.highValue, other.highValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(other.isSetNumDVs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumDVs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, other.numDVs); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBitVectors()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("DecimalColumnStatsData("); - boolean first = true; - - if (isSetLowValue()) { - sb.append("lowValue:"); - if (this.lowValue == null) { - sb.append("null"); - } else { - sb.append(this.lowValue); - } - first = false; - } - if (isSetHighValue()) { - if (!first) sb.append(", "); - sb.append("highValue:"); - if (this.highValue == null) { - sb.append("null"); - } else { - sb.append(this.highValue); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("numNulls:"); - sb.append(this.numNulls); - first = false; - if (!first) sb.append(", "); - sb.append("numDVs:"); - sb.append(this.numDVs); - first = false; - if (isSetBitVectors()) { - if (!first) sb.append(", "); - sb.append("bitVectors:"); - if (this.bitVectors == null) { - sb.append("null"); - } else { - sb.append(this.bitVectors); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetNumNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); - } - - if (!isSetNumDVs()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); - } - - // check for sub-struct validity - if (lowValue != null) { - lowValue.validate(); - } - if (highValue != null) { - highValue.validate(); - } - } - - 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 { - // 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 DecimalColumnStatsDataStandardSchemeFactory implements SchemeFactory { - public DecimalColumnStatsDataStandardScheme getScheme() { - return new DecimalColumnStatsDataStandardScheme(); - } - } - - private static class DecimalColumnStatsDataStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DecimalColumnStatsData 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: // LOW_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.lowValue = new Decimal(); - struct.lowValue.read(iprot); - struct.setLowValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // HIGH_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.highValue = new Decimal(); - struct.highValue.read(iprot); - struct.setHighValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NUM_NULLS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // NUM_DVS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numDVs = iprot.readI64(); - struct.setNumDVsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // BIT_VECTORS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(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, DecimalColumnStatsData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.lowValue != null) { - if (struct.isSetLowValue()) { - oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); - struct.lowValue.write(oprot); - oprot.writeFieldEnd(); - } - } - if (struct.highValue != null) { - if (struct.isSetHighValue()) { - oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); - struct.highValue.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); - oprot.writeI64(struct.numNulls); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); - oprot.writeI64(struct.numDVs); - oprot.writeFieldEnd(); - if (struct.bitVectors != null) { - if (struct.isSetBitVectors()) { - oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); - oprot.writeString(struct.bitVectors); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DecimalColumnStatsDataTupleSchemeFactory implements SchemeFactory { - public DecimalColumnStatsDataTupleScheme getScheme() { - return new DecimalColumnStatsDataTupleScheme(); - } - } - - private static class DecimalColumnStatsDataTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DecimalColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.numNulls); - oprot.writeI64(struct.numDVs); - BitSet optionals = new BitSet(); - if (struct.isSetLowValue()) { - optionals.set(0); - } - if (struct.isSetHighValue()) { - optionals.set(1); - } - if (struct.isSetBitVectors()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetLowValue()) { - struct.lowValue.write(oprot); - } - if (struct.isSetHighValue()) { - struct.highValue.write(oprot); - } - if (struct.isSetBitVectors()) { - oprot.writeString(struct.bitVectors); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, DecimalColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - struct.numDVs = iprot.readI64(); - struct.setNumDVsIsSet(true); - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.lowValue = new Decimal(); - struct.lowValue.read(iprot); - struct.setLowValueIsSet(true); - } - if (incoming.get(1)) { - struct.highValue = new Decimal(); - struct.highValue.read(iprot); - struct.setHighValueIsSet(true); - } - if (incoming.get(2)) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java deleted file mode 100644 index e3340e4..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java +++ /dev/null @@ -1,790 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class DoubleColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DoubleColumnStatsData"); - - private static final org.apache.thrift.protocol.TField LOW_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("lowValue", org.apache.thrift.protocol.TType.DOUBLE, (short)1); - private static final org.apache.thrift.protocol.TField HIGH_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("highValue", org.apache.thrift.protocol.TType.DOUBLE, (short)2); - private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DoubleColumnStatsDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DoubleColumnStatsDataTupleSchemeFactory()); - } - - private double lowValue; // optional - private double highValue; // optional - private long numNulls; // required - private long numDVs; // required - private String bitVectors; // 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 { - LOW_VALUE((short)1, "lowValue"), - HIGH_VALUE((short)2, "highValue"), - NUM_NULLS((short)3, "numNulls"), - NUM_DVS((short)4, "numDVs"), - BIT_VECTORS((short)5, "bitVectors"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // LOW_VALUE - return LOW_VALUE; - case 2: // HIGH_VALUE - return HIGH_VALUE; - case 3: // NUM_NULLS - return NUM_NULLS; - case 4: // NUM_DVS - return NUM_DVS; - case 5: // BIT_VECTORS - return BIT_VECTORS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __LOWVALUE_ISSET_ID = 0; - private static final int __HIGHVALUE_ISSET_ID = 1; - private static final int __NUMNULLS_ISSET_ID = 2; - private static final int __NUMDVS_ISSET_ID = 3; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.LOW_VALUE,_Fields.HIGH_VALUE,_Fields.BIT_VECTORS}; - 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); - tmpMap.put(_Fields.LOW_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lowValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); - tmpMap.put(_Fields.HIGH_VALUE, new org.apache.thrift.meta_data.FieldMetaData("highValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); - tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DoubleColumnStatsData.class, metaDataMap); - } - - public DoubleColumnStatsData() { - } - - public DoubleColumnStatsData( - long numNulls, - long numDVs) - { - this(); - this.numNulls = numNulls; - setNumNullsIsSet(true); - this.numDVs = numDVs; - setNumDVsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public DoubleColumnStatsData(DoubleColumnStatsData other) { - __isset_bitfield = other.__isset_bitfield; - this.lowValue = other.lowValue; - this.highValue = other.highValue; - this.numNulls = other.numNulls; - this.numDVs = other.numDVs; - if (other.isSetBitVectors()) { - this.bitVectors = other.bitVectors; - } - } - - public DoubleColumnStatsData deepCopy() { - return new DoubleColumnStatsData(this); - } - - @Override - public void clear() { - setLowValueIsSet(false); - this.lowValue = 0.0; - setHighValueIsSet(false); - this.highValue = 0.0; - setNumNullsIsSet(false); - this.numNulls = 0; - setNumDVsIsSet(false); - this.numDVs = 0; - this.bitVectors = null; - } - - public double getLowValue() { - return this.lowValue; - } - - public void setLowValue(double lowValue) { - this.lowValue = lowValue; - setLowValueIsSet(true); - } - - public void unsetLowValue() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOWVALUE_ISSET_ID); - } - - /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ - public boolean isSetLowValue() { - return EncodingUtils.testBit(__isset_bitfield, __LOWVALUE_ISSET_ID); - } - - public void setLowValueIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOWVALUE_ISSET_ID, value); - } - - public double getHighValue() { - return this.highValue; - } - - public void setHighValue(double highValue) { - this.highValue = highValue; - setHighValueIsSet(true); - } - - public void unsetHighValue() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HIGHVALUE_ISSET_ID); - } - - /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ - public boolean isSetHighValue() { - return EncodingUtils.testBit(__isset_bitfield, __HIGHVALUE_ISSET_ID); - } - - public void setHighValueIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HIGHVALUE_ISSET_ID, value); - } - - public long getNumNulls() { - return this.numNulls; - } - - public void setNumNulls(long numNulls) { - this.numNulls = numNulls; - setNumNullsIsSet(true); - } - - public void unsetNumNulls() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ - public boolean isSetNumNulls() { - return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - public void setNumNullsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); - } - - public long getNumDVs() { - return this.numDVs; - } - - public void setNumDVs(long numDVs) { - this.numDVs = numDVs; - setNumDVsIsSet(true); - } - - public void unsetNumDVs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); - } - - /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ - public boolean isSetNumDVs() { - return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); - } - - public void setNumDVsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); - } - - public String getBitVectors() { - return this.bitVectors; - } - - public void setBitVectors(String bitVectors) { - this.bitVectors = bitVectors; - } - - public void unsetBitVectors() { - this.bitVectors = null; - } - - /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ - public boolean isSetBitVectors() { - return this.bitVectors != null; - } - - public void setBitVectorsIsSet(boolean value) { - if (!value) { - this.bitVectors = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LOW_VALUE: - if (value == null) { - unsetLowValue(); - } else { - setLowValue((Double)value); - } - break; - - case HIGH_VALUE: - if (value == null) { - unsetHighValue(); - } else { - setHighValue((Double)value); - } - break; - - case NUM_NULLS: - if (value == null) { - unsetNumNulls(); - } else { - setNumNulls((Long)value); - } - break; - - case NUM_DVS: - if (value == null) { - unsetNumDVs(); - } else { - setNumDVs((Long)value); - } - break; - - case BIT_VECTORS: - if (value == null) { - unsetBitVectors(); - } else { - setBitVectors((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LOW_VALUE: - return getLowValue(); - - case HIGH_VALUE: - return getHighValue(); - - case NUM_NULLS: - return getNumNulls(); - - case NUM_DVS: - return getNumDVs(); - - case BIT_VECTORS: - return getBitVectors(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LOW_VALUE: - return isSetLowValue(); - case HIGH_VALUE: - return isSetHighValue(); - case NUM_NULLS: - return isSetNumNulls(); - case NUM_DVS: - return isSetNumDVs(); - case BIT_VECTORS: - return isSetBitVectors(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DoubleColumnStatsData) - return this.equals((DoubleColumnStatsData)that); - return false; - } - - public boolean equals(DoubleColumnStatsData that) { - if (that == null) - return false; - - boolean this_present_lowValue = true && this.isSetLowValue(); - boolean that_present_lowValue = true && that.isSetLowValue(); - if (this_present_lowValue || that_present_lowValue) { - if (!(this_present_lowValue && that_present_lowValue)) - return false; - if (this.lowValue != that.lowValue) - return false; - } - - boolean this_present_highValue = true && this.isSetHighValue(); - boolean that_present_highValue = true && that.isSetHighValue(); - if (this_present_highValue || that_present_highValue) { - if (!(this_present_highValue && that_present_highValue)) - return false; - if (this.highValue != that.highValue) - return false; - } - - boolean this_present_numNulls = true; - boolean that_present_numNulls = true; - if (this_present_numNulls || that_present_numNulls) { - if (!(this_present_numNulls && that_present_numNulls)) - return false; - if (this.numNulls != that.numNulls) - return false; - } - - boolean this_present_numDVs = true; - boolean that_present_numDVs = true; - if (this_present_numDVs || that_present_numDVs) { - if (!(this_present_numDVs && that_present_numDVs)) - return false; - if (this.numDVs != that.numDVs) - return false; - } - - boolean this_present_bitVectors = true && this.isSetBitVectors(); - boolean that_present_bitVectors = true && that.isSetBitVectors(); - if (this_present_bitVectors || that_present_bitVectors) { - if (!(this_present_bitVectors && that_present_bitVectors)) - return false; - if (!this.bitVectors.equals(that.bitVectors)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_lowValue = true && (isSetLowValue()); - list.add(present_lowValue); - if (present_lowValue) - list.add(lowValue); - - boolean present_highValue = true && (isSetHighValue()); - list.add(present_highValue); - if (present_highValue) - list.add(highValue); - - boolean present_numNulls = true; - list.add(present_numNulls); - if (present_numNulls) - list.add(numNulls); - - boolean present_numDVs = true; - list.add(present_numDVs); - if (present_numDVs) - list.add(numDVs); - - boolean present_bitVectors = true && (isSetBitVectors()); - list.add(present_bitVectors); - if (present_bitVectors) - list.add(bitVectors); - - return list.hashCode(); - } - - @Override - public int compareTo(DoubleColumnStatsData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLowValue()).compareTo(other.isSetLowValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLowValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lowValue, other.lowValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHighValue()).compareTo(other.isSetHighValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHighValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.highValue, other.highValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(other.isSetNumDVs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumDVs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, other.numDVs); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBitVectors()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("DoubleColumnStatsData("); - boolean first = true; - - if (isSetLowValue()) { - sb.append("lowValue:"); - sb.append(this.lowValue); - first = false; - } - if (isSetHighValue()) { - if (!first) sb.append(", "); - sb.append("highValue:"); - sb.append(this.highValue); - first = false; - } - if (!first) sb.append(", "); - sb.append("numNulls:"); - sb.append(this.numNulls); - first = false; - if (!first) sb.append(", "); - sb.append("numDVs:"); - sb.append(this.numDVs); - first = false; - if (isSetBitVectors()) { - if (!first) sb.append(", "); - sb.append("bitVectors:"); - if (this.bitVectors == null) { - sb.append("null"); - } else { - sb.append(this.bitVectors); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetNumNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); - } - - if (!isSetNumDVs()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); - } - - // 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 { - // 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 DoubleColumnStatsDataStandardSchemeFactory implements SchemeFactory { - public DoubleColumnStatsDataStandardScheme getScheme() { - return new DoubleColumnStatsDataStandardScheme(); - } - } - - private static class DoubleColumnStatsDataStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DoubleColumnStatsData 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: // LOW_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { - struct.lowValue = iprot.readDouble(); - struct.setLowValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // HIGH_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { - struct.highValue = iprot.readDouble(); - struct.setHighValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NUM_NULLS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // NUM_DVS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numDVs = iprot.readI64(); - struct.setNumDVsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // BIT_VECTORS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(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, DoubleColumnStatsData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetLowValue()) { - oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); - oprot.writeDouble(struct.lowValue); - oprot.writeFieldEnd(); - } - if (struct.isSetHighValue()) { - oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); - oprot.writeDouble(struct.highValue); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); - oprot.writeI64(struct.numNulls); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); - oprot.writeI64(struct.numDVs); - oprot.writeFieldEnd(); - if (struct.bitVectors != null) { - if (struct.isSetBitVectors()) { - oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); - oprot.writeString(struct.bitVectors); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DoubleColumnStatsDataTupleSchemeFactory implements SchemeFactory { - public DoubleColumnStatsDataTupleScheme getScheme() { - return new DoubleColumnStatsDataTupleScheme(); - } - } - - private static class DoubleColumnStatsDataTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DoubleColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.numNulls); - oprot.writeI64(struct.numDVs); - BitSet optionals = new BitSet(); - if (struct.isSetLowValue()) { - optionals.set(0); - } - if (struct.isSetHighValue()) { - optionals.set(1); - } - if (struct.isSetBitVectors()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetLowValue()) { - oprot.writeDouble(struct.lowValue); - } - if (struct.isSetHighValue()) { - oprot.writeDouble(struct.highValue); - } - if (struct.isSetBitVectors()) { - oprot.writeString(struct.bitVectors); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, DoubleColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - struct.numDVs = iprot.readI64(); - struct.setNumDVsIsSet(true); - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.lowValue = iprot.readDouble(); - struct.setLowValueIsSet(true); - } - if (incoming.get(1)) { - struct.highValue = iprot.readDouble(); - struct.setHighValueIsSet(true); - } - if (incoming.get(2)) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropConstraintRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropConstraintRequest.java deleted file mode 100644 index 4519dac..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropConstraintRequest.java +++ /dev/null @@ -1,591 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class DropConstraintRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DropConstraintRequest"); - - 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 TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField CONSTRAINTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("constraintname", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DropConstraintRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DropConstraintRequestTupleSchemeFactory()); - } - - private String dbname; // required - private String tablename; // required - private String constraintname; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DBNAME((short)1, "dbname"), - TABLENAME((short)2, "tablename"), - CONSTRAINTNAME((short)3, "constraintname"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // TABLENAME - return TABLENAME; - case 3: // CONSTRAINTNAME - return CONSTRAINTNAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CONSTRAINTNAME, new org.apache.thrift.meta_data.FieldMetaData("constraintname", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DropConstraintRequest.class, metaDataMap); - } - - public DropConstraintRequest() { - } - - public DropConstraintRequest( - String dbname, - String tablename, - String constraintname) - { - this(); - this.dbname = dbname; - this.tablename = tablename; - this.constraintname = constraintname; - } - - /** - * Performs a deep copy on other. - */ - public DropConstraintRequest(DropConstraintRequest other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTablename()) { - this.tablename = other.tablename; - } - if (other.isSetConstraintname()) { - this.constraintname = other.constraintname; - } - } - - public DropConstraintRequest deepCopy() { - return new DropConstraintRequest(this); - } - - @Override - public void clear() { - this.dbname = null; - this.tablename = null; - this.constraintname = null; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getTablename() { - return this.tablename; - } - - public void setTablename(String tablename) { - this.tablename = tablename; - } - - public void unsetTablename() { - this.tablename = null; - } - - /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ - public boolean isSetTablename() { - return this.tablename != null; - } - - public void setTablenameIsSet(boolean value) { - if (!value) { - this.tablename = null; - } - } - - public String getConstraintname() { - return this.constraintname; - } - - public void setConstraintname(String constraintname) { - this.constraintname = constraintname; - } - - public void unsetConstraintname() { - this.constraintname = null; - } - - /** Returns true if field constraintname is set (has been assigned a value) and false otherwise */ - public boolean isSetConstraintname() { - return this.constraintname != null; - } - - public void setConstraintnameIsSet(boolean value) { - if (!value) { - this.constraintname = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TABLENAME: - if (value == null) { - unsetTablename(); - } else { - setTablename((String)value); - } - break; - - case CONSTRAINTNAME: - if (value == null) { - unsetConstraintname(); - } else { - setConstraintname((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case TABLENAME: - return getTablename(); - - case CONSTRAINTNAME: - return getConstraintname(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case TABLENAME: - return isSetTablename(); - case CONSTRAINTNAME: - return isSetConstraintname(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DropConstraintRequest) - return this.equals((DropConstraintRequest)that); - return false; - } - - public boolean equals(DropConstraintRequest that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tablename = true && this.isSetTablename(); - boolean that_present_tablename = true && that.isSetTablename(); - if (this_present_tablename || that_present_tablename) { - if (!(this_present_tablename && that_present_tablename)) - return false; - if (!this.tablename.equals(that.tablename)) - return false; - } - - boolean this_present_constraintname = true && this.isSetConstraintname(); - boolean that_present_constraintname = true && that.isSetConstraintname(); - if (this_present_constraintname || that_present_constraintname) { - if (!(this_present_constraintname && that_present_constraintname)) - return false; - if (!this.constraintname.equals(that.constraintname)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_tablename = true && (isSetTablename()); - list.add(present_tablename); - if (present_tablename) - list.add(tablename); - - boolean present_constraintname = true && (isSetConstraintname()); - list.add(present_constraintname); - if (present_constraintname) - list.add(constraintname); - - return list.hashCode(); - } - - @Override - public int compareTo(DropConstraintRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTablename()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetConstraintname()).compareTo(other.isSetConstraintname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetConstraintname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.constraintname, other.constraintname); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("DropConstraintRequest("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tablename:"); - if (this.tablename == null) { - sb.append("null"); - } else { - sb.append(this.tablename); - } - first = false; - if (!first) sb.append(", "); - sb.append("constraintname:"); - if (this.constraintname == null) { - sb.append("null"); - } else { - sb.append(this.constraintname); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDbname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); - } - - if (!isSetTablename()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString()); - } - - if (!isSetConstraintname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'constraintname' is unset! Struct:" + toString()); - } - - // 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 DropConstraintRequestStandardSchemeFactory implements SchemeFactory { - public DropConstraintRequestStandardScheme getScheme() { - return new DropConstraintRequestStandardScheme(); - } - } - - private static class DropConstraintRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DropConstraintRequest 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: // TABLENAME - 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 3: // CONSTRAINTNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.constraintname = iprot.readString(); - struct.setConstraintnameIsSet(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, DropConstraintRequest 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.tablename != null) { - oprot.writeFieldBegin(TABLENAME_FIELD_DESC); - oprot.writeString(struct.tablename); - oprot.writeFieldEnd(); - } - if (struct.constraintname != null) { - oprot.writeFieldBegin(CONSTRAINTNAME_FIELD_DESC); - oprot.writeString(struct.constraintname); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DropConstraintRequestTupleSchemeFactory implements SchemeFactory { - public DropConstraintRequestTupleScheme getScheme() { - return new DropConstraintRequestTupleScheme(); - } - } - - private static class DropConstraintRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DropConstraintRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dbname); - oprot.writeString(struct.tablename); - oprot.writeString(struct.constraintname); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, DropConstraintRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dbname = iprot.readString(); - struct.setDbnameIsSet(true); - struct.tablename = iprot.readString(); - struct.setTablenameIsSet(true); - struct.constraintname = iprot.readString(); - struct.setConstraintnameIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsExpr.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsExpr.java deleted file mode 100644 index ac97aa3..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsExpr.java +++ /dev/null @@ -1,505 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class DropPartitionsExpr implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DropPartitionsExpr"); - - private static final org.apache.thrift.protocol.TField EXPR_FIELD_DESC = new org.apache.thrift.protocol.TField("expr", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField PART_ARCHIVE_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("partArchiveLevel", org.apache.thrift.protocol.TType.I32, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DropPartitionsExprStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DropPartitionsExprTupleSchemeFactory()); - } - - private ByteBuffer expr; // required - private int partArchiveLevel; // 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 { - EXPR((short)1, "expr"), - PART_ARCHIVE_LEVEL((short)2, "partArchiveLevel"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // EXPR - return EXPR; - case 2: // PART_ARCHIVE_LEVEL - return PART_ARCHIVE_LEVEL; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __PARTARCHIVELEVEL_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.PART_ARCHIVE_LEVEL}; - 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); - tmpMap.put(_Fields.EXPR, new org.apache.thrift.meta_data.FieldMetaData("expr", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.PART_ARCHIVE_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("partArchiveLevel", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DropPartitionsExpr.class, metaDataMap); - } - - public DropPartitionsExpr() { - } - - public DropPartitionsExpr( - ByteBuffer expr) - { - this(); - this.expr = org.apache.thrift.TBaseHelper.copyBinary(expr); - } - - /** - * Performs a deep copy on other. - */ - public DropPartitionsExpr(DropPartitionsExpr other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetExpr()) { - this.expr = org.apache.thrift.TBaseHelper.copyBinary(other.expr); - } - this.partArchiveLevel = other.partArchiveLevel; - } - - public DropPartitionsExpr deepCopy() { - return new DropPartitionsExpr(this); - } - - @Override - public void clear() { - this.expr = null; - setPartArchiveLevelIsSet(false); - this.partArchiveLevel = 0; - } - - public byte[] getExpr() { - setExpr(org.apache.thrift.TBaseHelper.rightSize(expr)); - return expr == null ? null : expr.array(); - } - - public ByteBuffer bufferForExpr() { - return org.apache.thrift.TBaseHelper.copyBinary(expr); - } - - public void setExpr(byte[] expr) { - this.expr = expr == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(expr, expr.length)); - } - - public void setExpr(ByteBuffer expr) { - this.expr = org.apache.thrift.TBaseHelper.copyBinary(expr); - } - - public void unsetExpr() { - this.expr = null; - } - - /** Returns true if field expr is set (has been assigned a value) and false otherwise */ - public boolean isSetExpr() { - return this.expr != null; - } - - public void setExprIsSet(boolean value) { - if (!value) { - this.expr = null; - } - } - - public int getPartArchiveLevel() { - return this.partArchiveLevel; - } - - public void setPartArchiveLevel(int partArchiveLevel) { - this.partArchiveLevel = partArchiveLevel; - setPartArchiveLevelIsSet(true); - } - - public void unsetPartArchiveLevel() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARTARCHIVELEVEL_ISSET_ID); - } - - /** Returns true if field partArchiveLevel is set (has been assigned a value) and false otherwise */ - public boolean isSetPartArchiveLevel() { - return EncodingUtils.testBit(__isset_bitfield, __PARTARCHIVELEVEL_ISSET_ID); - } - - public void setPartArchiveLevelIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARTARCHIVELEVEL_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case EXPR: - if (value == null) { - unsetExpr(); - } else { - setExpr((ByteBuffer)value); - } - break; - - case PART_ARCHIVE_LEVEL: - if (value == null) { - unsetPartArchiveLevel(); - } else { - setPartArchiveLevel((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case EXPR: - return getExpr(); - - case PART_ARCHIVE_LEVEL: - return getPartArchiveLevel(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case EXPR: - return isSetExpr(); - case PART_ARCHIVE_LEVEL: - return isSetPartArchiveLevel(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DropPartitionsExpr) - return this.equals((DropPartitionsExpr)that); - return false; - } - - public boolean equals(DropPartitionsExpr that) { - if (that == null) - return false; - - boolean this_present_expr = true && this.isSetExpr(); - boolean that_present_expr = true && that.isSetExpr(); - if (this_present_expr || that_present_expr) { - if (!(this_present_expr && that_present_expr)) - return false; - if (!this.expr.equals(that.expr)) - return false; - } - - boolean this_present_partArchiveLevel = true && this.isSetPartArchiveLevel(); - boolean that_present_partArchiveLevel = true && that.isSetPartArchiveLevel(); - if (this_present_partArchiveLevel || that_present_partArchiveLevel) { - if (!(this_present_partArchiveLevel && that_present_partArchiveLevel)) - return false; - if (this.partArchiveLevel != that.partArchiveLevel) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_expr = true && (isSetExpr()); - list.add(present_expr); - if (present_expr) - list.add(expr); - - boolean present_partArchiveLevel = true && (isSetPartArchiveLevel()); - list.add(present_partArchiveLevel); - if (present_partArchiveLevel) - list.add(partArchiveLevel); - - return list.hashCode(); - } - - @Override - public int compareTo(DropPartitionsExpr other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetExpr()).compareTo(other.isSetExpr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExpr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expr, other.expr); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartArchiveLevel()).compareTo(other.isSetPartArchiveLevel()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartArchiveLevel()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partArchiveLevel, other.partArchiveLevel); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("DropPartitionsExpr("); - boolean first = true; - - sb.append("expr:"); - if (this.expr == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.expr, sb); - } - first = false; - if (isSetPartArchiveLevel()) { - if (!first) sb.append(", "); - sb.append("partArchiveLevel:"); - sb.append(this.partArchiveLevel); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetExpr()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'expr' is unset! Struct:" + toString()); - } - - // 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 { - // 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 DropPartitionsExprStandardSchemeFactory implements SchemeFactory { - public DropPartitionsExprStandardScheme getScheme() { - return new DropPartitionsExprStandardScheme(); - } - } - - private static class DropPartitionsExprStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DropPartitionsExpr 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: // EXPR - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.expr = iprot.readBinary(); - struct.setExprIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PART_ARCHIVE_LEVEL - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.partArchiveLevel = iprot.readI32(); - struct.setPartArchiveLevelIsSet(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, DropPartitionsExpr struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.expr != null) { - oprot.writeFieldBegin(EXPR_FIELD_DESC); - oprot.writeBinary(struct.expr); - oprot.writeFieldEnd(); - } - if (struct.isSetPartArchiveLevel()) { - oprot.writeFieldBegin(PART_ARCHIVE_LEVEL_FIELD_DESC); - oprot.writeI32(struct.partArchiveLevel); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DropPartitionsExprTupleSchemeFactory implements SchemeFactory { - public DropPartitionsExprTupleScheme getScheme() { - return new DropPartitionsExprTupleScheme(); - } - } - - private static class DropPartitionsExprTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DropPartitionsExpr struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBinary(struct.expr); - BitSet optionals = new BitSet(); - if (struct.isSetPartArchiveLevel()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetPartArchiveLevel()) { - oprot.writeI32(struct.partArchiveLevel); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, DropPartitionsExpr struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.expr = iprot.readBinary(); - struct.setExprIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.partArchiveLevel = iprot.readI32(); - struct.setPartArchiveLevelIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsRequest.java deleted file mode 100644 index 2dbde0c..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsRequest.java +++ /dev/null @@ -1,1112 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class DropPartitionsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DropPartitionsRequest"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("parts", org.apache.thrift.protocol.TType.STRUCT, (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 org.apache.thrift.protocol.TField IF_EXISTS_FIELD_DESC = new org.apache.thrift.protocol.TField("ifExists", org.apache.thrift.protocol.TType.BOOL, (short)5); - private static final org.apache.thrift.protocol.TField IGNORE_PROTECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("ignoreProtection", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environmentContext", org.apache.thrift.protocol.TType.STRUCT, (short)7); - private static final org.apache.thrift.protocol.TField NEED_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("needResult", org.apache.thrift.protocol.TType.BOOL, (short)8); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DropPartitionsRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DropPartitionsRequestTupleSchemeFactory()); - } - - private String dbName; // required - private String tblName; // required - private RequestPartsSpec parts; // required - private boolean deleteData; // optional - private boolean ifExists; // optional - private boolean ignoreProtection; // optional - private EnvironmentContext environmentContext; // optional - private boolean needResult; // 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 { - DB_NAME((short)1, "dbName"), - TBL_NAME((short)2, "tblName"), - PARTS((short)3, "parts"), - DELETE_DATA((short)4, "deleteData"), - IF_EXISTS((short)5, "ifExists"), - IGNORE_PROTECTION((short)6, "ignoreProtection"), - ENVIRONMENT_CONTEXT((short)7, "environmentContext"), - NEED_RESULT((short)8, "needResult"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PARTS - return PARTS; - case 4: // DELETE_DATA - return DELETE_DATA; - case 5: // IF_EXISTS - return IF_EXISTS; - case 6: // IGNORE_PROTECTION - return IGNORE_PROTECTION; - case 7: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - case 8: // NEED_RESULT - return NEED_RESULT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - private static final int __IFEXISTS_ISSET_ID = 1; - private static final int __IGNOREPROTECTION_ISSET_ID = 2; - private static final int __NEEDRESULT_ISSET_ID = 3; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.DELETE_DATA,_Fields.IF_EXISTS,_Fields.IGNORE_PROTECTION,_Fields.ENVIRONMENT_CONTEXT,_Fields.NEED_RESULT}; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARTS, new org.apache.thrift.meta_data.FieldMetaData("parts", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RequestPartsSpec.class))); - tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.IF_EXISTS, new org.apache.thrift.meta_data.FieldMetaData("ifExists", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.IGNORE_PROTECTION, new org.apache.thrift.meta_data.FieldMetaData("ignoreProtection", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environmentContext", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - tmpMap.put(_Fields.NEED_RESULT, new org.apache.thrift.meta_data.FieldMetaData("needResult", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DropPartitionsRequest.class, metaDataMap); - } - - public DropPartitionsRequest() { - this.ifExists = true; - - this.needResult = true; - - } - - public DropPartitionsRequest( - String dbName, - String tblName, - RequestPartsSpec parts) - { - this(); - this.dbName = dbName; - this.tblName = tblName; - this.parts = parts; - } - - /** - * Performs a deep copy on other. - */ - public DropPartitionsRequest(DropPartitionsRequest other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTblName()) { - this.tblName = other.tblName; - } - if (other.isSetParts()) { - this.parts = new RequestPartsSpec(other.parts); - } - this.deleteData = other.deleteData; - this.ifExists = other.ifExists; - this.ignoreProtection = other.ignoreProtection; - if (other.isSetEnvironmentContext()) { - this.environmentContext = new EnvironmentContext(other.environmentContext); - } - this.needResult = other.needResult; - } - - public DropPartitionsRequest deepCopy() { - return new DropPartitionsRequest(this); - } - - @Override - public void clear() { - this.dbName = null; - this.tblName = null; - this.parts = null; - setDeleteDataIsSet(false); - this.deleteData = false; - this.ifExists = true; - - setIgnoreProtectionIsSet(false); - this.ignoreProtection = false; - this.environmentContext = null; - this.needResult = true; - - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTblName() { - return this.tblName; - } - - public void setTblName(String tblName) { - this.tblName = tblName; - } - - public void unsetTblName() { - this.tblName = null; - } - - /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ - public boolean isSetTblName() { - return this.tblName != null; - } - - public void setTblNameIsSet(boolean value) { - if (!value) { - this.tblName = null; - } - } - - public RequestPartsSpec getParts() { - return this.parts; - } - - public void setParts(RequestPartsSpec parts) { - this.parts = parts; - } - - public void unsetParts() { - this.parts = null; - } - - /** Returns true if field parts is set (has been assigned a value) and false otherwise */ - public boolean isSetParts() { - return this.parts != null; - } - - public void setPartsIsSet(boolean value) { - if (!value) { - this.parts = null; - } - } - - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); - } - - public boolean isIfExists() { - return this.ifExists; - } - - public void setIfExists(boolean ifExists) { - this.ifExists = ifExists; - setIfExistsIsSet(true); - } - - public void unsetIfExists() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IFEXISTS_ISSET_ID); - } - - /** Returns true if field ifExists is set (has been assigned a value) and false otherwise */ - public boolean isSetIfExists() { - return EncodingUtils.testBit(__isset_bitfield, __IFEXISTS_ISSET_ID); - } - - public void setIfExistsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IFEXISTS_ISSET_ID, value); - } - - public boolean isIgnoreProtection() { - return this.ignoreProtection; - } - - public void setIgnoreProtection(boolean ignoreProtection) { - this.ignoreProtection = ignoreProtection; - setIgnoreProtectionIsSet(true); - } - - public void unsetIgnoreProtection() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IGNOREPROTECTION_ISSET_ID); - } - - /** Returns true if field ignoreProtection is set (has been assigned a value) and false otherwise */ - public boolean isSetIgnoreProtection() { - return EncodingUtils.testBit(__isset_bitfield, __IGNOREPROTECTION_ISSET_ID); - } - - public void setIgnoreProtectionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IGNOREPROTECTION_ISSET_ID, value); - } - - public EnvironmentContext getEnvironmentContext() { - return this.environmentContext; - } - - public void setEnvironmentContext(EnvironmentContext environmentContext) { - this.environmentContext = environmentContext; - } - - public void unsetEnvironmentContext() { - this.environmentContext = null; - } - - /** Returns true if field environmentContext is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironmentContext() { - return this.environmentContext != null; - } - - public void setEnvironmentContextIsSet(boolean value) { - if (!value) { - this.environmentContext = null; - } - } - - public boolean isNeedResult() { - return this.needResult; - } - - public void setNeedResult(boolean needResult) { - this.needResult = needResult; - setNeedResultIsSet(true); - } - - public void unsetNeedResult() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NEEDRESULT_ISSET_ID); - } - - /** Returns true if field needResult is set (has been assigned a value) and false otherwise */ - public boolean isSetNeedResult() { - return EncodingUtils.testBit(__isset_bitfield, __NEEDRESULT_ISSET_ID); - } - - public void setNeedResultIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NEEDRESULT_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTblName(); - } else { - setTblName((String)value); - } - break; - - case PARTS: - if (value == null) { - unsetParts(); - } else { - setParts((RequestPartsSpec)value); - } - break; - - case DELETE_DATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - case IF_EXISTS: - if (value == null) { - unsetIfExists(); - } else { - setIfExists((Boolean)value); - } - break; - - case IGNORE_PROTECTION: - if (value == null) { - unsetIgnoreProtection(); - } else { - setIgnoreProtection((Boolean)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironmentContext(); - } else { - setEnvironmentContext((EnvironmentContext)value); - } - break; - - case NEED_RESULT: - if (value == null) { - unsetNeedResult(); - } else { - setNeedResult((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case TBL_NAME: - return getTblName(); - - case PARTS: - return getParts(); - - case DELETE_DATA: - return isDeleteData(); - - case IF_EXISTS: - return isIfExists(); - - case IGNORE_PROTECTION: - return isIgnoreProtection(); - - case ENVIRONMENT_CONTEXT: - return getEnvironmentContext(); - - case NEED_RESULT: - return isNeedResult(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case TBL_NAME: - return isSetTblName(); - case PARTS: - return isSetParts(); - case DELETE_DATA: - return isSetDeleteData(); - case IF_EXISTS: - return isSetIfExists(); - case IGNORE_PROTECTION: - return isSetIgnoreProtection(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironmentContext(); - case NEED_RESULT: - return isSetNeedResult(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DropPartitionsRequest) - return this.equals((DropPartitionsRequest)that); - return false; - } - - public boolean equals(DropPartitionsRequest that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tblName = true && this.isSetTblName(); - boolean that_present_tblName = true && that.isSetTblName(); - if (this_present_tblName || that_present_tblName) { - if (!(this_present_tblName && that_present_tblName)) - return false; - if (!this.tblName.equals(that.tblName)) - return false; - } - - boolean this_present_parts = true && this.isSetParts(); - boolean that_present_parts = true && that.isSetParts(); - if (this_present_parts || that_present_parts) { - if (!(this_present_parts && that_present_parts)) - return false; - if (!this.parts.equals(that.parts)) - return false; - } - - boolean this_present_deleteData = true && this.isSetDeleteData(); - boolean that_present_deleteData = true && that.isSetDeleteData(); - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - boolean this_present_ifExists = true && this.isSetIfExists(); - boolean that_present_ifExists = true && that.isSetIfExists(); - if (this_present_ifExists || that_present_ifExists) { - if (!(this_present_ifExists && that_present_ifExists)) - return false; - if (this.ifExists != that.ifExists) - return false; - } - - boolean this_present_ignoreProtection = true && this.isSetIgnoreProtection(); - boolean that_present_ignoreProtection = true && that.isSetIgnoreProtection(); - if (this_present_ignoreProtection || that_present_ignoreProtection) { - if (!(this_present_ignoreProtection && that_present_ignoreProtection)) - return false; - if (this.ignoreProtection != that.ignoreProtection) - return false; - } - - boolean this_present_environmentContext = true && this.isSetEnvironmentContext(); - boolean that_present_environmentContext = true && that.isSetEnvironmentContext(); - if (this_present_environmentContext || that_present_environmentContext) { - if (!(this_present_environmentContext && that_present_environmentContext)) - return false; - if (!this.environmentContext.equals(that.environmentContext)) - return false; - } - - boolean this_present_needResult = true && this.isSetNeedResult(); - boolean that_present_needResult = true && that.isSetNeedResult(); - if (this_present_needResult || that_present_needResult) { - if (!(this_present_needResult && that_present_needResult)) - return false; - if (this.needResult != that.needResult) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tblName = true && (isSetTblName()); - list.add(present_tblName); - if (present_tblName) - list.add(tblName); - - boolean present_parts = true && (isSetParts()); - list.add(present_parts); - if (present_parts) - list.add(parts); - - boolean present_deleteData = true && (isSetDeleteData()); - list.add(present_deleteData); - if (present_deleteData) - list.add(deleteData); - - boolean present_ifExists = true && (isSetIfExists()); - list.add(present_ifExists); - if (present_ifExists) - list.add(ifExists); - - boolean present_ignoreProtection = true && (isSetIgnoreProtection()); - list.add(present_ignoreProtection); - if (present_ignoreProtection) - list.add(ignoreProtection); - - boolean present_environmentContext = true && (isSetEnvironmentContext()); - list.add(present_environmentContext); - if (present_environmentContext) - list.add(environmentContext); - - boolean present_needResult = true && (isSetNeedResult()); - list.add(present_needResult); - if (present_needResult) - list.add(needResult); - - return list.hashCode(); - } - - @Override - public int compareTo(DropPartitionsRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTblName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParts()).compareTo(other.isSetParts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parts, other.parts); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDeleteData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIfExists()).compareTo(other.isSetIfExists()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIfExists()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ifExists, other.ifExists); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIgnoreProtection()).compareTo(other.isSetIgnoreProtection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIgnoreProtection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ignoreProtection, other.ignoreProtection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironmentContext()).compareTo(other.isSetEnvironmentContext()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironmentContext()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environmentContext, other.environmentContext); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNeedResult()).compareTo(other.isSetNeedResult()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNeedResult()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.needResult, other.needResult); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("DropPartitionsRequest("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tblName:"); - if (this.tblName == null) { - sb.append("null"); - } else { - sb.append(this.tblName); - } - first = false; - if (!first) sb.append(", "); - sb.append("parts:"); - if (this.parts == null) { - sb.append("null"); - } else { - sb.append(this.parts); - } - first = false; - if (isSetDeleteData()) { - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; - } - if (isSetIfExists()) { - if (!first) sb.append(", "); - sb.append("ifExists:"); - sb.append(this.ifExists); - first = false; - } - if (isSetIgnoreProtection()) { - if (!first) sb.append(", "); - sb.append("ignoreProtection:"); - sb.append(this.ignoreProtection); - first = false; - } - if (isSetEnvironmentContext()) { - if (!first) sb.append(", "); - sb.append("environmentContext:"); - if (this.environmentContext == null) { - sb.append("null"); - } else { - sb.append(this.environmentContext); - } - first = false; - } - if (isSetNeedResult()) { - if (!first) sb.append(", "); - sb.append("needResult:"); - sb.append(this.needResult); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDbName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); - } - - if (!isSetTblName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); - } - - if (!isSetParts()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'parts' is unset! Struct:" + toString()); - } - - // check for sub-struct validity - if (environmentContext != null) { - environmentContext.validate(); - } - } - - 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 { - // 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 DropPartitionsRequestStandardSchemeFactory implements SchemeFactory { - public DropPartitionsRequestStandardScheme getScheme() { - return new DropPartitionsRequestStandardScheme(); - } - } - - private static class DropPartitionsRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DropPartitionsRequest 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.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.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PARTS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.parts = new RequestPartsSpec(); - struct.parts.read(iprot); - struct.setPartsIsSet(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; - case 5: // IF_EXISTS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.ifExists = iprot.readBool(); - struct.setIfExistsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // IGNORE_PROTECTION - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.ignoreProtection = iprot.readBool(); - struct.setIgnoreProtectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // ENVIRONMENT_CONTEXT - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.environmentContext = new EnvironmentContext(); - struct.environmentContext.read(iprot); - struct.setEnvironmentContextIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // NEED_RESULT - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.needResult = iprot.readBool(); - struct.setNeedResultIsSet(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, DropPartitionsRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - if (struct.tblName != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(struct.tblName); - oprot.writeFieldEnd(); - } - if (struct.parts != null) { - oprot.writeFieldBegin(PARTS_FIELD_DESC); - struct.parts.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.isSetDeleteData()) { - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(struct.deleteData); - oprot.writeFieldEnd(); - } - if (struct.isSetIfExists()) { - oprot.writeFieldBegin(IF_EXISTS_FIELD_DESC); - oprot.writeBool(struct.ifExists); - oprot.writeFieldEnd(); - } - if (struct.isSetIgnoreProtection()) { - oprot.writeFieldBegin(IGNORE_PROTECTION_FIELD_DESC); - oprot.writeBool(struct.ignoreProtection); - oprot.writeFieldEnd(); - } - if (struct.environmentContext != null) { - if (struct.isSetEnvironmentContext()) { - oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); - struct.environmentContext.write(oprot); - oprot.writeFieldEnd(); - } - } - if (struct.isSetNeedResult()) { - oprot.writeFieldBegin(NEED_RESULT_FIELD_DESC); - oprot.writeBool(struct.needResult); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DropPartitionsRequestTupleSchemeFactory implements SchemeFactory { - public DropPartitionsRequestTupleScheme getScheme() { - return new DropPartitionsRequestTupleScheme(); - } - } - - private static class DropPartitionsRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DropPartitionsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dbName); - oprot.writeString(struct.tblName); - struct.parts.write(oprot); - BitSet optionals = new BitSet(); - if (struct.isSetDeleteData()) { - optionals.set(0); - } - if (struct.isSetIfExists()) { - optionals.set(1); - } - if (struct.isSetIgnoreProtection()) { - optionals.set(2); - } - if (struct.isSetEnvironmentContext()) { - optionals.set(3); - } - if (struct.isSetNeedResult()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetDeleteData()) { - oprot.writeBool(struct.deleteData); - } - if (struct.isSetIfExists()) { - oprot.writeBool(struct.ifExists); - } - if (struct.isSetIgnoreProtection()) { - oprot.writeBool(struct.ignoreProtection); - } - if (struct.isSetEnvironmentContext()) { - struct.environmentContext.write(oprot); - } - if (struct.isSetNeedResult()) { - oprot.writeBool(struct.needResult); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, DropPartitionsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - struct.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - struct.parts = new RequestPartsSpec(); - struct.parts.read(iprot); - struct.setPartsIsSet(true); - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.deleteData = iprot.readBool(); - struct.setDeleteDataIsSet(true); - } - if (incoming.get(1)) { - struct.ifExists = iprot.readBool(); - struct.setIfExistsIsSet(true); - } - if (incoming.get(2)) { - struct.ignoreProtection = iprot.readBool(); - struct.setIgnoreProtectionIsSet(true); - } - if (incoming.get(3)) { - struct.environmentContext = new EnvironmentContext(); - struct.environmentContext.read(iprot); - struct.setEnvironmentContextIsSet(true); - } - if (incoming.get(4)) { - struct.needResult = iprot.readBool(); - struct.setNeedResultIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java deleted file mode 100644 index 21290ee..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java +++ /dev/null @@ -1,447 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class DropPartitionsResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DropPartitionsResult"); - - private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DropPartitionsResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DropPartitionsResultTupleSchemeFactory()); - } - - private List partitions; // 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 { - PARTITIONS((short)1, "partitions"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PARTITIONS - return PARTITIONS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.PARTITIONS}; - 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); - tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DropPartitionsResult.class, metaDataMap); - } - - public DropPartitionsResult() { - } - - /** - * Performs a deep copy on other. - */ - public DropPartitionsResult(DropPartitionsResult other) { - if (other.isSetPartitions()) { - List __this__partitions = new ArrayList(other.partitions.size()); - for (Partition other_element : other.partitions) { - __this__partitions.add(new Partition(other_element)); - } - this.partitions = __this__partitions; - } - } - - public DropPartitionsResult deepCopy() { - return new DropPartitionsResult(this); - } - - @Override - public void clear() { - this.partitions = null; - } - - public int getPartitionsSize() { - return (this.partitions == null) ? 0 : this.partitions.size(); - } - - public java.util.Iterator getPartitionsIterator() { - return (this.partitions == null) ? null : this.partitions.iterator(); - } - - public void addToPartitions(Partition elem) { - if (this.partitions == null) { - this.partitions = new ArrayList(); - } - this.partitions.add(elem); - } - - public List getPartitions() { - return this.partitions; - } - - public void setPartitions(List partitions) { - this.partitions = partitions; - } - - public void unsetPartitions() { - this.partitions = null; - } - - /** Returns true if field partitions is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitions() { - return this.partitions != null; - } - - public void setPartitionsIsSet(boolean value) { - if (!value) { - this.partitions = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PARTITIONS: - if (value == null) { - unsetPartitions(); - } else { - setPartitions((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PARTITIONS: - return getPartitions(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PARTITIONS: - return isSetPartitions(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DropPartitionsResult) - return this.equals((DropPartitionsResult)that); - return false; - } - - public boolean equals(DropPartitionsResult that) { - if (that == null) - return false; - - boolean this_present_partitions = true && this.isSetPartitions(); - boolean that_present_partitions = true && that.isSetPartitions(); - if (this_present_partitions || that_present_partitions) { - if (!(this_present_partitions && that_present_partitions)) - return false; - if (!this.partitions.equals(that.partitions)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_partitions = true && (isSetPartitions()); - list.add(present_partitions); - if (present_partitions) - list.add(partitions); - - return list.hashCode(); - } - - @Override - public int compareTo(DropPartitionsResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPartitions()).compareTo(other.isSetPartitions()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitions()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("DropPartitionsResult("); - boolean first = true; - - if (isSetPartitions()) { - sb.append("partitions:"); - if (this.partitions == null) { - sb.append("null"); - } else { - sb.append(this.partitions); - } - 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 DropPartitionsResultStandardSchemeFactory implements SchemeFactory { - public DropPartitionsResultStandardScheme getScheme() { - return new DropPartitionsResultStandardScheme(); - } - } - - private static class DropPartitionsResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DropPartitionsResult 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: // PARTITIONS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list460 = iprot.readListBegin(); - struct.partitions = new ArrayList(_list460.size); - Partition _elem461; - for (int _i462 = 0; _i462 < _list460.size; ++_i462) - { - _elem461 = new Partition(); - _elem461.read(iprot); - struct.partitions.add(_elem461); - } - iprot.readListEnd(); - } - struct.setPartitionsIsSet(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, DropPartitionsResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.partitions != null) { - if (struct.isSetPartitions()) { - oprot.writeFieldBegin(PARTITIONS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size())); - for (Partition _iter463 : struct.partitions) - { - _iter463.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DropPartitionsResultTupleSchemeFactory implements SchemeFactory { - public DropPartitionsResultTupleScheme getScheme() { - return new DropPartitionsResultTupleScheme(); - } - } - - private static class DropPartitionsResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DropPartitionsResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPartitions()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetPartitions()) { - { - oprot.writeI32(struct.partitions.size()); - for (Partition _iter464 : struct.partitions) - { - _iter464.write(oprot); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, DropPartitionsResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list465 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.partitions = new ArrayList(_list465.size); - Partition _elem466; - for (int _i467 = 0; _i467 < _list465.size; ++_i467) - { - _elem466 = new Partition(); - _elem466.read(iprot); - struct.partitions.add(_elem466); - } - } - struct.setPartitionsIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index de588e2..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java +++ /dev/null @@ -1,447 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class EnvironmentContext implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EnvironmentContext"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROPERTIES((short)1, "properties"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROPERTIES - return PROPERTIES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("properties", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EnvironmentContext.class, metaDataMap); - } - - public EnvironmentContext() { - } - - public EnvironmentContext( - Map properties) - { - this(); - this.properties = properties; - } - - /** - * Performs a deep copy on other. - */ - public EnvironmentContext(EnvironmentContext other) { - if (other.isSetProperties()) { - Map __this__properties = new HashMap(other.properties); - this.properties = __this__properties; - } - } - - public EnvironmentContext deepCopy() { - return new EnvironmentContext(this); - } - - @Override - public void clear() { - this.properties = null; - } - - public int getPropertiesSize() { - return (this.properties == null) ? 0 : this.properties.size(); - } - - public void putToProperties(String key, String val) { - if (this.properties == null) { - this.properties = new HashMap(); - } - this.properties.put(key, val); - } - - public Map getProperties() { - return this.properties; - } - - public void setProperties(Map properties) { - this.properties = properties; - } - - public void unsetProperties() { - this.properties = null; - } - - /** Returns true if field properties is set (has been assigned a value) and false otherwise */ - public boolean isSetProperties() { - return this.properties != null; - } - - public void setPropertiesIsSet(boolean value) { - if (!value) { - this.properties = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROPERTIES: - if (value == null) { - unsetProperties(); - } else { - setProperties((Map)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROPERTIES: - return getProperties(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROPERTIES: - return isSetProperties(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof EnvironmentContext) - return this.equals((EnvironmentContext)that); - return false; - } - - public boolean equals(EnvironmentContext that) { - if (that == null) - return false; - - boolean this_present_properties = true && this.isSetProperties(); - boolean that_present_properties = true && that.isSetProperties(); - if (this_present_properties || that_present_properties) { - if (!(this_present_properties && that_present_properties)) - return false; - if (!this.properties.equals(that.properties)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_properties = true && (isSetProperties()); - list.add(present_properties); - if (present_properties) - list.add(properties); - - return list.hashCode(); - } - - @Override - public int compareTo(EnvironmentContext other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProperties()).compareTo(other.isSetProperties()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProperties()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.properties, other.properties); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("EnvironmentContext("); - boolean first = true; - - sb.append("properties:"); - if (this.properties == null) { - sb.append("null"); - } else { - sb.append(this.properties); - } - 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 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 _map312 = iprot.readMapBegin(); - struct.properties = new HashMap(2*_map312.size); - String _key313; - String _val314; - for (int _i315 = 0; _i315 < _map312.size; ++_i315) - { - _key313 = iprot.readString(); - _val314 = iprot.readString(); - struct.properties.put(_key313, _val314); - } - 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 _iter316 : struct.properties.entrySet()) - { - oprot.writeString(_iter316.getKey()); - oprot.writeString(_iter316.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 _iter317 : struct.properties.entrySet()) - { - oprot.writeString(_iter317.getKey()); - oprot.writeString(_iter317.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 _map318 = 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*_map318.size); - String _key319; - String _val320; - for (int _i321 = 0; _i321 < _map318.size; ++_i321) - { - _key319 = iprot.readString(); - _val320 = iprot.readString(); - struct.properties.put(_key319, _val320); - } - } - struct.setPropertiesIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EventRequestType.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EventRequestType.java deleted file mode 100644 index 4295046..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EventRequestType.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum EventRequestType implements org.apache.thrift.TEnum { - INSERT(1), - UPDATE(2), - DELETE(3); - - private final int value; - - private EventRequestType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static EventRequestType findByValue(int value) { - switch (value) { - case 1: - return INSERT; - case 2: - return UPDATE; - case 3: - return DELETE; - default: - return null; - } - } -} diff --git 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 deleted file mode 100644 index 06a7b4d..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java +++ /dev/null @@ -1,603 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class FieldSchema implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FieldSchema"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NAME((short)1, "name"), - TYPE((short)2, "type"), - COMMENT((short)3, "comment"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // TYPE - return TYPE; - case 3: // COMMENT - return COMMENT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COMMENT, new org.apache.thrift.meta_data.FieldMetaData("comment", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FieldSchema.class, metaDataMap); - } - - public FieldSchema() { - } - - public FieldSchema( - String name, - String type, - String comment) - { - this(); - this.name = org.apache.hive.common.util.HiveStringUtils.intern(name); - this.type = org.apache.hive.common.util.HiveStringUtils.intern(type); - this.comment = org.apache.hive.common.util.HiveStringUtils.intern(comment); - } - - /** - * Performs a deep copy on other. - */ - public FieldSchema(FieldSchema other) { - if (other.isSetName()) { - this.name = org.apache.hive.common.util.HiveStringUtils.intern(other.name); - } - if (other.isSetType()) { - this.type = org.apache.hive.common.util.HiveStringUtils.intern(other.type); - } - if (other.isSetComment()) { - this.comment = org.apache.hive.common.util.HiveStringUtils.intern(other.comment); - } - } - - public FieldSchema deepCopy() { - return new FieldSchema(this); - } - - @Override - public void clear() { - this.name = null; - this.type = null; - this.comment = null; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = org.apache.hive.common.util.HiveStringUtils.intern(name); - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public String getType() { - return this.type; - } - - public void setType(String type) { - this.type = org.apache.hive.common.util.HiveStringUtils.intern(type); - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - public String getComment() { - return this.comment; - } - - public void setComment(String comment) { - this.comment = org.apache.hive.common.util.HiveStringUtils.intern(comment); - } - - public void unsetComment() { - this.comment = null; - } - - /** Returns true if field comment is set (has been assigned a value) and false otherwise */ - public boolean isSetComment() { - return this.comment != null; - } - - public void setCommentIsSet(boolean value) { - if (!value) { - this.comment = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((String)value); - } - break; - - case COMMENT: - if (value == null) { - unsetComment(); - } else { - setComment((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - case TYPE: - return getType(); - - case COMMENT: - return getComment(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - case TYPE: - return isSetType(); - case COMMENT: - return isSetComment(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof FieldSchema) - return this.equals((FieldSchema)that); - return false; - } - - public boolean equals(FieldSchema that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - boolean this_present_comment = true && this.isSetComment(); - boolean that_present_comment = true && that.isSetComment(); - if (this_present_comment || that_present_comment) { - if (!(this_present_comment && that_present_comment)) - return false; - if (!this.comment.equals(that.comment)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type); - - boolean present_comment = true && (isSetComment()); - list.add(present_comment); - if (present_comment) - list.add(comment); - - return list.hashCode(); - } - - @Override - public int compareTo(FieldSchema other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetComment()).compareTo(other.isSetComment()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetComment()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, other.comment); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("FieldSchema("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - if (!first) sb.append(", "); - sb.append("comment:"); - if (this.comment == null) { - sb.append("null"); - } else { - sb.append(this.comment); - } - 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 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); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FileMetadataExprType.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FileMetadataExprType.java deleted file mode 100644 index 4e393e2..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FileMetadataExprType.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum FileMetadataExprType implements org.apache.thrift.TEnum { - ORC_SARG(1); - - private final int value; - - private FileMetadataExprType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static FileMetadataExprType findByValue(int value) { - switch (value) { - case 1: - return ORC_SARG; - default: - return null; - } - } -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java deleted file mode 100644 index cc336c5..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java +++ /dev/null @@ -1,861 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class FireEventRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FireEventRequest"); - - private static final org.apache.thrift.protocol.TField SUCCESSFUL_FIELD_DESC = new org.apache.thrift.protocol.TField("successful", org.apache.thrift.protocol.TType.BOOL, (short)1); - private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField PARTITION_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionVals", org.apache.thrift.protocol.TType.LIST, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new FireEventRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new FireEventRequestTupleSchemeFactory()); - } - - private boolean successful; // required - private FireEventRequestData data; // required - private String dbName; // optional - private String tableName; // optional - private List partitionVals; // 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 { - SUCCESSFUL((short)1, "successful"), - DATA((short)2, "data"), - DB_NAME((short)3, "dbName"), - TABLE_NAME((short)4, "tableName"), - PARTITION_VALS((short)5, "partitionVals"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SUCCESSFUL - return SUCCESSFUL; - case 2: // DATA - return DATA; - case 3: // DB_NAME - return DB_NAME; - case 4: // TABLE_NAME - return TABLE_NAME; - case 5: // PARTITION_VALS - return PARTITION_VALS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESSFUL_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.DB_NAME,_Fields.TABLE_NAME,_Fields.PARTITION_VALS}; - 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); - tmpMap.put(_Fields.SUCCESSFUL, new org.apache.thrift.meta_data.FieldMetaData("successful", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FireEventRequestData.class))); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARTITION_VALS, new org.apache.thrift.meta_data.FieldMetaData("partitionVals", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FireEventRequest.class, metaDataMap); - } - - public FireEventRequest() { - } - - public FireEventRequest( - boolean successful, - FireEventRequestData data) - { - this(); - this.successful = successful; - setSuccessfulIsSet(true); - this.data = data; - } - - /** - * Performs a deep copy on other. - */ - public FireEventRequest(FireEventRequest other) { - __isset_bitfield = other.__isset_bitfield; - this.successful = other.successful; - if (other.isSetData()) { - this.data = new FireEventRequestData(other.data); - } - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTableName()) { - this.tableName = other.tableName; - } - if (other.isSetPartitionVals()) { - List __this__partitionVals = new ArrayList(other.partitionVals); - this.partitionVals = __this__partitionVals; - } - } - - public FireEventRequest deepCopy() { - return new FireEventRequest(this); - } - - @Override - public void clear() { - setSuccessfulIsSet(false); - this.successful = false; - this.data = null; - this.dbName = null; - this.tableName = null; - this.partitionVals = null; - } - - public boolean isSuccessful() { - return this.successful; - } - - public void setSuccessful(boolean successful) { - this.successful = successful; - setSuccessfulIsSet(true); - } - - public void unsetSuccessful() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESSFUL_ISSET_ID); - } - - /** Returns true if field successful is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccessful() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESSFUL_ISSET_ID); - } - - public void setSuccessfulIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESSFUL_ISSET_ID, value); - } - - public FireEventRequestData getData() { - return this.data; - } - - public void setData(FireEventRequestData data) { - this.data = data; - } - - public void unsetData() { - this.data = null; - } - - /** Returns true if field data is set (has been assigned a value) and false otherwise */ - public boolean isSetData() { - return this.data != null; - } - - public void setDataIsSet(boolean value) { - if (!value) { - this.data = null; - } - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTableName() { - return this.tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public void unsetTableName() { - this.tableName = null; - } - - /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ - public boolean isSetTableName() { - return this.tableName != null; - } - - public void setTableNameIsSet(boolean value) { - if (!value) { - this.tableName = null; - } - } - - public int getPartitionValsSize() { - return (this.partitionVals == null) ? 0 : this.partitionVals.size(); - } - - public java.util.Iterator getPartitionValsIterator() { - return (this.partitionVals == null) ? null : this.partitionVals.iterator(); - } - - public void addToPartitionVals(String elem) { - if (this.partitionVals == null) { - this.partitionVals = new ArrayList(); - } - this.partitionVals.add(elem); - } - - public List getPartitionVals() { - return this.partitionVals; - } - - public void setPartitionVals(List partitionVals) { - this.partitionVals = partitionVals; - } - - public void unsetPartitionVals() { - this.partitionVals = null; - } - - /** Returns true if field partitionVals is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitionVals() { - return this.partitionVals != null; - } - - public void setPartitionValsIsSet(boolean value) { - if (!value) { - this.partitionVals = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESSFUL: - if (value == null) { - unsetSuccessful(); - } else { - setSuccessful((Boolean)value); - } - break; - - case DATA: - if (value == null) { - unsetData(); - } else { - setData((FireEventRequestData)value); - } - break; - - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTableName(); - } else { - setTableName((String)value); - } - break; - - case PARTITION_VALS: - if (value == null) { - unsetPartitionVals(); - } else { - setPartitionVals((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESSFUL: - return isSuccessful(); - - case DATA: - return getData(); - - case DB_NAME: - return getDbName(); - - case TABLE_NAME: - return getTableName(); - - case PARTITION_VALS: - return getPartitionVals(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESSFUL: - return isSetSuccessful(); - case DATA: - return isSetData(); - case DB_NAME: - return isSetDbName(); - case TABLE_NAME: - return isSetTableName(); - case PARTITION_VALS: - return isSetPartitionVals(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof FireEventRequest) - return this.equals((FireEventRequest)that); - return false; - } - - public boolean equals(FireEventRequest that) { - if (that == null) - return false; - - boolean this_present_successful = true; - boolean that_present_successful = true; - if (this_present_successful || that_present_successful) { - if (!(this_present_successful && that_present_successful)) - return false; - if (this.successful != that.successful) - return false; - } - - boolean this_present_data = true && this.isSetData(); - boolean that_present_data = true && that.isSetData(); - if (this_present_data || that_present_data) { - if (!(this_present_data && that_present_data)) - return false; - if (!this.data.equals(that.data)) - return false; - } - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tableName = true && this.isSetTableName(); - boolean that_present_tableName = true && that.isSetTableName(); - if (this_present_tableName || that_present_tableName) { - if (!(this_present_tableName && that_present_tableName)) - return false; - if (!this.tableName.equals(that.tableName)) - return false; - } - - boolean this_present_partitionVals = true && this.isSetPartitionVals(); - boolean that_present_partitionVals = true && that.isSetPartitionVals(); - if (this_present_partitionVals || that_present_partitionVals) { - if (!(this_present_partitionVals && that_present_partitionVals)) - return false; - if (!this.partitionVals.equals(that.partitionVals)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_successful = true; - list.add(present_successful); - if (present_successful) - list.add(successful); - - boolean present_data = true && (isSetData()); - list.add(present_data); - if (present_data) - list.add(data); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tableName = true && (isSetTableName()); - list.add(present_tableName); - if (present_tableName) - list.add(tableName); - - boolean present_partitionVals = true && (isSetPartitionVals()); - list.add(present_partitionVals); - if (present_partitionVals) - list.add(partitionVals); - - return list.hashCode(); - } - - @Override - public int compareTo(FireEventRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccessful()).compareTo(other.isSetSuccessful()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccessful()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.successful, other.successful); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartitionVals()).compareTo(other.isSetPartitionVals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitionVals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionVals, other.partitionVals); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("FireEventRequest("); - boolean first = true; - - sb.append("successful:"); - sb.append(this.successful); - first = false; - if (!first) sb.append(", "); - sb.append("data:"); - if (this.data == null) { - sb.append("null"); - } else { - sb.append(this.data); - } - first = false; - if (isSetDbName()) { - if (!first) sb.append(", "); - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - } - if (isSetTableName()) { - if (!first) sb.append(", "); - sb.append("tableName:"); - if (this.tableName == null) { - sb.append("null"); - } else { - sb.append(this.tableName); - } - first = false; - } - if (isSetPartitionVals()) { - if (!first) sb.append(", "); - sb.append("partitionVals:"); - if (this.partitionVals == null) { - sb.append("null"); - } else { - sb.append(this.partitionVals); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetSuccessful()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'successful' is unset! Struct:" + toString()); - } - - if (!isSetData()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'data' is unset! Struct:" + toString()); - } - - // 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 { - // 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 FireEventRequestStandardSchemeFactory implements SchemeFactory { - public FireEventRequestStandardScheme getScheme() { - return new FireEventRequestStandardScheme(); - } - } - - private static class FireEventRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, FireEventRequest 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: // SUCCESSFUL - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.successful = iprot.readBool(); - struct.setSuccessfulIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DATA - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.data = new FireEventRequestData(); - struct.data.read(iprot); - struct.setDataIsSet(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: // 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 5: // PARTITION_VALS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list606 = iprot.readListBegin(); - struct.partitionVals = new ArrayList(_list606.size); - String _elem607; - for (int _i608 = 0; _i608 < _list606.size; ++_i608) - { - _elem607 = iprot.readString(); - struct.partitionVals.add(_elem607); - } - iprot.readListEnd(); - } - struct.setPartitionValsIsSet(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, FireEventRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SUCCESSFUL_FIELD_DESC); - oprot.writeBool(struct.successful); - oprot.writeFieldEnd(); - if (struct.data != null) { - oprot.writeFieldBegin(DATA_FIELD_DESC); - struct.data.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.dbName != null) { - if (struct.isSetDbName()) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - } - if (struct.tableName != null) { - if (struct.isSetTableName()) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(struct.tableName); - oprot.writeFieldEnd(); - } - } - if (struct.partitionVals != null) { - if (struct.isSetPartitionVals()) { - oprot.writeFieldBegin(PARTITION_VALS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partitionVals.size())); - for (String _iter609 : struct.partitionVals) - { - oprot.writeString(_iter609); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class FireEventRequestTupleSchemeFactory implements SchemeFactory { - public FireEventRequestTupleScheme getScheme() { - return new FireEventRequestTupleScheme(); - } - } - - private static class FireEventRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, FireEventRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBool(struct.successful); - struct.data.write(oprot); - BitSet optionals = new BitSet(); - if (struct.isSetDbName()) { - optionals.set(0); - } - if (struct.isSetTableName()) { - optionals.set(1); - } - if (struct.isSetPartitionVals()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetDbName()) { - oprot.writeString(struct.dbName); - } - if (struct.isSetTableName()) { - oprot.writeString(struct.tableName); - } - if (struct.isSetPartitionVals()) { - { - oprot.writeI32(struct.partitionVals.size()); - for (String _iter610 : struct.partitionVals) - { - oprot.writeString(_iter610); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, FireEventRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.successful = iprot.readBool(); - struct.setSuccessfulIsSet(true); - struct.data = new FireEventRequestData(); - struct.data.read(iprot); - struct.setDataIsSet(true); - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - } - if (incoming.get(1)) { - struct.tableName = iprot.readString(); - struct.setTableNameIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list611 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.partitionVals = new ArrayList(_list611.size); - String _elem612; - for (int _i613 = 0; _i613 < _list611.size; ++_i613) - { - _elem612 = iprot.readString(); - struct.partitionVals.add(_elem612); - } - } - struct.setPartitionValsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequestData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequestData.java deleted file mode 100644 index db8dc8b..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequestData.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -public class FireEventRequestData extends org.apache.thrift.TUnion { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FireEventRequestData"); - private static final org.apache.thrift.protocol.TField INSERT_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("insertData", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - INSERT_DATA((short)1, "insertData"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // INSERT_DATA - return INSERT_DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - 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); - tmpMap.put(_Fields.INSERT_DATA, new org.apache.thrift.meta_data.FieldMetaData("insertData", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InsertEventRequestData.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FireEventRequestData.class, metaDataMap); - } - - public FireEventRequestData() { - super(); - } - - public FireEventRequestData(_Fields setField, Object value) { - super(setField, value); - } - - public FireEventRequestData(FireEventRequestData other) { - super(other); - } - public FireEventRequestData deepCopy() { - return new FireEventRequestData(this); - } - - public static FireEventRequestData insertData(InsertEventRequestData value) { - FireEventRequestData x = new FireEventRequestData(); - x.setInsertData(value); - return x; - } - - - @Override - protected void checkType(_Fields setField, Object value) throws ClassCastException { - switch (setField) { - case INSERT_DATA: - if (value instanceof InsertEventRequestData) { - break; - } - throw new ClassCastException("Was expecting value of type InsertEventRequestData for field 'insertData', but got " + value.getClass().getSimpleName()); - default: - throw new IllegalArgumentException("Unknown field id " + setField); - } - } - - @Override - protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { - _Fields setField = _Fields.findByThriftId(field.id); - if (setField != null) { - switch (setField) { - case INSERT_DATA: - if (field.type == INSERT_DATA_FIELD_DESC.type) { - InsertEventRequestData insertData; - insertData = new InsertEventRequestData(); - insertData.read(iprot); - return insertData; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - default: - throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - } - - @Override - protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - switch (setField_) { - case INSERT_DATA: - InsertEventRequestData insertData = (InsertEventRequestData)value_; - insertData.write(oprot); - return; - default: - throw new IllegalStateException("Cannot write union with unknown field " + setField_); - } - } - - @Override - protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { - _Fields setField = _Fields.findByThriftId(fieldID); - if (setField != null) { - switch (setField) { - case INSERT_DATA: - InsertEventRequestData insertData; - insertData = new InsertEventRequestData(); - insertData.read(iprot); - return insertData; - default: - throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); - } - } else { - throw new TProtocolException("Couldn't find a field with field id " + fieldID); - } - } - - @Override - protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - switch (setField_) { - case INSERT_DATA: - InsertEventRequestData insertData = (InsertEventRequestData)value_; - insertData.write(oprot); - return; - default: - throw new IllegalStateException("Cannot write union with unknown field " + setField_); - } - } - - @Override - protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { - switch (setField) { - case INSERT_DATA: - return INSERT_DATA_FIELD_DESC; - default: - throw new IllegalArgumentException("Unknown field id " + setField); - } - } - - @Override - protected org.apache.thrift.protocol.TStruct getStructDesc() { - return STRUCT_DESC; - } - - @Override - protected _Fields enumForId(short id) { - return _Fields.findByThriftIdOrThrow(id); - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - - public InsertEventRequestData getInsertData() { - if (getSetField() == _Fields.INSERT_DATA) { - return (InsertEventRequestData)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'insertData' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void setInsertData(InsertEventRequestData value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.INSERT_DATA; - value_ = value; - } - - public boolean isSetInsertData() { - return setField_ == _Fields.INSERT_DATA; - } - - - public boolean equals(Object other) { - if (other instanceof FireEventRequestData) { - return equals((FireEventRequestData)other); - } else { - return false; - } - } - - public boolean equals(FireEventRequestData other) { - return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); - } - - @Override - public int compareTo(FireEventRequestData other) { - int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); - if (lastComparison == 0) { - return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); - } - return lastComparison; - } - - - @Override - public int hashCode() { - List list = new ArrayList(); - list.add(this.getClass().getName()); - org.apache.thrift.TFieldIdEnum setField = getSetField(); - if (setField != null) { - list.add(setField.getThriftFieldId()); - Object value = getFieldValue(); - if (value instanceof org.apache.thrift.TEnum) { - list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); - } else { - list.add(value); - } - } - return list.hashCode(); - } - 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); - } - } - - -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventResponse.java deleted file mode 100644 index 9a86ed5..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventResponse.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class FireEventResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FireEventResponse"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new FireEventResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new FireEventResponseTupleSchemeFactory()); - } - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FireEventResponse.class, metaDataMap); - } - - public FireEventResponse() { - } - - /** - * Performs a deep copy on other. - */ - public FireEventResponse(FireEventResponse other) { - } - - public FireEventResponse deepCopy() { - return new FireEventResponse(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof FireEventResponse) - return this.equals((FireEventResponse)that); - return false; - } - - public boolean equals(FireEventResponse that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(FireEventResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("FireEventResponse("); - boolean first = true; - - 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 FireEventResponseStandardSchemeFactory implements SchemeFactory { - public FireEventResponseStandardScheme getScheme() { - return new FireEventResponseStandardScheme(); - } - } - - private static class FireEventResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, FireEventResponse 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, FireEventResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class FireEventResponseTupleSchemeFactory implements SchemeFactory { - public FireEventResponseTupleScheme getScheme() { - return new FireEventResponseTupleScheme(); - } - } - - private static class FireEventResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, FireEventResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, FireEventResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java deleted file mode 100644 index d6b1cff..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java +++ /dev/null @@ -1,707 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ForeignKeysRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ForeignKeysRequest"); - - private static final org.apache.thrift.protocol.TField PARENT_DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_db_name", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField PARENT_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField FOREIGN_DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreign_db_name", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField FOREIGN_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreign_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ForeignKeysRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ForeignKeysRequestTupleSchemeFactory()); - } - - private String parent_db_name; // required - private String parent_tbl_name; // required - private String foreign_db_name; // required - private String foreign_tbl_name; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PARENT_DB_NAME((short)1, "parent_db_name"), - PARENT_TBL_NAME((short)2, "parent_tbl_name"), - FOREIGN_DB_NAME((short)3, "foreign_db_name"), - FOREIGN_TBL_NAME((short)4, "foreign_tbl_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PARENT_DB_NAME - return PARENT_DB_NAME; - case 2: // PARENT_TBL_NAME - return PARENT_TBL_NAME; - case 3: // FOREIGN_DB_NAME - return FOREIGN_DB_NAME; - case 4: // FOREIGN_TBL_NAME - return FOREIGN_TBL_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PARENT_DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("parent_db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARENT_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("parent_tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FOREIGN_DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreign_db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FOREIGN_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreign_tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ForeignKeysRequest.class, metaDataMap); - } - - public ForeignKeysRequest() { - } - - public ForeignKeysRequest( - String parent_db_name, - String parent_tbl_name, - String foreign_db_name, - String foreign_tbl_name) - { - this(); - this.parent_db_name = parent_db_name; - this.parent_tbl_name = parent_tbl_name; - this.foreign_db_name = foreign_db_name; - this.foreign_tbl_name = foreign_tbl_name; - } - - /** - * Performs a deep copy on other. - */ - public ForeignKeysRequest(ForeignKeysRequest other) { - if (other.isSetParent_db_name()) { - this.parent_db_name = other.parent_db_name; - } - if (other.isSetParent_tbl_name()) { - this.parent_tbl_name = other.parent_tbl_name; - } - if (other.isSetForeign_db_name()) { - this.foreign_db_name = other.foreign_db_name; - } - if (other.isSetForeign_tbl_name()) { - this.foreign_tbl_name = other.foreign_tbl_name; - } - } - - public ForeignKeysRequest deepCopy() { - return new ForeignKeysRequest(this); - } - - @Override - public void clear() { - this.parent_db_name = null; - this.parent_tbl_name = null; - this.foreign_db_name = null; - this.foreign_tbl_name = null; - } - - public String getParent_db_name() { - return this.parent_db_name; - } - - public void setParent_db_name(String parent_db_name) { - this.parent_db_name = parent_db_name; - } - - public void unsetParent_db_name() { - this.parent_db_name = null; - } - - /** Returns true if field parent_db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetParent_db_name() { - return this.parent_db_name != null; - } - - public void setParent_db_nameIsSet(boolean value) { - if (!value) { - this.parent_db_name = null; - } - } - - public String getParent_tbl_name() { - return this.parent_tbl_name; - } - - public void setParent_tbl_name(String parent_tbl_name) { - this.parent_tbl_name = parent_tbl_name; - } - - public void unsetParent_tbl_name() { - this.parent_tbl_name = null; - } - - /** Returns true if field parent_tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetParent_tbl_name() { - return this.parent_tbl_name != null; - } - - public void setParent_tbl_nameIsSet(boolean value) { - if (!value) { - this.parent_tbl_name = null; - } - } - - public String getForeign_db_name() { - return this.foreign_db_name; - } - - public void setForeign_db_name(String foreign_db_name) { - this.foreign_db_name = foreign_db_name; - } - - public void unsetForeign_db_name() { - this.foreign_db_name = null; - } - - /** Returns true if field foreign_db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetForeign_db_name() { - return this.foreign_db_name != null; - } - - public void setForeign_db_nameIsSet(boolean value) { - if (!value) { - this.foreign_db_name = null; - } - } - - public String getForeign_tbl_name() { - return this.foreign_tbl_name; - } - - public void setForeign_tbl_name(String foreign_tbl_name) { - this.foreign_tbl_name = foreign_tbl_name; - } - - public void unsetForeign_tbl_name() { - this.foreign_tbl_name = null; - } - - /** Returns true if field foreign_tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetForeign_tbl_name() { - return this.foreign_tbl_name != null; - } - - public void setForeign_tbl_nameIsSet(boolean value) { - if (!value) { - this.foreign_tbl_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PARENT_DB_NAME: - if (value == null) { - unsetParent_db_name(); - } else { - setParent_db_name((String)value); - } - break; - - case PARENT_TBL_NAME: - if (value == null) { - unsetParent_tbl_name(); - } else { - setParent_tbl_name((String)value); - } - break; - - case FOREIGN_DB_NAME: - if (value == null) { - unsetForeign_db_name(); - } else { - setForeign_db_name((String)value); - } - break; - - case FOREIGN_TBL_NAME: - if (value == null) { - unsetForeign_tbl_name(); - } else { - setForeign_tbl_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PARENT_DB_NAME: - return getParent_db_name(); - - case PARENT_TBL_NAME: - return getParent_tbl_name(); - - case FOREIGN_DB_NAME: - return getForeign_db_name(); - - case FOREIGN_TBL_NAME: - return getForeign_tbl_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PARENT_DB_NAME: - return isSetParent_db_name(); - case PARENT_TBL_NAME: - return isSetParent_tbl_name(); - case FOREIGN_DB_NAME: - return isSetForeign_db_name(); - case FOREIGN_TBL_NAME: - return isSetForeign_tbl_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ForeignKeysRequest) - return this.equals((ForeignKeysRequest)that); - return false; - } - - public boolean equals(ForeignKeysRequest that) { - if (that == null) - return false; - - boolean this_present_parent_db_name = true && this.isSetParent_db_name(); - boolean that_present_parent_db_name = true && that.isSetParent_db_name(); - if (this_present_parent_db_name || that_present_parent_db_name) { - if (!(this_present_parent_db_name && that_present_parent_db_name)) - return false; - if (!this.parent_db_name.equals(that.parent_db_name)) - return false; - } - - boolean this_present_parent_tbl_name = true && this.isSetParent_tbl_name(); - boolean that_present_parent_tbl_name = true && that.isSetParent_tbl_name(); - if (this_present_parent_tbl_name || that_present_parent_tbl_name) { - if (!(this_present_parent_tbl_name && that_present_parent_tbl_name)) - return false; - if (!this.parent_tbl_name.equals(that.parent_tbl_name)) - return false; - } - - boolean this_present_foreign_db_name = true && this.isSetForeign_db_name(); - boolean that_present_foreign_db_name = true && that.isSetForeign_db_name(); - if (this_present_foreign_db_name || that_present_foreign_db_name) { - if (!(this_present_foreign_db_name && that_present_foreign_db_name)) - return false; - if (!this.foreign_db_name.equals(that.foreign_db_name)) - return false; - } - - boolean this_present_foreign_tbl_name = true && this.isSetForeign_tbl_name(); - boolean that_present_foreign_tbl_name = true && that.isSetForeign_tbl_name(); - if (this_present_foreign_tbl_name || that_present_foreign_tbl_name) { - if (!(this_present_foreign_tbl_name && that_present_foreign_tbl_name)) - return false; - if (!this.foreign_tbl_name.equals(that.foreign_tbl_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_parent_db_name = true && (isSetParent_db_name()); - list.add(present_parent_db_name); - if (present_parent_db_name) - list.add(parent_db_name); - - boolean present_parent_tbl_name = true && (isSetParent_tbl_name()); - list.add(present_parent_tbl_name); - if (present_parent_tbl_name) - list.add(parent_tbl_name); - - boolean present_foreign_db_name = true && (isSetForeign_db_name()); - list.add(present_foreign_db_name); - if (present_foreign_db_name) - list.add(foreign_db_name); - - boolean present_foreign_tbl_name = true && (isSetForeign_tbl_name()); - list.add(present_foreign_tbl_name); - if (present_foreign_tbl_name) - list.add(foreign_tbl_name); - - return list.hashCode(); - } - - @Override - public int compareTo(ForeignKeysRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetParent_db_name()).compareTo(other.isSetParent_db_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParent_db_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_db_name, other.parent_db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParent_tbl_name()).compareTo(other.isSetParent_tbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParent_tbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_tbl_name, other.parent_tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetForeign_db_name()).compareTo(other.isSetForeign_db_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetForeign_db_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreign_db_name, other.foreign_db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetForeign_tbl_name()).compareTo(other.isSetForeign_tbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetForeign_tbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreign_tbl_name, other.foreign_tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ForeignKeysRequest("); - boolean first = true; - - sb.append("parent_db_name:"); - if (this.parent_db_name == null) { - sb.append("null"); - } else { - sb.append(this.parent_db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("parent_tbl_name:"); - if (this.parent_tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.parent_tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("foreign_db_name:"); - if (this.foreign_db_name == null) { - sb.append("null"); - } else { - sb.append(this.foreign_db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("foreign_tbl_name:"); - if (this.foreign_tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.foreign_tbl_name); - } - 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 ForeignKeysRequestStandardSchemeFactory implements SchemeFactory { - public ForeignKeysRequestStandardScheme getScheme() { - return new ForeignKeysRequestStandardScheme(); - } - } - - private static class ForeignKeysRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ForeignKeysRequest 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: // PARENT_DB_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.parent_db_name = iprot.readString(); - struct.setParent_db_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PARENT_TBL_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.parent_tbl_name = iprot.readString(); - struct.setParent_tbl_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // FOREIGN_DB_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.foreign_db_name = iprot.readString(); - struct.setForeign_db_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // FOREIGN_TBL_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.foreign_tbl_name = iprot.readString(); - struct.setForeign_tbl_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, ForeignKeysRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.parent_db_name != null) { - oprot.writeFieldBegin(PARENT_DB_NAME_FIELD_DESC); - oprot.writeString(struct.parent_db_name); - oprot.writeFieldEnd(); - } - if (struct.parent_tbl_name != null) { - oprot.writeFieldBegin(PARENT_TBL_NAME_FIELD_DESC); - oprot.writeString(struct.parent_tbl_name); - oprot.writeFieldEnd(); - } - if (struct.foreign_db_name != null) { - oprot.writeFieldBegin(FOREIGN_DB_NAME_FIELD_DESC); - oprot.writeString(struct.foreign_db_name); - oprot.writeFieldEnd(); - } - if (struct.foreign_tbl_name != null) { - oprot.writeFieldBegin(FOREIGN_TBL_NAME_FIELD_DESC); - oprot.writeString(struct.foreign_tbl_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ForeignKeysRequestTupleSchemeFactory implements SchemeFactory { - public ForeignKeysRequestTupleScheme getScheme() { - return new ForeignKeysRequestTupleScheme(); - } - } - - private static class ForeignKeysRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ForeignKeysRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetParent_db_name()) { - optionals.set(0); - } - if (struct.isSetParent_tbl_name()) { - optionals.set(1); - } - if (struct.isSetForeign_db_name()) { - optionals.set(2); - } - if (struct.isSetForeign_tbl_name()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetParent_db_name()) { - oprot.writeString(struct.parent_db_name); - } - if (struct.isSetParent_tbl_name()) { - oprot.writeString(struct.parent_tbl_name); - } - if (struct.isSetForeign_db_name()) { - oprot.writeString(struct.foreign_db_name); - } - if (struct.isSetForeign_tbl_name()) { - oprot.writeString(struct.foreign_tbl_name); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ForeignKeysRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.parent_db_name = iprot.readString(); - struct.setParent_db_nameIsSet(true); - } - if (incoming.get(1)) { - struct.parent_tbl_name = iprot.readString(); - struct.setParent_tbl_nameIsSet(true); - } - if (incoming.get(2)) { - struct.foreign_db_name = iprot.readString(); - struct.setForeign_db_nameIsSet(true); - } - if (incoming.get(3)) { - struct.foreign_tbl_name = iprot.readString(); - struct.setForeign_tbl_nameIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java deleted file mode 100644 index 7135a65..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ForeignKeysResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ForeignKeysResponse"); - - private static final org.apache.thrift.protocol.TField FOREIGN_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignKeys", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ForeignKeysResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ForeignKeysResponseTupleSchemeFactory()); - } - - private List foreignKeys; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FOREIGN_KEYS((short)1, "foreignKeys"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FOREIGN_KEYS - return FOREIGN_KEYS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.FOREIGN_KEYS, new org.apache.thrift.meta_data.FieldMetaData("foreignKeys", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLForeignKey.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ForeignKeysResponse.class, metaDataMap); - } - - public ForeignKeysResponse() { - } - - public ForeignKeysResponse( - List foreignKeys) - { - this(); - this.foreignKeys = foreignKeys; - } - - /** - * Performs a deep copy on other. - */ - public ForeignKeysResponse(ForeignKeysResponse other) { - if (other.isSetForeignKeys()) { - List __this__foreignKeys = new ArrayList(other.foreignKeys.size()); - for (SQLForeignKey other_element : other.foreignKeys) { - __this__foreignKeys.add(new SQLForeignKey(other_element)); - } - this.foreignKeys = __this__foreignKeys; - } - } - - public ForeignKeysResponse deepCopy() { - return new ForeignKeysResponse(this); - } - - @Override - public void clear() { - this.foreignKeys = null; - } - - public int getForeignKeysSize() { - return (this.foreignKeys == null) ? 0 : this.foreignKeys.size(); - } - - public java.util.Iterator getForeignKeysIterator() { - return (this.foreignKeys == null) ? null : this.foreignKeys.iterator(); - } - - public void addToForeignKeys(SQLForeignKey elem) { - if (this.foreignKeys == null) { - this.foreignKeys = new ArrayList(); - } - this.foreignKeys.add(elem); - } - - public List getForeignKeys() { - return this.foreignKeys; - } - - public void setForeignKeys(List foreignKeys) { - this.foreignKeys = foreignKeys; - } - - public void unsetForeignKeys() { - this.foreignKeys = null; - } - - /** Returns true if field foreignKeys is set (has been assigned a value) and false otherwise */ - public boolean isSetForeignKeys() { - return this.foreignKeys != null; - } - - public void setForeignKeysIsSet(boolean value) { - if (!value) { - this.foreignKeys = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case FOREIGN_KEYS: - if (value == null) { - unsetForeignKeys(); - } else { - setForeignKeys((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case FOREIGN_KEYS: - return getForeignKeys(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case FOREIGN_KEYS: - return isSetForeignKeys(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ForeignKeysResponse) - return this.equals((ForeignKeysResponse)that); - return false; - } - - public boolean equals(ForeignKeysResponse that) { - if (that == null) - return false; - - boolean this_present_foreignKeys = true && this.isSetForeignKeys(); - boolean that_present_foreignKeys = true && that.isSetForeignKeys(); - if (this_present_foreignKeys || that_present_foreignKeys) { - if (!(this_present_foreignKeys && that_present_foreignKeys)) - return false; - if (!this.foreignKeys.equals(that.foreignKeys)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_foreignKeys = true && (isSetForeignKeys()); - list.add(present_foreignKeys); - if (present_foreignKeys) - list.add(foreignKeys); - - return list.hashCode(); - } - - @Override - public int compareTo(ForeignKeysResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetForeignKeys()).compareTo(other.isSetForeignKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetForeignKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignKeys, other.foreignKeys); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ForeignKeysResponse("); - boolean first = true; - - sb.append("foreignKeys:"); - if (this.foreignKeys == null) { - sb.append("null"); - } else { - sb.append(this.foreignKeys); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetForeignKeys()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'foreignKeys' is unset! Struct:" + toString()); - } - - // 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 ForeignKeysResponseStandardSchemeFactory implements SchemeFactory { - public ForeignKeysResponseStandardScheme getScheme() { - return new ForeignKeysResponseStandardScheme(); - } - } - - private static class ForeignKeysResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ForeignKeysResponse 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: // FOREIGN_KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list330 = iprot.readListBegin(); - struct.foreignKeys = new ArrayList(_list330.size); - SQLForeignKey _elem331; - for (int _i332 = 0; _i332 < _list330.size; ++_i332) - { - _elem331 = new SQLForeignKey(); - _elem331.read(iprot); - struct.foreignKeys.add(_elem331); - } - iprot.readListEnd(); - } - struct.setForeignKeysIsSet(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, ForeignKeysResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.foreignKeys != null) { - oprot.writeFieldBegin(FOREIGN_KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeys.size())); - for (SQLForeignKey _iter333 : struct.foreignKeys) - { - _iter333.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ForeignKeysResponseTupleSchemeFactory implements SchemeFactory { - public ForeignKeysResponseTupleScheme getScheme() { - return new ForeignKeysResponseTupleScheme(); - } - } - - private static class ForeignKeysResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ForeignKeysResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.foreignKeys.size()); - for (SQLForeignKey _iter334 : struct.foreignKeys) - { - _iter334.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ForeignKeysResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.foreignKeys = new ArrayList(_list335.size); - SQLForeignKey _elem336; - for (int _i337 = 0; _i337 < _list335.size; ++_i337) - { - _elem336 = new SQLForeignKey(); - _elem336.read(iprot); - struct.foreignKeys.add(_elem336); - } - } - struct.setForeignKeysIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java deleted file mode 100644 index ad12ab1..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java +++ /dev/null @@ -1,1199 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class Function implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Function"); - - private static final org.apache.thrift.protocol.TField FUNCTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("functionName", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("className", org.apache.thrift.protocol.TType.STRING, (short)3); - 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)4); - private static final org.apache.thrift.protocol.TField OWNER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerType", org.apache.thrift.protocol.TType.I32, (short)5); - 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)6); - private static final org.apache.thrift.protocol.TField FUNCTION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("functionType", org.apache.thrift.protocol.TType.I32, (short)7); - private static final org.apache.thrift.protocol.TField RESOURCE_URIS_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceUris", org.apache.thrift.protocol.TType.LIST, (short)8); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new FunctionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new FunctionTupleSchemeFactory()); - } - - private String functionName; // required - private String dbName; // required - private String className; // required - private String ownerName; // required - private PrincipalType ownerType; // required - private int createTime; // required - private FunctionType functionType; // required - private List resourceUris; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FUNCTION_NAME((short)1, "functionName"), - DB_NAME((short)2, "dbName"), - CLASS_NAME((short)3, "className"), - OWNER_NAME((short)4, "ownerName"), - /** - * - * @see PrincipalType - */ - OWNER_TYPE((short)5, "ownerType"), - CREATE_TIME((short)6, "createTime"), - /** - * - * @see FunctionType - */ - FUNCTION_TYPE((short)7, "functionType"), - RESOURCE_URIS((short)8, "resourceUris"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FUNCTION_NAME - return FUNCTION_NAME; - case 2: // DB_NAME - return DB_NAME; - case 3: // CLASS_NAME - return CLASS_NAME; - case 4: // OWNER_NAME - return OWNER_NAME; - case 5: // OWNER_TYPE - return OWNER_TYPE; - case 6: // CREATE_TIME - return CREATE_TIME; - case 7: // FUNCTION_TYPE - return FUNCTION_TYPE; - case 8: // RESOURCE_URIS - return RESOURCE_URIS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __CREATETIME_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.FUNCTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("functionName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CLASS_NAME, new org.apache.thrift.meta_data.FieldMetaData("className", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.OWNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("ownerName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.OWNER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("ownerType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.FUNCTION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("functionType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FunctionType.class))); - tmpMap.put(_Fields.RESOURCE_URIS, new org.apache.thrift.meta_data.FieldMetaData("resourceUris", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ResourceUri.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Function.class, metaDataMap); - } - - public Function() { - } - - public Function( - String functionName, - String dbName, - String className, - String ownerName, - PrincipalType ownerType, - int createTime, - FunctionType functionType, - List resourceUris) - { - this(); - this.functionName = functionName; - this.dbName = dbName; - this.className = className; - this.ownerName = ownerName; - this.ownerType = ownerType; - this.createTime = createTime; - setCreateTimeIsSet(true); - this.functionType = functionType; - this.resourceUris = resourceUris; - } - - /** - * Performs a deep copy on other. - */ - public Function(Function other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetFunctionName()) { - this.functionName = other.functionName; - } - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetClassName()) { - this.className = other.className; - } - if (other.isSetOwnerName()) { - this.ownerName = other.ownerName; - } - if (other.isSetOwnerType()) { - this.ownerType = other.ownerType; - } - this.createTime = other.createTime; - if (other.isSetFunctionType()) { - this.functionType = other.functionType; - } - if (other.isSetResourceUris()) { - List __this__resourceUris = new ArrayList(other.resourceUris.size()); - for (ResourceUri other_element : other.resourceUris) { - __this__resourceUris.add(new ResourceUri(other_element)); - } - this.resourceUris = __this__resourceUris; - } - } - - public Function deepCopy() { - return new Function(this); - } - - @Override - public void clear() { - this.functionName = null; - this.dbName = null; - this.className = null; - this.ownerName = null; - this.ownerType = null; - setCreateTimeIsSet(false); - this.createTime = 0; - this.functionType = null; - this.resourceUris = null; - } - - public String getFunctionName() { - return this.functionName; - } - - public void setFunctionName(String functionName) { - this.functionName = functionName; - } - - public void unsetFunctionName() { - this.functionName = null; - } - - /** Returns true if field functionName is set (has been assigned a value) and false otherwise */ - public boolean isSetFunctionName() { - return this.functionName != null; - } - - public void setFunctionNameIsSet(boolean value) { - if (!value) { - this.functionName = null; - } - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getClassName() { - return this.className; - } - - public void setClassName(String className) { - this.className = className; - } - - public void unsetClassName() { - this.className = null; - } - - /** Returns true if field className is set (has been assigned a value) and false otherwise */ - public boolean isSetClassName() { - return this.className != null; - } - - public void setClassNameIsSet(boolean value) { - if (!value) { - this.className = null; - } - } - - public String getOwnerName() { - return this.ownerName; - } - - public void setOwnerName(String ownerName) { - this.ownerName = ownerName; - } - - public void unsetOwnerName() { - this.ownerName = null; - } - - /** Returns true if field ownerName is set (has been assigned a value) and false otherwise */ - public boolean isSetOwnerName() { - return this.ownerName != null; - } - - public void setOwnerNameIsSet(boolean value) { - if (!value) { - this.ownerName = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getOwnerType() { - return this.ownerType; - } - - /** - * - * @see PrincipalType - */ - public void setOwnerType(PrincipalType ownerType) { - this.ownerType = ownerType; - } - - public void unsetOwnerType() { - this.ownerType = null; - } - - /** Returns true if field ownerType is set (has been assigned a value) and false otherwise */ - public boolean isSetOwnerType() { - return this.ownerType != null; - } - - public void setOwnerTypeIsSet(boolean value) { - if (!value) { - this.ownerType = null; - } - } - - public int getCreateTime() { - return this.createTime; - } - - public void setCreateTime(int createTime) { - this.createTime = createTime; - setCreateTimeIsSet(true); - } - - public void unsetCreateTime() { - __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - public void setCreateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); - } - - /** - * - * @see FunctionType - */ - public FunctionType getFunctionType() { - return this.functionType; - } - - /** - * - * @see FunctionType - */ - public void setFunctionType(FunctionType functionType) { - this.functionType = functionType; - } - - public void unsetFunctionType() { - this.functionType = null; - } - - /** Returns true if field functionType is set (has been assigned a value) and false otherwise */ - public boolean isSetFunctionType() { - return this.functionType != null; - } - - public void setFunctionTypeIsSet(boolean value) { - if (!value) { - this.functionType = null; - } - } - - public int getResourceUrisSize() { - return (this.resourceUris == null) ? 0 : this.resourceUris.size(); - } - - public java.util.Iterator getResourceUrisIterator() { - return (this.resourceUris == null) ? null : this.resourceUris.iterator(); - } - - public void addToResourceUris(ResourceUri elem) { - if (this.resourceUris == null) { - this.resourceUris = new ArrayList(); - } - this.resourceUris.add(elem); - } - - public List getResourceUris() { - return this.resourceUris; - } - - public void setResourceUris(List resourceUris) { - this.resourceUris = resourceUris; - } - - public void unsetResourceUris() { - this.resourceUris = null; - } - - /** Returns true if field resourceUris is set (has been assigned a value) and false otherwise */ - public boolean isSetResourceUris() { - return this.resourceUris != null; - } - - public void setResourceUrisIsSet(boolean value) { - if (!value) { - this.resourceUris = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case FUNCTION_NAME: - if (value == null) { - unsetFunctionName(); - } else { - setFunctionName((String)value); - } - break; - - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case CLASS_NAME: - if (value == null) { - unsetClassName(); - } else { - setClassName((String)value); - } - break; - - case OWNER_NAME: - if (value == null) { - unsetOwnerName(); - } else { - setOwnerName((String)value); - } - break; - - case OWNER_TYPE: - if (value == null) { - unsetOwnerType(); - } else { - setOwnerType((PrincipalType)value); - } - break; - - case CREATE_TIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((Integer)value); - } - break; - - case FUNCTION_TYPE: - if (value == null) { - unsetFunctionType(); - } else { - setFunctionType((FunctionType)value); - } - break; - - case RESOURCE_URIS: - if (value == null) { - unsetResourceUris(); - } else { - setResourceUris((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case FUNCTION_NAME: - return getFunctionName(); - - case DB_NAME: - return getDbName(); - - case CLASS_NAME: - return getClassName(); - - case OWNER_NAME: - return getOwnerName(); - - case OWNER_TYPE: - return getOwnerType(); - - case CREATE_TIME: - return getCreateTime(); - - case FUNCTION_TYPE: - return getFunctionType(); - - case RESOURCE_URIS: - return getResourceUris(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case FUNCTION_NAME: - return isSetFunctionName(); - case DB_NAME: - return isSetDbName(); - case CLASS_NAME: - return isSetClassName(); - case OWNER_NAME: - return isSetOwnerName(); - case OWNER_TYPE: - return isSetOwnerType(); - case CREATE_TIME: - return isSetCreateTime(); - case FUNCTION_TYPE: - return isSetFunctionType(); - case RESOURCE_URIS: - return isSetResourceUris(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Function) - return this.equals((Function)that); - return false; - } - - public boolean equals(Function that) { - if (that == null) - return false; - - boolean this_present_functionName = true && this.isSetFunctionName(); - boolean that_present_functionName = true && that.isSetFunctionName(); - if (this_present_functionName || that_present_functionName) { - if (!(this_present_functionName && that_present_functionName)) - return false; - if (!this.functionName.equals(that.functionName)) - return false; - } - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_className = true && this.isSetClassName(); - boolean that_present_className = true && that.isSetClassName(); - if (this_present_className || that_present_className) { - if (!(this_present_className && that_present_className)) - return false; - if (!this.className.equals(that.className)) - return false; - } - - boolean this_present_ownerName = true && this.isSetOwnerName(); - boolean that_present_ownerName = true && that.isSetOwnerName(); - if (this_present_ownerName || that_present_ownerName) { - if (!(this_present_ownerName && that_present_ownerName)) - return false; - if (!this.ownerName.equals(that.ownerName)) - return false; - } - - boolean this_present_ownerType = true && this.isSetOwnerType(); - boolean that_present_ownerType = true && that.isSetOwnerType(); - if (this_present_ownerType || that_present_ownerType) { - if (!(this_present_ownerType && that_present_ownerType)) - return false; - if (!this.ownerType.equals(that.ownerType)) - return false; - } - - boolean this_present_createTime = true; - boolean that_present_createTime = true; - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_functionType = true && this.isSetFunctionType(); - boolean that_present_functionType = true && that.isSetFunctionType(); - if (this_present_functionType || that_present_functionType) { - if (!(this_present_functionType && that_present_functionType)) - return false; - if (!this.functionType.equals(that.functionType)) - return false; - } - - boolean this_present_resourceUris = true && this.isSetResourceUris(); - boolean that_present_resourceUris = true && that.isSetResourceUris(); - if (this_present_resourceUris || that_present_resourceUris) { - if (!(this_present_resourceUris && that_present_resourceUris)) - return false; - if (!this.resourceUris.equals(that.resourceUris)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_functionName = true && (isSetFunctionName()); - list.add(present_functionName); - if (present_functionName) - list.add(functionName); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_className = true && (isSetClassName()); - list.add(present_className); - if (present_className) - list.add(className); - - boolean present_ownerName = true && (isSetOwnerName()); - list.add(present_ownerName); - if (present_ownerName) - list.add(ownerName); - - boolean present_ownerType = true && (isSetOwnerType()); - list.add(present_ownerType); - if (present_ownerType) - list.add(ownerType.getValue()); - - boolean present_createTime = true; - list.add(present_createTime); - if (present_createTime) - list.add(createTime); - - boolean present_functionType = true && (isSetFunctionType()); - list.add(present_functionType); - if (present_functionType) - list.add(functionType.getValue()); - - boolean present_resourceUris = true && (isSetResourceUris()); - list.add(present_resourceUris); - if (present_resourceUris) - list.add(resourceUris); - - return list.hashCode(); - } - - @Override - public int compareTo(Function other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetFunctionName()).compareTo(other.isSetFunctionName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFunctionName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionName, other.functionName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetClassName()).compareTo(other.isSetClassName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetClassName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.className, other.className); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOwnerName()).compareTo(other.isSetOwnerName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOwnerName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerName, other.ownerName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOwnerType()).compareTo(other.isSetOwnerType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOwnerType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerType, other.ownerType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCreateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFunctionType()).compareTo(other.isSetFunctionType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFunctionType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionType, other.functionType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetResourceUris()).compareTo(other.isSetResourceUris()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetResourceUris()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceUris, other.resourceUris); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("Function("); - boolean first = true; - - sb.append("functionName:"); - if (this.functionName == null) { - sb.append("null"); - } else { - sb.append(this.functionName); - } - first = false; - if (!first) sb.append(", "); - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("className:"); - if (this.className == null) { - sb.append("null"); - } else { - sb.append(this.className); - } - first = false; - if (!first) sb.append(", "); - sb.append("ownerName:"); - if (this.ownerName == null) { - sb.append("null"); - } else { - sb.append(this.ownerName); - } - first = false; - if (!first) sb.append(", "); - sb.append("ownerType:"); - if (this.ownerType == null) { - sb.append("null"); - } else { - sb.append(this.ownerType); - } - first = false; - if (!first) sb.append(", "); - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - if (!first) sb.append(", "); - sb.append("functionType:"); - if (this.functionType == null) { - sb.append("null"); - } else { - sb.append(this.functionType); - } - first = false; - if (!first) sb.append(", "); - sb.append("resourceUris:"); - if (this.resourceUris == null) { - sb.append("null"); - } else { - sb.append(this.resourceUris); - } - 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 { - // 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 FunctionStandardSchemeFactory implements SchemeFactory { - public FunctionStandardScheme getScheme() { - return new FunctionStandardScheme(); - } - } - - private static class FunctionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, Function 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: // FUNCTION_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.functionName = iprot.readString(); - struct.setFunctionNameIsSet(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: // CLASS_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.className = iprot.readString(); - struct.setClassNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // 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; - case 5: // OWNER_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.ownerType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setOwnerTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // 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 7: // FUNCTION_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.functionType = org.apache.hadoop.hive.metastore.api.FunctionType.findByValue(iprot.readI32()); - struct.setFunctionTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // RESOURCE_URIS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list484 = iprot.readListBegin(); - struct.resourceUris = new ArrayList(_list484.size); - ResourceUri _elem485; - for (int _i486 = 0; _i486 < _list484.size; ++_i486) - { - _elem485 = new ResourceUri(); - _elem485.read(iprot); - struct.resourceUris.add(_elem485); - } - iprot.readListEnd(); - } - struct.setResourceUrisIsSet(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, Function struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.functionName != null) { - oprot.writeFieldBegin(FUNCTION_NAME_FIELD_DESC); - oprot.writeString(struct.functionName); - oprot.writeFieldEnd(); - } - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - if (struct.className != null) { - oprot.writeFieldBegin(CLASS_NAME_FIELD_DESC); - oprot.writeString(struct.className); - oprot.writeFieldEnd(); - } - if (struct.ownerName != null) { - oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); - oprot.writeString(struct.ownerName); - oprot.writeFieldEnd(); - } - if (struct.ownerType != null) { - oprot.writeFieldBegin(OWNER_TYPE_FIELD_DESC); - oprot.writeI32(struct.ownerType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(struct.createTime); - oprot.writeFieldEnd(); - if (struct.functionType != null) { - oprot.writeFieldBegin(FUNCTION_TYPE_FIELD_DESC); - oprot.writeI32(struct.functionType.getValue()); - oprot.writeFieldEnd(); - } - if (struct.resourceUris != null) { - oprot.writeFieldBegin(RESOURCE_URIS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.resourceUris.size())); - for (ResourceUri _iter487 : struct.resourceUris) - { - _iter487.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class FunctionTupleSchemeFactory implements SchemeFactory { - public FunctionTupleScheme getScheme() { - return new FunctionTupleScheme(); - } - } - - private static class FunctionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Function struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetFunctionName()) { - optionals.set(0); - } - if (struct.isSetDbName()) { - optionals.set(1); - } - if (struct.isSetClassName()) { - optionals.set(2); - } - if (struct.isSetOwnerName()) { - optionals.set(3); - } - if (struct.isSetOwnerType()) { - optionals.set(4); - } - if (struct.isSetCreateTime()) { - optionals.set(5); - } - if (struct.isSetFunctionType()) { - optionals.set(6); - } - if (struct.isSetResourceUris()) { - optionals.set(7); - } - oprot.writeBitSet(optionals, 8); - if (struct.isSetFunctionName()) { - oprot.writeString(struct.functionName); - } - if (struct.isSetDbName()) { - oprot.writeString(struct.dbName); - } - if (struct.isSetClassName()) { - oprot.writeString(struct.className); - } - if (struct.isSetOwnerName()) { - oprot.writeString(struct.ownerName); - } - if (struct.isSetOwnerType()) { - oprot.writeI32(struct.ownerType.getValue()); - } - if (struct.isSetCreateTime()) { - oprot.writeI32(struct.createTime); - } - if (struct.isSetFunctionType()) { - oprot.writeI32(struct.functionType.getValue()); - } - if (struct.isSetResourceUris()) { - { - oprot.writeI32(struct.resourceUris.size()); - for (ResourceUri _iter488 : struct.resourceUris) - { - _iter488.write(oprot); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Function struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(8); - if (incoming.get(0)) { - struct.functionName = iprot.readString(); - struct.setFunctionNameIsSet(true); - } - if (incoming.get(1)) { - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - } - if (incoming.get(2)) { - struct.className = iprot.readString(); - struct.setClassNameIsSet(true); - } - if (incoming.get(3)) { - struct.ownerName = iprot.readString(); - struct.setOwnerNameIsSet(true); - } - if (incoming.get(4)) { - struct.ownerType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setOwnerTypeIsSet(true); - } - if (incoming.get(5)) { - struct.createTime = iprot.readI32(); - struct.setCreateTimeIsSet(true); - } - if (incoming.get(6)) { - struct.functionType = org.apache.hadoop.hive.metastore.api.FunctionType.findByValue(iprot.readI32()); - struct.setFunctionTypeIsSet(true); - } - if (incoming.get(7)) { - { - org.apache.thrift.protocol.TList _list489 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.resourceUris = new ArrayList(_list489.size); - ResourceUri _elem490; - for (int _i491 = 0; _i491 < _list489.size; ++_i491) - { - _elem490 = new ResourceUri(); - _elem490.read(iprot); - struct.resourceUris.add(_elem490); - } - } - struct.setResourceUrisIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FunctionType.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FunctionType.java deleted file mode 100644 index 1116f88..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FunctionType.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum FunctionType implements org.apache.thrift.TEnum { - JAVA(1); - - private final int value; - - private FunctionType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static FunctionType findByValue(int value) { - switch (value) { - case 1: - return JAVA; - default: - return null; - } - } -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java deleted file mode 100644 index bb11fe3..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java +++ /dev/null @@ -1,447 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetAllFunctionsResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetAllFunctionsResponse"); - - private static final org.apache.thrift.protocol.TField FUNCTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("functions", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetAllFunctionsResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetAllFunctionsResponseTupleSchemeFactory()); - } - - private List functions; // 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 { - FUNCTIONS((short)1, "functions"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FUNCTIONS - return FUNCTIONS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.FUNCTIONS}; - 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); - tmpMap.put(_Fields.FUNCTIONS, new org.apache.thrift.meta_data.FieldMetaData("functions", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetAllFunctionsResponse.class, metaDataMap); - } - - public GetAllFunctionsResponse() { - } - - /** - * Performs a deep copy on other. - */ - public GetAllFunctionsResponse(GetAllFunctionsResponse other) { - if (other.isSetFunctions()) { - List __this__functions = new ArrayList(other.functions.size()); - for (Function other_element : other.functions) { - __this__functions.add(new Function(other_element)); - } - this.functions = __this__functions; - } - } - - public GetAllFunctionsResponse deepCopy() { - return new GetAllFunctionsResponse(this); - } - - @Override - public void clear() { - this.functions = null; - } - - public int getFunctionsSize() { - return (this.functions == null) ? 0 : this.functions.size(); - } - - public java.util.Iterator getFunctionsIterator() { - return (this.functions == null) ? null : this.functions.iterator(); - } - - public void addToFunctions(Function elem) { - if (this.functions == null) { - this.functions = new ArrayList(); - } - this.functions.add(elem); - } - - public List getFunctions() { - return this.functions; - } - - public void setFunctions(List functions) { - this.functions = functions; - } - - public void unsetFunctions() { - this.functions = null; - } - - /** Returns true if field functions is set (has been assigned a value) and false otherwise */ - public boolean isSetFunctions() { - return this.functions != null; - } - - public void setFunctionsIsSet(boolean value) { - if (!value) { - this.functions = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case FUNCTIONS: - if (value == null) { - unsetFunctions(); - } else { - setFunctions((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case FUNCTIONS: - return getFunctions(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case FUNCTIONS: - return isSetFunctions(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetAllFunctionsResponse) - return this.equals((GetAllFunctionsResponse)that); - return false; - } - - public boolean equals(GetAllFunctionsResponse that) { - if (that == null) - return false; - - boolean this_present_functions = true && this.isSetFunctions(); - boolean that_present_functions = true && that.isSetFunctions(); - if (this_present_functions || that_present_functions) { - if (!(this_present_functions && that_present_functions)) - return false; - if (!this.functions.equals(that.functions)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_functions = true && (isSetFunctions()); - list.add(present_functions); - if (present_functions) - list.add(functions); - - return list.hashCode(); - } - - @Override - public int compareTo(GetAllFunctionsResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetFunctions()).compareTo(other.isSetFunctions()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFunctions()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functions, other.functions); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetAllFunctionsResponse("); - boolean first = true; - - if (isSetFunctions()) { - sb.append("functions:"); - if (this.functions == null) { - sb.append("null"); - } else { - sb.append(this.functions); - } - 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 GetAllFunctionsResponseStandardSchemeFactory implements SchemeFactory { - public GetAllFunctionsResponseStandardScheme getScheme() { - return new GetAllFunctionsResponseStandardScheme(); - } - } - - private static class GetAllFunctionsResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetAllFunctionsResponse 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: // FUNCTIONS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list674 = iprot.readListBegin(); - struct.functions = new ArrayList(_list674.size); - Function _elem675; - for (int _i676 = 0; _i676 < _list674.size; ++_i676) - { - _elem675 = new Function(); - _elem675.read(iprot); - struct.functions.add(_elem675); - } - iprot.readListEnd(); - } - struct.setFunctionsIsSet(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, GetAllFunctionsResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.functions != null) { - if (struct.isSetFunctions()) { - oprot.writeFieldBegin(FUNCTIONS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.functions.size())); - for (Function _iter677 : struct.functions) - { - _iter677.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetAllFunctionsResponseTupleSchemeFactory implements SchemeFactory { - public GetAllFunctionsResponseTupleScheme getScheme() { - return new GetAllFunctionsResponseTupleScheme(); - } - } - - private static class GetAllFunctionsResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetAllFunctionsResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetFunctions()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetFunctions()) { - { - oprot.writeI32(struct.functions.size()); - for (Function _iter678 : struct.functions) - { - _iter678.write(oprot); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetAllFunctionsResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list679 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.functions = new ArrayList(_list679.size); - Function _elem680; - for (int _i681 = 0; _i681 < _list679.size; ++_i681) - { - _elem680 = new Function(); - _elem680.read(iprot); - struct.functions.add(_elem680); - } - } - struct.setFunctionsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java deleted file mode 100644 index ef758cd..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java +++ /dev/null @@ -1,773 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetFileMetadataByExprRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFileMetadataByExprRequest"); - - private static final org.apache.thrift.protocol.TField FILE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fileIds", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField EXPR_FIELD_DESC = new org.apache.thrift.protocol.TField("expr", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField DO_GET_FOOTERS_FIELD_DESC = new org.apache.thrift.protocol.TField("doGetFooters", org.apache.thrift.protocol.TType.BOOL, (short)3); - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetFileMetadataByExprRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetFileMetadataByExprRequestTupleSchemeFactory()); - } - - private List fileIds; // required - private ByteBuffer expr; // required - private boolean doGetFooters; // optional - private FileMetadataExprType type; // 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 { - FILE_IDS((short)1, "fileIds"), - EXPR((short)2, "expr"), - DO_GET_FOOTERS((short)3, "doGetFooters"), - /** - * - * @see FileMetadataExprType - */ - TYPE((short)4, "type"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FILE_IDS - return FILE_IDS; - case 2: // EXPR - return EXPR; - case 3: // DO_GET_FOOTERS - return DO_GET_FOOTERS; - case 4: // TYPE - return TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DOGETFOOTERS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.DO_GET_FOOTERS,_Fields.TYPE}; - 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); - tmpMap.put(_Fields.FILE_IDS, new org.apache.thrift.meta_data.FieldMetaData("fileIds", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - tmpMap.put(_Fields.EXPR, new org.apache.thrift.meta_data.FieldMetaData("expr", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.DO_GET_FOOTERS, new org.apache.thrift.meta_data.FieldMetaData("doGetFooters", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FileMetadataExprType.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetFileMetadataByExprRequest.class, metaDataMap); - } - - public GetFileMetadataByExprRequest() { - } - - public GetFileMetadataByExprRequest( - List fileIds, - ByteBuffer expr) - { - this(); - this.fileIds = fileIds; - this.expr = org.apache.thrift.TBaseHelper.copyBinary(expr); - } - - /** - * Performs a deep copy on other. - */ - public GetFileMetadataByExprRequest(GetFileMetadataByExprRequest other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetFileIds()) { - List __this__fileIds = new ArrayList(other.fileIds); - this.fileIds = __this__fileIds; - } - if (other.isSetExpr()) { - this.expr = org.apache.thrift.TBaseHelper.copyBinary(other.expr); - } - this.doGetFooters = other.doGetFooters; - if (other.isSetType()) { - this.type = other.type; - } - } - - public GetFileMetadataByExprRequest deepCopy() { - return new GetFileMetadataByExprRequest(this); - } - - @Override - public void clear() { - this.fileIds = null; - this.expr = null; - setDoGetFootersIsSet(false); - this.doGetFooters = false; - this.type = null; - } - - public int getFileIdsSize() { - return (this.fileIds == null) ? 0 : this.fileIds.size(); - } - - public java.util.Iterator getFileIdsIterator() { - return (this.fileIds == null) ? null : this.fileIds.iterator(); - } - - public void addToFileIds(long elem) { - if (this.fileIds == null) { - this.fileIds = new ArrayList(); - } - this.fileIds.add(elem); - } - - public List getFileIds() { - return this.fileIds; - } - - public void setFileIds(List fileIds) { - this.fileIds = fileIds; - } - - public void unsetFileIds() { - this.fileIds = null; - } - - /** Returns true if field fileIds is set (has been assigned a value) and false otherwise */ - public boolean isSetFileIds() { - return this.fileIds != null; - } - - public void setFileIdsIsSet(boolean value) { - if (!value) { - this.fileIds = null; - } - } - - public byte[] getExpr() { - setExpr(org.apache.thrift.TBaseHelper.rightSize(expr)); - return expr == null ? null : expr.array(); - } - - public ByteBuffer bufferForExpr() { - return org.apache.thrift.TBaseHelper.copyBinary(expr); - } - - public void setExpr(byte[] expr) { - this.expr = expr == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(expr, expr.length)); - } - - public void setExpr(ByteBuffer expr) { - this.expr = org.apache.thrift.TBaseHelper.copyBinary(expr); - } - - public void unsetExpr() { - this.expr = null; - } - - /** Returns true if field expr is set (has been assigned a value) and false otherwise */ - public boolean isSetExpr() { - return this.expr != null; - } - - public void setExprIsSet(boolean value) { - if (!value) { - this.expr = null; - } - } - - public boolean isDoGetFooters() { - return this.doGetFooters; - } - - public void setDoGetFooters(boolean doGetFooters) { - this.doGetFooters = doGetFooters; - setDoGetFootersIsSet(true); - } - - public void unsetDoGetFooters() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DOGETFOOTERS_ISSET_ID); - } - - /** Returns true if field doGetFooters is set (has been assigned a value) and false otherwise */ - public boolean isSetDoGetFooters() { - return EncodingUtils.testBit(__isset_bitfield, __DOGETFOOTERS_ISSET_ID); - } - - public void setDoGetFootersIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DOGETFOOTERS_ISSET_ID, value); - } - - /** - * - * @see FileMetadataExprType - */ - public FileMetadataExprType getType() { - return this.type; - } - - /** - * - * @see FileMetadataExprType - */ - public void setType(FileMetadataExprType type) { - this.type = type; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case FILE_IDS: - if (value == null) { - unsetFileIds(); - } else { - setFileIds((List)value); - } - break; - - case EXPR: - if (value == null) { - unsetExpr(); - } else { - setExpr((ByteBuffer)value); - } - break; - - case DO_GET_FOOTERS: - if (value == null) { - unsetDoGetFooters(); - } else { - setDoGetFooters((Boolean)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((FileMetadataExprType)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case FILE_IDS: - return getFileIds(); - - case EXPR: - return getExpr(); - - case DO_GET_FOOTERS: - return isDoGetFooters(); - - case TYPE: - return getType(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case FILE_IDS: - return isSetFileIds(); - case EXPR: - return isSetExpr(); - case DO_GET_FOOTERS: - return isSetDoGetFooters(); - case TYPE: - return isSetType(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetFileMetadataByExprRequest) - return this.equals((GetFileMetadataByExprRequest)that); - return false; - } - - public boolean equals(GetFileMetadataByExprRequest that) { - if (that == null) - return false; - - boolean this_present_fileIds = true && this.isSetFileIds(); - boolean that_present_fileIds = true && that.isSetFileIds(); - if (this_present_fileIds || that_present_fileIds) { - if (!(this_present_fileIds && that_present_fileIds)) - return false; - if (!this.fileIds.equals(that.fileIds)) - return false; - } - - boolean this_present_expr = true && this.isSetExpr(); - boolean that_present_expr = true && that.isSetExpr(); - if (this_present_expr || that_present_expr) { - if (!(this_present_expr && that_present_expr)) - return false; - if (!this.expr.equals(that.expr)) - return false; - } - - boolean this_present_doGetFooters = true && this.isSetDoGetFooters(); - boolean that_present_doGetFooters = true && that.isSetDoGetFooters(); - if (this_present_doGetFooters || that_present_doGetFooters) { - if (!(this_present_doGetFooters && that_present_doGetFooters)) - return false; - if (this.doGetFooters != that.doGetFooters) - return false; - } - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_fileIds = true && (isSetFileIds()); - list.add(present_fileIds); - if (present_fileIds) - list.add(fileIds); - - boolean present_expr = true && (isSetExpr()); - list.add(present_expr); - if (present_expr) - list.add(expr); - - boolean present_doGetFooters = true && (isSetDoGetFooters()); - list.add(present_doGetFooters); - if (present_doGetFooters) - list.add(doGetFooters); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type.getValue()); - - return list.hashCode(); - } - - @Override - public int compareTo(GetFileMetadataByExprRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetFileIds()).compareTo(other.isSetFileIds()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFileIds()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileIds, other.fileIds); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExpr()).compareTo(other.isSetExpr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExpr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expr, other.expr); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDoGetFooters()).compareTo(other.isSetDoGetFooters()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDoGetFooters()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.doGetFooters, other.doGetFooters); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetFileMetadataByExprRequest("); - boolean first = true; - - sb.append("fileIds:"); - if (this.fileIds == null) { - sb.append("null"); - } else { - sb.append(this.fileIds); - } - first = false; - if (!first) sb.append(", "); - sb.append("expr:"); - if (this.expr == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.expr, sb); - } - first = false; - if (isSetDoGetFooters()) { - if (!first) sb.append(", "); - sb.append("doGetFooters:"); - sb.append(this.doGetFooters); - first = false; - } - if (isSetType()) { - if (!first) sb.append(", "); - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetFileIds()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'fileIds' is unset! Struct:" + toString()); - } - - if (!isSetExpr()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'expr' is unset! Struct:" + toString()); - } - - // 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 { - // 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 GetFileMetadataByExprRequestStandardSchemeFactory implements SchemeFactory { - public GetFileMetadataByExprRequestStandardScheme getScheme() { - return new GetFileMetadataByExprRequestStandardScheme(); - } - } - - private static class GetFileMetadataByExprRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetFileMetadataByExprRequest 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: // FILE_IDS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list624 = iprot.readListBegin(); - struct.fileIds = new ArrayList(_list624.size); - long _elem625; - for (int _i626 = 0; _i626 < _list624.size; ++_i626) - { - _elem625 = iprot.readI64(); - struct.fileIds.add(_elem625); - } - iprot.readListEnd(); - } - struct.setFileIdsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // EXPR - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.expr = iprot.readBinary(); - struct.setExprIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // DO_GET_FOOTERS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.doGetFooters = iprot.readBool(); - struct.setDoGetFootersIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.type = org.apache.hadoop.hive.metastore.api.FileMetadataExprType.findByValue(iprot.readI32()); - 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, GetFileMetadataByExprRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.fileIds != null) { - oprot.writeFieldBegin(FILE_IDS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size())); - for (long _iter627 : struct.fileIds) - { - oprot.writeI64(_iter627); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.expr != null) { - oprot.writeFieldBegin(EXPR_FIELD_DESC); - oprot.writeBinary(struct.expr); - oprot.writeFieldEnd(); - } - if (struct.isSetDoGetFooters()) { - oprot.writeFieldBegin(DO_GET_FOOTERS_FIELD_DESC); - oprot.writeBool(struct.doGetFooters); - oprot.writeFieldEnd(); - } - if (struct.type != null) { - if (struct.isSetType()) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI32(struct.type.getValue()); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetFileMetadataByExprRequestTupleSchemeFactory implements SchemeFactory { - public GetFileMetadataByExprRequestTupleScheme getScheme() { - return new GetFileMetadataByExprRequestTupleScheme(); - } - } - - private static class GetFileMetadataByExprRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.fileIds.size()); - for (long _iter628 : struct.fileIds) - { - oprot.writeI64(_iter628); - } - } - oprot.writeBinary(struct.expr); - BitSet optionals = new BitSet(); - if (struct.isSetDoGetFooters()) { - optionals.set(0); - } - if (struct.isSetType()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetDoGetFooters()) { - oprot.writeBool(struct.doGetFooters); - } - if (struct.isSetType()) { - oprot.writeI32(struct.type.getValue()); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list629 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.fileIds = new ArrayList(_list629.size); - long _elem630; - for (int _i631 = 0; _i631 < _list629.size; ++_i631) - { - _elem630 = iprot.readI64(); - struct.fileIds.add(_elem630); - } - } - struct.setFileIdsIsSet(true); - struct.expr = iprot.readBinary(); - struct.setExprIsSet(true); - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.doGetFooters = iprot.readBool(); - struct.setDoGetFootersIsSet(true); - } - if (incoming.get(1)) { - struct.type = org.apache.hadoop.hive.metastore.api.FileMetadataExprType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java deleted file mode 100644 index ee94380..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java +++ /dev/null @@ -1,553 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetFileMetadataByExprResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFileMetadataByExprResult"); - - private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.MAP, (short)1); - private static final org.apache.thrift.protocol.TField IS_SUPPORTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isSupported", org.apache.thrift.protocol.TType.BOOL, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetFileMetadataByExprResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetFileMetadataByExprResultTupleSchemeFactory()); - } - - private Map metadata; // required - private boolean isSupported; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - METADATA((short)1, "metadata"), - IS_SUPPORTED((short)2, "isSupported"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // METADATA - return METADATA; - case 2: // IS_SUPPORTED - return IS_SUPPORTED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ISSUPPORTED_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetadataPpdResult.class)))); - tmpMap.put(_Fields.IS_SUPPORTED, new org.apache.thrift.meta_data.FieldMetaData("isSupported", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetFileMetadataByExprResult.class, metaDataMap); - } - - public GetFileMetadataByExprResult() { - } - - public GetFileMetadataByExprResult( - Map metadata, - boolean isSupported) - { - this(); - this.metadata = metadata; - this.isSupported = isSupported; - setIsSupportedIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public GetFileMetadataByExprResult(GetFileMetadataByExprResult other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetMetadata()) { - Map __this__metadata = new HashMap(other.metadata.size()); - for (Map.Entry other_element : other.metadata.entrySet()) { - - Long other_element_key = other_element.getKey(); - MetadataPpdResult other_element_value = other_element.getValue(); - - Long __this__metadata_copy_key = other_element_key; - - MetadataPpdResult __this__metadata_copy_value = new MetadataPpdResult(other_element_value); - - __this__metadata.put(__this__metadata_copy_key, __this__metadata_copy_value); - } - this.metadata = __this__metadata; - } - this.isSupported = other.isSupported; - } - - public GetFileMetadataByExprResult deepCopy() { - return new GetFileMetadataByExprResult(this); - } - - @Override - public void clear() { - this.metadata = null; - setIsSupportedIsSet(false); - this.isSupported = false; - } - - public int getMetadataSize() { - return (this.metadata == null) ? 0 : this.metadata.size(); - } - - public void putToMetadata(long key, MetadataPpdResult val) { - if (this.metadata == null) { - this.metadata = new HashMap(); - } - this.metadata.put(key, val); - } - - public Map getMetadata() { - return this.metadata; - } - - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public void unsetMetadata() { - this.metadata = null; - } - - /** Returns true if field metadata is set (has been assigned a value) and false otherwise */ - public boolean isSetMetadata() { - return this.metadata != null; - } - - public void setMetadataIsSet(boolean value) { - if (!value) { - this.metadata = null; - } - } - - public boolean isIsSupported() { - return this.isSupported; - } - - public void setIsSupported(boolean isSupported) { - this.isSupported = isSupported; - setIsSupportedIsSet(true); - } - - public void unsetIsSupported() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); - } - - /** Returns true if field isSupported is set (has been assigned a value) and false otherwise */ - public boolean isSetIsSupported() { - return EncodingUtils.testBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); - } - - public void setIsSupportedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case METADATA: - if (value == null) { - unsetMetadata(); - } else { - setMetadata((Map)value); - } - break; - - case IS_SUPPORTED: - if (value == null) { - unsetIsSupported(); - } else { - setIsSupported((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case METADATA: - return getMetadata(); - - case IS_SUPPORTED: - return isIsSupported(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case METADATA: - return isSetMetadata(); - case IS_SUPPORTED: - return isSetIsSupported(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetFileMetadataByExprResult) - return this.equals((GetFileMetadataByExprResult)that); - return false; - } - - public boolean equals(GetFileMetadataByExprResult that) { - if (that == null) - return false; - - boolean this_present_metadata = true && this.isSetMetadata(); - boolean that_present_metadata = true && that.isSetMetadata(); - if (this_present_metadata || that_present_metadata) { - if (!(this_present_metadata && that_present_metadata)) - return false; - if (!this.metadata.equals(that.metadata)) - return false; - } - - boolean this_present_isSupported = true; - boolean that_present_isSupported = true; - if (this_present_isSupported || that_present_isSupported) { - if (!(this_present_isSupported && that_present_isSupported)) - return false; - if (this.isSupported != that.isSupported) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_metadata = true && (isSetMetadata()); - list.add(present_metadata); - if (present_metadata) - list.add(metadata); - - boolean present_isSupported = true; - list.add(present_isSupported); - if (present_isSupported) - list.add(isSupported); - - return list.hashCode(); - } - - @Override - public int compareTo(GetFileMetadataByExprResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMetadata()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsSupported()).compareTo(other.isSetIsSupported()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsSupported()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isSupported, other.isSupported); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetFileMetadataByExprResult("); - boolean first = true; - - sb.append("metadata:"); - if (this.metadata == null) { - sb.append("null"); - } else { - sb.append(this.metadata); - } - first = false; - if (!first) sb.append(", "); - sb.append("isSupported:"); - sb.append(this.isSupported); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetMetadata()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'metadata' is unset! Struct:" + toString()); - } - - if (!isSetIsSupported()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'isSupported' is unset! Struct:" + toString()); - } - - // 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 { - // 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 GetFileMetadataByExprResultStandardSchemeFactory implements SchemeFactory { - public GetFileMetadataByExprResultStandardScheme getScheme() { - return new GetFileMetadataByExprResultStandardScheme(); - } - } - - private static class GetFileMetadataByExprResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetFileMetadataByExprResult 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: // METADATA - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map614 = iprot.readMapBegin(); - struct.metadata = new HashMap(2*_map614.size); - long _key615; - MetadataPpdResult _val616; - for (int _i617 = 0; _i617 < _map614.size; ++_i617) - { - _key615 = iprot.readI64(); - _val616 = new MetadataPpdResult(); - _val616.read(iprot); - struct.metadata.put(_key615, _val616); - } - iprot.readMapEnd(); - } - struct.setMetadataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // IS_SUPPORTED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isSupported = iprot.readBool(); - struct.setIsSupportedIsSet(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, GetFileMetadataByExprResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.metadata != null) { - oprot.writeFieldBegin(METADATA_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, struct.metadata.size())); - for (Map.Entry _iter618 : struct.metadata.entrySet()) - { - oprot.writeI64(_iter618.getKey()); - _iter618.getValue().write(oprot); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(IS_SUPPORTED_FIELD_DESC); - oprot.writeBool(struct.isSupported); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetFileMetadataByExprResultTupleSchemeFactory implements SchemeFactory { - public GetFileMetadataByExprResultTupleScheme getScheme() { - return new GetFileMetadataByExprResultTupleScheme(); - } - } - - private static class GetFileMetadataByExprResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.metadata.size()); - for (Map.Entry _iter619 : struct.metadata.entrySet()) - { - oprot.writeI64(_iter619.getKey()); - _iter619.getValue().write(oprot); - } - } - oprot.writeBool(struct.isSupported); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TMap _map620 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.metadata = new HashMap(2*_map620.size); - long _key621; - MetadataPpdResult _val622; - for (int _i623 = 0; _i623 < _map620.size; ++_i623) - { - _key621 = iprot.readI64(); - _val622 = new MetadataPpdResult(); - _val622.read(iprot); - struct.metadata.put(_key621, _val622); - } - } - struct.setMetadataIsSet(true); - struct.isSupported = iprot.readBool(); - struct.setIsSupportedIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java deleted file mode 100644 index f8c8258..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java +++ /dev/null @@ -1,438 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetFileMetadataRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFileMetadataRequest"); - - private static final org.apache.thrift.protocol.TField FILE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fileIds", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetFileMetadataRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetFileMetadataRequestTupleSchemeFactory()); - } - - private List fileIds; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FILE_IDS((short)1, "fileIds"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FILE_IDS - return FILE_IDS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.FILE_IDS, new org.apache.thrift.meta_data.FieldMetaData("fileIds", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetFileMetadataRequest.class, metaDataMap); - } - - public GetFileMetadataRequest() { - } - - public GetFileMetadataRequest( - List fileIds) - { - this(); - this.fileIds = fileIds; - } - - /** - * Performs a deep copy on other. - */ - public GetFileMetadataRequest(GetFileMetadataRequest other) { - if (other.isSetFileIds()) { - List __this__fileIds = new ArrayList(other.fileIds); - this.fileIds = __this__fileIds; - } - } - - public GetFileMetadataRequest deepCopy() { - return new GetFileMetadataRequest(this); - } - - @Override - public void clear() { - this.fileIds = null; - } - - public int getFileIdsSize() { - return (this.fileIds == null) ? 0 : this.fileIds.size(); - } - - public java.util.Iterator getFileIdsIterator() { - return (this.fileIds == null) ? null : this.fileIds.iterator(); - } - - public void addToFileIds(long elem) { - if (this.fileIds == null) { - this.fileIds = new ArrayList(); - } - this.fileIds.add(elem); - } - - public List getFileIds() { - return this.fileIds; - } - - public void setFileIds(List fileIds) { - this.fileIds = fileIds; - } - - public void unsetFileIds() { - this.fileIds = null; - } - - /** Returns true if field fileIds is set (has been assigned a value) and false otherwise */ - public boolean isSetFileIds() { - return this.fileIds != null; - } - - public void setFileIdsIsSet(boolean value) { - if (!value) { - this.fileIds = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case FILE_IDS: - if (value == null) { - unsetFileIds(); - } else { - setFileIds((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case FILE_IDS: - return getFileIds(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case FILE_IDS: - return isSetFileIds(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetFileMetadataRequest) - return this.equals((GetFileMetadataRequest)that); - return false; - } - - public boolean equals(GetFileMetadataRequest that) { - if (that == null) - return false; - - boolean this_present_fileIds = true && this.isSetFileIds(); - boolean that_present_fileIds = true && that.isSetFileIds(); - if (this_present_fileIds || that_present_fileIds) { - if (!(this_present_fileIds && that_present_fileIds)) - return false; - if (!this.fileIds.equals(that.fileIds)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_fileIds = true && (isSetFileIds()); - list.add(present_fileIds); - if (present_fileIds) - list.add(fileIds); - - return list.hashCode(); - } - - @Override - public int compareTo(GetFileMetadataRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetFileIds()).compareTo(other.isSetFileIds()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFileIds()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileIds, other.fileIds); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetFileMetadataRequest("); - boolean first = true; - - sb.append("fileIds:"); - if (this.fileIds == null) { - sb.append("null"); - } else { - sb.append(this.fileIds); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetFileIds()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'fileIds' is unset! Struct:" + toString()); - } - - // 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 GetFileMetadataRequestStandardSchemeFactory implements SchemeFactory { - public GetFileMetadataRequestStandardScheme getScheme() { - return new GetFileMetadataRequestStandardScheme(); - } - } - - private static class GetFileMetadataRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetFileMetadataRequest 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: // FILE_IDS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list642 = iprot.readListBegin(); - struct.fileIds = new ArrayList(_list642.size); - long _elem643; - for (int _i644 = 0; _i644 < _list642.size; ++_i644) - { - _elem643 = iprot.readI64(); - struct.fileIds.add(_elem643); - } - iprot.readListEnd(); - } - struct.setFileIdsIsSet(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, GetFileMetadataRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.fileIds != null) { - oprot.writeFieldBegin(FILE_IDS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size())); - for (long _iter645 : struct.fileIds) - { - oprot.writeI64(_iter645); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetFileMetadataRequestTupleSchemeFactory implements SchemeFactory { - public GetFileMetadataRequestTupleScheme getScheme() { - return new GetFileMetadataRequestTupleScheme(); - } - } - - private static class GetFileMetadataRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.fileIds.size()); - for (long _iter646 : struct.fileIds) - { - oprot.writeI64(_iter646); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list647 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.fileIds = new ArrayList(_list647.size); - long _elem648; - for (int _i649 = 0; _i649 < _list647.size; ++_i649) - { - _elem648 = iprot.readI64(); - struct.fileIds.add(_elem648); - } - } - struct.setFileIdsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java deleted file mode 100644 index 73888e9..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java +++ /dev/null @@ -1,540 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetFileMetadataResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFileMetadataResult"); - - private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.MAP, (short)1); - private static final org.apache.thrift.protocol.TField IS_SUPPORTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isSupported", org.apache.thrift.protocol.TType.BOOL, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetFileMetadataResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetFileMetadataResultTupleSchemeFactory()); - } - - private Map metadata; // required - private boolean isSupported; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - METADATA((short)1, "metadata"), - IS_SUPPORTED((short)2, "isSupported"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // METADATA - return METADATA; - case 2: // IS_SUPPORTED - return IS_SUPPORTED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ISSUPPORTED_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.IS_SUPPORTED, new org.apache.thrift.meta_data.FieldMetaData("isSupported", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetFileMetadataResult.class, metaDataMap); - } - - public GetFileMetadataResult() { - } - - public GetFileMetadataResult( - Map metadata, - boolean isSupported) - { - this(); - this.metadata = metadata; - this.isSupported = isSupported; - setIsSupportedIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public GetFileMetadataResult(GetFileMetadataResult other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetMetadata()) { - Map __this__metadata = new HashMap(other.metadata); - this.metadata = __this__metadata; - } - this.isSupported = other.isSupported; - } - - public GetFileMetadataResult deepCopy() { - return new GetFileMetadataResult(this); - } - - @Override - public void clear() { - this.metadata = null; - setIsSupportedIsSet(false); - this.isSupported = false; - } - - public int getMetadataSize() { - return (this.metadata == null) ? 0 : this.metadata.size(); - } - - public void putToMetadata(long key, ByteBuffer val) { - if (this.metadata == null) { - this.metadata = new HashMap(); - } - this.metadata.put(key, val); - } - - public Map getMetadata() { - return this.metadata; - } - - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public void unsetMetadata() { - this.metadata = null; - } - - /** Returns true if field metadata is set (has been assigned a value) and false otherwise */ - public boolean isSetMetadata() { - return this.metadata != null; - } - - public void setMetadataIsSet(boolean value) { - if (!value) { - this.metadata = null; - } - } - - public boolean isIsSupported() { - return this.isSupported; - } - - public void setIsSupported(boolean isSupported) { - this.isSupported = isSupported; - setIsSupportedIsSet(true); - } - - public void unsetIsSupported() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); - } - - /** Returns true if field isSupported is set (has been assigned a value) and false otherwise */ - public boolean isSetIsSupported() { - return EncodingUtils.testBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); - } - - public void setIsSupportedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case METADATA: - if (value == null) { - unsetMetadata(); - } else { - setMetadata((Map)value); - } - break; - - case IS_SUPPORTED: - if (value == null) { - unsetIsSupported(); - } else { - setIsSupported((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case METADATA: - return getMetadata(); - - case IS_SUPPORTED: - return isIsSupported(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case METADATA: - return isSetMetadata(); - case IS_SUPPORTED: - return isSetIsSupported(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetFileMetadataResult) - return this.equals((GetFileMetadataResult)that); - return false; - } - - public boolean equals(GetFileMetadataResult that) { - if (that == null) - return false; - - boolean this_present_metadata = true && this.isSetMetadata(); - boolean that_present_metadata = true && that.isSetMetadata(); - if (this_present_metadata || that_present_metadata) { - if (!(this_present_metadata && that_present_metadata)) - return false; - if (!this.metadata.equals(that.metadata)) - return false; - } - - boolean this_present_isSupported = true; - boolean that_present_isSupported = true; - if (this_present_isSupported || that_present_isSupported) { - if (!(this_present_isSupported && that_present_isSupported)) - return false; - if (this.isSupported != that.isSupported) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_metadata = true && (isSetMetadata()); - list.add(present_metadata); - if (present_metadata) - list.add(metadata); - - boolean present_isSupported = true; - list.add(present_isSupported); - if (present_isSupported) - list.add(isSupported); - - return list.hashCode(); - } - - @Override - public int compareTo(GetFileMetadataResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMetadata()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsSupported()).compareTo(other.isSetIsSupported()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsSupported()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isSupported, other.isSupported); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetFileMetadataResult("); - boolean first = true; - - sb.append("metadata:"); - if (this.metadata == null) { - sb.append("null"); - } else { - sb.append(this.metadata); - } - first = false; - if (!first) sb.append(", "); - sb.append("isSupported:"); - sb.append(this.isSupported); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetMetadata()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'metadata' is unset! Struct:" + toString()); - } - - if (!isSetIsSupported()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'isSupported' is unset! Struct:" + toString()); - } - - // 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 { - // 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 GetFileMetadataResultStandardSchemeFactory implements SchemeFactory { - public GetFileMetadataResultStandardScheme getScheme() { - return new GetFileMetadataResultStandardScheme(); - } - } - - private static class GetFileMetadataResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetFileMetadataResult 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: // METADATA - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map632 = iprot.readMapBegin(); - struct.metadata = new HashMap(2*_map632.size); - long _key633; - ByteBuffer _val634; - for (int _i635 = 0; _i635 < _map632.size; ++_i635) - { - _key633 = iprot.readI64(); - _val634 = iprot.readBinary(); - struct.metadata.put(_key633, _val634); - } - iprot.readMapEnd(); - } - struct.setMetadataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // IS_SUPPORTED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isSupported = iprot.readBool(); - struct.setIsSupportedIsSet(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, GetFileMetadataResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.metadata != null) { - oprot.writeFieldBegin(METADATA_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, struct.metadata.size())); - for (Map.Entry _iter636 : struct.metadata.entrySet()) - { - oprot.writeI64(_iter636.getKey()); - oprot.writeBinary(_iter636.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(IS_SUPPORTED_FIELD_DESC); - oprot.writeBool(struct.isSupported); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetFileMetadataResultTupleSchemeFactory implements SchemeFactory { - public GetFileMetadataResultTupleScheme getScheme() { - return new GetFileMetadataResultTupleScheme(); - } - } - - private static class GetFileMetadataResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.metadata.size()); - for (Map.Entry _iter637 : struct.metadata.entrySet()) - { - oprot.writeI64(_iter637.getKey()); - oprot.writeBinary(_iter637.getValue()); - } - } - oprot.writeBool(struct.isSupported); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TMap _map638 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.metadata = new HashMap(2*_map638.size); - long _key639; - ByteBuffer _val640; - for (int _i641 = 0; _i641 < _map638.size; ++_i641) - { - _key639 = iprot.readI64(); - _val640 = iprot.readBinary(); - struct.metadata.put(_key639, _val640); - } - } - struct.setMetadataIsSet(true); - struct.isSupported = iprot.readBool(); - struct.setIsSupportedIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java deleted file mode 100644 index 18a8e62..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java +++ /dev/null @@ -1,542 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetOpenTxnsInfoResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetOpenTxnsInfoResponse"); - - private static final org.apache.thrift.protocol.TField TXN_HIGH_WATER_MARK_FIELD_DESC = new org.apache.thrift.protocol.TField("txn_high_water_mark", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField OPEN_TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("open_txns", org.apache.thrift.protocol.TType.LIST, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetOpenTxnsInfoResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetOpenTxnsInfoResponseTupleSchemeFactory()); - } - - private long txn_high_water_mark; // required - private List open_txns; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TXN_HIGH_WATER_MARK((short)1, "txn_high_water_mark"), - OPEN_TXNS((short)2, "open_txns"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TXN_HIGH_WATER_MARK - return TXN_HIGH_WATER_MARK; - case 2: // OPEN_TXNS - return OPEN_TXNS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TXN_HIGH_WATER_MARK_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.TXN_HIGH_WATER_MARK, new org.apache.thrift.meta_data.FieldMetaData("txn_high_water_mark", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.OPEN_TXNS, new org.apache.thrift.meta_data.FieldMetaData("open_txns", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TxnInfo.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetOpenTxnsInfoResponse.class, metaDataMap); - } - - public GetOpenTxnsInfoResponse() { - } - - public GetOpenTxnsInfoResponse( - long txn_high_water_mark, - List open_txns) - { - this(); - this.txn_high_water_mark = txn_high_water_mark; - setTxn_high_water_markIsSet(true); - this.open_txns = open_txns; - } - - /** - * Performs a deep copy on other. - */ - public GetOpenTxnsInfoResponse(GetOpenTxnsInfoResponse other) { - __isset_bitfield = other.__isset_bitfield; - this.txn_high_water_mark = other.txn_high_water_mark; - if (other.isSetOpen_txns()) { - List __this__open_txns = new ArrayList(other.open_txns.size()); - for (TxnInfo other_element : other.open_txns) { - __this__open_txns.add(new TxnInfo(other_element)); - } - this.open_txns = __this__open_txns; - } - } - - public GetOpenTxnsInfoResponse deepCopy() { - return new GetOpenTxnsInfoResponse(this); - } - - @Override - public void clear() { - setTxn_high_water_markIsSet(false); - this.txn_high_water_mark = 0; - this.open_txns = null; - } - - public long getTxn_high_water_mark() { - return this.txn_high_water_mark; - } - - public void setTxn_high_water_mark(long txn_high_water_mark) { - this.txn_high_water_mark = txn_high_water_mark; - setTxn_high_water_markIsSet(true); - } - - public void unsetTxn_high_water_mark() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID); - } - - /** Returns true if field txn_high_water_mark is set (has been assigned a value) and false otherwise */ - public boolean isSetTxn_high_water_mark() { - return EncodingUtils.testBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID); - } - - public void setTxn_high_water_markIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID, value); - } - - public int getOpen_txnsSize() { - return (this.open_txns == null) ? 0 : this.open_txns.size(); - } - - public java.util.Iterator getOpen_txnsIterator() { - return (this.open_txns == null) ? null : this.open_txns.iterator(); - } - - public void addToOpen_txns(TxnInfo elem) { - if (this.open_txns == null) { - this.open_txns = new ArrayList(); - } - this.open_txns.add(elem); - } - - public List getOpen_txns() { - return this.open_txns; - } - - public void setOpen_txns(List open_txns) { - this.open_txns = open_txns; - } - - public void unsetOpen_txns() { - this.open_txns = null; - } - - /** Returns true if field open_txns is set (has been assigned a value) and false otherwise */ - public boolean isSetOpen_txns() { - return this.open_txns != null; - } - - public void setOpen_txnsIsSet(boolean value) { - if (!value) { - this.open_txns = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TXN_HIGH_WATER_MARK: - if (value == null) { - unsetTxn_high_water_mark(); - } else { - setTxn_high_water_mark((Long)value); - } - break; - - case OPEN_TXNS: - if (value == null) { - unsetOpen_txns(); - } else { - setOpen_txns((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TXN_HIGH_WATER_MARK: - return getTxn_high_water_mark(); - - case OPEN_TXNS: - return getOpen_txns(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TXN_HIGH_WATER_MARK: - return isSetTxn_high_water_mark(); - case OPEN_TXNS: - return isSetOpen_txns(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetOpenTxnsInfoResponse) - return this.equals((GetOpenTxnsInfoResponse)that); - return false; - } - - public boolean equals(GetOpenTxnsInfoResponse that) { - if (that == null) - return false; - - boolean this_present_txn_high_water_mark = true; - boolean that_present_txn_high_water_mark = true; - if (this_present_txn_high_water_mark || that_present_txn_high_water_mark) { - if (!(this_present_txn_high_water_mark && that_present_txn_high_water_mark)) - return false; - if (this.txn_high_water_mark != that.txn_high_water_mark) - return false; - } - - boolean this_present_open_txns = true && this.isSetOpen_txns(); - boolean that_present_open_txns = true && that.isSetOpen_txns(); - if (this_present_open_txns || that_present_open_txns) { - if (!(this_present_open_txns && that_present_open_txns)) - return false; - if (!this.open_txns.equals(that.open_txns)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_txn_high_water_mark = true; - list.add(present_txn_high_water_mark); - if (present_txn_high_water_mark) - list.add(txn_high_water_mark); - - boolean present_open_txns = true && (isSetOpen_txns()); - list.add(present_open_txns); - if (present_open_txns) - list.add(open_txns); - - return list.hashCode(); - } - - @Override - public int compareTo(GetOpenTxnsInfoResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTxn_high_water_mark()).compareTo(other.isSetTxn_high_water_mark()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTxn_high_water_mark()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txn_high_water_mark, other.txn_high_water_mark); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOpen_txns()).compareTo(other.isSetOpen_txns()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOpen_txns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open_txns, other.open_txns); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetOpenTxnsInfoResponse("); - boolean first = true; - - sb.append("txn_high_water_mark:"); - sb.append(this.txn_high_water_mark); - first = false; - if (!first) sb.append(", "); - sb.append("open_txns:"); - if (this.open_txns == null) { - sb.append("null"); - } else { - sb.append(this.open_txns); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetTxn_high_water_mark()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'txn_high_water_mark' is unset! Struct:" + toString()); - } - - if (!isSetOpen_txns()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'open_txns' is unset! Struct:" + toString()); - } - - // 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 { - // 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 GetOpenTxnsInfoResponseStandardSchemeFactory implements SchemeFactory { - public GetOpenTxnsInfoResponseStandardScheme getScheme() { - return new GetOpenTxnsInfoResponseStandardScheme(); - } - } - - private static class GetOpenTxnsInfoResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetOpenTxnsInfoResponse 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: // TXN_HIGH_WATER_MARK - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.txn_high_water_mark = iprot.readI64(); - struct.setTxn_high_water_markIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // OPEN_TXNS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list492 = iprot.readListBegin(); - struct.open_txns = new ArrayList(_list492.size); - TxnInfo _elem493; - for (int _i494 = 0; _i494 < _list492.size; ++_i494) - { - _elem493 = new TxnInfo(); - _elem493.read(iprot); - struct.open_txns.add(_elem493); - } - iprot.readListEnd(); - } - struct.setOpen_txnsIsSet(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, GetOpenTxnsInfoResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TXN_HIGH_WATER_MARK_FIELD_DESC); - oprot.writeI64(struct.txn_high_water_mark); - oprot.writeFieldEnd(); - if (struct.open_txns != null) { - oprot.writeFieldBegin(OPEN_TXNS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.open_txns.size())); - for (TxnInfo _iter495 : struct.open_txns) - { - _iter495.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetOpenTxnsInfoResponseTupleSchemeFactory implements SchemeFactory { - public GetOpenTxnsInfoResponseTupleScheme getScheme() { - return new GetOpenTxnsInfoResponseTupleScheme(); - } - } - - private static class GetOpenTxnsInfoResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsInfoResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.txn_high_water_mark); - { - oprot.writeI32(struct.open_txns.size()); - for (TxnInfo _iter496 : struct.open_txns) - { - _iter496.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsInfoResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.txn_high_water_mark = iprot.readI64(); - struct.setTxn_high_water_markIsSet(true); - { - org.apache.thrift.protocol.TList _list497 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.open_txns = new ArrayList(_list497.size); - TxnInfo _elem498; - for (int _i499 = 0; _i499 < _list497.size; ++_i499) - { - _elem498 = new TxnInfo(); - _elem498.read(iprot); - struct.open_txns.add(_elem498); - } - } - struct.setOpen_txnsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java deleted file mode 100644 index 386c105..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java +++ /dev/null @@ -1,750 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetOpenTxnsResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetOpenTxnsResponse"); - - private static final org.apache.thrift.protocol.TField TXN_HIGH_WATER_MARK_FIELD_DESC = new org.apache.thrift.protocol.TField("txn_high_water_mark", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField OPEN_TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("open_txns", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField MIN_OPEN_TXN_FIELD_DESC = new org.apache.thrift.protocol.TField("min_open_txn", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField ABORTED_BITS_FIELD_DESC = new org.apache.thrift.protocol.TField("abortedBits", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetOpenTxnsResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetOpenTxnsResponseTupleSchemeFactory()); - } - - private long txn_high_water_mark; // required - private List open_txns; // required - private long min_open_txn; // optional - private ByteBuffer abortedBits; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TXN_HIGH_WATER_MARK((short)1, "txn_high_water_mark"), - OPEN_TXNS((short)2, "open_txns"), - MIN_OPEN_TXN((short)3, "min_open_txn"), - ABORTED_BITS((short)4, "abortedBits"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TXN_HIGH_WATER_MARK - return TXN_HIGH_WATER_MARK; - case 2: // OPEN_TXNS - return OPEN_TXNS; - case 3: // MIN_OPEN_TXN - return MIN_OPEN_TXN; - case 4: // ABORTED_BITS - return ABORTED_BITS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TXN_HIGH_WATER_MARK_ISSET_ID = 0; - private static final int __MIN_OPEN_TXN_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.MIN_OPEN_TXN}; - 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); - tmpMap.put(_Fields.TXN_HIGH_WATER_MARK, new org.apache.thrift.meta_data.FieldMetaData("txn_high_water_mark", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.OPEN_TXNS, new org.apache.thrift.meta_data.FieldMetaData("open_txns", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - tmpMap.put(_Fields.MIN_OPEN_TXN, new org.apache.thrift.meta_data.FieldMetaData("min_open_txn", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.ABORTED_BITS, new org.apache.thrift.meta_data.FieldMetaData("abortedBits", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetOpenTxnsResponse.class, metaDataMap); - } - - public GetOpenTxnsResponse() { - } - - public GetOpenTxnsResponse( - long txn_high_water_mark, - List open_txns, - ByteBuffer abortedBits) - { - this(); - this.txn_high_water_mark = txn_high_water_mark; - setTxn_high_water_markIsSet(true); - this.open_txns = open_txns; - this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(abortedBits); - } - - /** - * Performs a deep copy on other. - */ - public GetOpenTxnsResponse(GetOpenTxnsResponse other) { - __isset_bitfield = other.__isset_bitfield; - this.txn_high_water_mark = other.txn_high_water_mark; - if (other.isSetOpen_txns()) { - List __this__open_txns = new ArrayList(other.open_txns); - this.open_txns = __this__open_txns; - } - this.min_open_txn = other.min_open_txn; - if (other.isSetAbortedBits()) { - this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(other.abortedBits); - } - } - - public GetOpenTxnsResponse deepCopy() { - return new GetOpenTxnsResponse(this); - } - - @Override - public void clear() { - setTxn_high_water_markIsSet(false); - this.txn_high_water_mark = 0; - this.open_txns = null; - setMin_open_txnIsSet(false); - this.min_open_txn = 0; - this.abortedBits = null; - } - - public long getTxn_high_water_mark() { - return this.txn_high_water_mark; - } - - public void setTxn_high_water_mark(long txn_high_water_mark) { - this.txn_high_water_mark = txn_high_water_mark; - setTxn_high_water_markIsSet(true); - } - - public void unsetTxn_high_water_mark() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID); - } - - /** Returns true if field txn_high_water_mark is set (has been assigned a value) and false otherwise */ - public boolean isSetTxn_high_water_mark() { - return EncodingUtils.testBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID); - } - - public void setTxn_high_water_markIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID, value); - } - - public int getOpen_txnsSize() { - return (this.open_txns == null) ? 0 : this.open_txns.size(); - } - - public java.util.Iterator getOpen_txnsIterator() { - return (this.open_txns == null) ? null : this.open_txns.iterator(); - } - - public void addToOpen_txns(long elem) { - if (this.open_txns == null) { - this.open_txns = new ArrayList(); - } - this.open_txns.add(elem); - } - - public List getOpen_txns() { - return this.open_txns; - } - - public void setOpen_txns(List open_txns) { - this.open_txns = open_txns; - } - - public void unsetOpen_txns() { - this.open_txns = null; - } - - /** Returns true if field open_txns is set (has been assigned a value) and false otherwise */ - public boolean isSetOpen_txns() { - return this.open_txns != null; - } - - public void setOpen_txnsIsSet(boolean value) { - if (!value) { - this.open_txns = null; - } - } - - public long getMin_open_txn() { - return this.min_open_txn; - } - - public void setMin_open_txn(long min_open_txn) { - this.min_open_txn = min_open_txn; - setMin_open_txnIsSet(true); - } - - public void unsetMin_open_txn() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MIN_OPEN_TXN_ISSET_ID); - } - - /** Returns true if field min_open_txn is set (has been assigned a value) and false otherwise */ - public boolean isSetMin_open_txn() { - return EncodingUtils.testBit(__isset_bitfield, __MIN_OPEN_TXN_ISSET_ID); - } - - public void setMin_open_txnIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MIN_OPEN_TXN_ISSET_ID, value); - } - - public byte[] getAbortedBits() { - setAbortedBits(org.apache.thrift.TBaseHelper.rightSize(abortedBits)); - return abortedBits == null ? null : abortedBits.array(); - } - - public ByteBuffer bufferForAbortedBits() { - return org.apache.thrift.TBaseHelper.copyBinary(abortedBits); - } - - public void setAbortedBits(byte[] abortedBits) { - this.abortedBits = abortedBits == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(abortedBits, abortedBits.length)); - } - - public void setAbortedBits(ByteBuffer abortedBits) { - this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(abortedBits); - } - - public void unsetAbortedBits() { - this.abortedBits = null; - } - - /** Returns true if field abortedBits is set (has been assigned a value) and false otherwise */ - public boolean isSetAbortedBits() { - return this.abortedBits != null; - } - - public void setAbortedBitsIsSet(boolean value) { - if (!value) { - this.abortedBits = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TXN_HIGH_WATER_MARK: - if (value == null) { - unsetTxn_high_water_mark(); - } else { - setTxn_high_water_mark((Long)value); - } - break; - - case OPEN_TXNS: - if (value == null) { - unsetOpen_txns(); - } else { - setOpen_txns((List)value); - } - break; - - case MIN_OPEN_TXN: - if (value == null) { - unsetMin_open_txn(); - } else { - setMin_open_txn((Long)value); - } - break; - - case ABORTED_BITS: - if (value == null) { - unsetAbortedBits(); - } else { - setAbortedBits((ByteBuffer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TXN_HIGH_WATER_MARK: - return getTxn_high_water_mark(); - - case OPEN_TXNS: - return getOpen_txns(); - - case MIN_OPEN_TXN: - return getMin_open_txn(); - - case ABORTED_BITS: - return getAbortedBits(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TXN_HIGH_WATER_MARK: - return isSetTxn_high_water_mark(); - case OPEN_TXNS: - return isSetOpen_txns(); - case MIN_OPEN_TXN: - return isSetMin_open_txn(); - case ABORTED_BITS: - return isSetAbortedBits(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetOpenTxnsResponse) - return this.equals((GetOpenTxnsResponse)that); - return false; - } - - public boolean equals(GetOpenTxnsResponse that) { - if (that == null) - return false; - - boolean this_present_txn_high_water_mark = true; - boolean that_present_txn_high_water_mark = true; - if (this_present_txn_high_water_mark || that_present_txn_high_water_mark) { - if (!(this_present_txn_high_water_mark && that_present_txn_high_water_mark)) - return false; - if (this.txn_high_water_mark != that.txn_high_water_mark) - return false; - } - - boolean this_present_open_txns = true && this.isSetOpen_txns(); - boolean that_present_open_txns = true && that.isSetOpen_txns(); - if (this_present_open_txns || that_present_open_txns) { - if (!(this_present_open_txns && that_present_open_txns)) - return false; - if (!this.open_txns.equals(that.open_txns)) - return false; - } - - boolean this_present_min_open_txn = true && this.isSetMin_open_txn(); - boolean that_present_min_open_txn = true && that.isSetMin_open_txn(); - if (this_present_min_open_txn || that_present_min_open_txn) { - if (!(this_present_min_open_txn && that_present_min_open_txn)) - return false; - if (this.min_open_txn != that.min_open_txn) - return false; - } - - boolean this_present_abortedBits = true && this.isSetAbortedBits(); - boolean that_present_abortedBits = true && that.isSetAbortedBits(); - if (this_present_abortedBits || that_present_abortedBits) { - if (!(this_present_abortedBits && that_present_abortedBits)) - return false; - if (!this.abortedBits.equals(that.abortedBits)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_txn_high_water_mark = true; - list.add(present_txn_high_water_mark); - if (present_txn_high_water_mark) - list.add(txn_high_water_mark); - - boolean present_open_txns = true && (isSetOpen_txns()); - list.add(present_open_txns); - if (present_open_txns) - list.add(open_txns); - - boolean present_min_open_txn = true && (isSetMin_open_txn()); - list.add(present_min_open_txn); - if (present_min_open_txn) - list.add(min_open_txn); - - boolean present_abortedBits = true && (isSetAbortedBits()); - list.add(present_abortedBits); - if (present_abortedBits) - list.add(abortedBits); - - return list.hashCode(); - } - - @Override - public int compareTo(GetOpenTxnsResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTxn_high_water_mark()).compareTo(other.isSetTxn_high_water_mark()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTxn_high_water_mark()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txn_high_water_mark, other.txn_high_water_mark); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOpen_txns()).compareTo(other.isSetOpen_txns()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOpen_txns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open_txns, other.open_txns); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMin_open_txn()).compareTo(other.isSetMin_open_txn()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMin_open_txn()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.min_open_txn, other.min_open_txn); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAbortedBits()).compareTo(other.isSetAbortedBits()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAbortedBits()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.abortedBits, other.abortedBits); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetOpenTxnsResponse("); - boolean first = true; - - sb.append("txn_high_water_mark:"); - sb.append(this.txn_high_water_mark); - first = false; - if (!first) sb.append(", "); - sb.append("open_txns:"); - if (this.open_txns == null) { - sb.append("null"); - } else { - sb.append(this.open_txns); - } - first = false; - if (isSetMin_open_txn()) { - if (!first) sb.append(", "); - sb.append("min_open_txn:"); - sb.append(this.min_open_txn); - first = false; - } - if (!first) sb.append(", "); - sb.append("abortedBits:"); - if (this.abortedBits == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.abortedBits, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetTxn_high_water_mark()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'txn_high_water_mark' is unset! Struct:" + toString()); - } - - if (!isSetOpen_txns()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'open_txns' is unset! Struct:" + toString()); - } - - if (!isSetAbortedBits()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'abortedBits' is unset! Struct:" + toString()); - } - - // 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 { - // 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 GetOpenTxnsResponseStandardSchemeFactory implements SchemeFactory { - public GetOpenTxnsResponseStandardScheme getScheme() { - return new GetOpenTxnsResponseStandardScheme(); - } - } - - private static class GetOpenTxnsResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetOpenTxnsResponse 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: // TXN_HIGH_WATER_MARK - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.txn_high_water_mark = iprot.readI64(); - struct.setTxn_high_water_markIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // OPEN_TXNS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list500 = iprot.readListBegin(); - struct.open_txns = new ArrayList(_list500.size); - long _elem501; - for (int _i502 = 0; _i502 < _list500.size; ++_i502) - { - _elem501 = iprot.readI64(); - struct.open_txns.add(_elem501); - } - iprot.readListEnd(); - } - struct.setOpen_txnsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MIN_OPEN_TXN - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.min_open_txn = iprot.readI64(); - struct.setMin_open_txnIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // ABORTED_BITS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.abortedBits = iprot.readBinary(); - struct.setAbortedBitsIsSet(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, GetOpenTxnsResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(TXN_HIGH_WATER_MARK_FIELD_DESC); - oprot.writeI64(struct.txn_high_water_mark); - oprot.writeFieldEnd(); - if (struct.open_txns != null) { - oprot.writeFieldBegin(OPEN_TXNS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.open_txns.size())); - for (long _iter503 : struct.open_txns) - { - oprot.writeI64(_iter503); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetMin_open_txn()) { - oprot.writeFieldBegin(MIN_OPEN_TXN_FIELD_DESC); - oprot.writeI64(struct.min_open_txn); - oprot.writeFieldEnd(); - } - if (struct.abortedBits != null) { - oprot.writeFieldBegin(ABORTED_BITS_FIELD_DESC); - oprot.writeBinary(struct.abortedBits); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetOpenTxnsResponseTupleSchemeFactory implements SchemeFactory { - public GetOpenTxnsResponseTupleScheme getScheme() { - return new GetOpenTxnsResponseTupleScheme(); - } - } - - private static class GetOpenTxnsResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.txn_high_water_mark); - { - oprot.writeI32(struct.open_txns.size()); - for (long _iter504 : struct.open_txns) - { - oprot.writeI64(_iter504); - } - } - oprot.writeBinary(struct.abortedBits); - BitSet optionals = new BitSet(); - if (struct.isSetMin_open_txn()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetMin_open_txn()) { - oprot.writeI64(struct.min_open_txn); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.txn_high_water_mark = iprot.readI64(); - struct.setTxn_high_water_markIsSet(true); - { - org.apache.thrift.protocol.TList _list505 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.open_txns = new ArrayList(_list505.size); - long _elem506; - for (int _i507 = 0; _i507 < _list505.size; ++_i507) - { - _elem506 = iprot.readI64(); - struct.open_txns.add(_elem506); - } - } - struct.setOpen_txnsIsSet(true); - struct.abortedBits = iprot.readBinary(); - struct.setAbortedBitsIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.min_open_txn = iprot.readI64(); - struct.setMin_open_txnIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java deleted file mode 100644 index 342b268..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java +++ /dev/null @@ -1,389 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetPrincipalsInRoleRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPrincipalsInRoleRequest"); - - private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetPrincipalsInRoleRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetPrincipalsInRoleRequestTupleSchemeFactory()); - } - - private String roleName; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ROLE_NAME((short)1, "roleName"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ROLE_NAME - return ROLE_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetPrincipalsInRoleRequest.class, metaDataMap); - } - - public GetPrincipalsInRoleRequest() { - } - - public GetPrincipalsInRoleRequest( - String roleName) - { - this(); - this.roleName = roleName; - } - - /** - * Performs a deep copy on other. - */ - public GetPrincipalsInRoleRequest(GetPrincipalsInRoleRequest other) { - if (other.isSetRoleName()) { - this.roleName = other.roleName; - } - } - - public GetPrincipalsInRoleRequest deepCopy() { - return new GetPrincipalsInRoleRequest(this); - } - - @Override - public void clear() { - this.roleName = null; - } - - public String getRoleName() { - return this.roleName; - } - - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - public void unsetRoleName() { - this.roleName = null; - } - - /** Returns true if field roleName is set (has been assigned a value) and false otherwise */ - public boolean isSetRoleName() { - return this.roleName != null; - } - - public void setRoleNameIsSet(boolean value) { - if (!value) { - this.roleName = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ROLE_NAME: - if (value == null) { - unsetRoleName(); - } else { - setRoleName((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ROLE_NAME: - return getRoleName(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ROLE_NAME: - return isSetRoleName(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetPrincipalsInRoleRequest) - return this.equals((GetPrincipalsInRoleRequest)that); - return false; - } - - public boolean equals(GetPrincipalsInRoleRequest that) { - if (that == null) - return false; - - boolean this_present_roleName = true && this.isSetRoleName(); - boolean that_present_roleName = true && that.isSetRoleName(); - if (this_present_roleName || that_present_roleName) { - if (!(this_present_roleName && that_present_roleName)) - return false; - if (!this.roleName.equals(that.roleName)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_roleName = true && (isSetRoleName()); - list.add(present_roleName); - if (present_roleName) - list.add(roleName); - - return list.hashCode(); - } - - @Override - public int compareTo(GetPrincipalsInRoleRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRoleName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetPrincipalsInRoleRequest("); - boolean first = true; - - sb.append("roleName:"); - if (this.roleName == null) { - sb.append("null"); - } else { - sb.append(this.roleName); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetRoleName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString()); - } - - // 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 GetPrincipalsInRoleRequestStandardSchemeFactory implements SchemeFactory { - public GetPrincipalsInRoleRequestStandardScheme getScheme() { - return new GetPrincipalsInRoleRequestStandardScheme(); - } - } - - private static class GetPrincipalsInRoleRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrincipalsInRoleRequest 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; - 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, GetPrincipalsInRoleRequest 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.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetPrincipalsInRoleRequestTupleSchemeFactory implements SchemeFactory { - public GetPrincipalsInRoleRequestTupleScheme getScheme() { - return new GetPrincipalsInRoleRequestTupleScheme(); - } - } - - private static class GetPrincipalsInRoleRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.roleName); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.roleName = iprot.readString(); - struct.setRoleNameIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java deleted file mode 100644 index 02c652a..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetPrincipalsInRoleResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPrincipalsInRoleResponse"); - - private static final org.apache.thrift.protocol.TField PRINCIPAL_GRANTS_FIELD_DESC = new org.apache.thrift.protocol.TField("principalGrants", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetPrincipalsInRoleResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetPrincipalsInRoleResponseTupleSchemeFactory()); - } - - private List principalGrants; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PRINCIPAL_GRANTS((short)1, "principalGrants"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PRINCIPAL_GRANTS - return PRINCIPAL_GRANTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PRINCIPAL_GRANTS, new org.apache.thrift.meta_data.FieldMetaData("principalGrants", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RolePrincipalGrant.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetPrincipalsInRoleResponse.class, metaDataMap); - } - - public GetPrincipalsInRoleResponse() { - } - - public GetPrincipalsInRoleResponse( - List principalGrants) - { - this(); - this.principalGrants = principalGrants; - } - - /** - * Performs a deep copy on other. - */ - public GetPrincipalsInRoleResponse(GetPrincipalsInRoleResponse other) { - if (other.isSetPrincipalGrants()) { - List __this__principalGrants = new ArrayList(other.principalGrants.size()); - for (RolePrincipalGrant other_element : other.principalGrants) { - __this__principalGrants.add(new RolePrincipalGrant(other_element)); - } - this.principalGrants = __this__principalGrants; - } - } - - public GetPrincipalsInRoleResponse deepCopy() { - return new GetPrincipalsInRoleResponse(this); - } - - @Override - public void clear() { - this.principalGrants = null; - } - - public int getPrincipalGrantsSize() { - return (this.principalGrants == null) ? 0 : this.principalGrants.size(); - } - - public java.util.Iterator getPrincipalGrantsIterator() { - return (this.principalGrants == null) ? null : this.principalGrants.iterator(); - } - - public void addToPrincipalGrants(RolePrincipalGrant elem) { - if (this.principalGrants == null) { - this.principalGrants = new ArrayList(); - } - this.principalGrants.add(elem); - } - - public List getPrincipalGrants() { - return this.principalGrants; - } - - public void setPrincipalGrants(List principalGrants) { - this.principalGrants = principalGrants; - } - - public void unsetPrincipalGrants() { - this.principalGrants = null; - } - - /** Returns true if field principalGrants is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipalGrants() { - return this.principalGrants != null; - } - - public void setPrincipalGrantsIsSet(boolean value) { - if (!value) { - this.principalGrants = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PRINCIPAL_GRANTS: - if (value == null) { - unsetPrincipalGrants(); - } else { - setPrincipalGrants((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PRINCIPAL_GRANTS: - return getPrincipalGrants(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PRINCIPAL_GRANTS: - return isSetPrincipalGrants(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetPrincipalsInRoleResponse) - return this.equals((GetPrincipalsInRoleResponse)that); - return false; - } - - public boolean equals(GetPrincipalsInRoleResponse that) { - if (that == null) - return false; - - boolean this_present_principalGrants = true && this.isSetPrincipalGrants(); - boolean that_present_principalGrants = true && that.isSetPrincipalGrants(); - if (this_present_principalGrants || that_present_principalGrants) { - if (!(this_present_principalGrants && that_present_principalGrants)) - return false; - if (!this.principalGrants.equals(that.principalGrants)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_principalGrants = true && (isSetPrincipalGrants()); - list.add(present_principalGrants); - if (present_principalGrants) - list.add(principalGrants); - - return list.hashCode(); - } - - @Override - public int compareTo(GetPrincipalsInRoleResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPrincipalGrants()).compareTo(other.isSetPrincipalGrants()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipalGrants()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalGrants, other.principalGrants); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetPrincipalsInRoleResponse("); - boolean first = true; - - sb.append("principalGrants:"); - if (this.principalGrants == null) { - sb.append("null"); - } else { - sb.append(this.principalGrants); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetPrincipalGrants()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'principalGrants' is unset! Struct:" + toString()); - } - - // 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 GetPrincipalsInRoleResponseStandardSchemeFactory implements SchemeFactory { - public GetPrincipalsInRoleResponseStandardScheme getScheme() { - return new GetPrincipalsInRoleResponseStandardScheme(); - } - } - - private static class GetPrincipalsInRoleResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrincipalsInRoleResponse 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_GRANTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list86 = iprot.readListBegin(); - struct.principalGrants = new ArrayList(_list86.size); - RolePrincipalGrant _elem87; - for (int _i88 = 0; _i88 < _list86.size; ++_i88) - { - _elem87 = new RolePrincipalGrant(); - _elem87.read(iprot); - struct.principalGrants.add(_elem87); - } - iprot.readListEnd(); - } - struct.setPrincipalGrantsIsSet(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, GetPrincipalsInRoleResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.principalGrants != null) { - oprot.writeFieldBegin(PRINCIPAL_GRANTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.principalGrants.size())); - for (RolePrincipalGrant _iter89 : struct.principalGrants) - { - _iter89.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetPrincipalsInRoleResponseTupleSchemeFactory implements SchemeFactory { - public GetPrincipalsInRoleResponseTupleScheme getScheme() { - return new GetPrincipalsInRoleResponseTupleScheme(); - } - } - - private static class GetPrincipalsInRoleResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.principalGrants.size()); - for (RolePrincipalGrant _iter90 : struct.principalGrants) - { - _iter90.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.principalGrants = new ArrayList(_list91.size); - RolePrincipalGrant _elem92; - for (int _i93 = 0; _i93 < _list91.size; ++_i93) - { - _elem92 = new RolePrincipalGrant(); - _elem92.read(iprot); - struct.principalGrants.add(_elem92); - } - } - struct.setPrincipalGrantsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java deleted file mode 100644 index ea667d3..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java +++ /dev/null @@ -1,502 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetRoleGrantsForPrincipalRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetRoleGrantsForPrincipalRequest"); - - 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 GetRoleGrantsForPrincipalRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetRoleGrantsForPrincipalRequestTupleSchemeFactory()); - } - - private String principal_name; // required - private PrincipalType principal_type; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PRINCIPAL_NAME((short)1, "principal_name"), - /** - * - * @see PrincipalType - */ - PRINCIPAL_TYPE((short)2, "principal_type"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PRINCIPAL_NAME - return PRINCIPAL_NAME; - case 2: // PRINCIPAL_TYPE - return PRINCIPAL_TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetRoleGrantsForPrincipalRequest.class, metaDataMap); - } - - public GetRoleGrantsForPrincipalRequest() { - } - - public GetRoleGrantsForPrincipalRequest( - String principal_name, - PrincipalType principal_type) - { - this(); - this.principal_name = principal_name; - this.principal_type = principal_type; - } - - /** - * Performs a deep copy on other. - */ - public GetRoleGrantsForPrincipalRequest(GetRoleGrantsForPrincipalRequest other) { - if (other.isSetPrincipal_name()) { - this.principal_name = other.principal_name; - } - if (other.isSetPrincipal_type()) { - this.principal_type = other.principal_type; - } - } - - public GetRoleGrantsForPrincipalRequest deepCopy() { - return new GetRoleGrantsForPrincipalRequest(this); - } - - @Override - public void clear() { - this.principal_name = null; - this.principal_type = null; - } - - public String getPrincipal_name() { - return this.principal_name; - } - - public void setPrincipal_name(String principal_name) { - this.principal_name = principal_name; - } - - public void unsetPrincipal_name() { - this.principal_name = null; - } - - /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipal_name() { - return this.principal_name != null; - } - - public void setPrincipal_nameIsSet(boolean value) { - if (!value) { - this.principal_name = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getPrincipal_type() { - return this.principal_type; - } - - /** - * - * @see PrincipalType - */ - public void setPrincipal_type(PrincipalType principal_type) { - this.principal_type = principal_type; - } - - public void unsetPrincipal_type() { - this.principal_type = null; - } - - /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipal_type() { - return this.principal_type != null; - } - - public void setPrincipal_typeIsSet(boolean value) { - if (!value) { - this.principal_type = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PRINCIPAL_NAME: - if (value == null) { - unsetPrincipal_name(); - } else { - setPrincipal_name((String)value); - } - break; - - case PRINCIPAL_TYPE: - if (value == null) { - unsetPrincipal_type(); - } else { - setPrincipal_type((PrincipalType)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PRINCIPAL_NAME: - return getPrincipal_name(); - - case PRINCIPAL_TYPE: - return getPrincipal_type(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PRINCIPAL_NAME: - return isSetPrincipal_name(); - case PRINCIPAL_TYPE: - return isSetPrincipal_type(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetRoleGrantsForPrincipalRequest) - return this.equals((GetRoleGrantsForPrincipalRequest)that); - return false; - } - - public boolean equals(GetRoleGrantsForPrincipalRequest that) { - if (that == null) - return false; - - boolean this_present_principal_name = true && this.isSetPrincipal_name(); - boolean that_present_principal_name = true && that.isSetPrincipal_name(); - if (this_present_principal_name || that_present_principal_name) { - if (!(this_present_principal_name && that_present_principal_name)) - return false; - if (!this.principal_name.equals(that.principal_name)) - return false; - } - - boolean this_present_principal_type = true && this.isSetPrincipal_type(); - boolean that_present_principal_type = true && that.isSetPrincipal_type(); - if (this_present_principal_type || that_present_principal_type) { - if (!(this_present_principal_type && that_present_principal_type)) - return false; - if (!this.principal_type.equals(that.principal_type)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_principal_name = true && (isSetPrincipal_name()); - list.add(present_principal_name); - if (present_principal_name) - list.add(principal_name); - - boolean present_principal_type = true && (isSetPrincipal_type()); - list.add(present_principal_type); - if (present_principal_type) - list.add(principal_type.getValue()); - - return list.hashCode(); - } - - @Override - public int compareTo(GetRoleGrantsForPrincipalRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipal_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipal_type()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetRoleGrantsForPrincipalRequest("); - boolean first = true; - - sb.append("principal_name:"); - if (this.principal_name == null) { - sb.append("null"); - } else { - sb.append(this.principal_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("principal_type:"); - if (this.principal_type == null) { - sb.append("null"); - } else { - sb.append(this.principal_type); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetPrincipal_name()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'principal_name' is unset! Struct:" + toString()); - } - - if (!isSetPrincipal_type()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'principal_type' is unset! Struct:" + toString()); - } - - // 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 GetRoleGrantsForPrincipalRequestStandardSchemeFactory implements SchemeFactory { - public GetRoleGrantsForPrincipalRequestStandardScheme getScheme() { - return new GetRoleGrantsForPrincipalRequestStandardScheme(); - } - } - - private static class GetRoleGrantsForPrincipalRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetRoleGrantsForPrincipalRequest 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 = org.apache.hadoop.hive.metastore.api.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, GetRoleGrantsForPrincipalRequest 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 GetRoleGrantsForPrincipalRequestTupleSchemeFactory implements SchemeFactory { - public GetRoleGrantsForPrincipalRequestTupleScheme getScheme() { - return new GetRoleGrantsForPrincipalRequestTupleScheme(); - } - } - - private static class GetRoleGrantsForPrincipalRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.principal_name); - oprot.writeI32(struct.principal_type.getValue()); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.principal_name = iprot.readString(); - struct.setPrincipal_nameIsSet(true); - struct.principal_type = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setPrincipal_typeIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java deleted file mode 100644 index c013e0e..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetRoleGrantsForPrincipalResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetRoleGrantsForPrincipalResponse"); - - private static final org.apache.thrift.protocol.TField PRINCIPAL_GRANTS_FIELD_DESC = new org.apache.thrift.protocol.TField("principalGrants", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetRoleGrantsForPrincipalResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetRoleGrantsForPrincipalResponseTupleSchemeFactory()); - } - - private List principalGrants; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PRINCIPAL_GRANTS((short)1, "principalGrants"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PRINCIPAL_GRANTS - return PRINCIPAL_GRANTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PRINCIPAL_GRANTS, new org.apache.thrift.meta_data.FieldMetaData("principalGrants", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RolePrincipalGrant.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetRoleGrantsForPrincipalResponse.class, metaDataMap); - } - - public GetRoleGrantsForPrincipalResponse() { - } - - public GetRoleGrantsForPrincipalResponse( - List principalGrants) - { - this(); - this.principalGrants = principalGrants; - } - - /** - * Performs a deep copy on other. - */ - public GetRoleGrantsForPrincipalResponse(GetRoleGrantsForPrincipalResponse other) { - if (other.isSetPrincipalGrants()) { - List __this__principalGrants = new ArrayList(other.principalGrants.size()); - for (RolePrincipalGrant other_element : other.principalGrants) { - __this__principalGrants.add(new RolePrincipalGrant(other_element)); - } - this.principalGrants = __this__principalGrants; - } - } - - public GetRoleGrantsForPrincipalResponse deepCopy() { - return new GetRoleGrantsForPrincipalResponse(this); - } - - @Override - public void clear() { - this.principalGrants = null; - } - - public int getPrincipalGrantsSize() { - return (this.principalGrants == null) ? 0 : this.principalGrants.size(); - } - - public java.util.Iterator getPrincipalGrantsIterator() { - return (this.principalGrants == null) ? null : this.principalGrants.iterator(); - } - - public void addToPrincipalGrants(RolePrincipalGrant elem) { - if (this.principalGrants == null) { - this.principalGrants = new ArrayList(); - } - this.principalGrants.add(elem); - } - - public List getPrincipalGrants() { - return this.principalGrants; - } - - public void setPrincipalGrants(List principalGrants) { - this.principalGrants = principalGrants; - } - - public void unsetPrincipalGrants() { - this.principalGrants = null; - } - - /** Returns true if field principalGrants is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipalGrants() { - return this.principalGrants != null; - } - - public void setPrincipalGrantsIsSet(boolean value) { - if (!value) { - this.principalGrants = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PRINCIPAL_GRANTS: - if (value == null) { - unsetPrincipalGrants(); - } else { - setPrincipalGrants((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PRINCIPAL_GRANTS: - return getPrincipalGrants(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PRINCIPAL_GRANTS: - return isSetPrincipalGrants(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetRoleGrantsForPrincipalResponse) - return this.equals((GetRoleGrantsForPrincipalResponse)that); - return false; - } - - public boolean equals(GetRoleGrantsForPrincipalResponse that) { - if (that == null) - return false; - - boolean this_present_principalGrants = true && this.isSetPrincipalGrants(); - boolean that_present_principalGrants = true && that.isSetPrincipalGrants(); - if (this_present_principalGrants || that_present_principalGrants) { - if (!(this_present_principalGrants && that_present_principalGrants)) - return false; - if (!this.principalGrants.equals(that.principalGrants)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_principalGrants = true && (isSetPrincipalGrants()); - list.add(present_principalGrants); - if (present_principalGrants) - list.add(principalGrants); - - return list.hashCode(); - } - - @Override - public int compareTo(GetRoleGrantsForPrincipalResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPrincipalGrants()).compareTo(other.isSetPrincipalGrants()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipalGrants()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalGrants, other.principalGrants); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetRoleGrantsForPrincipalResponse("); - boolean first = true; - - sb.append("principalGrants:"); - if (this.principalGrants == null) { - sb.append("null"); - } else { - sb.append(this.principalGrants); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetPrincipalGrants()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'principalGrants' is unset! Struct:" + toString()); - } - - // 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 GetRoleGrantsForPrincipalResponseStandardSchemeFactory implements SchemeFactory { - public GetRoleGrantsForPrincipalResponseStandardScheme getScheme() { - return new GetRoleGrantsForPrincipalResponseStandardScheme(); - } - } - - private static class GetRoleGrantsForPrincipalResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetRoleGrantsForPrincipalResponse 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_GRANTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list78 = iprot.readListBegin(); - struct.principalGrants = new ArrayList(_list78.size); - RolePrincipalGrant _elem79; - for (int _i80 = 0; _i80 < _list78.size; ++_i80) - { - _elem79 = new RolePrincipalGrant(); - _elem79.read(iprot); - struct.principalGrants.add(_elem79); - } - iprot.readListEnd(); - } - struct.setPrincipalGrantsIsSet(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, GetRoleGrantsForPrincipalResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.principalGrants != null) { - oprot.writeFieldBegin(PRINCIPAL_GRANTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.principalGrants.size())); - for (RolePrincipalGrant _iter81 : struct.principalGrants) - { - _iter81.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetRoleGrantsForPrincipalResponseTupleSchemeFactory implements SchemeFactory { - public GetRoleGrantsForPrincipalResponseTupleScheme getScheme() { - return new GetRoleGrantsForPrincipalResponseTupleScheme(); - } - } - - private static class GetRoleGrantsForPrincipalResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.principalGrants.size()); - for (RolePrincipalGrant _iter82 : struct.principalGrants) - { - _iter82.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list83 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.principalGrants = new ArrayList(_list83.size); - RolePrincipalGrant _elem84; - for (int _i85 = 0; _i85 < _list83.size; ++_i85) - { - _elem84 = new RolePrincipalGrant(); - _elem84.read(iprot); - struct.principalGrants.add(_elem84); - } - } - struct.setPrincipalGrantsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTableRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTableRequest.java deleted file mode 100644 index 5f12975..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTableRequest.java +++ /dev/null @@ -1,605 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetTableRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTableRequest"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField CAPABILITIES_FIELD_DESC = new org.apache.thrift.protocol.TField("capabilities", org.apache.thrift.protocol.TType.STRUCT, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetTableRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetTableRequestTupleSchemeFactory()); - } - - private String dbName; // required - private String tblName; // required - private ClientCapabilities capabilities; // 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 { - DB_NAME((short)1, "dbName"), - TBL_NAME((short)2, "tblName"), - CAPABILITIES((short)3, "capabilities"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // CAPABILITIES - return CAPABILITIES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.CAPABILITIES}; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CAPABILITIES, new org.apache.thrift.meta_data.FieldMetaData("capabilities", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClientCapabilities.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTableRequest.class, metaDataMap); - } - - public GetTableRequest() { - } - - public GetTableRequest( - String dbName, - String tblName) - { - this(); - this.dbName = dbName; - this.tblName = tblName; - } - - /** - * Performs a deep copy on other. - */ - public GetTableRequest(GetTableRequest other) { - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTblName()) { - this.tblName = other.tblName; - } - if (other.isSetCapabilities()) { - this.capabilities = new ClientCapabilities(other.capabilities); - } - } - - public GetTableRequest deepCopy() { - return new GetTableRequest(this); - } - - @Override - public void clear() { - this.dbName = null; - this.tblName = null; - this.capabilities = null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTblName() { - return this.tblName; - } - - public void setTblName(String tblName) { - this.tblName = tblName; - } - - public void unsetTblName() { - this.tblName = null; - } - - /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ - public boolean isSetTblName() { - return this.tblName != null; - } - - public void setTblNameIsSet(boolean value) { - if (!value) { - this.tblName = null; - } - } - - public ClientCapabilities getCapabilities() { - return this.capabilities; - } - - public void setCapabilities(ClientCapabilities capabilities) { - this.capabilities = capabilities; - } - - public void unsetCapabilities() { - this.capabilities = null; - } - - /** Returns true if field capabilities is set (has been assigned a value) and false otherwise */ - public boolean isSetCapabilities() { - return this.capabilities != null; - } - - public void setCapabilitiesIsSet(boolean value) { - if (!value) { - this.capabilities = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTblName(); - } else { - setTblName((String)value); - } - break; - - case CAPABILITIES: - if (value == null) { - unsetCapabilities(); - } else { - setCapabilities((ClientCapabilities)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case TBL_NAME: - return getTblName(); - - case CAPABILITIES: - return getCapabilities(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case TBL_NAME: - return isSetTblName(); - case CAPABILITIES: - return isSetCapabilities(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetTableRequest) - return this.equals((GetTableRequest)that); - return false; - } - - public boolean equals(GetTableRequest that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tblName = true && this.isSetTblName(); - boolean that_present_tblName = true && that.isSetTblName(); - if (this_present_tblName || that_present_tblName) { - if (!(this_present_tblName && that_present_tblName)) - return false; - if (!this.tblName.equals(that.tblName)) - return false; - } - - boolean this_present_capabilities = true && this.isSetCapabilities(); - boolean that_present_capabilities = true && that.isSetCapabilities(); - if (this_present_capabilities || that_present_capabilities) { - if (!(this_present_capabilities && that_present_capabilities)) - return false; - if (!this.capabilities.equals(that.capabilities)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tblName = true && (isSetTblName()); - list.add(present_tblName); - if (present_tblName) - list.add(tblName); - - boolean present_capabilities = true && (isSetCapabilities()); - list.add(present_capabilities); - if (present_capabilities) - list.add(capabilities); - - return list.hashCode(); - } - - @Override - public int compareTo(GetTableRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTblName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCapabilities()).compareTo(other.isSetCapabilities()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCapabilities()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.capabilities, other.capabilities); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetTableRequest("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tblName:"); - if (this.tblName == null) { - sb.append("null"); - } else { - sb.append(this.tblName); - } - first = false; - if (isSetCapabilities()) { - if (!first) sb.append(", "); - sb.append("capabilities:"); - if (this.capabilities == null) { - sb.append("null"); - } else { - sb.append(this.capabilities); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDbName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); - } - - if (!isSetTblName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); - } - - // check for sub-struct validity - if (capabilities != null) { - capabilities.validate(); - } - } - - 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 GetTableRequestStandardSchemeFactory implements SchemeFactory { - public GetTableRequestStandardScheme getScheme() { - return new GetTableRequestStandardScheme(); - } - } - - private static class GetTableRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableRequest 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.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.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // CAPABILITIES - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.capabilities = new ClientCapabilities(); - struct.capabilities.read(iprot); - struct.setCapabilitiesIsSet(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, GetTableRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - if (struct.tblName != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(struct.tblName); - oprot.writeFieldEnd(); - } - if (struct.capabilities != null) { - if (struct.isSetCapabilities()) { - oprot.writeFieldBegin(CAPABILITIES_FIELD_DESC); - struct.capabilities.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetTableRequestTupleSchemeFactory implements SchemeFactory { - public GetTableRequestTupleScheme getScheme() { - return new GetTableRequestTupleScheme(); - } - } - - private static class GetTableRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetTableRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dbName); - oprot.writeString(struct.tblName); - BitSet optionals = new BitSet(); - if (struct.isSetCapabilities()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetCapabilities()) { - struct.capabilities.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetTableRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - struct.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.capabilities = new ClientCapabilities(); - struct.capabilities.read(iprot); - struct.setCapabilitiesIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTableResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTableResult.java deleted file mode 100644 index d5533fd..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTableResult.java +++ /dev/null @@ -1,394 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetTableResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTableResult"); - - private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetTableResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetTableResultTupleSchemeFactory()); - } - - private Table table; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TABLE((short)1, "table"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TABLE - return TABLE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTableResult.class, metaDataMap); - } - - public GetTableResult() { - } - - public GetTableResult( - Table table) - { - this(); - this.table = table; - } - - /** - * Performs a deep copy on other. - */ - public GetTableResult(GetTableResult other) { - if (other.isSetTable()) { - this.table = new Table(other.table); - } - } - - public GetTableResult deepCopy() { - return new GetTableResult(this); - } - - @Override - public void clear() { - this.table = null; - } - - public Table getTable() { - return this.table; - } - - public void setTable(Table table) { - this.table = table; - } - - public void unsetTable() { - this.table = null; - } - - /** Returns true if field table is set (has been assigned a value) and false otherwise */ - public boolean isSetTable() { - return this.table != null; - } - - public void setTableIsSet(boolean value) { - if (!value) { - this.table = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TABLE: - if (value == null) { - unsetTable(); - } else { - setTable((Table)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TABLE: - return getTable(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TABLE: - return isSetTable(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetTableResult) - return this.equals((GetTableResult)that); - return false; - } - - public boolean equals(GetTableResult that) { - if (that == null) - return false; - - boolean this_present_table = true && this.isSetTable(); - boolean that_present_table = true && that.isSetTable(); - if (this_present_table || that_present_table) { - if (!(this_present_table && that_present_table)) - return false; - if (!this.table.equals(that.table)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_table = true && (isSetTable()); - list.add(present_table); - if (present_table) - list.add(table); - - return list.hashCode(); - } - - @Override - public int compareTo(GetTableResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetTableResult("); - boolean first = true; - - sb.append("table:"); - if (this.table == null) { - sb.append("null"); - } else { - sb.append(this.table); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetTable()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' is unset! Struct:" + toString()); - } - - // check for sub-struct validity - if (table != null) { - table.validate(); - } - } - - 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 GetTableResultStandardSchemeFactory implements SchemeFactory { - public GetTableResultStandardScheme getScheme() { - return new GetTableResultStandardScheme(); - } - } - - private static class GetTableResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableResult 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 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.table = new Table(); - struct.table.read(iprot); - struct.setTableIsSet(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, GetTableResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.table != null) { - oprot.writeFieldBegin(TABLE_FIELD_DESC); - struct.table.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetTableResultTupleSchemeFactory implements SchemeFactory { - public GetTableResultTupleScheme getScheme() { - return new GetTableResultTupleScheme(); - } - } - - private static class GetTableResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetTableResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - struct.table.write(oprot); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetTableResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.table = new Table(); - struct.table.read(iprot); - struct.setTableIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java deleted file mode 100644 index 5195427..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java +++ /dev/null @@ -1,659 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetTablesRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTablesRequest"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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("tblNames", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField CAPABILITIES_FIELD_DESC = new org.apache.thrift.protocol.TField("capabilities", org.apache.thrift.protocol.TType.STRUCT, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetTablesRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetTablesRequestTupleSchemeFactory()); - } - - private String dbName; // required - private List tblNames; // optional - private ClientCapabilities capabilities; // 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 { - DB_NAME((short)1, "dbName"), - TBL_NAMES((short)2, "tblNames"), - CAPABILITIES((short)3, "capabilities"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAMES - return TBL_NAMES; - case 3: // CAPABILITIES - return CAPABILITIES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.TBL_NAMES,_Fields.CAPABILITIES}; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("tblNames", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.CAPABILITIES, new org.apache.thrift.meta_data.FieldMetaData("capabilities", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClientCapabilities.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTablesRequest.class, metaDataMap); - } - - public GetTablesRequest() { - } - - public GetTablesRequest( - String dbName) - { - this(); - this.dbName = dbName; - } - - /** - * Performs a deep copy on other. - */ - public GetTablesRequest(GetTablesRequest other) { - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTblNames()) { - List __this__tblNames = new ArrayList(other.tblNames); - this.tblNames = __this__tblNames; - } - if (other.isSetCapabilities()) { - this.capabilities = new ClientCapabilities(other.capabilities); - } - } - - public GetTablesRequest deepCopy() { - return new GetTablesRequest(this); - } - - @Override - public void clear() { - this.dbName = null; - this.tblNames = null; - this.capabilities = null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public int getTblNamesSize() { - return (this.tblNames == null) ? 0 : this.tblNames.size(); - } - - public java.util.Iterator getTblNamesIterator() { - return (this.tblNames == null) ? null : this.tblNames.iterator(); - } - - public void addToTblNames(String elem) { - if (this.tblNames == null) { - this.tblNames = new ArrayList(); - } - this.tblNames.add(elem); - } - - public List getTblNames() { - return this.tblNames; - } - - public void setTblNames(List tblNames) { - this.tblNames = tblNames; - } - - public void unsetTblNames() { - this.tblNames = null; - } - - /** Returns true if field tblNames is set (has been assigned a value) and false otherwise */ - public boolean isSetTblNames() { - return this.tblNames != null; - } - - public void setTblNamesIsSet(boolean value) { - if (!value) { - this.tblNames = null; - } - } - - public ClientCapabilities getCapabilities() { - return this.capabilities; - } - - public void setCapabilities(ClientCapabilities capabilities) { - this.capabilities = capabilities; - } - - public void unsetCapabilities() { - this.capabilities = null; - } - - /** Returns true if field capabilities is set (has been assigned a value) and false otherwise */ - public boolean isSetCapabilities() { - return this.capabilities != null; - } - - public void setCapabilitiesIsSet(boolean value) { - if (!value) { - this.capabilities = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TBL_NAMES: - if (value == null) { - unsetTblNames(); - } else { - setTblNames((List)value); - } - break; - - case CAPABILITIES: - if (value == null) { - unsetCapabilities(); - } else { - setCapabilities((ClientCapabilities)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case TBL_NAMES: - return getTblNames(); - - case CAPABILITIES: - return getCapabilities(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case TBL_NAMES: - return isSetTblNames(); - case CAPABILITIES: - return isSetCapabilities(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetTablesRequest) - return this.equals((GetTablesRequest)that); - return false; - } - - public boolean equals(GetTablesRequest that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tblNames = true && this.isSetTblNames(); - boolean that_present_tblNames = true && that.isSetTblNames(); - if (this_present_tblNames || that_present_tblNames) { - if (!(this_present_tblNames && that_present_tblNames)) - return false; - if (!this.tblNames.equals(that.tblNames)) - return false; - } - - boolean this_present_capabilities = true && this.isSetCapabilities(); - boolean that_present_capabilities = true && that.isSetCapabilities(); - if (this_present_capabilities || that_present_capabilities) { - if (!(this_present_capabilities && that_present_capabilities)) - return false; - if (!this.capabilities.equals(that.capabilities)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tblNames = true && (isSetTblNames()); - list.add(present_tblNames); - if (present_tblNames) - list.add(tblNames); - - boolean present_capabilities = true && (isSetCapabilities()); - list.add(present_capabilities); - if (present_capabilities) - list.add(capabilities); - - return list.hashCode(); - } - - @Override - public int compareTo(GetTablesRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTblNames()).compareTo(other.isSetTblNames()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTblNames()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblNames, other.tblNames); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCapabilities()).compareTo(other.isSetCapabilities()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCapabilities()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.capabilities, other.capabilities); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetTablesRequest("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (isSetTblNames()) { - if (!first) sb.append(", "); - sb.append("tblNames:"); - if (this.tblNames == null) { - sb.append("null"); - } else { - sb.append(this.tblNames); - } - first = false; - } - if (isSetCapabilities()) { - if (!first) sb.append(", "); - sb.append("capabilities:"); - if (this.capabilities == null) { - sb.append("null"); - } else { - sb.append(this.capabilities); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDbName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); - } - - // check for sub-struct validity - if (capabilities != null) { - capabilities.validate(); - } - } - - 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 GetTablesRequestStandardSchemeFactory implements SchemeFactory { - public GetTablesRequestStandardScheme getScheme() { - return new GetTablesRequestStandardScheme(); - } - } - - private static class GetTablesRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetTablesRequest 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.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 _list690 = iprot.readListBegin(); - struct.tblNames = new ArrayList(_list690.size); - String _elem691; - for (int _i692 = 0; _i692 < _list690.size; ++_i692) - { - _elem691 = iprot.readString(); - struct.tblNames.add(_elem691); - } - iprot.readListEnd(); - } - struct.setTblNamesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // CAPABILITIES - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.capabilities = new ClientCapabilities(); - struct.capabilities.read(iprot); - struct.setCapabilitiesIsSet(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, GetTablesRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - if (struct.tblNames != null) { - if (struct.isSetTblNames()) { - oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tblNames.size())); - for (String _iter693 : struct.tblNames) - { - oprot.writeString(_iter693); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - if (struct.capabilities != null) { - if (struct.isSetCapabilities()) { - oprot.writeFieldBegin(CAPABILITIES_FIELD_DESC); - struct.capabilities.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetTablesRequestTupleSchemeFactory implements SchemeFactory { - public GetTablesRequestTupleScheme getScheme() { - return new GetTablesRequestTupleScheme(); - } - } - - private static class GetTablesRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetTablesRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dbName); - BitSet optionals = new BitSet(); - if (struct.isSetTblNames()) { - optionals.set(0); - } - if (struct.isSetCapabilities()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetTblNames()) { - { - oprot.writeI32(struct.tblNames.size()); - for (String _iter694 : struct.tblNames) - { - oprot.writeString(_iter694); - } - } - } - if (struct.isSetCapabilities()) { - struct.capabilities.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetTablesRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list695 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.tblNames = new ArrayList(_list695.size); - String _elem696; - for (int _i697 = 0; _i697 < _list695.size; ++_i697) - { - _elem696 = iprot.readString(); - struct.tblNames.add(_elem696); - } - } - struct.setTblNamesIsSet(true); - } - if (incoming.get(1)) { - struct.capabilities = new ClientCapabilities(); - struct.capabilities.read(iprot); - struct.setCapabilitiesIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java deleted file mode 100644 index 1ade2f5..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GetTablesResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTablesResult"); - - private static final org.apache.thrift.protocol.TField TABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("tables", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetTablesResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetTablesResultTupleSchemeFactory()); - } - - private List
tables; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TABLES((short)1, "tables"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TABLES - return TABLES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TABLES, new org.apache.thrift.meta_data.FieldMetaData("tables", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTablesResult.class, metaDataMap); - } - - public GetTablesResult() { - } - - public GetTablesResult( - List
tables) - { - this(); - this.tables = tables; - } - - /** - * Performs a deep copy on other. - */ - public GetTablesResult(GetTablesResult other) { - if (other.isSetTables()) { - List
__this__tables = new ArrayList
(other.tables.size()); - for (Table other_element : other.tables) { - __this__tables.add(new Table(other_element)); - } - this.tables = __this__tables; - } - } - - public GetTablesResult deepCopy() { - return new GetTablesResult(this); - } - - @Override - public void clear() { - this.tables = null; - } - - public int getTablesSize() { - return (this.tables == null) ? 0 : this.tables.size(); - } - - public java.util.Iterator
getTablesIterator() { - return (this.tables == null) ? null : this.tables.iterator(); - } - - public void addToTables(Table elem) { - if (this.tables == null) { - this.tables = new ArrayList
(); - } - this.tables.add(elem); - } - - public List
getTables() { - return this.tables; - } - - public void setTables(List
tables) { - this.tables = tables; - } - - public void unsetTables() { - this.tables = null; - } - - /** Returns true if field tables is set (has been assigned a value) and false otherwise */ - public boolean isSetTables() { - return this.tables != null; - } - - public void setTablesIsSet(boolean value) { - if (!value) { - this.tables = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TABLES: - if (value == null) { - unsetTables(); - } else { - setTables((List
)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TABLES: - return getTables(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TABLES: - return isSetTables(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetTablesResult) - return this.equals((GetTablesResult)that); - return false; - } - - public boolean equals(GetTablesResult that) { - if (that == null) - return false; - - boolean this_present_tables = true && this.isSetTables(); - boolean that_present_tables = true && that.isSetTables(); - if (this_present_tables || that_present_tables) { - if (!(this_present_tables && that_present_tables)) - return false; - if (!this.tables.equals(that.tables)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_tables = true && (isSetTables()); - list.add(present_tables); - if (present_tables) - list.add(tables); - - return list.hashCode(); - } - - @Override - public int compareTo(GetTablesResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTables()).compareTo(other.isSetTables()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTables()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tables, other.tables); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GetTablesResult("); - boolean first = true; - - sb.append("tables:"); - if (this.tables == null) { - sb.append("null"); - } else { - sb.append(this.tables); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetTables()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tables' is unset! Struct:" + toString()); - } - - // 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 GetTablesResultStandardSchemeFactory implements SchemeFactory { - public GetTablesResultStandardScheme getScheme() { - return new GetTablesResultStandardScheme(); - } - } - - private static class GetTablesResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetTablesResult 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: // TABLES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list698 = iprot.readListBegin(); - struct.tables = new ArrayList
(_list698.size); - Table _elem699; - for (int _i700 = 0; _i700 < _list698.size; ++_i700) - { - _elem699 = new Table(); - _elem699.read(iprot); - struct.tables.add(_elem699); - } - iprot.readListEnd(); - } - struct.setTablesIsSet(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, GetTablesResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.tables != null) { - oprot.writeFieldBegin(TABLES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tables.size())); - for (Table _iter701 : struct.tables) - { - _iter701.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetTablesResultTupleSchemeFactory implements SchemeFactory { - public GetTablesResultTupleScheme getScheme() { - return new GetTablesResultTupleScheme(); - } - } - - private static class GetTablesResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetTablesResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.tables.size()); - for (Table _iter702 : struct.tables) - { - _iter702.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetTablesResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list703 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.tables = new ArrayList
(_list703.size); - Table _elem704; - for (int _i705 = 0; _i705 < _list703.size; ++_i705) - { - _elem704 = new Table(); - _elem704.read(iprot); - struct.tables.add(_elem704); - } - } - struct.setTablesIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeRequest.java deleted file mode 100644 index 014c857..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeRequest.java +++ /dev/null @@ -1,620 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GrantRevokePrivilegeRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GrantRevokePrivilegeRequest"); - - private static final org.apache.thrift.protocol.TField REQUEST_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("requestType", org.apache.thrift.protocol.TType.I32, (short)1); - 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)2); - private static final org.apache.thrift.protocol.TField REVOKE_GRANT_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("revokeGrantOption", org.apache.thrift.protocol.TType.BOOL, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GrantRevokePrivilegeRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GrantRevokePrivilegeRequestTupleSchemeFactory()); - } - - private GrantRevokeType requestType; // required - private PrivilegeBag privileges; // required - private boolean revokeGrantOption; // 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 { - /** - * - * @see GrantRevokeType - */ - REQUEST_TYPE((short)1, "requestType"), - PRIVILEGES((short)2, "privileges"), - REVOKE_GRANT_OPTION((short)3, "revokeGrantOption"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST_TYPE - return REQUEST_TYPE; - case 2: // PRIVILEGES - return PRIVILEGES; - case 3: // REVOKE_GRANT_OPTION - return REVOKE_GRANT_OPTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __REVOKEGRANTOPTION_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.REVOKE_GRANT_OPTION}; - 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); - tmpMap.put(_Fields.REQUEST_TYPE, new org.apache.thrift.meta_data.FieldMetaData("requestType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GrantRevokeType.class))); - tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeBag.class))); - tmpMap.put(_Fields.REVOKE_GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("revokeGrantOption", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GrantRevokePrivilegeRequest.class, metaDataMap); - } - - public GrantRevokePrivilegeRequest() { - } - - public GrantRevokePrivilegeRequest( - GrantRevokeType requestType, - PrivilegeBag privileges) - { - this(); - this.requestType = requestType; - this.privileges = privileges; - } - - /** - * Performs a deep copy on other. - */ - public GrantRevokePrivilegeRequest(GrantRevokePrivilegeRequest other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetRequestType()) { - this.requestType = other.requestType; - } - if (other.isSetPrivileges()) { - this.privileges = new PrivilegeBag(other.privileges); - } - this.revokeGrantOption = other.revokeGrantOption; - } - - public GrantRevokePrivilegeRequest deepCopy() { - return new GrantRevokePrivilegeRequest(this); - } - - @Override - public void clear() { - this.requestType = null; - this.privileges = null; - setRevokeGrantOptionIsSet(false); - this.revokeGrantOption = false; - } - - /** - * - * @see GrantRevokeType - */ - public GrantRevokeType getRequestType() { - return this.requestType; - } - - /** - * - * @see GrantRevokeType - */ - public void setRequestType(GrantRevokeType requestType) { - this.requestType = requestType; - } - - public void unsetRequestType() { - this.requestType = null; - } - - /** Returns true if field requestType is set (has been assigned a value) and false otherwise */ - public boolean isSetRequestType() { - return this.requestType != null; - } - - public void setRequestTypeIsSet(boolean value) { - if (!value) { - this.requestType = null; - } - } - - public PrivilegeBag getPrivileges() { - return this.privileges; - } - - public void setPrivileges(PrivilegeBag privileges) { - this.privileges = privileges; - } - - public void unsetPrivileges() { - this.privileges = null; - } - - /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ - public boolean isSetPrivileges() { - return this.privileges != null; - } - - public void setPrivilegesIsSet(boolean value) { - if (!value) { - this.privileges = null; - } - } - - public boolean isRevokeGrantOption() { - return this.revokeGrantOption; - } - - public void setRevokeGrantOption(boolean revokeGrantOption) { - this.revokeGrantOption = revokeGrantOption; - setRevokeGrantOptionIsSet(true); - } - - public void unsetRevokeGrantOption() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REVOKEGRANTOPTION_ISSET_ID); - } - - /** Returns true if field revokeGrantOption is set (has been assigned a value) and false otherwise */ - public boolean isSetRevokeGrantOption() { - return EncodingUtils.testBit(__isset_bitfield, __REVOKEGRANTOPTION_ISSET_ID); - } - - public void setRevokeGrantOptionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REVOKEGRANTOPTION_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST_TYPE: - if (value == null) { - unsetRequestType(); - } else { - setRequestType((GrantRevokeType)value); - } - break; - - case PRIVILEGES: - if (value == null) { - unsetPrivileges(); - } else { - setPrivileges((PrivilegeBag)value); - } - break; - - case REVOKE_GRANT_OPTION: - if (value == null) { - unsetRevokeGrantOption(); - } else { - setRevokeGrantOption((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST_TYPE: - return getRequestType(); - - case PRIVILEGES: - return getPrivileges(); - - case REVOKE_GRANT_OPTION: - return isRevokeGrantOption(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST_TYPE: - return isSetRequestType(); - case PRIVILEGES: - return isSetPrivileges(); - case REVOKE_GRANT_OPTION: - return isSetRevokeGrantOption(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GrantRevokePrivilegeRequest) - return this.equals((GrantRevokePrivilegeRequest)that); - return false; - } - - public boolean equals(GrantRevokePrivilegeRequest that) { - if (that == null) - return false; - - boolean this_present_requestType = true && this.isSetRequestType(); - boolean that_present_requestType = true && that.isSetRequestType(); - if (this_present_requestType || that_present_requestType) { - if (!(this_present_requestType && that_present_requestType)) - return false; - if (!this.requestType.equals(that.requestType)) - return false; - } - - boolean this_present_privileges = true && this.isSetPrivileges(); - boolean that_present_privileges = true && that.isSetPrivileges(); - if (this_present_privileges || that_present_privileges) { - if (!(this_present_privileges && that_present_privileges)) - return false; - if (!this.privileges.equals(that.privileges)) - return false; - } - - boolean this_present_revokeGrantOption = true && this.isSetRevokeGrantOption(); - boolean that_present_revokeGrantOption = true && that.isSetRevokeGrantOption(); - if (this_present_revokeGrantOption || that_present_revokeGrantOption) { - if (!(this_present_revokeGrantOption && that_present_revokeGrantOption)) - return false; - if (this.revokeGrantOption != that.revokeGrantOption) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_requestType = true && (isSetRequestType()); - list.add(present_requestType); - if (present_requestType) - list.add(requestType.getValue()); - - boolean present_privileges = true && (isSetPrivileges()); - list.add(present_privileges); - if (present_privileges) - list.add(privileges); - - boolean present_revokeGrantOption = true && (isSetRevokeGrantOption()); - list.add(present_revokeGrantOption); - if (present_revokeGrantOption) - list.add(revokeGrantOption); - - return list.hashCode(); - } - - @Override - public int compareTo(GrantRevokePrivilegeRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequestType()).compareTo(other.isSetRequestType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequestType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestType, other.requestType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrivileges()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRevokeGrantOption()).compareTo(other.isSetRevokeGrantOption()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRevokeGrantOption()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.revokeGrantOption, other.revokeGrantOption); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GrantRevokePrivilegeRequest("); - boolean first = true; - - sb.append("requestType:"); - if (this.requestType == null) { - sb.append("null"); - } else { - sb.append(this.requestType); - } - first = false; - if (!first) sb.append(", "); - sb.append("privileges:"); - if (this.privileges == null) { - sb.append("null"); - } else { - sb.append(this.privileges); - } - first = false; - if (isSetRevokeGrantOption()) { - if (!first) sb.append(", "); - sb.append("revokeGrantOption:"); - sb.append(this.revokeGrantOption); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - // 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 GrantRevokePrivilegeRequestStandardSchemeFactory implements SchemeFactory { - public GrantRevokePrivilegeRequestStandardScheme getScheme() { - return new GrantRevokePrivilegeRequestStandardScheme(); - } - } - - private static class GrantRevokePrivilegeRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GrantRevokePrivilegeRequest 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: // REQUEST_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.requestType = org.apache.hadoop.hive.metastore.api.GrantRevokeType.findByValue(iprot.readI32()); - struct.setRequestTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // 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; - case 3: // REVOKE_GRANT_OPTION - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.revokeGrantOption = iprot.readBool(); - struct.setRevokeGrantOptionIsSet(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, GrantRevokePrivilegeRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.requestType != null) { - oprot.writeFieldBegin(REQUEST_TYPE_FIELD_DESC); - oprot.writeI32(struct.requestType.getValue()); - oprot.writeFieldEnd(); - } - if (struct.privileges != null) { - oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); - struct.privileges.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.isSetRevokeGrantOption()) { - oprot.writeFieldBegin(REVOKE_GRANT_OPTION_FIELD_DESC); - oprot.writeBool(struct.revokeGrantOption); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GrantRevokePrivilegeRequestTupleSchemeFactory implements SchemeFactory { - public GrantRevokePrivilegeRequestTupleScheme getScheme() { - return new GrantRevokePrivilegeRequestTupleScheme(); - } - } - - private static class GrantRevokePrivilegeRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GrantRevokePrivilegeRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequestType()) { - optionals.set(0); - } - if (struct.isSetPrivileges()) { - optionals.set(1); - } - if (struct.isSetRevokeGrantOption()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetRequestType()) { - oprot.writeI32(struct.requestType.getValue()); - } - if (struct.isSetPrivileges()) { - struct.privileges.write(oprot); - } - if (struct.isSetRevokeGrantOption()) { - oprot.writeBool(struct.revokeGrantOption); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GrantRevokePrivilegeRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.requestType = org.apache.hadoop.hive.metastore.api.GrantRevokeType.findByValue(iprot.readI32()); - struct.setRequestTypeIsSet(true); - } - if (incoming.get(1)) { - struct.privileges = new PrivilegeBag(); - struct.privileges.read(iprot); - struct.setPrivilegesIsSet(true); - } - if (incoming.get(2)) { - struct.revokeGrantOption = iprot.readBool(); - struct.setRevokeGrantOptionIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeResponse.java deleted file mode 100644 index ddbc4c3..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeResponse.java +++ /dev/null @@ -1,390 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GrantRevokePrivilegeResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GrantRevokePrivilegeResponse"); - - 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)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GrantRevokePrivilegeResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GrantRevokePrivilegeResponseTupleSchemeFactory()); - } - - private boolean success; // 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 { - SUCCESS((short)1, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.SUCCESS}; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GrantRevokePrivilegeResponse.class, metaDataMap); - } - - public GrantRevokePrivilegeResponse() { - } - - /** - * Performs a deep copy on other. - */ - public GrantRevokePrivilegeResponse(GrantRevokePrivilegeResponse other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - public GrantRevokePrivilegeResponse deepCopy() { - return new GrantRevokePrivilegeResponse(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GrantRevokePrivilegeResponse) - return this.equals((GrantRevokePrivilegeResponse)that); - return false; - } - - public boolean equals(GrantRevokePrivilegeResponse that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(GrantRevokePrivilegeResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GrantRevokePrivilegeResponse("); - boolean first = true; - - if (isSetSuccess()) { - sb.append("success:"); - sb.append(this.success); - 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 { - // 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 GrantRevokePrivilegeResponseStandardSchemeFactory implements SchemeFactory { - public GrantRevokePrivilegeResponseStandardScheme getScheme() { - return new GrantRevokePrivilegeResponseStandardScheme(); - } - } - - private static class GrantRevokePrivilegeResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GrantRevokePrivilegeResponse 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: // 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; - 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, GrantRevokePrivilegeResponse 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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GrantRevokePrivilegeResponseTupleSchemeFactory implements SchemeFactory { - public GrantRevokePrivilegeResponseTupleScheme getScheme() { - return new GrantRevokePrivilegeResponseTupleScheme(); - } - } - - private static class GrantRevokePrivilegeResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GrantRevokePrivilegeResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GrantRevokePrivilegeResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeRoleRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeRoleRequest.java deleted file mode 100644 index adbd345..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeRoleRequest.java +++ /dev/null @@ -1,1059 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GrantRevokeRoleRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GrantRevokeRoleRequest"); - - private static final org.apache.thrift.protocol.TField REQUEST_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("requestType", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principalName", org.apache.thrift.protocol.TType.STRING, (short)3); - 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)4); - private static final org.apache.thrift.protocol.TField GRANTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("grantor", org.apache.thrift.protocol.TType.STRING, (short)5); - 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)6); - 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)7); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GrantRevokeRoleRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GrantRevokeRoleRequestTupleSchemeFactory()); - } - - private GrantRevokeType requestType; // required - private String roleName; // required - private String principalName; // required - private PrincipalType principalType; // required - private String grantor; // optional - private PrincipalType grantorType; // optional - private boolean grantOption; // 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 { - /** - * - * @see GrantRevokeType - */ - REQUEST_TYPE((short)1, "requestType"), - ROLE_NAME((short)2, "roleName"), - PRINCIPAL_NAME((short)3, "principalName"), - /** - * - * @see PrincipalType - */ - PRINCIPAL_TYPE((short)4, "principalType"), - GRANTOR((short)5, "grantor"), - /** - * - * @see PrincipalType - */ - GRANTOR_TYPE((short)6, "grantorType"), - GRANT_OPTION((short)7, "grantOption"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST_TYPE - return REQUEST_TYPE; - case 2: // ROLE_NAME - return ROLE_NAME; - case 3: // PRINCIPAL_NAME - return PRINCIPAL_NAME; - case 4: // PRINCIPAL_TYPE - return PRINCIPAL_TYPE; - case 5: // GRANTOR - return GRANTOR; - case 6: // GRANTOR_TYPE - return GRANTOR_TYPE; - case 7: // GRANT_OPTION - return GRANT_OPTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __GRANTOPTION_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.GRANTOR,_Fields.GRANTOR_TYPE,_Fields.GRANT_OPTION}; - 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); - tmpMap.put(_Fields.REQUEST_TYPE, new org.apache.thrift.meta_data.FieldMetaData("requestType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GrantRevokeType.class))); - tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principalName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principalType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - tmpMap.put(_Fields.GRANTOR, new org.apache.thrift.meta_data.FieldMetaData("grantor", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GRANTOR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("grantorType", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - tmpMap.put(_Fields.GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("grantOption", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GrantRevokeRoleRequest.class, metaDataMap); - } - - public GrantRevokeRoleRequest() { - } - - public GrantRevokeRoleRequest( - GrantRevokeType requestType, - String roleName, - String principalName, - PrincipalType principalType) - { - this(); - this.requestType = requestType; - this.roleName = roleName; - this.principalName = principalName; - this.principalType = principalType; - } - - /** - * Performs a deep copy on other. - */ - public GrantRevokeRoleRequest(GrantRevokeRoleRequest other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetRequestType()) { - this.requestType = other.requestType; - } - if (other.isSetRoleName()) { - this.roleName = other.roleName; - } - if (other.isSetPrincipalName()) { - this.principalName = other.principalName; - } - if (other.isSetPrincipalType()) { - this.principalType = other.principalType; - } - if (other.isSetGrantor()) { - this.grantor = other.grantor; - } - if (other.isSetGrantorType()) { - this.grantorType = other.grantorType; - } - this.grantOption = other.grantOption; - } - - public GrantRevokeRoleRequest deepCopy() { - return new GrantRevokeRoleRequest(this); - } - - @Override - public void clear() { - this.requestType = null; - this.roleName = null; - this.principalName = null; - this.principalType = null; - this.grantor = null; - this.grantorType = null; - setGrantOptionIsSet(false); - this.grantOption = false; - } - - /** - * - * @see GrantRevokeType - */ - public GrantRevokeType getRequestType() { - return this.requestType; - } - - /** - * - * @see GrantRevokeType - */ - public void setRequestType(GrantRevokeType requestType) { - this.requestType = requestType; - } - - public void unsetRequestType() { - this.requestType = null; - } - - /** Returns true if field requestType is set (has been assigned a value) and false otherwise */ - public boolean isSetRequestType() { - return this.requestType != null; - } - - public void setRequestTypeIsSet(boolean value) { - if (!value) { - this.requestType = null; - } - } - - public String getRoleName() { - return this.roleName; - } - - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - public void unsetRoleName() { - this.roleName = null; - } - - /** Returns true if field roleName is set (has been assigned a value) and false otherwise */ - public boolean isSetRoleName() { - return this.roleName != null; - } - - public void setRoleNameIsSet(boolean value) { - if (!value) { - this.roleName = null; - } - } - - public String getPrincipalName() { - return this.principalName; - } - - public void setPrincipalName(String principalName) { - this.principalName = principalName; - } - - public void unsetPrincipalName() { - this.principalName = null; - } - - /** Returns true if field principalName is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipalName() { - return this.principalName != null; - } - - public void setPrincipalNameIsSet(boolean value) { - if (!value) { - this.principalName = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getPrincipalType() { - return this.principalType; - } - - /** - * - * @see PrincipalType - */ - public void setPrincipalType(PrincipalType principalType) { - this.principalType = principalType; - } - - public void unsetPrincipalType() { - this.principalType = null; - } - - /** Returns true if field principalType is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipalType() { - return this.principalType != null; - } - - public void setPrincipalTypeIsSet(boolean value) { - if (!value) { - this.principalType = null; - } - } - - public String getGrantor() { - return this.grantor; - } - - public void setGrantor(String grantor) { - this.grantor = grantor; - } - - public void unsetGrantor() { - this.grantor = null; - } - - /** Returns true if field grantor is set (has been assigned a value) and false otherwise */ - public boolean isSetGrantor() { - return this.grantor != null; - } - - public void setGrantorIsSet(boolean value) { - if (!value) { - this.grantor = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getGrantorType() { - return this.grantorType; - } - - /** - * - * @see PrincipalType - */ - public void setGrantorType(PrincipalType grantorType) { - this.grantorType = grantorType; - } - - public void unsetGrantorType() { - this.grantorType = null; - } - - /** Returns true if field grantorType is set (has been assigned a value) and false otherwise */ - public boolean isSetGrantorType() { - return this.grantorType != null; - } - - public void setGrantorTypeIsSet(boolean value) { - if (!value) { - this.grantorType = null; - } - } - - public boolean isGrantOption() { - return this.grantOption; - } - - public void setGrantOption(boolean grantOption) { - this.grantOption = grantOption; - setGrantOptionIsSet(true); - } - - public void unsetGrantOption() { - __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 EncodingUtils.testBit(__isset_bitfield, __GRANTOPTION_ISSET_ID); - } - - public void setGrantOptionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANTOPTION_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST_TYPE: - if (value == null) { - unsetRequestType(); - } else { - setRequestType((GrantRevokeType)value); - } - break; - - case ROLE_NAME: - if (value == null) { - unsetRoleName(); - } else { - setRoleName((String)value); - } - break; - - case PRINCIPAL_NAME: - if (value == null) { - unsetPrincipalName(); - } else { - setPrincipalName((String)value); - } - break; - - case PRINCIPAL_TYPE: - if (value == null) { - unsetPrincipalType(); - } else { - setPrincipalType((PrincipalType)value); - } - break; - - case GRANTOR: - if (value == null) { - unsetGrantor(); - } else { - setGrantor((String)value); - } - break; - - case GRANTOR_TYPE: - if (value == null) { - unsetGrantorType(); - } else { - setGrantorType((PrincipalType)value); - } - break; - - case GRANT_OPTION: - if (value == null) { - unsetGrantOption(); - } else { - setGrantOption((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST_TYPE: - return getRequestType(); - - case ROLE_NAME: - return getRoleName(); - - case PRINCIPAL_NAME: - return getPrincipalName(); - - case PRINCIPAL_TYPE: - return getPrincipalType(); - - case GRANTOR: - return getGrantor(); - - case GRANTOR_TYPE: - return getGrantorType(); - - case GRANT_OPTION: - return isGrantOption(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST_TYPE: - return isSetRequestType(); - case ROLE_NAME: - return isSetRoleName(); - case PRINCIPAL_NAME: - return isSetPrincipalName(); - case PRINCIPAL_TYPE: - return isSetPrincipalType(); - case GRANTOR: - return isSetGrantor(); - case GRANTOR_TYPE: - return isSetGrantorType(); - case GRANT_OPTION: - return isSetGrantOption(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GrantRevokeRoleRequest) - return this.equals((GrantRevokeRoleRequest)that); - return false; - } - - public boolean equals(GrantRevokeRoleRequest that) { - if (that == null) - return false; - - boolean this_present_requestType = true && this.isSetRequestType(); - boolean that_present_requestType = true && that.isSetRequestType(); - if (this_present_requestType || that_present_requestType) { - if (!(this_present_requestType && that_present_requestType)) - return false; - if (!this.requestType.equals(that.requestType)) - return false; - } - - boolean this_present_roleName = true && this.isSetRoleName(); - boolean that_present_roleName = true && that.isSetRoleName(); - if (this_present_roleName || that_present_roleName) { - if (!(this_present_roleName && that_present_roleName)) - return false; - if (!this.roleName.equals(that.roleName)) - return false; - } - - boolean this_present_principalName = true && this.isSetPrincipalName(); - boolean that_present_principalName = true && that.isSetPrincipalName(); - if (this_present_principalName || that_present_principalName) { - if (!(this_present_principalName && that_present_principalName)) - return false; - if (!this.principalName.equals(that.principalName)) - return false; - } - - boolean this_present_principalType = true && this.isSetPrincipalType(); - boolean that_present_principalType = true && that.isSetPrincipalType(); - if (this_present_principalType || that_present_principalType) { - if (!(this_present_principalType && that_present_principalType)) - return false; - if (!this.principalType.equals(that.principalType)) - return false; - } - - boolean this_present_grantor = true && this.isSetGrantor(); - boolean that_present_grantor = true && that.isSetGrantor(); - if (this_present_grantor || that_present_grantor) { - if (!(this_present_grantor && that_present_grantor)) - return false; - if (!this.grantor.equals(that.grantor)) - return false; - } - - boolean this_present_grantorType = true && this.isSetGrantorType(); - boolean that_present_grantorType = true && that.isSetGrantorType(); - if (this_present_grantorType || that_present_grantorType) { - if (!(this_present_grantorType && that_present_grantorType)) - return false; - if (!this.grantorType.equals(that.grantorType)) - return false; - } - - boolean this_present_grantOption = true && this.isSetGrantOption(); - boolean that_present_grantOption = true && that.isSetGrantOption(); - if (this_present_grantOption || that_present_grantOption) { - if (!(this_present_grantOption && that_present_grantOption)) - return false; - if (this.grantOption != that.grantOption) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_requestType = true && (isSetRequestType()); - list.add(present_requestType); - if (present_requestType) - list.add(requestType.getValue()); - - boolean present_roleName = true && (isSetRoleName()); - list.add(present_roleName); - if (present_roleName) - list.add(roleName); - - boolean present_principalName = true && (isSetPrincipalName()); - list.add(present_principalName); - if (present_principalName) - list.add(principalName); - - boolean present_principalType = true && (isSetPrincipalType()); - list.add(present_principalType); - if (present_principalType) - list.add(principalType.getValue()); - - boolean present_grantor = true && (isSetGrantor()); - list.add(present_grantor); - if (present_grantor) - list.add(grantor); - - boolean present_grantorType = true && (isSetGrantorType()); - list.add(present_grantorType); - if (present_grantorType) - list.add(grantorType.getValue()); - - boolean present_grantOption = true && (isSetGrantOption()); - list.add(present_grantOption); - if (present_grantOption) - list.add(grantOption); - - return list.hashCode(); - } - - @Override - public int compareTo(GrantRevokeRoleRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequestType()).compareTo(other.isSetRequestType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequestType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestType, other.requestType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRoleName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipalName()).compareTo(other.isSetPrincipalName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipalName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalName, other.principalName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipalType()).compareTo(other.isSetPrincipalType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipalType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalType, other.principalType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(other.isSetGrantor()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantor()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantor, other.grantor); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantorType()).compareTo(other.isSetGrantorType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantorType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorType, other.grantorType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantOption()).compareTo(other.isSetGrantOption()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantOption()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantOption, other.grantOption); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GrantRevokeRoleRequest("); - boolean first = true; - - sb.append("requestType:"); - if (this.requestType == null) { - sb.append("null"); - } else { - sb.append(this.requestType); - } - first = false; - if (!first) sb.append(", "); - sb.append("roleName:"); - if (this.roleName == null) { - sb.append("null"); - } else { - sb.append(this.roleName); - } - first = false; - if (!first) sb.append(", "); - sb.append("principalName:"); - if (this.principalName == null) { - sb.append("null"); - } else { - sb.append(this.principalName); - } - first = false; - if (!first) sb.append(", "); - sb.append("principalType:"); - if (this.principalType == null) { - sb.append("null"); - } else { - sb.append(this.principalType); - } - first = false; - if (isSetGrantor()) { - if (!first) sb.append(", "); - sb.append("grantor:"); - if (this.grantor == null) { - sb.append("null"); - } else { - sb.append(this.grantor); - } - first = false; - } - if (isSetGrantorType()) { - if (!first) sb.append(", "); - sb.append("grantorType:"); - if (this.grantorType == null) { - sb.append("null"); - } else { - sb.append(this.grantorType); - } - first = false; - } - if (isSetGrantOption()) { - if (!first) sb.append(", "); - sb.append("grantOption:"); - sb.append(this.grantOption); - 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 { - // 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 GrantRevokeRoleRequestStandardSchemeFactory implements SchemeFactory { - public GrantRevokeRoleRequestStandardScheme getScheme() { - return new GrantRevokeRoleRequestStandardScheme(); - } - } - - private static class GrantRevokeRoleRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GrantRevokeRoleRequest 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: // REQUEST_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.requestType = org.apache.hadoop.hive.metastore.api.GrantRevokeType.findByValue(iprot.readI32()); - struct.setRequestTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // 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 3: // 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 4: // PRINCIPAL_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.principalType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setPrincipalTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // 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 6: // GRANTOR_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.grantorType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setGrantorTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // 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, GrantRevokeRoleRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.requestType != null) { - oprot.writeFieldBegin(REQUEST_TYPE_FIELD_DESC); - oprot.writeI32(struct.requestType.getValue()); - oprot.writeFieldEnd(); - } - if (struct.roleName != null) { - oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); - oprot.writeString(struct.roleName); - 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.grantor != null) { - if (struct.isSetGrantor()) { - oprot.writeFieldBegin(GRANTOR_FIELD_DESC); - oprot.writeString(struct.grantor); - oprot.writeFieldEnd(); - } - } - if (struct.grantorType != null) { - if (struct.isSetGrantorType()) { - oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); - oprot.writeI32(struct.grantorType.getValue()); - oprot.writeFieldEnd(); - } - } - if (struct.isSetGrantOption()) { - oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); - oprot.writeBool(struct.grantOption); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GrantRevokeRoleRequestTupleSchemeFactory implements SchemeFactory { - public GrantRevokeRoleRequestTupleScheme getScheme() { - return new GrantRevokeRoleRequestTupleScheme(); - } - } - - private static class GrantRevokeRoleRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GrantRevokeRoleRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequestType()) { - optionals.set(0); - } - if (struct.isSetRoleName()) { - optionals.set(1); - } - if (struct.isSetPrincipalName()) { - optionals.set(2); - } - if (struct.isSetPrincipalType()) { - optionals.set(3); - } - if (struct.isSetGrantor()) { - optionals.set(4); - } - if (struct.isSetGrantorType()) { - optionals.set(5); - } - if (struct.isSetGrantOption()) { - optionals.set(6); - } - oprot.writeBitSet(optionals, 7); - if (struct.isSetRequestType()) { - oprot.writeI32(struct.requestType.getValue()); - } - if (struct.isSetRoleName()) { - oprot.writeString(struct.roleName); - } - if (struct.isSetPrincipalName()) { - oprot.writeString(struct.principalName); - } - if (struct.isSetPrincipalType()) { - oprot.writeI32(struct.principalType.getValue()); - } - 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, GrantRevokeRoleRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(7); - if (incoming.get(0)) { - struct.requestType = org.apache.hadoop.hive.metastore.api.GrantRevokeType.findByValue(iprot.readI32()); - struct.setRequestTypeIsSet(true); - } - if (incoming.get(1)) { - struct.roleName = iprot.readString(); - struct.setRoleNameIsSet(true); - } - if (incoming.get(2)) { - struct.principalName = iprot.readString(); - struct.setPrincipalNameIsSet(true); - } - if (incoming.get(3)) { - struct.principalType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setPrincipalTypeIsSet(true); - } - if (incoming.get(4)) { - struct.grantor = iprot.readString(); - struct.setGrantorIsSet(true); - } - if (incoming.get(5)) { - struct.grantorType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setGrantorTypeIsSet(true); - } - if (incoming.get(6)) { - struct.grantOption = iprot.readBool(); - struct.setGrantOptionIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeRoleResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeRoleResponse.java deleted file mode 100644 index 541ac21..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeRoleResponse.java +++ /dev/null @@ -1,390 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GrantRevokeRoleResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GrantRevokeRoleResponse"); - - 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)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GrantRevokeRoleResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GrantRevokeRoleResponseTupleSchemeFactory()); - } - - private boolean success; // 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 { - SUCCESS((short)1, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.SUCCESS}; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GrantRevokeRoleResponse.class, metaDataMap); - } - - public GrantRevokeRoleResponse() { - } - - /** - * Performs a deep copy on other. - */ - public GrantRevokeRoleResponse(GrantRevokeRoleResponse other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - public GrantRevokeRoleResponse deepCopy() { - return new GrantRevokeRoleResponse(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GrantRevokeRoleResponse) - return this.equals((GrantRevokeRoleResponse)that); - return false; - } - - public boolean equals(GrantRevokeRoleResponse that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(GrantRevokeRoleResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("GrantRevokeRoleResponse("); - boolean first = true; - - if (isSetSuccess()) { - sb.append("success:"); - sb.append(this.success); - 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 { - // 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 GrantRevokeRoleResponseStandardSchemeFactory implements SchemeFactory { - public GrantRevokeRoleResponseStandardScheme getScheme() { - return new GrantRevokeRoleResponseStandardScheme(); - } - } - - private static class GrantRevokeRoleResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GrantRevokeRoleResponse 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: // 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; - 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, GrantRevokeRoleResponse 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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GrantRevokeRoleResponseTupleSchemeFactory implements SchemeFactory { - public GrantRevokeRoleResponseTupleScheme getScheme() { - return new GrantRevokeRoleResponseTupleScheme(); - } - } - - private static class GrantRevokeRoleResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GrantRevokeRoleResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GrantRevokeRoleResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeType.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeType.java deleted file mode 100644 index ac65ec7..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeType.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum GrantRevokeType implements org.apache.thrift.TEnum { - GRANT(1), - REVOKE(2); - - private final int value; - - private GrantRevokeType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static GrantRevokeType findByValue(int value) { - switch (value) { - case 1: - return GRANT; - case 2: - return REVOKE; - default: - return null; - } - } -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatRequest.java deleted file mode 100644 index 0d36f22..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatRequest.java +++ /dev/null @@ -1,489 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class HeartbeatRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HeartbeatRequest"); - - private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new HeartbeatRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new HeartbeatRequestTupleSchemeFactory()); - } - - private long lockid; // optional - private long txnid; // 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 { - LOCKID((short)1, "lockid"), - TXNID((short)2, "txnid"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // LOCKID - return LOCKID; - case 2: // TXNID - return TXNID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __LOCKID_ISSET_ID = 0; - private static final int __TXNID_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.LOCKID,_Fields.TXNID}; - 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); - tmpMap.put(_Fields.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HeartbeatRequest.class, metaDataMap); - } - - public HeartbeatRequest() { - } - - /** - * Performs a deep copy on other. - */ - public HeartbeatRequest(HeartbeatRequest other) { - __isset_bitfield = other.__isset_bitfield; - this.lockid = other.lockid; - this.txnid = other.txnid; - } - - public HeartbeatRequest deepCopy() { - return new HeartbeatRequest(this); - } - - @Override - public void clear() { - setLockidIsSet(false); - this.lockid = 0; - setTxnidIsSet(false); - this.txnid = 0; - } - - public long getLockid() { - return this.lockid; - } - - public void setLockid(long lockid) { - this.lockid = lockid; - setLockidIsSet(true); - } - - public void unsetLockid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKID_ISSET_ID); - } - - /** Returns true if field lockid is set (has been assigned a value) and false otherwise */ - public boolean isSetLockid() { - return EncodingUtils.testBit(__isset_bitfield, __LOCKID_ISSET_ID); - } - - public void setLockidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value); - } - - public long getTxnid() { - return this.txnid; - } - - public void setTxnid(long txnid) { - this.txnid = txnid; - setTxnidIsSet(true); - } - - public void unsetTxnid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ - public boolean isSetTxnid() { - return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - public void setTxnidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LOCKID: - if (value == null) { - unsetLockid(); - } else { - setLockid((Long)value); - } - break; - - case TXNID: - if (value == null) { - unsetTxnid(); - } else { - setTxnid((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LOCKID: - return getLockid(); - - case TXNID: - return getTxnid(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LOCKID: - return isSetLockid(); - case TXNID: - return isSetTxnid(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof HeartbeatRequest) - return this.equals((HeartbeatRequest)that); - return false; - } - - public boolean equals(HeartbeatRequest that) { - if (that == null) - return false; - - boolean this_present_lockid = true && this.isSetLockid(); - boolean that_present_lockid = true && that.isSetLockid(); - if (this_present_lockid || that_present_lockid) { - if (!(this_present_lockid && that_present_lockid)) - return false; - if (this.lockid != that.lockid) - return false; - } - - boolean this_present_txnid = true && this.isSetTxnid(); - boolean that_present_txnid = true && that.isSetTxnid(); - if (this_present_txnid || that_present_txnid) { - if (!(this_present_txnid && that_present_txnid)) - return false; - if (this.txnid != that.txnid) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_lockid = true && (isSetLockid()); - list.add(present_lockid); - if (present_lockid) - list.add(lockid); - - boolean present_txnid = true && (isSetTxnid()); - list.add(present_txnid); - if (present_txnid) - list.add(txnid); - - return list.hashCode(); - } - - @Override - public int compareTo(HeartbeatRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLockid()).compareTo(other.isSetLockid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLockid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, other.lockid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTxnid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("HeartbeatRequest("); - boolean first = true; - - if (isSetLockid()) { - sb.append("lockid:"); - sb.append(this.lockid); - first = false; - } - if (isSetTxnid()) { - if (!first) sb.append(", "); - sb.append("txnid:"); - sb.append(this.txnid); - 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 { - // 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 HeartbeatRequestStandardSchemeFactory implements SchemeFactory { - public HeartbeatRequestStandardScheme getScheme() { - return new HeartbeatRequestStandardScheme(); - } - } - - private static class HeartbeatRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, HeartbeatRequest 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: // LOCKID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.lockid = iprot.readI64(); - struct.setLockidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TXNID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(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, HeartbeatRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetLockid()) { - oprot.writeFieldBegin(LOCKID_FIELD_DESC); - oprot.writeI64(struct.lockid); - oprot.writeFieldEnd(); - } - if (struct.isSetTxnid()) { - oprot.writeFieldBegin(TXNID_FIELD_DESC); - oprot.writeI64(struct.txnid); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class HeartbeatRequestTupleSchemeFactory implements SchemeFactory { - public HeartbeatRequestTupleScheme getScheme() { - return new HeartbeatRequestTupleScheme(); - } - } - - private static class HeartbeatRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, HeartbeatRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetLockid()) { - optionals.set(0); - } - if (struct.isSetTxnid()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetLockid()) { - oprot.writeI64(struct.lockid); - } - if (struct.isSetTxnid()) { - oprot.writeI64(struct.txnid); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.lockid = iprot.readI64(); - struct.setLockidIsSet(true); - } - if (incoming.get(1)) { - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeRequest.java deleted file mode 100644 index f15d7a9..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeRequest.java +++ /dev/null @@ -1,482 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class HeartbeatTxnRangeRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HeartbeatTxnRangeRequest"); - - private static final org.apache.thrift.protocol.TField MIN_FIELD_DESC = new org.apache.thrift.protocol.TField("min", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField MAX_FIELD_DESC = new org.apache.thrift.protocol.TField("max", org.apache.thrift.protocol.TType.I64, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new HeartbeatTxnRangeRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new HeartbeatTxnRangeRequestTupleSchemeFactory()); - } - - private long min; // required - private long max; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MIN((short)1, "min"), - MAX((short)2, "max"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MIN - return MIN; - case 2: // MAX - return MAX; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MIN_ISSET_ID = 0; - private static final int __MAX_ISSET_ID = 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); - tmpMap.put(_Fields.MIN, new org.apache.thrift.meta_data.FieldMetaData("min", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.MAX, new org.apache.thrift.meta_data.FieldMetaData("max", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HeartbeatTxnRangeRequest.class, metaDataMap); - } - - public HeartbeatTxnRangeRequest() { - } - - public HeartbeatTxnRangeRequest( - long min, - long max) - { - this(); - this.min = min; - setMinIsSet(true); - this.max = max; - setMaxIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public HeartbeatTxnRangeRequest(HeartbeatTxnRangeRequest other) { - __isset_bitfield = other.__isset_bitfield; - this.min = other.min; - this.max = other.max; - } - - public HeartbeatTxnRangeRequest deepCopy() { - return new HeartbeatTxnRangeRequest(this); - } - - @Override - public void clear() { - setMinIsSet(false); - this.min = 0; - setMaxIsSet(false); - this.max = 0; - } - - public long getMin() { - return this.min; - } - - public void setMin(long min) { - this.min = min; - setMinIsSet(true); - } - - public void unsetMin() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MIN_ISSET_ID); - } - - /** Returns true if field min is set (has been assigned a value) and false otherwise */ - public boolean isSetMin() { - return EncodingUtils.testBit(__isset_bitfield, __MIN_ISSET_ID); - } - - public void setMinIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MIN_ISSET_ID, value); - } - - public long getMax() { - return this.max; - } - - public void setMax(long max) { - this.max = max; - setMaxIsSet(true); - } - - public void unsetMax() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_ISSET_ID); - } - - /** Returns true if field max is set (has been assigned a value) and false otherwise */ - public boolean isSetMax() { - return EncodingUtils.testBit(__isset_bitfield, __MAX_ISSET_ID); - } - - public void setMaxIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MIN: - if (value == null) { - unsetMin(); - } else { - setMin((Long)value); - } - break; - - case MAX: - if (value == null) { - unsetMax(); - } else { - setMax((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MIN: - return getMin(); - - case MAX: - return getMax(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MIN: - return isSetMin(); - case MAX: - return isSetMax(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof HeartbeatTxnRangeRequest) - return this.equals((HeartbeatTxnRangeRequest)that); - return false; - } - - public boolean equals(HeartbeatTxnRangeRequest that) { - if (that == null) - return false; - - boolean this_present_min = true; - boolean that_present_min = true; - if (this_present_min || that_present_min) { - if (!(this_present_min && that_present_min)) - return false; - if (this.min != that.min) - return false; - } - - boolean this_present_max = true; - boolean that_present_max = true; - if (this_present_max || that_present_max) { - if (!(this_present_max && that_present_max)) - return false; - if (this.max != that.max) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_min = true; - list.add(present_min); - if (present_min) - list.add(min); - - boolean present_max = true; - list.add(present_max); - if (present_max) - list.add(max); - - return list.hashCode(); - } - - @Override - public int compareTo(HeartbeatTxnRangeRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMin()).compareTo(other.isSetMin()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMin()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.min, other.min); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax()).compareTo(other.isSetMax()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max, other.max); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("HeartbeatTxnRangeRequest("); - boolean first = true; - - sb.append("min:"); - sb.append(this.min); - first = false; - if (!first) sb.append(", "); - sb.append("max:"); - sb.append(this.max); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetMin()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'min' is unset! Struct:" + toString()); - } - - if (!isSetMax()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'max' is unset! Struct:" + toString()); - } - - // 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 { - // 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 HeartbeatTxnRangeRequestStandardSchemeFactory implements SchemeFactory { - public HeartbeatTxnRangeRequestStandardScheme getScheme() { - return new HeartbeatTxnRangeRequestStandardScheme(); - } - } - - private static class HeartbeatTxnRangeRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, HeartbeatTxnRangeRequest 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: // MIN - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.min = iprot.readI64(); - struct.setMinIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // MAX - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.max = iprot.readI64(); - struct.setMaxIsSet(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, HeartbeatTxnRangeRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(MIN_FIELD_DESC); - oprot.writeI64(struct.min); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MAX_FIELD_DESC); - oprot.writeI64(struct.max); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class HeartbeatTxnRangeRequestTupleSchemeFactory implements SchemeFactory { - public HeartbeatTxnRangeRequestTupleScheme getScheme() { - return new HeartbeatTxnRangeRequestTupleScheme(); - } - } - - private static class HeartbeatTxnRangeRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.min); - oprot.writeI64(struct.max); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.min = iprot.readI64(); - struct.setMinIsSet(true); - struct.max = iprot.readI64(); - struct.setMaxIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java deleted file mode 100644 index a33210d..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java +++ /dev/null @@ -1,588 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class HeartbeatTxnRangeResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HeartbeatTxnRangeResponse"); - - private static final org.apache.thrift.protocol.TField ABORTED_FIELD_DESC = new org.apache.thrift.protocol.TField("aborted", org.apache.thrift.protocol.TType.SET, (short)1); - private static final org.apache.thrift.protocol.TField NOSUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("nosuch", org.apache.thrift.protocol.TType.SET, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new HeartbeatTxnRangeResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new HeartbeatTxnRangeResponseTupleSchemeFactory()); - } - - private Set aborted; // required - private Set nosuch; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ABORTED((short)1, "aborted"), - NOSUCH((short)2, "nosuch"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ABORTED - return ABORTED; - case 2: // NOSUCH - return NOSUCH; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.ABORTED, new org.apache.thrift.meta_data.FieldMetaData("aborted", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - tmpMap.put(_Fields.NOSUCH, new org.apache.thrift.meta_data.FieldMetaData("nosuch", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HeartbeatTxnRangeResponse.class, metaDataMap); - } - - public HeartbeatTxnRangeResponse() { - } - - public HeartbeatTxnRangeResponse( - Set aborted, - Set nosuch) - { - this(); - this.aborted = aborted; - this.nosuch = nosuch; - } - - /** - * Performs a deep copy on other. - */ - public HeartbeatTxnRangeResponse(HeartbeatTxnRangeResponse other) { - if (other.isSetAborted()) { - Set __this__aborted = new HashSet(other.aborted); - this.aborted = __this__aborted; - } - if (other.isSetNosuch()) { - Set __this__nosuch = new HashSet(other.nosuch); - this.nosuch = __this__nosuch; - } - } - - public HeartbeatTxnRangeResponse deepCopy() { - return new HeartbeatTxnRangeResponse(this); - } - - @Override - public void clear() { - this.aborted = null; - this.nosuch = null; - } - - public int getAbortedSize() { - return (this.aborted == null) ? 0 : this.aborted.size(); - } - - public java.util.Iterator getAbortedIterator() { - return (this.aborted == null) ? null : this.aborted.iterator(); - } - - public void addToAborted(long elem) { - if (this.aborted == null) { - this.aborted = new HashSet(); - } - this.aborted.add(elem); - } - - public Set getAborted() { - return this.aborted; - } - - public void setAborted(Set aborted) { - this.aborted = aborted; - } - - public void unsetAborted() { - this.aborted = null; - } - - /** Returns true if field aborted is set (has been assigned a value) and false otherwise */ - public boolean isSetAborted() { - return this.aborted != null; - } - - public void setAbortedIsSet(boolean value) { - if (!value) { - this.aborted = null; - } - } - - public int getNosuchSize() { - return (this.nosuch == null) ? 0 : this.nosuch.size(); - } - - public java.util.Iterator getNosuchIterator() { - return (this.nosuch == null) ? null : this.nosuch.iterator(); - } - - public void addToNosuch(long elem) { - if (this.nosuch == null) { - this.nosuch = new HashSet(); - } - this.nosuch.add(elem); - } - - public Set getNosuch() { - return this.nosuch; - } - - public void setNosuch(Set nosuch) { - this.nosuch = nosuch; - } - - public void unsetNosuch() { - this.nosuch = null; - } - - /** Returns true if field nosuch is set (has been assigned a value) and false otherwise */ - public boolean isSetNosuch() { - return this.nosuch != null; - } - - public void setNosuchIsSet(boolean value) { - if (!value) { - this.nosuch = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ABORTED: - if (value == null) { - unsetAborted(); - } else { - setAborted((Set)value); - } - break; - - case NOSUCH: - if (value == null) { - unsetNosuch(); - } else { - setNosuch((Set)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ABORTED: - return getAborted(); - - case NOSUCH: - return getNosuch(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ABORTED: - return isSetAborted(); - case NOSUCH: - return isSetNosuch(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof HeartbeatTxnRangeResponse) - return this.equals((HeartbeatTxnRangeResponse)that); - return false; - } - - public boolean equals(HeartbeatTxnRangeResponse that) { - if (that == null) - return false; - - boolean this_present_aborted = true && this.isSetAborted(); - boolean that_present_aborted = true && that.isSetAborted(); - if (this_present_aborted || that_present_aborted) { - if (!(this_present_aborted && that_present_aborted)) - return false; - if (!this.aborted.equals(that.aborted)) - return false; - } - - boolean this_present_nosuch = true && this.isSetNosuch(); - boolean that_present_nosuch = true && that.isSetNosuch(); - if (this_present_nosuch || that_present_nosuch) { - if (!(this_present_nosuch && that_present_nosuch)) - return false; - if (!this.nosuch.equals(that.nosuch)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_aborted = true && (isSetAborted()); - list.add(present_aborted); - if (present_aborted) - list.add(aborted); - - boolean present_nosuch = true && (isSetNosuch()); - list.add(present_nosuch); - if (present_nosuch) - list.add(nosuch); - - return list.hashCode(); - } - - @Override - public int compareTo(HeartbeatTxnRangeResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetAborted()).compareTo(other.isSetAborted()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAborted()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aborted, other.aborted); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNosuch()).compareTo(other.isSetNosuch()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNosuch()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nosuch, other.nosuch); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("HeartbeatTxnRangeResponse("); - boolean first = true; - - sb.append("aborted:"); - if (this.aborted == null) { - sb.append("null"); - } else { - sb.append(this.aborted); - } - first = false; - if (!first) sb.append(", "); - sb.append("nosuch:"); - if (this.nosuch == null) { - sb.append("null"); - } else { - sb.append(this.nosuch); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetAborted()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'aborted' is unset! Struct:" + toString()); - } - - if (!isSetNosuch()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'nosuch' is unset! Struct:" + toString()); - } - - // 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 HeartbeatTxnRangeResponseStandardSchemeFactory implements SchemeFactory { - public HeartbeatTxnRangeResponseStandardScheme getScheme() { - return new HeartbeatTxnRangeResponseStandardScheme(); - } - } - - private static class HeartbeatTxnRangeResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, HeartbeatTxnRangeResponse 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: // ABORTED - if (schemeField.type == org.apache.thrift.protocol.TType.SET) { - { - org.apache.thrift.protocol.TSet _set540 = iprot.readSetBegin(); - struct.aborted = new HashSet(2*_set540.size); - long _elem541; - for (int _i542 = 0; _i542 < _set540.size; ++_i542) - { - _elem541 = iprot.readI64(); - struct.aborted.add(_elem541); - } - iprot.readSetEnd(); - } - struct.setAbortedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // NOSUCH - if (schemeField.type == org.apache.thrift.protocol.TType.SET) { - { - org.apache.thrift.protocol.TSet _set543 = iprot.readSetBegin(); - struct.nosuch = new HashSet(2*_set543.size); - long _elem544; - for (int _i545 = 0; _i545 < _set543.size; ++_i545) - { - _elem544 = iprot.readI64(); - struct.nosuch.add(_elem544); - } - iprot.readSetEnd(); - } - struct.setNosuchIsSet(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, HeartbeatTxnRangeResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.aborted != null) { - oprot.writeFieldBegin(ABORTED_FIELD_DESC); - { - oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.aborted.size())); - for (long _iter546 : struct.aborted) - { - oprot.writeI64(_iter546); - } - oprot.writeSetEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.nosuch != null) { - oprot.writeFieldBegin(NOSUCH_FIELD_DESC); - { - oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.nosuch.size())); - for (long _iter547 : struct.nosuch) - { - oprot.writeI64(_iter547); - } - oprot.writeSetEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class HeartbeatTxnRangeResponseTupleSchemeFactory implements SchemeFactory { - public HeartbeatTxnRangeResponseTupleScheme getScheme() { - return new HeartbeatTxnRangeResponseTupleScheme(); - } - } - - private static class HeartbeatTxnRangeResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.aborted.size()); - for (long _iter548 : struct.aborted) - { - oprot.writeI64(_iter548); - } - } - { - oprot.writeI32(struct.nosuch.size()); - for (long _iter549 : struct.nosuch) - { - oprot.writeI64(_iter549); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TSet _set550 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.aborted = new HashSet(2*_set550.size); - long _elem551; - for (int _i552 = 0; _i552 < _set550.size; ++_i552) - { - _elem551 = iprot.readI64(); - struct.aborted.add(_elem551); - } - } - struct.setAbortedIsSet(true); - { - org.apache.thrift.protocol.TSet _set553 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.nosuch = new HashSet(2*_set553.size); - long _elem554; - for (int _i555 = 0; _i555 < _set553.size; ++_i555) - { - _elem554 = iprot.readI64(); - struct.nosuch.add(_elem554); - } - } - struct.setNosuchIsSet(true); - } - } - -} - diff --git 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 deleted file mode 100644 index 3b818ab..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectPrivilege.java +++ /dev/null @@ -1,729 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class HiveObjectPrivilege implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HiveObjectPrivilege"); - - 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)1); - private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principalName", 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("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 - private PrivilegeGrantInfo grantInfo; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - HIVE_OBJECT((short)1, "hiveObject"), - PRINCIPAL_NAME((short)2, "principalName"), - /** - * - * @see PrincipalType - */ - PRINCIPAL_TYPE((short)3, "principalType"), - GRANT_INFO((short)4, "grantInfo"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // HIVE_OBJECT - return HIVE_OBJECT; - case 2: // PRINCIPAL_NAME - return PRINCIPAL_NAME; - case 3: // PRINCIPAL_TYPE - return PRINCIPAL_TYPE; - case 4: // GRANT_INFO - return GRANT_INFO; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.HIVE_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("hiveObject", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectRef.class))); - tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principalName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principalType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - tmpMap.put(_Fields.GRANT_INFO, new org.apache.thrift.meta_data.FieldMetaData("grantInfo", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeGrantInfo.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HiveObjectPrivilege.class, metaDataMap); - } - - public HiveObjectPrivilege() { - } - - public HiveObjectPrivilege( - HiveObjectRef hiveObject, - String principalName, - PrincipalType principalType, - PrivilegeGrantInfo grantInfo) - { - this(); - this.hiveObject = hiveObject; - this.principalName = principalName; - this.principalType = principalType; - this.grantInfo = grantInfo; - } - - /** - * Performs a deep copy on other. - */ - public HiveObjectPrivilege(HiveObjectPrivilege other) { - if (other.isSetHiveObject()) { - this.hiveObject = new HiveObjectRef(other.hiveObject); - } - if (other.isSetPrincipalName()) { - this.principalName = other.principalName; - } - if (other.isSetPrincipalType()) { - this.principalType = other.principalType; - } - if (other.isSetGrantInfo()) { - this.grantInfo = new PrivilegeGrantInfo(other.grantInfo); - } - } - - public HiveObjectPrivilege deepCopy() { - return new HiveObjectPrivilege(this); - } - - @Override - public void clear() { - this.hiveObject = null; - this.principalName = null; - this.principalType = null; - this.grantInfo = null; - } - - public HiveObjectRef getHiveObject() { - return this.hiveObject; - } - - public void setHiveObject(HiveObjectRef hiveObject) { - this.hiveObject = hiveObject; - } - - public void unsetHiveObject() { - this.hiveObject = null; - } - - /** Returns true if field hiveObject is set (has been assigned a value) and false otherwise */ - public boolean isSetHiveObject() { - return this.hiveObject != null; - } - - public void setHiveObjectIsSet(boolean value) { - if (!value) { - this.hiveObject = null; - } - } - - public String getPrincipalName() { - return this.principalName; - } - - public void setPrincipalName(String principalName) { - this.principalName = principalName; - } - - public void unsetPrincipalName() { - this.principalName = null; - } - - /** Returns true if field principalName is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipalName() { - return this.principalName != null; - } - - public void setPrincipalNameIsSet(boolean value) { - if (!value) { - this.principalName = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getPrincipalType() { - return this.principalType; - } - - /** - * - * @see PrincipalType - */ - public void setPrincipalType(PrincipalType principalType) { - this.principalType = principalType; - } - - public void unsetPrincipalType() { - this.principalType = null; - } - - /** Returns true if field principalType is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipalType() { - return this.principalType != null; - } - - public void setPrincipalTypeIsSet(boolean value) { - if (!value) { - this.principalType = null; - } - } - - public PrivilegeGrantInfo getGrantInfo() { - return this.grantInfo; - } - - public void setGrantInfo(PrivilegeGrantInfo grantInfo) { - this.grantInfo = grantInfo; - } - - public void unsetGrantInfo() { - this.grantInfo = null; - } - - /** Returns true if field grantInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetGrantInfo() { - return this.grantInfo != null; - } - - public void setGrantInfoIsSet(boolean value) { - if (!value) { - this.grantInfo = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case HIVE_OBJECT: - if (value == null) { - unsetHiveObject(); - } else { - setHiveObject((HiveObjectRef)value); - } - break; - - case PRINCIPAL_NAME: - if (value == null) { - unsetPrincipalName(); - } else { - setPrincipalName((String)value); - } - break; - - case PRINCIPAL_TYPE: - if (value == null) { - unsetPrincipalType(); - } else { - setPrincipalType((PrincipalType)value); - } - break; - - case GRANT_INFO: - if (value == null) { - unsetGrantInfo(); - } else { - setGrantInfo((PrivilegeGrantInfo)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case HIVE_OBJECT: - return getHiveObject(); - - case PRINCIPAL_NAME: - return getPrincipalName(); - - case PRINCIPAL_TYPE: - return getPrincipalType(); - - case GRANT_INFO: - return getGrantInfo(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case HIVE_OBJECT: - return isSetHiveObject(); - case PRINCIPAL_NAME: - return isSetPrincipalName(); - case PRINCIPAL_TYPE: - return isSetPrincipalType(); - case GRANT_INFO: - return isSetGrantInfo(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof HiveObjectPrivilege) - return this.equals((HiveObjectPrivilege)that); - return false; - } - - public boolean equals(HiveObjectPrivilege that) { - if (that == null) - return false; - - boolean this_present_hiveObject = true && this.isSetHiveObject(); - boolean that_present_hiveObject = true && that.isSetHiveObject(); - if (this_present_hiveObject || that_present_hiveObject) { - if (!(this_present_hiveObject && that_present_hiveObject)) - return false; - if (!this.hiveObject.equals(that.hiveObject)) - return false; - } - - boolean this_present_principalName = true && this.isSetPrincipalName(); - boolean that_present_principalName = true && that.isSetPrincipalName(); - if (this_present_principalName || that_present_principalName) { - if (!(this_present_principalName && that_present_principalName)) - return false; - if (!this.principalName.equals(that.principalName)) - return false; - } - - boolean this_present_principalType = true && this.isSetPrincipalType(); - boolean that_present_principalType = true && that.isSetPrincipalType(); - if (this_present_principalType || that_present_principalType) { - if (!(this_present_principalType && that_present_principalType)) - return false; - if (!this.principalType.equals(that.principalType)) - return false; - } - - boolean this_present_grantInfo = true && this.isSetGrantInfo(); - boolean that_present_grantInfo = true && that.isSetGrantInfo(); - if (this_present_grantInfo || that_present_grantInfo) { - if (!(this_present_grantInfo && that_present_grantInfo)) - return false; - if (!this.grantInfo.equals(that.grantInfo)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_hiveObject = true && (isSetHiveObject()); - list.add(present_hiveObject); - if (present_hiveObject) - list.add(hiveObject); - - boolean present_principalName = true && (isSetPrincipalName()); - list.add(present_principalName); - if (present_principalName) - list.add(principalName); - - boolean present_principalType = true && (isSetPrincipalType()); - list.add(present_principalType); - if (present_principalType) - list.add(principalType.getValue()); - - boolean present_grantInfo = true && (isSetGrantInfo()); - list.add(present_grantInfo); - if (present_grantInfo) - list.add(grantInfo); - - return list.hashCode(); - } - - @Override - public int compareTo(HiveObjectPrivilege other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(other.isSetHiveObject()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHiveObject()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hiveObject, other.hiveObject); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipalName()).compareTo(other.isSetPrincipalName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipalName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalName, other.principalName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipalType()).compareTo(other.isSetPrincipalType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipalType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalType, other.principalType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantInfo()).compareTo(other.isSetGrantInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantInfo, other.grantInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("HiveObjectPrivilege("); - boolean first = true; - - sb.append("hiveObject:"); - if (this.hiveObject == null) { - sb.append("null"); - } else { - sb.append(this.hiveObject); - } - first = false; - if (!first) sb.append(", "); - sb.append("principalName:"); - if (this.principalName == null) { - sb.append("null"); - } else { - sb.append(this.principalName); - } - first = false; - if (!first) sb.append(", "); - sb.append("principalType:"); - if (this.principalType == null) { - sb.append("null"); - } else { - sb.append(this.principalType); - } - first = false; - if (!first) sb.append(", "); - sb.append("grantInfo:"); - if (this.grantInfo == null) { - sb.append("null"); - } else { - sb.append(this.grantInfo); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setPrincipalTypeIsSet(true); - } - if (incoming.get(3)) { - struct.grantInfo = new PrivilegeGrantInfo(); - struct.grantInfo.read(iprot); - struct.setGrantInfoIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index d7dd8ec..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java +++ /dev/null @@ -1,872 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class HiveObjectRef implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HiveObjectRef"); - - private static final org.apache.thrift.protocol.TField OBJECT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("objectType", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField OBJECT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("objectName", org.apache.thrift.protocol.TType.STRING, (short)3); - 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 - private List partValues; // required - private String columnName; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * - * @see HiveObjectType - */ - OBJECT_TYPE((short)1, "objectType"), - DB_NAME((short)2, "dbName"), - OBJECT_NAME((short)3, "objectName"), - PART_VALUES((short)4, "partValues"), - COLUMN_NAME((short)5, "columnName"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // OBJECT_TYPE - return OBJECT_TYPE; - case 2: // DB_NAME - return DB_NAME; - case 3: // OBJECT_NAME - return OBJECT_NAME; - case 4: // PART_VALUES - return PART_VALUES; - case 5: // COLUMN_NAME - return COLUMN_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.OBJECT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("objectType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, HiveObjectType.class))); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.OBJECT_NAME, new org.apache.thrift.meta_data.FieldMetaData("objectName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALUES, new org.apache.thrift.meta_data.FieldMetaData("partValues", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("columnName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HiveObjectRef.class, metaDataMap); - } - - public HiveObjectRef() { - } - - public HiveObjectRef( - HiveObjectType objectType, - String dbName, - String objectName, - List partValues, - String columnName) - { - this(); - this.objectType = objectType; - this.dbName = dbName; - this.objectName = objectName; - this.partValues = partValues; - this.columnName = columnName; - } - - /** - * Performs a deep copy on other. - */ - public HiveObjectRef(HiveObjectRef other) { - if (other.isSetObjectType()) { - this.objectType = other.objectType; - } - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetObjectName()) { - this.objectName = other.objectName; - } - if (other.isSetPartValues()) { - List __this__partValues = new ArrayList(other.partValues); - this.partValues = __this__partValues; - } - if (other.isSetColumnName()) { - this.columnName = other.columnName; - } - } - - public HiveObjectRef deepCopy() { - return new HiveObjectRef(this); - } - - @Override - public void clear() { - this.objectType = null; - this.dbName = null; - this.objectName = null; - this.partValues = null; - this.columnName = null; - } - - /** - * - * @see HiveObjectType - */ - public HiveObjectType getObjectType() { - return this.objectType; - } - - /** - * - * @see HiveObjectType - */ - public void setObjectType(HiveObjectType objectType) { - this.objectType = objectType; - } - - public void unsetObjectType() { - this.objectType = null; - } - - /** Returns true if field objectType is set (has been assigned a value) and false otherwise */ - public boolean isSetObjectType() { - return this.objectType != null; - } - - public void setObjectTypeIsSet(boolean value) { - if (!value) { - this.objectType = null; - } - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getObjectName() { - return this.objectName; - } - - public void setObjectName(String objectName) { - this.objectName = objectName; - } - - public void unsetObjectName() { - this.objectName = null; - } - - /** Returns true if field objectName is set (has been assigned a value) and false otherwise */ - public boolean isSetObjectName() { - return this.objectName != null; - } - - public void setObjectNameIsSet(boolean value) { - if (!value) { - this.objectName = null; - } - } - - public int getPartValuesSize() { - return (this.partValues == null) ? 0 : this.partValues.size(); - } - - public java.util.Iterator getPartValuesIterator() { - return (this.partValues == null) ? null : this.partValues.iterator(); - } - - public void addToPartValues(String elem) { - if (this.partValues == null) { - this.partValues = new ArrayList(); - } - this.partValues.add(elem); - } - - public List getPartValues() { - return this.partValues; - } - - public void setPartValues(List partValues) { - this.partValues = partValues; - } - - public void unsetPartValues() { - this.partValues = null; - } - - /** Returns true if field partValues is set (has been assigned a value) and false otherwise */ - public boolean isSetPartValues() { - return this.partValues != null; - } - - public void setPartValuesIsSet(boolean value) { - if (!value) { - this.partValues = null; - } - } - - public String getColumnName() { - return this.columnName; - } - - public void setColumnName(String columnName) { - this.columnName = columnName; - } - - public void unsetColumnName() { - this.columnName = null; - } - - /** Returns true if field columnName is set (has been assigned a value) and false otherwise */ - public boolean isSetColumnName() { - return this.columnName != null; - } - - public void setColumnNameIsSet(boolean value) { - if (!value) { - this.columnName = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case OBJECT_TYPE: - if (value == null) { - unsetObjectType(); - } else { - setObjectType((HiveObjectType)value); - } - break; - - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case OBJECT_NAME: - if (value == null) { - unsetObjectName(); - } else { - setObjectName((String)value); - } - break; - - case PART_VALUES: - if (value == null) { - unsetPartValues(); - } else { - setPartValues((List)value); - } - break; - - case COLUMN_NAME: - if (value == null) { - unsetColumnName(); - } else { - setColumnName((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case OBJECT_TYPE: - return getObjectType(); - - case DB_NAME: - return getDbName(); - - case OBJECT_NAME: - return getObjectName(); - - case PART_VALUES: - return getPartValues(); - - case COLUMN_NAME: - return getColumnName(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case OBJECT_TYPE: - return isSetObjectType(); - case DB_NAME: - return isSetDbName(); - case OBJECT_NAME: - return isSetObjectName(); - case PART_VALUES: - return isSetPartValues(); - case COLUMN_NAME: - return isSetColumnName(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof HiveObjectRef) - return this.equals((HiveObjectRef)that); - return false; - } - - public boolean equals(HiveObjectRef that) { - if (that == null) - return false; - - boolean this_present_objectType = true && this.isSetObjectType(); - boolean that_present_objectType = true && that.isSetObjectType(); - if (this_present_objectType || that_present_objectType) { - if (!(this_present_objectType && that_present_objectType)) - return false; - if (!this.objectType.equals(that.objectType)) - return false; - } - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_objectName = true && this.isSetObjectName(); - boolean that_present_objectName = true && that.isSetObjectName(); - if (this_present_objectName || that_present_objectName) { - if (!(this_present_objectName && that_present_objectName)) - return false; - if (!this.objectName.equals(that.objectName)) - return false; - } - - boolean this_present_partValues = true && this.isSetPartValues(); - boolean that_present_partValues = true && that.isSetPartValues(); - if (this_present_partValues || that_present_partValues) { - if (!(this_present_partValues && that_present_partValues)) - return false; - if (!this.partValues.equals(that.partValues)) - return false; - } - - boolean this_present_columnName = true && this.isSetColumnName(); - boolean that_present_columnName = true && that.isSetColumnName(); - if (this_present_columnName || that_present_columnName) { - if (!(this_present_columnName && that_present_columnName)) - return false; - if (!this.columnName.equals(that.columnName)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_objectType = true && (isSetObjectType()); - list.add(present_objectType); - if (present_objectType) - list.add(objectType.getValue()); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_objectName = true && (isSetObjectName()); - list.add(present_objectName); - if (present_objectName) - list.add(objectName); - - boolean present_partValues = true && (isSetPartValues()); - list.add(present_partValues); - if (present_partValues) - list.add(partValues); - - boolean present_columnName = true && (isSetColumnName()); - list.add(present_columnName); - if (present_columnName) - list.add(columnName); - - return list.hashCode(); - } - - @Override - public int compareTo(HiveObjectRef other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetObjectType()).compareTo(other.isSetObjectType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetObjectType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objectType, other.objectType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetObjectName()).compareTo(other.isSetObjectName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetObjectName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objectName, other.objectName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartValues()).compareTo(other.isSetPartValues()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partValues, other.partValues); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(other.isSetColumnName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumnName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, other.columnName); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("HiveObjectRef("); - boolean first = true; - - sb.append("objectType:"); - if (this.objectType == null) { - sb.append("null"); - } else { - sb.append(this.objectType); - } - first = false; - if (!first) sb.append(", "); - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("objectName:"); - if (this.objectName == null) { - sb.append("null"); - } else { - sb.append(this.objectName); - } - first = false; - if (!first) sb.append(", "); - sb.append("partValues:"); - if (this.partValues == null) { - sb.append("null"); - } else { - sb.append(this.partValues); - } - first = false; - if (!first) sb.append(", "); - sb.append("columnName:"); - if (this.columnName == null) { - sb.append("null"); - } else { - sb.append(this.columnName); - } - 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 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 = org.apache.hadoop.hive.metastore.api.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); - String _elem9; - for (int _i10 = 0; _i10 < _list8.size; ++_i10) - { - _elem9 = iprot.readString(); - struct.partValues.add(_elem9); - } - 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 = org.apache.hadoop.hive.metastore.api.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); - String _elem14; - for (int _i15 = 0; _i15 < _list13.size; ++_i15) - { - _elem14 = iprot.readString(); - struct.partValues.add(_elem14); - } - } - struct.setPartValuesIsSet(true); - } - if (incoming.get(4)) { - struct.columnName = iprot.readString(); - struct.setColumnNameIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index f5b1d0e..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum HiveObjectType implements org.apache.thrift.TEnum { - GLOBAL(1), - DATABASE(2), - TABLE(3), - PARTITION(4), - COLUMN(5); - - private final int value; - - private HiveObjectType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static HiveObjectType findByValue(int value) { - switch (value) { - case 1: - return GLOBAL; - case 2: - return DATABASE; - case 3: - return TABLE; - case 4: - return PARTITION; - case 5: - return COLUMN; - default: - return null; - } - } -} diff --git 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 deleted file mode 100644 index 44d99c7..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java +++ /dev/null @@ -1,1374 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class Index implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Index"); - - private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("indexName", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField INDEX_HANDLER_CLASS_FIELD_DESC = new org.apache.thrift.protocol.TField("indexHandlerClass", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField ORIG_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("origTableName", org.apache.thrift.protocol.TType.STRING, (short)4); - 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)5); - private static final org.apache.thrift.protocol.TField LAST_ACCESS_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAccessTime", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField INDEX_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("indexTableName", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField SD_FIELD_DESC = new org.apache.thrift.protocol.TField("sd", org.apache.thrift.protocol.TType.STRUCT, (short)8); - 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 - private String origTableName; // required - private int createTime; // required - private int lastAccessTime; // required - private String indexTableName; // required - private StorageDescriptor sd; // required - private Map parameters; // required - private boolean deferredRebuild; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - INDEX_NAME((short)1, "indexName"), - INDEX_HANDLER_CLASS((short)2, "indexHandlerClass"), - DB_NAME((short)3, "dbName"), - ORIG_TABLE_NAME((short)4, "origTableName"), - CREATE_TIME((short)5, "createTime"), - LAST_ACCESS_TIME((short)6, "lastAccessTime"), - INDEX_TABLE_NAME((short)7, "indexTableName"), - SD((short)8, "sd"), - PARAMETERS((short)9, "parameters"), - DEFERRED_REBUILD((short)10, "deferredRebuild"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // INDEX_NAME - return INDEX_NAME; - case 2: // INDEX_HANDLER_CLASS - return INDEX_HANDLER_CLASS; - case 3: // DB_NAME - return DB_NAME; - case 4: // ORIG_TABLE_NAME - return ORIG_TABLE_NAME; - case 5: // CREATE_TIME - return CREATE_TIME; - case 6: // LAST_ACCESS_TIME - return LAST_ACCESS_TIME; - case 7: // INDEX_TABLE_NAME - return INDEX_TABLE_NAME; - case 8: // SD - return SD; - case 9: // PARAMETERS - return PARAMETERS; - case 10: // DEFERRED_REBUILD - return DEFERRED_REBUILD; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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 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); - tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("indexName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.INDEX_HANDLER_CLASS, new org.apache.thrift.meta_data.FieldMetaData("indexHandlerClass", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ORIG_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("origTableName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.LAST_ACCESS_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastAccessTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.INDEX_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("indexTableName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SD, new org.apache.thrift.meta_data.FieldMetaData("sd", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StorageDescriptor.class))); - tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.DEFERRED_REBUILD, new org.apache.thrift.meta_data.FieldMetaData("deferredRebuild", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Index.class, metaDataMap); - } - - public Index() { - } - - public Index( - String indexName, - String indexHandlerClass, - String dbName, - String origTableName, - int createTime, - int lastAccessTime, - String indexTableName, - StorageDescriptor sd, - Map parameters, - boolean deferredRebuild) - { - this(); - this.indexName = indexName; - this.indexHandlerClass = indexHandlerClass; - this.dbName = dbName; - this.origTableName = origTableName; - this.createTime = createTime; - setCreateTimeIsSet(true); - this.lastAccessTime = lastAccessTime; - setLastAccessTimeIsSet(true); - this.indexTableName = indexTableName; - this.sd = sd; - this.parameters = parameters; - this.deferredRebuild = deferredRebuild; - setDeferredRebuildIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public Index(Index other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetIndexName()) { - this.indexName = other.indexName; - } - if (other.isSetIndexHandlerClass()) { - this.indexHandlerClass = other.indexHandlerClass; - } - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetOrigTableName()) { - this.origTableName = other.origTableName; - } - this.createTime = other.createTime; - this.lastAccessTime = other.lastAccessTime; - if (other.isSetIndexTableName()) { - this.indexTableName = other.indexTableName; - } - if (other.isSetSd()) { - this.sd = new StorageDescriptor(other.sd); - } - if (other.isSetParameters()) { - Map __this__parameters = new HashMap(other.parameters); - this.parameters = __this__parameters; - } - this.deferredRebuild = other.deferredRebuild; - } - - public Index deepCopy() { - return new Index(this); - } - - @Override - public void clear() { - this.indexName = null; - this.indexHandlerClass = null; - this.dbName = null; - this.origTableName = null; - setCreateTimeIsSet(false); - this.createTime = 0; - setLastAccessTimeIsSet(false); - this.lastAccessTime = 0; - this.indexTableName = null; - this.sd = null; - this.parameters = null; - setDeferredRebuildIsSet(false); - this.deferredRebuild = false; - } - - public String getIndexName() { - return this.indexName; - } - - public void setIndexName(String indexName) { - this.indexName = indexName; - } - - public void unsetIndexName() { - this.indexName = null; - } - - /** Returns true if field indexName is set (has been assigned a value) and false otherwise */ - public boolean isSetIndexName() { - return this.indexName != null; - } - - public void setIndexNameIsSet(boolean value) { - if (!value) { - this.indexName = null; - } - } - - public String getIndexHandlerClass() { - return this.indexHandlerClass; - } - - public void setIndexHandlerClass(String indexHandlerClass) { - this.indexHandlerClass = indexHandlerClass; - } - - public void unsetIndexHandlerClass() { - this.indexHandlerClass = null; - } - - /** Returns true if field indexHandlerClass is set (has been assigned a value) and false otherwise */ - public boolean isSetIndexHandlerClass() { - return this.indexHandlerClass != null; - } - - public void setIndexHandlerClassIsSet(boolean value) { - if (!value) { - this.indexHandlerClass = null; - } - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getOrigTableName() { - return this.origTableName; - } - - public void setOrigTableName(String origTableName) { - this.origTableName = origTableName; - } - - public void unsetOrigTableName() { - this.origTableName = null; - } - - /** Returns true if field origTableName is set (has been assigned a value) and false otherwise */ - public boolean isSetOrigTableName() { - return this.origTableName != null; - } - - public void setOrigTableNameIsSet(boolean value) { - if (!value) { - this.origTableName = null; - } - } - - public int getCreateTime() { - return this.createTime; - } - - public void setCreateTime(int createTime) { - this.createTime = createTime; - setCreateTimeIsSet(true); - } - - public void unsetCreateTime() { - __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - public void setCreateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); - } - - public int getLastAccessTime() { - return this.lastAccessTime; - } - - public void setLastAccessTime(int lastAccessTime) { - this.lastAccessTime = lastAccessTime; - setLastAccessTimeIsSet(true); - } - - public void unsetLastAccessTime() { - __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 EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); - } - - public void setLastAccessTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); - } - - public String getIndexTableName() { - return this.indexTableName; - } - - public void setIndexTableName(String indexTableName) { - this.indexTableName = indexTableName; - } - - public void unsetIndexTableName() { - this.indexTableName = null; - } - - /** Returns true if field indexTableName is set (has been assigned a value) and false otherwise */ - public boolean isSetIndexTableName() { - return this.indexTableName != null; - } - - public void setIndexTableNameIsSet(boolean value) { - if (!value) { - this.indexTableName = null; - } - } - - public StorageDescriptor getSd() { - return this.sd; - } - - public void setSd(StorageDescriptor sd) { - this.sd = sd; - } - - public void unsetSd() { - this.sd = null; - } - - /** Returns true if field sd is set (has been assigned a value) and false otherwise */ - public boolean isSetSd() { - return this.sd != null; - } - - public void setSdIsSet(boolean value) { - if (!value) { - this.sd = null; - } - } - - public int getParametersSize() { - return (this.parameters == null) ? 0 : this.parameters.size(); - } - - public void putToParameters(String key, String val) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(key, val); - } - - public Map getParameters() { - return this.parameters; - } - - public void setParameters(Map parameters) { - this.parameters = parameters; - } - - public void unsetParameters() { - this.parameters = null; - } - - /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ - public boolean isSetParameters() { - return this.parameters != null; - } - - public void setParametersIsSet(boolean value) { - if (!value) { - this.parameters = null; - } - } - - public boolean isDeferredRebuild() { - return this.deferredRebuild; - } - - public void setDeferredRebuild(boolean deferredRebuild) { - this.deferredRebuild = deferredRebuild; - setDeferredRebuildIsSet(true); - } - - public void unsetDeferredRebuild() { - __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 EncodingUtils.testBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID); - } - - public void setDeferredRebuildIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case INDEX_NAME: - if (value == null) { - unsetIndexName(); - } else { - setIndexName((String)value); - } - break; - - case INDEX_HANDLER_CLASS: - if (value == null) { - unsetIndexHandlerClass(); - } else { - setIndexHandlerClass((String)value); - } - break; - - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case ORIG_TABLE_NAME: - if (value == null) { - unsetOrigTableName(); - } else { - setOrigTableName((String)value); - } - break; - - case CREATE_TIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((Integer)value); - } - break; - - case LAST_ACCESS_TIME: - if (value == null) { - unsetLastAccessTime(); - } else { - setLastAccessTime((Integer)value); - } - break; - - case INDEX_TABLE_NAME: - if (value == null) { - unsetIndexTableName(); - } else { - setIndexTableName((String)value); - } - break; - - case SD: - if (value == null) { - unsetSd(); - } else { - setSd((StorageDescriptor)value); - } - break; - - case PARAMETERS: - if (value == null) { - unsetParameters(); - } else { - setParameters((Map)value); - } - break; - - case DEFERRED_REBUILD: - if (value == null) { - unsetDeferredRebuild(); - } else { - setDeferredRebuild((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case INDEX_NAME: - return getIndexName(); - - case INDEX_HANDLER_CLASS: - return getIndexHandlerClass(); - - case DB_NAME: - return getDbName(); - - case ORIG_TABLE_NAME: - return getOrigTableName(); - - case CREATE_TIME: - return getCreateTime(); - - case LAST_ACCESS_TIME: - return getLastAccessTime(); - - case INDEX_TABLE_NAME: - return getIndexTableName(); - - case SD: - return getSd(); - - case PARAMETERS: - return getParameters(); - - case DEFERRED_REBUILD: - return isDeferredRebuild(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case INDEX_NAME: - return isSetIndexName(); - case INDEX_HANDLER_CLASS: - return isSetIndexHandlerClass(); - case DB_NAME: - return isSetDbName(); - case ORIG_TABLE_NAME: - return isSetOrigTableName(); - case CREATE_TIME: - return isSetCreateTime(); - case LAST_ACCESS_TIME: - return isSetLastAccessTime(); - case INDEX_TABLE_NAME: - return isSetIndexTableName(); - case SD: - return isSetSd(); - case PARAMETERS: - return isSetParameters(); - case DEFERRED_REBUILD: - return isSetDeferredRebuild(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Index) - return this.equals((Index)that); - return false; - } - - public boolean equals(Index that) { - if (that == null) - return false; - - boolean this_present_indexName = true && this.isSetIndexName(); - boolean that_present_indexName = true && that.isSetIndexName(); - if (this_present_indexName || that_present_indexName) { - if (!(this_present_indexName && that_present_indexName)) - return false; - if (!this.indexName.equals(that.indexName)) - return false; - } - - boolean this_present_indexHandlerClass = true && this.isSetIndexHandlerClass(); - boolean that_present_indexHandlerClass = true && that.isSetIndexHandlerClass(); - if (this_present_indexHandlerClass || that_present_indexHandlerClass) { - if (!(this_present_indexHandlerClass && that_present_indexHandlerClass)) - return false; - if (!this.indexHandlerClass.equals(that.indexHandlerClass)) - return false; - } - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_origTableName = true && this.isSetOrigTableName(); - boolean that_present_origTableName = true && that.isSetOrigTableName(); - if (this_present_origTableName || that_present_origTableName) { - if (!(this_present_origTableName && that_present_origTableName)) - return false; - if (!this.origTableName.equals(that.origTableName)) - return false; - } - - boolean this_present_createTime = true; - boolean that_present_createTime = true; - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_lastAccessTime = true; - boolean that_present_lastAccessTime = true; - if (this_present_lastAccessTime || that_present_lastAccessTime) { - if (!(this_present_lastAccessTime && that_present_lastAccessTime)) - return false; - if (this.lastAccessTime != that.lastAccessTime) - return false; - } - - boolean this_present_indexTableName = true && this.isSetIndexTableName(); - boolean that_present_indexTableName = true && that.isSetIndexTableName(); - if (this_present_indexTableName || that_present_indexTableName) { - if (!(this_present_indexTableName && that_present_indexTableName)) - return false; - if (!this.indexTableName.equals(that.indexTableName)) - return false; - } - - boolean this_present_sd = true && this.isSetSd(); - boolean that_present_sd = true && that.isSetSd(); - if (this_present_sd || that_present_sd) { - if (!(this_present_sd && that_present_sd)) - return false; - if (!this.sd.equals(that.sd)) - return false; - } - - boolean this_present_parameters = true && this.isSetParameters(); - boolean that_present_parameters = true && that.isSetParameters(); - if (this_present_parameters || that_present_parameters) { - if (!(this_present_parameters && that_present_parameters)) - return false; - if (!this.parameters.equals(that.parameters)) - return false; - } - - boolean this_present_deferredRebuild = true; - boolean that_present_deferredRebuild = true; - if (this_present_deferredRebuild || that_present_deferredRebuild) { - if (!(this_present_deferredRebuild && that_present_deferredRebuild)) - return false; - if (this.deferredRebuild != that.deferredRebuild) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_indexName = true && (isSetIndexName()); - list.add(present_indexName); - if (present_indexName) - list.add(indexName); - - boolean present_indexHandlerClass = true && (isSetIndexHandlerClass()); - list.add(present_indexHandlerClass); - if (present_indexHandlerClass) - list.add(indexHandlerClass); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_origTableName = true && (isSetOrigTableName()); - list.add(present_origTableName); - if (present_origTableName) - list.add(origTableName); - - boolean present_createTime = true; - list.add(present_createTime); - if (present_createTime) - list.add(createTime); - - boolean present_lastAccessTime = true; - list.add(present_lastAccessTime); - if (present_lastAccessTime) - list.add(lastAccessTime); - - boolean present_indexTableName = true && (isSetIndexTableName()); - list.add(present_indexTableName); - if (present_indexTableName) - list.add(indexTableName); - - boolean present_sd = true && (isSetSd()); - list.add(present_sd); - if (present_sd) - list.add(sd); - - boolean present_parameters = true && (isSetParameters()); - list.add(present_parameters); - if (present_parameters) - list.add(parameters); - - boolean present_deferredRebuild = true; - list.add(present_deferredRebuild); - if (present_deferredRebuild) - list.add(deferredRebuild); - - return list.hashCode(); - } - - @Override - public int compareTo(Index other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetIndexName()).compareTo(other.isSetIndexName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIndexName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.indexName, other.indexName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIndexHandlerClass()).compareTo(other.isSetIndexHandlerClass()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIndexHandlerClass()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.indexHandlerClass, other.indexHandlerClass); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOrigTableName()).compareTo(other.isSetOrigTableName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOrigTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.origTableName, other.origTableName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCreateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(other.isSetLastAccessTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLastAccessTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastAccessTime, other.lastAccessTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIndexTableName()).compareTo(other.isSetIndexTableName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIndexTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.indexTableName, other.indexTableName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSd()).compareTo(other.isSetSd()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSd()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sd, other.sd); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParameters()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDeferredRebuild()).compareTo(other.isSetDeferredRebuild()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDeferredRebuild()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deferredRebuild, other.deferredRebuild); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("Index("); - boolean first = true; - - sb.append("indexName:"); - if (this.indexName == null) { - sb.append("null"); - } else { - sb.append(this.indexName); - } - first = false; - if (!first) sb.append(", "); - sb.append("indexHandlerClass:"); - if (this.indexHandlerClass == null) { - sb.append("null"); - } else { - sb.append(this.indexHandlerClass); - } - first = false; - if (!first) sb.append(", "); - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("origTableName:"); - if (this.origTableName == null) { - sb.append("null"); - } else { - sb.append(this.origTableName); - } - first = false; - if (!first) sb.append(", "); - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - if (!first) sb.append(", "); - sb.append("lastAccessTime:"); - sb.append(this.lastAccessTime); - first = false; - if (!first) sb.append(", "); - sb.append("indexTableName:"); - if (this.indexTableName == null) { - sb.append("null"); - } else { - sb.append(this.indexTableName); - } - first = false; - if (!first) sb.append(", "); - sb.append("sd:"); - if (this.sd == null) { - sb.append("null"); - } else { - sb.append(this.sd); - } - first = false; - if (!first) sb.append(", "); - sb.append("parameters:"); - if (this.parameters == null) { - sb.append("null"); - } else { - sb.append(this.parameters); - } - first = false; - if (!first) sb.append(", "); - sb.append("deferredRebuild:"); - sb.append(this.deferredRebuild); - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - // 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 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 _map260 = iprot.readMapBegin(); - struct.parameters = new HashMap(2*_map260.size); - String _key261; - String _val262; - for (int _i263 = 0; _i263 < _map260.size; ++_i263) - { - _key261 = iprot.readString(); - _val262 = iprot.readString(); - struct.parameters.put(_key261, _val262); - } - 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 _iter264 : struct.parameters.entrySet()) - { - oprot.writeString(_iter264.getKey()); - oprot.writeString(_iter264.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 _iter265 : struct.parameters.entrySet()) - { - oprot.writeString(_iter265.getKey()); - oprot.writeString(_iter265.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 _map266 = 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*_map266.size); - String _key267; - String _val268; - for (int _i269 = 0; _i269 < _map266.size; ++_i269) - { - _key267 = iprot.readString(); - _val268 = iprot.readString(); - struct.parameters.put(_key267, _val268); - } - } - struct.setParametersIsSet(true); - } - if (incoming.get(9)) { - struct.deferredRebuild = iprot.readBool(); - struct.setDeferredRebuildIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index 2588524..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class IndexAlreadyExistsException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IndexAlreadyExistsException.class, metaDataMap); - } - - public IndexAlreadyExistsException() { - } - - public IndexAlreadyExistsException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public IndexAlreadyExistsException(IndexAlreadyExistsException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public IndexAlreadyExistsException deepCopy() { - return new IndexAlreadyExistsException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof IndexAlreadyExistsException) - return this.equals((IndexAlreadyExistsException)that); - return false; - } - - public boolean equals(IndexAlreadyExistsException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(IndexAlreadyExistsException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("IndexAlreadyExistsException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 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); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java deleted file mode 100644 index 84f1df1..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java +++ /dev/null @@ -1,700 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class InsertEventRequestData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InsertEventRequestData"); - - private static final org.apache.thrift.protocol.TField REPLACE_FIELD_DESC = new org.apache.thrift.protocol.TField("replace", org.apache.thrift.protocol.TType.BOOL, (short)1); - private static final org.apache.thrift.protocol.TField FILES_ADDED_FIELD_DESC = new org.apache.thrift.protocol.TField("filesAdded", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField FILES_ADDED_CHECKSUM_FIELD_DESC = new org.apache.thrift.protocol.TField("filesAddedChecksum", org.apache.thrift.protocol.TType.LIST, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new InsertEventRequestDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new InsertEventRequestDataTupleSchemeFactory()); - } - - private boolean replace; // optional - private List filesAdded; // required - private List filesAddedChecksum; // 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 { - REPLACE((short)1, "replace"), - FILES_ADDED((short)2, "filesAdded"), - FILES_ADDED_CHECKSUM((short)3, "filesAddedChecksum"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REPLACE - return REPLACE; - case 2: // FILES_ADDED - return FILES_ADDED; - case 3: // FILES_ADDED_CHECKSUM - return FILES_ADDED_CHECKSUM; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __REPLACE_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.REPLACE,_Fields.FILES_ADDED_CHECKSUM}; - 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); - tmpMap.put(_Fields.REPLACE, new org.apache.thrift.meta_data.FieldMetaData("replace", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.FILES_ADDED, new org.apache.thrift.meta_data.FieldMetaData("filesAdded", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.FILES_ADDED_CHECKSUM, new org.apache.thrift.meta_data.FieldMetaData("filesAddedChecksum", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InsertEventRequestData.class, metaDataMap); - } - - public InsertEventRequestData() { - } - - public InsertEventRequestData( - List filesAdded) - { - this(); - this.filesAdded = filesAdded; - } - - /** - * Performs a deep copy on other. - */ - public InsertEventRequestData(InsertEventRequestData other) { - __isset_bitfield = other.__isset_bitfield; - this.replace = other.replace; - if (other.isSetFilesAdded()) { - List __this__filesAdded = new ArrayList(other.filesAdded); - this.filesAdded = __this__filesAdded; - } - if (other.isSetFilesAddedChecksum()) { - List __this__filesAddedChecksum = new ArrayList(other.filesAddedChecksum); - this.filesAddedChecksum = __this__filesAddedChecksum; - } - } - - public InsertEventRequestData deepCopy() { - return new InsertEventRequestData(this); - } - - @Override - public void clear() { - setReplaceIsSet(false); - this.replace = false; - this.filesAdded = null; - this.filesAddedChecksum = null; - } - - public boolean isReplace() { - return this.replace; - } - - public void setReplace(boolean replace) { - this.replace = replace; - setReplaceIsSet(true); - } - - public void unsetReplace() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REPLACE_ISSET_ID); - } - - /** Returns true if field replace is set (has been assigned a value) and false otherwise */ - public boolean isSetReplace() { - return EncodingUtils.testBit(__isset_bitfield, __REPLACE_ISSET_ID); - } - - public void setReplaceIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REPLACE_ISSET_ID, value); - } - - public int getFilesAddedSize() { - return (this.filesAdded == null) ? 0 : this.filesAdded.size(); - } - - public java.util.Iterator getFilesAddedIterator() { - return (this.filesAdded == null) ? null : this.filesAdded.iterator(); - } - - public void addToFilesAdded(String elem) { - if (this.filesAdded == null) { - this.filesAdded = new ArrayList(); - } - this.filesAdded.add(elem); - } - - public List getFilesAdded() { - return this.filesAdded; - } - - public void setFilesAdded(List filesAdded) { - this.filesAdded = filesAdded; - } - - public void unsetFilesAdded() { - this.filesAdded = null; - } - - /** Returns true if field filesAdded is set (has been assigned a value) and false otherwise */ - public boolean isSetFilesAdded() { - return this.filesAdded != null; - } - - public void setFilesAddedIsSet(boolean value) { - if (!value) { - this.filesAdded = null; - } - } - - public int getFilesAddedChecksumSize() { - return (this.filesAddedChecksum == null) ? 0 : this.filesAddedChecksum.size(); - } - - public java.util.Iterator getFilesAddedChecksumIterator() { - return (this.filesAddedChecksum == null) ? null : this.filesAddedChecksum.iterator(); - } - - public void addToFilesAddedChecksum(String elem) { - if (this.filesAddedChecksum == null) { - this.filesAddedChecksum = new ArrayList(); - } - this.filesAddedChecksum.add(elem); - } - - public List getFilesAddedChecksum() { - return this.filesAddedChecksum; - } - - public void setFilesAddedChecksum(List filesAddedChecksum) { - this.filesAddedChecksum = filesAddedChecksum; - } - - public void unsetFilesAddedChecksum() { - this.filesAddedChecksum = null; - } - - /** Returns true if field filesAddedChecksum is set (has been assigned a value) and false otherwise */ - public boolean isSetFilesAddedChecksum() { - return this.filesAddedChecksum != null; - } - - public void setFilesAddedChecksumIsSet(boolean value) { - if (!value) { - this.filesAddedChecksum = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REPLACE: - if (value == null) { - unsetReplace(); - } else { - setReplace((Boolean)value); - } - break; - - case FILES_ADDED: - if (value == null) { - unsetFilesAdded(); - } else { - setFilesAdded((List)value); - } - break; - - case FILES_ADDED_CHECKSUM: - if (value == null) { - unsetFilesAddedChecksum(); - } else { - setFilesAddedChecksum((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REPLACE: - return isReplace(); - - case FILES_ADDED: - return getFilesAdded(); - - case FILES_ADDED_CHECKSUM: - return getFilesAddedChecksum(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REPLACE: - return isSetReplace(); - case FILES_ADDED: - return isSetFilesAdded(); - case FILES_ADDED_CHECKSUM: - return isSetFilesAddedChecksum(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof InsertEventRequestData) - return this.equals((InsertEventRequestData)that); - return false; - } - - public boolean equals(InsertEventRequestData that) { - if (that == null) - return false; - - boolean this_present_replace = true && this.isSetReplace(); - boolean that_present_replace = true && that.isSetReplace(); - if (this_present_replace || that_present_replace) { - if (!(this_present_replace && that_present_replace)) - return false; - if (this.replace != that.replace) - return false; - } - - boolean this_present_filesAdded = true && this.isSetFilesAdded(); - boolean that_present_filesAdded = true && that.isSetFilesAdded(); - if (this_present_filesAdded || that_present_filesAdded) { - if (!(this_present_filesAdded && that_present_filesAdded)) - return false; - if (!this.filesAdded.equals(that.filesAdded)) - return false; - } - - boolean this_present_filesAddedChecksum = true && this.isSetFilesAddedChecksum(); - boolean that_present_filesAddedChecksum = true && that.isSetFilesAddedChecksum(); - if (this_present_filesAddedChecksum || that_present_filesAddedChecksum) { - if (!(this_present_filesAddedChecksum && that_present_filesAddedChecksum)) - return false; - if (!this.filesAddedChecksum.equals(that.filesAddedChecksum)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_replace = true && (isSetReplace()); - list.add(present_replace); - if (present_replace) - list.add(replace); - - boolean present_filesAdded = true && (isSetFilesAdded()); - list.add(present_filesAdded); - if (present_filesAdded) - list.add(filesAdded); - - boolean present_filesAddedChecksum = true && (isSetFilesAddedChecksum()); - list.add(present_filesAddedChecksum); - if (present_filesAddedChecksum) - list.add(filesAddedChecksum); - - return list.hashCode(); - } - - @Override - public int compareTo(InsertEventRequestData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReplace()).compareTo(other.isSetReplace()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReplace()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replace, other.replace); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFilesAdded()).compareTo(other.isSetFilesAdded()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFilesAdded()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filesAdded, other.filesAdded); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFilesAddedChecksum()).compareTo(other.isSetFilesAddedChecksum()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFilesAddedChecksum()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filesAddedChecksum, other.filesAddedChecksum); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("InsertEventRequestData("); - boolean first = true; - - if (isSetReplace()) { - sb.append("replace:"); - sb.append(this.replace); - first = false; - } - if (!first) sb.append(", "); - sb.append("filesAdded:"); - if (this.filesAdded == null) { - sb.append("null"); - } else { - sb.append(this.filesAdded); - } - first = false; - if (isSetFilesAddedChecksum()) { - if (!first) sb.append(", "); - sb.append("filesAddedChecksum:"); - if (this.filesAddedChecksum == null) { - sb.append("null"); - } else { - sb.append(this.filesAddedChecksum); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetFilesAdded()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'filesAdded' is unset! Struct:" + toString()); - } - - // 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 { - // 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 InsertEventRequestDataStandardSchemeFactory implements SchemeFactory { - public InsertEventRequestDataStandardScheme getScheme() { - return new InsertEventRequestDataStandardScheme(); - } - } - - private static class InsertEventRequestDataStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, InsertEventRequestData 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: // REPLACE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.replace = iprot.readBool(); - struct.setReplaceIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // FILES_ADDED - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list590 = iprot.readListBegin(); - struct.filesAdded = new ArrayList(_list590.size); - String _elem591; - for (int _i592 = 0; _i592 < _list590.size; ++_i592) - { - _elem591 = iprot.readString(); - struct.filesAdded.add(_elem591); - } - iprot.readListEnd(); - } - struct.setFilesAddedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // FILES_ADDED_CHECKSUM - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list593 = iprot.readListBegin(); - struct.filesAddedChecksum = new ArrayList(_list593.size); - String _elem594; - for (int _i595 = 0; _i595 < _list593.size; ++_i595) - { - _elem594 = iprot.readString(); - struct.filesAddedChecksum.add(_elem594); - } - iprot.readListEnd(); - } - struct.setFilesAddedChecksumIsSet(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, InsertEventRequestData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetReplace()) { - oprot.writeFieldBegin(REPLACE_FIELD_DESC); - oprot.writeBool(struct.replace); - oprot.writeFieldEnd(); - } - if (struct.filesAdded != null) { - oprot.writeFieldBegin(FILES_ADDED_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.filesAdded.size())); - for (String _iter596 : struct.filesAdded) - { - oprot.writeString(_iter596); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.filesAddedChecksum != null) { - if (struct.isSetFilesAddedChecksum()) { - oprot.writeFieldBegin(FILES_ADDED_CHECKSUM_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.filesAddedChecksum.size())); - for (String _iter597 : struct.filesAddedChecksum) - { - oprot.writeString(_iter597); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class InsertEventRequestDataTupleSchemeFactory implements SchemeFactory { - public InsertEventRequestDataTupleScheme getScheme() { - return new InsertEventRequestDataTupleScheme(); - } - } - - private static class InsertEventRequestDataTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, InsertEventRequestData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.filesAdded.size()); - for (String _iter598 : struct.filesAdded) - { - oprot.writeString(_iter598); - } - } - BitSet optionals = new BitSet(); - if (struct.isSetReplace()) { - optionals.set(0); - } - if (struct.isSetFilesAddedChecksum()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetReplace()) { - oprot.writeBool(struct.replace); - } - if (struct.isSetFilesAddedChecksum()) { - { - oprot.writeI32(struct.filesAddedChecksum.size()); - for (String _iter599 : struct.filesAddedChecksum) - { - oprot.writeString(_iter599); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, InsertEventRequestData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list600 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.filesAdded = new ArrayList(_list600.size); - String _elem601; - for (int _i602 = 0; _i602 < _list600.size; ++_i602) - { - _elem601 = iprot.readString(); - struct.filesAdded.add(_elem601); - } - } - struct.setFilesAddedIsSet(true); - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.replace = iprot.readBool(); - struct.setReplaceIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list603 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.filesAddedChecksum = new ArrayList(_list603.size); - String _elem604; - for (int _i605 = 0; _i605 < _list603.size; ++_i605) - { - _elem604 = iprot.readString(); - struct.filesAddedChecksum.add(_elem604); - } - } - struct.setFilesAddedChecksumIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java deleted file mode 100644 index 7c7e000..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class InvalidInputException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidInputException"); - - 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 InvalidInputExceptionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new InvalidInputExceptionTupleSchemeFactory()); - } - - private String message; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidInputException.class, metaDataMap); - } - - public InvalidInputException() { - } - - public InvalidInputException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public InvalidInputException(InvalidInputException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public InvalidInputException deepCopy() { - return new InvalidInputException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof InvalidInputException) - return this.equals((InvalidInputException)that); - return false; - } - - public boolean equals(InvalidInputException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(InvalidInputException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("InvalidInputException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 InvalidInputExceptionStandardSchemeFactory implements SchemeFactory { - public InvalidInputExceptionStandardScheme getScheme() { - return new InvalidInputExceptionStandardScheme(); - } - } - - private static class InvalidInputExceptionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidInputException 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, InvalidInputException 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 InvalidInputExceptionTupleSchemeFactory implements SchemeFactory { - public InvalidInputExceptionTupleScheme getScheme() { - return new InvalidInputExceptionTupleScheme(); - } - } - - private static class InvalidInputExceptionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, InvalidInputException 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, InvalidInputException 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); - } - } - } - -} - diff --git 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 deleted file mode 100644 index 957aca0..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class InvalidObjectException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidObjectException.class, metaDataMap); - } - - public InvalidObjectException() { - } - - public InvalidObjectException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public InvalidObjectException(InvalidObjectException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public InvalidObjectException deepCopy() { - return new InvalidObjectException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof InvalidObjectException) - return this.equals((InvalidObjectException)that); - return false; - } - - public boolean equals(InvalidObjectException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(InvalidObjectException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("InvalidObjectException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 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); - } - } - } - -} - diff --git 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 deleted file mode 100644 index 6217bb8..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class InvalidOperationException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidOperationException.class, metaDataMap); - } - - public InvalidOperationException() { - } - - public InvalidOperationException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public InvalidOperationException(InvalidOperationException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public InvalidOperationException deepCopy() { - return new InvalidOperationException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof InvalidOperationException) - return this.equals((InvalidOperationException)that); - return false; - } - - public boolean equals(InvalidOperationException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(InvalidOperationException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("InvalidOperationException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 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); - } - } - } - -} - diff --git 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 deleted file mode 100644 index ef71511..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class InvalidPartitionException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidPartitionException.class, metaDataMap); - } - - public InvalidPartitionException() { - } - - public InvalidPartitionException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public InvalidPartitionException(InvalidPartitionException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public InvalidPartitionException deepCopy() { - return new InvalidPartitionException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof InvalidPartitionException) - return this.equals((InvalidPartitionException)that); - return false; - } - - public boolean equals(InvalidPartitionException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(InvalidPartitionException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("InvalidPartitionException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 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); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java deleted file mode 100644 index d349508..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java +++ /dev/null @@ -1,1158 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class LockComponent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LockComponent"); - - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("level", org.apache.thrift.protocol.TType.I32, (short)2); - 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)3); - private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField PARTITIONNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionname", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField IS_ACID_FIELD_DESC = new org.apache.thrift.protocol.TField("isAcid", org.apache.thrift.protocol.TType.BOOL, (short)7); - private static final org.apache.thrift.protocol.TField IS_DYNAMIC_PARTITION_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("isDynamicPartitionWrite", org.apache.thrift.protocol.TType.BOOL, (short)8); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LockComponentStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LockComponentTupleSchemeFactory()); - } - - private LockType type; // required - private LockLevel level; // required - private String dbname; // required - private String tablename; // optional - private String partitionname; // optional - private DataOperationType operationType; // optional - private boolean isAcid; // optional - private boolean isDynamicPartitionWrite; // 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 { - /** - * - * @see LockType - */ - TYPE((short)1, "type"), - /** - * - * @see LockLevel - */ - LEVEL((short)2, "level"), - DBNAME((short)3, "dbname"), - TABLENAME((short)4, "tablename"), - PARTITIONNAME((short)5, "partitionname"), - /** - * - * @see DataOperationType - */ - OPERATION_TYPE((short)6, "operationType"), - IS_ACID((short)7, "isAcid"), - IS_DYNAMIC_PARTITION_WRITE((short)8, "isDynamicPartitionWrite"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TYPE - return TYPE; - case 2: // LEVEL - return LEVEL; - case 3: // DBNAME - return DBNAME; - case 4: // TABLENAME - return TABLENAME; - case 5: // PARTITIONNAME - return PARTITIONNAME; - case 6: // OPERATION_TYPE - return OPERATION_TYPE; - case 7: // IS_ACID - return IS_ACID; - case 8: // IS_DYNAMIC_PARTITION_WRITE - return IS_DYNAMIC_PARTITION_WRITE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ISACID_ISSET_ID = 0; - private static final int __ISDYNAMICPARTITIONWRITE_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.TABLENAME,_Fields.PARTITIONNAME,_Fields.OPERATION_TYPE,_Fields.IS_ACID,_Fields.IS_DYNAMIC_PARTITION_WRITE}; - 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); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockType.class))); - tmpMap.put(_Fields.LEVEL, new org.apache.thrift.meta_data.FieldMetaData("level", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockLevel.class))); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.OPERATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("operationType", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DataOperationType.class))); - tmpMap.put(_Fields.IS_ACID, new org.apache.thrift.meta_data.FieldMetaData("isAcid", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.IS_DYNAMIC_PARTITION_WRITE, new org.apache.thrift.meta_data.FieldMetaData("isDynamicPartitionWrite", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LockComponent.class, metaDataMap); - } - - public LockComponent() { - this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET; - - this.isAcid = false; - - this.isDynamicPartitionWrite = false; - - } - - public LockComponent( - LockType type, - LockLevel level, - String dbname) - { - this(); - this.type = type; - this.level = level; - this.dbname = dbname; - } - - /** - * Performs a deep copy on other. - */ - public LockComponent(LockComponent other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetType()) { - this.type = other.type; - } - if (other.isSetLevel()) { - this.level = other.level; - } - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTablename()) { - this.tablename = other.tablename; - } - if (other.isSetPartitionname()) { - this.partitionname = other.partitionname; - } - if (other.isSetOperationType()) { - this.operationType = other.operationType; - } - this.isAcid = other.isAcid; - this.isDynamicPartitionWrite = other.isDynamicPartitionWrite; - } - - public LockComponent deepCopy() { - return new LockComponent(this); - } - - @Override - public void clear() { - this.type = null; - this.level = null; - this.dbname = null; - this.tablename = null; - this.partitionname = null; - this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET; - - this.isAcid = false; - - this.isDynamicPartitionWrite = false; - - } - - /** - * - * @see LockType - */ - public LockType getType() { - return this.type; - } - - /** - * - * @see LockType - */ - public void setType(LockType type) { - this.type = type; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - /** - * - * @see LockLevel - */ - public LockLevel getLevel() { - return this.level; - } - - /** - * - * @see LockLevel - */ - public void setLevel(LockLevel level) { - this.level = level; - } - - public void unsetLevel() { - this.level = null; - } - - /** Returns true if field level is set (has been assigned a value) and false otherwise */ - public boolean isSetLevel() { - return this.level != null; - } - - public void setLevelIsSet(boolean value) { - if (!value) { - this.level = null; - } - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getTablename() { - return this.tablename; - } - - public void setTablename(String tablename) { - this.tablename = tablename; - } - - public void unsetTablename() { - this.tablename = null; - } - - /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ - public boolean isSetTablename() { - return this.tablename != null; - } - - public void setTablenameIsSet(boolean value) { - if (!value) { - this.tablename = null; - } - } - - public String getPartitionname() { - return this.partitionname; - } - - public void setPartitionname(String partitionname) { - this.partitionname = partitionname; - } - - public void unsetPartitionname() { - this.partitionname = null; - } - - /** Returns true if field partitionname is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitionname() { - return this.partitionname != null; - } - - public void setPartitionnameIsSet(boolean value) { - if (!value) { - this.partitionname = null; - } - } - - /** - * - * @see DataOperationType - */ - public DataOperationType getOperationType() { - return this.operationType; - } - - /** - * - * @see DataOperationType - */ - public void setOperationType(DataOperationType operationType) { - this.operationType = operationType; - } - - public void unsetOperationType() { - this.operationType = null; - } - - /** Returns true if field operationType is set (has been assigned a value) and false otherwise */ - public boolean isSetOperationType() { - return this.operationType != null; - } - - public void setOperationTypeIsSet(boolean value) { - if (!value) { - this.operationType = null; - } - } - - public boolean isIsAcid() { - return this.isAcid; - } - - public void setIsAcid(boolean isAcid) { - this.isAcid = isAcid; - setIsAcidIsSet(true); - } - - public void unsetIsAcid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISACID_ISSET_ID); - } - - /** Returns true if field isAcid is set (has been assigned a value) and false otherwise */ - public boolean isSetIsAcid() { - return EncodingUtils.testBit(__isset_bitfield, __ISACID_ISSET_ID); - } - - public void setIsAcidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISACID_ISSET_ID, value); - } - - public boolean isIsDynamicPartitionWrite() { - return this.isDynamicPartitionWrite; - } - - public void setIsDynamicPartitionWrite(boolean isDynamicPartitionWrite) { - this.isDynamicPartitionWrite = isDynamicPartitionWrite; - setIsDynamicPartitionWriteIsSet(true); - } - - public void unsetIsDynamicPartitionWrite() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISDYNAMICPARTITIONWRITE_ISSET_ID); - } - - /** Returns true if field isDynamicPartitionWrite is set (has been assigned a value) and false otherwise */ - public boolean isSetIsDynamicPartitionWrite() { - return EncodingUtils.testBit(__isset_bitfield, __ISDYNAMICPARTITIONWRITE_ISSET_ID); - } - - public void setIsDynamicPartitionWriteIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISDYNAMICPARTITIONWRITE_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((LockType)value); - } - break; - - case LEVEL: - if (value == null) { - unsetLevel(); - } else { - setLevel((LockLevel)value); - } - break; - - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TABLENAME: - if (value == null) { - unsetTablename(); - } else { - setTablename((String)value); - } - break; - - case PARTITIONNAME: - if (value == null) { - unsetPartitionname(); - } else { - setPartitionname((String)value); - } - break; - - case OPERATION_TYPE: - if (value == null) { - unsetOperationType(); - } else { - setOperationType((DataOperationType)value); - } - break; - - case IS_ACID: - if (value == null) { - unsetIsAcid(); - } else { - setIsAcid((Boolean)value); - } - break; - - case IS_DYNAMIC_PARTITION_WRITE: - if (value == null) { - unsetIsDynamicPartitionWrite(); - } else { - setIsDynamicPartitionWrite((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TYPE: - return getType(); - - case LEVEL: - return getLevel(); - - case DBNAME: - return getDbname(); - - case TABLENAME: - return getTablename(); - - case PARTITIONNAME: - return getPartitionname(); - - case OPERATION_TYPE: - return getOperationType(); - - case IS_ACID: - return isIsAcid(); - - case IS_DYNAMIC_PARTITION_WRITE: - return isIsDynamicPartitionWrite(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TYPE: - return isSetType(); - case LEVEL: - return isSetLevel(); - case DBNAME: - return isSetDbname(); - case TABLENAME: - return isSetTablename(); - case PARTITIONNAME: - return isSetPartitionname(); - case OPERATION_TYPE: - return isSetOperationType(); - case IS_ACID: - return isSetIsAcid(); - case IS_DYNAMIC_PARTITION_WRITE: - return isSetIsDynamicPartitionWrite(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof LockComponent) - return this.equals((LockComponent)that); - return false; - } - - public boolean equals(LockComponent that) { - if (that == null) - return false; - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - boolean this_present_level = true && this.isSetLevel(); - boolean that_present_level = true && that.isSetLevel(); - if (this_present_level || that_present_level) { - if (!(this_present_level && that_present_level)) - return false; - if (!this.level.equals(that.level)) - return false; - } - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tablename = true && this.isSetTablename(); - boolean that_present_tablename = true && that.isSetTablename(); - if (this_present_tablename || that_present_tablename) { - if (!(this_present_tablename && that_present_tablename)) - return false; - if (!this.tablename.equals(that.tablename)) - return false; - } - - boolean this_present_partitionname = true && this.isSetPartitionname(); - boolean that_present_partitionname = true && that.isSetPartitionname(); - if (this_present_partitionname || that_present_partitionname) { - if (!(this_present_partitionname && that_present_partitionname)) - return false; - if (!this.partitionname.equals(that.partitionname)) - return false; - } - - boolean this_present_operationType = true && this.isSetOperationType(); - boolean that_present_operationType = true && that.isSetOperationType(); - if (this_present_operationType || that_present_operationType) { - if (!(this_present_operationType && that_present_operationType)) - return false; - if (!this.operationType.equals(that.operationType)) - return false; - } - - boolean this_present_isAcid = true && this.isSetIsAcid(); - boolean that_present_isAcid = true && that.isSetIsAcid(); - if (this_present_isAcid || that_present_isAcid) { - if (!(this_present_isAcid && that_present_isAcid)) - return false; - if (this.isAcid != that.isAcid) - return false; - } - - boolean this_present_isDynamicPartitionWrite = true && this.isSetIsDynamicPartitionWrite(); - boolean that_present_isDynamicPartitionWrite = true && that.isSetIsDynamicPartitionWrite(); - if (this_present_isDynamicPartitionWrite || that_present_isDynamicPartitionWrite) { - if (!(this_present_isDynamicPartitionWrite && that_present_isDynamicPartitionWrite)) - return false; - if (this.isDynamicPartitionWrite != that.isDynamicPartitionWrite) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type.getValue()); - - boolean present_level = true && (isSetLevel()); - list.add(present_level); - if (present_level) - list.add(level.getValue()); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_tablename = true && (isSetTablename()); - list.add(present_tablename); - if (present_tablename) - list.add(tablename); - - boolean present_partitionname = true && (isSetPartitionname()); - list.add(present_partitionname); - if (present_partitionname) - list.add(partitionname); - - boolean present_operationType = true && (isSetOperationType()); - list.add(present_operationType); - if (present_operationType) - list.add(operationType.getValue()); - - boolean present_isAcid = true && (isSetIsAcid()); - list.add(present_isAcid); - if (present_isAcid) - list.add(isAcid); - - boolean present_isDynamicPartitionWrite = true && (isSetIsDynamicPartitionWrite()); - list.add(present_isDynamicPartitionWrite); - if (present_isDynamicPartitionWrite) - list.add(isDynamicPartitionWrite); - - return list.hashCode(); - } - - @Override - public int compareTo(LockComponent other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLevel()).compareTo(other.isSetLevel()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLevel()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.level, other.level); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTablename()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartitionname()).compareTo(other.isSetPartitionname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitionname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionname, other.partitionname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(other.isSetOperationType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOperationType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsAcid()).compareTo(other.isSetIsAcid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsAcid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAcid, other.isAcid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsDynamicPartitionWrite()).compareTo(other.isSetIsDynamicPartitionWrite()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsDynamicPartitionWrite()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDynamicPartitionWrite, other.isDynamicPartitionWrite); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("LockComponent("); - boolean first = true; - - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - if (!first) sb.append(", "); - sb.append("level:"); - if (this.level == null) { - sb.append("null"); - } else { - sb.append(this.level); - } - first = false; - if (!first) sb.append(", "); - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (isSetTablename()) { - if (!first) sb.append(", "); - sb.append("tablename:"); - if (this.tablename == null) { - sb.append("null"); - } else { - sb.append(this.tablename); - } - first = false; - } - if (isSetPartitionname()) { - if (!first) sb.append(", "); - sb.append("partitionname:"); - if (this.partitionname == null) { - sb.append("null"); - } else { - sb.append(this.partitionname); - } - first = false; - } - if (isSetOperationType()) { - if (!first) sb.append(", "); - sb.append("operationType:"); - if (this.operationType == null) { - sb.append("null"); - } else { - sb.append(this.operationType); - } - first = false; - } - if (isSetIsAcid()) { - if (!first) sb.append(", "); - sb.append("isAcid:"); - sb.append(this.isAcid); - first = false; - } - if (isSetIsDynamicPartitionWrite()) { - if (!first) sb.append(", "); - sb.append("isDynamicPartitionWrite:"); - sb.append(this.isDynamicPartitionWrite); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); - } - - if (!isSetLevel()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'level' is unset! Struct:" + toString()); - } - - if (!isSetDbname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); - } - - // 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 { - // 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 LockComponentStandardSchemeFactory implements SchemeFactory { - public LockComponentStandardScheme getScheme() { - return new LockComponentStandardScheme(); - } - } - - private static class LockComponentStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, LockComponent 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.I32) { - struct.type = org.apache.hadoop.hive.metastore.api.LockType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // LEVEL - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.level = org.apache.hadoop.hive.metastore.api.LockLevel.findByValue(iprot.readI32()); - struct.setLevelIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // 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 4: // TABLENAME - 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 5: // PARTITIONNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.partitionname = iprot.readString(); - struct.setPartitionnameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // OPERATION_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32()); - struct.setOperationTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // IS_ACID - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isAcid = iprot.readBool(); - struct.setIsAcidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // IS_DYNAMIC_PARTITION_WRITE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isDynamicPartitionWrite = iprot.readBool(); - struct.setIsDynamicPartitionWriteIsSet(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, LockComponent struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI32(struct.type.getValue()); - oprot.writeFieldEnd(); - } - if (struct.level != null) { - oprot.writeFieldBegin(LEVEL_FIELD_DESC); - oprot.writeI32(struct.level.getValue()); - oprot.writeFieldEnd(); - } - if (struct.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(struct.dbname); - oprot.writeFieldEnd(); - } - if (struct.tablename != null) { - if (struct.isSetTablename()) { - oprot.writeFieldBegin(TABLENAME_FIELD_DESC); - oprot.writeString(struct.tablename); - oprot.writeFieldEnd(); - } - } - if (struct.partitionname != null) { - if (struct.isSetPartitionname()) { - oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC); - oprot.writeString(struct.partitionname); - oprot.writeFieldEnd(); - } - } - if (struct.operationType != null) { - if (struct.isSetOperationType()) { - oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC); - oprot.writeI32(struct.operationType.getValue()); - oprot.writeFieldEnd(); - } - } - if (struct.isSetIsAcid()) { - oprot.writeFieldBegin(IS_ACID_FIELD_DESC); - oprot.writeBool(struct.isAcid); - oprot.writeFieldEnd(); - } - if (struct.isSetIsDynamicPartitionWrite()) { - oprot.writeFieldBegin(IS_DYNAMIC_PARTITION_WRITE_FIELD_DESC); - oprot.writeBool(struct.isDynamicPartitionWrite); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class LockComponentTupleSchemeFactory implements SchemeFactory { - public LockComponentTupleScheme getScheme() { - return new LockComponentTupleScheme(); - } - } - - private static class LockComponentTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, LockComponent struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI32(struct.type.getValue()); - oprot.writeI32(struct.level.getValue()); - oprot.writeString(struct.dbname); - BitSet optionals = new BitSet(); - if (struct.isSetTablename()) { - optionals.set(0); - } - if (struct.isSetPartitionname()) { - optionals.set(1); - } - if (struct.isSetOperationType()) { - optionals.set(2); - } - if (struct.isSetIsAcid()) { - optionals.set(3); - } - if (struct.isSetIsDynamicPartitionWrite()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetTablename()) { - oprot.writeString(struct.tablename); - } - if (struct.isSetPartitionname()) { - oprot.writeString(struct.partitionname); - } - if (struct.isSetOperationType()) { - oprot.writeI32(struct.operationType.getValue()); - } - if (struct.isSetIsAcid()) { - oprot.writeBool(struct.isAcid); - } - if (struct.isSetIsDynamicPartitionWrite()) { - oprot.writeBool(struct.isDynamicPartitionWrite); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, LockComponent struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.type = org.apache.hadoop.hive.metastore.api.LockType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - struct.level = org.apache.hadoop.hive.metastore.api.LockLevel.findByValue(iprot.readI32()); - struct.setLevelIsSet(true); - struct.dbname = iprot.readString(); - struct.setDbnameIsSet(true); - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.tablename = iprot.readString(); - struct.setTablenameIsSet(true); - } - if (incoming.get(1)) { - struct.partitionname = iprot.readString(); - struct.setPartitionnameIsSet(true); - } - if (incoming.get(2)) { - struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32()); - struct.setOperationTypeIsSet(true); - } - if (incoming.get(3)) { - struct.isAcid = iprot.readBool(); - struct.setIsAcidIsSet(true); - } - if (incoming.get(4)) { - struct.isDynamicPartitionWrite = iprot.readBool(); - struct.setIsDynamicPartitionWriteIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockLevel.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockLevel.java deleted file mode 100644 index e58ea46..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockLevel.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum LockLevel implements org.apache.thrift.TEnum { - DB(1), - TABLE(2), - PARTITION(3); - - private final int value; - - private LockLevel(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static LockLevel findByValue(int value) { - switch (value) { - case 1: - return DB; - case 2: - return TABLE; - case 3: - return PARTITION; - default: - return null; - } - } -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java deleted file mode 100644 index 833adbb..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java +++ /dev/null @@ -1,861 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class LockRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LockRequest"); - - private static final org.apache.thrift.protocol.TField COMPONENT_FIELD_DESC = new org.apache.thrift.protocol.TField("component", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField AGENT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("agentInfo", org.apache.thrift.protocol.TType.STRING, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LockRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LockRequestTupleSchemeFactory()); - } - - private List component; // required - private long txnid; // optional - private String user; // required - private String hostname; // required - private String agentInfo; // 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 { - COMPONENT((short)1, "component"), - TXNID((short)2, "txnid"), - USER((short)3, "user"), - HOSTNAME((short)4, "hostname"), - AGENT_INFO((short)5, "agentInfo"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // COMPONENT - return COMPONENT; - case 2: // TXNID - return TXNID; - case 3: // USER - return USER; - case 4: // HOSTNAME - return HOSTNAME; - case 5: // AGENT_INFO - return AGENT_INFO; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __TXNID_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.TXNID,_Fields.AGENT_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); - tmpMap.put(_Fields.COMPONENT, new org.apache.thrift.meta_data.FieldMetaData("component", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LockComponent.class)))); - tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.AGENT_INFO, new org.apache.thrift.meta_data.FieldMetaData("agentInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LockRequest.class, metaDataMap); - } - - public LockRequest() { - this.agentInfo = "Unknown"; - - } - - public LockRequest( - List component, - String user, - String hostname) - { - this(); - this.component = component; - this.user = user; - this.hostname = hostname; - } - - /** - * Performs a deep copy on other. - */ - public LockRequest(LockRequest other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetComponent()) { - List __this__component = new ArrayList(other.component.size()); - for (LockComponent other_element : other.component) { - __this__component.add(new LockComponent(other_element)); - } - this.component = __this__component; - } - this.txnid = other.txnid; - if (other.isSetUser()) { - this.user = other.user; - } - if (other.isSetHostname()) { - this.hostname = other.hostname; - } - if (other.isSetAgentInfo()) { - this.agentInfo = other.agentInfo; - } - } - - public LockRequest deepCopy() { - return new LockRequest(this); - } - - @Override - public void clear() { - this.component = null; - setTxnidIsSet(false); - this.txnid = 0; - this.user = null; - this.hostname = null; - this.agentInfo = "Unknown"; - - } - - public int getComponentSize() { - return (this.component == null) ? 0 : this.component.size(); - } - - public java.util.Iterator getComponentIterator() { - return (this.component == null) ? null : this.component.iterator(); - } - - public void addToComponent(LockComponent elem) { - if (this.component == null) { - this.component = new ArrayList(); - } - this.component.add(elem); - } - - public List getComponent() { - return this.component; - } - - public void setComponent(List component) { - this.component = component; - } - - public void unsetComponent() { - this.component = null; - } - - /** Returns true if field component is set (has been assigned a value) and false otherwise */ - public boolean isSetComponent() { - return this.component != null; - } - - public void setComponentIsSet(boolean value) { - if (!value) { - this.component = null; - } - } - - public long getTxnid() { - return this.txnid; - } - - public void setTxnid(long txnid) { - this.txnid = txnid; - setTxnidIsSet(true); - } - - public void unsetTxnid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ - public boolean isSetTxnid() { - return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - public void setTxnidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); - } - - public String getUser() { - return this.user; - } - - public void setUser(String user) { - this.user = user; - } - - public void unsetUser() { - this.user = null; - } - - /** Returns true if field user is set (has been assigned a value) and false otherwise */ - public boolean isSetUser() { - return this.user != null; - } - - public void setUserIsSet(boolean value) { - if (!value) { - this.user = null; - } - } - - public String getHostname() { - return this.hostname; - } - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - public void unsetHostname() { - this.hostname = null; - } - - /** Returns true if field hostname is set (has been assigned a value) and false otherwise */ - public boolean isSetHostname() { - return this.hostname != null; - } - - public void setHostnameIsSet(boolean value) { - if (!value) { - this.hostname = null; - } - } - - public String getAgentInfo() { - return this.agentInfo; - } - - public void setAgentInfo(String agentInfo) { - this.agentInfo = agentInfo; - } - - public void unsetAgentInfo() { - this.agentInfo = null; - } - - /** Returns true if field agentInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetAgentInfo() { - return this.agentInfo != null; - } - - public void setAgentInfoIsSet(boolean value) { - if (!value) { - this.agentInfo = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case COMPONENT: - if (value == null) { - unsetComponent(); - } else { - setComponent((List)value); - } - break; - - case TXNID: - if (value == null) { - unsetTxnid(); - } else { - setTxnid((Long)value); - } - break; - - case USER: - if (value == null) { - unsetUser(); - } else { - setUser((String)value); - } - break; - - case HOSTNAME: - if (value == null) { - unsetHostname(); - } else { - setHostname((String)value); - } - break; - - case AGENT_INFO: - if (value == null) { - unsetAgentInfo(); - } else { - setAgentInfo((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case COMPONENT: - return getComponent(); - - case TXNID: - return getTxnid(); - - case USER: - return getUser(); - - case HOSTNAME: - return getHostname(); - - case AGENT_INFO: - return getAgentInfo(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case COMPONENT: - return isSetComponent(); - case TXNID: - return isSetTxnid(); - case USER: - return isSetUser(); - case HOSTNAME: - return isSetHostname(); - case AGENT_INFO: - return isSetAgentInfo(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof LockRequest) - return this.equals((LockRequest)that); - return false; - } - - public boolean equals(LockRequest that) { - if (that == null) - return false; - - boolean this_present_component = true && this.isSetComponent(); - boolean that_present_component = true && that.isSetComponent(); - if (this_present_component || that_present_component) { - if (!(this_present_component && that_present_component)) - return false; - if (!this.component.equals(that.component)) - return false; - } - - boolean this_present_txnid = true && this.isSetTxnid(); - boolean that_present_txnid = true && that.isSetTxnid(); - if (this_present_txnid || that_present_txnid) { - if (!(this_present_txnid && that_present_txnid)) - return false; - if (this.txnid != that.txnid) - return false; - } - - boolean this_present_user = true && this.isSetUser(); - boolean that_present_user = true && that.isSetUser(); - if (this_present_user || that_present_user) { - if (!(this_present_user && that_present_user)) - return false; - if (!this.user.equals(that.user)) - return false; - } - - boolean this_present_hostname = true && this.isSetHostname(); - boolean that_present_hostname = true && that.isSetHostname(); - if (this_present_hostname || that_present_hostname) { - if (!(this_present_hostname && that_present_hostname)) - return false; - if (!this.hostname.equals(that.hostname)) - return false; - } - - boolean this_present_agentInfo = true && this.isSetAgentInfo(); - boolean that_present_agentInfo = true && that.isSetAgentInfo(); - if (this_present_agentInfo || that_present_agentInfo) { - if (!(this_present_agentInfo && that_present_agentInfo)) - return false; - if (!this.agentInfo.equals(that.agentInfo)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_component = true && (isSetComponent()); - list.add(present_component); - if (present_component) - list.add(component); - - boolean present_txnid = true && (isSetTxnid()); - list.add(present_txnid); - if (present_txnid) - list.add(txnid); - - boolean present_user = true && (isSetUser()); - list.add(present_user); - if (present_user) - list.add(user); - - boolean present_hostname = true && (isSetHostname()); - list.add(present_hostname); - if (present_hostname) - list.add(hostname); - - boolean present_agentInfo = true && (isSetAgentInfo()); - list.add(present_agentInfo); - if (present_agentInfo) - list.add(agentInfo); - - return list.hashCode(); - } - - @Override - public int compareTo(LockRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetComponent()).compareTo(other.isSetComponent()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetComponent()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.component, other.component); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTxnid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUser()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHostname()).compareTo(other.isSetHostname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHostname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, other.hostname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAgentInfo()).compareTo(other.isSetAgentInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentInfo, other.agentInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("LockRequest("); - boolean first = true; - - sb.append("component:"); - if (this.component == null) { - sb.append("null"); - } else { - sb.append(this.component); - } - first = false; - if (isSetTxnid()) { - if (!first) sb.append(", "); - sb.append("txnid:"); - sb.append(this.txnid); - first = false; - } - if (!first) sb.append(", "); - sb.append("user:"); - if (this.user == null) { - sb.append("null"); - } else { - sb.append(this.user); - } - first = false; - if (!first) sb.append(", "); - sb.append("hostname:"); - if (this.hostname == null) { - sb.append("null"); - } else { - sb.append(this.hostname); - } - first = false; - if (isSetAgentInfo()) { - if (!first) sb.append(", "); - sb.append("agentInfo:"); - if (this.agentInfo == null) { - sb.append("null"); - } else { - sb.append(this.agentInfo); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetComponent()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'component' is unset! Struct:" + toString()); - } - - if (!isSetUser()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'user' is unset! Struct:" + toString()); - } - - if (!isSetHostname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'hostname' is unset! Struct:" + toString()); - } - - // 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 { - // 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 LockRequestStandardSchemeFactory implements SchemeFactory { - public LockRequestStandardScheme getScheme() { - return new LockRequestStandardScheme(); - } - } - - private static class LockRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, LockRequest 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: // COMPONENT - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list524 = iprot.readListBegin(); - struct.component = new ArrayList(_list524.size); - LockComponent _elem525; - for (int _i526 = 0; _i526 < _list524.size; ++_i526) - { - _elem525 = new LockComponent(); - _elem525.read(iprot); - struct.component.add(_elem525); - } - iprot.readListEnd(); - } - struct.setComponentIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TXNID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // USER - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.user = iprot.readString(); - struct.setUserIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // HOSTNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.hostname = iprot.readString(); - struct.setHostnameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // AGENT_INFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.agentInfo = iprot.readString(); - struct.setAgentInfoIsSet(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, LockRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.component != null) { - oprot.writeFieldBegin(COMPONENT_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.component.size())); - for (LockComponent _iter527 : struct.component) - { - _iter527.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetTxnid()) { - oprot.writeFieldBegin(TXNID_FIELD_DESC); - oprot.writeI64(struct.txnid); - oprot.writeFieldEnd(); - } - if (struct.user != null) { - oprot.writeFieldBegin(USER_FIELD_DESC); - oprot.writeString(struct.user); - oprot.writeFieldEnd(); - } - if (struct.hostname != null) { - oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); - oprot.writeString(struct.hostname); - oprot.writeFieldEnd(); - } - if (struct.agentInfo != null) { - if (struct.isSetAgentInfo()) { - oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC); - oprot.writeString(struct.agentInfo); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class LockRequestTupleSchemeFactory implements SchemeFactory { - public LockRequestTupleScheme getScheme() { - return new LockRequestTupleScheme(); - } - } - - private static class LockRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, LockRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.component.size()); - for (LockComponent _iter528 : struct.component) - { - _iter528.write(oprot); - } - } - oprot.writeString(struct.user); - oprot.writeString(struct.hostname); - BitSet optionals = new BitSet(); - if (struct.isSetTxnid()) { - optionals.set(0); - } - if (struct.isSetAgentInfo()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetTxnid()) { - oprot.writeI64(struct.txnid); - } - if (struct.isSetAgentInfo()) { - oprot.writeString(struct.agentInfo); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, LockRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list529 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.component = new ArrayList(_list529.size); - LockComponent _elem530; - for (int _i531 = 0; _i531 < _list529.size; ++_i531) - { - _elem530 = new LockComponent(); - _elem530.read(iprot); - struct.component.add(_elem530); - } - } - struct.setComponentIsSet(true); - struct.user = iprot.readString(); - struct.setUserIsSet(true); - struct.hostname = iprot.readString(); - struct.setHostnameIsSet(true); - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(true); - } - if (incoming.get(1)) { - struct.agentInfo = iprot.readString(); - struct.setAgentInfoIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockResponse.java deleted file mode 100644 index 862c67f..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockResponse.java +++ /dev/null @@ -1,500 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class LockResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LockResponse"); - - private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1); - 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)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LockResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LockResponseTupleSchemeFactory()); - } - - private long lockid; // required - private LockState state; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - LOCKID((short)1, "lockid"), - /** - * - * @see LockState - */ - STATE((short)2, "state"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // LOCKID - return LOCKID; - case 2: // STATE - return STATE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __LOCKID_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockState.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LockResponse.class, metaDataMap); - } - - public LockResponse() { - } - - public LockResponse( - long lockid, - LockState state) - { - this(); - this.lockid = lockid; - setLockidIsSet(true); - this.state = state; - } - - /** - * Performs a deep copy on other. - */ - public LockResponse(LockResponse other) { - __isset_bitfield = other.__isset_bitfield; - this.lockid = other.lockid; - if (other.isSetState()) { - this.state = other.state; - } - } - - public LockResponse deepCopy() { - return new LockResponse(this); - } - - @Override - public void clear() { - setLockidIsSet(false); - this.lockid = 0; - this.state = null; - } - - public long getLockid() { - return this.lockid; - } - - public void setLockid(long lockid) { - this.lockid = lockid; - setLockidIsSet(true); - } - - public void unsetLockid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKID_ISSET_ID); - } - - /** Returns true if field lockid is set (has been assigned a value) and false otherwise */ - public boolean isSetLockid() { - return EncodingUtils.testBit(__isset_bitfield, __LOCKID_ISSET_ID); - } - - public void setLockidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value); - } - - /** - * - * @see LockState - */ - public LockState getState() { - return this.state; - } - - /** - * - * @see LockState - */ - public void setState(LockState state) { - this.state = state; - } - - public void unsetState() { - this.state = null; - } - - /** Returns true if field state is set (has been assigned a value) and false otherwise */ - public boolean isSetState() { - return this.state != null; - } - - public void setStateIsSet(boolean value) { - if (!value) { - this.state = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LOCKID: - if (value == null) { - unsetLockid(); - } else { - setLockid((Long)value); - } - break; - - case STATE: - if (value == null) { - unsetState(); - } else { - setState((LockState)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LOCKID: - return getLockid(); - - case STATE: - return getState(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LOCKID: - return isSetLockid(); - case STATE: - return isSetState(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof LockResponse) - return this.equals((LockResponse)that); - return false; - } - - public boolean equals(LockResponse that) { - if (that == null) - return false; - - boolean this_present_lockid = true; - boolean that_present_lockid = true; - if (this_present_lockid || that_present_lockid) { - if (!(this_present_lockid && that_present_lockid)) - return false; - if (this.lockid != that.lockid) - return false; - } - - boolean this_present_state = true && this.isSetState(); - boolean that_present_state = true && that.isSetState(); - if (this_present_state || that_present_state) { - if (!(this_present_state && that_present_state)) - return false; - if (!this.state.equals(that.state)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_lockid = true; - list.add(present_lockid); - if (present_lockid) - list.add(lockid); - - boolean present_state = true && (isSetState()); - list.add(present_state); - if (present_state) - list.add(state.getValue()); - - return list.hashCode(); - } - - @Override - public int compareTo(LockResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLockid()).compareTo(other.isSetLockid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLockid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, other.lockid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetState()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("LockResponse("); - boolean first = true; - - sb.append("lockid:"); - sb.append(this.lockid); - first = false; - if (!first) sb.append(", "); - sb.append("state:"); - if (this.state == null) { - sb.append("null"); - } else { - sb.append(this.state); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetLockid()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'lockid' is unset! Struct:" + toString()); - } - - if (!isSetState()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); - } - - // 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 { - // 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 LockResponseStandardSchemeFactory implements SchemeFactory { - public LockResponseStandardScheme getScheme() { - return new LockResponseStandardScheme(); - } - } - - private static class LockResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, LockResponse 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: // LOCKID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.lockid = iprot.readI64(); - struct.setLockidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STATE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.state = org.apache.hadoop.hive.metastore.api.LockState.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, LockResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(LOCKID_FIELD_DESC); - oprot.writeI64(struct.lockid); - 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 LockResponseTupleSchemeFactory implements SchemeFactory { - public LockResponseTupleScheme getScheme() { - return new LockResponseTupleScheme(); - } - } - - private static class LockResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, LockResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.lockid); - oprot.writeI32(struct.state.getValue()); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, LockResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.lockid = iprot.readI64(); - struct.setLockidIsSet(true); - struct.state = org.apache.hadoop.hive.metastore.api.LockState.findByValue(iprot.readI32()); - struct.setStateIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockState.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockState.java deleted file mode 100644 index 48a0bbd..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockState.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum LockState implements org.apache.thrift.TEnum { - ACQUIRED(1), - WAITING(2), - ABORT(3), - NOT_ACQUIRED(4); - - private final int value; - - private LockState(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static LockState findByValue(int value) { - switch (value) { - case 1: - return ACQUIRED; - case 2: - return WAITING; - case 3: - return ABORT; - case 4: - return NOT_ACQUIRED; - default: - return null; - } - } -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockType.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockType.java deleted file mode 100644 index 8ae4351..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockType.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum LockType implements org.apache.thrift.TEnum { - SHARED_READ(1), - SHARED_WRITE(2), - EXCLUSIVE(3); - - private final int value; - - private LockType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static LockType findByValue(int value) { - switch (value) { - case 1: - return SHARED_READ; - case 2: - return SHARED_WRITE; - case 3: - return EXCLUSIVE; - default: - return null; - } - } -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java deleted file mode 100644 index 4404706..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java +++ /dev/null @@ -1,790 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class LongColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LongColumnStatsData"); - - private static final org.apache.thrift.protocol.TField LOW_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("lowValue", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField HIGH_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("highValue", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LongColumnStatsDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LongColumnStatsDataTupleSchemeFactory()); - } - - private long lowValue; // optional - private long highValue; // optional - private long numNulls; // required - private long numDVs; // required - private String bitVectors; // 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 { - LOW_VALUE((short)1, "lowValue"), - HIGH_VALUE((short)2, "highValue"), - NUM_NULLS((short)3, "numNulls"), - NUM_DVS((short)4, "numDVs"), - BIT_VECTORS((short)5, "bitVectors"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // LOW_VALUE - return LOW_VALUE; - case 2: // HIGH_VALUE - return HIGH_VALUE; - case 3: // NUM_NULLS - return NUM_NULLS; - case 4: // NUM_DVS - return NUM_DVS; - case 5: // BIT_VECTORS - return BIT_VECTORS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __LOWVALUE_ISSET_ID = 0; - private static final int __HIGHVALUE_ISSET_ID = 1; - private static final int __NUMNULLS_ISSET_ID = 2; - private static final int __NUMDVS_ISSET_ID = 3; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.LOW_VALUE,_Fields.HIGH_VALUE,_Fields.BIT_VECTORS}; - 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); - tmpMap.put(_Fields.LOW_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lowValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.HIGH_VALUE, new org.apache.thrift.meta_data.FieldMetaData("highValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LongColumnStatsData.class, metaDataMap); - } - - public LongColumnStatsData() { - } - - public LongColumnStatsData( - long numNulls, - long numDVs) - { - this(); - this.numNulls = numNulls; - setNumNullsIsSet(true); - this.numDVs = numDVs; - setNumDVsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public LongColumnStatsData(LongColumnStatsData other) { - __isset_bitfield = other.__isset_bitfield; - this.lowValue = other.lowValue; - this.highValue = other.highValue; - this.numNulls = other.numNulls; - this.numDVs = other.numDVs; - if (other.isSetBitVectors()) { - this.bitVectors = other.bitVectors; - } - } - - public LongColumnStatsData deepCopy() { - return new LongColumnStatsData(this); - } - - @Override - public void clear() { - setLowValueIsSet(false); - this.lowValue = 0; - setHighValueIsSet(false); - this.highValue = 0; - setNumNullsIsSet(false); - this.numNulls = 0; - setNumDVsIsSet(false); - this.numDVs = 0; - this.bitVectors = null; - } - - public long getLowValue() { - return this.lowValue; - } - - public void setLowValue(long lowValue) { - this.lowValue = lowValue; - setLowValueIsSet(true); - } - - public void unsetLowValue() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOWVALUE_ISSET_ID); - } - - /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ - public boolean isSetLowValue() { - return EncodingUtils.testBit(__isset_bitfield, __LOWVALUE_ISSET_ID); - } - - public void setLowValueIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOWVALUE_ISSET_ID, value); - } - - public long getHighValue() { - return this.highValue; - } - - public void setHighValue(long highValue) { - this.highValue = highValue; - setHighValueIsSet(true); - } - - public void unsetHighValue() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HIGHVALUE_ISSET_ID); - } - - /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ - public boolean isSetHighValue() { - return EncodingUtils.testBit(__isset_bitfield, __HIGHVALUE_ISSET_ID); - } - - public void setHighValueIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HIGHVALUE_ISSET_ID, value); - } - - public long getNumNulls() { - return this.numNulls; - } - - public void setNumNulls(long numNulls) { - this.numNulls = numNulls; - setNumNullsIsSet(true); - } - - public void unsetNumNulls() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ - public boolean isSetNumNulls() { - return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - public void setNumNullsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); - } - - public long getNumDVs() { - return this.numDVs; - } - - public void setNumDVs(long numDVs) { - this.numDVs = numDVs; - setNumDVsIsSet(true); - } - - public void unsetNumDVs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); - } - - /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ - public boolean isSetNumDVs() { - return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); - } - - public void setNumDVsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); - } - - public String getBitVectors() { - return this.bitVectors; - } - - public void setBitVectors(String bitVectors) { - this.bitVectors = bitVectors; - } - - public void unsetBitVectors() { - this.bitVectors = null; - } - - /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ - public boolean isSetBitVectors() { - return this.bitVectors != null; - } - - public void setBitVectorsIsSet(boolean value) { - if (!value) { - this.bitVectors = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LOW_VALUE: - if (value == null) { - unsetLowValue(); - } else { - setLowValue((Long)value); - } - break; - - case HIGH_VALUE: - if (value == null) { - unsetHighValue(); - } else { - setHighValue((Long)value); - } - break; - - case NUM_NULLS: - if (value == null) { - unsetNumNulls(); - } else { - setNumNulls((Long)value); - } - break; - - case NUM_DVS: - if (value == null) { - unsetNumDVs(); - } else { - setNumDVs((Long)value); - } - break; - - case BIT_VECTORS: - if (value == null) { - unsetBitVectors(); - } else { - setBitVectors((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LOW_VALUE: - return getLowValue(); - - case HIGH_VALUE: - return getHighValue(); - - case NUM_NULLS: - return getNumNulls(); - - case NUM_DVS: - return getNumDVs(); - - case BIT_VECTORS: - return getBitVectors(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LOW_VALUE: - return isSetLowValue(); - case HIGH_VALUE: - return isSetHighValue(); - case NUM_NULLS: - return isSetNumNulls(); - case NUM_DVS: - return isSetNumDVs(); - case BIT_VECTORS: - return isSetBitVectors(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof LongColumnStatsData) - return this.equals((LongColumnStatsData)that); - return false; - } - - public boolean equals(LongColumnStatsData that) { - if (that == null) - return false; - - boolean this_present_lowValue = true && this.isSetLowValue(); - boolean that_present_lowValue = true && that.isSetLowValue(); - if (this_present_lowValue || that_present_lowValue) { - if (!(this_present_lowValue && that_present_lowValue)) - return false; - if (this.lowValue != that.lowValue) - return false; - } - - boolean this_present_highValue = true && this.isSetHighValue(); - boolean that_present_highValue = true && that.isSetHighValue(); - if (this_present_highValue || that_present_highValue) { - if (!(this_present_highValue && that_present_highValue)) - return false; - if (this.highValue != that.highValue) - return false; - } - - boolean this_present_numNulls = true; - boolean that_present_numNulls = true; - if (this_present_numNulls || that_present_numNulls) { - if (!(this_present_numNulls && that_present_numNulls)) - return false; - if (this.numNulls != that.numNulls) - return false; - } - - boolean this_present_numDVs = true; - boolean that_present_numDVs = true; - if (this_present_numDVs || that_present_numDVs) { - if (!(this_present_numDVs && that_present_numDVs)) - return false; - if (this.numDVs != that.numDVs) - return false; - } - - boolean this_present_bitVectors = true && this.isSetBitVectors(); - boolean that_present_bitVectors = true && that.isSetBitVectors(); - if (this_present_bitVectors || that_present_bitVectors) { - if (!(this_present_bitVectors && that_present_bitVectors)) - return false; - if (!this.bitVectors.equals(that.bitVectors)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_lowValue = true && (isSetLowValue()); - list.add(present_lowValue); - if (present_lowValue) - list.add(lowValue); - - boolean present_highValue = true && (isSetHighValue()); - list.add(present_highValue); - if (present_highValue) - list.add(highValue); - - boolean present_numNulls = true; - list.add(present_numNulls); - if (present_numNulls) - list.add(numNulls); - - boolean present_numDVs = true; - list.add(present_numDVs); - if (present_numDVs) - list.add(numDVs); - - boolean present_bitVectors = true && (isSetBitVectors()); - list.add(present_bitVectors); - if (present_bitVectors) - list.add(bitVectors); - - return list.hashCode(); - } - - @Override - public int compareTo(LongColumnStatsData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLowValue()).compareTo(other.isSetLowValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLowValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lowValue, other.lowValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHighValue()).compareTo(other.isSetHighValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHighValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.highValue, other.highValue); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(other.isSetNumDVs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumDVs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, other.numDVs); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBitVectors()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("LongColumnStatsData("); - boolean first = true; - - if (isSetLowValue()) { - sb.append("lowValue:"); - sb.append(this.lowValue); - first = false; - } - if (isSetHighValue()) { - if (!first) sb.append(", "); - sb.append("highValue:"); - sb.append(this.highValue); - first = false; - } - if (!first) sb.append(", "); - sb.append("numNulls:"); - sb.append(this.numNulls); - first = false; - if (!first) sb.append(", "); - sb.append("numDVs:"); - sb.append(this.numDVs); - first = false; - if (isSetBitVectors()) { - if (!first) sb.append(", "); - sb.append("bitVectors:"); - if (this.bitVectors == null) { - sb.append("null"); - } else { - sb.append(this.bitVectors); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetNumNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); - } - - if (!isSetNumDVs()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); - } - - // 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 { - // 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 LongColumnStatsDataStandardSchemeFactory implements SchemeFactory { - public LongColumnStatsDataStandardScheme getScheme() { - return new LongColumnStatsDataStandardScheme(); - } - } - - private static class LongColumnStatsDataStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, LongColumnStatsData 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: // LOW_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.lowValue = iprot.readI64(); - struct.setLowValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // HIGH_VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.highValue = iprot.readI64(); - struct.setHighValueIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NUM_NULLS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // NUM_DVS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numDVs = iprot.readI64(); - struct.setNumDVsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // BIT_VECTORS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(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, LongColumnStatsData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetLowValue()) { - oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); - oprot.writeI64(struct.lowValue); - oprot.writeFieldEnd(); - } - if (struct.isSetHighValue()) { - oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); - oprot.writeI64(struct.highValue); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); - oprot.writeI64(struct.numNulls); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); - oprot.writeI64(struct.numDVs); - oprot.writeFieldEnd(); - if (struct.bitVectors != null) { - if (struct.isSetBitVectors()) { - oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); - oprot.writeString(struct.bitVectors); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class LongColumnStatsDataTupleSchemeFactory implements SchemeFactory { - public LongColumnStatsDataTupleScheme getScheme() { - return new LongColumnStatsDataTupleScheme(); - } - } - - private static class LongColumnStatsDataTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, LongColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.numNulls); - oprot.writeI64(struct.numDVs); - BitSet optionals = new BitSet(); - if (struct.isSetLowValue()) { - optionals.set(0); - } - if (struct.isSetHighValue()) { - optionals.set(1); - } - if (struct.isSetBitVectors()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetLowValue()) { - oprot.writeI64(struct.lowValue); - } - if (struct.isSetHighValue()) { - oprot.writeI64(struct.highValue); - } - if (struct.isSetBitVectors()) { - oprot.writeString(struct.bitVectors); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, LongColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - struct.numDVs = iprot.readI64(); - struct.setNumDVsIsSet(true); - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.lowValue = iprot.readI64(); - struct.setLowValueIsSet(true); - } - if (incoming.get(1)) { - struct.highValue = iprot.readI64(); - struct.setHighValueIsSet(true); - } - if (incoming.get(2)) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index 21be66b..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class MetaException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MetaException.class, metaDataMap); - } - - public MetaException() { - } - - public MetaException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public MetaException(MetaException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public MetaException deepCopy() { - return new MetaException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof MetaException) - return this.equals((MetaException)that); - return false; - } - - public boolean equals(MetaException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(MetaException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("MetaException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 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); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetadataPpdResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetadataPpdResult.java deleted file mode 100644 index 87fad1a..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetadataPpdResult.java +++ /dev/null @@ -1,517 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class MetadataPpdResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MetadataPpdResult"); - - private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField INCLUDE_BITSET_FIELD_DESC = new org.apache.thrift.protocol.TField("includeBitset", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new MetadataPpdResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new MetadataPpdResultTupleSchemeFactory()); - } - - private ByteBuffer metadata; // optional - private ByteBuffer includeBitset; // 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 { - METADATA((short)1, "metadata"), - INCLUDE_BITSET((short)2, "includeBitset"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // METADATA - return METADATA; - case 2: // INCLUDE_BITSET - return INCLUDE_BITSET; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.METADATA,_Fields.INCLUDE_BITSET}; - 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); - tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.INCLUDE_BITSET, new org.apache.thrift.meta_data.FieldMetaData("includeBitset", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MetadataPpdResult.class, metaDataMap); - } - - public MetadataPpdResult() { - } - - /** - * Performs a deep copy on other. - */ - public MetadataPpdResult(MetadataPpdResult other) { - if (other.isSetMetadata()) { - this.metadata = org.apache.thrift.TBaseHelper.copyBinary(other.metadata); - } - if (other.isSetIncludeBitset()) { - this.includeBitset = org.apache.thrift.TBaseHelper.copyBinary(other.includeBitset); - } - } - - public MetadataPpdResult deepCopy() { - return new MetadataPpdResult(this); - } - - @Override - public void clear() { - this.metadata = null; - this.includeBitset = null; - } - - public byte[] getMetadata() { - setMetadata(org.apache.thrift.TBaseHelper.rightSize(metadata)); - return metadata == null ? null : metadata.array(); - } - - public ByteBuffer bufferForMetadata() { - return org.apache.thrift.TBaseHelper.copyBinary(metadata); - } - - public void setMetadata(byte[] metadata) { - this.metadata = metadata == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(metadata, metadata.length)); - } - - public void setMetadata(ByteBuffer metadata) { - this.metadata = org.apache.thrift.TBaseHelper.copyBinary(metadata); - } - - public void unsetMetadata() { - this.metadata = null; - } - - /** Returns true if field metadata is set (has been assigned a value) and false otherwise */ - public boolean isSetMetadata() { - return this.metadata != null; - } - - public void setMetadataIsSet(boolean value) { - if (!value) { - this.metadata = null; - } - } - - public byte[] getIncludeBitset() { - setIncludeBitset(org.apache.thrift.TBaseHelper.rightSize(includeBitset)); - return includeBitset == null ? null : includeBitset.array(); - } - - public ByteBuffer bufferForIncludeBitset() { - return org.apache.thrift.TBaseHelper.copyBinary(includeBitset); - } - - public void setIncludeBitset(byte[] includeBitset) { - this.includeBitset = includeBitset == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(includeBitset, includeBitset.length)); - } - - public void setIncludeBitset(ByteBuffer includeBitset) { - this.includeBitset = org.apache.thrift.TBaseHelper.copyBinary(includeBitset); - } - - public void unsetIncludeBitset() { - this.includeBitset = null; - } - - /** Returns true if field includeBitset is set (has been assigned a value) and false otherwise */ - public boolean isSetIncludeBitset() { - return this.includeBitset != null; - } - - public void setIncludeBitsetIsSet(boolean value) { - if (!value) { - this.includeBitset = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case METADATA: - if (value == null) { - unsetMetadata(); - } else { - setMetadata((ByteBuffer)value); - } - break; - - case INCLUDE_BITSET: - if (value == null) { - unsetIncludeBitset(); - } else { - setIncludeBitset((ByteBuffer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case METADATA: - return getMetadata(); - - case INCLUDE_BITSET: - return getIncludeBitset(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case METADATA: - return isSetMetadata(); - case INCLUDE_BITSET: - return isSetIncludeBitset(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof MetadataPpdResult) - return this.equals((MetadataPpdResult)that); - return false; - } - - public boolean equals(MetadataPpdResult that) { - if (that == null) - return false; - - boolean this_present_metadata = true && this.isSetMetadata(); - boolean that_present_metadata = true && that.isSetMetadata(); - if (this_present_metadata || that_present_metadata) { - if (!(this_present_metadata && that_present_metadata)) - return false; - if (!this.metadata.equals(that.metadata)) - return false; - } - - boolean this_present_includeBitset = true && this.isSetIncludeBitset(); - boolean that_present_includeBitset = true && that.isSetIncludeBitset(); - if (this_present_includeBitset || that_present_includeBitset) { - if (!(this_present_includeBitset && that_present_includeBitset)) - return false; - if (!this.includeBitset.equals(that.includeBitset)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_metadata = true && (isSetMetadata()); - list.add(present_metadata); - if (present_metadata) - list.add(metadata); - - boolean present_includeBitset = true && (isSetIncludeBitset()); - list.add(present_includeBitset); - if (present_includeBitset) - list.add(includeBitset); - - return list.hashCode(); - } - - @Override - public int compareTo(MetadataPpdResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMetadata()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIncludeBitset()).compareTo(other.isSetIncludeBitset()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIncludeBitset()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.includeBitset, other.includeBitset); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("MetadataPpdResult("); - boolean first = true; - - if (isSetMetadata()) { - sb.append("metadata:"); - if (this.metadata == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.metadata, sb); - } - first = false; - } - if (isSetIncludeBitset()) { - if (!first) sb.append(", "); - sb.append("includeBitset:"); - if (this.includeBitset == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.includeBitset, sb); - } - 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 MetadataPpdResultStandardSchemeFactory implements SchemeFactory { - public MetadataPpdResultStandardScheme getScheme() { - return new MetadataPpdResultStandardScheme(); - } - } - - private static class MetadataPpdResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, MetadataPpdResult 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: // METADATA - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.metadata = iprot.readBinary(); - struct.setMetadataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // INCLUDE_BITSET - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.includeBitset = iprot.readBinary(); - struct.setIncludeBitsetIsSet(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, MetadataPpdResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.metadata != null) { - if (struct.isSetMetadata()) { - oprot.writeFieldBegin(METADATA_FIELD_DESC); - oprot.writeBinary(struct.metadata); - oprot.writeFieldEnd(); - } - } - if (struct.includeBitset != null) { - if (struct.isSetIncludeBitset()) { - oprot.writeFieldBegin(INCLUDE_BITSET_FIELD_DESC); - oprot.writeBinary(struct.includeBitset); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class MetadataPpdResultTupleSchemeFactory implements SchemeFactory { - public MetadataPpdResultTupleScheme getScheme() { - return new MetadataPpdResultTupleScheme(); - } - } - - private static class MetadataPpdResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, MetadataPpdResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetMetadata()) { - optionals.set(0); - } - if (struct.isSetIncludeBitset()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetMetadata()) { - oprot.writeBinary(struct.metadata); - } - if (struct.isSetIncludeBitset()) { - oprot.writeBinary(struct.includeBitset); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, MetadataPpdResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.metadata = iprot.readBinary(); - struct.setMetadataIsSet(true); - } - if (incoming.get(1)) { - struct.includeBitset = iprot.readBinary(); - struct.setIncludeBitsetIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchLockException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchLockException.java deleted file mode 100644 index aefbe4a..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchLockException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class NoSuchLockException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NoSuchLockException"); - - 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 NoSuchLockExceptionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new NoSuchLockExceptionTupleSchemeFactory()); - } - - private String message; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NoSuchLockException.class, metaDataMap); - } - - public NoSuchLockException() { - } - - public NoSuchLockException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public NoSuchLockException(NoSuchLockException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public NoSuchLockException deepCopy() { - return new NoSuchLockException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof NoSuchLockException) - return this.equals((NoSuchLockException)that); - return false; - } - - public boolean equals(NoSuchLockException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(NoSuchLockException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("NoSuchLockException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 NoSuchLockExceptionStandardSchemeFactory implements SchemeFactory { - public NoSuchLockExceptionStandardScheme getScheme() { - return new NoSuchLockExceptionStandardScheme(); - } - } - - private static class NoSuchLockExceptionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, NoSuchLockException 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, NoSuchLockException 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 NoSuchLockExceptionTupleSchemeFactory implements SchemeFactory { - public NoSuchLockExceptionTupleScheme getScheme() { - return new NoSuchLockExceptionTupleScheme(); - } - } - - private static class NoSuchLockExceptionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, NoSuchLockException 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, NoSuchLockException 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); - } - } - } - -} - diff --git 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 deleted file mode 100644 index efa5326..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class NoSuchObjectException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NoSuchObjectException.class, metaDataMap); - } - - public NoSuchObjectException() { - } - - public NoSuchObjectException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public NoSuchObjectException(NoSuchObjectException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public NoSuchObjectException deepCopy() { - return new NoSuchObjectException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof NoSuchObjectException) - return this.equals((NoSuchObjectException)that); - return false; - } - - public boolean equals(NoSuchObjectException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(NoSuchObjectException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("NoSuchObjectException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 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); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchTxnException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchTxnException.java deleted file mode 100644 index 8149d9c..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchTxnException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class NoSuchTxnException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NoSuchTxnException"); - - 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 NoSuchTxnExceptionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new NoSuchTxnExceptionTupleSchemeFactory()); - } - - private String message; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NoSuchTxnException.class, metaDataMap); - } - - public NoSuchTxnException() { - } - - public NoSuchTxnException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public NoSuchTxnException(NoSuchTxnException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public NoSuchTxnException deepCopy() { - return new NoSuchTxnException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof NoSuchTxnException) - return this.equals((NoSuchTxnException)that); - return false; - } - - public boolean equals(NoSuchTxnException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(NoSuchTxnException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("NoSuchTxnException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 NoSuchTxnExceptionStandardSchemeFactory implements SchemeFactory { - public NoSuchTxnExceptionStandardScheme getScheme() { - return new NoSuchTxnExceptionStandardScheme(); - } - } - - private static class NoSuchTxnExceptionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, NoSuchTxnException 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, NoSuchTxnException 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 NoSuchTxnExceptionTupleSchemeFactory implements SchemeFactory { - public NoSuchTxnExceptionTupleScheme getScheme() { - return new NoSuchTxnExceptionTupleScheme(); - } - } - - private static class NoSuchTxnExceptionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, NoSuchTxnException 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, NoSuchTxnException 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); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsRequest.java deleted file mode 100644 index d12e270..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsRequest.java +++ /dev/null @@ -1,490 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class NotNullConstraintsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotNullConstraintsRequest"); - - 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 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 NotNullConstraintsRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new NotNullConstraintsRequestTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotNullConstraintsRequest.class, metaDataMap); - } - - public NotNullConstraintsRequest() { - } - - public NotNullConstraintsRequest( - String db_name, - String tbl_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - } - - /** - * Performs a deep copy on other. - */ - public NotNullConstraintsRequest(NotNullConstraintsRequest other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - } - - public NotNullConstraintsRequest deepCopy() { - return new NotNullConstraintsRequest(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof NotNullConstraintsRequest) - return this.equals((NotNullConstraintsRequest)that); - return false; - } - - public boolean equals(NotNullConstraintsRequest that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - return list.hashCode(); - } - - @Override - public int compareTo(NotNullConstraintsRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("NotNullConstraintsRequest("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDb_name()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'db_name' is unset! Struct:" + toString()); - } - - if (!isSetTbl_name()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tbl_name' is unset! Struct:" + toString()); - } - - // 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 NotNullConstraintsRequestStandardSchemeFactory implements SchemeFactory { - public NotNullConstraintsRequestStandardScheme getScheme() { - return new NotNullConstraintsRequestStandardScheme(); - } - } - - private static class NotNullConstraintsRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, NotNullConstraintsRequest 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; - 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, NotNullConstraintsRequest 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.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class NotNullConstraintsRequestTupleSchemeFactory implements SchemeFactory { - public NotNullConstraintsRequestTupleScheme getScheme() { - return new NotNullConstraintsRequestTupleScheme(); - } - } - - private static class NotNullConstraintsRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, NotNullConstraintsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.db_name); - oprot.writeString(struct.tbl_name); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, NotNullConstraintsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.db_name = iprot.readString(); - struct.setDb_nameIsSet(true); - struct.tbl_name = iprot.readString(); - struct.setTbl_nameIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsResponse.java deleted file mode 100644 index b49895b..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsResponse.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class NotNullConstraintsResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotNullConstraintsResponse"); - - private static final org.apache.thrift.protocol.TField NOT_NULL_CONSTRAINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("notNullConstraints", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new NotNullConstraintsResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new NotNullConstraintsResponseTupleSchemeFactory()); - } - - private List notNullConstraints; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NOT_NULL_CONSTRAINTS((short)1, "notNullConstraints"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NOT_NULL_CONSTRAINTS - return NOT_NULL_CONSTRAINTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NOT_NULL_CONSTRAINTS, new org.apache.thrift.meta_data.FieldMetaData("notNullConstraints", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLNotNullConstraint.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotNullConstraintsResponse.class, metaDataMap); - } - - public NotNullConstraintsResponse() { - } - - public NotNullConstraintsResponse( - List notNullConstraints) - { - this(); - this.notNullConstraints = notNullConstraints; - } - - /** - * Performs a deep copy on other. - */ - public NotNullConstraintsResponse(NotNullConstraintsResponse other) { - if (other.isSetNotNullConstraints()) { - List __this__notNullConstraints = new ArrayList(other.notNullConstraints.size()); - for (SQLNotNullConstraint other_element : other.notNullConstraints) { - __this__notNullConstraints.add(new SQLNotNullConstraint(other_element)); - } - this.notNullConstraints = __this__notNullConstraints; - } - } - - public NotNullConstraintsResponse deepCopy() { - return new NotNullConstraintsResponse(this); - } - - @Override - public void clear() { - this.notNullConstraints = null; - } - - public int getNotNullConstraintsSize() { - return (this.notNullConstraints == null) ? 0 : this.notNullConstraints.size(); - } - - public java.util.Iterator getNotNullConstraintsIterator() { - return (this.notNullConstraints == null) ? null : this.notNullConstraints.iterator(); - } - - public void addToNotNullConstraints(SQLNotNullConstraint elem) { - if (this.notNullConstraints == null) { - this.notNullConstraints = new ArrayList(); - } - this.notNullConstraints.add(elem); - } - - public List getNotNullConstraints() { - return this.notNullConstraints; - } - - public void setNotNullConstraints(List notNullConstraints) { - this.notNullConstraints = notNullConstraints; - } - - public void unsetNotNullConstraints() { - this.notNullConstraints = null; - } - - /** Returns true if field notNullConstraints is set (has been assigned a value) and false otherwise */ - public boolean isSetNotNullConstraints() { - return this.notNullConstraints != null; - } - - public void setNotNullConstraintsIsSet(boolean value) { - if (!value) { - this.notNullConstraints = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NOT_NULL_CONSTRAINTS: - if (value == null) { - unsetNotNullConstraints(); - } else { - setNotNullConstraints((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NOT_NULL_CONSTRAINTS: - return getNotNullConstraints(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NOT_NULL_CONSTRAINTS: - return isSetNotNullConstraints(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof NotNullConstraintsResponse) - return this.equals((NotNullConstraintsResponse)that); - return false; - } - - public boolean equals(NotNullConstraintsResponse that) { - if (that == null) - return false; - - boolean this_present_notNullConstraints = true && this.isSetNotNullConstraints(); - boolean that_present_notNullConstraints = true && that.isSetNotNullConstraints(); - if (this_present_notNullConstraints || that_present_notNullConstraints) { - if (!(this_present_notNullConstraints && that_present_notNullConstraints)) - return false; - if (!this.notNullConstraints.equals(that.notNullConstraints)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_notNullConstraints = true && (isSetNotNullConstraints()); - list.add(present_notNullConstraints); - if (present_notNullConstraints) - list.add(notNullConstraints); - - return list.hashCode(); - } - - @Override - public int compareTo(NotNullConstraintsResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetNotNullConstraints()).compareTo(other.isSetNotNullConstraints()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNotNullConstraints()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notNullConstraints, other.notNullConstraints); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("NotNullConstraintsResponse("); - boolean first = true; - - sb.append("notNullConstraints:"); - if (this.notNullConstraints == null) { - sb.append("null"); - } else { - sb.append(this.notNullConstraints); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetNotNullConstraints()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'notNullConstraints' is unset! Struct:" + toString()); - } - - // 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 NotNullConstraintsResponseStandardSchemeFactory implements SchemeFactory { - public NotNullConstraintsResponseStandardScheme getScheme() { - return new NotNullConstraintsResponseStandardScheme(); - } - } - - private static class NotNullConstraintsResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, NotNullConstraintsResponse 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: // NOT_NULL_CONSTRAINTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list346 = iprot.readListBegin(); - struct.notNullConstraints = new ArrayList(_list346.size); - SQLNotNullConstraint _elem347; - for (int _i348 = 0; _i348 < _list346.size; ++_i348) - { - _elem347 = new SQLNotNullConstraint(); - _elem347.read(iprot); - struct.notNullConstraints.add(_elem347); - } - iprot.readListEnd(); - } - struct.setNotNullConstraintsIsSet(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, NotNullConstraintsResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.notNullConstraints != null) { - oprot.writeFieldBegin(NOT_NULL_CONSTRAINTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.notNullConstraints.size())); - for (SQLNotNullConstraint _iter349 : struct.notNullConstraints) - { - _iter349.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class NotNullConstraintsResponseTupleSchemeFactory implements SchemeFactory { - public NotNullConstraintsResponseTupleScheme getScheme() { - return new NotNullConstraintsResponseTupleScheme(); - } - } - - private static class NotNullConstraintsResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, NotNullConstraintsResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.notNullConstraints.size()); - for (SQLNotNullConstraint _iter350 : struct.notNullConstraints) - { - _iter350.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, NotNullConstraintsResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list351 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.notNullConstraints = new ArrayList(_list351.size); - SQLNotNullConstraint _elem352; - for (int _i353 = 0; _i353 < _list351.size; ++_i353) - { - _elem352 = new SQLNotNullConstraint(); - _elem352.read(iprot); - struct.notNullConstraints.add(_elem352); - } - } - struct.setNotNullConstraintsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEvent.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEvent.java deleted file mode 100644 index 8e0fb40..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEvent.java +++ /dev/null @@ -1,1006 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class NotificationEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotificationEvent"); - - private static final org.apache.thrift.protocol.TField EVENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("eventId", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField EVENT_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("eventTime", org.apache.thrift.protocol.TType.I32, (short)2); - private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)5); - 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)6); - private static final org.apache.thrift.protocol.TField MESSAGE_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("messageFormat", org.apache.thrift.protocol.TType.STRING, (short)7); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new NotificationEventStandardSchemeFactory()); - schemes.put(TupleScheme.class, new NotificationEventTupleSchemeFactory()); - } - - private long eventId; // required - private int eventTime; // required - private String eventType; // required - private String dbName; // optional - private String tableName; // optional - private String message; // required - private String messageFormat; // 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 { - EVENT_ID((short)1, "eventId"), - EVENT_TIME((short)2, "eventTime"), - EVENT_TYPE((short)3, "eventType"), - DB_NAME((short)4, "dbName"), - TABLE_NAME((short)5, "tableName"), - MESSAGE((short)6, "message"), - MESSAGE_FORMAT((short)7, "messageFormat"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // EVENT_ID - return EVENT_ID; - case 2: // EVENT_TIME - return EVENT_TIME; - case 3: // EVENT_TYPE - return EVENT_TYPE; - case 4: // DB_NAME - return DB_NAME; - case 5: // TABLE_NAME - return TABLE_NAME; - case 6: // MESSAGE - return MESSAGE; - case 7: // MESSAGE_FORMAT - return MESSAGE_FORMAT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __EVENTID_ISSET_ID = 0; - private static final int __EVENTTIME_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.DB_NAME,_Fields.TABLE_NAME,_Fields.MESSAGE_FORMAT}; - 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); - tmpMap.put(_Fields.EVENT_ID, new org.apache.thrift.meta_data.FieldMetaData("eventId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.EVENT_TIME, new org.apache.thrift.meta_data.FieldMetaData("eventTime", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.EVENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("eventType", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MESSAGE_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("messageFormat", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotificationEvent.class, metaDataMap); - } - - public NotificationEvent() { - } - - public NotificationEvent( - long eventId, - int eventTime, - String eventType, - String message) - { - this(); - this.eventId = eventId; - setEventIdIsSet(true); - this.eventTime = eventTime; - setEventTimeIsSet(true); - this.eventType = eventType; - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public NotificationEvent(NotificationEvent other) { - __isset_bitfield = other.__isset_bitfield; - this.eventId = other.eventId; - this.eventTime = other.eventTime; - if (other.isSetEventType()) { - this.eventType = other.eventType; - } - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTableName()) { - this.tableName = other.tableName; - } - if (other.isSetMessage()) { - this.message = other.message; - } - if (other.isSetMessageFormat()) { - this.messageFormat = other.messageFormat; - } - } - - public NotificationEvent deepCopy() { - return new NotificationEvent(this); - } - - @Override - public void clear() { - setEventIdIsSet(false); - this.eventId = 0; - setEventTimeIsSet(false); - this.eventTime = 0; - this.eventType = null; - this.dbName = null; - this.tableName = null; - this.message = null; - this.messageFormat = null; - } - - public long getEventId() { - return this.eventId; - } - - public void setEventId(long eventId) { - this.eventId = eventId; - setEventIdIsSet(true); - } - - public void unsetEventId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EVENTID_ISSET_ID); - } - - /** Returns true if field eventId is set (has been assigned a value) and false otherwise */ - public boolean isSetEventId() { - return EncodingUtils.testBit(__isset_bitfield, __EVENTID_ISSET_ID); - } - - public void setEventIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EVENTID_ISSET_ID, value); - } - - public int getEventTime() { - return this.eventTime; - } - - public void setEventTime(int eventTime) { - this.eventTime = eventTime; - setEventTimeIsSet(true); - } - - public void unsetEventTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EVENTTIME_ISSET_ID); - } - - /** Returns true if field eventTime is set (has been assigned a value) and false otherwise */ - public boolean isSetEventTime() { - return EncodingUtils.testBit(__isset_bitfield, __EVENTTIME_ISSET_ID); - } - - public void setEventTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EVENTTIME_ISSET_ID, value); - } - - public String getEventType() { - return this.eventType; - } - - public void setEventType(String eventType) { - this.eventType = eventType; - } - - public void unsetEventType() { - this.eventType = null; - } - - /** Returns true if field eventType is set (has been assigned a value) and false otherwise */ - public boolean isSetEventType() { - return this.eventType != null; - } - - public void setEventTypeIsSet(boolean value) { - if (!value) { - this.eventType = null; - } - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTableName() { - return this.tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public void unsetTableName() { - this.tableName = null; - } - - /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ - public boolean isSetTableName() { - return this.tableName != null; - } - - public void setTableNameIsSet(boolean value) { - if (!value) { - this.tableName = null; - } - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public String getMessageFormat() { - return this.messageFormat; - } - - public void setMessageFormat(String messageFormat) { - this.messageFormat = messageFormat; - } - - public void unsetMessageFormat() { - this.messageFormat = null; - } - - /** Returns true if field messageFormat is set (has been assigned a value) and false otherwise */ - public boolean isSetMessageFormat() { - return this.messageFormat != null; - } - - public void setMessageFormatIsSet(boolean value) { - if (!value) { - this.messageFormat = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case EVENT_ID: - if (value == null) { - unsetEventId(); - } else { - setEventId((Long)value); - } - break; - - case EVENT_TIME: - if (value == null) { - unsetEventTime(); - } else { - setEventTime((Integer)value); - } - break; - - case EVENT_TYPE: - if (value == null) { - unsetEventType(); - } else { - setEventType((String)value); - } - break; - - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTableName(); - } else { - setTableName((String)value); - } - break; - - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - case MESSAGE_FORMAT: - if (value == null) { - unsetMessageFormat(); - } else { - setMessageFormat((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case EVENT_ID: - return getEventId(); - - case EVENT_TIME: - return getEventTime(); - - case EVENT_TYPE: - return getEventType(); - - case DB_NAME: - return getDbName(); - - case TABLE_NAME: - return getTableName(); - - case MESSAGE: - return getMessage(); - - case MESSAGE_FORMAT: - return getMessageFormat(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case EVENT_ID: - return isSetEventId(); - case EVENT_TIME: - return isSetEventTime(); - case EVENT_TYPE: - return isSetEventType(); - case DB_NAME: - return isSetDbName(); - case TABLE_NAME: - return isSetTableName(); - case MESSAGE: - return isSetMessage(); - case MESSAGE_FORMAT: - return isSetMessageFormat(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof NotificationEvent) - return this.equals((NotificationEvent)that); - return false; - } - - public boolean equals(NotificationEvent that) { - if (that == null) - return false; - - boolean this_present_eventId = true; - boolean that_present_eventId = true; - if (this_present_eventId || that_present_eventId) { - if (!(this_present_eventId && that_present_eventId)) - return false; - if (this.eventId != that.eventId) - return false; - } - - boolean this_present_eventTime = true; - boolean that_present_eventTime = true; - if (this_present_eventTime || that_present_eventTime) { - if (!(this_present_eventTime && that_present_eventTime)) - return false; - if (this.eventTime != that.eventTime) - return false; - } - - boolean this_present_eventType = true && this.isSetEventType(); - boolean that_present_eventType = true && that.isSetEventType(); - if (this_present_eventType || that_present_eventType) { - if (!(this_present_eventType && that_present_eventType)) - return false; - if (!this.eventType.equals(that.eventType)) - return false; - } - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tableName = true && this.isSetTableName(); - boolean that_present_tableName = true && that.isSetTableName(); - if (this_present_tableName || that_present_tableName) { - if (!(this_present_tableName && that_present_tableName)) - return false; - if (!this.tableName.equals(that.tableName)) - return false; - } - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - boolean this_present_messageFormat = true && this.isSetMessageFormat(); - boolean that_present_messageFormat = true && that.isSetMessageFormat(); - if (this_present_messageFormat || that_present_messageFormat) { - if (!(this_present_messageFormat && that_present_messageFormat)) - return false; - if (!this.messageFormat.equals(that.messageFormat)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_eventId = true; - list.add(present_eventId); - if (present_eventId) - list.add(eventId); - - boolean present_eventTime = true; - list.add(present_eventTime); - if (present_eventTime) - list.add(eventTime); - - boolean present_eventType = true && (isSetEventType()); - list.add(present_eventType); - if (present_eventType) - list.add(eventType); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tableName = true && (isSetTableName()); - list.add(present_tableName); - if (present_tableName) - list.add(tableName); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - boolean present_messageFormat = true && (isSetMessageFormat()); - list.add(present_messageFormat); - if (present_messageFormat) - list.add(messageFormat); - - return list.hashCode(); - } - - @Override - public int compareTo(NotificationEvent other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetEventId()).compareTo(other.isSetEventId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEventId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventId, other.eventId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEventTime()).compareTo(other.isSetEventTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEventTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventTime, other.eventTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEventType()).compareTo(other.isSetEventType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEventType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, other.eventType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMessageFormat()).compareTo(other.isSetMessageFormat()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessageFormat()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.messageFormat, other.messageFormat); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("NotificationEvent("); - boolean first = true; - - sb.append("eventId:"); - sb.append(this.eventId); - first = false; - if (!first) sb.append(", "); - sb.append("eventTime:"); - sb.append(this.eventTime); - first = false; - if (!first) sb.append(", "); - sb.append("eventType:"); - if (this.eventType == null) { - sb.append("null"); - } else { - sb.append(this.eventType); - } - first = false; - if (isSetDbName()) { - if (!first) sb.append(", "); - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - } - if (isSetTableName()) { - if (!first) sb.append(", "); - sb.append("tableName:"); - if (this.tableName == null) { - sb.append("null"); - } else { - sb.append(this.tableName); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - if (isSetMessageFormat()) { - if (!first) sb.append(", "); - sb.append("messageFormat:"); - if (this.messageFormat == null) { - sb.append("null"); - } else { - sb.append(this.messageFormat); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetEventId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'eventId' is unset! Struct:" + toString()); - } - - if (!isSetEventTime()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'eventTime' is unset! Struct:" + toString()); - } - - if (!isSetEventType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'eventType' is unset! Struct:" + toString()); - } - - if (!isSetMessage()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' is unset! Struct:" + toString()); - } - - // 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 { - // 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 NotificationEventStandardSchemeFactory implements SchemeFactory { - public NotificationEventStandardScheme getScheme() { - return new NotificationEventStandardScheme(); - } - } - - private static class NotificationEventStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, NotificationEvent 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: // EVENT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.eventId = iprot.readI64(); - struct.setEventIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // EVENT_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.eventTime = iprot.readI32(); - struct.setEventTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // EVENT_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.eventType = iprot.readString(); - struct.setEventTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // 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 5: // 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 6: // 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 7: // MESSAGE_FORMAT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.messageFormat = iprot.readString(); - struct.setMessageFormatIsSet(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, NotificationEvent struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(EVENT_ID_FIELD_DESC); - oprot.writeI64(struct.eventId); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(EVENT_TIME_FIELD_DESC); - oprot.writeI32(struct.eventTime); - oprot.writeFieldEnd(); - if (struct.eventType != null) { - oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); - oprot.writeString(struct.eventType); - oprot.writeFieldEnd(); - } - if (struct.dbName != null) { - if (struct.isSetDbName()) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - } - if (struct.tableName != null) { - if (struct.isSetTableName()) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(struct.tableName); - oprot.writeFieldEnd(); - } - } - if (struct.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(struct.message); - oprot.writeFieldEnd(); - } - if (struct.messageFormat != null) { - if (struct.isSetMessageFormat()) { - oprot.writeFieldBegin(MESSAGE_FORMAT_FIELD_DESC); - oprot.writeString(struct.messageFormat); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class NotificationEventTupleSchemeFactory implements SchemeFactory { - public NotificationEventTupleScheme getScheme() { - return new NotificationEventTupleScheme(); - } - } - - private static class NotificationEventTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, NotificationEvent struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.eventId); - oprot.writeI32(struct.eventTime); - oprot.writeString(struct.eventType); - oprot.writeString(struct.message); - BitSet optionals = new BitSet(); - if (struct.isSetDbName()) { - optionals.set(0); - } - if (struct.isSetTableName()) { - optionals.set(1); - } - if (struct.isSetMessageFormat()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetDbName()) { - oprot.writeString(struct.dbName); - } - if (struct.isSetTableName()) { - oprot.writeString(struct.tableName); - } - if (struct.isSetMessageFormat()) { - oprot.writeString(struct.messageFormat); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, NotificationEvent struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.eventId = iprot.readI64(); - struct.setEventIdIsSet(true); - struct.eventTime = iprot.readI32(); - struct.setEventTimeIsSet(true); - struct.eventType = iprot.readString(); - struct.setEventTypeIsSet(true); - struct.message = iprot.readString(); - struct.setMessageIsSet(true); - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - } - if (incoming.get(1)) { - struct.tableName = iprot.readString(); - struct.setTableNameIsSet(true); - } - if (incoming.get(2)) { - struct.messageFormat = iprot.readString(); - struct.setMessageFormatIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventRequest.java deleted file mode 100644 index bafb9b6..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventRequest.java +++ /dev/null @@ -1,490 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class NotificationEventRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotificationEventRequest"); - - private static final org.apache.thrift.protocol.TField LAST_EVENT_FIELD_DESC = new org.apache.thrift.protocol.TField("lastEvent", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField MAX_EVENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxEvents", org.apache.thrift.protocol.TType.I32, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new NotificationEventRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new NotificationEventRequestTupleSchemeFactory()); - } - - private long lastEvent; // required - private int maxEvents; // 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 { - LAST_EVENT((short)1, "lastEvent"), - MAX_EVENTS((short)2, "maxEvents"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // LAST_EVENT - return LAST_EVENT; - case 2: // MAX_EVENTS - return MAX_EVENTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __LASTEVENT_ISSET_ID = 0; - private static final int __MAXEVENTS_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.MAX_EVENTS}; - 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); - tmpMap.put(_Fields.LAST_EVENT, new org.apache.thrift.meta_data.FieldMetaData("lastEvent", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.MAX_EVENTS, new org.apache.thrift.meta_data.FieldMetaData("maxEvents", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotificationEventRequest.class, metaDataMap); - } - - public NotificationEventRequest() { - } - - public NotificationEventRequest( - long lastEvent) - { - this(); - this.lastEvent = lastEvent; - setLastEventIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public NotificationEventRequest(NotificationEventRequest other) { - __isset_bitfield = other.__isset_bitfield; - this.lastEvent = other.lastEvent; - this.maxEvents = other.maxEvents; - } - - public NotificationEventRequest deepCopy() { - return new NotificationEventRequest(this); - } - - @Override - public void clear() { - setLastEventIsSet(false); - this.lastEvent = 0; - setMaxEventsIsSet(false); - this.maxEvents = 0; - } - - public long getLastEvent() { - return this.lastEvent; - } - - public void setLastEvent(long lastEvent) { - this.lastEvent = lastEvent; - setLastEventIsSet(true); - } - - public void unsetLastEvent() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTEVENT_ISSET_ID); - } - - /** Returns true if field lastEvent is set (has been assigned a value) and false otherwise */ - public boolean isSetLastEvent() { - return EncodingUtils.testBit(__isset_bitfield, __LASTEVENT_ISSET_ID); - } - - public void setLastEventIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTEVENT_ISSET_ID, value); - } - - public int getMaxEvents() { - return this.maxEvents; - } - - public void setMaxEvents(int maxEvents) { - this.maxEvents = maxEvents; - setMaxEventsIsSet(true); - } - - public void unsetMaxEvents() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXEVENTS_ISSET_ID); - } - - /** Returns true if field maxEvents is set (has been assigned a value) and false otherwise */ - public boolean isSetMaxEvents() { - return EncodingUtils.testBit(__isset_bitfield, __MAXEVENTS_ISSET_ID); - } - - public void setMaxEventsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXEVENTS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LAST_EVENT: - if (value == null) { - unsetLastEvent(); - } else { - setLastEvent((Long)value); - } - break; - - case MAX_EVENTS: - if (value == null) { - unsetMaxEvents(); - } else { - setMaxEvents((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LAST_EVENT: - return getLastEvent(); - - case MAX_EVENTS: - return getMaxEvents(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LAST_EVENT: - return isSetLastEvent(); - case MAX_EVENTS: - return isSetMaxEvents(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof NotificationEventRequest) - return this.equals((NotificationEventRequest)that); - return false; - } - - public boolean equals(NotificationEventRequest that) { - if (that == null) - return false; - - boolean this_present_lastEvent = true; - boolean that_present_lastEvent = true; - if (this_present_lastEvent || that_present_lastEvent) { - if (!(this_present_lastEvent && that_present_lastEvent)) - return false; - if (this.lastEvent != that.lastEvent) - return false; - } - - boolean this_present_maxEvents = true && this.isSetMaxEvents(); - boolean that_present_maxEvents = true && that.isSetMaxEvents(); - if (this_present_maxEvents || that_present_maxEvents) { - if (!(this_present_maxEvents && that_present_maxEvents)) - return false; - if (this.maxEvents != that.maxEvents) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_lastEvent = true; - list.add(present_lastEvent); - if (present_lastEvent) - list.add(lastEvent); - - boolean present_maxEvents = true && (isSetMaxEvents()); - list.add(present_maxEvents); - if (present_maxEvents) - list.add(maxEvents); - - return list.hashCode(); - } - - @Override - public int compareTo(NotificationEventRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLastEvent()).compareTo(other.isSetLastEvent()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLastEvent()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastEvent, other.lastEvent); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMaxEvents()).compareTo(other.isSetMaxEvents()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMaxEvents()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxEvents, other.maxEvents); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("NotificationEventRequest("); - boolean first = true; - - sb.append("lastEvent:"); - sb.append(this.lastEvent); - first = false; - if (isSetMaxEvents()) { - if (!first) sb.append(", "); - sb.append("maxEvents:"); - sb.append(this.maxEvents); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetLastEvent()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'lastEvent' is unset! Struct:" + toString()); - } - - // 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 { - // 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 NotificationEventRequestStandardSchemeFactory implements SchemeFactory { - public NotificationEventRequestStandardScheme getScheme() { - return new NotificationEventRequestStandardScheme(); - } - } - - private static class NotificationEventRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, NotificationEventRequest 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: // LAST_EVENT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.lastEvent = iprot.readI64(); - struct.setLastEventIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // MAX_EVENTS - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.maxEvents = iprot.readI32(); - struct.setMaxEventsIsSet(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, NotificationEventRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(LAST_EVENT_FIELD_DESC); - oprot.writeI64(struct.lastEvent); - oprot.writeFieldEnd(); - if (struct.isSetMaxEvents()) { - oprot.writeFieldBegin(MAX_EVENTS_FIELD_DESC); - oprot.writeI32(struct.maxEvents); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class NotificationEventRequestTupleSchemeFactory implements SchemeFactory { - public NotificationEventRequestTupleScheme getScheme() { - return new NotificationEventRequestTupleScheme(); - } - } - - private static class NotificationEventRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, NotificationEventRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.lastEvent); - BitSet optionals = new BitSet(); - if (struct.isSetMaxEvents()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetMaxEvents()) { - oprot.writeI32(struct.maxEvents); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, NotificationEventRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.lastEvent = iprot.readI64(); - struct.setLastEventIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.maxEvents = iprot.readI32(); - struct.setMaxEventsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java deleted file mode 100644 index bcfc75b..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class NotificationEventResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotificationEventResponse"); - - private static final org.apache.thrift.protocol.TField EVENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("events", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new NotificationEventResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new NotificationEventResponseTupleSchemeFactory()); - } - - private List events; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - EVENTS((short)1, "events"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // EVENTS - return EVENTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.EVENTS, new org.apache.thrift.meta_data.FieldMetaData("events", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NotificationEvent.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotificationEventResponse.class, metaDataMap); - } - - public NotificationEventResponse() { - } - - public NotificationEventResponse( - List events) - { - this(); - this.events = events; - } - - /** - * Performs a deep copy on other. - */ - public NotificationEventResponse(NotificationEventResponse other) { - if (other.isSetEvents()) { - List __this__events = new ArrayList(other.events.size()); - for (NotificationEvent other_element : other.events) { - __this__events.add(new NotificationEvent(other_element)); - } - this.events = __this__events; - } - } - - public NotificationEventResponse deepCopy() { - return new NotificationEventResponse(this); - } - - @Override - public void clear() { - this.events = null; - } - - public int getEventsSize() { - return (this.events == null) ? 0 : this.events.size(); - } - - public java.util.Iterator getEventsIterator() { - return (this.events == null) ? null : this.events.iterator(); - } - - public void addToEvents(NotificationEvent elem) { - if (this.events == null) { - this.events = new ArrayList(); - } - this.events.add(elem); - } - - public List getEvents() { - return this.events; - } - - public void setEvents(List events) { - this.events = events; - } - - public void unsetEvents() { - this.events = null; - } - - /** Returns true if field events is set (has been assigned a value) and false otherwise */ - public boolean isSetEvents() { - return this.events != null; - } - - public void setEventsIsSet(boolean value) { - if (!value) { - this.events = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case EVENTS: - if (value == null) { - unsetEvents(); - } else { - setEvents((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case EVENTS: - return getEvents(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case EVENTS: - return isSetEvents(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof NotificationEventResponse) - return this.equals((NotificationEventResponse)that); - return false; - } - - public boolean equals(NotificationEventResponse that) { - if (that == null) - return false; - - boolean this_present_events = true && this.isSetEvents(); - boolean that_present_events = true && that.isSetEvents(); - if (this_present_events || that_present_events) { - if (!(this_present_events && that_present_events)) - return false; - if (!this.events.equals(that.events)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_events = true && (isSetEvents()); - list.add(present_events); - if (present_events) - list.add(events); - - return list.hashCode(); - } - - @Override - public int compareTo(NotificationEventResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetEvents()).compareTo(other.isSetEvents()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEvents()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.events, other.events); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("NotificationEventResponse("); - boolean first = true; - - sb.append("events:"); - if (this.events == null) { - sb.append("null"); - } else { - sb.append(this.events); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetEvents()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'events' is unset! Struct:" + toString()); - } - - // 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 NotificationEventResponseStandardSchemeFactory implements SchemeFactory { - public NotificationEventResponseStandardScheme getScheme() { - return new NotificationEventResponseStandardScheme(); - } - } - - private static class NotificationEventResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, NotificationEventResponse 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: // EVENTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list582 = iprot.readListBegin(); - struct.events = new ArrayList(_list582.size); - NotificationEvent _elem583; - for (int _i584 = 0; _i584 < _list582.size; ++_i584) - { - _elem583 = new NotificationEvent(); - _elem583.read(iprot); - struct.events.add(_elem583); - } - iprot.readListEnd(); - } - struct.setEventsIsSet(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, NotificationEventResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.events != null) { - oprot.writeFieldBegin(EVENTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.events.size())); - for (NotificationEvent _iter585 : struct.events) - { - _iter585.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class NotificationEventResponseTupleSchemeFactory implements SchemeFactory { - public NotificationEventResponseTupleScheme getScheme() { - return new NotificationEventResponseTupleScheme(); - } - } - - private static class NotificationEventResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, NotificationEventResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.events.size()); - for (NotificationEvent _iter586 : struct.events) - { - _iter586.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, NotificationEventResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list587 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.events = new ArrayList(_list587.size); - NotificationEvent _elem588; - for (int _i589 = 0; _i589 < _list587.size; ++_i589) - { - _elem588 = new NotificationEvent(); - _elem588.read(iprot); - struct.events.add(_elem588); - } - } - struct.setEventsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java deleted file mode 100644 index f058c0d..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java +++ /dev/null @@ -1,702 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class OpenTxnRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenTxnRequest"); - - private static final org.apache.thrift.protocol.TField NUM_TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("num_txns", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField AGENT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("agentInfo", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new OpenTxnRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new OpenTxnRequestTupleSchemeFactory()); - } - - private int num_txns; // required - private String user; // required - private String hostname; // required - private String agentInfo; // 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 { - NUM_TXNS((short)1, "num_txns"), - USER((short)2, "user"), - HOSTNAME((short)3, "hostname"), - AGENT_INFO((short)4, "agentInfo"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NUM_TXNS - return NUM_TXNS; - case 2: // USER - return USER; - case 3: // HOSTNAME - return HOSTNAME; - case 4: // AGENT_INFO - return AGENT_INFO; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __NUM_TXNS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.AGENT_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); - tmpMap.put(_Fields.NUM_TXNS, new org.apache.thrift.meta_data.FieldMetaData("num_txns", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.AGENT_INFO, new org.apache.thrift.meta_data.FieldMetaData("agentInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OpenTxnRequest.class, metaDataMap); - } - - public OpenTxnRequest() { - this.agentInfo = "Unknown"; - - } - - public OpenTxnRequest( - int num_txns, - String user, - String hostname) - { - this(); - this.num_txns = num_txns; - setNum_txnsIsSet(true); - this.user = user; - this.hostname = hostname; - } - - /** - * Performs a deep copy on other. - */ - public OpenTxnRequest(OpenTxnRequest other) { - __isset_bitfield = other.__isset_bitfield; - this.num_txns = other.num_txns; - if (other.isSetUser()) { - this.user = other.user; - } - if (other.isSetHostname()) { - this.hostname = other.hostname; - } - if (other.isSetAgentInfo()) { - this.agentInfo = other.agentInfo; - } - } - - public OpenTxnRequest deepCopy() { - return new OpenTxnRequest(this); - } - - @Override - public void clear() { - setNum_txnsIsSet(false); - this.num_txns = 0; - this.user = null; - this.hostname = null; - this.agentInfo = "Unknown"; - - } - - public int getNum_txns() { - return this.num_txns; - } - - public void setNum_txns(int num_txns) { - this.num_txns = num_txns; - setNum_txnsIsSet(true); - } - - public void unsetNum_txns() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_TXNS_ISSET_ID); - } - - /** Returns true if field num_txns is set (has been assigned a value) and false otherwise */ - public boolean isSetNum_txns() { - return EncodingUtils.testBit(__isset_bitfield, __NUM_TXNS_ISSET_ID); - } - - public void setNum_txnsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_TXNS_ISSET_ID, value); - } - - public String getUser() { - return this.user; - } - - public void setUser(String user) { - this.user = user; - } - - public void unsetUser() { - this.user = null; - } - - /** Returns true if field user is set (has been assigned a value) and false otherwise */ - public boolean isSetUser() { - return this.user != null; - } - - public void setUserIsSet(boolean value) { - if (!value) { - this.user = null; - } - } - - public String getHostname() { - return this.hostname; - } - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - public void unsetHostname() { - this.hostname = null; - } - - /** Returns true if field hostname is set (has been assigned a value) and false otherwise */ - public boolean isSetHostname() { - return this.hostname != null; - } - - public void setHostnameIsSet(boolean value) { - if (!value) { - this.hostname = null; - } - } - - public String getAgentInfo() { - return this.agentInfo; - } - - public void setAgentInfo(String agentInfo) { - this.agentInfo = agentInfo; - } - - public void unsetAgentInfo() { - this.agentInfo = null; - } - - /** Returns true if field agentInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetAgentInfo() { - return this.agentInfo != null; - } - - public void setAgentInfoIsSet(boolean value) { - if (!value) { - this.agentInfo = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NUM_TXNS: - if (value == null) { - unsetNum_txns(); - } else { - setNum_txns((Integer)value); - } - break; - - case USER: - if (value == null) { - unsetUser(); - } else { - setUser((String)value); - } - break; - - case HOSTNAME: - if (value == null) { - unsetHostname(); - } else { - setHostname((String)value); - } - break; - - case AGENT_INFO: - if (value == null) { - unsetAgentInfo(); - } else { - setAgentInfo((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NUM_TXNS: - return getNum_txns(); - - case USER: - return getUser(); - - case HOSTNAME: - return getHostname(); - - case AGENT_INFO: - return getAgentInfo(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NUM_TXNS: - return isSetNum_txns(); - case USER: - return isSetUser(); - case HOSTNAME: - return isSetHostname(); - case AGENT_INFO: - return isSetAgentInfo(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof OpenTxnRequest) - return this.equals((OpenTxnRequest)that); - return false; - } - - public boolean equals(OpenTxnRequest that) { - if (that == null) - return false; - - boolean this_present_num_txns = true; - boolean that_present_num_txns = true; - if (this_present_num_txns || that_present_num_txns) { - if (!(this_present_num_txns && that_present_num_txns)) - return false; - if (this.num_txns != that.num_txns) - return false; - } - - boolean this_present_user = true && this.isSetUser(); - boolean that_present_user = true && that.isSetUser(); - if (this_present_user || that_present_user) { - if (!(this_present_user && that_present_user)) - return false; - if (!this.user.equals(that.user)) - return false; - } - - boolean this_present_hostname = true && this.isSetHostname(); - boolean that_present_hostname = true && that.isSetHostname(); - if (this_present_hostname || that_present_hostname) { - if (!(this_present_hostname && that_present_hostname)) - return false; - if (!this.hostname.equals(that.hostname)) - return false; - } - - boolean this_present_agentInfo = true && this.isSetAgentInfo(); - boolean that_present_agentInfo = true && that.isSetAgentInfo(); - if (this_present_agentInfo || that_present_agentInfo) { - if (!(this_present_agentInfo && that_present_agentInfo)) - return false; - if (!this.agentInfo.equals(that.agentInfo)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_num_txns = true; - list.add(present_num_txns); - if (present_num_txns) - list.add(num_txns); - - boolean present_user = true && (isSetUser()); - list.add(present_user); - if (present_user) - list.add(user); - - boolean present_hostname = true && (isSetHostname()); - list.add(present_hostname); - if (present_hostname) - list.add(hostname); - - boolean present_agentInfo = true && (isSetAgentInfo()); - list.add(present_agentInfo); - if (present_agentInfo) - list.add(agentInfo); - - return list.hashCode(); - } - - @Override - public int compareTo(OpenTxnRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetNum_txns()).compareTo(other.isSetNum_txns()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNum_txns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_txns, other.num_txns); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUser()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHostname()).compareTo(other.isSetHostname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHostname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, other.hostname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAgentInfo()).compareTo(other.isSetAgentInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentInfo, other.agentInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("OpenTxnRequest("); - boolean first = true; - - sb.append("num_txns:"); - sb.append(this.num_txns); - first = false; - if (!first) sb.append(", "); - sb.append("user:"); - if (this.user == null) { - sb.append("null"); - } else { - sb.append(this.user); - } - first = false; - if (!first) sb.append(", "); - sb.append("hostname:"); - if (this.hostname == null) { - sb.append("null"); - } else { - sb.append(this.hostname); - } - first = false; - if (isSetAgentInfo()) { - if (!first) sb.append(", "); - sb.append("agentInfo:"); - if (this.agentInfo == null) { - sb.append("null"); - } else { - sb.append(this.agentInfo); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetNum_txns()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_txns' is unset! Struct:" + toString()); - } - - if (!isSetUser()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'user' is unset! Struct:" + toString()); - } - - if (!isSetHostname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'hostname' is unset! Struct:" + toString()); - } - - // 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 { - // 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 OpenTxnRequestStandardSchemeFactory implements SchemeFactory { - public OpenTxnRequestStandardScheme getScheme() { - return new OpenTxnRequestStandardScheme(); - } - } - - private static class OpenTxnRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, OpenTxnRequest 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_TXNS - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.num_txns = iprot.readI32(); - struct.setNum_txnsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // USER - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.user = iprot.readString(); - struct.setUserIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // HOSTNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.hostname = iprot.readString(); - struct.setHostnameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // AGENT_INFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.agentInfo = iprot.readString(); - struct.setAgentInfoIsSet(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, OpenTxnRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(NUM_TXNS_FIELD_DESC); - oprot.writeI32(struct.num_txns); - oprot.writeFieldEnd(); - if (struct.user != null) { - oprot.writeFieldBegin(USER_FIELD_DESC); - oprot.writeString(struct.user); - oprot.writeFieldEnd(); - } - if (struct.hostname != null) { - oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); - oprot.writeString(struct.hostname); - oprot.writeFieldEnd(); - } - if (struct.agentInfo != null) { - if (struct.isSetAgentInfo()) { - oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC); - oprot.writeString(struct.agentInfo); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class OpenTxnRequestTupleSchemeFactory implements SchemeFactory { - public OpenTxnRequestTupleScheme getScheme() { - return new OpenTxnRequestTupleScheme(); - } - } - - private static class OpenTxnRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OpenTxnRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI32(struct.num_txns); - oprot.writeString(struct.user); - oprot.writeString(struct.hostname); - BitSet optionals = new BitSet(); - if (struct.isSetAgentInfo()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetAgentInfo()) { - oprot.writeString(struct.agentInfo); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OpenTxnRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.num_txns = iprot.readI32(); - struct.setNum_txnsIsSet(true); - struct.user = iprot.readString(); - struct.setUserIsSet(true); - struct.hostname = iprot.readString(); - struct.setHostnameIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.agentInfo = iprot.readString(); - struct.setAgentInfoIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java deleted file mode 100644 index c23482a..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java +++ /dev/null @@ -1,438 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class OpenTxnsResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenTxnsResponse"); - - private static final org.apache.thrift.protocol.TField TXN_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("txn_ids", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new OpenTxnsResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new OpenTxnsResponseTupleSchemeFactory()); - } - - private List txn_ids; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TXN_IDS((short)1, "txn_ids"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TXN_IDS - return TXN_IDS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TXN_IDS, new org.apache.thrift.meta_data.FieldMetaData("txn_ids", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OpenTxnsResponse.class, metaDataMap); - } - - public OpenTxnsResponse() { - } - - public OpenTxnsResponse( - List txn_ids) - { - this(); - this.txn_ids = txn_ids; - } - - /** - * Performs a deep copy on other. - */ - public OpenTxnsResponse(OpenTxnsResponse other) { - if (other.isSetTxn_ids()) { - List __this__txn_ids = new ArrayList(other.txn_ids); - this.txn_ids = __this__txn_ids; - } - } - - public OpenTxnsResponse deepCopy() { - return new OpenTxnsResponse(this); - } - - @Override - public void clear() { - this.txn_ids = null; - } - - public int getTxn_idsSize() { - return (this.txn_ids == null) ? 0 : this.txn_ids.size(); - } - - public java.util.Iterator getTxn_idsIterator() { - return (this.txn_ids == null) ? null : this.txn_ids.iterator(); - } - - public void addToTxn_ids(long elem) { - if (this.txn_ids == null) { - this.txn_ids = new ArrayList(); - } - this.txn_ids.add(elem); - } - - public List getTxn_ids() { - return this.txn_ids; - } - - public void setTxn_ids(List txn_ids) { - this.txn_ids = txn_ids; - } - - public void unsetTxn_ids() { - this.txn_ids = null; - } - - /** Returns true if field txn_ids is set (has been assigned a value) and false otherwise */ - public boolean isSetTxn_ids() { - return this.txn_ids != null; - } - - public void setTxn_idsIsSet(boolean value) { - if (!value) { - this.txn_ids = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TXN_IDS: - if (value == null) { - unsetTxn_ids(); - } else { - setTxn_ids((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TXN_IDS: - return getTxn_ids(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TXN_IDS: - return isSetTxn_ids(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof OpenTxnsResponse) - return this.equals((OpenTxnsResponse)that); - return false; - } - - public boolean equals(OpenTxnsResponse that) { - if (that == null) - return false; - - boolean this_present_txn_ids = true && this.isSetTxn_ids(); - boolean that_present_txn_ids = true && that.isSetTxn_ids(); - if (this_present_txn_ids || that_present_txn_ids) { - if (!(this_present_txn_ids && that_present_txn_ids)) - return false; - if (!this.txn_ids.equals(that.txn_ids)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_txn_ids = true && (isSetTxn_ids()); - list.add(present_txn_ids); - if (present_txn_ids) - list.add(txn_ids); - - return list.hashCode(); - } - - @Override - public int compareTo(OpenTxnsResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTxn_ids()).compareTo(other.isSetTxn_ids()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTxn_ids()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txn_ids, other.txn_ids); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("OpenTxnsResponse("); - boolean first = true; - - sb.append("txn_ids:"); - if (this.txn_ids == null) { - sb.append("null"); - } else { - sb.append(this.txn_ids); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetTxn_ids()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'txn_ids' is unset! Struct:" + toString()); - } - - // 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 OpenTxnsResponseStandardSchemeFactory implements SchemeFactory { - public OpenTxnsResponseStandardScheme getScheme() { - return new OpenTxnsResponseStandardScheme(); - } - } - - private static class OpenTxnsResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, OpenTxnsResponse 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: // TXN_IDS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list508 = iprot.readListBegin(); - struct.txn_ids = new ArrayList(_list508.size); - long _elem509; - for (int _i510 = 0; _i510 < _list508.size; ++_i510) - { - _elem509 = iprot.readI64(); - struct.txn_ids.add(_elem509); - } - iprot.readListEnd(); - } - struct.setTxn_idsIsSet(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, OpenTxnsResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.txn_ids != null) { - oprot.writeFieldBegin(TXN_IDS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.txn_ids.size())); - for (long _iter511 : struct.txn_ids) - { - oprot.writeI64(_iter511); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class OpenTxnsResponseTupleSchemeFactory implements SchemeFactory { - public OpenTxnsResponseTupleScheme getScheme() { - return new OpenTxnsResponseTupleScheme(); - } - } - - private static class OpenTxnsResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OpenTxnsResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.txn_ids.size()); - for (long _iter512 : struct.txn_ids) - { - oprot.writeI64(_iter512); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OpenTxnsResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list513 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.txn_ids = new ArrayList(_list513.size); - long _elem514; - for (int _i515 = 0; _i515 < _list513.size; ++_i515) - { - _elem514 = iprot.readI64(); - struct.txn_ids.add(_elem514); - } - } - struct.setTxn_idsIsSet(true); - } - } - -} - diff --git 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 deleted file mode 100644 index cc0e2dd..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java +++ /dev/null @@ -1,497 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class Order implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Order"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - COL((short)1, "col"), - ORDER((short)2, "order"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // COL - return COL; - case 2: // ORDER - return ORDER; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ORDER_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.COL, new org.apache.thrift.meta_data.FieldMetaData("col", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ORDER, new org.apache.thrift.meta_data.FieldMetaData("order", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap); - } - - public Order() { - } - - public Order( - String col, - int order) - { - this(); - this.col = col; - this.order = order; - setOrderIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public Order(Order other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetCol()) { - this.col = other.col; - } - this.order = other.order; - } - - public Order deepCopy() { - return new Order(this); - } - - @Override - public void clear() { - this.col = null; - setOrderIsSet(false); - this.order = 0; - } - - public String getCol() { - return this.col; - } - - public void setCol(String col) { - this.col = col; - } - - public void unsetCol() { - this.col = null; - } - - /** Returns true if field col is set (has been assigned a value) and false otherwise */ - public boolean isSetCol() { - return this.col != null; - } - - public void setColIsSet(boolean value) { - if (!value) { - this.col = null; - } - } - - public int getOrder() { - return this.order; - } - - public void setOrder(int order) { - this.order = order; - setOrderIsSet(true); - } - - public void unsetOrder() { - __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 EncodingUtils.testBit(__isset_bitfield, __ORDER_ISSET_ID); - } - - public void setOrderIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ORDER_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case COL: - if (value == null) { - unsetCol(); - } else { - setCol((String)value); - } - break; - - case ORDER: - if (value == null) { - unsetOrder(); - } else { - setOrder((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case COL: - return getCol(); - - case ORDER: - return getOrder(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case COL: - return isSetCol(); - case ORDER: - return isSetOrder(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Order) - return this.equals((Order)that); - return false; - } - - public boolean equals(Order that) { - if (that == null) - return false; - - boolean this_present_col = true && this.isSetCol(); - boolean that_present_col = true && that.isSetCol(); - if (this_present_col || that_present_col) { - if (!(this_present_col && that_present_col)) - return false; - if (!this.col.equals(that.col)) - return false; - } - - boolean this_present_order = true; - boolean that_present_order = true; - if (this_present_order || that_present_order) { - if (!(this_present_order && that_present_order)) - return false; - if (this.order != that.order) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_col = true && (isSetCol()); - list.add(present_col); - if (present_col) - list.add(col); - - boolean present_order = true; - list.add(present_order); - if (present_order) - list.add(order); - - return list.hashCode(); - } - - @Override - public int compareTo(Order other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetCol()).compareTo(other.isSetCol()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCol()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col, other.col); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOrder()).compareTo(other.isSetOrder()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOrder()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.order, other.order); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("Order("); - boolean first = true; - - sb.append("col:"); - if (this.col == null) { - sb.append("null"); - } else { - sb.append(this.col); - } - first = false; - if (!first) sb.append(", "); - sb.append("order:"); - sb.append(this.order); - 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 { - // 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 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); - } - } - } - -} - diff --git 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 deleted file mode 100644 index a247221..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java +++ /dev/null @@ -1,1229 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class Partition implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Partition"); - - private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)3); - 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)4); - private static final org.apache.thrift.protocol.TField LAST_ACCESS_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAccessTime", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField SD_FIELD_DESC = new org.apache.thrift.protocol.TField("sd", org.apache.thrift.protocol.TType.STRUCT, (short)6); - 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 - private int createTime; // required - private int lastAccessTime; // required - private StorageDescriptor sd; // required - private Map parameters; // 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 { - VALUES((short)1, "values"), - DB_NAME((short)2, "dbName"), - TABLE_NAME((short)3, "tableName"), - CREATE_TIME((short)4, "createTime"), - LAST_ACCESS_TIME((short)5, "lastAccessTime"), - SD((short)6, "sd"), - PARAMETERS((short)7, "parameters"), - PRIVILEGES((short)8, "privileges"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // VALUES - return VALUES; - case 2: // DB_NAME - return DB_NAME; - case 3: // TABLE_NAME - return TABLE_NAME; - case 4: // CREATE_TIME - return CREATE_TIME; - case 5: // LAST_ACCESS_TIME - return LAST_ACCESS_TIME; - case 6: // SD - return SD; - case 7: // PARAMETERS - return PARAMETERS; - case 8: // PRIVILEGES - return PRIVILEGES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __CREATETIME_ISSET_ID = 0; - private static final int __LASTACCESSTIME_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _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); - tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.LAST_ACCESS_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastAccessTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.SD, new org.apache.thrift.meta_data.FieldMetaData("sd", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StorageDescriptor.class))); - tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrincipalPrivilegeSet.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Partition.class, metaDataMap); - } - - public Partition() { - } - - public Partition( - List values, - String dbName, - String tableName, - int createTime, - int lastAccessTime, - StorageDescriptor sd, - Map parameters) - { - this(); - this.values = values; - this.dbName = org.apache.hive.common.util.HiveStringUtils.intern(dbName); - this.tableName = org.apache.hive.common.util.HiveStringUtils.intern(tableName); - this.createTime = createTime; - setCreateTimeIsSet(true); - this.lastAccessTime = lastAccessTime; - setLastAccessTimeIsSet(true); - this.sd = sd; - this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters); - } - - /** - * Performs a deep copy on other. - */ - public Partition(Partition other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetValues()) { - List __this__values = new ArrayList(other.values); - this.values = __this__values; - } - if (other.isSetDbName()) { - this.dbName = org.apache.hive.common.util.HiveStringUtils.intern(other.dbName); - } - if (other.isSetTableName()) { - this.tableName = org.apache.hive.common.util.HiveStringUtils.intern(other.tableName); - } - this.createTime = other.createTime; - this.lastAccessTime = other.lastAccessTime; - if (other.isSetSd()) { - this.sd = new StorageDescriptor(other.sd); - } - if (other.isSetParameters()) { - Map __this__parameters = new HashMap(other.parameters); - this.parameters = __this__parameters; - } - if (other.isSetPrivileges()) { - this.privileges = new PrincipalPrivilegeSet(other.privileges); - } - } - - public Partition deepCopy() { - return new Partition(this); - } - - @Override - public void clear() { - this.values = null; - this.dbName = null; - this.tableName = null; - setCreateTimeIsSet(false); - this.createTime = 0; - setLastAccessTimeIsSet(false); - this.lastAccessTime = 0; - this.sd = null; - this.parameters = null; - this.privileges = null; - } - - public int getValuesSize() { - return (this.values == null) ? 0 : this.values.size(); - } - - public java.util.Iterator getValuesIterator() { - return (this.values == null) ? null : this.values.iterator(); - } - - public void addToValues(String elem) { - if (this.values == null) { - this.values = new ArrayList(); - } - this.values.add(elem); - } - - public List getValues() { - return this.values; - } - - public void setValues(List values) { - this.values = values; - } - - public void unsetValues() { - this.values = null; - } - - /** Returns true if field values is set (has been assigned a value) and false otherwise */ - public boolean isSetValues() { - return this.values != null; - } - - public void setValuesIsSet(boolean value) { - if (!value) { - this.values = null; - } - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = org.apache.hive.common.util.HiveStringUtils.intern(dbName); - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTableName() { - return this.tableName; - } - - public void setTableName(String tableName) { - this.tableName = org.apache.hive.common.util.HiveStringUtils.intern(tableName); - } - - public void unsetTableName() { - this.tableName = null; - } - - /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ - public boolean isSetTableName() { - return this.tableName != null; - } - - public void setTableNameIsSet(boolean value) { - if (!value) { - this.tableName = null; - } - } - - public int getCreateTime() { - return this.createTime; - } - - public void setCreateTime(int createTime) { - this.createTime = createTime; - setCreateTimeIsSet(true); - } - - public void unsetCreateTime() { - __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - public void setCreateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); - } - - public int getLastAccessTime() { - return this.lastAccessTime; - } - - public void setLastAccessTime(int lastAccessTime) { - this.lastAccessTime = lastAccessTime; - setLastAccessTimeIsSet(true); - } - - public void unsetLastAccessTime() { - __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 EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); - } - - public void setLastAccessTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); - } - - public StorageDescriptor getSd() { - return this.sd; - } - - public void setSd(StorageDescriptor sd) { - this.sd = sd; - } - - public void unsetSd() { - this.sd = null; - } - - /** Returns true if field sd is set (has been assigned a value) and false otherwise */ - public boolean isSetSd() { - return this.sd != null; - } - - public void setSdIsSet(boolean value) { - if (!value) { - this.sd = null; - } - } - - public int getParametersSize() { - return (this.parameters == null) ? 0 : this.parameters.size(); - } - - public void putToParameters(String key, String val) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(key, val); - } - - public Map getParameters() { - return this.parameters; - } - - public void setParameters(Map parameters) { - this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters); - } - - public void unsetParameters() { - this.parameters = null; - } - - /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ - public boolean isSetParameters() { - return this.parameters != null; - } - - public void setParametersIsSet(boolean value) { - if (!value) { - this.parameters = null; - } - } - - public PrincipalPrivilegeSet getPrivileges() { - return this.privileges; - } - - public void setPrivileges(PrincipalPrivilegeSet privileges) { - this.privileges = privileges; - } - - public void unsetPrivileges() { - this.privileges = null; - } - - /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ - public boolean isSetPrivileges() { - return this.privileges != null; - } - - public void setPrivilegesIsSet(boolean value) { - if (!value) { - this.privileges = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case VALUES: - if (value == null) { - unsetValues(); - } else { - setValues((List)value); - } - break; - - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTableName(); - } else { - setTableName((String)value); - } - break; - - case CREATE_TIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((Integer)value); - } - break; - - case LAST_ACCESS_TIME: - if (value == null) { - unsetLastAccessTime(); - } else { - setLastAccessTime((Integer)value); - } - break; - - case SD: - if (value == null) { - unsetSd(); - } else { - setSd((StorageDescriptor)value); - } - break; - - case PARAMETERS: - if (value == null) { - unsetParameters(); - } else { - setParameters((Map)value); - } - break; - - case PRIVILEGES: - if (value == null) { - unsetPrivileges(); - } else { - setPrivileges((PrincipalPrivilegeSet)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case VALUES: - return getValues(); - - case DB_NAME: - return getDbName(); - - case TABLE_NAME: - return getTableName(); - - case CREATE_TIME: - return getCreateTime(); - - case LAST_ACCESS_TIME: - return getLastAccessTime(); - - case SD: - return getSd(); - - case PARAMETERS: - return getParameters(); - - case PRIVILEGES: - return getPrivileges(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case VALUES: - return isSetValues(); - case DB_NAME: - return isSetDbName(); - case TABLE_NAME: - return isSetTableName(); - case CREATE_TIME: - return isSetCreateTime(); - case LAST_ACCESS_TIME: - return isSetLastAccessTime(); - case SD: - return isSetSd(); - case PARAMETERS: - return isSetParameters(); - case PRIVILEGES: - return isSetPrivileges(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Partition) - return this.equals((Partition)that); - return false; - } - - public boolean equals(Partition that) { - if (that == null) - return false; - - boolean this_present_values = true && this.isSetValues(); - boolean that_present_values = true && that.isSetValues(); - if (this_present_values || that_present_values) { - if (!(this_present_values && that_present_values)) - return false; - if (!this.values.equals(that.values)) - return false; - } - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tableName = true && this.isSetTableName(); - boolean that_present_tableName = true && that.isSetTableName(); - if (this_present_tableName || that_present_tableName) { - if (!(this_present_tableName && that_present_tableName)) - return false; - if (!this.tableName.equals(that.tableName)) - return false; - } - - boolean this_present_createTime = true; - boolean that_present_createTime = true; - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_lastAccessTime = true; - boolean that_present_lastAccessTime = true; - if (this_present_lastAccessTime || that_present_lastAccessTime) { - if (!(this_present_lastAccessTime && that_present_lastAccessTime)) - return false; - if (this.lastAccessTime != that.lastAccessTime) - return false; - } - - boolean this_present_sd = true && this.isSetSd(); - boolean that_present_sd = true && that.isSetSd(); - if (this_present_sd || that_present_sd) { - if (!(this_present_sd && that_present_sd)) - return false; - if (!this.sd.equals(that.sd)) - return false; - } - - boolean this_present_parameters = true && this.isSetParameters(); - boolean that_present_parameters = true && that.isSetParameters(); - if (this_present_parameters || that_present_parameters) { - if (!(this_present_parameters && that_present_parameters)) - return false; - if (!this.parameters.equals(that.parameters)) - return false; - } - - boolean this_present_privileges = true && this.isSetPrivileges(); - boolean that_present_privileges = true && that.isSetPrivileges(); - if (this_present_privileges || that_present_privileges) { - if (!(this_present_privileges && that_present_privileges)) - return false; - if (!this.privileges.equals(that.privileges)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_values = true && (isSetValues()); - list.add(present_values); - if (present_values) - list.add(values); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tableName = true && (isSetTableName()); - list.add(present_tableName); - if (present_tableName) - list.add(tableName); - - boolean present_createTime = true; - list.add(present_createTime); - if (present_createTime) - list.add(createTime); - - boolean present_lastAccessTime = true; - list.add(present_lastAccessTime); - if (present_lastAccessTime) - list.add(lastAccessTime); - - boolean present_sd = true && (isSetSd()); - list.add(present_sd); - if (present_sd) - list.add(sd); - - boolean present_parameters = true && (isSetParameters()); - list.add(present_parameters); - if (present_parameters) - list.add(parameters); - - boolean present_privileges = true && (isSetPrivileges()); - list.add(present_privileges); - if (present_privileges) - list.add(privileges); - - return list.hashCode(); - } - - @Override - public int compareTo(Partition other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCreateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(other.isSetLastAccessTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLastAccessTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastAccessTime, other.lastAccessTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSd()).compareTo(other.isSetSd()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSd()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sd, other.sd); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParameters()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrivileges()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("Partition("); - boolean first = true; - - sb.append("values:"); - if (this.values == null) { - sb.append("null"); - } else { - sb.append(this.values); - } - first = false; - if (!first) sb.append(", "); - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tableName:"); - if (this.tableName == null) { - sb.append("null"); - } else { - sb.append(this.tableName); - } - first = false; - if (!first) sb.append(", "); - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - if (!first) sb.append(", "); - sb.append("lastAccessTime:"); - sb.append(this.lastAccessTime); - first = false; - if (!first) sb.append(", "); - sb.append("sd:"); - if (this.sd == null) { - sb.append("null"); - } else { - sb.append(this.sd); - } - first = false; - if (!first) sb.append(", "); - sb.append("parameters:"); - if (this.parameters == null) { - sb.append("null"); - } else { - sb.append(this.parameters); - } - first = false; - if (isSetPrivileges()) { - if (!first) sb.append(", "); - sb.append("privileges:"); - if (this.privileges == null) { - sb.append("null"); - } else { - sb.append(this.privileges); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - // 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 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 _list208 = iprot.readListBegin(); - struct.values = new ArrayList(_list208.size); - String _elem209; - for (int _i210 = 0; _i210 < _list208.size; ++_i210) - { - _elem209 = iprot.readString(); - struct.values.add(_elem209); - } - 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 _map211 = iprot.readMapBegin(); - struct.parameters = new HashMap(2*_map211.size); - String _key212; - String _val213; - for (int _i214 = 0; _i214 < _map211.size; ++_i214) - { - _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 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 _iter215 : struct.values) - { - oprot.writeString(_iter215); - } - 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 _iter216 : struct.parameters.entrySet()) - { - oprot.writeString(_iter216.getKey()); - oprot.writeString(_iter216.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 _iter217 : struct.values) - { - oprot.writeString(_iter217); - } - } - } - 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 _iter218 : struct.parameters.entrySet()) - { - oprot.writeString(_iter218.getKey()); - oprot.writeString(_iter218.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 _list219 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.values = new ArrayList(_list219.size); - String _elem220; - for (int _i221 = 0; _i221 < _list219.size; ++_i221) - { - _elem220 = iprot.readString(); - struct.values.add(_elem220); - } - } - 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 _map222 = 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*_map222.size); - String _key223; - String _val224; - for (int _i225 = 0; _i225 < _map222.size; ++_i225) - { - _key223 = iprot.readString(); - _val224 = iprot.readString(); - struct.parameters.put(_key223, _val224); - } - } - struct.setParametersIsSet(true); - } - if (incoming.get(7)) { - struct.privileges = new PrincipalPrivilegeSet(); - struct.privileges.read(iprot); - struct.setPrivilegesIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index b515401..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum PartitionEventType implements org.apache.thrift.TEnum { - LOAD_DONE(1); - - private final int value; - - private PartitionEventType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static PartitionEventType findByValue(int value) { - switch (value) { - case 1: - return LOAD_DONE; - default: - return null; - } - } -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionListComposingSpec.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionListComposingSpec.java deleted file mode 100644 index e8232b9..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionListComposingSpec.java +++ /dev/null @@ -1,449 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PartitionListComposingSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionListComposingSpec"); - - private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PartitionListComposingSpecStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PartitionListComposingSpecTupleSchemeFactory()); - } - - private List partitions; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PARTITIONS((short)1, "partitions"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PARTITIONS - return PARTITIONS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionListComposingSpec.class, metaDataMap); - } - - public PartitionListComposingSpec() { - } - - public PartitionListComposingSpec( - List partitions) - { - this(); - this.partitions = partitions; - } - - /** - * Performs a deep copy on other. - */ - public PartitionListComposingSpec(PartitionListComposingSpec other) { - if (other.isSetPartitions()) { - List __this__partitions = new ArrayList(other.partitions.size()); - for (Partition other_element : other.partitions) { - __this__partitions.add(new Partition(other_element)); - } - this.partitions = __this__partitions; - } - } - - public PartitionListComposingSpec deepCopy() { - return new PartitionListComposingSpec(this); - } - - @Override - public void clear() { - this.partitions = null; - } - - public int getPartitionsSize() { - return (this.partitions == null) ? 0 : this.partitions.size(); - } - - public java.util.Iterator getPartitionsIterator() { - return (this.partitions == null) ? null : this.partitions.iterator(); - } - - public void addToPartitions(Partition elem) { - if (this.partitions == null) { - this.partitions = new ArrayList(); - } - this.partitions.add(elem); - } - - public List getPartitions() { - return this.partitions; - } - - public void setPartitions(List partitions) { - this.partitions = partitions; - } - - public void unsetPartitions() { - this.partitions = null; - } - - /** Returns true if field partitions is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitions() { - return this.partitions != null; - } - - public void setPartitionsIsSet(boolean value) { - if (!value) { - this.partitions = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PARTITIONS: - if (value == null) { - unsetPartitions(); - } else { - setPartitions((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PARTITIONS: - return getPartitions(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PARTITIONS: - return isSetPartitions(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PartitionListComposingSpec) - return this.equals((PartitionListComposingSpec)that); - return false; - } - - public boolean equals(PartitionListComposingSpec that) { - if (that == null) - return false; - - boolean this_present_partitions = true && this.isSetPartitions(); - boolean that_present_partitions = true && that.isSetPartitions(); - if (this_present_partitions || that_present_partitions) { - if (!(this_present_partitions && that_present_partitions)) - return false; - if (!this.partitions.equals(that.partitions)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_partitions = true && (isSetPartitions()); - list.add(present_partitions); - if (present_partitions) - list.add(partitions); - - return list.hashCode(); - } - - @Override - public int compareTo(PartitionListComposingSpec other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPartitions()).compareTo(other.isSetPartitions()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitions()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PartitionListComposingSpec("); - boolean first = true; - - sb.append("partitions:"); - if (this.partitions == null) { - sb.append("null"); - } else { - sb.append(this.partitions); - } - 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 PartitionListComposingSpecStandardSchemeFactory implements SchemeFactory { - public PartitionListComposingSpecStandardScheme getScheme() { - return new PartitionListComposingSpecStandardScheme(); - } - } - - private static class PartitionListComposingSpecStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionListComposingSpec 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: // PARTITIONS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list252 = iprot.readListBegin(); - struct.partitions = new ArrayList(_list252.size); - Partition _elem253; - for (int _i254 = 0; _i254 < _list252.size; ++_i254) - { - _elem253 = new Partition(); - _elem253.read(iprot); - struct.partitions.add(_elem253); - } - iprot.readListEnd(); - } - struct.setPartitionsIsSet(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, PartitionListComposingSpec struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.partitions != null) { - oprot.writeFieldBegin(PARTITIONS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size())); - for (Partition _iter255 : struct.partitions) - { - _iter255.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PartitionListComposingSpecTupleSchemeFactory implements SchemeFactory { - public PartitionListComposingSpecTupleScheme getScheme() { - return new PartitionListComposingSpecTupleScheme(); - } - } - - private static class PartitionListComposingSpecTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PartitionListComposingSpec struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPartitions()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetPartitions()) { - { - oprot.writeI32(struct.partitions.size()); - for (Partition _iter256 : struct.partitions) - { - _iter256.write(oprot); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PartitionListComposingSpec struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list257 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.partitions = new ArrayList(_list257.size); - Partition _elem258; - for (int _i259 = 0; _i259 < _list257.size; ++_i259) - { - _elem258 = new Partition(); - _elem258.read(iprot); - struct.partitions.add(_elem258); - } - } - struct.setPartitionsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpec.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpec.java deleted file mode 100644 index e8188a9..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpec.java +++ /dev/null @@ -1,826 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PartitionSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionSpec"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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 TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField ROOT_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("rootPath", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField SHARED_SDPARTITION_SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedSDPartitionSpec", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private static final org.apache.thrift.protocol.TField PARTITION_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionList", org.apache.thrift.protocol.TType.STRUCT, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PartitionSpecStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PartitionSpecTupleSchemeFactory()); - } - - private String dbName; // required - private String tableName; // required - private String rootPath; // required - private PartitionSpecWithSharedSD sharedSDPartitionSpec; // optional - private PartitionListComposingSpec partitionList; // 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 { - DB_NAME((short)1, "dbName"), - TABLE_NAME((short)2, "tableName"), - ROOT_PATH((short)3, "rootPath"), - SHARED_SDPARTITION_SPEC((short)4, "sharedSDPartitionSpec"), - PARTITION_LIST((short)5, "partitionList"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TABLE_NAME - return TABLE_NAME; - case 3: // ROOT_PATH - return ROOT_PATH; - case 4: // SHARED_SDPARTITION_SPEC - return SHARED_SDPARTITION_SPEC; - case 5: // PARTITION_LIST - return PARTITION_LIST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.SHARED_SDPARTITION_SPEC,_Fields.PARTITION_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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ROOT_PATH, new org.apache.thrift.meta_data.FieldMetaData("rootPath", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SHARED_SDPARTITION_SPEC, new org.apache.thrift.meta_data.FieldMetaData("sharedSDPartitionSpec", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionSpecWithSharedSD.class))); - tmpMap.put(_Fields.PARTITION_LIST, new org.apache.thrift.meta_data.FieldMetaData("partitionList", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionListComposingSpec.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionSpec.class, metaDataMap); - } - - public PartitionSpec() { - } - - public PartitionSpec( - String dbName, - String tableName, - String rootPath) - { - this(); - this.dbName = dbName; - this.tableName = tableName; - this.rootPath = rootPath; - } - - /** - * Performs a deep copy on other. - */ - public PartitionSpec(PartitionSpec other) { - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTableName()) { - this.tableName = other.tableName; - } - if (other.isSetRootPath()) { - this.rootPath = other.rootPath; - } - if (other.isSetSharedSDPartitionSpec()) { - this.sharedSDPartitionSpec = new PartitionSpecWithSharedSD(other.sharedSDPartitionSpec); - } - if (other.isSetPartitionList()) { - this.partitionList = new PartitionListComposingSpec(other.partitionList); - } - } - - public PartitionSpec deepCopy() { - return new PartitionSpec(this); - } - - @Override - public void clear() { - this.dbName = null; - this.tableName = null; - this.rootPath = null; - this.sharedSDPartitionSpec = null; - this.partitionList = null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTableName() { - return this.tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public void unsetTableName() { - this.tableName = null; - } - - /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ - public boolean isSetTableName() { - return this.tableName != null; - } - - public void setTableNameIsSet(boolean value) { - if (!value) { - this.tableName = null; - } - } - - public String getRootPath() { - return this.rootPath; - } - - public void setRootPath(String rootPath) { - this.rootPath = rootPath; - } - - public void unsetRootPath() { - this.rootPath = null; - } - - /** Returns true if field rootPath is set (has been assigned a value) and false otherwise */ - public boolean isSetRootPath() { - return this.rootPath != null; - } - - public void setRootPathIsSet(boolean value) { - if (!value) { - this.rootPath = null; - } - } - - public PartitionSpecWithSharedSD getSharedSDPartitionSpec() { - return this.sharedSDPartitionSpec; - } - - public void setSharedSDPartitionSpec(PartitionSpecWithSharedSD sharedSDPartitionSpec) { - this.sharedSDPartitionSpec = sharedSDPartitionSpec; - } - - public void unsetSharedSDPartitionSpec() { - this.sharedSDPartitionSpec = null; - } - - /** Returns true if field sharedSDPartitionSpec is set (has been assigned a value) and false otherwise */ - public boolean isSetSharedSDPartitionSpec() { - return this.sharedSDPartitionSpec != null; - } - - public void setSharedSDPartitionSpecIsSet(boolean value) { - if (!value) { - this.sharedSDPartitionSpec = null; - } - } - - public PartitionListComposingSpec getPartitionList() { - return this.partitionList; - } - - public void setPartitionList(PartitionListComposingSpec partitionList) { - this.partitionList = partitionList; - } - - public void unsetPartitionList() { - this.partitionList = null; - } - - /** Returns true if field partitionList is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitionList() { - return this.partitionList != null; - } - - public void setPartitionListIsSet(boolean value) { - if (!value) { - this.partitionList = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTableName(); - } else { - setTableName((String)value); - } - break; - - case ROOT_PATH: - if (value == null) { - unsetRootPath(); - } else { - setRootPath((String)value); - } - break; - - case SHARED_SDPARTITION_SPEC: - if (value == null) { - unsetSharedSDPartitionSpec(); - } else { - setSharedSDPartitionSpec((PartitionSpecWithSharedSD)value); - } - break; - - case PARTITION_LIST: - if (value == null) { - unsetPartitionList(); - } else { - setPartitionList((PartitionListComposingSpec)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case TABLE_NAME: - return getTableName(); - - case ROOT_PATH: - return getRootPath(); - - case SHARED_SDPARTITION_SPEC: - return getSharedSDPartitionSpec(); - - case PARTITION_LIST: - return getPartitionList(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case TABLE_NAME: - return isSetTableName(); - case ROOT_PATH: - return isSetRootPath(); - case SHARED_SDPARTITION_SPEC: - return isSetSharedSDPartitionSpec(); - case PARTITION_LIST: - return isSetPartitionList(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PartitionSpec) - return this.equals((PartitionSpec)that); - return false; - } - - public boolean equals(PartitionSpec that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tableName = true && this.isSetTableName(); - boolean that_present_tableName = true && that.isSetTableName(); - if (this_present_tableName || that_present_tableName) { - if (!(this_present_tableName && that_present_tableName)) - return false; - if (!this.tableName.equals(that.tableName)) - return false; - } - - boolean this_present_rootPath = true && this.isSetRootPath(); - boolean that_present_rootPath = true && that.isSetRootPath(); - if (this_present_rootPath || that_present_rootPath) { - if (!(this_present_rootPath && that_present_rootPath)) - return false; - if (!this.rootPath.equals(that.rootPath)) - return false; - } - - boolean this_present_sharedSDPartitionSpec = true && this.isSetSharedSDPartitionSpec(); - boolean that_present_sharedSDPartitionSpec = true && that.isSetSharedSDPartitionSpec(); - if (this_present_sharedSDPartitionSpec || that_present_sharedSDPartitionSpec) { - if (!(this_present_sharedSDPartitionSpec && that_present_sharedSDPartitionSpec)) - return false; - if (!this.sharedSDPartitionSpec.equals(that.sharedSDPartitionSpec)) - return false; - } - - boolean this_present_partitionList = true && this.isSetPartitionList(); - boolean that_present_partitionList = true && that.isSetPartitionList(); - if (this_present_partitionList || that_present_partitionList) { - if (!(this_present_partitionList && that_present_partitionList)) - return false; - if (!this.partitionList.equals(that.partitionList)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tableName = true && (isSetTableName()); - list.add(present_tableName); - if (present_tableName) - list.add(tableName); - - boolean present_rootPath = true && (isSetRootPath()); - list.add(present_rootPath); - if (present_rootPath) - list.add(rootPath); - - boolean present_sharedSDPartitionSpec = true && (isSetSharedSDPartitionSpec()); - list.add(present_sharedSDPartitionSpec); - if (present_sharedSDPartitionSpec) - list.add(sharedSDPartitionSpec); - - boolean present_partitionList = true && (isSetPartitionList()); - list.add(present_partitionList); - if (present_partitionList) - list.add(partitionList); - - return list.hashCode(); - } - - @Override - public int compareTo(PartitionSpec other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRootPath()).compareTo(other.isSetRootPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRootPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rootPath, other.rootPath); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSharedSDPartitionSpec()).compareTo(other.isSetSharedSDPartitionSpec()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSharedSDPartitionSpec()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sharedSDPartitionSpec, other.sharedSDPartitionSpec); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartitionList()).compareTo(other.isSetPartitionList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitionList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionList, other.partitionList); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PartitionSpec("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tableName:"); - if (this.tableName == null) { - sb.append("null"); - } else { - sb.append(this.tableName); - } - first = false; - if (!first) sb.append(", "); - sb.append("rootPath:"); - if (this.rootPath == null) { - sb.append("null"); - } else { - sb.append(this.rootPath); - } - first = false; - if (isSetSharedSDPartitionSpec()) { - if (!first) sb.append(", "); - sb.append("sharedSDPartitionSpec:"); - if (this.sharedSDPartitionSpec == null) { - sb.append("null"); - } else { - sb.append(this.sharedSDPartitionSpec); - } - first = false; - } - if (isSetPartitionList()) { - if (!first) sb.append(", "); - sb.append("partitionList:"); - if (this.partitionList == null) { - sb.append("null"); - } else { - sb.append(this.partitionList); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (sharedSDPartitionSpec != null) { - sharedSDPartitionSpec.validate(); - } - if (partitionList != null) { - partitionList.validate(); - } - } - - 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 PartitionSpecStandardSchemeFactory implements SchemeFactory { - public PartitionSpecStandardScheme getScheme() { - return new PartitionSpecStandardScheme(); - } - } - - private static class PartitionSpecStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionSpec 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.dbName = iprot.readString(); - struct.setDbNameIsSet(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.tableName = iprot.readString(); - struct.setTableNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ROOT_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.rootPath = iprot.readString(); - struct.setRootPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // SHARED_SDPARTITION_SPEC - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.sharedSDPartitionSpec = new PartitionSpecWithSharedSD(); - struct.sharedSDPartitionSpec.read(iprot); - struct.setSharedSDPartitionSpecIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // PARTITION_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.partitionList = new PartitionListComposingSpec(); - struct.partitionList.read(iprot); - struct.setPartitionListIsSet(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, PartitionSpec struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - 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(); - } - if (struct.rootPath != null) { - oprot.writeFieldBegin(ROOT_PATH_FIELD_DESC); - oprot.writeString(struct.rootPath); - oprot.writeFieldEnd(); - } - if (struct.sharedSDPartitionSpec != null) { - if (struct.isSetSharedSDPartitionSpec()) { - oprot.writeFieldBegin(SHARED_SDPARTITION_SPEC_FIELD_DESC); - struct.sharedSDPartitionSpec.write(oprot); - oprot.writeFieldEnd(); - } - } - if (struct.partitionList != null) { - if (struct.isSetPartitionList()) { - oprot.writeFieldBegin(PARTITION_LIST_FIELD_DESC); - struct.partitionList.write(oprot); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PartitionSpecTupleSchemeFactory implements SchemeFactory { - public PartitionSpecTupleScheme getScheme() { - return new PartitionSpecTupleScheme(); - } - } - - private static class PartitionSpecTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PartitionSpec struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetDbName()) { - optionals.set(0); - } - if (struct.isSetTableName()) { - optionals.set(1); - } - if (struct.isSetRootPath()) { - optionals.set(2); - } - if (struct.isSetSharedSDPartitionSpec()) { - optionals.set(3); - } - if (struct.isSetPartitionList()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetDbName()) { - oprot.writeString(struct.dbName); - } - if (struct.isSetTableName()) { - oprot.writeString(struct.tableName); - } - if (struct.isSetRootPath()) { - oprot.writeString(struct.rootPath); - } - if (struct.isSetSharedSDPartitionSpec()) { - struct.sharedSDPartitionSpec.write(oprot); - } - if (struct.isSetPartitionList()) { - struct.partitionList.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PartitionSpec struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - } - if (incoming.get(1)) { - struct.tableName = iprot.readString(); - struct.setTableNameIsSet(true); - } - if (incoming.get(2)) { - struct.rootPath = iprot.readString(); - struct.setRootPathIsSet(true); - } - if (incoming.get(3)) { - struct.sharedSDPartitionSpec = new PartitionSpecWithSharedSD(); - struct.sharedSDPartitionSpec.read(iprot); - struct.setSharedSDPartitionSpecIsSet(true); - } - if (incoming.get(4)) { - struct.partitionList = new PartitionListComposingSpec(); - struct.partitionList.read(iprot); - struct.setPartitionListIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpecWithSharedSD.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpecWithSharedSD.java deleted file mode 100644 index 2c41912..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpecWithSharedSD.java +++ /dev/null @@ -1,558 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PartitionSpecWithSharedSD implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionSpecWithSharedSD"); - - private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField SD_FIELD_DESC = new org.apache.thrift.protocol.TField("sd", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PartitionSpecWithSharedSDStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PartitionSpecWithSharedSDTupleSchemeFactory()); - } - - private List partitions; // required - private StorageDescriptor sd; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PARTITIONS((short)1, "partitions"), - SD((short)2, "sd"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PARTITIONS - return PARTITIONS; - case 2: // SD - return SD; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionWithoutSD.class)))); - tmpMap.put(_Fields.SD, new org.apache.thrift.meta_data.FieldMetaData("sd", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StorageDescriptor.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionSpecWithSharedSD.class, metaDataMap); - } - - public PartitionSpecWithSharedSD() { - } - - public PartitionSpecWithSharedSD( - List partitions, - StorageDescriptor sd) - { - this(); - this.partitions = partitions; - this.sd = sd; - } - - /** - * Performs a deep copy on other. - */ - public PartitionSpecWithSharedSD(PartitionSpecWithSharedSD other) { - if (other.isSetPartitions()) { - List __this__partitions = new ArrayList(other.partitions.size()); - for (PartitionWithoutSD other_element : other.partitions) { - __this__partitions.add(new PartitionWithoutSD(other_element)); - } - this.partitions = __this__partitions; - } - if (other.isSetSd()) { - this.sd = new StorageDescriptor(other.sd); - } - } - - public PartitionSpecWithSharedSD deepCopy() { - return new PartitionSpecWithSharedSD(this); - } - - @Override - public void clear() { - this.partitions = null; - this.sd = null; - } - - public int getPartitionsSize() { - return (this.partitions == null) ? 0 : this.partitions.size(); - } - - public java.util.Iterator getPartitionsIterator() { - return (this.partitions == null) ? null : this.partitions.iterator(); - } - - public void addToPartitions(PartitionWithoutSD elem) { - if (this.partitions == null) { - this.partitions = new ArrayList(); - } - this.partitions.add(elem); - } - - public List getPartitions() { - return this.partitions; - } - - public void setPartitions(List partitions) { - this.partitions = partitions; - } - - public void unsetPartitions() { - this.partitions = null; - } - - /** Returns true if field partitions is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitions() { - return this.partitions != null; - } - - public void setPartitionsIsSet(boolean value) { - if (!value) { - this.partitions = null; - } - } - - public StorageDescriptor getSd() { - return this.sd; - } - - public void setSd(StorageDescriptor sd) { - this.sd = sd; - } - - public void unsetSd() { - this.sd = null; - } - - /** Returns true if field sd is set (has been assigned a value) and false otherwise */ - public boolean isSetSd() { - return this.sd != null; - } - - public void setSdIsSet(boolean value) { - if (!value) { - this.sd = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PARTITIONS: - if (value == null) { - unsetPartitions(); - } else { - setPartitions((List)value); - } - break; - - case SD: - if (value == null) { - unsetSd(); - } else { - setSd((StorageDescriptor)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PARTITIONS: - return getPartitions(); - - case SD: - return getSd(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PARTITIONS: - return isSetPartitions(); - case SD: - return isSetSd(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PartitionSpecWithSharedSD) - return this.equals((PartitionSpecWithSharedSD)that); - return false; - } - - public boolean equals(PartitionSpecWithSharedSD that) { - if (that == null) - return false; - - boolean this_present_partitions = true && this.isSetPartitions(); - boolean that_present_partitions = true && that.isSetPartitions(); - if (this_present_partitions || that_present_partitions) { - if (!(this_present_partitions && that_present_partitions)) - return false; - if (!this.partitions.equals(that.partitions)) - return false; - } - - boolean this_present_sd = true && this.isSetSd(); - boolean that_present_sd = true && that.isSetSd(); - if (this_present_sd || that_present_sd) { - if (!(this_present_sd && that_present_sd)) - return false; - if (!this.sd.equals(that.sd)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_partitions = true && (isSetPartitions()); - list.add(present_partitions); - if (present_partitions) - list.add(partitions); - - boolean present_sd = true && (isSetSd()); - list.add(present_sd); - if (present_sd) - list.add(sd); - - return list.hashCode(); - } - - @Override - public int compareTo(PartitionSpecWithSharedSD other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPartitions()).compareTo(other.isSetPartitions()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitions()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSd()).compareTo(other.isSetSd()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSd()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sd, other.sd); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PartitionSpecWithSharedSD("); - boolean first = true; - - sb.append("partitions:"); - if (this.partitions == null) { - sb.append("null"); - } else { - sb.append(this.partitions); - } - first = false; - if (!first) sb.append(", "); - sb.append("sd:"); - if (this.sd == null) { - sb.append("null"); - } else { - sb.append(this.sd); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 PartitionSpecWithSharedSDStandardSchemeFactory implements SchemeFactory { - public PartitionSpecWithSharedSDStandardScheme getScheme() { - return new PartitionSpecWithSharedSDStandardScheme(); - } - } - - private static class PartitionSpecWithSharedSDStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionSpecWithSharedSD 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: // PARTITIONS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list244 = iprot.readListBegin(); - struct.partitions = new ArrayList(_list244.size); - PartitionWithoutSD _elem245; - for (int _i246 = 0; _i246 < _list244.size; ++_i246) - { - _elem245 = new PartitionWithoutSD(); - _elem245.read(iprot); - struct.partitions.add(_elem245); - } - iprot.readListEnd(); - } - struct.setPartitionsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // 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; - 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, PartitionSpecWithSharedSD struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.partitions != null) { - oprot.writeFieldBegin(PARTITIONS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size())); - for (PartitionWithoutSD _iter247 : struct.partitions) - { - _iter247.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.sd != null) { - oprot.writeFieldBegin(SD_FIELD_DESC); - struct.sd.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PartitionSpecWithSharedSDTupleSchemeFactory implements SchemeFactory { - public PartitionSpecWithSharedSDTupleScheme getScheme() { - return new PartitionSpecWithSharedSDTupleScheme(); - } - } - - private static class PartitionSpecWithSharedSDTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PartitionSpecWithSharedSD struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPartitions()) { - optionals.set(0); - } - if (struct.isSetSd()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetPartitions()) { - { - oprot.writeI32(struct.partitions.size()); - for (PartitionWithoutSD _iter248 : struct.partitions) - { - _iter248.write(oprot); - } - } - } - if (struct.isSetSd()) { - struct.sd.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PartitionSpecWithSharedSD struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list249 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.partitions = new ArrayList(_list249.size); - PartitionWithoutSD _elem250; - for (int _i251 = 0; _i251 < _list249.size; ++_i251) - { - _elem250 = new PartitionWithoutSD(); - _elem250.read(iprot); - struct.partitions.add(_elem250); - } - } - struct.setPartitionsIsSet(true); - } - if (incoming.get(1)) { - struct.sd = new StorageDescriptor(); - struct.sd.read(iprot); - struct.setSdIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionWithoutSD.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionWithoutSD.java deleted file mode 100644 index f0c5ce1..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionWithoutSD.java +++ /dev/null @@ -1,1016 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PartitionWithoutSD implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionWithoutSD"); - - private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)1); - 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 LAST_ACCESS_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAccessTime", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField RELATIVE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("relativePath", org.apache.thrift.protocol.TType.STRING, (short)4); - 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)5); - 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)6); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PartitionWithoutSDStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PartitionWithoutSDTupleSchemeFactory()); - } - - private List values; // required - private int createTime; // required - private int lastAccessTime; // required - private String relativePath; // required - private Map parameters; // 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 { - VALUES((short)1, "values"), - CREATE_TIME((short)2, "createTime"), - LAST_ACCESS_TIME((short)3, "lastAccessTime"), - RELATIVE_PATH((short)4, "relativePath"), - PARAMETERS((short)5, "parameters"), - PRIVILEGES((short)6, "privileges"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // VALUES - return VALUES; - case 2: // CREATE_TIME - return CREATE_TIME; - case 3: // LAST_ACCESS_TIME - return LAST_ACCESS_TIME; - case 4: // RELATIVE_PATH - return RELATIVE_PATH; - case 5: // PARAMETERS - return PARAMETERS; - case 6: // PRIVILEGES - return PRIVILEGES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __CREATETIME_ISSET_ID = 0; - private static final int __LASTACCESSTIME_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _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); - tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.LAST_ACCESS_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastAccessTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.RELATIVE_PATH, new org.apache.thrift.meta_data.FieldMetaData("relativePath", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrincipalPrivilegeSet.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionWithoutSD.class, metaDataMap); - } - - public PartitionWithoutSD() { - } - - public PartitionWithoutSD( - List values, - int createTime, - int lastAccessTime, - String relativePath, - Map parameters) - { - this(); - this.values = values; - this.createTime = createTime; - setCreateTimeIsSet(true); - this.lastAccessTime = lastAccessTime; - setLastAccessTimeIsSet(true); - this.relativePath = relativePath; - this.parameters = parameters; - } - - /** - * Performs a deep copy on other. - */ - public PartitionWithoutSD(PartitionWithoutSD other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetValues()) { - List __this__values = new ArrayList(other.values); - this.values = __this__values; - } - this.createTime = other.createTime; - this.lastAccessTime = other.lastAccessTime; - if (other.isSetRelativePath()) { - this.relativePath = other.relativePath; - } - if (other.isSetParameters()) { - Map __this__parameters = new HashMap(other.parameters); - this.parameters = __this__parameters; - } - if (other.isSetPrivileges()) { - this.privileges = new PrincipalPrivilegeSet(other.privileges); - } - } - - public PartitionWithoutSD deepCopy() { - return new PartitionWithoutSD(this); - } - - @Override - public void clear() { - this.values = null; - setCreateTimeIsSet(false); - this.createTime = 0; - setLastAccessTimeIsSet(false); - this.lastAccessTime = 0; - this.relativePath = null; - this.parameters = null; - this.privileges = null; - } - - public int getValuesSize() { - return (this.values == null) ? 0 : this.values.size(); - } - - public java.util.Iterator getValuesIterator() { - return (this.values == null) ? null : this.values.iterator(); - } - - public void addToValues(String elem) { - if (this.values == null) { - this.values = new ArrayList(); - } - this.values.add(elem); - } - - public List getValues() { - return this.values; - } - - public void setValues(List values) { - this.values = values; - } - - public void unsetValues() { - this.values = null; - } - - /** Returns true if field values is set (has been assigned a value) and false otherwise */ - public boolean isSetValues() { - return this.values != null; - } - - public void setValuesIsSet(boolean value) { - if (!value) { - this.values = null; - } - } - - public int getCreateTime() { - return this.createTime; - } - - public void setCreateTime(int createTime) { - this.createTime = createTime; - setCreateTimeIsSet(true); - } - - public void unsetCreateTime() { - __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - public void setCreateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); - } - - public int getLastAccessTime() { - return this.lastAccessTime; - } - - public void setLastAccessTime(int lastAccessTime) { - this.lastAccessTime = lastAccessTime; - setLastAccessTimeIsSet(true); - } - - public void unsetLastAccessTime() { - __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 EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); - } - - public void setLastAccessTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); - } - - public String getRelativePath() { - return this.relativePath; - } - - public void setRelativePath(String relativePath) { - this.relativePath = relativePath; - } - - public void unsetRelativePath() { - this.relativePath = null; - } - - /** Returns true if field relativePath is set (has been assigned a value) and false otherwise */ - public boolean isSetRelativePath() { - return this.relativePath != null; - } - - public void setRelativePathIsSet(boolean value) { - if (!value) { - this.relativePath = null; - } - } - - public int getParametersSize() { - return (this.parameters == null) ? 0 : this.parameters.size(); - } - - public void putToParameters(String key, String val) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(key, val); - } - - public Map getParameters() { - return this.parameters; - } - - public void setParameters(Map parameters) { - this.parameters = parameters; - } - - public void unsetParameters() { - this.parameters = null; - } - - /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ - public boolean isSetParameters() { - return this.parameters != null; - } - - public void setParametersIsSet(boolean value) { - if (!value) { - this.parameters = null; - } - } - - public PrincipalPrivilegeSet getPrivileges() { - return this.privileges; - } - - public void setPrivileges(PrincipalPrivilegeSet privileges) { - this.privileges = privileges; - } - - public void unsetPrivileges() { - this.privileges = null; - } - - /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ - public boolean isSetPrivileges() { - return this.privileges != null; - } - - public void setPrivilegesIsSet(boolean value) { - if (!value) { - this.privileges = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case VALUES: - if (value == null) { - unsetValues(); - } else { - setValues((List)value); - } - break; - - case CREATE_TIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((Integer)value); - } - break; - - case LAST_ACCESS_TIME: - if (value == null) { - unsetLastAccessTime(); - } else { - setLastAccessTime((Integer)value); - } - break; - - case RELATIVE_PATH: - if (value == null) { - unsetRelativePath(); - } else { - setRelativePath((String)value); - } - break; - - case PARAMETERS: - if (value == null) { - unsetParameters(); - } else { - setParameters((Map)value); - } - break; - - case PRIVILEGES: - if (value == null) { - unsetPrivileges(); - } else { - setPrivileges((PrincipalPrivilegeSet)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case VALUES: - return getValues(); - - case CREATE_TIME: - return getCreateTime(); - - case LAST_ACCESS_TIME: - return getLastAccessTime(); - - case RELATIVE_PATH: - return getRelativePath(); - - case PARAMETERS: - return getParameters(); - - case PRIVILEGES: - return getPrivileges(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case VALUES: - return isSetValues(); - case CREATE_TIME: - return isSetCreateTime(); - case LAST_ACCESS_TIME: - return isSetLastAccessTime(); - case RELATIVE_PATH: - return isSetRelativePath(); - case PARAMETERS: - return isSetParameters(); - case PRIVILEGES: - return isSetPrivileges(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PartitionWithoutSD) - return this.equals((PartitionWithoutSD)that); - return false; - } - - public boolean equals(PartitionWithoutSD that) { - if (that == null) - return false; - - boolean this_present_values = true && this.isSetValues(); - boolean that_present_values = true && that.isSetValues(); - if (this_present_values || that_present_values) { - if (!(this_present_values && that_present_values)) - return false; - if (!this.values.equals(that.values)) - return false; - } - - boolean this_present_createTime = true; - boolean that_present_createTime = true; - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_lastAccessTime = true; - boolean that_present_lastAccessTime = true; - if (this_present_lastAccessTime || that_present_lastAccessTime) { - if (!(this_present_lastAccessTime && that_present_lastAccessTime)) - return false; - if (this.lastAccessTime != that.lastAccessTime) - return false; - } - - boolean this_present_relativePath = true && this.isSetRelativePath(); - boolean that_present_relativePath = true && that.isSetRelativePath(); - if (this_present_relativePath || that_present_relativePath) { - if (!(this_present_relativePath && that_present_relativePath)) - return false; - if (!this.relativePath.equals(that.relativePath)) - return false; - } - - boolean this_present_parameters = true && this.isSetParameters(); - boolean that_present_parameters = true && that.isSetParameters(); - if (this_present_parameters || that_present_parameters) { - if (!(this_present_parameters && that_present_parameters)) - return false; - if (!this.parameters.equals(that.parameters)) - return false; - } - - boolean this_present_privileges = true && this.isSetPrivileges(); - boolean that_present_privileges = true && that.isSetPrivileges(); - if (this_present_privileges || that_present_privileges) { - if (!(this_present_privileges && that_present_privileges)) - return false; - if (!this.privileges.equals(that.privileges)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_values = true && (isSetValues()); - list.add(present_values); - if (present_values) - list.add(values); - - boolean present_createTime = true; - list.add(present_createTime); - if (present_createTime) - list.add(createTime); - - boolean present_lastAccessTime = true; - list.add(present_lastAccessTime); - if (present_lastAccessTime) - list.add(lastAccessTime); - - boolean present_relativePath = true && (isSetRelativePath()); - list.add(present_relativePath); - if (present_relativePath) - list.add(relativePath); - - boolean present_parameters = true && (isSetParameters()); - list.add(present_parameters); - if (present_parameters) - list.add(parameters); - - boolean present_privileges = true && (isSetPrivileges()); - list.add(present_privileges); - if (present_privileges) - list.add(privileges); - - return list.hashCode(); - } - - @Override - public int compareTo(PartitionWithoutSD other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCreateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(other.isSetLastAccessTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLastAccessTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastAccessTime, other.lastAccessTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRelativePath()).compareTo(other.isSetRelativePath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRelativePath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.relativePath, other.relativePath); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParameters()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrivileges()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PartitionWithoutSD("); - boolean first = true; - - sb.append("values:"); - if (this.values == null) { - sb.append("null"); - } else { - sb.append(this.values); - } - first = false; - if (!first) sb.append(", "); - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - if (!first) sb.append(", "); - sb.append("lastAccessTime:"); - sb.append(this.lastAccessTime); - first = false; - if (!first) sb.append(", "); - sb.append("relativePath:"); - if (this.relativePath == null) { - sb.append("null"); - } else { - sb.append(this.relativePath); - } - first = false; - if (!first) sb.append(", "); - sb.append("parameters:"); - if (this.parameters == null) { - sb.append("null"); - } else { - sb.append(this.parameters); - } - first = false; - if (isSetPrivileges()) { - if (!first) sb.append(", "); - sb.append("privileges:"); - if (this.privileges == null) { - sb.append("null"); - } else { - sb.append(this.privileges); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - // 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 PartitionWithoutSDStandardSchemeFactory implements SchemeFactory { - public PartitionWithoutSDStandardScheme getScheme() { - return new PartitionWithoutSDStandardScheme(); - } - } - - private static class PartitionWithoutSDStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionWithoutSD 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 _list226 = iprot.readListBegin(); - struct.values = new ArrayList(_list226.size); - String _elem227; - for (int _i228 = 0; _i228 < _list226.size; ++_i228) - { - _elem227 = iprot.readString(); - struct.values.add(_elem227); - } - iprot.readListEnd(); - } - struct.setValuesIsSet(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: // 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 4: // RELATIVE_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.relativePath = iprot.readString(); - struct.setRelativePathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // PARAMETERS - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map229 = iprot.readMapBegin(); - struct.parameters = new HashMap(2*_map229.size); - String _key230; - String _val231; - for (int _i232 = 0; _i232 < _map229.size; ++_i232) - { - _key230 = iprot.readString(); - _val231 = iprot.readString(); - struct.parameters.put(_key230, _val231); - } - iprot.readMapEnd(); - } - struct.setParametersIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // 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, PartitionWithoutSD 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 _iter233 : struct.values) - { - oprot.writeString(_iter233); - } - oprot.writeListEnd(); - } - 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.relativePath != null) { - oprot.writeFieldBegin(RELATIVE_PATH_FIELD_DESC); - oprot.writeString(struct.relativePath); - 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 _iter234 : struct.parameters.entrySet()) - { - oprot.writeString(_iter234.getKey()); - oprot.writeString(_iter234.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 PartitionWithoutSDTupleSchemeFactory implements SchemeFactory { - public PartitionWithoutSDTupleScheme getScheme() { - return new PartitionWithoutSDTupleScheme(); - } - } - - private static class PartitionWithoutSDTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PartitionWithoutSD struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetValues()) { - optionals.set(0); - } - if (struct.isSetCreateTime()) { - optionals.set(1); - } - if (struct.isSetLastAccessTime()) { - optionals.set(2); - } - if (struct.isSetRelativePath()) { - optionals.set(3); - } - if (struct.isSetParameters()) { - optionals.set(4); - } - if (struct.isSetPrivileges()) { - optionals.set(5); - } - oprot.writeBitSet(optionals, 6); - if (struct.isSetValues()) { - { - oprot.writeI32(struct.values.size()); - for (String _iter235 : struct.values) - { - oprot.writeString(_iter235); - } - } - } - if (struct.isSetCreateTime()) { - oprot.writeI32(struct.createTime); - } - if (struct.isSetLastAccessTime()) { - oprot.writeI32(struct.lastAccessTime); - } - if (struct.isSetRelativePath()) { - oprot.writeString(struct.relativePath); - } - if (struct.isSetParameters()) { - { - oprot.writeI32(struct.parameters.size()); - for (Map.Entry _iter236 : struct.parameters.entrySet()) - { - oprot.writeString(_iter236.getKey()); - oprot.writeString(_iter236.getValue()); - } - } - } - if (struct.isSetPrivileges()) { - struct.privileges.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PartitionWithoutSD struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(6); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list237 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.values = new ArrayList(_list237.size); - String _elem238; - for (int _i239 = 0; _i239 < _list237.size; ++_i239) - { - _elem238 = iprot.readString(); - struct.values.add(_elem238); - } - } - struct.setValuesIsSet(true); - } - if (incoming.get(1)) { - struct.createTime = iprot.readI32(); - struct.setCreateTimeIsSet(true); - } - if (incoming.get(2)) { - struct.lastAccessTime = iprot.readI32(); - struct.setLastAccessTimeIsSet(true); - } - if (incoming.get(3)) { - struct.relativePath = iprot.readString(); - struct.setRelativePathIsSet(true); - } - if (incoming.get(4)) { - { - org.apache.thrift.protocol.TMap _map240 = 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*_map240.size); - String _key241; - String _val242; - for (int _i243 = 0; _i243 < _map240.size; ++_i243) - { - _key241 = iprot.readString(); - _val242 = iprot.readString(); - struct.parameters.put(_key241, _val242); - } - } - struct.setParametersIsSet(true); - } - if (incoming.get(5)) { - struct.privileges = new PrincipalPrivilegeSet(); - struct.privileges.read(iprot); - struct.setPrivilegesIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprRequest.java deleted file mode 100644 index 59972af..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprRequest.java +++ /dev/null @@ -1,815 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PartitionsByExprRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionsByExprRequest"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField EXPR_FIELD_DESC = new org.apache.thrift.protocol.TField("expr", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField DEFAULT_PARTITION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPartitionName", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxParts", org.apache.thrift.protocol.TType.I16, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PartitionsByExprRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PartitionsByExprRequestTupleSchemeFactory()); - } - - private String dbName; // required - private String tblName; // required - private ByteBuffer expr; // required - private String defaultPartitionName; // optional - private short maxParts; // 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 { - DB_NAME((short)1, "dbName"), - TBL_NAME((short)2, "tblName"), - EXPR((short)3, "expr"), - DEFAULT_PARTITION_NAME((short)4, "defaultPartitionName"), - MAX_PARTS((short)5, "maxParts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // EXPR - return EXPR; - case 4: // DEFAULT_PARTITION_NAME - return DEFAULT_PARTITION_NAME; - case 5: // MAX_PARTS - return MAX_PARTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAXPARTS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.DEFAULT_PARTITION_NAME,_Fields.MAX_PARTS}; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.EXPR, new org.apache.thrift.meta_data.FieldMetaData("expr", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.DEFAULT_PARTITION_NAME, new org.apache.thrift.meta_data.FieldMetaData("defaultPartitionName", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("maxParts", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionsByExprRequest.class, metaDataMap); - } - - public PartitionsByExprRequest() { - this.maxParts = (short)-1; - - } - - public PartitionsByExprRequest( - String dbName, - String tblName, - ByteBuffer expr) - { - this(); - this.dbName = dbName; - this.tblName = tblName; - this.expr = org.apache.thrift.TBaseHelper.copyBinary(expr); - } - - /** - * Performs a deep copy on other. - */ - public PartitionsByExprRequest(PartitionsByExprRequest other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTblName()) { - this.tblName = other.tblName; - } - if (other.isSetExpr()) { - this.expr = org.apache.thrift.TBaseHelper.copyBinary(other.expr); - } - if (other.isSetDefaultPartitionName()) { - this.defaultPartitionName = other.defaultPartitionName; - } - this.maxParts = other.maxParts; - } - - public PartitionsByExprRequest deepCopy() { - return new PartitionsByExprRequest(this); - } - - @Override - public void clear() { - this.dbName = null; - this.tblName = null; - this.expr = null; - this.defaultPartitionName = null; - this.maxParts = (short)-1; - - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTblName() { - return this.tblName; - } - - public void setTblName(String tblName) { - this.tblName = tblName; - } - - public void unsetTblName() { - this.tblName = null; - } - - /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ - public boolean isSetTblName() { - return this.tblName != null; - } - - public void setTblNameIsSet(boolean value) { - if (!value) { - this.tblName = null; - } - } - - public byte[] getExpr() { - setExpr(org.apache.thrift.TBaseHelper.rightSize(expr)); - return expr == null ? null : expr.array(); - } - - public ByteBuffer bufferForExpr() { - return org.apache.thrift.TBaseHelper.copyBinary(expr); - } - - public void setExpr(byte[] expr) { - this.expr = expr == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(expr, expr.length)); - } - - public void setExpr(ByteBuffer expr) { - this.expr = org.apache.thrift.TBaseHelper.copyBinary(expr); - } - - public void unsetExpr() { - this.expr = null; - } - - /** Returns true if field expr is set (has been assigned a value) and false otherwise */ - public boolean isSetExpr() { - return this.expr != null; - } - - public void setExprIsSet(boolean value) { - if (!value) { - this.expr = null; - } - } - - public String getDefaultPartitionName() { - return this.defaultPartitionName; - } - - public void setDefaultPartitionName(String defaultPartitionName) { - this.defaultPartitionName = defaultPartitionName; - } - - public void unsetDefaultPartitionName() { - this.defaultPartitionName = null; - } - - /** Returns true if field defaultPartitionName is set (has been assigned a value) and false otherwise */ - public boolean isSetDefaultPartitionName() { - return this.defaultPartitionName != null; - } - - public void setDefaultPartitionNameIsSet(boolean value) { - if (!value) { - this.defaultPartitionName = null; - } - } - - public short getMaxParts() { - return this.maxParts; - } - - public void setMaxParts(short maxParts) { - this.maxParts = maxParts; - setMaxPartsIsSet(true); - } - - public void unsetMaxParts() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXPARTS_ISSET_ID); - } - - /** Returns true if field maxParts is set (has been assigned a value) and false otherwise */ - public boolean isSetMaxParts() { - return EncodingUtils.testBit(__isset_bitfield, __MAXPARTS_ISSET_ID); - } - - public void setMaxPartsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXPARTS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTblName(); - } else { - setTblName((String)value); - } - break; - - case EXPR: - if (value == null) { - unsetExpr(); - } else { - setExpr((ByteBuffer)value); - } - break; - - case DEFAULT_PARTITION_NAME: - if (value == null) { - unsetDefaultPartitionName(); - } else { - setDefaultPartitionName((String)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMaxParts(); - } else { - setMaxParts((Short)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case TBL_NAME: - return getTblName(); - - case EXPR: - return getExpr(); - - case DEFAULT_PARTITION_NAME: - return getDefaultPartitionName(); - - case MAX_PARTS: - return getMaxParts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case TBL_NAME: - return isSetTblName(); - case EXPR: - return isSetExpr(); - case DEFAULT_PARTITION_NAME: - return isSetDefaultPartitionName(); - case MAX_PARTS: - return isSetMaxParts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PartitionsByExprRequest) - return this.equals((PartitionsByExprRequest)that); - return false; - } - - public boolean equals(PartitionsByExprRequest that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tblName = true && this.isSetTblName(); - boolean that_present_tblName = true && that.isSetTblName(); - if (this_present_tblName || that_present_tblName) { - if (!(this_present_tblName && that_present_tblName)) - return false; - if (!this.tblName.equals(that.tblName)) - return false; - } - - boolean this_present_expr = true && this.isSetExpr(); - boolean that_present_expr = true && that.isSetExpr(); - if (this_present_expr || that_present_expr) { - if (!(this_present_expr && that_present_expr)) - return false; - if (!this.expr.equals(that.expr)) - return false; - } - - boolean this_present_defaultPartitionName = true && this.isSetDefaultPartitionName(); - boolean that_present_defaultPartitionName = true && that.isSetDefaultPartitionName(); - if (this_present_defaultPartitionName || that_present_defaultPartitionName) { - if (!(this_present_defaultPartitionName && that_present_defaultPartitionName)) - return false; - if (!this.defaultPartitionName.equals(that.defaultPartitionName)) - return false; - } - - boolean this_present_maxParts = true && this.isSetMaxParts(); - boolean that_present_maxParts = true && that.isSetMaxParts(); - if (this_present_maxParts || that_present_maxParts) { - if (!(this_present_maxParts && that_present_maxParts)) - return false; - if (this.maxParts != that.maxParts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tblName = true && (isSetTblName()); - list.add(present_tblName); - if (present_tblName) - list.add(tblName); - - boolean present_expr = true && (isSetExpr()); - list.add(present_expr); - if (present_expr) - list.add(expr); - - boolean present_defaultPartitionName = true && (isSetDefaultPartitionName()); - list.add(present_defaultPartitionName); - if (present_defaultPartitionName) - list.add(defaultPartitionName); - - boolean present_maxParts = true && (isSetMaxParts()); - list.add(present_maxParts); - if (present_maxParts) - list.add(maxParts); - - return list.hashCode(); - } - - @Override - public int compareTo(PartitionsByExprRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTblName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetExpr()).compareTo(other.isSetExpr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetExpr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expr, other.expr); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDefaultPartitionName()).compareTo(other.isSetDefaultPartitionName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDefaultPartitionName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultPartitionName, other.defaultPartitionName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMaxParts()).compareTo(other.isSetMaxParts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMaxParts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxParts, other.maxParts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PartitionsByExprRequest("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tblName:"); - if (this.tblName == null) { - sb.append("null"); - } else { - sb.append(this.tblName); - } - first = false; - if (!first) sb.append(", "); - sb.append("expr:"); - if (this.expr == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.expr, sb); - } - first = false; - if (isSetDefaultPartitionName()) { - if (!first) sb.append(", "); - sb.append("defaultPartitionName:"); - if (this.defaultPartitionName == null) { - sb.append("null"); - } else { - sb.append(this.defaultPartitionName); - } - first = false; - } - if (isSetMaxParts()) { - if (!first) sb.append(", "); - sb.append("maxParts:"); - sb.append(this.maxParts); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDbName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); - } - - if (!isSetTblName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); - } - - if (!isSetExpr()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'expr' is unset! Struct:" + toString()); - } - - // 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 { - // 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 PartitionsByExprRequestStandardSchemeFactory implements SchemeFactory { - public PartitionsByExprRequestStandardScheme getScheme() { - return new PartitionsByExprRequestStandardScheme(); - } - } - - private static class PartitionsByExprRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionsByExprRequest 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.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.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // EXPR - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.expr = iprot.readBinary(); - struct.setExprIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // DEFAULT_PARTITION_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.defaultPartitionName = iprot.readString(); - struct.setDefaultPartitionNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // MAX_PARTS - if (schemeField.type == org.apache.thrift.protocol.TType.I16) { - struct.maxParts = iprot.readI16(); - struct.setMaxPartsIsSet(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, PartitionsByExprRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - if (struct.tblName != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(struct.tblName); - oprot.writeFieldEnd(); - } - if (struct.expr != null) { - oprot.writeFieldBegin(EXPR_FIELD_DESC); - oprot.writeBinary(struct.expr); - oprot.writeFieldEnd(); - } - if (struct.defaultPartitionName != null) { - if (struct.isSetDefaultPartitionName()) { - oprot.writeFieldBegin(DEFAULT_PARTITION_NAME_FIELD_DESC); - oprot.writeString(struct.defaultPartitionName); - oprot.writeFieldEnd(); - } - } - if (struct.isSetMaxParts()) { - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(struct.maxParts); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PartitionsByExprRequestTupleSchemeFactory implements SchemeFactory { - public PartitionsByExprRequestTupleScheme getScheme() { - return new PartitionsByExprRequestTupleScheme(); - } - } - - private static class PartitionsByExprRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PartitionsByExprRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dbName); - oprot.writeString(struct.tblName); - oprot.writeBinary(struct.expr); - BitSet optionals = new BitSet(); - if (struct.isSetDefaultPartitionName()) { - optionals.set(0); - } - if (struct.isSetMaxParts()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetDefaultPartitionName()) { - oprot.writeString(struct.defaultPartitionName); - } - if (struct.isSetMaxParts()) { - oprot.writeI16(struct.maxParts); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsByExprRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - struct.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - struct.expr = iprot.readBinary(); - struct.setExprIsSet(true); - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.defaultPartitionName = iprot.readString(); - struct.setDefaultPartitionNameIsSet(true); - } - if (incoming.get(1)) { - struct.maxParts = iprot.readI16(); - struct.setMaxPartsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java deleted file mode 100644 index 7df156f..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java +++ /dev/null @@ -1,542 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PartitionsByExprResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionsByExprResult"); - - private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField HAS_UNKNOWN_PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasUnknownPartitions", org.apache.thrift.protocol.TType.BOOL, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PartitionsByExprResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PartitionsByExprResultTupleSchemeFactory()); - } - - private List partitions; // required - private boolean hasUnknownPartitions; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PARTITIONS((short)1, "partitions"), - HAS_UNKNOWN_PARTITIONS((short)2, "hasUnknownPartitions"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PARTITIONS - return PARTITIONS; - case 2: // HAS_UNKNOWN_PARTITIONS - return HAS_UNKNOWN_PARTITIONS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __HASUNKNOWNPARTITIONS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.HAS_UNKNOWN_PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("hasUnknownPartitions", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionsByExprResult.class, metaDataMap); - } - - public PartitionsByExprResult() { - } - - public PartitionsByExprResult( - List partitions, - boolean hasUnknownPartitions) - { - this(); - this.partitions = partitions; - this.hasUnknownPartitions = hasUnknownPartitions; - setHasUnknownPartitionsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public PartitionsByExprResult(PartitionsByExprResult other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPartitions()) { - List __this__partitions = new ArrayList(other.partitions.size()); - for (Partition other_element : other.partitions) { - __this__partitions.add(new Partition(other_element)); - } - this.partitions = __this__partitions; - } - this.hasUnknownPartitions = other.hasUnknownPartitions; - } - - public PartitionsByExprResult deepCopy() { - return new PartitionsByExprResult(this); - } - - @Override - public void clear() { - this.partitions = null; - setHasUnknownPartitionsIsSet(false); - this.hasUnknownPartitions = false; - } - - public int getPartitionsSize() { - return (this.partitions == null) ? 0 : this.partitions.size(); - } - - public java.util.Iterator getPartitionsIterator() { - return (this.partitions == null) ? null : this.partitions.iterator(); - } - - public void addToPartitions(Partition elem) { - if (this.partitions == null) { - this.partitions = new ArrayList(); - } - this.partitions.add(elem); - } - - public List getPartitions() { - return this.partitions; - } - - public void setPartitions(List partitions) { - this.partitions = partitions; - } - - public void unsetPartitions() { - this.partitions = null; - } - - /** Returns true if field partitions is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitions() { - return this.partitions != null; - } - - public void setPartitionsIsSet(boolean value) { - if (!value) { - this.partitions = null; - } - } - - public boolean isHasUnknownPartitions() { - return this.hasUnknownPartitions; - } - - public void setHasUnknownPartitions(boolean hasUnknownPartitions) { - this.hasUnknownPartitions = hasUnknownPartitions; - setHasUnknownPartitionsIsSet(true); - } - - public void unsetHasUnknownPartitions() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASUNKNOWNPARTITIONS_ISSET_ID); - } - - /** Returns true if field hasUnknownPartitions is set (has been assigned a value) and false otherwise */ - public boolean isSetHasUnknownPartitions() { - return EncodingUtils.testBit(__isset_bitfield, __HASUNKNOWNPARTITIONS_ISSET_ID); - } - - public void setHasUnknownPartitionsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASUNKNOWNPARTITIONS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PARTITIONS: - if (value == null) { - unsetPartitions(); - } else { - setPartitions((List)value); - } - break; - - case HAS_UNKNOWN_PARTITIONS: - if (value == null) { - unsetHasUnknownPartitions(); - } else { - setHasUnknownPartitions((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PARTITIONS: - return getPartitions(); - - case HAS_UNKNOWN_PARTITIONS: - return isHasUnknownPartitions(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PARTITIONS: - return isSetPartitions(); - case HAS_UNKNOWN_PARTITIONS: - return isSetHasUnknownPartitions(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PartitionsByExprResult) - return this.equals((PartitionsByExprResult)that); - return false; - } - - public boolean equals(PartitionsByExprResult that) { - if (that == null) - return false; - - boolean this_present_partitions = true && this.isSetPartitions(); - boolean that_present_partitions = true && that.isSetPartitions(); - if (this_present_partitions || that_present_partitions) { - if (!(this_present_partitions && that_present_partitions)) - return false; - if (!this.partitions.equals(that.partitions)) - return false; - } - - boolean this_present_hasUnknownPartitions = true; - boolean that_present_hasUnknownPartitions = true; - if (this_present_hasUnknownPartitions || that_present_hasUnknownPartitions) { - if (!(this_present_hasUnknownPartitions && that_present_hasUnknownPartitions)) - return false; - if (this.hasUnknownPartitions != that.hasUnknownPartitions) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_partitions = true && (isSetPartitions()); - list.add(present_partitions); - if (present_partitions) - list.add(partitions); - - boolean present_hasUnknownPartitions = true; - list.add(present_hasUnknownPartitions); - if (present_hasUnknownPartitions) - list.add(hasUnknownPartitions); - - return list.hashCode(); - } - - @Override - public int compareTo(PartitionsByExprResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPartitions()).compareTo(other.isSetPartitions()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitions()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHasUnknownPartitions()).compareTo(other.isSetHasUnknownPartitions()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHasUnknownPartitions()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasUnknownPartitions, other.hasUnknownPartitions); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PartitionsByExprResult("); - boolean first = true; - - sb.append("partitions:"); - if (this.partitions == null) { - sb.append("null"); - } else { - sb.append(this.partitions); - } - first = false; - if (!first) sb.append(", "); - sb.append("hasUnknownPartitions:"); - sb.append(this.hasUnknownPartitions); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetPartitions()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'partitions' is unset! Struct:" + toString()); - } - - if (!isSetHasUnknownPartitions()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'hasUnknownPartitions' is unset! Struct:" + toString()); - } - - // 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 { - // 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 PartitionsByExprResultStandardSchemeFactory implements SchemeFactory { - public PartitionsByExprResultStandardScheme getScheme() { - return new PartitionsByExprResultStandardScheme(); - } - } - - private static class PartitionsByExprResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionsByExprResult 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: // PARTITIONS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list386 = iprot.readListBegin(); - struct.partitions = new ArrayList(_list386.size); - Partition _elem387; - for (int _i388 = 0; _i388 < _list386.size; ++_i388) - { - _elem387 = new Partition(); - _elem387.read(iprot); - struct.partitions.add(_elem387); - } - iprot.readListEnd(); - } - struct.setPartitionsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // HAS_UNKNOWN_PARTITIONS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.hasUnknownPartitions = iprot.readBool(); - struct.setHasUnknownPartitionsIsSet(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, PartitionsByExprResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.partitions != null) { - oprot.writeFieldBegin(PARTITIONS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size())); - for (Partition _iter389 : struct.partitions) - { - _iter389.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(HAS_UNKNOWN_PARTITIONS_FIELD_DESC); - oprot.writeBool(struct.hasUnknownPartitions); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PartitionsByExprResultTupleSchemeFactory implements SchemeFactory { - public PartitionsByExprResultTupleScheme getScheme() { - return new PartitionsByExprResultTupleScheme(); - } - } - - private static class PartitionsByExprResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PartitionsByExprResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.partitions.size()); - for (Partition _iter390 : struct.partitions) - { - _iter390.write(oprot); - } - } - oprot.writeBool(struct.hasUnknownPartitions); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsByExprResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list391 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.partitions = new ArrayList(_list391.size); - Partition _elem392; - for (int _i393 = 0; _i393 < _list391.size; ++_i393) - { - _elem392 = new Partition(); - _elem392.read(iprot); - struct.partitions.add(_elem392); - } - } - struct.setPartitionsIsSet(true); - struct.hasUnknownPartitions = iprot.readBool(); - struct.setHasUnknownPartitionsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java deleted file mode 100644 index b43f6c0..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java +++ /dev/null @@ -1,790 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PartitionsStatsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionsStatsRequest"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField COL_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("colNames", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField PART_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partNames", org.apache.thrift.protocol.TType.LIST, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PartitionsStatsRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PartitionsStatsRequestTupleSchemeFactory()); - } - - private String dbName; // required - private String tblName; // required - private List colNames; // required - private List partNames; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "dbName"), - TBL_NAME((short)2, "tblName"), - COL_NAMES((short)3, "colNames"), - PART_NAMES((short)4, "partNames"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // COL_NAMES - return COL_NAMES; - case 4: // PART_NAMES - return PART_NAMES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("colNames", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.PART_NAMES, new org.apache.thrift.meta_data.FieldMetaData("partNames", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionsStatsRequest.class, metaDataMap); - } - - public PartitionsStatsRequest() { - } - - public PartitionsStatsRequest( - String dbName, - String tblName, - List colNames, - List partNames) - { - this(); - this.dbName = dbName; - this.tblName = tblName; - this.colNames = colNames; - this.partNames = partNames; - } - - /** - * Performs a deep copy on other. - */ - public PartitionsStatsRequest(PartitionsStatsRequest other) { - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTblName()) { - this.tblName = other.tblName; - } - if (other.isSetColNames()) { - List __this__colNames = new ArrayList(other.colNames); - this.colNames = __this__colNames; - } - if (other.isSetPartNames()) { - List __this__partNames = new ArrayList(other.partNames); - this.partNames = __this__partNames; - } - } - - public PartitionsStatsRequest deepCopy() { - return new PartitionsStatsRequest(this); - } - - @Override - public void clear() { - this.dbName = null; - this.tblName = null; - this.colNames = null; - this.partNames = null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTblName() { - return this.tblName; - } - - public void setTblName(String tblName) { - this.tblName = tblName; - } - - public void unsetTblName() { - this.tblName = null; - } - - /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ - public boolean isSetTblName() { - return this.tblName != null; - } - - public void setTblNameIsSet(boolean value) { - if (!value) { - this.tblName = null; - } - } - - public int getColNamesSize() { - return (this.colNames == null) ? 0 : this.colNames.size(); - } - - public java.util.Iterator getColNamesIterator() { - return (this.colNames == null) ? null : this.colNames.iterator(); - } - - public void addToColNames(String elem) { - if (this.colNames == null) { - this.colNames = new ArrayList(); - } - this.colNames.add(elem); - } - - public List getColNames() { - return this.colNames; - } - - public void setColNames(List colNames) { - this.colNames = colNames; - } - - public void unsetColNames() { - this.colNames = null; - } - - /** Returns true if field colNames is set (has been assigned a value) and false otherwise */ - public boolean isSetColNames() { - return this.colNames != null; - } - - public void setColNamesIsSet(boolean value) { - if (!value) { - this.colNames = null; - } - } - - public int getPartNamesSize() { - return (this.partNames == null) ? 0 : this.partNames.size(); - } - - public java.util.Iterator getPartNamesIterator() { - return (this.partNames == null) ? null : this.partNames.iterator(); - } - - public void addToPartNames(String elem) { - if (this.partNames == null) { - this.partNames = new ArrayList(); - } - this.partNames.add(elem); - } - - public List getPartNames() { - return this.partNames; - } - - public void setPartNames(List partNames) { - this.partNames = partNames; - } - - public void unsetPartNames() { - this.partNames = null; - } - - /** Returns true if field partNames is set (has been assigned a value) and false otherwise */ - public boolean isSetPartNames() { - return this.partNames != null; - } - - public void setPartNamesIsSet(boolean value) { - if (!value) { - this.partNames = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTblName(); - } else { - setTblName((String)value); - } - break; - - case COL_NAMES: - if (value == null) { - unsetColNames(); - } else { - setColNames((List)value); - } - break; - - case PART_NAMES: - if (value == null) { - unsetPartNames(); - } else { - setPartNames((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case TBL_NAME: - return getTblName(); - - case COL_NAMES: - return getColNames(); - - case PART_NAMES: - return getPartNames(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case TBL_NAME: - return isSetTblName(); - case COL_NAMES: - return isSetColNames(); - case PART_NAMES: - return isSetPartNames(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PartitionsStatsRequest) - return this.equals((PartitionsStatsRequest)that); - return false; - } - - public boolean equals(PartitionsStatsRequest that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tblName = true && this.isSetTblName(); - boolean that_present_tblName = true && that.isSetTblName(); - if (this_present_tblName || that_present_tblName) { - if (!(this_present_tblName && that_present_tblName)) - return false; - if (!this.tblName.equals(that.tblName)) - return false; - } - - boolean this_present_colNames = true && this.isSetColNames(); - boolean that_present_colNames = true && that.isSetColNames(); - if (this_present_colNames || that_present_colNames) { - if (!(this_present_colNames && that_present_colNames)) - return false; - if (!this.colNames.equals(that.colNames)) - return false; - } - - boolean this_present_partNames = true && this.isSetPartNames(); - boolean that_present_partNames = true && that.isSetPartNames(); - if (this_present_partNames || that_present_partNames) { - if (!(this_present_partNames && that_present_partNames)) - return false; - if (!this.partNames.equals(that.partNames)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tblName = true && (isSetTblName()); - list.add(present_tblName); - if (present_tblName) - list.add(tblName); - - boolean present_colNames = true && (isSetColNames()); - list.add(present_colNames); - if (present_colNames) - list.add(colNames); - - boolean present_partNames = true && (isSetPartNames()); - list.add(present_partNames); - if (present_partNames) - list.add(partNames); - - return list.hashCode(); - } - - @Override - public int compareTo(PartitionsStatsRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTblName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetColNames()).compareTo(other.isSetColNames()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColNames()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colNames, other.colNames); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartNames()).compareTo(other.isSetPartNames()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartNames()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partNames, other.partNames); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PartitionsStatsRequest("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tblName:"); - if (this.tblName == null) { - sb.append("null"); - } else { - sb.append(this.tblName); - } - first = false; - if (!first) sb.append(", "); - sb.append("colNames:"); - if (this.colNames == null) { - sb.append("null"); - } else { - sb.append(this.colNames); - } - first = false; - if (!first) sb.append(", "); - sb.append("partNames:"); - if (this.partNames == null) { - sb.append("null"); - } else { - sb.append(this.partNames); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDbName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); - } - - if (!isSetTblName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); - } - - if (!isSetColNames()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'colNames' is unset! Struct:" + toString()); - } - - if (!isSetPartNames()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'partNames' is unset! Struct:" + toString()); - } - - // 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 PartitionsStatsRequestStandardSchemeFactory implements SchemeFactory { - public PartitionsStatsRequestStandardScheme getScheme() { - return new PartitionsStatsRequestStandardScheme(); - } - } - - private static class PartitionsStatsRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionsStatsRequest 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.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.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // COL_NAMES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list428 = iprot.readListBegin(); - struct.colNames = new ArrayList(_list428.size); - String _elem429; - for (int _i430 = 0; _i430 < _list428.size; ++_i430) - { - _elem429 = iprot.readString(); - struct.colNames.add(_elem429); - } - iprot.readListEnd(); - } - struct.setColNamesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // PART_NAMES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list431 = iprot.readListBegin(); - struct.partNames = new ArrayList(_list431.size); - String _elem432; - for (int _i433 = 0; _i433 < _list431.size; ++_i433) - { - _elem432 = iprot.readString(); - struct.partNames.add(_elem432); - } - iprot.readListEnd(); - } - struct.setPartNamesIsSet(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, PartitionsStatsRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - if (struct.tblName != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(struct.tblName); - oprot.writeFieldEnd(); - } - if (struct.colNames != null) { - oprot.writeFieldBegin(COL_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.colNames.size())); - for (String _iter434 : struct.colNames) - { - oprot.writeString(_iter434); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.partNames != null) { - oprot.writeFieldBegin(PART_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partNames.size())); - for (String _iter435 : struct.partNames) - { - oprot.writeString(_iter435); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PartitionsStatsRequestTupleSchemeFactory implements SchemeFactory { - public PartitionsStatsRequestTupleScheme getScheme() { - return new PartitionsStatsRequestTupleScheme(); - } - } - - private static class PartitionsStatsRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dbName); - oprot.writeString(struct.tblName); - { - oprot.writeI32(struct.colNames.size()); - for (String _iter436 : struct.colNames) - { - oprot.writeString(_iter436); - } - } - { - oprot.writeI32(struct.partNames.size()); - for (String _iter437 : struct.partNames) - { - oprot.writeString(_iter437); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - struct.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - { - org.apache.thrift.protocol.TList _list438 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.colNames = new ArrayList(_list438.size); - String _elem439; - for (int _i440 = 0; _i440 < _list438.size; ++_i440) - { - _elem439 = iprot.readString(); - struct.colNames.add(_elem439); - } - } - struct.setColNamesIsSet(true); - { - org.apache.thrift.protocol.TList _list441 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.partNames = new ArrayList(_list441.size); - String _elem442; - for (int _i443 = 0; _i443 < _list441.size; ++_i443) - { - _elem442 = iprot.readString(); - struct.partNames.add(_elem442); - } - } - struct.setPartNamesIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java deleted file mode 100644 index 63ed662..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java +++ /dev/null @@ -1,490 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PartitionsStatsResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionsStatsResult"); - - private static final org.apache.thrift.protocol.TField PART_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("partStats", org.apache.thrift.protocol.TType.MAP, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PartitionsStatsResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PartitionsStatsResultTupleSchemeFactory()); - } - - private Map> partStats; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PART_STATS((short)1, "partStats"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PART_STATS - return PART_STATS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PART_STATS, new org.apache.thrift.meta_data.FieldMetaData("partStats", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsObj.class))))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionsStatsResult.class, metaDataMap); - } - - public PartitionsStatsResult() { - } - - public PartitionsStatsResult( - Map> partStats) - { - this(); - this.partStats = partStats; - } - - /** - * Performs a deep copy on other. - */ - public PartitionsStatsResult(PartitionsStatsResult other) { - if (other.isSetPartStats()) { - Map> __this__partStats = new HashMap>(other.partStats.size()); - for (Map.Entry> other_element : other.partStats.entrySet()) { - - String other_element_key = other_element.getKey(); - List other_element_value = other_element.getValue(); - - String __this__partStats_copy_key = other_element_key; - - List __this__partStats_copy_value = new ArrayList(other_element_value.size()); - for (ColumnStatisticsObj other_element_value_element : other_element_value) { - __this__partStats_copy_value.add(new ColumnStatisticsObj(other_element_value_element)); - } - - __this__partStats.put(__this__partStats_copy_key, __this__partStats_copy_value); - } - this.partStats = __this__partStats; - } - } - - public PartitionsStatsResult deepCopy() { - return new PartitionsStatsResult(this); - } - - @Override - public void clear() { - this.partStats = null; - } - - public int getPartStatsSize() { - return (this.partStats == null) ? 0 : this.partStats.size(); - } - - public void putToPartStats(String key, List val) { - if (this.partStats == null) { - this.partStats = new HashMap>(); - } - this.partStats.put(key, val); - } - - public Map> getPartStats() { - return this.partStats; - } - - public void setPartStats(Map> partStats) { - this.partStats = partStats; - } - - public void unsetPartStats() { - this.partStats = null; - } - - /** Returns true if field partStats is set (has been assigned a value) and false otherwise */ - public boolean isSetPartStats() { - return this.partStats != null; - } - - public void setPartStatsIsSet(boolean value) { - if (!value) { - this.partStats = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PART_STATS: - if (value == null) { - unsetPartStats(); - } else { - setPartStats((Map>)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PART_STATS: - return getPartStats(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PART_STATS: - return isSetPartStats(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PartitionsStatsResult) - return this.equals((PartitionsStatsResult)that); - return false; - } - - public boolean equals(PartitionsStatsResult that) { - if (that == null) - return false; - - boolean this_present_partStats = true && this.isSetPartStats(); - boolean that_present_partStats = true && that.isSetPartStats(); - if (this_present_partStats || that_present_partStats) { - if (!(this_present_partStats && that_present_partStats)) - return false; - if (!this.partStats.equals(that.partStats)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_partStats = true && (isSetPartStats()); - list.add(present_partStats); - if (present_partStats) - list.add(partStats); - - return list.hashCode(); - } - - @Override - public int compareTo(PartitionsStatsResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPartStats()).compareTo(other.isSetPartStats()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartStats()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partStats, other.partStats); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PartitionsStatsResult("); - boolean first = true; - - sb.append("partStats:"); - if (this.partStats == null) { - sb.append("null"); - } else { - sb.append(this.partStats); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetPartStats()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'partStats' is unset! Struct:" + toString()); - } - - // 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 PartitionsStatsResultStandardSchemeFactory implements SchemeFactory { - public PartitionsStatsResultStandardScheme getScheme() { - return new PartitionsStatsResultStandardScheme(); - } - } - - private static class PartitionsStatsResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionsStatsResult 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_STATS - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map402 = iprot.readMapBegin(); - struct.partStats = new HashMap>(2*_map402.size); - String _key403; - List _val404; - for (int _i405 = 0; _i405 < _map402.size; ++_i405) - { - _key403 = iprot.readString(); - { - org.apache.thrift.protocol.TList _list406 = iprot.readListBegin(); - _val404 = new ArrayList(_list406.size); - ColumnStatisticsObj _elem407; - for (int _i408 = 0; _i408 < _list406.size; ++_i408) - { - _elem407 = new ColumnStatisticsObj(); - _elem407.read(iprot); - _val404.add(_elem407); - } - iprot.readListEnd(); - } - struct.partStats.put(_key403, _val404); - } - iprot.readMapEnd(); - } - struct.setPartStatsIsSet(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, PartitionsStatsResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.partStats != null) { - oprot.writeFieldBegin(PART_STATS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.partStats.size())); - for (Map.Entry> _iter409 : struct.partStats.entrySet()) - { - oprot.writeString(_iter409.getKey()); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter409.getValue().size())); - for (ColumnStatisticsObj _iter410 : _iter409.getValue()) - { - _iter410.write(oprot); - } - oprot.writeListEnd(); - } - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PartitionsStatsResultTupleSchemeFactory implements SchemeFactory { - public PartitionsStatsResultTupleScheme getScheme() { - return new PartitionsStatsResultTupleScheme(); - } - } - - private static class PartitionsStatsResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.partStats.size()); - for (Map.Entry> _iter411 : struct.partStats.entrySet()) - { - oprot.writeString(_iter411.getKey()); - { - oprot.writeI32(_iter411.getValue().size()); - for (ColumnStatisticsObj _iter412 : _iter411.getValue()) - { - _iter412.write(oprot); - } - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TMap _map413 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); - struct.partStats = new HashMap>(2*_map413.size); - String _key414; - List _val415; - for (int _i416 = 0; _i416 < _map413.size; ++_i416) - { - _key414 = iprot.readString(); - { - org.apache.thrift.protocol.TList _list417 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - _val415 = new ArrayList(_list417.size); - ColumnStatisticsObj _elem418; - for (int _i419 = 0; _i419 < _list417.size; ++_i419) - { - _elem418 = new ColumnStatisticsObj(); - _elem418.read(iprot); - _val415.add(_elem418); - } - } - struct.partStats.put(_key414, _val415); - } - } - struct.setPartStatsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysRequest.java deleted file mode 100644 index 8763ec8..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysRequest.java +++ /dev/null @@ -1,490 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PrimaryKeysRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrimaryKeysRequest"); - - 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 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 PrimaryKeysRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PrimaryKeysRequestTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrimaryKeysRequest.class, metaDataMap); - } - - public PrimaryKeysRequest() { - } - - public PrimaryKeysRequest( - String db_name, - String tbl_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - } - - /** - * Performs a deep copy on other. - */ - public PrimaryKeysRequest(PrimaryKeysRequest other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - } - - public PrimaryKeysRequest deepCopy() { - return new PrimaryKeysRequest(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PrimaryKeysRequest) - return this.equals((PrimaryKeysRequest)that); - return false; - } - - public boolean equals(PrimaryKeysRequest that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - return list.hashCode(); - } - - @Override - public int compareTo(PrimaryKeysRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PrimaryKeysRequest("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDb_name()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'db_name' is unset! Struct:" + toString()); - } - - if (!isSetTbl_name()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tbl_name' is unset! Struct:" + toString()); - } - - // 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 PrimaryKeysRequestStandardSchemeFactory implements SchemeFactory { - public PrimaryKeysRequestStandardScheme getScheme() { - return new PrimaryKeysRequestStandardScheme(); - } - } - - private static class PrimaryKeysRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PrimaryKeysRequest 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; - 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, PrimaryKeysRequest 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.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PrimaryKeysRequestTupleSchemeFactory implements SchemeFactory { - public PrimaryKeysRequestTupleScheme getScheme() { - return new PrimaryKeysRequestTupleScheme(); - } - } - - private static class PrimaryKeysRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PrimaryKeysRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.db_name); - oprot.writeString(struct.tbl_name); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PrimaryKeysRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.db_name = iprot.readString(); - struct.setDb_nameIsSet(true); - struct.tbl_name = iprot.readString(); - struct.setTbl_nameIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java deleted file mode 100644 index a25234b..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PrimaryKeysResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrimaryKeysResponse"); - - private static final org.apache.thrift.protocol.TField PRIMARY_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("primaryKeys", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PrimaryKeysResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PrimaryKeysResponseTupleSchemeFactory()); - } - - private List primaryKeys; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PRIMARY_KEYS((short)1, "primaryKeys"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PRIMARY_KEYS - return PRIMARY_KEYS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PRIMARY_KEYS, new org.apache.thrift.meta_data.FieldMetaData("primaryKeys", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLPrimaryKey.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrimaryKeysResponse.class, metaDataMap); - } - - public PrimaryKeysResponse() { - } - - public PrimaryKeysResponse( - List primaryKeys) - { - this(); - this.primaryKeys = primaryKeys; - } - - /** - * Performs a deep copy on other. - */ - public PrimaryKeysResponse(PrimaryKeysResponse other) { - if (other.isSetPrimaryKeys()) { - List __this__primaryKeys = new ArrayList(other.primaryKeys.size()); - for (SQLPrimaryKey other_element : other.primaryKeys) { - __this__primaryKeys.add(new SQLPrimaryKey(other_element)); - } - this.primaryKeys = __this__primaryKeys; - } - } - - public PrimaryKeysResponse deepCopy() { - return new PrimaryKeysResponse(this); - } - - @Override - public void clear() { - this.primaryKeys = null; - } - - public int getPrimaryKeysSize() { - return (this.primaryKeys == null) ? 0 : this.primaryKeys.size(); - } - - public java.util.Iterator getPrimaryKeysIterator() { - return (this.primaryKeys == null) ? null : this.primaryKeys.iterator(); - } - - public void addToPrimaryKeys(SQLPrimaryKey elem) { - if (this.primaryKeys == null) { - this.primaryKeys = new ArrayList(); - } - this.primaryKeys.add(elem); - } - - public List getPrimaryKeys() { - return this.primaryKeys; - } - - public void setPrimaryKeys(List primaryKeys) { - this.primaryKeys = primaryKeys; - } - - public void unsetPrimaryKeys() { - this.primaryKeys = null; - } - - /** Returns true if field primaryKeys is set (has been assigned a value) and false otherwise */ - public boolean isSetPrimaryKeys() { - return this.primaryKeys != null; - } - - public void setPrimaryKeysIsSet(boolean value) { - if (!value) { - this.primaryKeys = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PRIMARY_KEYS: - if (value == null) { - unsetPrimaryKeys(); - } else { - setPrimaryKeys((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PRIMARY_KEYS: - return getPrimaryKeys(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PRIMARY_KEYS: - return isSetPrimaryKeys(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PrimaryKeysResponse) - return this.equals((PrimaryKeysResponse)that); - return false; - } - - public boolean equals(PrimaryKeysResponse that) { - if (that == null) - return false; - - boolean this_present_primaryKeys = true && this.isSetPrimaryKeys(); - boolean that_present_primaryKeys = true && that.isSetPrimaryKeys(); - if (this_present_primaryKeys || that_present_primaryKeys) { - if (!(this_present_primaryKeys && that_present_primaryKeys)) - return false; - if (!this.primaryKeys.equals(that.primaryKeys)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_primaryKeys = true && (isSetPrimaryKeys()); - list.add(present_primaryKeys); - if (present_primaryKeys) - list.add(primaryKeys); - - return list.hashCode(); - } - - @Override - public int compareTo(PrimaryKeysResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPrimaryKeys()).compareTo(other.isSetPrimaryKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrimaryKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.primaryKeys, other.primaryKeys); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PrimaryKeysResponse("); - boolean first = true; - - sb.append("primaryKeys:"); - if (this.primaryKeys == null) { - sb.append("null"); - } else { - sb.append(this.primaryKeys); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetPrimaryKeys()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'primaryKeys' is unset! Struct:" + toString()); - } - - // 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 PrimaryKeysResponseStandardSchemeFactory implements SchemeFactory { - public PrimaryKeysResponseStandardScheme getScheme() { - return new PrimaryKeysResponseStandardScheme(); - } - } - - private static class PrimaryKeysResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PrimaryKeysResponse 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: // PRIMARY_KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list322 = iprot.readListBegin(); - struct.primaryKeys = new ArrayList(_list322.size); - SQLPrimaryKey _elem323; - for (int _i324 = 0; _i324 < _list322.size; ++_i324) - { - _elem323 = new SQLPrimaryKey(); - _elem323.read(iprot); - struct.primaryKeys.add(_elem323); - } - iprot.readListEnd(); - } - struct.setPrimaryKeysIsSet(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, PrimaryKeysResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.primaryKeys != null) { - oprot.writeFieldBegin(PRIMARY_KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.primaryKeys.size())); - for (SQLPrimaryKey _iter325 : struct.primaryKeys) - { - _iter325.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PrimaryKeysResponseTupleSchemeFactory implements SchemeFactory { - public PrimaryKeysResponseTupleScheme getScheme() { - return new PrimaryKeysResponseTupleScheme(); - } - } - - private static class PrimaryKeysResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PrimaryKeysResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.primaryKeys.size()); - for (SQLPrimaryKey _iter326 : struct.primaryKeys) - { - _iter326.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PrimaryKeysResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list327 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.primaryKeys = new ArrayList(_list327.size); - SQLPrimaryKey _elem328; - for (int _i329 = 0; _i329 < _list327.size; ++_i329) - { - _elem328 = new SQLPrimaryKey(); - _elem328.read(iprot); - struct.primaryKeys.add(_elem328); - } - } - struct.setPrimaryKeysIsSet(true); - } - } - -} - diff --git 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 deleted file mode 100644 index e1792bd..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java +++ /dev/null @@ -1,906 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PrincipalPrivilegeSet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrincipalPrivilegeSet"); - - private static final org.apache.thrift.protocol.TField USER_PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("userPrivileges", org.apache.thrift.protocol.TType.MAP, (short)1); - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - USER_PRIVILEGES((short)1, "userPrivileges"), - GROUP_PRIVILEGES((short)2, "groupPrivileges"), - ROLE_PRIVILEGES((short)3, "rolePrivileges"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // USER_PRIVILEGES - return USER_PRIVILEGES; - case 2: // GROUP_PRIVILEGES - return GROUP_PRIVILEGES; - case 3: // ROLE_PRIVILEGES - return ROLE_PRIVILEGES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.USER_PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("userPrivileges", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeGrantInfo.class))))); - tmpMap.put(_Fields.GROUP_PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("groupPrivileges", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeGrantInfo.class))))); - tmpMap.put(_Fields.ROLE_PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("rolePrivileges", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeGrantInfo.class))))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrincipalPrivilegeSet.class, metaDataMap); - } - - public PrincipalPrivilegeSet() { - } - - public PrincipalPrivilegeSet( - Map> userPrivileges, - Map> groupPrivileges, - Map> rolePrivileges) - { - this(); - this.userPrivileges = userPrivileges; - this.groupPrivileges = groupPrivileges; - this.rolePrivileges = rolePrivileges; - } - - /** - * Performs a deep copy on other. - */ - public PrincipalPrivilegeSet(PrincipalPrivilegeSet other) { - if (other.isSetUserPrivileges()) { - Map> __this__userPrivileges = new HashMap>(other.userPrivileges.size()); - for (Map.Entry> other_element : other.userPrivileges.entrySet()) { - - String other_element_key = other_element.getKey(); - List other_element_value = other_element.getValue(); - - String __this__userPrivileges_copy_key = other_element_key; - - List __this__userPrivileges_copy_value = new ArrayList(other_element_value.size()); - for (PrivilegeGrantInfo other_element_value_element : other_element_value) { - __this__userPrivileges_copy_value.add(new PrivilegeGrantInfo(other_element_value_element)); - } - - __this__userPrivileges.put(__this__userPrivileges_copy_key, __this__userPrivileges_copy_value); - } - this.userPrivileges = __this__userPrivileges; - } - if (other.isSetGroupPrivileges()) { - Map> __this__groupPrivileges = new HashMap>(other.groupPrivileges.size()); - for (Map.Entry> other_element : other.groupPrivileges.entrySet()) { - - String other_element_key = other_element.getKey(); - List other_element_value = other_element.getValue(); - - String __this__groupPrivileges_copy_key = other_element_key; - - List __this__groupPrivileges_copy_value = new ArrayList(other_element_value.size()); - for (PrivilegeGrantInfo other_element_value_element : other_element_value) { - __this__groupPrivileges_copy_value.add(new PrivilegeGrantInfo(other_element_value_element)); - } - - __this__groupPrivileges.put(__this__groupPrivileges_copy_key, __this__groupPrivileges_copy_value); - } - this.groupPrivileges = __this__groupPrivileges; - } - if (other.isSetRolePrivileges()) { - Map> __this__rolePrivileges = new HashMap>(other.rolePrivileges.size()); - for (Map.Entry> other_element : other.rolePrivileges.entrySet()) { - - String other_element_key = other_element.getKey(); - List other_element_value = other_element.getValue(); - - String __this__rolePrivileges_copy_key = other_element_key; - - List __this__rolePrivileges_copy_value = new ArrayList(other_element_value.size()); - for (PrivilegeGrantInfo other_element_value_element : other_element_value) { - __this__rolePrivileges_copy_value.add(new PrivilegeGrantInfo(other_element_value_element)); - } - - __this__rolePrivileges.put(__this__rolePrivileges_copy_key, __this__rolePrivileges_copy_value); - } - this.rolePrivileges = __this__rolePrivileges; - } - } - - public PrincipalPrivilegeSet deepCopy() { - return new PrincipalPrivilegeSet(this); - } - - @Override - public void clear() { - this.userPrivileges = null; - this.groupPrivileges = null; - this.rolePrivileges = null; - } - - public int getUserPrivilegesSize() { - return (this.userPrivileges == null) ? 0 : this.userPrivileges.size(); - } - - public void putToUserPrivileges(String key, List val) { - if (this.userPrivileges == null) { - this.userPrivileges = new HashMap>(); - } - this.userPrivileges.put(key, val); - } - - public Map> getUserPrivileges() { - return this.userPrivileges; - } - - public void setUserPrivileges(Map> userPrivileges) { - this.userPrivileges = userPrivileges; - } - - public void unsetUserPrivileges() { - this.userPrivileges = null; - } - - /** Returns true if field userPrivileges is set (has been assigned a value) and false otherwise */ - public boolean isSetUserPrivileges() { - return this.userPrivileges != null; - } - - public void setUserPrivilegesIsSet(boolean value) { - if (!value) { - this.userPrivileges = null; - } - } - - public int getGroupPrivilegesSize() { - return (this.groupPrivileges == null) ? 0 : this.groupPrivileges.size(); - } - - public void putToGroupPrivileges(String key, List val) { - if (this.groupPrivileges == null) { - this.groupPrivileges = new HashMap>(); - } - this.groupPrivileges.put(key, val); - } - - public Map> getGroupPrivileges() { - return this.groupPrivileges; - } - - public void setGroupPrivileges(Map> groupPrivileges) { - this.groupPrivileges = groupPrivileges; - } - - public void unsetGroupPrivileges() { - this.groupPrivileges = null; - } - - /** Returns true if field groupPrivileges is set (has been assigned a value) and false otherwise */ - public boolean isSetGroupPrivileges() { - return this.groupPrivileges != null; - } - - public void setGroupPrivilegesIsSet(boolean value) { - if (!value) { - this.groupPrivileges = null; - } - } - - public int getRolePrivilegesSize() { - return (this.rolePrivileges == null) ? 0 : this.rolePrivileges.size(); - } - - public void putToRolePrivileges(String key, List val) { - if (this.rolePrivileges == null) { - this.rolePrivileges = new HashMap>(); - } - this.rolePrivileges.put(key, val); - } - - public Map> getRolePrivileges() { - return this.rolePrivileges; - } - - public void setRolePrivileges(Map> rolePrivileges) { - this.rolePrivileges = rolePrivileges; - } - - public void unsetRolePrivileges() { - this.rolePrivileges = null; - } - - /** Returns true if field rolePrivileges is set (has been assigned a value) and false otherwise */ - public boolean isSetRolePrivileges() { - return this.rolePrivileges != null; - } - - public void setRolePrivilegesIsSet(boolean value) { - if (!value) { - this.rolePrivileges = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case USER_PRIVILEGES: - if (value == null) { - unsetUserPrivileges(); - } else { - setUserPrivileges((Map>)value); - } - break; - - case GROUP_PRIVILEGES: - if (value == null) { - unsetGroupPrivileges(); - } else { - setGroupPrivileges((Map>)value); - } - break; - - case ROLE_PRIVILEGES: - if (value == null) { - unsetRolePrivileges(); - } else { - setRolePrivileges((Map>)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case USER_PRIVILEGES: - return getUserPrivileges(); - - case GROUP_PRIVILEGES: - return getGroupPrivileges(); - - case ROLE_PRIVILEGES: - return getRolePrivileges(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case USER_PRIVILEGES: - return isSetUserPrivileges(); - case GROUP_PRIVILEGES: - return isSetGroupPrivileges(); - case ROLE_PRIVILEGES: - return isSetRolePrivileges(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PrincipalPrivilegeSet) - return this.equals((PrincipalPrivilegeSet)that); - return false; - } - - public boolean equals(PrincipalPrivilegeSet that) { - if (that == null) - return false; - - boolean this_present_userPrivileges = true && this.isSetUserPrivileges(); - boolean that_present_userPrivileges = true && that.isSetUserPrivileges(); - if (this_present_userPrivileges || that_present_userPrivileges) { - if (!(this_present_userPrivileges && that_present_userPrivileges)) - return false; - if (!this.userPrivileges.equals(that.userPrivileges)) - return false; - } - - boolean this_present_groupPrivileges = true && this.isSetGroupPrivileges(); - boolean that_present_groupPrivileges = true && that.isSetGroupPrivileges(); - if (this_present_groupPrivileges || that_present_groupPrivileges) { - if (!(this_present_groupPrivileges && that_present_groupPrivileges)) - return false; - if (!this.groupPrivileges.equals(that.groupPrivileges)) - return false; - } - - boolean this_present_rolePrivileges = true && this.isSetRolePrivileges(); - boolean that_present_rolePrivileges = true && that.isSetRolePrivileges(); - if (this_present_rolePrivileges || that_present_rolePrivileges) { - if (!(this_present_rolePrivileges && that_present_rolePrivileges)) - return false; - if (!this.rolePrivileges.equals(that.rolePrivileges)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_userPrivileges = true && (isSetUserPrivileges()); - list.add(present_userPrivileges); - if (present_userPrivileges) - list.add(userPrivileges); - - boolean present_groupPrivileges = true && (isSetGroupPrivileges()); - list.add(present_groupPrivileges); - if (present_groupPrivileges) - list.add(groupPrivileges); - - boolean present_rolePrivileges = true && (isSetRolePrivileges()); - list.add(present_rolePrivileges); - if (present_rolePrivileges) - list.add(rolePrivileges); - - return list.hashCode(); - } - - @Override - public int compareTo(PrincipalPrivilegeSet other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetUserPrivileges()).compareTo(other.isSetUserPrivileges()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUserPrivileges()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userPrivileges, other.userPrivileges); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGroupPrivileges()).compareTo(other.isSetGroupPrivileges()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGroupPrivileges()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupPrivileges, other.groupPrivileges); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRolePrivileges()).compareTo(other.isSetRolePrivileges()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRolePrivileges()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rolePrivileges, other.rolePrivileges); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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) { - { - org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin(); - struct.userPrivileges = new HashMap>(2*_map24.size); - String _key25; - List _val26; - for (int _i27 = 0; _i27 < _map24.size; ++_i27) - { - _key25 = iprot.readString(); - { - org.apache.thrift.protocol.TList _list28 = iprot.readListBegin(); - _val26 = new ArrayList(_list28.size); - PrivilegeGrantInfo _elem29; - for (int _i30 = 0; _i30 < _list28.size; ++_i30) - { - _elem29 = new PrivilegeGrantInfo(); - _elem29.read(iprot); - _val26.add(_elem29); - } - iprot.readListEnd(); - } - struct.userPrivileges.put(_key25, _val26); - } - iprot.readMapEnd(); - } - struct.setUserPrivilegesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // GROUP_PRIVILEGES - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map31 = iprot.readMapBegin(); - struct.groupPrivileges = new HashMap>(2*_map31.size); - String _key32; - List _val33; - for (int _i34 = 0; _i34 < _map31.size; ++_i34) - { - _key32 = iprot.readString(); - { - org.apache.thrift.protocol.TList _list35 = iprot.readListBegin(); - _val33 = new ArrayList(_list35.size); - PrivilegeGrantInfo _elem36; - for (int _i37 = 0; _i37 < _list35.size; ++_i37) - { - _elem36 = new PrivilegeGrantInfo(); - _elem36.read(iprot); - _val33.add(_elem36); - } - iprot.readListEnd(); - } - struct.groupPrivileges.put(_key32, _val33); - } - iprot.readMapEnd(); - } - struct.setGroupPrivilegesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ROLE_PRIVILEGES - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map38 = iprot.readMapBegin(); - struct.rolePrivileges = new HashMap>(2*_map38.size); - String _key39; - List _val40; - for (int _i41 = 0; _i41 < _map38.size; ++_i41) - { - _key39 = iprot.readString(); - { - org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(); - _val40 = new ArrayList(_list42.size); - PrivilegeGrantInfo _elem43; - for (int _i44 = 0; _i44 < _list42.size; ++_i44) - { - _elem43 = new PrivilegeGrantInfo(); - _elem43.read(iprot); - _val40.add(_elem43); - } - iprot.readListEnd(); - } - struct.rolePrivileges.put(_key39, _val40); - } - iprot.readMapEnd(); - } - struct.setRolePrivilegesIsSet(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, PrincipalPrivilegeSet struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.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, struct.userPrivileges.size())); - for (Map.Entry> _iter45 : struct.userPrivileges.entrySet()) - { - oprot.writeString(_iter45.getKey()); - { - 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.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.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, struct.groupPrivileges.size())); - for (Map.Entry> _iter47 : struct.groupPrivileges.entrySet()) - { - oprot.writeString(_iter47.getKey()); - { - 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.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.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, struct.rolePrivileges.size())); - for (Map.Entry> _iter49 : struct.rolePrivileges.entrySet()) - { - oprot.writeString(_iter49.getKey()); - { - 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.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PrincipalPrivilegeSetTupleSchemeFactory implements SchemeFactory { - public PrincipalPrivilegeSetTupleScheme getScheme() { - return new PrincipalPrivilegeSetTupleScheme(); - } - } - - private static class PrincipalPrivilegeSetTupleScheme extends TupleScheme { - - @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); - } - } - } - } - } - } - - @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); - String _key58; - List _val59; - for (int _i60 = 0; _i60 < _map57.size; ++_i60) - { - _key58 = iprot.readString(); - { - org.apache.thrift.protocol.TList _list61 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - _val59 = new ArrayList(_list61.size); - PrivilegeGrantInfo _elem62; - for (int _i63 = 0; _i63 < _list61.size; ++_i63) - { - _elem62 = new PrivilegeGrantInfo(); - _elem62.read(iprot); - _val59.add(_elem62); - } - } - struct.userPrivileges.put(_key58, _val59); - } - } - 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); - String _key65; - List _val66; - for (int _i67 = 0; _i67 < _map64.size; ++_i67) - { - _key65 = iprot.readString(); - { - org.apache.thrift.protocol.TList _list68 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - _val66 = new ArrayList(_list68.size); - PrivilegeGrantInfo _elem69; - for (int _i70 = 0; _i70 < _list68.size; ++_i70) - { - _elem69 = new PrivilegeGrantInfo(); - _elem69.read(iprot); - _val66.add(_elem69); - } - } - struct.groupPrivileges.put(_key65, _val66); - } - } - 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); - String _key72; - List _val73; - for (int _i74 = 0; _i74 < _map71.size; ++_i74) - { - _key72 = iprot.readString(); - { - org.apache.thrift.protocol.TList _list75 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - _val73 = new ArrayList(_list75.size); - PrivilegeGrantInfo _elem76; - for (int _i77 = 0; _i77 < _list75.size; ++_i77) - { - _elem76 = new PrivilegeGrantInfo(); - _elem76.read(iprot); - _val73.add(_elem76); - } - } - struct.rolePrivileges.put(_key72, _val73); - } - } - struct.setRolePrivilegesIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index 82eb8fd..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalType.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum PrincipalType implements org.apache.thrift.TEnum { - USER(1), - ROLE(2), - GROUP(3); - - private final int value; - - private PrincipalType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static PrincipalType findByValue(int value) { - switch (value) { - case 1: - return USER; - case 2: - return ROLE; - case 3: - return GROUP; - default: - return null; - } - } -} diff --git 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 deleted file mode 100644 index bba2d40..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java +++ /dev/null @@ -1,449 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PrivilegeBag implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrivilegeBag"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PRIVILEGES((short)1, "privileges"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PRIVILEGES - return PRIVILEGES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectPrivilege.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrivilegeBag.class, metaDataMap); - } - - public PrivilegeBag() { - } - - public PrivilegeBag( - List privileges) - { - this(); - this.privileges = privileges; - } - - /** - * Performs a deep copy on other. - */ - public PrivilegeBag(PrivilegeBag other) { - if (other.isSetPrivileges()) { - List __this__privileges = new ArrayList(other.privileges.size()); - for (HiveObjectPrivilege other_element : other.privileges) { - __this__privileges.add(new HiveObjectPrivilege(other_element)); - } - this.privileges = __this__privileges; - } - } - - public PrivilegeBag deepCopy() { - return new PrivilegeBag(this); - } - - @Override - public void clear() { - this.privileges = null; - } - - public int getPrivilegesSize() { - return (this.privileges == null) ? 0 : this.privileges.size(); - } - - public java.util.Iterator getPrivilegesIterator() { - return (this.privileges == null) ? null : this.privileges.iterator(); - } - - public void addToPrivileges(HiveObjectPrivilege elem) { - if (this.privileges == null) { - this.privileges = new ArrayList(); - } - this.privileges.add(elem); - } - - public List getPrivileges() { - return this.privileges; - } - - public void setPrivileges(List privileges) { - this.privileges = privileges; - } - - public void unsetPrivileges() { - this.privileges = null; - } - - /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ - public boolean isSetPrivileges() { - return this.privileges != null; - } - - public void setPrivilegesIsSet(boolean value) { - if (!value) { - this.privileges = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PRIVILEGES: - if (value == null) { - unsetPrivileges(); - } else { - setPrivileges((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PRIVILEGES: - return getPrivileges(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PRIVILEGES: - return isSetPrivileges(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PrivilegeBag) - return this.equals((PrivilegeBag)that); - return false; - } - - public boolean equals(PrivilegeBag that) { - if (that == null) - return false; - - boolean this_present_privileges = true && this.isSetPrivileges(); - boolean that_present_privileges = true && that.isSetPrivileges(); - if (this_present_privileges || that_present_privileges) { - if (!(this_present_privileges && that_present_privileges)) - return false; - if (!this.privileges.equals(that.privileges)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_privileges = true && (isSetPrivileges()); - list.add(present_privileges); - if (present_privileges) - list.add(privileges); - - return list.hashCode(); - } - - @Override - public int compareTo(PrivilegeBag other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrivileges()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PrivilegeBag("); - boolean first = true; - - sb.append("privileges:"); - if (this.privileges == null) { - sb.append("null"); - } else { - sb.append(this.privileges); - } - 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 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); - HiveObjectPrivilege _elem17; - for (int _i18 = 0; _i18 < _list16.size; ++_i18) - { - _elem17 = new HiveObjectPrivilege(); - _elem17.read(iprot); - struct.privileges.add(_elem17); - } - 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); - HiveObjectPrivilege _elem22; - for (int _i23 = 0; _i23 < _list21.size; ++_i23) - { - _elem22 = new HiveObjectPrivilege(); - _elem22.read(iprot); - struct.privileges.add(_elem22); - } - } - struct.setPrivilegesIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index ba08d3a..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java +++ /dev/null @@ -1,815 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PrivilegeGrantInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrivilegeGrantInfo"); - - private static final org.apache.thrift.protocol.TField PRIVILEGE_FIELD_DESC = new org.apache.thrift.protocol.TField("privilege", org.apache.thrift.protocol.TType.STRING, (short)1); - 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 GRANTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("grantor", org.apache.thrift.protocol.TType.STRING, (short)3); - 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 - private PrincipalType grantorType; // required - private boolean grantOption; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PRIVILEGE((short)1, "privilege"), - CREATE_TIME((short)2, "createTime"), - GRANTOR((short)3, "grantor"), - /** - * - * @see PrincipalType - */ - GRANTOR_TYPE((short)4, "grantorType"), - GRANT_OPTION((short)5, "grantOption"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PRIVILEGE - return PRIVILEGE; - case 2: // CREATE_TIME - return CREATE_TIME; - case 3: // GRANTOR - return GRANTOR; - case 4: // GRANTOR_TYPE - return GRANTOR_TYPE; - case 5: // GRANT_OPTION - return GRANT_OPTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __CREATETIME_ISSET_ID = 0; - private static final int __GRANTOPTION_ISSET_ID = 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); - tmpMap.put(_Fields.PRIVILEGE, new org.apache.thrift.meta_data.FieldMetaData("privilege", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.GRANTOR, new org.apache.thrift.meta_data.FieldMetaData("grantor", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GRANTOR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("grantorType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - tmpMap.put(_Fields.GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("grantOption", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrivilegeGrantInfo.class, metaDataMap); - } - - public PrivilegeGrantInfo() { - } - - public PrivilegeGrantInfo( - String privilege, - int createTime, - String grantor, - PrincipalType grantorType, - boolean grantOption) - { - this(); - this.privilege = privilege; - this.createTime = createTime; - setCreateTimeIsSet(true); - this.grantor = grantor; - this.grantorType = grantorType; - this.grantOption = grantOption; - setGrantOptionIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public PrivilegeGrantInfo(PrivilegeGrantInfo other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPrivilege()) { - this.privilege = other.privilege; - } - this.createTime = other.createTime; - if (other.isSetGrantor()) { - this.grantor = other.grantor; - } - if (other.isSetGrantorType()) { - this.grantorType = other.grantorType; - } - this.grantOption = other.grantOption; - } - - public PrivilegeGrantInfo deepCopy() { - return new PrivilegeGrantInfo(this); - } - - @Override - public void clear() { - this.privilege = null; - setCreateTimeIsSet(false); - this.createTime = 0; - this.grantor = null; - this.grantorType = null; - setGrantOptionIsSet(false); - this.grantOption = false; - } - - public String getPrivilege() { - return this.privilege; - } - - public void setPrivilege(String privilege) { - this.privilege = privilege; - } - - public void unsetPrivilege() { - this.privilege = null; - } - - /** Returns true if field privilege is set (has been assigned a value) and false otherwise */ - public boolean isSetPrivilege() { - return this.privilege != null; - } - - public void setPrivilegeIsSet(boolean value) { - if (!value) { - this.privilege = null; - } - } - - public int getCreateTime() { - return this.createTime; - } - - public void setCreateTime(int createTime) { - this.createTime = createTime; - setCreateTimeIsSet(true); - } - - public void unsetCreateTime() { - __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - public void setCreateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); - } - - public String getGrantor() { - return this.grantor; - } - - public void setGrantor(String grantor) { - this.grantor = grantor; - } - - public void unsetGrantor() { - this.grantor = null; - } - - /** Returns true if field grantor is set (has been assigned a value) and false otherwise */ - public boolean isSetGrantor() { - return this.grantor != null; - } - - public void setGrantorIsSet(boolean value) { - if (!value) { - this.grantor = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getGrantorType() { - return this.grantorType; - } - - /** - * - * @see PrincipalType - */ - public void setGrantorType(PrincipalType grantorType) { - this.grantorType = grantorType; - } - - public void unsetGrantorType() { - this.grantorType = null; - } - - /** Returns true if field grantorType is set (has been assigned a value) and false otherwise */ - public boolean isSetGrantorType() { - return this.grantorType != null; - } - - public void setGrantorTypeIsSet(boolean value) { - if (!value) { - this.grantorType = null; - } - } - - public boolean isGrantOption() { - return this.grantOption; - } - - public void setGrantOption(boolean grantOption) { - this.grantOption = grantOption; - setGrantOptionIsSet(true); - } - - public void unsetGrantOption() { - __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 EncodingUtils.testBit(__isset_bitfield, __GRANTOPTION_ISSET_ID); - } - - public void setGrantOptionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANTOPTION_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PRIVILEGE: - if (value == null) { - unsetPrivilege(); - } else { - setPrivilege((String)value); - } - break; - - case CREATE_TIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((Integer)value); - } - break; - - case GRANTOR: - if (value == null) { - unsetGrantor(); - } else { - setGrantor((String)value); - } - break; - - case GRANTOR_TYPE: - if (value == null) { - unsetGrantorType(); - } else { - setGrantorType((PrincipalType)value); - } - break; - - case GRANT_OPTION: - if (value == null) { - unsetGrantOption(); - } else { - setGrantOption((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PRIVILEGE: - return getPrivilege(); - - case CREATE_TIME: - return getCreateTime(); - - case GRANTOR: - return getGrantor(); - - case GRANTOR_TYPE: - return getGrantorType(); - - case GRANT_OPTION: - return isGrantOption(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PRIVILEGE: - return isSetPrivilege(); - case CREATE_TIME: - return isSetCreateTime(); - case GRANTOR: - return isSetGrantor(); - case GRANTOR_TYPE: - return isSetGrantorType(); - case GRANT_OPTION: - return isSetGrantOption(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PrivilegeGrantInfo) - return this.equals((PrivilegeGrantInfo)that); - return false; - } - - public boolean equals(PrivilegeGrantInfo that) { - if (that == null) - return false; - - boolean this_present_privilege = true && this.isSetPrivilege(); - boolean that_present_privilege = true && that.isSetPrivilege(); - if (this_present_privilege || that_present_privilege) { - if (!(this_present_privilege && that_present_privilege)) - return false; - if (!this.privilege.equals(that.privilege)) - return false; - } - - boolean this_present_createTime = true; - boolean that_present_createTime = true; - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_grantor = true && this.isSetGrantor(); - boolean that_present_grantor = true && that.isSetGrantor(); - if (this_present_grantor || that_present_grantor) { - if (!(this_present_grantor && that_present_grantor)) - return false; - if (!this.grantor.equals(that.grantor)) - return false; - } - - boolean this_present_grantorType = true && this.isSetGrantorType(); - boolean that_present_grantorType = true && that.isSetGrantorType(); - if (this_present_grantorType || that_present_grantorType) { - if (!(this_present_grantorType && that_present_grantorType)) - return false; - if (!this.grantorType.equals(that.grantorType)) - return false; - } - - boolean this_present_grantOption = true; - boolean that_present_grantOption = true; - if (this_present_grantOption || that_present_grantOption) { - if (!(this_present_grantOption && that_present_grantOption)) - return false; - if (this.grantOption != that.grantOption) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_privilege = true && (isSetPrivilege()); - list.add(present_privilege); - if (present_privilege) - list.add(privilege); - - boolean present_createTime = true; - list.add(present_createTime); - if (present_createTime) - list.add(createTime); - - boolean present_grantor = true && (isSetGrantor()); - list.add(present_grantor); - if (present_grantor) - list.add(grantor); - - boolean present_grantorType = true && (isSetGrantorType()); - list.add(present_grantorType); - if (present_grantorType) - list.add(grantorType.getValue()); - - boolean present_grantOption = true; - list.add(present_grantOption); - if (present_grantOption) - list.add(grantOption); - - return list.hashCode(); - } - - @Override - public int compareTo(PrivilegeGrantInfo other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPrivilege()).compareTo(other.isSetPrivilege()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrivilege()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privilege, other.privilege); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCreateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(other.isSetGrantor()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantor()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantor, other.grantor); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantorType()).compareTo(other.isSetGrantorType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantorType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorType, other.grantorType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantOption()).compareTo(other.isSetGrantOption()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantOption()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantOption, other.grantOption); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PrivilegeGrantInfo("); - boolean first = true; - - sb.append("privilege:"); - if (this.privilege == null) { - sb.append("null"); - } else { - sb.append(this.privilege); - } - first = false; - if (!first) sb.append(", "); - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - if (!first) sb.append(", "); - sb.append("grantor:"); - if (this.grantor == null) { - sb.append("null"); - } else { - sb.append(this.grantor); - } - first = false; - if (!first) sb.append(", "); - sb.append("grantorType:"); - if (this.grantorType == null) { - sb.append("null"); - } else { - sb.append(this.grantorType); - } - first = false; - if (!first) sb.append(", "); - sb.append("grantOption:"); - sb.append(this.grantOption); - 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 { - // 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 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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setGrantorTypeIsSet(true); - } - if (incoming.get(4)) { - struct.grantOption = iprot.readBool(); - struct.setGrantOptionIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java deleted file mode 100644 index 0c06ff3..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java +++ /dev/null @@ -1,710 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PutFileMetadataRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PutFileMetadataRequest"); - - private static final org.apache.thrift.protocol.TField FILE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fileIds", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PutFileMetadataRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PutFileMetadataRequestTupleSchemeFactory()); - } - - private List fileIds; // required - private List metadata; // required - private FileMetadataExprType type; // 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 { - FILE_IDS((short)1, "fileIds"), - METADATA((short)2, "metadata"), - /** - * - * @see FileMetadataExprType - */ - TYPE((short)3, "type"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FILE_IDS - return FILE_IDS; - case 2: // METADATA - return METADATA; - case 3: // TYPE - return TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.TYPE}; - 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); - tmpMap.put(_Fields.FILE_IDS, new org.apache.thrift.meta_data.FieldMetaData("fileIds", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); - tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FileMetadataExprType.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PutFileMetadataRequest.class, metaDataMap); - } - - public PutFileMetadataRequest() { - } - - public PutFileMetadataRequest( - List fileIds, - List metadata) - { - this(); - this.fileIds = fileIds; - this.metadata = metadata; - } - - /** - * Performs a deep copy on other. - */ - public PutFileMetadataRequest(PutFileMetadataRequest other) { - if (other.isSetFileIds()) { - List __this__fileIds = new ArrayList(other.fileIds); - this.fileIds = __this__fileIds; - } - if (other.isSetMetadata()) { - List __this__metadata = new ArrayList(other.metadata); - this.metadata = __this__metadata; - } - if (other.isSetType()) { - this.type = other.type; - } - } - - public PutFileMetadataRequest deepCopy() { - return new PutFileMetadataRequest(this); - } - - @Override - public void clear() { - this.fileIds = null; - this.metadata = null; - this.type = null; - } - - public int getFileIdsSize() { - return (this.fileIds == null) ? 0 : this.fileIds.size(); - } - - public java.util.Iterator getFileIdsIterator() { - return (this.fileIds == null) ? null : this.fileIds.iterator(); - } - - public void addToFileIds(long elem) { - if (this.fileIds == null) { - this.fileIds = new ArrayList(); - } - this.fileIds.add(elem); - } - - public List getFileIds() { - return this.fileIds; - } - - public void setFileIds(List fileIds) { - this.fileIds = fileIds; - } - - public void unsetFileIds() { - this.fileIds = null; - } - - /** Returns true if field fileIds is set (has been assigned a value) and false otherwise */ - public boolean isSetFileIds() { - return this.fileIds != null; - } - - public void setFileIdsIsSet(boolean value) { - if (!value) { - this.fileIds = null; - } - } - - public int getMetadataSize() { - return (this.metadata == null) ? 0 : this.metadata.size(); - } - - public java.util.Iterator getMetadataIterator() { - return (this.metadata == null) ? null : this.metadata.iterator(); - } - - public void addToMetadata(ByteBuffer elem) { - if (this.metadata == null) { - this.metadata = new ArrayList(); - } - this.metadata.add(elem); - } - - public List getMetadata() { - return this.metadata; - } - - public void setMetadata(List metadata) { - this.metadata = metadata; - } - - public void unsetMetadata() { - this.metadata = null; - } - - /** Returns true if field metadata is set (has been assigned a value) and false otherwise */ - public boolean isSetMetadata() { - return this.metadata != null; - } - - public void setMetadataIsSet(boolean value) { - if (!value) { - this.metadata = null; - } - } - - /** - * - * @see FileMetadataExprType - */ - public FileMetadataExprType getType() { - return this.type; - } - - /** - * - * @see FileMetadataExprType - */ - public void setType(FileMetadataExprType type) { - this.type = type; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case FILE_IDS: - if (value == null) { - unsetFileIds(); - } else { - setFileIds((List)value); - } - break; - - case METADATA: - if (value == null) { - unsetMetadata(); - } else { - setMetadata((List)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((FileMetadataExprType)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case FILE_IDS: - return getFileIds(); - - case METADATA: - return getMetadata(); - - case TYPE: - return getType(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case FILE_IDS: - return isSetFileIds(); - case METADATA: - return isSetMetadata(); - case TYPE: - return isSetType(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PutFileMetadataRequest) - return this.equals((PutFileMetadataRequest)that); - return false; - } - - public boolean equals(PutFileMetadataRequest that) { - if (that == null) - return false; - - boolean this_present_fileIds = true && this.isSetFileIds(); - boolean that_present_fileIds = true && that.isSetFileIds(); - if (this_present_fileIds || that_present_fileIds) { - if (!(this_present_fileIds && that_present_fileIds)) - return false; - if (!this.fileIds.equals(that.fileIds)) - return false; - } - - boolean this_present_metadata = true && this.isSetMetadata(); - boolean that_present_metadata = true && that.isSetMetadata(); - if (this_present_metadata || that_present_metadata) { - if (!(this_present_metadata && that_present_metadata)) - return false; - if (!this.metadata.equals(that.metadata)) - return false; - } - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_fileIds = true && (isSetFileIds()); - list.add(present_fileIds); - if (present_fileIds) - list.add(fileIds); - - boolean present_metadata = true && (isSetMetadata()); - list.add(present_metadata); - if (present_metadata) - list.add(metadata); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type.getValue()); - - return list.hashCode(); - } - - @Override - public int compareTo(PutFileMetadataRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetFileIds()).compareTo(other.isSetFileIds()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFileIds()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileIds, other.fileIds); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMetadata()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PutFileMetadataRequest("); - boolean first = true; - - sb.append("fileIds:"); - if (this.fileIds == null) { - sb.append("null"); - } else { - sb.append(this.fileIds); - } - first = false; - if (!first) sb.append(", "); - sb.append("metadata:"); - if (this.metadata == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.metadata, sb); - } - first = false; - if (isSetType()) { - if (!first) sb.append(", "); - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetFileIds()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'fileIds' is unset! Struct:" + toString()); - } - - if (!isSetMetadata()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'metadata' is unset! Struct:" + toString()); - } - - // 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 PutFileMetadataRequestStandardSchemeFactory implements SchemeFactory { - public PutFileMetadataRequestStandardScheme getScheme() { - return new PutFileMetadataRequestStandardScheme(); - } - } - - private static class PutFileMetadataRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PutFileMetadataRequest 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: // FILE_IDS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list650 = iprot.readListBegin(); - struct.fileIds = new ArrayList(_list650.size); - long _elem651; - for (int _i652 = 0; _i652 < _list650.size; ++_i652) - { - _elem651 = iprot.readI64(); - struct.fileIds.add(_elem651); - } - iprot.readListEnd(); - } - struct.setFileIdsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // METADATA - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list653 = iprot.readListBegin(); - struct.metadata = new ArrayList(_list653.size); - ByteBuffer _elem654; - for (int _i655 = 0; _i655 < _list653.size; ++_i655) - { - _elem654 = iprot.readBinary(); - struct.metadata.add(_elem654); - } - iprot.readListEnd(); - } - struct.setMetadataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.type = org.apache.hadoop.hive.metastore.api.FileMetadataExprType.findByValue(iprot.readI32()); - 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, PutFileMetadataRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.fileIds != null) { - oprot.writeFieldBegin(FILE_IDS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size())); - for (long _iter656 : struct.fileIds) - { - oprot.writeI64(_iter656); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.metadata != null) { - oprot.writeFieldBegin(METADATA_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.metadata.size())); - for (ByteBuffer _iter657 : struct.metadata) - { - oprot.writeBinary(_iter657); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.type != null) { - if (struct.isSetType()) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI32(struct.type.getValue()); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PutFileMetadataRequestTupleSchemeFactory implements SchemeFactory { - public PutFileMetadataRequestTupleScheme getScheme() { - return new PutFileMetadataRequestTupleScheme(); - } - } - - private static class PutFileMetadataRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PutFileMetadataRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.fileIds.size()); - for (long _iter658 : struct.fileIds) - { - oprot.writeI64(_iter658); - } - } - { - oprot.writeI32(struct.metadata.size()); - for (ByteBuffer _iter659 : struct.metadata) - { - oprot.writeBinary(_iter659); - } - } - BitSet optionals = new BitSet(); - if (struct.isSetType()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetType()) { - oprot.writeI32(struct.type.getValue()); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PutFileMetadataRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list660 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.fileIds = new ArrayList(_list660.size); - long _elem661; - for (int _i662 = 0; _i662 < _list660.size; ++_i662) - { - _elem661 = iprot.readI64(); - struct.fileIds.add(_elem661); - } - } - struct.setFileIdsIsSet(true); - { - org.apache.thrift.protocol.TList _list663 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.metadata = new ArrayList(_list663.size); - ByteBuffer _elem664; - for (int _i665 = 0; _i665 < _list663.size; ++_i665) - { - _elem664 = iprot.readBinary(); - struct.metadata.add(_elem664); - } - } - struct.setMetadataIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.type = org.apache.hadoop.hive.metastore.api.FileMetadataExprType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataResult.java deleted file mode 100644 index d807671..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataResult.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class PutFileMetadataResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PutFileMetadataResult"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PutFileMetadataResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PutFileMetadataResultTupleSchemeFactory()); - } - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PutFileMetadataResult.class, metaDataMap); - } - - public PutFileMetadataResult() { - } - - /** - * Performs a deep copy on other. - */ - public PutFileMetadataResult(PutFileMetadataResult other) { - } - - public PutFileMetadataResult deepCopy() { - return new PutFileMetadataResult(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PutFileMetadataResult) - return this.equals((PutFileMetadataResult)that); - return false; - } - - public boolean equals(PutFileMetadataResult that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(PutFileMetadataResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("PutFileMetadataResult("); - boolean first = true; - - 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 PutFileMetadataResultStandardSchemeFactory implements SchemeFactory { - public PutFileMetadataResultStandardScheme getScheme() { - return new PutFileMetadataResultStandardScheme(); - } - } - - private static class PutFileMetadataResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PutFileMetadataResult 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, PutFileMetadataResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PutFileMetadataResultTupleSchemeFactory implements SchemeFactory { - public PutFileMetadataResultTupleScheme getScheme() { - return new PutFileMetadataResultTupleScheme(); - } - } - - private static class PutFileMetadataResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PutFileMetadataResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PutFileMetadataResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java deleted file mode 100644 index 77067c6..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java +++ /dev/null @@ -1,438 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -public class RequestPartsSpec extends org.apache.thrift.TUnion { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RequestPartsSpec"); - 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)1); - private static final org.apache.thrift.protocol.TField EXPRS_FIELD_DESC = new org.apache.thrift.protocol.TField("exprs", org.apache.thrift.protocol.TType.LIST, (short)2); - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NAMES((short)1, "names"), - EXPRS((short)2, "exprs"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAMES - return NAMES; - case 2: // EXPRS - return EXPRS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - 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); - tmpMap.put(_Fields.NAMES, new org.apache.thrift.meta_data.FieldMetaData("names", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.EXPRS, new org.apache.thrift.meta_data.FieldMetaData("exprs", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DropPartitionsExpr.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RequestPartsSpec.class, metaDataMap); - } - - public RequestPartsSpec() { - super(); - } - - public RequestPartsSpec(_Fields setField, Object value) { - super(setField, value); - } - - public RequestPartsSpec(RequestPartsSpec other) { - super(other); - } - public RequestPartsSpec deepCopy() { - return new RequestPartsSpec(this); - } - - public static RequestPartsSpec names(List value) { - RequestPartsSpec x = new RequestPartsSpec(); - x.setNames(value); - return x; - } - - public static RequestPartsSpec exprs(List value) { - RequestPartsSpec x = new RequestPartsSpec(); - x.setExprs(value); - return x; - } - - - @Override - protected void checkType(_Fields setField, Object value) throws ClassCastException { - switch (setField) { - case NAMES: - if (value instanceof List) { - break; - } - throw new ClassCastException("Was expecting value of type List for field 'names', but got " + value.getClass().getSimpleName()); - case EXPRS: - if (value instanceof List) { - break; - } - throw new ClassCastException("Was expecting value of type List for field 'exprs', but got " + value.getClass().getSimpleName()); - default: - throw new IllegalArgumentException("Unknown field id " + setField); - } - } - - @Override - protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { - _Fields setField = _Fields.findByThriftId(field.id); - if (setField != null) { - switch (setField) { - case NAMES: - if (field.type == NAMES_FIELD_DESC.type) { - List names; - { - org.apache.thrift.protocol.TList _list468 = iprot.readListBegin(); - names = new ArrayList(_list468.size); - String _elem469; - for (int _i470 = 0; _i470 < _list468.size; ++_i470) - { - _elem469 = iprot.readString(); - names.add(_elem469); - } - iprot.readListEnd(); - } - return names; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case EXPRS: - if (field.type == EXPRS_FIELD_DESC.type) { - List exprs; - { - org.apache.thrift.protocol.TList _list471 = iprot.readListBegin(); - exprs = new ArrayList(_list471.size); - DropPartitionsExpr _elem472; - for (int _i473 = 0; _i473 < _list471.size; ++_i473) - { - _elem472 = new DropPartitionsExpr(); - _elem472.read(iprot); - exprs.add(_elem472); - } - iprot.readListEnd(); - } - return exprs; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - default: - throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - } - - @Override - protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - switch (setField_) { - case NAMES: - List names = (List)value_; - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, names.size())); - for (String _iter474 : names) - { - oprot.writeString(_iter474); - } - oprot.writeListEnd(); - } - return; - case EXPRS: - List exprs = (List)value_; - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, exprs.size())); - for (DropPartitionsExpr _iter475 : exprs) - { - _iter475.write(oprot); - } - oprot.writeListEnd(); - } - return; - default: - throw new IllegalStateException("Cannot write union with unknown field " + setField_); - } - } - - @Override - protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { - _Fields setField = _Fields.findByThriftId(fieldID); - if (setField != null) { - switch (setField) { - case NAMES: - List names; - { - org.apache.thrift.protocol.TList _list476 = iprot.readListBegin(); - names = new ArrayList(_list476.size); - String _elem477; - for (int _i478 = 0; _i478 < _list476.size; ++_i478) - { - _elem477 = iprot.readString(); - names.add(_elem477); - } - iprot.readListEnd(); - } - return names; - case EXPRS: - List exprs; - { - org.apache.thrift.protocol.TList _list479 = iprot.readListBegin(); - exprs = new ArrayList(_list479.size); - DropPartitionsExpr _elem480; - for (int _i481 = 0; _i481 < _list479.size; ++_i481) - { - _elem480 = new DropPartitionsExpr(); - _elem480.read(iprot); - exprs.add(_elem480); - } - iprot.readListEnd(); - } - return exprs; - default: - throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); - } - } else { - throw new TProtocolException("Couldn't find a field with field id " + fieldID); - } - } - - @Override - protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - switch (setField_) { - case NAMES: - List names = (List)value_; - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, names.size())); - for (String _iter482 : names) - { - oprot.writeString(_iter482); - } - oprot.writeListEnd(); - } - return; - case EXPRS: - List exprs = (List)value_; - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, exprs.size())); - for (DropPartitionsExpr _iter483 : exprs) - { - _iter483.write(oprot); - } - oprot.writeListEnd(); - } - return; - default: - throw new IllegalStateException("Cannot write union with unknown field " + setField_); - } - } - - @Override - protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { - switch (setField) { - case NAMES: - return NAMES_FIELD_DESC; - case EXPRS: - return EXPRS_FIELD_DESC; - default: - throw new IllegalArgumentException("Unknown field id " + setField); - } - } - - @Override - protected org.apache.thrift.protocol.TStruct getStructDesc() { - return STRUCT_DESC; - } - - @Override - protected _Fields enumForId(short id) { - return _Fields.findByThriftIdOrThrow(id); - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - - public List getNames() { - if (getSetField() == _Fields.NAMES) { - return (List)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'names' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void setNames(List value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.NAMES; - value_ = value; - } - - public List getExprs() { - if (getSetField() == _Fields.EXPRS) { - return (List)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'exprs' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void setExprs(List value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.EXPRS; - value_ = value; - } - - public boolean isSetNames() { - return setField_ == _Fields.NAMES; - } - - - public boolean isSetExprs() { - return setField_ == _Fields.EXPRS; - } - - - public boolean equals(Object other) { - if (other instanceof RequestPartsSpec) { - return equals((RequestPartsSpec)other); - } else { - return false; - } - } - - public boolean equals(RequestPartsSpec other) { - return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); - } - - @Override - public int compareTo(RequestPartsSpec other) { - int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); - if (lastComparison == 0) { - return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); - } - return lastComparison; - } - - - @Override - public int hashCode() { - List list = new ArrayList(); - list.add(this.getClass().getName()); - org.apache.thrift.TFieldIdEnum setField = getSetField(); - if (setField != null) { - list.add(setField.getThriftFieldId()); - Object value = getFieldValue(); - if (value instanceof org.apache.thrift.TEnum) { - list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); - } else { - list.add(value); - } - } - return list.hashCode(); - } - 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); - } - } - - -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ResourceType.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ResourceType.java deleted file mode 100644 index a15c1ee..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ResourceType.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum ResourceType implements org.apache.thrift.TEnum { - JAR(1), - FILE(2), - ARCHIVE(3); - - private final int value; - - private ResourceType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static ResourceType findByValue(int value) { - switch (value) { - case 1: - return JAR; - case 2: - return FILE; - case 3: - return ARCHIVE; - default: - return null; - } - } -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ResourceUri.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ResourceUri.java deleted file mode 100644 index 994a498..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ResourceUri.java +++ /dev/null @@ -1,511 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ResourceUri implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ResourceUri"); - - private static final org.apache.thrift.protocol.TField RESOURCE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceType", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField URI_FIELD_DESC = new org.apache.thrift.protocol.TField("uri", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ResourceUriStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ResourceUriTupleSchemeFactory()); - } - - private ResourceType resourceType; // required - private String uri; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * - * @see ResourceType - */ - RESOURCE_TYPE((short)1, "resourceType"), - URI((short)2, "uri"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RESOURCE_TYPE - return RESOURCE_TYPE; - case 2: // URI - return URI; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RESOURCE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("resourceType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ResourceType.class))); - tmpMap.put(_Fields.URI, new org.apache.thrift.meta_data.FieldMetaData("uri", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ResourceUri.class, metaDataMap); - } - - public ResourceUri() { - } - - public ResourceUri( - ResourceType resourceType, - String uri) - { - this(); - this.resourceType = resourceType; - this.uri = uri; - } - - /** - * Performs a deep copy on other. - */ - public ResourceUri(ResourceUri other) { - if (other.isSetResourceType()) { - this.resourceType = other.resourceType; - } - if (other.isSetUri()) { - this.uri = other.uri; - } - } - - public ResourceUri deepCopy() { - return new ResourceUri(this); - } - - @Override - public void clear() { - this.resourceType = null; - this.uri = null; - } - - /** - * - * @see ResourceType - */ - public ResourceType getResourceType() { - return this.resourceType; - } - - /** - * - * @see ResourceType - */ - public void setResourceType(ResourceType resourceType) { - this.resourceType = resourceType; - } - - public void unsetResourceType() { - this.resourceType = null; - } - - /** Returns true if field resourceType is set (has been assigned a value) and false otherwise */ - public boolean isSetResourceType() { - return this.resourceType != null; - } - - public void setResourceTypeIsSet(boolean value) { - if (!value) { - this.resourceType = null; - } - } - - public String getUri() { - return this.uri; - } - - public void setUri(String uri) { - this.uri = uri; - } - - public void unsetUri() { - this.uri = null; - } - - /** Returns true if field uri is set (has been assigned a value) and false otherwise */ - public boolean isSetUri() { - return this.uri != null; - } - - public void setUriIsSet(boolean value) { - if (!value) { - this.uri = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RESOURCE_TYPE: - if (value == null) { - unsetResourceType(); - } else { - setResourceType((ResourceType)value); - } - break; - - case URI: - if (value == null) { - unsetUri(); - } else { - setUri((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RESOURCE_TYPE: - return getResourceType(); - - case URI: - return getUri(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RESOURCE_TYPE: - return isSetResourceType(); - case URI: - return isSetUri(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ResourceUri) - return this.equals((ResourceUri)that); - return false; - } - - public boolean equals(ResourceUri that) { - if (that == null) - return false; - - boolean this_present_resourceType = true && this.isSetResourceType(); - boolean that_present_resourceType = true && that.isSetResourceType(); - if (this_present_resourceType || that_present_resourceType) { - if (!(this_present_resourceType && that_present_resourceType)) - return false; - if (!this.resourceType.equals(that.resourceType)) - return false; - } - - boolean this_present_uri = true && this.isSetUri(); - boolean that_present_uri = true && that.isSetUri(); - if (this_present_uri || that_present_uri) { - if (!(this_present_uri && that_present_uri)) - return false; - if (!this.uri.equals(that.uri)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_resourceType = true && (isSetResourceType()); - list.add(present_resourceType); - if (present_resourceType) - list.add(resourceType.getValue()); - - boolean present_uri = true && (isSetUri()); - list.add(present_uri); - if (present_uri) - list.add(uri); - - return list.hashCode(); - } - - @Override - public int compareTo(ResourceUri other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetResourceType()).compareTo(other.isSetResourceType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetResourceType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceType, other.resourceType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUri()).compareTo(other.isSetUri()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUri()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uri, other.uri); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ResourceUri("); - boolean first = true; - - sb.append("resourceType:"); - if (this.resourceType == null) { - sb.append("null"); - } else { - sb.append(this.resourceType); - } - first = false; - if (!first) sb.append(", "); - sb.append("uri:"); - if (this.uri == null) { - sb.append("null"); - } else { - sb.append(this.uri); - } - 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 ResourceUriStandardSchemeFactory implements SchemeFactory { - public ResourceUriStandardScheme getScheme() { - return new ResourceUriStandardScheme(); - } - } - - private static class ResourceUriStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ResourceUri 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: // RESOURCE_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.resourceType = org.apache.hadoop.hive.metastore.api.ResourceType.findByValue(iprot.readI32()); - struct.setResourceTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // URI - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.uri = iprot.readString(); - struct.setUriIsSet(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, ResourceUri struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.resourceType != null) { - oprot.writeFieldBegin(RESOURCE_TYPE_FIELD_DESC); - oprot.writeI32(struct.resourceType.getValue()); - oprot.writeFieldEnd(); - } - if (struct.uri != null) { - oprot.writeFieldBegin(URI_FIELD_DESC); - oprot.writeString(struct.uri); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ResourceUriTupleSchemeFactory implements SchemeFactory { - public ResourceUriTupleScheme getScheme() { - return new ResourceUriTupleScheme(); - } - } - - private static class ResourceUriTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ResourceUri struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetResourceType()) { - optionals.set(0); - } - if (struct.isSetUri()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetResourceType()) { - oprot.writeI32(struct.resourceType.getValue()); - } - if (struct.isSetUri()) { - oprot.writeString(struct.uri); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ResourceUri struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.resourceType = org.apache.hadoop.hive.metastore.api.ResourceType.findByValue(iprot.readI32()); - struct.setResourceTypeIsSet(true); - } - if (incoming.get(1)) { - struct.uri = iprot.readString(); - struct.setUriIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index 612c64d..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java +++ /dev/null @@ -1,601 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class Role implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Role"); - - private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)1); - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ROLE_NAME((short)1, "roleName"), - CREATE_TIME((short)2, "createTime"), - OWNER_NAME((short)3, "ownerName"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ROLE_NAME - return ROLE_NAME; - case 2: // CREATE_TIME - return CREATE_TIME; - case 3: // OWNER_NAME - return OWNER_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __CREATETIME_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.OWNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("ownerName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Role.class, metaDataMap); - } - - public Role() { - } - - public Role( - String roleName, - int createTime, - String ownerName) - { - this(); - this.roleName = roleName; - this.createTime = createTime; - setCreateTimeIsSet(true); - this.ownerName = ownerName; - } - - /** - * Performs a deep copy on other. - */ - public Role(Role other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetRoleName()) { - this.roleName = other.roleName; - } - this.createTime = other.createTime; - if (other.isSetOwnerName()) { - this.ownerName = other.ownerName; - } - } - - public Role deepCopy() { - return new Role(this); - } - - @Override - public void clear() { - this.roleName = null; - setCreateTimeIsSet(false); - this.createTime = 0; - this.ownerName = null; - } - - public String getRoleName() { - return this.roleName; - } - - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - public void unsetRoleName() { - this.roleName = null; - } - - /** Returns true if field roleName is set (has been assigned a value) and false otherwise */ - public boolean isSetRoleName() { - return this.roleName != null; - } - - public void setRoleNameIsSet(boolean value) { - if (!value) { - this.roleName = null; - } - } - - public int getCreateTime() { - return this.createTime; - } - - public void setCreateTime(int createTime) { - this.createTime = createTime; - setCreateTimeIsSet(true); - } - - public void unsetCreateTime() { - __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - public void setCreateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); - } - - public String getOwnerName() { - return this.ownerName; - } - - public void setOwnerName(String ownerName) { - this.ownerName = ownerName; - } - - public void unsetOwnerName() { - this.ownerName = null; - } - - /** Returns true if field ownerName is set (has been assigned a value) and false otherwise */ - public boolean isSetOwnerName() { - return this.ownerName != null; - } - - public void setOwnerNameIsSet(boolean value) { - if (!value) { - this.ownerName = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ROLE_NAME: - if (value == null) { - unsetRoleName(); - } else { - setRoleName((String)value); - } - break; - - case CREATE_TIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((Integer)value); - } - break; - - case OWNER_NAME: - if (value == null) { - unsetOwnerName(); - } else { - setOwnerName((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ROLE_NAME: - return getRoleName(); - - case CREATE_TIME: - return getCreateTime(); - - case OWNER_NAME: - return getOwnerName(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ROLE_NAME: - return isSetRoleName(); - case CREATE_TIME: - return isSetCreateTime(); - case OWNER_NAME: - return isSetOwnerName(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Role) - return this.equals((Role)that); - return false; - } - - public boolean equals(Role that) { - if (that == null) - return false; - - boolean this_present_roleName = true && this.isSetRoleName(); - boolean that_present_roleName = true && that.isSetRoleName(); - if (this_present_roleName || that_present_roleName) { - if (!(this_present_roleName && that_present_roleName)) - return false; - if (!this.roleName.equals(that.roleName)) - return false; - } - - boolean this_present_createTime = true; - boolean that_present_createTime = true; - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_ownerName = true && this.isSetOwnerName(); - boolean that_present_ownerName = true && that.isSetOwnerName(); - if (this_present_ownerName || that_present_ownerName) { - if (!(this_present_ownerName && that_present_ownerName)) - return false; - if (!this.ownerName.equals(that.ownerName)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_roleName = true && (isSetRoleName()); - list.add(present_roleName); - if (present_roleName) - list.add(roleName); - - boolean present_createTime = true; - list.add(present_createTime); - if (present_createTime) - list.add(createTime); - - boolean present_ownerName = true && (isSetOwnerName()); - list.add(present_ownerName); - if (present_ownerName) - list.add(ownerName); - - return list.hashCode(); - } - - @Override - public int compareTo(Role other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRoleName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCreateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOwnerName()).compareTo(other.isSetOwnerName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOwnerName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerName, other.ownerName); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("Role("); - boolean first = true; - - sb.append("roleName:"); - if (this.roleName == null) { - sb.append("null"); - } else { - sb.append(this.roleName); - } - first = false; - if (!first) sb.append(", "); - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - if (!first) sb.append(", "); - sb.append("ownerName:"); - if (this.ownerName == null) { - sb.append("null"); - } else { - sb.append(this.ownerName); - } - 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 { - // 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 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); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RolePrincipalGrant.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RolePrincipalGrant.java deleted file mode 100644 index 81e8d16..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RolePrincipalGrant.java +++ /dev/null @@ -1,1035 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class RolePrincipalGrant implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RolePrincipalGrant"); - - private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principalName", 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("principalType", org.apache.thrift.protocol.TType.I32, (short)3); - 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)4); - private static final org.apache.thrift.protocol.TField GRANT_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("grantTime", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField GRANTOR_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("grantorName", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField GRANTOR_PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("grantorPrincipalType", org.apache.thrift.protocol.TType.I32, (short)7); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new RolePrincipalGrantStandardSchemeFactory()); - schemes.put(TupleScheme.class, new RolePrincipalGrantTupleSchemeFactory()); - } - - private String roleName; // required - private String principalName; // required - private PrincipalType principalType; // required - private boolean grantOption; // required - private int grantTime; // required - private String grantorName; // required - private PrincipalType grantorPrincipalType; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ROLE_NAME((short)1, "roleName"), - PRINCIPAL_NAME((short)2, "principalName"), - /** - * - * @see PrincipalType - */ - PRINCIPAL_TYPE((short)3, "principalType"), - GRANT_OPTION((short)4, "grantOption"), - GRANT_TIME((short)5, "grantTime"), - GRANTOR_NAME((short)6, "grantorName"), - /** - * - * @see PrincipalType - */ - GRANTOR_PRINCIPAL_TYPE((short)7, "grantorPrincipalType"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ROLE_NAME - return ROLE_NAME; - case 2: // PRINCIPAL_NAME - return PRINCIPAL_NAME; - case 3: // PRINCIPAL_TYPE - return PRINCIPAL_TYPE; - case 4: // GRANT_OPTION - return GRANT_OPTION; - case 5: // GRANT_TIME - return GRANT_TIME; - case 6: // GRANTOR_NAME - return GRANTOR_NAME; - case 7: // GRANTOR_PRINCIPAL_TYPE - return GRANTOR_PRINCIPAL_TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __GRANTOPTION_ISSET_ID = 0; - private static final int __GRANTTIME_ISSET_ID = 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); - tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principalName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principalType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - tmpMap.put(_Fields.GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("grantOption", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.GRANT_TIME, new org.apache.thrift.meta_data.FieldMetaData("grantTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.GRANTOR_NAME, new org.apache.thrift.meta_data.FieldMetaData("grantorName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GRANTOR_PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("grantorPrincipalType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RolePrincipalGrant.class, metaDataMap); - } - - public RolePrincipalGrant() { - } - - public RolePrincipalGrant( - String roleName, - String principalName, - PrincipalType principalType, - boolean grantOption, - int grantTime, - String grantorName, - PrincipalType grantorPrincipalType) - { - this(); - this.roleName = roleName; - this.principalName = principalName; - this.principalType = principalType; - this.grantOption = grantOption; - setGrantOptionIsSet(true); - this.grantTime = grantTime; - setGrantTimeIsSet(true); - this.grantorName = grantorName; - this.grantorPrincipalType = grantorPrincipalType; - } - - /** - * Performs a deep copy on other. - */ - public RolePrincipalGrant(RolePrincipalGrant other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetRoleName()) { - this.roleName = other.roleName; - } - if (other.isSetPrincipalName()) { - this.principalName = other.principalName; - } - if (other.isSetPrincipalType()) { - this.principalType = other.principalType; - } - this.grantOption = other.grantOption; - this.grantTime = other.grantTime; - if (other.isSetGrantorName()) { - this.grantorName = other.grantorName; - } - if (other.isSetGrantorPrincipalType()) { - this.grantorPrincipalType = other.grantorPrincipalType; - } - } - - public RolePrincipalGrant deepCopy() { - return new RolePrincipalGrant(this); - } - - @Override - public void clear() { - this.roleName = null; - this.principalName = null; - this.principalType = null; - setGrantOptionIsSet(false); - this.grantOption = false; - setGrantTimeIsSet(false); - this.grantTime = 0; - this.grantorName = null; - this.grantorPrincipalType = null; - } - - public String getRoleName() { - return this.roleName; - } - - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - public void unsetRoleName() { - this.roleName = null; - } - - /** Returns true if field roleName is set (has been assigned a value) and false otherwise */ - public boolean isSetRoleName() { - return this.roleName != null; - } - - public void setRoleNameIsSet(boolean value) { - if (!value) { - this.roleName = null; - } - } - - public String getPrincipalName() { - return this.principalName; - } - - public void setPrincipalName(String principalName) { - this.principalName = principalName; - } - - public void unsetPrincipalName() { - this.principalName = null; - } - - /** Returns true if field principalName is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipalName() { - return this.principalName != null; - } - - public void setPrincipalNameIsSet(boolean value) { - if (!value) { - this.principalName = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getPrincipalType() { - return this.principalType; - } - - /** - * - * @see PrincipalType - */ - public void setPrincipalType(PrincipalType principalType) { - this.principalType = principalType; - } - - public void unsetPrincipalType() { - this.principalType = null; - } - - /** Returns true if field principalType is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipalType() { - return this.principalType != null; - } - - public void setPrincipalTypeIsSet(boolean value) { - if (!value) { - this.principalType = null; - } - } - - public boolean isGrantOption() { - return this.grantOption; - } - - public void setGrantOption(boolean grantOption) { - this.grantOption = grantOption; - setGrantOptionIsSet(true); - } - - public void unsetGrantOption() { - __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 EncodingUtils.testBit(__isset_bitfield, __GRANTOPTION_ISSET_ID); - } - - public void setGrantOptionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANTOPTION_ISSET_ID, value); - } - - public int getGrantTime() { - return this.grantTime; - } - - public void setGrantTime(int grantTime) { - this.grantTime = grantTime; - setGrantTimeIsSet(true); - } - - public void unsetGrantTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GRANTTIME_ISSET_ID); - } - - /** Returns true if field grantTime is set (has been assigned a value) and false otherwise */ - public boolean isSetGrantTime() { - return EncodingUtils.testBit(__isset_bitfield, __GRANTTIME_ISSET_ID); - } - - public void setGrantTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANTTIME_ISSET_ID, value); - } - - public String getGrantorName() { - return this.grantorName; - } - - public void setGrantorName(String grantorName) { - this.grantorName = grantorName; - } - - public void unsetGrantorName() { - this.grantorName = null; - } - - /** Returns true if field grantorName is set (has been assigned a value) and false otherwise */ - public boolean isSetGrantorName() { - return this.grantorName != null; - } - - public void setGrantorNameIsSet(boolean value) { - if (!value) { - this.grantorName = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getGrantorPrincipalType() { - return this.grantorPrincipalType; - } - - /** - * - * @see PrincipalType - */ - public void setGrantorPrincipalType(PrincipalType grantorPrincipalType) { - this.grantorPrincipalType = grantorPrincipalType; - } - - public void unsetGrantorPrincipalType() { - this.grantorPrincipalType = null; - } - - /** Returns true if field grantorPrincipalType is set (has been assigned a value) and false otherwise */ - public boolean isSetGrantorPrincipalType() { - return this.grantorPrincipalType != null; - } - - public void setGrantorPrincipalTypeIsSet(boolean value) { - if (!value) { - this.grantorPrincipalType = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ROLE_NAME: - if (value == null) { - unsetRoleName(); - } else { - setRoleName((String)value); - } - break; - - case PRINCIPAL_NAME: - if (value == null) { - unsetPrincipalName(); - } else { - setPrincipalName((String)value); - } - break; - - case PRINCIPAL_TYPE: - if (value == null) { - unsetPrincipalType(); - } else { - setPrincipalType((PrincipalType)value); - } - break; - - case GRANT_OPTION: - if (value == null) { - unsetGrantOption(); - } else { - setGrantOption((Boolean)value); - } - break; - - case GRANT_TIME: - if (value == null) { - unsetGrantTime(); - } else { - setGrantTime((Integer)value); - } - break; - - case GRANTOR_NAME: - if (value == null) { - unsetGrantorName(); - } else { - setGrantorName((String)value); - } - break; - - case GRANTOR_PRINCIPAL_TYPE: - if (value == null) { - unsetGrantorPrincipalType(); - } else { - setGrantorPrincipalType((PrincipalType)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ROLE_NAME: - return getRoleName(); - - case PRINCIPAL_NAME: - return getPrincipalName(); - - case PRINCIPAL_TYPE: - return getPrincipalType(); - - case GRANT_OPTION: - return isGrantOption(); - - case GRANT_TIME: - return getGrantTime(); - - case GRANTOR_NAME: - return getGrantorName(); - - case GRANTOR_PRINCIPAL_TYPE: - return getGrantorPrincipalType(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ROLE_NAME: - return isSetRoleName(); - case PRINCIPAL_NAME: - return isSetPrincipalName(); - case PRINCIPAL_TYPE: - return isSetPrincipalType(); - case GRANT_OPTION: - return isSetGrantOption(); - case GRANT_TIME: - return isSetGrantTime(); - case GRANTOR_NAME: - return isSetGrantorName(); - case GRANTOR_PRINCIPAL_TYPE: - return isSetGrantorPrincipalType(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof RolePrincipalGrant) - return this.equals((RolePrincipalGrant)that); - return false; - } - - public boolean equals(RolePrincipalGrant that) { - if (that == null) - return false; - - boolean this_present_roleName = true && this.isSetRoleName(); - boolean that_present_roleName = true && that.isSetRoleName(); - if (this_present_roleName || that_present_roleName) { - if (!(this_present_roleName && that_present_roleName)) - return false; - if (!this.roleName.equals(that.roleName)) - return false; - } - - boolean this_present_principalName = true && this.isSetPrincipalName(); - boolean that_present_principalName = true && that.isSetPrincipalName(); - if (this_present_principalName || that_present_principalName) { - if (!(this_present_principalName && that_present_principalName)) - return false; - if (!this.principalName.equals(that.principalName)) - return false; - } - - boolean this_present_principalType = true && this.isSetPrincipalType(); - boolean that_present_principalType = true && that.isSetPrincipalType(); - if (this_present_principalType || that_present_principalType) { - if (!(this_present_principalType && that_present_principalType)) - return false; - if (!this.principalType.equals(that.principalType)) - return false; - } - - boolean this_present_grantOption = true; - boolean that_present_grantOption = true; - if (this_present_grantOption || that_present_grantOption) { - if (!(this_present_grantOption && that_present_grantOption)) - return false; - if (this.grantOption != that.grantOption) - return false; - } - - boolean this_present_grantTime = true; - boolean that_present_grantTime = true; - if (this_present_grantTime || that_present_grantTime) { - if (!(this_present_grantTime && that_present_grantTime)) - return false; - if (this.grantTime != that.grantTime) - return false; - } - - boolean this_present_grantorName = true && this.isSetGrantorName(); - boolean that_present_grantorName = true && that.isSetGrantorName(); - if (this_present_grantorName || that_present_grantorName) { - if (!(this_present_grantorName && that_present_grantorName)) - return false; - if (!this.grantorName.equals(that.grantorName)) - return false; - } - - boolean this_present_grantorPrincipalType = true && this.isSetGrantorPrincipalType(); - boolean that_present_grantorPrincipalType = true && that.isSetGrantorPrincipalType(); - if (this_present_grantorPrincipalType || that_present_grantorPrincipalType) { - if (!(this_present_grantorPrincipalType && that_present_grantorPrincipalType)) - return false; - if (!this.grantorPrincipalType.equals(that.grantorPrincipalType)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_roleName = true && (isSetRoleName()); - list.add(present_roleName); - if (present_roleName) - list.add(roleName); - - boolean present_principalName = true && (isSetPrincipalName()); - list.add(present_principalName); - if (present_principalName) - list.add(principalName); - - boolean present_principalType = true && (isSetPrincipalType()); - list.add(present_principalType); - if (present_principalType) - list.add(principalType.getValue()); - - boolean present_grantOption = true; - list.add(present_grantOption); - if (present_grantOption) - list.add(grantOption); - - boolean present_grantTime = true; - list.add(present_grantTime); - if (present_grantTime) - list.add(grantTime); - - boolean present_grantorName = true && (isSetGrantorName()); - list.add(present_grantorName); - if (present_grantorName) - list.add(grantorName); - - boolean present_grantorPrincipalType = true && (isSetGrantorPrincipalType()); - list.add(present_grantorPrincipalType); - if (present_grantorPrincipalType) - list.add(grantorPrincipalType.getValue()); - - return list.hashCode(); - } - - @Override - public int compareTo(RolePrincipalGrant other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRoleName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipalName()).compareTo(other.isSetPrincipalName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipalName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalName, other.principalName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipalType()).compareTo(other.isSetPrincipalType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipalType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalType, other.principalType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantOption()).compareTo(other.isSetGrantOption()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantOption()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantOption, other.grantOption); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantTime()).compareTo(other.isSetGrantTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantTime, other.grantTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantorName()).compareTo(other.isSetGrantorName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantorName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorName, other.grantorName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantorPrincipalType()).compareTo(other.isSetGrantorPrincipalType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantorPrincipalType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorPrincipalType, other.grantorPrincipalType); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("RolePrincipalGrant("); - boolean first = true; - - sb.append("roleName:"); - if (this.roleName == null) { - sb.append("null"); - } else { - sb.append(this.roleName); - } - first = false; - if (!first) sb.append(", "); - sb.append("principalName:"); - if (this.principalName == null) { - sb.append("null"); - } else { - sb.append(this.principalName); - } - first = false; - if (!first) sb.append(", "); - sb.append("principalType:"); - if (this.principalType == null) { - sb.append("null"); - } else { - sb.append(this.principalType); - } - first = false; - if (!first) sb.append(", "); - sb.append("grantOption:"); - sb.append(this.grantOption); - first = false; - if (!first) sb.append(", "); - sb.append("grantTime:"); - sb.append(this.grantTime); - first = false; - if (!first) sb.append(", "); - sb.append("grantorName:"); - if (this.grantorName == null) { - sb.append("null"); - } else { - sb.append(this.grantorName); - } - first = false; - if (!first) sb.append(", "); - sb.append("grantorPrincipalType:"); - if (this.grantorPrincipalType == null) { - sb.append("null"); - } else { - sb.append(this.grantorPrincipalType); - } - 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 { - // 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 RolePrincipalGrantStandardSchemeFactory implements SchemeFactory { - public RolePrincipalGrantStandardScheme getScheme() { - return new RolePrincipalGrantStandardScheme(); - } - } - - private static class RolePrincipalGrantStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, RolePrincipalGrant 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: // 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 = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setPrincipalTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // 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; - case 5: // GRANT_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.grantTime = iprot.readI32(); - struct.setGrantTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // GRANTOR_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.grantorName = iprot.readString(); - struct.setGrantorNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // GRANTOR_PRINCIPAL_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.grantorPrincipalType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setGrantorPrincipalTypeIsSet(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, RolePrincipalGrant 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(); - } - 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(); - } - oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); - oprot.writeBool(struct.grantOption); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(GRANT_TIME_FIELD_DESC); - oprot.writeI32(struct.grantTime); - oprot.writeFieldEnd(); - if (struct.grantorName != null) { - oprot.writeFieldBegin(GRANTOR_NAME_FIELD_DESC); - oprot.writeString(struct.grantorName); - oprot.writeFieldEnd(); - } - if (struct.grantorPrincipalType != null) { - oprot.writeFieldBegin(GRANTOR_PRINCIPAL_TYPE_FIELD_DESC); - oprot.writeI32(struct.grantorPrincipalType.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class RolePrincipalGrantTupleSchemeFactory implements SchemeFactory { - public RolePrincipalGrantTupleScheme getScheme() { - return new RolePrincipalGrantTupleScheme(); - } - } - - private static class RolePrincipalGrantTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, RolePrincipalGrant struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRoleName()) { - optionals.set(0); - } - if (struct.isSetPrincipalName()) { - optionals.set(1); - } - if (struct.isSetPrincipalType()) { - optionals.set(2); - } - if (struct.isSetGrantOption()) { - optionals.set(3); - } - if (struct.isSetGrantTime()) { - optionals.set(4); - } - if (struct.isSetGrantorName()) { - optionals.set(5); - } - if (struct.isSetGrantorPrincipalType()) { - optionals.set(6); - } - oprot.writeBitSet(optionals, 7); - if (struct.isSetRoleName()) { - oprot.writeString(struct.roleName); - } - if (struct.isSetPrincipalName()) { - oprot.writeString(struct.principalName); - } - if (struct.isSetPrincipalType()) { - oprot.writeI32(struct.principalType.getValue()); - } - if (struct.isSetGrantOption()) { - oprot.writeBool(struct.grantOption); - } - if (struct.isSetGrantTime()) { - oprot.writeI32(struct.grantTime); - } - if (struct.isSetGrantorName()) { - oprot.writeString(struct.grantorName); - } - if (struct.isSetGrantorPrincipalType()) { - oprot.writeI32(struct.grantorPrincipalType.getValue()); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, RolePrincipalGrant struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(7); - if (incoming.get(0)) { - struct.roleName = iprot.readString(); - struct.setRoleNameIsSet(true); - } - if (incoming.get(1)) { - struct.principalName = iprot.readString(); - struct.setPrincipalNameIsSet(true); - } - if (incoming.get(2)) { - struct.principalType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setPrincipalTypeIsSet(true); - } - if (incoming.get(3)) { - struct.grantOption = iprot.readBool(); - struct.setGrantOptionIsSet(true); - } - if (incoming.get(4)) { - struct.grantTime = iprot.readI32(); - struct.setGrantTimeIsSet(true); - } - if (incoming.get(5)) { - struct.grantorName = iprot.readString(); - struct.setGrantorNameIsSet(true); - } - if (incoming.get(6)) { - struct.grantorPrincipalType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setGrantorPrincipalTypeIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java deleted file mode 100644 index 44c5d72..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java +++ /dev/null @@ -1,1715 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class SQLForeignKey implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SQLForeignKey"); - - private static final org.apache.thrift.protocol.TField PKTABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("pktable_db", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField PKTABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pktable_name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PKCOLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pkcolumn_name", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField FKTABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("fktable_db", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField FKTABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fktable_name", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField FKCOLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fkcolumn_name", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField KEY_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("key_seq", org.apache.thrift.protocol.TType.I32, (short)7); - private static final org.apache.thrift.protocol.TField UPDATE_RULE_FIELD_DESC = new org.apache.thrift.protocol.TField("update_rule", org.apache.thrift.protocol.TType.I32, (short)8); - private static final org.apache.thrift.protocol.TField DELETE_RULE_FIELD_DESC = new org.apache.thrift.protocol.TField("delete_rule", org.apache.thrift.protocol.TType.I32, (short)9); - private static final org.apache.thrift.protocol.TField FK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fk_name", org.apache.thrift.protocol.TType.STRING, (short)10); - private static final org.apache.thrift.protocol.TField PK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pk_name", org.apache.thrift.protocol.TType.STRING, (short)11); - private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)12); - private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)13); - private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)14); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SQLForeignKeyStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SQLForeignKeyTupleSchemeFactory()); - } - - private String pktable_db; // required - private String pktable_name; // required - private String pkcolumn_name; // required - private String fktable_db; // required - private String fktable_name; // required - private String fkcolumn_name; // required - private int key_seq; // required - private int update_rule; // required - private int delete_rule; // required - private String fk_name; // required - private String pk_name; // required - private boolean enable_cstr; // required - private boolean validate_cstr; // required - private boolean rely_cstr; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PKTABLE_DB((short)1, "pktable_db"), - PKTABLE_NAME((short)2, "pktable_name"), - PKCOLUMN_NAME((short)3, "pkcolumn_name"), - FKTABLE_DB((short)4, "fktable_db"), - FKTABLE_NAME((short)5, "fktable_name"), - FKCOLUMN_NAME((short)6, "fkcolumn_name"), - KEY_SEQ((short)7, "key_seq"), - UPDATE_RULE((short)8, "update_rule"), - DELETE_RULE((short)9, "delete_rule"), - FK_NAME((short)10, "fk_name"), - PK_NAME((short)11, "pk_name"), - ENABLE_CSTR((short)12, "enable_cstr"), - VALIDATE_CSTR((short)13, "validate_cstr"), - RELY_CSTR((short)14, "rely_cstr"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PKTABLE_DB - return PKTABLE_DB; - case 2: // PKTABLE_NAME - return PKTABLE_NAME; - case 3: // PKCOLUMN_NAME - return PKCOLUMN_NAME; - case 4: // FKTABLE_DB - return FKTABLE_DB; - case 5: // FKTABLE_NAME - return FKTABLE_NAME; - case 6: // FKCOLUMN_NAME - return FKCOLUMN_NAME; - case 7: // KEY_SEQ - return KEY_SEQ; - case 8: // UPDATE_RULE - return UPDATE_RULE; - case 9: // DELETE_RULE - return DELETE_RULE; - case 10: // FK_NAME - return FK_NAME; - case 11: // PK_NAME - return PK_NAME; - case 12: // ENABLE_CSTR - return ENABLE_CSTR; - case 13: // VALIDATE_CSTR - return VALIDATE_CSTR; - case 14: // RELY_CSTR - return RELY_CSTR; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __KEY_SEQ_ISSET_ID = 0; - private static final int __UPDATE_RULE_ISSET_ID = 1; - private static final int __DELETE_RULE_ISSET_ID = 2; - private static final int __ENABLE_CSTR_ISSET_ID = 3; - private static final int __VALIDATE_CSTR_ISSET_ID = 4; - private static final int __RELY_CSTR_ISSET_ID = 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); - tmpMap.put(_Fields.PKTABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("pktable_db", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PKTABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("pktable_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PKCOLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("pkcolumn_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FKTABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("fktable_db", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FKTABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("fktable_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FKCOLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("fkcolumn_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.KEY_SEQ, new org.apache.thrift.meta_data.FieldMetaData("key_seq", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.UPDATE_RULE, new org.apache.thrift.meta_data.FieldMetaData("update_rule", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.DELETE_RULE, new org.apache.thrift.meta_data.FieldMetaData("delete_rule", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.FK_NAME, new org.apache.thrift.meta_data.FieldMetaData("fk_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PK_NAME, new org.apache.thrift.meta_data.FieldMetaData("pk_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ENABLE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("enable_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.VALIDATE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("validate_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.RELY_CSTR, new org.apache.thrift.meta_data.FieldMetaData("rely_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SQLForeignKey.class, metaDataMap); - } - - public SQLForeignKey() { - } - - public SQLForeignKey( - String pktable_db, - String pktable_name, - String pkcolumn_name, - String fktable_db, - String fktable_name, - String fkcolumn_name, - int key_seq, - int update_rule, - int delete_rule, - String fk_name, - String pk_name, - boolean enable_cstr, - boolean validate_cstr, - boolean rely_cstr) - { - this(); - this.pktable_db = pktable_db; - this.pktable_name = pktable_name; - this.pkcolumn_name = pkcolumn_name; - this.fktable_db = fktable_db; - this.fktable_name = fktable_name; - this.fkcolumn_name = fkcolumn_name; - this.key_seq = key_seq; - setKey_seqIsSet(true); - this.update_rule = update_rule; - setUpdate_ruleIsSet(true); - this.delete_rule = delete_rule; - setDelete_ruleIsSet(true); - this.fk_name = fk_name; - this.pk_name = pk_name; - this.enable_cstr = enable_cstr; - setEnable_cstrIsSet(true); - this.validate_cstr = validate_cstr; - setValidate_cstrIsSet(true); - this.rely_cstr = rely_cstr; - setRely_cstrIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public SQLForeignKey(SQLForeignKey other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPktable_db()) { - this.pktable_db = other.pktable_db; - } - if (other.isSetPktable_name()) { - this.pktable_name = other.pktable_name; - } - if (other.isSetPkcolumn_name()) { - this.pkcolumn_name = other.pkcolumn_name; - } - if (other.isSetFktable_db()) { - this.fktable_db = other.fktable_db; - } - if (other.isSetFktable_name()) { - this.fktable_name = other.fktable_name; - } - if (other.isSetFkcolumn_name()) { - this.fkcolumn_name = other.fkcolumn_name; - } - this.key_seq = other.key_seq; - this.update_rule = other.update_rule; - this.delete_rule = other.delete_rule; - if (other.isSetFk_name()) { - this.fk_name = other.fk_name; - } - if (other.isSetPk_name()) { - this.pk_name = other.pk_name; - } - this.enable_cstr = other.enable_cstr; - this.validate_cstr = other.validate_cstr; - this.rely_cstr = other.rely_cstr; - } - - public SQLForeignKey deepCopy() { - return new SQLForeignKey(this); - } - - @Override - public void clear() { - this.pktable_db = null; - this.pktable_name = null; - this.pkcolumn_name = null; - this.fktable_db = null; - this.fktable_name = null; - this.fkcolumn_name = null; - setKey_seqIsSet(false); - this.key_seq = 0; - setUpdate_ruleIsSet(false); - this.update_rule = 0; - setDelete_ruleIsSet(false); - this.delete_rule = 0; - this.fk_name = null; - this.pk_name = null; - setEnable_cstrIsSet(false); - this.enable_cstr = false; - setValidate_cstrIsSet(false); - this.validate_cstr = false; - setRely_cstrIsSet(false); - this.rely_cstr = false; - } - - public String getPktable_db() { - return this.pktable_db; - } - - public void setPktable_db(String pktable_db) { - this.pktable_db = pktable_db; - } - - public void unsetPktable_db() { - this.pktable_db = null; - } - - /** Returns true if field pktable_db is set (has been assigned a value) and false otherwise */ - public boolean isSetPktable_db() { - return this.pktable_db != null; - } - - public void setPktable_dbIsSet(boolean value) { - if (!value) { - this.pktable_db = null; - } - } - - public String getPktable_name() { - return this.pktable_name; - } - - public void setPktable_name(String pktable_name) { - this.pktable_name = pktable_name; - } - - public void unsetPktable_name() { - this.pktable_name = null; - } - - /** Returns true if field pktable_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPktable_name() { - return this.pktable_name != null; - } - - public void setPktable_nameIsSet(boolean value) { - if (!value) { - this.pktable_name = null; - } - } - - public String getPkcolumn_name() { - return this.pkcolumn_name; - } - - public void setPkcolumn_name(String pkcolumn_name) { - this.pkcolumn_name = pkcolumn_name; - } - - public void unsetPkcolumn_name() { - this.pkcolumn_name = null; - } - - /** Returns true if field pkcolumn_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPkcolumn_name() { - return this.pkcolumn_name != null; - } - - public void setPkcolumn_nameIsSet(boolean value) { - if (!value) { - this.pkcolumn_name = null; - } - } - - public String getFktable_db() { - return this.fktable_db; - } - - public void setFktable_db(String fktable_db) { - this.fktable_db = fktable_db; - } - - public void unsetFktable_db() { - this.fktable_db = null; - } - - /** Returns true if field fktable_db is set (has been assigned a value) and false otherwise */ - public boolean isSetFktable_db() { - return this.fktable_db != null; - } - - public void setFktable_dbIsSet(boolean value) { - if (!value) { - this.fktable_db = null; - } - } - - public String getFktable_name() { - return this.fktable_name; - } - - public void setFktable_name(String fktable_name) { - this.fktable_name = fktable_name; - } - - public void unsetFktable_name() { - this.fktable_name = null; - } - - /** Returns true if field fktable_name is set (has been assigned a value) and false otherwise */ - public boolean isSetFktable_name() { - return this.fktable_name != null; - } - - public void setFktable_nameIsSet(boolean value) { - if (!value) { - this.fktable_name = null; - } - } - - public String getFkcolumn_name() { - return this.fkcolumn_name; - } - - public void setFkcolumn_name(String fkcolumn_name) { - this.fkcolumn_name = fkcolumn_name; - } - - public void unsetFkcolumn_name() { - this.fkcolumn_name = null; - } - - /** Returns true if field fkcolumn_name is set (has been assigned a value) and false otherwise */ - public boolean isSetFkcolumn_name() { - return this.fkcolumn_name != null; - } - - public void setFkcolumn_nameIsSet(boolean value) { - if (!value) { - this.fkcolumn_name = null; - } - } - - public int getKey_seq() { - return this.key_seq; - } - - public void setKey_seq(int key_seq) { - this.key_seq = key_seq; - setKey_seqIsSet(true); - } - - public void unsetKey_seq() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); - } - - /** Returns true if field key_seq is set (has been assigned a value) and false otherwise */ - public boolean isSetKey_seq() { - return EncodingUtils.testBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); - } - - public void setKey_seqIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEY_SEQ_ISSET_ID, value); - } - - public int getUpdate_rule() { - return this.update_rule; - } - - public void setUpdate_rule(int update_rule) { - this.update_rule = update_rule; - setUpdate_ruleIsSet(true); - } - - public void unsetUpdate_rule() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATE_RULE_ISSET_ID); - } - - /** Returns true if field update_rule is set (has been assigned a value) and false otherwise */ - public boolean isSetUpdate_rule() { - return EncodingUtils.testBit(__isset_bitfield, __UPDATE_RULE_ISSET_ID); - } - - public void setUpdate_ruleIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATE_RULE_ISSET_ID, value); - } - - public int getDelete_rule() { - return this.delete_rule; - } - - public void setDelete_rule(int delete_rule) { - this.delete_rule = delete_rule; - setDelete_ruleIsSet(true); - } - - public void unsetDelete_rule() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETE_RULE_ISSET_ID); - } - - /** Returns true if field delete_rule is set (has been assigned a value) and false otherwise */ - public boolean isSetDelete_rule() { - return EncodingUtils.testBit(__isset_bitfield, __DELETE_RULE_ISSET_ID); - } - - public void setDelete_ruleIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETE_RULE_ISSET_ID, value); - } - - public String getFk_name() { - return this.fk_name; - } - - public void setFk_name(String fk_name) { - this.fk_name = fk_name; - } - - public void unsetFk_name() { - this.fk_name = null; - } - - /** Returns true if field fk_name is set (has been assigned a value) and false otherwise */ - public boolean isSetFk_name() { - return this.fk_name != null; - } - - public void setFk_nameIsSet(boolean value) { - if (!value) { - this.fk_name = null; - } - } - - public String getPk_name() { - return this.pk_name; - } - - public void setPk_name(String pk_name) { - this.pk_name = pk_name; - } - - public void unsetPk_name() { - this.pk_name = null; - } - - /** Returns true if field pk_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPk_name() { - return this.pk_name != null; - } - - public void setPk_nameIsSet(boolean value) { - if (!value) { - this.pk_name = null; - } - } - - public boolean isEnable_cstr() { - return this.enable_cstr; - } - - public void setEnable_cstr(boolean enable_cstr) { - this.enable_cstr = enable_cstr; - setEnable_cstrIsSet(true); - } - - public void unsetEnable_cstr() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); - } - - /** Returns true if field enable_cstr is set (has been assigned a value) and false otherwise */ - public boolean isSetEnable_cstr() { - return EncodingUtils.testBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); - } - - public void setEnable_cstrIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID, value); - } - - public boolean isValidate_cstr() { - return this.validate_cstr; - } - - public void setValidate_cstr(boolean validate_cstr) { - this.validate_cstr = validate_cstr; - setValidate_cstrIsSet(true); - } - - public void unsetValidate_cstr() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); - } - - /** Returns true if field validate_cstr is set (has been assigned a value) and false otherwise */ - public boolean isSetValidate_cstr() { - return EncodingUtils.testBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); - } - - public void setValidate_cstrIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID, value); - } - - public boolean isRely_cstr() { - return this.rely_cstr; - } - - public void setRely_cstr(boolean rely_cstr) { - this.rely_cstr = rely_cstr; - setRely_cstrIsSet(true); - } - - public void unsetRely_cstr() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); - } - - /** Returns true if field rely_cstr is set (has been assigned a value) and false otherwise */ - public boolean isSetRely_cstr() { - return EncodingUtils.testBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); - } - - public void setRely_cstrIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELY_CSTR_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PKTABLE_DB: - if (value == null) { - unsetPktable_db(); - } else { - setPktable_db((String)value); - } - break; - - case PKTABLE_NAME: - if (value == null) { - unsetPktable_name(); - } else { - setPktable_name((String)value); - } - break; - - case PKCOLUMN_NAME: - if (value == null) { - unsetPkcolumn_name(); - } else { - setPkcolumn_name((String)value); - } - break; - - case FKTABLE_DB: - if (value == null) { - unsetFktable_db(); - } else { - setFktable_db((String)value); - } - break; - - case FKTABLE_NAME: - if (value == null) { - unsetFktable_name(); - } else { - setFktable_name((String)value); - } - break; - - case FKCOLUMN_NAME: - if (value == null) { - unsetFkcolumn_name(); - } else { - setFkcolumn_name((String)value); - } - break; - - case KEY_SEQ: - if (value == null) { - unsetKey_seq(); - } else { - setKey_seq((Integer)value); - } - break; - - case UPDATE_RULE: - if (value == null) { - unsetUpdate_rule(); - } else { - setUpdate_rule((Integer)value); - } - break; - - case DELETE_RULE: - if (value == null) { - unsetDelete_rule(); - } else { - setDelete_rule((Integer)value); - } - break; - - case FK_NAME: - if (value == null) { - unsetFk_name(); - } else { - setFk_name((String)value); - } - break; - - case PK_NAME: - if (value == null) { - unsetPk_name(); - } else { - setPk_name((String)value); - } - break; - - case ENABLE_CSTR: - if (value == null) { - unsetEnable_cstr(); - } else { - setEnable_cstr((Boolean)value); - } - break; - - case VALIDATE_CSTR: - if (value == null) { - unsetValidate_cstr(); - } else { - setValidate_cstr((Boolean)value); - } - break; - - case RELY_CSTR: - if (value == null) { - unsetRely_cstr(); - } else { - setRely_cstr((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PKTABLE_DB: - return getPktable_db(); - - case PKTABLE_NAME: - return getPktable_name(); - - case PKCOLUMN_NAME: - return getPkcolumn_name(); - - case FKTABLE_DB: - return getFktable_db(); - - case FKTABLE_NAME: - return getFktable_name(); - - case FKCOLUMN_NAME: - return getFkcolumn_name(); - - case KEY_SEQ: - return getKey_seq(); - - case UPDATE_RULE: - return getUpdate_rule(); - - case DELETE_RULE: - return getDelete_rule(); - - case FK_NAME: - return getFk_name(); - - case PK_NAME: - return getPk_name(); - - case ENABLE_CSTR: - return isEnable_cstr(); - - case VALIDATE_CSTR: - return isValidate_cstr(); - - case RELY_CSTR: - return isRely_cstr(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PKTABLE_DB: - return isSetPktable_db(); - case PKTABLE_NAME: - return isSetPktable_name(); - case PKCOLUMN_NAME: - return isSetPkcolumn_name(); - case FKTABLE_DB: - return isSetFktable_db(); - case FKTABLE_NAME: - return isSetFktable_name(); - case FKCOLUMN_NAME: - return isSetFkcolumn_name(); - case KEY_SEQ: - return isSetKey_seq(); - case UPDATE_RULE: - return isSetUpdate_rule(); - case DELETE_RULE: - return isSetDelete_rule(); - case FK_NAME: - return isSetFk_name(); - case PK_NAME: - return isSetPk_name(); - case ENABLE_CSTR: - return isSetEnable_cstr(); - case VALIDATE_CSTR: - return isSetValidate_cstr(); - case RELY_CSTR: - return isSetRely_cstr(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof SQLForeignKey) - return this.equals((SQLForeignKey)that); - return false; - } - - public boolean equals(SQLForeignKey that) { - if (that == null) - return false; - - boolean this_present_pktable_db = true && this.isSetPktable_db(); - boolean that_present_pktable_db = true && that.isSetPktable_db(); - if (this_present_pktable_db || that_present_pktable_db) { - if (!(this_present_pktable_db && that_present_pktable_db)) - return false; - if (!this.pktable_db.equals(that.pktable_db)) - return false; - } - - boolean this_present_pktable_name = true && this.isSetPktable_name(); - boolean that_present_pktable_name = true && that.isSetPktable_name(); - if (this_present_pktable_name || that_present_pktable_name) { - if (!(this_present_pktable_name && that_present_pktable_name)) - return false; - if (!this.pktable_name.equals(that.pktable_name)) - return false; - } - - boolean this_present_pkcolumn_name = true && this.isSetPkcolumn_name(); - boolean that_present_pkcolumn_name = true && that.isSetPkcolumn_name(); - if (this_present_pkcolumn_name || that_present_pkcolumn_name) { - if (!(this_present_pkcolumn_name && that_present_pkcolumn_name)) - return false; - if (!this.pkcolumn_name.equals(that.pkcolumn_name)) - return false; - } - - boolean this_present_fktable_db = true && this.isSetFktable_db(); - boolean that_present_fktable_db = true && that.isSetFktable_db(); - if (this_present_fktable_db || that_present_fktable_db) { - if (!(this_present_fktable_db && that_present_fktable_db)) - return false; - if (!this.fktable_db.equals(that.fktable_db)) - return false; - } - - boolean this_present_fktable_name = true && this.isSetFktable_name(); - boolean that_present_fktable_name = true && that.isSetFktable_name(); - if (this_present_fktable_name || that_present_fktable_name) { - if (!(this_present_fktable_name && that_present_fktable_name)) - return false; - if (!this.fktable_name.equals(that.fktable_name)) - return false; - } - - boolean this_present_fkcolumn_name = true && this.isSetFkcolumn_name(); - boolean that_present_fkcolumn_name = true && that.isSetFkcolumn_name(); - if (this_present_fkcolumn_name || that_present_fkcolumn_name) { - if (!(this_present_fkcolumn_name && that_present_fkcolumn_name)) - return false; - if (!this.fkcolumn_name.equals(that.fkcolumn_name)) - return false; - } - - boolean this_present_key_seq = true; - boolean that_present_key_seq = true; - if (this_present_key_seq || that_present_key_seq) { - if (!(this_present_key_seq && that_present_key_seq)) - return false; - if (this.key_seq != that.key_seq) - return false; - } - - boolean this_present_update_rule = true; - boolean that_present_update_rule = true; - if (this_present_update_rule || that_present_update_rule) { - if (!(this_present_update_rule && that_present_update_rule)) - return false; - if (this.update_rule != that.update_rule) - return false; - } - - boolean this_present_delete_rule = true; - boolean that_present_delete_rule = true; - if (this_present_delete_rule || that_present_delete_rule) { - if (!(this_present_delete_rule && that_present_delete_rule)) - return false; - if (this.delete_rule != that.delete_rule) - return false; - } - - boolean this_present_fk_name = true && this.isSetFk_name(); - boolean that_present_fk_name = true && that.isSetFk_name(); - if (this_present_fk_name || that_present_fk_name) { - if (!(this_present_fk_name && that_present_fk_name)) - return false; - if (!this.fk_name.equals(that.fk_name)) - return false; - } - - boolean this_present_pk_name = true && this.isSetPk_name(); - boolean that_present_pk_name = true && that.isSetPk_name(); - if (this_present_pk_name || that_present_pk_name) { - if (!(this_present_pk_name && that_present_pk_name)) - return false; - if (!this.pk_name.equals(that.pk_name)) - return false; - } - - boolean this_present_enable_cstr = true; - boolean that_present_enable_cstr = true; - if (this_present_enable_cstr || that_present_enable_cstr) { - if (!(this_present_enable_cstr && that_present_enable_cstr)) - return false; - if (this.enable_cstr != that.enable_cstr) - return false; - } - - boolean this_present_validate_cstr = true; - boolean that_present_validate_cstr = true; - if (this_present_validate_cstr || that_present_validate_cstr) { - if (!(this_present_validate_cstr && that_present_validate_cstr)) - return false; - if (this.validate_cstr != that.validate_cstr) - return false; - } - - boolean this_present_rely_cstr = true; - boolean that_present_rely_cstr = true; - if (this_present_rely_cstr || that_present_rely_cstr) { - if (!(this_present_rely_cstr && that_present_rely_cstr)) - return false; - if (this.rely_cstr != that.rely_cstr) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_pktable_db = true && (isSetPktable_db()); - list.add(present_pktable_db); - if (present_pktable_db) - list.add(pktable_db); - - boolean present_pktable_name = true && (isSetPktable_name()); - list.add(present_pktable_name); - if (present_pktable_name) - list.add(pktable_name); - - boolean present_pkcolumn_name = true && (isSetPkcolumn_name()); - list.add(present_pkcolumn_name); - if (present_pkcolumn_name) - list.add(pkcolumn_name); - - boolean present_fktable_db = true && (isSetFktable_db()); - list.add(present_fktable_db); - if (present_fktable_db) - list.add(fktable_db); - - boolean present_fktable_name = true && (isSetFktable_name()); - list.add(present_fktable_name); - if (present_fktable_name) - list.add(fktable_name); - - boolean present_fkcolumn_name = true && (isSetFkcolumn_name()); - list.add(present_fkcolumn_name); - if (present_fkcolumn_name) - list.add(fkcolumn_name); - - boolean present_key_seq = true; - list.add(present_key_seq); - if (present_key_seq) - list.add(key_seq); - - boolean present_update_rule = true; - list.add(present_update_rule); - if (present_update_rule) - list.add(update_rule); - - boolean present_delete_rule = true; - list.add(present_delete_rule); - if (present_delete_rule) - list.add(delete_rule); - - boolean present_fk_name = true && (isSetFk_name()); - list.add(present_fk_name); - if (present_fk_name) - list.add(fk_name); - - boolean present_pk_name = true && (isSetPk_name()); - list.add(present_pk_name); - if (present_pk_name) - list.add(pk_name); - - boolean present_enable_cstr = true; - list.add(present_enable_cstr); - if (present_enable_cstr) - list.add(enable_cstr); - - boolean present_validate_cstr = true; - list.add(present_validate_cstr); - if (present_validate_cstr) - list.add(validate_cstr); - - boolean present_rely_cstr = true; - list.add(present_rely_cstr); - if (present_rely_cstr) - list.add(rely_cstr); - - return list.hashCode(); - } - - @Override - public int compareTo(SQLForeignKey other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPktable_db()).compareTo(other.isSetPktable_db()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPktable_db()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pktable_db, other.pktable_db); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPktable_name()).compareTo(other.isSetPktable_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPktable_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pktable_name, other.pktable_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPkcolumn_name()).compareTo(other.isSetPkcolumn_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPkcolumn_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pkcolumn_name, other.pkcolumn_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFktable_db()).compareTo(other.isSetFktable_db()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFktable_db()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fktable_db, other.fktable_db); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFktable_name()).compareTo(other.isSetFktable_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFktable_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fktable_name, other.fktable_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFkcolumn_name()).compareTo(other.isSetFkcolumn_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFkcolumn_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fkcolumn_name, other.fkcolumn_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetKey_seq()).compareTo(other.isSetKey_seq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKey_seq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_seq, other.key_seq); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUpdate_rule()).compareTo(other.isSetUpdate_rule()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUpdate_rule()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.update_rule, other.update_rule); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDelete_rule()).compareTo(other.isSetDelete_rule()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDelete_rule()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delete_rule, other.delete_rule); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFk_name()).compareTo(other.isSetFk_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFk_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fk_name, other.fk_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPk_name()).compareTo(other.isSetPk_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPk_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pk_name, other.pk_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnable_cstr()).compareTo(other.isSetEnable_cstr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnable_cstr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_cstr, other.enable_cstr); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetValidate_cstr()).compareTo(other.isSetValidate_cstr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValidate_cstr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validate_cstr, other.validate_cstr); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRely_cstr()).compareTo(other.isSetRely_cstr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRely_cstr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rely_cstr, other.rely_cstr); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("SQLForeignKey("); - boolean first = true; - - sb.append("pktable_db:"); - if (this.pktable_db == null) { - sb.append("null"); - } else { - sb.append(this.pktable_db); - } - first = false; - if (!first) sb.append(", "); - sb.append("pktable_name:"); - if (this.pktable_name == null) { - sb.append("null"); - } else { - sb.append(this.pktable_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("pkcolumn_name:"); - if (this.pkcolumn_name == null) { - sb.append("null"); - } else { - sb.append(this.pkcolumn_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("fktable_db:"); - if (this.fktable_db == null) { - sb.append("null"); - } else { - sb.append(this.fktable_db); - } - first = false; - if (!first) sb.append(", "); - sb.append("fktable_name:"); - if (this.fktable_name == null) { - sb.append("null"); - } else { - sb.append(this.fktable_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("fkcolumn_name:"); - if (this.fkcolumn_name == null) { - sb.append("null"); - } else { - sb.append(this.fkcolumn_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("key_seq:"); - sb.append(this.key_seq); - first = false; - if (!first) sb.append(", "); - sb.append("update_rule:"); - sb.append(this.update_rule); - first = false; - if (!first) sb.append(", "); - sb.append("delete_rule:"); - sb.append(this.delete_rule); - first = false; - if (!first) sb.append(", "); - sb.append("fk_name:"); - if (this.fk_name == null) { - sb.append("null"); - } else { - sb.append(this.fk_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("pk_name:"); - if (this.pk_name == null) { - sb.append("null"); - } else { - sb.append(this.pk_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("enable_cstr:"); - sb.append(this.enable_cstr); - first = false; - if (!first) sb.append(", "); - sb.append("validate_cstr:"); - sb.append(this.validate_cstr); - first = false; - if (!first) sb.append(", "); - sb.append("rely_cstr:"); - sb.append(this.rely_cstr); - 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 { - // 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 SQLForeignKeyStandardSchemeFactory implements SchemeFactory { - public SQLForeignKeyStandardScheme getScheme() { - return new SQLForeignKeyStandardScheme(); - } - } - - private static class SQLForeignKeyStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, SQLForeignKey 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: // PKTABLE_DB - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.pktable_db = iprot.readString(); - struct.setPktable_dbIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PKTABLE_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.pktable_name = iprot.readString(); - struct.setPktable_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PKCOLUMN_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.pkcolumn_name = iprot.readString(); - struct.setPkcolumn_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // FKTABLE_DB - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.fktable_db = iprot.readString(); - struct.setFktable_dbIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // FKTABLE_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.fktable_name = iprot.readString(); - struct.setFktable_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // FKCOLUMN_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.fkcolumn_name = iprot.readString(); - struct.setFkcolumn_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // KEY_SEQ - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.key_seq = iprot.readI32(); - struct.setKey_seqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // UPDATE_RULE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.update_rule = iprot.readI32(); - struct.setUpdate_ruleIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // DELETE_RULE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.delete_rule = iprot.readI32(); - struct.setDelete_ruleIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // FK_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.fk_name = iprot.readString(); - struct.setFk_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // PK_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.pk_name = iprot.readString(); - struct.setPk_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // ENABLE_CSTR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.enable_cstr = iprot.readBool(); - struct.setEnable_cstrIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 13: // VALIDATE_CSTR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.validate_cstr = iprot.readBool(); - struct.setValidate_cstrIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 14: // RELY_CSTR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.rely_cstr = iprot.readBool(); - struct.setRely_cstrIsSet(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, SQLForeignKey struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.pktable_db != null) { - oprot.writeFieldBegin(PKTABLE_DB_FIELD_DESC); - oprot.writeString(struct.pktable_db); - oprot.writeFieldEnd(); - } - if (struct.pktable_name != null) { - oprot.writeFieldBegin(PKTABLE_NAME_FIELD_DESC); - oprot.writeString(struct.pktable_name); - oprot.writeFieldEnd(); - } - if (struct.pkcolumn_name != null) { - oprot.writeFieldBegin(PKCOLUMN_NAME_FIELD_DESC); - oprot.writeString(struct.pkcolumn_name); - oprot.writeFieldEnd(); - } - if (struct.fktable_db != null) { - oprot.writeFieldBegin(FKTABLE_DB_FIELD_DESC); - oprot.writeString(struct.fktable_db); - oprot.writeFieldEnd(); - } - if (struct.fktable_name != null) { - oprot.writeFieldBegin(FKTABLE_NAME_FIELD_DESC); - oprot.writeString(struct.fktable_name); - oprot.writeFieldEnd(); - } - if (struct.fkcolumn_name != null) { - oprot.writeFieldBegin(FKCOLUMN_NAME_FIELD_DESC); - oprot.writeString(struct.fkcolumn_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(KEY_SEQ_FIELD_DESC); - oprot.writeI32(struct.key_seq); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(UPDATE_RULE_FIELD_DESC); - oprot.writeI32(struct.update_rule); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(DELETE_RULE_FIELD_DESC); - oprot.writeI32(struct.delete_rule); - oprot.writeFieldEnd(); - if (struct.fk_name != null) { - oprot.writeFieldBegin(FK_NAME_FIELD_DESC); - oprot.writeString(struct.fk_name); - oprot.writeFieldEnd(); - } - if (struct.pk_name != null) { - oprot.writeFieldBegin(PK_NAME_FIELD_DESC); - oprot.writeString(struct.pk_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ENABLE_CSTR_FIELD_DESC); - oprot.writeBool(struct.enable_cstr); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(VALIDATE_CSTR_FIELD_DESC); - oprot.writeBool(struct.validate_cstr); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(RELY_CSTR_FIELD_DESC); - oprot.writeBool(struct.rely_cstr); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class SQLForeignKeyTupleSchemeFactory implements SchemeFactory { - public SQLForeignKeyTupleScheme getScheme() { - return new SQLForeignKeyTupleScheme(); - } - } - - private static class SQLForeignKeyTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, SQLForeignKey struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPktable_db()) { - optionals.set(0); - } - if (struct.isSetPktable_name()) { - optionals.set(1); - } - if (struct.isSetPkcolumn_name()) { - optionals.set(2); - } - if (struct.isSetFktable_db()) { - optionals.set(3); - } - if (struct.isSetFktable_name()) { - optionals.set(4); - } - if (struct.isSetFkcolumn_name()) { - optionals.set(5); - } - if (struct.isSetKey_seq()) { - optionals.set(6); - } - if (struct.isSetUpdate_rule()) { - optionals.set(7); - } - if (struct.isSetDelete_rule()) { - optionals.set(8); - } - if (struct.isSetFk_name()) { - optionals.set(9); - } - if (struct.isSetPk_name()) { - optionals.set(10); - } - if (struct.isSetEnable_cstr()) { - optionals.set(11); - } - if (struct.isSetValidate_cstr()) { - optionals.set(12); - } - if (struct.isSetRely_cstr()) { - optionals.set(13); - } - oprot.writeBitSet(optionals, 14); - if (struct.isSetPktable_db()) { - oprot.writeString(struct.pktable_db); - } - if (struct.isSetPktable_name()) { - oprot.writeString(struct.pktable_name); - } - if (struct.isSetPkcolumn_name()) { - oprot.writeString(struct.pkcolumn_name); - } - if (struct.isSetFktable_db()) { - oprot.writeString(struct.fktable_db); - } - if (struct.isSetFktable_name()) { - oprot.writeString(struct.fktable_name); - } - if (struct.isSetFkcolumn_name()) { - oprot.writeString(struct.fkcolumn_name); - } - if (struct.isSetKey_seq()) { - oprot.writeI32(struct.key_seq); - } - if (struct.isSetUpdate_rule()) { - oprot.writeI32(struct.update_rule); - } - if (struct.isSetDelete_rule()) { - oprot.writeI32(struct.delete_rule); - } - if (struct.isSetFk_name()) { - oprot.writeString(struct.fk_name); - } - if (struct.isSetPk_name()) { - oprot.writeString(struct.pk_name); - } - if (struct.isSetEnable_cstr()) { - oprot.writeBool(struct.enable_cstr); - } - if (struct.isSetValidate_cstr()) { - oprot.writeBool(struct.validate_cstr); - } - if (struct.isSetRely_cstr()) { - oprot.writeBool(struct.rely_cstr); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, SQLForeignKey struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(14); - if (incoming.get(0)) { - struct.pktable_db = iprot.readString(); - struct.setPktable_dbIsSet(true); - } - if (incoming.get(1)) { - struct.pktable_name = iprot.readString(); - struct.setPktable_nameIsSet(true); - } - if (incoming.get(2)) { - struct.pkcolumn_name = iprot.readString(); - struct.setPkcolumn_nameIsSet(true); - } - if (incoming.get(3)) { - struct.fktable_db = iprot.readString(); - struct.setFktable_dbIsSet(true); - } - if (incoming.get(4)) { - struct.fktable_name = iprot.readString(); - struct.setFktable_nameIsSet(true); - } - if (incoming.get(5)) { - struct.fkcolumn_name = iprot.readString(); - struct.setFkcolumn_nameIsSet(true); - } - if (incoming.get(6)) { - struct.key_seq = iprot.readI32(); - struct.setKey_seqIsSet(true); - } - if (incoming.get(7)) { - struct.update_rule = iprot.readI32(); - struct.setUpdate_ruleIsSet(true); - } - if (incoming.get(8)) { - struct.delete_rule = iprot.readI32(); - struct.setDelete_ruleIsSet(true); - } - if (incoming.get(9)) { - struct.fk_name = iprot.readString(); - struct.setFk_nameIsSet(true); - } - if (incoming.get(10)) { - struct.pk_name = iprot.readString(); - struct.setPk_nameIsSet(true); - } - if (incoming.get(11)) { - struct.enable_cstr = iprot.readBool(); - struct.setEnable_cstrIsSet(true); - } - if (incoming.get(12)) { - struct.validate_cstr = iprot.readBool(); - struct.setValidate_cstrIsSet(true); - } - if (incoming.get(13)) { - struct.rely_cstr = iprot.readBool(); - struct.setRely_cstrIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLNotNullConstraint.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLNotNullConstraint.java deleted file mode 100644 index 01dbc68..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLNotNullConstraint.java +++ /dev/null @@ -1,1005 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class SQLNotNullConstraint implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SQLNotNullConstraint"); - - private static final org.apache.thrift.protocol.TField TABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("table_db", 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 org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField NN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("nn_name", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)5); - private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SQLNotNullConstraintStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SQLNotNullConstraintTupleSchemeFactory()); - } - - private String table_db; // required - private String table_name; // required - private String column_name; // required - private String nn_name; // required - private boolean enable_cstr; // required - private boolean validate_cstr; // required - private boolean rely_cstr; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TABLE_DB((short)1, "table_db"), - TABLE_NAME((short)2, "table_name"), - COLUMN_NAME((short)3, "column_name"), - NN_NAME((short)4, "nn_name"), - ENABLE_CSTR((short)5, "enable_cstr"), - VALIDATE_CSTR((short)6, "validate_cstr"), - RELY_CSTR((short)7, "rely_cstr"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TABLE_DB - return TABLE_DB; - case 2: // TABLE_NAME - return TABLE_NAME; - case 3: // COLUMN_NAME - return COLUMN_NAME; - case 4: // NN_NAME - return NN_NAME; - case 5: // ENABLE_CSTR - return ENABLE_CSTR; - case 6: // VALIDATE_CSTR - return VALIDATE_CSTR; - case 7: // RELY_CSTR - return RELY_CSTR; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ENABLE_CSTR_ISSET_ID = 0; - private static final int __VALIDATE_CSTR_ISSET_ID = 1; - private static final int __RELY_CSTR_ISSET_ID = 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); - tmpMap.put(_Fields.TABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("table_db", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("column_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NN_NAME, new org.apache.thrift.meta_data.FieldMetaData("nn_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ENABLE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("enable_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.VALIDATE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("validate_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.RELY_CSTR, new org.apache.thrift.meta_data.FieldMetaData("rely_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SQLNotNullConstraint.class, metaDataMap); - } - - public SQLNotNullConstraint() { - } - - public SQLNotNullConstraint( - String table_db, - String table_name, - String column_name, - String nn_name, - boolean enable_cstr, - boolean validate_cstr, - boolean rely_cstr) - { - this(); - this.table_db = table_db; - this.table_name = table_name; - this.column_name = column_name; - this.nn_name = nn_name; - this.enable_cstr = enable_cstr; - setEnable_cstrIsSet(true); - this.validate_cstr = validate_cstr; - setValidate_cstrIsSet(true); - this.rely_cstr = rely_cstr; - setRely_cstrIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public SQLNotNullConstraint(SQLNotNullConstraint other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetTable_db()) { - this.table_db = other.table_db; - } - if (other.isSetTable_name()) { - this.table_name = other.table_name; - } - if (other.isSetColumn_name()) { - this.column_name = other.column_name; - } - if (other.isSetNn_name()) { - this.nn_name = other.nn_name; - } - this.enable_cstr = other.enable_cstr; - this.validate_cstr = other.validate_cstr; - this.rely_cstr = other.rely_cstr; - } - - public SQLNotNullConstraint deepCopy() { - return new SQLNotNullConstraint(this); - } - - @Override - public void clear() { - this.table_db = null; - this.table_name = null; - this.column_name = null; - this.nn_name = null; - setEnable_cstrIsSet(false); - this.enable_cstr = false; - setValidate_cstrIsSet(false); - this.validate_cstr = false; - setRely_cstrIsSet(false); - this.rely_cstr = false; - } - - public String getTable_db() { - return this.table_db; - } - - public void setTable_db(String table_db) { - this.table_db = table_db; - } - - public void unsetTable_db() { - this.table_db = null; - } - - /** Returns true if field table_db is set (has been assigned a value) and false otherwise */ - public boolean isSetTable_db() { - return this.table_db != null; - } - - public void setTable_dbIsSet(boolean value) { - if (!value) { - this.table_db = null; - } - } - - public String getTable_name() { - return this.table_name; - } - - public void setTable_name(String table_name) { - this.table_name = table_name; - } - - public void unsetTable_name() { - this.table_name = null; - } - - /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTable_name() { - return this.table_name != null; - } - - public void setTable_nameIsSet(boolean value) { - if (!value) { - this.table_name = null; - } - } - - public String getColumn_name() { - return this.column_name; - } - - public void setColumn_name(String column_name) { - this.column_name = column_name; - } - - public void unsetColumn_name() { - this.column_name = null; - } - - /** Returns true if field column_name is set (has been assigned a value) and false otherwise */ - public boolean isSetColumn_name() { - return this.column_name != null; - } - - public void setColumn_nameIsSet(boolean value) { - if (!value) { - this.column_name = null; - } - } - - public String getNn_name() { - return this.nn_name; - } - - public void setNn_name(String nn_name) { - this.nn_name = nn_name; - } - - public void unsetNn_name() { - this.nn_name = null; - } - - /** Returns true if field nn_name is set (has been assigned a value) and false otherwise */ - public boolean isSetNn_name() { - return this.nn_name != null; - } - - public void setNn_nameIsSet(boolean value) { - if (!value) { - this.nn_name = null; - } - } - - public boolean isEnable_cstr() { - return this.enable_cstr; - } - - public void setEnable_cstr(boolean enable_cstr) { - this.enable_cstr = enable_cstr; - setEnable_cstrIsSet(true); - } - - public void unsetEnable_cstr() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); - } - - /** Returns true if field enable_cstr is set (has been assigned a value) and false otherwise */ - public boolean isSetEnable_cstr() { - return EncodingUtils.testBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); - } - - public void setEnable_cstrIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID, value); - } - - public boolean isValidate_cstr() { - return this.validate_cstr; - } - - public void setValidate_cstr(boolean validate_cstr) { - this.validate_cstr = validate_cstr; - setValidate_cstrIsSet(true); - } - - public void unsetValidate_cstr() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); - } - - /** Returns true if field validate_cstr is set (has been assigned a value) and false otherwise */ - public boolean isSetValidate_cstr() { - return EncodingUtils.testBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); - } - - public void setValidate_cstrIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID, value); - } - - public boolean isRely_cstr() { - return this.rely_cstr; - } - - public void setRely_cstr(boolean rely_cstr) { - this.rely_cstr = rely_cstr; - setRely_cstrIsSet(true); - } - - public void unsetRely_cstr() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); - } - - /** Returns true if field rely_cstr is set (has been assigned a value) and false otherwise */ - public boolean isSetRely_cstr() { - return EncodingUtils.testBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); - } - - public void setRely_cstrIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELY_CSTR_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TABLE_DB: - if (value == null) { - unsetTable_db(); - } else { - setTable_db((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTable_name(); - } else { - setTable_name((String)value); - } - break; - - case COLUMN_NAME: - if (value == null) { - unsetColumn_name(); - } else { - setColumn_name((String)value); - } - break; - - case NN_NAME: - if (value == null) { - unsetNn_name(); - } else { - setNn_name((String)value); - } - break; - - case ENABLE_CSTR: - if (value == null) { - unsetEnable_cstr(); - } else { - setEnable_cstr((Boolean)value); - } - break; - - case VALIDATE_CSTR: - if (value == null) { - unsetValidate_cstr(); - } else { - setValidate_cstr((Boolean)value); - } - break; - - case RELY_CSTR: - if (value == null) { - unsetRely_cstr(); - } else { - setRely_cstr((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TABLE_DB: - return getTable_db(); - - case TABLE_NAME: - return getTable_name(); - - case COLUMN_NAME: - return getColumn_name(); - - case NN_NAME: - return getNn_name(); - - case ENABLE_CSTR: - return isEnable_cstr(); - - case VALIDATE_CSTR: - return isValidate_cstr(); - - case RELY_CSTR: - return isRely_cstr(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TABLE_DB: - return isSetTable_db(); - case TABLE_NAME: - return isSetTable_name(); - case COLUMN_NAME: - return isSetColumn_name(); - case NN_NAME: - return isSetNn_name(); - case ENABLE_CSTR: - return isSetEnable_cstr(); - case VALIDATE_CSTR: - return isSetValidate_cstr(); - case RELY_CSTR: - return isSetRely_cstr(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof SQLNotNullConstraint) - return this.equals((SQLNotNullConstraint)that); - return false; - } - - public boolean equals(SQLNotNullConstraint that) { - if (that == null) - return false; - - boolean this_present_table_db = true && this.isSetTable_db(); - boolean that_present_table_db = true && that.isSetTable_db(); - if (this_present_table_db || that_present_table_db) { - if (!(this_present_table_db && that_present_table_db)) - return false; - if (!this.table_db.equals(that.table_db)) - return false; - } - - boolean this_present_table_name = true && this.isSetTable_name(); - boolean that_present_table_name = true && that.isSetTable_name(); - if (this_present_table_name || that_present_table_name) { - if (!(this_present_table_name && that_present_table_name)) - return false; - if (!this.table_name.equals(that.table_name)) - return false; - } - - boolean this_present_column_name = true && this.isSetColumn_name(); - boolean that_present_column_name = true && that.isSetColumn_name(); - if (this_present_column_name || that_present_column_name) { - if (!(this_present_column_name && that_present_column_name)) - return false; - if (!this.column_name.equals(that.column_name)) - return false; - } - - boolean this_present_nn_name = true && this.isSetNn_name(); - boolean that_present_nn_name = true && that.isSetNn_name(); - if (this_present_nn_name || that_present_nn_name) { - if (!(this_present_nn_name && that_present_nn_name)) - return false; - if (!this.nn_name.equals(that.nn_name)) - return false; - } - - boolean this_present_enable_cstr = true; - boolean that_present_enable_cstr = true; - if (this_present_enable_cstr || that_present_enable_cstr) { - if (!(this_present_enable_cstr && that_present_enable_cstr)) - return false; - if (this.enable_cstr != that.enable_cstr) - return false; - } - - boolean this_present_validate_cstr = true; - boolean that_present_validate_cstr = true; - if (this_present_validate_cstr || that_present_validate_cstr) { - if (!(this_present_validate_cstr && that_present_validate_cstr)) - return false; - if (this.validate_cstr != that.validate_cstr) - return false; - } - - boolean this_present_rely_cstr = true; - boolean that_present_rely_cstr = true; - if (this_present_rely_cstr || that_present_rely_cstr) { - if (!(this_present_rely_cstr && that_present_rely_cstr)) - return false; - if (this.rely_cstr != that.rely_cstr) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_table_db = true && (isSetTable_db()); - list.add(present_table_db); - if (present_table_db) - list.add(table_db); - - boolean present_table_name = true && (isSetTable_name()); - list.add(present_table_name); - if (present_table_name) - list.add(table_name); - - boolean present_column_name = true && (isSetColumn_name()); - list.add(present_column_name); - if (present_column_name) - list.add(column_name); - - boolean present_nn_name = true && (isSetNn_name()); - list.add(present_nn_name); - if (present_nn_name) - list.add(nn_name); - - boolean present_enable_cstr = true; - list.add(present_enable_cstr); - if (present_enable_cstr) - list.add(enable_cstr); - - boolean present_validate_cstr = true; - list.add(present_validate_cstr); - if (present_validate_cstr) - list.add(validate_cstr); - - boolean present_rely_cstr = true; - list.add(present_rely_cstr); - if (present_rely_cstr) - list.add(rely_cstr); - - return list.hashCode(); - } - - @Override - public int compareTo(SQLNotNullConstraint other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTable_db()).compareTo(other.isSetTable_db()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable_db()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_db, other.table_db); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetColumn_name()).compareTo(other.isSetColumn_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumn_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_name, other.column_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNn_name()).compareTo(other.isSetNn_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNn_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nn_name, other.nn_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnable_cstr()).compareTo(other.isSetEnable_cstr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnable_cstr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_cstr, other.enable_cstr); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetValidate_cstr()).compareTo(other.isSetValidate_cstr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValidate_cstr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validate_cstr, other.validate_cstr); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRely_cstr()).compareTo(other.isSetRely_cstr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRely_cstr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rely_cstr, other.rely_cstr); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("SQLNotNullConstraint("); - boolean first = true; - - sb.append("table_db:"); - if (this.table_db == null) { - sb.append("null"); - } else { - sb.append(this.table_db); - } - first = false; - if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { - sb.append("null"); - } else { - sb.append(this.table_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("column_name:"); - if (this.column_name == null) { - sb.append("null"); - } else { - sb.append(this.column_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("nn_name:"); - if (this.nn_name == null) { - sb.append("null"); - } else { - sb.append(this.nn_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("enable_cstr:"); - sb.append(this.enable_cstr); - first = false; - if (!first) sb.append(", "); - sb.append("validate_cstr:"); - sb.append(this.validate_cstr); - first = false; - if (!first) sb.append(", "); - sb.append("rely_cstr:"); - sb.append(this.rely_cstr); - 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 { - // 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 SQLNotNullConstraintStandardSchemeFactory implements SchemeFactory { - public SQLNotNullConstraintStandardScheme getScheme() { - return new SQLNotNullConstraintStandardScheme(); - } - } - - private static class SQLNotNullConstraintStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, SQLNotNullConstraint 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_DB - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table_db = iprot.readString(); - struct.setTable_dbIsSet(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; - case 3: // COLUMN_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.column_name = iprot.readString(); - struct.setColumn_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // NN_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.nn_name = iprot.readString(); - struct.setNn_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // ENABLE_CSTR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.enable_cstr = iprot.readBool(); - struct.setEnable_cstrIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // VALIDATE_CSTR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.validate_cstr = iprot.readBool(); - struct.setValidate_cstrIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // RELY_CSTR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.rely_cstr = iprot.readBool(); - struct.setRely_cstrIsSet(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, SQLNotNullConstraint struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.table_db != null) { - oprot.writeFieldBegin(TABLE_DB_FIELD_DESC); - oprot.writeString(struct.table_db); - oprot.writeFieldEnd(); - } - if (struct.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(struct.table_name); - oprot.writeFieldEnd(); - } - if (struct.column_name != null) { - oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); - oprot.writeString(struct.column_name); - oprot.writeFieldEnd(); - } - if (struct.nn_name != null) { - oprot.writeFieldBegin(NN_NAME_FIELD_DESC); - oprot.writeString(struct.nn_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ENABLE_CSTR_FIELD_DESC); - oprot.writeBool(struct.enable_cstr); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(VALIDATE_CSTR_FIELD_DESC); - oprot.writeBool(struct.validate_cstr); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(RELY_CSTR_FIELD_DESC); - oprot.writeBool(struct.rely_cstr); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class SQLNotNullConstraintTupleSchemeFactory implements SchemeFactory { - public SQLNotNullConstraintTupleScheme getScheme() { - return new SQLNotNullConstraintTupleScheme(); - } - } - - private static class SQLNotNullConstraintTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, SQLNotNullConstraint struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetTable_db()) { - optionals.set(0); - } - if (struct.isSetTable_name()) { - optionals.set(1); - } - if (struct.isSetColumn_name()) { - optionals.set(2); - } - if (struct.isSetNn_name()) { - optionals.set(3); - } - if (struct.isSetEnable_cstr()) { - optionals.set(4); - } - if (struct.isSetValidate_cstr()) { - optionals.set(5); - } - if (struct.isSetRely_cstr()) { - optionals.set(6); - } - oprot.writeBitSet(optionals, 7); - if (struct.isSetTable_db()) { - oprot.writeString(struct.table_db); - } - if (struct.isSetTable_name()) { - oprot.writeString(struct.table_name); - } - if (struct.isSetColumn_name()) { - oprot.writeString(struct.column_name); - } - if (struct.isSetNn_name()) { - oprot.writeString(struct.nn_name); - } - if (struct.isSetEnable_cstr()) { - oprot.writeBool(struct.enable_cstr); - } - if (struct.isSetValidate_cstr()) { - oprot.writeBool(struct.validate_cstr); - } - if (struct.isSetRely_cstr()) { - oprot.writeBool(struct.rely_cstr); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, SQLNotNullConstraint struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(7); - if (incoming.get(0)) { - struct.table_db = iprot.readString(); - struct.setTable_dbIsSet(true); - } - if (incoming.get(1)) { - struct.table_name = iprot.readString(); - struct.setTable_nameIsSet(true); - } - if (incoming.get(2)) { - struct.column_name = iprot.readString(); - struct.setColumn_nameIsSet(true); - } - if (incoming.get(3)) { - struct.nn_name = iprot.readString(); - struct.setNn_nameIsSet(true); - } - if (incoming.get(4)) { - struct.enable_cstr = iprot.readBool(); - struct.setEnable_cstrIsSet(true); - } - if (incoming.get(5)) { - struct.validate_cstr = iprot.readBool(); - struct.setValidate_cstrIsSet(true); - } - if (incoming.get(6)) { - struct.rely_cstr = iprot.readBool(); - struct.setRely_cstrIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLPrimaryKey.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLPrimaryKey.java deleted file mode 100644 index 546528c..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLPrimaryKey.java +++ /dev/null @@ -1,1103 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class SQLPrimaryKey implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SQLPrimaryKey"); - - private static final org.apache.thrift.protocol.TField TABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("table_db", 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 org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField KEY_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("key_seq", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField PK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pk_name", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); - private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)8); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SQLPrimaryKeyStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SQLPrimaryKeyTupleSchemeFactory()); - } - - private String table_db; // required - private String table_name; // required - private String column_name; // required - private int key_seq; // required - private String pk_name; // required - private boolean enable_cstr; // required - private boolean validate_cstr; // required - private boolean rely_cstr; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TABLE_DB((short)1, "table_db"), - TABLE_NAME((short)2, "table_name"), - COLUMN_NAME((short)3, "column_name"), - KEY_SEQ((short)4, "key_seq"), - PK_NAME((short)5, "pk_name"), - ENABLE_CSTR((short)6, "enable_cstr"), - VALIDATE_CSTR((short)7, "validate_cstr"), - RELY_CSTR((short)8, "rely_cstr"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TABLE_DB - return TABLE_DB; - case 2: // TABLE_NAME - return TABLE_NAME; - case 3: // COLUMN_NAME - return COLUMN_NAME; - case 4: // KEY_SEQ - return KEY_SEQ; - case 5: // PK_NAME - return PK_NAME; - case 6: // ENABLE_CSTR - return ENABLE_CSTR; - case 7: // VALIDATE_CSTR - return VALIDATE_CSTR; - case 8: // RELY_CSTR - return RELY_CSTR; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __KEY_SEQ_ISSET_ID = 0; - private static final int __ENABLE_CSTR_ISSET_ID = 1; - private static final int __VALIDATE_CSTR_ISSET_ID = 2; - private static final int __RELY_CSTR_ISSET_ID = 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); - tmpMap.put(_Fields.TABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("table_db", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("column_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.KEY_SEQ, new org.apache.thrift.meta_data.FieldMetaData("key_seq", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.PK_NAME, new org.apache.thrift.meta_data.FieldMetaData("pk_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ENABLE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("enable_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.VALIDATE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("validate_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.RELY_CSTR, new org.apache.thrift.meta_data.FieldMetaData("rely_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SQLPrimaryKey.class, metaDataMap); - } - - public SQLPrimaryKey() { - } - - public SQLPrimaryKey( - String table_db, - String table_name, - String column_name, - int key_seq, - String pk_name, - boolean enable_cstr, - boolean validate_cstr, - boolean rely_cstr) - { - this(); - this.table_db = table_db; - this.table_name = table_name; - this.column_name = column_name; - this.key_seq = key_seq; - setKey_seqIsSet(true); - this.pk_name = pk_name; - this.enable_cstr = enable_cstr; - setEnable_cstrIsSet(true); - this.validate_cstr = validate_cstr; - setValidate_cstrIsSet(true); - this.rely_cstr = rely_cstr; - setRely_cstrIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public SQLPrimaryKey(SQLPrimaryKey other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetTable_db()) { - this.table_db = other.table_db; - } - if (other.isSetTable_name()) { - this.table_name = other.table_name; - } - if (other.isSetColumn_name()) { - this.column_name = other.column_name; - } - this.key_seq = other.key_seq; - if (other.isSetPk_name()) { - this.pk_name = other.pk_name; - } - this.enable_cstr = other.enable_cstr; - this.validate_cstr = other.validate_cstr; - this.rely_cstr = other.rely_cstr; - } - - public SQLPrimaryKey deepCopy() { - return new SQLPrimaryKey(this); - } - - @Override - public void clear() { - this.table_db = null; - this.table_name = null; - this.column_name = null; - setKey_seqIsSet(false); - this.key_seq = 0; - this.pk_name = null; - setEnable_cstrIsSet(false); - this.enable_cstr = false; - setValidate_cstrIsSet(false); - this.validate_cstr = false; - setRely_cstrIsSet(false); - this.rely_cstr = false; - } - - public String getTable_db() { - return this.table_db; - } - - public void setTable_db(String table_db) { - this.table_db = table_db; - } - - public void unsetTable_db() { - this.table_db = null; - } - - /** Returns true if field table_db is set (has been assigned a value) and false otherwise */ - public boolean isSetTable_db() { - return this.table_db != null; - } - - public void setTable_dbIsSet(boolean value) { - if (!value) { - this.table_db = null; - } - } - - public String getTable_name() { - return this.table_name; - } - - public void setTable_name(String table_name) { - this.table_name = table_name; - } - - public void unsetTable_name() { - this.table_name = null; - } - - /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTable_name() { - return this.table_name != null; - } - - public void setTable_nameIsSet(boolean value) { - if (!value) { - this.table_name = null; - } - } - - public String getColumn_name() { - return this.column_name; - } - - public void setColumn_name(String column_name) { - this.column_name = column_name; - } - - public void unsetColumn_name() { - this.column_name = null; - } - - /** Returns true if field column_name is set (has been assigned a value) and false otherwise */ - public boolean isSetColumn_name() { - return this.column_name != null; - } - - public void setColumn_nameIsSet(boolean value) { - if (!value) { - this.column_name = null; - } - } - - public int getKey_seq() { - return this.key_seq; - } - - public void setKey_seq(int key_seq) { - this.key_seq = key_seq; - setKey_seqIsSet(true); - } - - public void unsetKey_seq() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); - } - - /** Returns true if field key_seq is set (has been assigned a value) and false otherwise */ - public boolean isSetKey_seq() { - return EncodingUtils.testBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); - } - - public void setKey_seqIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEY_SEQ_ISSET_ID, value); - } - - public String getPk_name() { - return this.pk_name; - } - - public void setPk_name(String pk_name) { - this.pk_name = pk_name; - } - - public void unsetPk_name() { - this.pk_name = null; - } - - /** Returns true if field pk_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPk_name() { - return this.pk_name != null; - } - - public void setPk_nameIsSet(boolean value) { - if (!value) { - this.pk_name = null; - } - } - - public boolean isEnable_cstr() { - return this.enable_cstr; - } - - public void setEnable_cstr(boolean enable_cstr) { - this.enable_cstr = enable_cstr; - setEnable_cstrIsSet(true); - } - - public void unsetEnable_cstr() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); - } - - /** Returns true if field enable_cstr is set (has been assigned a value) and false otherwise */ - public boolean isSetEnable_cstr() { - return EncodingUtils.testBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); - } - - public void setEnable_cstrIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID, value); - } - - public boolean isValidate_cstr() { - return this.validate_cstr; - } - - public void setValidate_cstr(boolean validate_cstr) { - this.validate_cstr = validate_cstr; - setValidate_cstrIsSet(true); - } - - public void unsetValidate_cstr() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); - } - - /** Returns true if field validate_cstr is set (has been assigned a value) and false otherwise */ - public boolean isSetValidate_cstr() { - return EncodingUtils.testBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); - } - - public void setValidate_cstrIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID, value); - } - - public boolean isRely_cstr() { - return this.rely_cstr; - } - - public void setRely_cstr(boolean rely_cstr) { - this.rely_cstr = rely_cstr; - setRely_cstrIsSet(true); - } - - public void unsetRely_cstr() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); - } - - /** Returns true if field rely_cstr is set (has been assigned a value) and false otherwise */ - public boolean isSetRely_cstr() { - return EncodingUtils.testBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); - } - - public void setRely_cstrIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELY_CSTR_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TABLE_DB: - if (value == null) { - unsetTable_db(); - } else { - setTable_db((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTable_name(); - } else { - setTable_name((String)value); - } - break; - - case COLUMN_NAME: - if (value == null) { - unsetColumn_name(); - } else { - setColumn_name((String)value); - } - break; - - case KEY_SEQ: - if (value == null) { - unsetKey_seq(); - } else { - setKey_seq((Integer)value); - } - break; - - case PK_NAME: - if (value == null) { - unsetPk_name(); - } else { - setPk_name((String)value); - } - break; - - case ENABLE_CSTR: - if (value == null) { - unsetEnable_cstr(); - } else { - setEnable_cstr((Boolean)value); - } - break; - - case VALIDATE_CSTR: - if (value == null) { - unsetValidate_cstr(); - } else { - setValidate_cstr((Boolean)value); - } - break; - - case RELY_CSTR: - if (value == null) { - unsetRely_cstr(); - } else { - setRely_cstr((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TABLE_DB: - return getTable_db(); - - case TABLE_NAME: - return getTable_name(); - - case COLUMN_NAME: - return getColumn_name(); - - case KEY_SEQ: - return getKey_seq(); - - case PK_NAME: - return getPk_name(); - - case ENABLE_CSTR: - return isEnable_cstr(); - - case VALIDATE_CSTR: - return isValidate_cstr(); - - case RELY_CSTR: - return isRely_cstr(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TABLE_DB: - return isSetTable_db(); - case TABLE_NAME: - return isSetTable_name(); - case COLUMN_NAME: - return isSetColumn_name(); - case KEY_SEQ: - return isSetKey_seq(); - case PK_NAME: - return isSetPk_name(); - case ENABLE_CSTR: - return isSetEnable_cstr(); - case VALIDATE_CSTR: - return isSetValidate_cstr(); - case RELY_CSTR: - return isSetRely_cstr(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof SQLPrimaryKey) - return this.equals((SQLPrimaryKey)that); - return false; - } - - public boolean equals(SQLPrimaryKey that) { - if (that == null) - return false; - - boolean this_present_table_db = true && this.isSetTable_db(); - boolean that_present_table_db = true && that.isSetTable_db(); - if (this_present_table_db || that_present_table_db) { - if (!(this_present_table_db && that_present_table_db)) - return false; - if (!this.table_db.equals(that.table_db)) - return false; - } - - boolean this_present_table_name = true && this.isSetTable_name(); - boolean that_present_table_name = true && that.isSetTable_name(); - if (this_present_table_name || that_present_table_name) { - if (!(this_present_table_name && that_present_table_name)) - return false; - if (!this.table_name.equals(that.table_name)) - return false; - } - - boolean this_present_column_name = true && this.isSetColumn_name(); - boolean that_present_column_name = true && that.isSetColumn_name(); - if (this_present_column_name || that_present_column_name) { - if (!(this_present_column_name && that_present_column_name)) - return false; - if (!this.column_name.equals(that.column_name)) - return false; - } - - boolean this_present_key_seq = true; - boolean that_present_key_seq = true; - if (this_present_key_seq || that_present_key_seq) { - if (!(this_present_key_seq && that_present_key_seq)) - return false; - if (this.key_seq != that.key_seq) - return false; - } - - boolean this_present_pk_name = true && this.isSetPk_name(); - boolean that_present_pk_name = true && that.isSetPk_name(); - if (this_present_pk_name || that_present_pk_name) { - if (!(this_present_pk_name && that_present_pk_name)) - return false; - if (!this.pk_name.equals(that.pk_name)) - return false; - } - - boolean this_present_enable_cstr = true; - boolean that_present_enable_cstr = true; - if (this_present_enable_cstr || that_present_enable_cstr) { - if (!(this_present_enable_cstr && that_present_enable_cstr)) - return false; - if (this.enable_cstr != that.enable_cstr) - return false; - } - - boolean this_present_validate_cstr = true; - boolean that_present_validate_cstr = true; - if (this_present_validate_cstr || that_present_validate_cstr) { - if (!(this_present_validate_cstr && that_present_validate_cstr)) - return false; - if (this.validate_cstr != that.validate_cstr) - return false; - } - - boolean this_present_rely_cstr = true; - boolean that_present_rely_cstr = true; - if (this_present_rely_cstr || that_present_rely_cstr) { - if (!(this_present_rely_cstr && that_present_rely_cstr)) - return false; - if (this.rely_cstr != that.rely_cstr) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_table_db = true && (isSetTable_db()); - list.add(present_table_db); - if (present_table_db) - list.add(table_db); - - boolean present_table_name = true && (isSetTable_name()); - list.add(present_table_name); - if (present_table_name) - list.add(table_name); - - boolean present_column_name = true && (isSetColumn_name()); - list.add(present_column_name); - if (present_column_name) - list.add(column_name); - - boolean present_key_seq = true; - list.add(present_key_seq); - if (present_key_seq) - list.add(key_seq); - - boolean present_pk_name = true && (isSetPk_name()); - list.add(present_pk_name); - if (present_pk_name) - list.add(pk_name); - - boolean present_enable_cstr = true; - list.add(present_enable_cstr); - if (present_enable_cstr) - list.add(enable_cstr); - - boolean present_validate_cstr = true; - list.add(present_validate_cstr); - if (present_validate_cstr) - list.add(validate_cstr); - - boolean present_rely_cstr = true; - list.add(present_rely_cstr); - if (present_rely_cstr) - list.add(rely_cstr); - - return list.hashCode(); - } - - @Override - public int compareTo(SQLPrimaryKey other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTable_db()).compareTo(other.isSetTable_db()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable_db()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_db, other.table_db); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetColumn_name()).compareTo(other.isSetColumn_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumn_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_name, other.column_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetKey_seq()).compareTo(other.isSetKey_seq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKey_seq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_seq, other.key_seq); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPk_name()).compareTo(other.isSetPk_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPk_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pk_name, other.pk_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnable_cstr()).compareTo(other.isSetEnable_cstr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnable_cstr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_cstr, other.enable_cstr); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetValidate_cstr()).compareTo(other.isSetValidate_cstr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValidate_cstr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validate_cstr, other.validate_cstr); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRely_cstr()).compareTo(other.isSetRely_cstr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRely_cstr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rely_cstr, other.rely_cstr); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("SQLPrimaryKey("); - boolean first = true; - - sb.append("table_db:"); - if (this.table_db == null) { - sb.append("null"); - } else { - sb.append(this.table_db); - } - first = false; - if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { - sb.append("null"); - } else { - sb.append(this.table_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("column_name:"); - if (this.column_name == null) { - sb.append("null"); - } else { - sb.append(this.column_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("key_seq:"); - sb.append(this.key_seq); - first = false; - if (!first) sb.append(", "); - sb.append("pk_name:"); - if (this.pk_name == null) { - sb.append("null"); - } else { - sb.append(this.pk_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("enable_cstr:"); - sb.append(this.enable_cstr); - first = false; - if (!first) sb.append(", "); - sb.append("validate_cstr:"); - sb.append(this.validate_cstr); - first = false; - if (!first) sb.append(", "); - sb.append("rely_cstr:"); - sb.append(this.rely_cstr); - 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 { - // 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 SQLPrimaryKeyStandardSchemeFactory implements SchemeFactory { - public SQLPrimaryKeyStandardScheme getScheme() { - return new SQLPrimaryKeyStandardScheme(); - } - } - - private static class SQLPrimaryKeyStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, SQLPrimaryKey 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_DB - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table_db = iprot.readString(); - struct.setTable_dbIsSet(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; - case 3: // COLUMN_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.column_name = iprot.readString(); - struct.setColumn_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // KEY_SEQ - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.key_seq = iprot.readI32(); - struct.setKey_seqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // PK_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.pk_name = iprot.readString(); - struct.setPk_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // ENABLE_CSTR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.enable_cstr = iprot.readBool(); - struct.setEnable_cstrIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // VALIDATE_CSTR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.validate_cstr = iprot.readBool(); - struct.setValidate_cstrIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // RELY_CSTR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.rely_cstr = iprot.readBool(); - struct.setRely_cstrIsSet(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, SQLPrimaryKey struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.table_db != null) { - oprot.writeFieldBegin(TABLE_DB_FIELD_DESC); - oprot.writeString(struct.table_db); - oprot.writeFieldEnd(); - } - if (struct.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(struct.table_name); - oprot.writeFieldEnd(); - } - if (struct.column_name != null) { - oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); - oprot.writeString(struct.column_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(KEY_SEQ_FIELD_DESC); - oprot.writeI32(struct.key_seq); - oprot.writeFieldEnd(); - if (struct.pk_name != null) { - oprot.writeFieldBegin(PK_NAME_FIELD_DESC); - oprot.writeString(struct.pk_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ENABLE_CSTR_FIELD_DESC); - oprot.writeBool(struct.enable_cstr); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(VALIDATE_CSTR_FIELD_DESC); - oprot.writeBool(struct.validate_cstr); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(RELY_CSTR_FIELD_DESC); - oprot.writeBool(struct.rely_cstr); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class SQLPrimaryKeyTupleSchemeFactory implements SchemeFactory { - public SQLPrimaryKeyTupleScheme getScheme() { - return new SQLPrimaryKeyTupleScheme(); - } - } - - private static class SQLPrimaryKeyTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, SQLPrimaryKey struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetTable_db()) { - optionals.set(0); - } - if (struct.isSetTable_name()) { - optionals.set(1); - } - if (struct.isSetColumn_name()) { - optionals.set(2); - } - if (struct.isSetKey_seq()) { - optionals.set(3); - } - if (struct.isSetPk_name()) { - optionals.set(4); - } - if (struct.isSetEnable_cstr()) { - optionals.set(5); - } - if (struct.isSetValidate_cstr()) { - optionals.set(6); - } - if (struct.isSetRely_cstr()) { - optionals.set(7); - } - oprot.writeBitSet(optionals, 8); - if (struct.isSetTable_db()) { - oprot.writeString(struct.table_db); - } - if (struct.isSetTable_name()) { - oprot.writeString(struct.table_name); - } - if (struct.isSetColumn_name()) { - oprot.writeString(struct.column_name); - } - if (struct.isSetKey_seq()) { - oprot.writeI32(struct.key_seq); - } - if (struct.isSetPk_name()) { - oprot.writeString(struct.pk_name); - } - if (struct.isSetEnable_cstr()) { - oprot.writeBool(struct.enable_cstr); - } - if (struct.isSetValidate_cstr()) { - oprot.writeBool(struct.validate_cstr); - } - if (struct.isSetRely_cstr()) { - oprot.writeBool(struct.rely_cstr); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, SQLPrimaryKey struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(8); - if (incoming.get(0)) { - struct.table_db = iprot.readString(); - struct.setTable_dbIsSet(true); - } - if (incoming.get(1)) { - struct.table_name = iprot.readString(); - struct.setTable_nameIsSet(true); - } - if (incoming.get(2)) { - struct.column_name = iprot.readString(); - struct.setColumn_nameIsSet(true); - } - if (incoming.get(3)) { - struct.key_seq = iprot.readI32(); - struct.setKey_seqIsSet(true); - } - if (incoming.get(4)) { - struct.pk_name = iprot.readString(); - struct.setPk_nameIsSet(true); - } - if (incoming.get(5)) { - struct.enable_cstr = iprot.readBool(); - struct.setEnable_cstrIsSet(true); - } - if (incoming.get(6)) { - struct.validate_cstr = iprot.readBool(); - struct.setValidate_cstrIsSet(true); - } - if (incoming.get(7)) { - struct.rely_cstr = iprot.readBool(); - struct.setRely_cstrIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLUniqueConstraint.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLUniqueConstraint.java deleted file mode 100644 index 5b78613..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLUniqueConstraint.java +++ /dev/null @@ -1,1103 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class SQLUniqueConstraint implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SQLUniqueConstraint"); - - private static final org.apache.thrift.protocol.TField TABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("table_db", 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 org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField KEY_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("key_seq", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField UK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("uk_name", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); - private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)8); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SQLUniqueConstraintStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SQLUniqueConstraintTupleSchemeFactory()); - } - - private String table_db; // required - private String table_name; // required - private String column_name; // required - private int key_seq; // required - private String uk_name; // required - private boolean enable_cstr; // required - private boolean validate_cstr; // required - private boolean rely_cstr; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TABLE_DB((short)1, "table_db"), - TABLE_NAME((short)2, "table_name"), - COLUMN_NAME((short)3, "column_name"), - KEY_SEQ((short)4, "key_seq"), - UK_NAME((short)5, "uk_name"), - ENABLE_CSTR((short)6, "enable_cstr"), - VALIDATE_CSTR((short)7, "validate_cstr"), - RELY_CSTR((short)8, "rely_cstr"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TABLE_DB - return TABLE_DB; - case 2: // TABLE_NAME - return TABLE_NAME; - case 3: // COLUMN_NAME - return COLUMN_NAME; - case 4: // KEY_SEQ - return KEY_SEQ; - case 5: // UK_NAME - return UK_NAME; - case 6: // ENABLE_CSTR - return ENABLE_CSTR; - case 7: // VALIDATE_CSTR - return VALIDATE_CSTR; - case 8: // RELY_CSTR - return RELY_CSTR; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __KEY_SEQ_ISSET_ID = 0; - private static final int __ENABLE_CSTR_ISSET_ID = 1; - private static final int __VALIDATE_CSTR_ISSET_ID = 2; - private static final int __RELY_CSTR_ISSET_ID = 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); - tmpMap.put(_Fields.TABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("table_db", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("column_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.KEY_SEQ, new org.apache.thrift.meta_data.FieldMetaData("key_seq", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.UK_NAME, new org.apache.thrift.meta_data.FieldMetaData("uk_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ENABLE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("enable_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.VALIDATE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("validate_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.RELY_CSTR, new org.apache.thrift.meta_data.FieldMetaData("rely_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SQLUniqueConstraint.class, metaDataMap); - } - - public SQLUniqueConstraint() { - } - - public SQLUniqueConstraint( - String table_db, - String table_name, - String column_name, - int key_seq, - String uk_name, - boolean enable_cstr, - boolean validate_cstr, - boolean rely_cstr) - { - this(); - this.table_db = table_db; - this.table_name = table_name; - this.column_name = column_name; - this.key_seq = key_seq; - setKey_seqIsSet(true); - this.uk_name = uk_name; - this.enable_cstr = enable_cstr; - setEnable_cstrIsSet(true); - this.validate_cstr = validate_cstr; - setValidate_cstrIsSet(true); - this.rely_cstr = rely_cstr; - setRely_cstrIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public SQLUniqueConstraint(SQLUniqueConstraint other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetTable_db()) { - this.table_db = other.table_db; - } - if (other.isSetTable_name()) { - this.table_name = other.table_name; - } - if (other.isSetColumn_name()) { - this.column_name = other.column_name; - } - this.key_seq = other.key_seq; - if (other.isSetUk_name()) { - this.uk_name = other.uk_name; - } - this.enable_cstr = other.enable_cstr; - this.validate_cstr = other.validate_cstr; - this.rely_cstr = other.rely_cstr; - } - - public SQLUniqueConstraint deepCopy() { - return new SQLUniqueConstraint(this); - } - - @Override - public void clear() { - this.table_db = null; - this.table_name = null; - this.column_name = null; - setKey_seqIsSet(false); - this.key_seq = 0; - this.uk_name = null; - setEnable_cstrIsSet(false); - this.enable_cstr = false; - setValidate_cstrIsSet(false); - this.validate_cstr = false; - setRely_cstrIsSet(false); - this.rely_cstr = false; - } - - public String getTable_db() { - return this.table_db; - } - - public void setTable_db(String table_db) { - this.table_db = table_db; - } - - public void unsetTable_db() { - this.table_db = null; - } - - /** Returns true if field table_db is set (has been assigned a value) and false otherwise */ - public boolean isSetTable_db() { - return this.table_db != null; - } - - public void setTable_dbIsSet(boolean value) { - if (!value) { - this.table_db = null; - } - } - - public String getTable_name() { - return this.table_name; - } - - public void setTable_name(String table_name) { - this.table_name = table_name; - } - - public void unsetTable_name() { - this.table_name = null; - } - - /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTable_name() { - return this.table_name != null; - } - - public void setTable_nameIsSet(boolean value) { - if (!value) { - this.table_name = null; - } - } - - public String getColumn_name() { - return this.column_name; - } - - public void setColumn_name(String column_name) { - this.column_name = column_name; - } - - public void unsetColumn_name() { - this.column_name = null; - } - - /** Returns true if field column_name is set (has been assigned a value) and false otherwise */ - public boolean isSetColumn_name() { - return this.column_name != null; - } - - public void setColumn_nameIsSet(boolean value) { - if (!value) { - this.column_name = null; - } - } - - public int getKey_seq() { - return this.key_seq; - } - - public void setKey_seq(int key_seq) { - this.key_seq = key_seq; - setKey_seqIsSet(true); - } - - public void unsetKey_seq() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); - } - - /** Returns true if field key_seq is set (has been assigned a value) and false otherwise */ - public boolean isSetKey_seq() { - return EncodingUtils.testBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); - } - - public void setKey_seqIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEY_SEQ_ISSET_ID, value); - } - - public String getUk_name() { - return this.uk_name; - } - - public void setUk_name(String uk_name) { - this.uk_name = uk_name; - } - - public void unsetUk_name() { - this.uk_name = null; - } - - /** Returns true if field uk_name is set (has been assigned a value) and false otherwise */ - public boolean isSetUk_name() { - return this.uk_name != null; - } - - public void setUk_nameIsSet(boolean value) { - if (!value) { - this.uk_name = null; - } - } - - public boolean isEnable_cstr() { - return this.enable_cstr; - } - - public void setEnable_cstr(boolean enable_cstr) { - this.enable_cstr = enable_cstr; - setEnable_cstrIsSet(true); - } - - public void unsetEnable_cstr() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); - } - - /** Returns true if field enable_cstr is set (has been assigned a value) and false otherwise */ - public boolean isSetEnable_cstr() { - return EncodingUtils.testBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); - } - - public void setEnable_cstrIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID, value); - } - - public boolean isValidate_cstr() { - return this.validate_cstr; - } - - public void setValidate_cstr(boolean validate_cstr) { - this.validate_cstr = validate_cstr; - setValidate_cstrIsSet(true); - } - - public void unsetValidate_cstr() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); - } - - /** Returns true if field validate_cstr is set (has been assigned a value) and false otherwise */ - public boolean isSetValidate_cstr() { - return EncodingUtils.testBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); - } - - public void setValidate_cstrIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID, value); - } - - public boolean isRely_cstr() { - return this.rely_cstr; - } - - public void setRely_cstr(boolean rely_cstr) { - this.rely_cstr = rely_cstr; - setRely_cstrIsSet(true); - } - - public void unsetRely_cstr() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); - } - - /** Returns true if field rely_cstr is set (has been assigned a value) and false otherwise */ - public boolean isSetRely_cstr() { - return EncodingUtils.testBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); - } - - public void setRely_cstrIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELY_CSTR_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TABLE_DB: - if (value == null) { - unsetTable_db(); - } else { - setTable_db((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTable_name(); - } else { - setTable_name((String)value); - } - break; - - case COLUMN_NAME: - if (value == null) { - unsetColumn_name(); - } else { - setColumn_name((String)value); - } - break; - - case KEY_SEQ: - if (value == null) { - unsetKey_seq(); - } else { - setKey_seq((Integer)value); - } - break; - - case UK_NAME: - if (value == null) { - unsetUk_name(); - } else { - setUk_name((String)value); - } - break; - - case ENABLE_CSTR: - if (value == null) { - unsetEnable_cstr(); - } else { - setEnable_cstr((Boolean)value); - } - break; - - case VALIDATE_CSTR: - if (value == null) { - unsetValidate_cstr(); - } else { - setValidate_cstr((Boolean)value); - } - break; - - case RELY_CSTR: - if (value == null) { - unsetRely_cstr(); - } else { - setRely_cstr((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TABLE_DB: - return getTable_db(); - - case TABLE_NAME: - return getTable_name(); - - case COLUMN_NAME: - return getColumn_name(); - - case KEY_SEQ: - return getKey_seq(); - - case UK_NAME: - return getUk_name(); - - case ENABLE_CSTR: - return isEnable_cstr(); - - case VALIDATE_CSTR: - return isValidate_cstr(); - - case RELY_CSTR: - return isRely_cstr(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TABLE_DB: - return isSetTable_db(); - case TABLE_NAME: - return isSetTable_name(); - case COLUMN_NAME: - return isSetColumn_name(); - case KEY_SEQ: - return isSetKey_seq(); - case UK_NAME: - return isSetUk_name(); - case ENABLE_CSTR: - return isSetEnable_cstr(); - case VALIDATE_CSTR: - return isSetValidate_cstr(); - case RELY_CSTR: - return isSetRely_cstr(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof SQLUniqueConstraint) - return this.equals((SQLUniqueConstraint)that); - return false; - } - - public boolean equals(SQLUniqueConstraint that) { - if (that == null) - return false; - - boolean this_present_table_db = true && this.isSetTable_db(); - boolean that_present_table_db = true && that.isSetTable_db(); - if (this_present_table_db || that_present_table_db) { - if (!(this_present_table_db && that_present_table_db)) - return false; - if (!this.table_db.equals(that.table_db)) - return false; - } - - boolean this_present_table_name = true && this.isSetTable_name(); - boolean that_present_table_name = true && that.isSetTable_name(); - if (this_present_table_name || that_present_table_name) { - if (!(this_present_table_name && that_present_table_name)) - return false; - if (!this.table_name.equals(that.table_name)) - return false; - } - - boolean this_present_column_name = true && this.isSetColumn_name(); - boolean that_present_column_name = true && that.isSetColumn_name(); - if (this_present_column_name || that_present_column_name) { - if (!(this_present_column_name && that_present_column_name)) - return false; - if (!this.column_name.equals(that.column_name)) - return false; - } - - boolean this_present_key_seq = true; - boolean that_present_key_seq = true; - if (this_present_key_seq || that_present_key_seq) { - if (!(this_present_key_seq && that_present_key_seq)) - return false; - if (this.key_seq != that.key_seq) - return false; - } - - boolean this_present_uk_name = true && this.isSetUk_name(); - boolean that_present_uk_name = true && that.isSetUk_name(); - if (this_present_uk_name || that_present_uk_name) { - if (!(this_present_uk_name && that_present_uk_name)) - return false; - if (!this.uk_name.equals(that.uk_name)) - return false; - } - - boolean this_present_enable_cstr = true; - boolean that_present_enable_cstr = true; - if (this_present_enable_cstr || that_present_enable_cstr) { - if (!(this_present_enable_cstr && that_present_enable_cstr)) - return false; - if (this.enable_cstr != that.enable_cstr) - return false; - } - - boolean this_present_validate_cstr = true; - boolean that_present_validate_cstr = true; - if (this_present_validate_cstr || that_present_validate_cstr) { - if (!(this_present_validate_cstr && that_present_validate_cstr)) - return false; - if (this.validate_cstr != that.validate_cstr) - return false; - } - - boolean this_present_rely_cstr = true; - boolean that_present_rely_cstr = true; - if (this_present_rely_cstr || that_present_rely_cstr) { - if (!(this_present_rely_cstr && that_present_rely_cstr)) - return false; - if (this.rely_cstr != that.rely_cstr) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_table_db = true && (isSetTable_db()); - list.add(present_table_db); - if (present_table_db) - list.add(table_db); - - boolean present_table_name = true && (isSetTable_name()); - list.add(present_table_name); - if (present_table_name) - list.add(table_name); - - boolean present_column_name = true && (isSetColumn_name()); - list.add(present_column_name); - if (present_column_name) - list.add(column_name); - - boolean present_key_seq = true; - list.add(present_key_seq); - if (present_key_seq) - list.add(key_seq); - - boolean present_uk_name = true && (isSetUk_name()); - list.add(present_uk_name); - if (present_uk_name) - list.add(uk_name); - - boolean present_enable_cstr = true; - list.add(present_enable_cstr); - if (present_enable_cstr) - list.add(enable_cstr); - - boolean present_validate_cstr = true; - list.add(present_validate_cstr); - if (present_validate_cstr) - list.add(validate_cstr); - - boolean present_rely_cstr = true; - list.add(present_rely_cstr); - if (present_rely_cstr) - list.add(rely_cstr); - - return list.hashCode(); - } - - @Override - public int compareTo(SQLUniqueConstraint other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTable_db()).compareTo(other.isSetTable_db()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable_db()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_db, other.table_db); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetColumn_name()).compareTo(other.isSetColumn_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColumn_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_name, other.column_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetKey_seq()).compareTo(other.isSetKey_seq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKey_seq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_seq, other.key_seq); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUk_name()).compareTo(other.isSetUk_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUk_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uk_name, other.uk_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnable_cstr()).compareTo(other.isSetEnable_cstr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnable_cstr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_cstr, other.enable_cstr); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetValidate_cstr()).compareTo(other.isSetValidate_cstr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValidate_cstr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validate_cstr, other.validate_cstr); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRely_cstr()).compareTo(other.isSetRely_cstr()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRely_cstr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rely_cstr, other.rely_cstr); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("SQLUniqueConstraint("); - boolean first = true; - - sb.append("table_db:"); - if (this.table_db == null) { - sb.append("null"); - } else { - sb.append(this.table_db); - } - first = false; - if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { - sb.append("null"); - } else { - sb.append(this.table_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("column_name:"); - if (this.column_name == null) { - sb.append("null"); - } else { - sb.append(this.column_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("key_seq:"); - sb.append(this.key_seq); - first = false; - if (!first) sb.append(", "); - sb.append("uk_name:"); - if (this.uk_name == null) { - sb.append("null"); - } else { - sb.append(this.uk_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("enable_cstr:"); - sb.append(this.enable_cstr); - first = false; - if (!first) sb.append(", "); - sb.append("validate_cstr:"); - sb.append(this.validate_cstr); - first = false; - if (!first) sb.append(", "); - sb.append("rely_cstr:"); - sb.append(this.rely_cstr); - 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 { - // 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 SQLUniqueConstraintStandardSchemeFactory implements SchemeFactory { - public SQLUniqueConstraintStandardScheme getScheme() { - return new SQLUniqueConstraintStandardScheme(); - } - } - - private static class SQLUniqueConstraintStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, SQLUniqueConstraint 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_DB - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.table_db = iprot.readString(); - struct.setTable_dbIsSet(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; - case 3: // COLUMN_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.column_name = iprot.readString(); - struct.setColumn_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // KEY_SEQ - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.key_seq = iprot.readI32(); - struct.setKey_seqIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // UK_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.uk_name = iprot.readString(); - struct.setUk_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // ENABLE_CSTR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.enable_cstr = iprot.readBool(); - struct.setEnable_cstrIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // VALIDATE_CSTR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.validate_cstr = iprot.readBool(); - struct.setValidate_cstrIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // RELY_CSTR - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.rely_cstr = iprot.readBool(); - struct.setRely_cstrIsSet(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, SQLUniqueConstraint struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.table_db != null) { - oprot.writeFieldBegin(TABLE_DB_FIELD_DESC); - oprot.writeString(struct.table_db); - oprot.writeFieldEnd(); - } - if (struct.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(struct.table_name); - oprot.writeFieldEnd(); - } - if (struct.column_name != null) { - oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); - oprot.writeString(struct.column_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(KEY_SEQ_FIELD_DESC); - oprot.writeI32(struct.key_seq); - oprot.writeFieldEnd(); - if (struct.uk_name != null) { - oprot.writeFieldBegin(UK_NAME_FIELD_DESC); - oprot.writeString(struct.uk_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ENABLE_CSTR_FIELD_DESC); - oprot.writeBool(struct.enable_cstr); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(VALIDATE_CSTR_FIELD_DESC); - oprot.writeBool(struct.validate_cstr); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(RELY_CSTR_FIELD_DESC); - oprot.writeBool(struct.rely_cstr); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class SQLUniqueConstraintTupleSchemeFactory implements SchemeFactory { - public SQLUniqueConstraintTupleScheme getScheme() { - return new SQLUniqueConstraintTupleScheme(); - } - } - - private static class SQLUniqueConstraintTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, SQLUniqueConstraint struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetTable_db()) { - optionals.set(0); - } - if (struct.isSetTable_name()) { - optionals.set(1); - } - if (struct.isSetColumn_name()) { - optionals.set(2); - } - if (struct.isSetKey_seq()) { - optionals.set(3); - } - if (struct.isSetUk_name()) { - optionals.set(4); - } - if (struct.isSetEnable_cstr()) { - optionals.set(5); - } - if (struct.isSetValidate_cstr()) { - optionals.set(6); - } - if (struct.isSetRely_cstr()) { - optionals.set(7); - } - oprot.writeBitSet(optionals, 8); - if (struct.isSetTable_db()) { - oprot.writeString(struct.table_db); - } - if (struct.isSetTable_name()) { - oprot.writeString(struct.table_name); - } - if (struct.isSetColumn_name()) { - oprot.writeString(struct.column_name); - } - if (struct.isSetKey_seq()) { - oprot.writeI32(struct.key_seq); - } - if (struct.isSetUk_name()) { - oprot.writeString(struct.uk_name); - } - if (struct.isSetEnable_cstr()) { - oprot.writeBool(struct.enable_cstr); - } - if (struct.isSetValidate_cstr()) { - oprot.writeBool(struct.validate_cstr); - } - if (struct.isSetRely_cstr()) { - oprot.writeBool(struct.rely_cstr); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, SQLUniqueConstraint struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(8); - if (incoming.get(0)) { - struct.table_db = iprot.readString(); - struct.setTable_dbIsSet(true); - } - if (incoming.get(1)) { - struct.table_name = iprot.readString(); - struct.setTable_nameIsSet(true); - } - if (incoming.get(2)) { - struct.column_name = iprot.readString(); - struct.setColumn_nameIsSet(true); - } - if (incoming.get(3)) { - struct.key_seq = iprot.readI32(); - struct.setKey_seqIsSet(true); - } - if (incoming.get(4)) { - struct.uk_name = iprot.readString(); - struct.setUk_nameIsSet(true); - } - if (incoming.get(5)) { - struct.enable_cstr = iprot.readBool(); - struct.setEnable_cstrIsSet(true); - } - if (incoming.get(6)) { - struct.validate_cstr = iprot.readBool(); - struct.setValidate_cstrIsSet(true); - } - if (incoming.get(7)) { - struct.rely_cstr = iprot.readBool(); - struct.setRely_cstrIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index 75d0ebb..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java +++ /dev/null @@ -1,605 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class Schema implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Schema"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FIELD_SCHEMAS((short)1, "fieldSchemas"), - PROPERTIES((short)2, "properties"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FIELD_SCHEMAS - return FIELD_SCHEMAS; - case 2: // PROPERTIES - return PROPERTIES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.FIELD_SCHEMAS, new org.apache.thrift.meta_data.FieldMetaData("fieldSchemas", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); - tmpMap.put(_Fields.PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("properties", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Schema.class, metaDataMap); - } - - public Schema() { - } - - public Schema( - List fieldSchemas, - Map properties) - { - this(); - this.fieldSchemas = fieldSchemas; - this.properties = properties; - } - - /** - * Performs a deep copy on other. - */ - public Schema(Schema other) { - if (other.isSetFieldSchemas()) { - List __this__fieldSchemas = new ArrayList(other.fieldSchemas.size()); - for (FieldSchema other_element : other.fieldSchemas) { - __this__fieldSchemas.add(new FieldSchema(other_element)); - } - this.fieldSchemas = __this__fieldSchemas; - } - if (other.isSetProperties()) { - Map __this__properties = new HashMap(other.properties); - this.properties = __this__properties; - } - } - - public Schema deepCopy() { - return new Schema(this); - } - - @Override - public void clear() { - this.fieldSchemas = null; - this.properties = null; - } - - public int getFieldSchemasSize() { - return (this.fieldSchemas == null) ? 0 : this.fieldSchemas.size(); - } - - public java.util.Iterator getFieldSchemasIterator() { - return (this.fieldSchemas == null) ? null : this.fieldSchemas.iterator(); - } - - public void addToFieldSchemas(FieldSchema elem) { - if (this.fieldSchemas == null) { - this.fieldSchemas = new ArrayList(); - } - this.fieldSchemas.add(elem); - } - - public List getFieldSchemas() { - return this.fieldSchemas; - } - - public void setFieldSchemas(List fieldSchemas) { - this.fieldSchemas = fieldSchemas; - } - - public void unsetFieldSchemas() { - this.fieldSchemas = null; - } - - /** Returns true if field fieldSchemas is set (has been assigned a value) and false otherwise */ - public boolean isSetFieldSchemas() { - return this.fieldSchemas != null; - } - - public void setFieldSchemasIsSet(boolean value) { - if (!value) { - this.fieldSchemas = null; - } - } - - public int getPropertiesSize() { - return (this.properties == null) ? 0 : this.properties.size(); - } - - public void putToProperties(String key, String val) { - if (this.properties == null) { - this.properties = new HashMap(); - } - this.properties.put(key, val); - } - - public Map getProperties() { - return this.properties; - } - - public void setProperties(Map properties) { - this.properties = properties; - } - - public void unsetProperties() { - this.properties = null; - } - - /** Returns true if field properties is set (has been assigned a value) and false otherwise */ - public boolean isSetProperties() { - return this.properties != null; - } - - public void setPropertiesIsSet(boolean value) { - if (!value) { - this.properties = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case FIELD_SCHEMAS: - if (value == null) { - unsetFieldSchemas(); - } else { - setFieldSchemas((List)value); - } - break; - - case PROPERTIES: - if (value == null) { - unsetProperties(); - } else { - setProperties((Map)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case FIELD_SCHEMAS: - return getFieldSchemas(); - - case PROPERTIES: - return getProperties(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case FIELD_SCHEMAS: - return isSetFieldSchemas(); - case PROPERTIES: - return isSetProperties(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Schema) - return this.equals((Schema)that); - return false; - } - - public boolean equals(Schema that) { - if (that == null) - return false; - - boolean this_present_fieldSchemas = true && this.isSetFieldSchemas(); - boolean that_present_fieldSchemas = true && that.isSetFieldSchemas(); - if (this_present_fieldSchemas || that_present_fieldSchemas) { - if (!(this_present_fieldSchemas && that_present_fieldSchemas)) - return false; - if (!this.fieldSchemas.equals(that.fieldSchemas)) - return false; - } - - boolean this_present_properties = true && this.isSetProperties(); - boolean that_present_properties = true && that.isSetProperties(); - if (this_present_properties || that_present_properties) { - if (!(this_present_properties && that_present_properties)) - return false; - if (!this.properties.equals(that.properties)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_fieldSchemas = true && (isSetFieldSchemas()); - list.add(present_fieldSchemas); - if (present_fieldSchemas) - list.add(fieldSchemas); - - boolean present_properties = true && (isSetProperties()); - list.add(present_properties); - if (present_properties) - list.add(properties); - - return list.hashCode(); - } - - @Override - public int compareTo(Schema other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetFieldSchemas()).compareTo(other.isSetFieldSchemas()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFieldSchemas()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fieldSchemas, other.fieldSchemas); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetProperties()).compareTo(other.isSetProperties()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProperties()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.properties, other.properties); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("Schema("); - boolean first = true; - - sb.append("fieldSchemas:"); - if (this.fieldSchemas == null) { - sb.append("null"); - } else { - sb.append(this.fieldSchemas); - } - first = false; - if (!first) sb.append(", "); - sb.append("properties:"); - if (this.properties == null) { - sb.append("null"); - } else { - sb.append(this.properties); - } - 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 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 _list294 = iprot.readListBegin(); - struct.fieldSchemas = new ArrayList(_list294.size); - FieldSchema _elem295; - for (int _i296 = 0; _i296 < _list294.size; ++_i296) - { - _elem295 = new FieldSchema(); - _elem295.read(iprot); - struct.fieldSchemas.add(_elem295); - } - 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 _map297 = iprot.readMapBegin(); - struct.properties = new HashMap(2*_map297.size); - String _key298; - String _val299; - for (int _i300 = 0; _i300 < _map297.size; ++_i300) - { - _key298 = iprot.readString(); - _val299 = iprot.readString(); - struct.properties.put(_key298, _val299); - } - 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 _iter301 : struct.fieldSchemas) - { - _iter301.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 _iter302 : struct.properties.entrySet()) - { - oprot.writeString(_iter302.getKey()); - oprot.writeString(_iter302.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 _iter303 : struct.fieldSchemas) - { - _iter303.write(oprot); - } - } - } - if (struct.isSetProperties()) { - { - oprot.writeI32(struct.properties.size()); - for (Map.Entry _iter304 : struct.properties.entrySet()) - { - oprot.writeString(_iter304.getKey()); - oprot.writeString(_iter304.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 _list305 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.fieldSchemas = new ArrayList(_list305.size); - FieldSchema _elem306; - for (int _i307 = 0; _i307 < _list305.size; ++_i307) - { - _elem306 = new FieldSchema(); - _elem306.read(iprot); - struct.fieldSchemas.add(_elem306); - } - } - struct.setFieldSchemasIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TMap _map308 = 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*_map308.size); - String _key309; - String _val310; - for (int _i311 = 0; _i311 < _map308.size; ++_i311) - { - _key309 = iprot.readString(); - _val310 = iprot.readString(); - struct.properties.put(_key309, _val310); - } - } - struct.setPropertiesIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index d5a8d99..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java +++ /dev/null @@ -1,655 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class SerDeInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SerDeInfo"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NAME((short)1, "name"), - SERIALIZATION_LIB((short)2, "serializationLib"), - PARAMETERS((short)3, "parameters"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // SERIALIZATION_LIB - return SERIALIZATION_LIB; - case 3: // PARAMETERS - return PARAMETERS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SERIALIZATION_LIB, new org.apache.thrift.meta_data.FieldMetaData("serializationLib", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SerDeInfo.class, metaDataMap); - } - - public SerDeInfo() { - } - - public SerDeInfo( - String name, - String serializationLib, - Map parameters) - { - this(); - this.name = org.apache.hive.common.util.HiveStringUtils.intern(name); - this.serializationLib = org.apache.hive.common.util.HiveStringUtils.intern(serializationLib); - this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters); - } - - /** - * Performs a deep copy on other. - */ - public SerDeInfo(SerDeInfo other) { - if (other.isSetName()) { - this.name = org.apache.hive.common.util.HiveStringUtils.intern(other.name); - } - if (other.isSetSerializationLib()) { - this.serializationLib = org.apache.hive.common.util.HiveStringUtils.intern(other.serializationLib); - } - if (other.isSetParameters()) { - Map __this__parameters = new HashMap(other.parameters); - this.parameters = __this__parameters; - } - } - - public SerDeInfo deepCopy() { - return new SerDeInfo(this); - } - - @Override - public void clear() { - this.name = null; - this.serializationLib = null; - this.parameters = null; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = org.apache.hive.common.util.HiveStringUtils.intern(name); - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public String getSerializationLib() { - return this.serializationLib; - } - - public void setSerializationLib(String serializationLib) { - this.serializationLib = org.apache.hive.common.util.HiveStringUtils.intern(serializationLib); - } - - public void unsetSerializationLib() { - this.serializationLib = null; - } - - /** Returns true if field serializationLib is set (has been assigned a value) and false otherwise */ - public boolean isSetSerializationLib() { - return this.serializationLib != null; - } - - public void setSerializationLibIsSet(boolean value) { - if (!value) { - this.serializationLib = null; - } - } - - public int getParametersSize() { - return (this.parameters == null) ? 0 : this.parameters.size(); - } - - public void putToParameters(String key, String val) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(key, val); - } - - public Map getParameters() { - return this.parameters; - } - - public void setParameters(Map parameters) { - this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters); - } - - public void unsetParameters() { - this.parameters = null; - } - - /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ - public boolean isSetParameters() { - return this.parameters != null; - } - - public void setParametersIsSet(boolean value) { - if (!value) { - this.parameters = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case SERIALIZATION_LIB: - if (value == null) { - unsetSerializationLib(); - } else { - setSerializationLib((String)value); - } - break; - - case PARAMETERS: - if (value == null) { - unsetParameters(); - } else { - setParameters((Map)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - case SERIALIZATION_LIB: - return getSerializationLib(); - - case PARAMETERS: - return getParameters(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - case SERIALIZATION_LIB: - return isSetSerializationLib(); - case PARAMETERS: - return isSetParameters(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof SerDeInfo) - return this.equals((SerDeInfo)that); - return false; - } - - public boolean equals(SerDeInfo that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_serializationLib = true && this.isSetSerializationLib(); - boolean that_present_serializationLib = true && that.isSetSerializationLib(); - if (this_present_serializationLib || that_present_serializationLib) { - if (!(this_present_serializationLib && that_present_serializationLib)) - return false; - if (!this.serializationLib.equals(that.serializationLib)) - return false; - } - - boolean this_present_parameters = true && this.isSetParameters(); - boolean that_present_parameters = true && that.isSetParameters(); - if (this_present_parameters || that_present_parameters) { - if (!(this_present_parameters && that_present_parameters)) - return false; - if (!this.parameters.equals(that.parameters)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); - - boolean present_serializationLib = true && (isSetSerializationLib()); - list.add(present_serializationLib); - if (present_serializationLib) - list.add(serializationLib); - - boolean present_parameters = true && (isSetParameters()); - list.add(present_parameters); - if (present_parameters) - list.add(parameters); - - return list.hashCode(); - } - - @Override - public int compareTo(SerDeInfo other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSerializationLib()).compareTo(other.isSetSerializationLib()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSerializationLib()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serializationLib, other.serializationLib); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParameters()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("SerDeInfo("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("serializationLib:"); - if (this.serializationLib == null) { - sb.append("null"); - } else { - sb.append(this.serializationLib); - } - first = false; - if (!first) sb.append(", "); - sb.append("parameters:"); - if (this.parameters == null) { - sb.append("null"); - } else { - sb.append(this.parameters); - } - 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 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 _map104 = iprot.readMapBegin(); - struct.parameters = new HashMap(2*_map104.size); - String _key105; - String _val106; - for (int _i107 = 0; _i107 < _map104.size; ++_i107) - { - _key105 = iprot.readString(); - _val106 = iprot.readString(); - struct.parameters.put(_key105, _val106); - } - 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 _iter108 : struct.parameters.entrySet()) - { - oprot.writeString(_iter108.getKey()); - oprot.writeString(_iter108.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 _iter109 : struct.parameters.entrySet()) - { - oprot.writeString(_iter109.getKey()); - oprot.writeString(_iter109.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 _map110 = 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*_map110.size); - String _key111; - String _val112; - for (int _i113 = 0; _i113 < _map110.size; ++_i113) - { - _key111 = iprot.readString(); - _val112 = iprot.readString(); - struct.parameters.put(_key111, _val112); - } - } - struct.setParametersIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsRequest.java deleted file mode 100644 index c8088b4..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsRequest.java +++ /dev/null @@ -1,550 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class SetPartitionsStatsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SetPartitionsStatsRequest"); - - private static final org.apache.thrift.protocol.TField COL_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("colStats", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField NEED_MERGE_FIELD_DESC = new org.apache.thrift.protocol.TField("needMerge", org.apache.thrift.protocol.TType.BOOL, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SetPartitionsStatsRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SetPartitionsStatsRequestTupleSchemeFactory()); - } - - private List colStats; // required - private boolean needMerge; // 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 { - COL_STATS((short)1, "colStats"), - NEED_MERGE((short)2, "needMerge"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // COL_STATS - return COL_STATS; - case 2: // NEED_MERGE - return NEED_MERGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __NEEDMERGE_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.NEED_MERGE}; - 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); - tmpMap.put(_Fields.COL_STATS, new org.apache.thrift.meta_data.FieldMetaData("colStats", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class)))); - tmpMap.put(_Fields.NEED_MERGE, new org.apache.thrift.meta_data.FieldMetaData("needMerge", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SetPartitionsStatsRequest.class, metaDataMap); - } - - public SetPartitionsStatsRequest() { - } - - public SetPartitionsStatsRequest( - List colStats) - { - this(); - this.colStats = colStats; - } - - /** - * Performs a deep copy on other. - */ - public SetPartitionsStatsRequest(SetPartitionsStatsRequest other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetColStats()) { - List __this__colStats = new ArrayList(other.colStats.size()); - for (ColumnStatistics other_element : other.colStats) { - __this__colStats.add(new ColumnStatistics(other_element)); - } - this.colStats = __this__colStats; - } - this.needMerge = other.needMerge; - } - - public SetPartitionsStatsRequest deepCopy() { - return new SetPartitionsStatsRequest(this); - } - - @Override - public void clear() { - this.colStats = null; - setNeedMergeIsSet(false); - this.needMerge = false; - } - - public int getColStatsSize() { - return (this.colStats == null) ? 0 : this.colStats.size(); - } - - public java.util.Iterator getColStatsIterator() { - return (this.colStats == null) ? null : this.colStats.iterator(); - } - - public void addToColStats(ColumnStatistics elem) { - if (this.colStats == null) { - this.colStats = new ArrayList(); - } - this.colStats.add(elem); - } - - public List getColStats() { - return this.colStats; - } - - public void setColStats(List colStats) { - this.colStats = colStats; - } - - public void unsetColStats() { - this.colStats = null; - } - - /** Returns true if field colStats is set (has been assigned a value) and false otherwise */ - public boolean isSetColStats() { - return this.colStats != null; - } - - public void setColStatsIsSet(boolean value) { - if (!value) { - this.colStats = null; - } - } - - public boolean isNeedMerge() { - return this.needMerge; - } - - public void setNeedMerge(boolean needMerge) { - this.needMerge = needMerge; - setNeedMergeIsSet(true); - } - - public void unsetNeedMerge() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NEEDMERGE_ISSET_ID); - } - - /** Returns true if field needMerge is set (has been assigned a value) and false otherwise */ - public boolean isSetNeedMerge() { - return EncodingUtils.testBit(__isset_bitfield, __NEEDMERGE_ISSET_ID); - } - - public void setNeedMergeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NEEDMERGE_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case COL_STATS: - if (value == null) { - unsetColStats(); - } else { - setColStats((List)value); - } - break; - - case NEED_MERGE: - if (value == null) { - unsetNeedMerge(); - } else { - setNeedMerge((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case COL_STATS: - return getColStats(); - - case NEED_MERGE: - return isNeedMerge(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case COL_STATS: - return isSetColStats(); - case NEED_MERGE: - return isSetNeedMerge(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof SetPartitionsStatsRequest) - return this.equals((SetPartitionsStatsRequest)that); - return false; - } - - public boolean equals(SetPartitionsStatsRequest that) { - if (that == null) - return false; - - boolean this_present_colStats = true && this.isSetColStats(); - boolean that_present_colStats = true && that.isSetColStats(); - if (this_present_colStats || that_present_colStats) { - if (!(this_present_colStats && that_present_colStats)) - return false; - if (!this.colStats.equals(that.colStats)) - return false; - } - - boolean this_present_needMerge = true && this.isSetNeedMerge(); - boolean that_present_needMerge = true && that.isSetNeedMerge(); - if (this_present_needMerge || that_present_needMerge) { - if (!(this_present_needMerge && that_present_needMerge)) - return false; - if (this.needMerge != that.needMerge) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_colStats = true && (isSetColStats()); - list.add(present_colStats); - if (present_colStats) - list.add(colStats); - - boolean present_needMerge = true && (isSetNeedMerge()); - list.add(present_needMerge); - if (present_needMerge) - list.add(needMerge); - - return list.hashCode(); - } - - @Override - public int compareTo(SetPartitionsStatsRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetColStats()).compareTo(other.isSetColStats()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColStats()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colStats, other.colStats); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNeedMerge()).compareTo(other.isSetNeedMerge()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNeedMerge()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.needMerge, other.needMerge); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("SetPartitionsStatsRequest("); - boolean first = true; - - sb.append("colStats:"); - if (this.colStats == null) { - sb.append("null"); - } else { - sb.append(this.colStats); - } - first = false; - if (isSetNeedMerge()) { - if (!first) sb.append(", "); - sb.append("needMerge:"); - sb.append(this.needMerge); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetColStats()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'colStats' is unset! Struct:" + toString()); - } - - // 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 { - // 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 SetPartitionsStatsRequestStandardSchemeFactory implements SchemeFactory { - public SetPartitionsStatsRequestStandardScheme getScheme() { - return new SetPartitionsStatsRequestStandardScheme(); - } - } - - private static class SetPartitionsStatsRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, SetPartitionsStatsRequest 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_STATS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list286 = iprot.readListBegin(); - struct.colStats = new ArrayList(_list286.size); - ColumnStatistics _elem287; - for (int _i288 = 0; _i288 < _list286.size; ++_i288) - { - _elem287 = new ColumnStatistics(); - _elem287.read(iprot); - struct.colStats.add(_elem287); - } - iprot.readListEnd(); - } - struct.setColStatsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // NEED_MERGE - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.needMerge = iprot.readBool(); - struct.setNeedMergeIsSet(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, SetPartitionsStatsRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.colStats != null) { - oprot.writeFieldBegin(COL_STATS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.colStats.size())); - for (ColumnStatistics _iter289 : struct.colStats) - { - _iter289.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.isSetNeedMerge()) { - oprot.writeFieldBegin(NEED_MERGE_FIELD_DESC); - oprot.writeBool(struct.needMerge); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class SetPartitionsStatsRequestTupleSchemeFactory implements SchemeFactory { - public SetPartitionsStatsRequestTupleScheme getScheme() { - return new SetPartitionsStatsRequestTupleScheme(); - } - } - - private static class SetPartitionsStatsRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, SetPartitionsStatsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.colStats.size()); - for (ColumnStatistics _iter290 : struct.colStats) - { - _iter290.write(oprot); - } - } - BitSet optionals = new BitSet(); - if (struct.isSetNeedMerge()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetNeedMerge()) { - oprot.writeBool(struct.needMerge); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, SetPartitionsStatsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list291 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.colStats = new ArrayList(_list291.size); - ColumnStatistics _elem292; - for (int _i293 = 0; _i293 < _list291.size; ++_i293) - { - _elem292 = new ColumnStatistics(); - _elem292.read(iprot); - struct.colStats.add(_elem292); - } - } - struct.setColStatsIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.needMerge = iprot.readBool(); - struct.setNeedMergeIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactRequest.java deleted file mode 100644 index ad1c57c..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactRequest.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ShowCompactRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowCompactRequest"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ShowCompactRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ShowCompactRequestTupleSchemeFactory()); - } - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowCompactRequest.class, metaDataMap); - } - - public ShowCompactRequest() { - } - - /** - * Performs a deep copy on other. - */ - public ShowCompactRequest(ShowCompactRequest other) { - } - - public ShowCompactRequest deepCopy() { - return new ShowCompactRequest(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ShowCompactRequest) - return this.equals((ShowCompactRequest)that); - return false; - } - - public boolean equals(ShowCompactRequest that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(ShowCompactRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ShowCompactRequest("); - boolean first = true; - - 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 ShowCompactRequestStandardSchemeFactory implements SchemeFactory { - public ShowCompactRequestStandardScheme getScheme() { - return new ShowCompactRequestStandardScheme(); - } - } - - private static class ShowCompactRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ShowCompactRequest 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, ShowCompactRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ShowCompactRequestTupleSchemeFactory implements SchemeFactory { - public ShowCompactRequestTupleScheme getScheme() { - return new ShowCompactRequestTupleScheme(); - } - } - - private static class ShowCompactRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ShowCompactRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java deleted file mode 100644 index 1dd13cc..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ShowCompactResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowCompactResponse"); - - private static final org.apache.thrift.protocol.TField COMPACTS_FIELD_DESC = new org.apache.thrift.protocol.TField("compacts", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ShowCompactResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ShowCompactResponseTupleSchemeFactory()); - } - - private List compacts; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - COMPACTS((short)1, "compacts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // COMPACTS - return COMPACTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.COMPACTS, new org.apache.thrift.meta_data.FieldMetaData("compacts", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowCompactResponseElement.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowCompactResponse.class, metaDataMap); - } - - public ShowCompactResponse() { - } - - public ShowCompactResponse( - List compacts) - { - this(); - this.compacts = compacts; - } - - /** - * Performs a deep copy on other. - */ - public ShowCompactResponse(ShowCompactResponse other) { - if (other.isSetCompacts()) { - List __this__compacts = new ArrayList(other.compacts.size()); - for (ShowCompactResponseElement other_element : other.compacts) { - __this__compacts.add(new ShowCompactResponseElement(other_element)); - } - this.compacts = __this__compacts; - } - } - - public ShowCompactResponse deepCopy() { - return new ShowCompactResponse(this); - } - - @Override - public void clear() { - this.compacts = null; - } - - public int getCompactsSize() { - return (this.compacts == null) ? 0 : this.compacts.size(); - } - - public java.util.Iterator getCompactsIterator() { - return (this.compacts == null) ? null : this.compacts.iterator(); - } - - public void addToCompacts(ShowCompactResponseElement elem) { - if (this.compacts == null) { - this.compacts = new ArrayList(); - } - this.compacts.add(elem); - } - - public List getCompacts() { - return this.compacts; - } - - public void setCompacts(List compacts) { - this.compacts = compacts; - } - - public void unsetCompacts() { - this.compacts = null; - } - - /** Returns true if field compacts is set (has been assigned a value) and false otherwise */ - public boolean isSetCompacts() { - return this.compacts != null; - } - - public void setCompactsIsSet(boolean value) { - if (!value) { - this.compacts = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case COMPACTS: - if (value == null) { - unsetCompacts(); - } else { - setCompacts((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case COMPACTS: - return getCompacts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case COMPACTS: - return isSetCompacts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ShowCompactResponse) - return this.equals((ShowCompactResponse)that); - return false; - } - - public boolean equals(ShowCompactResponse that) { - if (that == null) - return false; - - boolean this_present_compacts = true && this.isSetCompacts(); - boolean that_present_compacts = true && that.isSetCompacts(); - if (this_present_compacts || that_present_compacts) { - if (!(this_present_compacts && that_present_compacts)) - return false; - if (!this.compacts.equals(that.compacts)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_compacts = true && (isSetCompacts()); - list.add(present_compacts); - if (present_compacts) - list.add(compacts); - - return list.hashCode(); - } - - @Override - public int compareTo(ShowCompactResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetCompacts()).compareTo(other.isSetCompacts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCompacts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compacts, other.compacts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ShowCompactResponse("); - boolean first = true; - - sb.append("compacts:"); - if (this.compacts == null) { - sb.append("null"); - } else { - sb.append(this.compacts); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetCompacts()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'compacts' is unset! Struct:" + toString()); - } - - // 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 ShowCompactResponseStandardSchemeFactory implements SchemeFactory { - public ShowCompactResponseStandardScheme getScheme() { - return new ShowCompactResponseStandardScheme(); - } - } - - private static class ShowCompactResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ShowCompactResponse 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: // COMPACTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list566 = iprot.readListBegin(); - struct.compacts = new ArrayList(_list566.size); - ShowCompactResponseElement _elem567; - for (int _i568 = 0; _i568 < _list566.size; ++_i568) - { - _elem567 = new ShowCompactResponseElement(); - _elem567.read(iprot); - struct.compacts.add(_elem567); - } - iprot.readListEnd(); - } - struct.setCompactsIsSet(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, ShowCompactResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.compacts != null) { - oprot.writeFieldBegin(COMPACTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.compacts.size())); - for (ShowCompactResponseElement _iter569 : struct.compacts) - { - _iter569.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ShowCompactResponseTupleSchemeFactory implements SchemeFactory { - public ShowCompactResponseTupleScheme getScheme() { - return new ShowCompactResponseTupleScheme(); - } - } - - private static class ShowCompactResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.compacts.size()); - for (ShowCompactResponseElement _iter570 : struct.compacts) - { - _iter570.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list571 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.compacts = new ArrayList(_list571.size); - ShowCompactResponseElement _elem572; - for (int _i573 = 0; _i573 < _list571.size; ++_i573) - { - _elem572 = new ShowCompactResponseElement(); - _elem572.read(iprot); - struct.compacts.add(_elem572); - } - } - struct.setCompactsIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java deleted file mode 100644 index 78b4f7c..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java +++ /dev/null @@ -1,1641 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ShowCompactResponseElement implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowCompactResponseElement"); - - 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 TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PARTITIONNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionname", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField WORKERID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerid", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField START_FIELD_DESC = new org.apache.thrift.protocol.TField("start", org.apache.thrift.protocol.TType.I64, (short)7); - private static final org.apache.thrift.protocol.TField RUN_AS_FIELD_DESC = new org.apache.thrift.protocol.TField("runAs", org.apache.thrift.protocol.TType.STRING, (short)8); - private static final org.apache.thrift.protocol.TField HIGHTEST_TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hightestTxnId", org.apache.thrift.protocol.TType.I64, (short)9); - private static final org.apache.thrift.protocol.TField META_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("metaInfo", org.apache.thrift.protocol.TType.STRING, (short)10); - private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)11); - private static final org.apache.thrift.protocol.TField HADOOP_JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hadoopJobId", org.apache.thrift.protocol.TType.STRING, (short)12); - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)13); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ShowCompactResponseElementStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ShowCompactResponseElementTupleSchemeFactory()); - } - - private String dbname; // required - private String tablename; // required - private String partitionname; // optional - private CompactionType type; // required - private String state; // required - private String workerid; // optional - private long start; // optional - private String runAs; // optional - private long hightestTxnId; // optional - private String metaInfo; // optional - private long endTime; // optional - private String hadoopJobId; // optional - private long id; // 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 { - DBNAME((short)1, "dbname"), - TABLENAME((short)2, "tablename"), - PARTITIONNAME((short)3, "partitionname"), - /** - * - * @see CompactionType - */ - TYPE((short)4, "type"), - STATE((short)5, "state"), - WORKERID((short)6, "workerid"), - START((short)7, "start"), - RUN_AS((short)8, "runAs"), - HIGHTEST_TXN_ID((short)9, "hightestTxnId"), - META_INFO((short)10, "metaInfo"), - END_TIME((short)11, "endTime"), - HADOOP_JOB_ID((short)12, "hadoopJobId"), - ID((short)13, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // TABLENAME - return TABLENAME; - case 3: // PARTITIONNAME - return PARTITIONNAME; - case 4: // TYPE - return TYPE; - case 5: // STATE - return STATE; - case 6: // WORKERID - return WORKERID; - case 7: // START - return START; - case 8: // RUN_AS - return RUN_AS; - case 9: // HIGHTEST_TXN_ID - return HIGHTEST_TXN_ID; - case 10: // META_INFO - return META_INFO; - case 11: // END_TIME - return END_TIME; - case 12: // HADOOP_JOB_ID - return HADOOP_JOB_ID; - case 13: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __START_ISSET_ID = 0; - private static final int __HIGHTESTTXNID_ISSET_ID = 1; - private static final int __ENDTIME_ISSET_ID = 2; - private static final int __ID_ISSET_ID = 3; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.PARTITIONNAME,_Fields.WORKERID,_Fields.START,_Fields.RUN_AS,_Fields.HIGHTEST_TXN_ID,_Fields.META_INFO,_Fields.END_TIME,_Fields.HADOOP_JOB_ID,_Fields.ID}; - 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CompactionType.class))); - tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.WORKERID, new org.apache.thrift.meta_data.FieldMetaData("workerid", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.START, new org.apache.thrift.meta_data.FieldMetaData("start", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.RUN_AS, new org.apache.thrift.meta_data.FieldMetaData("runAs", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.HIGHTEST_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("hightestTxnId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.META_INFO, new org.apache.thrift.meta_data.FieldMetaData("metaInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.HADOOP_JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("hadoopJobId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowCompactResponseElement.class, metaDataMap); - } - - public ShowCompactResponseElement() { - this.hadoopJobId = "None"; - - } - - public ShowCompactResponseElement( - String dbname, - String tablename, - CompactionType type, - String state) - { - this(); - this.dbname = dbname; - this.tablename = tablename; - this.type = type; - this.state = state; - } - - /** - * Performs a deep copy on other. - */ - public ShowCompactResponseElement(ShowCompactResponseElement other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTablename()) { - this.tablename = other.tablename; - } - if (other.isSetPartitionname()) { - this.partitionname = other.partitionname; - } - if (other.isSetType()) { - this.type = other.type; - } - if (other.isSetState()) { - this.state = other.state; - } - if (other.isSetWorkerid()) { - this.workerid = other.workerid; - } - this.start = other.start; - if (other.isSetRunAs()) { - this.runAs = other.runAs; - } - this.hightestTxnId = other.hightestTxnId; - if (other.isSetMetaInfo()) { - this.metaInfo = other.metaInfo; - } - this.endTime = other.endTime; - if (other.isSetHadoopJobId()) { - this.hadoopJobId = other.hadoopJobId; - } - this.id = other.id; - } - - public ShowCompactResponseElement deepCopy() { - return new ShowCompactResponseElement(this); - } - - @Override - public void clear() { - this.dbname = null; - this.tablename = null; - this.partitionname = null; - this.type = null; - this.state = null; - this.workerid = null; - setStartIsSet(false); - this.start = 0; - this.runAs = null; - setHightestTxnIdIsSet(false); - this.hightestTxnId = 0; - this.metaInfo = null; - setEndTimeIsSet(false); - this.endTime = 0; - this.hadoopJobId = "None"; - - setIdIsSet(false); - this.id = 0; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getTablename() { - return this.tablename; - } - - public void setTablename(String tablename) { - this.tablename = tablename; - } - - public void unsetTablename() { - this.tablename = null; - } - - /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ - public boolean isSetTablename() { - return this.tablename != null; - } - - public void setTablenameIsSet(boolean value) { - if (!value) { - this.tablename = null; - } - } - - public String getPartitionname() { - return this.partitionname; - } - - public void setPartitionname(String partitionname) { - this.partitionname = partitionname; - } - - public void unsetPartitionname() { - this.partitionname = null; - } - - /** Returns true if field partitionname is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitionname() { - return this.partitionname != null; - } - - public void setPartitionnameIsSet(boolean value) { - if (!value) { - this.partitionname = null; - } - } - - /** - * - * @see CompactionType - */ - public CompactionType getType() { - return this.type; - } - - /** - * - * @see CompactionType - */ - public void setType(CompactionType type) { - this.type = type; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - public String getState() { - return this.state; - } - - public void setState(String state) { - this.state = state; - } - - public void unsetState() { - this.state = null; - } - - /** Returns true if field state is set (has been assigned a value) and false otherwise */ - public boolean isSetState() { - return this.state != null; - } - - public void setStateIsSet(boolean value) { - if (!value) { - this.state = null; - } - } - - public String getWorkerid() { - return this.workerid; - } - - public void setWorkerid(String workerid) { - this.workerid = workerid; - } - - public void unsetWorkerid() { - this.workerid = null; - } - - /** Returns true if field workerid is set (has been assigned a value) and false otherwise */ - public boolean isSetWorkerid() { - return this.workerid != null; - } - - public void setWorkeridIsSet(boolean value) { - if (!value) { - this.workerid = null; - } - } - - public long getStart() { - return this.start; - } - - public void setStart(long start) { - this.start = start; - setStartIsSet(true); - } - - public void unsetStart() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __START_ISSET_ID); - } - - /** Returns true if field start is set (has been assigned a value) and false otherwise */ - public boolean isSetStart() { - return EncodingUtils.testBit(__isset_bitfield, __START_ISSET_ID); - } - - public void setStartIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __START_ISSET_ID, value); - } - - public String getRunAs() { - return this.runAs; - } - - public void setRunAs(String runAs) { - this.runAs = runAs; - } - - public void unsetRunAs() { - this.runAs = null; - } - - /** Returns true if field runAs is set (has been assigned a value) and false otherwise */ - public boolean isSetRunAs() { - return this.runAs != null; - } - - public void setRunAsIsSet(boolean value) { - if (!value) { - this.runAs = null; - } - } - - public long getHightestTxnId() { - return this.hightestTxnId; - } - - public void setHightestTxnId(long hightestTxnId) { - this.hightestTxnId = hightestTxnId; - setHightestTxnIdIsSet(true); - } - - public void unsetHightestTxnId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HIGHTESTTXNID_ISSET_ID); - } - - /** Returns true if field hightestTxnId is set (has been assigned a value) and false otherwise */ - public boolean isSetHightestTxnId() { - return EncodingUtils.testBit(__isset_bitfield, __HIGHTESTTXNID_ISSET_ID); - } - - public void setHightestTxnIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HIGHTESTTXNID_ISSET_ID, value); - } - - public String getMetaInfo() { - return this.metaInfo; - } - - public void setMetaInfo(String metaInfo) { - this.metaInfo = metaInfo; - } - - public void unsetMetaInfo() { - this.metaInfo = null; - } - - /** Returns true if field metaInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetMetaInfo() { - return this.metaInfo != null; - } - - public void setMetaInfoIsSet(boolean value) { - if (!value) { - this.metaInfo = null; - } - } - - public long getEndTime() { - return this.endTime; - } - - public void setEndTime(long endTime) { - this.endTime = endTime; - setEndTimeIsSet(true); - } - - public void unsetEndTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID); - } - - /** Returns true if field endTime is set (has been assigned a value) and false otherwise */ - public boolean isSetEndTime() { - return EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID); - } - - public void setEndTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value); - } - - public String getHadoopJobId() { - return this.hadoopJobId; - } - - public void setHadoopJobId(String hadoopJobId) { - this.hadoopJobId = hadoopJobId; - } - - public void unsetHadoopJobId() { - this.hadoopJobId = null; - } - - /** Returns true if field hadoopJobId is set (has been assigned a value) and false otherwise */ - public boolean isSetHadoopJobId() { - return this.hadoopJobId != null; - } - - public void setHadoopJobIdIsSet(boolean value) { - if (!value) { - this.hadoopJobId = null; - } - } - - public long getId() { - return this.id; - } - - public void setId(long id) { - this.id = id; - setIdIsSet(true); - } - - public void unsetId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); - } - - public void setIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TABLENAME: - if (value == null) { - unsetTablename(); - } else { - setTablename((String)value); - } - break; - - case PARTITIONNAME: - if (value == null) { - unsetPartitionname(); - } else { - setPartitionname((String)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((CompactionType)value); - } - break; - - case STATE: - if (value == null) { - unsetState(); - } else { - setState((String)value); - } - break; - - case WORKERID: - if (value == null) { - unsetWorkerid(); - } else { - setWorkerid((String)value); - } - break; - - case START: - if (value == null) { - unsetStart(); - } else { - setStart((Long)value); - } - break; - - case RUN_AS: - if (value == null) { - unsetRunAs(); - } else { - setRunAs((String)value); - } - break; - - case HIGHTEST_TXN_ID: - if (value == null) { - unsetHightestTxnId(); - } else { - setHightestTxnId((Long)value); - } - break; - - case META_INFO: - if (value == null) { - unsetMetaInfo(); - } else { - setMetaInfo((String)value); - } - break; - - case END_TIME: - if (value == null) { - unsetEndTime(); - } else { - setEndTime((Long)value); - } - break; - - case HADOOP_JOB_ID: - if (value == null) { - unsetHadoopJobId(); - } else { - setHadoopJobId((String)value); - } - break; - - case ID: - if (value == null) { - unsetId(); - } else { - setId((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case TABLENAME: - return getTablename(); - - case PARTITIONNAME: - return getPartitionname(); - - case TYPE: - return getType(); - - case STATE: - return getState(); - - case WORKERID: - return getWorkerid(); - - case START: - return getStart(); - - case RUN_AS: - return getRunAs(); - - case HIGHTEST_TXN_ID: - return getHightestTxnId(); - - case META_INFO: - return getMetaInfo(); - - case END_TIME: - return getEndTime(); - - case HADOOP_JOB_ID: - return getHadoopJobId(); - - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case TABLENAME: - return isSetTablename(); - case PARTITIONNAME: - return isSetPartitionname(); - case TYPE: - return isSetType(); - case STATE: - return isSetState(); - case WORKERID: - return isSetWorkerid(); - case START: - return isSetStart(); - case RUN_AS: - return isSetRunAs(); - case HIGHTEST_TXN_ID: - return isSetHightestTxnId(); - case META_INFO: - return isSetMetaInfo(); - case END_TIME: - return isSetEndTime(); - case HADOOP_JOB_ID: - return isSetHadoopJobId(); - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ShowCompactResponseElement) - return this.equals((ShowCompactResponseElement)that); - return false; - } - - public boolean equals(ShowCompactResponseElement that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tablename = true && this.isSetTablename(); - boolean that_present_tablename = true && that.isSetTablename(); - if (this_present_tablename || that_present_tablename) { - if (!(this_present_tablename && that_present_tablename)) - return false; - if (!this.tablename.equals(that.tablename)) - return false; - } - - boolean this_present_partitionname = true && this.isSetPartitionname(); - boolean that_present_partitionname = true && that.isSetPartitionname(); - if (this_present_partitionname || that_present_partitionname) { - if (!(this_present_partitionname && that_present_partitionname)) - return false; - if (!this.partitionname.equals(that.partitionname)) - return false; - } - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - boolean this_present_state = true && this.isSetState(); - boolean that_present_state = true && that.isSetState(); - if (this_present_state || that_present_state) { - if (!(this_present_state && that_present_state)) - return false; - if (!this.state.equals(that.state)) - return false; - } - - boolean this_present_workerid = true && this.isSetWorkerid(); - boolean that_present_workerid = true && that.isSetWorkerid(); - if (this_present_workerid || that_present_workerid) { - if (!(this_present_workerid && that_present_workerid)) - return false; - if (!this.workerid.equals(that.workerid)) - return false; - } - - boolean this_present_start = true && this.isSetStart(); - boolean that_present_start = true && that.isSetStart(); - if (this_present_start || that_present_start) { - if (!(this_present_start && that_present_start)) - return false; - if (this.start != that.start) - return false; - } - - boolean this_present_runAs = true && this.isSetRunAs(); - boolean that_present_runAs = true && that.isSetRunAs(); - if (this_present_runAs || that_present_runAs) { - if (!(this_present_runAs && that_present_runAs)) - return false; - if (!this.runAs.equals(that.runAs)) - return false; - } - - boolean this_present_hightestTxnId = true && this.isSetHightestTxnId(); - boolean that_present_hightestTxnId = true && that.isSetHightestTxnId(); - if (this_present_hightestTxnId || that_present_hightestTxnId) { - if (!(this_present_hightestTxnId && that_present_hightestTxnId)) - return false; - if (this.hightestTxnId != that.hightestTxnId) - return false; - } - - boolean this_present_metaInfo = true && this.isSetMetaInfo(); - boolean that_present_metaInfo = true && that.isSetMetaInfo(); - if (this_present_metaInfo || that_present_metaInfo) { - if (!(this_present_metaInfo && that_present_metaInfo)) - return false; - if (!this.metaInfo.equals(that.metaInfo)) - return false; - } - - boolean this_present_endTime = true && this.isSetEndTime(); - boolean that_present_endTime = true && that.isSetEndTime(); - if (this_present_endTime || that_present_endTime) { - if (!(this_present_endTime && that_present_endTime)) - return false; - if (this.endTime != that.endTime) - return false; - } - - boolean this_present_hadoopJobId = true && this.isSetHadoopJobId(); - boolean that_present_hadoopJobId = true && that.isSetHadoopJobId(); - if (this_present_hadoopJobId || that_present_hadoopJobId) { - if (!(this_present_hadoopJobId && that_present_hadoopJobId)) - return false; - if (!this.hadoopJobId.equals(that.hadoopJobId)) - return false; - } - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (this.id != that.id) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_tablename = true && (isSetTablename()); - list.add(present_tablename); - if (present_tablename) - list.add(tablename); - - boolean present_partitionname = true && (isSetPartitionname()); - list.add(present_partitionname); - if (present_partitionname) - list.add(partitionname); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type.getValue()); - - boolean present_state = true && (isSetState()); - list.add(present_state); - if (present_state) - list.add(state); - - boolean present_workerid = true && (isSetWorkerid()); - list.add(present_workerid); - if (present_workerid) - list.add(workerid); - - boolean present_start = true && (isSetStart()); - list.add(present_start); - if (present_start) - list.add(start); - - boolean present_runAs = true && (isSetRunAs()); - list.add(present_runAs); - if (present_runAs) - list.add(runAs); - - boolean present_hightestTxnId = true && (isSetHightestTxnId()); - list.add(present_hightestTxnId); - if (present_hightestTxnId) - list.add(hightestTxnId); - - boolean present_metaInfo = true && (isSetMetaInfo()); - list.add(present_metaInfo); - if (present_metaInfo) - list.add(metaInfo); - - boolean present_endTime = true && (isSetEndTime()); - list.add(present_endTime); - if (present_endTime) - list.add(endTime); - - boolean present_hadoopJobId = true && (isSetHadoopJobId()); - list.add(present_hadoopJobId); - if (present_hadoopJobId) - list.add(hadoopJobId); - - boolean present_id = true && (isSetId()); - list.add(present_id); - if (present_id) - list.add(id); - - return list.hashCode(); - } - - @Override - public int compareTo(ShowCompactResponseElement other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTablename()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartitionname()).compareTo(other.isSetPartitionname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitionname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionname, other.partitionname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetState()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetWorkerid()).compareTo(other.isSetWorkerid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWorkerid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerid, other.workerid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStart()).compareTo(other.isSetStart()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStart()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start, other.start); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRunAs()).compareTo(other.isSetRunAs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRunAs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runAs, other.runAs); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHightestTxnId()).compareTo(other.isSetHightestTxnId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHightestTxnId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hightestTxnId, other.hightestTxnId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMetaInfo()).compareTo(other.isSetMetaInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMetaInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metaInfo, other.metaInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEndTime()).compareTo(other.isSetEndTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEndTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHadoopJobId()).compareTo(other.isSetHadoopJobId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHadoopJobId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hadoopJobId, other.hadoopJobId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ShowCompactResponseElement("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tablename:"); - if (this.tablename == null) { - sb.append("null"); - } else { - sb.append(this.tablename); - } - first = false; - if (isSetPartitionname()) { - if (!first) sb.append(", "); - sb.append("partitionname:"); - if (this.partitionname == null) { - sb.append("null"); - } else { - sb.append(this.partitionname); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - if (!first) sb.append(", "); - sb.append("state:"); - if (this.state == null) { - sb.append("null"); - } else { - sb.append(this.state); - } - first = false; - if (isSetWorkerid()) { - if (!first) sb.append(", "); - sb.append("workerid:"); - if (this.workerid == null) { - sb.append("null"); - } else { - sb.append(this.workerid); - } - first = false; - } - if (isSetStart()) { - if (!first) sb.append(", "); - sb.append("start:"); - sb.append(this.start); - first = false; - } - if (isSetRunAs()) { - if (!first) sb.append(", "); - sb.append("runAs:"); - if (this.runAs == null) { - sb.append("null"); - } else { - sb.append(this.runAs); - } - first = false; - } - if (isSetHightestTxnId()) { - if (!first) sb.append(", "); - sb.append("hightestTxnId:"); - sb.append(this.hightestTxnId); - first = false; - } - if (isSetMetaInfo()) { - if (!first) sb.append(", "); - sb.append("metaInfo:"); - if (this.metaInfo == null) { - sb.append("null"); - } else { - sb.append(this.metaInfo); - } - first = false; - } - if (isSetEndTime()) { - if (!first) sb.append(", "); - sb.append("endTime:"); - sb.append(this.endTime); - first = false; - } - if (isSetHadoopJobId()) { - if (!first) sb.append(", "); - sb.append("hadoopJobId:"); - if (this.hadoopJobId == null) { - sb.append("null"); - } else { - sb.append(this.hadoopJobId); - } - first = false; - } - if (isSetId()) { - if (!first) sb.append(", "); - sb.append("id:"); - sb.append(this.id); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDbname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); - } - - if (!isSetTablename()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString()); - } - - if (!isSetType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); - } - - if (!isSetState()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); - } - - // 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 { - // 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 ShowCompactResponseElementStandardSchemeFactory implements SchemeFactory { - public ShowCompactResponseElementStandardScheme getScheme() { - return new ShowCompactResponseElementStandardScheme(); - } - } - - private static class ShowCompactResponseElementStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ShowCompactResponseElement 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: // TABLENAME - 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 3: // PARTITIONNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.partitionname = iprot.readString(); - struct.setPartitionnameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.type = org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // STATE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.state = iprot.readString(); - struct.setStateIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // WORKERID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.workerid = iprot.readString(); - struct.setWorkeridIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // START - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.start = iprot.readI64(); - struct.setStartIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // RUN_AS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.runAs = iprot.readString(); - struct.setRunAsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // HIGHTEST_TXN_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.hightestTxnId = iprot.readI64(); - struct.setHightestTxnIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // META_INFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.metaInfo = iprot.readString(); - struct.setMetaInfoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // END_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.endTime = iprot.readI64(); - struct.setEndTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // HADOOP_JOB_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.hadoopJobId = iprot.readString(); - struct.setHadoopJobIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 13: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.id = iprot.readI64(); - struct.setIdIsSet(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, ShowCompactResponseElement 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.tablename != null) { - oprot.writeFieldBegin(TABLENAME_FIELD_DESC); - oprot.writeString(struct.tablename); - oprot.writeFieldEnd(); - } - if (struct.partitionname != null) { - if (struct.isSetPartitionname()) { - oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC); - oprot.writeString(struct.partitionname); - oprot.writeFieldEnd(); - } - } - if (struct.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI32(struct.type.getValue()); - oprot.writeFieldEnd(); - } - if (struct.state != null) { - oprot.writeFieldBegin(STATE_FIELD_DESC); - oprot.writeString(struct.state); - oprot.writeFieldEnd(); - } - if (struct.workerid != null) { - if (struct.isSetWorkerid()) { - oprot.writeFieldBegin(WORKERID_FIELD_DESC); - oprot.writeString(struct.workerid); - oprot.writeFieldEnd(); - } - } - if (struct.isSetStart()) { - oprot.writeFieldBegin(START_FIELD_DESC); - oprot.writeI64(struct.start); - oprot.writeFieldEnd(); - } - if (struct.runAs != null) { - if (struct.isSetRunAs()) { - oprot.writeFieldBegin(RUN_AS_FIELD_DESC); - oprot.writeString(struct.runAs); - oprot.writeFieldEnd(); - } - } - if (struct.isSetHightestTxnId()) { - oprot.writeFieldBegin(HIGHTEST_TXN_ID_FIELD_DESC); - oprot.writeI64(struct.hightestTxnId); - oprot.writeFieldEnd(); - } - if (struct.metaInfo != null) { - if (struct.isSetMetaInfo()) { - oprot.writeFieldBegin(META_INFO_FIELD_DESC); - oprot.writeString(struct.metaInfo); - oprot.writeFieldEnd(); - } - } - if (struct.isSetEndTime()) { - oprot.writeFieldBegin(END_TIME_FIELD_DESC); - oprot.writeI64(struct.endTime); - oprot.writeFieldEnd(); - } - if (struct.hadoopJobId != null) { - if (struct.isSetHadoopJobId()) { - oprot.writeFieldBegin(HADOOP_JOB_ID_FIELD_DESC); - oprot.writeString(struct.hadoopJobId); - oprot.writeFieldEnd(); - } - } - if (struct.isSetId()) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeI64(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ShowCompactResponseElementTupleSchemeFactory implements SchemeFactory { - public ShowCompactResponseElementTupleScheme getScheme() { - return new ShowCompactResponseElementTupleScheme(); - } - } - - private static class ShowCompactResponseElementTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponseElement struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dbname); - oprot.writeString(struct.tablename); - oprot.writeI32(struct.type.getValue()); - oprot.writeString(struct.state); - BitSet optionals = new BitSet(); - if (struct.isSetPartitionname()) { - optionals.set(0); - } - if (struct.isSetWorkerid()) { - optionals.set(1); - } - if (struct.isSetStart()) { - optionals.set(2); - } - if (struct.isSetRunAs()) { - optionals.set(3); - } - if (struct.isSetHightestTxnId()) { - optionals.set(4); - } - if (struct.isSetMetaInfo()) { - optionals.set(5); - } - if (struct.isSetEndTime()) { - optionals.set(6); - } - if (struct.isSetHadoopJobId()) { - optionals.set(7); - } - if (struct.isSetId()) { - optionals.set(8); - } - oprot.writeBitSet(optionals, 9); - if (struct.isSetPartitionname()) { - oprot.writeString(struct.partitionname); - } - if (struct.isSetWorkerid()) { - oprot.writeString(struct.workerid); - } - if (struct.isSetStart()) { - oprot.writeI64(struct.start); - } - if (struct.isSetRunAs()) { - oprot.writeString(struct.runAs); - } - if (struct.isSetHightestTxnId()) { - oprot.writeI64(struct.hightestTxnId); - } - if (struct.isSetMetaInfo()) { - oprot.writeString(struct.metaInfo); - } - if (struct.isSetEndTime()) { - oprot.writeI64(struct.endTime); - } - if (struct.isSetHadoopJobId()) { - oprot.writeString(struct.hadoopJobId); - } - if (struct.isSetId()) { - oprot.writeI64(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponseElement struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dbname = iprot.readString(); - struct.setDbnameIsSet(true); - struct.tablename = iprot.readString(); - struct.setTablenameIsSet(true); - struct.type = org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - struct.state = iprot.readString(); - struct.setStateIsSet(true); - BitSet incoming = iprot.readBitSet(9); - if (incoming.get(0)) { - struct.partitionname = iprot.readString(); - struct.setPartitionnameIsSet(true); - } - if (incoming.get(1)) { - struct.workerid = iprot.readString(); - struct.setWorkeridIsSet(true); - } - if (incoming.get(2)) { - struct.start = iprot.readI64(); - struct.setStartIsSet(true); - } - if (incoming.get(3)) { - struct.runAs = iprot.readString(); - struct.setRunAsIsSet(true); - } - if (incoming.get(4)) { - struct.hightestTxnId = iprot.readI64(); - struct.setHightestTxnIdIsSet(true); - } - if (incoming.get(5)) { - struct.metaInfo = iprot.readString(); - struct.setMetaInfoIsSet(true); - } - if (incoming.get(6)) { - struct.endTime = iprot.readI64(); - struct.setEndTimeIsSet(true); - } - if (incoming.get(7)) { - struct.hadoopJobId = iprot.readString(); - struct.setHadoopJobIdIsSet(true); - } - if (incoming.get(8)) { - struct.id = iprot.readI64(); - struct.setIdIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksRequest.java deleted file mode 100644 index f566d6f..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksRequest.java +++ /dev/null @@ -1,710 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ShowLocksRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowLocksRequest"); - - 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 TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PARTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partname", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField IS_EXTENDED_FIELD_DESC = new org.apache.thrift.protocol.TField("isExtended", org.apache.thrift.protocol.TType.BOOL, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ShowLocksRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ShowLocksRequestTupleSchemeFactory()); - } - - private String dbname; // optional - private String tablename; // optional - private String partname; // optional - private boolean isExtended; // 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 { - DBNAME((short)1, "dbname"), - TABLENAME((short)2, "tablename"), - PARTNAME((short)3, "partname"), - IS_EXTENDED((short)4, "isExtended"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // TABLENAME - return TABLENAME; - case 3: // PARTNAME - return PARTNAME; - case 4: // IS_EXTENDED - return IS_EXTENDED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ISEXTENDED_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.DBNAME,_Fields.TABLENAME,_Fields.PARTNAME,_Fields.IS_EXTENDED}; - 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARTNAME, new org.apache.thrift.meta_data.FieldMetaData("partname", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IS_EXTENDED, new org.apache.thrift.meta_data.FieldMetaData("isExtended", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowLocksRequest.class, metaDataMap); - } - - public ShowLocksRequest() { - this.isExtended = false; - - } - - /** - * Performs a deep copy on other. - */ - public ShowLocksRequest(ShowLocksRequest other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTablename()) { - this.tablename = other.tablename; - } - if (other.isSetPartname()) { - this.partname = other.partname; - } - this.isExtended = other.isExtended; - } - - public ShowLocksRequest deepCopy() { - return new ShowLocksRequest(this); - } - - @Override - public void clear() { - this.dbname = null; - this.tablename = null; - this.partname = null; - this.isExtended = false; - - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getTablename() { - return this.tablename; - } - - public void setTablename(String tablename) { - this.tablename = tablename; - } - - public void unsetTablename() { - this.tablename = null; - } - - /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ - public boolean isSetTablename() { - return this.tablename != null; - } - - public void setTablenameIsSet(boolean value) { - if (!value) { - this.tablename = null; - } - } - - public String getPartname() { - return this.partname; - } - - public void setPartname(String partname) { - this.partname = partname; - } - - public void unsetPartname() { - this.partname = null; - } - - /** Returns true if field partname is set (has been assigned a value) and false otherwise */ - public boolean isSetPartname() { - return this.partname != null; - } - - public void setPartnameIsSet(boolean value) { - if (!value) { - this.partname = null; - } - } - - public boolean isIsExtended() { - return this.isExtended; - } - - public void setIsExtended(boolean isExtended) { - this.isExtended = isExtended; - setIsExtendedIsSet(true); - } - - public void unsetIsExtended() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISEXTENDED_ISSET_ID); - } - - /** Returns true if field isExtended is set (has been assigned a value) and false otherwise */ - public boolean isSetIsExtended() { - return EncodingUtils.testBit(__isset_bitfield, __ISEXTENDED_ISSET_ID); - } - - public void setIsExtendedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISEXTENDED_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TABLENAME: - if (value == null) { - unsetTablename(); - } else { - setTablename((String)value); - } - break; - - case PARTNAME: - if (value == null) { - unsetPartname(); - } else { - setPartname((String)value); - } - break; - - case IS_EXTENDED: - if (value == null) { - unsetIsExtended(); - } else { - setIsExtended((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case TABLENAME: - return getTablename(); - - case PARTNAME: - return getPartname(); - - case IS_EXTENDED: - return isIsExtended(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case TABLENAME: - return isSetTablename(); - case PARTNAME: - return isSetPartname(); - case IS_EXTENDED: - return isSetIsExtended(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ShowLocksRequest) - return this.equals((ShowLocksRequest)that); - return false; - } - - public boolean equals(ShowLocksRequest that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tablename = true && this.isSetTablename(); - boolean that_present_tablename = true && that.isSetTablename(); - if (this_present_tablename || that_present_tablename) { - if (!(this_present_tablename && that_present_tablename)) - return false; - if (!this.tablename.equals(that.tablename)) - return false; - } - - boolean this_present_partname = true && this.isSetPartname(); - boolean that_present_partname = true && that.isSetPartname(); - if (this_present_partname || that_present_partname) { - if (!(this_present_partname && that_present_partname)) - return false; - if (!this.partname.equals(that.partname)) - return false; - } - - boolean this_present_isExtended = true && this.isSetIsExtended(); - boolean that_present_isExtended = true && that.isSetIsExtended(); - if (this_present_isExtended || that_present_isExtended) { - if (!(this_present_isExtended && that_present_isExtended)) - return false; - if (this.isExtended != that.isExtended) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_tablename = true && (isSetTablename()); - list.add(present_tablename); - if (present_tablename) - list.add(tablename); - - boolean present_partname = true && (isSetPartname()); - list.add(present_partname); - if (present_partname) - list.add(partname); - - boolean present_isExtended = true && (isSetIsExtended()); - list.add(present_isExtended); - if (present_isExtended) - list.add(isExtended); - - return list.hashCode(); - } - - @Override - public int compareTo(ShowLocksRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTablename()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartname()).compareTo(other.isSetPartname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partname, other.partname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsExtended()).compareTo(other.isSetIsExtended()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsExtended()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isExtended, other.isExtended); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ShowLocksRequest("); - boolean first = true; - - if (isSetDbname()) { - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - } - if (isSetTablename()) { - if (!first) sb.append(", "); - sb.append("tablename:"); - if (this.tablename == null) { - sb.append("null"); - } else { - sb.append(this.tablename); - } - first = false; - } - if (isSetPartname()) { - if (!first) sb.append(", "); - sb.append("partname:"); - if (this.partname == null) { - sb.append("null"); - } else { - sb.append(this.partname); - } - first = false; - } - if (isSetIsExtended()) { - if (!first) sb.append(", "); - sb.append("isExtended:"); - sb.append(this.isExtended); - 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 { - // 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 ShowLocksRequestStandardSchemeFactory implements SchemeFactory { - public ShowLocksRequestStandardScheme getScheme() { - return new ShowLocksRequestStandardScheme(); - } - } - - private static class ShowLocksRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ShowLocksRequest 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: // TABLENAME - 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 3: // PARTNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.partname = iprot.readString(); - struct.setPartnameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // IS_EXTENDED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isExtended = iprot.readBool(); - struct.setIsExtendedIsSet(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, ShowLocksRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbname != null) { - if (struct.isSetDbname()) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(struct.dbname); - oprot.writeFieldEnd(); - } - } - if (struct.tablename != null) { - if (struct.isSetTablename()) { - oprot.writeFieldBegin(TABLENAME_FIELD_DESC); - oprot.writeString(struct.tablename); - oprot.writeFieldEnd(); - } - } - if (struct.partname != null) { - if (struct.isSetPartname()) { - oprot.writeFieldBegin(PARTNAME_FIELD_DESC); - oprot.writeString(struct.partname); - oprot.writeFieldEnd(); - } - } - if (struct.isSetIsExtended()) { - oprot.writeFieldBegin(IS_EXTENDED_FIELD_DESC); - oprot.writeBool(struct.isExtended); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ShowLocksRequestTupleSchemeFactory implements SchemeFactory { - public ShowLocksRequestTupleScheme getScheme() { - return new ShowLocksRequestTupleScheme(); - } - } - - private static class ShowLocksRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ShowLocksRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetDbname()) { - optionals.set(0); - } - if (struct.isSetTablename()) { - optionals.set(1); - } - if (struct.isSetPartname()) { - optionals.set(2); - } - if (struct.isSetIsExtended()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetDbname()) { - oprot.writeString(struct.dbname); - } - if (struct.isSetTablename()) { - oprot.writeString(struct.tablename); - } - if (struct.isSetPartname()) { - oprot.writeString(struct.partname); - } - if (struct.isSetIsExtended()) { - oprot.writeBool(struct.isExtended); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ShowLocksRequest 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.tablename = iprot.readString(); - struct.setTablenameIsSet(true); - } - if (incoming.get(2)) { - struct.partname = iprot.readString(); - struct.setPartnameIsSet(true); - } - if (incoming.get(3)) { - struct.isExtended = iprot.readBool(); - struct.setIsExtendedIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java deleted file mode 100644 index 11ef050..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java +++ /dev/null @@ -1,449 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ShowLocksResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowLocksResponse"); - - private static final org.apache.thrift.protocol.TField LOCKS_FIELD_DESC = new org.apache.thrift.protocol.TField("locks", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ShowLocksResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ShowLocksResponseTupleSchemeFactory()); - } - - private List locks; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - LOCKS((short)1, "locks"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // LOCKS - return LOCKS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.LOCKS, new org.apache.thrift.meta_data.FieldMetaData("locks", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowLocksResponseElement.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowLocksResponse.class, metaDataMap); - } - - public ShowLocksResponse() { - } - - public ShowLocksResponse( - List locks) - { - this(); - this.locks = locks; - } - - /** - * Performs a deep copy on other. - */ - public ShowLocksResponse(ShowLocksResponse other) { - if (other.isSetLocks()) { - List __this__locks = new ArrayList(other.locks.size()); - for (ShowLocksResponseElement other_element : other.locks) { - __this__locks.add(new ShowLocksResponseElement(other_element)); - } - this.locks = __this__locks; - } - } - - public ShowLocksResponse deepCopy() { - return new ShowLocksResponse(this); - } - - @Override - public void clear() { - this.locks = null; - } - - public int getLocksSize() { - return (this.locks == null) ? 0 : this.locks.size(); - } - - public java.util.Iterator getLocksIterator() { - return (this.locks == null) ? null : this.locks.iterator(); - } - - public void addToLocks(ShowLocksResponseElement elem) { - if (this.locks == null) { - this.locks = new ArrayList(); - } - this.locks.add(elem); - } - - public List getLocks() { - return this.locks; - } - - public void setLocks(List locks) { - this.locks = locks; - } - - public void unsetLocks() { - this.locks = null; - } - - /** Returns true if field locks is set (has been assigned a value) and false otherwise */ - public boolean isSetLocks() { - return this.locks != null; - } - - public void setLocksIsSet(boolean value) { - if (!value) { - this.locks = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LOCKS: - if (value == null) { - unsetLocks(); - } else { - setLocks((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LOCKS: - return getLocks(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LOCKS: - return isSetLocks(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ShowLocksResponse) - return this.equals((ShowLocksResponse)that); - return false; - } - - public boolean equals(ShowLocksResponse that) { - if (that == null) - return false; - - boolean this_present_locks = true && this.isSetLocks(); - boolean that_present_locks = true && that.isSetLocks(); - if (this_present_locks || that_present_locks) { - if (!(this_present_locks && that_present_locks)) - return false; - if (!this.locks.equals(that.locks)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_locks = true && (isSetLocks()); - list.add(present_locks); - if (present_locks) - list.add(locks); - - return list.hashCode(); - } - - @Override - public int compareTo(ShowLocksResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLocks()).compareTo(other.isSetLocks()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLocks()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.locks, other.locks); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ShowLocksResponse("); - boolean first = true; - - sb.append("locks:"); - if (this.locks == null) { - sb.append("null"); - } else { - sb.append(this.locks); - } - 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 ShowLocksResponseStandardSchemeFactory implements SchemeFactory { - public ShowLocksResponseStandardScheme getScheme() { - return new ShowLocksResponseStandardScheme(); - } - } - - private static class ShowLocksResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ShowLocksResponse 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: // LOCKS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list532 = iprot.readListBegin(); - struct.locks = new ArrayList(_list532.size); - ShowLocksResponseElement _elem533; - for (int _i534 = 0; _i534 < _list532.size; ++_i534) - { - _elem533 = new ShowLocksResponseElement(); - _elem533.read(iprot); - struct.locks.add(_elem533); - } - iprot.readListEnd(); - } - struct.setLocksIsSet(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, ShowLocksResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.locks != null) { - oprot.writeFieldBegin(LOCKS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.locks.size())); - for (ShowLocksResponseElement _iter535 : struct.locks) - { - _iter535.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ShowLocksResponseTupleSchemeFactory implements SchemeFactory { - public ShowLocksResponseTupleScheme getScheme() { - return new ShowLocksResponseTupleScheme(); - } - } - - private static class ShowLocksResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetLocks()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetLocks()) { - { - oprot.writeI32(struct.locks.size()); - for (ShowLocksResponseElement _iter536 : struct.locks) - { - _iter536.write(oprot); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list537 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.locks = new ArrayList(_list537.size); - ShowLocksResponseElement _elem538; - for (int _i539 = 0; _i539 < _list537.size; ++_i539) - { - _elem538 = new ShowLocksResponseElement(); - _elem538.read(iprot); - struct.locks.add(_elem538); - } - } - struct.setLocksIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java deleted file mode 100644 index 4bd7a7e..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java +++ /dev/null @@ -1,1929 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ShowLocksResponseElement implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowLocksResponseElement"); - - private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1); - 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)2); - private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField PARTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partname", org.apache.thrift.protocol.TType.STRING, (short)4); - 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)5); - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)7); - private static final org.apache.thrift.protocol.TField LASTHEARTBEAT_FIELD_DESC = new org.apache.thrift.protocol.TField("lastheartbeat", org.apache.thrift.protocol.TType.I64, (short)8); - private static final org.apache.thrift.protocol.TField ACQUIREDAT_FIELD_DESC = new org.apache.thrift.protocol.TField("acquiredat", org.apache.thrift.protocol.TType.I64, (short)9); - private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)10); - private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)11); - private static final org.apache.thrift.protocol.TField HEARTBEAT_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("heartbeatCount", org.apache.thrift.protocol.TType.I32, (short)12); - private static final org.apache.thrift.protocol.TField AGENT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("agentInfo", org.apache.thrift.protocol.TType.STRING, (short)13); - private static final org.apache.thrift.protocol.TField BLOCKED_BY_EXT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockedByExtId", org.apache.thrift.protocol.TType.I64, (short)14); - private static final org.apache.thrift.protocol.TField BLOCKED_BY_INT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockedByIntId", org.apache.thrift.protocol.TType.I64, (short)15); - private static final org.apache.thrift.protocol.TField LOCK_ID_INTERNAL_FIELD_DESC = new org.apache.thrift.protocol.TField("lockIdInternal", org.apache.thrift.protocol.TType.I64, (short)16); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ShowLocksResponseElementStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ShowLocksResponseElementTupleSchemeFactory()); - } - - private long lockid; // required - private String dbname; // required - private String tablename; // optional - private String partname; // optional - private LockState state; // required - private LockType type; // required - private long txnid; // optional - private long lastheartbeat; // required - private long acquiredat; // optional - private String user; // required - private String hostname; // required - private int heartbeatCount; // optional - private String agentInfo; // optional - private long blockedByExtId; // optional - private long blockedByIntId; // optional - private long lockIdInternal; // 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 { - LOCKID((short)1, "lockid"), - DBNAME((short)2, "dbname"), - TABLENAME((short)3, "tablename"), - PARTNAME((short)4, "partname"), - /** - * - * @see LockState - */ - STATE((short)5, "state"), - /** - * - * @see LockType - */ - TYPE((short)6, "type"), - TXNID((short)7, "txnid"), - LASTHEARTBEAT((short)8, "lastheartbeat"), - ACQUIREDAT((short)9, "acquiredat"), - USER((short)10, "user"), - HOSTNAME((short)11, "hostname"), - HEARTBEAT_COUNT((short)12, "heartbeatCount"), - AGENT_INFO((short)13, "agentInfo"), - BLOCKED_BY_EXT_ID((short)14, "blockedByExtId"), - BLOCKED_BY_INT_ID((short)15, "blockedByIntId"), - LOCK_ID_INTERNAL((short)16, "lockIdInternal"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // LOCKID - return LOCKID; - case 2: // DBNAME - return DBNAME; - case 3: // TABLENAME - return TABLENAME; - case 4: // PARTNAME - return PARTNAME; - case 5: // STATE - return STATE; - case 6: // TYPE - return TYPE; - case 7: // TXNID - return TXNID; - case 8: // LASTHEARTBEAT - return LASTHEARTBEAT; - case 9: // ACQUIREDAT - return ACQUIREDAT; - case 10: // USER - return USER; - case 11: // HOSTNAME - return HOSTNAME; - case 12: // HEARTBEAT_COUNT - return HEARTBEAT_COUNT; - case 13: // AGENT_INFO - return AGENT_INFO; - case 14: // BLOCKED_BY_EXT_ID - return BLOCKED_BY_EXT_ID; - case 15: // BLOCKED_BY_INT_ID - return BLOCKED_BY_INT_ID; - case 16: // LOCK_ID_INTERNAL - return LOCK_ID_INTERNAL; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __LOCKID_ISSET_ID = 0; - private static final int __TXNID_ISSET_ID = 1; - private static final int __LASTHEARTBEAT_ISSET_ID = 2; - private static final int __ACQUIREDAT_ISSET_ID = 3; - private static final int __HEARTBEATCOUNT_ISSET_ID = 4; - private static final int __BLOCKEDBYEXTID_ISSET_ID = 5; - private static final int __BLOCKEDBYINTID_ISSET_ID = 6; - private static final int __LOCKIDINTERNAL_ISSET_ID = 7; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.TABLENAME,_Fields.PARTNAME,_Fields.TXNID,_Fields.ACQUIREDAT,_Fields.HEARTBEAT_COUNT,_Fields.AGENT_INFO,_Fields.BLOCKED_BY_EXT_ID,_Fields.BLOCKED_BY_INT_ID,_Fields.LOCK_ID_INTERNAL}; - 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); - tmpMap.put(_Fields.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARTNAME, new org.apache.thrift.meta_data.FieldMetaData("partname", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockState.class))); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockType.class))); - tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.LASTHEARTBEAT, new org.apache.thrift.meta_data.FieldMetaData("lastheartbeat", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.ACQUIREDAT, new org.apache.thrift.meta_data.FieldMetaData("acquiredat", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.HEARTBEAT_COUNT, new org.apache.thrift.meta_data.FieldMetaData("heartbeatCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.AGENT_INFO, new org.apache.thrift.meta_data.FieldMetaData("agentInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.BLOCKED_BY_EXT_ID, new org.apache.thrift.meta_data.FieldMetaData("blockedByExtId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.BLOCKED_BY_INT_ID, new org.apache.thrift.meta_data.FieldMetaData("blockedByIntId", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.LOCK_ID_INTERNAL, new org.apache.thrift.meta_data.FieldMetaData("lockIdInternal", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowLocksResponseElement.class, metaDataMap); - } - - public ShowLocksResponseElement() { - this.heartbeatCount = 0; - - } - - public ShowLocksResponseElement( - long lockid, - String dbname, - LockState state, - LockType type, - long lastheartbeat, - String user, - String hostname) - { - this(); - this.lockid = lockid; - setLockidIsSet(true); - this.dbname = dbname; - this.state = state; - this.type = type; - this.lastheartbeat = lastheartbeat; - setLastheartbeatIsSet(true); - this.user = user; - this.hostname = hostname; - } - - /** - * Performs a deep copy on other. - */ - public ShowLocksResponseElement(ShowLocksResponseElement other) { - __isset_bitfield = other.__isset_bitfield; - this.lockid = other.lockid; - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTablename()) { - this.tablename = other.tablename; - } - if (other.isSetPartname()) { - this.partname = other.partname; - } - if (other.isSetState()) { - this.state = other.state; - } - if (other.isSetType()) { - this.type = other.type; - } - this.txnid = other.txnid; - this.lastheartbeat = other.lastheartbeat; - this.acquiredat = other.acquiredat; - if (other.isSetUser()) { - this.user = other.user; - } - if (other.isSetHostname()) { - this.hostname = other.hostname; - } - this.heartbeatCount = other.heartbeatCount; - if (other.isSetAgentInfo()) { - this.agentInfo = other.agentInfo; - } - this.blockedByExtId = other.blockedByExtId; - this.blockedByIntId = other.blockedByIntId; - this.lockIdInternal = other.lockIdInternal; - } - - public ShowLocksResponseElement deepCopy() { - return new ShowLocksResponseElement(this); - } - - @Override - public void clear() { - setLockidIsSet(false); - this.lockid = 0; - this.dbname = null; - this.tablename = null; - this.partname = null; - this.state = null; - this.type = null; - setTxnidIsSet(false); - this.txnid = 0; - setLastheartbeatIsSet(false); - this.lastheartbeat = 0; - setAcquiredatIsSet(false); - this.acquiredat = 0; - this.user = null; - this.hostname = null; - this.heartbeatCount = 0; - - this.agentInfo = null; - setBlockedByExtIdIsSet(false); - this.blockedByExtId = 0; - setBlockedByIntIdIsSet(false); - this.blockedByIntId = 0; - setLockIdInternalIsSet(false); - this.lockIdInternal = 0; - } - - public long getLockid() { - return this.lockid; - } - - public void setLockid(long lockid) { - this.lockid = lockid; - setLockidIsSet(true); - } - - public void unsetLockid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKID_ISSET_ID); - } - - /** Returns true if field lockid is set (has been assigned a value) and false otherwise */ - public boolean isSetLockid() { - return EncodingUtils.testBit(__isset_bitfield, __LOCKID_ISSET_ID); - } - - public void setLockidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value); - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getTablename() { - return this.tablename; - } - - public void setTablename(String tablename) { - this.tablename = tablename; - } - - public void unsetTablename() { - this.tablename = null; - } - - /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ - public boolean isSetTablename() { - return this.tablename != null; - } - - public void setTablenameIsSet(boolean value) { - if (!value) { - this.tablename = null; - } - } - - public String getPartname() { - return this.partname; - } - - public void setPartname(String partname) { - this.partname = partname; - } - - public void unsetPartname() { - this.partname = null; - } - - /** Returns true if field partname is set (has been assigned a value) and false otherwise */ - public boolean isSetPartname() { - return this.partname != null; - } - - public void setPartnameIsSet(boolean value) { - if (!value) { - this.partname = null; - } - } - - /** - * - * @see LockState - */ - public LockState getState() { - return this.state; - } - - /** - * - * @see LockState - */ - public void setState(LockState state) { - this.state = state; - } - - public void unsetState() { - this.state = null; - } - - /** Returns true if field state is set (has been assigned a value) and false otherwise */ - public boolean isSetState() { - return this.state != null; - } - - public void setStateIsSet(boolean value) { - if (!value) { - this.state = null; - } - } - - /** - * - * @see LockType - */ - public LockType getType() { - return this.type; - } - - /** - * - * @see LockType - */ - public void setType(LockType type) { - this.type = type; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - public long getTxnid() { - return this.txnid; - } - - public void setTxnid(long txnid) { - this.txnid = txnid; - setTxnidIsSet(true); - } - - public void unsetTxnid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ - public boolean isSetTxnid() { - return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); - } - - public void setTxnidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); - } - - public long getLastheartbeat() { - return this.lastheartbeat; - } - - public void setLastheartbeat(long lastheartbeat) { - this.lastheartbeat = lastheartbeat; - setLastheartbeatIsSet(true); - } - - public void unsetLastheartbeat() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTHEARTBEAT_ISSET_ID); - } - - /** Returns true if field lastheartbeat is set (has been assigned a value) and false otherwise */ - public boolean isSetLastheartbeat() { - return EncodingUtils.testBit(__isset_bitfield, __LASTHEARTBEAT_ISSET_ID); - } - - public void setLastheartbeatIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTHEARTBEAT_ISSET_ID, value); - } - - public long getAcquiredat() { - return this.acquiredat; - } - - public void setAcquiredat(long acquiredat) { - this.acquiredat = acquiredat; - setAcquiredatIsSet(true); - } - - public void unsetAcquiredat() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ACQUIREDAT_ISSET_ID); - } - - /** Returns true if field acquiredat is set (has been assigned a value) and false otherwise */ - public boolean isSetAcquiredat() { - return EncodingUtils.testBit(__isset_bitfield, __ACQUIREDAT_ISSET_ID); - } - - public void setAcquiredatIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ACQUIREDAT_ISSET_ID, value); - } - - public String getUser() { - return this.user; - } - - public void setUser(String user) { - this.user = user; - } - - public void unsetUser() { - this.user = null; - } - - /** Returns true if field user is set (has been assigned a value) and false otherwise */ - public boolean isSetUser() { - return this.user != null; - } - - public void setUserIsSet(boolean value) { - if (!value) { - this.user = null; - } - } - - public String getHostname() { - return this.hostname; - } - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - public void unsetHostname() { - this.hostname = null; - } - - /** Returns true if field hostname is set (has been assigned a value) and false otherwise */ - public boolean isSetHostname() { - return this.hostname != null; - } - - public void setHostnameIsSet(boolean value) { - if (!value) { - this.hostname = null; - } - } - - public int getHeartbeatCount() { - return this.heartbeatCount; - } - - public void setHeartbeatCount(int heartbeatCount) { - this.heartbeatCount = heartbeatCount; - setHeartbeatCountIsSet(true); - } - - public void unsetHeartbeatCount() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID); - } - - /** Returns true if field heartbeatCount is set (has been assigned a value) and false otherwise */ - public boolean isSetHeartbeatCount() { - return EncodingUtils.testBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID); - } - - public void setHeartbeatCountIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID, value); - } - - public String getAgentInfo() { - return this.agentInfo; - } - - public void setAgentInfo(String agentInfo) { - this.agentInfo = agentInfo; - } - - public void unsetAgentInfo() { - this.agentInfo = null; - } - - /** Returns true if field agentInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetAgentInfo() { - return this.agentInfo != null; - } - - public void setAgentInfoIsSet(boolean value) { - if (!value) { - this.agentInfo = null; - } - } - - public long getBlockedByExtId() { - return this.blockedByExtId; - } - - public void setBlockedByExtId(long blockedByExtId) { - this.blockedByExtId = blockedByExtId; - setBlockedByExtIdIsSet(true); - } - - public void unsetBlockedByExtId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKEDBYEXTID_ISSET_ID); - } - - /** Returns true if field blockedByExtId is set (has been assigned a value) and false otherwise */ - public boolean isSetBlockedByExtId() { - return EncodingUtils.testBit(__isset_bitfield, __BLOCKEDBYEXTID_ISSET_ID); - } - - public void setBlockedByExtIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKEDBYEXTID_ISSET_ID, value); - } - - public long getBlockedByIntId() { - return this.blockedByIntId; - } - - public void setBlockedByIntId(long blockedByIntId) { - this.blockedByIntId = blockedByIntId; - setBlockedByIntIdIsSet(true); - } - - public void unsetBlockedByIntId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKEDBYINTID_ISSET_ID); - } - - /** Returns true if field blockedByIntId is set (has been assigned a value) and false otherwise */ - public boolean isSetBlockedByIntId() { - return EncodingUtils.testBit(__isset_bitfield, __BLOCKEDBYINTID_ISSET_ID); - } - - public void setBlockedByIntIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKEDBYINTID_ISSET_ID, value); - } - - public long getLockIdInternal() { - return this.lockIdInternal; - } - - public void setLockIdInternal(long lockIdInternal) { - this.lockIdInternal = lockIdInternal; - setLockIdInternalIsSet(true); - } - - public void unsetLockIdInternal() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKIDINTERNAL_ISSET_ID); - } - - /** Returns true if field lockIdInternal is set (has been assigned a value) and false otherwise */ - public boolean isSetLockIdInternal() { - return EncodingUtils.testBit(__isset_bitfield, __LOCKIDINTERNAL_ISSET_ID); - } - - public void setLockIdInternalIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKIDINTERNAL_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LOCKID: - if (value == null) { - unsetLockid(); - } else { - setLockid((Long)value); - } - break; - - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TABLENAME: - if (value == null) { - unsetTablename(); - } else { - setTablename((String)value); - } - break; - - case PARTNAME: - if (value == null) { - unsetPartname(); - } else { - setPartname((String)value); - } - break; - - case STATE: - if (value == null) { - unsetState(); - } else { - setState((LockState)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((LockType)value); - } - break; - - case TXNID: - if (value == null) { - unsetTxnid(); - } else { - setTxnid((Long)value); - } - break; - - case LASTHEARTBEAT: - if (value == null) { - unsetLastheartbeat(); - } else { - setLastheartbeat((Long)value); - } - break; - - case ACQUIREDAT: - if (value == null) { - unsetAcquiredat(); - } else { - setAcquiredat((Long)value); - } - break; - - case USER: - if (value == null) { - unsetUser(); - } else { - setUser((String)value); - } - break; - - case HOSTNAME: - if (value == null) { - unsetHostname(); - } else { - setHostname((String)value); - } - break; - - case HEARTBEAT_COUNT: - if (value == null) { - unsetHeartbeatCount(); - } else { - setHeartbeatCount((Integer)value); - } - break; - - case AGENT_INFO: - if (value == null) { - unsetAgentInfo(); - } else { - setAgentInfo((String)value); - } - break; - - case BLOCKED_BY_EXT_ID: - if (value == null) { - unsetBlockedByExtId(); - } else { - setBlockedByExtId((Long)value); - } - break; - - case BLOCKED_BY_INT_ID: - if (value == null) { - unsetBlockedByIntId(); - } else { - setBlockedByIntId((Long)value); - } - break; - - case LOCK_ID_INTERNAL: - if (value == null) { - unsetLockIdInternal(); - } else { - setLockIdInternal((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LOCKID: - return getLockid(); - - case DBNAME: - return getDbname(); - - case TABLENAME: - return getTablename(); - - case PARTNAME: - return getPartname(); - - case STATE: - return getState(); - - case TYPE: - return getType(); - - case TXNID: - return getTxnid(); - - case LASTHEARTBEAT: - return getLastheartbeat(); - - case ACQUIREDAT: - return getAcquiredat(); - - case USER: - return getUser(); - - case HOSTNAME: - return getHostname(); - - case HEARTBEAT_COUNT: - return getHeartbeatCount(); - - case AGENT_INFO: - return getAgentInfo(); - - case BLOCKED_BY_EXT_ID: - return getBlockedByExtId(); - - case BLOCKED_BY_INT_ID: - return getBlockedByIntId(); - - case LOCK_ID_INTERNAL: - return getLockIdInternal(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LOCKID: - return isSetLockid(); - case DBNAME: - return isSetDbname(); - case TABLENAME: - return isSetTablename(); - case PARTNAME: - return isSetPartname(); - case STATE: - return isSetState(); - case TYPE: - return isSetType(); - case TXNID: - return isSetTxnid(); - case LASTHEARTBEAT: - return isSetLastheartbeat(); - case ACQUIREDAT: - return isSetAcquiredat(); - case USER: - return isSetUser(); - case HOSTNAME: - return isSetHostname(); - case HEARTBEAT_COUNT: - return isSetHeartbeatCount(); - case AGENT_INFO: - return isSetAgentInfo(); - case BLOCKED_BY_EXT_ID: - return isSetBlockedByExtId(); - case BLOCKED_BY_INT_ID: - return isSetBlockedByIntId(); - case LOCK_ID_INTERNAL: - return isSetLockIdInternal(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ShowLocksResponseElement) - return this.equals((ShowLocksResponseElement)that); - return false; - } - - public boolean equals(ShowLocksResponseElement that) { - if (that == null) - return false; - - boolean this_present_lockid = true; - boolean that_present_lockid = true; - if (this_present_lockid || that_present_lockid) { - if (!(this_present_lockid && that_present_lockid)) - return false; - if (this.lockid != that.lockid) - return false; - } - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tablename = true && this.isSetTablename(); - boolean that_present_tablename = true && that.isSetTablename(); - if (this_present_tablename || that_present_tablename) { - if (!(this_present_tablename && that_present_tablename)) - return false; - if (!this.tablename.equals(that.tablename)) - return false; - } - - boolean this_present_partname = true && this.isSetPartname(); - boolean that_present_partname = true && that.isSetPartname(); - if (this_present_partname || that_present_partname) { - if (!(this_present_partname && that_present_partname)) - return false; - if (!this.partname.equals(that.partname)) - return false; - } - - boolean this_present_state = true && this.isSetState(); - boolean that_present_state = true && that.isSetState(); - if (this_present_state || that_present_state) { - if (!(this_present_state && that_present_state)) - return false; - if (!this.state.equals(that.state)) - return false; - } - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - boolean this_present_txnid = true && this.isSetTxnid(); - boolean that_present_txnid = true && that.isSetTxnid(); - if (this_present_txnid || that_present_txnid) { - if (!(this_present_txnid && that_present_txnid)) - return false; - if (this.txnid != that.txnid) - return false; - } - - boolean this_present_lastheartbeat = true; - boolean that_present_lastheartbeat = true; - if (this_present_lastheartbeat || that_present_lastheartbeat) { - if (!(this_present_lastheartbeat && that_present_lastheartbeat)) - return false; - if (this.lastheartbeat != that.lastheartbeat) - return false; - } - - boolean this_present_acquiredat = true && this.isSetAcquiredat(); - boolean that_present_acquiredat = true && that.isSetAcquiredat(); - if (this_present_acquiredat || that_present_acquiredat) { - if (!(this_present_acquiredat && that_present_acquiredat)) - return false; - if (this.acquiredat != that.acquiredat) - return false; - } - - boolean this_present_user = true && this.isSetUser(); - boolean that_present_user = true && that.isSetUser(); - if (this_present_user || that_present_user) { - if (!(this_present_user && that_present_user)) - return false; - if (!this.user.equals(that.user)) - return false; - } - - boolean this_present_hostname = true && this.isSetHostname(); - boolean that_present_hostname = true && that.isSetHostname(); - if (this_present_hostname || that_present_hostname) { - if (!(this_present_hostname && that_present_hostname)) - return false; - if (!this.hostname.equals(that.hostname)) - return false; - } - - boolean this_present_heartbeatCount = true && this.isSetHeartbeatCount(); - boolean that_present_heartbeatCount = true && that.isSetHeartbeatCount(); - if (this_present_heartbeatCount || that_present_heartbeatCount) { - if (!(this_present_heartbeatCount && that_present_heartbeatCount)) - return false; - if (this.heartbeatCount != that.heartbeatCount) - return false; - } - - boolean this_present_agentInfo = true && this.isSetAgentInfo(); - boolean that_present_agentInfo = true && that.isSetAgentInfo(); - if (this_present_agentInfo || that_present_agentInfo) { - if (!(this_present_agentInfo && that_present_agentInfo)) - return false; - if (!this.agentInfo.equals(that.agentInfo)) - return false; - } - - boolean this_present_blockedByExtId = true && this.isSetBlockedByExtId(); - boolean that_present_blockedByExtId = true && that.isSetBlockedByExtId(); - if (this_present_blockedByExtId || that_present_blockedByExtId) { - if (!(this_present_blockedByExtId && that_present_blockedByExtId)) - return false; - if (this.blockedByExtId != that.blockedByExtId) - return false; - } - - boolean this_present_blockedByIntId = true && this.isSetBlockedByIntId(); - boolean that_present_blockedByIntId = true && that.isSetBlockedByIntId(); - if (this_present_blockedByIntId || that_present_blockedByIntId) { - if (!(this_present_blockedByIntId && that_present_blockedByIntId)) - return false; - if (this.blockedByIntId != that.blockedByIntId) - return false; - } - - boolean this_present_lockIdInternal = true && this.isSetLockIdInternal(); - boolean that_present_lockIdInternal = true && that.isSetLockIdInternal(); - if (this_present_lockIdInternal || that_present_lockIdInternal) { - if (!(this_present_lockIdInternal && that_present_lockIdInternal)) - return false; - if (this.lockIdInternal != that.lockIdInternal) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_lockid = true; - list.add(present_lockid); - if (present_lockid) - list.add(lockid); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_tablename = true && (isSetTablename()); - list.add(present_tablename); - if (present_tablename) - list.add(tablename); - - boolean present_partname = true && (isSetPartname()); - list.add(present_partname); - if (present_partname) - list.add(partname); - - boolean present_state = true && (isSetState()); - list.add(present_state); - if (present_state) - list.add(state.getValue()); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type.getValue()); - - boolean present_txnid = true && (isSetTxnid()); - list.add(present_txnid); - if (present_txnid) - list.add(txnid); - - boolean present_lastheartbeat = true; - list.add(present_lastheartbeat); - if (present_lastheartbeat) - list.add(lastheartbeat); - - boolean present_acquiredat = true && (isSetAcquiredat()); - list.add(present_acquiredat); - if (present_acquiredat) - list.add(acquiredat); - - boolean present_user = true && (isSetUser()); - list.add(present_user); - if (present_user) - list.add(user); - - boolean present_hostname = true && (isSetHostname()); - list.add(present_hostname); - if (present_hostname) - list.add(hostname); - - boolean present_heartbeatCount = true && (isSetHeartbeatCount()); - list.add(present_heartbeatCount); - if (present_heartbeatCount) - list.add(heartbeatCount); - - boolean present_agentInfo = true && (isSetAgentInfo()); - list.add(present_agentInfo); - if (present_agentInfo) - list.add(agentInfo); - - boolean present_blockedByExtId = true && (isSetBlockedByExtId()); - list.add(present_blockedByExtId); - if (present_blockedByExtId) - list.add(blockedByExtId); - - boolean present_blockedByIntId = true && (isSetBlockedByIntId()); - list.add(present_blockedByIntId); - if (present_blockedByIntId) - list.add(blockedByIntId); - - boolean present_lockIdInternal = true && (isSetLockIdInternal()); - list.add(present_lockIdInternal); - if (present_lockIdInternal) - list.add(lockIdInternal); - - return list.hashCode(); - } - - @Override - public int compareTo(ShowLocksResponseElement other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLockid()).compareTo(other.isSetLockid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLockid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, other.lockid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTablename()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartname()).compareTo(other.isSetPartname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partname, other.partname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetState()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTxnid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLastheartbeat()).compareTo(other.isSetLastheartbeat()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLastheartbeat()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastheartbeat, other.lastheartbeat); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAcquiredat()).compareTo(other.isSetAcquiredat()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAcquiredat()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acquiredat, other.acquiredat); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUser()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHostname()).compareTo(other.isSetHostname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHostname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, other.hostname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHeartbeatCount()).compareTo(other.isSetHeartbeatCount()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHeartbeatCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.heartbeatCount, other.heartbeatCount); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAgentInfo()).compareTo(other.isSetAgentInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentInfo, other.agentInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBlockedByExtId()).compareTo(other.isSetBlockedByExtId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBlockedByExtId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockedByExtId, other.blockedByExtId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBlockedByIntId()).compareTo(other.isSetBlockedByIntId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBlockedByIntId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockedByIntId, other.blockedByIntId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLockIdInternal()).compareTo(other.isSetLockIdInternal()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLockIdInternal()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockIdInternal, other.lockIdInternal); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("ShowLocksResponseElement("); - boolean first = true; - - sb.append("lockid:"); - sb.append(this.lockid); - first = false; - if (!first) sb.append(", "); - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (isSetTablename()) { - if (!first) sb.append(", "); - sb.append("tablename:"); - if (this.tablename == null) { - sb.append("null"); - } else { - sb.append(this.tablename); - } - first = false; - } - if (isSetPartname()) { - if (!first) sb.append(", "); - sb.append("partname:"); - if (this.partname == null) { - sb.append("null"); - } else { - sb.append(this.partname); - } - first = false; - } - if (!first) sb.append(", "); - sb.append("state:"); - if (this.state == null) { - sb.append("null"); - } else { - sb.append(this.state); - } - first = false; - if (!first) sb.append(", "); - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - if (isSetTxnid()) { - if (!first) sb.append(", "); - sb.append("txnid:"); - sb.append(this.txnid); - first = false; - } - if (!first) sb.append(", "); - sb.append("lastheartbeat:"); - sb.append(this.lastheartbeat); - first = false; - if (isSetAcquiredat()) { - if (!first) sb.append(", "); - sb.append("acquiredat:"); - sb.append(this.acquiredat); - first = false; - } - if (!first) sb.append(", "); - sb.append("user:"); - if (this.user == null) { - sb.append("null"); - } else { - sb.append(this.user); - } - first = false; - if (!first) sb.append(", "); - sb.append("hostname:"); - if (this.hostname == null) { - sb.append("null"); - } else { - sb.append(this.hostname); - } - first = false; - if (isSetHeartbeatCount()) { - if (!first) sb.append(", "); - sb.append("heartbeatCount:"); - sb.append(this.heartbeatCount); - first = false; - } - if (isSetAgentInfo()) { - if (!first) sb.append(", "); - sb.append("agentInfo:"); - if (this.agentInfo == null) { - sb.append("null"); - } else { - sb.append(this.agentInfo); - } - first = false; - } - if (isSetBlockedByExtId()) { - if (!first) sb.append(", "); - sb.append("blockedByExtId:"); - sb.append(this.blockedByExtId); - first = false; - } - if (isSetBlockedByIntId()) { - if (!first) sb.append(", "); - sb.append("blockedByIntId:"); - sb.append(this.blockedByIntId); - first = false; - } - if (isSetLockIdInternal()) { - if (!first) sb.append(", "); - sb.append("lockIdInternal:"); - sb.append(this.lockIdInternal); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetLockid()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'lockid' is unset! Struct:" + toString()); - } - - if (!isSetDbname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); - } - - if (!isSetState()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); - } - - if (!isSetType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); - } - - if (!isSetLastheartbeat()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'lastheartbeat' is unset! Struct:" + toString()); - } - - if (!isSetUser()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'user' is unset! Struct:" + toString()); - } - - if (!isSetHostname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'hostname' is unset! Struct:" + toString()); - } - - // 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 { - // 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 ShowLocksResponseElementStandardSchemeFactory implements SchemeFactory { - public ShowLocksResponseElementStandardScheme getScheme() { - return new ShowLocksResponseElementStandardScheme(); - } - } - - private static class ShowLocksResponseElementStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ShowLocksResponseElement 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: // LOCKID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.lockid = iprot.readI64(); - struct.setLockidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // 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 3: // TABLENAME - 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: // PARTNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.partname = iprot.readString(); - struct.setPartnameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // STATE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.state = org.apache.hadoop.hive.metastore.api.LockState.findByValue(iprot.readI32()); - struct.setStateIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.type = org.apache.hadoop.hive.metastore.api.LockType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // TXNID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // LASTHEARTBEAT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.lastheartbeat = iprot.readI64(); - struct.setLastheartbeatIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // ACQUIREDAT - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.acquiredat = iprot.readI64(); - struct.setAcquiredatIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // USER - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.user = iprot.readString(); - struct.setUserIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // HOSTNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.hostname = iprot.readString(); - struct.setHostnameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // HEARTBEAT_COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.heartbeatCount = iprot.readI32(); - struct.setHeartbeatCountIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 13: // AGENT_INFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.agentInfo = iprot.readString(); - struct.setAgentInfoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 14: // BLOCKED_BY_EXT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.blockedByExtId = iprot.readI64(); - struct.setBlockedByExtIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 15: // BLOCKED_BY_INT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.blockedByIntId = iprot.readI64(); - struct.setBlockedByIntIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 16: // LOCK_ID_INTERNAL - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.lockIdInternal = iprot.readI64(); - struct.setLockIdInternalIsSet(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, ShowLocksResponseElement struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(LOCKID_FIELD_DESC); - oprot.writeI64(struct.lockid); - oprot.writeFieldEnd(); - if (struct.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(struct.dbname); - oprot.writeFieldEnd(); - } - if (struct.tablename != null) { - if (struct.isSetTablename()) { - oprot.writeFieldBegin(TABLENAME_FIELD_DESC); - oprot.writeString(struct.tablename); - oprot.writeFieldEnd(); - } - } - if (struct.partname != null) { - if (struct.isSetPartname()) { - oprot.writeFieldBegin(PARTNAME_FIELD_DESC); - oprot.writeString(struct.partname); - oprot.writeFieldEnd(); - } - } - if (struct.state != null) { - oprot.writeFieldBegin(STATE_FIELD_DESC); - oprot.writeI32(struct.state.getValue()); - oprot.writeFieldEnd(); - } - if (struct.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI32(struct.type.getValue()); - oprot.writeFieldEnd(); - } - if (struct.isSetTxnid()) { - oprot.writeFieldBegin(TXNID_FIELD_DESC); - oprot.writeI64(struct.txnid); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(LASTHEARTBEAT_FIELD_DESC); - oprot.writeI64(struct.lastheartbeat); - oprot.writeFieldEnd(); - if (struct.isSetAcquiredat()) { - oprot.writeFieldBegin(ACQUIREDAT_FIELD_DESC); - oprot.writeI64(struct.acquiredat); - oprot.writeFieldEnd(); - } - if (struct.user != null) { - oprot.writeFieldBegin(USER_FIELD_DESC); - oprot.writeString(struct.user); - oprot.writeFieldEnd(); - } - if (struct.hostname != null) { - oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); - oprot.writeString(struct.hostname); - oprot.writeFieldEnd(); - } - if (struct.isSetHeartbeatCount()) { - oprot.writeFieldBegin(HEARTBEAT_COUNT_FIELD_DESC); - oprot.writeI32(struct.heartbeatCount); - oprot.writeFieldEnd(); - } - if (struct.agentInfo != null) { - if (struct.isSetAgentInfo()) { - oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC); - oprot.writeString(struct.agentInfo); - oprot.writeFieldEnd(); - } - } - if (struct.isSetBlockedByExtId()) { - oprot.writeFieldBegin(BLOCKED_BY_EXT_ID_FIELD_DESC); - oprot.writeI64(struct.blockedByExtId); - oprot.writeFieldEnd(); - } - if (struct.isSetBlockedByIntId()) { - oprot.writeFieldBegin(BLOCKED_BY_INT_ID_FIELD_DESC); - oprot.writeI64(struct.blockedByIntId); - oprot.writeFieldEnd(); - } - if (struct.isSetLockIdInternal()) { - oprot.writeFieldBegin(LOCK_ID_INTERNAL_FIELD_DESC); - oprot.writeI64(struct.lockIdInternal); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ShowLocksResponseElementTupleSchemeFactory implements SchemeFactory { - public ShowLocksResponseElementTupleScheme getScheme() { - return new ShowLocksResponseElementTupleScheme(); - } - } - - private static class ShowLocksResponseElementTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponseElement struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.lockid); - oprot.writeString(struct.dbname); - oprot.writeI32(struct.state.getValue()); - oprot.writeI32(struct.type.getValue()); - oprot.writeI64(struct.lastheartbeat); - oprot.writeString(struct.user); - oprot.writeString(struct.hostname); - BitSet optionals = new BitSet(); - if (struct.isSetTablename()) { - optionals.set(0); - } - if (struct.isSetPartname()) { - optionals.set(1); - } - if (struct.isSetTxnid()) { - optionals.set(2); - } - if (struct.isSetAcquiredat()) { - optionals.set(3); - } - if (struct.isSetHeartbeatCount()) { - optionals.set(4); - } - if (struct.isSetAgentInfo()) { - optionals.set(5); - } - if (struct.isSetBlockedByExtId()) { - optionals.set(6); - } - if (struct.isSetBlockedByIntId()) { - optionals.set(7); - } - if (struct.isSetLockIdInternal()) { - optionals.set(8); - } - oprot.writeBitSet(optionals, 9); - if (struct.isSetTablename()) { - oprot.writeString(struct.tablename); - } - if (struct.isSetPartname()) { - oprot.writeString(struct.partname); - } - if (struct.isSetTxnid()) { - oprot.writeI64(struct.txnid); - } - if (struct.isSetAcquiredat()) { - oprot.writeI64(struct.acquiredat); - } - if (struct.isSetHeartbeatCount()) { - oprot.writeI32(struct.heartbeatCount); - } - if (struct.isSetAgentInfo()) { - oprot.writeString(struct.agentInfo); - } - if (struct.isSetBlockedByExtId()) { - oprot.writeI64(struct.blockedByExtId); - } - if (struct.isSetBlockedByIntId()) { - oprot.writeI64(struct.blockedByIntId); - } - if (struct.isSetLockIdInternal()) { - oprot.writeI64(struct.lockIdInternal); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponseElement struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.lockid = iprot.readI64(); - struct.setLockidIsSet(true); - struct.dbname = iprot.readString(); - struct.setDbnameIsSet(true); - struct.state = org.apache.hadoop.hive.metastore.api.LockState.findByValue(iprot.readI32()); - struct.setStateIsSet(true); - struct.type = org.apache.hadoop.hive.metastore.api.LockType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - struct.lastheartbeat = iprot.readI64(); - struct.setLastheartbeatIsSet(true); - struct.user = iprot.readString(); - struct.setUserIsSet(true); - struct.hostname = iprot.readString(); - struct.setHostnameIsSet(true); - BitSet incoming = iprot.readBitSet(9); - if (incoming.get(0)) { - struct.tablename = iprot.readString(); - struct.setTablenameIsSet(true); - } - if (incoming.get(1)) { - struct.partname = iprot.readString(); - struct.setPartnameIsSet(true); - } - if (incoming.get(2)) { - struct.txnid = iprot.readI64(); - struct.setTxnidIsSet(true); - } - if (incoming.get(3)) { - struct.acquiredat = iprot.readI64(); - struct.setAcquiredatIsSet(true); - } - if (incoming.get(4)) { - struct.heartbeatCount = iprot.readI32(); - struct.setHeartbeatCountIsSet(true); - } - if (incoming.get(5)) { - struct.agentInfo = iprot.readString(); - struct.setAgentInfoIsSet(true); - } - if (incoming.get(6)) { - struct.blockedByExtId = iprot.readI64(); - struct.setBlockedByExtIdIsSet(true); - } - if (incoming.get(7)) { - struct.blockedByIntId = iprot.readI64(); - struct.setBlockedByIntIdIsSet(true); - } - if (incoming.get(8)) { - struct.lockIdInternal = iprot.readI64(); - struct.setLockIdInternalIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index c32f50c..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java +++ /dev/null @@ -1,834 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class SkewedInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SkewedInfo"); - - private static final org.apache.thrift.protocol.TField SKEWED_COL_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("skewedColNames", org.apache.thrift.protocol.TType.LIST, (short)1); - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SKEWED_COL_NAMES((short)1, "skewedColNames"), - SKEWED_COL_VALUES((short)2, "skewedColValues"), - SKEWED_COL_VALUE_LOCATION_MAPS((short)3, "skewedColValueLocationMaps"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SKEWED_COL_NAMES - return SKEWED_COL_NAMES; - case 2: // SKEWED_COL_VALUES - return SKEWED_COL_VALUES; - case 3: // SKEWED_COL_VALUE_LOCATION_MAPS - return SKEWED_COL_VALUE_LOCATION_MAPS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SKEWED_COL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("skewedColNames", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.SKEWED_COL_VALUES, new org.apache.thrift.meta_data.FieldMetaData("skewedColValues", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.SKEWED_COL_VALUE_LOCATION_MAPS, new org.apache.thrift.meta_data.FieldMetaData("skewedColValueLocationMaps", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SkewedInfo.class, metaDataMap); - } - - public SkewedInfo() { - } - - public SkewedInfo( - List skewedColNames, - List> skewedColValues, - Map,String> skewedColValueLocationMaps) - { - this(); - this.skewedColNames = skewedColNames; - this.skewedColValues = skewedColValues; - this.skewedColValueLocationMaps = skewedColValueLocationMaps; - } - - /** - * Performs a deep copy on other. - */ - public SkewedInfo(SkewedInfo other) { - if (other.isSetSkewedColNames()) { - List __this__skewedColNames = new ArrayList(other.skewedColNames); - this.skewedColNames = __this__skewedColNames; - } - if (other.isSetSkewedColValues()) { - List> __this__skewedColValues = new ArrayList>(other.skewedColValues.size()); - for (List other_element : other.skewedColValues) { - List __this__skewedColValues_copy = new ArrayList(other_element); - __this__skewedColValues.add(__this__skewedColValues_copy); - } - this.skewedColValues = __this__skewedColValues; - } - if (other.isSetSkewedColValueLocationMaps()) { - Map,String> __this__skewedColValueLocationMaps = new HashMap,String>(other.skewedColValueLocationMaps.size()); - for (Map.Entry, String> other_element : other.skewedColValueLocationMaps.entrySet()) { - - List other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - List __this__skewedColValueLocationMaps_copy_key = new ArrayList(other_element_key); - - String __this__skewedColValueLocationMaps_copy_value = other_element_value; - - __this__skewedColValueLocationMaps.put(__this__skewedColValueLocationMaps_copy_key, __this__skewedColValueLocationMaps_copy_value); - } - this.skewedColValueLocationMaps = __this__skewedColValueLocationMaps; - } - } - - public SkewedInfo deepCopy() { - return new SkewedInfo(this); - } - - @Override - public void clear() { - this.skewedColNames = null; - this.skewedColValues = null; - this.skewedColValueLocationMaps = null; - } - - public int getSkewedColNamesSize() { - return (this.skewedColNames == null) ? 0 : this.skewedColNames.size(); - } - - public java.util.Iterator getSkewedColNamesIterator() { - return (this.skewedColNames == null) ? null : this.skewedColNames.iterator(); - } - - public void addToSkewedColNames(String elem) { - if (this.skewedColNames == null) { - this.skewedColNames = new ArrayList(); - } - this.skewedColNames.add(elem); - } - - public List getSkewedColNames() { - return this.skewedColNames; - } - - public void setSkewedColNames(List skewedColNames) { - this.skewedColNames = skewedColNames; - } - - public void unsetSkewedColNames() { - this.skewedColNames = null; - } - - /** Returns true if field skewedColNames is set (has been assigned a value) and false otherwise */ - public boolean isSetSkewedColNames() { - return this.skewedColNames != null; - } - - public void setSkewedColNamesIsSet(boolean value) { - if (!value) { - this.skewedColNames = null; - } - } - - public int getSkewedColValuesSize() { - return (this.skewedColValues == null) ? 0 : this.skewedColValues.size(); - } - - public java.util.Iterator> getSkewedColValuesIterator() { - return (this.skewedColValues == null) ? null : this.skewedColValues.iterator(); - } - - public void addToSkewedColValues(List elem) { - if (this.skewedColValues == null) { - this.skewedColValues = new ArrayList>(); - } - this.skewedColValues.add(elem); - } - - public List> getSkewedColValues() { - return this.skewedColValues; - } - - public void setSkewedColValues(List> skewedColValues) { - this.skewedColValues = skewedColValues; - } - - public void unsetSkewedColValues() { - this.skewedColValues = null; - } - - /** Returns true if field skewedColValues is set (has been assigned a value) and false otherwise */ - public boolean isSetSkewedColValues() { - return this.skewedColValues != null; - } - - public void setSkewedColValuesIsSet(boolean value) { - if (!value) { - this.skewedColValues = null; - } - } - - public int getSkewedColValueLocationMapsSize() { - return (this.skewedColValueLocationMaps == null) ? 0 : this.skewedColValueLocationMaps.size(); - } - - public void putToSkewedColValueLocationMaps(List key, String val) { - if (this.skewedColValueLocationMaps == null) { - this.skewedColValueLocationMaps = new HashMap,String>(); - } - this.skewedColValueLocationMaps.put(key, val); - } - - public Map,String> getSkewedColValueLocationMaps() { - return this.skewedColValueLocationMaps; - } - - public void setSkewedColValueLocationMaps(Map,String> skewedColValueLocationMaps) { - this.skewedColValueLocationMaps = skewedColValueLocationMaps; - } - - public void unsetSkewedColValueLocationMaps() { - this.skewedColValueLocationMaps = null; - } - - /** Returns true if field skewedColValueLocationMaps is set (has been assigned a value) and false otherwise */ - public boolean isSetSkewedColValueLocationMaps() { - return this.skewedColValueLocationMaps != null; - } - - public void setSkewedColValueLocationMapsIsSet(boolean value) { - if (!value) { - this.skewedColValueLocationMaps = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SKEWED_COL_NAMES: - if (value == null) { - unsetSkewedColNames(); - } else { - setSkewedColNames((List)value); - } - break; - - case SKEWED_COL_VALUES: - if (value == null) { - unsetSkewedColValues(); - } else { - setSkewedColValues((List>)value); - } - break; - - case SKEWED_COL_VALUE_LOCATION_MAPS: - if (value == null) { - unsetSkewedColValueLocationMaps(); - } else { - setSkewedColValueLocationMaps((Map,String>)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SKEWED_COL_NAMES: - return getSkewedColNames(); - - case SKEWED_COL_VALUES: - return getSkewedColValues(); - - case SKEWED_COL_VALUE_LOCATION_MAPS: - return getSkewedColValueLocationMaps(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SKEWED_COL_NAMES: - return isSetSkewedColNames(); - case SKEWED_COL_VALUES: - return isSetSkewedColValues(); - case SKEWED_COL_VALUE_LOCATION_MAPS: - return isSetSkewedColValueLocationMaps(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof SkewedInfo) - return this.equals((SkewedInfo)that); - return false; - } - - public boolean equals(SkewedInfo that) { - if (that == null) - return false; - - boolean this_present_skewedColNames = true && this.isSetSkewedColNames(); - boolean that_present_skewedColNames = true && that.isSetSkewedColNames(); - if (this_present_skewedColNames || that_present_skewedColNames) { - if (!(this_present_skewedColNames && that_present_skewedColNames)) - return false; - if (!this.skewedColNames.equals(that.skewedColNames)) - return false; - } - - boolean this_present_skewedColValues = true && this.isSetSkewedColValues(); - boolean that_present_skewedColValues = true && that.isSetSkewedColValues(); - if (this_present_skewedColValues || that_present_skewedColValues) { - if (!(this_present_skewedColValues && that_present_skewedColValues)) - return false; - if (!this.skewedColValues.equals(that.skewedColValues)) - return false; - } - - boolean this_present_skewedColValueLocationMaps = true && this.isSetSkewedColValueLocationMaps(); - boolean that_present_skewedColValueLocationMaps = true && that.isSetSkewedColValueLocationMaps(); - if (this_present_skewedColValueLocationMaps || that_present_skewedColValueLocationMaps) { - if (!(this_present_skewedColValueLocationMaps && that_present_skewedColValueLocationMaps)) - return false; - if (!this.skewedColValueLocationMaps.equals(that.skewedColValueLocationMaps)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_skewedColNames = true && (isSetSkewedColNames()); - list.add(present_skewedColNames); - if (present_skewedColNames) - list.add(skewedColNames); - - boolean present_skewedColValues = true && (isSetSkewedColValues()); - list.add(present_skewedColValues); - if (present_skewedColValues) - list.add(skewedColValues); - - boolean present_skewedColValueLocationMaps = true && (isSetSkewedColValueLocationMaps()); - list.add(present_skewedColValueLocationMaps); - if (present_skewedColValueLocationMaps) - list.add(skewedColValueLocationMaps); - - return list.hashCode(); - } - - @Override - public int compareTo(SkewedInfo other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSkewedColNames()).compareTo(other.isSetSkewedColNames()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSkewedColNames()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skewedColNames, other.skewedColNames); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSkewedColValues()).compareTo(other.isSetSkewedColValues()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSkewedColValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skewedColValues, other.skewedColValues); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSkewedColValueLocationMaps()).compareTo(other.isSetSkewedColValueLocationMaps()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSkewedColValueLocationMaps()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skewedColValueLocationMaps, other.skewedColValueLocationMaps); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("SkewedInfo("); - boolean first = true; - - sb.append("skewedColNames:"); - if (this.skewedColNames == null) { - sb.append("null"); - } else { - sb.append(this.skewedColNames); - } - first = false; - if (!first) sb.append(", "); - sb.append("skewedColValues:"); - if (this.skewedColValues == null) { - sb.append("null"); - } else { - sb.append(this.skewedColValues); - } - first = false; - if (!first) sb.append(", "); - sb.append("skewedColValueLocationMaps:"); - if (this.skewedColValueLocationMaps == null) { - sb.append("null"); - } else { - sb.append(this.skewedColValueLocationMaps); - } - 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 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 _list114 = iprot.readListBegin(); - struct.skewedColNames = new ArrayList(_list114.size); - String _elem115; - for (int _i116 = 0; _i116 < _list114.size; ++_i116) - { - _elem115 = iprot.readString(); - struct.skewedColNames.add(_elem115); - } - 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 _list117 = iprot.readListBegin(); - struct.skewedColValues = new ArrayList>(_list117.size); - List _elem118; - for (int _i119 = 0; _i119 < _list117.size; ++_i119) - { - { - org.apache.thrift.protocol.TList _list120 = iprot.readListBegin(); - _elem118 = new ArrayList(_list120.size); - String _elem121; - for (int _i122 = 0; _i122 < _list120.size; ++_i122) - { - _elem121 = iprot.readString(); - _elem118.add(_elem121); - } - iprot.readListEnd(); - } - struct.skewedColValues.add(_elem118); - } - 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 _map123 = iprot.readMapBegin(); - struct.skewedColValueLocationMaps = new HashMap,String>(2*_map123.size); - List _key124; - String _val125; - for (int _i126 = 0; _i126 < _map123.size; ++_i126) - { - { - org.apache.thrift.protocol.TList _list127 = iprot.readListBegin(); - _key124 = new ArrayList(_list127.size); - String _elem128; - for (int _i129 = 0; _i129 < _list127.size; ++_i129) - { - _elem128 = iprot.readString(); - _key124.add(_elem128); - } - iprot.readListEnd(); - } - _val125 = iprot.readString(); - struct.skewedColValueLocationMaps.put(_key124, _val125); - } - 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 _iter130 : struct.skewedColNames) - { - oprot.writeString(_iter130); - } - 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 _iter131 : struct.skewedColValues) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter131.size())); - for (String _iter132 : _iter131) - { - oprot.writeString(_iter132); - } - 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> _iter133 : struct.skewedColValueLocationMaps.entrySet()) - { - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter133.getKey().size())); - for (String _iter134 : _iter133.getKey()) - { - oprot.writeString(_iter134); - } - oprot.writeListEnd(); - } - oprot.writeString(_iter133.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 _iter135 : struct.skewedColNames) - { - oprot.writeString(_iter135); - } - } - } - if (struct.isSetSkewedColValues()) { - { - oprot.writeI32(struct.skewedColValues.size()); - for (List _iter136 : struct.skewedColValues) - { - { - oprot.writeI32(_iter136.size()); - for (String _iter137 : _iter136) - { - oprot.writeString(_iter137); - } - } - } - } - } - if (struct.isSetSkewedColValueLocationMaps()) { - { - oprot.writeI32(struct.skewedColValueLocationMaps.size()); - for (Map.Entry, String> _iter138 : struct.skewedColValueLocationMaps.entrySet()) - { - { - oprot.writeI32(_iter138.getKey().size()); - for (String _iter139 : _iter138.getKey()) - { - oprot.writeString(_iter139); - } - } - oprot.writeString(_iter138.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 _list140 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.skewedColNames = new ArrayList(_list140.size); - String _elem141; - for (int _i142 = 0; _i142 < _list140.size; ++_i142) - { - _elem141 = iprot.readString(); - struct.skewedColNames.add(_elem141); - } - } - struct.setSkewedColNamesIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, iprot.readI32()); - struct.skewedColValues = new ArrayList>(_list143.size); - List _elem144; - for (int _i145 = 0; _i145 < _list143.size; ++_i145) - { - { - org.apache.thrift.protocol.TList _list146 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - _elem144 = new ArrayList(_list146.size); - String _elem147; - for (int _i148 = 0; _i148 < _list146.size; ++_i148) - { - _elem147 = iprot.readString(); - _elem144.add(_elem147); - } - } - struct.skewedColValues.add(_elem144); - } - } - struct.setSkewedColValuesIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TMap _map149 = 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*_map149.size); - List _key150; - String _val151; - for (int _i152 = 0; _i152 < _map149.size; ++_i152) - { - { - org.apache.thrift.protocol.TList _list153 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - _key150 = new ArrayList(_list153.size); - String _elem154; - for (int _i155 = 0; _i155 < _list153.size; ++_i155) - { - _elem154 = iprot.readString(); - _key150.add(_elem154); - } - } - _val151 = iprot.readString(); - struct.skewedColValueLocationMaps.put(_key150, _val151); - } - } - struct.setSkewedColValueLocationMapsIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index 938f06b..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java +++ /dev/null @@ -1,1748 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class StorageDescriptor implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StorageDescriptor"); - - private static final org.apache.thrift.protocol.TField COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("cols", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("location", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField INPUT_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("inputFormat", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField OUTPUT_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("outputFormat", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("compressed", org.apache.thrift.protocol.TType.BOOL, (short)5); - private static final org.apache.thrift.protocol.TField NUM_BUCKETS_FIELD_DESC = new org.apache.thrift.protocol.TField("numBuckets", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField SERDE_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("serdeInfo", org.apache.thrift.protocol.TType.STRUCT, (short)7); - private static final org.apache.thrift.protocol.TField BUCKET_COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("bucketCols", org.apache.thrift.protocol.TType.LIST, (short)8); - private static final org.apache.thrift.protocol.TField SORT_COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("sortCols", org.apache.thrift.protocol.TType.LIST, (short)9); - 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 org.apache.thrift.protocol.TField STORED_AS_SUB_DIRECTORIES_FIELD_DESC = new org.apache.thrift.protocol.TField("storedAsSubDirectories", org.apache.thrift.protocol.TType.BOOL, (short)12); - - 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 - private String outputFormat; // required - private boolean compressed; // required - private int numBuckets; // required - private SerDeInfo serdeInfo; // required - private List bucketCols; // required - private List sortCols; // required - private Map parameters; // required - private SkewedInfo skewedInfo; // optional - private boolean storedAsSubDirectories; // 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 { - COLS((short)1, "cols"), - LOCATION((short)2, "location"), - INPUT_FORMAT((short)3, "inputFormat"), - OUTPUT_FORMAT((short)4, "outputFormat"), - COMPRESSED((short)5, "compressed"), - NUM_BUCKETS((short)6, "numBuckets"), - SERDE_INFO((short)7, "serdeInfo"), - BUCKET_COLS((short)8, "bucketCols"), - SORT_COLS((short)9, "sortCols"), - PARAMETERS((short)10, "parameters"), - SKEWED_INFO((short)11, "skewedInfo"), - STORED_AS_SUB_DIRECTORIES((short)12, "storedAsSubDirectories"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // COLS - return COLS; - case 2: // LOCATION - return LOCATION; - case 3: // INPUT_FORMAT - return INPUT_FORMAT; - case 4: // OUTPUT_FORMAT - return OUTPUT_FORMAT; - case 5: // COMPRESSED - return COMPRESSED; - case 6: // NUM_BUCKETS - return NUM_BUCKETS; - case 7: // SERDE_INFO - return SERDE_INFO; - case 8: // BUCKET_COLS - return BUCKET_COLS; - case 9: // SORT_COLS - return SORT_COLS; - case 10: // PARAMETERS - return PARAMETERS; - case 11: // SKEWED_INFO - return SKEWED_INFO; - case 12: // STORED_AS_SUB_DIRECTORIES - return STORED_AS_SUB_DIRECTORIES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __COMPRESSED_ISSET_ID = 0; - private static final int __NUMBUCKETS_ISSET_ID = 1; - private static final int __STOREDASSUBDIRECTORIES_ISSET_ID = 2; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.SKEWED_INFO,_Fields.STORED_AS_SUB_DIRECTORIES}; - 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); - tmpMap.put(_Fields.COLS, new org.apache.thrift.meta_data.FieldMetaData("cols", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); - tmpMap.put(_Fields.LOCATION, new org.apache.thrift.meta_data.FieldMetaData("location", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.INPUT_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("inputFormat", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.OUTPUT_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("outputFormat", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("compressed", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.NUM_BUCKETS, new org.apache.thrift.meta_data.FieldMetaData("numBuckets", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.SERDE_INFO, new org.apache.thrift.meta_data.FieldMetaData("serdeInfo", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SerDeInfo.class))); - tmpMap.put(_Fields.BUCKET_COLS, new org.apache.thrift.meta_data.FieldMetaData("bucketCols", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.SORT_COLS, new org.apache.thrift.meta_data.FieldMetaData("sortCols", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Order.class)))); - tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.SKEWED_INFO, new org.apache.thrift.meta_data.FieldMetaData("skewedInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SkewedInfo.class))); - tmpMap.put(_Fields.STORED_AS_SUB_DIRECTORIES, new org.apache.thrift.meta_data.FieldMetaData("storedAsSubDirectories", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StorageDescriptor.class, metaDataMap); - } - - public StorageDescriptor() { - } - - public StorageDescriptor( - List cols, - String location, - String inputFormat, - String outputFormat, - boolean compressed, - int numBuckets, - SerDeInfo serdeInfo, - List bucketCols, - List sortCols, - Map parameters) - { - this(); - this.cols = cols; - this.location = org.apache.hive.common.util.HiveStringUtils.intern(location); - this.inputFormat = org.apache.hive.common.util.HiveStringUtils.intern(inputFormat); - this.outputFormat = org.apache.hive.common.util.HiveStringUtils.intern(outputFormat); - this.compressed = compressed; - setCompressedIsSet(true); - this.numBuckets = numBuckets; - setNumBucketsIsSet(true); - this.serdeInfo = serdeInfo; - this.bucketCols = org.apache.hive.common.util.HiveStringUtils.intern(bucketCols); - this.sortCols = sortCols; - this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters); - } - - /** - * Performs a deep copy on other. - */ - public StorageDescriptor(StorageDescriptor other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetCols()) { - List __this__cols = new ArrayList(other.cols.size()); - for (FieldSchema other_element : other.cols) { - __this__cols.add(new FieldSchema(other_element)); - } - this.cols = __this__cols; - } - if (other.isSetLocation()) { - this.location = org.apache.hive.common.util.HiveStringUtils.intern(other.location); - } - if (other.isSetInputFormat()) { - this.inputFormat = org.apache.hive.common.util.HiveStringUtils.intern(other.inputFormat); - } - if (other.isSetOutputFormat()) { - this.outputFormat = org.apache.hive.common.util.HiveStringUtils.intern(other.outputFormat); - } - this.compressed = other.compressed; - this.numBuckets = other.numBuckets; - if (other.isSetSerdeInfo()) { - this.serdeInfo = new SerDeInfo(other.serdeInfo); - } - if (other.isSetBucketCols()) { - List __this__bucketCols = new ArrayList(other.bucketCols); - this.bucketCols = __this__bucketCols; - } - if (other.isSetSortCols()) { - List __this__sortCols = new ArrayList(other.sortCols.size()); - for (Order other_element : other.sortCols) { - __this__sortCols.add(new Order(other_element)); - } - this.sortCols = __this__sortCols; - } - if (other.isSetParameters()) { - Map __this__parameters = new HashMap(other.parameters); - this.parameters = __this__parameters; - } - if (other.isSetSkewedInfo()) { - this.skewedInfo = new SkewedInfo(other.skewedInfo); - } - this.storedAsSubDirectories = other.storedAsSubDirectories; - } - - public StorageDescriptor deepCopy() { - return new StorageDescriptor(this); - } - - @Override - public void clear() { - this.cols = null; - this.location = null; - this.inputFormat = null; - this.outputFormat = null; - setCompressedIsSet(false); - this.compressed = false; - setNumBucketsIsSet(false); - this.numBuckets = 0; - this.serdeInfo = null; - this.bucketCols = null; - this.sortCols = null; - this.parameters = null; - this.skewedInfo = null; - setStoredAsSubDirectoriesIsSet(false); - this.storedAsSubDirectories = false; - } - - public int getColsSize() { - return (this.cols == null) ? 0 : this.cols.size(); - } - - public java.util.Iterator getColsIterator() { - return (this.cols == null) ? null : this.cols.iterator(); - } - - public void addToCols(FieldSchema elem) { - if (this.cols == null) { - this.cols = new ArrayList(); - } - this.cols.add(elem); - } - - public List getCols() { - return this.cols; - } - - public void setCols(List cols) { - this.cols = cols; - } - - public void unsetCols() { - this.cols = null; - } - - /** Returns true if field cols is set (has been assigned a value) and false otherwise */ - public boolean isSetCols() { - return this.cols != null; - } - - public void setColsIsSet(boolean value) { - if (!value) { - this.cols = null; - } - } - - public String getLocation() { - return this.location; - } - - public void setLocation(String location) { - this.location = org.apache.hive.common.util.HiveStringUtils.intern(location); - } - - public void unsetLocation() { - this.location = null; - } - - /** Returns true if field location is set (has been assigned a value) and false otherwise */ - public boolean isSetLocation() { - return this.location != null; - } - - public void setLocationIsSet(boolean value) { - if (!value) { - this.location = null; - } - } - - public String getInputFormat() { - return this.inputFormat; - } - - public void setInputFormat(String inputFormat) { - this.inputFormat = org.apache.hive.common.util.HiveStringUtils.intern(inputFormat); - } - - public void unsetInputFormat() { - this.inputFormat = null; - } - - /** Returns true if field inputFormat is set (has been assigned a value) and false otherwise */ - public boolean isSetInputFormat() { - return this.inputFormat != null; - } - - public void setInputFormatIsSet(boolean value) { - if (!value) { - this.inputFormat = null; - } - } - - public String getOutputFormat() { - return this.outputFormat; - } - - public void setOutputFormat(String outputFormat) { - this.outputFormat = org.apache.hive.common.util.HiveStringUtils.intern(outputFormat); - } - - public void unsetOutputFormat() { - this.outputFormat = null; - } - - /** Returns true if field outputFormat is set (has been assigned a value) and false otherwise */ - public boolean isSetOutputFormat() { - return this.outputFormat != null; - } - - public void setOutputFormatIsSet(boolean value) { - if (!value) { - this.outputFormat = null; - } - } - - public boolean isCompressed() { - return this.compressed; - } - - public void setCompressed(boolean compressed) { - this.compressed = compressed; - setCompressedIsSet(true); - } - - public void unsetCompressed() { - __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 EncodingUtils.testBit(__isset_bitfield, __COMPRESSED_ISSET_ID); - } - - public void setCompressedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPRESSED_ISSET_ID, value); - } - - public int getNumBuckets() { - return this.numBuckets; - } - - public void setNumBuckets(int numBuckets) { - this.numBuckets = numBuckets; - setNumBucketsIsSet(true); - } - - public void unsetNumBuckets() { - __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 EncodingUtils.testBit(__isset_bitfield, __NUMBUCKETS_ISSET_ID); - } - - public void setNumBucketsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBUCKETS_ISSET_ID, value); - } - - public SerDeInfo getSerdeInfo() { - return this.serdeInfo; - } - - public void setSerdeInfo(SerDeInfo serdeInfo) { - this.serdeInfo = serdeInfo; - } - - public void unsetSerdeInfo() { - this.serdeInfo = null; - } - - /** Returns true if field serdeInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetSerdeInfo() { - return this.serdeInfo != null; - } - - public void setSerdeInfoIsSet(boolean value) { - if (!value) { - this.serdeInfo = null; - } - } - - public int getBucketColsSize() { - return (this.bucketCols == null) ? 0 : this.bucketCols.size(); - } - - public java.util.Iterator getBucketColsIterator() { - return (this.bucketCols == null) ? null : this.bucketCols.iterator(); - } - - public void addToBucketCols(String elem) { - if (this.bucketCols == null) { - this.bucketCols = new ArrayList(); - } - this.bucketCols.add(elem); - } - - public List getBucketCols() { - return this.bucketCols; - } - - public void setBucketCols(List bucketCols) { - this.bucketCols = org.apache.hive.common.util.HiveStringUtils.intern(bucketCols); - } - - public void unsetBucketCols() { - this.bucketCols = null; - } - - /** Returns true if field bucketCols is set (has been assigned a value) and false otherwise */ - public boolean isSetBucketCols() { - return this.bucketCols != null; - } - - public void setBucketColsIsSet(boolean value) { - if (!value) { - this.bucketCols = null; - } - } - - public int getSortColsSize() { - return (this.sortCols == null) ? 0 : this.sortCols.size(); - } - - public java.util.Iterator getSortColsIterator() { - return (this.sortCols == null) ? null : this.sortCols.iterator(); - } - - public void addToSortCols(Order elem) { - if (this.sortCols == null) { - this.sortCols = new ArrayList(); - } - this.sortCols.add(elem); - } - - public List getSortCols() { - return this.sortCols; - } - - public void setSortCols(List sortCols) { - this.sortCols = sortCols; - } - - public void unsetSortCols() { - this.sortCols = null; - } - - /** Returns true if field sortCols is set (has been assigned a value) and false otherwise */ - public boolean isSetSortCols() { - return this.sortCols != null; - } - - public void setSortColsIsSet(boolean value) { - if (!value) { - this.sortCols = null; - } - } - - public int getParametersSize() { - return (this.parameters == null) ? 0 : this.parameters.size(); - } - - public void putToParameters(String key, String val) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(key, val); - } - - public Map getParameters() { - return this.parameters; - } - - public void setParameters(Map parameters) { - this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters); - } - - public void unsetParameters() { - this.parameters = null; - } - - /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ - public boolean isSetParameters() { - return this.parameters != null; - } - - public void setParametersIsSet(boolean value) { - if (!value) { - this.parameters = null; - } - } - - public SkewedInfo getSkewedInfo() { - return this.skewedInfo; - } - - public void setSkewedInfo(SkewedInfo skewedInfo) { - this.skewedInfo = skewedInfo; - } - - public void unsetSkewedInfo() { - this.skewedInfo = null; - } - - /** Returns true if field skewedInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetSkewedInfo() { - return this.skewedInfo != null; - } - - public void setSkewedInfoIsSet(boolean value) { - if (!value) { - this.skewedInfo = null; - } - } - - public boolean isStoredAsSubDirectories() { - return this.storedAsSubDirectories; - } - - public void setStoredAsSubDirectories(boolean storedAsSubDirectories) { - this.storedAsSubDirectories = storedAsSubDirectories; - setStoredAsSubDirectoriesIsSet(true); - } - - public void unsetStoredAsSubDirectories() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STOREDASSUBDIRECTORIES_ISSET_ID); - } - - /** Returns true if field storedAsSubDirectories is set (has been assigned a value) and false otherwise */ - public boolean isSetStoredAsSubDirectories() { - return EncodingUtils.testBit(__isset_bitfield, __STOREDASSUBDIRECTORIES_ISSET_ID); - } - - public void setStoredAsSubDirectoriesIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STOREDASSUBDIRECTORIES_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case COLS: - if (value == null) { - unsetCols(); - } else { - setCols((List)value); - } - break; - - case LOCATION: - if (value == null) { - unsetLocation(); - } else { - setLocation((String)value); - } - break; - - case INPUT_FORMAT: - if (value == null) { - unsetInputFormat(); - } else { - setInputFormat((String)value); - } - break; - - case OUTPUT_FORMAT: - if (value == null) { - unsetOutputFormat(); - } else { - setOutputFormat((String)value); - } - break; - - case COMPRESSED: - if (value == null) { - unsetCompressed(); - } else { - setCompressed((Boolean)value); - } - break; - - case NUM_BUCKETS: - if (value == null) { - unsetNumBuckets(); - } else { - setNumBuckets((Integer)value); - } - break; - - case SERDE_INFO: - if (value == null) { - unsetSerdeInfo(); - } else { - setSerdeInfo((SerDeInfo)value); - } - break; - - case BUCKET_COLS: - if (value == null) { - unsetBucketCols(); - } else { - setBucketCols((List)value); - } - break; - - case SORT_COLS: - if (value == null) { - unsetSortCols(); - } else { - setSortCols((List)value); - } - break; - - case PARAMETERS: - if (value == null) { - unsetParameters(); - } else { - setParameters((Map)value); - } - break; - - case SKEWED_INFO: - if (value == null) { - unsetSkewedInfo(); - } else { - setSkewedInfo((SkewedInfo)value); - } - break; - - case STORED_AS_SUB_DIRECTORIES: - if (value == null) { - unsetStoredAsSubDirectories(); - } else { - setStoredAsSubDirectories((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case COLS: - return getCols(); - - case LOCATION: - return getLocation(); - - case INPUT_FORMAT: - return getInputFormat(); - - case OUTPUT_FORMAT: - return getOutputFormat(); - - case COMPRESSED: - return isCompressed(); - - case NUM_BUCKETS: - return getNumBuckets(); - - case SERDE_INFO: - return getSerdeInfo(); - - case BUCKET_COLS: - return getBucketCols(); - - case SORT_COLS: - return getSortCols(); - - case PARAMETERS: - return getParameters(); - - case SKEWED_INFO: - return getSkewedInfo(); - - case STORED_AS_SUB_DIRECTORIES: - return isStoredAsSubDirectories(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case COLS: - return isSetCols(); - case LOCATION: - return isSetLocation(); - case INPUT_FORMAT: - return isSetInputFormat(); - case OUTPUT_FORMAT: - return isSetOutputFormat(); - case COMPRESSED: - return isSetCompressed(); - case NUM_BUCKETS: - return isSetNumBuckets(); - case SERDE_INFO: - return isSetSerdeInfo(); - case BUCKET_COLS: - return isSetBucketCols(); - case SORT_COLS: - return isSetSortCols(); - case PARAMETERS: - return isSetParameters(); - case SKEWED_INFO: - return isSetSkewedInfo(); - case STORED_AS_SUB_DIRECTORIES: - return isSetStoredAsSubDirectories(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof StorageDescriptor) - return this.equals((StorageDescriptor)that); - return false; - } - - public boolean equals(StorageDescriptor that) { - if (that == null) - return false; - - boolean this_present_cols = true && this.isSetCols(); - boolean that_present_cols = true && that.isSetCols(); - if (this_present_cols || that_present_cols) { - if (!(this_present_cols && that_present_cols)) - return false; - if (!this.cols.equals(that.cols)) - return false; - } - - boolean this_present_location = true && this.isSetLocation(); - boolean that_present_location = true && that.isSetLocation(); - if (this_present_location || that_present_location) { - if (!(this_present_location && that_present_location)) - return false; - if (!this.location.equals(that.location)) - return false; - } - - boolean this_present_inputFormat = true && this.isSetInputFormat(); - boolean that_present_inputFormat = true && that.isSetInputFormat(); - if (this_present_inputFormat || that_present_inputFormat) { - if (!(this_present_inputFormat && that_present_inputFormat)) - return false; - if (!this.inputFormat.equals(that.inputFormat)) - return false; - } - - boolean this_present_outputFormat = true && this.isSetOutputFormat(); - boolean that_present_outputFormat = true && that.isSetOutputFormat(); - if (this_present_outputFormat || that_present_outputFormat) { - if (!(this_present_outputFormat && that_present_outputFormat)) - return false; - if (!this.outputFormat.equals(that.outputFormat)) - return false; - } - - boolean this_present_compressed = true; - boolean that_present_compressed = true; - if (this_present_compressed || that_present_compressed) { - if (!(this_present_compressed && that_present_compressed)) - return false; - if (this.compressed != that.compressed) - return false; - } - - boolean this_present_numBuckets = true; - boolean that_present_numBuckets = true; - if (this_present_numBuckets || that_present_numBuckets) { - if (!(this_present_numBuckets && that_present_numBuckets)) - return false; - if (this.numBuckets != that.numBuckets) - return false; - } - - boolean this_present_serdeInfo = true && this.isSetSerdeInfo(); - boolean that_present_serdeInfo = true && that.isSetSerdeInfo(); - if (this_present_serdeInfo || that_present_serdeInfo) { - if (!(this_present_serdeInfo && that_present_serdeInfo)) - return false; - if (!this.serdeInfo.equals(that.serdeInfo)) - return false; - } - - boolean this_present_bucketCols = true && this.isSetBucketCols(); - boolean that_present_bucketCols = true && that.isSetBucketCols(); - if (this_present_bucketCols || that_present_bucketCols) { - if (!(this_present_bucketCols && that_present_bucketCols)) - return false; - if (!this.bucketCols.equals(that.bucketCols)) - return false; - } - - boolean this_present_sortCols = true && this.isSetSortCols(); - boolean that_present_sortCols = true && that.isSetSortCols(); - if (this_present_sortCols || that_present_sortCols) { - if (!(this_present_sortCols && that_present_sortCols)) - return false; - if (!this.sortCols.equals(that.sortCols)) - return false; - } - - boolean this_present_parameters = true && this.isSetParameters(); - boolean that_present_parameters = true && that.isSetParameters(); - if (this_present_parameters || that_present_parameters) { - if (!(this_present_parameters && that_present_parameters)) - return false; - if (!this.parameters.equals(that.parameters)) - return false; - } - - boolean this_present_skewedInfo = true && this.isSetSkewedInfo(); - boolean that_present_skewedInfo = true && that.isSetSkewedInfo(); - if (this_present_skewedInfo || that_present_skewedInfo) { - if (!(this_present_skewedInfo && that_present_skewedInfo)) - return false; - if (!this.skewedInfo.equals(that.skewedInfo)) - return false; - } - - boolean this_present_storedAsSubDirectories = true && this.isSetStoredAsSubDirectories(); - boolean that_present_storedAsSubDirectories = true && that.isSetStoredAsSubDirectories(); - if (this_present_storedAsSubDirectories || that_present_storedAsSubDirectories) { - if (!(this_present_storedAsSubDirectories && that_present_storedAsSubDirectories)) - return false; - if (this.storedAsSubDirectories != that.storedAsSubDirectories) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_cols = true && (isSetCols()); - list.add(present_cols); - if (present_cols) - list.add(cols); - - boolean present_location = true && (isSetLocation()); - list.add(present_location); - if (present_location) - list.add(location); - - boolean present_inputFormat = true && (isSetInputFormat()); - list.add(present_inputFormat); - if (present_inputFormat) - list.add(inputFormat); - - boolean present_outputFormat = true && (isSetOutputFormat()); - list.add(present_outputFormat); - if (present_outputFormat) - list.add(outputFormat); - - boolean present_compressed = true; - list.add(present_compressed); - if (present_compressed) - list.add(compressed); - - boolean present_numBuckets = true; - list.add(present_numBuckets); - if (present_numBuckets) - list.add(numBuckets); - - boolean present_serdeInfo = true && (isSetSerdeInfo()); - list.add(present_serdeInfo); - if (present_serdeInfo) - list.add(serdeInfo); - - boolean present_bucketCols = true && (isSetBucketCols()); - list.add(present_bucketCols); - if (present_bucketCols) - list.add(bucketCols); - - boolean present_sortCols = true && (isSetSortCols()); - list.add(present_sortCols); - if (present_sortCols) - list.add(sortCols); - - boolean present_parameters = true && (isSetParameters()); - list.add(present_parameters); - if (present_parameters) - list.add(parameters); - - boolean present_skewedInfo = true && (isSetSkewedInfo()); - list.add(present_skewedInfo); - if (present_skewedInfo) - list.add(skewedInfo); - - boolean present_storedAsSubDirectories = true && (isSetStoredAsSubDirectories()); - list.add(present_storedAsSubDirectories); - if (present_storedAsSubDirectories) - list.add(storedAsSubDirectories); - - return list.hashCode(); - } - - @Override - public int compareTo(StorageDescriptor other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetCols()).compareTo(other.isSetCols()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCols()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cols, other.cols); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLocation()).compareTo(other.isSetLocation()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLocation()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.location, other.location); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetInputFormat()).compareTo(other.isSetInputFormat()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetInputFormat()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inputFormat, other.inputFormat); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOutputFormat()).compareTo(other.isSetOutputFormat()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOutputFormat()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputFormat, other.outputFormat); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCompressed()).compareTo(other.isSetCompressed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCompressed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressed, other.compressed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumBuckets()).compareTo(other.isSetNumBuckets()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumBuckets()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numBuckets, other.numBuckets); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSerdeInfo()).compareTo(other.isSetSerdeInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSerdeInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serdeInfo, other.serdeInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBucketCols()).compareTo(other.isSetBucketCols()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBucketCols()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bucketCols, other.bucketCols); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSortCols()).compareTo(other.isSetSortCols()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSortCols()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sortCols, other.sortCols); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParameters()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSkewedInfo()).compareTo(other.isSetSkewedInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSkewedInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skewedInfo, other.skewedInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStoredAsSubDirectories()).compareTo(other.isSetStoredAsSubDirectories()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStoredAsSubDirectories()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storedAsSubDirectories, other.storedAsSubDirectories); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("StorageDescriptor("); - boolean first = true; - - sb.append("cols:"); - if (this.cols == null) { - sb.append("null"); - } else { - sb.append(this.cols); - } - first = false; - if (!first) sb.append(", "); - sb.append("location:"); - if (this.location == null) { - sb.append("null"); - } else { - sb.append(this.location); - } - first = false; - if (!first) sb.append(", "); - sb.append("inputFormat:"); - if (this.inputFormat == null) { - sb.append("null"); - } else { - sb.append(this.inputFormat); - } - first = false; - if (!first) sb.append(", "); - sb.append("outputFormat:"); - if (this.outputFormat == null) { - sb.append("null"); - } else { - sb.append(this.outputFormat); - } - first = false; - if (!first) sb.append(", "); - sb.append("compressed:"); - sb.append(this.compressed); - first = false; - if (!first) sb.append(", "); - sb.append("numBuckets:"); - sb.append(this.numBuckets); - first = false; - if (!first) sb.append(", "); - sb.append("serdeInfo:"); - if (this.serdeInfo == null) { - sb.append("null"); - } else { - sb.append(this.serdeInfo); - } - first = false; - if (!first) sb.append(", "); - sb.append("bucketCols:"); - if (this.bucketCols == null) { - sb.append("null"); - } else { - sb.append(this.bucketCols); - } - first = false; - if (!first) sb.append(", "); - sb.append("sortCols:"); - if (this.sortCols == null) { - sb.append("null"); - } else { - sb.append(this.sortCols); - } - first = false; - if (!first) sb.append(", "); - sb.append("parameters:"); - if (this.parameters == null) { - sb.append("null"); - } else { - sb.append(this.parameters); - } - first = false; - if (isSetSkewedInfo()) { - if (!first) sb.append(", "); - sb.append("skewedInfo:"); - if (this.skewedInfo == null) { - sb.append("null"); - } else { - sb.append(this.skewedInfo); - } - first = false; - } - if (isSetStoredAsSubDirectories()) { - if (!first) sb.append(", "); - sb.append("storedAsSubDirectories:"); - sb.append(this.storedAsSubDirectories); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - // 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 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 _list156 = iprot.readListBegin(); - struct.cols = new ArrayList(_list156.size); - FieldSchema _elem157; - for (int _i158 = 0; _i158 < _list156.size; ++_i158) - { - _elem157 = new FieldSchema(); - _elem157.read(iprot); - struct.cols.add(_elem157); - } - 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 _list159 = iprot.readListBegin(); - struct.bucketCols = new ArrayList(_list159.size); - String _elem160; - for (int _i161 = 0; _i161 < _list159.size; ++_i161) - { - _elem160 = iprot.readString(); - struct.bucketCols.add(_elem160); - } - 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 _list162 = iprot.readListBegin(); - struct.sortCols = new ArrayList(_list162.size); - Order _elem163; - for (int _i164 = 0; _i164 < _list162.size; ++_i164) - { - _elem163 = new Order(); - _elem163.read(iprot); - struct.sortCols.add(_elem163); - } - 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 _map165 = iprot.readMapBegin(); - struct.parameters = new HashMap(2*_map165.size); - String _key166; - String _val167; - for (int _i168 = 0; _i168 < _map165.size; ++_i168) - { - _key166 = iprot.readString(); - _val167 = iprot.readString(); - struct.parameters.put(_key166, _val167); - } - 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; - case 12: // STORED_AS_SUB_DIRECTORIES - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.storedAsSubDirectories = iprot.readBool(); - struct.setStoredAsSubDirectoriesIsSet(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 _iter169 : struct.cols) - { - _iter169.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 _iter170 : struct.bucketCols) - { - oprot.writeString(_iter170); - } - 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 _iter171 : struct.sortCols) - { - _iter171.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 _iter172 : struct.parameters.entrySet()) - { - oprot.writeString(_iter172.getKey()); - oprot.writeString(_iter172.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.skewedInfo != null) { - if (struct.isSetSkewedInfo()) { - oprot.writeFieldBegin(SKEWED_INFO_FIELD_DESC); - struct.skewedInfo.write(oprot); - oprot.writeFieldEnd(); - } - } - if (struct.isSetStoredAsSubDirectories()) { - oprot.writeFieldBegin(STORED_AS_SUB_DIRECTORIES_FIELD_DESC); - oprot.writeBool(struct.storedAsSubDirectories); - 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); - } - if (struct.isSetStoredAsSubDirectories()) { - optionals.set(11); - } - oprot.writeBitSet(optionals, 12); - if (struct.isSetCols()) { - { - oprot.writeI32(struct.cols.size()); - for (FieldSchema _iter173 : struct.cols) - { - _iter173.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 _iter174 : struct.bucketCols) - { - oprot.writeString(_iter174); - } - } - } - if (struct.isSetSortCols()) { - { - oprot.writeI32(struct.sortCols.size()); - for (Order _iter175 : struct.sortCols) - { - _iter175.write(oprot); - } - } - } - if (struct.isSetParameters()) { - { - oprot.writeI32(struct.parameters.size()); - for (Map.Entry _iter176 : struct.parameters.entrySet()) - { - oprot.writeString(_iter176.getKey()); - oprot.writeString(_iter176.getValue()); - } - } - } - if (struct.isSetSkewedInfo()) { - struct.skewedInfo.write(oprot); - } - if (struct.isSetStoredAsSubDirectories()) { - oprot.writeBool(struct.storedAsSubDirectories); - } - } - - @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(12); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list177 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.cols = new ArrayList(_list177.size); - FieldSchema _elem178; - for (int _i179 = 0; _i179 < _list177.size; ++_i179) - { - _elem178 = new FieldSchema(); - _elem178.read(iprot); - struct.cols.add(_elem178); - } - } - 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 _list180 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.bucketCols = new ArrayList(_list180.size); - String _elem181; - for (int _i182 = 0; _i182 < _list180.size; ++_i182) - { - _elem181 = iprot.readString(); - struct.bucketCols.add(_elem181); - } - } - struct.setBucketColsIsSet(true); - } - if (incoming.get(8)) { - { - org.apache.thrift.protocol.TList _list183 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.sortCols = new ArrayList(_list183.size); - Order _elem184; - for (int _i185 = 0; _i185 < _list183.size; ++_i185) - { - _elem184 = new Order(); - _elem184.read(iprot); - struct.sortCols.add(_elem184); - } - } - struct.setSortColsIsSet(true); - } - if (incoming.get(9)) { - { - org.apache.thrift.protocol.TMap _map186 = 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*_map186.size); - String _key187; - String _val188; - for (int _i189 = 0; _i189 < _map186.size; ++_i189) - { - _key187 = iprot.readString(); - _val188 = iprot.readString(); - struct.parameters.put(_key187, _val188); - } - } - struct.setParametersIsSet(true); - } - if (incoming.get(10)) { - struct.skewedInfo = new SkewedInfo(); - struct.skewedInfo.read(iprot); - struct.setSkewedInfoIsSet(true); - } - if (incoming.get(11)) { - struct.storedAsSubDirectories = iprot.readBool(); - struct.setStoredAsSubDirectoriesIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java deleted file mode 100644 index c9afe87..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java +++ /dev/null @@ -1,782 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class StringColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StringColumnStatsData"); - - private static final org.apache.thrift.protocol.TField MAX_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("maxColLen", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField AVG_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("avgColLen", org.apache.thrift.protocol.TType.DOUBLE, (short)2); - private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new StringColumnStatsDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new StringColumnStatsDataTupleSchemeFactory()); - } - - private long maxColLen; // required - private double avgColLen; // required - private long numNulls; // required - private long numDVs; // required - private String bitVectors; // 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 { - MAX_COL_LEN((short)1, "maxColLen"), - AVG_COL_LEN((short)2, "avgColLen"), - NUM_NULLS((short)3, "numNulls"), - NUM_DVS((short)4, "numDVs"), - BIT_VECTORS((short)5, "bitVectors"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MAX_COL_LEN - return MAX_COL_LEN; - case 2: // AVG_COL_LEN - return AVG_COL_LEN; - case 3: // NUM_NULLS - return NUM_NULLS; - case 4: // NUM_DVS - return NUM_DVS; - case 5: // BIT_VECTORS - return BIT_VECTORS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAXCOLLEN_ISSET_ID = 0; - private static final int __AVGCOLLEN_ISSET_ID = 1; - private static final int __NUMNULLS_ISSET_ID = 2; - private static final int __NUMDVS_ISSET_ID = 3; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.BIT_VECTORS}; - 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); - tmpMap.put(_Fields.MAX_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("maxColLen", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.AVG_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("avgColLen", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); - tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StringColumnStatsData.class, metaDataMap); - } - - public StringColumnStatsData() { - } - - public StringColumnStatsData( - long maxColLen, - double avgColLen, - long numNulls, - long numDVs) - { - this(); - this.maxColLen = maxColLen; - setMaxColLenIsSet(true); - this.avgColLen = avgColLen; - setAvgColLenIsSet(true); - this.numNulls = numNulls; - setNumNullsIsSet(true); - this.numDVs = numDVs; - setNumDVsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public StringColumnStatsData(StringColumnStatsData other) { - __isset_bitfield = other.__isset_bitfield; - this.maxColLen = other.maxColLen; - this.avgColLen = other.avgColLen; - this.numNulls = other.numNulls; - this.numDVs = other.numDVs; - if (other.isSetBitVectors()) { - this.bitVectors = other.bitVectors; - } - } - - public StringColumnStatsData deepCopy() { - return new StringColumnStatsData(this); - } - - @Override - public void clear() { - setMaxColLenIsSet(false); - this.maxColLen = 0; - setAvgColLenIsSet(false); - this.avgColLen = 0.0; - setNumNullsIsSet(false); - this.numNulls = 0; - setNumDVsIsSet(false); - this.numDVs = 0; - this.bitVectors = null; - } - - public long getMaxColLen() { - return this.maxColLen; - } - - public void setMaxColLen(long maxColLen) { - this.maxColLen = maxColLen; - setMaxColLenIsSet(true); - } - - public void unsetMaxColLen() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID); - } - - /** Returns true if field maxColLen is set (has been assigned a value) and false otherwise */ - public boolean isSetMaxColLen() { - return EncodingUtils.testBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID); - } - - public void setMaxColLenIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID, value); - } - - public double getAvgColLen() { - return this.avgColLen; - } - - public void setAvgColLen(double avgColLen) { - this.avgColLen = avgColLen; - setAvgColLenIsSet(true); - } - - public void unsetAvgColLen() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID); - } - - /** Returns true if field avgColLen is set (has been assigned a value) and false otherwise */ - public boolean isSetAvgColLen() { - return EncodingUtils.testBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID); - } - - public void setAvgColLenIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID, value); - } - - public long getNumNulls() { - return this.numNulls; - } - - public void setNumNulls(long numNulls) { - this.numNulls = numNulls; - setNumNullsIsSet(true); - } - - public void unsetNumNulls() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ - public boolean isSetNumNulls() { - return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); - } - - public void setNumNullsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); - } - - public long getNumDVs() { - return this.numDVs; - } - - public void setNumDVs(long numDVs) { - this.numDVs = numDVs; - setNumDVsIsSet(true); - } - - public void unsetNumDVs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); - } - - /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ - public boolean isSetNumDVs() { - return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); - } - - public void setNumDVsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); - } - - public String getBitVectors() { - return this.bitVectors; - } - - public void setBitVectors(String bitVectors) { - this.bitVectors = bitVectors; - } - - public void unsetBitVectors() { - this.bitVectors = null; - } - - /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ - public boolean isSetBitVectors() { - return this.bitVectors != null; - } - - public void setBitVectorsIsSet(boolean value) { - if (!value) { - this.bitVectors = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MAX_COL_LEN: - if (value == null) { - unsetMaxColLen(); - } else { - setMaxColLen((Long)value); - } - break; - - case AVG_COL_LEN: - if (value == null) { - unsetAvgColLen(); - } else { - setAvgColLen((Double)value); - } - break; - - case NUM_NULLS: - if (value == null) { - unsetNumNulls(); - } else { - setNumNulls((Long)value); - } - break; - - case NUM_DVS: - if (value == null) { - unsetNumDVs(); - } else { - setNumDVs((Long)value); - } - break; - - case BIT_VECTORS: - if (value == null) { - unsetBitVectors(); - } else { - setBitVectors((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MAX_COL_LEN: - return getMaxColLen(); - - case AVG_COL_LEN: - return getAvgColLen(); - - case NUM_NULLS: - return getNumNulls(); - - case NUM_DVS: - return getNumDVs(); - - case BIT_VECTORS: - return getBitVectors(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MAX_COL_LEN: - return isSetMaxColLen(); - case AVG_COL_LEN: - return isSetAvgColLen(); - case NUM_NULLS: - return isSetNumNulls(); - case NUM_DVS: - return isSetNumDVs(); - case BIT_VECTORS: - return isSetBitVectors(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof StringColumnStatsData) - return this.equals((StringColumnStatsData)that); - return false; - } - - public boolean equals(StringColumnStatsData that) { - if (that == null) - return false; - - boolean this_present_maxColLen = true; - boolean that_present_maxColLen = true; - if (this_present_maxColLen || that_present_maxColLen) { - if (!(this_present_maxColLen && that_present_maxColLen)) - return false; - if (this.maxColLen != that.maxColLen) - return false; - } - - boolean this_present_avgColLen = true; - boolean that_present_avgColLen = true; - if (this_present_avgColLen || that_present_avgColLen) { - if (!(this_present_avgColLen && that_present_avgColLen)) - return false; - if (this.avgColLen != that.avgColLen) - return false; - } - - boolean this_present_numNulls = true; - boolean that_present_numNulls = true; - if (this_present_numNulls || that_present_numNulls) { - if (!(this_present_numNulls && that_present_numNulls)) - return false; - if (this.numNulls != that.numNulls) - return false; - } - - boolean this_present_numDVs = true; - boolean that_present_numDVs = true; - if (this_present_numDVs || that_present_numDVs) { - if (!(this_present_numDVs && that_present_numDVs)) - return false; - if (this.numDVs != that.numDVs) - return false; - } - - boolean this_present_bitVectors = true && this.isSetBitVectors(); - boolean that_present_bitVectors = true && that.isSetBitVectors(); - if (this_present_bitVectors || that_present_bitVectors) { - if (!(this_present_bitVectors && that_present_bitVectors)) - return false; - if (!this.bitVectors.equals(that.bitVectors)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_maxColLen = true; - list.add(present_maxColLen); - if (present_maxColLen) - list.add(maxColLen); - - boolean present_avgColLen = true; - list.add(present_avgColLen); - if (present_avgColLen) - list.add(avgColLen); - - boolean present_numNulls = true; - list.add(present_numNulls); - if (present_numNulls) - list.add(numNulls); - - boolean present_numDVs = true; - list.add(present_numDVs); - if (present_numDVs) - list.add(numDVs); - - boolean present_bitVectors = true && (isSetBitVectors()); - list.add(present_bitVectors); - if (present_bitVectors) - list.add(bitVectors); - - return list.hashCode(); - } - - @Override - public int compareTo(StringColumnStatsData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMaxColLen()).compareTo(other.isSetMaxColLen()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMaxColLen()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxColLen, other.maxColLen); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAvgColLen()).compareTo(other.isSetAvgColLen()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAvgColLen()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.avgColLen, other.avgColLen); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(other.isSetNumDVs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumDVs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, other.numDVs); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBitVectors()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("StringColumnStatsData("); - boolean first = true; - - sb.append("maxColLen:"); - sb.append(this.maxColLen); - first = false; - if (!first) sb.append(", "); - sb.append("avgColLen:"); - sb.append(this.avgColLen); - first = false; - if (!first) sb.append(", "); - sb.append("numNulls:"); - sb.append(this.numNulls); - first = false; - if (!first) sb.append(", "); - sb.append("numDVs:"); - sb.append(this.numDVs); - first = false; - if (isSetBitVectors()) { - if (!first) sb.append(", "); - sb.append("bitVectors:"); - if (this.bitVectors == null) { - sb.append("null"); - } else { - sb.append(this.bitVectors); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetMaxColLen()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxColLen' is unset! Struct:" + toString()); - } - - if (!isSetAvgColLen()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'avgColLen' is unset! Struct:" + toString()); - } - - if (!isSetNumNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); - } - - if (!isSetNumDVs()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); - } - - // 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 { - // 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 StringColumnStatsDataStandardSchemeFactory implements SchemeFactory { - public StringColumnStatsDataStandardScheme getScheme() { - return new StringColumnStatsDataStandardScheme(); - } - } - - private static class StringColumnStatsDataStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, StringColumnStatsData 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: // MAX_COL_LEN - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.maxColLen = iprot.readI64(); - struct.setMaxColLenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // AVG_COL_LEN - if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { - struct.avgColLen = iprot.readDouble(); - struct.setAvgColLenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NUM_NULLS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // NUM_DVS - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.numDVs = iprot.readI64(); - struct.setNumDVsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // BIT_VECTORS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(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, StringColumnStatsData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(MAX_COL_LEN_FIELD_DESC); - oprot.writeI64(struct.maxColLen); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(AVG_COL_LEN_FIELD_DESC); - oprot.writeDouble(struct.avgColLen); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); - oprot.writeI64(struct.numNulls); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); - oprot.writeI64(struct.numDVs); - oprot.writeFieldEnd(); - if (struct.bitVectors != null) { - if (struct.isSetBitVectors()) { - oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); - oprot.writeString(struct.bitVectors); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class StringColumnStatsDataTupleSchemeFactory implements SchemeFactory { - public StringColumnStatsDataTupleScheme getScheme() { - return new StringColumnStatsDataTupleScheme(); - } - } - - private static class StringColumnStatsDataTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, StringColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.maxColLen); - oprot.writeDouble(struct.avgColLen); - oprot.writeI64(struct.numNulls); - oprot.writeI64(struct.numDVs); - BitSet optionals = new BitSet(); - if (struct.isSetBitVectors()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetBitVectors()) { - oprot.writeString(struct.bitVectors); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, StringColumnStatsData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.maxColLen = iprot.readI64(); - struct.setMaxColLenIsSet(true); - struct.avgColLen = iprot.readDouble(); - struct.setAvgColLenIsSet(true); - struct.numNulls = iprot.readI64(); - struct.setNumNullsIsSet(true); - struct.numDVs = iprot.readI64(); - struct.setNumDVsIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.bitVectors = iprot.readString(); - struct.setBitVectorsIsSet(true); - } - } - } - -} - diff --git 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 deleted file mode 100644 index 800219f..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java +++ /dev/null @@ -1,1948 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class Table implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable
{ - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Table"); - - private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)3); - 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)4); - private static final org.apache.thrift.protocol.TField LAST_ACCESS_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAccessTime", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField RETENTION_FIELD_DESC = new org.apache.thrift.protocol.TField("retention", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField SD_FIELD_DESC = new org.apache.thrift.protocol.TField("sd", org.apache.thrift.protocol.TType.STRUCT, (short)7); - private static final org.apache.thrift.protocol.TField PARTITION_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionKeys", org.apache.thrift.protocol.TType.LIST, (short)8); - 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 VIEW_ORIGINAL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("viewOriginalText", org.apache.thrift.protocol.TType.STRING, (short)10); - private static final org.apache.thrift.protocol.TField VIEW_EXPANDED_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("viewExpandedText", org.apache.thrift.protocol.TType.STRING, (short)11); - 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 org.apache.thrift.protocol.TField TEMPORARY_FIELD_DESC = new org.apache.thrift.protocol.TField("temporary", org.apache.thrift.protocol.TType.BOOL, (short)14); - private static final org.apache.thrift.protocol.TField REWRITE_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("rewriteEnabled", org.apache.thrift.protocol.TType.BOOL, (short)15); - - 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 - private int createTime; // required - private int lastAccessTime; // required - private int retention; // required - private StorageDescriptor sd; // required - private List partitionKeys; // required - private Map parameters; // required - private String viewOriginalText; // required - private String viewExpandedText; // required - private String tableType; // required - private PrincipalPrivilegeSet privileges; // optional - private boolean temporary; // optional - private boolean rewriteEnabled; // 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 { - TABLE_NAME((short)1, "tableName"), - DB_NAME((short)2, "dbName"), - OWNER((short)3, "owner"), - CREATE_TIME((short)4, "createTime"), - LAST_ACCESS_TIME((short)5, "lastAccessTime"), - RETENTION((short)6, "retention"), - SD((short)7, "sd"), - PARTITION_KEYS((short)8, "partitionKeys"), - PARAMETERS((short)9, "parameters"), - VIEW_ORIGINAL_TEXT((short)10, "viewOriginalText"), - VIEW_EXPANDED_TEXT((short)11, "viewExpandedText"), - TABLE_TYPE((short)12, "tableType"), - PRIVILEGES((short)13, "privileges"), - TEMPORARY((short)14, "temporary"), - REWRITE_ENABLED((short)15, "rewriteEnabled"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TABLE_NAME - return TABLE_NAME; - case 2: // DB_NAME - return DB_NAME; - case 3: // OWNER - return OWNER; - case 4: // CREATE_TIME - return CREATE_TIME; - case 5: // LAST_ACCESS_TIME - return LAST_ACCESS_TIME; - case 6: // RETENTION - return RETENTION; - case 7: // SD - return SD; - case 8: // PARTITION_KEYS - return PARTITION_KEYS; - case 9: // PARAMETERS - return PARAMETERS; - case 10: // VIEW_ORIGINAL_TEXT - return VIEW_ORIGINAL_TEXT; - case 11: // VIEW_EXPANDED_TEXT - return VIEW_EXPANDED_TEXT; - case 12: // TABLE_TYPE - return TABLE_TYPE; - case 13: // PRIVILEGES - return PRIVILEGES; - case 14: // TEMPORARY - return TEMPORARY; - case 15: // REWRITE_ENABLED - return REWRITE_ENABLED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - 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 static final int __TEMPORARY_ISSET_ID = 3; - private static final int __REWRITEENABLED_ISSET_ID = 4; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.PRIVILEGES,_Fields.TEMPORARY,_Fields.REWRITE_ENABLED}; - 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); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.LAST_ACCESS_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastAccessTime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.RETENTION, new org.apache.thrift.meta_data.FieldMetaData("retention", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.SD, new org.apache.thrift.meta_data.FieldMetaData("sd", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StorageDescriptor.class))); - tmpMap.put(_Fields.PARTITION_KEYS, new org.apache.thrift.meta_data.FieldMetaData("partitionKeys", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); - tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.VIEW_ORIGINAL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("viewOriginalText", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.VIEW_EXPANDED_TEXT, new org.apache.thrift.meta_data.FieldMetaData("viewExpandedText", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("tableType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrincipalPrivilegeSet.class))); - tmpMap.put(_Fields.TEMPORARY, new org.apache.thrift.meta_data.FieldMetaData("temporary", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.REWRITE_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("rewriteEnabled", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Table.class, metaDataMap); - } - - public Table() { - this.temporary = false; - - } - - public Table( - String tableName, - String dbName, - String owner, - int createTime, - int lastAccessTime, - int retention, - StorageDescriptor sd, - List partitionKeys, - Map parameters, - String viewOriginalText, - String viewExpandedText, - String tableType) - { - this(); - this.tableName = tableName; - this.dbName = dbName; - this.owner = owner; - this.createTime = createTime; - setCreateTimeIsSet(true); - this.lastAccessTime = lastAccessTime; - setLastAccessTimeIsSet(true); - this.retention = retention; - setRetentionIsSet(true); - this.sd = sd; - this.partitionKeys = partitionKeys; - this.parameters = parameters; - this.viewOriginalText = viewOriginalText; - this.viewExpandedText = viewExpandedText; - this.tableType = tableType; - } - - /** - * Performs a deep copy on other. - */ - public Table(Table other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetTableName()) { - this.tableName = other.tableName; - } - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetOwner()) { - this.owner = other.owner; - } - this.createTime = other.createTime; - this.lastAccessTime = other.lastAccessTime; - this.retention = other.retention; - if (other.isSetSd()) { - this.sd = new StorageDescriptor(other.sd); - } - if (other.isSetPartitionKeys()) { - List __this__partitionKeys = new ArrayList(other.partitionKeys.size()); - for (FieldSchema other_element : other.partitionKeys) { - __this__partitionKeys.add(new FieldSchema(other_element)); - } - this.partitionKeys = __this__partitionKeys; - } - if (other.isSetParameters()) { - Map __this__parameters = new HashMap(other.parameters); - this.parameters = __this__parameters; - } - if (other.isSetViewOriginalText()) { - this.viewOriginalText = other.viewOriginalText; - } - if (other.isSetViewExpandedText()) { - this.viewExpandedText = other.viewExpandedText; - } - if (other.isSetTableType()) { - this.tableType = other.tableType; - } - if (other.isSetPrivileges()) { - this.privileges = new PrincipalPrivilegeSet(other.privileges); - } - this.temporary = other.temporary; - this.rewriteEnabled = other.rewriteEnabled; - } - - public Table deepCopy() { - return new Table(this); - } - - @Override - public void clear() { - this.tableName = null; - this.dbName = null; - this.owner = null; - setCreateTimeIsSet(false); - this.createTime = 0; - setLastAccessTimeIsSet(false); - this.lastAccessTime = 0; - setRetentionIsSet(false); - this.retention = 0; - this.sd = null; - this.partitionKeys = null; - this.parameters = null; - this.viewOriginalText = null; - this.viewExpandedText = null; - this.tableType = null; - this.privileges = null; - this.temporary = false; - - setRewriteEnabledIsSet(false); - this.rewriteEnabled = false; - } - - public String getTableName() { - return this.tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public void unsetTableName() { - this.tableName = null; - } - - /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ - public boolean isSetTableName() { - return this.tableName != null; - } - - public void setTableNameIsSet(boolean value) { - if (!value) { - this.tableName = null; - } - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getOwner() { - return this.owner; - } - - public void setOwner(String owner) { - this.owner = owner; - } - - public void unsetOwner() { - this.owner = null; - } - - /** Returns true if field owner is set (has been assigned a value) and false otherwise */ - public boolean isSetOwner() { - return this.owner != null; - } - - public void setOwnerIsSet(boolean value) { - if (!value) { - this.owner = null; - } - } - - public int getCreateTime() { - return this.createTime; - } - - public void setCreateTime(int createTime) { - this.createTime = createTime; - setCreateTimeIsSet(true); - } - - public void unsetCreateTime() { - __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - public void setCreateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); - } - - public int getLastAccessTime() { - return this.lastAccessTime; - } - - public void setLastAccessTime(int lastAccessTime) { - this.lastAccessTime = lastAccessTime; - setLastAccessTimeIsSet(true); - } - - public void unsetLastAccessTime() { - __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 EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); - } - - public void setLastAccessTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); - } - - public int getRetention() { - return this.retention; - } - - public void setRetention(int retention) { - this.retention = retention; - setRetentionIsSet(true); - } - - public void unsetRetention() { - __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 EncodingUtils.testBit(__isset_bitfield, __RETENTION_ISSET_ID); - } - - public void setRetentionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETENTION_ISSET_ID, value); - } - - public StorageDescriptor getSd() { - return this.sd; - } - - public void setSd(StorageDescriptor sd) { - this.sd = sd; - } - - public void unsetSd() { - this.sd = null; - } - - /** Returns true if field sd is set (has been assigned a value) and false otherwise */ - public boolean isSetSd() { - return this.sd != null; - } - - public void setSdIsSet(boolean value) { - if (!value) { - this.sd = null; - } - } - - public int getPartitionKeysSize() { - return (this.partitionKeys == null) ? 0 : this.partitionKeys.size(); - } - - public java.util.Iterator getPartitionKeysIterator() { - return (this.partitionKeys == null) ? null : this.partitionKeys.iterator(); - } - - public void addToPartitionKeys(FieldSchema elem) { - if (this.partitionKeys == null) { - this.partitionKeys = new ArrayList(); - } - this.partitionKeys.add(elem); - } - - public List getPartitionKeys() { - return this.partitionKeys; - } - - public void setPartitionKeys(List partitionKeys) { - this.partitionKeys = partitionKeys; - } - - public void unsetPartitionKeys() { - this.partitionKeys = null; - } - - /** Returns true if field partitionKeys is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitionKeys() { - return this.partitionKeys != null; - } - - public void setPartitionKeysIsSet(boolean value) { - if (!value) { - this.partitionKeys = null; - } - } - - public int getParametersSize() { - return (this.parameters == null) ? 0 : this.parameters.size(); - } - - public void putToParameters(String key, String val) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(key, val); - } - - public Map getParameters() { - return this.parameters; - } - - public void setParameters(Map parameters) { - this.parameters = parameters; - } - - public void unsetParameters() { - this.parameters = null; - } - - /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ - public boolean isSetParameters() { - return this.parameters != null; - } - - public void setParametersIsSet(boolean value) { - if (!value) { - this.parameters = null; - } - } - - public String getViewOriginalText() { - return this.viewOriginalText; - } - - public void setViewOriginalText(String viewOriginalText) { - this.viewOriginalText = viewOriginalText; - } - - public void unsetViewOriginalText() { - this.viewOriginalText = null; - } - - /** Returns true if field viewOriginalText is set (has been assigned a value) and false otherwise */ - public boolean isSetViewOriginalText() { - return this.viewOriginalText != null; - } - - public void setViewOriginalTextIsSet(boolean value) { - if (!value) { - this.viewOriginalText = null; - } - } - - public String getViewExpandedText() { - return this.viewExpandedText; - } - - public void setViewExpandedText(String viewExpandedText) { - this.viewExpandedText = viewExpandedText; - } - - public void unsetViewExpandedText() { - this.viewExpandedText = null; - } - - /** Returns true if field viewExpandedText is set (has been assigned a value) and false otherwise */ - public boolean isSetViewExpandedText() { - return this.viewExpandedText != null; - } - - public void setViewExpandedTextIsSet(boolean value) { - if (!value) { - this.viewExpandedText = null; - } - } - - public String getTableType() { - return this.tableType; - } - - public void setTableType(String tableType) { - this.tableType = tableType; - } - - public void unsetTableType() { - this.tableType = null; - } - - /** Returns true if field tableType is set (has been assigned a value) and false otherwise */ - public boolean isSetTableType() { - return this.tableType != null; - } - - public void setTableTypeIsSet(boolean value) { - if (!value) { - this.tableType = null; - } - } - - public PrincipalPrivilegeSet getPrivileges() { - return this.privileges; - } - - public void setPrivileges(PrincipalPrivilegeSet privileges) { - this.privileges = privileges; - } - - public void unsetPrivileges() { - this.privileges = null; - } - - /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ - public boolean isSetPrivileges() { - return this.privileges != null; - } - - public void setPrivilegesIsSet(boolean value) { - if (!value) { - this.privileges = null; - } - } - - public boolean isTemporary() { - return this.temporary; - } - - public void setTemporary(boolean temporary) { - this.temporary = temporary; - setTemporaryIsSet(true); - } - - public void unsetTemporary() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TEMPORARY_ISSET_ID); - } - - /** Returns true if field temporary is set (has been assigned a value) and false otherwise */ - public boolean isSetTemporary() { - return EncodingUtils.testBit(__isset_bitfield, __TEMPORARY_ISSET_ID); - } - - public void setTemporaryIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TEMPORARY_ISSET_ID, value); - } - - public boolean isRewriteEnabled() { - return this.rewriteEnabled; - } - - public void setRewriteEnabled(boolean rewriteEnabled) { - this.rewriteEnabled = rewriteEnabled; - setRewriteEnabledIsSet(true); - } - - public void unsetRewriteEnabled() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REWRITEENABLED_ISSET_ID); - } - - /** Returns true if field rewriteEnabled is set (has been assigned a value) and false otherwise */ - public boolean isSetRewriteEnabled() { - return EncodingUtils.testBit(__isset_bitfield, __REWRITEENABLED_ISSET_ID); - } - - public void setRewriteEnabledIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REWRITEENABLED_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TABLE_NAME: - if (value == null) { - unsetTableName(); - } else { - setTableName((String)value); - } - break; - - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case OWNER: - if (value == null) { - unsetOwner(); - } else { - setOwner((String)value); - } - break; - - case CREATE_TIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((Integer)value); - } - break; - - case LAST_ACCESS_TIME: - if (value == null) { - unsetLastAccessTime(); - } else { - setLastAccessTime((Integer)value); - } - break; - - case RETENTION: - if (value == null) { - unsetRetention(); - } else { - setRetention((Integer)value); - } - break; - - case SD: - if (value == null) { - unsetSd(); - } else { - setSd((StorageDescriptor)value); - } - break; - - case PARTITION_KEYS: - if (value == null) { - unsetPartitionKeys(); - } else { - setPartitionKeys((List)value); - } - break; - - case PARAMETERS: - if (value == null) { - unsetParameters(); - } else { - setParameters((Map)value); - } - break; - - case VIEW_ORIGINAL_TEXT: - if (value == null) { - unsetViewOriginalText(); - } else { - setViewOriginalText((String)value); - } - break; - - case VIEW_EXPANDED_TEXT: - if (value == null) { - unsetViewExpandedText(); - } else { - setViewExpandedText((String)value); - } - break; - - case TABLE_TYPE: - if (value == null) { - unsetTableType(); - } else { - setTableType((String)value); - } - break; - - case PRIVILEGES: - if (value == null) { - unsetPrivileges(); - } else { - setPrivileges((PrincipalPrivilegeSet)value); - } - break; - - case TEMPORARY: - if (value == null) { - unsetTemporary(); - } else { - setTemporary((Boolean)value); - } - break; - - case REWRITE_ENABLED: - if (value == null) { - unsetRewriteEnabled(); - } else { - setRewriteEnabled((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TABLE_NAME: - return getTableName(); - - case DB_NAME: - return getDbName(); - - case OWNER: - return getOwner(); - - case CREATE_TIME: - return getCreateTime(); - - case LAST_ACCESS_TIME: - return getLastAccessTime(); - - case RETENTION: - return getRetention(); - - case SD: - return getSd(); - - case PARTITION_KEYS: - return getPartitionKeys(); - - case PARAMETERS: - return getParameters(); - - case VIEW_ORIGINAL_TEXT: - return getViewOriginalText(); - - case VIEW_EXPANDED_TEXT: - return getViewExpandedText(); - - case TABLE_TYPE: - return getTableType(); - - case PRIVILEGES: - return getPrivileges(); - - case TEMPORARY: - return isTemporary(); - - case REWRITE_ENABLED: - return isRewriteEnabled(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TABLE_NAME: - return isSetTableName(); - case DB_NAME: - return isSetDbName(); - case OWNER: - return isSetOwner(); - case CREATE_TIME: - return isSetCreateTime(); - case LAST_ACCESS_TIME: - return isSetLastAccessTime(); - case RETENTION: - return isSetRetention(); - case SD: - return isSetSd(); - case PARTITION_KEYS: - return isSetPartitionKeys(); - case PARAMETERS: - return isSetParameters(); - case VIEW_ORIGINAL_TEXT: - return isSetViewOriginalText(); - case VIEW_EXPANDED_TEXT: - return isSetViewExpandedText(); - case TABLE_TYPE: - return isSetTableType(); - case PRIVILEGES: - return isSetPrivileges(); - case TEMPORARY: - return isSetTemporary(); - case REWRITE_ENABLED: - return isSetRewriteEnabled(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Table) - return this.equals((Table)that); - return false; - } - - public boolean equals(Table that) { - if (that == null) - return false; - - boolean this_present_tableName = true && this.isSetTableName(); - boolean that_present_tableName = true && that.isSetTableName(); - if (this_present_tableName || that_present_tableName) { - if (!(this_present_tableName && that_present_tableName)) - return false; - if (!this.tableName.equals(that.tableName)) - return false; - } - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_owner = true && this.isSetOwner(); - boolean that_present_owner = true && that.isSetOwner(); - if (this_present_owner || that_present_owner) { - if (!(this_present_owner && that_present_owner)) - return false; - if (!this.owner.equals(that.owner)) - return false; - } - - boolean this_present_createTime = true; - boolean that_present_createTime = true; - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_lastAccessTime = true; - boolean that_present_lastAccessTime = true; - if (this_present_lastAccessTime || that_present_lastAccessTime) { - if (!(this_present_lastAccessTime && that_present_lastAccessTime)) - return false; - if (this.lastAccessTime != that.lastAccessTime) - return false; - } - - boolean this_present_retention = true; - boolean that_present_retention = true; - if (this_present_retention || that_present_retention) { - if (!(this_present_retention && that_present_retention)) - return false; - if (this.retention != that.retention) - return false; - } - - boolean this_present_sd = true && this.isSetSd(); - boolean that_present_sd = true && that.isSetSd(); - if (this_present_sd || that_present_sd) { - if (!(this_present_sd && that_present_sd)) - return false; - if (!this.sd.equals(that.sd)) - return false; - } - - boolean this_present_partitionKeys = true && this.isSetPartitionKeys(); - boolean that_present_partitionKeys = true && that.isSetPartitionKeys(); - if (this_present_partitionKeys || that_present_partitionKeys) { - if (!(this_present_partitionKeys && that_present_partitionKeys)) - return false; - if (!this.partitionKeys.equals(that.partitionKeys)) - return false; - } - - boolean this_present_parameters = true && this.isSetParameters(); - boolean that_present_parameters = true && that.isSetParameters(); - if (this_present_parameters || that_present_parameters) { - if (!(this_present_parameters && that_present_parameters)) - return false; - if (!this.parameters.equals(that.parameters)) - return false; - } - - boolean this_present_viewOriginalText = true && this.isSetViewOriginalText(); - boolean that_present_viewOriginalText = true && that.isSetViewOriginalText(); - if (this_present_viewOriginalText || that_present_viewOriginalText) { - if (!(this_present_viewOriginalText && that_present_viewOriginalText)) - return false; - if (!this.viewOriginalText.equals(that.viewOriginalText)) - return false; - } - - boolean this_present_viewExpandedText = true && this.isSetViewExpandedText(); - boolean that_present_viewExpandedText = true && that.isSetViewExpandedText(); - if (this_present_viewExpandedText || that_present_viewExpandedText) { - if (!(this_present_viewExpandedText && that_present_viewExpandedText)) - return false; - if (!this.viewExpandedText.equals(that.viewExpandedText)) - return false; - } - - boolean this_present_tableType = true && this.isSetTableType(); - boolean that_present_tableType = true && that.isSetTableType(); - if (this_present_tableType || that_present_tableType) { - if (!(this_present_tableType && that_present_tableType)) - return false; - if (!this.tableType.equals(that.tableType)) - return false; - } - - boolean this_present_privileges = true && this.isSetPrivileges(); - boolean that_present_privileges = true && that.isSetPrivileges(); - if (this_present_privileges || that_present_privileges) { - if (!(this_present_privileges && that_present_privileges)) - return false; - if (!this.privileges.equals(that.privileges)) - return false; - } - - boolean this_present_temporary = true && this.isSetTemporary(); - boolean that_present_temporary = true && that.isSetTemporary(); - if (this_present_temporary || that_present_temporary) { - if (!(this_present_temporary && that_present_temporary)) - return false; - if (this.temporary != that.temporary) - return false; - } - - boolean this_present_rewriteEnabled = true && this.isSetRewriteEnabled(); - boolean that_present_rewriteEnabled = true && that.isSetRewriteEnabled(); - if (this_present_rewriteEnabled || that_present_rewriteEnabled) { - if (!(this_present_rewriteEnabled && that_present_rewriteEnabled)) - return false; - if (this.rewriteEnabled != that.rewriteEnabled) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_tableName = true && (isSetTableName()); - list.add(present_tableName); - if (present_tableName) - list.add(tableName); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_owner = true && (isSetOwner()); - list.add(present_owner); - if (present_owner) - list.add(owner); - - boolean present_createTime = true; - list.add(present_createTime); - if (present_createTime) - list.add(createTime); - - boolean present_lastAccessTime = true; - list.add(present_lastAccessTime); - if (present_lastAccessTime) - list.add(lastAccessTime); - - boolean present_retention = true; - list.add(present_retention); - if (present_retention) - list.add(retention); - - boolean present_sd = true && (isSetSd()); - list.add(present_sd); - if (present_sd) - list.add(sd); - - boolean present_partitionKeys = true && (isSetPartitionKeys()); - list.add(present_partitionKeys); - if (present_partitionKeys) - list.add(partitionKeys); - - boolean present_parameters = true && (isSetParameters()); - list.add(present_parameters); - if (present_parameters) - list.add(parameters); - - boolean present_viewOriginalText = true && (isSetViewOriginalText()); - list.add(present_viewOriginalText); - if (present_viewOriginalText) - list.add(viewOriginalText); - - boolean present_viewExpandedText = true && (isSetViewExpandedText()); - list.add(present_viewExpandedText); - if (present_viewExpandedText) - list.add(viewExpandedText); - - boolean present_tableType = true && (isSetTableType()); - list.add(present_tableType); - if (present_tableType) - list.add(tableType); - - boolean present_privileges = true && (isSetPrivileges()); - list.add(present_privileges); - if (present_privileges) - list.add(privileges); - - boolean present_temporary = true && (isSetTemporary()); - list.add(present_temporary); - if (present_temporary) - list.add(temporary); - - boolean present_rewriteEnabled = true && (isSetRewriteEnabled()); - list.add(present_rewriteEnabled); - if (present_rewriteEnabled) - list.add(rewriteEnabled); - - return list.hashCode(); - } - - @Override - public int compareTo(Table other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetOwner()).compareTo(other.isSetOwner()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetOwner()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, other.owner); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCreateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(other.isSetLastAccessTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLastAccessTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastAccessTime, other.lastAccessTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRetention()).compareTo(other.isSetRetention()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRetention()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.retention, other.retention); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSd()).compareTo(other.isSetSd()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSd()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sd, other.sd); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartitionKeys()).compareTo(other.isSetPartitionKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitionKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionKeys, other.partitionKeys); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParameters()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetViewOriginalText()).compareTo(other.isSetViewOriginalText()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetViewOriginalText()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.viewOriginalText, other.viewOriginalText); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetViewExpandedText()).compareTo(other.isSetViewExpandedText()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetViewExpandedText()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.viewExpandedText, other.viewExpandedText); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTableType()).compareTo(other.isSetTableType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableType, other.tableType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrivileges()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTemporary()).compareTo(other.isSetTemporary()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTemporary()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.temporary, other.temporary); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRewriteEnabled()).compareTo(other.isSetRewriteEnabled()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRewriteEnabled()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rewriteEnabled, other.rewriteEnabled); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("Table("); - boolean first = true; - - sb.append("tableName:"); - if (this.tableName == null) { - sb.append("null"); - } else { - sb.append(this.tableName); - } - first = false; - if (!first) sb.append(", "); - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("owner:"); - if (this.owner == null) { - sb.append("null"); - } else { - sb.append(this.owner); - } - first = false; - if (!first) sb.append(", "); - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - if (!first) sb.append(", "); - sb.append("lastAccessTime:"); - sb.append(this.lastAccessTime); - first = false; - if (!first) sb.append(", "); - sb.append("retention:"); - sb.append(this.retention); - first = false; - if (!first) sb.append(", "); - sb.append("sd:"); - if (this.sd == null) { - sb.append("null"); - } else { - sb.append(this.sd); - } - first = false; - if (!first) sb.append(", "); - sb.append("partitionKeys:"); - if (this.partitionKeys == null) { - sb.append("null"); - } else { - sb.append(this.partitionKeys); - } - first = false; - if (!first) sb.append(", "); - sb.append("parameters:"); - if (this.parameters == null) { - sb.append("null"); - } else { - sb.append(this.parameters); - } - first = false; - if (!first) sb.append(", "); - sb.append("viewOriginalText:"); - if (this.viewOriginalText == null) { - sb.append("null"); - } else { - sb.append(this.viewOriginalText); - } - first = false; - if (!first) sb.append(", "); - sb.append("viewExpandedText:"); - if (this.viewExpandedText == null) { - sb.append("null"); - } else { - sb.append(this.viewExpandedText); - } - first = false; - if (!first) sb.append(", "); - sb.append("tableType:"); - if (this.tableType == null) { - sb.append("null"); - } else { - sb.append(this.tableType); - } - first = false; - if (isSetPrivileges()) { - if (!first) sb.append(", "); - sb.append("privileges:"); - if (this.privileges == null) { - sb.append("null"); - } else { - sb.append(this.privileges); - } - first = false; - } - if (isSetTemporary()) { - if (!first) sb.append(", "); - sb.append("temporary:"); - sb.append(this.temporary); - first = false; - } - if (isSetRewriteEnabled()) { - if (!first) sb.append(", "); - sb.append("rewriteEnabled:"); - sb.append(this.rewriteEnabled); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - // 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 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 _list190 = iprot.readListBegin(); - struct.partitionKeys = new ArrayList(_list190.size); - FieldSchema _elem191; - for (int _i192 = 0; _i192 < _list190.size; ++_i192) - { - _elem191 = new FieldSchema(); - _elem191.read(iprot); - struct.partitionKeys.add(_elem191); - } - 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 _map193 = iprot.readMapBegin(); - struct.parameters = new HashMap(2*_map193.size); - String _key194; - String _val195; - for (int _i196 = 0; _i196 < _map193.size; ++_i196) - { - _key194 = iprot.readString(); - _val195 = iprot.readString(); - struct.parameters.put(_key194, _val195); - } - 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; - case 14: // TEMPORARY - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.temporary = iprot.readBool(); - struct.setTemporaryIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 15: // REWRITE_ENABLED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.rewriteEnabled = iprot.readBool(); - struct.setRewriteEnabledIsSet(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 _iter197 : struct.partitionKeys) - { - _iter197.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 _iter198 : struct.parameters.entrySet()) - { - oprot.writeString(_iter198.getKey()); - oprot.writeString(_iter198.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(); - } - } - if (struct.isSetTemporary()) { - oprot.writeFieldBegin(TEMPORARY_FIELD_DESC); - oprot.writeBool(struct.temporary); - oprot.writeFieldEnd(); - } - if (struct.isSetRewriteEnabled()) { - oprot.writeFieldBegin(REWRITE_ENABLED_FIELD_DESC); - oprot.writeBool(struct.rewriteEnabled); - 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); - } - if (struct.isSetTemporary()) { - optionals.set(13); - } - if (struct.isSetRewriteEnabled()) { - optionals.set(14); - } - oprot.writeBitSet(optionals, 15); - 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 _iter199 : struct.partitionKeys) - { - _iter199.write(oprot); - } - } - } - if (struct.isSetParameters()) { - { - oprot.writeI32(struct.parameters.size()); - for (Map.Entry _iter200 : struct.parameters.entrySet()) - { - oprot.writeString(_iter200.getKey()); - oprot.writeString(_iter200.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); - } - if (struct.isSetTemporary()) { - oprot.writeBool(struct.temporary); - } - if (struct.isSetRewriteEnabled()) { - oprot.writeBool(struct.rewriteEnabled); - } - } - - @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(15); - 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 _list201 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.partitionKeys = new ArrayList(_list201.size); - FieldSchema _elem202; - for (int _i203 = 0; _i203 < _list201.size; ++_i203) - { - _elem202 = new FieldSchema(); - _elem202.read(iprot); - struct.partitionKeys.add(_elem202); - } - } - struct.setPartitionKeysIsSet(true); - } - if (incoming.get(8)) { - { - org.apache.thrift.protocol.TMap _map204 = 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*_map204.size); - String _key205; - String _val206; - for (int _i207 = 0; _i207 < _map204.size; ++_i207) - { - _key205 = iprot.readString(); - _val206 = iprot.readString(); - struct.parameters.put(_key205, _val206); - } - } - 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); - } - if (incoming.get(13)) { - struct.temporary = iprot.readBool(); - struct.setTemporaryIsSet(true); - } - if (incoming.get(14)) { - struct.rewriteEnabled = iprot.readBool(); - struct.setRewriteEnabledIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableMeta.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableMeta.java deleted file mode 100644 index 08a8e36..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableMeta.java +++ /dev/null @@ -1,701 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class TableMeta implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableMeta"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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 TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)2); - 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)3); - 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)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TableMetaStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TableMetaTupleSchemeFactory()); - } - - private String dbName; // required - private String tableName; // required - private String tableType; // required - private String comments; // 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 { - DB_NAME((short)1, "dbName"), - TABLE_NAME((short)2, "tableName"), - TABLE_TYPE((short)3, "tableType"), - COMMENTS((short)4, "comments"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TABLE_NAME - return TABLE_NAME; - case 3: // TABLE_TYPE - return TABLE_TYPE; - case 4: // COMMENTS - return COMMENTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _Fields optionals[] = {_Fields.COMMENTS}; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("tableType", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COMMENTS, new org.apache.thrift.meta_data.FieldMetaData("comments", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableMeta.class, metaDataMap); - } - - public TableMeta() { - } - - public TableMeta( - String dbName, - String tableName, - String tableType) - { - this(); - this.dbName = dbName; - this.tableName = tableName; - this.tableType = tableType; - } - - /** - * Performs a deep copy on other. - */ - public TableMeta(TableMeta other) { - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTableName()) { - this.tableName = other.tableName; - } - if (other.isSetTableType()) { - this.tableType = other.tableType; - } - if (other.isSetComments()) { - this.comments = other.comments; - } - } - - public TableMeta deepCopy() { - return new TableMeta(this); - } - - @Override - public void clear() { - this.dbName = null; - this.tableName = null; - this.tableType = null; - this.comments = null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTableName() { - return this.tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public void unsetTableName() { - this.tableName = null; - } - - /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ - public boolean isSetTableName() { - return this.tableName != null; - } - - public void setTableNameIsSet(boolean value) { - if (!value) { - this.tableName = null; - } - } - - public String getTableType() { - return this.tableType; - } - - public void setTableType(String tableType) { - this.tableType = tableType; - } - - public void unsetTableType() { - this.tableType = null; - } - - /** Returns true if field tableType is set (has been assigned a value) and false otherwise */ - public boolean isSetTableType() { - return this.tableType != null; - } - - public void setTableTypeIsSet(boolean value) { - if (!value) { - this.tableType = null; - } - } - - public String getComments() { - return this.comments; - } - - public void setComments(String comments) { - this.comments = comments; - } - - public void unsetComments() { - this.comments = null; - } - - /** Returns true if field comments is set (has been assigned a value) and false otherwise */ - public boolean isSetComments() { - return this.comments != null; - } - - public void setCommentsIsSet(boolean value) { - if (!value) { - this.comments = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTableName(); - } else { - setTableName((String)value); - } - break; - - case TABLE_TYPE: - if (value == null) { - unsetTableType(); - } else { - setTableType((String)value); - } - break; - - case COMMENTS: - if (value == null) { - unsetComments(); - } else { - setComments((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case TABLE_NAME: - return getTableName(); - - case TABLE_TYPE: - return getTableType(); - - case COMMENTS: - return getComments(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case TABLE_NAME: - return isSetTableName(); - case TABLE_TYPE: - return isSetTableType(); - case COMMENTS: - return isSetComments(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof TableMeta) - return this.equals((TableMeta)that); - return false; - } - - public boolean equals(TableMeta that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tableName = true && this.isSetTableName(); - boolean that_present_tableName = true && that.isSetTableName(); - if (this_present_tableName || that_present_tableName) { - if (!(this_present_tableName && that_present_tableName)) - return false; - if (!this.tableName.equals(that.tableName)) - return false; - } - - boolean this_present_tableType = true && this.isSetTableType(); - boolean that_present_tableType = true && that.isSetTableType(); - if (this_present_tableType || that_present_tableType) { - if (!(this_present_tableType && that_present_tableType)) - return false; - if (!this.tableType.equals(that.tableType)) - return false; - } - - boolean this_present_comments = true && this.isSetComments(); - boolean that_present_comments = true && that.isSetComments(); - if (this_present_comments || that_present_comments) { - if (!(this_present_comments && that_present_comments)) - return false; - if (!this.comments.equals(that.comments)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tableName = true && (isSetTableName()); - list.add(present_tableName); - if (present_tableName) - list.add(tableName); - - boolean present_tableType = true && (isSetTableType()); - list.add(present_tableType); - if (present_tableType) - list.add(tableType); - - boolean present_comments = true && (isSetComments()); - list.add(present_comments); - if (present_comments) - list.add(comments); - - return list.hashCode(); - } - - @Override - public int compareTo(TableMeta other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTableType()).compareTo(other.isSetTableType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableType, other.tableType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetComments()).compareTo(other.isSetComments()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetComments()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comments, other.comments); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("TableMeta("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tableName:"); - if (this.tableName == null) { - sb.append("null"); - } else { - sb.append(this.tableName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tableType:"); - if (this.tableType == null) { - sb.append("null"); - } else { - sb.append(this.tableType); - } - first = false; - if (isSetComments()) { - if (!first) sb.append(", "); - sb.append("comments:"); - if (this.comments == null) { - sb.append("null"); - } else { - sb.append(this.comments); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDbName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); - } - - if (!isSetTableName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' is unset! Struct:" + toString()); - } - - if (!isSetTableType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableType' is unset! Struct:" + toString()); - } - - // 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 TableMetaStandardSchemeFactory implements SchemeFactory { - public TableMetaStandardScheme getScheme() { - return new TableMetaStandardScheme(); - } - } - - private static class TableMetaStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, TableMeta 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.dbName = iprot.readString(); - struct.setDbNameIsSet(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.tableName = iprot.readString(); - struct.setTableNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // 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 4: // 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, TableMeta struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - 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(); - } - if (struct.tableType != null) { - oprot.writeFieldBegin(TABLE_TYPE_FIELD_DESC); - oprot.writeString(struct.tableType); - oprot.writeFieldEnd(); - } - if (struct.comments != null) { - if (struct.isSetComments()) { - oprot.writeFieldBegin(COMMENTS_FIELD_DESC); - oprot.writeString(struct.comments); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TableMetaTupleSchemeFactory implements SchemeFactory { - public TableMetaTupleScheme getScheme() { - return new TableMetaTupleScheme(); - } - } - - private static class TableMetaTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TableMeta struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dbName); - oprot.writeString(struct.tableName); - oprot.writeString(struct.tableType); - BitSet optionals = new BitSet(); - if (struct.isSetComments()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetComments()) { - oprot.writeString(struct.comments); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TableMeta struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - struct.tableName = iprot.readString(); - struct.setTableNameIsSet(true); - struct.tableType = iprot.readString(); - struct.setTableTypeIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.comments = iprot.readString(); - struct.setCommentsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java deleted file mode 100644 index b4a0490..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java +++ /dev/null @@ -1,640 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class TableStatsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableStatsRequest"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField COL_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("colNames", org.apache.thrift.protocol.TType.LIST, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TableStatsRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TableStatsRequestTupleSchemeFactory()); - } - - private String dbName; // required - private String tblName; // required - private List colNames; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "dbName"), - TBL_NAME((short)2, "tblName"), - COL_NAMES((short)3, "colNames"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // COL_NAMES - return COL_NAMES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("colNames", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableStatsRequest.class, metaDataMap); - } - - public TableStatsRequest() { - } - - public TableStatsRequest( - String dbName, - String tblName, - List colNames) - { - this(); - this.dbName = dbName; - this.tblName = tblName; - this.colNames = colNames; - } - - /** - * Performs a deep copy on other. - */ - public TableStatsRequest(TableStatsRequest other) { - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTblName()) { - this.tblName = other.tblName; - } - if (other.isSetColNames()) { - List __this__colNames = new ArrayList(other.colNames); - this.colNames = __this__colNames; - } - } - - public TableStatsRequest deepCopy() { - return new TableStatsRequest(this); - } - - @Override - public void clear() { - this.dbName = null; - this.tblName = null; - this.colNames = null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTblName() { - return this.tblName; - } - - public void setTblName(String tblName) { - this.tblName = tblName; - } - - public void unsetTblName() { - this.tblName = null; - } - - /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ - public boolean isSetTblName() { - return this.tblName != null; - } - - public void setTblNameIsSet(boolean value) { - if (!value) { - this.tblName = null; - } - } - - public int getColNamesSize() { - return (this.colNames == null) ? 0 : this.colNames.size(); - } - - public java.util.Iterator getColNamesIterator() { - return (this.colNames == null) ? null : this.colNames.iterator(); - } - - public void addToColNames(String elem) { - if (this.colNames == null) { - this.colNames = new ArrayList(); - } - this.colNames.add(elem); - } - - public List getColNames() { - return this.colNames; - } - - public void setColNames(List colNames) { - this.colNames = colNames; - } - - public void unsetColNames() { - this.colNames = null; - } - - /** Returns true if field colNames is set (has been assigned a value) and false otherwise */ - public boolean isSetColNames() { - return this.colNames != null; - } - - public void setColNamesIsSet(boolean value) { - if (!value) { - this.colNames = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTblName(); - } else { - setTblName((String)value); - } - break; - - case COL_NAMES: - if (value == null) { - unsetColNames(); - } else { - setColNames((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case TBL_NAME: - return getTblName(); - - case COL_NAMES: - return getColNames(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case TBL_NAME: - return isSetTblName(); - case COL_NAMES: - return isSetColNames(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof TableStatsRequest) - return this.equals((TableStatsRequest)that); - return false; - } - - public boolean equals(TableStatsRequest that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tblName = true && this.isSetTblName(); - boolean that_present_tblName = true && that.isSetTblName(); - if (this_present_tblName || that_present_tblName) { - if (!(this_present_tblName && that_present_tblName)) - return false; - if (!this.tblName.equals(that.tblName)) - return false; - } - - boolean this_present_colNames = true && this.isSetColNames(); - boolean that_present_colNames = true && that.isSetColNames(); - if (this_present_colNames || that_present_colNames) { - if (!(this_present_colNames && that_present_colNames)) - return false; - if (!this.colNames.equals(that.colNames)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tblName = true && (isSetTblName()); - list.add(present_tblName); - if (present_tblName) - list.add(tblName); - - boolean present_colNames = true && (isSetColNames()); - list.add(present_colNames); - if (present_colNames) - list.add(colNames); - - return list.hashCode(); - } - - @Override - public int compareTo(TableStatsRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTblName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetColNames()).compareTo(other.isSetColNames()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetColNames()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colNames, other.colNames); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("TableStatsRequest("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tblName:"); - if (this.tblName == null) { - sb.append("null"); - } else { - sb.append(this.tblName); - } - first = false; - if (!first) sb.append(", "); - sb.append("colNames:"); - if (this.colNames == null) { - sb.append("null"); - } else { - sb.append(this.colNames); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDbName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); - } - - if (!isSetTblName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); - } - - if (!isSetColNames()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'colNames' is unset! Struct:" + toString()); - } - - // 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 TableStatsRequestStandardSchemeFactory implements SchemeFactory { - public TableStatsRequestStandardScheme getScheme() { - return new TableStatsRequestStandardScheme(); - } - } - - private static class TableStatsRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, TableStatsRequest 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.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.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // COL_NAMES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list420 = iprot.readListBegin(); - struct.colNames = new ArrayList(_list420.size); - String _elem421; - for (int _i422 = 0; _i422 < _list420.size; ++_i422) - { - _elem421 = iprot.readString(); - struct.colNames.add(_elem421); - } - iprot.readListEnd(); - } - struct.setColNamesIsSet(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, TableStatsRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - if (struct.tblName != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(struct.tblName); - oprot.writeFieldEnd(); - } - if (struct.colNames != null) { - oprot.writeFieldBegin(COL_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.colNames.size())); - for (String _iter423 : struct.colNames) - { - oprot.writeString(_iter423); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TableStatsRequestTupleSchemeFactory implements SchemeFactory { - public TableStatsRequestTupleScheme getScheme() { - return new TableStatsRequestTupleScheme(); - } - } - - private static class TableStatsRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TableStatsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.dbName); - oprot.writeString(struct.tblName); - { - oprot.writeI32(struct.colNames.size()); - for (String _iter424 : struct.colNames) - { - oprot.writeString(_iter424); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TableStatsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - struct.tblName = iprot.readString(); - struct.setTblNameIsSet(true); - { - org.apache.thrift.protocol.TList _list425 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.colNames = new ArrayList(_list425.size); - String _elem426; - for (int _i427 = 0; _i427 < _list425.size; ++_i427) - { - _elem426 = iprot.readString(); - struct.colNames.add(_elem426); - } - } - struct.setColNamesIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java deleted file mode 100644 index 3a2c0fb..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class TableStatsResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableStatsResult"); - - private static final org.apache.thrift.protocol.TField TABLE_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("tableStats", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TableStatsResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TableStatsResultTupleSchemeFactory()); - } - - private List tableStats; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TABLE_STATS((short)1, "tableStats"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TABLE_STATS - return TABLE_STATS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TABLE_STATS, new org.apache.thrift.meta_data.FieldMetaData("tableStats", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsObj.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableStatsResult.class, metaDataMap); - } - - public TableStatsResult() { - } - - public TableStatsResult( - List tableStats) - { - this(); - this.tableStats = tableStats; - } - - /** - * Performs a deep copy on other. - */ - public TableStatsResult(TableStatsResult other) { - if (other.isSetTableStats()) { - List __this__tableStats = new ArrayList(other.tableStats.size()); - for (ColumnStatisticsObj other_element : other.tableStats) { - __this__tableStats.add(new ColumnStatisticsObj(other_element)); - } - this.tableStats = __this__tableStats; - } - } - - public TableStatsResult deepCopy() { - return new TableStatsResult(this); - } - - @Override - public void clear() { - this.tableStats = null; - } - - public int getTableStatsSize() { - return (this.tableStats == null) ? 0 : this.tableStats.size(); - } - - public java.util.Iterator getTableStatsIterator() { - return (this.tableStats == null) ? null : this.tableStats.iterator(); - } - - public void addToTableStats(ColumnStatisticsObj elem) { - if (this.tableStats == null) { - this.tableStats = new ArrayList(); - } - this.tableStats.add(elem); - } - - public List getTableStats() { - return this.tableStats; - } - - public void setTableStats(List tableStats) { - this.tableStats = tableStats; - } - - public void unsetTableStats() { - this.tableStats = null; - } - - /** Returns true if field tableStats is set (has been assigned a value) and false otherwise */ - public boolean isSetTableStats() { - return this.tableStats != null; - } - - public void setTableStatsIsSet(boolean value) { - if (!value) { - this.tableStats = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TABLE_STATS: - if (value == null) { - unsetTableStats(); - } else { - setTableStats((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TABLE_STATS: - return getTableStats(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TABLE_STATS: - return isSetTableStats(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof TableStatsResult) - return this.equals((TableStatsResult)that); - return false; - } - - public boolean equals(TableStatsResult that) { - if (that == null) - return false; - - boolean this_present_tableStats = true && this.isSetTableStats(); - boolean that_present_tableStats = true && that.isSetTableStats(); - if (this_present_tableStats || that_present_tableStats) { - if (!(this_present_tableStats && that_present_tableStats)) - return false; - if (!this.tableStats.equals(that.tableStats)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_tableStats = true && (isSetTableStats()); - list.add(present_tableStats); - if (present_tableStats) - list.add(tableStats); - - return list.hashCode(); - } - - @Override - public int compareTo(TableStatsResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTableStats()).compareTo(other.isSetTableStats()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableStats()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableStats, other.tableStats); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("TableStatsResult("); - boolean first = true; - - sb.append("tableStats:"); - if (this.tableStats == null) { - sb.append("null"); - } else { - sb.append(this.tableStats); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetTableStats()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableStats' is unset! Struct:" + toString()); - } - - // 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 TableStatsResultStandardSchemeFactory implements SchemeFactory { - public TableStatsResultStandardScheme getScheme() { - return new TableStatsResultStandardScheme(); - } - } - - private static class TableStatsResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, TableStatsResult 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_STATS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list394 = iprot.readListBegin(); - struct.tableStats = new ArrayList(_list394.size); - ColumnStatisticsObj _elem395; - for (int _i396 = 0; _i396 < _list394.size; ++_i396) - { - _elem395 = new ColumnStatisticsObj(); - _elem395.read(iprot); - struct.tableStats.add(_elem395); - } - iprot.readListEnd(); - } - struct.setTableStatsIsSet(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, TableStatsResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.tableStats != null) { - oprot.writeFieldBegin(TABLE_STATS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tableStats.size())); - for (ColumnStatisticsObj _iter397 : struct.tableStats) - { - _iter397.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TableStatsResultTupleSchemeFactory implements SchemeFactory { - public TableStatsResultTupleScheme getScheme() { - return new TableStatsResultTupleScheme(); - } - } - - private static class TableStatsResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TableStatsResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.tableStats.size()); - for (ColumnStatisticsObj _iter398 : struct.tableStats) - { - _iter398.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TableStatsResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list399 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.tableStats = new ArrayList(_list399.size); - ColumnStatisticsObj _elem400; - for (int _i401 = 0; _i401 < _list399.size; ++_i401) - { - _elem400 = new ColumnStatisticsObj(); - _elem400.read(iprot); - struct.tableStats.add(_elem400); - } - } - struct.setTableStatsIsSet(true); - } - } - -} - diff --git 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 deleted file mode 100644 index 541cbb9..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java +++ /dev/null @@ -1,187347 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class ThriftHiveMetastore { - - /** - * This interface is live. - */ - public interface Iface extends com.facebook.fb303.FacebookService.Iface { - - public String getMetaConf(String key) throws MetaException, org.apache.thrift.TException; - - public void setMetaConf(String key, String value) throws MetaException, org.apache.thrift.TException; - - public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException; - - public Database get_database(String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public void drop_database(String name, boolean deleteData, boolean cascade) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException; - - public List get_databases(String pattern) throws MetaException, org.apache.thrift.TException; - - public List get_all_databases() throws MetaException, org.apache.thrift.TException; - - public void alter_database(String dbname, Database db) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public Type get_type(String name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public boolean create_type(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException; - - public boolean drop_type(String type) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public Map get_type_all(String name) throws MetaException, org.apache.thrift.TException; - - public List get_fields(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException; - - public List get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException; - - public List get_schema(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException; - - public List get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException; - - public void create_table(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public void create_table_with_constraints(Table tbl, List primaryKeys, List foreignKeys, List uniqueConstraints, List notNullConstraints) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public void drop_constraint(DropConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public void add_primary_key(AddPrimaryKeyRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public void add_foreign_key(AddForeignKeyRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public void add_unique_constraint(AddUniqueConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public void add_not_null_constraint(AddNotNullConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public void drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public void truncate_table(String dbName, String tableName, List partNames) throws MetaException, org.apache.thrift.TException; - - public List get_tables(String db_name, String pattern) throws MetaException, org.apache.thrift.TException; - - public List get_tables_by_type(String db_name, String pattern, String tableType) throws MetaException, org.apache.thrift.TException; - - public List get_table_meta(String db_patterns, String tbl_patterns, List tbl_types) throws MetaException, org.apache.thrift.TException; - - public List get_all_tables(String db_name) throws MetaException, org.apache.thrift.TException; - - public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public List
get_table_objects_by_name(String dbname, List tbl_names) throws org.apache.thrift.TException; - - public GetTableResult get_table_req(GetTableRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public GetTablesResult get_table_objects_by_name_req(GetTablesRequest req) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException; - - public List get_table_names_by_filter(String dbname, String filter, short max_tables) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException; - - public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, org.apache.thrift.TException; - - public void alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException; - - public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade) throws InvalidOperationException, MetaException, org.apache.thrift.TException; - - public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; - - public Partition add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; - - public int add_partitions(List new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; - - public int add_partitions_pspec(List new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; - - public Partition append_partition(String db_name, String tbl_name, List part_vals) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; - - public AddPartitionsResult add_partitions_req(AddPartitionsRequest request) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; - - public Partition append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; - - public Partition append_partition_by_name(String db_name, String tbl_name, String part_name) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; - - public Partition append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; - - public boolean drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public boolean drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public boolean drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public boolean drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public DropPartitionsResult drop_partitions_req(DropPartitionsRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public Partition get_partition(String db_name, String tbl_name, List part_vals) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public Partition exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException; - - public List exchange_partitions(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException; - - public Partition get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public List get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public List get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public List get_partitions_pspec(String db_name, String tbl_name, int max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public List get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, org.apache.thrift.TException; - - public List get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public List get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public List get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public List get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public List get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public PartitionsByExprResult get_partitions_by_expr(PartitionsByExprRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public int get_num_partitions_by_filter(String db_name, String tbl_name, String filter) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public List get_partitions_by_names(String db_name, String tbl_name, List names) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public void alter_partition(String db_name, String tbl_name, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException; - - public void alter_partitions(String db_name, String tbl_name, List new_parts) throws InvalidOperationException, MetaException, org.apache.thrift.TException; - - public void alter_partitions_with_environment_context(String db_name, String tbl_name, List new_parts, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException; - - public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException; - - public void rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException; - - public boolean partition_name_has_valid_characters(List part_vals, boolean throw_exception) throws MetaException, org.apache.thrift.TException; - - public String get_config_value(String name, String defaultValue) throws ConfigValSecurityException, org.apache.thrift.TException; - - public List partition_name_to_vals(String part_name) throws MetaException, org.apache.thrift.TException; - - public Map partition_name_to_spec(String part_name) throws MetaException, org.apache.thrift.TException; - - public void markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException; - - public boolean isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException; - - public Index add_index(Index new_index, Table index_table) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; - - public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws InvalidOperationException, MetaException, org.apache.thrift.TException; - - public boolean drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public Index get_index_by_name(String db_name, String tbl_name, String index_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public List get_indexes(String db_name, String tbl_name, short max_indexes) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, org.apache.thrift.TException; - - public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public ForeignKeysResponse get_foreign_keys(ForeignKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public UniqueConstraintsResponse get_unique_constraints(UniqueConstraintsRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public NotNullConstraintsResponse get_not_null_constraints(NotNullConstraintsRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public boolean update_table_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException; - - public boolean update_partition_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException; - - public ColumnStatistics get_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException; - - public ColumnStatistics get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException; - - public TableStatsResult get_table_statistics_req(TableStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public PartitionsStatsResult get_partitions_statistics_req(PartitionsStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public AggrStats get_aggr_stats_for(PartitionsStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public boolean set_aggr_stats_for(SetPartitionsStatsRequest request) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException; - - public boolean delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException; - - public boolean delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException; - - public void create_function(Function func) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public void drop_function(String dbName, String funcName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public void alter_function(String dbName, String funcName, Function newFunc) throws InvalidOperationException, MetaException, org.apache.thrift.TException; - - public List get_functions(String dbName, String pattern) throws MetaException, org.apache.thrift.TException; - - public Function get_function(String dbName, String funcName) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; - - public GetAllFunctionsResponse get_all_functions() throws MetaException, org.apache.thrift.TException; - - public boolean create_role(Role role) throws MetaException, org.apache.thrift.TException; - - public boolean drop_role(String role_name) throws MetaException, org.apache.thrift.TException; - - public List get_role_names() throws MetaException, org.apache.thrift.TException; - - public boolean grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws MetaException, org.apache.thrift.TException; - - public boolean revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws MetaException, org.apache.thrift.TException; - - public List list_roles(String principal_name, PrincipalType principal_type) throws MetaException, org.apache.thrift.TException; - - public GrantRevokeRoleResponse grant_revoke_role(GrantRevokeRoleRequest request) throws MetaException, org.apache.thrift.TException; - - public GetPrincipalsInRoleResponse get_principals_in_role(GetPrincipalsInRoleRequest request) throws MetaException, org.apache.thrift.TException; - - public GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request) throws MetaException, org.apache.thrift.TException; - - public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names) throws MetaException, org.apache.thrift.TException; - - public List list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws MetaException, org.apache.thrift.TException; - - public boolean grant_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException; - - public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException; - - public GrantRevokePrivilegeResponse grant_revoke_privileges(GrantRevokePrivilegeRequest request) throws MetaException, org.apache.thrift.TException; - - public List set_ugi(String user_name, List group_names) throws MetaException, org.apache.thrift.TException; - - public String get_delegation_token(String token_owner, String renewer_kerberos_principal_name) throws MetaException, org.apache.thrift.TException; - - public long renew_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException; - - public void cancel_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException; - - public boolean add_token(String token_identifier, String delegation_token) throws org.apache.thrift.TException; - - public boolean remove_token(String token_identifier) throws org.apache.thrift.TException; - - public String get_token(String token_identifier) throws org.apache.thrift.TException; - - public List get_all_token_identifiers() throws org.apache.thrift.TException; - - public int add_master_key(String key) throws MetaException, org.apache.thrift.TException; - - public void update_master_key(int seq_number, String key) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; - - public boolean remove_master_key(int key_seq) throws org.apache.thrift.TException; - - public List get_master_keys() throws org.apache.thrift.TException; - - public GetOpenTxnsResponse get_open_txns() throws org.apache.thrift.TException; - - public GetOpenTxnsInfoResponse get_open_txns_info() throws org.apache.thrift.TException; - - public OpenTxnsResponse open_txns(OpenTxnRequest rqst) throws org.apache.thrift.TException; - - public void abort_txn(AbortTxnRequest rqst) throws NoSuchTxnException, org.apache.thrift.TException; - - public void abort_txns(AbortTxnsRequest rqst) throws NoSuchTxnException, org.apache.thrift.TException; - - public void commit_txn(CommitTxnRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException; - - public LockResponse lock(LockRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException; - - public LockResponse check_lock(CheckLockRequest rqst) throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException; - - public void unlock(UnlockRequest rqst) throws NoSuchLockException, TxnOpenException, org.apache.thrift.TException; - - public ShowLocksResponse show_locks(ShowLocksRequest rqst) throws org.apache.thrift.TException; - - public void heartbeat(HeartbeatRequest ids) throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException; - - public HeartbeatTxnRangeResponse heartbeat_txn_range(HeartbeatTxnRangeRequest txns) throws org.apache.thrift.TException; - - public void compact(CompactionRequest rqst) throws org.apache.thrift.TException; - - public CompactionResponse compact2(CompactionRequest rqst) throws org.apache.thrift.TException; - - public ShowCompactResponse show_compact(ShowCompactRequest rqst) throws org.apache.thrift.TException; - - public void add_dynamic_partitions(AddDynamicPartitions rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException; - - public NotificationEventResponse get_next_notification(NotificationEventRequest rqst) throws org.apache.thrift.TException; - - public CurrentNotificationEventId get_current_notificationEventId() throws org.apache.thrift.TException; - - public FireEventResponse fire_listener_event(FireEventRequest rqst) throws org.apache.thrift.TException; - - public void flushCache() throws org.apache.thrift.TException; - - public CmRecycleResponse cm_recycle(CmRecycleRequest request) throws MetaException, org.apache.thrift.TException; - - public GetFileMetadataByExprResult get_file_metadata_by_expr(GetFileMetadataByExprRequest req) throws org.apache.thrift.TException; - - public GetFileMetadataResult get_file_metadata(GetFileMetadataRequest req) throws org.apache.thrift.TException; - - public PutFileMetadataResult put_file_metadata(PutFileMetadataRequest req) throws org.apache.thrift.TException; - - public ClearFileMetadataResult clear_file_metadata(ClearFileMetadataRequest req) throws org.apache.thrift.TException; - - public CacheFileMetadataResult cache_file_metadata(CacheFileMetadataRequest req) throws org.apache.thrift.TException; - - public String get_metastore_db_uuid() throws MetaException, org.apache.thrift.TException; - - } - - public interface AsyncIface extends com.facebook.fb303.FacebookService .AsyncIface { - - public void getMetaConf(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void setMetaConf(String key, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void create_database(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_database(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_database(String name, boolean deleteData, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_databases(String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_all_databases(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void alter_database(String dbname, Database db, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_type(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void create_type(Type type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_type(String type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_type_all(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_fields(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_schema(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void create_table(Table tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void create_table_with_constraints(Table tbl, List primaryKeys, List foreignKeys, List uniqueConstraints, List notNullConstraints, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_constraint(DropConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_primary_key(AddPrimaryKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_foreign_key(AddForeignKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_unique_constraint(AddUniqueConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_not_null_constraint(AddNotNullConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_table(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void truncate_table(String dbName, String tableName, List partNames, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_tables(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_tables_by_type(String db_name, String pattern, String tableType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_table_meta(String db_patterns, String tbl_patterns, List tbl_types, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_all_tables(String db_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_table(String dbname, String tbl_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_table_objects_by_name(String dbname, List tbl_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_table_req(GetTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_table_objects_by_name_req(GetTablesRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_table_names_by_filter(String dbname, String filter, short max_tables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void alter_table(String dbname, String tbl_name, Table new_tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_partition(Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_partitions(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_partitions_pspec(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void append_partition(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_partitions_req(AddPartitionsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void append_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_partitions_req(DropPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partition(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void exchange_partitions(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partitions(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partitions_pspec(String db_name, String tbl_name, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partition_names(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partitions_by_expr(PartitionsByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_num_partitions_by_filter(String db_name, String tbl_name, String filter, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partitions_by_names(String db_name, String tbl_name, List names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void alter_partition(String db_name, String tbl_name, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void alter_partitions(String db_name, String tbl_name, List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void alter_partitions_with_environment_context(String db_name, String tbl_name, List new_parts, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void partition_name_has_valid_characters(List part_vals, boolean throw_exception, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_config_value(String name, String defaultValue, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void partition_name_to_vals(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void partition_name_to_spec(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_index(Index new_index, Table index_table, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_index_by_name(String db_name, String tbl_name, String index_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_indexes(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_index_names(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_primary_keys(PrimaryKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_foreign_keys(ForeignKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_unique_constraints(UniqueConstraintsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_not_null_constraints(NotNullConstraintsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void update_table_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void update_partition_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_table_statistics_req(TableStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_partitions_statistics_req(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_aggr_stats_for(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void set_aggr_stats_for(SetPartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void delete_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void create_function(Function func, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void alter_function(String dbName, String funcName, Function newFunc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_functions(String dbName, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_all_functions(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void create_role(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void drop_role(String role_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_role_names(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void revoke_role(String role_name, String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void list_roles(String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void grant_revoke_role(GrantRevokeRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_principals_in_role(GetPrincipalsInRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void grant_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void revoke_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void grant_revoke_privileges(GrantRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void set_ugi(String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_delegation_token(String token_owner, String renewer_kerberos_principal_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void renew_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void cancel_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_token(String token_identifier, String delegation_token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void remove_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_all_token_identifiers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_master_key(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void update_master_key(int seq_number, String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void remove_master_key(int key_seq, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_master_keys(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_open_txns(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_open_txns_info(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void open_txns(OpenTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void abort_txn(AbortTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void abort_txns(AbortTxnsRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void commit_txn(CommitTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void lock(LockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void check_lock(CheckLockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void unlock(UnlockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void show_locks(ShowLocksRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void heartbeat(HeartbeatRequest ids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void heartbeat_txn_range(HeartbeatTxnRangeRequest txns, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void compact(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void compact2(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void show_compact(ShowCompactRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void add_dynamic_partitions(AddDynamicPartitions rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_next_notification(NotificationEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_current_notificationEventId(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void fire_listener_event(FireEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void flushCache(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void cm_recycle(CmRecycleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_file_metadata_by_expr(GetFileMetadataByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_file_metadata(GetFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void put_file_metadata(PutFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void clear_file_metadata(ClearFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void cache_file_metadata(CacheFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void get_metastore_db_uuid(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - } - - public static class Client extends com.facebook.fb303.FacebookService.Client implements Iface { - public static class Factory implements org.apache.thrift.TServiceClientFactory { - public Factory() {} - public Client getClient(org.apache.thrift.protocol.TProtocol prot) { - return new Client(prot); - } - public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { - return new Client(iprot, oprot); - } - } - - public Client(org.apache.thrift.protocol.TProtocol prot) - { - super(prot, prot); - } - - public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { - super(iprot, oprot); - } - - public String getMetaConf(String key) throws MetaException, org.apache.thrift.TException - { - send_getMetaConf(key); - return recv_getMetaConf(); - } - - public void send_getMetaConf(String key) throws org.apache.thrift.TException - { - getMetaConf_args args = new getMetaConf_args(); - args.setKey(key); - sendBase("getMetaConf", args); - } - - public String recv_getMetaConf() throws MetaException, org.apache.thrift.TException - { - getMetaConf_result result = new getMetaConf_result(); - receiveBase(result, "getMetaConf"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMetaConf failed: unknown result"); - } - - public void setMetaConf(String key, String value) throws MetaException, org.apache.thrift.TException - { - send_setMetaConf(key, value); - recv_setMetaConf(); - } - - public void send_setMetaConf(String key, String value) throws org.apache.thrift.TException - { - setMetaConf_args args = new setMetaConf_args(); - args.setKey(key); - args.setValue(value); - sendBase("setMetaConf", args); - } - - public void recv_setMetaConf() throws MetaException, org.apache.thrift.TException - { - setMetaConf_result result = new setMetaConf_result(); - receiveBase(result, "setMetaConf"); - if (result.o1 != null) { - throw result.o1; - } - return; - } - - public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException - { - send_create_database(database); - recv_create_database(); - } - - public void send_create_database(Database database) throws org.apache.thrift.TException - { - create_database_args args = new create_database_args(); - args.setDatabase(database); - sendBase("create_database", args); - } - - public void recv_create_database() throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException - { - create_database_result result = new create_database_result(); - receiveBase(result, "create_database"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - if (result.o3 != null) { - throw result.o3; - } - return; - } - - public Database get_database(String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_get_database(name); - return recv_get_database(); - } - - public void send_get_database(String name) throws org.apache.thrift.TException - { - get_database_args args = new get_database_args(); - args.setName(name); - sendBase("get_database", args); - } - - public Database recv_get_database() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - get_database_result result = new get_database_result(); - receiveBase(result, "get_database"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_database failed: unknown result"); - } - - public void drop_database(String name, boolean deleteData, boolean cascade) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException - { - send_drop_database(name, deleteData, cascade); - recv_drop_database(); - } - - public void send_drop_database(String name, boolean deleteData, boolean cascade) throws org.apache.thrift.TException - { - drop_database_args args = new drop_database_args(); - args.setName(name); - args.setDeleteData(deleteData); - args.setCascade(cascade); - sendBase("drop_database", args); - } - - public void recv_drop_database() throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException - { - drop_database_result result = new drop_database_result(); - receiveBase(result, "drop_database"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - if (result.o3 != null) { - throw result.o3; - } - return; - } - - public List get_databases(String pattern) throws MetaException, org.apache.thrift.TException - { - send_get_databases(pattern); - return recv_get_databases(); - } - - public void send_get_databases(String pattern) throws org.apache.thrift.TException - { - get_databases_args args = new get_databases_args(); - args.setPattern(pattern); - sendBase("get_databases", args); - } - - public List recv_get_databases() throws MetaException, org.apache.thrift.TException - { - get_databases_result result = new get_databases_result(); - receiveBase(result, "get_databases"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_databases failed: unknown result"); - } - - public List get_all_databases() throws MetaException, org.apache.thrift.TException - { - send_get_all_databases(); - return recv_get_all_databases(); - } - - public void send_get_all_databases() throws org.apache.thrift.TException - { - get_all_databases_args args = new get_all_databases_args(); - sendBase("get_all_databases", args); - } - - public List recv_get_all_databases() throws MetaException, org.apache.thrift.TException - { - get_all_databases_result result = new get_all_databases_result(); - receiveBase(result, "get_all_databases"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result"); - } - - public void alter_database(String dbname, Database db) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_alter_database(dbname, db); - recv_alter_database(); - } - - public void send_alter_database(String dbname, Database db) throws org.apache.thrift.TException - { - alter_database_args args = new alter_database_args(); - args.setDbname(dbname); - args.setDb(db); - sendBase("alter_database", args); - } - - public void recv_alter_database() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - alter_database_result result = new alter_database_result(); - receiveBase(result, "alter_database"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public Type get_type(String name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_type(name); - return recv_get_type(); - } - - public void send_get_type(String name) throws org.apache.thrift.TException - { - get_type_args args = new get_type_args(); - args.setName(name); - sendBase("get_type", args); - } - - public Type recv_get_type() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_type_result result = new get_type_result(); - receiveBase(result, "get_type"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_type failed: unknown result"); - } - - public boolean create_type(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException - { - send_create_type(type); - return recv_create_type(); - } - - public void send_create_type(Type type) throws org.apache.thrift.TException - { - create_type_args args = new create_type_args(); - args.setType(type); - sendBase("create_type", args); - } - - public boolean recv_create_type() throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException - { - create_type_result result = new create_type_result(); - receiveBase(result, "create_type"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "create_type failed: unknown result"); - } - - public boolean drop_type(String type) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_drop_type(type); - return recv_drop_type(); - } - - public void send_drop_type(String type) throws org.apache.thrift.TException - { - drop_type_args args = new drop_type_args(); - args.setType(type); - sendBase("drop_type", args); - } - - public boolean recv_drop_type() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - drop_type_result result = new drop_type_result(); - receiveBase(result, "drop_type"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_type failed: unknown result"); - } - - public Map get_type_all(String name) throws MetaException, org.apache.thrift.TException - { - send_get_type_all(name); - return recv_get_type_all(); - } - - public void send_get_type_all(String name) throws org.apache.thrift.TException - { - get_type_all_args args = new get_type_all_args(); - args.setName(name); - sendBase("get_type_all", args); - } - - public Map recv_get_type_all() throws MetaException, org.apache.thrift.TException - { - get_type_all_result result = new get_type_all_result(); - receiveBase(result, "get_type_all"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_type_all failed: unknown result"); - } - - public List get_fields(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException - { - send_get_fields(db_name, table_name); - return recv_get_fields(); - } - - public void send_get_fields(String db_name, String table_name) throws org.apache.thrift.TException - { - get_fields_args args = new get_fields_args(); - args.setDb_name(db_name); - args.setTable_name(table_name); - sendBase("get_fields", args); - } - - public List recv_get_fields() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException - { - get_fields_result result = new get_fields_result(); - receiveBase(result, "get_fields"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_fields failed: unknown result"); - } - - public List get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException - { - send_get_fields_with_environment_context(db_name, table_name, environment_context); - return recv_get_fields_with_environment_context(); - } - - public void send_get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws org.apache.thrift.TException - { - get_fields_with_environment_context_args args = new get_fields_with_environment_context_args(); - args.setDb_name(db_name); - args.setTable_name(table_name); - args.setEnvironment_context(environment_context); - sendBase("get_fields_with_environment_context", args); - } - - public List recv_get_fields_with_environment_context() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException - { - get_fields_with_environment_context_result result = new get_fields_with_environment_context_result(); - receiveBase(result, "get_fields_with_environment_context"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_fields_with_environment_context failed: unknown result"); - } - - public List get_schema(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException - { - send_get_schema(db_name, table_name); - return recv_get_schema(); - } - - public void send_get_schema(String db_name, String table_name) throws org.apache.thrift.TException - { - get_schema_args args = new get_schema_args(); - args.setDb_name(db_name); - args.setTable_name(table_name); - sendBase("get_schema", args); - } - - public List recv_get_schema() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException - { - get_schema_result result = new get_schema_result(); - receiveBase(result, "get_schema"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_schema failed: unknown result"); - } - - public List get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException - { - send_get_schema_with_environment_context(db_name, table_name, environment_context); - return recv_get_schema_with_environment_context(); - } - - public void send_get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws org.apache.thrift.TException - { - get_schema_with_environment_context_args args = new get_schema_with_environment_context_args(); - args.setDb_name(db_name); - args.setTable_name(table_name); - args.setEnvironment_context(environment_context); - sendBase("get_schema_with_environment_context", args); - } - - public List recv_get_schema_with_environment_context() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException - { - get_schema_with_environment_context_result result = new get_schema_with_environment_context_result(); - receiveBase(result, "get_schema_with_environment_context"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_schema_with_environment_context failed: unknown result"); - } - - public void create_table(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_create_table(tbl); - recv_create_table(); - } - - public void send_create_table(Table tbl) throws org.apache.thrift.TException - { - create_table_args args = new create_table_args(); - args.setTbl(tbl); - sendBase("create_table", args); - } - - public void recv_create_table() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException - { - create_table_result result = new create_table_result(); - receiveBase(result, "create_table"); - 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 void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_create_table_with_environment_context(tbl, environment_context); - recv_create_table_with_environment_context(); - } - - public void send_create_table_with_environment_context(Table tbl, EnvironmentContext environment_context) throws org.apache.thrift.TException - { - create_table_with_environment_context_args args = new create_table_with_environment_context_args(); - args.setTbl(tbl); - args.setEnvironment_context(environment_context); - sendBase("create_table_with_environment_context", args); - } - - public void recv_create_table_with_environment_context() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException - { - create_table_with_environment_context_result result = new create_table_with_environment_context_result(); - receiveBase(result, "create_table_with_environment_context"); - 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 void create_table_with_constraints(Table tbl, List primaryKeys, List foreignKeys, List uniqueConstraints, List notNullConstraints) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints); - recv_create_table_with_constraints(); - } - - public void send_create_table_with_constraints(Table tbl, List primaryKeys, List foreignKeys, List uniqueConstraints, List notNullConstraints) throws org.apache.thrift.TException - { - create_table_with_constraints_args args = new create_table_with_constraints_args(); - args.setTbl(tbl); - args.setPrimaryKeys(primaryKeys); - args.setForeignKeys(foreignKeys); - args.setUniqueConstraints(uniqueConstraints); - args.setNotNullConstraints(notNullConstraints); - sendBase("create_table_with_constraints", args); - } - - public void recv_create_table_with_constraints() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException - { - create_table_with_constraints_result result = new create_table_with_constraints_result(); - receiveBase(result, "create_table_with_constraints"); - 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 void drop_constraint(DropConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_drop_constraint(req); - recv_drop_constraint(); - } - - public void send_drop_constraint(DropConstraintRequest req) throws org.apache.thrift.TException - { - drop_constraint_args args = new drop_constraint_args(); - args.setReq(req); - sendBase("drop_constraint", args); - } - - public void recv_drop_constraint() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - drop_constraint_result result = new drop_constraint_result(); - receiveBase(result, "drop_constraint"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o3 != null) { - throw result.o3; - } - return; - } - - public void add_primary_key(AddPrimaryKeyRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_add_primary_key(req); - recv_add_primary_key(); - } - - public void send_add_primary_key(AddPrimaryKeyRequest req) throws org.apache.thrift.TException - { - add_primary_key_args args = new add_primary_key_args(); - args.setReq(req); - sendBase("add_primary_key", args); - } - - public void recv_add_primary_key() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - add_primary_key_result result = new add_primary_key_result(); - receiveBase(result, "add_primary_key"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public void add_foreign_key(AddForeignKeyRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_add_foreign_key(req); - recv_add_foreign_key(); - } - - public void send_add_foreign_key(AddForeignKeyRequest req) throws org.apache.thrift.TException - { - add_foreign_key_args args = new add_foreign_key_args(); - args.setReq(req); - sendBase("add_foreign_key", args); - } - - public void recv_add_foreign_key() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - add_foreign_key_result result = new add_foreign_key_result(); - receiveBase(result, "add_foreign_key"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public void add_unique_constraint(AddUniqueConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_add_unique_constraint(req); - recv_add_unique_constraint(); - } - - public void send_add_unique_constraint(AddUniqueConstraintRequest req) throws org.apache.thrift.TException - { - add_unique_constraint_args args = new add_unique_constraint_args(); - args.setReq(req); - sendBase("add_unique_constraint", args); - } - - public void recv_add_unique_constraint() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - add_unique_constraint_result result = new add_unique_constraint_result(); - receiveBase(result, "add_unique_constraint"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public void add_not_null_constraint(AddNotNullConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_add_not_null_constraint(req); - recv_add_not_null_constraint(); - } - - public void send_add_not_null_constraint(AddNotNullConstraintRequest req) throws org.apache.thrift.TException - { - add_not_null_constraint_args args = new add_not_null_constraint_args(); - args.setReq(req); - sendBase("add_not_null_constraint", args); - } - - public void recv_add_not_null_constraint() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - add_not_null_constraint_result result = new add_not_null_constraint_result(); - receiveBase(result, "add_not_null_constraint"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public void drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_drop_table(dbname, name, deleteData); - recv_drop_table(); - } - - public void send_drop_table(String dbname, String name, boolean deleteData) throws org.apache.thrift.TException - { - drop_table_args args = new drop_table_args(); - args.setDbname(dbname); - args.setName(name); - args.setDeleteData(deleteData); - sendBase("drop_table", args); - } - - public void recv_drop_table() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - drop_table_result result = new drop_table_result(); - receiveBase(result, "drop_table"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o3 != null) { - throw result.o3; - } - return; - } - - public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_drop_table_with_environment_context(dbname, name, deleteData, environment_context); - recv_drop_table_with_environment_context(); - } - - public void send_drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context) throws org.apache.thrift.TException - { - drop_table_with_environment_context_args args = new drop_table_with_environment_context_args(); - args.setDbname(dbname); - args.setName(name); - args.setDeleteData(deleteData); - args.setEnvironment_context(environment_context); - sendBase("drop_table_with_environment_context", args); - } - - public void recv_drop_table_with_environment_context() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - drop_table_with_environment_context_result result = new drop_table_with_environment_context_result(); - receiveBase(result, "drop_table_with_environment_context"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o3 != null) { - throw result.o3; - } - return; - } - - public void truncate_table(String dbName, String tableName, List partNames) throws MetaException, org.apache.thrift.TException - { - send_truncate_table(dbName, tableName, partNames); - recv_truncate_table(); - } - - public void send_truncate_table(String dbName, String tableName, List partNames) throws org.apache.thrift.TException - { - truncate_table_args args = new truncate_table_args(); - args.setDbName(dbName); - args.setTableName(tableName); - args.setPartNames(partNames); - sendBase("truncate_table", args); - } - - public void recv_truncate_table() throws MetaException, org.apache.thrift.TException - { - truncate_table_result result = new truncate_table_result(); - receiveBase(result, "truncate_table"); - if (result.o1 != null) { - throw result.o1; - } - return; - } - - public List get_tables(String db_name, String pattern) throws MetaException, org.apache.thrift.TException - { - send_get_tables(db_name, pattern); - return recv_get_tables(); - } - - public void send_get_tables(String db_name, String pattern) throws org.apache.thrift.TException - { - get_tables_args args = new get_tables_args(); - args.setDb_name(db_name); - args.setPattern(pattern); - sendBase("get_tables", args); - } - - public List recv_get_tables() throws MetaException, org.apache.thrift.TException - { - get_tables_result result = new get_tables_result(); - receiveBase(result, "get_tables"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_tables failed: unknown result"); - } - - public List get_tables_by_type(String db_name, String pattern, String tableType) throws MetaException, org.apache.thrift.TException - { - send_get_tables_by_type(db_name, pattern, tableType); - return recv_get_tables_by_type(); - } - - public void send_get_tables_by_type(String db_name, String pattern, String tableType) throws org.apache.thrift.TException - { - get_tables_by_type_args args = new get_tables_by_type_args(); - args.setDb_name(db_name); - args.setPattern(pattern); - args.setTableType(tableType); - sendBase("get_tables_by_type", args); - } - - public List recv_get_tables_by_type() throws MetaException, org.apache.thrift.TException - { - get_tables_by_type_result result = new get_tables_by_type_result(); - receiveBase(result, "get_tables_by_type"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_tables_by_type failed: unknown result"); - } - - public List get_table_meta(String db_patterns, String tbl_patterns, List tbl_types) throws MetaException, org.apache.thrift.TException - { - send_get_table_meta(db_patterns, tbl_patterns, tbl_types); - return recv_get_table_meta(); - } - - public void send_get_table_meta(String db_patterns, String tbl_patterns, List tbl_types) throws org.apache.thrift.TException - { - get_table_meta_args args = new get_table_meta_args(); - args.setDb_patterns(db_patterns); - args.setTbl_patterns(tbl_patterns); - args.setTbl_types(tbl_types); - sendBase("get_table_meta", args); - } - - public List recv_get_table_meta() throws MetaException, org.apache.thrift.TException - { - get_table_meta_result result = new get_table_meta_result(); - receiveBase(result, "get_table_meta"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_meta failed: unknown result"); - } - - public List get_all_tables(String db_name) throws MetaException, org.apache.thrift.TException - { - send_get_all_tables(db_name); - return recv_get_all_tables(); - } - - public void send_get_all_tables(String db_name) throws org.apache.thrift.TException - { - get_all_tables_args args = new get_all_tables_args(); - args.setDb_name(db_name); - sendBase("get_all_tables", args); - } - - public List recv_get_all_tables() throws MetaException, org.apache.thrift.TException - { - get_all_tables_result result = new get_all_tables_result(); - receiveBase(result, "get_all_tables"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result"); - } - - public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_table(dbname, tbl_name); - return recv_get_table(); - } - - public void send_get_table(String dbname, String tbl_name) throws org.apache.thrift.TException - { - get_table_args args = new get_table_args(); - args.setDbname(dbname); - args.setTbl_name(tbl_name); - sendBase("get_table", args); - } - - public Table recv_get_table() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_table_result result = new get_table_result(); - receiveBase(result, "get_table"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table failed: unknown result"); - } - - public List
get_table_objects_by_name(String dbname, List tbl_names) throws org.apache.thrift.TException - { - send_get_table_objects_by_name(dbname, tbl_names); - return recv_get_table_objects_by_name(); - } - - public void send_get_table_objects_by_name(String dbname, List tbl_names) throws org.apache.thrift.TException - { - get_table_objects_by_name_args args = new get_table_objects_by_name_args(); - args.setDbname(dbname); - args.setTbl_names(tbl_names); - sendBase("get_table_objects_by_name", args); - } - - public List
recv_get_table_objects_by_name() throws org.apache.thrift.TException - { - get_table_objects_by_name_result result = new get_table_objects_by_name_result(); - receiveBase(result, "get_table_objects_by_name"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); - } - - public GetTableResult get_table_req(GetTableRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_table_req(req); - return recv_get_table_req(); - } - - public void send_get_table_req(GetTableRequest req) throws org.apache.thrift.TException - { - get_table_req_args args = new get_table_req_args(); - args.setReq(req); - sendBase("get_table_req", args); - } - - public GetTableResult recv_get_table_req() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_table_req_result result = new get_table_req_result(); - receiveBase(result, "get_table_req"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_req failed: unknown result"); - } - - public GetTablesResult get_table_objects_by_name_req(GetTablesRequest req) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException - { - send_get_table_objects_by_name_req(req); - return recv_get_table_objects_by_name_req(); - } - - public void send_get_table_objects_by_name_req(GetTablesRequest req) throws org.apache.thrift.TException - { - get_table_objects_by_name_req_args args = new get_table_objects_by_name_req_args(); - args.setReq(req); - sendBase("get_table_objects_by_name_req", args); - } - - public GetTablesResult recv_get_table_objects_by_name_req() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException - { - get_table_objects_by_name_req_result result = new get_table_objects_by_name_req_result(); - receiveBase(result, "get_table_objects_by_name_req"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_objects_by_name_req failed: unknown result"); - } - - public List get_table_names_by_filter(String dbname, String filter, short max_tables) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException - { - send_get_table_names_by_filter(dbname, filter, max_tables); - return recv_get_table_names_by_filter(); - } - - public void send_get_table_names_by_filter(String dbname, String filter, short max_tables) throws org.apache.thrift.TException - { - get_table_names_by_filter_args args = new get_table_names_by_filter_args(); - args.setDbname(dbname); - args.setFilter(filter); - args.setMax_tables(max_tables); - sendBase("get_table_names_by_filter", args); - } - - public List recv_get_table_names_by_filter() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException - { - get_table_names_by_filter_result result = new get_table_names_by_filter_result(); - receiveBase(result, "get_table_names_by_filter"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); - } - - public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - send_alter_table(dbname, tbl_name, new_tbl); - recv_alter_table(); - } - - public void send_alter_table(String dbname, String tbl_name, Table new_tbl) throws org.apache.thrift.TException - { - alter_table_args args = new alter_table_args(); - args.setDbname(dbname); - args.setTbl_name(tbl_name); - args.setNew_tbl(new_tbl); - sendBase("alter_table", args); - } - - public void recv_alter_table() throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - alter_table_result result = new alter_table_result(); - receiveBase(result, "alter_table"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public void alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); - recv_alter_table_with_environment_context(); - } - - public void send_alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context) throws org.apache.thrift.TException - { - alter_table_with_environment_context_args args = new alter_table_with_environment_context_args(); - args.setDbname(dbname); - args.setTbl_name(tbl_name); - args.setNew_tbl(new_tbl); - args.setEnvironment_context(environment_context); - sendBase("alter_table_with_environment_context", args); - } - - public void recv_alter_table_with_environment_context() throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - alter_table_with_environment_context_result result = new alter_table_with_environment_context_result(); - receiveBase(result, "alter_table_with_environment_context"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade) throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade); - recv_alter_table_with_cascade(); - } - - public void send_alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade) throws org.apache.thrift.TException - { - alter_table_with_cascade_args args = new alter_table_with_cascade_args(); - args.setDbname(dbname); - args.setTbl_name(tbl_name); - args.setNew_tbl(new_tbl); - args.setCascade(cascade); - sendBase("alter_table_with_cascade", args); - } - - public void recv_alter_table_with_cascade() throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - alter_table_with_cascade_result result = new alter_table_with_cascade_result(); - receiveBase(result, "alter_table_with_cascade"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - send_add_partition(new_part); - return recv_add_partition(); - } - - public void send_add_partition(Partition new_part) throws org.apache.thrift.TException - { - add_partition_args args = new add_partition_args(); - args.setNew_part(new_part); - sendBase("add_partition", args); - } - - public Partition recv_add_partition() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - add_partition_result result = new add_partition_result(); - receiveBase(result, "add_partition"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partition failed: unknown result"); - } - - public Partition add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - send_add_partition_with_environment_context(new_part, environment_context); - return recv_add_partition_with_environment_context(); - } - - public void send_add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context) throws org.apache.thrift.TException - { - add_partition_with_environment_context_args args = new add_partition_with_environment_context_args(); - args.setNew_part(new_part); - args.setEnvironment_context(environment_context); - sendBase("add_partition_with_environment_context", args); - } - - public Partition recv_add_partition_with_environment_context() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - add_partition_with_environment_context_result result = new add_partition_with_environment_context_result(); - receiveBase(result, "add_partition_with_environment_context"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partition_with_environment_context failed: unknown result"); - } - - public int add_partitions(List new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - send_add_partitions(new_parts); - return recv_add_partitions(); - } - - public void send_add_partitions(List new_parts) throws org.apache.thrift.TException - { - add_partitions_args args = new add_partitions_args(); - args.setNew_parts(new_parts); - sendBase("add_partitions", args); - } - - public int recv_add_partitions() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - add_partitions_result result = new add_partitions_result(); - receiveBase(result, "add_partitions"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partitions failed: unknown result"); - } - - public int add_partitions_pspec(List new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - send_add_partitions_pspec(new_parts); - return recv_add_partitions_pspec(); - } - - public void send_add_partitions_pspec(List new_parts) throws org.apache.thrift.TException - { - add_partitions_pspec_args args = new add_partitions_pspec_args(); - args.setNew_parts(new_parts); - sendBase("add_partitions_pspec", args); - } - - public int recv_add_partitions_pspec() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - add_partitions_pspec_result result = new add_partitions_pspec_result(); - receiveBase(result, "add_partitions_pspec"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partitions_pspec failed: unknown result"); - } - - public Partition append_partition(String db_name, String tbl_name, List part_vals) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - send_append_partition(db_name, tbl_name, part_vals); - return recv_append_partition(); - } - - public void send_append_partition(String db_name, String tbl_name, List part_vals) throws org.apache.thrift.TException - { - append_partition_args args = new append_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - sendBase("append_partition", args); - } - - public Partition recv_append_partition() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - append_partition_result result = new append_partition_result(); - receiveBase(result, "append_partition"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_partition failed: unknown result"); - } - - public AddPartitionsResult add_partitions_req(AddPartitionsRequest request) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - send_add_partitions_req(request); - return recv_add_partitions_req(); - } - - public void send_add_partitions_req(AddPartitionsRequest request) throws org.apache.thrift.TException - { - add_partitions_req_args args = new add_partitions_req_args(); - args.setRequest(request); - sendBase("add_partitions_req", args); - } - - public AddPartitionsResult recv_add_partitions_req() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - add_partitions_req_result result = new add_partitions_req_result(); - receiveBase(result, "add_partitions_req"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partitions_req failed: unknown result"); - } - - public Partition append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context); - return recv_append_partition_with_environment_context(); - } - - public void send_append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context) throws org.apache.thrift.TException - { - append_partition_with_environment_context_args args = new append_partition_with_environment_context_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setEnvironment_context(environment_context); - sendBase("append_partition_with_environment_context", args); - } - - public Partition recv_append_partition_with_environment_context() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - append_partition_with_environment_context_result result = new append_partition_with_environment_context_result(); - receiveBase(result, "append_partition_with_environment_context"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_partition_with_environment_context failed: unknown result"); - } - - public Partition append_partition_by_name(String db_name, String tbl_name, String part_name) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - send_append_partition_by_name(db_name, tbl_name, part_name); - return recv_append_partition_by_name(); - } - - public void send_append_partition_by_name(String db_name, String tbl_name, String part_name) throws org.apache.thrift.TException - { - append_partition_by_name_args args = new append_partition_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - sendBase("append_partition_by_name", args); - } - - public Partition recv_append_partition_by_name() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - append_partition_by_name_result result = new append_partition_by_name_result(); - receiveBase(result, "append_partition_by_name"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_partition_by_name failed: unknown result"); - } - - public Partition append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context); - return recv_append_partition_by_name_with_environment_context(); - } - - public void send_append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context) throws org.apache.thrift.TException - { - append_partition_by_name_with_environment_context_args args = new append_partition_by_name_with_environment_context_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.setEnvironment_context(environment_context); - sendBase("append_partition_by_name_with_environment_context", args); - } - - public Partition recv_append_partition_by_name_with_environment_context() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - append_partition_by_name_with_environment_context_result result = new append_partition_by_name_with_environment_context_result(); - receiveBase(result, "append_partition_by_name_with_environment_context"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_partition_by_name_with_environment_context failed: unknown result"); - } - - public boolean drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_drop_partition(db_name, tbl_name, part_vals, deleteData); - return recv_drop_partition(); - } - - public void send_drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws org.apache.thrift.TException - { - drop_partition_args args = new drop_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setDeleteData(deleteData); - sendBase("drop_partition", args); - } - - public boolean recv_drop_partition() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - drop_partition_result result = new drop_partition_result(); - receiveBase(result, "drop_partition"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partition failed: unknown result"); - } - - public boolean drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); - return recv_drop_partition_with_environment_context(); - } - - public void send_drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context) throws org.apache.thrift.TException - { - drop_partition_with_environment_context_args args = new drop_partition_with_environment_context_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setDeleteData(deleteData); - args.setEnvironment_context(environment_context); - sendBase("drop_partition_with_environment_context", args); - } - - public boolean recv_drop_partition_with_environment_context() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - drop_partition_with_environment_context_result result = new drop_partition_with_environment_context_result(); - receiveBase(result, "drop_partition_with_environment_context"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partition_with_environment_context failed: unknown result"); - } - - public boolean drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - return recv_drop_partition_by_name(); - } - - public void send_drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws org.apache.thrift.TException - { - drop_partition_by_name_args args = new drop_partition_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.setDeleteData(deleteData); - sendBase("drop_partition_by_name", args); - } - - public boolean recv_drop_partition_by_name() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - drop_partition_by_name_result result = new drop_partition_by_name_result(); - receiveBase(result, "drop_partition_by_name"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partition_by_name failed: unknown result"); - } - - public boolean drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); - return recv_drop_partition_by_name_with_environment_context(); - } - - public void send_drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context) throws org.apache.thrift.TException - { - drop_partition_by_name_with_environment_context_args args = new drop_partition_by_name_with_environment_context_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.setDeleteData(deleteData); - args.setEnvironment_context(environment_context); - sendBase("drop_partition_by_name_with_environment_context", args); - } - - public boolean recv_drop_partition_by_name_with_environment_context() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - drop_partition_by_name_with_environment_context_result result = new drop_partition_by_name_with_environment_context_result(); - receiveBase(result, "drop_partition_by_name_with_environment_context"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partition_by_name_with_environment_context failed: unknown result"); - } - - public DropPartitionsResult drop_partitions_req(DropPartitionsRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_drop_partitions_req(req); - return recv_drop_partitions_req(); - } - - public void send_drop_partitions_req(DropPartitionsRequest req) throws org.apache.thrift.TException - { - drop_partitions_req_args args = new drop_partitions_req_args(); - args.setReq(req); - sendBase("drop_partitions_req", args); - } - - public DropPartitionsResult recv_drop_partitions_req() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - drop_partitions_req_result result = new drop_partitions_req_result(); - receiveBase(result, "drop_partitions_req"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partitions_req failed: unknown result"); - } - - public Partition get_partition(String db_name, String tbl_name, List part_vals) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_partition(db_name, tbl_name, part_vals); - return recv_get_partition(); - } - - public void send_get_partition(String db_name, String tbl_name, List part_vals) throws org.apache.thrift.TException - { - get_partition_args args = new get_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - sendBase("get_partition", args); - } - - public Partition recv_get_partition() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_partition_result result = new get_partition_result(); - receiveBase(result, "get_partition"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition failed: unknown result"); - } - - public Partition exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException - { - send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); - return recv_exchange_partition(); - } - - public void send_exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws org.apache.thrift.TException - { - exchange_partition_args args = new exchange_partition_args(); - args.setPartitionSpecs(partitionSpecs); - args.setSource_db(source_db); - args.setSource_table_name(source_table_name); - args.setDest_db(dest_db); - args.setDest_table_name(dest_table_name); - sendBase("exchange_partition", args); - } - - public Partition recv_exchange_partition() throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException - { - exchange_partition_result result = new exchange_partition_result(); - receiveBase(result, "exchange_partition"); - if (result.isSetSuccess()) { - 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; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "exchange_partition failed: unknown result"); - } - - public List exchange_partitions(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException - { - send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); - return recv_exchange_partitions(); - } - - public void send_exchange_partitions(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws org.apache.thrift.TException - { - exchange_partitions_args args = new exchange_partitions_args(); - args.setPartitionSpecs(partitionSpecs); - args.setSource_db(source_db); - args.setSource_table_name(source_table_name); - args.setDest_db(dest_db); - args.setDest_table_name(dest_table_name); - sendBase("exchange_partitions", args); - } - - public List recv_exchange_partitions() throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException - { - exchange_partitions_result result = new exchange_partitions_result(); - receiveBase(result, "exchange_partitions"); - if (result.isSetSuccess()) { - 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; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "exchange_partitions failed: unknown result"); - } - - public Partition get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); - return recv_get_partition_with_auth(); - } - - public void send_get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names) throws org.apache.thrift.TException - { - get_partition_with_auth_args args = new get_partition_with_auth_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setUser_name(user_name); - args.setGroup_names(group_names); - sendBase("get_partition_with_auth", args); - } - - public Partition recv_get_partition_with_auth() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_partition_with_auth_result result = new get_partition_with_auth_result(); - receiveBase(result, "get_partition_with_auth"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_with_auth failed: unknown result"); - } - - public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_partition_by_name(db_name, tbl_name, part_name); - return recv_get_partition_by_name(); - } - - public void send_get_partition_by_name(String db_name, String tbl_name, String part_name) throws org.apache.thrift.TException - { - get_partition_by_name_args args = new get_partition_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - sendBase("get_partition_by_name", args); - } - - public Partition recv_get_partition_by_name() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_partition_by_name_result result = new get_partition_by_name_result(); - receiveBase(result, "get_partition_by_name"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_by_name failed: unknown result"); - } - - public List get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_get_partitions(db_name, tbl_name, max_parts); - return recv_get_partitions(); - } - - public void send_get_partitions(String db_name, String tbl_name, short max_parts) throws org.apache.thrift.TException - { - get_partitions_args args = new get_partitions_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_parts(max_parts); - sendBase("get_partitions", args); - } - - public List recv_get_partitions() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - get_partitions_result result = new get_partitions_result(); - receiveBase(result, "get_partitions"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result"); - } - - public List get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); - return recv_get_partitions_with_auth(); - } - - public void send_get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names) throws org.apache.thrift.TException - { - get_partitions_with_auth_args args = new get_partitions_with_auth_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_parts(max_parts); - args.setUser_name(user_name); - args.setGroup_names(group_names); - sendBase("get_partitions_with_auth", args); - } - - public List recv_get_partitions_with_auth() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - get_partitions_with_auth_result result = new get_partitions_with_auth_result(); - receiveBase(result, "get_partitions_with_auth"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); - } - - public List get_partitions_pspec(String db_name, String tbl_name, int max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_get_partitions_pspec(db_name, tbl_name, max_parts); - return recv_get_partitions_pspec(); - } - - public void send_get_partitions_pspec(String db_name, String tbl_name, int max_parts) throws org.apache.thrift.TException - { - get_partitions_pspec_args args = new get_partitions_pspec_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_parts(max_parts); - sendBase("get_partitions_pspec", args); - } - - public List recv_get_partitions_pspec() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - get_partitions_pspec_result result = new get_partitions_pspec_result(); - receiveBase(result, "get_partitions_pspec"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_pspec failed: unknown result"); - } - - public List get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, org.apache.thrift.TException - { - send_get_partition_names(db_name, tbl_name, max_parts); - return recv_get_partition_names(); - } - - public void send_get_partition_names(String db_name, String tbl_name, short max_parts) throws org.apache.thrift.TException - { - get_partition_names_args args = new get_partition_names_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_parts(max_parts); - sendBase("get_partition_names", args); - } - - public List recv_get_partition_names() throws MetaException, org.apache.thrift.TException - { - get_partition_names_result result = new get_partition_names_result(); - receiveBase(result, "get_partition_names"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_names failed: unknown result"); - } - - public List get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); - return recv_get_partitions_ps(); - } - - public void send_get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws org.apache.thrift.TException - { - get_partitions_ps_args args = new get_partitions_ps_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setMax_parts(max_parts); - sendBase("get_partitions_ps", args); - } - - public List recv_get_partitions_ps() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_partitions_ps_result result = new get_partitions_ps_result(); - receiveBase(result, "get_partitions_ps"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result"); - } - - public List get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); - return recv_get_partitions_ps_with_auth(); - } - - public void send_get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) throws org.apache.thrift.TException - { - get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setMax_parts(max_parts); - args.setUser_name(user_name); - args.setGroup_names(group_names); - sendBase("get_partitions_ps_with_auth", args); - } - - public List recv_get_partitions_ps_with_auth() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); - receiveBase(result, "get_partitions_ps_with_auth"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); - } - - public List get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); - return recv_get_partition_names_ps(); - } - - public void send_get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws org.apache.thrift.TException - { - get_partition_names_ps_args args = new get_partition_names_ps_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setMax_parts(max_parts); - sendBase("get_partition_names_ps", args); - } - - public List recv_get_partition_names_ps() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_partition_names_ps_result result = new get_partition_names_ps_result(); - receiveBase(result, "get_partition_names_ps"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_names_ps failed: unknown result"); - } - - public List get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); - return recv_get_partitions_by_filter(); - } - - public void send_get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws org.apache.thrift.TException - { - get_partitions_by_filter_args args = new get_partitions_by_filter_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setFilter(filter); - args.setMax_parts(max_parts); - sendBase("get_partitions_by_filter", args); - } - - public List recv_get_partitions_by_filter() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_partitions_by_filter_result result = new get_partitions_by_filter_result(); - receiveBase(result, "get_partitions_by_filter"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); - } - - public List get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts); - return recv_get_part_specs_by_filter(); - } - - public void send_get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts) throws org.apache.thrift.TException - { - get_part_specs_by_filter_args args = new get_part_specs_by_filter_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setFilter(filter); - args.setMax_parts(max_parts); - sendBase("get_part_specs_by_filter", args); - } - - public List recv_get_part_specs_by_filter() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_part_specs_by_filter_result result = new get_part_specs_by_filter_result(); - receiveBase(result, "get_part_specs_by_filter"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_part_specs_by_filter failed: unknown result"); - } - - public PartitionsByExprResult get_partitions_by_expr(PartitionsByExprRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_partitions_by_expr(req); - return recv_get_partitions_by_expr(); - } - - public void send_get_partitions_by_expr(PartitionsByExprRequest req) throws org.apache.thrift.TException - { - get_partitions_by_expr_args args = new get_partitions_by_expr_args(); - args.setReq(req); - sendBase("get_partitions_by_expr", args); - } - - public PartitionsByExprResult recv_get_partitions_by_expr() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_partitions_by_expr_result result = new get_partitions_by_expr_result(); - receiveBase(result, "get_partitions_by_expr"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_by_expr failed: unknown result"); - } - - public int get_num_partitions_by_filter(String db_name, String tbl_name, String filter) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_num_partitions_by_filter(db_name, tbl_name, filter); - return recv_get_num_partitions_by_filter(); - } - - public void send_get_num_partitions_by_filter(String db_name, String tbl_name, String filter) throws org.apache.thrift.TException - { - get_num_partitions_by_filter_args args = new get_num_partitions_by_filter_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setFilter(filter); - sendBase("get_num_partitions_by_filter", args); - } - - public int recv_get_num_partitions_by_filter() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_num_partitions_by_filter_result result = new get_num_partitions_by_filter_result(); - receiveBase(result, "get_num_partitions_by_filter"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_num_partitions_by_filter failed: unknown result"); - } - - public List get_partitions_by_names(String db_name, String tbl_name, List names) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_partitions_by_names(db_name, tbl_name, names); - return recv_get_partitions_by_names(); - } - - public void send_get_partitions_by_names(String db_name, String tbl_name, List names) throws org.apache.thrift.TException - { - get_partitions_by_names_args args = new get_partitions_by_names_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setNames(names); - sendBase("get_partitions_by_names", args); - } - - public List recv_get_partitions_by_names() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_partitions_by_names_result result = new get_partitions_by_names_result(); - receiveBase(result, "get_partitions_by_names"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_by_names failed: unknown result"); - } - - public void alter_partition(String db_name, String tbl_name, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - send_alter_partition(db_name, tbl_name, new_part); - recv_alter_partition(); - } - - public void send_alter_partition(String db_name, String tbl_name, Partition new_part) throws org.apache.thrift.TException - { - alter_partition_args args = new alter_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setNew_part(new_part); - sendBase("alter_partition", args); - } - - public void recv_alter_partition() throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - alter_partition_result result = new alter_partition_result(); - receiveBase(result, "alter_partition"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public void alter_partitions(String db_name, String tbl_name, List new_parts) throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - send_alter_partitions(db_name, tbl_name, new_parts); - recv_alter_partitions(); - } - - public void send_alter_partitions(String db_name, String tbl_name, List new_parts) throws org.apache.thrift.TException - { - alter_partitions_args args = new alter_partitions_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setNew_parts(new_parts); - sendBase("alter_partitions", args); - } - - public void recv_alter_partitions() throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - alter_partitions_result result = new alter_partitions_result(); - receiveBase(result, "alter_partitions"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public void alter_partitions_with_environment_context(String db_name, String tbl_name, List new_parts, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context); - recv_alter_partitions_with_environment_context(); - } - - public void send_alter_partitions_with_environment_context(String db_name, String tbl_name, List new_parts, EnvironmentContext environment_context) throws org.apache.thrift.TException - { - alter_partitions_with_environment_context_args args = new alter_partitions_with_environment_context_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setNew_parts(new_parts); - args.setEnvironment_context(environment_context); - sendBase("alter_partitions_with_environment_context", args); - } - - public void recv_alter_partitions_with_environment_context() throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - alter_partitions_with_environment_context_result result = new alter_partitions_with_environment_context_result(); - receiveBase(result, "alter_partitions_with_environment_context"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); - recv_alter_partition_with_environment_context(); - } - - public void send_alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context) throws org.apache.thrift.TException - { - alter_partition_with_environment_context_args args = new alter_partition_with_environment_context_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setNew_part(new_part); - args.setEnvironment_context(environment_context); - sendBase("alter_partition_with_environment_context", args); - } - - public void recv_alter_partition_with_environment_context() throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - alter_partition_with_environment_context_result result = new alter_partition_with_environment_context_result(); - receiveBase(result, "alter_partition_with_environment_context"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public void rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - send_rename_partition(db_name, tbl_name, part_vals, new_part); - recv_rename_partition(); - } - - public void send_rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part) throws org.apache.thrift.TException - { - rename_partition_args args = new rename_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setNew_part(new_part); - sendBase("rename_partition", args); - } - - public void recv_rename_partition() throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - rename_partition_result result = new rename_partition_result(); - receiveBase(result, "rename_partition"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public boolean partition_name_has_valid_characters(List part_vals, boolean throw_exception) throws MetaException, org.apache.thrift.TException - { - send_partition_name_has_valid_characters(part_vals, throw_exception); - return recv_partition_name_has_valid_characters(); - } - - public void send_partition_name_has_valid_characters(List part_vals, boolean throw_exception) throws org.apache.thrift.TException - { - partition_name_has_valid_characters_args args = new partition_name_has_valid_characters_args(); - args.setPart_vals(part_vals); - args.setThrow_exception(throw_exception); - sendBase("partition_name_has_valid_characters", args); - } - - public boolean recv_partition_name_has_valid_characters() throws MetaException, org.apache.thrift.TException - { - partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); - receiveBase(result, "partition_name_has_valid_characters"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partition_name_has_valid_characters failed: unknown result"); - } - - public String get_config_value(String name, String defaultValue) throws ConfigValSecurityException, org.apache.thrift.TException - { - send_get_config_value(name, defaultValue); - return recv_get_config_value(); - } - - public void send_get_config_value(String name, String defaultValue) throws org.apache.thrift.TException - { - get_config_value_args args = new get_config_value_args(); - args.setName(name); - args.setDefaultValue(defaultValue); - sendBase("get_config_value", args); - } - - public String recv_get_config_value() throws ConfigValSecurityException, org.apache.thrift.TException - { - get_config_value_result result = new get_config_value_result(); - receiveBase(result, "get_config_value"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_config_value failed: unknown result"); - } - - public List partition_name_to_vals(String part_name) throws MetaException, org.apache.thrift.TException - { - send_partition_name_to_vals(part_name); - return recv_partition_name_to_vals(); - } - - public void send_partition_name_to_vals(String part_name) throws org.apache.thrift.TException - { - partition_name_to_vals_args args = new partition_name_to_vals_args(); - args.setPart_name(part_name); - sendBase("partition_name_to_vals", args); - } - - public List recv_partition_name_to_vals() throws MetaException, org.apache.thrift.TException - { - partition_name_to_vals_result result = new partition_name_to_vals_result(); - receiveBase(result, "partition_name_to_vals"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partition_name_to_vals failed: unknown result"); - } - - public Map partition_name_to_spec(String part_name) throws MetaException, org.apache.thrift.TException - { - send_partition_name_to_spec(part_name); - return recv_partition_name_to_spec(); - } - - public void send_partition_name_to_spec(String part_name) throws org.apache.thrift.TException - { - partition_name_to_spec_args args = new partition_name_to_spec_args(); - args.setPart_name(part_name); - sendBase("partition_name_to_spec", args); - } - - public Map recv_partition_name_to_spec() throws MetaException, org.apache.thrift.TException - { - partition_name_to_spec_result result = new partition_name_to_spec_result(); - receiveBase(result, "partition_name_to_spec"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partition_name_to_spec failed: unknown result"); - } - - public void markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException - { - send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); - recv_markPartitionForEvent(); - } - - public void send_markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws org.apache.thrift.TException - { - markPartitionForEvent_args args = new markPartitionForEvent_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setEventType(eventType); - sendBase("markPartitionForEvent", args); - } - - public void recv_markPartitionForEvent() throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException - { - markPartitionForEvent_result result = new markPartitionForEvent_result(); - receiveBase(result, "markPartitionForEvent"); - 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 boolean isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException - { - send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); - return recv_isPartitionMarkedForEvent(); - } - - public void send_isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws org.apache.thrift.TException - { - isPartitionMarkedForEvent_args args = new isPartitionMarkedForEvent_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setEventType(eventType); - sendBase("isPartitionMarkedForEvent", args); - } - - public boolean recv_isPartitionMarkedForEvent() throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException - { - isPartitionMarkedForEvent_result result = new isPartitionMarkedForEvent_result(); - receiveBase(result, "isPartitionMarkedForEvent"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result"); - } - - public Index add_index(Index new_index, Table index_table) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - send_add_index(new_index, index_table); - return recv_add_index(); - } - - public void send_add_index(Index new_index, Table index_table) throws org.apache.thrift.TException - { - add_index_args args = new add_index_args(); - args.setNew_index(new_index); - args.setIndex_table(index_table); - sendBase("add_index", args); - } - - public Index recv_add_index() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException - { - add_index_result result = new add_index_result(); - receiveBase(result, "add_index"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_index failed: unknown result"); - } - - public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - send_alter_index(dbname, base_tbl_name, idx_name, new_idx); - recv_alter_index(); - } - - public void send_alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws org.apache.thrift.TException - { - alter_index_args args = new alter_index_args(); - args.setDbname(dbname); - args.setBase_tbl_name(base_tbl_name); - args.setIdx_name(idx_name); - args.setNew_idx(new_idx); - sendBase("alter_index", args); - } - - public void recv_alter_index() throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - alter_index_result result = new alter_index_result(); - receiveBase(result, "alter_index"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public boolean drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); - return recv_drop_index_by_name(); - } - - public void send_drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws org.apache.thrift.TException - { - drop_index_by_name_args args = new drop_index_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setIndex_name(index_name); - args.setDeleteData(deleteData); - sendBase("drop_index_by_name", args); - } - - public boolean recv_drop_index_by_name() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - drop_index_by_name_result result = new drop_index_by_name_result(); - receiveBase(result, "drop_index_by_name"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_index_by_name failed: unknown result"); - } - - public Index get_index_by_name(String db_name, String tbl_name, String index_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_index_by_name(db_name, tbl_name, index_name); - return recv_get_index_by_name(); - } - - public void send_get_index_by_name(String db_name, String tbl_name, String index_name) throws org.apache.thrift.TException - { - get_index_by_name_args args = new get_index_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setIndex_name(index_name); - sendBase("get_index_by_name", args); - } - - public Index recv_get_index_by_name() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_index_by_name_result result = new get_index_by_name_result(); - receiveBase(result, "get_index_by_name"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_index_by_name failed: unknown result"); - } - - public List get_indexes(String db_name, String tbl_name, short max_indexes) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_get_indexes(db_name, tbl_name, max_indexes); - return recv_get_indexes(); - } - - public void send_get_indexes(String db_name, String tbl_name, short max_indexes) throws org.apache.thrift.TException - { - get_indexes_args args = new get_indexes_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_indexes(max_indexes); - sendBase("get_indexes", args); - } - - public List recv_get_indexes() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - get_indexes_result result = new get_indexes_result(); - receiveBase(result, "get_indexes"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_indexes failed: unknown result"); - } - - public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, org.apache.thrift.TException - { - send_get_index_names(db_name, tbl_name, max_indexes); - return recv_get_index_names(); - } - - public void send_get_index_names(String db_name, String tbl_name, short max_indexes) throws org.apache.thrift.TException - { - get_index_names_args args = new get_index_names_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_indexes(max_indexes); - sendBase("get_index_names", args); - } - - public List recv_get_index_names() throws MetaException, org.apache.thrift.TException - { - get_index_names_result result = new get_index_names_result(); - receiveBase(result, "get_index_names"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); - } - - public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_primary_keys(request); - return recv_get_primary_keys(); - } - - public void send_get_primary_keys(PrimaryKeysRequest request) throws org.apache.thrift.TException - { - get_primary_keys_args args = new get_primary_keys_args(); - args.setRequest(request); - sendBase("get_primary_keys", args); - } - - public PrimaryKeysResponse recv_get_primary_keys() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_primary_keys_result result = new get_primary_keys_result(); - receiveBase(result, "get_primary_keys"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_primary_keys failed: unknown result"); - } - - public ForeignKeysResponse get_foreign_keys(ForeignKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_foreign_keys(request); - return recv_get_foreign_keys(); - } - - public void send_get_foreign_keys(ForeignKeysRequest request) throws org.apache.thrift.TException - { - get_foreign_keys_args args = new get_foreign_keys_args(); - args.setRequest(request); - sendBase("get_foreign_keys", args); - } - - public ForeignKeysResponse recv_get_foreign_keys() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_foreign_keys_result result = new get_foreign_keys_result(); - receiveBase(result, "get_foreign_keys"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_foreign_keys failed: unknown result"); - } - - public UniqueConstraintsResponse get_unique_constraints(UniqueConstraintsRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_unique_constraints(request); - return recv_get_unique_constraints(); - } - - public void send_get_unique_constraints(UniqueConstraintsRequest request) throws org.apache.thrift.TException - { - get_unique_constraints_args args = new get_unique_constraints_args(); - args.setRequest(request); - sendBase("get_unique_constraints", args); - } - - public UniqueConstraintsResponse recv_get_unique_constraints() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_unique_constraints_result result = new get_unique_constraints_result(); - receiveBase(result, "get_unique_constraints"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_unique_constraints failed: unknown result"); - } - - public NotNullConstraintsResponse get_not_null_constraints(NotNullConstraintsRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_not_null_constraints(request); - return recv_get_not_null_constraints(); - } - - public void send_get_not_null_constraints(NotNullConstraintsRequest request) throws org.apache.thrift.TException - { - get_not_null_constraints_args args = new get_not_null_constraints_args(); - args.setRequest(request); - sendBase("get_not_null_constraints", args); - } - - public NotNullConstraintsResponse recv_get_not_null_constraints() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_not_null_constraints_result result = new get_not_null_constraints_result(); - receiveBase(result, "get_not_null_constraints"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_not_null_constraints failed: unknown result"); - } - - public boolean update_table_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException - { - send_update_table_column_statistics(stats_obj); - return recv_update_table_column_statistics(); - } - - public void send_update_table_column_statistics(ColumnStatistics stats_obj) throws org.apache.thrift.TException - { - update_table_column_statistics_args args = new update_table_column_statistics_args(); - args.setStats_obj(stats_obj); - sendBase("update_table_column_statistics", args); - } - - public boolean recv_update_table_column_statistics() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException - { - update_table_column_statistics_result result = new update_table_column_statistics_result(); - receiveBase(result, "update_table_column_statistics"); - if (result.isSetSuccess()) { - 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; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "update_table_column_statistics failed: unknown result"); - } - - public boolean update_partition_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException - { - send_update_partition_column_statistics(stats_obj); - return recv_update_partition_column_statistics(); - } - - public void send_update_partition_column_statistics(ColumnStatistics stats_obj) throws org.apache.thrift.TException - { - update_partition_column_statistics_args args = new update_partition_column_statistics_args(); - args.setStats_obj(stats_obj); - sendBase("update_partition_column_statistics", args); - } - - public boolean recv_update_partition_column_statistics() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException - { - update_partition_column_statistics_result result = new update_partition_column_statistics_result(); - receiveBase(result, "update_partition_column_statistics"); - if (result.isSetSuccess()) { - 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; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "update_partition_column_statistics failed: unknown result"); - } - - public ColumnStatistics get_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException - { - send_get_table_column_statistics(db_name, tbl_name, col_name); - return recv_get_table_column_statistics(); - } - - public void send_get_table_column_statistics(String db_name, String tbl_name, String col_name) throws org.apache.thrift.TException - { - get_table_column_statistics_args args = new get_table_column_statistics_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setCol_name(col_name); - sendBase("get_table_column_statistics", args); - } - - public ColumnStatistics recv_get_table_column_statistics() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException - { - get_table_column_statistics_result result = new get_table_column_statistics_result(); - receiveBase(result, "get_table_column_statistics"); - if (result.isSetSuccess()) { - 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; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_column_statistics failed: unknown result"); - } - - public ColumnStatistics get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException - { - send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name); - return recv_get_partition_column_statistics(); - } - - public void send_get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws org.apache.thrift.TException - { - get_partition_column_statistics_args args = new get_partition_column_statistics_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.setCol_name(col_name); - sendBase("get_partition_column_statistics", args); - } - - public ColumnStatistics recv_get_partition_column_statistics() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException - { - get_partition_column_statistics_result result = new get_partition_column_statistics_result(); - receiveBase(result, "get_partition_column_statistics"); - if (result.isSetSuccess()) { - 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; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_column_statistics failed: unknown result"); - } - - public TableStatsResult get_table_statistics_req(TableStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_get_table_statistics_req(request); - return recv_get_table_statistics_req(); - } - - public void send_get_table_statistics_req(TableStatsRequest request) throws org.apache.thrift.TException - { - get_table_statistics_req_args args = new get_table_statistics_req_args(); - args.setRequest(request); - sendBase("get_table_statistics_req", args); - } - - public TableStatsResult recv_get_table_statistics_req() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - get_table_statistics_req_result result = new get_table_statistics_req_result(); - receiveBase(result, "get_table_statistics_req"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_statistics_req failed: unknown result"); - } - - public PartitionsStatsResult get_partitions_statistics_req(PartitionsStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_get_partitions_statistics_req(request); - return recv_get_partitions_statistics_req(); - } - - public void send_get_partitions_statistics_req(PartitionsStatsRequest request) throws org.apache.thrift.TException - { - get_partitions_statistics_req_args args = new get_partitions_statistics_req_args(); - args.setRequest(request); - sendBase("get_partitions_statistics_req", args); - } - - public PartitionsStatsResult recv_get_partitions_statistics_req() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - get_partitions_statistics_req_result result = new get_partitions_statistics_req_result(); - receiveBase(result, "get_partitions_statistics_req"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_statistics_req failed: unknown result"); - } - - public AggrStats get_aggr_stats_for(PartitionsStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_get_aggr_stats_for(request); - return recv_get_aggr_stats_for(); - } - - public void send_get_aggr_stats_for(PartitionsStatsRequest request) throws org.apache.thrift.TException - { - get_aggr_stats_for_args args = new get_aggr_stats_for_args(); - args.setRequest(request); - sendBase("get_aggr_stats_for", args); - } - - public AggrStats recv_get_aggr_stats_for() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - get_aggr_stats_for_result result = new get_aggr_stats_for_result(); - receiveBase(result, "get_aggr_stats_for"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_aggr_stats_for failed: unknown result"); - } - - public boolean set_aggr_stats_for(SetPartitionsStatsRequest request) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException - { - send_set_aggr_stats_for(request); - return recv_set_aggr_stats_for(); - } - - public void send_set_aggr_stats_for(SetPartitionsStatsRequest request) throws org.apache.thrift.TException - { - set_aggr_stats_for_args args = new set_aggr_stats_for_args(); - args.setRequest(request); - sendBase("set_aggr_stats_for", args); - } - - public boolean recv_set_aggr_stats_for() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException - { - set_aggr_stats_for_result result = new set_aggr_stats_for_result(); - receiveBase(result, "set_aggr_stats_for"); - if (result.isSetSuccess()) { - 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; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "set_aggr_stats_for failed: unknown result"); - } - - public boolean delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException - { - send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); - return recv_delete_partition_column_statistics(); - } - - public void send_delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws org.apache.thrift.TException - { - delete_partition_column_statistics_args args = new delete_partition_column_statistics_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.setCol_name(col_name); - sendBase("delete_partition_column_statistics", args); - } - - public boolean recv_delete_partition_column_statistics() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException - { - delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); - receiveBase(result, "delete_partition_column_statistics"); - if (result.isSetSuccess()) { - 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; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delete_partition_column_statistics failed: unknown result"); - } - - public boolean delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException - { - send_delete_table_column_statistics(db_name, tbl_name, col_name); - return recv_delete_table_column_statistics(); - } - - public void send_delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws org.apache.thrift.TException - { - delete_table_column_statistics_args args = new delete_table_column_statistics_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setCol_name(col_name); - sendBase("delete_table_column_statistics", args); - } - - public boolean recv_delete_table_column_statistics() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException - { - delete_table_column_statistics_result result = new delete_table_column_statistics_result(); - receiveBase(result, "delete_table_column_statistics"); - if (result.isSetSuccess()) { - 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; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); - } - - public void create_function(Function func) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_create_function(func); - recv_create_function(); - } - - public void send_create_function(Function func) throws org.apache.thrift.TException - { - create_function_args args = new create_function_args(); - args.setFunc(func); - sendBase("create_function", args); - } - - public void recv_create_function() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException - { - create_function_result result = new create_function_result(); - receiveBase(result, "create_function"); - 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 void drop_function(String dbName, String funcName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_drop_function(dbName, funcName); - recv_drop_function(); - } - - public void send_drop_function(String dbName, String funcName) throws org.apache.thrift.TException - { - drop_function_args args = new drop_function_args(); - args.setDbName(dbName); - args.setFuncName(funcName); - sendBase("drop_function", args); - } - - public void recv_drop_function() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - drop_function_result result = new drop_function_result(); - receiveBase(result, "drop_function"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o3 != null) { - throw result.o3; - } - return; - } - - public void alter_function(String dbName, String funcName, Function newFunc) throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - send_alter_function(dbName, funcName, newFunc); - recv_alter_function(); - } - - public void send_alter_function(String dbName, String funcName, Function newFunc) throws org.apache.thrift.TException - { - alter_function_args args = new alter_function_args(); - args.setDbName(dbName); - args.setFuncName(funcName); - args.setNewFunc(newFunc); - sendBase("alter_function", args); - } - - public void recv_alter_function() throws InvalidOperationException, MetaException, org.apache.thrift.TException - { - alter_function_result result = new alter_function_result(); - receiveBase(result, "alter_function"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public List get_functions(String dbName, String pattern) throws MetaException, org.apache.thrift.TException - { - send_get_functions(dbName, pattern); - return recv_get_functions(); - } - - public void send_get_functions(String dbName, String pattern) throws org.apache.thrift.TException - { - get_functions_args args = new get_functions_args(); - args.setDbName(dbName); - args.setPattern(pattern); - sendBase("get_functions", args); - } - - public List recv_get_functions() throws MetaException, org.apache.thrift.TException - { - get_functions_result result = new get_functions_result(); - receiveBase(result, "get_functions"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_functions failed: unknown result"); - } - - public Function get_function(String dbName, String funcName) throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - send_get_function(dbName, funcName); - return recv_get_function(); - } - - public void send_get_function(String dbName, String funcName) throws org.apache.thrift.TException - { - get_function_args args = new get_function_args(); - args.setDbName(dbName); - args.setFuncName(funcName); - sendBase("get_function", args); - } - - public Function recv_get_function() throws MetaException, NoSuchObjectException, org.apache.thrift.TException - { - get_function_result result = new get_function_result(); - receiveBase(result, "get_function"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_function failed: unknown result"); - } - - public GetAllFunctionsResponse get_all_functions() throws MetaException, org.apache.thrift.TException - { - send_get_all_functions(); - return recv_get_all_functions(); - } - - public void send_get_all_functions() throws org.apache.thrift.TException - { - get_all_functions_args args = new get_all_functions_args(); - sendBase("get_all_functions", args); - } - - public GetAllFunctionsResponse recv_get_all_functions() throws MetaException, org.apache.thrift.TException - { - get_all_functions_result result = new get_all_functions_result(); - receiveBase(result, "get_all_functions"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_functions failed: unknown result"); - } - - public boolean create_role(Role role) throws MetaException, org.apache.thrift.TException - { - send_create_role(role); - return recv_create_role(); - } - - public void send_create_role(Role role) throws org.apache.thrift.TException - { - create_role_args args = new create_role_args(); - args.setRole(role); - sendBase("create_role", args); - } - - public boolean recv_create_role() throws MetaException, org.apache.thrift.TException - { - create_role_result result = new create_role_result(); - receiveBase(result, "create_role"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "create_role failed: unknown result"); - } - - public boolean drop_role(String role_name) throws MetaException, org.apache.thrift.TException - { - send_drop_role(role_name); - return recv_drop_role(); - } - - public void send_drop_role(String role_name) throws org.apache.thrift.TException - { - drop_role_args args = new drop_role_args(); - args.setRole_name(role_name); - sendBase("drop_role", args); - } - - public boolean recv_drop_role() throws MetaException, org.apache.thrift.TException - { - drop_role_result result = new drop_role_result(); - receiveBase(result, "drop_role"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_role failed: unknown result"); - } - - public List get_role_names() throws MetaException, org.apache.thrift.TException - { - send_get_role_names(); - return recv_get_role_names(); - } - - public void send_get_role_names() throws org.apache.thrift.TException - { - get_role_names_args args = new get_role_names_args(); - sendBase("get_role_names", args); - } - - public List recv_get_role_names() throws MetaException, org.apache.thrift.TException - { - get_role_names_result result = new get_role_names_result(); - receiveBase(result, "get_role_names"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_role_names failed: unknown result"); - } - - public boolean grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws MetaException, org.apache.thrift.TException - { - send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); - return recv_grant_role(); - } - - public void send_grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws org.apache.thrift.TException - { - grant_role_args args = new grant_role_args(); - args.setRole_name(role_name); - args.setPrincipal_name(principal_name); - args.setPrincipal_type(principal_type); - args.setGrantor(grantor); - args.setGrantorType(grantorType); - args.setGrant_option(grant_option); - sendBase("grant_role", args); - } - - public boolean recv_grant_role() throws MetaException, org.apache.thrift.TException - { - grant_role_result result = new grant_role_result(); - receiveBase(result, "grant_role"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_role failed: unknown result"); - } - - public boolean revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws MetaException, org.apache.thrift.TException - { - send_revoke_role(role_name, principal_name, principal_type); - return recv_revoke_role(); - } - - public void send_revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws org.apache.thrift.TException - { - revoke_role_args args = new revoke_role_args(); - args.setRole_name(role_name); - args.setPrincipal_name(principal_name); - args.setPrincipal_type(principal_type); - sendBase("revoke_role", args); - } - - public boolean recv_revoke_role() throws MetaException, org.apache.thrift.TException - { - revoke_role_result result = new revoke_role_result(); - receiveBase(result, "revoke_role"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revoke_role failed: unknown result"); - } - - public List list_roles(String principal_name, PrincipalType principal_type) throws MetaException, org.apache.thrift.TException - { - send_list_roles(principal_name, principal_type); - return recv_list_roles(); - } - - public void send_list_roles(String principal_name, PrincipalType principal_type) throws org.apache.thrift.TException - { - list_roles_args args = new list_roles_args(); - args.setPrincipal_name(principal_name); - args.setPrincipal_type(principal_type); - sendBase("list_roles", args); - } - - public List recv_list_roles() throws MetaException, org.apache.thrift.TException - { - list_roles_result result = new list_roles_result(); - receiveBase(result, "list_roles"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_roles failed: unknown result"); - } - - public GrantRevokeRoleResponse grant_revoke_role(GrantRevokeRoleRequest request) throws MetaException, org.apache.thrift.TException - { - send_grant_revoke_role(request); - return recv_grant_revoke_role(); - } - - public void send_grant_revoke_role(GrantRevokeRoleRequest request) throws org.apache.thrift.TException - { - grant_revoke_role_args args = new grant_revoke_role_args(); - args.setRequest(request); - sendBase("grant_revoke_role", args); - } - - public GrantRevokeRoleResponse recv_grant_revoke_role() throws MetaException, org.apache.thrift.TException - { - grant_revoke_role_result result = new grant_revoke_role_result(); - receiveBase(result, "grant_revoke_role"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_revoke_role failed: unknown result"); - } - - public GetPrincipalsInRoleResponse get_principals_in_role(GetPrincipalsInRoleRequest request) throws MetaException, org.apache.thrift.TException - { - send_get_principals_in_role(request); - return recv_get_principals_in_role(); - } - - public void send_get_principals_in_role(GetPrincipalsInRoleRequest request) throws org.apache.thrift.TException - { - get_principals_in_role_args args = new get_principals_in_role_args(); - args.setRequest(request); - sendBase("get_principals_in_role", args); - } - - public GetPrincipalsInRoleResponse recv_get_principals_in_role() throws MetaException, org.apache.thrift.TException - { - get_principals_in_role_result result = new get_principals_in_role_result(); - receiveBase(result, "get_principals_in_role"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_principals_in_role failed: unknown result"); - } - - public GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request) throws MetaException, org.apache.thrift.TException - { - send_get_role_grants_for_principal(request); - return recv_get_role_grants_for_principal(); - } - - public void send_get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request) throws org.apache.thrift.TException - { - get_role_grants_for_principal_args args = new get_role_grants_for_principal_args(); - args.setRequest(request); - sendBase("get_role_grants_for_principal", args); - } - - public GetRoleGrantsForPrincipalResponse recv_get_role_grants_for_principal() throws MetaException, org.apache.thrift.TException - { - get_role_grants_for_principal_result result = new get_role_grants_for_principal_result(); - receiveBase(result, "get_role_grants_for_principal"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_role_grants_for_principal failed: unknown result"); - } - - public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names) throws MetaException, org.apache.thrift.TException - { - send_get_privilege_set(hiveObject, user_name, group_names); - return recv_get_privilege_set(); - } - - public void send_get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names) throws org.apache.thrift.TException - { - get_privilege_set_args args = new get_privilege_set_args(); - args.setHiveObject(hiveObject); - args.setUser_name(user_name); - args.setGroup_names(group_names); - sendBase("get_privilege_set", args); - } - - public PrincipalPrivilegeSet recv_get_privilege_set() throws MetaException, org.apache.thrift.TException - { - get_privilege_set_result result = new get_privilege_set_result(); - receiveBase(result, "get_privilege_set"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_privilege_set failed: unknown result"); - } - - public List list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws MetaException, org.apache.thrift.TException - { - send_list_privileges(principal_name, principal_type, hiveObject); - return recv_list_privileges(); - } - - public void send_list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws org.apache.thrift.TException - { - list_privileges_args args = new list_privileges_args(); - args.setPrincipal_name(principal_name); - args.setPrincipal_type(principal_type); - args.setHiveObject(hiveObject); - sendBase("list_privileges", args); - } - - public List recv_list_privileges() throws MetaException, org.apache.thrift.TException - { - list_privileges_result result = new list_privileges_result(); - receiveBase(result, "list_privileges"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_privileges failed: unknown result"); - } - - public boolean grant_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException - { - send_grant_privileges(privileges); - return recv_grant_privileges(); - } - - public void send_grant_privileges(PrivilegeBag privileges) throws org.apache.thrift.TException - { - grant_privileges_args args = new grant_privileges_args(); - args.setPrivileges(privileges); - sendBase("grant_privileges", args); - } - - public boolean recv_grant_privileges() throws MetaException, org.apache.thrift.TException - { - grant_privileges_result result = new grant_privileges_result(); - receiveBase(result, "grant_privileges"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_privileges failed: unknown result"); - } - - public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException - { - send_revoke_privileges(privileges); - return recv_revoke_privileges(); - } - - public void send_revoke_privileges(PrivilegeBag privileges) throws org.apache.thrift.TException - { - revoke_privileges_args args = new revoke_privileges_args(); - args.setPrivileges(privileges); - sendBase("revoke_privileges", args); - } - - public boolean recv_revoke_privileges() throws MetaException, org.apache.thrift.TException - { - revoke_privileges_result result = new revoke_privileges_result(); - receiveBase(result, "revoke_privileges"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result"); - } - - public GrantRevokePrivilegeResponse grant_revoke_privileges(GrantRevokePrivilegeRequest request) throws MetaException, org.apache.thrift.TException - { - send_grant_revoke_privileges(request); - return recv_grant_revoke_privileges(); - } - - public void send_grant_revoke_privileges(GrantRevokePrivilegeRequest request) throws org.apache.thrift.TException - { - grant_revoke_privileges_args args = new grant_revoke_privileges_args(); - args.setRequest(request); - sendBase("grant_revoke_privileges", args); - } - - public GrantRevokePrivilegeResponse recv_grant_revoke_privileges() throws MetaException, org.apache.thrift.TException - { - grant_revoke_privileges_result result = new grant_revoke_privileges_result(); - receiveBase(result, "grant_revoke_privileges"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_revoke_privileges failed: unknown result"); - } - - public List set_ugi(String user_name, List group_names) throws MetaException, org.apache.thrift.TException - { - send_set_ugi(user_name, group_names); - return recv_set_ugi(); - } - - public void send_set_ugi(String user_name, List group_names) throws org.apache.thrift.TException - { - set_ugi_args args = new set_ugi_args(); - args.setUser_name(user_name); - args.setGroup_names(group_names); - sendBase("set_ugi", args); - } - - public List recv_set_ugi() throws MetaException, org.apache.thrift.TException - { - set_ugi_result result = new set_ugi_result(); - receiveBase(result, "set_ugi"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "set_ugi failed: unknown result"); - } - - public String get_delegation_token(String token_owner, String renewer_kerberos_principal_name) throws MetaException, org.apache.thrift.TException - { - send_get_delegation_token(token_owner, renewer_kerberos_principal_name); - return recv_get_delegation_token(); - } - - public void send_get_delegation_token(String token_owner, String renewer_kerberos_principal_name) throws org.apache.thrift.TException - { - get_delegation_token_args args = new get_delegation_token_args(); - args.setToken_owner(token_owner); - args.setRenewer_kerberos_principal_name(renewer_kerberos_principal_name); - sendBase("get_delegation_token", args); - } - - public String recv_get_delegation_token() throws MetaException, org.apache.thrift.TException - { - get_delegation_token_result result = new get_delegation_token_result(); - receiveBase(result, "get_delegation_token"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_delegation_token failed: unknown result"); - } - - public long renew_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException - { - send_renew_delegation_token(token_str_form); - return recv_renew_delegation_token(); - } - - public void send_renew_delegation_token(String token_str_form) throws org.apache.thrift.TException - { - renew_delegation_token_args args = new renew_delegation_token_args(); - args.setToken_str_form(token_str_form); - sendBase("renew_delegation_token", args); - } - - public long recv_renew_delegation_token() throws MetaException, org.apache.thrift.TException - { - renew_delegation_token_result result = new renew_delegation_token_result(); - receiveBase(result, "renew_delegation_token"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "renew_delegation_token failed: unknown result"); - } - - public void cancel_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException - { - send_cancel_delegation_token(token_str_form); - recv_cancel_delegation_token(); - } - - public void send_cancel_delegation_token(String token_str_form) throws org.apache.thrift.TException - { - cancel_delegation_token_args args = new cancel_delegation_token_args(); - args.setToken_str_form(token_str_form); - sendBase("cancel_delegation_token", args); - } - - public void recv_cancel_delegation_token() throws MetaException, org.apache.thrift.TException - { - cancel_delegation_token_result result = new cancel_delegation_token_result(); - receiveBase(result, "cancel_delegation_token"); - if (result.o1 != null) { - throw result.o1; - } - return; - } - - public boolean add_token(String token_identifier, String delegation_token) throws org.apache.thrift.TException - { - send_add_token(token_identifier, delegation_token); - return recv_add_token(); - } - - public void send_add_token(String token_identifier, String delegation_token) throws org.apache.thrift.TException - { - add_token_args args = new add_token_args(); - args.setToken_identifier(token_identifier); - args.setDelegation_token(delegation_token); - sendBase("add_token", args); - } - - public boolean recv_add_token() throws org.apache.thrift.TException - { - add_token_result result = new add_token_result(); - receiveBase(result, "add_token"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_token failed: unknown result"); - } - - public boolean remove_token(String token_identifier) throws org.apache.thrift.TException - { - send_remove_token(token_identifier); - return recv_remove_token(); - } - - public void send_remove_token(String token_identifier) throws org.apache.thrift.TException - { - remove_token_args args = new remove_token_args(); - args.setToken_identifier(token_identifier); - sendBase("remove_token", args); - } - - public boolean recv_remove_token() throws org.apache.thrift.TException - { - remove_token_result result = new remove_token_result(); - receiveBase(result, "remove_token"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "remove_token failed: unknown result"); - } - - public String get_token(String token_identifier) throws org.apache.thrift.TException - { - send_get_token(token_identifier); - return recv_get_token(); - } - - public void send_get_token(String token_identifier) throws org.apache.thrift.TException - { - get_token_args args = new get_token_args(); - args.setToken_identifier(token_identifier); - sendBase("get_token", args); - } - - public String recv_get_token() throws org.apache.thrift.TException - { - get_token_result result = new get_token_result(); - receiveBase(result, "get_token"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_token failed: unknown result"); - } - - public List get_all_token_identifiers() throws org.apache.thrift.TException - { - send_get_all_token_identifiers(); - return recv_get_all_token_identifiers(); - } - - public void send_get_all_token_identifiers() throws org.apache.thrift.TException - { - get_all_token_identifiers_args args = new get_all_token_identifiers_args(); - sendBase("get_all_token_identifiers", args); - } - - public List recv_get_all_token_identifiers() throws org.apache.thrift.TException - { - get_all_token_identifiers_result result = new get_all_token_identifiers_result(); - receiveBase(result, "get_all_token_identifiers"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_token_identifiers failed: unknown result"); - } - - public int add_master_key(String key) throws MetaException, org.apache.thrift.TException - { - send_add_master_key(key); - return recv_add_master_key(); - } - - public void send_add_master_key(String key) throws org.apache.thrift.TException - { - add_master_key_args args = new add_master_key_args(); - args.setKey(key); - sendBase("add_master_key", args); - } - - public int recv_add_master_key() throws MetaException, org.apache.thrift.TException - { - add_master_key_result result = new add_master_key_result(); - receiveBase(result, "add_master_key"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_master_key failed: unknown result"); - } - - public void update_master_key(int seq_number, String key) throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - send_update_master_key(seq_number, key); - recv_update_master_key(); - } - - public void send_update_master_key(int seq_number, String key) throws org.apache.thrift.TException - { - update_master_key_args args = new update_master_key_args(); - args.setSeq_number(seq_number); - args.setKey(key); - sendBase("update_master_key", args); - } - - public void recv_update_master_key() throws NoSuchObjectException, MetaException, org.apache.thrift.TException - { - update_master_key_result result = new update_master_key_result(); - receiveBase(result, "update_master_key"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public boolean remove_master_key(int key_seq) throws org.apache.thrift.TException - { - send_remove_master_key(key_seq); - return recv_remove_master_key(); - } - - public void send_remove_master_key(int key_seq) throws org.apache.thrift.TException - { - remove_master_key_args args = new remove_master_key_args(); - args.setKey_seq(key_seq); - sendBase("remove_master_key", args); - } - - public boolean recv_remove_master_key() throws org.apache.thrift.TException - { - remove_master_key_result result = new remove_master_key_result(); - receiveBase(result, "remove_master_key"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "remove_master_key failed: unknown result"); - } - - public List get_master_keys() throws org.apache.thrift.TException - { - send_get_master_keys(); - return recv_get_master_keys(); - } - - public void send_get_master_keys() throws org.apache.thrift.TException - { - get_master_keys_args args = new get_master_keys_args(); - sendBase("get_master_keys", args); - } - - public List recv_get_master_keys() throws org.apache.thrift.TException - { - get_master_keys_result result = new get_master_keys_result(); - receiveBase(result, "get_master_keys"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_master_keys failed: unknown result"); - } - - public GetOpenTxnsResponse get_open_txns() throws org.apache.thrift.TException - { - send_get_open_txns(); - return recv_get_open_txns(); - } - - public void send_get_open_txns() throws org.apache.thrift.TException - { - get_open_txns_args args = new get_open_txns_args(); - sendBase("get_open_txns", args); - } - - public GetOpenTxnsResponse recv_get_open_txns() throws org.apache.thrift.TException - { - get_open_txns_result result = new get_open_txns_result(); - receiveBase(result, "get_open_txns"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_open_txns failed: unknown result"); - } - - public GetOpenTxnsInfoResponse get_open_txns_info() throws org.apache.thrift.TException - { - send_get_open_txns_info(); - return recv_get_open_txns_info(); - } - - public void send_get_open_txns_info() throws org.apache.thrift.TException - { - get_open_txns_info_args args = new get_open_txns_info_args(); - sendBase("get_open_txns_info", args); - } - - public GetOpenTxnsInfoResponse recv_get_open_txns_info() throws org.apache.thrift.TException - { - get_open_txns_info_result result = new get_open_txns_info_result(); - receiveBase(result, "get_open_txns_info"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_open_txns_info failed: unknown result"); - } - - public OpenTxnsResponse open_txns(OpenTxnRequest rqst) throws org.apache.thrift.TException - { - send_open_txns(rqst); - return recv_open_txns(); - } - - public void send_open_txns(OpenTxnRequest rqst) throws org.apache.thrift.TException - { - open_txns_args args = new open_txns_args(); - args.setRqst(rqst); - sendBase("open_txns", args); - } - - public OpenTxnsResponse recv_open_txns() throws org.apache.thrift.TException - { - open_txns_result result = new open_txns_result(); - receiveBase(result, "open_txns"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "open_txns failed: unknown result"); - } - - public void abort_txn(AbortTxnRequest rqst) throws NoSuchTxnException, org.apache.thrift.TException - { - send_abort_txn(rqst); - recv_abort_txn(); - } - - public void send_abort_txn(AbortTxnRequest rqst) throws org.apache.thrift.TException - { - abort_txn_args args = new abort_txn_args(); - args.setRqst(rqst); - sendBase("abort_txn", args); - } - - public void recv_abort_txn() throws NoSuchTxnException, org.apache.thrift.TException - { - abort_txn_result result = new abort_txn_result(); - receiveBase(result, "abort_txn"); - if (result.o1 != null) { - throw result.o1; - } - return; - } - - public void abort_txns(AbortTxnsRequest rqst) throws NoSuchTxnException, org.apache.thrift.TException - { - send_abort_txns(rqst); - recv_abort_txns(); - } - - public void send_abort_txns(AbortTxnsRequest rqst) throws org.apache.thrift.TException - { - abort_txns_args args = new abort_txns_args(); - args.setRqst(rqst); - sendBase("abort_txns", args); - } - - public void recv_abort_txns() throws NoSuchTxnException, org.apache.thrift.TException - { - abort_txns_result result = new abort_txns_result(); - receiveBase(result, "abort_txns"); - if (result.o1 != null) { - throw result.o1; - } - return; - } - - public void commit_txn(CommitTxnRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException - { - send_commit_txn(rqst); - recv_commit_txn(); - } - - public void send_commit_txn(CommitTxnRequest rqst) throws org.apache.thrift.TException - { - commit_txn_args args = new commit_txn_args(); - args.setRqst(rqst); - sendBase("commit_txn", args); - } - - public void recv_commit_txn() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException - { - commit_txn_result result = new commit_txn_result(); - receiveBase(result, "commit_txn"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public LockResponse lock(LockRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException - { - send_lock(rqst); - return recv_lock(); - } - - public void send_lock(LockRequest rqst) throws org.apache.thrift.TException - { - lock_args args = new lock_args(); - args.setRqst(rqst); - sendBase("lock", args); - } - - public LockResponse recv_lock() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException - { - lock_result result = new lock_result(); - receiveBase(result, "lock"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "lock failed: unknown result"); - } - - public LockResponse check_lock(CheckLockRequest rqst) throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException - { - send_check_lock(rqst); - return recv_check_lock(); - } - - public void send_check_lock(CheckLockRequest rqst) throws org.apache.thrift.TException - { - check_lock_args args = new check_lock_args(); - args.setRqst(rqst); - sendBase("check_lock", args); - } - - public LockResponse recv_check_lock() throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException - { - check_lock_result result = new check_lock_result(); - receiveBase(result, "check_lock"); - if (result.isSetSuccess()) { - 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "check_lock failed: unknown result"); - } - - public void unlock(UnlockRequest rqst) throws NoSuchLockException, TxnOpenException, org.apache.thrift.TException - { - send_unlock(rqst); - recv_unlock(); - } - - public void send_unlock(UnlockRequest rqst) throws org.apache.thrift.TException - { - unlock_args args = new unlock_args(); - args.setRqst(rqst); - sendBase("unlock", args); - } - - public void recv_unlock() throws NoSuchLockException, TxnOpenException, org.apache.thrift.TException - { - unlock_result result = new unlock_result(); - receiveBase(result, "unlock"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public ShowLocksResponse show_locks(ShowLocksRequest rqst) throws org.apache.thrift.TException - { - send_show_locks(rqst); - return recv_show_locks(); - } - - public void send_show_locks(ShowLocksRequest rqst) throws org.apache.thrift.TException - { - show_locks_args args = new show_locks_args(); - args.setRqst(rqst); - sendBase("show_locks", args); - } - - public ShowLocksResponse recv_show_locks() throws org.apache.thrift.TException - { - show_locks_result result = new show_locks_result(); - receiveBase(result, "show_locks"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "show_locks failed: unknown result"); - } - - public void heartbeat(HeartbeatRequest ids) throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException - { - send_heartbeat(ids); - recv_heartbeat(); - } - - public void send_heartbeat(HeartbeatRequest ids) throws org.apache.thrift.TException - { - heartbeat_args args = new heartbeat_args(); - args.setIds(ids); - sendBase("heartbeat", args); - } - - public void recv_heartbeat() throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException - { - heartbeat_result result = new heartbeat_result(); - receiveBase(result, "heartbeat"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - if (result.o3 != null) { - throw result.o3; - } - return; - } - - public HeartbeatTxnRangeResponse heartbeat_txn_range(HeartbeatTxnRangeRequest txns) throws org.apache.thrift.TException - { - send_heartbeat_txn_range(txns); - return recv_heartbeat_txn_range(); - } - - public void send_heartbeat_txn_range(HeartbeatTxnRangeRequest txns) throws org.apache.thrift.TException - { - heartbeat_txn_range_args args = new heartbeat_txn_range_args(); - args.setTxns(txns); - sendBase("heartbeat_txn_range", args); - } - - public HeartbeatTxnRangeResponse recv_heartbeat_txn_range() throws org.apache.thrift.TException - { - heartbeat_txn_range_result result = new heartbeat_txn_range_result(); - receiveBase(result, "heartbeat_txn_range"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "heartbeat_txn_range failed: unknown result"); - } - - public void compact(CompactionRequest rqst) throws org.apache.thrift.TException - { - send_compact(rqst); - recv_compact(); - } - - public void send_compact(CompactionRequest rqst) throws org.apache.thrift.TException - { - compact_args args = new compact_args(); - args.setRqst(rqst); - sendBase("compact", args); - } - - public void recv_compact() throws org.apache.thrift.TException - { - compact_result result = new compact_result(); - receiveBase(result, "compact"); - return; - } - - public CompactionResponse compact2(CompactionRequest rqst) throws org.apache.thrift.TException - { - send_compact2(rqst); - return recv_compact2(); - } - - public void send_compact2(CompactionRequest rqst) throws org.apache.thrift.TException - { - compact2_args args = new compact2_args(); - args.setRqst(rqst); - sendBase("compact2", args); - } - - public CompactionResponse recv_compact2() throws org.apache.thrift.TException - { - compact2_result result = new compact2_result(); - receiveBase(result, "compact2"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "compact2 failed: unknown result"); - } - - public ShowCompactResponse show_compact(ShowCompactRequest rqst) throws org.apache.thrift.TException - { - send_show_compact(rqst); - return recv_show_compact(); - } - - public void send_show_compact(ShowCompactRequest rqst) throws org.apache.thrift.TException - { - show_compact_args args = new show_compact_args(); - args.setRqst(rqst); - sendBase("show_compact", args); - } - - public ShowCompactResponse recv_show_compact() throws org.apache.thrift.TException - { - show_compact_result result = new show_compact_result(); - receiveBase(result, "show_compact"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "show_compact failed: unknown result"); - } - - public void add_dynamic_partitions(AddDynamicPartitions rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException - { - send_add_dynamic_partitions(rqst); - recv_add_dynamic_partitions(); - } - - public void send_add_dynamic_partitions(AddDynamicPartitions rqst) throws org.apache.thrift.TException - { - add_dynamic_partitions_args args = new add_dynamic_partitions_args(); - args.setRqst(rqst); - sendBase("add_dynamic_partitions", args); - } - - public void recv_add_dynamic_partitions() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException - { - add_dynamic_partitions_result result = new add_dynamic_partitions_result(); - receiveBase(result, "add_dynamic_partitions"); - if (result.o1 != null) { - throw result.o1; - } - if (result.o2 != null) { - throw result.o2; - } - return; - } - - public NotificationEventResponse get_next_notification(NotificationEventRequest rqst) throws org.apache.thrift.TException - { - send_get_next_notification(rqst); - return recv_get_next_notification(); - } - - public void send_get_next_notification(NotificationEventRequest rqst) throws org.apache.thrift.TException - { - get_next_notification_args args = new get_next_notification_args(); - args.setRqst(rqst); - sendBase("get_next_notification", args); - } - - public NotificationEventResponse recv_get_next_notification() throws org.apache.thrift.TException - { - get_next_notification_result result = new get_next_notification_result(); - receiveBase(result, "get_next_notification"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_next_notification failed: unknown result"); - } - - public CurrentNotificationEventId get_current_notificationEventId() throws org.apache.thrift.TException - { - send_get_current_notificationEventId(); - return recv_get_current_notificationEventId(); - } - - public void send_get_current_notificationEventId() throws org.apache.thrift.TException - { - get_current_notificationEventId_args args = new get_current_notificationEventId_args(); - sendBase("get_current_notificationEventId", args); - } - - public CurrentNotificationEventId recv_get_current_notificationEventId() throws org.apache.thrift.TException - { - get_current_notificationEventId_result result = new get_current_notificationEventId_result(); - receiveBase(result, "get_current_notificationEventId"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_current_notificationEventId failed: unknown result"); - } - - public FireEventResponse fire_listener_event(FireEventRequest rqst) throws org.apache.thrift.TException - { - send_fire_listener_event(rqst); - return recv_fire_listener_event(); - } - - public void send_fire_listener_event(FireEventRequest rqst) throws org.apache.thrift.TException - { - fire_listener_event_args args = new fire_listener_event_args(); - args.setRqst(rqst); - sendBase("fire_listener_event", args); - } - - public FireEventResponse recv_fire_listener_event() throws org.apache.thrift.TException - { - fire_listener_event_result result = new fire_listener_event_result(); - receiveBase(result, "fire_listener_event"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fire_listener_event failed: unknown result"); - } - - public void flushCache() throws org.apache.thrift.TException - { - send_flushCache(); - recv_flushCache(); - } - - public void send_flushCache() throws org.apache.thrift.TException - { - flushCache_args args = new flushCache_args(); - sendBase("flushCache", args); - } - - public void recv_flushCache() throws org.apache.thrift.TException - { - flushCache_result result = new flushCache_result(); - receiveBase(result, "flushCache"); - return; - } - - public CmRecycleResponse cm_recycle(CmRecycleRequest request) throws MetaException, org.apache.thrift.TException - { - send_cm_recycle(request); - return recv_cm_recycle(); - } - - public void send_cm_recycle(CmRecycleRequest request) throws org.apache.thrift.TException - { - cm_recycle_args args = new cm_recycle_args(); - args.setRequest(request); - sendBase("cm_recycle", args); - } - - public CmRecycleResponse recv_cm_recycle() throws MetaException, org.apache.thrift.TException - { - cm_recycle_result result = new cm_recycle_result(); - receiveBase(result, "cm_recycle"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cm_recycle failed: unknown result"); - } - - public GetFileMetadataByExprResult get_file_metadata_by_expr(GetFileMetadataByExprRequest req) throws org.apache.thrift.TException - { - send_get_file_metadata_by_expr(req); - return recv_get_file_metadata_by_expr(); - } - - public void send_get_file_metadata_by_expr(GetFileMetadataByExprRequest req) throws org.apache.thrift.TException - { - get_file_metadata_by_expr_args args = new get_file_metadata_by_expr_args(); - args.setReq(req); - sendBase("get_file_metadata_by_expr", args); - } - - public GetFileMetadataByExprResult recv_get_file_metadata_by_expr() throws org.apache.thrift.TException - { - get_file_metadata_by_expr_result result = new get_file_metadata_by_expr_result(); - receiveBase(result, "get_file_metadata_by_expr"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_file_metadata_by_expr failed: unknown result"); - } - - public GetFileMetadataResult get_file_metadata(GetFileMetadataRequest req) throws org.apache.thrift.TException - { - send_get_file_metadata(req); - return recv_get_file_metadata(); - } - - public void send_get_file_metadata(GetFileMetadataRequest req) throws org.apache.thrift.TException - { - get_file_metadata_args args = new get_file_metadata_args(); - args.setReq(req); - sendBase("get_file_metadata", args); - } - - public GetFileMetadataResult recv_get_file_metadata() throws org.apache.thrift.TException - { - get_file_metadata_result result = new get_file_metadata_result(); - receiveBase(result, "get_file_metadata"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_file_metadata failed: unknown result"); - } - - public PutFileMetadataResult put_file_metadata(PutFileMetadataRequest req) throws org.apache.thrift.TException - { - send_put_file_metadata(req); - return recv_put_file_metadata(); - } - - public void send_put_file_metadata(PutFileMetadataRequest req) throws org.apache.thrift.TException - { - put_file_metadata_args args = new put_file_metadata_args(); - args.setReq(req); - sendBase("put_file_metadata", args); - } - - public PutFileMetadataResult recv_put_file_metadata() throws org.apache.thrift.TException - { - put_file_metadata_result result = new put_file_metadata_result(); - receiveBase(result, "put_file_metadata"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "put_file_metadata failed: unknown result"); - } - - public ClearFileMetadataResult clear_file_metadata(ClearFileMetadataRequest req) throws org.apache.thrift.TException - { - send_clear_file_metadata(req); - return recv_clear_file_metadata(); - } - - public void send_clear_file_metadata(ClearFileMetadataRequest req) throws org.apache.thrift.TException - { - clear_file_metadata_args args = new clear_file_metadata_args(); - args.setReq(req); - sendBase("clear_file_metadata", args); - } - - public ClearFileMetadataResult recv_clear_file_metadata() throws org.apache.thrift.TException - { - clear_file_metadata_result result = new clear_file_metadata_result(); - receiveBase(result, "clear_file_metadata"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "clear_file_metadata failed: unknown result"); - } - - public CacheFileMetadataResult cache_file_metadata(CacheFileMetadataRequest req) throws org.apache.thrift.TException - { - send_cache_file_metadata(req); - return recv_cache_file_metadata(); - } - - public void send_cache_file_metadata(CacheFileMetadataRequest req) throws org.apache.thrift.TException - { - cache_file_metadata_args args = new cache_file_metadata_args(); - args.setReq(req); - sendBase("cache_file_metadata", args); - } - - public CacheFileMetadataResult recv_cache_file_metadata() throws org.apache.thrift.TException - { - cache_file_metadata_result result = new cache_file_metadata_result(); - receiveBase(result, "cache_file_metadata"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cache_file_metadata failed: unknown result"); - } - - public String get_metastore_db_uuid() throws MetaException, org.apache.thrift.TException - { - send_get_metastore_db_uuid(); - return recv_get_metastore_db_uuid(); - } - - public void send_get_metastore_db_uuid() throws org.apache.thrift.TException - { - get_metastore_db_uuid_args args = new get_metastore_db_uuid_args(); - sendBase("get_metastore_db_uuid", args); - } - - public String recv_get_metastore_db_uuid() throws MetaException, org.apache.thrift.TException - { - get_metastore_db_uuid_result result = new get_metastore_db_uuid_result(); - receiveBase(result, "get_metastore_db_uuid"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.o1 != null) { - throw result.o1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_metastore_db_uuid failed: unknown result"); - } - - } - public static class AsyncClient extends com.facebook.fb303.FacebookService.AsyncClient implements AsyncIface { - public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { - private org.apache.thrift.async.TAsyncClientManager clientManager; - private org.apache.thrift.protocol.TProtocolFactory protocolFactory; - public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { - this.clientManager = clientManager; - this.protocolFactory = protocolFactory; - } - public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { - return new AsyncClient(protocolFactory, clientManager, transport); - } - } - - public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { - super(protocolFactory, clientManager, transport); - } - - public void getMetaConf(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getMetaConf_call method_call = new getMetaConf_call(key, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getMetaConf_call extends org.apache.thrift.async.TAsyncMethodCall { - private String key; - public getMetaConf_call(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.key = key; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMetaConf", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getMetaConf_args args = new getMetaConf_args(); - args.setKey(key); - args.write(prot); - prot.writeMessageEnd(); - } - - public String getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getMetaConf(); - } - } - - public void setMetaConf(String key, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - setMetaConf_call method_call = new setMetaConf_call(key, value, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class setMetaConf_call extends org.apache.thrift.async.TAsyncMethodCall { - private String key; - private String value; - public setMetaConf_call(String key, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.key = key; - this.value = value; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setMetaConf", org.apache.thrift.protocol.TMessageType.CALL, 0)); - setMetaConf_args args = new setMetaConf_args(); - args.setKey(key); - args.setValue(value); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_setMetaConf(); - } - } - - public void create_database(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - create_database_call method_call = new create_database_call(database, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class create_database_call extends org.apache.thrift.async.TAsyncMethodCall { - private Database database; - public create_database_call(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.database = database; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); - create_database_args args = new create_database_args(); - args.setDatabase(database); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_create_database(); - } - } - - public void get_database(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_database_call method_call = new get_database_call(name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_database_call extends org.apache.thrift.async.TAsyncMethodCall { - private String name; - public get_database_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.name = name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_database_args args = new get_database_args(); - args.setName(name); - args.write(prot); - prot.writeMessageEnd(); - } - - public Database getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_database(); - } - } - - public void drop_database(String name, boolean deleteData, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_database_call method_call = new drop_database_call(name, deleteData, cascade, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_database_call extends org.apache.thrift.async.TAsyncMethodCall { - private String name; - private boolean deleteData; - private boolean cascade; - public drop_database_call(String name, boolean deleteData, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.name = name; - this.deleteData = deleteData; - this.cascade = cascade; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_database_args args = new drop_database_args(); - args.setName(name); - args.setDeleteData(deleteData); - args.setCascade(cascade); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_drop_database(); - } - } - - public void get_databases(String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_databases_call method_call = new get_databases_call(pattern, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_databases_call extends org.apache.thrift.async.TAsyncMethodCall { - private String pattern; - public get_databases_call(String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.pattern = pattern; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_databases", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_databases_args args = new get_databases_args(); - args.setPattern(pattern); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_databases(); - } - } - - public void get_all_databases(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_all_databases_call method_call = new get_all_databases_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_all_databases_call extends org.apache.thrift.async.TAsyncMethodCall { - public get_all_databases_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_databases", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_all_databases_args args = new get_all_databases_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_all_databases(); - } - } - - public void alter_database(String dbname, Database db, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - alter_database_call method_call = new alter_database_call(dbname, db, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class alter_database_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbname; - private Database db; - public alter_database_call(String dbname, Database db, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.db = db; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); - alter_database_args args = new alter_database_args(); - args.setDbname(dbname); - args.setDb(db); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_database(); - } - } - - public void get_type(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_type_call method_call = new get_type_call(name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_type_call extends org.apache.thrift.async.TAsyncMethodCall { - private String name; - public get_type_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.name = name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_type", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_type_args args = new get_type_args(); - args.setName(name); - args.write(prot); - prot.writeMessageEnd(); - } - - public Type getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_type(); - } - } - - public void create_type(Type type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - create_type_call method_call = new create_type_call(type, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class create_type_call extends org.apache.thrift.async.TAsyncMethodCall { - private Type type; - public create_type_call(Type type, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.type = type; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_type", org.apache.thrift.protocol.TMessageType.CALL, 0)); - create_type_args args = new create_type_args(); - args.setType(type); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_create_type(); - } - } - - public void drop_type(String type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_type_call method_call = new drop_type_call(type, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_type_call extends org.apache.thrift.async.TAsyncMethodCall { - private String type; - public drop_type_call(String type, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.type = type; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_type", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_type_args args = new drop_type_args(); - args.setType(type); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_drop_type(); - } - } - - public void get_type_all(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_type_all_call method_call = new get_type_all_call(name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_type_all_call extends org.apache.thrift.async.TAsyncMethodCall { - private String name; - public get_type_all_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.name = name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_type_all", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_type_all_args args = new get_type_all_args(); - args.setName(name); - args.write(prot); - prot.writeMessageEnd(); - } - - public Map getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_type_all(); - } - } - - public void get_fields(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_fields_call method_call = new get_fields_call(db_name, table_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_fields_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String table_name; - public get_fields_call(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.table_name = table_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_fields", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_fields_args args = new get_fields_args(); - args.setDb_name(db_name); - args.setTable_name(table_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_fields(); - } - } - - public void get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_fields_with_environment_context_call method_call = new get_fields_with_environment_context_call(db_name, table_name, environment_context, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_fields_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String table_name; - private EnvironmentContext environment_context; - public get_fields_with_environment_context_call(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.table_name = table_name; - this.environment_context = environment_context; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_fields_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_fields_with_environment_context_args args = new get_fields_with_environment_context_args(); - args.setDb_name(db_name); - args.setTable_name(table_name); - args.setEnvironment_context(environment_context); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_fields_with_environment_context(); - } - } - - public void get_schema(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_schema_call method_call = new get_schema_call(db_name, table_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_schema_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String table_name; - public get_schema_call(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.table_name = table_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_schema", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_schema_args args = new get_schema_args(); - args.setDb_name(db_name); - args.setTable_name(table_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_schema(); - } - } - - public void get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_schema_with_environment_context_call method_call = new get_schema_with_environment_context_call(db_name, table_name, environment_context, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_schema_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String table_name; - private EnvironmentContext environment_context; - public get_schema_with_environment_context_call(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.table_name = table_name; - this.environment_context = environment_context; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_schema_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_schema_with_environment_context_args args = new get_schema_with_environment_context_args(); - args.setDb_name(db_name); - args.setTable_name(table_name); - args.setEnvironment_context(environment_context); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_schema_with_environment_context(); - } - } - - public void create_table(Table tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - create_table_call method_call = new create_table_call(tbl, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class create_table_call extends org.apache.thrift.async.TAsyncMethodCall { - private Table tbl; - public create_table_call(Table tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.tbl = tbl; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); - create_table_args args = new create_table_args(); - args.setTbl(tbl); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_create_table(); - } - } - - public void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - create_table_with_environment_context_call method_call = new create_table_with_environment_context_call(tbl, environment_context, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class create_table_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { - private Table tbl; - private EnvironmentContext environment_context; - public create_table_with_environment_context_call(Table tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.tbl = tbl; - this.environment_context = environment_context; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_table_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); - create_table_with_environment_context_args args = new create_table_with_environment_context_args(); - args.setTbl(tbl); - args.setEnvironment_context(environment_context); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_create_table_with_environment_context(); - } - } - - public void create_table_with_constraints(Table tbl, List primaryKeys, List foreignKeys, List uniqueConstraints, List notNullConstraints, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - create_table_with_constraints_call method_call = new create_table_with_constraints_call(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class create_table_with_constraints_call extends org.apache.thrift.async.TAsyncMethodCall { - private Table tbl; - private List primaryKeys; - private List foreignKeys; - private List uniqueConstraints; - private List notNullConstraints; - public create_table_with_constraints_call(Table tbl, List primaryKeys, List foreignKeys, List uniqueConstraints, List notNullConstraints, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.tbl = tbl; - this.primaryKeys = primaryKeys; - this.foreignKeys = foreignKeys; - this.uniqueConstraints = uniqueConstraints; - this.notNullConstraints = notNullConstraints; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_table_with_constraints", org.apache.thrift.protocol.TMessageType.CALL, 0)); - create_table_with_constraints_args args = new create_table_with_constraints_args(); - args.setTbl(tbl); - args.setPrimaryKeys(primaryKeys); - args.setForeignKeys(foreignKeys); - args.setUniqueConstraints(uniqueConstraints); - args.setNotNullConstraints(notNullConstraints); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_create_table_with_constraints(); - } - } - - public void drop_constraint(DropConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_constraint_call method_call = new drop_constraint_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_constraint_call extends org.apache.thrift.async.TAsyncMethodCall { - private DropConstraintRequest req; - public drop_constraint_call(DropConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_constraint", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_constraint_args args = new drop_constraint_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_drop_constraint(); - } - } - - public void add_primary_key(AddPrimaryKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_primary_key_call method_call = new add_primary_key_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_primary_key_call extends org.apache.thrift.async.TAsyncMethodCall { - private AddPrimaryKeyRequest req; - public add_primary_key_call(AddPrimaryKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_primary_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_primary_key_args args = new add_primary_key_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_add_primary_key(); - } - } - - public void add_foreign_key(AddForeignKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_foreign_key_call method_call = new add_foreign_key_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_foreign_key_call extends org.apache.thrift.async.TAsyncMethodCall { - private AddForeignKeyRequest req; - public add_foreign_key_call(AddForeignKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_foreign_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_foreign_key_args args = new add_foreign_key_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_add_foreign_key(); - } - } - - public void add_unique_constraint(AddUniqueConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_unique_constraint_call method_call = new add_unique_constraint_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_unique_constraint_call extends org.apache.thrift.async.TAsyncMethodCall { - private AddUniqueConstraintRequest req; - public add_unique_constraint_call(AddUniqueConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_unique_constraint", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_unique_constraint_args args = new add_unique_constraint_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_add_unique_constraint(); - } - } - - public void add_not_null_constraint(AddNotNullConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_not_null_constraint_call method_call = new add_not_null_constraint_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_not_null_constraint_call extends org.apache.thrift.async.TAsyncMethodCall { - private AddNotNullConstraintRequest req; - public add_not_null_constraint_call(AddNotNullConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_not_null_constraint", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_not_null_constraint_args args = new add_not_null_constraint_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_add_not_null_constraint(); - } - } - - public void drop_table(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_table_call method_call = new drop_table_call(dbname, name, deleteData, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_table_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbname; - private String name; - private boolean deleteData; - public drop_table_call(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.name = name; - this.deleteData = deleteData; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_table_args args = new drop_table_args(); - args.setDbname(dbname); - args.setName(name); - args.setDeleteData(deleteData); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_drop_table(); - } - } - - public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_table_with_environment_context_call method_call = new drop_table_with_environment_context_call(dbname, name, deleteData, environment_context, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_table_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbname; - private String name; - private boolean deleteData; - private EnvironmentContext environment_context; - public drop_table_with_environment_context_call(String dbname, String name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.name = name; - this.deleteData = deleteData; - this.environment_context = environment_context; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_table_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_table_with_environment_context_args args = new drop_table_with_environment_context_args(); - args.setDbname(dbname); - args.setName(name); - args.setDeleteData(deleteData); - args.setEnvironment_context(environment_context); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_drop_table_with_environment_context(); - } - } - - public void truncate_table(String dbName, String tableName, List partNames, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - truncate_table_call method_call = new truncate_table_call(dbName, tableName, partNames, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class truncate_table_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbName; - private String tableName; - private List partNames; - public truncate_table_call(String dbName, String tableName, List partNames, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbName = dbName; - this.tableName = tableName; - this.partNames = partNames; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("truncate_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); - truncate_table_args args = new truncate_table_args(); - args.setDbName(dbName); - args.setTableName(tableName); - args.setPartNames(partNames); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_truncate_table(); - } - } - - public void get_tables(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_tables_call method_call = new get_tables_call(db_name, pattern, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_tables_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String pattern; - public get_tables_call(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.pattern = pattern; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_tables", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_tables_args args = new get_tables_args(); - args.setDb_name(db_name); - args.setPattern(pattern); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_tables(); - } - } - - public void get_tables_by_type(String db_name, String pattern, String tableType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_tables_by_type_call method_call = new get_tables_by_type_call(db_name, pattern, tableType, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_tables_by_type_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String pattern; - private String tableType; - public get_tables_by_type_call(String db_name, String pattern, String tableType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.pattern = pattern; - this.tableType = tableType; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_tables_by_type", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_tables_by_type_args args = new get_tables_by_type_args(); - args.setDb_name(db_name); - args.setPattern(pattern); - args.setTableType(tableType); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_tables_by_type(); - } - } - - public void get_table_meta(String db_patterns, String tbl_patterns, List tbl_types, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_table_meta_call method_call = new get_table_meta_call(db_patterns, tbl_patterns, tbl_types, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_table_meta_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_patterns; - private String tbl_patterns; - private List tbl_types; - public get_table_meta_call(String db_patterns, String tbl_patterns, List tbl_types, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_patterns = db_patterns; - this.tbl_patterns = tbl_patterns; - this.tbl_types = tbl_types; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_meta", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_table_meta_args args = new get_table_meta_args(); - args.setDb_patterns(db_patterns); - args.setTbl_patterns(tbl_patterns); - args.setTbl_types(tbl_types); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_table_meta(); - } - } - - public void get_all_tables(String db_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_all_tables_call method_call = new get_all_tables_call(db_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_all_tables_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - public get_all_tables_call(String db_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_tables", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_all_tables_args args = new get_all_tables_args(); - args.setDb_name(db_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_all_tables(); - } - } - - public void get_table(String dbname, String tbl_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_table_call method_call = new get_table_call(dbname, tbl_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_table_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbname; - private String tbl_name; - public get_table_call(String dbname, String tbl_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.tbl_name = tbl_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_table_args args = new get_table_args(); - args.setDbname(dbname); - args.setTbl_name(tbl_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public Table getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_table(); - } - } - - public void get_table_objects_by_name(String dbname, List tbl_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_table_objects_by_name_call method_call = new get_table_objects_by_name_call(dbname, tbl_names, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_table_objects_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbname; - private List tbl_names; - public get_table_objects_by_name_call(String dbname, List tbl_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.tbl_names = tbl_names; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_objects_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_table_objects_by_name_args args = new get_table_objects_by_name_args(); - args.setDbname(dbname); - args.setTbl_names(tbl_names); - args.write(prot); - prot.writeMessageEnd(); - } - - public List
getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_table_objects_by_name(); - } - } - - public void get_table_req(GetTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_table_req_call method_call = new get_table_req_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_table_req_call extends org.apache.thrift.async.TAsyncMethodCall { - private GetTableRequest req; - public get_table_req_call(GetTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_table_req_args args = new get_table_req_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public GetTableResult getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_table_req(); - } - } - - public void get_table_objects_by_name_req(GetTablesRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_table_objects_by_name_req_call method_call = new get_table_objects_by_name_req_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_table_objects_by_name_req_call extends org.apache.thrift.async.TAsyncMethodCall { - private GetTablesRequest req; - public get_table_objects_by_name_req_call(GetTablesRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_objects_by_name_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_table_objects_by_name_req_args args = new get_table_objects_by_name_req_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public GetTablesResult getResult() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_table_objects_by_name_req(); - } - } - - public void get_table_names_by_filter(String dbname, String filter, short max_tables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_table_names_by_filter_call method_call = new get_table_names_by_filter_call(dbname, filter, max_tables, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_table_names_by_filter_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbname; - private String filter; - private short max_tables; - public get_table_names_by_filter_call(String dbname, String filter, short max_tables, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.filter = filter; - this.max_tables = max_tables; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_names_by_filter", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_table_names_by_filter_args args = new get_table_names_by_filter_args(); - args.setDbname(dbname); - args.setFilter(filter); - args.setMax_tables(max_tables); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_table_names_by_filter(); - } - } - - public void alter_table(String dbname, String tbl_name, Table new_tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - alter_table_call method_call = new alter_table_call(dbname, tbl_name, new_tbl, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class alter_table_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbname; - private String tbl_name; - private Table new_tbl; - public alter_table_call(String dbname, String tbl_name, Table new_tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.tbl_name = tbl_name; - this.new_tbl = new_tbl; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); - alter_table_args args = new alter_table_args(); - args.setDbname(dbname); - args.setTbl_name(tbl_name); - args.setNew_tbl(new_tbl); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_table(); - } - } - - public void alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - alter_table_with_environment_context_call method_call = new alter_table_with_environment_context_call(dbname, tbl_name, new_tbl, environment_context, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class alter_table_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbname; - private String tbl_name; - private Table new_tbl; - private EnvironmentContext environment_context; - public alter_table_with_environment_context_call(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.tbl_name = tbl_name; - this.new_tbl = new_tbl; - this.environment_context = environment_context; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_table_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); - alter_table_with_environment_context_args args = new alter_table_with_environment_context_args(); - args.setDbname(dbname); - args.setTbl_name(tbl_name); - args.setNew_tbl(new_tbl); - args.setEnvironment_context(environment_context); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_table_with_environment_context(); - } - } - - public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - alter_table_with_cascade_call method_call = new alter_table_with_cascade_call(dbname, tbl_name, new_tbl, cascade, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class alter_table_with_cascade_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbname; - private String tbl_name; - private Table new_tbl; - private boolean cascade; - public alter_table_with_cascade_call(String dbname, String tbl_name, Table new_tbl, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.tbl_name = tbl_name; - this.new_tbl = new_tbl; - this.cascade = cascade; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_table_with_cascade", org.apache.thrift.protocol.TMessageType.CALL, 0)); - alter_table_with_cascade_args args = new alter_table_with_cascade_args(); - args.setDbname(dbname); - args.setTbl_name(tbl_name); - args.setNew_tbl(new_tbl); - args.setCascade(cascade); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_table_with_cascade(); - } - } - - public void add_partition(Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_partition_call method_call = new add_partition_call(new_part, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_partition_call extends org.apache.thrift.async.TAsyncMethodCall { - private Partition new_part; - public add_partition_call(Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.new_part = new_part; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_partition_args args = new add_partition_args(); - args.setNew_part(new_part); - args.write(prot); - prot.writeMessageEnd(); - } - - public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_add_partition(); - } - } - - public void add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_partition_with_environment_context_call method_call = new add_partition_with_environment_context_call(new_part, environment_context, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_partition_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { - private Partition new_part; - private EnvironmentContext environment_context; - public add_partition_with_environment_context_call(Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.new_part = new_part; - this.environment_context = environment_context; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partition_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_partition_with_environment_context_args args = new add_partition_with_environment_context_args(); - args.setNew_part(new_part); - args.setEnvironment_context(environment_context); - args.write(prot); - prot.writeMessageEnd(); - } - - public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_add_partition_with_environment_context(); - } - } - - public void add_partitions(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_partitions_call method_call = new add_partitions_call(new_parts, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { - private List new_parts; - public add_partitions_call(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.new_parts = new_parts; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_partitions_args args = new add_partitions_args(); - args.setNew_parts(new_parts); - args.write(prot); - prot.writeMessageEnd(); - } - - public int getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_add_partitions(); - } - } - - public void add_partitions_pspec(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_partitions_pspec_call method_call = new add_partitions_pspec_call(new_parts, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_partitions_pspec_call extends org.apache.thrift.async.TAsyncMethodCall { - private List new_parts; - public add_partitions_pspec_call(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.new_parts = new_parts; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partitions_pspec", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_partitions_pspec_args args = new add_partitions_pspec_args(); - args.setNew_parts(new_parts); - args.write(prot); - prot.writeMessageEnd(); - } - - public int getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_add_partitions_pspec(); - } - } - - public void append_partition(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - append_partition_call method_call = new append_partition_call(db_name, tbl_name, part_vals, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class append_partition_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - public append_partition_call(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); - append_partition_args args = new append_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.write(prot); - prot.writeMessageEnd(); - } - - public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_append_partition(); - } - } - - public void add_partitions_req(AddPartitionsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_partitions_req_call method_call = new add_partitions_req_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_partitions_req_call extends org.apache.thrift.async.TAsyncMethodCall { - private AddPartitionsRequest request; - public add_partitions_req_call(AddPartitionsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partitions_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_partitions_req_args args = new add_partitions_req_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public AddPartitionsResult getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_add_partitions_req(); - } - } - - public void append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - append_partition_with_environment_context_call method_call = new append_partition_with_environment_context_call(db_name, tbl_name, part_vals, environment_context, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class append_partition_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - private EnvironmentContext environment_context; - public append_partition_with_environment_context_call(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.environment_context = environment_context; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_partition_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); - append_partition_with_environment_context_args args = new append_partition_with_environment_context_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setEnvironment_context(environment_context); - args.write(prot); - prot.writeMessageEnd(); - } - - public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_append_partition_with_environment_context(); - } - } - - public void append_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - append_partition_by_name_call method_call = new append_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class append_partition_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String part_name; - public append_partition_by_name_call(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_partition_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); - append_partition_by_name_args args = new append_partition_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_append_partition_by_name(); - } - } - - public void append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - append_partition_by_name_with_environment_context_call method_call = new append_partition_by_name_with_environment_context_call(db_name, tbl_name, part_name, environment_context, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class append_partition_by_name_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String part_name; - private EnvironmentContext environment_context; - public append_partition_by_name_with_environment_context_call(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.environment_context = environment_context; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_partition_by_name_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); - append_partition_by_name_with_environment_context_args args = new append_partition_by_name_with_environment_context_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.setEnvironment_context(environment_context); - args.write(prot); - prot.writeMessageEnd(); - } - - public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_append_partition_by_name_with_environment_context(); - } - } - - public void drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_partition_call method_call = new drop_partition_call(db_name, tbl_name, part_vals, deleteData, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_partition_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - private boolean deleteData; - public drop_partition_call(String db_name, String tbl_name, List part_vals, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.deleteData = deleteData; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_partition_args args = new drop_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setDeleteData(deleteData); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_drop_partition(); - } - } - - public void drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_partition_with_environment_context_call method_call = new drop_partition_with_environment_context_call(db_name, tbl_name, part_vals, deleteData, environment_context, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_partition_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - private boolean deleteData; - private EnvironmentContext environment_context; - public drop_partition_with_environment_context_call(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.deleteData = deleteData; - this.environment_context = environment_context; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partition_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_partition_with_environment_context_args args = new drop_partition_with_environment_context_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setDeleteData(deleteData); - args.setEnvironment_context(environment_context); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_drop_partition_with_environment_context(); - } - } - - public void drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_partition_by_name_call method_call = new drop_partition_by_name_call(db_name, tbl_name, part_name, deleteData, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_partition_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String part_name; - private boolean deleteData; - public drop_partition_by_name_call(String db_name, String tbl_name, String part_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.deleteData = deleteData; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partition_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_partition_by_name_args args = new drop_partition_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.setDeleteData(deleteData); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_drop_partition_by_name(); - } - } - - public void drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_partition_by_name_with_environment_context_call method_call = new drop_partition_by_name_with_environment_context_call(db_name, tbl_name, part_name, deleteData, environment_context, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_partition_by_name_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String part_name; - private boolean deleteData; - private EnvironmentContext environment_context; - public drop_partition_by_name_with_environment_context_call(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.deleteData = deleteData; - this.environment_context = environment_context; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partition_by_name_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_partition_by_name_with_environment_context_args args = new drop_partition_by_name_with_environment_context_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.setDeleteData(deleteData); - args.setEnvironment_context(environment_context); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_drop_partition_by_name_with_environment_context(); - } - } - - public void drop_partitions_req(DropPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_partitions_req_call method_call = new drop_partitions_req_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_partitions_req_call extends org.apache.thrift.async.TAsyncMethodCall { - private DropPartitionsRequest req; - public drop_partitions_req_call(DropPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partitions_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_partitions_req_args args = new drop_partitions_req_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public DropPartitionsResult getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_drop_partitions_req(); - } - } - - public void get_partition(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partition_call method_call = new get_partition_call(db_name, tbl_name, part_vals, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partition_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - public get_partition_call(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partition_args args = new get_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.write(prot); - prot.writeMessageEnd(); - } - - public Partition getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partition(); - } - } - - public void exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - exchange_partition_call method_call = new exchange_partition_call(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class exchange_partition_call extends org.apache.thrift.async.TAsyncMethodCall { - private Map partitionSpecs; - private String source_db; - private String source_table_name; - private String dest_db; - private String dest_table_name; - public exchange_partition_call(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.partitionSpecs = partitionSpecs; - this.source_db = source_db; - this.source_table_name = source_table_name; - this.dest_db = dest_db; - this.dest_table_name = dest_table_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("exchange_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); - exchange_partition_args args = new exchange_partition_args(); - args.setPartitionSpecs(partitionSpecs); - args.setSource_db(source_db); - args.setSource_table_name(source_table_name); - args.setDest_db(dest_db); - args.setDest_table_name(dest_table_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public Partition getResult() throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_exchange_partition(); - } - } - - public void exchange_partitions(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - exchange_partitions_call method_call = new exchange_partitions_call(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class exchange_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { - private Map partitionSpecs; - private String source_db; - private String source_table_name; - private String dest_db; - private String dest_table_name; - public exchange_partitions_call(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.partitionSpecs = partitionSpecs; - this.source_db = source_db; - this.source_table_name = source_table_name; - this.dest_db = dest_db; - this.dest_table_name = dest_table_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("exchange_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); - exchange_partitions_args args = new exchange_partitions_args(); - args.setPartitionSpecs(partitionSpecs); - args.setSource_db(source_db); - args.setSource_table_name(source_table_name); - args.setDest_db(dest_db); - args.setDest_table_name(dest_table_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_exchange_partitions(); - } - } - - public void get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partition_with_auth_call method_call = new get_partition_with_auth_call(db_name, tbl_name, part_vals, user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partition_with_auth_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - private String user_name; - private List group_names; - public get_partition_with_auth_call(String db_name, String tbl_name, List part_vals, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.user_name = user_name; - this.group_names = group_names; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_with_auth", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partition_with_auth_args args = new get_partition_with_auth_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setUser_name(user_name); - args.setGroup_names(group_names); - args.write(prot); - prot.writeMessageEnd(); - } - - public Partition getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partition_with_auth(); - } - } - - public void get_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partition_by_name_call method_call = new get_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partition_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String part_name; - public get_partition_by_name_call(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partition_by_name_args args = new get_partition_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public Partition getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partition_by_name(); - } - } - - public void get_partitions(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partitions_call method_call = new get_partitions_call(db_name, tbl_name, max_parts, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private short max_parts; - public get_partitions_call(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partitions_args args = new get_partitions_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_parts(max_parts); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partitions(); - } - } - - public void get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partitions_with_auth_call method_call = new get_partitions_with_auth_call(db_name, tbl_name, max_parts, user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partitions_with_auth_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private short max_parts; - private String user_name; - private List group_names; - public get_partitions_with_auth_call(String db_name, String tbl_name, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - this.user_name = user_name; - this.group_names = group_names; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_with_auth", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partitions_with_auth_args args = new get_partitions_with_auth_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_parts(max_parts); - args.setUser_name(user_name); - args.setGroup_names(group_names); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partitions_with_auth(); - } - } - - public void get_partitions_pspec(String db_name, String tbl_name, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partitions_pspec_call method_call = new get_partitions_pspec_call(db_name, tbl_name, max_parts, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partitions_pspec_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private int max_parts; - public get_partitions_pspec_call(String db_name, String tbl_name, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_pspec", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partitions_pspec_args args = new get_partitions_pspec_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_parts(max_parts); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partitions_pspec(); - } - } - - public void get_partition_names(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partition_names_call method_call = new get_partition_names_call(db_name, tbl_name, max_parts, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partition_names_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private short max_parts; - public get_partition_names_call(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partition_names_args args = new get_partition_names_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_parts(max_parts); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partition_names(); - } - } - - public void get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partitions_ps_call method_call = new get_partitions_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partitions_ps_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - private short max_parts; - public get_partitions_ps_call(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_ps", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partitions_ps_args args = new get_partitions_ps_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setMax_parts(max_parts); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partitions_ps(); - } - } - - public void get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partitions_ps_with_auth_call method_call = new get_partitions_ps_with_auth_call(db_name, tbl_name, part_vals, max_parts, user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partitions_ps_with_auth_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - private short max_parts; - private String user_name; - private List group_names; - public get_partitions_ps_with_auth_call(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; - this.user_name = user_name; - this.group_names = group_names; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_ps_with_auth", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setMax_parts(max_parts); - args.setUser_name(user_name); - args.setGroup_names(group_names); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partitions_ps_with_auth(); - } - } - - public void get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partition_names_ps_call method_call = new get_partition_names_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partition_names_ps_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - private short max_parts; - public get_partition_names_ps_call(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_names_ps", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partition_names_ps_args args = new get_partition_names_ps_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setMax_parts(max_parts); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partition_names_ps(); - } - } - - public void get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partitions_by_filter_call method_call = new get_partitions_by_filter_call(db_name, tbl_name, filter, max_parts, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partitions_by_filter_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String filter; - private short max_parts; - public get_partitions_by_filter_call(String db_name, String tbl_name, String filter, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.filter = filter; - this.max_parts = max_parts; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_by_filter", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partitions_by_filter_args args = new get_partitions_by_filter_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setFilter(filter); - args.setMax_parts(max_parts); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partitions_by_filter(); - } - } - - public void get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_part_specs_by_filter_call method_call = new get_part_specs_by_filter_call(db_name, tbl_name, filter, max_parts, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_part_specs_by_filter_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String filter; - private int max_parts; - public get_part_specs_by_filter_call(String db_name, String tbl_name, String filter, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.filter = filter; - this.max_parts = max_parts; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_part_specs_by_filter", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_part_specs_by_filter_args args = new get_part_specs_by_filter_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setFilter(filter); - args.setMax_parts(max_parts); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_part_specs_by_filter(); - } - } - - public void get_partitions_by_expr(PartitionsByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partitions_by_expr_call method_call = new get_partitions_by_expr_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partitions_by_expr_call extends org.apache.thrift.async.TAsyncMethodCall { - private PartitionsByExprRequest req; - public get_partitions_by_expr_call(PartitionsByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_by_expr", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partitions_by_expr_args args = new get_partitions_by_expr_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public PartitionsByExprResult getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partitions_by_expr(); - } - } - - public void get_num_partitions_by_filter(String db_name, String tbl_name, String filter, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_num_partitions_by_filter_call method_call = new get_num_partitions_by_filter_call(db_name, tbl_name, filter, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_num_partitions_by_filter_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String filter; - public get_num_partitions_by_filter_call(String db_name, String tbl_name, String filter, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.filter = filter; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_num_partitions_by_filter", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_num_partitions_by_filter_args args = new get_num_partitions_by_filter_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setFilter(filter); - args.write(prot); - prot.writeMessageEnd(); - } - - public int getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_num_partitions_by_filter(); - } - } - - public void get_partitions_by_names(String db_name, String tbl_name, List names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partitions_by_names_call method_call = new get_partitions_by_names_call(db_name, tbl_name, names, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partitions_by_names_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List names; - public get_partitions_by_names_call(String db_name, String tbl_name, List names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.names = names; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_by_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partitions_by_names_args args = new get_partitions_by_names_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setNames(names); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partitions_by_names(); - } - } - - public void alter_partition(String db_name, String tbl_name, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - alter_partition_call method_call = new alter_partition_call(db_name, tbl_name, new_part, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class alter_partition_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private Partition new_part; - public alter_partition_call(String db_name, String tbl_name, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_part = new_part; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); - alter_partition_args args = new alter_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setNew_part(new_part); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_partition(); - } - } - - public void alter_partitions(String db_name, String tbl_name, List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - alter_partitions_call method_call = new alter_partitions_call(db_name, tbl_name, new_parts, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class alter_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List new_parts; - public alter_partitions_call(String db_name, String tbl_name, List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_parts = new_parts; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); - alter_partitions_args args = new alter_partitions_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setNew_parts(new_parts); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_partitions(); - } - } - - public void alter_partitions_with_environment_context(String db_name, String tbl_name, List new_parts, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - alter_partitions_with_environment_context_call method_call = new alter_partitions_with_environment_context_call(db_name, tbl_name, new_parts, environment_context, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class alter_partitions_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List new_parts; - private EnvironmentContext environment_context; - public alter_partitions_with_environment_context_call(String db_name, String tbl_name, List new_parts, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_parts = new_parts; - this.environment_context = environment_context; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partitions_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); - alter_partitions_with_environment_context_args args = new alter_partitions_with_environment_context_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setNew_parts(new_parts); - args.setEnvironment_context(environment_context); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_partitions_with_environment_context(); - } - } - - public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - alter_partition_with_environment_context_call method_call = new alter_partition_with_environment_context_call(db_name, tbl_name, new_part, environment_context, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class alter_partition_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private Partition new_part; - private EnvironmentContext environment_context; - public alter_partition_with_environment_context_call(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_part = new_part; - this.environment_context = environment_context; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partition_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); - alter_partition_with_environment_context_args args = new alter_partition_with_environment_context_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setNew_part(new_part); - args.setEnvironment_context(environment_context); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_partition_with_environment_context(); - } - } - - public void rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - rename_partition_call method_call = new rename_partition_call(db_name, tbl_name, part_vals, new_part, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class rename_partition_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - private Partition new_part; - public rename_partition_call(String db_name, String tbl_name, List part_vals, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.new_part = new_part; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("rename_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); - rename_partition_args args = new rename_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setNew_part(new_part); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_rename_partition(); - } - } - - public void partition_name_has_valid_characters(List part_vals, boolean throw_exception, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - partition_name_has_valid_characters_call method_call = new partition_name_has_valid_characters_call(part_vals, throw_exception, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class partition_name_has_valid_characters_call extends org.apache.thrift.async.TAsyncMethodCall { - private List part_vals; - private boolean throw_exception; - public partition_name_has_valid_characters_call(List part_vals, boolean throw_exception, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.part_vals = part_vals; - this.throw_exception = throw_exception; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partition_name_has_valid_characters", org.apache.thrift.protocol.TMessageType.CALL, 0)); - partition_name_has_valid_characters_args args = new partition_name_has_valid_characters_args(); - args.setPart_vals(part_vals); - args.setThrow_exception(throw_exception); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_partition_name_has_valid_characters(); - } - } - - public void get_config_value(String name, String defaultValue, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_config_value_call method_call = new get_config_value_call(name, defaultValue, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_config_value_call extends org.apache.thrift.async.TAsyncMethodCall { - private String name; - private String defaultValue; - public get_config_value_call(String name, String defaultValue, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.name = name; - this.defaultValue = defaultValue; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_config_value", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_config_value_args args = new get_config_value_args(); - args.setName(name); - args.setDefaultValue(defaultValue); - args.write(prot); - prot.writeMessageEnd(); - } - - public String getResult() throws ConfigValSecurityException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_config_value(); - } - } - - public void partition_name_to_vals(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - partition_name_to_vals_call method_call = new partition_name_to_vals_call(part_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class partition_name_to_vals_call extends org.apache.thrift.async.TAsyncMethodCall { - private String part_name; - public partition_name_to_vals_call(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.part_name = part_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partition_name_to_vals", org.apache.thrift.protocol.TMessageType.CALL, 0)); - partition_name_to_vals_args args = new partition_name_to_vals_args(); - args.setPart_name(part_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_partition_name_to_vals(); - } - } - - public void partition_name_to_spec(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - partition_name_to_spec_call method_call = new partition_name_to_spec_call(part_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class partition_name_to_spec_call extends org.apache.thrift.async.TAsyncMethodCall { - private String part_name; - public partition_name_to_spec_call(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.part_name = part_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partition_name_to_spec", org.apache.thrift.protocol.TMessageType.CALL, 0)); - partition_name_to_spec_args args = new partition_name_to_spec_args(); - args.setPart_name(part_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public Map getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_partition_name_to_spec(); - } - } - - public void markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - markPartitionForEvent_call method_call = new markPartitionForEvent_call(db_name, tbl_name, part_vals, eventType, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class markPartitionForEvent_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private Map part_vals; - private PartitionEventType eventType; - public markPartitionForEvent_call(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.eventType = eventType; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markPartitionForEvent", org.apache.thrift.protocol.TMessageType.CALL, 0)); - markPartitionForEvent_args args = new markPartitionForEvent_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setEventType(eventType); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_markPartitionForEvent(); - } - } - - public void isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - isPartitionMarkedForEvent_call method_call = new isPartitionMarkedForEvent_call(db_name, tbl_name, part_vals, eventType, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class isPartitionMarkedForEvent_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private Map part_vals; - private PartitionEventType eventType; - public isPartitionMarkedForEvent_call(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.eventType = eventType; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isPartitionMarkedForEvent", org.apache.thrift.protocol.TMessageType.CALL, 0)); - isPartitionMarkedForEvent_args args = new isPartitionMarkedForEvent_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setEventType(eventType); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_isPartitionMarkedForEvent(); - } - } - - public void add_index(Index new_index, Table index_table, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_index_call method_call = new add_index_call(new_index, index_table, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_index_call extends org.apache.thrift.async.TAsyncMethodCall { - private Index new_index; - private Table index_table; - public add_index_call(Index new_index, Table index_table, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.new_index = new_index; - this.index_table = index_table; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_index", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_index_args args = new add_index_args(); - args.setNew_index(new_index); - args.setIndex_table(index_table); - args.write(prot); - prot.writeMessageEnd(); - } - - public Index getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_add_index(); - } - } - - public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - alter_index_call method_call = new alter_index_call(dbname, base_tbl_name, idx_name, new_idx, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class alter_index_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbname; - private String base_tbl_name; - private String idx_name; - private Index new_idx; - public alter_index_call(String dbname, String base_tbl_name, String idx_name, Index new_idx, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.base_tbl_name = base_tbl_name; - this.idx_name = idx_name; - this.new_idx = new_idx; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_index", org.apache.thrift.protocol.TMessageType.CALL, 0)); - alter_index_args args = new alter_index_args(); - args.setDbname(dbname); - args.setBase_tbl_name(base_tbl_name); - args.setIdx_name(idx_name); - args.setNew_idx(new_idx); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_index(); - } - } - - public void drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_index_by_name_call method_call = new drop_index_by_name_call(db_name, tbl_name, index_name, deleteData, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_index_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String index_name; - private boolean deleteData; - public drop_index_by_name_call(String db_name, String tbl_name, String index_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; - this.deleteData = deleteData; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_index_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_index_by_name_args args = new drop_index_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setIndex_name(index_name); - args.setDeleteData(deleteData); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_drop_index_by_name(); - } - } - - public void get_index_by_name(String db_name, String tbl_name, String index_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_index_by_name_call method_call = new get_index_by_name_call(db_name, tbl_name, index_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_index_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String index_name; - public get_index_by_name_call(String db_name, String tbl_name, String index_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_index_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_index_by_name_args args = new get_index_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setIndex_name(index_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public Index getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_index_by_name(); - } - } - - public void get_indexes(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_indexes_call method_call = new get_indexes_call(db_name, tbl_name, max_indexes, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_indexes_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private short max_indexes; - public get_indexes_call(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_indexes", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_indexes_args args = new get_indexes_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_indexes(max_indexes); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_indexes(); - } - } - - public void get_index_names(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_index_names_call method_call = new get_index_names_call(db_name, tbl_name, max_indexes, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_index_names_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private short max_indexes; - public get_index_names_call(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_index_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_index_names_args args = new get_index_names_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_indexes(max_indexes); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_index_names(); - } - } - - public void get_primary_keys(PrimaryKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_primary_keys_call method_call = new get_primary_keys_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_primary_keys_call extends org.apache.thrift.async.TAsyncMethodCall { - private PrimaryKeysRequest request; - public get_primary_keys_call(PrimaryKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_primary_keys", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_primary_keys_args args = new get_primary_keys_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public PrimaryKeysResponse getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_primary_keys(); - } - } - - public void get_foreign_keys(ForeignKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_foreign_keys_call method_call = new get_foreign_keys_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_foreign_keys_call extends org.apache.thrift.async.TAsyncMethodCall { - private ForeignKeysRequest request; - public get_foreign_keys_call(ForeignKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_foreign_keys", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_foreign_keys_args args = new get_foreign_keys_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public ForeignKeysResponse getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_foreign_keys(); - } - } - - public void get_unique_constraints(UniqueConstraintsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_unique_constraints_call method_call = new get_unique_constraints_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_unique_constraints_call extends org.apache.thrift.async.TAsyncMethodCall { - private UniqueConstraintsRequest request; - public get_unique_constraints_call(UniqueConstraintsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_unique_constraints", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_unique_constraints_args args = new get_unique_constraints_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public UniqueConstraintsResponse getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_unique_constraints(); - } - } - - public void get_not_null_constraints(NotNullConstraintsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_not_null_constraints_call method_call = new get_not_null_constraints_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_not_null_constraints_call extends org.apache.thrift.async.TAsyncMethodCall { - private NotNullConstraintsRequest request; - public get_not_null_constraints_call(NotNullConstraintsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_not_null_constraints", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_not_null_constraints_args args = new get_not_null_constraints_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public NotNullConstraintsResponse getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_not_null_constraints(); - } - } - - public void update_table_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - update_table_column_statistics_call method_call = new update_table_column_statistics_call(stats_obj, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class update_table_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { - private ColumnStatistics stats_obj; - public update_table_column_statistics_call(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.stats_obj = stats_obj; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_table_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); - update_table_column_statistics_args args = new update_table_column_statistics_args(); - args.setStats_obj(stats_obj); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_update_table_column_statistics(); - } - } - - public void update_partition_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - update_partition_column_statistics_call method_call = new update_partition_column_statistics_call(stats_obj, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class update_partition_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { - private ColumnStatistics stats_obj; - public update_partition_column_statistics_call(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.stats_obj = stats_obj; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_partition_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); - update_partition_column_statistics_args args = new update_partition_column_statistics_args(); - args.setStats_obj(stats_obj); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_update_partition_column_statistics(); - } - } - - public void get_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_table_column_statistics_call method_call = new get_table_column_statistics_call(db_name, tbl_name, col_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_table_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String col_name; - public get_table_column_statistics_call(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.col_name = col_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_table_column_statistics_args args = new get_table_column_statistics_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setCol_name(col_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public ColumnStatistics getResult() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_table_column_statistics(); - } - } - - public void get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partition_column_statistics_call method_call = new get_partition_column_statistics_call(db_name, tbl_name, part_name, col_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partition_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String part_name; - private String col_name; - public get_partition_column_statistics_call(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.col_name = col_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partition_column_statistics_args args = new get_partition_column_statistics_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.setCol_name(col_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public ColumnStatistics getResult() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partition_column_statistics(); - } - } - - public void get_table_statistics_req(TableStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_table_statistics_req_call method_call = new get_table_statistics_req_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_table_statistics_req_call extends org.apache.thrift.async.TAsyncMethodCall { - private TableStatsRequest request; - public get_table_statistics_req_call(TableStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_statistics_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_table_statistics_req_args args = new get_table_statistics_req_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public TableStatsResult getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_table_statistics_req(); - } - } - - public void get_partitions_statistics_req(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_partitions_statistics_req_call method_call = new get_partitions_statistics_req_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_partitions_statistics_req_call extends org.apache.thrift.async.TAsyncMethodCall { - private PartitionsStatsRequest request; - public get_partitions_statistics_req_call(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_statistics_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_partitions_statistics_req_args args = new get_partitions_statistics_req_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public PartitionsStatsResult getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partitions_statistics_req(); - } - } - - public void get_aggr_stats_for(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_aggr_stats_for_call method_call = new get_aggr_stats_for_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_aggr_stats_for_call extends org.apache.thrift.async.TAsyncMethodCall { - private PartitionsStatsRequest request; - public get_aggr_stats_for_call(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_aggr_stats_for", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_aggr_stats_for_args args = new get_aggr_stats_for_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public AggrStats getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_aggr_stats_for(); - } - } - - public void set_aggr_stats_for(SetPartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - set_aggr_stats_for_call method_call = new set_aggr_stats_for_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class set_aggr_stats_for_call extends org.apache.thrift.async.TAsyncMethodCall { - private SetPartitionsStatsRequest request; - public set_aggr_stats_for_call(SetPartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_aggr_stats_for", org.apache.thrift.protocol.TMessageType.CALL, 0)); - set_aggr_stats_for_args args = new set_aggr_stats_for_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_set_aggr_stats_for(); - } - } - - public void delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - delete_partition_column_statistics_call method_call = new delete_partition_column_statistics_call(db_name, tbl_name, part_name, col_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class delete_partition_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String part_name; - private String col_name; - public delete_partition_column_statistics_call(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.col_name = col_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delete_partition_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); - delete_partition_column_statistics_args args = new delete_partition_column_statistics_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.setCol_name(col_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_delete_partition_column_statistics(); - } - } - - public void delete_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - delete_table_column_statistics_call method_call = new delete_table_column_statistics_call(db_name, tbl_name, col_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class delete_table_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String col_name; - public delete_table_column_statistics_call(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.col_name = col_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delete_table_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); - delete_table_column_statistics_args args = new delete_table_column_statistics_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setCol_name(col_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_delete_table_column_statistics(); - } - } - - public void create_function(Function func, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - create_function_call method_call = new create_function_call(func, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class create_function_call extends org.apache.thrift.async.TAsyncMethodCall { - private Function func; - public create_function_call(Function func, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.func = func; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); - create_function_args args = new create_function_args(); - args.setFunc(func); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_create_function(); - } - } - - public void drop_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_function_call method_call = new drop_function_call(dbName, funcName, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_function_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbName; - private String funcName; - public drop_function_call(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbName = dbName; - this.funcName = funcName; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_function_args args = new drop_function_args(); - args.setDbName(dbName); - args.setFuncName(funcName); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_drop_function(); - } - } - - public void alter_function(String dbName, String funcName, Function newFunc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - alter_function_call method_call = new alter_function_call(dbName, funcName, newFunc, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class alter_function_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbName; - private String funcName; - private Function newFunc; - public alter_function_call(String dbName, String funcName, Function newFunc, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbName = dbName; - this.funcName = funcName; - this.newFunc = newFunc; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); - alter_function_args args = new alter_function_args(); - args.setDbName(dbName); - args.setFuncName(funcName); - args.setNewFunc(newFunc); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_function(); - } - } - - public void get_functions(String dbName, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_functions_call method_call = new get_functions_call(dbName, pattern, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_functions_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbName; - private String pattern; - public get_functions_call(String dbName, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbName = dbName; - this.pattern = pattern; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_functions", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_functions_args args = new get_functions_args(); - args.setDbName(dbName); - args.setPattern(pattern); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_functions(); - } - } - - public void get_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_function_call method_call = new get_function_call(dbName, funcName, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_function_call extends org.apache.thrift.async.TAsyncMethodCall { - private String dbName; - private String funcName; - public get_function_call(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbName = dbName; - this.funcName = funcName; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_function_args args = new get_function_args(); - args.setDbName(dbName); - args.setFuncName(funcName); - args.write(prot); - prot.writeMessageEnd(); - } - - public Function getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_function(); - } - } - - public void get_all_functions(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_all_functions_call method_call = new get_all_functions_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_all_functions_call extends org.apache.thrift.async.TAsyncMethodCall { - public get_all_functions_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_functions", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_all_functions_args args = new get_all_functions_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public GetAllFunctionsResponse getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_all_functions(); - } - } - - public void create_role(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - create_role_call method_call = new create_role_call(role, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class create_role_call extends org.apache.thrift.async.TAsyncMethodCall { - private Role role; - public create_role_call(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.role = role; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); - create_role_args args = new create_role_args(); - args.setRole(role); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_create_role(); - } - } - - public void drop_role(String role_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - drop_role_call method_call = new drop_role_call(role_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class drop_role_call extends org.apache.thrift.async.TAsyncMethodCall { - private String role_name; - public drop_role_call(String role_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.role_name = role_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); - drop_role_args args = new drop_role_args(); - args.setRole_name(role_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_drop_role(); - } - } - - public void get_role_names(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_role_names_call method_call = new get_role_names_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_role_names_call extends org.apache.thrift.async.TAsyncMethodCall { - public get_role_names_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_role_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_role_names_args args = new get_role_names_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_role_names(); - } - } - - public void grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - grant_role_call method_call = new grant_role_call(role_name, principal_name, principal_type, grantor, grantorType, grant_option, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class grant_role_call extends org.apache.thrift.async.TAsyncMethodCall { - private String role_name; - private String principal_name; - private PrincipalType principal_type; - private String grantor; - private PrincipalType grantorType; - private boolean grant_option; - public grant_role_call(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.role_name = role_name; - this.principal_name = principal_name; - this.principal_type = principal_type; - this.grantor = grantor; - this.grantorType = grantorType; - this.grant_option = grant_option; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); - grant_role_args args = new grant_role_args(); - args.setRole_name(role_name); - args.setPrincipal_name(principal_name); - args.setPrincipal_type(principal_type); - args.setGrantor(grantor); - args.setGrantorType(grantorType); - args.setGrant_option(grant_option); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_grant_role(); - } - } - - public void revoke_role(String role_name, String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - revoke_role_call method_call = new revoke_role_call(role_name, principal_name, principal_type, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class revoke_role_call extends org.apache.thrift.async.TAsyncMethodCall { - private String role_name; - private String principal_name; - private PrincipalType principal_type; - public revoke_role_call(String role_name, String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.role_name = role_name; - this.principal_name = principal_name; - this.principal_type = principal_type; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revoke_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); - revoke_role_args args = new revoke_role_args(); - args.setRole_name(role_name); - args.setPrincipal_name(principal_name); - args.setPrincipal_type(principal_type); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_revoke_role(); - } - } - - public void list_roles(String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - list_roles_call method_call = new list_roles_call(principal_name, principal_type, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class list_roles_call extends org.apache.thrift.async.TAsyncMethodCall { - private String principal_name; - private PrincipalType principal_type; - public list_roles_call(String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.principal_name = principal_name; - this.principal_type = principal_type; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_roles", org.apache.thrift.protocol.TMessageType.CALL, 0)); - list_roles_args args = new list_roles_args(); - args.setPrincipal_name(principal_name); - args.setPrincipal_type(principal_type); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_list_roles(); - } - } - - public void grant_revoke_role(GrantRevokeRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - grant_revoke_role_call method_call = new grant_revoke_role_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class grant_revoke_role_call extends org.apache.thrift.async.TAsyncMethodCall { - private GrantRevokeRoleRequest request; - public grant_revoke_role_call(GrantRevokeRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_revoke_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); - grant_revoke_role_args args = new grant_revoke_role_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public GrantRevokeRoleResponse getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_grant_revoke_role(); - } - } - - public void get_principals_in_role(GetPrincipalsInRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_principals_in_role_call method_call = new get_principals_in_role_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_principals_in_role_call extends org.apache.thrift.async.TAsyncMethodCall { - private GetPrincipalsInRoleRequest request; - public get_principals_in_role_call(GetPrincipalsInRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_principals_in_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_principals_in_role_args args = new get_principals_in_role_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public GetPrincipalsInRoleResponse getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_principals_in_role(); - } - } - - public void get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_role_grants_for_principal_call method_call = new get_role_grants_for_principal_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_role_grants_for_principal_call extends org.apache.thrift.async.TAsyncMethodCall { - private GetRoleGrantsForPrincipalRequest request; - public get_role_grants_for_principal_call(GetRoleGrantsForPrincipalRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_role_grants_for_principal", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_role_grants_for_principal_args args = new get_role_grants_for_principal_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public GetRoleGrantsForPrincipalResponse getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_role_grants_for_principal(); - } - } - - public void get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_privilege_set_call method_call = new get_privilege_set_call(hiveObject, user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_privilege_set_call extends org.apache.thrift.async.TAsyncMethodCall { - private HiveObjectRef hiveObject; - private String user_name; - private List group_names; - public get_privilege_set_call(HiveObjectRef hiveObject, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.hiveObject = hiveObject; - this.user_name = user_name; - this.group_names = group_names; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_privilege_set", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_privilege_set_args args = new get_privilege_set_args(); - args.setHiveObject(hiveObject); - args.setUser_name(user_name); - args.setGroup_names(group_names); - args.write(prot); - prot.writeMessageEnd(); - } - - public PrincipalPrivilegeSet getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_privilege_set(); - } - } - - public void list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - list_privileges_call method_call = new list_privileges_call(principal_name, principal_type, hiveObject, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class list_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { - private String principal_name; - private PrincipalType principal_type; - private HiveObjectRef hiveObject; - public list_privileges_call(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.principal_name = principal_name; - this.principal_type = principal_type; - this.hiveObject = hiveObject; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); - list_privileges_args args = new list_privileges_args(); - args.setPrincipal_name(principal_name); - args.setPrincipal_type(principal_type); - args.setHiveObject(hiveObject); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_list_privileges(); - } - } - - public void grant_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - grant_privileges_call method_call = new grant_privileges_call(privileges, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class grant_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { - private PrivilegeBag privileges; - public grant_privileges_call(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.privileges = privileges; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); - grant_privileges_args args = new grant_privileges_args(); - args.setPrivileges(privileges); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_grant_privileges(); - } - } - - public void revoke_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - revoke_privileges_call method_call = new revoke_privileges_call(privileges, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class revoke_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { - private PrivilegeBag privileges; - public revoke_privileges_call(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.privileges = privileges; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revoke_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); - revoke_privileges_args args = new revoke_privileges_args(); - args.setPrivileges(privileges); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_revoke_privileges(); - } - } - - public void grant_revoke_privileges(GrantRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - grant_revoke_privileges_call method_call = new grant_revoke_privileges_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class grant_revoke_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { - private GrantRevokePrivilegeRequest request; - public grant_revoke_privileges_call(GrantRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_revoke_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); - grant_revoke_privileges_args args = new grant_revoke_privileges_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public GrantRevokePrivilegeResponse getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_grant_revoke_privileges(); - } - } - - public void set_ugi(String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - set_ugi_call method_call = new set_ugi_call(user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class set_ugi_call extends org.apache.thrift.async.TAsyncMethodCall { - private String user_name; - private List group_names; - public set_ugi_call(String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.user_name = user_name; - this.group_names = group_names; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_ugi", org.apache.thrift.protocol.TMessageType.CALL, 0)); - set_ugi_args args = new set_ugi_args(); - args.setUser_name(user_name); - args.setGroup_names(group_names); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_set_ugi(); - } - } - - public void get_delegation_token(String token_owner, String renewer_kerberos_principal_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_delegation_token_call method_call = new get_delegation_token_call(token_owner, renewer_kerberos_principal_name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_delegation_token_call extends org.apache.thrift.async.TAsyncMethodCall { - private String token_owner; - private String renewer_kerberos_principal_name; - public get_delegation_token_call(String token_owner, String renewer_kerberos_principal_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.token_owner = token_owner; - this.renewer_kerberos_principal_name = renewer_kerberos_principal_name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_delegation_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_delegation_token_args args = new get_delegation_token_args(); - args.setToken_owner(token_owner); - args.setRenewer_kerberos_principal_name(renewer_kerberos_principal_name); - args.write(prot); - prot.writeMessageEnd(); - } - - public String getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_delegation_token(); - } - } - - public void renew_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - renew_delegation_token_call method_call = new renew_delegation_token_call(token_str_form, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class renew_delegation_token_call extends org.apache.thrift.async.TAsyncMethodCall { - private String token_str_form; - public renew_delegation_token_call(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.token_str_form = token_str_form; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("renew_delegation_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); - renew_delegation_token_args args = new renew_delegation_token_args(); - args.setToken_str_form(token_str_form); - args.write(prot); - prot.writeMessageEnd(); - } - - public long getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_renew_delegation_token(); - } - } - - public void cancel_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - cancel_delegation_token_call method_call = new cancel_delegation_token_call(token_str_form, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class cancel_delegation_token_call extends org.apache.thrift.async.TAsyncMethodCall { - private String token_str_form; - public cancel_delegation_token_call(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.token_str_form = token_str_form; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancel_delegation_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); - cancel_delegation_token_args args = new cancel_delegation_token_args(); - args.setToken_str_form(token_str_form); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_cancel_delegation_token(); - } - } - - public void add_token(String token_identifier, String delegation_token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_token_call method_call = new add_token_call(token_identifier, delegation_token, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_token_call extends org.apache.thrift.async.TAsyncMethodCall { - private String token_identifier; - private String delegation_token; - public add_token_call(String token_identifier, String delegation_token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.token_identifier = token_identifier; - this.delegation_token = delegation_token; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_token_args args = new add_token_args(); - args.setToken_identifier(token_identifier); - args.setDelegation_token(delegation_token); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_add_token(); - } - } - - public void remove_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - remove_token_call method_call = new remove_token_call(token_identifier, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class remove_token_call extends org.apache.thrift.async.TAsyncMethodCall { - private String token_identifier; - public remove_token_call(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.token_identifier = token_identifier; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); - remove_token_args args = new remove_token_args(); - args.setToken_identifier(token_identifier); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_remove_token(); - } - } - - public void get_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_token_call method_call = new get_token_call(token_identifier, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_token_call extends org.apache.thrift.async.TAsyncMethodCall { - private String token_identifier; - public get_token_call(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.token_identifier = token_identifier; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_token_args args = new get_token_args(); - args.setToken_identifier(token_identifier); - args.write(prot); - prot.writeMessageEnd(); - } - - public String getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_token(); - } - } - - public void get_all_token_identifiers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_all_token_identifiers_call method_call = new get_all_token_identifiers_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_all_token_identifiers_call extends org.apache.thrift.async.TAsyncMethodCall { - public get_all_token_identifiers_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_token_identifiers", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_all_token_identifiers_args args = new get_all_token_identifiers_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_all_token_identifiers(); - } - } - - public void add_master_key(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_master_key_call method_call = new add_master_key_call(key, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_master_key_call extends org.apache.thrift.async.TAsyncMethodCall { - private String key; - public add_master_key_call(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.key = key; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_master_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_master_key_args args = new add_master_key_args(); - args.setKey(key); - args.write(prot); - prot.writeMessageEnd(); - } - - public int getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_add_master_key(); - } - } - - public void update_master_key(int seq_number, String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - update_master_key_call method_call = new update_master_key_call(seq_number, key, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class update_master_key_call extends org.apache.thrift.async.TAsyncMethodCall { - private int seq_number; - private String key; - public update_master_key_call(int seq_number, String key, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.seq_number = seq_number; - this.key = key; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_master_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); - update_master_key_args args = new update_master_key_args(); - args.setSeq_number(seq_number); - args.setKey(key); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_update_master_key(); - } - } - - public void remove_master_key(int key_seq, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - remove_master_key_call method_call = new remove_master_key_call(key_seq, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class remove_master_key_call extends org.apache.thrift.async.TAsyncMethodCall { - private int key_seq; - public remove_master_key_call(int key_seq, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.key_seq = key_seq; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_master_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); - remove_master_key_args args = new remove_master_key_args(); - args.setKey_seq(key_seq); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_remove_master_key(); - } - } - - public void get_master_keys(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_master_keys_call method_call = new get_master_keys_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_master_keys_call extends org.apache.thrift.async.TAsyncMethodCall { - public get_master_keys_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_master_keys", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_master_keys_args args = new get_master_keys_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public List getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_master_keys(); - } - } - - public void get_open_txns(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_open_txns_call method_call = new get_open_txns_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_open_txns_call extends org.apache.thrift.async.TAsyncMethodCall { - public get_open_txns_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_open_txns", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_open_txns_args args = new get_open_txns_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public GetOpenTxnsResponse getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_open_txns(); - } - } - - public void get_open_txns_info(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_open_txns_info_call method_call = new get_open_txns_info_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_open_txns_info_call extends org.apache.thrift.async.TAsyncMethodCall { - public get_open_txns_info_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_open_txns_info", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_open_txns_info_args args = new get_open_txns_info_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public GetOpenTxnsInfoResponse getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_open_txns_info(); - } - } - - public void open_txns(OpenTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - open_txns_call method_call = new open_txns_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class open_txns_call extends org.apache.thrift.async.TAsyncMethodCall { - private OpenTxnRequest rqst; - public open_txns_call(OpenTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("open_txns", org.apache.thrift.protocol.TMessageType.CALL, 0)); - open_txns_args args = new open_txns_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public OpenTxnsResponse getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_open_txns(); - } - } - - public void abort_txn(AbortTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - abort_txn_call method_call = new abort_txn_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class abort_txn_call extends org.apache.thrift.async.TAsyncMethodCall { - private AbortTxnRequest rqst; - public abort_txn_call(AbortTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("abort_txn", org.apache.thrift.protocol.TMessageType.CALL, 0)); - abort_txn_args args = new abort_txn_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchTxnException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_abort_txn(); - } - } - - public void abort_txns(AbortTxnsRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - abort_txns_call method_call = new abort_txns_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class abort_txns_call extends org.apache.thrift.async.TAsyncMethodCall { - private AbortTxnsRequest rqst; - public abort_txns_call(AbortTxnsRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("abort_txns", org.apache.thrift.protocol.TMessageType.CALL, 0)); - abort_txns_args args = new abort_txns_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchTxnException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_abort_txns(); - } - } - - public void commit_txn(CommitTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - commit_txn_call method_call = new commit_txn_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class commit_txn_call extends org.apache.thrift.async.TAsyncMethodCall { - private CommitTxnRequest rqst; - public commit_txn_call(CommitTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("commit_txn", org.apache.thrift.protocol.TMessageType.CALL, 0)); - commit_txn_args args = new commit_txn_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_commit_txn(); - } - } - - public void lock(LockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - lock_call method_call = new lock_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class lock_call extends org.apache.thrift.async.TAsyncMethodCall { - private LockRequest rqst; - public lock_call(LockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("lock", org.apache.thrift.protocol.TMessageType.CALL, 0)); - lock_args args = new lock_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public LockResponse getResult() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_lock(); - } - } - - public void check_lock(CheckLockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - check_lock_call method_call = new check_lock_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class check_lock_call extends org.apache.thrift.async.TAsyncMethodCall { - private CheckLockRequest rqst; - public check_lock_call(CheckLockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("check_lock", org.apache.thrift.protocol.TMessageType.CALL, 0)); - check_lock_args args = new check_lock_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public LockResponse getResult() throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_check_lock(); - } - } - - public void unlock(UnlockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - unlock_call method_call = new unlock_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class unlock_call extends org.apache.thrift.async.TAsyncMethodCall { - private UnlockRequest rqst; - public unlock_call(UnlockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unlock", org.apache.thrift.protocol.TMessageType.CALL, 0)); - unlock_args args = new unlock_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchLockException, TxnOpenException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_unlock(); - } - } - - public void show_locks(ShowLocksRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - show_locks_call method_call = new show_locks_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class show_locks_call extends org.apache.thrift.async.TAsyncMethodCall { - private ShowLocksRequest rqst; - public show_locks_call(ShowLocksRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("show_locks", org.apache.thrift.protocol.TMessageType.CALL, 0)); - show_locks_args args = new show_locks_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public ShowLocksResponse getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_show_locks(); - } - } - - public void heartbeat(HeartbeatRequest ids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - heartbeat_call method_call = new heartbeat_call(ids, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class heartbeat_call extends org.apache.thrift.async.TAsyncMethodCall { - private HeartbeatRequest ids; - public heartbeat_call(HeartbeatRequest ids, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.ids = ids; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("heartbeat", org.apache.thrift.protocol.TMessageType.CALL, 0)); - heartbeat_args args = new heartbeat_args(); - args.setIds(ids); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_heartbeat(); - } - } - - public void heartbeat_txn_range(HeartbeatTxnRangeRequest txns, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - heartbeat_txn_range_call method_call = new heartbeat_txn_range_call(txns, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class heartbeat_txn_range_call extends org.apache.thrift.async.TAsyncMethodCall { - private HeartbeatTxnRangeRequest txns; - public heartbeat_txn_range_call(HeartbeatTxnRangeRequest txns, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.txns = txns; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("heartbeat_txn_range", org.apache.thrift.protocol.TMessageType.CALL, 0)); - heartbeat_txn_range_args args = new heartbeat_txn_range_args(); - args.setTxns(txns); - args.write(prot); - prot.writeMessageEnd(); - } - - public HeartbeatTxnRangeResponse getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_heartbeat_txn_range(); - } - } - - public void compact(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - compact_call method_call = new compact_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class compact_call extends org.apache.thrift.async.TAsyncMethodCall { - private CompactionRequest rqst; - public compact_call(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("compact", org.apache.thrift.protocol.TMessageType.CALL, 0)); - compact_args args = new compact_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_compact(); - } - } - - public void compact2(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - compact2_call method_call = new compact2_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class compact2_call extends org.apache.thrift.async.TAsyncMethodCall { - private CompactionRequest rqst; - public compact2_call(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("compact2", org.apache.thrift.protocol.TMessageType.CALL, 0)); - compact2_args args = new compact2_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public CompactionResponse getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_compact2(); - } - } - - public void show_compact(ShowCompactRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - show_compact_call method_call = new show_compact_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class show_compact_call extends org.apache.thrift.async.TAsyncMethodCall { - private ShowCompactRequest rqst; - public show_compact_call(ShowCompactRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("show_compact", org.apache.thrift.protocol.TMessageType.CALL, 0)); - show_compact_args args = new show_compact_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public ShowCompactResponse getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_show_compact(); - } - } - - public void add_dynamic_partitions(AddDynamicPartitions rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - add_dynamic_partitions_call method_call = new add_dynamic_partitions_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class add_dynamic_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { - private AddDynamicPartitions rqst; - public add_dynamic_partitions_call(AddDynamicPartitions rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_dynamic_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); - add_dynamic_partitions_args args = new add_dynamic_partitions_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_add_dynamic_partitions(); - } - } - - public void get_next_notification(NotificationEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_next_notification_call method_call = new get_next_notification_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_next_notification_call extends org.apache.thrift.async.TAsyncMethodCall { - private NotificationEventRequest rqst; - public get_next_notification_call(NotificationEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_next_notification", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_next_notification_args args = new get_next_notification_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public NotificationEventResponse getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_next_notification(); - } - } - - public void get_current_notificationEventId(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_current_notificationEventId_call method_call = new get_current_notificationEventId_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_current_notificationEventId_call extends org.apache.thrift.async.TAsyncMethodCall { - public get_current_notificationEventId_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_current_notificationEventId", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_current_notificationEventId_args args = new get_current_notificationEventId_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public CurrentNotificationEventId getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_current_notificationEventId(); - } - } - - public void fire_listener_event(FireEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - fire_listener_event_call method_call = new fire_listener_event_call(rqst, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class fire_listener_event_call extends org.apache.thrift.async.TAsyncMethodCall { - private FireEventRequest rqst; - public fire_listener_event_call(FireEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.rqst = rqst; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fire_listener_event", org.apache.thrift.protocol.TMessageType.CALL, 0)); - fire_listener_event_args args = new fire_listener_event_args(); - args.setRqst(rqst); - args.write(prot); - prot.writeMessageEnd(); - } - - public FireEventResponse getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_fire_listener_event(); - } - } - - public void flushCache(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - flushCache_call method_call = new flushCache_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class flushCache_call extends org.apache.thrift.async.TAsyncMethodCall { - public flushCache_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("flushCache", org.apache.thrift.protocol.TMessageType.CALL, 0)); - flushCache_args args = new flushCache_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_flushCache(); - } - } - - public void cm_recycle(CmRecycleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - cm_recycle_call method_call = new cm_recycle_call(request, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class cm_recycle_call extends org.apache.thrift.async.TAsyncMethodCall { - private CmRecycleRequest request; - public cm_recycle_call(CmRecycleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.request = request; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cm_recycle", org.apache.thrift.protocol.TMessageType.CALL, 0)); - cm_recycle_args args = new cm_recycle_args(); - args.setRequest(request); - args.write(prot); - prot.writeMessageEnd(); - } - - public CmRecycleResponse getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_cm_recycle(); - } - } - - public void get_file_metadata_by_expr(GetFileMetadataByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_file_metadata_by_expr_call method_call = new get_file_metadata_by_expr_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_file_metadata_by_expr_call extends org.apache.thrift.async.TAsyncMethodCall { - private GetFileMetadataByExprRequest req; - public get_file_metadata_by_expr_call(GetFileMetadataByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_file_metadata_by_expr", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_file_metadata_by_expr_args args = new get_file_metadata_by_expr_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public GetFileMetadataByExprResult getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_file_metadata_by_expr(); - } - } - - public void get_file_metadata(GetFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_file_metadata_call method_call = new get_file_metadata_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_file_metadata_call extends org.apache.thrift.async.TAsyncMethodCall { - private GetFileMetadataRequest req; - public get_file_metadata_call(GetFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_file_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_file_metadata_args args = new get_file_metadata_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public GetFileMetadataResult getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_file_metadata(); - } - } - - public void put_file_metadata(PutFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - put_file_metadata_call method_call = new put_file_metadata_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class put_file_metadata_call extends org.apache.thrift.async.TAsyncMethodCall { - private PutFileMetadataRequest req; - public put_file_metadata_call(PutFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("put_file_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); - put_file_metadata_args args = new put_file_metadata_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public PutFileMetadataResult getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_put_file_metadata(); - } - } - - public void clear_file_metadata(ClearFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - clear_file_metadata_call method_call = new clear_file_metadata_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class clear_file_metadata_call extends org.apache.thrift.async.TAsyncMethodCall { - private ClearFileMetadataRequest req; - public clear_file_metadata_call(ClearFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("clear_file_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); - clear_file_metadata_args args = new clear_file_metadata_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public ClearFileMetadataResult getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_clear_file_metadata(); - } - } - - public void cache_file_metadata(CacheFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - cache_file_metadata_call method_call = new cache_file_metadata_call(req, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class cache_file_metadata_call extends org.apache.thrift.async.TAsyncMethodCall { - private CacheFileMetadataRequest req; - public cache_file_metadata_call(CacheFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.req = req; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cache_file_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); - cache_file_metadata_args args = new cache_file_metadata_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public CacheFileMetadataResult getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_cache_file_metadata(); - } - } - - public void get_metastore_db_uuid(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - get_metastore_db_uuid_call method_call = new get_metastore_db_uuid_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class get_metastore_db_uuid_call extends org.apache.thrift.async.TAsyncMethodCall { - public get_metastore_db_uuid_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_metastore_db_uuid", org.apache.thrift.protocol.TMessageType.CALL, 0)); - get_metastore_db_uuid_args args = new get_metastore_db_uuid_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public String getResult() throws MetaException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_metastore_db_uuid(); - } - } - - } - - 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>())); - } - - protected Processor(I iface, Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static Map> getProcessMap(Map> processMap) { - processMap.put("getMetaConf", new getMetaConf()); - processMap.put("setMetaConf", new setMetaConf()); - processMap.put("create_database", new create_database()); - processMap.put("get_database", new get_database()); - processMap.put("drop_database", new drop_database()); - processMap.put("get_databases", new get_databases()); - processMap.put("get_all_databases", new get_all_databases()); - processMap.put("alter_database", new alter_database()); - processMap.put("get_type", new get_type()); - processMap.put("create_type", new create_type()); - processMap.put("drop_type", new drop_type()); - processMap.put("get_type_all", new get_type_all()); - processMap.put("get_fields", new get_fields()); - processMap.put("get_fields_with_environment_context", new get_fields_with_environment_context()); - processMap.put("get_schema", new get_schema()); - processMap.put("get_schema_with_environment_context", new get_schema_with_environment_context()); - processMap.put("create_table", new create_table()); - processMap.put("create_table_with_environment_context", new create_table_with_environment_context()); - processMap.put("create_table_with_constraints", new create_table_with_constraints()); - processMap.put("drop_constraint", new drop_constraint()); - processMap.put("add_primary_key", new add_primary_key()); - processMap.put("add_foreign_key", new add_foreign_key()); - processMap.put("add_unique_constraint", new add_unique_constraint()); - processMap.put("add_not_null_constraint", new add_not_null_constraint()); - processMap.put("drop_table", new drop_table()); - processMap.put("drop_table_with_environment_context", new drop_table_with_environment_context()); - processMap.put("truncate_table", new truncate_table()); - processMap.put("get_tables", new get_tables()); - processMap.put("get_tables_by_type", new get_tables_by_type()); - processMap.put("get_table_meta", new get_table_meta()); - processMap.put("get_all_tables", new get_all_tables()); - processMap.put("get_table", new get_table()); - processMap.put("get_table_objects_by_name", new get_table_objects_by_name()); - processMap.put("get_table_req", new get_table_req()); - processMap.put("get_table_objects_by_name_req", new get_table_objects_by_name_req()); - processMap.put("get_table_names_by_filter", new get_table_names_by_filter()); - processMap.put("alter_table", new alter_table()); - processMap.put("alter_table_with_environment_context", new alter_table_with_environment_context()); - processMap.put("alter_table_with_cascade", new alter_table_with_cascade()); - processMap.put("add_partition", new add_partition()); - processMap.put("add_partition_with_environment_context", new add_partition_with_environment_context()); - processMap.put("add_partitions", new add_partitions()); - processMap.put("add_partitions_pspec", new add_partitions_pspec()); - processMap.put("append_partition", new append_partition()); - processMap.put("add_partitions_req", new add_partitions_req()); - processMap.put("append_partition_with_environment_context", new append_partition_with_environment_context()); - processMap.put("append_partition_by_name", new append_partition_by_name()); - processMap.put("append_partition_by_name_with_environment_context", new append_partition_by_name_with_environment_context()); - processMap.put("drop_partition", new drop_partition()); - processMap.put("drop_partition_with_environment_context", new drop_partition_with_environment_context()); - processMap.put("drop_partition_by_name", new drop_partition_by_name()); - processMap.put("drop_partition_by_name_with_environment_context", new drop_partition_by_name_with_environment_context()); - processMap.put("drop_partitions_req", new drop_partitions_req()); - processMap.put("get_partition", new get_partition()); - processMap.put("exchange_partition", new exchange_partition()); - processMap.put("exchange_partitions", new exchange_partitions()); - processMap.put("get_partition_with_auth", new get_partition_with_auth()); - processMap.put("get_partition_by_name", new get_partition_by_name()); - processMap.put("get_partitions", new get_partitions()); - processMap.put("get_partitions_with_auth", new get_partitions_with_auth()); - processMap.put("get_partitions_pspec", new get_partitions_pspec()); - processMap.put("get_partition_names", new get_partition_names()); - processMap.put("get_partitions_ps", new get_partitions_ps()); - processMap.put("get_partitions_ps_with_auth", new get_partitions_ps_with_auth()); - processMap.put("get_partition_names_ps", new get_partition_names_ps()); - processMap.put("get_partitions_by_filter", new get_partitions_by_filter()); - processMap.put("get_part_specs_by_filter", new get_part_specs_by_filter()); - processMap.put("get_partitions_by_expr", new get_partitions_by_expr()); - processMap.put("get_num_partitions_by_filter", new get_num_partitions_by_filter()); - processMap.put("get_partitions_by_names", new get_partitions_by_names()); - processMap.put("alter_partition", new alter_partition()); - processMap.put("alter_partitions", new alter_partitions()); - processMap.put("alter_partitions_with_environment_context", new alter_partitions_with_environment_context()); - processMap.put("alter_partition_with_environment_context", new alter_partition_with_environment_context()); - processMap.put("rename_partition", new rename_partition()); - processMap.put("partition_name_has_valid_characters", new partition_name_has_valid_characters()); - processMap.put("get_config_value", new get_config_value()); - processMap.put("partition_name_to_vals", new partition_name_to_vals()); - processMap.put("partition_name_to_spec", new partition_name_to_spec()); - processMap.put("markPartitionForEvent", new markPartitionForEvent()); - processMap.put("isPartitionMarkedForEvent", new isPartitionMarkedForEvent()); - processMap.put("add_index", new add_index()); - processMap.put("alter_index", new alter_index()); - processMap.put("drop_index_by_name", new drop_index_by_name()); - processMap.put("get_index_by_name", new get_index_by_name()); - processMap.put("get_indexes", new get_indexes()); - processMap.put("get_index_names", new get_index_names()); - processMap.put("get_primary_keys", new get_primary_keys()); - processMap.put("get_foreign_keys", new get_foreign_keys()); - processMap.put("get_unique_constraints", new get_unique_constraints()); - processMap.put("get_not_null_constraints", new get_not_null_constraints()); - processMap.put("update_table_column_statistics", new update_table_column_statistics()); - processMap.put("update_partition_column_statistics", new update_partition_column_statistics()); - processMap.put("get_table_column_statistics", new get_table_column_statistics()); - processMap.put("get_partition_column_statistics", new get_partition_column_statistics()); - processMap.put("get_table_statistics_req", new get_table_statistics_req()); - processMap.put("get_partitions_statistics_req", new get_partitions_statistics_req()); - processMap.put("get_aggr_stats_for", new get_aggr_stats_for()); - processMap.put("set_aggr_stats_for", new set_aggr_stats_for()); - processMap.put("delete_partition_column_statistics", new delete_partition_column_statistics()); - processMap.put("delete_table_column_statistics", new delete_table_column_statistics()); - processMap.put("create_function", new create_function()); - processMap.put("drop_function", new drop_function()); - processMap.put("alter_function", new alter_function()); - processMap.put("get_functions", new get_functions()); - processMap.put("get_function", new get_function()); - processMap.put("get_all_functions", new get_all_functions()); - processMap.put("create_role", new create_role()); - processMap.put("drop_role", new drop_role()); - processMap.put("get_role_names", new get_role_names()); - processMap.put("grant_role", new grant_role()); - processMap.put("revoke_role", new revoke_role()); - processMap.put("list_roles", new list_roles()); - processMap.put("grant_revoke_role", new grant_revoke_role()); - processMap.put("get_principals_in_role", new get_principals_in_role()); - processMap.put("get_role_grants_for_principal", new get_role_grants_for_principal()); - processMap.put("get_privilege_set", new get_privilege_set()); - processMap.put("list_privileges", new list_privileges()); - processMap.put("grant_privileges", new grant_privileges()); - processMap.put("revoke_privileges", new revoke_privileges()); - processMap.put("grant_revoke_privileges", new grant_revoke_privileges()); - processMap.put("set_ugi", new set_ugi()); - processMap.put("get_delegation_token", new get_delegation_token()); - processMap.put("renew_delegation_token", new renew_delegation_token()); - processMap.put("cancel_delegation_token", new cancel_delegation_token()); - processMap.put("add_token", new add_token()); - processMap.put("remove_token", new remove_token()); - processMap.put("get_token", new get_token()); - processMap.put("get_all_token_identifiers", new get_all_token_identifiers()); - processMap.put("add_master_key", new add_master_key()); - processMap.put("update_master_key", new update_master_key()); - processMap.put("remove_master_key", new remove_master_key()); - processMap.put("get_master_keys", new get_master_keys()); - processMap.put("get_open_txns", new get_open_txns()); - processMap.put("get_open_txns_info", new get_open_txns_info()); - processMap.put("open_txns", new open_txns()); - processMap.put("abort_txn", new abort_txn()); - processMap.put("abort_txns", new abort_txns()); - processMap.put("commit_txn", new commit_txn()); - processMap.put("lock", new lock()); - processMap.put("check_lock", new check_lock()); - processMap.put("unlock", new unlock()); - processMap.put("show_locks", new show_locks()); - processMap.put("heartbeat", new heartbeat()); - processMap.put("heartbeat_txn_range", new heartbeat_txn_range()); - processMap.put("compact", new compact()); - processMap.put("compact2", new compact2()); - processMap.put("show_compact", new show_compact()); - processMap.put("add_dynamic_partitions", new add_dynamic_partitions()); - processMap.put("get_next_notification", new get_next_notification()); - processMap.put("get_current_notificationEventId", new get_current_notificationEventId()); - processMap.put("fire_listener_event", new fire_listener_event()); - processMap.put("flushCache", new flushCache()); - processMap.put("cm_recycle", new cm_recycle()); - processMap.put("get_file_metadata_by_expr", new get_file_metadata_by_expr()); - processMap.put("get_file_metadata", new get_file_metadata()); - processMap.put("put_file_metadata", new put_file_metadata()); - processMap.put("clear_file_metadata", new clear_file_metadata()); - processMap.put("cache_file_metadata", new cache_file_metadata()); - processMap.put("get_metastore_db_uuid", new get_metastore_db_uuid()); - return processMap; - } - - public static class getMetaConf extends org.apache.thrift.ProcessFunction { - public getMetaConf() { - super("getMetaConf"); - } - - public getMetaConf_args getEmptyArgsInstance() { - return new getMetaConf_args(); - } - - protected boolean isOneway() { - return false; - } - - public getMetaConf_result getResult(I iface, getMetaConf_args args) throws org.apache.thrift.TException { - getMetaConf_result result = new getMetaConf_result(); - try { - result.success = iface.getMetaConf(args.key); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class setMetaConf extends org.apache.thrift.ProcessFunction { - public setMetaConf() { - super("setMetaConf"); - } - - public setMetaConf_args getEmptyArgsInstance() { - return new setMetaConf_args(); - } - - protected boolean isOneway() { - return false; - } - - public setMetaConf_result getResult(I iface, setMetaConf_args args) throws org.apache.thrift.TException { - setMetaConf_result result = new setMetaConf_result(); - try { - iface.setMetaConf(args.key, args.value); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class create_database extends org.apache.thrift.ProcessFunction { - public create_database() { - super("create_database"); - } - - public create_database_args getEmptyArgsInstance() { - return new create_database_args(); - } - - 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); - } catch (AlreadyExistsException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class get_database extends org.apache.thrift.ProcessFunction { - public get_database() { - super("get_database"); - } - - public get_database_args getEmptyArgsInstance() { - return new get_database_args(); - } - - 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); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class drop_database extends org.apache.thrift.ProcessFunction { - public drop_database() { - super("drop_database"); - } - - public drop_database_args getEmptyArgsInstance() { - return new drop_database_args(); - } - - 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); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (InvalidOperationException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class get_databases extends org.apache.thrift.ProcessFunction { - public get_databases() { - super("get_databases"); - } - - public get_databases_args getEmptyArgsInstance() { - return new get_databases_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_all_databases extends org.apache.thrift.ProcessFunction { - public get_all_databases() { - super("get_all_databases"); - } - - public get_all_databases_args getEmptyArgsInstance() { - return new get_all_databases_args(); - } - - 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(); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class alter_database extends org.apache.thrift.ProcessFunction { - public alter_database() { - super("alter_database"); - } - - public alter_database_args getEmptyArgsInstance() { - return new alter_database_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_type extends org.apache.thrift.ProcessFunction { - public get_type() { - super("get_type"); - } - - public get_type_args getEmptyArgsInstance() { - return new get_type_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class create_type extends org.apache.thrift.ProcessFunction { - public create_type() { - super("create_type"); - } - - public create_type_args getEmptyArgsInstance() { - return new create_type_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (AlreadyExistsException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class drop_type extends org.apache.thrift.ProcessFunction { - public drop_type() { - super("drop_type"); - } - - public drop_type_args getEmptyArgsInstance() { - return new drop_type_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_type_all extends org.apache.thrift.ProcessFunction { - public get_type_all() { - super("get_type_all"); - } - - public get_type_all_args getEmptyArgsInstance() { - return new get_type_all_args(); - } - - 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); - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_fields extends org.apache.thrift.ProcessFunction { - public get_fields() { - super("get_fields"); - } - - public get_fields_args getEmptyArgsInstance() { - return new get_fields_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (UnknownTableException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class get_fields_with_environment_context extends org.apache.thrift.ProcessFunction { - public get_fields_with_environment_context() { - super("get_fields_with_environment_context"); - } - - public get_fields_with_environment_context_args getEmptyArgsInstance() { - return new get_fields_with_environment_context_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_fields_with_environment_context_result getResult(I iface, get_fields_with_environment_context_args args) throws org.apache.thrift.TException { - get_fields_with_environment_context_result result = new get_fields_with_environment_context_result(); - try { - result.success = iface.get_fields_with_environment_context(args.db_name, args.table_name, args.environment_context); - } catch (MetaException o1) { - result.o1 = o1; - } catch (UnknownTableException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class get_schema extends org.apache.thrift.ProcessFunction { - public get_schema() { - super("get_schema"); - } - - public get_schema_args getEmptyArgsInstance() { - return new get_schema_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (UnknownTableException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class get_schema_with_environment_context extends org.apache.thrift.ProcessFunction { - public get_schema_with_environment_context() { - super("get_schema_with_environment_context"); - } - - public get_schema_with_environment_context_args getEmptyArgsInstance() { - return new get_schema_with_environment_context_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_schema_with_environment_context_result getResult(I iface, get_schema_with_environment_context_args args) throws org.apache.thrift.TException { - get_schema_with_environment_context_result result = new get_schema_with_environment_context_result(); - try { - result.success = iface.get_schema_with_environment_context(args.db_name, args.table_name, args.environment_context); - } catch (MetaException o1) { - result.o1 = o1; - } catch (UnknownTableException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class create_table extends org.apache.thrift.ProcessFunction { - public create_table() { - super("create_table"); - } - - public create_table_args getEmptyArgsInstance() { - return new create_table_args(); - } - - 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); - } catch (AlreadyExistsException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (NoSuchObjectException o4) { - result.o4 = o4; - } - return result; - } - } - - 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"); - } - - public create_table_with_environment_context_args getEmptyArgsInstance() { - return new create_table_with_environment_context_args(); - } - - 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); - } catch (AlreadyExistsException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (NoSuchObjectException o4) { - result.o4 = o4; - } - return result; - } - } - - public static class create_table_with_constraints extends org.apache.thrift.ProcessFunction { - public create_table_with_constraints() { - super("create_table_with_constraints"); - } - - public create_table_with_constraints_args getEmptyArgsInstance() { - return new create_table_with_constraints_args(); - } - - protected boolean isOneway() { - return false; - } - - public create_table_with_constraints_result getResult(I iface, create_table_with_constraints_args args) throws org.apache.thrift.TException { - create_table_with_constraints_result result = new create_table_with_constraints_result(); - try { - iface.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys, args.uniqueConstraints, args.notNullConstraints); - } catch (AlreadyExistsException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (NoSuchObjectException o4) { - result.o4 = o4; - } - return result; - } - } - - public static class drop_constraint extends org.apache.thrift.ProcessFunction { - public drop_constraint() { - super("drop_constraint"); - } - - public drop_constraint_args getEmptyArgsInstance() { - return new drop_constraint_args(); - } - - protected boolean isOneway() { - return false; - } - - public drop_constraint_result getResult(I iface, drop_constraint_args args) throws org.apache.thrift.TException { - drop_constraint_result result = new drop_constraint_result(); - try { - iface.drop_constraint(args.req); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class add_primary_key extends org.apache.thrift.ProcessFunction { - public add_primary_key() { - super("add_primary_key"); - } - - public add_primary_key_args getEmptyArgsInstance() { - return new add_primary_key_args(); - } - - protected boolean isOneway() { - return false; - } - - public add_primary_key_result getResult(I iface, add_primary_key_args args) throws org.apache.thrift.TException { - add_primary_key_result result = new add_primary_key_result(); - try { - iface.add_primary_key(args.req); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class add_foreign_key extends org.apache.thrift.ProcessFunction { - public add_foreign_key() { - super("add_foreign_key"); - } - - public add_foreign_key_args getEmptyArgsInstance() { - return new add_foreign_key_args(); - } - - protected boolean isOneway() { - return false; - } - - public add_foreign_key_result getResult(I iface, add_foreign_key_args args) throws org.apache.thrift.TException { - add_foreign_key_result result = new add_foreign_key_result(); - try { - iface.add_foreign_key(args.req); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class add_unique_constraint extends org.apache.thrift.ProcessFunction { - public add_unique_constraint() { - super("add_unique_constraint"); - } - - public add_unique_constraint_args getEmptyArgsInstance() { - return new add_unique_constraint_args(); - } - - protected boolean isOneway() { - return false; - } - - public add_unique_constraint_result getResult(I iface, add_unique_constraint_args args) throws org.apache.thrift.TException { - add_unique_constraint_result result = new add_unique_constraint_result(); - try { - iface.add_unique_constraint(args.req); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class add_not_null_constraint extends org.apache.thrift.ProcessFunction { - public add_not_null_constraint() { - super("add_not_null_constraint"); - } - - public add_not_null_constraint_args getEmptyArgsInstance() { - return new add_not_null_constraint_args(); - } - - protected boolean isOneway() { - return false; - } - - public add_not_null_constraint_result getResult(I iface, add_not_null_constraint_args args) throws org.apache.thrift.TException { - add_not_null_constraint_result result = new add_not_null_constraint_result(); - try { - iface.add_not_null_constraint(args.req); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class drop_table extends org.apache.thrift.ProcessFunction { - public drop_table() { - super("drop_table"); - } - - public drop_table_args getEmptyArgsInstance() { - return new drop_table_args(); - } - - 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); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class drop_table_with_environment_context extends org.apache.thrift.ProcessFunction { - public drop_table_with_environment_context() { - super("drop_table_with_environment_context"); - } - - public drop_table_with_environment_context_args getEmptyArgsInstance() { - return new drop_table_with_environment_context_args(); - } - - protected boolean isOneway() { - return false; - } - - public drop_table_with_environment_context_result getResult(I iface, drop_table_with_environment_context_args args) throws org.apache.thrift.TException { - drop_table_with_environment_context_result result = new drop_table_with_environment_context_result(); - try { - iface.drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class truncate_table extends org.apache.thrift.ProcessFunction { - public truncate_table() { - super("truncate_table"); - } - - public truncate_table_args getEmptyArgsInstance() { - return new truncate_table_args(); - } - - protected boolean isOneway() { - return false; - } - - public truncate_table_result getResult(I iface, truncate_table_args args) throws org.apache.thrift.TException { - truncate_table_result result = new truncate_table_result(); - try { - iface.truncate_table(args.dbName, args.tableName, args.partNames); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_tables extends org.apache.thrift.ProcessFunction { - public get_tables() { - super("get_tables"); - } - - public get_tables_args getEmptyArgsInstance() { - return new get_tables_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_tables_by_type extends org.apache.thrift.ProcessFunction { - public get_tables_by_type() { - super("get_tables_by_type"); - } - - public get_tables_by_type_args getEmptyArgsInstance() { - return new get_tables_by_type_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_tables_by_type_result getResult(I iface, get_tables_by_type_args args) throws org.apache.thrift.TException { - get_tables_by_type_result result = new get_tables_by_type_result(); - try { - result.success = iface.get_tables_by_type(args.db_name, args.pattern, args.tableType); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_table_meta extends org.apache.thrift.ProcessFunction { - public get_table_meta() { - super("get_table_meta"); - } - - public get_table_meta_args getEmptyArgsInstance() { - return new get_table_meta_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_table_meta_result getResult(I iface, get_table_meta_args args) throws org.apache.thrift.TException { - get_table_meta_result result = new get_table_meta_result(); - try { - result.success = iface.get_table_meta(args.db_patterns, args.tbl_patterns, args.tbl_types); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_all_tables extends org.apache.thrift.ProcessFunction { - public get_all_tables() { - super("get_all_tables"); - } - - public get_all_tables_args getEmptyArgsInstance() { - return new get_all_tables_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_table extends org.apache.thrift.ProcessFunction { - public get_table() { - super("get_table"); - } - - public get_table_args getEmptyArgsInstance() { - return new get_table_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - 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"); - } - - public get_table_objects_by_name_args getEmptyArgsInstance() { - return new get_table_objects_by_name_args(); - } - - 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(); - result.success = iface.get_table_objects_by_name(args.dbname, args.tbl_names); - return result; - } - } - - public static class get_table_req extends org.apache.thrift.ProcessFunction { - public get_table_req() { - super("get_table_req"); - } - - public get_table_req_args getEmptyArgsInstance() { - return new get_table_req_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_table_req_result getResult(I iface, get_table_req_args args) throws org.apache.thrift.TException { - get_table_req_result result = new get_table_req_result(); - try { - result.success = iface.get_table_req(args.req); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_table_objects_by_name_req extends org.apache.thrift.ProcessFunction { - public get_table_objects_by_name_req() { - super("get_table_objects_by_name_req"); - } - - public get_table_objects_by_name_req_args getEmptyArgsInstance() { - return new get_table_objects_by_name_req_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_table_objects_by_name_req_result getResult(I iface, get_table_objects_by_name_req_args args) throws org.apache.thrift.TException { - get_table_objects_by_name_req_result result = new get_table_objects_by_name_req_result(); - try { - result.success = iface.get_table_objects_by_name_req(args.req); - } catch (MetaException o1) { - result.o1 = o1; - } catch (InvalidOperationException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } - return result; - } - } - - 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"); - } - - public get_table_names_by_filter_args getEmptyArgsInstance() { - return new get_table_names_by_filter_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (InvalidOperationException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class alter_table extends org.apache.thrift.ProcessFunction { - public alter_table() { - super("alter_table"); - } - - public alter_table_args getEmptyArgsInstance() { - return new alter_table_args(); - } - - 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); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - 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"); - } - - public alter_table_with_environment_context_args getEmptyArgsInstance() { - return new alter_table_with_environment_context_args(); - } - - 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); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class alter_table_with_cascade extends org.apache.thrift.ProcessFunction { - public alter_table_with_cascade() { - super("alter_table_with_cascade"); - } - - public alter_table_with_cascade_args getEmptyArgsInstance() { - return new alter_table_with_cascade_args(); - } - - protected boolean isOneway() { - return false; - } - - public alter_table_with_cascade_result getResult(I iface, alter_table_with_cascade_args args) throws org.apache.thrift.TException { - alter_table_with_cascade_result result = new alter_table_with_cascade_result(); - try { - iface.alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class add_partition extends org.apache.thrift.ProcessFunction { - public add_partition() { - super("add_partition"); - } - - public add_partition_args getEmptyArgsInstance() { - return new add_partition_args(); - } - - 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); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - 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"); - } - - public add_partition_with_environment_context_args getEmptyArgsInstance() { - return new add_partition_with_environment_context_args(); - } - - 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); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class add_partitions extends org.apache.thrift.ProcessFunction { - public add_partitions() { - super("add_partitions"); - } - - public add_partitions_args getEmptyArgsInstance() { - return new add_partitions_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class add_partitions_pspec extends org.apache.thrift.ProcessFunction { - public add_partitions_pspec() { - super("add_partitions_pspec"); - } - - public add_partitions_pspec_args getEmptyArgsInstance() { - return new add_partitions_pspec_args(); - } - - protected boolean isOneway() { - return false; - } - - public add_partitions_pspec_result getResult(I iface, add_partitions_pspec_args args) throws org.apache.thrift.TException { - add_partitions_pspec_result result = new add_partitions_pspec_result(); - try { - result.success = iface.add_partitions_pspec(args.new_parts); - result.setSuccessIsSet(true); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class append_partition extends org.apache.thrift.ProcessFunction { - public append_partition() { - super("append_partition"); - } - - public append_partition_args getEmptyArgsInstance() { - return new append_partition_args(); - } - - 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); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class add_partitions_req extends org.apache.thrift.ProcessFunction { - public add_partitions_req() { - super("add_partitions_req"); - } - - public add_partitions_req_args getEmptyArgsInstance() { - return new add_partitions_req_args(); - } - - protected boolean isOneway() { - return false; - } - - public add_partitions_req_result getResult(I iface, add_partitions_req_args args) throws org.apache.thrift.TException { - add_partitions_req_result result = new add_partitions_req_result(); - try { - result.success = iface.add_partitions_req(args.request); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class append_partition_with_environment_context extends org.apache.thrift.ProcessFunction { - public append_partition_with_environment_context() { - super("append_partition_with_environment_context"); - } - - public append_partition_with_environment_context_args getEmptyArgsInstance() { - return new append_partition_with_environment_context_args(); - } - - protected boolean isOneway() { - return false; - } - - public append_partition_with_environment_context_result getResult(I iface, append_partition_with_environment_context_args args) throws org.apache.thrift.TException { - append_partition_with_environment_context_result result = new append_partition_with_environment_context_result(); - try { - result.success = iface.append_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.environment_context); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class append_partition_by_name extends org.apache.thrift.ProcessFunction { - public append_partition_by_name() { - super("append_partition_by_name"); - } - - public append_partition_by_name_args getEmptyArgsInstance() { - return new append_partition_by_name_args(); - } - - 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); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class append_partition_by_name_with_environment_context extends org.apache.thrift.ProcessFunction { - public append_partition_by_name_with_environment_context() { - super("append_partition_by_name_with_environment_context"); - } - - public append_partition_by_name_with_environment_context_args getEmptyArgsInstance() { - return new append_partition_by_name_with_environment_context_args(); - } - - protected boolean isOneway() { - return false; - } - - public append_partition_by_name_with_environment_context_result getResult(I iface, append_partition_by_name_with_environment_context_args args) throws org.apache.thrift.TException { - append_partition_by_name_with_environment_context_result result = new append_partition_by_name_with_environment_context_result(); - try { - result.success = iface.append_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.environment_context); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class drop_partition extends org.apache.thrift.ProcessFunction { - public drop_partition() { - super("drop_partition"); - } - - public drop_partition_args getEmptyArgsInstance() { - return new drop_partition_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class drop_partition_with_environment_context extends org.apache.thrift.ProcessFunction { - public drop_partition_with_environment_context() { - super("drop_partition_with_environment_context"); - } - - public drop_partition_with_environment_context_args getEmptyArgsInstance() { - return new drop_partition_with_environment_context_args(); - } - - protected boolean isOneway() { - return false; - } - - public drop_partition_with_environment_context_result getResult(I iface, drop_partition_with_environment_context_args args) throws org.apache.thrift.TException { - drop_partition_with_environment_context_result result = new drop_partition_with_environment_context_result(); - try { - result.success = iface.drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class drop_partition_by_name extends org.apache.thrift.ProcessFunction { - public drop_partition_by_name() { - super("drop_partition_by_name"); - } - - public drop_partition_by_name_args getEmptyArgsInstance() { - return new drop_partition_by_name_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class drop_partition_by_name_with_environment_context extends org.apache.thrift.ProcessFunction { - public drop_partition_by_name_with_environment_context() { - super("drop_partition_by_name_with_environment_context"); - } - - public drop_partition_by_name_with_environment_context_args getEmptyArgsInstance() { - return new drop_partition_by_name_with_environment_context_args(); - } - - protected boolean isOneway() { - return false; - } - - public drop_partition_by_name_with_environment_context_result getResult(I iface, drop_partition_by_name_with_environment_context_args args) throws org.apache.thrift.TException { - drop_partition_by_name_with_environment_context_result result = new drop_partition_by_name_with_environment_context_result(); - try { - result.success = iface.drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class drop_partitions_req extends org.apache.thrift.ProcessFunction { - public drop_partitions_req() { - super("drop_partitions_req"); - } - - public drop_partitions_req_args getEmptyArgsInstance() { - return new drop_partitions_req_args(); - } - - protected boolean isOneway() { - return false; - } - - public drop_partitions_req_result getResult(I iface, drop_partitions_req_args args) throws org.apache.thrift.TException { - drop_partitions_req_result result = new drop_partitions_req_result(); - try { - result.success = iface.drop_partitions_req(args.req); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_partition extends org.apache.thrift.ProcessFunction { - public get_partition() { - super("get_partition"); - } - - public get_partition_args getEmptyArgsInstance() { - return new get_partition_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class exchange_partition extends org.apache.thrift.ProcessFunction { - public exchange_partition() { - super("exchange_partition"); - } - - public exchange_partition_args getEmptyArgsInstance() { - return new exchange_partition_args(); - } - - protected boolean isOneway() { - return false; - } - - public exchange_partition_result getResult(I iface, exchange_partition_args args) throws org.apache.thrift.TException { - exchange_partition_result result = new exchange_partition_result(); - try { - result.success = iface.exchange_partition(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (InvalidObjectException o3) { - result.o3 = o3; - } catch (InvalidInputException o4) { - result.o4 = o4; - } - return result; - } - } - - public static class exchange_partitions extends org.apache.thrift.ProcessFunction { - public exchange_partitions() { - super("exchange_partitions"); - } - - public exchange_partitions_args getEmptyArgsInstance() { - return new exchange_partitions_args(); - } - - protected boolean isOneway() { - return false; - } - - public exchange_partitions_result getResult(I iface, exchange_partitions_args args) throws org.apache.thrift.TException { - exchange_partitions_result result = new exchange_partitions_result(); - try { - result.success = iface.exchange_partitions(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (InvalidObjectException o3) { - result.o3 = o3; - } catch (InvalidInputException o4) { - result.o4 = o4; - } - return result; - } - } - - public static class get_partition_with_auth extends org.apache.thrift.ProcessFunction { - public get_partition_with_auth() { - super("get_partition_with_auth"); - } - - public get_partition_with_auth_args getEmptyArgsInstance() { - return new get_partition_with_auth_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_partition_by_name extends org.apache.thrift.ProcessFunction { - public get_partition_by_name() { - super("get_partition_by_name"); - } - - public get_partition_by_name_args getEmptyArgsInstance() { - return new get_partition_by_name_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_partitions extends org.apache.thrift.ProcessFunction { - public get_partitions() { - super("get_partitions"); - } - - public get_partitions_args getEmptyArgsInstance() { - return new get_partitions_args(); - } - - 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); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_partitions_with_auth extends org.apache.thrift.ProcessFunction { - public get_partitions_with_auth() { - super("get_partitions_with_auth"); - } - - public get_partitions_with_auth_args getEmptyArgsInstance() { - return new get_partitions_with_auth_args(); - } - - 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); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_partitions_pspec extends org.apache.thrift.ProcessFunction { - public get_partitions_pspec() { - super("get_partitions_pspec"); - } - - public get_partitions_pspec_args getEmptyArgsInstance() { - return new get_partitions_pspec_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_partitions_pspec_result getResult(I iface, get_partitions_pspec_args args) throws org.apache.thrift.TException { - get_partitions_pspec_result result = new get_partitions_pspec_result(); - try { - result.success = iface.get_partitions_pspec(args.db_name, args.tbl_name, args.max_parts); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_partition_names extends org.apache.thrift.ProcessFunction { - public get_partition_names() { - super("get_partition_names"); - } - - public get_partition_names_args getEmptyArgsInstance() { - return new get_partition_names_args(); - } - - 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); - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_partitions_ps extends org.apache.thrift.ProcessFunction { - public get_partitions_ps() { - super("get_partitions_ps"); - } - - public get_partitions_ps_args getEmptyArgsInstance() { - return new get_partitions_ps_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - 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"); - } - - public get_partitions_ps_with_auth_args getEmptyArgsInstance() { - return new get_partitions_ps_with_auth_args(); - } - - 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); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_partition_names_ps extends org.apache.thrift.ProcessFunction { - public get_partition_names_ps() { - super("get_partition_names_ps"); - } - - public get_partition_names_ps_args getEmptyArgsInstance() { - return new get_partition_names_ps_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_partitions_by_filter extends org.apache.thrift.ProcessFunction { - public get_partitions_by_filter() { - super("get_partitions_by_filter"); - } - - public get_partitions_by_filter_args getEmptyArgsInstance() { - return new get_partitions_by_filter_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_part_specs_by_filter extends org.apache.thrift.ProcessFunction { - public get_part_specs_by_filter() { - super("get_part_specs_by_filter"); - } - - public get_part_specs_by_filter_args getEmptyArgsInstance() { - return new get_part_specs_by_filter_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_part_specs_by_filter_result getResult(I iface, get_part_specs_by_filter_args args) throws org.apache.thrift.TException { - get_part_specs_by_filter_result result = new get_part_specs_by_filter_result(); - try { - result.success = iface.get_part_specs_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_partitions_by_expr extends org.apache.thrift.ProcessFunction { - public get_partitions_by_expr() { - super("get_partitions_by_expr"); - } - - public get_partitions_by_expr_args getEmptyArgsInstance() { - return new get_partitions_by_expr_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_partitions_by_expr_result getResult(I iface, get_partitions_by_expr_args args) throws org.apache.thrift.TException { - get_partitions_by_expr_result result = new get_partitions_by_expr_result(); - try { - result.success = iface.get_partitions_by_expr(args.req); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_num_partitions_by_filter extends org.apache.thrift.ProcessFunction { - public get_num_partitions_by_filter() { - super("get_num_partitions_by_filter"); - } - - public get_num_partitions_by_filter_args getEmptyArgsInstance() { - return new get_num_partitions_by_filter_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_num_partitions_by_filter_result getResult(I iface, get_num_partitions_by_filter_args args) throws org.apache.thrift.TException { - get_num_partitions_by_filter_result result = new get_num_partitions_by_filter_result(); - try { - result.success = iface.get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_partitions_by_names extends org.apache.thrift.ProcessFunction { - public get_partitions_by_names() { - super("get_partitions_by_names"); - } - - public get_partitions_by_names_args getEmptyArgsInstance() { - return new get_partitions_by_names_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class alter_partition extends org.apache.thrift.ProcessFunction { - public alter_partition() { - super("alter_partition"); - } - - public alter_partition_args getEmptyArgsInstance() { - return new alter_partition_args(); - } - - 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); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class alter_partitions extends org.apache.thrift.ProcessFunction { - public alter_partitions() { - super("alter_partitions"); - } - - public alter_partitions_args getEmptyArgsInstance() { - return new alter_partitions_args(); - } - - 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); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class alter_partitions_with_environment_context extends org.apache.thrift.ProcessFunction { - public alter_partitions_with_environment_context() { - super("alter_partitions_with_environment_context"); - } - - public alter_partitions_with_environment_context_args getEmptyArgsInstance() { - return new alter_partitions_with_environment_context_args(); - } - - protected boolean isOneway() { - return false; - } - - public alter_partitions_with_environment_context_result getResult(I iface, alter_partitions_with_environment_context_args args) throws org.apache.thrift.TException { - alter_partitions_with_environment_context_result result = new alter_partitions_with_environment_context_result(); - try { - iface.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - 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"); - } - - public alter_partition_with_environment_context_args getEmptyArgsInstance() { - return new alter_partition_with_environment_context_args(); - } - - 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); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class rename_partition extends org.apache.thrift.ProcessFunction { - public rename_partition() { - super("rename_partition"); - } - - public rename_partition_args getEmptyArgsInstance() { - return new rename_partition_args(); - } - - 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); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class partition_name_has_valid_characters extends org.apache.thrift.ProcessFunction { - public partition_name_has_valid_characters() { - super("partition_name_has_valid_characters"); - } - - public partition_name_has_valid_characters_args getEmptyArgsInstance() { - return new partition_name_has_valid_characters_args(); - } - - protected boolean isOneway() { - return false; - } - - public partition_name_has_valid_characters_result getResult(I iface, partition_name_has_valid_characters_args args) throws org.apache.thrift.TException { - partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); - try { - result.success = iface.partition_name_has_valid_characters(args.part_vals, args.throw_exception); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_config_value extends org.apache.thrift.ProcessFunction { - public get_config_value() { - super("get_config_value"); - } - - public get_config_value_args getEmptyArgsInstance() { - return new get_config_value_args(); - } - - 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); - } catch (ConfigValSecurityException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class partition_name_to_vals extends org.apache.thrift.ProcessFunction { - public partition_name_to_vals() { - super("partition_name_to_vals"); - } - - public partition_name_to_vals_args getEmptyArgsInstance() { - return new partition_name_to_vals_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class partition_name_to_spec extends org.apache.thrift.ProcessFunction { - public partition_name_to_spec() { - super("partition_name_to_spec"); - } - - public partition_name_to_spec_args getEmptyArgsInstance() { - return new partition_name_to_spec_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class markPartitionForEvent extends org.apache.thrift.ProcessFunction { - public markPartitionForEvent() { - super("markPartitionForEvent"); - } - - public markPartitionForEvent_args getEmptyArgsInstance() { - return new markPartitionForEvent_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } catch (UnknownTableException o4) { - result.o4 = o4; - } catch (UnknownPartitionException o5) { - result.o5 = o5; - } catch (InvalidPartitionException o6) { - result.o6 = o6; - } - return result; - } - } - - public static class isPartitionMarkedForEvent extends org.apache.thrift.ProcessFunction { - public isPartitionMarkedForEvent() { - super("isPartitionMarkedForEvent"); - } - - public isPartitionMarkedForEvent_args getEmptyArgsInstance() { - return new isPartitionMarkedForEvent_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } catch (UnknownTableException o4) { - result.o4 = o4; - } catch (UnknownPartitionException o5) { - result.o5 = o5; - } catch (InvalidPartitionException o6) { - result.o6 = o6; - } - return result; - } - } - - public static class add_index extends org.apache.thrift.ProcessFunction { - public add_index() { - super("add_index"); - } - - public add_index_args getEmptyArgsInstance() { - return new add_index_args(); - } - - 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); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class alter_index extends org.apache.thrift.ProcessFunction { - public alter_index() { - super("alter_index"); - } - - public alter_index_args getEmptyArgsInstance() { - return new alter_index_args(); - } - - 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); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class drop_index_by_name extends org.apache.thrift.ProcessFunction { - public drop_index_by_name() { - super("drop_index_by_name"); - } - - public drop_index_by_name_args getEmptyArgsInstance() { - return new drop_index_by_name_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_index_by_name extends org.apache.thrift.ProcessFunction { - public get_index_by_name() { - super("get_index_by_name"); - } - - public get_index_by_name_args getEmptyArgsInstance() { - return new get_index_by_name_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_indexes extends org.apache.thrift.ProcessFunction { - public get_indexes() { - super("get_indexes"); - } - - public get_indexes_args getEmptyArgsInstance() { - return new get_indexes_args(); - } - - 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); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_index_names extends org.apache.thrift.ProcessFunction { - public get_index_names() { - super("get_index_names"); - } - - public get_index_names_args getEmptyArgsInstance() { - return new get_index_names_args(); - } - - 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); - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_primary_keys extends org.apache.thrift.ProcessFunction { - public get_primary_keys() { - super("get_primary_keys"); - } - - public get_primary_keys_args getEmptyArgsInstance() { - return new get_primary_keys_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_primary_keys_result getResult(I iface, get_primary_keys_args args) throws org.apache.thrift.TException { - get_primary_keys_result result = new get_primary_keys_result(); - try { - result.success = iface.get_primary_keys(args.request); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_foreign_keys extends org.apache.thrift.ProcessFunction { - public get_foreign_keys() { - super("get_foreign_keys"); - } - - public get_foreign_keys_args getEmptyArgsInstance() { - return new get_foreign_keys_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_foreign_keys_result getResult(I iface, get_foreign_keys_args args) throws org.apache.thrift.TException { - get_foreign_keys_result result = new get_foreign_keys_result(); - try { - result.success = iface.get_foreign_keys(args.request); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_unique_constraints extends org.apache.thrift.ProcessFunction { - public get_unique_constraints() { - super("get_unique_constraints"); - } - - public get_unique_constraints_args getEmptyArgsInstance() { - return new get_unique_constraints_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_unique_constraints_result getResult(I iface, get_unique_constraints_args args) throws org.apache.thrift.TException { - get_unique_constraints_result result = new get_unique_constraints_result(); - try { - result.success = iface.get_unique_constraints(args.request); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_not_null_constraints extends org.apache.thrift.ProcessFunction { - public get_not_null_constraints() { - super("get_not_null_constraints"); - } - - public get_not_null_constraints_args getEmptyArgsInstance() { - return new get_not_null_constraints_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_not_null_constraints_result getResult(I iface, get_not_null_constraints_args args) throws org.apache.thrift.TException { - get_not_null_constraints_result result = new get_not_null_constraints_result(); - try { - result.success = iface.get_not_null_constraints(args.request); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class update_table_column_statistics extends org.apache.thrift.ProcessFunction { - public update_table_column_statistics() { - super("update_table_column_statistics"); - } - - public update_table_column_statistics_args getEmptyArgsInstance() { - return new update_table_column_statistics_args(); - } - - protected boolean isOneway() { - return false; - } - - public update_table_column_statistics_result getResult(I iface, update_table_column_statistics_args args) throws org.apache.thrift.TException { - update_table_column_statistics_result result = new update_table_column_statistics_result(); - try { - result.success = iface.update_table_column_statistics(args.stats_obj); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (InvalidInputException o4) { - result.o4 = o4; - } - return result; - } - } - - public static class update_partition_column_statistics extends org.apache.thrift.ProcessFunction { - public update_partition_column_statistics() { - super("update_partition_column_statistics"); - } - - public update_partition_column_statistics_args getEmptyArgsInstance() { - return new update_partition_column_statistics_args(); - } - - protected boolean isOneway() { - return false; - } - - public update_partition_column_statistics_result getResult(I iface, update_partition_column_statistics_args args) throws org.apache.thrift.TException { - update_partition_column_statistics_result result = new update_partition_column_statistics_result(); - try { - result.success = iface.update_partition_column_statistics(args.stats_obj); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (InvalidInputException o4) { - result.o4 = o4; - } - return result; - } - } - - public static class get_table_column_statistics extends org.apache.thrift.ProcessFunction { - public get_table_column_statistics() { - super("get_table_column_statistics"); - } - - public get_table_column_statistics_args getEmptyArgsInstance() { - return new get_table_column_statistics_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_table_column_statistics_result getResult(I iface, get_table_column_statistics_args args) throws org.apache.thrift.TException { - get_table_column_statistics_result result = new get_table_column_statistics_result(); - try { - result.success = iface.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (InvalidInputException o3) { - result.o3 = o3; - } catch (InvalidObjectException o4) { - result.o4 = o4; - } - return result; - } - } - - public static class get_partition_column_statistics extends org.apache.thrift.ProcessFunction { - public get_partition_column_statistics() { - super("get_partition_column_statistics"); - } - - public get_partition_column_statistics_args getEmptyArgsInstance() { - return new get_partition_column_statistics_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_partition_column_statistics_result getResult(I iface, get_partition_column_statistics_args args) throws org.apache.thrift.TException { - get_partition_column_statistics_result result = new get_partition_column_statistics_result(); - try { - result.success = iface.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (InvalidInputException o3) { - result.o3 = o3; - } catch (InvalidObjectException o4) { - result.o4 = o4; - } - return result; - } - } - - public static class get_table_statistics_req extends org.apache.thrift.ProcessFunction { - public get_table_statistics_req() { - super("get_table_statistics_req"); - } - - public get_table_statistics_req_args getEmptyArgsInstance() { - return new get_table_statistics_req_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_table_statistics_req_result getResult(I iface, get_table_statistics_req_args args) throws org.apache.thrift.TException { - get_table_statistics_req_result result = new get_table_statistics_req_result(); - try { - result.success = iface.get_table_statistics_req(args.request); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_partitions_statistics_req extends org.apache.thrift.ProcessFunction { - public get_partitions_statistics_req() { - super("get_partitions_statistics_req"); - } - - public get_partitions_statistics_req_args getEmptyArgsInstance() { - return new get_partitions_statistics_req_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_partitions_statistics_req_result getResult(I iface, get_partitions_statistics_req_args args) throws org.apache.thrift.TException { - get_partitions_statistics_req_result result = new get_partitions_statistics_req_result(); - try { - result.success = iface.get_partitions_statistics_req(args.request); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_aggr_stats_for extends org.apache.thrift.ProcessFunction { - public get_aggr_stats_for() { - super("get_aggr_stats_for"); - } - - public get_aggr_stats_for_args getEmptyArgsInstance() { - return new get_aggr_stats_for_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_aggr_stats_for_result getResult(I iface, get_aggr_stats_for_args args) throws org.apache.thrift.TException { - get_aggr_stats_for_result result = new get_aggr_stats_for_result(); - try { - result.success = iface.get_aggr_stats_for(args.request); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class set_aggr_stats_for extends org.apache.thrift.ProcessFunction { - public set_aggr_stats_for() { - super("set_aggr_stats_for"); - } - - public set_aggr_stats_for_args getEmptyArgsInstance() { - return new set_aggr_stats_for_args(); - } - - protected boolean isOneway() { - return false; - } - - public set_aggr_stats_for_result getResult(I iface, set_aggr_stats_for_args args) throws org.apache.thrift.TException { - set_aggr_stats_for_result result = new set_aggr_stats_for_result(); - try { - result.success = iface.set_aggr_stats_for(args.request); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (InvalidInputException o4) { - result.o4 = o4; - } - return result; - } - } - - public static class delete_partition_column_statistics extends org.apache.thrift.ProcessFunction { - public delete_partition_column_statistics() { - super("delete_partition_column_statistics"); - } - - public delete_partition_column_statistics_args getEmptyArgsInstance() { - return new delete_partition_column_statistics_args(); - } - - protected boolean isOneway() { - return false; - } - - public delete_partition_column_statistics_result getResult(I iface, delete_partition_column_statistics_args args) throws org.apache.thrift.TException { - delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); - try { - result.success = iface.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (InvalidObjectException o3) { - result.o3 = o3; - } catch (InvalidInputException o4) { - result.o4 = o4; - } - return result; - } - } - - public static class delete_table_column_statistics extends org.apache.thrift.ProcessFunction { - public delete_table_column_statistics() { - super("delete_table_column_statistics"); - } - - public delete_table_column_statistics_args getEmptyArgsInstance() { - return new delete_table_column_statistics_args(); - } - - protected boolean isOneway() { - return false; - } - - public delete_table_column_statistics_result getResult(I iface, delete_table_column_statistics_args args) throws org.apache.thrift.TException { - delete_table_column_statistics_result result = new delete_table_column_statistics_result(); - try { - result.success = iface.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (InvalidObjectException o3) { - result.o3 = o3; - } catch (InvalidInputException o4) { - result.o4 = o4; - } - return result; - } - } - - public static class create_function extends org.apache.thrift.ProcessFunction { - public create_function() { - super("create_function"); - } - - public create_function_args getEmptyArgsInstance() { - return new create_function_args(); - } - - protected boolean isOneway() { - return false; - } - - public create_function_result getResult(I iface, create_function_args args) throws org.apache.thrift.TException { - create_function_result result = new create_function_result(); - try { - iface.create_function(args.func); - } catch (AlreadyExistsException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (NoSuchObjectException o4) { - result.o4 = o4; - } - return result; - } - } - - public static class drop_function extends org.apache.thrift.ProcessFunction { - public drop_function() { - super("drop_function"); - } - - public drop_function_args getEmptyArgsInstance() { - return new drop_function_args(); - } - - protected boolean isOneway() { - return false; - } - - public drop_function_result getResult(I iface, drop_function_args args) throws org.apache.thrift.TException { - drop_function_result result = new drop_function_result(); - try { - iface.drop_function(args.dbName, args.funcName); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class alter_function extends org.apache.thrift.ProcessFunction { - public alter_function() { - super("alter_function"); - } - - public alter_function_args getEmptyArgsInstance() { - return new alter_function_args(); - } - - protected boolean isOneway() { - return false; - } - - public alter_function_result getResult(I iface, alter_function_args args) throws org.apache.thrift.TException { - alter_function_result result = new alter_function_result(); - try { - iface.alter_function(args.dbName, args.funcName, args.newFunc); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_functions extends org.apache.thrift.ProcessFunction { - public get_functions() { - super("get_functions"); - } - - public get_functions_args getEmptyArgsInstance() { - return new get_functions_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_functions_result getResult(I iface, get_functions_args args) throws org.apache.thrift.TException { - get_functions_result result = new get_functions_result(); - try { - result.success = iface.get_functions(args.dbName, args.pattern); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_function extends org.apache.thrift.ProcessFunction { - public get_function() { - super("get_function"); - } - - public get_function_args getEmptyArgsInstance() { - return new get_function_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_function_result getResult(I iface, get_function_args args) throws org.apache.thrift.TException { - get_function_result result = new get_function_result(); - try { - result.success = iface.get_function(args.dbName, args.funcName); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_all_functions extends org.apache.thrift.ProcessFunction { - public get_all_functions() { - super("get_all_functions"); - } - - public get_all_functions_args getEmptyArgsInstance() { - return new get_all_functions_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_all_functions_result getResult(I iface, get_all_functions_args args) throws org.apache.thrift.TException { - get_all_functions_result result = new get_all_functions_result(); - try { - result.success = iface.get_all_functions(); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class create_role extends org.apache.thrift.ProcessFunction { - public create_role() { - super("create_role"); - } - - public create_role_args getEmptyArgsInstance() { - return new create_role_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class drop_role extends org.apache.thrift.ProcessFunction { - public drop_role() { - super("drop_role"); - } - - public drop_role_args getEmptyArgsInstance() { - return new drop_role_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_role_names extends org.apache.thrift.ProcessFunction { - public get_role_names() { - super("get_role_names"); - } - - public get_role_names_args getEmptyArgsInstance() { - return new get_role_names_args(); - } - - 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(); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class grant_role extends org.apache.thrift.ProcessFunction { - public grant_role() { - super("grant_role"); - } - - public grant_role_args getEmptyArgsInstance() { - return new grant_role_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class revoke_role extends org.apache.thrift.ProcessFunction { - public revoke_role() { - super("revoke_role"); - } - - public revoke_role_args getEmptyArgsInstance() { - return new revoke_role_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class list_roles extends org.apache.thrift.ProcessFunction { - public list_roles() { - super("list_roles"); - } - - public list_roles_args getEmptyArgsInstance() { - return new list_roles_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class grant_revoke_role extends org.apache.thrift.ProcessFunction { - public grant_revoke_role() { - super("grant_revoke_role"); - } - - public grant_revoke_role_args getEmptyArgsInstance() { - return new grant_revoke_role_args(); - } - - protected boolean isOneway() { - return false; - } - - public grant_revoke_role_result getResult(I iface, grant_revoke_role_args args) throws org.apache.thrift.TException { - grant_revoke_role_result result = new grant_revoke_role_result(); - try { - result.success = iface.grant_revoke_role(args.request); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_principals_in_role extends org.apache.thrift.ProcessFunction { - public get_principals_in_role() { - super("get_principals_in_role"); - } - - public get_principals_in_role_args getEmptyArgsInstance() { - return new get_principals_in_role_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_principals_in_role_result getResult(I iface, get_principals_in_role_args args) throws org.apache.thrift.TException { - get_principals_in_role_result result = new get_principals_in_role_result(); - try { - result.success = iface.get_principals_in_role(args.request); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_role_grants_for_principal extends org.apache.thrift.ProcessFunction { - public get_role_grants_for_principal() { - super("get_role_grants_for_principal"); - } - - public get_role_grants_for_principal_args getEmptyArgsInstance() { - return new get_role_grants_for_principal_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_role_grants_for_principal_result getResult(I iface, get_role_grants_for_principal_args args) throws org.apache.thrift.TException { - get_role_grants_for_principal_result result = new get_role_grants_for_principal_result(); - try { - result.success = iface.get_role_grants_for_principal(args.request); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_privilege_set extends org.apache.thrift.ProcessFunction { - public get_privilege_set() { - super("get_privilege_set"); - } - - public get_privilege_set_args getEmptyArgsInstance() { - return new get_privilege_set_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class list_privileges extends org.apache.thrift.ProcessFunction { - public list_privileges() { - super("list_privileges"); - } - - public list_privileges_args getEmptyArgsInstance() { - return new list_privileges_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class grant_privileges extends org.apache.thrift.ProcessFunction { - public grant_privileges() { - super("grant_privileges"); - } - - public grant_privileges_args getEmptyArgsInstance() { - return new grant_privileges_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class revoke_privileges extends org.apache.thrift.ProcessFunction { - public revoke_privileges() { - super("revoke_privileges"); - } - - public revoke_privileges_args getEmptyArgsInstance() { - return new revoke_privileges_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class grant_revoke_privileges extends org.apache.thrift.ProcessFunction { - public grant_revoke_privileges() { - super("grant_revoke_privileges"); - } - - public grant_revoke_privileges_args getEmptyArgsInstance() { - return new grant_revoke_privileges_args(); - } - - protected boolean isOneway() { - return false; - } - - public grant_revoke_privileges_result getResult(I iface, grant_revoke_privileges_args args) throws org.apache.thrift.TException { - grant_revoke_privileges_result result = new grant_revoke_privileges_result(); - try { - result.success = iface.grant_revoke_privileges(args.request); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class set_ugi extends org.apache.thrift.ProcessFunction { - public set_ugi() { - super("set_ugi"); - } - - public set_ugi_args getEmptyArgsInstance() { - return new set_ugi_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_delegation_token extends org.apache.thrift.ProcessFunction { - public get_delegation_token() { - super("get_delegation_token"); - } - - public get_delegation_token_args getEmptyArgsInstance() { - return new get_delegation_token_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class renew_delegation_token extends org.apache.thrift.ProcessFunction { - public renew_delegation_token() { - super("renew_delegation_token"); - } - - public renew_delegation_token_args getEmptyArgsInstance() { - return new renew_delegation_token_args(); - } - - 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); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class cancel_delegation_token extends org.apache.thrift.ProcessFunction { - public cancel_delegation_token() { - super("cancel_delegation_token"); - } - - public cancel_delegation_token_args getEmptyArgsInstance() { - return new cancel_delegation_token_args(); - } - - 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); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class add_token extends org.apache.thrift.ProcessFunction { - public add_token() { - super("add_token"); - } - - public add_token_args getEmptyArgsInstance() { - return new add_token_args(); - } - - protected boolean isOneway() { - return false; - } - - public add_token_result getResult(I iface, add_token_args args) throws org.apache.thrift.TException { - add_token_result result = new add_token_result(); - result.success = iface.add_token(args.token_identifier, args.delegation_token); - result.setSuccessIsSet(true); - return result; - } - } - - public static class remove_token extends org.apache.thrift.ProcessFunction { - public remove_token() { - super("remove_token"); - } - - public remove_token_args getEmptyArgsInstance() { - return new remove_token_args(); - } - - protected boolean isOneway() { - return false; - } - - public remove_token_result getResult(I iface, remove_token_args args) throws org.apache.thrift.TException { - remove_token_result result = new remove_token_result(); - result.success = iface.remove_token(args.token_identifier); - result.setSuccessIsSet(true); - return result; - } - } - - public static class get_token extends org.apache.thrift.ProcessFunction { - public get_token() { - super("get_token"); - } - - public get_token_args getEmptyArgsInstance() { - return new get_token_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_token_result getResult(I iface, get_token_args args) throws org.apache.thrift.TException { - get_token_result result = new get_token_result(); - result.success = iface.get_token(args.token_identifier); - return result; - } - } - - public static class get_all_token_identifiers extends org.apache.thrift.ProcessFunction { - public get_all_token_identifiers() { - super("get_all_token_identifiers"); - } - - public get_all_token_identifiers_args getEmptyArgsInstance() { - return new get_all_token_identifiers_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_all_token_identifiers_result getResult(I iface, get_all_token_identifiers_args args) throws org.apache.thrift.TException { - get_all_token_identifiers_result result = new get_all_token_identifiers_result(); - result.success = iface.get_all_token_identifiers(); - return result; - } - } - - public static class add_master_key extends org.apache.thrift.ProcessFunction { - public add_master_key() { - super("add_master_key"); - } - - public add_master_key_args getEmptyArgsInstance() { - return new add_master_key_args(); - } - - protected boolean isOneway() { - return false; - } - - public add_master_key_result getResult(I iface, add_master_key_args args) throws org.apache.thrift.TException { - add_master_key_result result = new add_master_key_result(); - try { - result.success = iface.add_master_key(args.key); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class update_master_key extends org.apache.thrift.ProcessFunction { - public update_master_key() { - super("update_master_key"); - } - - public update_master_key_args getEmptyArgsInstance() { - return new update_master_key_args(); - } - - protected boolean isOneway() { - return false; - } - - public update_master_key_result getResult(I iface, update_master_key_args args) throws org.apache.thrift.TException { - update_master_key_result result = new update_master_key_result(); - try { - iface.update_master_key(args.seq_number, args.key); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class remove_master_key extends org.apache.thrift.ProcessFunction { - public remove_master_key() { - super("remove_master_key"); - } - - public remove_master_key_args getEmptyArgsInstance() { - return new remove_master_key_args(); - } - - protected boolean isOneway() { - return false; - } - - public remove_master_key_result getResult(I iface, remove_master_key_args args) throws org.apache.thrift.TException { - remove_master_key_result result = new remove_master_key_result(); - result.success = iface.remove_master_key(args.key_seq); - result.setSuccessIsSet(true); - return result; - } - } - - public static class get_master_keys extends org.apache.thrift.ProcessFunction { - public get_master_keys() { - super("get_master_keys"); - } - - public get_master_keys_args getEmptyArgsInstance() { - return new get_master_keys_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_master_keys_result getResult(I iface, get_master_keys_args args) throws org.apache.thrift.TException { - get_master_keys_result result = new get_master_keys_result(); - result.success = iface.get_master_keys(); - return result; - } - } - - public static class get_open_txns extends org.apache.thrift.ProcessFunction { - public get_open_txns() { - super("get_open_txns"); - } - - public get_open_txns_args getEmptyArgsInstance() { - return new get_open_txns_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_open_txns_result getResult(I iface, get_open_txns_args args) throws org.apache.thrift.TException { - get_open_txns_result result = new get_open_txns_result(); - result.success = iface.get_open_txns(); - return result; - } - } - - public static class get_open_txns_info extends org.apache.thrift.ProcessFunction { - public get_open_txns_info() { - super("get_open_txns_info"); - } - - public get_open_txns_info_args getEmptyArgsInstance() { - return new get_open_txns_info_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_open_txns_info_result getResult(I iface, get_open_txns_info_args args) throws org.apache.thrift.TException { - get_open_txns_info_result result = new get_open_txns_info_result(); - result.success = iface.get_open_txns_info(); - return result; - } - } - - public static class open_txns extends org.apache.thrift.ProcessFunction { - public open_txns() { - super("open_txns"); - } - - public open_txns_args getEmptyArgsInstance() { - return new open_txns_args(); - } - - protected boolean isOneway() { - return false; - } - - public open_txns_result getResult(I iface, open_txns_args args) throws org.apache.thrift.TException { - open_txns_result result = new open_txns_result(); - result.success = iface.open_txns(args.rqst); - return result; - } - } - - public static class abort_txn extends org.apache.thrift.ProcessFunction { - public abort_txn() { - super("abort_txn"); - } - - public abort_txn_args getEmptyArgsInstance() { - return new abort_txn_args(); - } - - protected boolean isOneway() { - return false; - } - - public abort_txn_result getResult(I iface, abort_txn_args args) throws org.apache.thrift.TException { - abort_txn_result result = new abort_txn_result(); - try { - iface.abort_txn(args.rqst); - } catch (NoSuchTxnException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class abort_txns extends org.apache.thrift.ProcessFunction { - public abort_txns() { - super("abort_txns"); - } - - public abort_txns_args getEmptyArgsInstance() { - return new abort_txns_args(); - } - - protected boolean isOneway() { - return false; - } - - public abort_txns_result getResult(I iface, abort_txns_args args) throws org.apache.thrift.TException { - abort_txns_result result = new abort_txns_result(); - try { - iface.abort_txns(args.rqst); - } catch (NoSuchTxnException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class commit_txn extends org.apache.thrift.ProcessFunction { - public commit_txn() { - super("commit_txn"); - } - - public commit_txn_args getEmptyArgsInstance() { - return new commit_txn_args(); - } - - protected boolean isOneway() { - return false; - } - - public commit_txn_result getResult(I iface, commit_txn_args args) throws org.apache.thrift.TException { - commit_txn_result result = new commit_txn_result(); - try { - iface.commit_txn(args.rqst); - } catch (NoSuchTxnException o1) { - result.o1 = o1; - } catch (TxnAbortedException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class lock extends org.apache.thrift.ProcessFunction { - public lock() { - super("lock"); - } - - public lock_args getEmptyArgsInstance() { - return new lock_args(); - } - - protected boolean isOneway() { - return false; - } - - public lock_result getResult(I iface, lock_args args) throws org.apache.thrift.TException { - lock_result result = new lock_result(); - try { - result.success = iface.lock(args.rqst); - } catch (NoSuchTxnException o1) { - result.o1 = o1; - } catch (TxnAbortedException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class check_lock extends org.apache.thrift.ProcessFunction { - public check_lock() { - super("check_lock"); - } - - public check_lock_args getEmptyArgsInstance() { - return new check_lock_args(); - } - - protected boolean isOneway() { - return false; - } - - public check_lock_result getResult(I iface, check_lock_args args) throws org.apache.thrift.TException { - check_lock_result result = new check_lock_result(); - try { - result.success = iface.check_lock(args.rqst); - } catch (NoSuchTxnException o1) { - result.o1 = o1; - } catch (TxnAbortedException o2) { - result.o2 = o2; - } catch (NoSuchLockException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class unlock extends org.apache.thrift.ProcessFunction { - public unlock() { - super("unlock"); - } - - public unlock_args getEmptyArgsInstance() { - return new unlock_args(); - } - - protected boolean isOneway() { - return false; - } - - public unlock_result getResult(I iface, unlock_args args) throws org.apache.thrift.TException { - unlock_result result = new unlock_result(); - try { - iface.unlock(args.rqst); - } catch (NoSuchLockException o1) { - result.o1 = o1; - } catch (TxnOpenException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class show_locks extends org.apache.thrift.ProcessFunction { - public show_locks() { - super("show_locks"); - } - - public show_locks_args getEmptyArgsInstance() { - return new show_locks_args(); - } - - protected boolean isOneway() { - return false; - } - - public show_locks_result getResult(I iface, show_locks_args args) throws org.apache.thrift.TException { - show_locks_result result = new show_locks_result(); - result.success = iface.show_locks(args.rqst); - return result; - } - } - - public static class heartbeat extends org.apache.thrift.ProcessFunction { - public heartbeat() { - super("heartbeat"); - } - - public heartbeat_args getEmptyArgsInstance() { - return new heartbeat_args(); - } - - protected boolean isOneway() { - return false; - } - - public heartbeat_result getResult(I iface, heartbeat_args args) throws org.apache.thrift.TException { - heartbeat_result result = new heartbeat_result(); - try { - iface.heartbeat(args.ids); - } catch (NoSuchLockException o1) { - result.o1 = o1; - } catch (NoSuchTxnException o2) { - result.o2 = o2; - } catch (TxnAbortedException o3) { - result.o3 = o3; - } - return result; - } - } - - public static class heartbeat_txn_range extends org.apache.thrift.ProcessFunction { - public heartbeat_txn_range() { - super("heartbeat_txn_range"); - } - - public heartbeat_txn_range_args getEmptyArgsInstance() { - return new heartbeat_txn_range_args(); - } - - protected boolean isOneway() { - return false; - } - - public heartbeat_txn_range_result getResult(I iface, heartbeat_txn_range_args args) throws org.apache.thrift.TException { - heartbeat_txn_range_result result = new heartbeat_txn_range_result(); - result.success = iface.heartbeat_txn_range(args.txns); - return result; - } - } - - public static class compact extends org.apache.thrift.ProcessFunction { - public compact() { - super("compact"); - } - - public compact_args getEmptyArgsInstance() { - return new compact_args(); - } - - protected boolean isOneway() { - return false; - } - - public compact_result getResult(I iface, compact_args args) throws org.apache.thrift.TException { - compact_result result = new compact_result(); - iface.compact(args.rqst); - return result; - } - } - - public static class compact2 extends org.apache.thrift.ProcessFunction { - public compact2() { - super("compact2"); - } - - public compact2_args getEmptyArgsInstance() { - return new compact2_args(); - } - - protected boolean isOneway() { - return false; - } - - public compact2_result getResult(I iface, compact2_args args) throws org.apache.thrift.TException { - compact2_result result = new compact2_result(); - result.success = iface.compact2(args.rqst); - return result; - } - } - - public static class show_compact extends org.apache.thrift.ProcessFunction { - public show_compact() { - super("show_compact"); - } - - public show_compact_args getEmptyArgsInstance() { - return new show_compact_args(); - } - - protected boolean isOneway() { - return false; - } - - public show_compact_result getResult(I iface, show_compact_args args) throws org.apache.thrift.TException { - show_compact_result result = new show_compact_result(); - result.success = iface.show_compact(args.rqst); - return result; - } - } - - public static class add_dynamic_partitions extends org.apache.thrift.ProcessFunction { - public add_dynamic_partitions() { - super("add_dynamic_partitions"); - } - - public add_dynamic_partitions_args getEmptyArgsInstance() { - return new add_dynamic_partitions_args(); - } - - protected boolean isOneway() { - return false; - } - - public add_dynamic_partitions_result getResult(I iface, add_dynamic_partitions_args args) throws org.apache.thrift.TException { - add_dynamic_partitions_result result = new add_dynamic_partitions_result(); - try { - iface.add_dynamic_partitions(args.rqst); - } catch (NoSuchTxnException o1) { - result.o1 = o1; - } catch (TxnAbortedException o2) { - result.o2 = o2; - } - return result; - } - } - - public static class get_next_notification extends org.apache.thrift.ProcessFunction { - public get_next_notification() { - super("get_next_notification"); - } - - public get_next_notification_args getEmptyArgsInstance() { - return new get_next_notification_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_next_notification_result getResult(I iface, get_next_notification_args args) throws org.apache.thrift.TException { - get_next_notification_result result = new get_next_notification_result(); - result.success = iface.get_next_notification(args.rqst); - return result; - } - } - - public static class get_current_notificationEventId extends org.apache.thrift.ProcessFunction { - public get_current_notificationEventId() { - super("get_current_notificationEventId"); - } - - public get_current_notificationEventId_args getEmptyArgsInstance() { - return new get_current_notificationEventId_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_current_notificationEventId_result getResult(I iface, get_current_notificationEventId_args args) throws org.apache.thrift.TException { - get_current_notificationEventId_result result = new get_current_notificationEventId_result(); - result.success = iface.get_current_notificationEventId(); - return result; - } - } - - public static class fire_listener_event extends org.apache.thrift.ProcessFunction { - public fire_listener_event() { - super("fire_listener_event"); - } - - public fire_listener_event_args getEmptyArgsInstance() { - return new fire_listener_event_args(); - } - - protected boolean isOneway() { - return false; - } - - public fire_listener_event_result getResult(I iface, fire_listener_event_args args) throws org.apache.thrift.TException { - fire_listener_event_result result = new fire_listener_event_result(); - result.success = iface.fire_listener_event(args.rqst); - return result; - } - } - - public static class flushCache extends org.apache.thrift.ProcessFunction { - public flushCache() { - super("flushCache"); - } - - public flushCache_args getEmptyArgsInstance() { - return new flushCache_args(); - } - - protected boolean isOneway() { - return false; - } - - public flushCache_result getResult(I iface, flushCache_args args) throws org.apache.thrift.TException { - flushCache_result result = new flushCache_result(); - iface.flushCache(); - return result; - } - } - - public static class cm_recycle extends org.apache.thrift.ProcessFunction { - public cm_recycle() { - super("cm_recycle"); - } - - public cm_recycle_args getEmptyArgsInstance() { - return new cm_recycle_args(); - } - - protected boolean isOneway() { - return false; - } - - public cm_recycle_result getResult(I iface, cm_recycle_args args) throws org.apache.thrift.TException { - cm_recycle_result result = new cm_recycle_result(); - try { - result.success = iface.cm_recycle(args.request); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - public static class get_file_metadata_by_expr extends org.apache.thrift.ProcessFunction { - public get_file_metadata_by_expr() { - super("get_file_metadata_by_expr"); - } - - public get_file_metadata_by_expr_args getEmptyArgsInstance() { - return new get_file_metadata_by_expr_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_file_metadata_by_expr_result getResult(I iface, get_file_metadata_by_expr_args args) throws org.apache.thrift.TException { - get_file_metadata_by_expr_result result = new get_file_metadata_by_expr_result(); - result.success = iface.get_file_metadata_by_expr(args.req); - return result; - } - } - - public static class get_file_metadata extends org.apache.thrift.ProcessFunction { - public get_file_metadata() { - super("get_file_metadata"); - } - - public get_file_metadata_args getEmptyArgsInstance() { - return new get_file_metadata_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_file_metadata_result getResult(I iface, get_file_metadata_args args) throws org.apache.thrift.TException { - get_file_metadata_result result = new get_file_metadata_result(); - result.success = iface.get_file_metadata(args.req); - return result; - } - } - - public static class put_file_metadata extends org.apache.thrift.ProcessFunction { - public put_file_metadata() { - super("put_file_metadata"); - } - - public put_file_metadata_args getEmptyArgsInstance() { - return new put_file_metadata_args(); - } - - protected boolean isOneway() { - return false; - } - - public put_file_metadata_result getResult(I iface, put_file_metadata_args args) throws org.apache.thrift.TException { - put_file_metadata_result result = new put_file_metadata_result(); - result.success = iface.put_file_metadata(args.req); - return result; - } - } - - public static class clear_file_metadata extends org.apache.thrift.ProcessFunction { - public clear_file_metadata() { - super("clear_file_metadata"); - } - - public clear_file_metadata_args getEmptyArgsInstance() { - return new clear_file_metadata_args(); - } - - protected boolean isOneway() { - return false; - } - - public clear_file_metadata_result getResult(I iface, clear_file_metadata_args args) throws org.apache.thrift.TException { - clear_file_metadata_result result = new clear_file_metadata_result(); - result.success = iface.clear_file_metadata(args.req); - return result; - } - } - - public static class cache_file_metadata extends org.apache.thrift.ProcessFunction { - public cache_file_metadata() { - super("cache_file_metadata"); - } - - public cache_file_metadata_args getEmptyArgsInstance() { - return new cache_file_metadata_args(); - } - - protected boolean isOneway() { - return false; - } - - public cache_file_metadata_result getResult(I iface, cache_file_metadata_args args) throws org.apache.thrift.TException { - cache_file_metadata_result result = new cache_file_metadata_result(); - result.success = iface.cache_file_metadata(args.req); - return result; - } - } - - public static class get_metastore_db_uuid extends org.apache.thrift.ProcessFunction { - public get_metastore_db_uuid() { - super("get_metastore_db_uuid"); - } - - public get_metastore_db_uuid_args getEmptyArgsInstance() { - return new get_metastore_db_uuid_args(); - } - - protected boolean isOneway() { - return false; - } - - public get_metastore_db_uuid_result getResult(I iface, get_metastore_db_uuid_args args) throws org.apache.thrift.TException { - get_metastore_db_uuid_result result = new get_metastore_db_uuid_result(); - try { - result.success = iface.get_metastore_db_uuid(); - } catch (MetaException o1) { - result.o1 = o1; - } - return result; - } - } - - } - - public static class AsyncProcessor extends com.facebook.fb303.FacebookService.AsyncProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); - public AsyncProcessor(I iface) { - super(iface, getProcessMap(new HashMap>())); - } - - protected AsyncProcessor(I iface, Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static Map> getProcessMap(Map> processMap) { - processMap.put("getMetaConf", new getMetaConf()); - processMap.put("setMetaConf", new setMetaConf()); - processMap.put("create_database", new create_database()); - processMap.put("get_database", new get_database()); - processMap.put("drop_database", new drop_database()); - processMap.put("get_databases", new get_databases()); - processMap.put("get_all_databases", new get_all_databases()); - processMap.put("alter_database", new alter_database()); - processMap.put("get_type", new get_type()); - processMap.put("create_type", new create_type()); - processMap.put("drop_type", new drop_type()); - processMap.put("get_type_all", new get_type_all()); - processMap.put("get_fields", new get_fields()); - processMap.put("get_fields_with_environment_context", new get_fields_with_environment_context()); - processMap.put("get_schema", new get_schema()); - processMap.put("get_schema_with_environment_context", new get_schema_with_environment_context()); - processMap.put("create_table", new create_table()); - processMap.put("create_table_with_environment_context", new create_table_with_environment_context()); - processMap.put("create_table_with_constraints", new create_table_with_constraints()); - processMap.put("drop_constraint", new drop_constraint()); - processMap.put("add_primary_key", new add_primary_key()); - processMap.put("add_foreign_key", new add_foreign_key()); - processMap.put("add_unique_constraint", new add_unique_constraint()); - processMap.put("add_not_null_constraint", new add_not_null_constraint()); - processMap.put("drop_table", new drop_table()); - processMap.put("drop_table_with_environment_context", new drop_table_with_environment_context()); - processMap.put("truncate_table", new truncate_table()); - processMap.put("get_tables", new get_tables()); - processMap.put("get_tables_by_type", new get_tables_by_type()); - processMap.put("get_table_meta", new get_table_meta()); - processMap.put("get_all_tables", new get_all_tables()); - processMap.put("get_table", new get_table()); - processMap.put("get_table_objects_by_name", new get_table_objects_by_name()); - processMap.put("get_table_req", new get_table_req()); - processMap.put("get_table_objects_by_name_req", new get_table_objects_by_name_req()); - processMap.put("get_table_names_by_filter", new get_table_names_by_filter()); - processMap.put("alter_table", new alter_table()); - processMap.put("alter_table_with_environment_context", new alter_table_with_environment_context()); - processMap.put("alter_table_with_cascade", new alter_table_with_cascade()); - processMap.put("add_partition", new add_partition()); - processMap.put("add_partition_with_environment_context", new add_partition_with_environment_context()); - processMap.put("add_partitions", new add_partitions()); - processMap.put("add_partitions_pspec", new add_partitions_pspec()); - processMap.put("append_partition", new append_partition()); - processMap.put("add_partitions_req", new add_partitions_req()); - processMap.put("append_partition_with_environment_context", new append_partition_with_environment_context()); - processMap.put("append_partition_by_name", new append_partition_by_name()); - processMap.put("append_partition_by_name_with_environment_context", new append_partition_by_name_with_environment_context()); - processMap.put("drop_partition", new drop_partition()); - processMap.put("drop_partition_with_environment_context", new drop_partition_with_environment_context()); - processMap.put("drop_partition_by_name", new drop_partition_by_name()); - processMap.put("drop_partition_by_name_with_environment_context", new drop_partition_by_name_with_environment_context()); - processMap.put("drop_partitions_req", new drop_partitions_req()); - processMap.put("get_partition", new get_partition()); - processMap.put("exchange_partition", new exchange_partition()); - processMap.put("exchange_partitions", new exchange_partitions()); - processMap.put("get_partition_with_auth", new get_partition_with_auth()); - processMap.put("get_partition_by_name", new get_partition_by_name()); - processMap.put("get_partitions", new get_partitions()); - processMap.put("get_partitions_with_auth", new get_partitions_with_auth()); - processMap.put("get_partitions_pspec", new get_partitions_pspec()); - processMap.put("get_partition_names", new get_partition_names()); - processMap.put("get_partitions_ps", new get_partitions_ps()); - processMap.put("get_partitions_ps_with_auth", new get_partitions_ps_with_auth()); - processMap.put("get_partition_names_ps", new get_partition_names_ps()); - processMap.put("get_partitions_by_filter", new get_partitions_by_filter()); - processMap.put("get_part_specs_by_filter", new get_part_specs_by_filter()); - processMap.put("get_partitions_by_expr", new get_partitions_by_expr()); - processMap.put("get_num_partitions_by_filter", new get_num_partitions_by_filter()); - processMap.put("get_partitions_by_names", new get_partitions_by_names()); - processMap.put("alter_partition", new alter_partition()); - processMap.put("alter_partitions", new alter_partitions()); - processMap.put("alter_partitions_with_environment_context", new alter_partitions_with_environment_context()); - processMap.put("alter_partition_with_environment_context", new alter_partition_with_environment_context()); - processMap.put("rename_partition", new rename_partition()); - processMap.put("partition_name_has_valid_characters", new partition_name_has_valid_characters()); - processMap.put("get_config_value", new get_config_value()); - processMap.put("partition_name_to_vals", new partition_name_to_vals()); - processMap.put("partition_name_to_spec", new partition_name_to_spec()); - processMap.put("markPartitionForEvent", new markPartitionForEvent()); - processMap.put("isPartitionMarkedForEvent", new isPartitionMarkedForEvent()); - processMap.put("add_index", new add_index()); - processMap.put("alter_index", new alter_index()); - processMap.put("drop_index_by_name", new drop_index_by_name()); - processMap.put("get_index_by_name", new get_index_by_name()); - processMap.put("get_indexes", new get_indexes()); - processMap.put("get_index_names", new get_index_names()); - processMap.put("get_primary_keys", new get_primary_keys()); - processMap.put("get_foreign_keys", new get_foreign_keys()); - processMap.put("get_unique_constraints", new get_unique_constraints()); - processMap.put("get_not_null_constraints", new get_not_null_constraints()); - processMap.put("update_table_column_statistics", new update_table_column_statistics()); - processMap.put("update_partition_column_statistics", new update_partition_column_statistics()); - processMap.put("get_table_column_statistics", new get_table_column_statistics()); - processMap.put("get_partition_column_statistics", new get_partition_column_statistics()); - processMap.put("get_table_statistics_req", new get_table_statistics_req()); - processMap.put("get_partitions_statistics_req", new get_partitions_statistics_req()); - processMap.put("get_aggr_stats_for", new get_aggr_stats_for()); - processMap.put("set_aggr_stats_for", new set_aggr_stats_for()); - processMap.put("delete_partition_column_statistics", new delete_partition_column_statistics()); - processMap.put("delete_table_column_statistics", new delete_table_column_statistics()); - processMap.put("create_function", new create_function()); - processMap.put("drop_function", new drop_function()); - processMap.put("alter_function", new alter_function()); - processMap.put("get_functions", new get_functions()); - processMap.put("get_function", new get_function()); - processMap.put("get_all_functions", new get_all_functions()); - processMap.put("create_role", new create_role()); - processMap.put("drop_role", new drop_role()); - processMap.put("get_role_names", new get_role_names()); - processMap.put("grant_role", new grant_role()); - processMap.put("revoke_role", new revoke_role()); - processMap.put("list_roles", new list_roles()); - processMap.put("grant_revoke_role", new grant_revoke_role()); - processMap.put("get_principals_in_role", new get_principals_in_role()); - processMap.put("get_role_grants_for_principal", new get_role_grants_for_principal()); - processMap.put("get_privilege_set", new get_privilege_set()); - processMap.put("list_privileges", new list_privileges()); - processMap.put("grant_privileges", new grant_privileges()); - processMap.put("revoke_privileges", new revoke_privileges()); - processMap.put("grant_revoke_privileges", new grant_revoke_privileges()); - processMap.put("set_ugi", new set_ugi()); - processMap.put("get_delegation_token", new get_delegation_token()); - processMap.put("renew_delegation_token", new renew_delegation_token()); - processMap.put("cancel_delegation_token", new cancel_delegation_token()); - processMap.put("add_token", new add_token()); - processMap.put("remove_token", new remove_token()); - processMap.put("get_token", new get_token()); - processMap.put("get_all_token_identifiers", new get_all_token_identifiers()); - processMap.put("add_master_key", new add_master_key()); - processMap.put("update_master_key", new update_master_key()); - processMap.put("remove_master_key", new remove_master_key()); - processMap.put("get_master_keys", new get_master_keys()); - processMap.put("get_open_txns", new get_open_txns()); - processMap.put("get_open_txns_info", new get_open_txns_info()); - processMap.put("open_txns", new open_txns()); - processMap.put("abort_txn", new abort_txn()); - processMap.put("abort_txns", new abort_txns()); - processMap.put("commit_txn", new commit_txn()); - processMap.put("lock", new lock()); - processMap.put("check_lock", new check_lock()); - processMap.put("unlock", new unlock()); - processMap.put("show_locks", new show_locks()); - processMap.put("heartbeat", new heartbeat()); - processMap.put("heartbeat_txn_range", new heartbeat_txn_range()); - processMap.put("compact", new compact()); - processMap.put("compact2", new compact2()); - processMap.put("show_compact", new show_compact()); - processMap.put("add_dynamic_partitions", new add_dynamic_partitions()); - processMap.put("get_next_notification", new get_next_notification()); - processMap.put("get_current_notificationEventId", new get_current_notificationEventId()); - processMap.put("fire_listener_event", new fire_listener_event()); - processMap.put("flushCache", new flushCache()); - processMap.put("cm_recycle", new cm_recycle()); - processMap.put("get_file_metadata_by_expr", new get_file_metadata_by_expr()); - processMap.put("get_file_metadata", new get_file_metadata()); - processMap.put("put_file_metadata", new put_file_metadata()); - processMap.put("clear_file_metadata", new clear_file_metadata()); - processMap.put("cache_file_metadata", new cache_file_metadata()); - processMap.put("get_metastore_db_uuid", new get_metastore_db_uuid()); - return processMap; - } - - public static class getMetaConf extends org.apache.thrift.AsyncProcessFunction { - public getMetaConf() { - super("getMetaConf"); - } - - public getMetaConf_args getEmptyArgsInstance() { - return new getMetaConf_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(String o) { - getMetaConf_result result = new getMetaConf_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getMetaConf_result result = new getMetaConf_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getMetaConf_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getMetaConf(args.key,resultHandler); - } - } - - public static class setMetaConf extends org.apache.thrift.AsyncProcessFunction { - public setMetaConf() { - super("setMetaConf"); - } - - public setMetaConf_args getEmptyArgsInstance() { - return new setMetaConf_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - setMetaConf_result result = new setMetaConf_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - setMetaConf_result result = new setMetaConf_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, setMetaConf_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.setMetaConf(args.key, args.value,resultHandler); - } - } - - public static class create_database extends org.apache.thrift.AsyncProcessFunction { - public create_database() { - super("create_database"); - } - - public create_database_args getEmptyArgsInstance() { - return new create_database_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - create_database_result result = new create_database_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - create_database_result result = new create_database_result(); - if (e instanceof AlreadyExistsException) { - result.o1 = (AlreadyExistsException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o2 = (InvalidObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, create_database_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.create_database(args.database,resultHandler); - } - } - - public static class get_database extends org.apache.thrift.AsyncProcessFunction { - public get_database() { - super("get_database"); - } - - public get_database_args getEmptyArgsInstance() { - return new get_database_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Database o) { - get_database_result result = new get_database_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_database_result result = new get_database_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_database_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_database(args.name,resultHandler); - } - } - - public static class drop_database extends org.apache.thrift.AsyncProcessFunction { - public drop_database() { - super("drop_database"); - } - - public drop_database_args getEmptyArgsInstance() { - return new drop_database_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - drop_database_result result = new drop_database_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_database_result result = new drop_database_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof InvalidOperationException) { - result.o2 = (InvalidOperationException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_database_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_database(args.name, args.deleteData, args.cascade,resultHandler); - } - } - - public static class get_databases extends org.apache.thrift.AsyncProcessFunction> { - public get_databases() { - super("get_databases"); - } - - public get_databases_args getEmptyArgsInstance() { - return new get_databases_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_databases_result result = new get_databases_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_databases_result result = new get_databases_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_databases_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_databases(args.pattern,resultHandler); - } - } - - public static class get_all_databases extends org.apache.thrift.AsyncProcessFunction> { - public get_all_databases() { - super("get_all_databases"); - } - - public get_all_databases_args getEmptyArgsInstance() { - return new get_all_databases_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_all_databases_result result = new get_all_databases_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_all_databases_result result = new get_all_databases_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_all_databases_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_all_databases(resultHandler); - } - } - - public static class alter_database extends org.apache.thrift.AsyncProcessFunction { - public alter_database() { - super("alter_database"); - } - - public alter_database_args getEmptyArgsInstance() { - return new alter_database_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - alter_database_result result = new alter_database_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - alter_database_result result = new alter_database_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, alter_database_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.alter_database(args.dbname, args.db,resultHandler); - } - } - - public static class get_type extends org.apache.thrift.AsyncProcessFunction { - public get_type() { - super("get_type"); - } - - public get_type_args getEmptyArgsInstance() { - return new get_type_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Type o) { - get_type_result result = new get_type_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_type_result result = new get_type_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_type_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_type(args.name,resultHandler); - } - } - - public static class create_type extends org.apache.thrift.AsyncProcessFunction { - public create_type() { - super("create_type"); - } - - public create_type_args getEmptyArgsInstance() { - return new create_type_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - create_type_result result = new create_type_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - create_type_result result = new create_type_result(); - if (e instanceof AlreadyExistsException) { - result.o1 = (AlreadyExistsException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o2 = (InvalidObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, create_type_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.create_type(args.type,resultHandler); - } - } - - public static class drop_type extends org.apache.thrift.AsyncProcessFunction { - public drop_type() { - super("drop_type"); - } - - public drop_type_args getEmptyArgsInstance() { - return new drop_type_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - drop_type_result result = new drop_type_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_type_result result = new drop_type_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_type_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_type(args.type,resultHandler); - } - } - - public static class get_type_all extends org.apache.thrift.AsyncProcessFunction> { - public get_type_all() { - super("get_type_all"); - } - - public get_type_all_args getEmptyArgsInstance() { - return new get_type_all_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(Map o) { - get_type_all_result result = new get_type_all_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_type_all_result result = new get_type_all_result(); - if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_type_all_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_type_all(args.name,resultHandler); - } - } - - public static class get_fields extends org.apache.thrift.AsyncProcessFunction> { - public get_fields() { - super("get_fields"); - } - - public get_fields_args getEmptyArgsInstance() { - return new get_fields_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_fields_result result = new get_fields_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_fields_result result = new get_fields_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof UnknownTableException) { - result.o2 = (UnknownTableException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof UnknownDBException) { - result.o3 = (UnknownDBException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_fields_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_fields(args.db_name, args.table_name,resultHandler); - } - } - - public static class get_fields_with_environment_context extends org.apache.thrift.AsyncProcessFunction> { - public get_fields_with_environment_context() { - super("get_fields_with_environment_context"); - } - - public get_fields_with_environment_context_args getEmptyArgsInstance() { - return new get_fields_with_environment_context_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_fields_with_environment_context_result result = new get_fields_with_environment_context_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_fields_with_environment_context_result result = new get_fields_with_environment_context_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof UnknownTableException) { - result.o2 = (UnknownTableException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof UnknownDBException) { - result.o3 = (UnknownDBException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_fields_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_fields_with_environment_context(args.db_name, args.table_name, args.environment_context,resultHandler); - } - } - - public static class get_schema extends org.apache.thrift.AsyncProcessFunction> { - public get_schema() { - super("get_schema"); - } - - public get_schema_args getEmptyArgsInstance() { - return new get_schema_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_schema_result result = new get_schema_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_schema_result result = new get_schema_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof UnknownTableException) { - result.o2 = (UnknownTableException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof UnknownDBException) { - result.o3 = (UnknownDBException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_schema_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_schema(args.db_name, args.table_name,resultHandler); - } - } - - public static class get_schema_with_environment_context extends org.apache.thrift.AsyncProcessFunction> { - public get_schema_with_environment_context() { - super("get_schema_with_environment_context"); - } - - public get_schema_with_environment_context_args getEmptyArgsInstance() { - return new get_schema_with_environment_context_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_schema_with_environment_context_result result = new get_schema_with_environment_context_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_schema_with_environment_context_result result = new get_schema_with_environment_context_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof UnknownTableException) { - result.o2 = (UnknownTableException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof UnknownDBException) { - result.o3 = (UnknownDBException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_schema_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_schema_with_environment_context(args.db_name, args.table_name, args.environment_context,resultHandler); - } - } - - public static class create_table extends org.apache.thrift.AsyncProcessFunction { - public create_table() { - super("create_table"); - } - - public create_table_args getEmptyArgsInstance() { - return new create_table_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - create_table_result result = new create_table_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - create_table_result result = new create_table_result(); - if (e instanceof AlreadyExistsException) { - result.o1 = (AlreadyExistsException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o2 = (InvalidObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o4 = (NoSuchObjectException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, create_table_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.create_table(args.tbl,resultHandler); - } - } - - public static class create_table_with_environment_context extends org.apache.thrift.AsyncProcessFunction { - public create_table_with_environment_context() { - super("create_table_with_environment_context"); - } - - public create_table_with_environment_context_args getEmptyArgsInstance() { - return new create_table_with_environment_context_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - create_table_with_environment_context_result result = new create_table_with_environment_context_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - create_table_with_environment_context_result result = new create_table_with_environment_context_result(); - if (e instanceof AlreadyExistsException) { - result.o1 = (AlreadyExistsException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o2 = (InvalidObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o4 = (NoSuchObjectException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, create_table_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.create_table_with_environment_context(args.tbl, args.environment_context,resultHandler); - } - } - - public static class create_table_with_constraints extends org.apache.thrift.AsyncProcessFunction { - public create_table_with_constraints() { - super("create_table_with_constraints"); - } - - public create_table_with_constraints_args getEmptyArgsInstance() { - return new create_table_with_constraints_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - create_table_with_constraints_result result = new create_table_with_constraints_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - create_table_with_constraints_result result = new create_table_with_constraints_result(); - if (e instanceof AlreadyExistsException) { - result.o1 = (AlreadyExistsException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o2 = (InvalidObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o4 = (NoSuchObjectException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, create_table_with_constraints_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys, args.uniqueConstraints, args.notNullConstraints,resultHandler); - } - } - - public static class drop_constraint extends org.apache.thrift.AsyncProcessFunction { - public drop_constraint() { - super("drop_constraint"); - } - - public drop_constraint_args getEmptyArgsInstance() { - return new drop_constraint_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - drop_constraint_result result = new drop_constraint_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_constraint_result result = new drop_constraint_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_constraint_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_constraint(args.req,resultHandler); - } - } - - public static class add_primary_key extends org.apache.thrift.AsyncProcessFunction { - public add_primary_key() { - super("add_primary_key"); - } - - public add_primary_key_args getEmptyArgsInstance() { - return new add_primary_key_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - add_primary_key_result result = new add_primary_key_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_primary_key_result result = new add_primary_key_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_primary_key_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_primary_key(args.req,resultHandler); - } - } - - public static class add_foreign_key extends org.apache.thrift.AsyncProcessFunction { - public add_foreign_key() { - super("add_foreign_key"); - } - - public add_foreign_key_args getEmptyArgsInstance() { - return new add_foreign_key_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - add_foreign_key_result result = new add_foreign_key_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_foreign_key_result result = new add_foreign_key_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_foreign_key_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_foreign_key(args.req,resultHandler); - } - } - - public static class add_unique_constraint extends org.apache.thrift.AsyncProcessFunction { - public add_unique_constraint() { - super("add_unique_constraint"); - } - - public add_unique_constraint_args getEmptyArgsInstance() { - return new add_unique_constraint_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - add_unique_constraint_result result = new add_unique_constraint_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_unique_constraint_result result = new add_unique_constraint_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_unique_constraint_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_unique_constraint(args.req,resultHandler); - } - } - - public static class add_not_null_constraint extends org.apache.thrift.AsyncProcessFunction { - public add_not_null_constraint() { - super("add_not_null_constraint"); - } - - public add_not_null_constraint_args getEmptyArgsInstance() { - return new add_not_null_constraint_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - add_not_null_constraint_result result = new add_not_null_constraint_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_not_null_constraint_result result = new add_not_null_constraint_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_not_null_constraint_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_not_null_constraint(args.req,resultHandler); - } - } - - public static class drop_table extends org.apache.thrift.AsyncProcessFunction { - public drop_table() { - super("drop_table"); - } - - public drop_table_args getEmptyArgsInstance() { - return new drop_table_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - drop_table_result result = new drop_table_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_table_result result = new drop_table_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_table_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_table(args.dbname, args.name, args.deleteData,resultHandler); - } - } - - public static class drop_table_with_environment_context extends org.apache.thrift.AsyncProcessFunction { - public drop_table_with_environment_context() { - super("drop_table_with_environment_context"); - } - - public drop_table_with_environment_context_args getEmptyArgsInstance() { - return new drop_table_with_environment_context_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - drop_table_with_environment_context_result result = new drop_table_with_environment_context_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_table_with_environment_context_result result = new drop_table_with_environment_context_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_table_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context,resultHandler); - } - } - - public static class truncate_table extends org.apache.thrift.AsyncProcessFunction { - public truncate_table() { - super("truncate_table"); - } - - public truncate_table_args getEmptyArgsInstance() { - return new truncate_table_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - truncate_table_result result = new truncate_table_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - truncate_table_result result = new truncate_table_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, truncate_table_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.truncate_table(args.dbName, args.tableName, args.partNames,resultHandler); - } - } - - public static class get_tables extends org.apache.thrift.AsyncProcessFunction> { - public get_tables() { - super("get_tables"); - } - - public get_tables_args getEmptyArgsInstance() { - return new get_tables_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_tables_result result = new get_tables_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_tables_result result = new get_tables_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_tables_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_tables(args.db_name, args.pattern,resultHandler); - } - } - - public static class get_tables_by_type extends org.apache.thrift.AsyncProcessFunction> { - public get_tables_by_type() { - super("get_tables_by_type"); - } - - public get_tables_by_type_args getEmptyArgsInstance() { - return new get_tables_by_type_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_tables_by_type_result result = new get_tables_by_type_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_tables_by_type_result result = new get_tables_by_type_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_tables_by_type_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_tables_by_type(args.db_name, args.pattern, args.tableType,resultHandler); - } - } - - public static class get_table_meta extends org.apache.thrift.AsyncProcessFunction> { - public get_table_meta() { - super("get_table_meta"); - } - - public get_table_meta_args getEmptyArgsInstance() { - return new get_table_meta_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_table_meta_result result = new get_table_meta_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_table_meta_result result = new get_table_meta_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_table_meta_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_table_meta(args.db_patterns, args.tbl_patterns, args.tbl_types,resultHandler); - } - } - - public static class get_all_tables extends org.apache.thrift.AsyncProcessFunction> { - public get_all_tables() { - super("get_all_tables"); - } - - public get_all_tables_args getEmptyArgsInstance() { - return new get_all_tables_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_all_tables_result result = new get_all_tables_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_all_tables_result result = new get_all_tables_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_all_tables_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_all_tables(args.db_name,resultHandler); - } - } - - public static class get_table extends org.apache.thrift.AsyncProcessFunction { - public get_table() { - super("get_table"); - } - - public get_table_args getEmptyArgsInstance() { - return new get_table_args(); - } - - public AsyncMethodCallback
getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback
() { - public void onComplete(Table o) { - get_table_result result = new get_table_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_table_result result = new get_table_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_table_args args, org.apache.thrift.async.AsyncMethodCallback
resultHandler) throws TException { - iface.get_table(args.dbname, args.tbl_name,resultHandler); - } - } - - public static class get_table_objects_by_name extends org.apache.thrift.AsyncProcessFunction> { - public get_table_objects_by_name() { - super("get_table_objects_by_name"); - } - - public get_table_objects_by_name_args getEmptyArgsInstance() { - return new get_table_objects_by_name_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List
o) { - get_table_objects_by_name_result result = new get_table_objects_by_name_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_table_objects_by_name_result result = new get_table_objects_by_name_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_table_objects_by_name_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_table_objects_by_name(args.dbname, args.tbl_names,resultHandler); - } - } - - public static class get_table_req extends org.apache.thrift.AsyncProcessFunction { - public get_table_req() { - super("get_table_req"); - } - - public get_table_req_args getEmptyArgsInstance() { - return new get_table_req_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(GetTableResult o) { - get_table_req_result result = new get_table_req_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_table_req_result result = new get_table_req_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_table_req_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_table_req(args.req,resultHandler); - } - } - - public static class get_table_objects_by_name_req extends org.apache.thrift.AsyncProcessFunction { - public get_table_objects_by_name_req() { - super("get_table_objects_by_name_req"); - } - - public get_table_objects_by_name_req_args getEmptyArgsInstance() { - return new get_table_objects_by_name_req_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(GetTablesResult o) { - get_table_objects_by_name_req_result result = new get_table_objects_by_name_req_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_table_objects_by_name_req_result result = new get_table_objects_by_name_req_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof InvalidOperationException) { - result.o2 = (InvalidOperationException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof UnknownDBException) { - result.o3 = (UnknownDBException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_table_objects_by_name_req_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_table_objects_by_name_req(args.req,resultHandler); - } - } - - public static class get_table_names_by_filter extends org.apache.thrift.AsyncProcessFunction> { - public get_table_names_by_filter() { - super("get_table_names_by_filter"); - } - - public get_table_names_by_filter_args getEmptyArgsInstance() { - return new get_table_names_by_filter_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_table_names_by_filter_result result = new get_table_names_by_filter_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_table_names_by_filter_result result = new get_table_names_by_filter_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof InvalidOperationException) { - result.o2 = (InvalidOperationException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof UnknownDBException) { - result.o3 = (UnknownDBException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_table_names_by_filter_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_table_names_by_filter(args.dbname, args.filter, args.max_tables,resultHandler); - } - } - - public static class alter_table extends org.apache.thrift.AsyncProcessFunction { - public alter_table() { - super("alter_table"); - } - - public alter_table_args getEmptyArgsInstance() { - return new alter_table_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - alter_table_result result = new alter_table_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - alter_table_result result = new alter_table_result(); - if (e instanceof InvalidOperationException) { - result.o1 = (InvalidOperationException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, alter_table_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.alter_table(args.dbname, args.tbl_name, args.new_tbl,resultHandler); - } - } - - public static class alter_table_with_environment_context extends org.apache.thrift.AsyncProcessFunction { - public alter_table_with_environment_context() { - super("alter_table_with_environment_context"); - } - - public alter_table_with_environment_context_args getEmptyArgsInstance() { - return new alter_table_with_environment_context_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - alter_table_with_environment_context_result result = new alter_table_with_environment_context_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - alter_table_with_environment_context_result result = new alter_table_with_environment_context_result(); - if (e instanceof InvalidOperationException) { - result.o1 = (InvalidOperationException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, alter_table_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context,resultHandler); - } - } - - public static class alter_table_with_cascade extends org.apache.thrift.AsyncProcessFunction { - public alter_table_with_cascade() { - super("alter_table_with_cascade"); - } - - public alter_table_with_cascade_args getEmptyArgsInstance() { - return new alter_table_with_cascade_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - alter_table_with_cascade_result result = new alter_table_with_cascade_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - alter_table_with_cascade_result result = new alter_table_with_cascade_result(); - if (e instanceof InvalidOperationException) { - result.o1 = (InvalidOperationException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, alter_table_with_cascade_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade,resultHandler); - } - } - - public static class add_partition extends org.apache.thrift.AsyncProcessFunction { - public add_partition() { - super("add_partition"); - } - - public add_partition_args getEmptyArgsInstance() { - return new add_partition_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Partition o) { - add_partition_result result = new add_partition_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_partition_result result = new add_partition_result(); - if (e instanceof InvalidObjectException) { - result.o1 = (InvalidObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof AlreadyExistsException) { - result.o2 = (AlreadyExistsException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_partition(args.new_part,resultHandler); - } - } - - public static class add_partition_with_environment_context extends org.apache.thrift.AsyncProcessFunction { - public add_partition_with_environment_context() { - super("add_partition_with_environment_context"); - } - - public add_partition_with_environment_context_args getEmptyArgsInstance() { - return new add_partition_with_environment_context_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Partition o) { - add_partition_with_environment_context_result result = new add_partition_with_environment_context_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_partition_with_environment_context_result result = new add_partition_with_environment_context_result(); - if (e instanceof InvalidObjectException) { - result.o1 = (InvalidObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof AlreadyExistsException) { - result.o2 = (AlreadyExistsException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_partition_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_partition_with_environment_context(args.new_part, args.environment_context,resultHandler); - } - } - - public static class add_partitions extends org.apache.thrift.AsyncProcessFunction { - public add_partitions() { - super("add_partitions"); - } - - public add_partitions_args getEmptyArgsInstance() { - return new add_partitions_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Integer o) { - add_partitions_result result = new add_partitions_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_partitions_result result = new add_partitions_result(); - if (e instanceof InvalidObjectException) { - result.o1 = (InvalidObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof AlreadyExistsException) { - result.o2 = (AlreadyExistsException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_partitions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_partitions(args.new_parts,resultHandler); - } - } - - public static class add_partitions_pspec extends org.apache.thrift.AsyncProcessFunction { - public add_partitions_pspec() { - super("add_partitions_pspec"); - } - - public add_partitions_pspec_args getEmptyArgsInstance() { - return new add_partitions_pspec_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Integer o) { - add_partitions_pspec_result result = new add_partitions_pspec_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_partitions_pspec_result result = new add_partitions_pspec_result(); - if (e instanceof InvalidObjectException) { - result.o1 = (InvalidObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof AlreadyExistsException) { - result.o2 = (AlreadyExistsException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_partitions_pspec_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_partitions_pspec(args.new_parts,resultHandler); - } - } - - public static class append_partition extends org.apache.thrift.AsyncProcessFunction { - public append_partition() { - super("append_partition"); - } - - public append_partition_args getEmptyArgsInstance() { - return new append_partition_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Partition o) { - append_partition_result result = new append_partition_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - append_partition_result result = new append_partition_result(); - if (e instanceof InvalidObjectException) { - result.o1 = (InvalidObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof AlreadyExistsException) { - result.o2 = (AlreadyExistsException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, append_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.append_partition(args.db_name, args.tbl_name, args.part_vals,resultHandler); - } - } - - public static class add_partitions_req extends org.apache.thrift.AsyncProcessFunction { - public add_partitions_req() { - super("add_partitions_req"); - } - - public add_partitions_req_args getEmptyArgsInstance() { - return new add_partitions_req_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(AddPartitionsResult o) { - add_partitions_req_result result = new add_partitions_req_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_partitions_req_result result = new add_partitions_req_result(); - if (e instanceof InvalidObjectException) { - result.o1 = (InvalidObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof AlreadyExistsException) { - result.o2 = (AlreadyExistsException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_partitions_req_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_partitions_req(args.request,resultHandler); - } - } - - public static class append_partition_with_environment_context extends org.apache.thrift.AsyncProcessFunction { - public append_partition_with_environment_context() { - super("append_partition_with_environment_context"); - } - - public append_partition_with_environment_context_args getEmptyArgsInstance() { - return new append_partition_with_environment_context_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Partition o) { - append_partition_with_environment_context_result result = new append_partition_with_environment_context_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - append_partition_with_environment_context_result result = new append_partition_with_environment_context_result(); - if (e instanceof InvalidObjectException) { - result.o1 = (InvalidObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof AlreadyExistsException) { - result.o2 = (AlreadyExistsException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, append_partition_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.append_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.environment_context,resultHandler); - } - } - - public static class append_partition_by_name extends org.apache.thrift.AsyncProcessFunction { - public append_partition_by_name() { - super("append_partition_by_name"); - } - - public append_partition_by_name_args getEmptyArgsInstance() { - return new append_partition_by_name_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Partition o) { - append_partition_by_name_result result = new append_partition_by_name_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - append_partition_by_name_result result = new append_partition_by_name_result(); - if (e instanceof InvalidObjectException) { - result.o1 = (InvalidObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof AlreadyExistsException) { - result.o2 = (AlreadyExistsException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, append_partition_by_name_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.append_partition_by_name(args.db_name, args.tbl_name, args.part_name,resultHandler); - } - } - - public static class append_partition_by_name_with_environment_context extends org.apache.thrift.AsyncProcessFunction { - public append_partition_by_name_with_environment_context() { - super("append_partition_by_name_with_environment_context"); - } - - public append_partition_by_name_with_environment_context_args getEmptyArgsInstance() { - return new append_partition_by_name_with_environment_context_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Partition o) { - append_partition_by_name_with_environment_context_result result = new append_partition_by_name_with_environment_context_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - append_partition_by_name_with_environment_context_result result = new append_partition_by_name_with_environment_context_result(); - if (e instanceof InvalidObjectException) { - result.o1 = (InvalidObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof AlreadyExistsException) { - result.o2 = (AlreadyExistsException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, append_partition_by_name_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.append_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.environment_context,resultHandler); - } - } - - public static class drop_partition extends org.apache.thrift.AsyncProcessFunction { - public drop_partition() { - super("drop_partition"); - } - - public drop_partition_args getEmptyArgsInstance() { - return new drop_partition_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - drop_partition_result result = new drop_partition_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_partition_result result = new drop_partition_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData,resultHandler); - } - } - - public static class drop_partition_with_environment_context extends org.apache.thrift.AsyncProcessFunction { - public drop_partition_with_environment_context() { - super("drop_partition_with_environment_context"); - } - - public drop_partition_with_environment_context_args getEmptyArgsInstance() { - return new drop_partition_with_environment_context_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - drop_partition_with_environment_context_result result = new drop_partition_with_environment_context_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_partition_with_environment_context_result result = new drop_partition_with_environment_context_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_partition_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context,resultHandler); - } - } - - public static class drop_partition_by_name extends org.apache.thrift.AsyncProcessFunction { - public drop_partition_by_name() { - super("drop_partition_by_name"); - } - - public drop_partition_by_name_args getEmptyArgsInstance() { - return new drop_partition_by_name_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - drop_partition_by_name_result result = new drop_partition_by_name_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_partition_by_name_result result = new drop_partition_by_name_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_partition_by_name_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData,resultHandler); - } - } - - public static class drop_partition_by_name_with_environment_context extends org.apache.thrift.AsyncProcessFunction { - public drop_partition_by_name_with_environment_context() { - super("drop_partition_by_name_with_environment_context"); - } - - public drop_partition_by_name_with_environment_context_args getEmptyArgsInstance() { - return new drop_partition_by_name_with_environment_context_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - drop_partition_by_name_with_environment_context_result result = new drop_partition_by_name_with_environment_context_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_partition_by_name_with_environment_context_result result = new drop_partition_by_name_with_environment_context_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_partition_by_name_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context,resultHandler); - } - } - - public static class drop_partitions_req extends org.apache.thrift.AsyncProcessFunction { - public drop_partitions_req() { - super("drop_partitions_req"); - } - - public drop_partitions_req_args getEmptyArgsInstance() { - return new drop_partitions_req_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(DropPartitionsResult o) { - drop_partitions_req_result result = new drop_partitions_req_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_partitions_req_result result = new drop_partitions_req_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_partitions_req_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_partitions_req(args.req,resultHandler); - } - } - - public static class get_partition extends org.apache.thrift.AsyncProcessFunction { - public get_partition() { - super("get_partition"); - } - - public get_partition_args getEmptyArgsInstance() { - return new get_partition_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Partition o) { - get_partition_result result = new get_partition_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partition_result result = new get_partition_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_partition(args.db_name, args.tbl_name, args.part_vals,resultHandler); - } - } - - public static class exchange_partition extends org.apache.thrift.AsyncProcessFunction { - public exchange_partition() { - super("exchange_partition"); - } - - public exchange_partition_args getEmptyArgsInstance() { - return new exchange_partition_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Partition o) { - exchange_partition_result result = new exchange_partition_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - exchange_partition_result result = new exchange_partition_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o3 = (InvalidObjectException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof InvalidInputException) { - result.o4 = (InvalidInputException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, exchange_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.exchange_partition(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name,resultHandler); - } - } - - public static class exchange_partitions extends org.apache.thrift.AsyncProcessFunction> { - public exchange_partitions() { - super("exchange_partitions"); - } - - public exchange_partitions_args getEmptyArgsInstance() { - return new exchange_partitions_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - exchange_partitions_result result = new exchange_partitions_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - exchange_partitions_result result = new exchange_partitions_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o3 = (InvalidObjectException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof InvalidInputException) { - result.o4 = (InvalidInputException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, exchange_partitions_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.exchange_partitions(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name,resultHandler); - } - } - - public static class get_partition_with_auth extends org.apache.thrift.AsyncProcessFunction { - public get_partition_with_auth() { - super("get_partition_with_auth"); - } - - public get_partition_with_auth_args getEmptyArgsInstance() { - return new get_partition_with_auth_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Partition o) { - get_partition_with_auth_result result = new get_partition_with_auth_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partition_with_auth_result result = new get_partition_with_auth_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partition_with_auth_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names,resultHandler); - } - } - - public static class get_partition_by_name extends org.apache.thrift.AsyncProcessFunction { - public get_partition_by_name() { - super("get_partition_by_name"); - } - - public get_partition_by_name_args getEmptyArgsInstance() { - return new get_partition_by_name_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Partition o) { - get_partition_by_name_result result = new get_partition_by_name_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partition_by_name_result result = new get_partition_by_name_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partition_by_name_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_partition_by_name(args.db_name, args.tbl_name, args.part_name,resultHandler); - } - } - - public static class get_partitions extends org.apache.thrift.AsyncProcessFunction> { - public get_partitions() { - super("get_partitions"); - } - - public get_partitions_args getEmptyArgsInstance() { - return new get_partitions_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_partitions_result result = new get_partitions_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partitions_result result = new get_partitions_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partitions_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_partitions(args.db_name, args.tbl_name, args.max_parts,resultHandler); - } - } - - public static class get_partitions_with_auth extends org.apache.thrift.AsyncProcessFunction> { - public get_partitions_with_auth() { - super("get_partitions_with_auth"); - } - - public get_partitions_with_auth_args getEmptyArgsInstance() { - return new get_partitions_with_auth_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_partitions_with_auth_result result = new get_partitions_with_auth_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partitions_with_auth_result result = new get_partitions_with_auth_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partitions_with_auth_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names,resultHandler); - } - } - - public static class get_partitions_pspec extends org.apache.thrift.AsyncProcessFunction> { - public get_partitions_pspec() { - super("get_partitions_pspec"); - } - - public get_partitions_pspec_args getEmptyArgsInstance() { - return new get_partitions_pspec_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_partitions_pspec_result result = new get_partitions_pspec_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partitions_pspec_result result = new get_partitions_pspec_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partitions_pspec_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_partitions_pspec(args.db_name, args.tbl_name, args.max_parts,resultHandler); - } - } - - public static class get_partition_names extends org.apache.thrift.AsyncProcessFunction> { - public get_partition_names() { - super("get_partition_names"); - } - - public get_partition_names_args getEmptyArgsInstance() { - return new get_partition_names_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_partition_names_result result = new get_partition_names_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partition_names_result result = new get_partition_names_result(); - if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partition_names_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_partition_names(args.db_name, args.tbl_name, args.max_parts,resultHandler); - } - } - - public static class get_partitions_ps extends org.apache.thrift.AsyncProcessFunction> { - public get_partitions_ps() { - super("get_partitions_ps"); - } - - public get_partitions_ps_args getEmptyArgsInstance() { - return new get_partitions_ps_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_partitions_ps_result result = new get_partitions_ps_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partitions_ps_result result = new get_partitions_ps_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partitions_ps_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts,resultHandler); - } - } - - public static class get_partitions_ps_with_auth extends org.apache.thrift.AsyncProcessFunction> { - public get_partitions_ps_with_auth() { - super("get_partitions_ps_with_auth"); - } - - public get_partitions_ps_with_auth_args getEmptyArgsInstance() { - return new get_partitions_ps_with_auth_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partitions_ps_with_auth_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names,resultHandler); - } - } - - public static class get_partition_names_ps extends org.apache.thrift.AsyncProcessFunction> { - public get_partition_names_ps() { - super("get_partition_names_ps"); - } - - public get_partition_names_ps_args getEmptyArgsInstance() { - return new get_partition_names_ps_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_partition_names_ps_result result = new get_partition_names_ps_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partition_names_ps_result result = new get_partition_names_ps_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partition_names_ps_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts,resultHandler); - } - } - - public static class get_partitions_by_filter extends org.apache.thrift.AsyncProcessFunction> { - public get_partitions_by_filter() { - super("get_partitions_by_filter"); - } - - public get_partitions_by_filter_args getEmptyArgsInstance() { - return new get_partitions_by_filter_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_partitions_by_filter_result result = new get_partitions_by_filter_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partitions_by_filter_result result = new get_partitions_by_filter_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partitions_by_filter_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts,resultHandler); - } - } - - public static class get_part_specs_by_filter extends org.apache.thrift.AsyncProcessFunction> { - public get_part_specs_by_filter() { - super("get_part_specs_by_filter"); - } - - public get_part_specs_by_filter_args getEmptyArgsInstance() { - return new get_part_specs_by_filter_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_part_specs_by_filter_result result = new get_part_specs_by_filter_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_part_specs_by_filter_result result = new get_part_specs_by_filter_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_part_specs_by_filter_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_part_specs_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts,resultHandler); - } - } - - public static class get_partitions_by_expr extends org.apache.thrift.AsyncProcessFunction { - public get_partitions_by_expr() { - super("get_partitions_by_expr"); - } - - public get_partitions_by_expr_args getEmptyArgsInstance() { - return new get_partitions_by_expr_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(PartitionsByExprResult o) { - get_partitions_by_expr_result result = new get_partitions_by_expr_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partitions_by_expr_result result = new get_partitions_by_expr_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partitions_by_expr_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_partitions_by_expr(args.req,resultHandler); - } - } - - public static class get_num_partitions_by_filter extends org.apache.thrift.AsyncProcessFunction { - public get_num_partitions_by_filter() { - super("get_num_partitions_by_filter"); - } - - public get_num_partitions_by_filter_args getEmptyArgsInstance() { - return new get_num_partitions_by_filter_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Integer o) { - get_num_partitions_by_filter_result result = new get_num_partitions_by_filter_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_num_partitions_by_filter_result result = new get_num_partitions_by_filter_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_num_partitions_by_filter_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter,resultHandler); - } - } - - public static class get_partitions_by_names extends org.apache.thrift.AsyncProcessFunction> { - public get_partitions_by_names() { - super("get_partitions_by_names"); - } - - public get_partitions_by_names_args getEmptyArgsInstance() { - return new get_partitions_by_names_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_partitions_by_names_result result = new get_partitions_by_names_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partitions_by_names_result result = new get_partitions_by_names_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partitions_by_names_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_partitions_by_names(args.db_name, args.tbl_name, args.names,resultHandler); - } - } - - public static class alter_partition extends org.apache.thrift.AsyncProcessFunction { - public alter_partition() { - super("alter_partition"); - } - - public alter_partition_args getEmptyArgsInstance() { - return new alter_partition_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - alter_partition_result result = new alter_partition_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - alter_partition_result result = new alter_partition_result(); - if (e instanceof InvalidOperationException) { - result.o1 = (InvalidOperationException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, alter_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.alter_partition(args.db_name, args.tbl_name, args.new_part,resultHandler); - } - } - - public static class alter_partitions extends org.apache.thrift.AsyncProcessFunction { - public alter_partitions() { - super("alter_partitions"); - } - - public alter_partitions_args getEmptyArgsInstance() { - return new alter_partitions_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - alter_partitions_result result = new alter_partitions_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - alter_partitions_result result = new alter_partitions_result(); - if (e instanceof InvalidOperationException) { - result.o1 = (InvalidOperationException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, alter_partitions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.alter_partitions(args.db_name, args.tbl_name, args.new_parts,resultHandler); - } - } - - public static class alter_partitions_with_environment_context extends org.apache.thrift.AsyncProcessFunction { - public alter_partitions_with_environment_context() { - super("alter_partitions_with_environment_context"); - } - - public alter_partitions_with_environment_context_args getEmptyArgsInstance() { - return new alter_partitions_with_environment_context_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - alter_partitions_with_environment_context_result result = new alter_partitions_with_environment_context_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - alter_partitions_with_environment_context_result result = new alter_partitions_with_environment_context_result(); - if (e instanceof InvalidOperationException) { - result.o1 = (InvalidOperationException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, alter_partitions_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context,resultHandler); - } - } - - public static class alter_partition_with_environment_context extends org.apache.thrift.AsyncProcessFunction { - public alter_partition_with_environment_context() { - super("alter_partition_with_environment_context"); - } - - public alter_partition_with_environment_context_args getEmptyArgsInstance() { - return new alter_partition_with_environment_context_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - alter_partition_with_environment_context_result result = new alter_partition_with_environment_context_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - alter_partition_with_environment_context_result result = new alter_partition_with_environment_context_result(); - if (e instanceof InvalidOperationException) { - result.o1 = (InvalidOperationException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, alter_partition_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context,resultHandler); - } - } - - public static class rename_partition extends org.apache.thrift.AsyncProcessFunction { - public rename_partition() { - super("rename_partition"); - } - - public rename_partition_args getEmptyArgsInstance() { - return new rename_partition_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - rename_partition_result result = new rename_partition_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - rename_partition_result result = new rename_partition_result(); - if (e instanceof InvalidOperationException) { - result.o1 = (InvalidOperationException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, rename_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part,resultHandler); - } - } - - public static class partition_name_has_valid_characters extends org.apache.thrift.AsyncProcessFunction { - public partition_name_has_valid_characters() { - super("partition_name_has_valid_characters"); - } - - public partition_name_has_valid_characters_args getEmptyArgsInstance() { - return new partition_name_has_valid_characters_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, partition_name_has_valid_characters_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.partition_name_has_valid_characters(args.part_vals, args.throw_exception,resultHandler); - } - } - - public static class get_config_value extends org.apache.thrift.AsyncProcessFunction { - public get_config_value() { - super("get_config_value"); - } - - public get_config_value_args getEmptyArgsInstance() { - return new get_config_value_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(String o) { - get_config_value_result result = new get_config_value_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_config_value_result result = new get_config_value_result(); - if (e instanceof ConfigValSecurityException) { - result.o1 = (ConfigValSecurityException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_config_value_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_config_value(args.name, args.defaultValue,resultHandler); - } - } - - public static class partition_name_to_vals extends org.apache.thrift.AsyncProcessFunction> { - public partition_name_to_vals() { - super("partition_name_to_vals"); - } - - public partition_name_to_vals_args getEmptyArgsInstance() { - return new partition_name_to_vals_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - partition_name_to_vals_result result = new partition_name_to_vals_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - partition_name_to_vals_result result = new partition_name_to_vals_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, partition_name_to_vals_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.partition_name_to_vals(args.part_name,resultHandler); - } - } - - public static class partition_name_to_spec extends org.apache.thrift.AsyncProcessFunction> { - public partition_name_to_spec() { - super("partition_name_to_spec"); - } - - public partition_name_to_spec_args getEmptyArgsInstance() { - return new partition_name_to_spec_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(Map o) { - partition_name_to_spec_result result = new partition_name_to_spec_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - partition_name_to_spec_result result = new partition_name_to_spec_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, partition_name_to_spec_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.partition_name_to_spec(args.part_name,resultHandler); - } - } - - public static class markPartitionForEvent extends org.apache.thrift.AsyncProcessFunction { - public markPartitionForEvent() { - super("markPartitionForEvent"); - } - - public markPartitionForEvent_args getEmptyArgsInstance() { - return new markPartitionForEvent_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - markPartitionForEvent_result result = new markPartitionForEvent_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - markPartitionForEvent_result result = new markPartitionForEvent_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof UnknownDBException) { - result.o3 = (UnknownDBException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof UnknownTableException) { - result.o4 = (UnknownTableException) e; - result.setO4IsSet(true); - msg = result; - } - else if (e instanceof UnknownPartitionException) { - result.o5 = (UnknownPartitionException) e; - result.setO5IsSet(true); - msg = result; - } - else if (e instanceof InvalidPartitionException) { - result.o6 = (InvalidPartitionException) e; - result.setO6IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, markPartitionForEvent_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType,resultHandler); - } - } - - public static class isPartitionMarkedForEvent extends org.apache.thrift.AsyncProcessFunction { - public isPartitionMarkedForEvent() { - super("isPartitionMarkedForEvent"); - } - - public isPartitionMarkedForEvent_args getEmptyArgsInstance() { - return new isPartitionMarkedForEvent_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - isPartitionMarkedForEvent_result result = new isPartitionMarkedForEvent_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - isPartitionMarkedForEvent_result result = new isPartitionMarkedForEvent_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof UnknownDBException) { - result.o3 = (UnknownDBException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof UnknownTableException) { - result.o4 = (UnknownTableException) e; - result.setO4IsSet(true); - msg = result; - } - else if (e instanceof UnknownPartitionException) { - result.o5 = (UnknownPartitionException) e; - result.setO5IsSet(true); - msg = result; - } - else if (e instanceof InvalidPartitionException) { - result.o6 = (InvalidPartitionException) e; - result.setO6IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, isPartitionMarkedForEvent_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType,resultHandler); - } - } - - public static class add_index extends org.apache.thrift.AsyncProcessFunction { - public add_index() { - super("add_index"); - } - - public add_index_args getEmptyArgsInstance() { - return new add_index_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Index o) { - add_index_result result = new add_index_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_index_result result = new add_index_result(); - if (e instanceof InvalidObjectException) { - result.o1 = (InvalidObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof AlreadyExistsException) { - result.o2 = (AlreadyExistsException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_index_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_index(args.new_index, args.index_table,resultHandler); - } - } - - public static class alter_index extends org.apache.thrift.AsyncProcessFunction { - public alter_index() { - super("alter_index"); - } - - public alter_index_args getEmptyArgsInstance() { - return new alter_index_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - alter_index_result result = new alter_index_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - alter_index_result result = new alter_index_result(); - if (e instanceof InvalidOperationException) { - result.o1 = (InvalidOperationException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, alter_index_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx,resultHandler); - } - } - - public static class drop_index_by_name extends org.apache.thrift.AsyncProcessFunction { - public drop_index_by_name() { - super("drop_index_by_name"); - } - - public drop_index_by_name_args getEmptyArgsInstance() { - return new drop_index_by_name_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - drop_index_by_name_result result = new drop_index_by_name_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_index_by_name_result result = new drop_index_by_name_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_index_by_name_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData,resultHandler); - } - } - - public static class get_index_by_name extends org.apache.thrift.AsyncProcessFunction { - public get_index_by_name() { - super("get_index_by_name"); - } - - public get_index_by_name_args getEmptyArgsInstance() { - return new get_index_by_name_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Index o) { - get_index_by_name_result result = new get_index_by_name_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_index_by_name_result result = new get_index_by_name_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_index_by_name_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_index_by_name(args.db_name, args.tbl_name, args.index_name,resultHandler); - } - } - - public static class get_indexes extends org.apache.thrift.AsyncProcessFunction> { - public get_indexes() { - super("get_indexes"); - } - - public get_indexes_args getEmptyArgsInstance() { - return new get_indexes_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_indexes_result result = new get_indexes_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_indexes_result result = new get_indexes_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_indexes_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_indexes(args.db_name, args.tbl_name, args.max_indexes,resultHandler); - } - } - - public static class get_index_names extends org.apache.thrift.AsyncProcessFunction> { - public get_index_names() { - super("get_index_names"); - } - - public get_index_names_args getEmptyArgsInstance() { - return new get_index_names_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_index_names_result result = new get_index_names_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_index_names_result result = new get_index_names_result(); - if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_index_names_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_index_names(args.db_name, args.tbl_name, args.max_indexes,resultHandler); - } - } - - public static class get_primary_keys extends org.apache.thrift.AsyncProcessFunction { - public get_primary_keys() { - super("get_primary_keys"); - } - - public get_primary_keys_args getEmptyArgsInstance() { - return new get_primary_keys_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(PrimaryKeysResponse o) { - get_primary_keys_result result = new get_primary_keys_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_primary_keys_result result = new get_primary_keys_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_primary_keys_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_primary_keys(args.request,resultHandler); - } - } - - public static class get_foreign_keys extends org.apache.thrift.AsyncProcessFunction { - public get_foreign_keys() { - super("get_foreign_keys"); - } - - public get_foreign_keys_args getEmptyArgsInstance() { - return new get_foreign_keys_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(ForeignKeysResponse o) { - get_foreign_keys_result result = new get_foreign_keys_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_foreign_keys_result result = new get_foreign_keys_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_foreign_keys_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_foreign_keys(args.request,resultHandler); - } - } - - public static class get_unique_constraints extends org.apache.thrift.AsyncProcessFunction { - public get_unique_constraints() { - super("get_unique_constraints"); - } - - public get_unique_constraints_args getEmptyArgsInstance() { - return new get_unique_constraints_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(UniqueConstraintsResponse o) { - get_unique_constraints_result result = new get_unique_constraints_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_unique_constraints_result result = new get_unique_constraints_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_unique_constraints_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_unique_constraints(args.request,resultHandler); - } - } - - public static class get_not_null_constraints extends org.apache.thrift.AsyncProcessFunction { - public get_not_null_constraints() { - super("get_not_null_constraints"); - } - - public get_not_null_constraints_args getEmptyArgsInstance() { - return new get_not_null_constraints_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(NotNullConstraintsResponse o) { - get_not_null_constraints_result result = new get_not_null_constraints_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_not_null_constraints_result result = new get_not_null_constraints_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_not_null_constraints_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_not_null_constraints(args.request,resultHandler); - } - } - - public static class update_table_column_statistics extends org.apache.thrift.AsyncProcessFunction { - public update_table_column_statistics() { - super("update_table_column_statistics"); - } - - public update_table_column_statistics_args getEmptyArgsInstance() { - return new update_table_column_statistics_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - update_table_column_statistics_result result = new update_table_column_statistics_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - update_table_column_statistics_result result = new update_table_column_statistics_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o2 = (InvalidObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof InvalidInputException) { - result.o4 = (InvalidInputException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, update_table_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.update_table_column_statistics(args.stats_obj,resultHandler); - } - } - - public static class update_partition_column_statistics extends org.apache.thrift.AsyncProcessFunction { - public update_partition_column_statistics() { - super("update_partition_column_statistics"); - } - - public update_partition_column_statistics_args getEmptyArgsInstance() { - return new update_partition_column_statistics_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - update_partition_column_statistics_result result = new update_partition_column_statistics_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - update_partition_column_statistics_result result = new update_partition_column_statistics_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o2 = (InvalidObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof InvalidInputException) { - result.o4 = (InvalidInputException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, update_partition_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.update_partition_column_statistics(args.stats_obj,resultHandler); - } - } - - public static class get_table_column_statistics extends org.apache.thrift.AsyncProcessFunction { - public get_table_column_statistics() { - super("get_table_column_statistics"); - } - - public get_table_column_statistics_args getEmptyArgsInstance() { - return new get_table_column_statistics_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(ColumnStatistics o) { - get_table_column_statistics_result result = new get_table_column_statistics_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_table_column_statistics_result result = new get_table_column_statistics_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof InvalidInputException) { - result.o3 = (InvalidInputException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o4 = (InvalidObjectException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_table_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name,resultHandler); - } - } - - public static class get_partition_column_statistics extends org.apache.thrift.AsyncProcessFunction { - public get_partition_column_statistics() { - super("get_partition_column_statistics"); - } - - public get_partition_column_statistics_args getEmptyArgsInstance() { - return new get_partition_column_statistics_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(ColumnStatistics o) { - get_partition_column_statistics_result result = new get_partition_column_statistics_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partition_column_statistics_result result = new get_partition_column_statistics_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof InvalidInputException) { - result.o3 = (InvalidInputException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o4 = (InvalidObjectException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partition_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name,resultHandler); - } - } - - public static class get_table_statistics_req extends org.apache.thrift.AsyncProcessFunction { - public get_table_statistics_req() { - super("get_table_statistics_req"); - } - - public get_table_statistics_req_args getEmptyArgsInstance() { - return new get_table_statistics_req_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TableStatsResult o) { - get_table_statistics_req_result result = new get_table_statistics_req_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_table_statistics_req_result result = new get_table_statistics_req_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_table_statistics_req_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_table_statistics_req(args.request,resultHandler); - } - } - - public static class get_partitions_statistics_req extends org.apache.thrift.AsyncProcessFunction { - public get_partitions_statistics_req() { - super("get_partitions_statistics_req"); - } - - public get_partitions_statistics_req_args getEmptyArgsInstance() { - return new get_partitions_statistics_req_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(PartitionsStatsResult o) { - get_partitions_statistics_req_result result = new get_partitions_statistics_req_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_partitions_statistics_req_result result = new get_partitions_statistics_req_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_partitions_statistics_req_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_partitions_statistics_req(args.request,resultHandler); - } - } - - public static class get_aggr_stats_for extends org.apache.thrift.AsyncProcessFunction { - public get_aggr_stats_for() { - super("get_aggr_stats_for"); - } - - public get_aggr_stats_for_args getEmptyArgsInstance() { - return new get_aggr_stats_for_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(AggrStats o) { - get_aggr_stats_for_result result = new get_aggr_stats_for_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_aggr_stats_for_result result = new get_aggr_stats_for_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_aggr_stats_for_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_aggr_stats_for(args.request,resultHandler); - } - } - - public static class set_aggr_stats_for extends org.apache.thrift.AsyncProcessFunction { - public set_aggr_stats_for() { - super("set_aggr_stats_for"); - } - - public set_aggr_stats_for_args getEmptyArgsInstance() { - return new set_aggr_stats_for_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - set_aggr_stats_for_result result = new set_aggr_stats_for_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - set_aggr_stats_for_result result = new set_aggr_stats_for_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o2 = (InvalidObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof InvalidInputException) { - result.o4 = (InvalidInputException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, set_aggr_stats_for_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.set_aggr_stats_for(args.request,resultHandler); - } - } - - public static class delete_partition_column_statistics extends org.apache.thrift.AsyncProcessFunction { - public delete_partition_column_statistics() { - super("delete_partition_column_statistics"); - } - - public delete_partition_column_statistics_args getEmptyArgsInstance() { - return new delete_partition_column_statistics_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o3 = (InvalidObjectException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof InvalidInputException) { - result.o4 = (InvalidInputException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, delete_partition_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name,resultHandler); - } - } - - public static class delete_table_column_statistics extends org.apache.thrift.AsyncProcessFunction { - public delete_table_column_statistics() { - super("delete_table_column_statistics"); - } - - public delete_table_column_statistics_args getEmptyArgsInstance() { - return new delete_table_column_statistics_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - delete_table_column_statistics_result result = new delete_table_column_statistics_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - delete_table_column_statistics_result result = new delete_table_column_statistics_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o3 = (InvalidObjectException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof InvalidInputException) { - result.o4 = (InvalidInputException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, delete_table_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name,resultHandler); - } - } - - public static class create_function extends org.apache.thrift.AsyncProcessFunction { - public create_function() { - super("create_function"); - } - - public create_function_args getEmptyArgsInstance() { - return new create_function_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - create_function_result result = new create_function_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - create_function_result result = new create_function_result(); - if (e instanceof AlreadyExistsException) { - result.o1 = (AlreadyExistsException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof InvalidObjectException) { - result.o2 = (InvalidObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o4 = (NoSuchObjectException) e; - result.setO4IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, create_function_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.create_function(args.func,resultHandler); - } - } - - public static class drop_function extends org.apache.thrift.AsyncProcessFunction { - public drop_function() { - super("drop_function"); - } - - public drop_function_args getEmptyArgsInstance() { - return new drop_function_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - drop_function_result result = new drop_function_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_function_result result = new drop_function_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o3 = (MetaException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_function_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_function(args.dbName, args.funcName,resultHandler); - } - } - - public static class alter_function extends org.apache.thrift.AsyncProcessFunction { - public alter_function() { - super("alter_function"); - } - - public alter_function_args getEmptyArgsInstance() { - return new alter_function_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - alter_function_result result = new alter_function_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - alter_function_result result = new alter_function_result(); - if (e instanceof InvalidOperationException) { - result.o1 = (InvalidOperationException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, alter_function_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.alter_function(args.dbName, args.funcName, args.newFunc,resultHandler); - } - } - - public static class get_functions extends org.apache.thrift.AsyncProcessFunction> { - public get_functions() { - super("get_functions"); - } - - public get_functions_args getEmptyArgsInstance() { - return new get_functions_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_functions_result result = new get_functions_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_functions_result result = new get_functions_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_functions_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_functions(args.dbName, args.pattern,resultHandler); - } - } - - public static class get_function extends org.apache.thrift.AsyncProcessFunction { - public get_function() { - super("get_function"); - } - - public get_function_args getEmptyArgsInstance() { - return new get_function_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Function o) { - get_function_result result = new get_function_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_function_result result = new get_function_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchObjectException) { - result.o2 = (NoSuchObjectException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_function_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_function(args.dbName, args.funcName,resultHandler); - } - } - - public static class get_all_functions extends org.apache.thrift.AsyncProcessFunction { - public get_all_functions() { - super("get_all_functions"); - } - - public get_all_functions_args getEmptyArgsInstance() { - return new get_all_functions_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(GetAllFunctionsResponse o) { - get_all_functions_result result = new get_all_functions_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_all_functions_result result = new get_all_functions_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_all_functions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_all_functions(resultHandler); - } - } - - public static class create_role extends org.apache.thrift.AsyncProcessFunction { - public create_role() { - super("create_role"); - } - - public create_role_args getEmptyArgsInstance() { - return new create_role_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - create_role_result result = new create_role_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - create_role_result result = new create_role_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, create_role_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.create_role(args.role,resultHandler); - } - } - - public static class drop_role extends org.apache.thrift.AsyncProcessFunction { - public drop_role() { - super("drop_role"); - } - - public drop_role_args getEmptyArgsInstance() { - return new drop_role_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - drop_role_result result = new drop_role_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - drop_role_result result = new drop_role_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, drop_role_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.drop_role(args.role_name,resultHandler); - } - } - - public static class get_role_names extends org.apache.thrift.AsyncProcessFunction> { - public get_role_names() { - super("get_role_names"); - } - - public get_role_names_args getEmptyArgsInstance() { - return new get_role_names_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_role_names_result result = new get_role_names_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_role_names_result result = new get_role_names_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_role_names_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_role_names(resultHandler); - } - } - - public static class grant_role extends org.apache.thrift.AsyncProcessFunction { - public grant_role() { - super("grant_role"); - } - - public grant_role_args getEmptyArgsInstance() { - return new grant_role_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - grant_role_result result = new grant_role_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - grant_role_result result = new grant_role_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, grant_role_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option,resultHandler); - } - } - - public static class revoke_role extends org.apache.thrift.AsyncProcessFunction { - public revoke_role() { - super("revoke_role"); - } - - public revoke_role_args getEmptyArgsInstance() { - return new revoke_role_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - revoke_role_result result = new revoke_role_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - revoke_role_result result = new revoke_role_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, revoke_role_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.revoke_role(args.role_name, args.principal_name, args.principal_type,resultHandler); - } - } - - public static class list_roles extends org.apache.thrift.AsyncProcessFunction> { - public list_roles() { - super("list_roles"); - } - - public list_roles_args getEmptyArgsInstance() { - return new list_roles_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - list_roles_result result = new list_roles_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - list_roles_result result = new list_roles_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, list_roles_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.list_roles(args.principal_name, args.principal_type,resultHandler); - } - } - - public static class grant_revoke_role extends org.apache.thrift.AsyncProcessFunction { - public grant_revoke_role() { - super("grant_revoke_role"); - } - - public grant_revoke_role_args getEmptyArgsInstance() { - return new grant_revoke_role_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(GrantRevokeRoleResponse o) { - grant_revoke_role_result result = new grant_revoke_role_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - grant_revoke_role_result result = new grant_revoke_role_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, grant_revoke_role_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.grant_revoke_role(args.request,resultHandler); - } - } - - public static class get_principals_in_role extends org.apache.thrift.AsyncProcessFunction { - public get_principals_in_role() { - super("get_principals_in_role"); - } - - public get_principals_in_role_args getEmptyArgsInstance() { - return new get_principals_in_role_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(GetPrincipalsInRoleResponse o) { - get_principals_in_role_result result = new get_principals_in_role_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_principals_in_role_result result = new get_principals_in_role_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_principals_in_role_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_principals_in_role(args.request,resultHandler); - } - } - - public static class get_role_grants_for_principal extends org.apache.thrift.AsyncProcessFunction { - public get_role_grants_for_principal() { - super("get_role_grants_for_principal"); - } - - public get_role_grants_for_principal_args getEmptyArgsInstance() { - return new get_role_grants_for_principal_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(GetRoleGrantsForPrincipalResponse o) { - get_role_grants_for_principal_result result = new get_role_grants_for_principal_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_role_grants_for_principal_result result = new get_role_grants_for_principal_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_role_grants_for_principal_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_role_grants_for_principal(args.request,resultHandler); - } - } - - public static class get_privilege_set extends org.apache.thrift.AsyncProcessFunction { - public get_privilege_set() { - super("get_privilege_set"); - } - - public get_privilege_set_args getEmptyArgsInstance() { - return new get_privilege_set_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(PrincipalPrivilegeSet o) { - get_privilege_set_result result = new get_privilege_set_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_privilege_set_result result = new get_privilege_set_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_privilege_set_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_privilege_set(args.hiveObject, args.user_name, args.group_names,resultHandler); - } - } - - public static class list_privileges extends org.apache.thrift.AsyncProcessFunction> { - public list_privileges() { - super("list_privileges"); - } - - public list_privileges_args getEmptyArgsInstance() { - return new list_privileges_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - list_privileges_result result = new list_privileges_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - list_privileges_result result = new list_privileges_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, list_privileges_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.list_privileges(args.principal_name, args.principal_type, args.hiveObject,resultHandler); - } - } - - public static class grant_privileges extends org.apache.thrift.AsyncProcessFunction { - public grant_privileges() { - super("grant_privileges"); - } - - public grant_privileges_args getEmptyArgsInstance() { - return new grant_privileges_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - grant_privileges_result result = new grant_privileges_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - grant_privileges_result result = new grant_privileges_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, grant_privileges_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.grant_privileges(args.privileges,resultHandler); - } - } - - public static class revoke_privileges extends org.apache.thrift.AsyncProcessFunction { - public revoke_privileges() { - super("revoke_privileges"); - } - - public revoke_privileges_args getEmptyArgsInstance() { - return new revoke_privileges_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - revoke_privileges_result result = new revoke_privileges_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - revoke_privileges_result result = new revoke_privileges_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, revoke_privileges_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.revoke_privileges(args.privileges,resultHandler); - } - } - - public static class grant_revoke_privileges extends org.apache.thrift.AsyncProcessFunction { - public grant_revoke_privileges() { - super("grant_revoke_privileges"); - } - - public grant_revoke_privileges_args getEmptyArgsInstance() { - return new grant_revoke_privileges_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(GrantRevokePrivilegeResponse o) { - grant_revoke_privileges_result result = new grant_revoke_privileges_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - grant_revoke_privileges_result result = new grant_revoke_privileges_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, grant_revoke_privileges_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.grant_revoke_privileges(args.request,resultHandler); - } - } - - public static class set_ugi extends org.apache.thrift.AsyncProcessFunction> { - public set_ugi() { - super("set_ugi"); - } - - public set_ugi_args getEmptyArgsInstance() { - return new set_ugi_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - set_ugi_result result = new set_ugi_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - set_ugi_result result = new set_ugi_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, set_ugi_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.set_ugi(args.user_name, args.group_names,resultHandler); - } - } - - public static class get_delegation_token extends org.apache.thrift.AsyncProcessFunction { - public get_delegation_token() { - super("get_delegation_token"); - } - - public get_delegation_token_args getEmptyArgsInstance() { - return new get_delegation_token_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(String o) { - get_delegation_token_result result = new get_delegation_token_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_delegation_token_result result = new get_delegation_token_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_delegation_token_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name,resultHandler); - } - } - - public static class renew_delegation_token extends org.apache.thrift.AsyncProcessFunction { - public renew_delegation_token() { - super("renew_delegation_token"); - } - - public renew_delegation_token_args getEmptyArgsInstance() { - return new renew_delegation_token_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Long o) { - renew_delegation_token_result result = new renew_delegation_token_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - renew_delegation_token_result result = new renew_delegation_token_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, renew_delegation_token_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.renew_delegation_token(args.token_str_form,resultHandler); - } - } - - public static class cancel_delegation_token extends org.apache.thrift.AsyncProcessFunction { - public cancel_delegation_token() { - super("cancel_delegation_token"); - } - - public cancel_delegation_token_args getEmptyArgsInstance() { - return new cancel_delegation_token_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - cancel_delegation_token_result result = new cancel_delegation_token_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - cancel_delegation_token_result result = new cancel_delegation_token_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, cancel_delegation_token_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.cancel_delegation_token(args.token_str_form,resultHandler); - } - } - - public static class add_token extends org.apache.thrift.AsyncProcessFunction { - public add_token() { - super("add_token"); - } - - public add_token_args getEmptyArgsInstance() { - return new add_token_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - add_token_result result = new add_token_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_token_result result = new add_token_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_token_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_token(args.token_identifier, args.delegation_token,resultHandler); - } - } - - public static class remove_token extends org.apache.thrift.AsyncProcessFunction { - public remove_token() { - super("remove_token"); - } - - public remove_token_args getEmptyArgsInstance() { - return new remove_token_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - remove_token_result result = new remove_token_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - remove_token_result result = new remove_token_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, remove_token_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.remove_token(args.token_identifier,resultHandler); - } - } - - public static class get_token extends org.apache.thrift.AsyncProcessFunction { - public get_token() { - super("get_token"); - } - - public get_token_args getEmptyArgsInstance() { - return new get_token_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(String o) { - get_token_result result = new get_token_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_token_result result = new get_token_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_token_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_token(args.token_identifier,resultHandler); - } - } - - public static class get_all_token_identifiers extends org.apache.thrift.AsyncProcessFunction> { - public get_all_token_identifiers() { - super("get_all_token_identifiers"); - } - - public get_all_token_identifiers_args getEmptyArgsInstance() { - return new get_all_token_identifiers_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_all_token_identifiers_result result = new get_all_token_identifiers_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_all_token_identifiers_result result = new get_all_token_identifiers_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_all_token_identifiers_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_all_token_identifiers(resultHandler); - } - } - - public static class add_master_key extends org.apache.thrift.AsyncProcessFunction { - public add_master_key() { - super("add_master_key"); - } - - public add_master_key_args getEmptyArgsInstance() { - return new add_master_key_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Integer o) { - add_master_key_result result = new add_master_key_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_master_key_result result = new add_master_key_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_master_key_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_master_key(args.key,resultHandler); - } - } - - public static class update_master_key extends org.apache.thrift.AsyncProcessFunction { - public update_master_key() { - super("update_master_key"); - } - - public update_master_key_args getEmptyArgsInstance() { - return new update_master_key_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - update_master_key_result result = new update_master_key_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - update_master_key_result result = new update_master_key_result(); - if (e instanceof NoSuchObjectException) { - result.o1 = (NoSuchObjectException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof MetaException) { - result.o2 = (MetaException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, update_master_key_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.update_master_key(args.seq_number, args.key,resultHandler); - } - } - - public static class remove_master_key extends org.apache.thrift.AsyncProcessFunction { - public remove_master_key() { - super("remove_master_key"); - } - - public remove_master_key_args getEmptyArgsInstance() { - return new remove_master_key_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - remove_master_key_result result = new remove_master_key_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - remove_master_key_result result = new remove_master_key_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, remove_master_key_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.remove_master_key(args.key_seq,resultHandler); - } - } - - public static class get_master_keys extends org.apache.thrift.AsyncProcessFunction> { - public get_master_keys() { - super("get_master_keys"); - } - - public get_master_keys_args getEmptyArgsInstance() { - return new get_master_keys_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - get_master_keys_result result = new get_master_keys_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_master_keys_result result = new get_master_keys_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_master_keys_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.get_master_keys(resultHandler); - } - } - - public static class get_open_txns extends org.apache.thrift.AsyncProcessFunction { - public get_open_txns() { - super("get_open_txns"); - } - - public get_open_txns_args getEmptyArgsInstance() { - return new get_open_txns_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(GetOpenTxnsResponse o) { - get_open_txns_result result = new get_open_txns_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_open_txns_result result = new get_open_txns_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_open_txns_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_open_txns(resultHandler); - } - } - - public static class get_open_txns_info extends org.apache.thrift.AsyncProcessFunction { - public get_open_txns_info() { - super("get_open_txns_info"); - } - - public get_open_txns_info_args getEmptyArgsInstance() { - return new get_open_txns_info_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(GetOpenTxnsInfoResponse o) { - get_open_txns_info_result result = new get_open_txns_info_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_open_txns_info_result result = new get_open_txns_info_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_open_txns_info_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_open_txns_info(resultHandler); - } - } - - public static class open_txns extends org.apache.thrift.AsyncProcessFunction { - public open_txns() { - super("open_txns"); - } - - public open_txns_args getEmptyArgsInstance() { - return new open_txns_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(OpenTxnsResponse o) { - open_txns_result result = new open_txns_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - open_txns_result result = new open_txns_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, open_txns_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.open_txns(args.rqst,resultHandler); - } - } - - public static class abort_txn extends org.apache.thrift.AsyncProcessFunction { - public abort_txn() { - super("abort_txn"); - } - - public abort_txn_args getEmptyArgsInstance() { - return new abort_txn_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - abort_txn_result result = new abort_txn_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - abort_txn_result result = new abort_txn_result(); - if (e instanceof NoSuchTxnException) { - result.o1 = (NoSuchTxnException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, abort_txn_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.abort_txn(args.rqst,resultHandler); - } - } - - public static class abort_txns extends org.apache.thrift.AsyncProcessFunction { - public abort_txns() { - super("abort_txns"); - } - - public abort_txns_args getEmptyArgsInstance() { - return new abort_txns_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - abort_txns_result result = new abort_txns_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - abort_txns_result result = new abort_txns_result(); - if (e instanceof NoSuchTxnException) { - result.o1 = (NoSuchTxnException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, abort_txns_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.abort_txns(args.rqst,resultHandler); - } - } - - public static class commit_txn extends org.apache.thrift.AsyncProcessFunction { - public commit_txn() { - super("commit_txn"); - } - - public commit_txn_args getEmptyArgsInstance() { - return new commit_txn_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - commit_txn_result result = new commit_txn_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - commit_txn_result result = new commit_txn_result(); - if (e instanceof NoSuchTxnException) { - result.o1 = (NoSuchTxnException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof TxnAbortedException) { - result.o2 = (TxnAbortedException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, commit_txn_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.commit_txn(args.rqst,resultHandler); - } - } - - public static class lock extends org.apache.thrift.AsyncProcessFunction { - public lock() { - super("lock"); - } - - public lock_args getEmptyArgsInstance() { - return new lock_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(LockResponse o) { - lock_result result = new lock_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - lock_result result = new lock_result(); - if (e instanceof NoSuchTxnException) { - result.o1 = (NoSuchTxnException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof TxnAbortedException) { - result.o2 = (TxnAbortedException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, lock_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.lock(args.rqst,resultHandler); - } - } - - public static class check_lock extends org.apache.thrift.AsyncProcessFunction { - public check_lock() { - super("check_lock"); - } - - public check_lock_args getEmptyArgsInstance() { - return new check_lock_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(LockResponse o) { - check_lock_result result = new check_lock_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - check_lock_result result = new check_lock_result(); - if (e instanceof NoSuchTxnException) { - result.o1 = (NoSuchTxnException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof TxnAbortedException) { - result.o2 = (TxnAbortedException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof NoSuchLockException) { - result.o3 = (NoSuchLockException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, check_lock_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.check_lock(args.rqst,resultHandler); - } - } - - public static class unlock extends org.apache.thrift.AsyncProcessFunction { - public unlock() { - super("unlock"); - } - - public unlock_args getEmptyArgsInstance() { - return new unlock_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - unlock_result result = new unlock_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - unlock_result result = new unlock_result(); - if (e instanceof NoSuchLockException) { - result.o1 = (NoSuchLockException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof TxnOpenException) { - result.o2 = (TxnOpenException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, unlock_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.unlock(args.rqst,resultHandler); - } - } - - public static class show_locks extends org.apache.thrift.AsyncProcessFunction { - public show_locks() { - super("show_locks"); - } - - public show_locks_args getEmptyArgsInstance() { - return new show_locks_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(ShowLocksResponse o) { - show_locks_result result = new show_locks_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - show_locks_result result = new show_locks_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, show_locks_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.show_locks(args.rqst,resultHandler); - } - } - - public static class heartbeat extends org.apache.thrift.AsyncProcessFunction { - public heartbeat() { - super("heartbeat"); - } - - public heartbeat_args getEmptyArgsInstance() { - return new heartbeat_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - heartbeat_result result = new heartbeat_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - heartbeat_result result = new heartbeat_result(); - if (e instanceof NoSuchLockException) { - result.o1 = (NoSuchLockException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof NoSuchTxnException) { - result.o2 = (NoSuchTxnException) e; - result.setO2IsSet(true); - msg = result; - } - else if (e instanceof TxnAbortedException) { - result.o3 = (TxnAbortedException) e; - result.setO3IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, heartbeat_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.heartbeat(args.ids,resultHandler); - } - } - - public static class heartbeat_txn_range extends org.apache.thrift.AsyncProcessFunction { - public heartbeat_txn_range() { - super("heartbeat_txn_range"); - } - - public heartbeat_txn_range_args getEmptyArgsInstance() { - return new heartbeat_txn_range_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(HeartbeatTxnRangeResponse o) { - heartbeat_txn_range_result result = new heartbeat_txn_range_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - heartbeat_txn_range_result result = new heartbeat_txn_range_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, heartbeat_txn_range_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.heartbeat_txn_range(args.txns,resultHandler); - } - } - - public static class compact extends org.apache.thrift.AsyncProcessFunction { - public compact() { - super("compact"); - } - - public compact_args getEmptyArgsInstance() { - return new compact_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - compact_result result = new compact_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - compact_result result = new compact_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, compact_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.compact(args.rqst,resultHandler); - } - } - - public static class compact2 extends org.apache.thrift.AsyncProcessFunction { - public compact2() { - super("compact2"); - } - - public compact2_args getEmptyArgsInstance() { - return new compact2_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(CompactionResponse o) { - compact2_result result = new compact2_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - compact2_result result = new compact2_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, compact2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.compact2(args.rqst,resultHandler); - } - } - - public static class show_compact extends org.apache.thrift.AsyncProcessFunction { - public show_compact() { - super("show_compact"); - } - - public show_compact_args getEmptyArgsInstance() { - return new show_compact_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(ShowCompactResponse o) { - show_compact_result result = new show_compact_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - show_compact_result result = new show_compact_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, show_compact_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.show_compact(args.rqst,resultHandler); - } - } - - public static class add_dynamic_partitions extends org.apache.thrift.AsyncProcessFunction { - public add_dynamic_partitions() { - super("add_dynamic_partitions"); - } - - public add_dynamic_partitions_args getEmptyArgsInstance() { - return new add_dynamic_partitions_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - add_dynamic_partitions_result result = new add_dynamic_partitions_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - add_dynamic_partitions_result result = new add_dynamic_partitions_result(); - if (e instanceof NoSuchTxnException) { - result.o1 = (NoSuchTxnException) e; - result.setO1IsSet(true); - msg = result; - } - else if (e instanceof TxnAbortedException) { - result.o2 = (TxnAbortedException) e; - result.setO2IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, add_dynamic_partitions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.add_dynamic_partitions(args.rqst,resultHandler); - } - } - - public static class get_next_notification extends org.apache.thrift.AsyncProcessFunction { - public get_next_notification() { - super("get_next_notification"); - } - - public get_next_notification_args getEmptyArgsInstance() { - return new get_next_notification_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(NotificationEventResponse o) { - get_next_notification_result result = new get_next_notification_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_next_notification_result result = new get_next_notification_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_next_notification_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_next_notification(args.rqst,resultHandler); - } - } - - public static class get_current_notificationEventId extends org.apache.thrift.AsyncProcessFunction { - public get_current_notificationEventId() { - super("get_current_notificationEventId"); - } - - public get_current_notificationEventId_args getEmptyArgsInstance() { - return new get_current_notificationEventId_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(CurrentNotificationEventId o) { - get_current_notificationEventId_result result = new get_current_notificationEventId_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_current_notificationEventId_result result = new get_current_notificationEventId_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_current_notificationEventId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_current_notificationEventId(resultHandler); - } - } - - public static class fire_listener_event extends org.apache.thrift.AsyncProcessFunction { - public fire_listener_event() { - super("fire_listener_event"); - } - - public fire_listener_event_args getEmptyArgsInstance() { - return new fire_listener_event_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(FireEventResponse o) { - fire_listener_event_result result = new fire_listener_event_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - fire_listener_event_result result = new fire_listener_event_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, fire_listener_event_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.fire_listener_event(args.rqst,resultHandler); - } - } - - public static class flushCache extends org.apache.thrift.AsyncProcessFunction { - public flushCache() { - super("flushCache"); - } - - public flushCache_args getEmptyArgsInstance() { - return new flushCache_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - flushCache_result result = new flushCache_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - flushCache_result result = new flushCache_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, flushCache_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.flushCache(resultHandler); - } - } - - public static class cm_recycle extends org.apache.thrift.AsyncProcessFunction { - public cm_recycle() { - super("cm_recycle"); - } - - public cm_recycle_args getEmptyArgsInstance() { - return new cm_recycle_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(CmRecycleResponse o) { - cm_recycle_result result = new cm_recycle_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - cm_recycle_result result = new cm_recycle_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, cm_recycle_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.cm_recycle(args.request,resultHandler); - } - } - - public static class get_file_metadata_by_expr extends org.apache.thrift.AsyncProcessFunction { - public get_file_metadata_by_expr() { - super("get_file_metadata_by_expr"); - } - - public get_file_metadata_by_expr_args getEmptyArgsInstance() { - return new get_file_metadata_by_expr_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(GetFileMetadataByExprResult o) { - get_file_metadata_by_expr_result result = new get_file_metadata_by_expr_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_file_metadata_by_expr_result result = new get_file_metadata_by_expr_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_file_metadata_by_expr_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_file_metadata_by_expr(args.req,resultHandler); - } - } - - public static class get_file_metadata extends org.apache.thrift.AsyncProcessFunction { - public get_file_metadata() { - super("get_file_metadata"); - } - - public get_file_metadata_args getEmptyArgsInstance() { - return new get_file_metadata_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(GetFileMetadataResult o) { - get_file_metadata_result result = new get_file_metadata_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_file_metadata_result result = new get_file_metadata_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_file_metadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_file_metadata(args.req,resultHandler); - } - } - - public static class put_file_metadata extends org.apache.thrift.AsyncProcessFunction { - public put_file_metadata() { - super("put_file_metadata"); - } - - public put_file_metadata_args getEmptyArgsInstance() { - return new put_file_metadata_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(PutFileMetadataResult o) { - put_file_metadata_result result = new put_file_metadata_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - put_file_metadata_result result = new put_file_metadata_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, put_file_metadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.put_file_metadata(args.req,resultHandler); - } - } - - public static class clear_file_metadata extends org.apache.thrift.AsyncProcessFunction { - public clear_file_metadata() { - super("clear_file_metadata"); - } - - public clear_file_metadata_args getEmptyArgsInstance() { - return new clear_file_metadata_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(ClearFileMetadataResult o) { - clear_file_metadata_result result = new clear_file_metadata_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - clear_file_metadata_result result = new clear_file_metadata_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, clear_file_metadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.clear_file_metadata(args.req,resultHandler); - } - } - - public static class cache_file_metadata extends org.apache.thrift.AsyncProcessFunction { - public cache_file_metadata() { - super("cache_file_metadata"); - } - - public cache_file_metadata_args getEmptyArgsInstance() { - return new cache_file_metadata_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(CacheFileMetadataResult o) { - cache_file_metadata_result result = new cache_file_metadata_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - cache_file_metadata_result result = new cache_file_metadata_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, cache_file_metadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.cache_file_metadata(args.req,resultHandler); - } - } - - public static class get_metastore_db_uuid extends org.apache.thrift.AsyncProcessFunction { - public get_metastore_db_uuid() { - super("get_metastore_db_uuid"); - } - - public get_metastore_db_uuid_args getEmptyArgsInstance() { - return new get_metastore_db_uuid_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(String o) { - get_metastore_db_uuid_result result = new get_metastore_db_uuid_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - get_metastore_db_uuid_result result = new get_metastore_db_uuid_result(); - if (e instanceof MetaException) { - result.o1 = (MetaException) e; - result.setO1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, get_metastore_db_uuid_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.get_metastore_db_uuid(resultHandler); - } - } - - } - - public static class getMetaConf_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMetaConf_args"); - - private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getMetaConf_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getMetaConf_argsTupleSchemeFactory()); - } - - private String key; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - KEY((short)1, "key"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // KEY - return KEY; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMetaConf_args.class, metaDataMap); - } - - public getMetaConf_args() { - } - - public getMetaConf_args( - String key) - { - this(); - this.key = key; - } - - /** - * Performs a deep copy on other. - */ - public getMetaConf_args(getMetaConf_args other) { - if (other.isSetKey()) { - this.key = other.key; - } - } - - public getMetaConf_args deepCopy() { - return new getMetaConf_args(this); - } - - @Override - public void clear() { - this.key = null; - } - - public String getKey() { - return this.key; - } - - public void setKey(String key) { - this.key = key; - } - - public void unsetKey() { - this.key = null; - } - - /** Returns true if field key is set (has been assigned a value) and false otherwise */ - public boolean isSetKey() { - return this.key != null; - } - - public void setKeyIsSet(boolean value) { - if (!value) { - this.key = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case KEY: - if (value == null) { - unsetKey(); - } else { - setKey((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case KEY: - return getKey(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case KEY: - return isSetKey(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getMetaConf_args) - return this.equals((getMetaConf_args)that); - return false; - } - - public boolean equals(getMetaConf_args that) { - if (that == null) - return false; - - boolean this_present_key = true && this.isSetKey(); - boolean that_present_key = true && that.isSetKey(); - if (this_present_key || that_present_key) { - if (!(this_present_key && that_present_key)) - return false; - if (!this.key.equals(that.key)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_key = true && (isSetKey()); - list.add(present_key); - if (present_key) - list.add(key); - - return list.hashCode(); - } - - @Override - public int compareTo(getMetaConf_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKey()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("getMetaConf_args("); - boolean first = true; - - sb.append("key:"); - if (this.key == null) { - sb.append("null"); - } else { - sb.append(this.key); - } - 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 getMetaConf_argsStandardSchemeFactory implements SchemeFactory { - public getMetaConf_argsStandardScheme getScheme() { - return new getMetaConf_argsStandardScheme(); - } - } - - private static class getMetaConf_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getMetaConf_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: // KEY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.key = iprot.readString(); - struct.setKeyIsSet(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, getMetaConf_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.key != null) { - oprot.writeFieldBegin(KEY_FIELD_DESC); - oprot.writeString(struct.key); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getMetaConf_argsTupleSchemeFactory implements SchemeFactory { - public getMetaConf_argsTupleScheme getScheme() { - return new getMetaConf_argsTupleScheme(); - } - } - - private static class getMetaConf_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getMetaConf_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetKey()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetKey()) { - oprot.writeString(struct.key); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getMetaConf_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.key = iprot.readString(); - struct.setKeyIsSet(true); - } - } - } - - } - - public static class getMetaConf_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMetaConf_result"); - - 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 getMetaConf_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getMetaConf_resultTupleSchemeFactory()); - } - - private String success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMetaConf_result.class, metaDataMap); - } - - public getMetaConf_result() { - } - - public getMetaConf_result( - String success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public getMetaConf_result(getMetaConf_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public getMetaConf_result deepCopy() { - return new getMetaConf_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public String getSuccess() { - return this.success; - } - - public void setSuccess(String success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((String)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getMetaConf_result) - return this.equals((getMetaConf_result)that); - return false; - } - - public boolean equals(getMetaConf_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(getMetaConf_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("getMetaConf_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 getMetaConf_resultStandardSchemeFactory implements SchemeFactory { - public getMetaConf_resultStandardScheme getScheme() { - return new getMetaConf_resultStandardScheme(); - } - } - - private static class getMetaConf_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getMetaConf_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, getMetaConf_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 getMetaConf_resultTupleSchemeFactory implements SchemeFactory { - public getMetaConf_resultTupleScheme getScheme() { - return new getMetaConf_resultTupleScheme(); - } - } - - private static class getMetaConf_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getMetaConf_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, getMetaConf_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 setMetaConf_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setMetaConf_args"); - - private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new setMetaConf_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new setMetaConf_argsTupleSchemeFactory()); - } - - private String key; // required - private String value; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - KEY((short)1, "key"), - VALUE((short)2, "value"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // KEY - return KEY; - case 2: // VALUE - return VALUE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setMetaConf_args.class, metaDataMap); - } - - public setMetaConf_args() { - } - - public setMetaConf_args( - String key, - String value) - { - this(); - this.key = key; - this.value = value; - } - - /** - * Performs a deep copy on other. - */ - public setMetaConf_args(setMetaConf_args other) { - if (other.isSetKey()) { - this.key = other.key; - } - if (other.isSetValue()) { - this.value = other.value; - } - } - - public setMetaConf_args deepCopy() { - return new setMetaConf_args(this); - } - - @Override - public void clear() { - this.key = null; - this.value = null; - } - - public String getKey() { - return this.key; - } - - public void setKey(String key) { - this.key = key; - } - - public void unsetKey() { - this.key = null; - } - - /** Returns true if field key is set (has been assigned a value) and false otherwise */ - public boolean isSetKey() { - return this.key != null; - } - - public void setKeyIsSet(boolean value) { - if (!value) { - this.key = null; - } - } - - public String getValue() { - return this.value; - } - - public void setValue(String value) { - this.value = value; - } - - public void unsetValue() { - this.value = null; - } - - /** Returns true if field value is set (has been assigned a value) and false otherwise */ - public boolean isSetValue() { - return this.value != null; - } - - public void setValueIsSet(boolean value) { - if (!value) { - this.value = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case KEY: - if (value == null) { - unsetKey(); - } else { - setKey((String)value); - } - break; - - case VALUE: - if (value == null) { - unsetValue(); - } else { - setValue((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case KEY: - return getKey(); - - case VALUE: - return getValue(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case KEY: - return isSetKey(); - case VALUE: - return isSetValue(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof setMetaConf_args) - return this.equals((setMetaConf_args)that); - return false; - } - - public boolean equals(setMetaConf_args that) { - if (that == null) - return false; - - boolean this_present_key = true && this.isSetKey(); - boolean that_present_key = true && that.isSetKey(); - if (this_present_key || that_present_key) { - if (!(this_present_key && that_present_key)) - return false; - if (!this.key.equals(that.key)) - return false; - } - - boolean this_present_value = true && this.isSetValue(); - boolean that_present_value = true && that.isSetValue(); - if (this_present_value || that_present_value) { - if (!(this_present_value && that_present_value)) - return false; - if (!this.value.equals(that.value)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_key = true && (isSetKey()); - list.add(present_key); - if (present_key) - list.add(key); - - boolean present_value = true && (isSetValue()); - list.add(present_value); - if (present_value) - list.add(value); - - return list.hashCode(); - } - - @Override - public int compareTo(setMetaConf_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKey()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("setMetaConf_args("); - boolean first = true; - - sb.append("key:"); - if (this.key == null) { - sb.append("null"); - } else { - sb.append(this.key); - } - first = false; - if (!first) sb.append(", "); - sb.append("value:"); - if (this.value == null) { - sb.append("null"); - } else { - sb.append(this.value); - } - 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 setMetaConf_argsStandardSchemeFactory implements SchemeFactory { - public setMetaConf_argsStandardScheme getScheme() { - return new setMetaConf_argsStandardScheme(); - } - } - - private static class setMetaConf_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, setMetaConf_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: // KEY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.key = iprot.readString(); - struct.setKeyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // VALUE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.value = iprot.readString(); - struct.setValueIsSet(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, setMetaConf_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.key != null) { - oprot.writeFieldBegin(KEY_FIELD_DESC); - oprot.writeString(struct.key); - oprot.writeFieldEnd(); - } - if (struct.value != null) { - oprot.writeFieldBegin(VALUE_FIELD_DESC); - oprot.writeString(struct.value); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class setMetaConf_argsTupleSchemeFactory implements SchemeFactory { - public setMetaConf_argsTupleScheme getScheme() { - return new setMetaConf_argsTupleScheme(); - } - } - - private static class setMetaConf_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setMetaConf_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetKey()) { - optionals.set(0); - } - if (struct.isSetValue()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetKey()) { - oprot.writeString(struct.key); - } - if (struct.isSetValue()) { - oprot.writeString(struct.value); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, setMetaConf_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.key = iprot.readString(); - struct.setKeyIsSet(true); - } - if (incoming.get(1)) { - struct.value = iprot.readString(); - struct.setValueIsSet(true); - } - } - } - - } - - public static class setMetaConf_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setMetaConf_result"); - - 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 setMetaConf_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new setMetaConf_resultTupleSchemeFactory()); - } - - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setMetaConf_result.class, metaDataMap); - } - - public setMetaConf_result() { - } - - public setMetaConf_result( - MetaException o1) - { - this(); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public setMetaConf_result(setMetaConf_result other) { - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public setMetaConf_result deepCopy() { - return new setMetaConf_result(this); - } - - @Override - public void clear() { - this.o1 = null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof setMetaConf_result) - return this.equals((setMetaConf_result)that); - return false; - } - - public boolean equals(setMetaConf_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(setMetaConf_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("setMetaConf_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 setMetaConf_resultStandardSchemeFactory implements SchemeFactory { - public setMetaConf_resultStandardScheme getScheme() { - return new setMetaConf_resultStandardScheme(); - } - } - - private static class setMetaConf_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, setMetaConf_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, setMetaConf_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 setMetaConf_resultTupleSchemeFactory implements SchemeFactory { - public setMetaConf_resultTupleScheme getScheme() { - return new setMetaConf_resultTupleScheme(); - } - } - - private static class setMetaConf_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setMetaConf_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, setMetaConf_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); - } - } - } - - } - - public static class create_database_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_database_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DATABASE((short)1, "database"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DATABASE - return DATABASE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Database.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_database_args.class, metaDataMap); - } - - public create_database_args() { - } - - public create_database_args( - Database database) - { - this(); - this.database = database; - } - - /** - * Performs a deep copy on other. - */ - public create_database_args(create_database_args other) { - if (other.isSetDatabase()) { - this.database = new Database(other.database); - } - } - - public create_database_args deepCopy() { - return new create_database_args(this); - } - - @Override - public void clear() { - this.database = null; - } - - public Database getDatabase() { - return this.database; - } - - public void setDatabase(Database database) { - this.database = database; - } - - public void unsetDatabase() { - this.database = null; - } - - /** Returns true if field database is set (has been assigned a value) and false otherwise */ - public boolean isSetDatabase() { - return this.database != null; - } - - public void setDatabaseIsSet(boolean value) { - if (!value) { - this.database = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DATABASE: - if (value == null) { - unsetDatabase(); - } else { - setDatabase((Database)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DATABASE: - return getDatabase(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DATABASE: - return isSetDatabase(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_database_args) - return this.equals((create_database_args)that); - return false; - } - - public boolean equals(create_database_args that) { - if (that == null) - return false; - - boolean this_present_database = true && this.isSetDatabase(); - boolean that_present_database = true && that.isSetDatabase(); - if (this_present_database || that_present_database) { - if (!(this_present_database && that_present_database)) - return false; - if (!this.database.equals(that.database)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_database = true && (isSetDatabase()); - list.add(present_database); - if (present_database) - list.add(database); - - return list.hashCode(); - } - - @Override - public int compareTo(create_database_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDatabase()).compareTo(other.isSetDatabase()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDatabase()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.database); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_database_args("); - boolean first = true; - - sb.append("database:"); - if (this.database == null) { - sb.append("null"); - } else { - sb.append(this.database); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_database_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_database_result.class, metaDataMap); - } - - public create_database_result() { - } - - public create_database_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3) - { - this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public create_database_result(create_database_result other) { - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public create_database_result deepCopy() { - return new create_database_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public AlreadyExistsException getO1() { - return this.o1; - } - - public void setO1(AlreadyExistsException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((AlreadyExistsException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_database_result) - return this.equals((create_database_result)that); - return false; - } - - public boolean equals(create_database_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(create_database_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_database_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_database_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NAME((short)1, "name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_database_args.class, metaDataMap); - } - - public get_database_args() { - } - - public get_database_args( - String name) - { - this(); - this.name = name; - } - - /** - * Performs a deep copy on other. - */ - public get_database_args(get_database_args other) { - if (other.isSetName()) { - this.name = other.name; - } - } - - public get_database_args deepCopy() { - return new get_database_args(this); - } - - @Override - public void clear() { - this.name = null; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_database_args) - return this.equals((get_database_args)that); - return false; - } - - public boolean equals(get_database_args that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); - - return list.hashCode(); - } - - @Override - public int compareTo(get_database_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_database_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_database_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Database.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_database_result.class, metaDataMap); - } - - public get_database_result() { - } - - public get_database_result( - Database success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_database_result(get_database_result other) { - if (other.isSetSuccess()) { - this.success = new Database(other.success); - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_database_result deepCopy() { - return new get_database_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public Database getSuccess() { - return this.success; - } - - public void setSuccess(Database success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Database)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_database_result) - return this.equals((get_database_result)that); - return false; - } - - public boolean equals(get_database_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_database_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_database_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_database_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NAME((short)1, "name"), - DELETE_DATA((short)2, "deleteData"), - CASCADE((short)3, "cascade"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // DELETE_DATA - return DELETE_DATA; - case 3: // CASCADE - return CASCADE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - private static final int __CASCADE_ISSET_ID = 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); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.CASCADE, new org.apache.thrift.meta_data.FieldMetaData("cascade", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_database_args.class, metaDataMap); - } - - public drop_database_args() { - } - - public drop_database_args( - String name, - boolean deleteData, - boolean cascade) - { - this(); - this.name = name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); - this.cascade = cascade; - setCascadeIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public drop_database_args(drop_database_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetName()) { - this.name = other.name; - } - this.deleteData = other.deleteData; - this.cascade = other.cascade; - } - - public drop_database_args deepCopy() { - return new drop_database_args(this); - } - - @Override - public void clear() { - this.name = null; - setDeleteDataIsSet(false); - this.deleteData = false; - setCascadeIsSet(false); - this.cascade = false; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); - } - - public boolean isCascade() { - return this.cascade; - } - - public void setCascade(boolean cascade) { - this.cascade = cascade; - setCascadeIsSet(true); - } - - public void unsetCascade() { - __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 EncodingUtils.testBit(__isset_bitfield, __CASCADE_ISSET_ID); - } - - public void setCascadeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CASCADE_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case DELETE_DATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - case CASCADE: - if (value == null) { - unsetCascade(); - } else { - setCascade((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - case DELETE_DATA: - return isDeleteData(); - - case CASCADE: - return isCascade(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - case DELETE_DATA: - return isSetDeleteData(); - case CASCADE: - return isSetCascade(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_database_args) - return this.equals((drop_database_args)that); - return false; - } - - public boolean equals(drop_database_args that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - boolean this_present_cascade = true; - boolean that_present_cascade = true; - if (this_present_cascade || that_present_cascade) { - if (!(this_present_cascade && that_present_cascade)) - return false; - if (this.cascade != that.cascade) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); - - boolean present_deleteData = true; - list.add(present_deleteData); - if (present_deleteData) - list.add(deleteData); - - boolean present_cascade = true; - list.add(present_cascade); - if (present_cascade) - list.add(cascade); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_database_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDeleteData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCascade()).compareTo(other.isSetCascade()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCascade()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cascade, other.cascade); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_database_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; - if (!first) sb.append(", "); - sb.append("cascade:"); - sb.append(this.cascade); - 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 { - // 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_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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_database_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_database_result.class, metaDataMap); - } - - public drop_database_result() { - } - - public drop_database_result( - NoSuchObjectException o1, - InvalidOperationException o2, - MetaException o3) - { - this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public drop_database_result(drop_database_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidOperationException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public drop_database_result deepCopy() { - return new drop_database_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidOperationException getO2() { - return this.o2; - } - - public void setO2(InvalidOperationException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidOperationException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_database_result) - return this.equals((drop_database_result)that); - return false; - } - - public boolean equals(drop_database_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_database_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_database_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_databases_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATTERN((short)1, "pattern"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PATTERN - return PATTERN; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PATTERN, new org.apache.thrift.meta_data.FieldMetaData("pattern", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_databases_args.class, metaDataMap); - } - - public get_databases_args() { - } - - public get_databases_args( - String pattern) - { - this(); - this.pattern = pattern; - } - - /** - * Performs a deep copy on other. - */ - public get_databases_args(get_databases_args other) { - if (other.isSetPattern()) { - this.pattern = other.pattern; - } - } - - public get_databases_args deepCopy() { - return new get_databases_args(this); - } - - @Override - public void clear() { - this.pattern = null; - } - - public String getPattern() { - return this.pattern; - } - - public void setPattern(String pattern) { - this.pattern = pattern; - } - - public void unsetPattern() { - this.pattern = null; - } - - /** Returns true if field pattern is set (has been assigned a value) and false otherwise */ - public boolean isSetPattern() { - return this.pattern != null; - } - - public void setPatternIsSet(boolean value) { - if (!value) { - this.pattern = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PATTERN: - if (value == null) { - unsetPattern(); - } else { - setPattern((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PATTERN: - return getPattern(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PATTERN: - return isSetPattern(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_databases_args) - return this.equals((get_databases_args)that); - return false; - } - - public boolean equals(get_databases_args that) { - if (that == null) - return false; - - boolean this_present_pattern = true && this.isSetPattern(); - boolean that_present_pattern = true && that.isSetPattern(); - if (this_present_pattern || that_present_pattern) { - if (!(this_present_pattern && that_present_pattern)) - return false; - if (!this.pattern.equals(that.pattern)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_pattern = true && (isSetPattern()); - list.add(present_pattern); - if (present_pattern) - list.add(pattern); - - return list.hashCode(); - } - - @Override - public int compareTo(get_databases_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPattern()).compareTo(other.isSetPattern()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPattern()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, other.pattern); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_databases_args("); - boolean first = true; - - sb.append("pattern:"); - if (this.pattern == null) { - sb.append("null"); - } else { - sb.append(this.pattern); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_databases_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_databases_result.class, metaDataMap); - } - - public get_databases_result() { - } - - public get_databases_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_databases_result(get_databases_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_databases_result deepCopy() { - return new get_databases_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_databases_result) - return this.equals((get_databases_result)that); - return false; - } - - public boolean equals(get_databases_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_databases_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_databases_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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 _list706 = iprot.readListBegin(); - struct.success = new ArrayList(_list706.size); - String _elem707; - for (int _i708 = 0; _i708 < _list706.size; ++_i708) - { - _elem707 = iprot.readString(); - struct.success.add(_elem707); - } - 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 _iter709 : struct.success) - { - oprot.writeString(_iter709); - } - 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 _iter710 : struct.success) - { - oprot.writeString(_iter710); - } - } - } - 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 _list711 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list711.size); - String _elem712; - for (int _i713 = 0; _i713 < _list711.size; ++_i713) - { - _elem712 = iprot.readString(); - struct.success.add(_elem712); - } - } - 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, Comparable { - 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 { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_databases_args.class, metaDataMap); - } - - public get_all_databases_args() { - } - - /** - * Performs a deep copy on other. - */ - public get_all_databases_args(get_all_databases_args other) { - } - - public get_all_databases_args deepCopy() { - return new get_all_databases_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_all_databases_args) - return this.equals((get_all_databases_args)that); - return false; - } - - public boolean equals(get_all_databases_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(get_all_databases_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_all_databases_args("); - boolean first = true; - - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_databases_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_databases_result.class, metaDataMap); - } - - public get_all_databases_result() { - } - - public get_all_databases_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_all_databases_result(get_all_databases_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_all_databases_result deepCopy() { - return new get_all_databases_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_all_databases_result) - return this.equals((get_all_databases_result)that); - return false; - } - - public boolean equals(get_all_databases_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_all_databases_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_all_databases_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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 _list714 = iprot.readListBegin(); - struct.success = new ArrayList(_list714.size); - String _elem715; - for (int _i716 = 0; _i716 < _list714.size; ++_i716) - { - _elem715 = iprot.readString(); - struct.success.add(_elem715); - } - 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 _iter717 : struct.success) - { - oprot.writeString(_iter717); - } - 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 _iter718 : struct.success) - { - oprot.writeString(_iter718); - } - } - } - 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 _list719 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list719.size); - String _elem720; - for (int _i721 = 0; _i721 < _list719.size; ++_i721) - { - _elem720 = iprot.readString(); - struct.success.add(_elem720); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_database_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DBNAME((short)1, "dbname"), - DB((short)2, "db"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // DB - return DB; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Database.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_database_args.class, metaDataMap); - } - - public alter_database_args() { - } - - public alter_database_args( - String dbname, - Database db) - { - this(); - this.dbname = dbname; - this.db = db; - } - - /** - * Performs a deep copy on other. - */ - public alter_database_args(alter_database_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetDb()) { - this.db = new Database(other.db); - } - } - - public alter_database_args deepCopy() { - return new alter_database_args(this); - } - - @Override - public void clear() { - this.dbname = null; - this.db = null; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public Database getDb() { - return this.db; - } - - public void setDb(Database db) { - this.db = db; - } - - public void unsetDb() { - this.db = null; - } - - /** Returns true if field db is set (has been assigned a value) and false otherwise */ - public boolean isSetDb() { - return this.db != null; - } - - public void setDbIsSet(boolean value) { - if (!value) { - this.db = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case DB: - if (value == null) { - unsetDb(); - } else { - setDb((Database)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case DB: - return getDb(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case DB: - return isSetDb(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_database_args) - return this.equals((alter_database_args)that); - return false; - } - - public boolean equals(alter_database_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_db = true && this.isSetDb(); - boolean that_present_db = true && that.isSetDb(); - if (this_present_db || that_present_db) { - if (!(this_present_db && that_present_db)) - return false; - if (!this.db.equals(that.db)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_db = true && (isSetDb()); - list.add(present_db); - if (present_db) - list.add(db); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_database_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDb()).compareTo(other.isSetDb()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_database_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("db:"); - if (this.db == null) { - sb.append("null"); - } else { - sb.append(this.db); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_database_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_database_result.class, metaDataMap); - } - - public alter_database_result() { - } - - public alter_database_result( - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_database_result(alter_database_result other) { - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public alter_database_result deepCopy() { - return new alter_database_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_database_result) - return this.equals((alter_database_result)that); - return false; - } - - public boolean equals(alter_database_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_database_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_database_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NAME((short)1, "name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_type_args.class, metaDataMap); - } - - public get_type_args() { - } - - public get_type_args( - String name) - { - this(); - this.name = name; - } - - /** - * Performs a deep copy on other. - */ - public get_type_args(get_type_args other) { - if (other.isSetName()) { - this.name = other.name; - } - } - - public get_type_args deepCopy() { - return new get_type_args(this); - } - - @Override - public void clear() { - this.name = null; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_type_args) - return this.equals((get_type_args)that); - return false; - } - - public boolean equals(get_type_args that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); - - return list.hashCode(); - } - - @Override - public int compareTo(get_type_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_type_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Type.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_type_result.class, metaDataMap); - } - - public get_type_result() { - } - - public get_type_result( - Type success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_type_result(get_type_result other) { - if (other.isSetSuccess()) { - this.success = new Type(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_type_result deepCopy() { - return new get_type_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public Type getSuccess() { - return this.success; - } - - public void setSuccess(Type success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Type)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_type_result) - return this.equals((get_type_result)that); - return false; - } - - public boolean equals(get_type_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_type_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_type_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_type_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TYPE((short)1, "type"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TYPE - return TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Type.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_type_args.class, metaDataMap); - } - - public create_type_args() { - } - - public create_type_args( - Type type) - { - this(); - this.type = type; - } - - /** - * Performs a deep copy on other. - */ - public create_type_args(create_type_args other) { - if (other.isSetType()) { - this.type = new Type(other.type); - } - } - - public create_type_args deepCopy() { - return new create_type_args(this); - } - - @Override - public void clear() { - this.type = null; - } - - public Type getType() { - return this.type; - } - - public void setType(Type type) { - this.type = type; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((Type)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TYPE: - return getType(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TYPE: - return isSetType(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_type_args) - return this.equals((create_type_args)that); - return false; - } - - public boolean equals(create_type_args that) { - if (that == null) - return false; - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type); - - return list.hashCode(); - } - - @Override - public int compareTo(create_type_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_type_args("); - boolean first = true; - - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_type_result"); - - 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 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 - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_type_result.class, metaDataMap); - } - - public create_type_result() { - } - - public create_type_result( - boolean success, - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public create_type_result(create_type_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public create_type_result deepCopy() { - return new create_type_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public AlreadyExistsException getO1() { - return this.o1; - } - - public void setO1(AlreadyExistsException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((AlreadyExistsException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_type_result) - return this.equals((create_type_result)that); - return false; - } - - public boolean equals(create_type_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(create_type_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_type_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 { - // 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_type_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TYPE((short)1, "type"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TYPE - return TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_type_args.class, metaDataMap); - } - - public drop_type_args() { - } - - public drop_type_args( - String type) - { - this(); - this.type = type; - } - - /** - * Performs a deep copy on other. - */ - public drop_type_args(drop_type_args other) { - if (other.isSetType()) { - this.type = other.type; - } - } - - public drop_type_args deepCopy() { - return new drop_type_args(this); - } - - @Override - public void clear() { - this.type = null; - } - - public String getType() { - return this.type; - } - - public void setType(String type) { - this.type = type; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TYPE: - return getType(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TYPE: - return isSetType(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_type_args) - return this.equals((drop_type_args)that); - return false; - } - - public boolean equals(drop_type_args that) { - if (that == null) - return false; - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_type_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_type_args("); - boolean first = true; - - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_type_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_type_result.class, metaDataMap); - } - - public drop_type_result() { - } - - public drop_type_result( - boolean success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public drop_type_result(drop_type_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public drop_type_result deepCopy() { - return new drop_type_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_type_result) - return this.equals((drop_type_result)that); - return false; - } - - public boolean equals(drop_type_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_type_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_type_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 { - // 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_all_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NAME((short)1, "name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_type_all_args.class, metaDataMap); - } - - public get_type_all_args() { - } - - public get_type_all_args( - String name) - { - this(); - this.name = name; - } - - /** - * Performs a deep copy on other. - */ - public get_type_all_args(get_type_all_args other) { - if (other.isSetName()) { - this.name = other.name; - } - } - - public get_type_all_args deepCopy() { - return new get_type_all_args(this); - } - - @Override - public void clear() { - this.name = null; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_type_all_args) - return this.equals((get_type_all_args)that); - return false; - } - - public boolean equals(get_type_all_args that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); - - return list.hashCode(); - } - - @Override - public int compareTo(get_type_all_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_type_all_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_all_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O2((short)1, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Type.class)))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_type_all_result.class, metaDataMap); - } - - public get_type_all_result() { - } - - public get_type_all_result( - Map success, - MetaException o2) - { - this(); - this.success = success; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_type_all_result(get_type_all_result other) { - if (other.isSetSuccess()) { - Map __this__success = new HashMap(other.success.size()); - for (Map.Entry other_element : other.success.entrySet()) { - - String other_element_key = other_element.getKey(); - Type other_element_value = other_element.getValue(); - - String __this__success_copy_key = other_element_key; - - Type __this__success_copy_value = new Type(other_element_value); - - __this__success.put(__this__success_copy_key, __this__success_copy_value); - } - this.success = __this__success; - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_type_all_result deepCopy() { - return new get_type_all_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public void putToSuccess(String key, Type val) { - if (this.success == null) { - this.success = new HashMap(); - } - this.success.put(key, val); - } - - public Map getSuccess() { - return this.success; - } - - public void setSuccess(Map success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Map)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_type_all_result) - return this.equals((get_type_all_result)that); - return false; - } - - public boolean equals(get_type_all_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_type_all_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_type_all_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 _map722 = iprot.readMapBegin(); - struct.success = new HashMap(2*_map722.size); - String _key723; - Type _val724; - for (int _i725 = 0; _i725 < _map722.size; ++_i725) - { - _key723 = iprot.readString(); - _val724 = new Type(); - _val724.read(iprot); - struct.success.put(_key723, _val724); - } - 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 _iter726 : struct.success.entrySet()) - { - oprot.writeString(_iter726.getKey()); - _iter726.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 _iter727 : struct.success.entrySet()) - { - oprot.writeString(_iter727.getKey()); - _iter727.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 _map728 = 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*_map728.size); - String _key729; - Type _val730; - for (int _i731 = 0; _i731 < _map728.size; ++_i731) - { - _key729 = iprot.readString(); - _val730 = new Type(); - _val730.read(iprot); - struct.success.put(_key729, _val730); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TABLE_NAME((short)2, "table_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TABLE_NAME - return TABLE_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_fields_args.class, metaDataMap); - } - - public get_fields_args() { - } - - public get_fields_args( - String db_name, - String table_name) - { - this(); - this.db_name = db_name; - this.table_name = table_name; - } - - /** - * Performs a deep copy on other. - */ - public get_fields_args(get_fields_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTable_name()) { - this.table_name = other.table_name; - } - } - - public get_fields_args deepCopy() { - return new get_fields_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.table_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTable_name() { - return this.table_name; - } - - public void setTable_name(String table_name) { - this.table_name = table_name; - } - - public void unsetTable_name() { - this.table_name = null; - } - - /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTable_name() { - return this.table_name != null; - } - - public void setTable_nameIsSet(boolean value) { - if (!value) { - this.table_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTable_name(); - } else { - setTable_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TABLE_NAME: - return getTable_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TABLE_NAME: - return isSetTable_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_fields_args) - return this.equals((get_fields_args)that); - return false; - } - - public boolean equals(get_fields_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_table_name = true && this.isSetTable_name(); - boolean that_present_table_name = true && that.isSetTable_name(); - if (this_present_table_name || that_present_table_name) { - if (!(this_present_table_name && that_present_table_name)) - return false; - if (!this.table_name.equals(that.table_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_table_name = true && (isSetTable_name()); - list.add(present_table_name); - if (present_table_name) - list.add(table_name); - - return list.hashCode(); - } - - @Override - public int compareTo(get_fields_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_fields_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { - sb.append("null"); - } else { - sb.append(this.table_name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_result"); - - 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 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 - private UnknownDBException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_fields_result.class, metaDataMap); - } - - public get_fields_result() { - } - - public get_fields_result( - List success, - MetaException o1, - UnknownTableException o2, - UnknownDBException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public get_fields_result(get_fields_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (FieldSchema other_element : other.success) { - __this__success.add(new FieldSchema(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new UnknownTableException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); - } - } - - public get_fields_result deepCopy() { - return new get_fields_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(FieldSchema elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public UnknownTableException getO2() { - return this.o2; - } - - public void setO2(UnknownTableException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public UnknownDBException getO3() { - return this.o3; - } - - public void setO3(UnknownDBException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((UnknownTableException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_fields_result) - return this.equals((get_fields_result)that); - return false; - } - - public boolean equals(get_fields_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(get_fields_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_fields_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 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 _list732 = iprot.readListBegin(); - struct.success = new ArrayList(_list732.size); - FieldSchema _elem733; - for (int _i734 = 0; _i734 < _list732.size; ++_i734) - { - _elem733 = new FieldSchema(); - _elem733.read(iprot); - struct.success.add(_elem733); - } - 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 _iter735 : struct.success) - { - _iter735.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 _iter736 : struct.success) - { - _iter736.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 _list737 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list737.size); - FieldSchema _elem738; - for (int _i739 = 0; _i739 < _list737.size; ++_i739) - { - _elem738 = new FieldSchema(); - _elem738.read(iprot); - struct.success.add(_elem738); - } - } - 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_fields_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_with_environment_context_args"); - - 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 org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", 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_with_environment_context_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_fields_with_environment_context_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String table_name; // required - private EnvironmentContext environment_context; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TABLE_NAME((short)2, "table_name"), - ENVIRONMENT_CONTEXT((short)3, "environment_context"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TABLE_NAME - return TABLE_NAME; - case 3: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_fields_with_environment_context_args.class, metaDataMap); - } - - public get_fields_with_environment_context_args() { - } - - public get_fields_with_environment_context_args( - String db_name, - String table_name, - EnvironmentContext environment_context) - { - this(); - this.db_name = db_name; - this.table_name = table_name; - this.environment_context = environment_context; - } - - /** - * Performs a deep copy on other. - */ - public get_fields_with_environment_context_args(get_fields_with_environment_context_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTable_name()) { - this.table_name = other.table_name; - } - if (other.isSetEnvironment_context()) { - this.environment_context = new EnvironmentContext(other.environment_context); - } - } - - public get_fields_with_environment_context_args deepCopy() { - return new get_fields_with_environment_context_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.table_name = null; - this.environment_context = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTable_name() { - return this.table_name; - } - - public void setTable_name(String table_name) { - this.table_name = table_name; - } - - public void unsetTable_name() { - this.table_name = null; - } - - /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTable_name() { - return this.table_name != null; - } - - public void setTable_nameIsSet(boolean value) { - if (!value) { - this.table_name = null; - } - } - - public EnvironmentContext getEnvironment_context() { - return this.environment_context; - } - - public void setEnvironment_context(EnvironmentContext environment_context) { - this.environment_context = environment_context; - } - - public void unsetEnvironment_context() { - this.environment_context = null; - } - - /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironment_context() { - return this.environment_context != null; - } - - public void setEnvironment_contextIsSet(boolean value) { - if (!value) { - this.environment_context = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTable_name(); - } else { - setTable_name((String)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironment_context(); - } else { - setEnvironment_context((EnvironmentContext)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TABLE_NAME: - return getTable_name(); - - case ENVIRONMENT_CONTEXT: - return getEnvironment_context(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TABLE_NAME: - return isSetTable_name(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironment_context(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_fields_with_environment_context_args) - return this.equals((get_fields_with_environment_context_args)that); - return false; - } - - public boolean equals(get_fields_with_environment_context_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_table_name = true && this.isSetTable_name(); - boolean that_present_table_name = true && that.isSetTable_name(); - if (this_present_table_name || that_present_table_name) { - if (!(this_present_table_name && that_present_table_name)) - return false; - if (!this.table_name.equals(that.table_name)) - return false; - } - - boolean this_present_environment_context = true && this.isSetEnvironment_context(); - boolean that_present_environment_context = true && that.isSetEnvironment_context(); - if (this_present_environment_context || that_present_environment_context) { - if (!(this_present_environment_context && that_present_environment_context)) - return false; - if (!this.environment_context.equals(that.environment_context)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_table_name = true && (isSetTable_name()); - list.add(present_table_name); - if (present_table_name) - list.add(table_name); - - boolean present_environment_context = true && (isSetEnvironment_context()); - list.add(present_environment_context); - if (present_environment_context) - list.add(environment_context); - - return list.hashCode(); - } - - @Override - public int compareTo(get_fields_with_environment_context_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironment_context()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_fields_with_environment_context_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { - sb.append("null"); - } else { - sb.append(this.table_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("environment_context:"); - if (this.environment_context == null) { - sb.append("null"); - } else { - sb.append(this.environment_context); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (environment_context != null) { - environment_context.validate(); - } - } - - 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 get_fields_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { - public get_fields_with_environment_context_argsStandardScheme getScheme() { - return new get_fields_with_environment_context_argsStandardScheme(); - } - } - - private static class get_fields_with_environment_context_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_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: // 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; - case 3: // 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, get_fields_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.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(struct.table_name); - 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 get_fields_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { - public get_fields_with_environment_context_argsTupleScheme getScheme() { - return new get_fields_with_environment_context_argsTupleScheme(); - } - } - - private static class get_fields_with_environment_context_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_fields_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.isSetTable_name()) { - optionals.set(1); - } - if (struct.isSetEnvironment_context()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetDb_name()) { - oprot.writeString(struct.db_name); - } - if (struct.isSetTable_name()) { - oprot.writeString(struct.table_name); - } - if (struct.isSetEnvironment_context()) { - struct.environment_context.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_fields_with_environment_context_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.table_name = iprot.readString(); - struct.setTable_nameIsSet(true); - } - if (incoming.get(2)) { - struct.environment_context = new EnvironmentContext(); - struct.environment_context.read(iprot); - struct.setEnvironment_contextIsSet(true); - } - } - } - - } - - public static class get_fields_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_with_environment_context_result"); - - 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 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_with_environment_context_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_fields_with_environment_context_resultTupleSchemeFactory()); - } - - private List success; // required - private MetaException o1; // required - private UnknownTableException o2; // required - private UnknownDBException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_fields_with_environment_context_result.class, metaDataMap); - } - - public get_fields_with_environment_context_result() { - } - - public get_fields_with_environment_context_result( - List success, - MetaException o1, - UnknownTableException o2, - UnknownDBException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public get_fields_with_environment_context_result(get_fields_with_environment_context_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (FieldSchema other_element : other.success) { - __this__success.add(new FieldSchema(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new UnknownTableException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); - } - } - - public get_fields_with_environment_context_result deepCopy() { - return new get_fields_with_environment_context_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(FieldSchema elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public UnknownTableException getO2() { - return this.o2; - } - - public void setO2(UnknownTableException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public UnknownDBException getO3() { - return this.o3; - } - - public void setO3(UnknownDBException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((UnknownTableException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_fields_with_environment_context_result) - return this.equals((get_fields_with_environment_context_result)that); - return false; - } - - public boolean equals(get_fields_with_environment_context_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(get_fields_with_environment_context_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_fields_with_environment_context_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 get_fields_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { - public get_fields_with_environment_context_resultStandardScheme getScheme() { - return new get_fields_with_environment_context_resultStandardScheme(); - } - } - - private static class get_fields_with_environment_context_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_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.LIST) { - { - org.apache.thrift.protocol.TList _list740 = iprot.readListBegin(); - struct.success = new ArrayList(_list740.size); - FieldSchema _elem741; - for (int _i742 = 0; _i742 < _list740.size; ++_i742) - { - _elem741 = new FieldSchema(); - _elem741.read(iprot); - struct.success.add(_elem741); - } - 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_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); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (FieldSchema _iter743 : struct.success) - { - _iter743.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_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { - public get_fields_with_environment_context_resultTupleScheme getScheme() { - return new get_fields_with_environment_context_resultTupleScheme(); - } - } - - private static class get_fields_with_environment_context_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_fields_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()) { - { - oprot.writeI32(struct.success.size()); - for (FieldSchema _iter744 : struct.success) - { - _iter744.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_with_environment_context_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 _list745 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list745.size); - FieldSchema _elem746; - for (int _i747 = 0; _i747 < _list745.size; ++_i747) - { - _elem746 = new FieldSchema(); - _elem746.read(iprot); - struct.success.add(_elem746); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TABLE_NAME((short)2, "table_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TABLE_NAME - return TABLE_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_schema_args.class, metaDataMap); - } - - public get_schema_args() { - } - - public get_schema_args( - String db_name, - String table_name) - { - this(); - this.db_name = db_name; - this.table_name = table_name; - } - - /** - * Performs a deep copy on other. - */ - public get_schema_args(get_schema_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTable_name()) { - this.table_name = other.table_name; - } - } - - public get_schema_args deepCopy() { - return new get_schema_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.table_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTable_name() { - return this.table_name; - } - - public void setTable_name(String table_name) { - this.table_name = table_name; - } - - public void unsetTable_name() { - this.table_name = null; - } - - /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTable_name() { - return this.table_name != null; - } - - public void setTable_nameIsSet(boolean value) { - if (!value) { - this.table_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTable_name(); - } else { - setTable_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TABLE_NAME: - return getTable_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TABLE_NAME: - return isSetTable_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_schema_args) - return this.equals((get_schema_args)that); - return false; - } - - public boolean equals(get_schema_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_table_name = true && this.isSetTable_name(); - boolean that_present_table_name = true && that.isSetTable_name(); - if (this_present_table_name || that_present_table_name) { - if (!(this_present_table_name && that_present_table_name)) - return false; - if (!this.table_name.equals(that.table_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_table_name = true && (isSetTable_name()); - list.add(present_table_name); - if (present_table_name) - list.add(table_name); - - return list.hashCode(); - } - - @Override - public int compareTo(get_schema_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_schema_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { - sb.append("null"); - } else { - sb.append(this.table_name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_result"); - - 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 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 - private UnknownDBException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_schema_result.class, metaDataMap); - } - - public get_schema_result() { - } - - public get_schema_result( - List success, - MetaException o1, - UnknownTableException o2, - UnknownDBException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public get_schema_result(get_schema_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (FieldSchema other_element : other.success) { - __this__success.add(new FieldSchema(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new UnknownTableException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); - } - } - - public get_schema_result deepCopy() { - return new get_schema_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(FieldSchema elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public UnknownTableException getO2() { - return this.o2; - } - - public void setO2(UnknownTableException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public UnknownDBException getO3() { - return this.o3; - } - - public void setO3(UnknownDBException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((UnknownTableException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_schema_result) - return this.equals((get_schema_result)that); - return false; - } - - public boolean equals(get_schema_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(get_schema_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_schema_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 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 _list748 = iprot.readListBegin(); - struct.success = new ArrayList(_list748.size); - FieldSchema _elem749; - for (int _i750 = 0; _i750 < _list748.size; ++_i750) - { - _elem749 = new FieldSchema(); - _elem749.read(iprot); - struct.success.add(_elem749); - } - 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 _iter751 : struct.success) - { - _iter751.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 _iter752 : struct.success) - { - _iter752.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 _list753 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list753.size); - FieldSchema _elem754; - for (int _i755 = 0; _i755 < _list753.size; ++_i755) - { - _elem754 = new FieldSchema(); - _elem754.read(iprot); - struct.success.add(_elem754); - } - } - 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_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_with_environment_context_args"); - - 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 org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", 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_with_environment_context_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_schema_with_environment_context_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String table_name; // required - private EnvironmentContext environment_context; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TABLE_NAME((short)2, "table_name"), - ENVIRONMENT_CONTEXT((short)3, "environment_context"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TABLE_NAME - return TABLE_NAME; - case 3: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_schema_with_environment_context_args.class, metaDataMap); - } - - public get_schema_with_environment_context_args() { - } - - public get_schema_with_environment_context_args( - String db_name, - String table_name, - EnvironmentContext environment_context) - { - this(); - this.db_name = db_name; - this.table_name = table_name; - this.environment_context = environment_context; - } - - /** - * Performs a deep copy on other. - */ - public get_schema_with_environment_context_args(get_schema_with_environment_context_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTable_name()) { - this.table_name = other.table_name; - } - if (other.isSetEnvironment_context()) { - this.environment_context = new EnvironmentContext(other.environment_context); - } - } - - public get_schema_with_environment_context_args deepCopy() { - return new get_schema_with_environment_context_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.table_name = null; - this.environment_context = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTable_name() { - return this.table_name; - } - - public void setTable_name(String table_name) { - this.table_name = table_name; - } - - public void unsetTable_name() { - this.table_name = null; - } - - /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTable_name() { - return this.table_name != null; - } - - public void setTable_nameIsSet(boolean value) { - if (!value) { - this.table_name = null; - } - } - - public EnvironmentContext getEnvironment_context() { - return this.environment_context; - } - - public void setEnvironment_context(EnvironmentContext environment_context) { - this.environment_context = environment_context; - } - - public void unsetEnvironment_context() { - this.environment_context = null; - } - - /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironment_context() { - return this.environment_context != null; - } - - public void setEnvironment_contextIsSet(boolean value) { - if (!value) { - this.environment_context = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTable_name(); - } else { - setTable_name((String)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironment_context(); - } else { - setEnvironment_context((EnvironmentContext)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TABLE_NAME: - return getTable_name(); - - case ENVIRONMENT_CONTEXT: - return getEnvironment_context(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TABLE_NAME: - return isSetTable_name(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironment_context(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_schema_with_environment_context_args) - return this.equals((get_schema_with_environment_context_args)that); - return false; - } - - public boolean equals(get_schema_with_environment_context_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_table_name = true && this.isSetTable_name(); - boolean that_present_table_name = true && that.isSetTable_name(); - if (this_present_table_name || that_present_table_name) { - if (!(this_present_table_name && that_present_table_name)) - return false; - if (!this.table_name.equals(that.table_name)) - return false; - } - - boolean this_present_environment_context = true && this.isSetEnvironment_context(); - boolean that_present_environment_context = true && that.isSetEnvironment_context(); - if (this_present_environment_context || that_present_environment_context) { - if (!(this_present_environment_context && that_present_environment_context)) - return false; - if (!this.environment_context.equals(that.environment_context)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_table_name = true && (isSetTable_name()); - list.add(present_table_name); - if (present_table_name) - list.add(table_name); - - boolean present_environment_context = true && (isSetEnvironment_context()); - list.add(present_environment_context); - if (present_environment_context) - list.add(environment_context); - - return list.hashCode(); - } - - @Override - public int compareTo(get_schema_with_environment_context_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTable_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironment_context()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_schema_with_environment_context_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { - sb.append("null"); - } else { - sb.append(this.table_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("environment_context:"); - if (this.environment_context == null) { - sb.append("null"); - } else { - sb.append(this.environment_context); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (environment_context != null) { - environment_context.validate(); - } - } - - 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 get_schema_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { - public get_schema_with_environment_context_argsStandardScheme getScheme() { - return new get_schema_with_environment_context_argsStandardScheme(); - } - } - - private static class get_schema_with_environment_context_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_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: // 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; - case 3: // 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, get_schema_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.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(struct.table_name); - 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 get_schema_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { - public get_schema_with_environment_context_argsTupleScheme getScheme() { - return new get_schema_with_environment_context_argsTupleScheme(); - } - } - - private static class get_schema_with_environment_context_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_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.isSetTable_name()) { - optionals.set(1); - } - if (struct.isSetEnvironment_context()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetDb_name()) { - oprot.writeString(struct.db_name); - } - if (struct.isSetTable_name()) { - oprot.writeString(struct.table_name); - } - if (struct.isSetEnvironment_context()) { - struct.environment_context.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_with_environment_context_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.table_name = iprot.readString(); - struct.setTable_nameIsSet(true); - } - if (incoming.get(2)) { - struct.environment_context = new EnvironmentContext(); - struct.environment_context.read(iprot); - struct.setEnvironment_contextIsSet(true); - } - } - } - - } - - public static class get_schema_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_with_environment_context_result"); - - 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 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_with_environment_context_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_schema_with_environment_context_resultTupleSchemeFactory()); - } - - private List success; // required - private MetaException o1; // required - private UnknownTableException o2; // required - private UnknownDBException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_schema_with_environment_context_result.class, metaDataMap); - } - - public get_schema_with_environment_context_result() { - } - - public get_schema_with_environment_context_result( - List success, - MetaException o1, - UnknownTableException o2, - UnknownDBException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public get_schema_with_environment_context_result(get_schema_with_environment_context_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (FieldSchema other_element : other.success) { - __this__success.add(new FieldSchema(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new UnknownTableException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); - } - } - - public get_schema_with_environment_context_result deepCopy() { - return new get_schema_with_environment_context_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(FieldSchema elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public UnknownTableException getO2() { - return this.o2; - } - - public void setO2(UnknownTableException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public UnknownDBException getO3() { - return this.o3; - } - - public void setO3(UnknownDBException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((UnknownTableException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_schema_with_environment_context_result) - return this.equals((get_schema_with_environment_context_result)that); - return false; - } - - public boolean equals(get_schema_with_environment_context_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(get_schema_with_environment_context_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_schema_with_environment_context_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 get_schema_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { - public get_schema_with_environment_context_resultStandardScheme getScheme() { - return new get_schema_with_environment_context_resultStandardScheme(); - } - } - - private static class get_schema_with_environment_context_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_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.LIST) { - { - org.apache.thrift.protocol.TList _list756 = iprot.readListBegin(); - struct.success = new ArrayList(_list756.size); - FieldSchema _elem757; - for (int _i758 = 0; _i758 < _list756.size; ++_i758) - { - _elem757 = new FieldSchema(); - _elem757.read(iprot); - struct.success.add(_elem757); - } - 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_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); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (FieldSchema _iter759 : struct.success) - { - _iter759.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_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { - public get_schema_with_environment_context_resultTupleScheme getScheme() { - return new get_schema_with_environment_context_resultTupleScheme(); - } - } - - private static class get_schema_with_environment_context_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_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()) { - { - oprot.writeI32(struct.success.size()); - for (FieldSchema _iter760 : struct.success) - { - _iter760.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_with_environment_context_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 _list761 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list761.size); - FieldSchema _elem762; - for (int _i763 = 0; _i763 < _list761.size; ++_i763) - { - _elem762 = new FieldSchema(); - _elem762.read(iprot); - struct.success.add(_elem762); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TBL((short)1, "tbl"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TBL - return TBL; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TBL, new org.apache.thrift.meta_data.FieldMetaData("tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap); - } - - public create_table_args() { - } - - public create_table_args( - Table tbl) - { - this(); - this.tbl = tbl; - } - - /** - * Performs a deep copy on other. - */ - public create_table_args(create_table_args other) { - if (other.isSetTbl()) { - this.tbl = new Table(other.tbl); - } - } - - public create_table_args deepCopy() { - return new create_table_args(this); - } - - @Override - public void clear() { - this.tbl = null; - } - - public Table getTbl() { - return this.tbl; - } - - public void setTbl(Table tbl) { - this.tbl = tbl; - } - - public void unsetTbl() { - this.tbl = null; - } - - /** Returns true if field tbl is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl() { - return this.tbl != null; - } - - public void setTblIsSet(boolean value) { - if (!value) { - this.tbl = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TBL: - if (value == null) { - unsetTbl(); - } else { - setTbl((Table)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TBL: - return getTbl(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TBL: - return isSetTbl(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_table_args) - return this.equals((create_table_args)that); - return false; - } - - public boolean equals(create_table_args that) { - if (that == null) - return false; - - boolean this_present_tbl = true && this.isSetTbl(); - boolean that_present_tbl = true && that.isSetTbl(); - if (this_present_tbl || that_present_tbl) { - if (!(this_present_tbl && that_present_tbl)) - return false; - if (!this.tbl.equals(that.tbl)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_tbl = true && (isSetTbl()); - list.add(present_tbl); - if (present_tbl) - list.add(tbl); - - return list.hashCode(); - } - - @Override - public int compareTo(create_table_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTbl()).compareTo(other.isSetTbl()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, other.tbl); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_table_args("); - boolean first = true; - - sb.append("tbl:"); - if (this.tbl == null) { - sb.append("null"); - } else { - sb.append(this.tbl); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_result"); - - 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 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 - private NoSuchObjectException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap); - } - - public create_table_result() { - } - - public create_table_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3, - NoSuchObjectException o4) - { - this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public create_table_result(create_table_result other) { - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new NoSuchObjectException(other.o4); - } - } - - public create_table_result deepCopy() { - return new create_table_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public AlreadyExistsException getO1() { - return this.o1; - } - - public void setO1(AlreadyExistsException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public NoSuchObjectException getO4() { - return this.o4; - } - - public void setO4(NoSuchObjectException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((AlreadyExistsException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_table_result) - return this.equals((create_table_result)that); - return false; - } - - public boolean equals(create_table_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(create_table_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_table_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_environment_context_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TBL((short)1, "tbl"), - ENVIRONMENT_CONTEXT((short)2, "environment_context"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TBL - return TBL; - case 2: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TBL, new org.apache.thrift.meta_data.FieldMetaData("tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_with_environment_context_args.class, metaDataMap); - } - - public create_table_with_environment_context_args() { - } - - public create_table_with_environment_context_args( - Table tbl, - EnvironmentContext environment_context) - { - this(); - this.tbl = tbl; - this.environment_context = environment_context; - } - - /** - * Performs a deep copy on other. - */ - public create_table_with_environment_context_args(create_table_with_environment_context_args other) { - if (other.isSetTbl()) { - this.tbl = new Table(other.tbl); - } - if (other.isSetEnvironment_context()) { - this.environment_context = new EnvironmentContext(other.environment_context); - } - } - - public create_table_with_environment_context_args deepCopy() { - return new create_table_with_environment_context_args(this); - } - - @Override - public void clear() { - this.tbl = null; - this.environment_context = null; - } - - public Table getTbl() { - return this.tbl; - } - - public void setTbl(Table tbl) { - this.tbl = tbl; - } - - public void unsetTbl() { - this.tbl = null; - } - - /** Returns true if field tbl is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl() { - return this.tbl != null; - } - - public void setTblIsSet(boolean value) { - if (!value) { - this.tbl = null; - } - } - - public EnvironmentContext getEnvironment_context() { - return this.environment_context; - } - - public void setEnvironment_context(EnvironmentContext environment_context) { - this.environment_context = environment_context; - } - - public void unsetEnvironment_context() { - this.environment_context = null; - } - - /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironment_context() { - return this.environment_context != null; - } - - public void setEnvironment_contextIsSet(boolean value) { - if (!value) { - this.environment_context = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TBL: - if (value == null) { - unsetTbl(); - } else { - setTbl((Table)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironment_context(); - } else { - setEnvironment_context((EnvironmentContext)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TBL: - return getTbl(); - - case ENVIRONMENT_CONTEXT: - return getEnvironment_context(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TBL: - return isSetTbl(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironment_context(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_table_with_environment_context_args) - return this.equals((create_table_with_environment_context_args)that); - return false; - } - - public boolean equals(create_table_with_environment_context_args that) { - if (that == null) - return false; - - boolean this_present_tbl = true && this.isSetTbl(); - boolean that_present_tbl = true && that.isSetTbl(); - if (this_present_tbl || that_present_tbl) { - if (!(this_present_tbl && that_present_tbl)) - return false; - if (!this.tbl.equals(that.tbl)) - return false; - } - - boolean this_present_environment_context = true && this.isSetEnvironment_context(); - boolean that_present_environment_context = true && that.isSetEnvironment_context(); - if (this_present_environment_context || that_present_environment_context) { - if (!(this_present_environment_context && that_present_environment_context)) - return false; - if (!this.environment_context.equals(that.environment_context)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_tbl = true && (isSetTbl()); - list.add(present_tbl); - if (present_tbl) - list.add(tbl); - - boolean present_environment_context = true && (isSetEnvironment_context()); - list.add(present_environment_context); - if (present_environment_context) - list.add(environment_context); - - return list.hashCode(); - } - - @Override - public int compareTo(create_table_with_environment_context_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTbl()).compareTo(other.isSetTbl()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, other.tbl); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironment_context()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_table_with_environment_context_args("); - boolean first = true; - - sb.append("tbl:"); - if (this.tbl == null) { - sb.append("null"); - } else { - sb.append(this.tbl); - } - first = false; - if (!first) sb.append(", "); - sb.append("environment_context:"); - if (this.environment_context == null) { - sb.append("null"); - } else { - sb.append(this.environment_context); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_environment_context_result"); - - 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 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 - private NoSuchObjectException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_with_environment_context_result.class, metaDataMap); - } - - public create_table_with_environment_context_result() { - } - - public create_table_with_environment_context_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3, - NoSuchObjectException o4) - { - this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public create_table_with_environment_context_result(create_table_with_environment_context_result other) { - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new NoSuchObjectException(other.o4); - } - } - - public create_table_with_environment_context_result deepCopy() { - return new create_table_with_environment_context_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public AlreadyExistsException getO1() { - return this.o1; - } - - public void setO1(AlreadyExistsException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public NoSuchObjectException getO4() { - return this.o4; - } - - public void setO4(NoSuchObjectException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((AlreadyExistsException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_table_with_environment_context_result) - return this.equals((create_table_with_environment_context_result)that); - return false; - } - - public boolean equals(create_table_with_environment_context_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(create_table_with_environment_context_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_table_with_environment_context_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - 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 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 create_table_with_constraints_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_constraints_args"); - - 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 PRIMARY_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("primaryKeys", org.apache.thrift.protocol.TType.LIST, (short)2); - private static final org.apache.thrift.protocol.TField FOREIGN_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignKeys", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final org.apache.thrift.protocol.TField UNIQUE_CONSTRAINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("uniqueConstraints", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final org.apache.thrift.protocol.TField NOT_NULL_CONSTRAINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("notNullConstraints", org.apache.thrift.protocol.TType.LIST, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new create_table_with_constraints_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new create_table_with_constraints_argsTupleSchemeFactory()); - } - - private Table tbl; // required - private List primaryKeys; // required - private List foreignKeys; // required - private List uniqueConstraints; // required - private List notNullConstraints; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TBL((short)1, "tbl"), - PRIMARY_KEYS((short)2, "primaryKeys"), - FOREIGN_KEYS((short)3, "foreignKeys"), - UNIQUE_CONSTRAINTS((short)4, "uniqueConstraints"), - NOT_NULL_CONSTRAINTS((short)5, "notNullConstraints"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TBL - return TBL; - case 2: // PRIMARY_KEYS - return PRIMARY_KEYS; - case 3: // FOREIGN_KEYS - return FOREIGN_KEYS; - case 4: // UNIQUE_CONSTRAINTS - return UNIQUE_CONSTRAINTS; - case 5: // NOT_NULL_CONSTRAINTS - return NOT_NULL_CONSTRAINTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TBL, new org.apache.thrift.meta_data.FieldMetaData("tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); - tmpMap.put(_Fields.PRIMARY_KEYS, new org.apache.thrift.meta_data.FieldMetaData("primaryKeys", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLPrimaryKey.class)))); - tmpMap.put(_Fields.FOREIGN_KEYS, new org.apache.thrift.meta_data.FieldMetaData("foreignKeys", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLForeignKey.class)))); - tmpMap.put(_Fields.UNIQUE_CONSTRAINTS, new org.apache.thrift.meta_data.FieldMetaData("uniqueConstraints", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLUniqueConstraint.class)))); - tmpMap.put(_Fields.NOT_NULL_CONSTRAINTS, new org.apache.thrift.meta_data.FieldMetaData("notNullConstraints", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLNotNullConstraint.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_with_constraints_args.class, metaDataMap); - } - - public create_table_with_constraints_args() { - } - - public create_table_with_constraints_args( - Table tbl, - List primaryKeys, - List foreignKeys, - List uniqueConstraints, - List notNullConstraints) - { - this(); - this.tbl = tbl; - this.primaryKeys = primaryKeys; - this.foreignKeys = foreignKeys; - this.uniqueConstraints = uniqueConstraints; - this.notNullConstraints = notNullConstraints; - } - - /** - * Performs a deep copy on other. - */ - public create_table_with_constraints_args(create_table_with_constraints_args other) { - if (other.isSetTbl()) { - this.tbl = new Table(other.tbl); - } - if (other.isSetPrimaryKeys()) { - List __this__primaryKeys = new ArrayList(other.primaryKeys.size()); - for (SQLPrimaryKey other_element : other.primaryKeys) { - __this__primaryKeys.add(new SQLPrimaryKey(other_element)); - } - this.primaryKeys = __this__primaryKeys; - } - if (other.isSetForeignKeys()) { - List __this__foreignKeys = new ArrayList(other.foreignKeys.size()); - for (SQLForeignKey other_element : other.foreignKeys) { - __this__foreignKeys.add(new SQLForeignKey(other_element)); - } - this.foreignKeys = __this__foreignKeys; - } - if (other.isSetUniqueConstraints()) { - List __this__uniqueConstraints = new ArrayList(other.uniqueConstraints.size()); - for (SQLUniqueConstraint other_element : other.uniqueConstraints) { - __this__uniqueConstraints.add(new SQLUniqueConstraint(other_element)); - } - this.uniqueConstraints = __this__uniqueConstraints; - } - if (other.isSetNotNullConstraints()) { - List __this__notNullConstraints = new ArrayList(other.notNullConstraints.size()); - for (SQLNotNullConstraint other_element : other.notNullConstraints) { - __this__notNullConstraints.add(new SQLNotNullConstraint(other_element)); - } - this.notNullConstraints = __this__notNullConstraints; - } - } - - public create_table_with_constraints_args deepCopy() { - return new create_table_with_constraints_args(this); - } - - @Override - public void clear() { - this.tbl = null; - this.primaryKeys = null; - this.foreignKeys = null; - this.uniqueConstraints = null; - this.notNullConstraints = null; - } - - public Table getTbl() { - return this.tbl; - } - - public void setTbl(Table tbl) { - this.tbl = tbl; - } - - public void unsetTbl() { - this.tbl = null; - } - - /** Returns true if field tbl is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl() { - return this.tbl != null; - } - - public void setTblIsSet(boolean value) { - if (!value) { - this.tbl = null; - } - } - - public int getPrimaryKeysSize() { - return (this.primaryKeys == null) ? 0 : this.primaryKeys.size(); - } - - public java.util.Iterator getPrimaryKeysIterator() { - return (this.primaryKeys == null) ? null : this.primaryKeys.iterator(); - } - - public void addToPrimaryKeys(SQLPrimaryKey elem) { - if (this.primaryKeys == null) { - this.primaryKeys = new ArrayList(); - } - this.primaryKeys.add(elem); - } - - public List getPrimaryKeys() { - return this.primaryKeys; - } - - public void setPrimaryKeys(List primaryKeys) { - this.primaryKeys = primaryKeys; - } - - public void unsetPrimaryKeys() { - this.primaryKeys = null; - } - - /** Returns true if field primaryKeys is set (has been assigned a value) and false otherwise */ - public boolean isSetPrimaryKeys() { - return this.primaryKeys != null; - } - - public void setPrimaryKeysIsSet(boolean value) { - if (!value) { - this.primaryKeys = null; - } - } - - public int getForeignKeysSize() { - return (this.foreignKeys == null) ? 0 : this.foreignKeys.size(); - } - - public java.util.Iterator getForeignKeysIterator() { - return (this.foreignKeys == null) ? null : this.foreignKeys.iterator(); - } - - public void addToForeignKeys(SQLForeignKey elem) { - if (this.foreignKeys == null) { - this.foreignKeys = new ArrayList(); - } - this.foreignKeys.add(elem); - } - - public List getForeignKeys() { - return this.foreignKeys; - } - - public void setForeignKeys(List foreignKeys) { - this.foreignKeys = foreignKeys; - } - - public void unsetForeignKeys() { - this.foreignKeys = null; - } - - /** Returns true if field foreignKeys is set (has been assigned a value) and false otherwise */ - public boolean isSetForeignKeys() { - return this.foreignKeys != null; - } - - public void setForeignKeysIsSet(boolean value) { - if (!value) { - this.foreignKeys = null; - } - } - - public int getUniqueConstraintsSize() { - return (this.uniqueConstraints == null) ? 0 : this.uniqueConstraints.size(); - } - - public java.util.Iterator getUniqueConstraintsIterator() { - return (this.uniqueConstraints == null) ? null : this.uniqueConstraints.iterator(); - } - - public void addToUniqueConstraints(SQLUniqueConstraint elem) { - if (this.uniqueConstraints == null) { - this.uniqueConstraints = new ArrayList(); - } - this.uniqueConstraints.add(elem); - } - - public List getUniqueConstraints() { - return this.uniqueConstraints; - } - - public void setUniqueConstraints(List uniqueConstraints) { - this.uniqueConstraints = uniqueConstraints; - } - - public void unsetUniqueConstraints() { - this.uniqueConstraints = null; - } - - /** Returns true if field uniqueConstraints is set (has been assigned a value) and false otherwise */ - public boolean isSetUniqueConstraints() { - return this.uniqueConstraints != null; - } - - public void setUniqueConstraintsIsSet(boolean value) { - if (!value) { - this.uniqueConstraints = null; - } - } - - public int getNotNullConstraintsSize() { - return (this.notNullConstraints == null) ? 0 : this.notNullConstraints.size(); - } - - public java.util.Iterator getNotNullConstraintsIterator() { - return (this.notNullConstraints == null) ? null : this.notNullConstraints.iterator(); - } - - public void addToNotNullConstraints(SQLNotNullConstraint elem) { - if (this.notNullConstraints == null) { - this.notNullConstraints = new ArrayList(); - } - this.notNullConstraints.add(elem); - } - - public List getNotNullConstraints() { - return this.notNullConstraints; - } - - public void setNotNullConstraints(List notNullConstraints) { - this.notNullConstraints = notNullConstraints; - } - - public void unsetNotNullConstraints() { - this.notNullConstraints = null; - } - - /** Returns true if field notNullConstraints is set (has been assigned a value) and false otherwise */ - public boolean isSetNotNullConstraints() { - return this.notNullConstraints != null; - } - - public void setNotNullConstraintsIsSet(boolean value) { - if (!value) { - this.notNullConstraints = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TBL: - if (value == null) { - unsetTbl(); - } else { - setTbl((Table)value); - } - break; - - case PRIMARY_KEYS: - if (value == null) { - unsetPrimaryKeys(); - } else { - setPrimaryKeys((List)value); - } - break; - - case FOREIGN_KEYS: - if (value == null) { - unsetForeignKeys(); - } else { - setForeignKeys((List)value); - } - break; - - case UNIQUE_CONSTRAINTS: - if (value == null) { - unsetUniqueConstraints(); - } else { - setUniqueConstraints((List)value); - } - break; - - case NOT_NULL_CONSTRAINTS: - if (value == null) { - unsetNotNullConstraints(); - } else { - setNotNullConstraints((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TBL: - return getTbl(); - - case PRIMARY_KEYS: - return getPrimaryKeys(); - - case FOREIGN_KEYS: - return getForeignKeys(); - - case UNIQUE_CONSTRAINTS: - return getUniqueConstraints(); - - case NOT_NULL_CONSTRAINTS: - return getNotNullConstraints(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TBL: - return isSetTbl(); - case PRIMARY_KEYS: - return isSetPrimaryKeys(); - case FOREIGN_KEYS: - return isSetForeignKeys(); - case UNIQUE_CONSTRAINTS: - return isSetUniqueConstraints(); - case NOT_NULL_CONSTRAINTS: - return isSetNotNullConstraints(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_table_with_constraints_args) - return this.equals((create_table_with_constraints_args)that); - return false; - } - - public boolean equals(create_table_with_constraints_args that) { - if (that == null) - return false; - - boolean this_present_tbl = true && this.isSetTbl(); - boolean that_present_tbl = true && that.isSetTbl(); - if (this_present_tbl || that_present_tbl) { - if (!(this_present_tbl && that_present_tbl)) - return false; - if (!this.tbl.equals(that.tbl)) - return false; - } - - boolean this_present_primaryKeys = true && this.isSetPrimaryKeys(); - boolean that_present_primaryKeys = true && that.isSetPrimaryKeys(); - if (this_present_primaryKeys || that_present_primaryKeys) { - if (!(this_present_primaryKeys && that_present_primaryKeys)) - return false; - if (!this.primaryKeys.equals(that.primaryKeys)) - return false; - } - - boolean this_present_foreignKeys = true && this.isSetForeignKeys(); - boolean that_present_foreignKeys = true && that.isSetForeignKeys(); - if (this_present_foreignKeys || that_present_foreignKeys) { - if (!(this_present_foreignKeys && that_present_foreignKeys)) - return false; - if (!this.foreignKeys.equals(that.foreignKeys)) - return false; - } - - boolean this_present_uniqueConstraints = true && this.isSetUniqueConstraints(); - boolean that_present_uniqueConstraints = true && that.isSetUniqueConstraints(); - if (this_present_uniqueConstraints || that_present_uniqueConstraints) { - if (!(this_present_uniqueConstraints && that_present_uniqueConstraints)) - return false; - if (!this.uniqueConstraints.equals(that.uniqueConstraints)) - return false; - } - - boolean this_present_notNullConstraints = true && this.isSetNotNullConstraints(); - boolean that_present_notNullConstraints = true && that.isSetNotNullConstraints(); - if (this_present_notNullConstraints || that_present_notNullConstraints) { - if (!(this_present_notNullConstraints && that_present_notNullConstraints)) - return false; - if (!this.notNullConstraints.equals(that.notNullConstraints)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_tbl = true && (isSetTbl()); - list.add(present_tbl); - if (present_tbl) - list.add(tbl); - - boolean present_primaryKeys = true && (isSetPrimaryKeys()); - list.add(present_primaryKeys); - if (present_primaryKeys) - list.add(primaryKeys); - - boolean present_foreignKeys = true && (isSetForeignKeys()); - list.add(present_foreignKeys); - if (present_foreignKeys) - list.add(foreignKeys); - - boolean present_uniqueConstraints = true && (isSetUniqueConstraints()); - list.add(present_uniqueConstraints); - if (present_uniqueConstraints) - list.add(uniqueConstraints); - - boolean present_notNullConstraints = true && (isSetNotNullConstraints()); - list.add(present_notNullConstraints); - if (present_notNullConstraints) - list.add(notNullConstraints); - - return list.hashCode(); - } - - @Override - public int compareTo(create_table_with_constraints_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTbl()).compareTo(other.isSetTbl()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, other.tbl); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrimaryKeys()).compareTo(other.isSetPrimaryKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrimaryKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.primaryKeys, other.primaryKeys); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetForeignKeys()).compareTo(other.isSetForeignKeys()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetForeignKeys()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignKeys, other.foreignKeys); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUniqueConstraints()).compareTo(other.isSetUniqueConstraints()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUniqueConstraints()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uniqueConstraints, other.uniqueConstraints); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNotNullConstraints()).compareTo(other.isSetNotNullConstraints()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNotNullConstraints()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notNullConstraints, other.notNullConstraints); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_table_with_constraints_args("); - boolean first = true; - - sb.append("tbl:"); - if (this.tbl == null) { - sb.append("null"); - } else { - sb.append(this.tbl); - } - first = false; - if (!first) sb.append(", "); - sb.append("primaryKeys:"); - if (this.primaryKeys == null) { - sb.append("null"); - } else { - sb.append(this.primaryKeys); - } - first = false; - if (!first) sb.append(", "); - sb.append("foreignKeys:"); - if (this.foreignKeys == null) { - sb.append("null"); - } else { - sb.append(this.foreignKeys); - } - first = false; - if (!first) sb.append(", "); - sb.append("uniqueConstraints:"); - if (this.uniqueConstraints == null) { - sb.append("null"); - } else { - sb.append(this.uniqueConstraints); - } - first = false; - if (!first) sb.append(", "); - sb.append("notNullConstraints:"); - if (this.notNullConstraints == null) { - sb.append("null"); - } else { - sb.append(this.notNullConstraints); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 create_table_with_constraints_argsStandardSchemeFactory implements SchemeFactory { - public create_table_with_constraints_argsStandardScheme getScheme() { - return new create_table_with_constraints_argsStandardScheme(); - } - } - - private static class create_table_with_constraints_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_constraints_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: // PRIMARY_KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list764 = iprot.readListBegin(); - struct.primaryKeys = new ArrayList(_list764.size); - SQLPrimaryKey _elem765; - for (int _i766 = 0; _i766 < _list764.size; ++_i766) - { - _elem765 = new SQLPrimaryKey(); - _elem765.read(iprot); - struct.primaryKeys.add(_elem765); - } - iprot.readListEnd(); - } - struct.setPrimaryKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // FOREIGN_KEYS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list767 = iprot.readListBegin(); - struct.foreignKeys = new ArrayList(_list767.size); - SQLForeignKey _elem768; - for (int _i769 = 0; _i769 < _list767.size; ++_i769) - { - _elem768 = new SQLForeignKey(); - _elem768.read(iprot); - struct.foreignKeys.add(_elem768); - } - iprot.readListEnd(); - } - struct.setForeignKeysIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // UNIQUE_CONSTRAINTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list770 = iprot.readListBegin(); - struct.uniqueConstraints = new ArrayList(_list770.size); - SQLUniqueConstraint _elem771; - for (int _i772 = 0; _i772 < _list770.size; ++_i772) - { - _elem771 = new SQLUniqueConstraint(); - _elem771.read(iprot); - struct.uniqueConstraints.add(_elem771); - } - iprot.readListEnd(); - } - struct.setUniqueConstraintsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // NOT_NULL_CONSTRAINTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list773 = iprot.readListBegin(); - struct.notNullConstraints = new ArrayList(_list773.size); - SQLNotNullConstraint _elem774; - for (int _i775 = 0; _i775 < _list773.size; ++_i775) - { - _elem774 = new SQLNotNullConstraint(); - _elem774.read(iprot); - struct.notNullConstraints.add(_elem774); - } - iprot.readListEnd(); - } - struct.setNotNullConstraintsIsSet(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_constraints_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.primaryKeys != null) { - oprot.writeFieldBegin(PRIMARY_KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.primaryKeys.size())); - for (SQLPrimaryKey _iter776 : struct.primaryKeys) - { - _iter776.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.foreignKeys != null) { - oprot.writeFieldBegin(FOREIGN_KEYS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeys.size())); - for (SQLForeignKey _iter777 : struct.foreignKeys) - { - _iter777.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.uniqueConstraints != null) { - oprot.writeFieldBegin(UNIQUE_CONSTRAINTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.uniqueConstraints.size())); - for (SQLUniqueConstraint _iter778 : struct.uniqueConstraints) - { - _iter778.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.notNullConstraints != null) { - oprot.writeFieldBegin(NOT_NULL_CONSTRAINTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.notNullConstraints.size())); - for (SQLNotNullConstraint _iter779 : struct.notNullConstraints) - { - _iter779.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class create_table_with_constraints_argsTupleSchemeFactory implements SchemeFactory { - public create_table_with_constraints_argsTupleScheme getScheme() { - return new create_table_with_constraints_argsTupleScheme(); - } - } - - private static class create_table_with_constraints_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_constraints_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetTbl()) { - optionals.set(0); - } - if (struct.isSetPrimaryKeys()) { - optionals.set(1); - } - if (struct.isSetForeignKeys()) { - optionals.set(2); - } - if (struct.isSetUniqueConstraints()) { - optionals.set(3); - } - if (struct.isSetNotNullConstraints()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetTbl()) { - struct.tbl.write(oprot); - } - if (struct.isSetPrimaryKeys()) { - { - oprot.writeI32(struct.primaryKeys.size()); - for (SQLPrimaryKey _iter780 : struct.primaryKeys) - { - _iter780.write(oprot); - } - } - } - if (struct.isSetForeignKeys()) { - { - oprot.writeI32(struct.foreignKeys.size()); - for (SQLForeignKey _iter781 : struct.foreignKeys) - { - _iter781.write(oprot); - } - } - } - if (struct.isSetUniqueConstraints()) { - { - oprot.writeI32(struct.uniqueConstraints.size()); - for (SQLUniqueConstraint _iter782 : struct.uniqueConstraints) - { - _iter782.write(oprot); - } - } - } - if (struct.isSetNotNullConstraints()) { - { - oprot.writeI32(struct.notNullConstraints.size()); - for (SQLNotNullConstraint _iter783 : struct.notNullConstraints) - { - _iter783.write(oprot); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, create_table_with_constraints_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.tbl = new Table(); - struct.tbl.read(iprot); - struct.setTblIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.thrift.protocol.TList _list784 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.primaryKeys = new ArrayList(_list784.size); - SQLPrimaryKey _elem785; - for (int _i786 = 0; _i786 < _list784.size; ++_i786) - { - _elem785 = new SQLPrimaryKey(); - _elem785.read(iprot); - struct.primaryKeys.add(_elem785); - } - } - struct.setPrimaryKeysIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list787 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.foreignKeys = new ArrayList(_list787.size); - SQLForeignKey _elem788; - for (int _i789 = 0; _i789 < _list787.size; ++_i789) - { - _elem788 = new SQLForeignKey(); - _elem788.read(iprot); - struct.foreignKeys.add(_elem788); - } - } - struct.setForeignKeysIsSet(true); - } - if (incoming.get(3)) { - { - org.apache.thrift.protocol.TList _list790 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.uniqueConstraints = new ArrayList(_list790.size); - SQLUniqueConstraint _elem791; - for (int _i792 = 0; _i792 < _list790.size; ++_i792) - { - _elem791 = new SQLUniqueConstraint(); - _elem791.read(iprot); - struct.uniqueConstraints.add(_elem791); - } - } - struct.setUniqueConstraintsIsSet(true); - } - if (incoming.get(4)) { - { - org.apache.thrift.protocol.TList _list793 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.notNullConstraints = new ArrayList(_list793.size); - SQLNotNullConstraint _elem794; - for (int _i795 = 0; _i795 < _list793.size; ++_i795) - { - _elem794 = new SQLNotNullConstraint(); - _elem794.read(iprot); - struct.notNullConstraints.add(_elem794); - } - } - struct.setNotNullConstraintsIsSet(true); - } - } - } - - } - - public static class create_table_with_constraints_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_constraints_result"); - - 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 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_constraints_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new create_table_with_constraints_resultTupleSchemeFactory()); - } - - private AlreadyExistsException o1; // required - private InvalidObjectException o2; // required - private MetaException o3; // required - private NoSuchObjectException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_with_constraints_result.class, metaDataMap); - } - - public create_table_with_constraints_result() { - } - - public create_table_with_constraints_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3, - NoSuchObjectException o4) - { - this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public create_table_with_constraints_result(create_table_with_constraints_result other) { - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new NoSuchObjectException(other.o4); - } - } - - public create_table_with_constraints_result deepCopy() { - return new create_table_with_constraints_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public AlreadyExistsException getO1() { - return this.o1; - } - - public void setO1(AlreadyExistsException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public NoSuchObjectException getO4() { - return this.o4; - } - - public void setO4(NoSuchObjectException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((AlreadyExistsException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_table_with_constraints_result) - return this.equals((create_table_with_constraints_result)that); - return false; - } - - public boolean equals(create_table_with_constraints_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(create_table_with_constraints_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_table_with_constraints_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - 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 create_table_with_constraints_resultStandardSchemeFactory implements SchemeFactory { - public create_table_with_constraints_resultStandardScheme getScheme() { - return new create_table_with_constraints_resultStandardScheme(); - } - } - - private static class create_table_with_constraints_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_constraints_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_constraints_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_constraints_resultTupleSchemeFactory implements SchemeFactory { - public create_table_with_constraints_resultTupleScheme getScheme() { - return new create_table_with_constraints_resultTupleScheme(); - } - } - - private static class create_table_with_constraints_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_constraints_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_constraints_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_constraint_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_constraint_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new drop_constraint_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_constraint_argsTupleSchemeFactory()); - } - - private DropConstraintRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DropConstraintRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_constraint_args.class, metaDataMap); - } - - public drop_constraint_args() { - } - - public drop_constraint_args( - DropConstraintRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public drop_constraint_args(drop_constraint_args other) { - if (other.isSetReq()) { - this.req = new DropConstraintRequest(other.req); - } - } - - public drop_constraint_args deepCopy() { - return new drop_constraint_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public DropConstraintRequest getReq() { - return this.req; - } - - public void setReq(DropConstraintRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((DropConstraintRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_constraint_args) - return this.equals((drop_constraint_args)that); - return false; - } - - public boolean equals(drop_constraint_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_constraint_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_constraint_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 drop_constraint_argsStandardSchemeFactory implements SchemeFactory { - public drop_constraint_argsStandardScheme getScheme() { - return new drop_constraint_argsStandardScheme(); - } - } - - private static class drop_constraint_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_constraint_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new DropConstraintRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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_constraint_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class drop_constraint_argsTupleSchemeFactory implements SchemeFactory { - public drop_constraint_argsTupleScheme getScheme() { - return new drop_constraint_argsTupleScheme(); - } - } - - private static class drop_constraint_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_constraint_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, drop_constraint_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new DropConstraintRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class drop_constraint_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_constraint_result"); - - 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_constraint_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_constraint_resultTupleSchemeFactory()); - } - - private NoSuchObjectException o1; // required - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O3((short)2, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_constraint_result.class, metaDataMap); - } - - public drop_constraint_result() { - } - - public drop_constraint_result( - NoSuchObjectException o1, - MetaException o3) - { - this(); - this.o1 = o1; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public drop_constraint_result(drop_constraint_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public drop_constraint_result deepCopy() { - return new drop_constraint_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o3 = null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_constraint_result) - return this.equals((drop_constraint_result)that); - return false; - } - - public boolean equals(drop_constraint_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_constraint_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_constraint_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 drop_constraint_resultStandardSchemeFactory implements SchemeFactory { - public drop_constraint_resultStandardScheme getScheme() { - return new drop_constraint_resultStandardScheme(); - } - } - - private static class drop_constraint_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_constraint_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_constraint_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_constraint_resultTupleSchemeFactory implements SchemeFactory { - public drop_constraint_resultTupleScheme getScheme() { - return new drop_constraint_resultTupleScheme(); - } - } - - private static class drop_constraint_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_constraint_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_constraint_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 add_primary_key_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_primary_key_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new add_primary_key_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_primary_key_argsTupleSchemeFactory()); - } - - private AddPrimaryKeyRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddPrimaryKeyRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_primary_key_args.class, metaDataMap); - } - - public add_primary_key_args() { - } - - public add_primary_key_args( - AddPrimaryKeyRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public add_primary_key_args(add_primary_key_args other) { - if (other.isSetReq()) { - this.req = new AddPrimaryKeyRequest(other.req); - } - } - - public add_primary_key_args deepCopy() { - return new add_primary_key_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public AddPrimaryKeyRequest getReq() { - return this.req; - } - - public void setReq(AddPrimaryKeyRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((AddPrimaryKeyRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_primary_key_args) - return this.equals((add_primary_key_args)that); - return false; - } - - public boolean equals(add_primary_key_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(add_primary_key_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_primary_key_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 add_primary_key_argsStandardSchemeFactory implements SchemeFactory { - public add_primary_key_argsStandardScheme getScheme() { - return new add_primary_key_argsStandardScheme(); - } - } - - private static class add_primary_key_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_primary_key_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new AddPrimaryKeyRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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_primary_key_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class add_primary_key_argsTupleSchemeFactory implements SchemeFactory { - public add_primary_key_argsTupleScheme getScheme() { - return new add_primary_key_argsTupleScheme(); - } - } - - private static class add_primary_key_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_primary_key_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_primary_key_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new AddPrimaryKeyRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class add_primary_key_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_primary_key_result"); - - 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 add_primary_key_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_primary_key_resultTupleSchemeFactory()); - } - - private NoSuchObjectException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_primary_key_result.class, metaDataMap); - } - - public add_primary_key_result() { - } - - public add_primary_key_result( - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public add_primary_key_result(add_primary_key_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public add_primary_key_result deepCopy() { - return new add_primary_key_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_primary_key_result) - return this.equals((add_primary_key_result)that); - return false; - } - - public boolean equals(add_primary_key_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(add_primary_key_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_primary_key_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 add_primary_key_resultStandardSchemeFactory implements SchemeFactory { - public add_primary_key_resultStandardScheme getScheme() { - return new add_primary_key_resultStandardScheme(); - } - } - - private static class add_primary_key_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_primary_key_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 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, add_primary_key_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 add_primary_key_resultTupleSchemeFactory implements SchemeFactory { - public add_primary_key_resultTupleScheme getScheme() { - return new add_primary_key_resultTupleScheme(); - } - } - - private static class add_primary_key_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_primary_key_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, add_primary_key_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.o2 = new MetaException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - } - } - - } - - public static class add_foreign_key_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_foreign_key_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new add_foreign_key_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_foreign_key_argsTupleSchemeFactory()); - } - - private AddForeignKeyRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddForeignKeyRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_foreign_key_args.class, metaDataMap); - } - - public add_foreign_key_args() { - } - - public add_foreign_key_args( - AddForeignKeyRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public add_foreign_key_args(add_foreign_key_args other) { - if (other.isSetReq()) { - this.req = new AddForeignKeyRequest(other.req); - } - } - - public add_foreign_key_args deepCopy() { - return new add_foreign_key_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public AddForeignKeyRequest getReq() { - return this.req; - } - - public void setReq(AddForeignKeyRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((AddForeignKeyRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_foreign_key_args) - return this.equals((add_foreign_key_args)that); - return false; - } - - public boolean equals(add_foreign_key_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(add_foreign_key_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_foreign_key_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 add_foreign_key_argsStandardSchemeFactory implements SchemeFactory { - public add_foreign_key_argsStandardScheme getScheme() { - return new add_foreign_key_argsStandardScheme(); - } - } - - private static class add_foreign_key_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_foreign_key_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new AddForeignKeyRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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_foreign_key_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class add_foreign_key_argsTupleSchemeFactory implements SchemeFactory { - public add_foreign_key_argsTupleScheme getScheme() { - return new add_foreign_key_argsTupleScheme(); - } - } - - private static class add_foreign_key_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_foreign_key_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_foreign_key_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new AddForeignKeyRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class add_foreign_key_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_foreign_key_result"); - - 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 add_foreign_key_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_foreign_key_resultTupleSchemeFactory()); - } - - private NoSuchObjectException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_foreign_key_result.class, metaDataMap); - } - - public add_foreign_key_result() { - } - - public add_foreign_key_result( - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public add_foreign_key_result(add_foreign_key_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public add_foreign_key_result deepCopy() { - return new add_foreign_key_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_foreign_key_result) - return this.equals((add_foreign_key_result)that); - return false; - } - - public boolean equals(add_foreign_key_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(add_foreign_key_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_foreign_key_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 add_foreign_key_resultStandardSchemeFactory implements SchemeFactory { - public add_foreign_key_resultStandardScheme getScheme() { - return new add_foreign_key_resultStandardScheme(); - } - } - - private static class add_foreign_key_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_foreign_key_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 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, add_foreign_key_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 add_foreign_key_resultTupleSchemeFactory implements SchemeFactory { - public add_foreign_key_resultTupleScheme getScheme() { - return new add_foreign_key_resultTupleScheme(); - } - } - - private static class add_foreign_key_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_foreign_key_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, add_foreign_key_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.o2 = new MetaException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - } - } - - } - - public static class add_unique_constraint_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_unique_constraint_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new add_unique_constraint_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_unique_constraint_argsTupleSchemeFactory()); - } - - private AddUniqueConstraintRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddUniqueConstraintRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_unique_constraint_args.class, metaDataMap); - } - - public add_unique_constraint_args() { - } - - public add_unique_constraint_args( - AddUniqueConstraintRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public add_unique_constraint_args(add_unique_constraint_args other) { - if (other.isSetReq()) { - this.req = new AddUniqueConstraintRequest(other.req); - } - } - - public add_unique_constraint_args deepCopy() { - return new add_unique_constraint_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public AddUniqueConstraintRequest getReq() { - return this.req; - } - - public void setReq(AddUniqueConstraintRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((AddUniqueConstraintRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_unique_constraint_args) - return this.equals((add_unique_constraint_args)that); - return false; - } - - public boolean equals(add_unique_constraint_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(add_unique_constraint_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_unique_constraint_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 add_unique_constraint_argsStandardSchemeFactory implements SchemeFactory { - public add_unique_constraint_argsStandardScheme getScheme() { - return new add_unique_constraint_argsStandardScheme(); - } - } - - private static class add_unique_constraint_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_unique_constraint_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new AddUniqueConstraintRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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_unique_constraint_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class add_unique_constraint_argsTupleSchemeFactory implements SchemeFactory { - public add_unique_constraint_argsTupleScheme getScheme() { - return new add_unique_constraint_argsTupleScheme(); - } - } - - private static class add_unique_constraint_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_unique_constraint_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_unique_constraint_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new AddUniqueConstraintRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class add_unique_constraint_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_unique_constraint_result"); - - 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 add_unique_constraint_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_unique_constraint_resultTupleSchemeFactory()); - } - - private NoSuchObjectException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_unique_constraint_result.class, metaDataMap); - } - - public add_unique_constraint_result() { - } - - public add_unique_constraint_result( - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public add_unique_constraint_result(add_unique_constraint_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public add_unique_constraint_result deepCopy() { - return new add_unique_constraint_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_unique_constraint_result) - return this.equals((add_unique_constraint_result)that); - return false; - } - - public boolean equals(add_unique_constraint_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(add_unique_constraint_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_unique_constraint_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 add_unique_constraint_resultStandardSchemeFactory implements SchemeFactory { - public add_unique_constraint_resultStandardScheme getScheme() { - return new add_unique_constraint_resultStandardScheme(); - } - } - - private static class add_unique_constraint_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_unique_constraint_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 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, add_unique_constraint_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 add_unique_constraint_resultTupleSchemeFactory implements SchemeFactory { - public add_unique_constraint_resultTupleScheme getScheme() { - return new add_unique_constraint_resultTupleScheme(); - } - } - - private static class add_unique_constraint_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_unique_constraint_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, add_unique_constraint_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.o2 = new MetaException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - } - } - - } - - public static class add_not_null_constraint_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_not_null_constraint_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new add_not_null_constraint_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_not_null_constraint_argsTupleSchemeFactory()); - } - - private AddNotNullConstraintRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddNotNullConstraintRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_not_null_constraint_args.class, metaDataMap); - } - - public add_not_null_constraint_args() { - } - - public add_not_null_constraint_args( - AddNotNullConstraintRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public add_not_null_constraint_args(add_not_null_constraint_args other) { - if (other.isSetReq()) { - this.req = new AddNotNullConstraintRequest(other.req); - } - } - - public add_not_null_constraint_args deepCopy() { - return new add_not_null_constraint_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public AddNotNullConstraintRequest getReq() { - return this.req; - } - - public void setReq(AddNotNullConstraintRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((AddNotNullConstraintRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_not_null_constraint_args) - return this.equals((add_not_null_constraint_args)that); - return false; - } - - public boolean equals(add_not_null_constraint_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(add_not_null_constraint_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_not_null_constraint_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 add_not_null_constraint_argsStandardSchemeFactory implements SchemeFactory { - public add_not_null_constraint_argsStandardScheme getScheme() { - return new add_not_null_constraint_argsStandardScheme(); - } - } - - private static class add_not_null_constraint_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_not_null_constraint_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new AddNotNullConstraintRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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_not_null_constraint_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class add_not_null_constraint_argsTupleSchemeFactory implements SchemeFactory { - public add_not_null_constraint_argsTupleScheme getScheme() { - return new add_not_null_constraint_argsTupleScheme(); - } - } - - private static class add_not_null_constraint_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_not_null_constraint_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_not_null_constraint_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new AddNotNullConstraintRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class add_not_null_constraint_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_not_null_constraint_result"); - - 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 add_not_null_constraint_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_not_null_constraint_resultTupleSchemeFactory()); - } - - private NoSuchObjectException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_not_null_constraint_result.class, metaDataMap); - } - - public add_not_null_constraint_result() { - } - - public add_not_null_constraint_result( - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public add_not_null_constraint_result(add_not_null_constraint_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public add_not_null_constraint_result deepCopy() { - return new add_not_null_constraint_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_not_null_constraint_result) - return this.equals((add_not_null_constraint_result)that); - return false; - } - - public boolean equals(add_not_null_constraint_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(add_not_null_constraint_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_not_null_constraint_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 add_not_null_constraint_resultStandardSchemeFactory implements SchemeFactory { - public add_not_null_constraint_resultStandardScheme getScheme() { - return new add_not_null_constraint_resultStandardScheme(); - } - } - - private static class add_not_null_constraint_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_not_null_constraint_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 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, add_not_null_constraint_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 add_not_null_constraint_resultTupleSchemeFactory implements SchemeFactory { - public add_not_null_constraint_resultTupleScheme getScheme() { - return new add_not_null_constraint_resultTupleScheme(); - } - } - - private static class add_not_null_constraint_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_not_null_constraint_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, add_not_null_constraint_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.o2 = new MetaException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - } - } - - } - - public static class drop_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DBNAME((short)1, "dbname"), - NAME((short)2, "name"), - DELETE_DATA((short)3, "deleteData"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // NAME - return NAME; - case 3: // DELETE_DATA - return DELETE_DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap); - } - - public drop_table_args() { - } - - public drop_table_args( - String dbname, - String name, - boolean deleteData) - { - this(); - this.dbname = dbname; - this.name = name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public drop_table_args(drop_table_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetName()) { - this.name = other.name; - } - this.deleteData = other.deleteData; - } - - public drop_table_args deepCopy() { - return new drop_table_args(this); - } - - @Override - public void clear() { - this.dbname = null; - this.name = null; - setDeleteDataIsSet(false); - this.deleteData = false; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case DELETE_DATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case NAME: - return getName(); - - case DELETE_DATA: - return isDeleteData(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case NAME: - return isSetName(); - case DELETE_DATA: - return isSetDeleteData(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_table_args) - return this.equals((drop_table_args)that); - return false; - } - - public boolean equals(drop_table_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); - - boolean present_deleteData = true; - list.add(present_deleteData); - if (present_deleteData) - list.add(deleteData); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_table_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDeleteData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_table_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - 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 { - // 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_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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O3((short)2, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_table_result.class, metaDataMap); - } - - public drop_table_result() { - } - - public drop_table_result( - NoSuchObjectException o1, - MetaException o3) - { - this(); - this.o1 = o1; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public drop_table_result(drop_table_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public drop_table_result deepCopy() { - return new drop_table_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o3 = null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_table_result) - return this.equals((drop_table_result)that); - return false; - } - - public boolean equals(drop_table_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_table_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_table_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 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 drop_table_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_with_environment_context_args"); - - 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 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 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 drop_table_with_environment_context_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_table_with_environment_context_argsTupleSchemeFactory()); - } - - private String dbname; // required - private String name; // required - private boolean deleteData; // required - private EnvironmentContext environment_context; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DBNAME((short)1, "dbname"), - NAME((short)2, "name"), - DELETE_DATA((short)3, "deleteData"), - ENVIRONMENT_CONTEXT((short)4, "environment_context"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // NAME - return NAME; - case 3: // DELETE_DATA - return DELETE_DATA; - case 4: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_table_with_environment_context_args.class, metaDataMap); - } - - public drop_table_with_environment_context_args() { - } - - public drop_table_with_environment_context_args( - String dbname, - String name, - boolean deleteData, - EnvironmentContext environment_context) - { - this(); - this.dbname = dbname; - this.name = name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); - this.environment_context = environment_context; - } - - /** - * Performs a deep copy on other. - */ - public drop_table_with_environment_context_args(drop_table_with_environment_context_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetName()) { - this.name = other.name; - } - this.deleteData = other.deleteData; - if (other.isSetEnvironment_context()) { - this.environment_context = new EnvironmentContext(other.environment_context); - } - } - - public drop_table_with_environment_context_args deepCopy() { - return new drop_table_with_environment_context_args(this); - } - - @Override - public void clear() { - this.dbname = null; - this.name = null; - setDeleteDataIsSet(false); - this.deleteData = false; - this.environment_context = null; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); - } - - public EnvironmentContext getEnvironment_context() { - return this.environment_context; - } - - public void setEnvironment_context(EnvironmentContext environment_context) { - this.environment_context = environment_context; - } - - public void unsetEnvironment_context() { - this.environment_context = null; - } - - /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironment_context() { - return this.environment_context != null; - } - - public void setEnvironment_contextIsSet(boolean value) { - if (!value) { - this.environment_context = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case DELETE_DATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironment_context(); - } else { - setEnvironment_context((EnvironmentContext)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case NAME: - return getName(); - - case DELETE_DATA: - return isDeleteData(); - - case ENVIRONMENT_CONTEXT: - return getEnvironment_context(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case NAME: - return isSetName(); - case DELETE_DATA: - return isSetDeleteData(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironment_context(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_table_with_environment_context_args) - return this.equals((drop_table_with_environment_context_args)that); - return false; - } - - public boolean equals(drop_table_with_environment_context_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - boolean this_present_environment_context = true && this.isSetEnvironment_context(); - boolean that_present_environment_context = true && that.isSetEnvironment_context(); - if (this_present_environment_context || that_present_environment_context) { - if (!(this_present_environment_context && that_present_environment_context)) - return false; - if (!this.environment_context.equals(that.environment_context)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); - - boolean present_deleteData = true; - list.add(present_deleteData); - if (present_deleteData) - list.add(deleteData); - - boolean present_environment_context = true && (isSetEnvironment_context()); - list.add(present_environment_context); - if (present_environment_context) - list.add(environment_context); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_table_with_environment_context_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDeleteData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironment_context()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_table_with_environment_context_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; - if (!first) sb.append(", "); - sb.append("environment_context:"); - if (this.environment_context == null) { - sb.append("null"); - } else { - sb.append(this.environment_context); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (environment_context != null) { - environment_context.validate(); - } - } - - 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 { - // 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_table_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { - public drop_table_with_environment_context_argsStandardScheme getScheme() { - return new drop_table_with_environment_context_argsStandardScheme(); - } - } - - private static class drop_table_with_environment_context_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_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: // 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; - 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, drop_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.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(); - 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 drop_table_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { - public drop_table_with_environment_context_argsTupleScheme getScheme() { - return new drop_table_with_environment_context_argsTupleScheme(); - } - } - - private static class drop_table_with_environment_context_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_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.isSetName()) { - optionals.set(1); - } - if (struct.isSetDeleteData()) { - optionals.set(2); - } - if (struct.isSetEnvironment_context()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetDbname()) { - oprot.writeString(struct.dbname); - } - if (struct.isSetName()) { - oprot.writeString(struct.name); - } - if (struct.isSetDeleteData()) { - oprot.writeBool(struct.deleteData); - } - if (struct.isSetEnvironment_context()) { - struct.environment_context.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, drop_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.name = iprot.readString(); - struct.setNameIsSet(true); - } - if (incoming.get(2)) { - struct.deleteData = iprot.readBool(); - struct.setDeleteDataIsSet(true); - } - if (incoming.get(3)) { - struct.environment_context = new EnvironmentContext(); - struct.environment_context.read(iprot); - struct.setEnvironment_contextIsSet(true); - } - } - } - - } - - public static class drop_table_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_with_environment_context_result"); - - 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_with_environment_context_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_table_with_environment_context_resultTupleSchemeFactory()); - } - - private NoSuchObjectException o1; // required - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O3((short)2, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_table_with_environment_context_result.class, metaDataMap); - } - - public drop_table_with_environment_context_result() { - } - - public drop_table_with_environment_context_result( - NoSuchObjectException o1, - MetaException o3) - { - this(); - this.o1 = o1; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public drop_table_with_environment_context_result(drop_table_with_environment_context_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public drop_table_with_environment_context_result deepCopy() { - return new drop_table_with_environment_context_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o3 = null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_table_with_environment_context_result) - return this.equals((drop_table_with_environment_context_result)that); - return false; - } - - public boolean equals(drop_table_with_environment_context_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_table_with_environment_context_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_table_with_environment_context_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 drop_table_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { - public drop_table_with_environment_context_resultStandardScheme getScheme() { - return new drop_table_with_environment_context_resultStandardScheme(); - } - } - - private static class drop_table_with_environment_context_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_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 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_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.o3 != null) { - oprot.writeFieldBegin(O3_FIELD_DESC); - struct.o3.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class drop_table_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { - public drop_table_with_environment_context_resultTupleScheme getScheme() { - return new drop_table_with_environment_context_resultTupleScheme(); - } - } - - private static class drop_table_with_environment_context_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_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.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_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 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 truncate_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("truncate_table_args"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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 TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PART_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partNames", org.apache.thrift.protocol.TType.LIST, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new truncate_table_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new truncate_table_argsTupleSchemeFactory()); - } - - private String dbName; // required - private String tableName; // required - private List partNames; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "dbName"), - TABLE_NAME((short)2, "tableName"), - PART_NAMES((short)3, "partNames"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TABLE_NAME - return TABLE_NAME; - case 3: // PART_NAMES - return PART_NAMES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_NAMES, new org.apache.thrift.meta_data.FieldMetaData("partNames", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(truncate_table_args.class, metaDataMap); - } - - public truncate_table_args() { - } - - public truncate_table_args( - String dbName, - String tableName, - List partNames) - { - this(); - this.dbName = dbName; - this.tableName = tableName; - this.partNames = partNames; - } - - /** - * Performs a deep copy on other. - */ - public truncate_table_args(truncate_table_args other) { - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetTableName()) { - this.tableName = other.tableName; - } - if (other.isSetPartNames()) { - List __this__partNames = new ArrayList(other.partNames); - this.partNames = __this__partNames; - } - } - - public truncate_table_args deepCopy() { - return new truncate_table_args(this); - } - - @Override - public void clear() { - this.dbName = null; - this.tableName = null; - this.partNames = null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getTableName() { - return this.tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public void unsetTableName() { - this.tableName = null; - } - - /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ - public boolean isSetTableName() { - return this.tableName != null; - } - - public void setTableNameIsSet(boolean value) { - if (!value) { - this.tableName = null; - } - } - - public int getPartNamesSize() { - return (this.partNames == null) ? 0 : this.partNames.size(); - } - - public java.util.Iterator getPartNamesIterator() { - return (this.partNames == null) ? null : this.partNames.iterator(); - } - - public void addToPartNames(String elem) { - if (this.partNames == null) { - this.partNames = new ArrayList(); - } - this.partNames.add(elem); - } - - public List getPartNames() { - return this.partNames; - } - - public void setPartNames(List partNames) { - this.partNames = partNames; - } - - public void unsetPartNames() { - this.partNames = null; - } - - /** Returns true if field partNames is set (has been assigned a value) and false otherwise */ - public boolean isSetPartNames() { - return this.partNames != null; - } - - public void setPartNamesIsSet(boolean value) { - if (!value) { - this.partNames = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case TABLE_NAME: - if (value == null) { - unsetTableName(); - } else { - setTableName((String)value); - } - break; - - case PART_NAMES: - if (value == null) { - unsetPartNames(); - } else { - setPartNames((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case TABLE_NAME: - return getTableName(); - - case PART_NAMES: - return getPartNames(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case TABLE_NAME: - return isSetTableName(); - case PART_NAMES: - return isSetPartNames(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof truncate_table_args) - return this.equals((truncate_table_args)that); - return false; - } - - public boolean equals(truncate_table_args that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_tableName = true && this.isSetTableName(); - boolean that_present_tableName = true && that.isSetTableName(); - if (this_present_tableName || that_present_tableName) { - if (!(this_present_tableName && that_present_tableName)) - return false; - if (!this.tableName.equals(that.tableName)) - return false; - } - - boolean this_present_partNames = true && this.isSetPartNames(); - boolean that_present_partNames = true && that.isSetPartNames(); - if (this_present_partNames || that_present_partNames) { - if (!(this_present_partNames && that_present_partNames)) - return false; - if (!this.partNames.equals(that.partNames)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_tableName = true && (isSetTableName()); - list.add(present_tableName); - if (present_tableName) - list.add(tableName); - - boolean present_partNames = true && (isSetPartNames()); - list.add(present_partNames); - if (present_partNames) - list.add(partNames); - - return list.hashCode(); - } - - @Override - public int compareTo(truncate_table_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPartNames()).compareTo(other.isSetPartNames()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartNames()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partNames, other.partNames); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("truncate_table_args("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("tableName:"); - if (this.tableName == null) { - sb.append("null"); - } else { - sb.append(this.tableName); - } - first = false; - if (!first) sb.append(", "); - sb.append("partNames:"); - if (this.partNames == null) { - sb.append("null"); - } else { - sb.append(this.partNames); - } - 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 truncate_table_argsStandardSchemeFactory implements SchemeFactory { - public truncate_table_argsStandardScheme getScheme() { - return new truncate_table_argsStandardScheme(); - } - } - - private static class truncate_table_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, truncate_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: // 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 2: // 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 3: // PART_NAMES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list796 = iprot.readListBegin(); - struct.partNames = new ArrayList(_list796.size); - String _elem797; - for (int _i798 = 0; _i798 < _list796.size; ++_i798) - { - _elem797 = iprot.readString(); - struct.partNames.add(_elem797); - } - iprot.readListEnd(); - } - struct.setPartNamesIsSet(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, truncate_table_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - 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(); - } - if (struct.partNames != null) { - oprot.writeFieldBegin(PART_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partNames.size())); - for (String _iter799 : struct.partNames) - { - oprot.writeString(_iter799); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class truncate_table_argsTupleSchemeFactory implements SchemeFactory { - public truncate_table_argsTupleScheme getScheme() { - return new truncate_table_argsTupleScheme(); - } - } - - private static class truncate_table_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, truncate_table_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetDbName()) { - optionals.set(0); - } - if (struct.isSetTableName()) { - optionals.set(1); - } - if (struct.isSetPartNames()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetDbName()) { - oprot.writeString(struct.dbName); - } - if (struct.isSetTableName()) { - oprot.writeString(struct.tableName); - } - if (struct.isSetPartNames()) { - { - oprot.writeI32(struct.partNames.size()); - for (String _iter800 : struct.partNames) - { - oprot.writeString(_iter800); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, truncate_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.tableName = iprot.readString(); - struct.setTableNameIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list801 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.partNames = new ArrayList(_list801.size); - String _elem802; - for (int _i803 = 0; _i803 < _list801.size; ++_i803) - { - _elem802 = iprot.readString(); - struct.partNames.add(_elem802); - } - } - struct.setPartNamesIsSet(true); - } - } - } - - } - - public static class truncate_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("truncate_table_result"); - - 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 truncate_table_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new truncate_table_resultTupleSchemeFactory()); - } - - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(truncate_table_result.class, metaDataMap); - } - - public truncate_table_result() { - } - - public truncate_table_result( - MetaException o1) - { - this(); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public truncate_table_result(truncate_table_result other) { - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public truncate_table_result deepCopy() { - return new truncate_table_result(this); - } - - @Override - public void clear() { - this.o1 = null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof truncate_table_result) - return this.equals((truncate_table_result)that); - return false; - } - - public boolean equals(truncate_table_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(truncate_table_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("truncate_table_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 truncate_table_resultStandardSchemeFactory implements SchemeFactory { - public truncate_table_resultStandardScheme getScheme() { - return new truncate_table_resultStandardScheme(); - } - } - - private static class truncate_table_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, truncate_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 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, truncate_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class truncate_table_resultTupleSchemeFactory implements SchemeFactory { - public truncate_table_resultTupleScheme getScheme() { - return new truncate_table_resultTupleScheme(); - } - } - - private static class truncate_table_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, truncate_table_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, truncate_table_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); - } - } - } - - } - - public static class get_tables_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - PATTERN((short)2, "pattern"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // PATTERN - return PATTERN; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PATTERN, new org.apache.thrift.meta_data.FieldMetaData("pattern", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap); - } - - public get_tables_args() { - } - - public get_tables_args( - String db_name, - String pattern) - { - this(); - this.db_name = db_name; - this.pattern = pattern; - } - - /** - * Performs a deep copy on other. - */ - public get_tables_args(get_tables_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetPattern()) { - this.pattern = other.pattern; - } - } - - public get_tables_args deepCopy() { - return new get_tables_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.pattern = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getPattern() { - return this.pattern; - } - - public void setPattern(String pattern) { - this.pattern = pattern; - } - - public void unsetPattern() { - this.pattern = null; - } - - /** Returns true if field pattern is set (has been assigned a value) and false otherwise */ - public boolean isSetPattern() { - return this.pattern != null; - } - - public void setPatternIsSet(boolean value) { - if (!value) { - this.pattern = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case PATTERN: - if (value == null) { - unsetPattern(); - } else { - setPattern((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case PATTERN: - return getPattern(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case PATTERN: - return isSetPattern(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_tables_args) - return this.equals((get_tables_args)that); - return false; - } - - public boolean equals(get_tables_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_pattern = true && this.isSetPattern(); - boolean that_present_pattern = true && that.isSetPattern(); - if (this_present_pattern || that_present_pattern) { - if (!(this_present_pattern && that_present_pattern)) - return false; - if (!this.pattern.equals(that.pattern)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_pattern = true && (isSetPattern()); - list.add(present_pattern); - if (present_pattern) - list.add(pattern); - - return list.hashCode(); - } - - @Override - public int compareTo(get_tables_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPattern()).compareTo(other.isSetPattern()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPattern()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, other.pattern); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_tables_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("pattern:"); - if (this.pattern == null) { - sb.append("null"); - } else { - sb.append(this.pattern); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); - } - - public get_tables_result() { - } - - public get_tables_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_tables_result(get_tables_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_tables_result deepCopy() { - return new get_tables_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_tables_result) - return this.equals((get_tables_result)that); - return false; - } - - public boolean equals(get_tables_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_tables_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_tables_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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 _list804 = iprot.readListBegin(); - struct.success = new ArrayList(_list804.size); - String _elem805; - for (int _i806 = 0; _i806 < _list804.size; ++_i806) - { - _elem805 = iprot.readString(); - struct.success.add(_elem805); - } - 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 _iter807 : struct.success) - { - oprot.writeString(_iter807); - } - 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 _iter808 : struct.success) - { - oprot.writeString(_iter808); - } - } - } - 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 _list809 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list809.size); - String _elem810; - for (int _i811 = 0; _i811 < _list809.size; ++_i811) - { - _elem810 = iprot.readString(); - struct.success.add(_elem810); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.o1 = new MetaException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - } - } - - } - - public static class get_tables_by_type_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_by_type_args"); - - 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 org.apache.thrift.protocol.TField TABLE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("tableType", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_tables_by_type_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_tables_by_type_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String pattern; // required - private String tableType; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - PATTERN((short)2, "pattern"), - TABLE_TYPE((short)3, "tableType"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // PATTERN - return PATTERN; - case 3: // TABLE_TYPE - return TABLE_TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PATTERN, new org.apache.thrift.meta_data.FieldMetaData("pattern", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TABLE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("tableType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_by_type_args.class, metaDataMap); - } - - public get_tables_by_type_args() { - } - - public get_tables_by_type_args( - String db_name, - String pattern, - String tableType) - { - this(); - this.db_name = db_name; - this.pattern = pattern; - this.tableType = tableType; - } - - /** - * Performs a deep copy on other. - */ - public get_tables_by_type_args(get_tables_by_type_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetPattern()) { - this.pattern = other.pattern; - } - if (other.isSetTableType()) { - this.tableType = other.tableType; - } - } - - public get_tables_by_type_args deepCopy() { - return new get_tables_by_type_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.pattern = null; - this.tableType = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getPattern() { - return this.pattern; - } - - public void setPattern(String pattern) { - this.pattern = pattern; - } - - public void unsetPattern() { - this.pattern = null; - } - - /** Returns true if field pattern is set (has been assigned a value) and false otherwise */ - public boolean isSetPattern() { - return this.pattern != null; - } - - public void setPatternIsSet(boolean value) { - if (!value) { - this.pattern = null; - } - } - - public String getTableType() { - return this.tableType; - } - - public void setTableType(String tableType) { - this.tableType = tableType; - } - - public void unsetTableType() { - this.tableType = null; - } - - /** Returns true if field tableType is set (has been assigned a value) and false otherwise */ - public boolean isSetTableType() { - return this.tableType != null; - } - - public void setTableTypeIsSet(boolean value) { - if (!value) { - this.tableType = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case PATTERN: - if (value == null) { - unsetPattern(); - } else { - setPattern((String)value); - } - break; - - case TABLE_TYPE: - if (value == null) { - unsetTableType(); - } else { - setTableType((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case PATTERN: - return getPattern(); - - case TABLE_TYPE: - return getTableType(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case PATTERN: - return isSetPattern(); - case TABLE_TYPE: - return isSetTableType(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_tables_by_type_args) - return this.equals((get_tables_by_type_args)that); - return false; - } - - public boolean equals(get_tables_by_type_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_pattern = true && this.isSetPattern(); - boolean that_present_pattern = true && that.isSetPattern(); - if (this_present_pattern || that_present_pattern) { - if (!(this_present_pattern && that_present_pattern)) - return false; - if (!this.pattern.equals(that.pattern)) - return false; - } - - boolean this_present_tableType = true && this.isSetTableType(); - boolean that_present_tableType = true && that.isSetTableType(); - if (this_present_tableType || that_present_tableType) { - if (!(this_present_tableType && that_present_tableType)) - return false; - if (!this.tableType.equals(that.tableType)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_pattern = true && (isSetPattern()); - list.add(present_pattern); - if (present_pattern) - list.add(pattern); - - boolean present_tableType = true && (isSetTableType()); - list.add(present_tableType); - if (present_tableType) - list.add(tableType); - - return list.hashCode(); - } - - @Override - public int compareTo(get_tables_by_type_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPattern()).compareTo(other.isSetPattern()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPattern()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, other.pattern); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTableType()).compareTo(other.isSetTableType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTableType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableType, other.tableType); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_tables_by_type_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("pattern:"); - if (this.pattern == null) { - sb.append("null"); - } else { - sb.append(this.pattern); - } - first = false; - if (!first) sb.append(", "); - sb.append("tableType:"); - if (this.tableType == null) { - sb.append("null"); - } else { - sb.append(this.tableType); - } - 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 get_tables_by_type_argsStandardSchemeFactory implements SchemeFactory { - public get_tables_by_type_argsStandardScheme getScheme() { - return new get_tables_by_type_argsStandardScheme(); - } - } - - private static class get_tables_by_type_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_by_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: // 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; - case 3: // 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; - 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_by_type_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(); - } - if (struct.tableType != null) { - oprot.writeFieldBegin(TABLE_TYPE_FIELD_DESC); - oprot.writeString(struct.tableType); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_tables_by_type_argsTupleSchemeFactory implements SchemeFactory { - public get_tables_by_type_argsTupleScheme getScheme() { - return new get_tables_by_type_argsTupleScheme(); - } - } - - private static class get_tables_by_type_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_by_type_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); - } - if (struct.isSetTableType()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetDb_name()) { - oprot.writeString(struct.db_name); - } - if (struct.isSetPattern()) { - oprot.writeString(struct.pattern); - } - if (struct.isSetTableType()) { - oprot.writeString(struct.tableType); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_by_type_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.pattern = iprot.readString(); - struct.setPatternIsSet(true); - } - if (incoming.get(2)) { - struct.tableType = iprot.readString(); - struct.setTableTypeIsSet(true); - } - } - } - - } - - public static class get_tables_by_type_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_by_type_result"); - - 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_by_type_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_tables_by_type_resultTupleSchemeFactory()); - } - - private List success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_by_type_result.class, metaDataMap); - } - - public get_tables_by_type_result() { - } - - public get_tables_by_type_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_tables_by_type_result(get_tables_by_type_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_tables_by_type_result deepCopy() { - return new get_tables_by_type_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_tables_by_type_result) - return this.equals((get_tables_by_type_result)that); - return false; - } - - public boolean equals(get_tables_by_type_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_tables_by_type_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_tables_by_type_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 get_tables_by_type_resultStandardSchemeFactory implements SchemeFactory { - public get_tables_by_type_resultStandardScheme getScheme() { - return new get_tables_by_type_resultStandardScheme(); - } - } - - private static class get_tables_by_type_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_by_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.LIST) { - { - org.apache.thrift.protocol.TList _list812 = iprot.readListBegin(); - struct.success = new ArrayList(_list812.size); - String _elem813; - for (int _i814 = 0; _i814 < _list812.size; ++_i814) - { - _elem813 = iprot.readString(); - struct.success.add(_elem813); - } - 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_by_type_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 _iter815 : struct.success) - { - oprot.writeString(_iter815); - } - 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_by_type_resultTupleSchemeFactory implements SchemeFactory { - public get_tables_by_type_resultTupleScheme getScheme() { - return new get_tables_by_type_resultTupleScheme(); - } - } - - private static class get_tables_by_type_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_by_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); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (String _iter816 : struct.success) - { - oprot.writeString(_iter816); - } - } - } - if (struct.isSetO1()) { - struct.o1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_by_type_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 _list817 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list817.size); - String _elem818; - for (int _i819 = 0; _i819 < _list817.size; ++_i819) - { - _elem818 = iprot.readString(); - struct.success.add(_elem818); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.o1 = new MetaException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - } - } - - } - - public static class get_table_meta_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_meta_args"); - - private static final org.apache.thrift.protocol.TField DB_PATTERNS_FIELD_DESC = new org.apache.thrift.protocol.TField("db_patterns", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TBL_PATTERNS_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_patterns", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField TBL_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_types", org.apache.thrift.protocol.TType.LIST, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_table_meta_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_table_meta_argsTupleSchemeFactory()); - } - - private String db_patterns; // required - private String tbl_patterns; // required - private List tbl_types; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_PATTERNS((short)1, "db_patterns"), - TBL_PATTERNS((short)2, "tbl_patterns"), - TBL_TYPES((short)3, "tbl_types"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_PATTERNS - return DB_PATTERNS; - case 2: // TBL_PATTERNS - return TBL_PATTERNS; - case 3: // TBL_TYPES - return TBL_TYPES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_PATTERNS, new org.apache.thrift.meta_data.FieldMetaData("db_patterns", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_PATTERNS, new org.apache.thrift.meta_data.FieldMetaData("tbl_patterns", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_TYPES, new org.apache.thrift.meta_data.FieldMetaData("tbl_types", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_meta_args.class, metaDataMap); - } - - public get_table_meta_args() { - } - - public get_table_meta_args( - String db_patterns, - String tbl_patterns, - List tbl_types) - { - this(); - this.db_patterns = db_patterns; - this.tbl_patterns = tbl_patterns; - this.tbl_types = tbl_types; - } - - /** - * Performs a deep copy on other. - */ - public get_table_meta_args(get_table_meta_args other) { - if (other.isSetDb_patterns()) { - this.db_patterns = other.db_patterns; - } - if (other.isSetTbl_patterns()) { - this.tbl_patterns = other.tbl_patterns; - } - if (other.isSetTbl_types()) { - List __this__tbl_types = new ArrayList(other.tbl_types); - this.tbl_types = __this__tbl_types; - } - } - - public get_table_meta_args deepCopy() { - return new get_table_meta_args(this); - } - - @Override - public void clear() { - this.db_patterns = null; - this.tbl_patterns = null; - this.tbl_types = null; - } - - public String getDb_patterns() { - return this.db_patterns; - } - - public void setDb_patterns(String db_patterns) { - this.db_patterns = db_patterns; - } - - public void unsetDb_patterns() { - this.db_patterns = null; - } - - /** Returns true if field db_patterns is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_patterns() { - return this.db_patterns != null; - } - - public void setDb_patternsIsSet(boolean value) { - if (!value) { - this.db_patterns = null; - } - } - - public String getTbl_patterns() { - return this.tbl_patterns; - } - - public void setTbl_patterns(String tbl_patterns) { - this.tbl_patterns = tbl_patterns; - } - - public void unsetTbl_patterns() { - this.tbl_patterns = null; - } - - /** Returns true if field tbl_patterns is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_patterns() { - return this.tbl_patterns != null; - } - - public void setTbl_patternsIsSet(boolean value) { - if (!value) { - this.tbl_patterns = null; - } - } - - public int getTbl_typesSize() { - return (this.tbl_types == null) ? 0 : this.tbl_types.size(); - } - - public java.util.Iterator getTbl_typesIterator() { - return (this.tbl_types == null) ? null : this.tbl_types.iterator(); - } - - public void addToTbl_types(String elem) { - if (this.tbl_types == null) { - this.tbl_types = new ArrayList(); - } - this.tbl_types.add(elem); - } - - public List getTbl_types() { - return this.tbl_types; - } - - public void setTbl_types(List tbl_types) { - this.tbl_types = tbl_types; - } - - public void unsetTbl_types() { - this.tbl_types = null; - } - - /** Returns true if field tbl_types is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_types() { - return this.tbl_types != null; - } - - public void setTbl_typesIsSet(boolean value) { - if (!value) { - this.tbl_types = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_PATTERNS: - if (value == null) { - unsetDb_patterns(); - } else { - setDb_patterns((String)value); - } - break; - - case TBL_PATTERNS: - if (value == null) { - unsetTbl_patterns(); - } else { - setTbl_patterns((String)value); - } - break; - - case TBL_TYPES: - if (value == null) { - unsetTbl_types(); - } else { - setTbl_types((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_PATTERNS: - return getDb_patterns(); - - case TBL_PATTERNS: - return getTbl_patterns(); - - case TBL_TYPES: - return getTbl_types(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_PATTERNS: - return isSetDb_patterns(); - case TBL_PATTERNS: - return isSetTbl_patterns(); - case TBL_TYPES: - return isSetTbl_types(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_meta_args) - return this.equals((get_table_meta_args)that); - return false; - } - - public boolean equals(get_table_meta_args that) { - if (that == null) - return false; - - boolean this_present_db_patterns = true && this.isSetDb_patterns(); - boolean that_present_db_patterns = true && that.isSetDb_patterns(); - if (this_present_db_patterns || that_present_db_patterns) { - if (!(this_present_db_patterns && that_present_db_patterns)) - return false; - if (!this.db_patterns.equals(that.db_patterns)) - return false; - } - - boolean this_present_tbl_patterns = true && this.isSetTbl_patterns(); - boolean that_present_tbl_patterns = true && that.isSetTbl_patterns(); - if (this_present_tbl_patterns || that_present_tbl_patterns) { - if (!(this_present_tbl_patterns && that_present_tbl_patterns)) - return false; - if (!this.tbl_patterns.equals(that.tbl_patterns)) - return false; - } - - boolean this_present_tbl_types = true && this.isSetTbl_types(); - boolean that_present_tbl_types = true && that.isSetTbl_types(); - if (this_present_tbl_types || that_present_tbl_types) { - if (!(this_present_tbl_types && that_present_tbl_types)) - return false; - if (!this.tbl_types.equals(that.tbl_types)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_patterns = true && (isSetDb_patterns()); - list.add(present_db_patterns); - if (present_db_patterns) - list.add(db_patterns); - - boolean present_tbl_patterns = true && (isSetTbl_patterns()); - list.add(present_tbl_patterns); - if (present_tbl_patterns) - list.add(tbl_patterns); - - boolean present_tbl_types = true && (isSetTbl_types()); - list.add(present_tbl_types); - if (present_tbl_types) - list.add(tbl_types); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_meta_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_patterns()).compareTo(other.isSetDb_patterns()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_patterns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_patterns, other.db_patterns); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_patterns()).compareTo(other.isSetTbl_patterns()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_patterns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_patterns, other.tbl_patterns); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_types()).compareTo(other.isSetTbl_types()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_types()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_types, other.tbl_types); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_meta_args("); - boolean first = true; - - sb.append("db_patterns:"); - if (this.db_patterns == null) { - sb.append("null"); - } else { - sb.append(this.db_patterns); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_patterns:"); - if (this.tbl_patterns == null) { - sb.append("null"); - } else { - sb.append(this.tbl_patterns); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_types:"); - if (this.tbl_types == null) { - sb.append("null"); - } else { - sb.append(this.tbl_types); - } - 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 get_table_meta_argsStandardSchemeFactory implements SchemeFactory { - public get_table_meta_argsStandardScheme getScheme() { - return new get_table_meta_argsStandardScheme(); - } - } - - private static class get_table_meta_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_meta_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_PATTERNS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.db_patterns = iprot.readString(); - struct.setDb_patternsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TBL_PATTERNS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.tbl_patterns = iprot.readString(); - struct.setTbl_patternsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TBL_TYPES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list820 = iprot.readListBegin(); - struct.tbl_types = new ArrayList(_list820.size); - String _elem821; - for (int _i822 = 0; _i822 < _list820.size; ++_i822) - { - _elem821 = iprot.readString(); - struct.tbl_types.add(_elem821); - } - iprot.readListEnd(); - } - struct.setTbl_typesIsSet(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_meta_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.db_patterns != null) { - oprot.writeFieldBegin(DB_PATTERNS_FIELD_DESC); - oprot.writeString(struct.db_patterns); - oprot.writeFieldEnd(); - } - if (struct.tbl_patterns != null) { - oprot.writeFieldBegin(TBL_PATTERNS_FIELD_DESC); - oprot.writeString(struct.tbl_patterns); - oprot.writeFieldEnd(); - } - if (struct.tbl_types != null) { - oprot.writeFieldBegin(TBL_TYPES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tbl_types.size())); - for (String _iter823 : struct.tbl_types) - { - oprot.writeString(_iter823); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_table_meta_argsTupleSchemeFactory implements SchemeFactory { - public get_table_meta_argsTupleScheme getScheme() { - return new get_table_meta_argsTupleScheme(); - } - } - - private static class get_table_meta_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_table_meta_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetDb_patterns()) { - optionals.set(0); - } - if (struct.isSetTbl_patterns()) { - optionals.set(1); - } - if (struct.isSetTbl_types()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetDb_patterns()) { - oprot.writeString(struct.db_patterns); - } - if (struct.isSetTbl_patterns()) { - oprot.writeString(struct.tbl_patterns); - } - if (struct.isSetTbl_types()) { - { - oprot.writeI32(struct.tbl_types.size()); - for (String _iter824 : struct.tbl_types) - { - oprot.writeString(_iter824); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_table_meta_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.db_patterns = iprot.readString(); - struct.setDb_patternsIsSet(true); - } - if (incoming.get(1)) { - struct.tbl_patterns = iprot.readString(); - struct.setTbl_patternsIsSet(true); - } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TList _list825 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.tbl_types = new ArrayList(_list825.size); - String _elem826; - for (int _i827 = 0; _i827 < _list825.size; ++_i827) - { - _elem826 = iprot.readString(); - struct.tbl_types.add(_elem826); - } - } - struct.setTbl_typesIsSet(true); - } - } - } - - } - - public static class get_table_meta_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_meta_result"); - - 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_table_meta_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_table_meta_resultTupleSchemeFactory()); - } - - private List success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TableMeta.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_meta_result.class, metaDataMap); - } - - public get_table_meta_result() { - } - - public get_table_meta_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_table_meta_result(get_table_meta_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (TableMeta other_element : other.success) { - __this__success.add(new TableMeta(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_table_meta_result deepCopy() { - return new get_table_meta_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(TableMeta elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_meta_result) - return this.equals((get_table_meta_result)that); - return false; - } - - public boolean equals(get_table_meta_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_meta_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_meta_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 get_table_meta_resultStandardSchemeFactory implements SchemeFactory { - public get_table_meta_resultStandardScheme getScheme() { - return new get_table_meta_resultStandardScheme(); - } - } - - private static class get_table_meta_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_meta_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 _list828 = iprot.readListBegin(); - struct.success = new ArrayList(_list828.size); - TableMeta _elem829; - for (int _i830 = 0; _i830 < _list828.size; ++_i830) - { - _elem829 = new TableMeta(); - _elem829.read(iprot); - struct.success.add(_elem829); - } - 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_table_meta_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 (TableMeta _iter831 : struct.success) - { - _iter831.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 get_table_meta_resultTupleSchemeFactory implements SchemeFactory { - public get_table_meta_resultTupleScheme getScheme() { - return new get_table_meta_resultTupleScheme(); - } - } - - private static class get_table_meta_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_table_meta_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 (TableMeta _iter832 : struct.success) - { - _iter832.write(oprot); - } - } - } - if (struct.isSetO1()) { - struct.o1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_table_meta_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 _list833 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list833.size); - TableMeta _elem834; - for (int _i835 = 0; _i835 < _list833.size; ++_i835) - { - _elem834 = new TableMeta(); - _elem834.read(iprot); - struct.success.add(_elem834); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_tables_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_tables_args.class, metaDataMap); - } - - public get_all_tables_args() { - } - - public get_all_tables_args( - String db_name) - { - this(); - this.db_name = db_name; - } - - /** - * Performs a deep copy on other. - */ - public get_all_tables_args(get_all_tables_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - } - - public get_all_tables_args deepCopy() { - return new get_all_tables_args(this); - } - - @Override - public void clear() { - this.db_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_all_tables_args) - return this.equals((get_all_tables_args)that); - return false; - } - - public boolean equals(get_all_tables_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - return list.hashCode(); - } - - @Override - public int compareTo(get_all_tables_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_all_tables_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_tables_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_tables_result.class, metaDataMap); - } - - public get_all_tables_result() { - } - - public get_all_tables_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_all_tables_result(get_all_tables_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_all_tables_result deepCopy() { - return new get_all_tables_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_all_tables_result) - return this.equals((get_all_tables_result)that); - return false; - } - - public boolean equals(get_all_tables_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_all_tables_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_all_tables_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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 _list836 = iprot.readListBegin(); - struct.success = new ArrayList(_list836.size); - String _elem837; - for (int _i838 = 0; _i838 < _list836.size; ++_i838) - { - _elem837 = iprot.readString(); - struct.success.add(_elem837); - } - 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 _iter839 : struct.success) - { - oprot.writeString(_iter839); - } - 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 _iter840 : struct.success) - { - oprot.writeString(_iter840); - } - } - } - 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 _list841 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list841.size); - String _elem842; - for (int _i843 = 0; _i843 < _list841.size; ++_i843) - { - _elem842 = iprot.readString(); - struct.success.add(_elem842); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DBNAME((short)1, "dbname"), - TBL_NAME((short)2, "tbl_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // TBL_NAME - return TBL_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_args.class, metaDataMap); - } - - public get_table_args() { - } - - public get_table_args( - String dbname, - String tbl_name) - { - this(); - this.dbname = dbname; - this.tbl_name = tbl_name; - } - - /** - * Performs a deep copy on other. - */ - public get_table_args(get_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - } - - public get_table_args deepCopy() { - return new get_table_args(this); - } - - @Override - public void clear() { - this.dbname = null; - this.tbl_name = null; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case TBL_NAME: - return getTbl_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case TBL_NAME: - return isSetTbl_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_args) - return this.equals((get_table_args)that); - return false; - } - - public boolean equals(get_table_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_result.class, metaDataMap); - } - - public get_table_result() { - } - - public get_table_result( - Table success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_table_result(get_table_result other) { - if (other.isSetSuccess()) { - this.success = new Table(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_table_result deepCopy() { - return new get_table_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public Table getSuccess() { - return this.success; - } - - public void setSuccess(Table success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Table)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_result) - return this.equals((get_table_result)that); - return false; - } - - public boolean equals(get_table_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DBNAME((short)1, "dbname"), - TBL_NAMES((short)2, "tbl_names"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // TBL_NAMES - return TBL_NAMES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("tbl_names", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_objects_by_name_args.class, metaDataMap); - } - - public get_table_objects_by_name_args() { - } - - public get_table_objects_by_name_args( - String dbname, - List tbl_names) - { - this(); - this.dbname = dbname; - this.tbl_names = tbl_names; - } - - /** - * Performs a deep copy on other. - */ - public get_table_objects_by_name_args(get_table_objects_by_name_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTbl_names()) { - List __this__tbl_names = new ArrayList(other.tbl_names); - this.tbl_names = __this__tbl_names; - } - } - - public get_table_objects_by_name_args deepCopy() { - return new get_table_objects_by_name_args(this); - } - - @Override - public void clear() { - this.dbname = null; - this.tbl_names = null; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public int getTbl_namesSize() { - return (this.tbl_names == null) ? 0 : this.tbl_names.size(); - } - - public java.util.Iterator getTbl_namesIterator() { - return (this.tbl_names == null) ? null : this.tbl_names.iterator(); - } - - public void addToTbl_names(String elem) { - if (this.tbl_names == null) { - this.tbl_names = new ArrayList(); - } - this.tbl_names.add(elem); - } - - public List getTbl_names() { - return this.tbl_names; - } - - public void setTbl_names(List tbl_names) { - this.tbl_names = tbl_names; - } - - public void unsetTbl_names() { - this.tbl_names = null; - } - - /** Returns true if field tbl_names is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_names() { - return this.tbl_names != null; - } - - public void setTbl_namesIsSet(boolean value) { - if (!value) { - this.tbl_names = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TBL_NAMES: - if (value == null) { - unsetTbl_names(); - } else { - setTbl_names((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case TBL_NAMES: - return getTbl_names(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case TBL_NAMES: - return isSetTbl_names(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_objects_by_name_args) - return this.equals((get_table_objects_by_name_args)that); - return false; - } - - public boolean equals(get_table_objects_by_name_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tbl_names = true && this.isSetTbl_names(); - boolean that_present_tbl_names = true && that.isSetTbl_names(); - if (this_present_tbl_names || that_present_tbl_names) { - if (!(this_present_tbl_names && that_present_tbl_names)) - return false; - if (!this.tbl_names.equals(that.tbl_names)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_tbl_names = true && (isSetTbl_names()); - list.add(present_tbl_names); - if (present_tbl_names) - list.add(tbl_names); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_objects_by_name_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_names()).compareTo(other.isSetTbl_names()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_names()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_names, other.tbl_names); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_objects_by_name_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_names:"); - if (this.tbl_names == null) { - sb.append("null"); - } else { - sb.append(this.tbl_names); - } - 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 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 _list844 = iprot.readListBegin(); - struct.tbl_names = new ArrayList(_list844.size); - String _elem845; - for (int _i846 = 0; _i846 < _list844.size; ++_i846) - { - _elem845 = iprot.readString(); - struct.tbl_names.add(_elem845); - } - 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 _iter847 : struct.tbl_names) - { - oprot.writeString(_iter847); - } - 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 _iter848 : struct.tbl_names) - { - oprot.writeString(_iter848); - } - } - } - } - - @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 _list849 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.tbl_names = new ArrayList(_list849.size); - String _elem850; - for (int _i851 = 0; _i851 < _list849.size; ++_i851) - { - _elem850 = iprot.readString(); - struct.tbl_names.add(_elem850); - } - } - struct.setTbl_namesIsSet(true); - } - } - } - - } - - public static class get_table_objects_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_objects_by_name_result.class, metaDataMap); - } - - public get_table_objects_by_name_result() { - } - - public get_table_objects_by_name_result( - List
success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public get_table_objects_by_name_result(get_table_objects_by_name_result other) { - if (other.isSetSuccess()) { - List
__this__success = new ArrayList
(other.success.size()); - for (Table other_element : other.success) { - __this__success.add(new Table(other_element)); - } - this.success = __this__success; - } - } - - public get_table_objects_by_name_result deepCopy() { - return new get_table_objects_by_name_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator
getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Table elem) { - if (this.success == null) { - this.success = new ArrayList
(); - } - this.success.add(elem); - } - - public List
getSuccess() { - return this.success; - } - - public void setSuccess(List
success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List
)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_objects_by_name_result) - return this.equals((get_table_objects_by_name_result)that); - return false; - } - - public boolean equals(get_table_objects_by_name_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_objects_by_name_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_objects_by_name_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - 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 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 _list852 = iprot.readListBegin(); - struct.success = new ArrayList
(_list852.size); - Table _elem853; - for (int _i854 = 0; _i854 < _list852.size; ++_i854) - { - _elem853 = new Table(); - _elem853.read(iprot); - struct.success.add(_elem853); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(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 _iter855 : struct.success) - { - _iter855.write(oprot); - } - oprot.writeListEnd(); - } - 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); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (Table _iter856 : struct.success) - { - _iter856.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(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list857 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList
(_list857.size); - Table _elem858; - for (int _i859 = 0; _i859 < _list857.size; ++_i859) - { - _elem858 = new Table(); - _elem858.read(iprot); - struct.success.add(_elem858); - } - } - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class get_table_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_req_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_table_req_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_table_req_argsTupleSchemeFactory()); - } - - private GetTableRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetTableRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_req_args.class, metaDataMap); - } - - public get_table_req_args() { - } - - public get_table_req_args( - GetTableRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public get_table_req_args(get_table_req_args other) { - if (other.isSetReq()) { - this.req = new GetTableRequest(other.req); - } - } - - public get_table_req_args deepCopy() { - return new get_table_req_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public GetTableRequest getReq() { - return this.req; - } - - public void setReq(GetTableRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((GetTableRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_req_args) - return this.equals((get_table_req_args)that); - return false; - } - - public boolean equals(get_table_req_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_req_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_req_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 get_table_req_argsStandardSchemeFactory implements SchemeFactory { - public get_table_req_argsStandardScheme getScheme() { - return new get_table_req_argsStandardScheme(); - } - } - - private static class get_table_req_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_req_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new GetTableRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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_req_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_table_req_argsTupleSchemeFactory implements SchemeFactory { - public get_table_req_argsTupleScheme getScheme() { - return new get_table_req_argsTupleScheme(); - } - } - - private static class get_table_req_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_table_req_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_table_req_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new GetTableRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class get_table_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_req_result"); - - 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 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_req_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_table_req_resultTupleSchemeFactory()); - } - - private GetTableResult success; // required - private MetaException o1; // required - private NoSuchObjectException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetTableResult.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_req_result.class, metaDataMap); - } - - public get_table_req_result() { - } - - public get_table_req_result( - GetTableResult success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_table_req_result(get_table_req_result other) { - if (other.isSetSuccess()) { - this.success = new GetTableResult(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_table_req_result deepCopy() { - return new get_table_req_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public GetTableResult getSuccess() { - return this.success; - } - - public void setSuccess(GetTableResult success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((GetTableResult)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_req_result) - return this.equals((get_table_req_result)that); - return false; - } - - public boolean equals(get_table_req_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_req_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_req_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_table_req_resultStandardSchemeFactory implements SchemeFactory { - public get_table_req_resultStandardScheme getScheme() { - return new get_table_req_resultStandardScheme(); - } - } - - private static class get_table_req_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_req_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 GetTableResult(); - 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_req_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_req_resultTupleSchemeFactory implements SchemeFactory { - public get_table_req_resultTupleScheme getScheme() { - return new get_table_req_resultTupleScheme(); - } - } - - private static class get_table_req_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_table_req_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_req_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new GetTableResult(); - 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_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_req_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_table_objects_by_name_req_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_table_objects_by_name_req_argsTupleSchemeFactory()); - } - - private GetTablesRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetTablesRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_objects_by_name_req_args.class, metaDataMap); - } - - public get_table_objects_by_name_req_args() { - } - - public get_table_objects_by_name_req_args( - GetTablesRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public get_table_objects_by_name_req_args(get_table_objects_by_name_req_args other) { - if (other.isSetReq()) { - this.req = new GetTablesRequest(other.req); - } - } - - public get_table_objects_by_name_req_args deepCopy() { - return new get_table_objects_by_name_req_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public GetTablesRequest getReq() { - return this.req; - } - - public void setReq(GetTablesRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((GetTablesRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_objects_by_name_req_args) - return this.equals((get_table_objects_by_name_req_args)that); - return false; - } - - public boolean equals(get_table_objects_by_name_req_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_objects_by_name_req_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_objects_by_name_req_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 get_table_objects_by_name_req_argsStandardSchemeFactory implements SchemeFactory { - public get_table_objects_by_name_req_argsStandardScheme getScheme() { - return new get_table_objects_by_name_req_argsStandardScheme(); - } - } - - private static class get_table_objects_by_name_req_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_by_name_req_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new GetTablesRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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_req_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_table_objects_by_name_req_argsTupleSchemeFactory implements SchemeFactory { - public get_table_objects_by_name_req_argsTupleScheme getScheme() { - return new get_table_objects_by_name_req_argsTupleScheme(); - } - } - - private static class get_table_objects_by_name_req_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_req_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_req_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new GetTablesRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class get_table_objects_by_name_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_req_result"); - - 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 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_req_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_table_objects_by_name_req_resultTupleSchemeFactory()); - } - - private GetTablesResult success; // required - private MetaException o1; // required - private InvalidOperationException o2; // required - private UnknownDBException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetTablesResult.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_objects_by_name_req_result.class, metaDataMap); - } - - public get_table_objects_by_name_req_result() { - } - - public get_table_objects_by_name_req_result( - GetTablesResult success, - MetaException o1, - InvalidOperationException o2, - UnknownDBException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public get_table_objects_by_name_req_result(get_table_objects_by_name_req_result other) { - if (other.isSetSuccess()) { - this.success = new GetTablesResult(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidOperationException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); - } - } - - public get_table_objects_by_name_req_result deepCopy() { - return new get_table_objects_by_name_req_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public GetTablesResult getSuccess() { - return this.success; - } - - public void setSuccess(GetTablesResult success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidOperationException getO2() { - return this.o2; - } - - public void setO2(InvalidOperationException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public UnknownDBException getO3() { - return this.o3; - } - - public void setO3(UnknownDBException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((GetTablesResult)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidOperationException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_objects_by_name_req_result) - return this.equals((get_table_objects_by_name_req_result)that); - return false; - } - - public boolean equals(get_table_objects_by_name_req_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_objects_by_name_req_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_objects_by_name_req_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_table_objects_by_name_req_resultStandardSchemeFactory implements SchemeFactory { - public get_table_objects_by_name_req_resultStandardScheme getScheme() { - return new get_table_objects_by_name_req_resultStandardScheme(); - } - } - - private static class get_table_objects_by_name_req_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_by_name_req_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 GetTablesResult(); - 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 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_req_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 get_table_objects_by_name_req_resultTupleSchemeFactory implements SchemeFactory { - public get_table_objects_by_name_req_resultTupleScheme getScheme() { - return new get_table_objects_by_name_req_resultTupleScheme(); - } - } - - private static class get_table_objects_by_name_req_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_req_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, get_table_objects_by_name_req_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.success = new GetTablesResult(); - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_names_by_filter_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DBNAME((short)1, "dbname"), - FILTER((short)2, "filter"), - MAX_TABLES((short)3, "max_tables"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // FILTER - return FILTER; - case 3: // MAX_TABLES - return MAX_TABLES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAX_TABLES_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FILTER, new org.apache.thrift.meta_data.FieldMetaData("filter", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_TABLES, new org.apache.thrift.meta_data.FieldMetaData("max_tables", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_names_by_filter_args.class, metaDataMap); - } - - public get_table_names_by_filter_args() { - this.max_tables = (short)-1; - - } - - public get_table_names_by_filter_args( - String dbname, - String filter, - short max_tables) - { - this(); - this.dbname = dbname; - this.filter = filter; - this.max_tables = max_tables; - setMax_tablesIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public get_table_names_by_filter_args(get_table_names_by_filter_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetFilter()) { - this.filter = other.filter; - } - this.max_tables = other.max_tables; - } - - public get_table_names_by_filter_args deepCopy() { - return new get_table_names_by_filter_args(this); - } - - @Override - public void clear() { - this.dbname = null; - this.filter = null; - this.max_tables = (short)-1; - - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getFilter() { - return this.filter; - } - - public void setFilter(String filter) { - this.filter = filter; - } - - public void unsetFilter() { - this.filter = null; - } - - /** Returns true if field filter is set (has been assigned a value) and false otherwise */ - public boolean isSetFilter() { - return this.filter != null; - } - - public void setFilterIsSet(boolean value) { - if (!value) { - this.filter = null; - } - } - - public short getMax_tables() { - return this.max_tables; - } - - public void setMax_tables(short max_tables) { - this.max_tables = max_tables; - setMax_tablesIsSet(true); - } - - public void unsetMax_tables() { - __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 EncodingUtils.testBit(__isset_bitfield, __MAX_TABLES_ISSET_ID); - } - - public void setMax_tablesIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_TABLES_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case FILTER: - if (value == null) { - unsetFilter(); - } else { - setFilter((String)value); - } - break; - - case MAX_TABLES: - if (value == null) { - unsetMax_tables(); - } else { - setMax_tables((Short)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case FILTER: - return getFilter(); - - case MAX_TABLES: - return getMax_tables(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case FILTER: - return isSetFilter(); - case MAX_TABLES: - return isSetMax_tables(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_names_by_filter_args) - return this.equals((get_table_names_by_filter_args)that); - return false; - } - - public boolean equals(get_table_names_by_filter_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_filter = true && this.isSetFilter(); - boolean that_present_filter = true && that.isSetFilter(); - if (this_present_filter || that_present_filter) { - if (!(this_present_filter && that_present_filter)) - return false; - if (!this.filter.equals(that.filter)) - return false; - } - - boolean this_present_max_tables = true; - boolean that_present_max_tables = true; - if (this_present_max_tables || that_present_max_tables) { - if (!(this_present_max_tables && that_present_max_tables)) - return false; - if (this.max_tables != that.max_tables) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_filter = true && (isSetFilter()); - list.add(present_filter); - if (present_filter) - list.add(filter); - - boolean present_max_tables = true; - list.add(present_max_tables); - if (present_max_tables) - list.add(max_tables); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_names_by_filter_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFilter()).compareTo(other.isSetFilter()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFilter()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, other.filter); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_tables()).compareTo(other.isSetMax_tables()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax_tables()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_tables, other.max_tables); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_names_by_filter_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("filter:"); - if (this.filter == null) { - sb.append("null"); - } else { - sb.append(this.filter); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_tables:"); - sb.append(this.max_tables); - 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 { - // 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_names_by_filter_result"); - - 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 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 - private UnknownDBException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_names_by_filter_result.class, metaDataMap); - } - - public get_table_names_by_filter_result() { - } - - public get_table_names_by_filter_result( - List success, - MetaException o1, - InvalidOperationException o2, - UnknownDBException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public get_table_names_by_filter_result(get_table_names_by_filter_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidOperationException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); - } - } - - public get_table_names_by_filter_result deepCopy() { - return new get_table_names_by_filter_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidOperationException getO2() { - return this.o2; - } - - public void setO2(InvalidOperationException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public UnknownDBException getO3() { - return this.o3; - } - - public void setO3(UnknownDBException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidOperationException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_names_by_filter_result) - return this.equals((get_table_names_by_filter_result)that); - return false; - } - - public boolean equals(get_table_names_by_filter_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_names_by_filter_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_names_by_filter_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 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 _list860 = iprot.readListBegin(); - struct.success = new ArrayList(_list860.size); - String _elem861; - for (int _i862 = 0; _i862 < _list860.size; ++_i862) - { - _elem861 = iprot.readString(); - struct.success.add(_elem861); - } - 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 _iter863 : struct.success) - { - oprot.writeString(_iter863); - } - 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 _iter864 : struct.success) - { - oprot.writeString(_iter864); - } - } - } - 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 _list865 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list865.size); - String _elem866; - for (int _i867 = 0; _i867 < _list865.size; ++_i867) - { - _elem866 = iprot.readString(); - struct.success.add(_elem866); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DBNAME((short)1, "dbname"), - TBL_NAME((short)2, "tbl_name"), - NEW_TBL((short)3, "new_tbl"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // NEW_TBL - return NEW_TBL; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NEW_TBL, new org.apache.thrift.meta_data.FieldMetaData("new_tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_args.class, metaDataMap); - } - - public alter_table_args() { - } - - public alter_table_args( - String dbname, - String tbl_name, - Table new_tbl) - { - this(); - this.dbname = dbname; - this.tbl_name = tbl_name; - this.new_tbl = new_tbl; - } - - /** - * Performs a deep copy on other. - */ - public alter_table_args(alter_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetNew_tbl()) { - this.new_tbl = new Table(other.new_tbl); - } - } - - public alter_table_args deepCopy() { - return new alter_table_args(this); - } - - @Override - public void clear() { - this.dbname = null; - this.tbl_name = null; - this.new_tbl = null; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public Table getNew_tbl() { - return this.new_tbl; - } - - public void setNew_tbl(Table new_tbl) { - this.new_tbl = new_tbl; - } - - public void unsetNew_tbl() { - this.new_tbl = null; - } - - /** Returns true if field new_tbl is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_tbl() { - return this.new_tbl != null; - } - - public void setNew_tblIsSet(boolean value) { - if (!value) { - this.new_tbl = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case NEW_TBL: - if (value == null) { - unsetNew_tbl(); - } else { - setNew_tbl((Table)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case TBL_NAME: - return getTbl_name(); - - case NEW_TBL: - return getNew_tbl(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case TBL_NAME: - return isSetTbl_name(); - case NEW_TBL: - return isSetNew_tbl(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_table_args) - return this.equals((alter_table_args)that); - return false; - } - - public boolean equals(alter_table_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_new_tbl = true && this.isSetNew_tbl(); - boolean that_present_new_tbl = true && that.isSetNew_tbl(); - if (this_present_new_tbl || that_present_new_tbl) { - if (!(this_present_new_tbl && that_present_new_tbl)) - return false; - if (!this.new_tbl.equals(that.new_tbl)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_new_tbl = true && (isSetNew_tbl()); - list.add(present_new_tbl); - if (present_new_tbl) - list.add(new_tbl); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_table_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(other.isSetNew_tbl()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_tbl()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, other.new_tbl); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_table_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("new_tbl:"); - if (this.new_tbl == null) { - sb.append("null"); - } else { - sb.append(this.new_tbl); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_result.class, metaDataMap); - } - - public alter_table_result() { - } - - public alter_table_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_table_result(alter_table_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public alter_table_result deepCopy() { - return new alter_table_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_table_result) - return this.equals((alter_table_result)that); - return false; - } - - public boolean equals(alter_table_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_table_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_table_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_with_environment_context_args"); - - 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 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 - private EnvironmentContext environment_context; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DBNAME((short)1, "dbname"), - TBL_NAME((short)2, "tbl_name"), - NEW_TBL((short)3, "new_tbl"), - ENVIRONMENT_CONTEXT((short)4, "environment_context"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // NEW_TBL - return NEW_TBL; - case 4: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NEW_TBL, new org.apache.thrift.meta_data.FieldMetaData("new_tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_with_environment_context_args.class, metaDataMap); - } - - public alter_table_with_environment_context_args() { - } - - public alter_table_with_environment_context_args( - String dbname, - String tbl_name, - Table new_tbl, - EnvironmentContext environment_context) - { - this(); - this.dbname = dbname; - this.tbl_name = tbl_name; - this.new_tbl = new_tbl; - this.environment_context = environment_context; - } - - /** - * Performs a deep copy on other. - */ - public alter_table_with_environment_context_args(alter_table_with_environment_context_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetNew_tbl()) { - this.new_tbl = new Table(other.new_tbl); - } - if (other.isSetEnvironment_context()) { - this.environment_context = new EnvironmentContext(other.environment_context); - } - } - - public alter_table_with_environment_context_args deepCopy() { - return new alter_table_with_environment_context_args(this); - } - - @Override - public void clear() { - this.dbname = null; - this.tbl_name = null; - this.new_tbl = null; - this.environment_context = null; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public Table getNew_tbl() { - return this.new_tbl; - } - - public void setNew_tbl(Table new_tbl) { - this.new_tbl = new_tbl; - } - - public void unsetNew_tbl() { - this.new_tbl = null; - } - - /** Returns true if field new_tbl is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_tbl() { - return this.new_tbl != null; - } - - public void setNew_tblIsSet(boolean value) { - if (!value) { - this.new_tbl = null; - } - } - - public EnvironmentContext getEnvironment_context() { - return this.environment_context; - } - - public void setEnvironment_context(EnvironmentContext environment_context) { - this.environment_context = environment_context; - } - - public void unsetEnvironment_context() { - this.environment_context = null; - } - - /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironment_context() { - return this.environment_context != null; - } - - public void setEnvironment_contextIsSet(boolean value) { - if (!value) { - this.environment_context = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case NEW_TBL: - if (value == null) { - unsetNew_tbl(); - } else { - setNew_tbl((Table)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironment_context(); - } else { - setEnvironment_context((EnvironmentContext)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case TBL_NAME: - return getTbl_name(); - - case NEW_TBL: - return getNew_tbl(); - - case ENVIRONMENT_CONTEXT: - return getEnvironment_context(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case TBL_NAME: - return isSetTbl_name(); - case NEW_TBL: - return isSetNew_tbl(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironment_context(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_table_with_environment_context_args) - return this.equals((alter_table_with_environment_context_args)that); - return false; - } - - public boolean equals(alter_table_with_environment_context_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_new_tbl = true && this.isSetNew_tbl(); - boolean that_present_new_tbl = true && that.isSetNew_tbl(); - if (this_present_new_tbl || that_present_new_tbl) { - if (!(this_present_new_tbl && that_present_new_tbl)) - return false; - if (!this.new_tbl.equals(that.new_tbl)) - return false; - } - - boolean this_present_environment_context = true && this.isSetEnvironment_context(); - boolean that_present_environment_context = true && that.isSetEnvironment_context(); - if (this_present_environment_context || that_present_environment_context) { - if (!(this_present_environment_context && that_present_environment_context)) - return false; - if (!this.environment_context.equals(that.environment_context)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_new_tbl = true && (isSetNew_tbl()); - list.add(present_new_tbl); - if (present_new_tbl) - list.add(new_tbl); - - boolean present_environment_context = true && (isSetEnvironment_context()); - list.add(present_environment_context); - if (present_environment_context) - list.add(environment_context); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_table_with_environment_context_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(other.isSetNew_tbl()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_tbl()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, other.new_tbl); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironment_context()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_table_with_environment_context_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("new_tbl:"); - if (this.new_tbl == null) { - sb.append("null"); - } else { - sb.append(this.new_tbl); - } - first = false; - if (!first) sb.append(", "); - sb.append("environment_context:"); - if (this.environment_context == null) { - sb.append("null"); - } else { - sb.append(this.environment_context); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_with_environment_context_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_with_environment_context_result.class, metaDataMap); - } - - public alter_table_with_environment_context_result() { - } - - public alter_table_with_environment_context_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_table_with_environment_context_result(alter_table_with_environment_context_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public alter_table_with_environment_context_result deepCopy() { - return new alter_table_with_environment_context_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_table_with_environment_context_result) - return this.equals((alter_table_with_environment_context_result)that); - return false; - } - - public boolean equals(alter_table_with_environment_context_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_table_with_environment_context_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_table_with_environment_context_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 alter_table_with_cascade_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_with_cascade_args"); - - 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 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 CASCADE_FIELD_DESC = new org.apache.thrift.protocol.TField("cascade", org.apache.thrift.protocol.TType.BOOL, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new alter_table_with_cascade_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new alter_table_with_cascade_argsTupleSchemeFactory()); - } - - private String dbname; // required - private String tbl_name; // required - private Table new_tbl; // required - private boolean cascade; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DBNAME((short)1, "dbname"), - TBL_NAME((short)2, "tbl_name"), - NEW_TBL((short)3, "new_tbl"), - CASCADE((short)4, "cascade"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // NEW_TBL - return NEW_TBL; - case 4: // CASCADE - return CASCADE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __CASCADE_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NEW_TBL, new org.apache.thrift.meta_data.FieldMetaData("new_tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); - tmpMap.put(_Fields.CASCADE, new org.apache.thrift.meta_data.FieldMetaData("cascade", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_with_cascade_args.class, metaDataMap); - } - - public alter_table_with_cascade_args() { - } - - public alter_table_with_cascade_args( - String dbname, - String tbl_name, - Table new_tbl, - boolean cascade) - { - this(); - this.dbname = dbname; - this.tbl_name = tbl_name; - this.new_tbl = new_tbl; - this.cascade = cascade; - setCascadeIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public alter_table_with_cascade_args(alter_table_with_cascade_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetNew_tbl()) { - this.new_tbl = new Table(other.new_tbl); - } - this.cascade = other.cascade; - } - - public alter_table_with_cascade_args deepCopy() { - return new alter_table_with_cascade_args(this); - } - - @Override - public void clear() { - this.dbname = null; - this.tbl_name = null; - this.new_tbl = null; - setCascadeIsSet(false); - this.cascade = false; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public Table getNew_tbl() { - return this.new_tbl; - } - - public void setNew_tbl(Table new_tbl) { - this.new_tbl = new_tbl; - } - - public void unsetNew_tbl() { - this.new_tbl = null; - } - - /** Returns true if field new_tbl is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_tbl() { - return this.new_tbl != null; - } - - public void setNew_tblIsSet(boolean value) { - if (!value) { - this.new_tbl = null; - } - } - - public boolean isCascade() { - return this.cascade; - } - - public void setCascade(boolean cascade) { - this.cascade = cascade; - setCascadeIsSet(true); - } - - public void unsetCascade() { - __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 EncodingUtils.testBit(__isset_bitfield, __CASCADE_ISSET_ID); - } - - public void setCascadeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CASCADE_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case NEW_TBL: - if (value == null) { - unsetNew_tbl(); - } else { - setNew_tbl((Table)value); - } - break; - - case CASCADE: - if (value == null) { - unsetCascade(); - } else { - setCascade((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case TBL_NAME: - return getTbl_name(); - - case NEW_TBL: - return getNew_tbl(); - - case CASCADE: - return isCascade(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case TBL_NAME: - return isSetTbl_name(); - case NEW_TBL: - return isSetNew_tbl(); - case CASCADE: - return isSetCascade(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_table_with_cascade_args) - return this.equals((alter_table_with_cascade_args)that); - return false; - } - - public boolean equals(alter_table_with_cascade_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_new_tbl = true && this.isSetNew_tbl(); - boolean that_present_new_tbl = true && that.isSetNew_tbl(); - if (this_present_new_tbl || that_present_new_tbl) { - if (!(this_present_new_tbl && that_present_new_tbl)) - return false; - if (!this.new_tbl.equals(that.new_tbl)) - return false; - } - - boolean this_present_cascade = true; - boolean that_present_cascade = true; - if (this_present_cascade || that_present_cascade) { - if (!(this_present_cascade && that_present_cascade)) - return false; - if (this.cascade != that.cascade) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_new_tbl = true && (isSetNew_tbl()); - list.add(present_new_tbl); - if (present_new_tbl) - list.add(new_tbl); - - boolean present_cascade = true; - list.add(present_cascade); - if (present_cascade) - list.add(cascade); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_table_with_cascade_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(other.isSetNew_tbl()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_tbl()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, other.new_tbl); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCascade()).compareTo(other.isSetCascade()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCascade()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cascade, other.cascade); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_table_with_cascade_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("new_tbl:"); - if (this.new_tbl == null) { - sb.append("null"); - } else { - sb.append(this.new_tbl); - } - first = false; - if (!first) sb.append(", "); - sb.append("cascade:"); - sb.append(this.cascade); - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 { - // 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 alter_table_with_cascade_argsStandardSchemeFactory implements SchemeFactory { - public alter_table_with_cascade_argsStandardScheme getScheme() { - return new alter_table_with_cascade_argsStandardScheme(); - } - } - - private static class alter_table_with_cascade_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_with_cascade_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: // 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, alter_table_with_cascade_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.writeFieldBegin(CASCADE_FIELD_DESC); - oprot.writeBool(struct.cascade); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class alter_table_with_cascade_argsTupleSchemeFactory implements SchemeFactory { - public alter_table_with_cascade_argsTupleScheme getScheme() { - return new alter_table_with_cascade_argsTupleScheme(); - } - } - - private static class alter_table_with_cascade_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_with_cascade_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.isSetCascade()) { - 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.isSetCascade()) { - oprot.writeBool(struct.cascade); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_with_cascade_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.cascade = iprot.readBool(); - struct.setCascadeIsSet(true); - } - } - } - - } - - public static class alter_table_with_cascade_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_with_cascade_result"); - - 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_cascade_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new alter_table_with_cascade_resultTupleSchemeFactory()); - } - - private InvalidOperationException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_with_cascade_result.class, metaDataMap); - } - - public alter_table_with_cascade_result() { - } - - public alter_table_with_cascade_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_table_with_cascade_result(alter_table_with_cascade_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public alter_table_with_cascade_result deepCopy() { - return new alter_table_with_cascade_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_table_with_cascade_result) - return this.equals((alter_table_with_cascade_result)that); - return false; - } - - public boolean equals(alter_table_with_cascade_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_table_with_cascade_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_table_with_cascade_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 alter_table_with_cascade_resultStandardSchemeFactory implements SchemeFactory { - public alter_table_with_cascade_resultStandardScheme getScheme() { - return new alter_table_with_cascade_resultStandardScheme(); - } - } - - private static class alter_table_with_cascade_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_with_cascade_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_cascade_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_cascade_resultTupleSchemeFactory implements SchemeFactory { - public alter_table_with_cascade_resultTupleScheme getScheme() { - return new alter_table_with_cascade_resultTupleScheme(); - } - } - - private static class alter_table_with_cascade_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_with_cascade_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_cascade_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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NEW_PART((short)1, "new_part"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NEW_PART - return NEW_PART; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partition_args.class, metaDataMap); - } - - public add_partition_args() { - } - - public add_partition_args( - Partition new_part) - { - this(); - this.new_part = new_part; - } - - /** - * Performs a deep copy on other. - */ - public add_partition_args(add_partition_args other) { - if (other.isSetNew_part()) { - this.new_part = new Partition(other.new_part); - } - } - - public add_partition_args deepCopy() { - return new add_partition_args(this); - } - - @Override - public void clear() { - this.new_part = null; - } - - public Partition getNew_part() { - return this.new_part; - } - - public void setNew_part(Partition new_part) { - this.new_part = new_part; - } - - public void unsetNew_part() { - this.new_part = null; - } - - /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_part() { - return this.new_part != null; - } - - public void setNew_partIsSet(boolean value) { - if (!value) { - this.new_part = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NEW_PART: - if (value == null) { - unsetNew_part(); - } else { - setNew_part((Partition)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NEW_PART: - return getNew_part(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NEW_PART: - return isSetNew_part(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_partition_args) - return this.equals((add_partition_args)that); - return false; - } - - public boolean equals(add_partition_args that) { - if (that == null) - return false; - - boolean this_present_new_part = true && this.isSetNew_part(); - boolean that_present_new_part = true && that.isSetNew_part(); - if (this_present_new_part || that_present_new_part) { - if (!(this_present_new_part && that_present_new_part)) - return false; - if (!this.new_part.equals(that.new_part)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_new_part = true && (isSetNew_part()); - list.add(present_new_part); - if (present_new_part) - list.add(new_part); - - return list.hashCode(); - } - - @Override - public int compareTo(add_partition_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_part()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.new_part); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_partition_args("); - boolean first = true; - - sb.append("new_part:"); - if (this.new_part == null) { - sb.append("null"); - } else { - sb.append(this.new_part); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_result"); - - 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 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 - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partition_result.class, metaDataMap); - } - - public add_partition_result() { - } - - public add_partition_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public add_partition_result(add_partition_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public add_partition_result deepCopy() { - return new add_partition_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_partition_result) - return this.equals((add_partition_result)that); - return false; - } - - public boolean equals(add_partition_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(add_partition_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_partition_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_with_environment_context_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NEW_PART((short)1, "new_part"), - ENVIRONMENT_CONTEXT((short)2, "environment_context"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NEW_PART - return NEW_PART; - case 2: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partition_with_environment_context_args.class, metaDataMap); - } - - public add_partition_with_environment_context_args() { - } - - public add_partition_with_environment_context_args( - Partition new_part, - EnvironmentContext environment_context) - { - this(); - this.new_part = new_part; - this.environment_context = environment_context; - } - - /** - * Performs a deep copy on other. - */ - public add_partition_with_environment_context_args(add_partition_with_environment_context_args other) { - if (other.isSetNew_part()) { - this.new_part = new Partition(other.new_part); - } - if (other.isSetEnvironment_context()) { - this.environment_context = new EnvironmentContext(other.environment_context); - } - } - - public add_partition_with_environment_context_args deepCopy() { - return new add_partition_with_environment_context_args(this); - } - - @Override - public void clear() { - this.new_part = null; - this.environment_context = null; - } - - public Partition getNew_part() { - return this.new_part; - } - - public void setNew_part(Partition new_part) { - this.new_part = new_part; - } - - public void unsetNew_part() { - this.new_part = null; - } - - /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_part() { - return this.new_part != null; - } - - public void setNew_partIsSet(boolean value) { - if (!value) { - this.new_part = null; - } - } - - public EnvironmentContext getEnvironment_context() { - return this.environment_context; - } - - public void setEnvironment_context(EnvironmentContext environment_context) { - this.environment_context = environment_context; - } - - public void unsetEnvironment_context() { - this.environment_context = null; - } - - /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironment_context() { - return this.environment_context != null; - } - - public void setEnvironment_contextIsSet(boolean value) { - if (!value) { - this.environment_context = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NEW_PART: - if (value == null) { - unsetNew_part(); - } else { - setNew_part((Partition)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironment_context(); - } else { - setEnvironment_context((EnvironmentContext)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NEW_PART: - return getNew_part(); - - case ENVIRONMENT_CONTEXT: - return getEnvironment_context(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NEW_PART: - return isSetNew_part(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironment_context(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_partition_with_environment_context_args) - return this.equals((add_partition_with_environment_context_args)that); - return false; - } - - public boolean equals(add_partition_with_environment_context_args that) { - if (that == null) - return false; - - boolean this_present_new_part = true && this.isSetNew_part(); - boolean that_present_new_part = true && that.isSetNew_part(); - if (this_present_new_part || that_present_new_part) { - if (!(this_present_new_part && that_present_new_part)) - return false; - if (!this.new_part.equals(that.new_part)) - return false; - } - - boolean this_present_environment_context = true && this.isSetEnvironment_context(); - boolean that_present_environment_context = true && that.isSetEnvironment_context(); - if (this_present_environment_context || that_present_environment_context) { - if (!(this_present_environment_context && that_present_environment_context)) - return false; - if (!this.environment_context.equals(that.environment_context)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_new_part = true && (isSetNew_part()); - list.add(present_new_part); - if (present_new_part) - list.add(new_part); - - boolean present_environment_context = true && (isSetEnvironment_context()); - list.add(present_environment_context); - if (present_environment_context) - list.add(environment_context); - - return list.hashCode(); - } - - @Override - public int compareTo(add_partition_with_environment_context_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_part()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.new_part); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironment_context()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_partition_with_environment_context_args("); - boolean first = true; - - sb.append("new_part:"); - if (this.new_part == null) { - sb.append("null"); - } else { - sb.append(this.new_part); - } - first = false; - if (!first) sb.append(", "); - sb.append("environment_context:"); - if (this.environment_context == null) { - sb.append("null"); - } else { - sb.append(this.environment_context); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_with_environment_context_result"); - - 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 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 - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partition_with_environment_context_result.class, metaDataMap); - } - - public add_partition_with_environment_context_result() { - } - - public add_partition_with_environment_context_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public add_partition_with_environment_context_result(add_partition_with_environment_context_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public add_partition_with_environment_context_result deepCopy() { - return new add_partition_with_environment_context_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_partition_with_environment_context_result) - return this.equals((add_partition_with_environment_context_result)that); - return false; - } - - public boolean equals(add_partition_with_environment_context_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(add_partition_with_environment_context_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_partition_with_environment_context_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NEW_PARTS((short)1, "new_parts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NEW_PARTS - return NEW_PARTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NEW_PARTS, new org.apache.thrift.meta_data.FieldMetaData("new_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_args.class, metaDataMap); - } - - public add_partitions_args() { - } - - public add_partitions_args( - List new_parts) - { - this(); - this.new_parts = new_parts; - } - - /** - * Performs a deep copy on other. - */ - public add_partitions_args(add_partitions_args other) { - if (other.isSetNew_parts()) { - List __this__new_parts = new ArrayList(other.new_parts.size()); - for (Partition other_element : other.new_parts) { - __this__new_parts.add(new Partition(other_element)); - } - this.new_parts = __this__new_parts; - } - } - - public add_partitions_args deepCopy() { - return new add_partitions_args(this); - } - - @Override - public void clear() { - this.new_parts = null; - } - - public int getNew_partsSize() { - return (this.new_parts == null) ? 0 : this.new_parts.size(); - } - - public java.util.Iterator getNew_partsIterator() { - return (this.new_parts == null) ? null : this.new_parts.iterator(); - } - - public void addToNew_parts(Partition elem) { - if (this.new_parts == null) { - this.new_parts = new ArrayList(); - } - this.new_parts.add(elem); - } - - public List getNew_parts() { - return this.new_parts; - } - - public void setNew_parts(List new_parts) { - this.new_parts = new_parts; - } - - public void unsetNew_parts() { - this.new_parts = null; - } - - /** Returns true if field new_parts is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_parts() { - return this.new_parts != null; - } - - public void setNew_partsIsSet(boolean value) { - if (!value) { - this.new_parts = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NEW_PARTS: - if (value == null) { - unsetNew_parts(); - } else { - setNew_parts((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NEW_PARTS: - return getNew_parts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NEW_PARTS: - return isSetNew_parts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_partitions_args) - return this.equals((add_partitions_args)that); - return false; - } - - public boolean equals(add_partitions_args that) { - if (that == null) - return false; - - boolean this_present_new_parts = true && this.isSetNew_parts(); - boolean that_present_new_parts = true && that.isSetNew_parts(); - if (this_present_new_parts || that_present_new_parts) { - if (!(this_present_new_parts && that_present_new_parts)) - return false; - if (!this.new_parts.equals(that.new_parts)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_new_parts = true && (isSetNew_parts()); - list.add(present_new_parts); - if (present_new_parts) - list.add(new_parts); - - return list.hashCode(); - } - - @Override - public int compareTo(add_partitions_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(other.isSetNew_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, other.new_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_partitions_args("); - boolean first = true; - - sb.append("new_parts:"); - if (this.new_parts == null) { - sb.append("null"); - } else { - sb.append(this.new_parts); - } - 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 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 _list868 = iprot.readListBegin(); - struct.new_parts = new ArrayList(_list868.size); - Partition _elem869; - for (int _i870 = 0; _i870 < _list868.size; ++_i870) - { - _elem869 = new Partition(); - _elem869.read(iprot); - struct.new_parts.add(_elem869); - } - 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 _iter871 : struct.new_parts) - { - _iter871.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 _iter872 : struct.new_parts) - { - _iter872.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 _list873 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.new_parts = new ArrayList(_list873.size); - Partition _elem874; - for (int _i875 = 0; _i875 < _list873.size; ++_i875) - { - _elem874 = new Partition(); - _elem874.read(iprot); - struct.new_parts.add(_elem874); - } - } - struct.setNew_partsIsSet(true); - } - } - } - - } - - public static class add_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (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 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 - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_result.class, metaDataMap); - } - - public add_partitions_result() { - } - - public add_partitions_result( - int success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public add_partitions_result(add_partitions_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public add_partitions_result deepCopy() { - return new add_partitions_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = 0; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public int getSuccess() { - return this.success; - } - - public void setSuccess(int success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Integer)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_partitions_result) - return this.equals((add_partitions_result)that); - return false; - } - - public boolean equals(add_partitions_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(add_partitions_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_partitions_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 { - // 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 add_partitions_pspec_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_pspec_args"); - - 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_pspec_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_partitions_pspec_argsTupleSchemeFactory()); - } - - private List new_parts; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NEW_PARTS((short)1, "new_parts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NEW_PARTS - return NEW_PARTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NEW_PARTS, new org.apache.thrift.meta_data.FieldMetaData("new_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionSpec.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_pspec_args.class, metaDataMap); - } - - public add_partitions_pspec_args() { - } - - public add_partitions_pspec_args( - List new_parts) - { - this(); - this.new_parts = new_parts; - } - - /** - * Performs a deep copy on other. - */ - public add_partitions_pspec_args(add_partitions_pspec_args other) { - if (other.isSetNew_parts()) { - List __this__new_parts = new ArrayList(other.new_parts.size()); - for (PartitionSpec other_element : other.new_parts) { - __this__new_parts.add(new PartitionSpec(other_element)); - } - this.new_parts = __this__new_parts; - } - } - - public add_partitions_pspec_args deepCopy() { - return new add_partitions_pspec_args(this); - } - - @Override - public void clear() { - this.new_parts = null; - } - - public int getNew_partsSize() { - return (this.new_parts == null) ? 0 : this.new_parts.size(); - } - - public java.util.Iterator getNew_partsIterator() { - return (this.new_parts == null) ? null : this.new_parts.iterator(); - } - - public void addToNew_parts(PartitionSpec elem) { - if (this.new_parts == null) { - this.new_parts = new ArrayList(); - } - this.new_parts.add(elem); - } - - public List getNew_parts() { - return this.new_parts; - } - - public void setNew_parts(List new_parts) { - this.new_parts = new_parts; - } - - public void unsetNew_parts() { - this.new_parts = null; - } - - /** Returns true if field new_parts is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_parts() { - return this.new_parts != null; - } - - public void setNew_partsIsSet(boolean value) { - if (!value) { - this.new_parts = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NEW_PARTS: - if (value == null) { - unsetNew_parts(); - } else { - setNew_parts((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NEW_PARTS: - return getNew_parts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NEW_PARTS: - return isSetNew_parts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_partitions_pspec_args) - return this.equals((add_partitions_pspec_args)that); - return false; - } - - public boolean equals(add_partitions_pspec_args that) { - if (that == null) - return false; - - boolean this_present_new_parts = true && this.isSetNew_parts(); - boolean that_present_new_parts = true && that.isSetNew_parts(); - if (this_present_new_parts || that_present_new_parts) { - if (!(this_present_new_parts && that_present_new_parts)) - return false; - if (!this.new_parts.equals(that.new_parts)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_new_parts = true && (isSetNew_parts()); - list.add(present_new_parts); - if (present_new_parts) - list.add(new_parts); - - return list.hashCode(); - } - - @Override - public int compareTo(add_partitions_pspec_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(other.isSetNew_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, other.new_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_partitions_pspec_args("); - boolean first = true; - - sb.append("new_parts:"); - if (this.new_parts == null) { - sb.append("null"); - } else { - sb.append(this.new_parts); - } - 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 add_partitions_pspec_argsStandardSchemeFactory implements SchemeFactory { - public add_partitions_pspec_argsStandardScheme getScheme() { - return new add_partitions_pspec_argsStandardScheme(); - } - } - - private static class add_partitions_pspec_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_pspec_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 _list876 = iprot.readListBegin(); - struct.new_parts = new ArrayList(_list876.size); - PartitionSpec _elem877; - for (int _i878 = 0; _i878 < _list876.size; ++_i878) - { - _elem877 = new PartitionSpec(); - _elem877.read(iprot); - struct.new_parts.add(_elem877); - } - 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_pspec_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 (PartitionSpec _iter879 : struct.new_parts) - { - _iter879.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class add_partitions_pspec_argsTupleSchemeFactory implements SchemeFactory { - public add_partitions_pspec_argsTupleScheme getScheme() { - return new add_partitions_pspec_argsTupleScheme(); - } - } - - private static class add_partitions_pspec_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_pspec_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 (PartitionSpec _iter880 : struct.new_parts) - { - _iter880.write(oprot); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_pspec_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 _list881 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.new_parts = new ArrayList(_list881.size); - PartitionSpec _elem882; - for (int _i883 = 0; _i883 < _list881.size; ++_i883) - { - _elem882 = new PartitionSpec(); - _elem882.read(iprot); - struct.new_parts.add(_elem882); - } - } - struct.setNew_partsIsSet(true); - } - } - } - - } - - public static class add_partitions_pspec_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_pspec_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (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 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_pspec_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_partitions_pspec_resultTupleSchemeFactory()); - } - - private int success; // required - private InvalidObjectException o1; // required - private AlreadyExistsException o2; // required - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_pspec_result.class, metaDataMap); - } - - public add_partitions_pspec_result() { - } - - public add_partitions_pspec_result( - int success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public add_partitions_pspec_result(add_partitions_pspec_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public add_partitions_pspec_result deepCopy() { - return new add_partitions_pspec_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = 0; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public int getSuccess() { - return this.success; - } - - public void setSuccess(int success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Integer)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_partitions_pspec_result) - return this.equals((add_partitions_pspec_result)that); - return false; - } - - public boolean equals(add_partitions_pspec_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(add_partitions_pspec_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_partitions_pspec_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 { - // 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_pspec_resultStandardSchemeFactory implements SchemeFactory { - public add_partitions_pspec_resultStandardScheme getScheme() { - return new add_partitions_pspec_resultStandardScheme(); - } - } - - private static class add_partitions_pspec_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_pspec_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_pspec_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_pspec_resultTupleSchemeFactory implements SchemeFactory { - public add_partitions_pspec_resultTupleScheme getScheme() { - return new add_partitions_pspec_resultTupleScheme(); - } - } - - private static class add_partitions_pspec_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_pspec_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_pspec_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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_args.class, metaDataMap); - } - - public append_partition_args() { - } - - public append_partition_args( - String db_name, - String tbl_name, - List part_vals) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - } - - /** - * Performs a deep copy on other. - */ - public append_partition_args(append_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(other.part_vals); - this.part_vals = __this__part_vals; - } - } - - public append_partition_args deepCopy() { - return new append_partition_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof append_partition_args) - return this.equals((append_partition_args)that); - return false; - } - - public boolean equals(append_partition_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - return list.hashCode(); - } - - @Override - public int compareTo(append_partition_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("append_partition_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - 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 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 _list884 = iprot.readListBegin(); - struct.part_vals = new ArrayList(_list884.size); - String _elem885; - for (int _i886 = 0; _i886 < _list884.size; ++_i886) - { - _elem885 = iprot.readString(); - struct.part_vals.add(_elem885); - } - 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 _iter887 : struct.part_vals) - { - oprot.writeString(_iter887); - } - 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 _iter888 : struct.part_vals) - { - oprot.writeString(_iter888); - } - } - } - } - - @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 _list889 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.part_vals = new ArrayList(_list889.size); - String _elem890; - for (int _i891 = 0; _i891 < _list889.size; ++_i891) - { - _elem890 = iprot.readString(); - struct.part_vals.add(_elem890); - } - } - struct.setPart_valsIsSet(true); - } - } - } - - } - - public static class append_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_result"); - - 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 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 - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_result.class, metaDataMap); - } - - public append_partition_result() { - } - - public append_partition_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public append_partition_result(append_partition_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public append_partition_result deepCopy() { - return new append_partition_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof append_partition_result) - return this.equals((append_partition_result)that); - return false; - } - - public boolean equals(append_partition_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(append_partition_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("append_partition_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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 add_partitions_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_req_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new add_partitions_req_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_partitions_req_argsTupleSchemeFactory()); - } - - private AddPartitionsRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddPartitionsRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_req_args.class, metaDataMap); - } - - public add_partitions_req_args() { - } - - public add_partitions_req_args( - AddPartitionsRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public add_partitions_req_args(add_partitions_req_args other) { - if (other.isSetRequest()) { - this.request = new AddPartitionsRequest(other.request); - } - } - - public add_partitions_req_args deepCopy() { - return new add_partitions_req_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public AddPartitionsRequest getRequest() { - return this.request; - } - - public void setRequest(AddPartitionsRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((AddPartitionsRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_partitions_req_args) - return this.equals((add_partitions_req_args)that); - return false; - } - - public boolean equals(add_partitions_req_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(add_partitions_req_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_partitions_req_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 add_partitions_req_argsStandardSchemeFactory implements SchemeFactory { - public add_partitions_req_argsStandardScheme getScheme() { - return new add_partitions_req_argsStandardScheme(); - } - } - - private static class add_partitions_req_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_req_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new AddPartitionsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_req_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class add_partitions_req_argsTupleSchemeFactory implements SchemeFactory { - public add_partitions_req_argsTupleScheme getScheme() { - return new add_partitions_req_argsTupleScheme(); - } - } - - private static class add_partitions_req_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_req_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_req_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new AddPartitionsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class add_partitions_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_req_result"); - - 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 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_req_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_partitions_req_resultTupleSchemeFactory()); - } - - private AddPartitionsResult success; // required - private InvalidObjectException o1; // required - private AlreadyExistsException o2; // required - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddPartitionsResult.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_req_result.class, metaDataMap); - } - - public add_partitions_req_result() { - } - - public add_partitions_req_result( - AddPartitionsResult success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public add_partitions_req_result(add_partitions_req_result other) { - if (other.isSetSuccess()) { - this.success = new AddPartitionsResult(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public add_partitions_req_result deepCopy() { - return new add_partitions_req_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public AddPartitionsResult getSuccess() { - return this.success; - } - - public void setSuccess(AddPartitionsResult success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((AddPartitionsResult)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_partitions_req_result) - return this.equals((add_partitions_req_result)that); - return false; - } - - public boolean equals(add_partitions_req_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(add_partitions_req_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_partitions_req_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 add_partitions_req_resultStandardSchemeFactory implements SchemeFactory { - public add_partitions_req_resultStandardScheme getScheme() { - return new add_partitions_req_resultStandardScheme(); - } - } - - private static class add_partitions_req_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_req_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 AddPartitionsResult(); - 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_partitions_req_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_partitions_req_resultTupleSchemeFactory implements SchemeFactory { - public add_partitions_req_resultTupleScheme getScheme() { - return new add_partitions_req_resultTupleScheme(); - } - } - - private static class add_partitions_req_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_req_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_partitions_req_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.success = new AddPartitionsResult(); - 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_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_with_environment_context_args"); - - 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 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 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 append_partition_with_environment_context_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new append_partition_with_environment_context_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - private List part_vals; // required - private EnvironmentContext environment_context; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - ENVIRONMENT_CONTEXT((short)4, "environment_context"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_with_environment_context_args.class, metaDataMap); - } - - public append_partition_with_environment_context_args() { - } - - public append_partition_with_environment_context_args( - String db_name, - String tbl_name, - List part_vals, - EnvironmentContext environment_context) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.environment_context = environment_context; - } - - /** - * Performs a deep copy on other. - */ - public append_partition_with_environment_context_args(append_partition_with_environment_context_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(other.part_vals); - this.part_vals = __this__part_vals; - } - if (other.isSetEnvironment_context()) { - this.environment_context = new EnvironmentContext(other.environment_context); - } - } - - public append_partition_with_environment_context_args deepCopy() { - return new append_partition_with_environment_context_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - this.environment_context = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - public EnvironmentContext getEnvironment_context() { - return this.environment_context; - } - - public void setEnvironment_context(EnvironmentContext environment_context) { - this.environment_context = environment_context; - } - - public void unsetEnvironment_context() { - this.environment_context = null; - } - - /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironment_context() { - return this.environment_context != null; - } - - public void setEnvironment_contextIsSet(boolean value) { - if (!value) { - this.environment_context = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironment_context(); - } else { - setEnvironment_context((EnvironmentContext)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case ENVIRONMENT_CONTEXT: - return getEnvironment_context(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironment_context(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof append_partition_with_environment_context_args) - return this.equals((append_partition_with_environment_context_args)that); - return false; - } - - public boolean equals(append_partition_with_environment_context_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_environment_context = true && this.isSetEnvironment_context(); - boolean that_present_environment_context = true && that.isSetEnvironment_context(); - if (this_present_environment_context || that_present_environment_context) { - if (!(this_present_environment_context && that_present_environment_context)) - return false; - if (!this.environment_context.equals(that.environment_context)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - boolean present_environment_context = true && (isSetEnvironment_context()); - list.add(present_environment_context); - if (present_environment_context) - list.add(environment_context); - - return list.hashCode(); - } - - @Override - public int compareTo(append_partition_with_environment_context_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironment_context()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("append_partition_with_environment_context_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("environment_context:"); - if (this.environment_context == null) { - sb.append("null"); - } else { - sb.append(this.environment_context); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (environment_context != null) { - environment_context.validate(); - } - } - - 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 append_partition_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { - public append_partition_with_environment_context_argsStandardScheme getScheme() { - return new append_partition_with_environment_context_argsStandardScheme(); - } - } - - private static class append_partition_with_environment_context_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, append_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: // PART_VALS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list892 = iprot.readListBegin(); - struct.part_vals = new ArrayList(_list892.size); - String _elem893; - for (int _i894 = 0; _i894 < _list892.size; ++_i894) - { - _elem893 = iprot.readString(); - struct.part_vals.add(_elem893); - } - iprot.readListEnd(); - } - struct.setPart_valsIsSet(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, append_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.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 _iter895 : struct.part_vals) - { - oprot.writeString(_iter895); - } - oprot.writeListEnd(); - } - 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 append_partition_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { - public append_partition_with_environment_context_argsTupleScheme getScheme() { - return new append_partition_with_environment_context_argsTupleScheme(); - } - } - - private static class append_partition_with_environment_context_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, append_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.isSetPart_vals()) { - 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.isSetPart_vals()) { - { - oprot.writeI32(struct.part_vals.size()); - for (String _iter896 : struct.part_vals) - { - oprot.writeString(_iter896); - } - } - } - if (struct.isSetEnvironment_context()) { - struct.environment_context.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, append_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)) { - { - org.apache.thrift.protocol.TList _list897 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.part_vals = new ArrayList(_list897.size); - String _elem898; - for (int _i899 = 0; _i899 < _list897.size; ++_i899) - { - _elem898 = iprot.readString(); - struct.part_vals.add(_elem898); - } - } - struct.setPart_valsIsSet(true); - } - if (incoming.get(3)) { - struct.environment_context = new EnvironmentContext(); - struct.environment_context.read(iprot); - struct.setEnvironment_contextIsSet(true); - } - } - } - - } - - public static class append_partition_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_with_environment_context_result"); - - 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 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_with_environment_context_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new append_partition_with_environment_context_resultTupleSchemeFactory()); - } - - private Partition success; // required - private InvalidObjectException o1; // required - private AlreadyExistsException o2; // required - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_with_environment_context_result.class, metaDataMap); - } - - public append_partition_with_environment_context_result() { - } - - public append_partition_with_environment_context_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public append_partition_with_environment_context_result(append_partition_with_environment_context_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public append_partition_with_environment_context_result deepCopy() { - return new append_partition_with_environment_context_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof append_partition_with_environment_context_result) - return this.equals((append_partition_with_environment_context_result)that); - return false; - } - - public boolean equals(append_partition_with_environment_context_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(append_partition_with_environment_context_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("append_partition_with_environment_context_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 append_partition_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { - public append_partition_with_environment_context_resultStandardScheme getScheme() { - return new append_partition_with_environment_context_resultStandardScheme(); - } - } - - private static class append_partition_with_environment_context_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, append_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, append_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 append_partition_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { - public append_partition_with_environment_context_resultTupleScheme getScheme() { - return new append_partition_with_environment_context_resultTupleScheme(); - } - } - - private static class append_partition_with_environment_context_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, append_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, append_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 append_partition_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_by_name_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_NAME((short)3, "part_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_NAME - return PART_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_by_name_args.class, metaDataMap); - } - - public append_partition_by_name_args() { - } - - public append_partition_by_name_args( - String db_name, - String tbl_name, - String part_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - } - - /** - * Performs a deep copy on other. - */ - public append_partition_by_name_args(append_partition_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - } - - public append_partition_by_name_args deepCopy() { - return new append_partition_by_name_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; - } - - public void setPart_nameIsSet(boolean value) { - if (!value) { - this.part_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_NAME: - return getPart_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof append_partition_by_name_args) - return this.equals((append_partition_by_name_args)that); - return false; - } - - public boolean equals(append_partition_by_name_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_name = true && (isSetPart_name()); - list.add(present_part_name); - if (present_part_name) - list.add(part_name); - - return list.hashCode(); - } - - @Override - public int compareTo(append_partition_by_name_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("append_partition_by_name_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_by_name_result"); - - 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 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 - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_by_name_result.class, metaDataMap); - } - - public append_partition_by_name_result() { - } - - public append_partition_by_name_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public append_partition_by_name_result(append_partition_by_name_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public append_partition_by_name_result deepCopy() { - return new append_partition_by_name_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof append_partition_by_name_result) - return this.equals((append_partition_by_name_result)that); - return false; - } - - public boolean equals(append_partition_by_name_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(append_partition_by_name_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("append_partition_by_name_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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 append_partition_by_name_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_by_name_with_environment_context_args"); - - 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 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 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 append_partition_by_name_with_environment_context_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new append_partition_by_name_with_environment_context_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - private String part_name; // required - private EnvironmentContext environment_context; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_NAME((short)3, "part_name"), - ENVIRONMENT_CONTEXT((short)4, "environment_context"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_NAME - return PART_NAME; - case 4: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_by_name_with_environment_context_args.class, metaDataMap); - } - - public append_partition_by_name_with_environment_context_args() { - } - - public append_partition_by_name_with_environment_context_args( - String db_name, - String tbl_name, - String part_name, - EnvironmentContext environment_context) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.environment_context = environment_context; - } - - /** - * Performs a deep copy on other. - */ - public append_partition_by_name_with_environment_context_args(append_partition_by_name_with_environment_context_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - if (other.isSetEnvironment_context()) { - this.environment_context = new EnvironmentContext(other.environment_context); - } - } - - public append_partition_by_name_with_environment_context_args deepCopy() { - return new append_partition_by_name_with_environment_context_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_name = null; - this.environment_context = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; - } - - public void setPart_nameIsSet(boolean value) { - if (!value) { - this.part_name = null; - } - } - - public EnvironmentContext getEnvironment_context() { - return this.environment_context; - } - - public void setEnvironment_context(EnvironmentContext environment_context) { - this.environment_context = environment_context; - } - - public void unsetEnvironment_context() { - this.environment_context = null; - } - - /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironment_context() { - return this.environment_context != null; - } - - public void setEnvironment_contextIsSet(boolean value) { - if (!value) { - this.environment_context = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironment_context(); - } else { - setEnvironment_context((EnvironmentContext)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_NAME: - return getPart_name(); - - case ENVIRONMENT_CONTEXT: - return getEnvironment_context(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironment_context(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof append_partition_by_name_with_environment_context_args) - return this.equals((append_partition_by_name_with_environment_context_args)that); - return false; - } - - public boolean equals(append_partition_by_name_with_environment_context_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - boolean this_present_environment_context = true && this.isSetEnvironment_context(); - boolean that_present_environment_context = true && that.isSetEnvironment_context(); - if (this_present_environment_context || that_present_environment_context) { - if (!(this_present_environment_context && that_present_environment_context)) - return false; - if (!this.environment_context.equals(that.environment_context)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_name = true && (isSetPart_name()); - list.add(present_part_name); - if (present_part_name) - list.add(part_name); - - boolean present_environment_context = true && (isSetEnvironment_context()); - list.add(present_environment_context); - if (present_environment_context) - list.add(environment_context); - - return list.hashCode(); - } - - @Override - public int compareTo(append_partition_by_name_with_environment_context_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironment_context()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("append_partition_by_name_with_environment_context_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("environment_context:"); - if (this.environment_context == null) { - sb.append("null"); - } else { - sb.append(this.environment_context); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (environment_context != null) { - environment_context.validate(); - } - } - - 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 append_partition_by_name_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { - public append_partition_by_name_with_environment_context_argsStandardScheme getScheme() { - return new append_partition_by_name_with_environment_context_argsStandardScheme(); - } - } - - private static class append_partition_by_name_with_environment_context_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_by_name_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: // 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: // 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, append_partition_by_name_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.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(struct.part_name); - 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 append_partition_by_name_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { - public append_partition_by_name_with_environment_context_argsTupleScheme getScheme() { - return new append_partition_by_name_with_environment_context_argsTupleScheme(); - } - } - - private static class append_partition_by_name_with_environment_context_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_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.isSetPart_name()) { - 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.isSetPart_name()) { - oprot.writeString(struct.part_name); - } - if (struct.isSetEnvironment_context()) { - struct.environment_context.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_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.part_name = iprot.readString(); - struct.setPart_nameIsSet(true); - } - if (incoming.get(3)) { - struct.environment_context = new EnvironmentContext(); - struct.environment_context.read(iprot); - struct.setEnvironment_contextIsSet(true); - } - } - } - - } - - public static class append_partition_by_name_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_by_name_with_environment_context_result"); - - 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 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_with_environment_context_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new append_partition_by_name_with_environment_context_resultTupleSchemeFactory()); - } - - private Partition success; // required - private InvalidObjectException o1; // required - private AlreadyExistsException o2; // required - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_by_name_with_environment_context_result.class, metaDataMap); - } - - public append_partition_by_name_with_environment_context_result() { - } - - public append_partition_by_name_with_environment_context_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public append_partition_by_name_with_environment_context_result(append_partition_by_name_with_environment_context_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public append_partition_by_name_with_environment_context_result deepCopy() { - return new append_partition_by_name_with_environment_context_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof append_partition_by_name_with_environment_context_result) - return this.equals((append_partition_by_name_with_environment_context_result)that); - return false; - } - - public boolean equals(append_partition_by_name_with_environment_context_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(append_partition_by_name_with_environment_context_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("append_partition_by_name_with_environment_context_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 append_partition_by_name_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { - public append_partition_by_name_with_environment_context_resultStandardScheme getScheme() { - return new append_partition_by_name_with_environment_context_resultStandardScheme(); - } - } - - private static class append_partition_by_name_with_environment_context_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_by_name_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, append_partition_by_name_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 append_partition_by_name_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { - public append_partition_by_name_with_environment_context_resultTupleScheme getScheme() { - return new append_partition_by_name_with_environment_context_resultTupleScheme(); - } - } - - private static class append_partition_by_name_with_environment_context_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_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, append_partition_by_name_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 drop_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_args"); - - 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 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 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 - private boolean deleteData; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - DELETE_DATA((short)4, "deleteData"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // DELETE_DATA - return DELETE_DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_args.class, metaDataMap); - } - - public drop_partition_args() { - } - - public drop_partition_args( - String db_name, - String tbl_name, - List part_vals, - boolean deleteData) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public drop_partition_args(drop_partition_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(other.part_vals); - this.part_vals = __this__part_vals; - } - this.deleteData = other.deleteData; - } - - public drop_partition_args deepCopy() { - return new drop_partition_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - setDeleteDataIsSet(false); - this.deleteData = false; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case DELETE_DATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case DELETE_DATA: - return isDeleteData(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case DELETE_DATA: - return isSetDeleteData(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partition_args) - return this.equals((drop_partition_args)that); - return false; - } - - public boolean equals(drop_partition_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - boolean present_deleteData = true; - list.add(present_deleteData); - if (present_deleteData) - list.add(deleteData); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_partition_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDeleteData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_partition_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - 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 { - // 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_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 _list900 = iprot.readListBegin(); - struct.part_vals = new ArrayList(_list900.size); - String _elem901; - for (int _i902 = 0; _i902 < _list900.size; ++_i902) - { - _elem901 = iprot.readString(); - struct.part_vals.add(_elem901); - } - 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 _iter903 : struct.part_vals) - { - oprot.writeString(_iter903); - } - 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 _iter904 : struct.part_vals) - { - oprot.writeString(_iter904); - } - } - } - 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 _list905 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.part_vals = new ArrayList(_list905.size); - String _elem906; - for (int _i907 = 0; _i907 < _list905.size; ++_i907) - { - _elem906 = iprot.readString(); - struct.part_vals.add(_elem906); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_result.class, metaDataMap); - } - - public drop_partition_result() { - } - - public drop_partition_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public drop_partition_result(drop_partition_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public drop_partition_result deepCopy() { - return new drop_partition_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partition_result) - return this.equals((drop_partition_result)that); - return false; - } - - public boolean equals(drop_partition_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_partition_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_partition_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 { - // 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_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_with_environment_context_args"); - - 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 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 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 org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new drop_partition_with_environment_context_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_partition_with_environment_context_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - private List part_vals; // required - private boolean deleteData; // required - private EnvironmentContext environment_context; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - DELETE_DATA((short)4, "deleteData"), - ENVIRONMENT_CONTEXT((short)5, "environment_context"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // DELETE_DATA - return DELETE_DATA; - case 5: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_with_environment_context_args.class, metaDataMap); - } - - public drop_partition_with_environment_context_args() { - } - - public drop_partition_with_environment_context_args( - String db_name, - String tbl_name, - List part_vals, - boolean deleteData, - EnvironmentContext environment_context) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.deleteData = deleteData; - setDeleteDataIsSet(true); - this.environment_context = environment_context; - } - - /** - * Performs a deep copy on other. - */ - public drop_partition_with_environment_context_args(drop_partition_with_environment_context_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(other.part_vals); - this.part_vals = __this__part_vals; - } - this.deleteData = other.deleteData; - if (other.isSetEnvironment_context()) { - this.environment_context = new EnvironmentContext(other.environment_context); - } - } - - public drop_partition_with_environment_context_args deepCopy() { - return new drop_partition_with_environment_context_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - setDeleteDataIsSet(false); - this.deleteData = false; - this.environment_context = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); - } - - public EnvironmentContext getEnvironment_context() { - return this.environment_context; - } - - public void setEnvironment_context(EnvironmentContext environment_context) { - this.environment_context = environment_context; - } - - public void unsetEnvironment_context() { - this.environment_context = null; - } - - /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironment_context() { - return this.environment_context != null; - } - - public void setEnvironment_contextIsSet(boolean value) { - if (!value) { - this.environment_context = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case DELETE_DATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironment_context(); - } else { - setEnvironment_context((EnvironmentContext)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case DELETE_DATA: - return isDeleteData(); - - case ENVIRONMENT_CONTEXT: - return getEnvironment_context(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case DELETE_DATA: - return isSetDeleteData(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironment_context(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partition_with_environment_context_args) - return this.equals((drop_partition_with_environment_context_args)that); - return false; - } - - public boolean equals(drop_partition_with_environment_context_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - boolean this_present_environment_context = true && this.isSetEnvironment_context(); - boolean that_present_environment_context = true && that.isSetEnvironment_context(); - if (this_present_environment_context || that_present_environment_context) { - if (!(this_present_environment_context && that_present_environment_context)) - return false; - if (!this.environment_context.equals(that.environment_context)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - boolean present_deleteData = true; - list.add(present_deleteData); - if (present_deleteData) - list.add(deleteData); - - boolean present_environment_context = true && (isSetEnvironment_context()); - list.add(present_environment_context); - if (present_environment_context) - list.add(environment_context); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_partition_with_environment_context_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDeleteData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironment_context()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_partition_with_environment_context_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; - if (!first) sb.append(", "); - sb.append("environment_context:"); - if (this.environment_context == null) { - sb.append("null"); - } else { - sb.append(this.environment_context); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (environment_context != null) { - environment_context.validate(); - } - } - - 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 { - // 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_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { - public drop_partition_with_environment_context_argsStandardScheme getScheme() { - return new drop_partition_with_environment_context_argsStandardScheme(); - } - } - - private static class drop_partition_with_environment_context_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_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: // PART_VALS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list908 = iprot.readListBegin(); - struct.part_vals = new ArrayList(_list908.size); - String _elem909; - for (int _i910 = 0; _i910 < _list908.size; ++_i910) - { - _elem909 = iprot.readString(); - struct.part_vals.add(_elem909); - } - 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; - case 5: // 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, drop_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.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 _iter911 : struct.part_vals) - { - oprot.writeString(_iter911); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(struct.deleteData); - 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 drop_partition_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { - public drop_partition_with_environment_context_argsTupleScheme getScheme() { - return new drop_partition_with_environment_context_argsTupleScheme(); - } - } - - private static class drop_partition_with_environment_context_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_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.isSetPart_vals()) { - optionals.set(2); - } - if (struct.isSetDeleteData()) { - optionals.set(3); - } - if (struct.isSetEnvironment_context()) { - 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 _iter912 : struct.part_vals) - { - oprot.writeString(_iter912); - } - } - } - if (struct.isSetDeleteData()) { - oprot.writeBool(struct.deleteData); - } - if (struct.isSetEnvironment_context()) { - struct.environment_context.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_with_environment_context_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 _list913 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.part_vals = new ArrayList(_list913.size); - String _elem914; - for (int _i915 = 0; _i915 < _list913.size; ++_i915) - { - _elem914 = iprot.readString(); - struct.part_vals.add(_elem914); - } - } - struct.setPart_valsIsSet(true); - } - if (incoming.get(3)) { - struct.deleteData = iprot.readBool(); - struct.setDeleteDataIsSet(true); - } - if (incoming.get(4)) { - struct.environment_context = new EnvironmentContext(); - struct.environment_context.read(iprot); - struct.setEnvironment_contextIsSet(true); - } - } - } - - } - - public static class drop_partition_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_with_environment_context_result"); - - 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 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_with_environment_context_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_partition_with_environment_context_resultTupleSchemeFactory()); - } - - private boolean success; // required - private NoSuchObjectException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_with_environment_context_result.class, metaDataMap); - } - - public drop_partition_with_environment_context_result() { - } - - public drop_partition_with_environment_context_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public drop_partition_with_environment_context_result(drop_partition_with_environment_context_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public drop_partition_with_environment_context_result deepCopy() { - return new drop_partition_with_environment_context_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partition_with_environment_context_result) - return this.equals((drop_partition_with_environment_context_result)that); - return false; - } - - public boolean equals(drop_partition_with_environment_context_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_partition_with_environment_context_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_partition_with_environment_context_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 { - // 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_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { - public drop_partition_with_environment_context_resultStandardScheme getScheme() { - return new drop_partition_with_environment_context_resultStandardScheme(); - } - } - - private static class drop_partition_with_environment_context_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_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.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_with_environment_context_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_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { - public drop_partition_with_environment_context_resultTupleScheme getScheme() { - return new drop_partition_with_environment_context_resultTupleScheme(); - } - } - - private static class drop_partition_with_environment_context_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_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); - } - 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_with_environment_context_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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_by_name_args"); - - 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 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 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 - private boolean deleteData; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_NAME((short)3, "part_name"), - DELETE_DATA((short)4, "deleteData"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_NAME - return PART_NAME; - case 4: // DELETE_DATA - return DELETE_DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_by_name_args.class, metaDataMap); - } - - public drop_partition_by_name_args() { - } - - public drop_partition_by_name_args( - String db_name, - String tbl_name, - String part_name, - boolean deleteData) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public drop_partition_by_name_args(drop_partition_by_name_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - this.deleteData = other.deleteData; - } - - public drop_partition_by_name_args deepCopy() { - return new drop_partition_by_name_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_name = null; - setDeleteDataIsSet(false); - this.deleteData = false; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; - } - - public void setPart_nameIsSet(boolean value) { - if (!value) { - this.part_name = null; - } - } - - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - case DELETE_DATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_NAME: - return getPart_name(); - - case DELETE_DATA: - return isDeleteData(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); - case DELETE_DATA: - return isSetDeleteData(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partition_by_name_args) - return this.equals((drop_partition_by_name_args)that); - return false; - } - - public boolean equals(drop_partition_by_name_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_name = true && (isSetPart_name()); - list.add(present_part_name); - if (present_part_name) - list.add(part_name); - - boolean present_deleteData = true; - list.add(present_deleteData); - if (present_deleteData) - list.add(deleteData); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_partition_by_name_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDeleteData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_partition_by_name_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - 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 { - // 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_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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_by_name_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_by_name_result.class, metaDataMap); - } - - public drop_partition_by_name_result() { - } - - public drop_partition_by_name_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public drop_partition_by_name_result(drop_partition_by_name_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public drop_partition_by_name_result deepCopy() { - return new drop_partition_by_name_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partition_by_name_result) - return this.equals((drop_partition_by_name_result)that); - return false; - } - - public boolean equals(drop_partition_by_name_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_partition_by_name_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_partition_by_name_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 { - // 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 drop_partition_by_name_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_by_name_with_environment_context_args"); - - 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 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 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 org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new drop_partition_by_name_with_environment_context_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_partition_by_name_with_environment_context_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - private String part_name; // required - private boolean deleteData; // required - private EnvironmentContext environment_context; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_NAME((short)3, "part_name"), - DELETE_DATA((short)4, "deleteData"), - ENVIRONMENT_CONTEXT((short)5, "environment_context"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_NAME - return PART_NAME; - case 4: // DELETE_DATA - return DELETE_DATA; - case 5: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_by_name_with_environment_context_args.class, metaDataMap); - } - - public drop_partition_by_name_with_environment_context_args() { - } - - public drop_partition_by_name_with_environment_context_args( - String db_name, - String tbl_name, - String part_name, - boolean deleteData, - EnvironmentContext environment_context) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); - this.environment_context = environment_context; - } - - /** - * Performs a deep copy on other. - */ - public drop_partition_by_name_with_environment_context_args(drop_partition_by_name_with_environment_context_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - this.deleteData = other.deleteData; - if (other.isSetEnvironment_context()) { - this.environment_context = new EnvironmentContext(other.environment_context); - } - } - - public drop_partition_by_name_with_environment_context_args deepCopy() { - return new drop_partition_by_name_with_environment_context_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_name = null; - setDeleteDataIsSet(false); - this.deleteData = false; - this.environment_context = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; - } - - public void setPart_nameIsSet(boolean value) { - if (!value) { - this.part_name = null; - } - } - - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); - } - - public EnvironmentContext getEnvironment_context() { - return this.environment_context; - } - - public void setEnvironment_context(EnvironmentContext environment_context) { - this.environment_context = environment_context; - } - - public void unsetEnvironment_context() { - this.environment_context = null; - } - - /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironment_context() { - return this.environment_context != null; - } - - public void setEnvironment_contextIsSet(boolean value) { - if (!value) { - this.environment_context = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - case DELETE_DATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironment_context(); - } else { - setEnvironment_context((EnvironmentContext)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_NAME: - return getPart_name(); - - case DELETE_DATA: - return isDeleteData(); - - case ENVIRONMENT_CONTEXT: - return getEnvironment_context(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); - case DELETE_DATA: - return isSetDeleteData(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironment_context(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partition_by_name_with_environment_context_args) - return this.equals((drop_partition_by_name_with_environment_context_args)that); - return false; - } - - public boolean equals(drop_partition_by_name_with_environment_context_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - boolean this_present_environment_context = true && this.isSetEnvironment_context(); - boolean that_present_environment_context = true && that.isSetEnvironment_context(); - if (this_present_environment_context || that_present_environment_context) { - if (!(this_present_environment_context && that_present_environment_context)) - return false; - if (!this.environment_context.equals(that.environment_context)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_name = true && (isSetPart_name()); - list.add(present_part_name); - if (present_part_name) - list.add(part_name); - - boolean present_deleteData = true; - list.add(present_deleteData); - if (present_deleteData) - list.add(deleteData); - - boolean present_environment_context = true && (isSetEnvironment_context()); - list.add(present_environment_context); - if (present_environment_context) - list.add(environment_context); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_partition_by_name_with_environment_context_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDeleteData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironment_context()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_partition_by_name_with_environment_context_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; - if (!first) sb.append(", "); - sb.append("environment_context:"); - if (this.environment_context == null) { - sb.append("null"); - } else { - sb.append(this.environment_context); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (environment_context != null) { - environment_context.validate(); - } - } - - 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 { - // 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_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { - public drop_partition_by_name_with_environment_context_argsStandardScheme getScheme() { - return new drop_partition_by_name_with_environment_context_argsStandardScheme(); - } - } - - private static class drop_partition_by_name_with_environment_context_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_by_name_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: // 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; - case 5: // 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, drop_partition_by_name_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.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(); - 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 drop_partition_by_name_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { - public drop_partition_by_name_with_environment_context_argsTupleScheme getScheme() { - return new drop_partition_by_name_with_environment_context_argsTupleScheme(); - } - } - - private static class drop_partition_by_name_with_environment_context_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_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.isSetPart_name()) { - optionals.set(2); - } - if (struct.isSetDeleteData()) { - optionals.set(3); - } - if (struct.isSetEnvironment_context()) { - 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_name()) { - oprot.writeString(struct.part_name); - } - if (struct.isSetDeleteData()) { - oprot.writeBool(struct.deleteData); - } - if (struct.isSetEnvironment_context()) { - struct.environment_context.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_with_environment_context_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.part_name = iprot.readString(); - struct.setPart_nameIsSet(true); - } - if (incoming.get(3)) { - struct.deleteData = iprot.readBool(); - struct.setDeleteDataIsSet(true); - } - if (incoming.get(4)) { - struct.environment_context = new EnvironmentContext(); - struct.environment_context.read(iprot); - struct.setEnvironment_contextIsSet(true); - } - } - } - - } - - public static class drop_partition_by_name_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_by_name_with_environment_context_result"); - - 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 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_with_environment_context_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_partition_by_name_with_environment_context_resultTupleSchemeFactory()); - } - - private boolean success; // required - private NoSuchObjectException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_by_name_with_environment_context_result.class, metaDataMap); - } - - public drop_partition_by_name_with_environment_context_result() { - } - - public drop_partition_by_name_with_environment_context_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public drop_partition_by_name_with_environment_context_result(drop_partition_by_name_with_environment_context_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public drop_partition_by_name_with_environment_context_result deepCopy() { - return new drop_partition_by_name_with_environment_context_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partition_by_name_with_environment_context_result) - return this.equals((drop_partition_by_name_with_environment_context_result)that); - return false; - } - - public boolean equals(drop_partition_by_name_with_environment_context_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_partition_by_name_with_environment_context_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_partition_by_name_with_environment_context_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 { - // 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_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { - public drop_partition_by_name_with_environment_context_resultStandardScheme getScheme() { - return new drop_partition_by_name_with_environment_context_resultStandardScheme(); - } - } - - private static class drop_partition_by_name_with_environment_context_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_by_name_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.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_with_environment_context_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_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { - public drop_partition_by_name_with_environment_context_resultTupleScheme getScheme() { - return new drop_partition_by_name_with_environment_context_resultTupleScheme(); - } - } - - private static class drop_partition_by_name_with_environment_context_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_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); - } - 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_with_environment_context_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_partitions_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partitions_req_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new drop_partitions_req_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_partitions_req_argsTupleSchemeFactory()); - } - - private DropPartitionsRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DropPartitionsRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partitions_req_args.class, metaDataMap); - } - - public drop_partitions_req_args() { - } - - public drop_partitions_req_args( - DropPartitionsRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public drop_partitions_req_args(drop_partitions_req_args other) { - if (other.isSetReq()) { - this.req = new DropPartitionsRequest(other.req); - } - } - - public drop_partitions_req_args deepCopy() { - return new drop_partitions_req_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public DropPartitionsRequest getReq() { - return this.req; - } - - public void setReq(DropPartitionsRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((DropPartitionsRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partitions_req_args) - return this.equals((drop_partitions_req_args)that); - return false; - } - - public boolean equals(drop_partitions_req_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_partitions_req_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_partitions_req_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 drop_partitions_req_argsStandardSchemeFactory implements SchemeFactory { - public drop_partitions_req_argsStandardScheme getScheme() { - return new drop_partitions_req_argsStandardScheme(); - } - } - - private static class drop_partitions_req_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partitions_req_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new DropPartitionsRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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_partitions_req_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class drop_partitions_req_argsTupleSchemeFactory implements SchemeFactory { - public drop_partitions_req_argsTupleScheme getScheme() { - return new drop_partitions_req_argsTupleScheme(); - } - } - - private static class drop_partitions_req_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_partitions_req_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, drop_partitions_req_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new DropPartitionsRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class drop_partitions_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partitions_req_result"); - - 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 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_partitions_req_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_partitions_req_resultTupleSchemeFactory()); - } - - private DropPartitionsResult success; // required - private NoSuchObjectException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DropPartitionsResult.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partitions_req_result.class, metaDataMap); - } - - public drop_partitions_req_result() { - } - - public drop_partitions_req_result( - DropPartitionsResult success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public drop_partitions_req_result(drop_partitions_req_result other) { - if (other.isSetSuccess()) { - this.success = new DropPartitionsResult(other.success); - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public drop_partitions_req_result deepCopy() { - return new drop_partitions_req_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public DropPartitionsResult getSuccess() { - return this.success; - } - - public void setSuccess(DropPartitionsResult success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((DropPartitionsResult)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_partitions_req_result) - return this.equals((drop_partitions_req_result)that); - return false; - } - - public boolean equals(drop_partitions_req_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_partitions_req_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_partitions_req_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 drop_partitions_req_resultStandardSchemeFactory implements SchemeFactory { - public drop_partitions_req_resultStandardScheme getScheme() { - return new drop_partitions_req_resultStandardScheme(); - } - } - - private static class drop_partitions_req_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partitions_req_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 DropPartitionsResult(); - 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, drop_partitions_req_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 drop_partitions_req_resultTupleSchemeFactory implements SchemeFactory { - public drop_partitions_req_resultTupleScheme getScheme() { - return new drop_partitions_req_resultTupleScheme(); - } - } - - private static class drop_partitions_req_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_partitions_req_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, drop_partitions_req_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new DropPartitionsResult(); - 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 get_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_args.class, metaDataMap); - } - - public get_partition_args() { - } - - public get_partition_args( - String db_name, - String tbl_name, - List part_vals) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_args(get_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(other.part_vals); - this.part_vals = __this__part_vals; - } - } - - public get_partition_args deepCopy() { - return new get_partition_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_args) - return this.equals((get_partition_args)that); - return false; - } - - public boolean equals(get_partition_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partition_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partition_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - 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 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 _list916 = iprot.readListBegin(); - struct.part_vals = new ArrayList(_list916.size); - String _elem917; - for (int _i918 = 0; _i918 < _list916.size; ++_i918) - { - _elem917 = iprot.readString(); - struct.part_vals.add(_elem917); - } - 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 _iter919 : struct.part_vals) - { - oprot.writeString(_iter919); - } - 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 _iter920 : struct.part_vals) - { - oprot.writeString(_iter920); - } - } - } - } - - @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 _list921 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.part_vals = new ArrayList(_list921.size); - String _elem922; - for (int _i923 = 0; _i923 < _list921.size; ++_i923) - { - _elem922 = iprot.readString(); - struct.part_vals.add(_elem922); - } - } - struct.setPart_valsIsSet(true); - } - } - } - - } - - public static class get_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_result.class, metaDataMap); - } - - public get_partition_result() { - } - - public get_partition_result( - Partition success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_result(get_partition_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_partition_result deepCopy() { - return new get_partition_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_result) - return this.equals((get_partition_result)that); - return false; - } - - public boolean equals(get_partition_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partition_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partition_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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 exchange_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exchange_partition_args"); - - private static final org.apache.thrift.protocol.TField PARTITION_SPECS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionSpecs", org.apache.thrift.protocol.TType.MAP, (short)1); - private static final org.apache.thrift.protocol.TField SOURCE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("source_db", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField SOURCE_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("source_table_name", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField DEST_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("dest_db", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField DEST_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dest_table_name", org.apache.thrift.protocol.TType.STRING, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new exchange_partition_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new exchange_partition_argsTupleSchemeFactory()); - } - - private Map partitionSpecs; // required - private String source_db; // required - private String source_table_name; // required - private String dest_db; // required - private String dest_table_name; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PARTITION_SPECS((short)1, "partitionSpecs"), - SOURCE_DB((short)2, "source_db"), - SOURCE_TABLE_NAME((short)3, "source_table_name"), - DEST_DB((short)4, "dest_db"), - DEST_TABLE_NAME((short)5, "dest_table_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PARTITION_SPECS - return PARTITION_SPECS; - case 2: // SOURCE_DB - return SOURCE_DB; - case 3: // SOURCE_TABLE_NAME - return SOURCE_TABLE_NAME; - case 4: // DEST_DB - return DEST_DB; - case 5: // DEST_TABLE_NAME - return DEST_TABLE_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PARTITION_SPECS, new org.apache.thrift.meta_data.FieldMetaData("partitionSpecs", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.SOURCE_DB, new org.apache.thrift.meta_data.FieldMetaData("source_db", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SOURCE_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("source_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DEST_DB, new org.apache.thrift.meta_data.FieldMetaData("dest_db", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DEST_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("dest_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exchange_partition_args.class, metaDataMap); - } - - public exchange_partition_args() { - } - - public exchange_partition_args( - Map partitionSpecs, - String source_db, - String source_table_name, - String dest_db, - String dest_table_name) - { - this(); - this.partitionSpecs = partitionSpecs; - this.source_db = source_db; - this.source_table_name = source_table_name; - this.dest_db = dest_db; - this.dest_table_name = dest_table_name; - } - - /** - * Performs a deep copy on other. - */ - public exchange_partition_args(exchange_partition_args other) { - if (other.isSetPartitionSpecs()) { - Map __this__partitionSpecs = new HashMap(other.partitionSpecs); - this.partitionSpecs = __this__partitionSpecs; - } - if (other.isSetSource_db()) { - this.source_db = other.source_db; - } - if (other.isSetSource_table_name()) { - this.source_table_name = other.source_table_name; - } - if (other.isSetDest_db()) { - this.dest_db = other.dest_db; - } - if (other.isSetDest_table_name()) { - this.dest_table_name = other.dest_table_name; - } - } - - public exchange_partition_args deepCopy() { - return new exchange_partition_args(this); - } - - @Override - public void clear() { - this.partitionSpecs = null; - this.source_db = null; - this.source_table_name = null; - this.dest_db = null; - this.dest_table_name = null; - } - - public int getPartitionSpecsSize() { - return (this.partitionSpecs == null) ? 0 : this.partitionSpecs.size(); - } - - public void putToPartitionSpecs(String key, String val) { - if (this.partitionSpecs == null) { - this.partitionSpecs = new HashMap(); - } - this.partitionSpecs.put(key, val); - } - - public Map getPartitionSpecs() { - return this.partitionSpecs; - } - - public void setPartitionSpecs(Map partitionSpecs) { - this.partitionSpecs = partitionSpecs; - } - - public void unsetPartitionSpecs() { - this.partitionSpecs = null; - } - - /** Returns true if field partitionSpecs is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitionSpecs() { - return this.partitionSpecs != null; - } - - public void setPartitionSpecsIsSet(boolean value) { - if (!value) { - this.partitionSpecs = null; - } - } - - public String getSource_db() { - return this.source_db; - } - - public void setSource_db(String source_db) { - this.source_db = source_db; - } - - public void unsetSource_db() { - this.source_db = null; - } - - /** Returns true if field source_db is set (has been assigned a value) and false otherwise */ - public boolean isSetSource_db() { - return this.source_db != null; - } - - public void setSource_dbIsSet(boolean value) { - if (!value) { - this.source_db = null; - } - } - - public String getSource_table_name() { - return this.source_table_name; - } - - public void setSource_table_name(String source_table_name) { - this.source_table_name = source_table_name; - } - - public void unsetSource_table_name() { - this.source_table_name = null; - } - - /** Returns true if field source_table_name is set (has been assigned a value) and false otherwise */ - public boolean isSetSource_table_name() { - return this.source_table_name != null; - } - - public void setSource_table_nameIsSet(boolean value) { - if (!value) { - this.source_table_name = null; - } - } - - public String getDest_db() { - return this.dest_db; - } - - public void setDest_db(String dest_db) { - this.dest_db = dest_db; - } - - public void unsetDest_db() { - this.dest_db = null; - } - - /** Returns true if field dest_db is set (has been assigned a value) and false otherwise */ - public boolean isSetDest_db() { - return this.dest_db != null; - } - - public void setDest_dbIsSet(boolean value) { - if (!value) { - this.dest_db = null; - } - } - - public String getDest_table_name() { - return this.dest_table_name; - } - - public void setDest_table_name(String dest_table_name) { - this.dest_table_name = dest_table_name; - } - - public void unsetDest_table_name() { - this.dest_table_name = null; - } - - /** Returns true if field dest_table_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDest_table_name() { - return this.dest_table_name != null; - } - - public void setDest_table_nameIsSet(boolean value) { - if (!value) { - this.dest_table_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PARTITION_SPECS: - if (value == null) { - unsetPartitionSpecs(); - } else { - setPartitionSpecs((Map)value); - } - break; - - case SOURCE_DB: - if (value == null) { - unsetSource_db(); - } else { - setSource_db((String)value); - } - break; - - case SOURCE_TABLE_NAME: - if (value == null) { - unsetSource_table_name(); - } else { - setSource_table_name((String)value); - } - break; - - case DEST_DB: - if (value == null) { - unsetDest_db(); - } else { - setDest_db((String)value); - } - break; - - case DEST_TABLE_NAME: - if (value == null) { - unsetDest_table_name(); - } else { - setDest_table_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PARTITION_SPECS: - return getPartitionSpecs(); - - case SOURCE_DB: - return getSource_db(); - - case SOURCE_TABLE_NAME: - return getSource_table_name(); - - case DEST_DB: - return getDest_db(); - - case DEST_TABLE_NAME: - return getDest_table_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PARTITION_SPECS: - return isSetPartitionSpecs(); - case SOURCE_DB: - return isSetSource_db(); - case SOURCE_TABLE_NAME: - return isSetSource_table_name(); - case DEST_DB: - return isSetDest_db(); - case DEST_TABLE_NAME: - return isSetDest_table_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof exchange_partition_args) - return this.equals((exchange_partition_args)that); - return false; - } - - public boolean equals(exchange_partition_args that) { - if (that == null) - return false; - - boolean this_present_partitionSpecs = true && this.isSetPartitionSpecs(); - boolean that_present_partitionSpecs = true && that.isSetPartitionSpecs(); - if (this_present_partitionSpecs || that_present_partitionSpecs) { - if (!(this_present_partitionSpecs && that_present_partitionSpecs)) - return false; - if (!this.partitionSpecs.equals(that.partitionSpecs)) - return false; - } - - boolean this_present_source_db = true && this.isSetSource_db(); - boolean that_present_source_db = true && that.isSetSource_db(); - if (this_present_source_db || that_present_source_db) { - if (!(this_present_source_db && that_present_source_db)) - return false; - if (!this.source_db.equals(that.source_db)) - return false; - } - - boolean this_present_source_table_name = true && this.isSetSource_table_name(); - boolean that_present_source_table_name = true && that.isSetSource_table_name(); - if (this_present_source_table_name || that_present_source_table_name) { - if (!(this_present_source_table_name && that_present_source_table_name)) - return false; - if (!this.source_table_name.equals(that.source_table_name)) - return false; - } - - boolean this_present_dest_db = true && this.isSetDest_db(); - boolean that_present_dest_db = true && that.isSetDest_db(); - if (this_present_dest_db || that_present_dest_db) { - if (!(this_present_dest_db && that_present_dest_db)) - return false; - if (!this.dest_db.equals(that.dest_db)) - return false; - } - - boolean this_present_dest_table_name = true && this.isSetDest_table_name(); - boolean that_present_dest_table_name = true && that.isSetDest_table_name(); - if (this_present_dest_table_name || that_present_dest_table_name) { - if (!(this_present_dest_table_name && that_present_dest_table_name)) - return false; - if (!this.dest_table_name.equals(that.dest_table_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_partitionSpecs = true && (isSetPartitionSpecs()); - list.add(present_partitionSpecs); - if (present_partitionSpecs) - list.add(partitionSpecs); - - boolean present_source_db = true && (isSetSource_db()); - list.add(present_source_db); - if (present_source_db) - list.add(source_db); - - boolean present_source_table_name = true && (isSetSource_table_name()); - list.add(present_source_table_name); - if (present_source_table_name) - list.add(source_table_name); - - boolean present_dest_db = true && (isSetDest_db()); - list.add(present_dest_db); - if (present_dest_db) - list.add(dest_db); - - boolean present_dest_table_name = true && (isSetDest_table_name()); - list.add(present_dest_table_name); - if (present_dest_table_name) - list.add(dest_table_name); - - return list.hashCode(); - } - - @Override - public int compareTo(exchange_partition_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPartitionSpecs()).compareTo(other.isSetPartitionSpecs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitionSpecs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionSpecs, other.partitionSpecs); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSource_db()).compareTo(other.isSetSource_db()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSource_db()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_db, other.source_db); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSource_table_name()).compareTo(other.isSetSource_table_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSource_table_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_table_name, other.source_table_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDest_db()).compareTo(other.isSetDest_db()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDest_db()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_db, other.dest_db); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDest_table_name()).compareTo(other.isSetDest_table_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDest_table_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_table_name, other.dest_table_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("exchange_partition_args("); - boolean first = true; - - sb.append("partitionSpecs:"); - if (this.partitionSpecs == null) { - sb.append("null"); - } else { - sb.append(this.partitionSpecs); - } - first = false; - if (!first) sb.append(", "); - sb.append("source_db:"); - if (this.source_db == null) { - sb.append("null"); - } else { - sb.append(this.source_db); - } - first = false; - if (!first) sb.append(", "); - sb.append("source_table_name:"); - if (this.source_table_name == null) { - sb.append("null"); - } else { - sb.append(this.source_table_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("dest_db:"); - if (this.dest_db == null) { - sb.append("null"); - } else { - sb.append(this.dest_db); - } - first = false; - if (!first) sb.append(", "); - sb.append("dest_table_name:"); - if (this.dest_table_name == null) { - sb.append("null"); - } else { - sb.append(this.dest_table_name); - } - 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 exchange_partition_argsStandardSchemeFactory implements SchemeFactory { - public exchange_partition_argsStandardScheme getScheme() { - return new exchange_partition_argsStandardScheme(); - } - } - - private static class exchange_partition_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, exchange_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: // PARTITION_SPECS - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map924 = iprot.readMapBegin(); - struct.partitionSpecs = new HashMap(2*_map924.size); - String _key925; - String _val926; - for (int _i927 = 0; _i927 < _map924.size; ++_i927) - { - _key925 = iprot.readString(); - _val926 = iprot.readString(); - struct.partitionSpecs.put(_key925, _val926); - } - iprot.readMapEnd(); - } - struct.setPartitionSpecsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SOURCE_DB - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.source_db = iprot.readString(); - struct.setSource_dbIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // SOURCE_TABLE_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.source_table_name = iprot.readString(); - struct.setSource_table_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // DEST_DB - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.dest_db = iprot.readString(); - struct.setDest_dbIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // DEST_TABLE_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.dest_table_name = iprot.readString(); - struct.setDest_table_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, exchange_partition_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.partitionSpecs != null) { - oprot.writeFieldBegin(PARTITION_SPECS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.partitionSpecs.size())); - for (Map.Entry _iter928 : struct.partitionSpecs.entrySet()) - { - oprot.writeString(_iter928.getKey()); - oprot.writeString(_iter928.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.source_db != null) { - oprot.writeFieldBegin(SOURCE_DB_FIELD_DESC); - oprot.writeString(struct.source_db); - oprot.writeFieldEnd(); - } - if (struct.source_table_name != null) { - oprot.writeFieldBegin(SOURCE_TABLE_NAME_FIELD_DESC); - oprot.writeString(struct.source_table_name); - oprot.writeFieldEnd(); - } - if (struct.dest_db != null) { - oprot.writeFieldBegin(DEST_DB_FIELD_DESC); - oprot.writeString(struct.dest_db); - oprot.writeFieldEnd(); - } - if (struct.dest_table_name != null) { - oprot.writeFieldBegin(DEST_TABLE_NAME_FIELD_DESC); - oprot.writeString(struct.dest_table_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class exchange_partition_argsTupleSchemeFactory implements SchemeFactory { - public exchange_partition_argsTupleScheme getScheme() { - return new exchange_partition_argsTupleScheme(); - } - } - - private static class exchange_partition_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, exchange_partition_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPartitionSpecs()) { - optionals.set(0); - } - if (struct.isSetSource_db()) { - optionals.set(1); - } - if (struct.isSetSource_table_name()) { - optionals.set(2); - } - if (struct.isSetDest_db()) { - optionals.set(3); - } - if (struct.isSetDest_table_name()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetPartitionSpecs()) { - { - oprot.writeI32(struct.partitionSpecs.size()); - for (Map.Entry _iter929 : struct.partitionSpecs.entrySet()) - { - oprot.writeString(_iter929.getKey()); - oprot.writeString(_iter929.getValue()); - } - } - } - if (struct.isSetSource_db()) { - oprot.writeString(struct.source_db); - } - if (struct.isSetSource_table_name()) { - oprot.writeString(struct.source_table_name); - } - if (struct.isSetDest_db()) { - oprot.writeString(struct.dest_db); - } - if (struct.isSetDest_table_name()) { - oprot.writeString(struct.dest_table_name); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, exchange_partition_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TMap _map930 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.partitionSpecs = new HashMap(2*_map930.size); - String _key931; - String _val932; - for (int _i933 = 0; _i933 < _map930.size; ++_i933) - { - _key931 = iprot.readString(); - _val932 = iprot.readString(); - struct.partitionSpecs.put(_key931, _val932); - } - } - struct.setPartitionSpecsIsSet(true); - } - if (incoming.get(1)) { - struct.source_db = iprot.readString(); - struct.setSource_dbIsSet(true); - } - if (incoming.get(2)) { - struct.source_table_name = iprot.readString(); - struct.setSource_table_nameIsSet(true); - } - if (incoming.get(3)) { - struct.dest_db = iprot.readString(); - struct.setDest_dbIsSet(true); - } - if (incoming.get(4)) { - struct.dest_table_name = iprot.readString(); - struct.setDest_table_nameIsSet(true); - } - } - } - - } - - public static class exchange_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exchange_partition_result"); - - 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 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 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 exchange_partition_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new exchange_partition_resultTupleSchemeFactory()); - } - - private Partition success; // required - private MetaException o1; // required - private NoSuchObjectException o2; // required - private InvalidObjectException o3; // required - private InvalidInputException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exchange_partition_result.class, metaDataMap); - } - - public exchange_partition_result() { - } - - public exchange_partition_result( - Partition success, - MetaException o1, - NoSuchObjectException o2, - InvalidObjectException o3, - InvalidInputException o4) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public exchange_partition_result(exchange_partition_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new InvalidObjectException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new InvalidInputException(other.o4); - } - } - - public exchange_partition_result deepCopy() { - return new exchange_partition_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public InvalidObjectException getO3() { - return this.o3; - } - - public void setO3(InvalidObjectException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public InvalidInputException getO4() { - return this.o4; - } - - public void setO4(InvalidInputException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((InvalidObjectException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((InvalidInputException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof exchange_partition_result) - return this.equals((exchange_partition_result)that); - return false; - } - - public boolean equals(exchange_partition_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(exchange_partition_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("exchange_partition_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 exchange_partition_resultStandardSchemeFactory implements SchemeFactory { - public exchange_partition_resultStandardScheme getScheme() { - return new exchange_partition_resultStandardScheme(); - } - } - - private static class exchange_partition_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, exchange_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; - case 3: // O3 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.o3 = new InvalidObjectException(); - 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 InvalidInputException(); - 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, exchange_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(); - } - if (struct.o4 != null) { - oprot.writeFieldBegin(O4_FIELD_DESC); - struct.o4.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class exchange_partition_resultTupleSchemeFactory implements SchemeFactory { - public exchange_partition_resultTupleScheme getScheme() { - return new exchange_partition_resultTupleScheme(); - } - } - - private static class exchange_partition_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, exchange_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); - } - if (struct.isSetO4()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - 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); - } - if (struct.isSetO4()) { - struct.o4.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, exchange_partition_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - 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); - } - if (incoming.get(3)) { - struct.o3 = new InvalidObjectException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } - if (incoming.get(4)) { - struct.o4 = new InvalidInputException(); - struct.o4.read(iprot); - struct.setO4IsSet(true); - } - } - } - - } - - public static class exchange_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exchange_partitions_args"); - - private static final org.apache.thrift.protocol.TField PARTITION_SPECS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionSpecs", org.apache.thrift.protocol.TType.MAP, (short)1); - private static final org.apache.thrift.protocol.TField SOURCE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("source_db", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField SOURCE_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("source_table_name", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField DEST_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("dest_db", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField DEST_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dest_table_name", org.apache.thrift.protocol.TType.STRING, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new exchange_partitions_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new exchange_partitions_argsTupleSchemeFactory()); - } - - private Map partitionSpecs; // required - private String source_db; // required - private String source_table_name; // required - private String dest_db; // required - private String dest_table_name; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PARTITION_SPECS((short)1, "partitionSpecs"), - SOURCE_DB((short)2, "source_db"), - SOURCE_TABLE_NAME((short)3, "source_table_name"), - DEST_DB((short)4, "dest_db"), - DEST_TABLE_NAME((short)5, "dest_table_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PARTITION_SPECS - return PARTITION_SPECS; - case 2: // SOURCE_DB - return SOURCE_DB; - case 3: // SOURCE_TABLE_NAME - return SOURCE_TABLE_NAME; - case 4: // DEST_DB - return DEST_DB; - case 5: // DEST_TABLE_NAME - return DEST_TABLE_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PARTITION_SPECS, new org.apache.thrift.meta_data.FieldMetaData("partitionSpecs", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.SOURCE_DB, new org.apache.thrift.meta_data.FieldMetaData("source_db", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SOURCE_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("source_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DEST_DB, new org.apache.thrift.meta_data.FieldMetaData("dest_db", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DEST_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("dest_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exchange_partitions_args.class, metaDataMap); - } - - public exchange_partitions_args() { - } - - public exchange_partitions_args( - Map partitionSpecs, - String source_db, - String source_table_name, - String dest_db, - String dest_table_name) - { - this(); - this.partitionSpecs = partitionSpecs; - this.source_db = source_db; - this.source_table_name = source_table_name; - this.dest_db = dest_db; - this.dest_table_name = dest_table_name; - } - - /** - * Performs a deep copy on other. - */ - public exchange_partitions_args(exchange_partitions_args other) { - if (other.isSetPartitionSpecs()) { - Map __this__partitionSpecs = new HashMap(other.partitionSpecs); - this.partitionSpecs = __this__partitionSpecs; - } - if (other.isSetSource_db()) { - this.source_db = other.source_db; - } - if (other.isSetSource_table_name()) { - this.source_table_name = other.source_table_name; - } - if (other.isSetDest_db()) { - this.dest_db = other.dest_db; - } - if (other.isSetDest_table_name()) { - this.dest_table_name = other.dest_table_name; - } - } - - public exchange_partitions_args deepCopy() { - return new exchange_partitions_args(this); - } - - @Override - public void clear() { - this.partitionSpecs = null; - this.source_db = null; - this.source_table_name = null; - this.dest_db = null; - this.dest_table_name = null; - } - - public int getPartitionSpecsSize() { - return (this.partitionSpecs == null) ? 0 : this.partitionSpecs.size(); - } - - public void putToPartitionSpecs(String key, String val) { - if (this.partitionSpecs == null) { - this.partitionSpecs = new HashMap(); - } - this.partitionSpecs.put(key, val); - } - - public Map getPartitionSpecs() { - return this.partitionSpecs; - } - - public void setPartitionSpecs(Map partitionSpecs) { - this.partitionSpecs = partitionSpecs; - } - - public void unsetPartitionSpecs() { - this.partitionSpecs = null; - } - - /** Returns true if field partitionSpecs is set (has been assigned a value) and false otherwise */ - public boolean isSetPartitionSpecs() { - return this.partitionSpecs != null; - } - - public void setPartitionSpecsIsSet(boolean value) { - if (!value) { - this.partitionSpecs = null; - } - } - - public String getSource_db() { - return this.source_db; - } - - public void setSource_db(String source_db) { - this.source_db = source_db; - } - - public void unsetSource_db() { - this.source_db = null; - } - - /** Returns true if field source_db is set (has been assigned a value) and false otherwise */ - public boolean isSetSource_db() { - return this.source_db != null; - } - - public void setSource_dbIsSet(boolean value) { - if (!value) { - this.source_db = null; - } - } - - public String getSource_table_name() { - return this.source_table_name; - } - - public void setSource_table_name(String source_table_name) { - this.source_table_name = source_table_name; - } - - public void unsetSource_table_name() { - this.source_table_name = null; - } - - /** Returns true if field source_table_name is set (has been assigned a value) and false otherwise */ - public boolean isSetSource_table_name() { - return this.source_table_name != null; - } - - public void setSource_table_nameIsSet(boolean value) { - if (!value) { - this.source_table_name = null; - } - } - - public String getDest_db() { - return this.dest_db; - } - - public void setDest_db(String dest_db) { - this.dest_db = dest_db; - } - - public void unsetDest_db() { - this.dest_db = null; - } - - /** Returns true if field dest_db is set (has been assigned a value) and false otherwise */ - public boolean isSetDest_db() { - return this.dest_db != null; - } - - public void setDest_dbIsSet(boolean value) { - if (!value) { - this.dest_db = null; - } - } - - public String getDest_table_name() { - return this.dest_table_name; - } - - public void setDest_table_name(String dest_table_name) { - this.dest_table_name = dest_table_name; - } - - public void unsetDest_table_name() { - this.dest_table_name = null; - } - - /** Returns true if field dest_table_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDest_table_name() { - return this.dest_table_name != null; - } - - public void setDest_table_nameIsSet(boolean value) { - if (!value) { - this.dest_table_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PARTITION_SPECS: - if (value == null) { - unsetPartitionSpecs(); - } else { - setPartitionSpecs((Map)value); - } - break; - - case SOURCE_DB: - if (value == null) { - unsetSource_db(); - } else { - setSource_db((String)value); - } - break; - - case SOURCE_TABLE_NAME: - if (value == null) { - unsetSource_table_name(); - } else { - setSource_table_name((String)value); - } - break; - - case DEST_DB: - if (value == null) { - unsetDest_db(); - } else { - setDest_db((String)value); - } - break; - - case DEST_TABLE_NAME: - if (value == null) { - unsetDest_table_name(); - } else { - setDest_table_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PARTITION_SPECS: - return getPartitionSpecs(); - - case SOURCE_DB: - return getSource_db(); - - case SOURCE_TABLE_NAME: - return getSource_table_name(); - - case DEST_DB: - return getDest_db(); - - case DEST_TABLE_NAME: - return getDest_table_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PARTITION_SPECS: - return isSetPartitionSpecs(); - case SOURCE_DB: - return isSetSource_db(); - case SOURCE_TABLE_NAME: - return isSetSource_table_name(); - case DEST_DB: - return isSetDest_db(); - case DEST_TABLE_NAME: - return isSetDest_table_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof exchange_partitions_args) - return this.equals((exchange_partitions_args)that); - return false; - } - - public boolean equals(exchange_partitions_args that) { - if (that == null) - return false; - - boolean this_present_partitionSpecs = true && this.isSetPartitionSpecs(); - boolean that_present_partitionSpecs = true && that.isSetPartitionSpecs(); - if (this_present_partitionSpecs || that_present_partitionSpecs) { - if (!(this_present_partitionSpecs && that_present_partitionSpecs)) - return false; - if (!this.partitionSpecs.equals(that.partitionSpecs)) - return false; - } - - boolean this_present_source_db = true && this.isSetSource_db(); - boolean that_present_source_db = true && that.isSetSource_db(); - if (this_present_source_db || that_present_source_db) { - if (!(this_present_source_db && that_present_source_db)) - return false; - if (!this.source_db.equals(that.source_db)) - return false; - } - - boolean this_present_source_table_name = true && this.isSetSource_table_name(); - boolean that_present_source_table_name = true && that.isSetSource_table_name(); - if (this_present_source_table_name || that_present_source_table_name) { - if (!(this_present_source_table_name && that_present_source_table_name)) - return false; - if (!this.source_table_name.equals(that.source_table_name)) - return false; - } - - boolean this_present_dest_db = true && this.isSetDest_db(); - boolean that_present_dest_db = true && that.isSetDest_db(); - if (this_present_dest_db || that_present_dest_db) { - if (!(this_present_dest_db && that_present_dest_db)) - return false; - if (!this.dest_db.equals(that.dest_db)) - return false; - } - - boolean this_present_dest_table_name = true && this.isSetDest_table_name(); - boolean that_present_dest_table_name = true && that.isSetDest_table_name(); - if (this_present_dest_table_name || that_present_dest_table_name) { - if (!(this_present_dest_table_name && that_present_dest_table_name)) - return false; - if (!this.dest_table_name.equals(that.dest_table_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_partitionSpecs = true && (isSetPartitionSpecs()); - list.add(present_partitionSpecs); - if (present_partitionSpecs) - list.add(partitionSpecs); - - boolean present_source_db = true && (isSetSource_db()); - list.add(present_source_db); - if (present_source_db) - list.add(source_db); - - boolean present_source_table_name = true && (isSetSource_table_name()); - list.add(present_source_table_name); - if (present_source_table_name) - list.add(source_table_name); - - boolean present_dest_db = true && (isSetDest_db()); - list.add(present_dest_db); - if (present_dest_db) - list.add(dest_db); - - boolean present_dest_table_name = true && (isSetDest_table_name()); - list.add(present_dest_table_name); - if (present_dest_table_name) - list.add(dest_table_name); - - return list.hashCode(); - } - - @Override - public int compareTo(exchange_partitions_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPartitionSpecs()).compareTo(other.isSetPartitionSpecs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPartitionSpecs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionSpecs, other.partitionSpecs); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSource_db()).compareTo(other.isSetSource_db()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSource_db()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_db, other.source_db); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSource_table_name()).compareTo(other.isSetSource_table_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSource_table_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_table_name, other.source_table_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDest_db()).compareTo(other.isSetDest_db()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDest_db()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_db, other.dest_db); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDest_table_name()).compareTo(other.isSetDest_table_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDest_table_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_table_name, other.dest_table_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("exchange_partitions_args("); - boolean first = true; - - sb.append("partitionSpecs:"); - if (this.partitionSpecs == null) { - sb.append("null"); - } else { - sb.append(this.partitionSpecs); - } - first = false; - if (!first) sb.append(", "); - sb.append("source_db:"); - if (this.source_db == null) { - sb.append("null"); - } else { - sb.append(this.source_db); - } - first = false; - if (!first) sb.append(", "); - sb.append("source_table_name:"); - if (this.source_table_name == null) { - sb.append("null"); - } else { - sb.append(this.source_table_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("dest_db:"); - if (this.dest_db == null) { - sb.append("null"); - } else { - sb.append(this.dest_db); - } - first = false; - if (!first) sb.append(", "); - sb.append("dest_table_name:"); - if (this.dest_table_name == null) { - sb.append("null"); - } else { - sb.append(this.dest_table_name); - } - 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 exchange_partitions_argsStandardSchemeFactory implements SchemeFactory { - public exchange_partitions_argsStandardScheme getScheme() { - return new exchange_partitions_argsStandardScheme(); - } - } - - private static class exchange_partitions_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, exchange_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: // PARTITION_SPECS - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map934 = iprot.readMapBegin(); - struct.partitionSpecs = new HashMap(2*_map934.size); - String _key935; - String _val936; - for (int _i937 = 0; _i937 < _map934.size; ++_i937) - { - _key935 = iprot.readString(); - _val936 = iprot.readString(); - struct.partitionSpecs.put(_key935, _val936); - } - iprot.readMapEnd(); - } - struct.setPartitionSpecsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SOURCE_DB - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.source_db = iprot.readString(); - struct.setSource_dbIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // SOURCE_TABLE_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.source_table_name = iprot.readString(); - struct.setSource_table_nameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // DEST_DB - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.dest_db = iprot.readString(); - struct.setDest_dbIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // DEST_TABLE_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.dest_table_name = iprot.readString(); - struct.setDest_table_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, exchange_partitions_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.partitionSpecs != null) { - oprot.writeFieldBegin(PARTITION_SPECS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.partitionSpecs.size())); - for (Map.Entry _iter938 : struct.partitionSpecs.entrySet()) - { - oprot.writeString(_iter938.getKey()); - oprot.writeString(_iter938.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.source_db != null) { - oprot.writeFieldBegin(SOURCE_DB_FIELD_DESC); - oprot.writeString(struct.source_db); - oprot.writeFieldEnd(); - } - if (struct.source_table_name != null) { - oprot.writeFieldBegin(SOURCE_TABLE_NAME_FIELD_DESC); - oprot.writeString(struct.source_table_name); - oprot.writeFieldEnd(); - } - if (struct.dest_db != null) { - oprot.writeFieldBegin(DEST_DB_FIELD_DESC); - oprot.writeString(struct.dest_db); - oprot.writeFieldEnd(); - } - if (struct.dest_table_name != null) { - oprot.writeFieldBegin(DEST_TABLE_NAME_FIELD_DESC); - oprot.writeString(struct.dest_table_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class exchange_partitions_argsTupleSchemeFactory implements SchemeFactory { - public exchange_partitions_argsTupleScheme getScheme() { - return new exchange_partitions_argsTupleScheme(); - } - } - - private static class exchange_partitions_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, exchange_partitions_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPartitionSpecs()) { - optionals.set(0); - } - if (struct.isSetSource_db()) { - optionals.set(1); - } - if (struct.isSetSource_table_name()) { - optionals.set(2); - } - if (struct.isSetDest_db()) { - optionals.set(3); - } - if (struct.isSetDest_table_name()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetPartitionSpecs()) { - { - oprot.writeI32(struct.partitionSpecs.size()); - for (Map.Entry _iter939 : struct.partitionSpecs.entrySet()) - { - oprot.writeString(_iter939.getKey()); - oprot.writeString(_iter939.getValue()); - } - } - } - if (struct.isSetSource_db()) { - oprot.writeString(struct.source_db); - } - if (struct.isSetSource_table_name()) { - oprot.writeString(struct.source_table_name); - } - if (struct.isSetDest_db()) { - oprot.writeString(struct.dest_db); - } - if (struct.isSetDest_table_name()) { - oprot.writeString(struct.dest_table_name); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, exchange_partitions_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TMap _map940 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.partitionSpecs = new HashMap(2*_map940.size); - String _key941; - String _val942; - for (int _i943 = 0; _i943 < _map940.size; ++_i943) - { - _key941 = iprot.readString(); - _val942 = iprot.readString(); - struct.partitionSpecs.put(_key941, _val942); - } - } - struct.setPartitionSpecsIsSet(true); - } - if (incoming.get(1)) { - struct.source_db = iprot.readString(); - struct.setSource_dbIsSet(true); - } - if (incoming.get(2)) { - struct.source_table_name = iprot.readString(); - struct.setSource_table_nameIsSet(true); - } - if (incoming.get(3)) { - struct.dest_db = iprot.readString(); - struct.setDest_dbIsSet(true); - } - if (incoming.get(4)) { - struct.dest_table_name = iprot.readString(); - struct.setDest_table_nameIsSet(true); - } - } - } - - } - - public static class exchange_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exchange_partitions_result"); - - 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 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 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 exchange_partitions_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new exchange_partitions_resultTupleSchemeFactory()); - } - - private List success; // required - private MetaException o1; // required - private NoSuchObjectException o2; // required - private InvalidObjectException o3; // required - private InvalidInputException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exchange_partitions_result.class, metaDataMap); - } - - public exchange_partitions_result() { - } - - public exchange_partitions_result( - List success, - MetaException o1, - NoSuchObjectException o2, - InvalidObjectException o3, - InvalidInputException o4) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public exchange_partitions_result(exchange_partitions_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new InvalidObjectException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new InvalidInputException(other.o4); - } - } - - public exchange_partitions_result deepCopy() { - return new exchange_partitions_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public InvalidObjectException getO3() { - return this.o3; - } - - public void setO3(InvalidObjectException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public InvalidInputException getO4() { - return this.o4; - } - - public void setO4(InvalidInputException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((InvalidObjectException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((InvalidInputException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof exchange_partitions_result) - return this.equals((exchange_partitions_result)that); - return false; - } - - public boolean equals(exchange_partitions_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(exchange_partitions_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("exchange_partitions_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - 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 exchange_partitions_resultStandardSchemeFactory implements SchemeFactory { - public exchange_partitions_resultStandardScheme getScheme() { - return new exchange_partitions_resultStandardScheme(); - } - } - - private static class exchange_partitions_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, exchange_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 _list944 = iprot.readListBegin(); - struct.success = new ArrayList(_list944.size); - Partition _elem945; - for (int _i946 = 0; _i946 < _list944.size; ++_i946) - { - _elem945 = new Partition(); - _elem945.read(iprot); - struct.success.add(_elem945); - } - 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; - case 3: // O3 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.o3 = new InvalidObjectException(); - 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 InvalidInputException(); - 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, exchange_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 _iter947 : struct.success) - { - _iter947.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(); - } - if (struct.o4 != null) { - oprot.writeFieldBegin(O4_FIELD_DESC); - struct.o4.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class exchange_partitions_resultTupleSchemeFactory implements SchemeFactory { - public exchange_partitions_resultTupleScheme getScheme() { - return new exchange_partitions_resultTupleScheme(); - } - } - - private static class exchange_partitions_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, exchange_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); - } - if (struct.isSetO4()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (Partition _iter948 : struct.success) - { - _iter948.write(oprot); - } - } - } - 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, exchange_partitions_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list949 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list949.size); - Partition _elem950; - for (int _i951 = 0; _i951 < _list949.size; ++_i951) - { - _elem950 = new Partition(); - _elem950.read(iprot); - struct.success.add(_elem950); - } - } - 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 InvalidObjectException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } - if (incoming.get(4)) { - struct.o4 = new InvalidInputException(); - struct.o4.read(iprot); - struct.setO4IsSet(true); - } - } - } - - } - - public static class get_partition_with_auth_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_with_auth_args"); - - 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 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 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 - private String user_name; // required - private List group_names; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - USER_NAME((short)4, "user_name"), - GROUP_NAMES((short)5, "group_names"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // USER_NAME - return USER_NAME; - case 5: // GROUP_NAMES - return GROUP_NAMES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_with_auth_args.class, metaDataMap); - } - - public get_partition_with_auth_args() { - } - - public get_partition_with_auth_args( - String db_name, - String tbl_name, - List part_vals, - String user_name, - List group_names) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.user_name = user_name; - this.group_names = group_names; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_with_auth_args(get_partition_with_auth_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(other.part_vals); - this.part_vals = __this__part_vals; - } - if (other.isSetUser_name()) { - this.user_name = other.user_name; - } - if (other.isSetGroup_names()) { - List __this__group_names = new ArrayList(other.group_names); - this.group_names = __this__group_names; - } - } - - public get_partition_with_auth_args deepCopy() { - return new get_partition_with_auth_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - this.user_name = null; - this.group_names = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - public String getUser_name() { - return this.user_name; - } - - public void setUser_name(String user_name) { - this.user_name = user_name; - } - - public void unsetUser_name() { - this.user_name = null; - } - - /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ - public boolean isSetUser_name() { - return this.user_name != null; - } - - public void setUser_nameIsSet(boolean value) { - if (!value) { - this.user_name = null; - } - } - - public int getGroup_namesSize() { - return (this.group_names == null) ? 0 : this.group_names.size(); - } - - public java.util.Iterator getGroup_namesIterator() { - return (this.group_names == null) ? null : this.group_names.iterator(); - } - - public void addToGroup_names(String elem) { - if (this.group_names == null) { - this.group_names = new ArrayList(); - } - this.group_names.add(elem); - } - - public List getGroup_names() { - return this.group_names; - } - - public void setGroup_names(List group_names) { - this.group_names = group_names; - } - - public void unsetGroup_names() { - this.group_names = null; - } - - /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ - public boolean isSetGroup_names() { - return this.group_names != null; - } - - public void setGroup_namesIsSet(boolean value) { - if (!value) { - this.group_names = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case USER_NAME: - if (value == null) { - unsetUser_name(); - } else { - setUser_name((String)value); - } - break; - - case GROUP_NAMES: - if (value == null) { - unsetGroup_names(); - } else { - setGroup_names((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case USER_NAME: - return getUser_name(); - - case GROUP_NAMES: - return getGroup_names(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case USER_NAME: - return isSetUser_name(); - case GROUP_NAMES: - return isSetGroup_names(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_with_auth_args) - return this.equals((get_partition_with_auth_args)that); - return false; - } - - public boolean equals(get_partition_with_auth_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_user_name = true && this.isSetUser_name(); - boolean that_present_user_name = true && that.isSetUser_name(); - if (this_present_user_name || that_present_user_name) { - if (!(this_present_user_name && that_present_user_name)) - return false; - if (!this.user_name.equals(that.user_name)) - return false; - } - - boolean this_present_group_names = true && this.isSetGroup_names(); - boolean that_present_group_names = true && that.isSetGroup_names(); - if (this_present_group_names || that_present_group_names) { - if (!(this_present_group_names && that_present_group_names)) - return false; - if (!this.group_names.equals(that.group_names)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - boolean present_user_name = true && (isSetUser_name()); - list.add(present_user_name); - if (present_user_name) - list.add(user_name); - - boolean present_group_names = true && (isSetGroup_names()); - list.add(present_group_names); - if (present_group_names) - list.add(group_names); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partition_with_auth_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUser_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGroup_names()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.group_names); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partition_with_auth_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("user_name:"); - if (this.user_name == null) { - sb.append("null"); - } else { - sb.append(this.user_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("group_names:"); - if (this.group_names == null) { - sb.append("null"); - } else { - sb.append(this.group_names); - } - 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 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 _list952 = iprot.readListBegin(); - struct.part_vals = new ArrayList(_list952.size); - String _elem953; - for (int _i954 = 0; _i954 < _list952.size; ++_i954) - { - _elem953 = iprot.readString(); - struct.part_vals.add(_elem953); - } - 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 _list955 = iprot.readListBegin(); - struct.group_names = new ArrayList(_list955.size); - String _elem956; - for (int _i957 = 0; _i957 < _list955.size; ++_i957) - { - _elem956 = iprot.readString(); - struct.group_names.add(_elem956); - } - 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 _iter958 : struct.part_vals) - { - oprot.writeString(_iter958); - } - 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 _iter959 : struct.group_names) - { - oprot.writeString(_iter959); - } - 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 _iter960 : struct.part_vals) - { - oprot.writeString(_iter960); - } - } - } - if (struct.isSetUser_name()) { - oprot.writeString(struct.user_name); - } - if (struct.isSetGroup_names()) { - { - oprot.writeI32(struct.group_names.size()); - for (String _iter961 : struct.group_names) - { - oprot.writeString(_iter961); - } - } - } - } - - @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 _list962 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.part_vals = new ArrayList(_list962.size); - String _elem963; - for (int _i964 = 0; _i964 < _list962.size; ++_i964) - { - _elem963 = iprot.readString(); - struct.part_vals.add(_elem963); - } - } - 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 _list965 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.group_names = new ArrayList(_list965.size); - String _elem966; - for (int _i967 = 0; _i967 < _list965.size; ++_i967) - { - _elem966 = iprot.readString(); - struct.group_names.add(_elem966); - } - } - struct.setGroup_namesIsSet(true); - } - } - } - - } - - public static class get_partition_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_with_auth_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_with_auth_result.class, metaDataMap); - } - - public get_partition_with_auth_result() { - } - - public get_partition_with_auth_result( - Partition success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_with_auth_result(get_partition_with_auth_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_partition_with_auth_result deepCopy() { - return new get_partition_with_auth_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_with_auth_result) - return this.equals((get_partition_with_auth_result)that); - return false; - } - - public boolean equals(get_partition_with_auth_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partition_with_auth_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partition_with_auth_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_by_name_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_NAME((short)3, "part_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_NAME - return PART_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_by_name_args.class, metaDataMap); - } - - public get_partition_by_name_args() { - } - - public get_partition_by_name_args( - String db_name, - String tbl_name, - String part_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_by_name_args(get_partition_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - } - - public get_partition_by_name_args deepCopy() { - return new get_partition_by_name_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; - } - - public void setPart_nameIsSet(boolean value) { - if (!value) { - this.part_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_NAME: - return getPart_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_by_name_args) - return this.equals((get_partition_by_name_args)that); - return false; - } - - public boolean equals(get_partition_by_name_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_name = true && (isSetPart_name()); - list.add(present_part_name); - if (present_part_name) - list.add(part_name); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partition_by_name_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partition_by_name_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_by_name_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_by_name_result.class, metaDataMap); - } - - public get_partition_by_name_result() { - } - - public get_partition_by_name_result( - Partition success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_by_name_result(get_partition_by_name_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_partition_by_name_result deepCopy() { - return new get_partition_by_name_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_by_name_result) - return this.equals((get_partition_by_name_result)that); - return false; - } - - public boolean equals(get_partition_by_name_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partition_by_name_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partition_by_name_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - MAX_PARTS((short)3, "max_parts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // MAX_PARTS - return MAX_PARTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_args.class, metaDataMap); - } - - public get_partitions_args() { - this.max_parts = (short)-1; - - } - - public get_partitions_args( - String db_name, - String tbl_name, - short max_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_args(get_partitions_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - this.max_parts = other.max_parts; - } - - public get_partitions_args deepCopy() { - return new get_partitions_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_parts = (short)-1; - - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public short getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - public void unsetMax_parts() { - __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); - } - - public void setMax_partsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Short)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case MAX_PARTS: - return getMax_parts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_PARTS: - return isSetMax_parts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_args) - return this.equals((get_partitions_args)that); - return false; - } - - public boolean equals(get_partitions_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_max_parts = true; - list.add(present_max_parts); - if (present_max_parts) - list.add(max_parts); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - 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 { - // 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_result.class, metaDataMap); - } - - public get_partitions_result() { - } - - public get_partitions_result( - List success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_result(get_partitions_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_partitions_result deepCopy() { - return new get_partitions_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_result) - return this.equals((get_partitions_result)that); - return false; - } - - public boolean equals(get_partitions_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 _list968 = iprot.readListBegin(); - struct.success = new ArrayList(_list968.size); - Partition _elem969; - for (int _i970 = 0; _i970 < _list968.size; ++_i970) - { - _elem969 = new Partition(); - _elem969.read(iprot); - struct.success.add(_elem969); - } - 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 _iter971 : struct.success) - { - _iter971.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 _iter972 : struct.success) - { - _iter972.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 _list973 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list973.size); - Partition _elem974; - for (int _i975 = 0; _i975 < _list973.size; ++_i975) - { - _elem974 = new Partition(); - _elem974.read(iprot); - struct.success.add(_elem974); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_with_auth_args"); - - 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 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 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 - private String user_name; // required - private List group_names; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - MAX_PARTS((short)3, "max_parts"), - USER_NAME((short)4, "user_name"), - GROUP_NAMES((short)5, "group_names"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // MAX_PARTS - return MAX_PARTS; - case 4: // USER_NAME - return USER_NAME; - case 5: // GROUP_NAMES - return GROUP_NAMES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_with_auth_args.class, metaDataMap); - } - - public get_partitions_with_auth_args() { - this.max_parts = (short)-1; - - } - - public get_partitions_with_auth_args( - String db_name, - String tbl_name, - short max_parts, - String user_name, - List group_names) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - setMax_partsIsSet(true); - this.user_name = user_name; - this.group_names = group_names; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_with_auth_args(get_partitions_with_auth_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - this.max_parts = other.max_parts; - if (other.isSetUser_name()) { - this.user_name = other.user_name; - } - if (other.isSetGroup_names()) { - List __this__group_names = new ArrayList(other.group_names); - this.group_names = __this__group_names; - } - } - - public get_partitions_with_auth_args deepCopy() { - return new get_partitions_with_auth_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_parts = (short)-1; - - this.user_name = null; - this.group_names = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public short getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - public void unsetMax_parts() { - __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); - } - - public void setMax_partsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); - } - - public String getUser_name() { - return this.user_name; - } - - public void setUser_name(String user_name) { - this.user_name = user_name; - } - - public void unsetUser_name() { - this.user_name = null; - } - - /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ - public boolean isSetUser_name() { - return this.user_name != null; - } - - public void setUser_nameIsSet(boolean value) { - if (!value) { - this.user_name = null; - } - } - - public int getGroup_namesSize() { - return (this.group_names == null) ? 0 : this.group_names.size(); - } - - public java.util.Iterator getGroup_namesIterator() { - return (this.group_names == null) ? null : this.group_names.iterator(); - } - - public void addToGroup_names(String elem) { - if (this.group_names == null) { - this.group_names = new ArrayList(); - } - this.group_names.add(elem); - } - - public List getGroup_names() { - return this.group_names; - } - - public void setGroup_names(List group_names) { - this.group_names = group_names; - } - - public void unsetGroup_names() { - this.group_names = null; - } - - /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ - public boolean isSetGroup_names() { - return this.group_names != null; - } - - public void setGroup_namesIsSet(boolean value) { - if (!value) { - this.group_names = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Short)value); - } - break; - - case USER_NAME: - if (value == null) { - unsetUser_name(); - } else { - setUser_name((String)value); - } - break; - - case GROUP_NAMES: - if (value == null) { - unsetGroup_names(); - } else { - setGroup_names((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case MAX_PARTS: - return getMax_parts(); - - case USER_NAME: - return getUser_name(); - - case GROUP_NAMES: - return getGroup_names(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_PARTS: - return isSetMax_parts(); - case USER_NAME: - return isSetUser_name(); - case GROUP_NAMES: - return isSetGroup_names(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_with_auth_args) - return this.equals((get_partitions_with_auth_args)that); - return false; - } - - public boolean equals(get_partitions_with_auth_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - boolean this_present_user_name = true && this.isSetUser_name(); - boolean that_present_user_name = true && that.isSetUser_name(); - if (this_present_user_name || that_present_user_name) { - if (!(this_present_user_name && that_present_user_name)) - return false; - if (!this.user_name.equals(that.user_name)) - return false; - } - - boolean this_present_group_names = true && this.isSetGroup_names(); - boolean that_present_group_names = true && that.isSetGroup_names(); - if (this_present_group_names || that_present_group_names) { - if (!(this_present_group_names && that_present_group_names)) - return false; - if (!this.group_names.equals(that.group_names)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_max_parts = true; - list.add(present_max_parts); - if (present_max_parts) - list.add(max_parts); - - boolean present_user_name = true && (isSetUser_name()); - list.add(present_user_name); - if (present_user_name) - list.add(user_name); - - boolean present_group_names = true && (isSetGroup_names()); - list.add(present_group_names); - if (present_group_names) - list.add(group_names); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_with_auth_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUser_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGroup_names()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.group_names); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_with_auth_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; - if (!first) sb.append(", "); - sb.append("user_name:"); - if (this.user_name == null) { - sb.append("null"); - } else { - sb.append(this.user_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("group_names:"); - if (this.group_names == null) { - sb.append("null"); - } else { - sb.append(this.group_names); - } - 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 { - // 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 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 _list976 = iprot.readListBegin(); - struct.group_names = new ArrayList(_list976.size); - String _elem977; - for (int _i978 = 0; _i978 < _list976.size; ++_i978) - { - _elem977 = iprot.readString(); - struct.group_names.add(_elem977); - } - 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 _iter979 : struct.group_names) - { - oprot.writeString(_iter979); - } - 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 _iter980 : struct.group_names) - { - oprot.writeString(_iter980); - } - } - } - } - - @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 _list981 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.group_names = new ArrayList(_list981.size); - String _elem982; - for (int _i983 = 0; _i983 < _list981.size; ++_i983) - { - _elem982 = iprot.readString(); - struct.group_names.add(_elem982); - } - } - struct.setGroup_namesIsSet(true); - } - } - } - - } - - public static class get_partitions_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_with_auth_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_with_auth_result.class, metaDataMap); - } - - public get_partitions_with_auth_result() { - } - - public get_partitions_with_auth_result( - List success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_with_auth_result(get_partitions_with_auth_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_partitions_with_auth_result deepCopy() { - return new get_partitions_with_auth_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_with_auth_result) - return this.equals((get_partitions_with_auth_result)that); - return false; - } - - public boolean equals(get_partitions_with_auth_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_with_auth_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_with_auth_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 _list984 = iprot.readListBegin(); - struct.success = new ArrayList(_list984.size); - Partition _elem985; - for (int _i986 = 0; _i986 < _list984.size; ++_i986) - { - _elem985 = new Partition(); - _elem985.read(iprot); - struct.success.add(_elem985); - } - 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 _iter987 : struct.success) - { - _iter987.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 _iter988 : struct.success) - { - _iter988.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 _list989 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list989.size); - Partition _elem990; - for (int _i991 = 0; _i991 < _list989.size; ++_i991) - { - _elem990 = new Partition(); - _elem990.read(iprot); - struct.success.add(_elem990); - } - } - 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_pspec_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_pspec_args"); - - 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 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.I32, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_partitions_pspec_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_partitions_pspec_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - private int max_parts; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - MAX_PARTS((short)3, "max_parts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // MAX_PARTS - return MAX_PARTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_pspec_args.class, metaDataMap); - } - - public get_partitions_pspec_args() { - this.max_parts = -1; - - } - - public get_partitions_pspec_args( - String db_name, - String tbl_name, - int max_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_pspec_args(get_partitions_pspec_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - this.max_parts = other.max_parts; - } - - public get_partitions_pspec_args deepCopy() { - return new get_partitions_pspec_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_parts = -1; - - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(int max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - public void unsetMax_parts() { - __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); - } - - public void setMax_partsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case MAX_PARTS: - return getMax_parts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_PARTS: - return isSetMax_parts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_pspec_args) - return this.equals((get_partitions_pspec_args)that); - return false; - } - - public boolean equals(get_partitions_pspec_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_max_parts = true; - list.add(present_max_parts); - if (present_max_parts) - list.add(max_parts); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_pspec_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_pspec_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - 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 { - // 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 get_partitions_pspec_argsStandardSchemeFactory implements SchemeFactory { - public get_partitions_pspec_argsStandardScheme getScheme() { - return new get_partitions_pspec_argsStandardScheme(); - } - } - - private static class get_partitions_pspec_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_pspec_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.I32) { - struct.max_parts = iprot.readI32(); - 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_pspec_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.writeI32(struct.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_partitions_pspec_argsTupleSchemeFactory implements SchemeFactory { - public get_partitions_pspec_argsTupleScheme getScheme() { - return new get_partitions_pspec_argsTupleScheme(); - } - } - - private static class get_partitions_pspec_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_pspec_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.writeI32(struct.max_parts); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_pspec_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.readI32(); - struct.setMax_partsIsSet(true); - } - } - } - - } - - public static class get_partitions_pspec_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_pspec_result"); - - 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 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_pspec_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_partitions_pspec_resultTupleSchemeFactory()); - } - - private List success; // required - private NoSuchObjectException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionSpec.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_pspec_result.class, metaDataMap); - } - - public get_partitions_pspec_result() { - } - - public get_partitions_pspec_result( - List success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_pspec_result(get_partitions_pspec_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (PartitionSpec other_element : other.success) { - __this__success.add(new PartitionSpec(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_partitions_pspec_result deepCopy() { - return new get_partitions_pspec_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(PartitionSpec elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_pspec_result) - return this.equals((get_partitions_pspec_result)that); - return false; - } - - public boolean equals(get_partitions_pspec_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_pspec_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_pspec_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 get_partitions_pspec_resultStandardSchemeFactory implements SchemeFactory { - public get_partitions_pspec_resultStandardScheme getScheme() { - return new get_partitions_pspec_resultStandardScheme(); - } - } - - private static class get_partitions_pspec_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_pspec_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 _list992 = iprot.readListBegin(); - struct.success = new ArrayList(_list992.size); - PartitionSpec _elem993; - for (int _i994 = 0; _i994 < _list992.size; ++_i994) - { - _elem993 = new PartitionSpec(); - _elem993.read(iprot); - struct.success.add(_elem993); - } - 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_pspec_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 (PartitionSpec _iter995 : struct.success) - { - _iter995.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_pspec_resultTupleSchemeFactory implements SchemeFactory { - public get_partitions_pspec_resultTupleScheme getScheme() { - return new get_partitions_pspec_resultTupleScheme(); - } - } - - private static class get_partitions_pspec_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_pspec_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 (PartitionSpec _iter996 : struct.success) - { - _iter996.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_pspec_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 _list997 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list997.size); - PartitionSpec _elem998; - for (int _i999 = 0; _i999 < _list997.size; ++_i999) - { - _elem998 = new PartitionSpec(); - _elem998.read(iprot); - struct.success.add(_elem998); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - MAX_PARTS((short)3, "max_parts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // MAX_PARTS - return MAX_PARTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_names_args.class, metaDataMap); - } - - public get_partition_names_args() { - this.max_parts = (short)-1; - - } - - public get_partition_names_args( - String db_name, - String tbl_name, - short max_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public get_partition_names_args(get_partition_names_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - this.max_parts = other.max_parts; - } - - public get_partition_names_args deepCopy() { - return new get_partition_names_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_parts = (short)-1; - - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public short getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - public void unsetMax_parts() { - __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); - } - - public void setMax_partsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Short)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case MAX_PARTS: - return getMax_parts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_PARTS: - return isSetMax_parts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_names_args) - return this.equals((get_partition_names_args)that); - return false; - } - - public boolean equals(get_partition_names_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_max_parts = true; - list.add(present_max_parts); - if (present_max_parts) - list.add(max_parts); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partition_names_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partition_names_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - 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 { - // 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O2((short)1, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); - } - - public get_partition_names_result() { - } - - public get_partition_names_result( - List success, - MetaException o2) - { - this(); - this.success = success; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_names_result(get_partition_names_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_partition_names_result deepCopy() { - return new get_partition_names_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_names_result) - return this.equals((get_partition_names_result)that); - return false; - } - - public boolean equals(get_partition_names_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partition_names_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partition_names_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 _list1000 = iprot.readListBegin(); - struct.success = new ArrayList(_list1000.size); - String _elem1001; - for (int _i1002 = 0; _i1002 < _list1000.size; ++_i1002) - { - _elem1001 = iprot.readString(); - struct.success.add(_elem1001); - } - 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 _iter1003 : struct.success) - { - oprot.writeString(_iter1003); - } - 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 _iter1004 : struct.success) - { - oprot.writeString(_iter1004); - } - } - } - 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 _list1005 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list1005.size); - String _elem1006; - for (int _i1007 = 0; _i1007 < _list1005.size; ++_i1007) - { - _elem1006 = iprot.readString(); - struct.success.add(_elem1006); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_args"); - - 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 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 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 - private short max_parts; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - MAX_PARTS((short)4, "max_parts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // MAX_PARTS - return MAX_PARTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_ps_args.class, metaDataMap); - } - - public get_partitions_ps_args() { - this.max_parts = (short)-1; - - } - - public get_partitions_ps_args( - String db_name, - String tbl_name, - List part_vals, - short max_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_ps_args(get_partitions_ps_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(other.part_vals); - this.part_vals = __this__part_vals; - } - this.max_parts = other.max_parts; - } - - public get_partitions_ps_args deepCopy() { - return new get_partitions_ps_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - this.max_parts = (short)-1; - - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - public short getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - public void unsetMax_parts() { - __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); - } - - public void setMax_partsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Short)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case MAX_PARTS: - return getMax_parts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_ps_args) - return this.equals((get_partitions_ps_args)that); - return false; - } - - public boolean equals(get_partitions_ps_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - boolean present_max_parts = true; - list.add(present_max_parts); - if (present_max_parts) - list.add(max_parts); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_ps_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_ps_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - 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 { - // 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 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 _list1008 = iprot.readListBegin(); - struct.part_vals = new ArrayList(_list1008.size); - String _elem1009; - for (int _i1010 = 0; _i1010 < _list1008.size; ++_i1010) - { - _elem1009 = iprot.readString(); - struct.part_vals.add(_elem1009); - } - 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 _iter1011 : struct.part_vals) - { - oprot.writeString(_iter1011); - } - 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 _iter1012 : struct.part_vals) - { - oprot.writeString(_iter1012); - } - } - } - 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 _list1013 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.part_vals = new ArrayList(_list1013.size); - String _elem1014; - for (int _i1015 = 0; _i1015 < _list1013.size; ++_i1015) - { - _elem1014 = iprot.readString(); - struct.part_vals.add(_elem1014); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_ps_result.class, metaDataMap); - } - - public get_partitions_ps_result() { - } - - public get_partitions_ps_result( - List success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_ps_result(get_partitions_ps_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_partitions_ps_result deepCopy() { - return new get_partitions_ps_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_ps_result) - return this.equals((get_partitions_ps_result)that); - return false; - } - - public boolean equals(get_partitions_ps_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_ps_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_ps_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 _list1016 = iprot.readListBegin(); - struct.success = new ArrayList(_list1016.size); - Partition _elem1017; - for (int _i1018 = 0; _i1018 < _list1016.size; ++_i1018) - { - _elem1017 = new Partition(); - _elem1017.read(iprot); - struct.success.add(_elem1017); - } - 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 _iter1019 : struct.success) - { - _iter1019.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 _iter1020 : struct.success) - { - _iter1020.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 _list1021 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list1021.size); - Partition _elem1022; - for (int _i1023 = 0; _i1023 < _list1021.size; ++_i1023) - { - _elem1022 = new Partition(); - _elem1022.read(iprot); - struct.success.add(_elem1022); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_with_auth_args"); - - 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 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 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 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 - private short max_parts; // required - private String user_name; // required - private List group_names; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - MAX_PARTS((short)4, "max_parts"), - USER_NAME((short)5, "user_name"), - GROUP_NAMES((short)6, "group_names"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // MAX_PARTS - return MAX_PARTS; - case 5: // USER_NAME - return USER_NAME; - case 6: // GROUP_NAMES - return GROUP_NAMES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_ps_with_auth_args.class, metaDataMap); - } - - public get_partitions_ps_with_auth_args() { - this.max_parts = (short)-1; - - } - - public get_partitions_ps_with_auth_args( - String db_name, - String tbl_name, - List part_vals, - short max_parts, - String user_name, - List group_names) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; - setMax_partsIsSet(true); - this.user_name = user_name; - this.group_names = group_names; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_ps_with_auth_args(get_partitions_ps_with_auth_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(other.part_vals); - this.part_vals = __this__part_vals; - } - this.max_parts = other.max_parts; - if (other.isSetUser_name()) { - this.user_name = other.user_name; - } - if (other.isSetGroup_names()) { - List __this__group_names = new ArrayList(other.group_names); - this.group_names = __this__group_names; - } - } - - public get_partitions_ps_with_auth_args deepCopy() { - return new get_partitions_ps_with_auth_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - this.max_parts = (short)-1; - - this.user_name = null; - this.group_names = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - public short getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - public void unsetMax_parts() { - __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); - } - - public void setMax_partsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); - } - - public String getUser_name() { - return this.user_name; - } - - public void setUser_name(String user_name) { - this.user_name = user_name; - } - - public void unsetUser_name() { - this.user_name = null; - } - - /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ - public boolean isSetUser_name() { - return this.user_name != null; - } - - public void setUser_nameIsSet(boolean value) { - if (!value) { - this.user_name = null; - } - } - - public int getGroup_namesSize() { - return (this.group_names == null) ? 0 : this.group_names.size(); - } - - public java.util.Iterator getGroup_namesIterator() { - return (this.group_names == null) ? null : this.group_names.iterator(); - } - - public void addToGroup_names(String elem) { - if (this.group_names == null) { - this.group_names = new ArrayList(); - } - this.group_names.add(elem); - } - - public List getGroup_names() { - return this.group_names; - } - - public void setGroup_names(List group_names) { - this.group_names = group_names; - } - - public void unsetGroup_names() { - this.group_names = null; - } - - /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ - public boolean isSetGroup_names() { - return this.group_names != null; - } - - public void setGroup_namesIsSet(boolean value) { - if (!value) { - this.group_names = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Short)value); - } - break; - - case USER_NAME: - if (value == null) { - unsetUser_name(); - } else { - setUser_name((String)value); - } - break; - - case GROUP_NAMES: - if (value == null) { - unsetGroup_names(); - } else { - setGroup_names((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case MAX_PARTS: - return getMax_parts(); - - case USER_NAME: - return getUser_name(); - - case GROUP_NAMES: - return getGroup_names(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); - case USER_NAME: - return isSetUser_name(); - case GROUP_NAMES: - return isSetGroup_names(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_ps_with_auth_args) - return this.equals((get_partitions_ps_with_auth_args)that); - return false; - } - - public boolean equals(get_partitions_ps_with_auth_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - boolean this_present_user_name = true && this.isSetUser_name(); - boolean that_present_user_name = true && that.isSetUser_name(); - if (this_present_user_name || that_present_user_name) { - if (!(this_present_user_name && that_present_user_name)) - return false; - if (!this.user_name.equals(that.user_name)) - return false; - } - - boolean this_present_group_names = true && this.isSetGroup_names(); - boolean that_present_group_names = true && that.isSetGroup_names(); - if (this_present_group_names || that_present_group_names) { - if (!(this_present_group_names && that_present_group_names)) - return false; - if (!this.group_names.equals(that.group_names)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - boolean present_max_parts = true; - list.add(present_max_parts); - if (present_max_parts) - list.add(max_parts); - - boolean present_user_name = true && (isSetUser_name()); - list.add(present_user_name); - if (present_user_name) - list.add(user_name); - - boolean present_group_names = true && (isSetGroup_names()); - list.add(present_group_names); - if (present_group_names) - list.add(group_names); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_ps_with_auth_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUser_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGroup_names()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.group_names); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_ps_with_auth_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; - if (!first) sb.append(", "); - sb.append("user_name:"); - if (this.user_name == null) { - sb.append("null"); - } else { - sb.append(this.user_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("group_names:"); - if (this.group_names == null) { - sb.append("null"); - } else { - sb.append(this.group_names); - } - 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 { - // 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 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 _list1024 = iprot.readListBegin(); - struct.part_vals = new ArrayList(_list1024.size); - String _elem1025; - for (int _i1026 = 0; _i1026 < _list1024.size; ++_i1026) - { - _elem1025 = iprot.readString(); - struct.part_vals.add(_elem1025); - } - 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 _list1027 = iprot.readListBegin(); - struct.group_names = new ArrayList(_list1027.size); - String _elem1028; - for (int _i1029 = 0; _i1029 < _list1027.size; ++_i1029) - { - _elem1028 = iprot.readString(); - struct.group_names.add(_elem1028); - } - 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 _iter1030 : struct.part_vals) - { - oprot.writeString(_iter1030); - } - 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 _iter1031 : struct.group_names) - { - oprot.writeString(_iter1031); - } - 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 _iter1032 : struct.part_vals) - { - oprot.writeString(_iter1032); - } - } - } - 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 _iter1033 : struct.group_names) - { - oprot.writeString(_iter1033); - } - } - } - } - - @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 _list1034 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.part_vals = new ArrayList(_list1034.size); - String _elem1035; - for (int _i1036 = 0; _i1036 < _list1034.size; ++_i1036) - { - _elem1035 = iprot.readString(); - struct.part_vals.add(_elem1035); - } - } - 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 _list1037 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.group_names = new ArrayList(_list1037.size); - String _elem1038; - for (int _i1039 = 0; _i1039 < _list1037.size; ++_i1039) - { - _elem1038 = iprot.readString(); - struct.group_names.add(_elem1038); - } - } - struct.setGroup_namesIsSet(true); - } - } - } - - } - - public static class get_partitions_ps_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_with_auth_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_ps_with_auth_result.class, metaDataMap); - } - - public get_partitions_ps_with_auth_result() { - } - - public get_partitions_ps_with_auth_result( - List success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_ps_with_auth_result(get_partitions_ps_with_auth_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_partitions_ps_with_auth_result deepCopy() { - return new get_partitions_ps_with_auth_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_ps_with_auth_result) - return this.equals((get_partitions_ps_with_auth_result)that); - return false; - } - - public boolean equals(get_partitions_ps_with_auth_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_ps_with_auth_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_ps_with_auth_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 _list1040 = iprot.readListBegin(); - struct.success = new ArrayList(_list1040.size); - Partition _elem1041; - for (int _i1042 = 0; _i1042 < _list1040.size; ++_i1042) - { - _elem1041 = new Partition(); - _elem1041.read(iprot); - struct.success.add(_elem1041); - } - 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 _iter1043 : struct.success) - { - _iter1043.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 _iter1044 : struct.success) - { - _iter1044.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 _list1045 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list1045.size); - Partition _elem1046; - for (int _i1047 = 0; _i1047 < _list1045.size; ++_i1047) - { - _elem1046 = new Partition(); - _elem1046.read(iprot); - struct.success.add(_elem1046); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_ps_args"); - - 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 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 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 - private short max_parts; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - MAX_PARTS((short)4, "max_parts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // MAX_PARTS - return MAX_PARTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); - } - - public get_partition_names_ps_args() { - this.max_parts = (short)-1; - - } - - public get_partition_names_ps_args( - String db_name, - String tbl_name, - List part_vals, - short max_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public get_partition_names_ps_args(get_partition_names_ps_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(other.part_vals); - this.part_vals = __this__part_vals; - } - this.max_parts = other.max_parts; - } - - public get_partition_names_ps_args deepCopy() { - return new get_partition_names_ps_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - this.max_parts = (short)-1; - - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - public short getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - public void unsetMax_parts() { - __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); - } - - public void setMax_partsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Short)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case MAX_PARTS: - return getMax_parts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_names_ps_args) - return this.equals((get_partition_names_ps_args)that); - return false; - } - - public boolean equals(get_partition_names_ps_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - boolean present_max_parts = true; - list.add(present_max_parts); - if (present_max_parts) - list.add(max_parts); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partition_names_ps_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partition_names_ps_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - 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 { - // 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 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 _list1048 = iprot.readListBegin(); - struct.part_vals = new ArrayList(_list1048.size); - String _elem1049; - for (int _i1050 = 0; _i1050 < _list1048.size; ++_i1050) - { - _elem1049 = iprot.readString(); - struct.part_vals.add(_elem1049); - } - 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 _iter1051 : struct.part_vals) - { - oprot.writeString(_iter1051); - } - 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 _iter1052 : struct.part_vals) - { - oprot.writeString(_iter1052); - } - } - } - 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 _list1053 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.part_vals = new ArrayList(_list1053.size); - String _elem1054; - for (int _i1055 = 0; _i1055 < _list1053.size; ++_i1055) - { - _elem1054 = iprot.readString(); - struct.part_vals.add(_elem1054); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_ps_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_names_ps_result.class, metaDataMap); - } - - public get_partition_names_ps_result() { - } - - public get_partition_names_ps_result( - List success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_names_ps_result(get_partition_names_ps_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_partition_names_ps_result deepCopy() { - return new get_partition_names_ps_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_names_ps_result) - return this.equals((get_partition_names_ps_result)that); - return false; - } - - public boolean equals(get_partition_names_ps_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partition_names_ps_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partition_names_ps_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 _list1056 = iprot.readListBegin(); - struct.success = new ArrayList(_list1056.size); - String _elem1057; - for (int _i1058 = 0; _i1058 < _list1056.size; ++_i1058) - { - _elem1057 = iprot.readString(); - struct.success.add(_elem1057); - } - 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 _iter1059 : struct.success) - { - oprot.writeString(_iter1059); - } - 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 _iter1060 : struct.success) - { - oprot.writeString(_iter1060); - } - } - } - 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 _list1061 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list1061.size); - String _elem1062; - for (int _i1063 = 0; _i1063 < _list1061.size; ++_i1063) - { - _elem1062 = iprot.readString(); - struct.success.add(_elem1062); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_filter_args"); - - 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 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 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 - private short max_parts; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - FILTER((short)3, "filter"), - MAX_PARTS((short)4, "max_parts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // FILTER - return FILTER; - case 4: // MAX_PARTS - return MAX_PARTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FILTER, new org.apache.thrift.meta_data.FieldMetaData("filter", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); - } - - public get_partitions_by_filter_args() { - this.max_parts = (short)-1; - - } - - public get_partitions_by_filter_args( - String db_name, - String tbl_name, - String filter, - short max_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.filter = filter; - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_by_filter_args(get_partitions_by_filter_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetFilter()) { - this.filter = other.filter; - } - this.max_parts = other.max_parts; - } - - public get_partitions_by_filter_args deepCopy() { - return new get_partitions_by_filter_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.filter = null; - this.max_parts = (short)-1; - - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getFilter() { - return this.filter; - } - - public void setFilter(String filter) { - this.filter = filter; - } - - public void unsetFilter() { - this.filter = null; - } - - /** Returns true if field filter is set (has been assigned a value) and false otherwise */ - public boolean isSetFilter() { - return this.filter != null; - } - - public void setFilterIsSet(boolean value) { - if (!value) { - this.filter = null; - } - } - - public short getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - public void unsetMax_parts() { - __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); - } - - public void setMax_partsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case FILTER: - if (value == null) { - unsetFilter(); - } else { - setFilter((String)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Short)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case FILTER: - return getFilter(); - - case MAX_PARTS: - return getMax_parts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case FILTER: - return isSetFilter(); - case MAX_PARTS: - return isSetMax_parts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_by_filter_args) - return this.equals((get_partitions_by_filter_args)that); - return false; - } - - public boolean equals(get_partitions_by_filter_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_filter = true && this.isSetFilter(); - boolean that_present_filter = true && that.isSetFilter(); - if (this_present_filter || that_present_filter) { - if (!(this_present_filter && that_present_filter)) - return false; - if (!this.filter.equals(that.filter)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_filter = true && (isSetFilter()); - list.add(present_filter); - if (present_filter) - list.add(filter); - - boolean present_max_parts = true; - list.add(present_max_parts); - if (present_max_parts) - list.add(max_parts); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_by_filter_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFilter()).compareTo(other.isSetFilter()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFilter()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, other.filter); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_by_filter_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("filter:"); - if (this.filter == null) { - sb.append("null"); - } else { - sb.append(this.filter); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - 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 { - // 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_filter_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_result.class, metaDataMap); - } - - public get_partitions_by_filter_result() { - } - - public get_partitions_by_filter_result( - List success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_by_filter_result(get_partitions_by_filter_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_partitions_by_filter_result deepCopy() { - return new get_partitions_by_filter_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_by_filter_result) - return this.equals((get_partitions_by_filter_result)that); - return false; - } - - public boolean equals(get_partitions_by_filter_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_by_filter_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_by_filter_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 _list1064 = iprot.readListBegin(); - struct.success = new ArrayList(_list1064.size); - Partition _elem1065; - for (int _i1066 = 0; _i1066 < _list1064.size; ++_i1066) - { - _elem1065 = new Partition(); - _elem1065.read(iprot); - struct.success.add(_elem1065); - } - 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 _iter1067 : struct.success) - { - _iter1067.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 _iter1068 : struct.success) - { - _iter1068.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 _list1069 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list1069.size); - Partition _elem1070; - for (int _i1071 = 0; _i1071 < _list1069.size; ++_i1071) - { - _elem1070 = new Partition(); - _elem1070.read(iprot); - struct.success.add(_elem1070); - } - } - 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_part_specs_by_filter_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_part_specs_by_filter_args"); - - 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 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 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.I32, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_part_specs_by_filter_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_part_specs_by_filter_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - private String filter; // required - private int max_parts; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - FILTER((short)3, "filter"), - MAX_PARTS((short)4, "max_parts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // FILTER - return FILTER; - case 4: // MAX_PARTS - return MAX_PARTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FILTER, new org.apache.thrift.meta_data.FieldMetaData("filter", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_part_specs_by_filter_args.class, metaDataMap); - } - - public get_part_specs_by_filter_args() { - this.max_parts = -1; - - } - - public get_part_specs_by_filter_args( - String db_name, - String tbl_name, - String filter, - int max_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.filter = filter; - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public get_part_specs_by_filter_args(get_part_specs_by_filter_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetFilter()) { - this.filter = other.filter; - } - this.max_parts = other.max_parts; - } - - public get_part_specs_by_filter_args deepCopy() { - return new get_part_specs_by_filter_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.filter = null; - this.max_parts = -1; - - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getFilter() { - return this.filter; - } - - public void setFilter(String filter) { - this.filter = filter; - } - - public void unsetFilter() { - this.filter = null; - } - - /** Returns true if field filter is set (has been assigned a value) and false otherwise */ - public boolean isSetFilter() { - return this.filter != null; - } - - public void setFilterIsSet(boolean value) { - if (!value) { - this.filter = null; - } - } - - public int getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(int max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - public void unsetMax_parts() { - __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); - } - - public void setMax_partsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case FILTER: - if (value == null) { - unsetFilter(); - } else { - setFilter((String)value); - } - break; - - case MAX_PARTS: - if (value == null) { - unsetMax_parts(); - } else { - setMax_parts((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case FILTER: - return getFilter(); - - case MAX_PARTS: - return getMax_parts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case FILTER: - return isSetFilter(); - case MAX_PARTS: - return isSetMax_parts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_part_specs_by_filter_args) - return this.equals((get_part_specs_by_filter_args)that); - return false; - } - - public boolean equals(get_part_specs_by_filter_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_filter = true && this.isSetFilter(); - boolean that_present_filter = true && that.isSetFilter(); - if (this_present_filter || that_present_filter) { - if (!(this_present_filter && that_present_filter)) - return false; - if (!this.filter.equals(that.filter)) - return false; - } - - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) - return false; - if (this.max_parts != that.max_parts) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_filter = true && (isSetFilter()); - list.add(present_filter); - if (present_filter) - list.add(filter); - - boolean present_max_parts = true; - list.add(present_max_parts); - if (present_max_parts) - list.add(max_parts); - - return list.hashCode(); - } - - @Override - public int compareTo(get_part_specs_by_filter_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFilter()).compareTo(other.isSetFilter()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFilter()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, other.filter); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_part_specs_by_filter_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("filter:"); - if (this.filter == null) { - sb.append("null"); - } else { - sb.append(this.filter); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - 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 { - // 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 get_part_specs_by_filter_argsStandardSchemeFactory implements SchemeFactory { - public get_part_specs_by_filter_argsStandardScheme getScheme() { - return new get_part_specs_by_filter_argsStandardScheme(); - } - } - - private static class get_part_specs_by_filter_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_part_specs_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.I32) { - struct.max_parts = iprot.readI32(); - 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_part_specs_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.writeI32(struct.max_parts); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_part_specs_by_filter_argsTupleSchemeFactory implements SchemeFactory { - public get_part_specs_by_filter_argsTupleScheme getScheme() { - return new get_part_specs_by_filter_argsTupleScheme(); - } - } - - private static class get_part_specs_by_filter_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_part_specs_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.writeI32(struct.max_parts); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_part_specs_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.readI32(); - struct.setMax_partsIsSet(true); - } - } - } - - } - - public static class get_part_specs_by_filter_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_part_specs_by_filter_result"); - - 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 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_part_specs_by_filter_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_part_specs_by_filter_resultTupleSchemeFactory()); - } - - private List success; // required - private MetaException o1; // required - private NoSuchObjectException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionSpec.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_part_specs_by_filter_result.class, metaDataMap); - } - - public get_part_specs_by_filter_result() { - } - - public get_part_specs_by_filter_result( - List success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_part_specs_by_filter_result(get_part_specs_by_filter_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (PartitionSpec other_element : other.success) { - __this__success.add(new PartitionSpec(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_part_specs_by_filter_result deepCopy() { - return new get_part_specs_by_filter_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(PartitionSpec elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_part_specs_by_filter_result) - return this.equals((get_part_specs_by_filter_result)that); - return false; - } - - public boolean equals(get_part_specs_by_filter_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_part_specs_by_filter_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_part_specs_by_filter_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 get_part_specs_by_filter_resultStandardSchemeFactory implements SchemeFactory { - public get_part_specs_by_filter_resultStandardScheme getScheme() { - return new get_part_specs_by_filter_resultStandardScheme(); - } - } - - private static class get_part_specs_by_filter_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_part_specs_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 _list1072 = iprot.readListBegin(); - struct.success = new ArrayList(_list1072.size); - PartitionSpec _elem1073; - for (int _i1074 = 0; _i1074 < _list1072.size; ++_i1074) - { - _elem1073 = new PartitionSpec(); - _elem1073.read(iprot); - struct.success.add(_elem1073); - } - 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_part_specs_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 (PartitionSpec _iter1075 : struct.success) - { - _iter1075.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_part_specs_by_filter_resultTupleSchemeFactory implements SchemeFactory { - public get_part_specs_by_filter_resultTupleScheme getScheme() { - return new get_part_specs_by_filter_resultTupleScheme(); - } - } - - private static class get_part_specs_by_filter_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_part_specs_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 (PartitionSpec _iter1076 : struct.success) - { - _iter1076.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_part_specs_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 _list1077 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list1077.size); - PartitionSpec _elem1078; - for (int _i1079 = 0; _i1079 < _list1077.size; ++_i1079) - { - _elem1078 = new PartitionSpec(); - _elem1078.read(iprot); - struct.success.add(_elem1078); - } - } - 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_expr_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_expr_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_partitions_by_expr_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_partitions_by_expr_argsTupleSchemeFactory()); - } - - private PartitionsByExprRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsByExprRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_expr_args.class, metaDataMap); - } - - public get_partitions_by_expr_args() { - } - - public get_partitions_by_expr_args( - PartitionsByExprRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_by_expr_args(get_partitions_by_expr_args other) { - if (other.isSetReq()) { - this.req = new PartitionsByExprRequest(other.req); - } - } - - public get_partitions_by_expr_args deepCopy() { - return new get_partitions_by_expr_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public PartitionsByExprRequest getReq() { - return this.req; - } - - public void setReq(PartitionsByExprRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((PartitionsByExprRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_by_expr_args) - return this.equals((get_partitions_by_expr_args)that); - return false; - } - - public boolean equals(get_partitions_by_expr_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_by_expr_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_by_expr_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 get_partitions_by_expr_argsStandardSchemeFactory implements SchemeFactory { - public get_partitions_by_expr_argsStandardScheme getScheme() { - return new get_partitions_by_expr_argsStandardScheme(); - } - } - - private static class get_partitions_by_expr_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_expr_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new PartitionsByExprRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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_expr_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_partitions_by_expr_argsTupleSchemeFactory implements SchemeFactory { - public get_partitions_by_expr_argsTupleScheme getScheme() { - return new get_partitions_by_expr_argsTupleScheme(); - } - } - - private static class get_partitions_by_expr_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_expr_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_expr_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new PartitionsByExprRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class get_partitions_by_expr_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_expr_result"); - - 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 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_expr_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_partitions_by_expr_resultTupleSchemeFactory()); - } - - private PartitionsByExprResult success; // required - private MetaException o1; // required - private NoSuchObjectException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsByExprResult.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_expr_result.class, metaDataMap); - } - - public get_partitions_by_expr_result() { - } - - public get_partitions_by_expr_result( - PartitionsByExprResult success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_by_expr_result(get_partitions_by_expr_result other) { - if (other.isSetSuccess()) { - this.success = new PartitionsByExprResult(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_partitions_by_expr_result deepCopy() { - return new get_partitions_by_expr_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public PartitionsByExprResult getSuccess() { - return this.success; - } - - public void setSuccess(PartitionsByExprResult success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((PartitionsByExprResult)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_by_expr_result) - return this.equals((get_partitions_by_expr_result)that); - return false; - } - - public boolean equals(get_partitions_by_expr_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_by_expr_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_by_expr_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_partitions_by_expr_resultStandardSchemeFactory implements SchemeFactory { - public get_partitions_by_expr_resultStandardScheme getScheme() { - return new get_partitions_by_expr_resultStandardScheme(); - } - } - - private static class get_partitions_by_expr_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_expr_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 PartitionsByExprResult(); - 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_partitions_by_expr_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_partitions_by_expr_resultTupleSchemeFactory implements SchemeFactory { - public get_partitions_by_expr_resultTupleScheme getScheme() { - return new get_partitions_by_expr_resultTupleScheme(); - } - } - - private static class get_partitions_by_expr_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_expr_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_partitions_by_expr_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new PartitionsByExprResult(); - 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_num_partitions_by_filter_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_num_partitions_by_filter_args"); - - 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 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 FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("filter", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_num_partitions_by_filter_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_num_partitions_by_filter_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - private String filter; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - FILTER((short)3, "filter"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // FILTER - return FILTER; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FILTER, new org.apache.thrift.meta_data.FieldMetaData("filter", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_num_partitions_by_filter_args.class, metaDataMap); - } - - public get_num_partitions_by_filter_args() { - } - - public get_num_partitions_by_filter_args( - String db_name, - String tbl_name, - String filter) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.filter = filter; - } - - /** - * Performs a deep copy on other. - */ - public get_num_partitions_by_filter_args(get_num_partitions_by_filter_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetFilter()) { - this.filter = other.filter; - } - } - - public get_num_partitions_by_filter_args deepCopy() { - return new get_num_partitions_by_filter_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.filter = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getFilter() { - return this.filter; - } - - public void setFilter(String filter) { - this.filter = filter; - } - - public void unsetFilter() { - this.filter = null; - } - - /** Returns true if field filter is set (has been assigned a value) and false otherwise */ - public boolean isSetFilter() { - return this.filter != null; - } - - public void setFilterIsSet(boolean value) { - if (!value) { - this.filter = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case FILTER: - if (value == null) { - unsetFilter(); - } else { - setFilter((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case FILTER: - return getFilter(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case FILTER: - return isSetFilter(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_num_partitions_by_filter_args) - return this.equals((get_num_partitions_by_filter_args)that); - return false; - } - - public boolean equals(get_num_partitions_by_filter_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_filter = true && this.isSetFilter(); - boolean that_present_filter = true && that.isSetFilter(); - if (this_present_filter || that_present_filter) { - if (!(this_present_filter && that_present_filter)) - return false; - if (!this.filter.equals(that.filter)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_filter = true && (isSetFilter()); - list.add(present_filter); - if (present_filter) - list.add(filter); - - return list.hashCode(); - } - - @Override - public int compareTo(get_num_partitions_by_filter_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFilter()).compareTo(other.isSetFilter()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFilter()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, other.filter); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_num_partitions_by_filter_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("filter:"); - if (this.filter == null) { - sb.append("null"); - } else { - sb.append(this.filter); - } - 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 get_num_partitions_by_filter_argsStandardSchemeFactory implements SchemeFactory { - public get_num_partitions_by_filter_argsStandardScheme getScheme() { - return new get_num_partitions_by_filter_argsStandardScheme(); - } - } - - private static class get_num_partitions_by_filter_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_num_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; - 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_num_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.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_num_partitions_by_filter_argsTupleSchemeFactory implements SchemeFactory { - public get_num_partitions_by_filter_argsTupleScheme getScheme() { - return new get_num_partitions_by_filter_argsTupleScheme(); - } - } - - private static class get_num_partitions_by_filter_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_num_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); - } - oprot.writeBitSet(optionals, 3); - 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); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_num_partitions_by_filter_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.filter = iprot.readString(); - struct.setFilterIsSet(true); - } - } - } - - } - - public static class get_num_partitions_by_filter_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_num_partitions_by_filter_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (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 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_num_partitions_by_filter_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_num_partitions_by_filter_resultTupleSchemeFactory()); - } - - private int success; // required - private MetaException o1; // required - private NoSuchObjectException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_num_partitions_by_filter_result.class, metaDataMap); - } - - public get_num_partitions_by_filter_result() { - } - - public get_num_partitions_by_filter_result( - int success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_num_partitions_by_filter_result(get_num_partitions_by_filter_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_num_partitions_by_filter_result deepCopy() { - return new get_num_partitions_by_filter_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = 0; - this.o1 = null; - this.o2 = null; - } - - public int getSuccess() { - return this.success; - } - - public void setSuccess(int success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Integer)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_num_partitions_by_filter_result) - return this.equals((get_num_partitions_by_filter_result)that); - return false; - } - - public boolean equals(get_num_partitions_by_filter_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_num_partitions_by_filter_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_num_partitions_by_filter_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 { - // 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 get_num_partitions_by_filter_resultStandardSchemeFactory implements SchemeFactory { - public get_num_partitions_by_filter_resultStandardScheme getScheme() { - return new get_num_partitions_by_filter_resultStandardScheme(); - } - } - - private static class get_num_partitions_by_filter_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_num_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.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 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_num_partitions_by_filter_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_num_partitions_by_filter_resultTupleSchemeFactory implements SchemeFactory { - public get_num_partitions_by_filter_resultTupleScheme getScheme() { - return new get_num_partitions_by_filter_resultTupleScheme(); - } - } - - private static class get_num_partitions_by_filter_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_num_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); - } - 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_num_partitions_by_filter_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = iprot.readI32(); - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_names_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - NAMES((short)3, "names"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // NAMES - return NAMES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NAMES, new org.apache.thrift.meta_data.FieldMetaData("names", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_names_args.class, metaDataMap); - } - - public get_partitions_by_names_args() { - } - - public get_partitions_by_names_args( - String db_name, - String tbl_name, - List names) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.names = names; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_by_names_args(get_partitions_by_names_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetNames()) { - List __this__names = new ArrayList(other.names); - this.names = __this__names; - } - } - - public get_partitions_by_names_args deepCopy() { - return new get_partitions_by_names_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.names = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getNamesSize() { - return (this.names == null) ? 0 : this.names.size(); - } - - public java.util.Iterator getNamesIterator() { - return (this.names == null) ? null : this.names.iterator(); - } - - public void addToNames(String elem) { - if (this.names == null) { - this.names = new ArrayList(); - } - this.names.add(elem); - } - - public List getNames() { - return this.names; - } - - public void setNames(List names) { - this.names = names; - } - - public void unsetNames() { - this.names = null; - } - - /** Returns true if field names is set (has been assigned a value) and false otherwise */ - public boolean isSetNames() { - return this.names != null; - } - - public void setNamesIsSet(boolean value) { - if (!value) { - this.names = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case NAMES: - if (value == null) { - unsetNames(); - } else { - setNames((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case NAMES: - return getNames(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case NAMES: - return isSetNames(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_by_names_args) - return this.equals((get_partitions_by_names_args)that); - return false; - } - - public boolean equals(get_partitions_by_names_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_names = true && this.isSetNames(); - boolean that_present_names = true && that.isSetNames(); - if (this_present_names || that_present_names) { - if (!(this_present_names && that_present_names)) - return false; - if (!this.names.equals(that.names)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_names = true && (isSetNames()); - list.add(present_names); - if (present_names) - list.add(names); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_by_names_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNames()).compareTo(other.isSetNames()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNames()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.names, other.names); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_by_names_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("names:"); - if (this.names == null) { - sb.append("null"); - } else { - sb.append(this.names); - } - 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 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 _list1080 = iprot.readListBegin(); - struct.names = new ArrayList(_list1080.size); - String _elem1081; - for (int _i1082 = 0; _i1082 < _list1080.size; ++_i1082) - { - _elem1081 = iprot.readString(); - struct.names.add(_elem1081); - } - 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 _iter1083 : struct.names) - { - oprot.writeString(_iter1083); - } - 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 _iter1084 : struct.names) - { - oprot.writeString(_iter1084); - } - } - } - } - - @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 _list1085 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.names = new ArrayList(_list1085.size); - String _elem1086; - for (int _i1087 = 0; _i1087 < _list1085.size; ++_i1087) - { - _elem1086 = iprot.readString(); - struct.names.add(_elem1086); - } - } - struct.setNamesIsSet(true); - } - } - } - - } - - public static class get_partitions_by_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_names_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_names_result.class, metaDataMap); - } - - public get_partitions_by_names_result() { - } - - public get_partitions_by_names_result( - List success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_by_names_result(get_partitions_by_names_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_partitions_by_names_result deepCopy() { - return new get_partitions_by_names_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_by_names_result) - return this.equals((get_partitions_by_names_result)that); - return false; - } - - public boolean equals(get_partitions_by_names_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_by_names_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_by_names_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 _list1088 = iprot.readListBegin(); - struct.success = new ArrayList(_list1088.size); - Partition _elem1089; - for (int _i1090 = 0; _i1090 < _list1088.size; ++_i1090) - { - _elem1089 = new Partition(); - _elem1089.read(iprot); - struct.success.add(_elem1089); - } - 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 _iter1091 : struct.success) - { - _iter1091.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 _iter1092 : struct.success) - { - _iter1092.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 _list1093 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list1093.size); - Partition _elem1094; - for (int _i1095 = 0; _i1095 < _list1093.size; ++_i1095) - { - _elem1094 = new Partition(); - _elem1094.read(iprot); - struct.success.add(_elem1094); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - NEW_PART((short)3, "new_part"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // NEW_PART - return NEW_PART; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); - } - - public alter_partition_args() { - } - - public alter_partition_args( - String db_name, - String tbl_name, - Partition new_part) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_part = new_part; - } - - /** - * Performs a deep copy on other. - */ - public alter_partition_args(alter_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetNew_part()) { - this.new_part = new Partition(other.new_part); - } - } - - public alter_partition_args deepCopy() { - return new alter_partition_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.new_part = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public Partition getNew_part() { - return this.new_part; - } - - public void setNew_part(Partition new_part) { - this.new_part = new_part; - } - - public void unsetNew_part() { - this.new_part = null; - } - - /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_part() { - return this.new_part != null; - } - - public void setNew_partIsSet(boolean value) { - if (!value) { - this.new_part = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case NEW_PART: - if (value == null) { - unsetNew_part(); - } else { - setNew_part((Partition)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case NEW_PART: - return getNew_part(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case NEW_PART: - return isSetNew_part(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_partition_args) - return this.equals((alter_partition_args)that); - return false; - } - - public boolean equals(alter_partition_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_new_part = true && this.isSetNew_part(); - boolean that_present_new_part = true && that.isSetNew_part(); - if (this_present_new_part || that_present_new_part) { - if (!(this_present_new_part && that_present_new_part)) - return false; - if (!this.new_part.equals(that.new_part)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_new_part = true && (isSetNew_part()); - list.add(present_new_part); - if (present_new_part) - list.add(new_part); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_partition_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_part()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.new_part); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_partition_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("new_part:"); - if (this.new_part == null) { - sb.append("null"); - } else { - sb.append(this.new_part); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partition_result.class, metaDataMap); - } - - public alter_partition_result() { - } - - public alter_partition_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_partition_result(alter_partition_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public alter_partition_result deepCopy() { - return new alter_partition_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_partition_result) - return this.equals((alter_partition_result)that); - return false; - } - - public boolean equals(alter_partition_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_partition_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_partition_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partitions_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - NEW_PARTS((short)3, "new_parts"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // NEW_PARTS - return NEW_PARTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NEW_PARTS, new org.apache.thrift.meta_data.FieldMetaData("new_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partitions_args.class, metaDataMap); - } - - public alter_partitions_args() { - } - - public alter_partitions_args( - String db_name, - String tbl_name, - List new_parts) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_parts = new_parts; - } - - /** - * Performs a deep copy on other. - */ - public alter_partitions_args(alter_partitions_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetNew_parts()) { - List __this__new_parts = new ArrayList(other.new_parts.size()); - for (Partition other_element : other.new_parts) { - __this__new_parts.add(new Partition(other_element)); - } - this.new_parts = __this__new_parts; - } - } - - public alter_partitions_args deepCopy() { - return new alter_partitions_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.new_parts = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getNew_partsSize() { - return (this.new_parts == null) ? 0 : this.new_parts.size(); - } - - public java.util.Iterator getNew_partsIterator() { - return (this.new_parts == null) ? null : this.new_parts.iterator(); - } - - public void addToNew_parts(Partition elem) { - if (this.new_parts == null) { - this.new_parts = new ArrayList(); - } - this.new_parts.add(elem); - } - - public List getNew_parts() { - return this.new_parts; - } - - public void setNew_parts(List new_parts) { - this.new_parts = new_parts; - } - - public void unsetNew_parts() { - this.new_parts = null; - } - - /** Returns true if field new_parts is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_parts() { - return this.new_parts != null; - } - - public void setNew_partsIsSet(boolean value) { - if (!value) { - this.new_parts = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case NEW_PARTS: - if (value == null) { - unsetNew_parts(); - } else { - setNew_parts((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case NEW_PARTS: - return getNew_parts(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case NEW_PARTS: - return isSetNew_parts(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_partitions_args) - return this.equals((alter_partitions_args)that); - return false; - } - - public boolean equals(alter_partitions_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_new_parts = true && this.isSetNew_parts(); - boolean that_present_new_parts = true && that.isSetNew_parts(); - if (this_present_new_parts || that_present_new_parts) { - if (!(this_present_new_parts && that_present_new_parts)) - return false; - if (!this.new_parts.equals(that.new_parts)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_new_parts = true && (isSetNew_parts()); - list.add(present_new_parts); - if (present_new_parts) - list.add(new_parts); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_partitions_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(other.isSetNew_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, other.new_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_partitions_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("new_parts:"); - if (this.new_parts == null) { - sb.append("null"); - } else { - sb.append(this.new_parts); - } - 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 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 _list1096 = iprot.readListBegin(); - struct.new_parts = new ArrayList(_list1096.size); - Partition _elem1097; - for (int _i1098 = 0; _i1098 < _list1096.size; ++_i1098) - { - _elem1097 = new Partition(); - _elem1097.read(iprot); - struct.new_parts.add(_elem1097); - } - 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 _iter1099 : struct.new_parts) - { - _iter1099.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 _iter1100 : struct.new_parts) - { - _iter1100.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 _list1101 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.new_parts = new ArrayList(_list1101.size); - Partition _elem1102; - for (int _i1103 = 0; _i1103 < _list1101.size; ++_i1103) - { - _elem1102 = new Partition(); - _elem1102.read(iprot); - struct.new_parts.add(_elem1102); - } - } - struct.setNew_partsIsSet(true); - } - } - } - - } - - public static class alter_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partitions_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partitions_result.class, metaDataMap); - } - - public alter_partitions_result() { - } - - public alter_partitions_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_partitions_result(alter_partitions_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public alter_partitions_result deepCopy() { - return new alter_partitions_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_partitions_result) - return this.equals((alter_partitions_result)that); - return false; - } - - public boolean equals(alter_partitions_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_partitions_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_partitions_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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_partitions_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partitions_with_environment_context_args"); - - 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 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 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_partitions_with_environment_context_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new alter_partitions_with_environment_context_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - private List new_parts; // required - private EnvironmentContext environment_context; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - NEW_PARTS((short)3, "new_parts"), - ENVIRONMENT_CONTEXT((short)4, "environment_context"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // NEW_PARTS - return NEW_PARTS; - case 4: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NEW_PARTS, new org.apache.thrift.meta_data.FieldMetaData("new_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partitions_with_environment_context_args.class, metaDataMap); - } - - public alter_partitions_with_environment_context_args() { - } - - public alter_partitions_with_environment_context_args( - String db_name, - String tbl_name, - List new_parts, - EnvironmentContext environment_context) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_parts = new_parts; - this.environment_context = environment_context; - } - - /** - * Performs a deep copy on other. - */ - public alter_partitions_with_environment_context_args(alter_partitions_with_environment_context_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetNew_parts()) { - List __this__new_parts = new ArrayList(other.new_parts.size()); - for (Partition other_element : other.new_parts) { - __this__new_parts.add(new Partition(other_element)); - } - this.new_parts = __this__new_parts; - } - if (other.isSetEnvironment_context()) { - this.environment_context = new EnvironmentContext(other.environment_context); - } - } - - public alter_partitions_with_environment_context_args deepCopy() { - return new alter_partitions_with_environment_context_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.new_parts = null; - this.environment_context = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getNew_partsSize() { - return (this.new_parts == null) ? 0 : this.new_parts.size(); - } - - public java.util.Iterator getNew_partsIterator() { - return (this.new_parts == null) ? null : this.new_parts.iterator(); - } - - public void addToNew_parts(Partition elem) { - if (this.new_parts == null) { - this.new_parts = new ArrayList(); - } - this.new_parts.add(elem); - } - - public List getNew_parts() { - return this.new_parts; - } - - public void setNew_parts(List new_parts) { - this.new_parts = new_parts; - } - - public void unsetNew_parts() { - this.new_parts = null; - } - - /** Returns true if field new_parts is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_parts() { - return this.new_parts != null; - } - - public void setNew_partsIsSet(boolean value) { - if (!value) { - this.new_parts = null; - } - } - - public EnvironmentContext getEnvironment_context() { - return this.environment_context; - } - - public void setEnvironment_context(EnvironmentContext environment_context) { - this.environment_context = environment_context; - } - - public void unsetEnvironment_context() { - this.environment_context = null; - } - - /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironment_context() { - return this.environment_context != null; - } - - public void setEnvironment_contextIsSet(boolean value) { - if (!value) { - this.environment_context = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case NEW_PARTS: - if (value == null) { - unsetNew_parts(); - } else { - setNew_parts((List)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironment_context(); - } else { - setEnvironment_context((EnvironmentContext)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case NEW_PARTS: - return getNew_parts(); - - case ENVIRONMENT_CONTEXT: - return getEnvironment_context(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case NEW_PARTS: - return isSetNew_parts(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironment_context(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_partitions_with_environment_context_args) - return this.equals((alter_partitions_with_environment_context_args)that); - return false; - } - - public boolean equals(alter_partitions_with_environment_context_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_new_parts = true && this.isSetNew_parts(); - boolean that_present_new_parts = true && that.isSetNew_parts(); - if (this_present_new_parts || that_present_new_parts) { - if (!(this_present_new_parts && that_present_new_parts)) - return false; - if (!this.new_parts.equals(that.new_parts)) - return false; - } - - boolean this_present_environment_context = true && this.isSetEnvironment_context(); - boolean that_present_environment_context = true && that.isSetEnvironment_context(); - if (this_present_environment_context || that_present_environment_context) { - if (!(this_present_environment_context && that_present_environment_context)) - return false; - if (!this.environment_context.equals(that.environment_context)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_new_parts = true && (isSetNew_parts()); - list.add(present_new_parts); - if (present_new_parts) - list.add(new_parts); - - boolean present_environment_context = true && (isSetEnvironment_context()); - list.add(present_environment_context); - if (present_environment_context) - list.add(environment_context); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_partitions_with_environment_context_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(other.isSetNew_parts()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_parts()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, other.new_parts); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironment_context()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_partitions_with_environment_context_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("new_parts:"); - if (this.new_parts == null) { - sb.append("null"); - } else { - sb.append(this.new_parts); - } - first = false; - if (!first) sb.append(", "); - sb.append("environment_context:"); - if (this.environment_context == null) { - sb.append("null"); - } else { - sb.append(this.environment_context); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (environment_context != null) { - environment_context.validate(); - } - } - - 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 alter_partitions_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { - public alter_partitions_with_environment_context_argsStandardScheme getScheme() { - return new alter_partitions_with_environment_context_argsStandardScheme(); - } - } - - private static class alter_partitions_with_environment_context_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_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_PARTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list1104 = iprot.readListBegin(); - struct.new_parts = new ArrayList(_list1104.size); - Partition _elem1105; - for (int _i1106 = 0; _i1106 < _list1104.size; ++_i1106) - { - _elem1105 = new Partition(); - _elem1105.read(iprot); - struct.new_parts.add(_elem1105); - } - iprot.readListEnd(); - } - struct.setNew_partsIsSet(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_partitions_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_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 _iter1107 : struct.new_parts) - { - _iter1107.write(oprot); - } - oprot.writeListEnd(); - } - 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_partitions_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { - public alter_partitions_with_environment_context_argsTupleScheme getScheme() { - return new alter_partitions_with_environment_context_argsTupleScheme(); - } - } - - private static class alter_partitions_with_environment_context_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, alter_partitions_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_parts()) { - 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_parts()) { - { - oprot.writeI32(struct.new_parts.size()); - for (Partition _iter1108 : struct.new_parts) - { - _iter1108.write(oprot); - } - } - } - if (struct.isSetEnvironment_context()) { - struct.environment_context.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, alter_partitions_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)) { - { - org.apache.thrift.protocol.TList _list1109 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.new_parts = new ArrayList(_list1109.size); - Partition _elem1110; - for (int _i1111 = 0; _i1111 < _list1109.size; ++_i1111) - { - _elem1110 = new Partition(); - _elem1110.read(iprot); - struct.new_parts.add(_elem1110); - } - } - struct.setNew_partsIsSet(true); - } - if (incoming.get(3)) { - struct.environment_context = new EnvironmentContext(); - struct.environment_context.read(iprot); - struct.setEnvironment_contextIsSet(true); - } - } - } - - } - - public static class alter_partitions_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partitions_with_environment_context_result"); - - 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_with_environment_context_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new alter_partitions_with_environment_context_resultTupleSchemeFactory()); - } - - private InvalidOperationException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partitions_with_environment_context_result.class, metaDataMap); - } - - public alter_partitions_with_environment_context_result() { - } - - public alter_partitions_with_environment_context_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_partitions_with_environment_context_result(alter_partitions_with_environment_context_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public alter_partitions_with_environment_context_result deepCopy() { - return new alter_partitions_with_environment_context_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_partitions_with_environment_context_result) - return this.equals((alter_partitions_with_environment_context_result)that); - return false; - } - - public boolean equals(alter_partitions_with_environment_context_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_partitions_with_environment_context_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_partitions_with_environment_context_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 alter_partitions_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { - public alter_partitions_with_environment_context_resultStandardScheme getScheme() { - return new alter_partitions_with_environment_context_resultStandardScheme(); - } - } - - private static class alter_partitions_with_environment_context_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_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_partitions_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_partitions_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { - public alter_partitions_with_environment_context_resultTupleScheme getScheme() { - return new alter_partitions_with_environment_context_resultTupleScheme(); - } - } - - private static class alter_partitions_with_environment_context_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, alter_partitions_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_partitions_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 alter_partition_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_with_environment_context_args"); - - 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 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 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 - private EnvironmentContext environment_context; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - NEW_PART((short)3, "new_part"), - ENVIRONMENT_CONTEXT((short)4, "environment_context"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // NEW_PART - return NEW_PART; - case 4: // ENVIRONMENT_CONTEXT - return ENVIRONMENT_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partition_with_environment_context_args.class, metaDataMap); - } - - public alter_partition_with_environment_context_args() { - } - - public alter_partition_with_environment_context_args( - String db_name, - String tbl_name, - Partition new_part, - EnvironmentContext environment_context) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_part = new_part; - this.environment_context = environment_context; - } - - /** - * Performs a deep copy on other. - */ - public alter_partition_with_environment_context_args(alter_partition_with_environment_context_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetNew_part()) { - this.new_part = new Partition(other.new_part); - } - if (other.isSetEnvironment_context()) { - this.environment_context = new EnvironmentContext(other.environment_context); - } - } - - public alter_partition_with_environment_context_args deepCopy() { - return new alter_partition_with_environment_context_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.new_part = null; - this.environment_context = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public Partition getNew_part() { - return this.new_part; - } - - public void setNew_part(Partition new_part) { - this.new_part = new_part; - } - - public void unsetNew_part() { - this.new_part = null; - } - - /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_part() { - return this.new_part != null; - } - - public void setNew_partIsSet(boolean value) { - if (!value) { - this.new_part = null; - } - } - - public EnvironmentContext getEnvironment_context() { - return this.environment_context; - } - - public void setEnvironment_context(EnvironmentContext environment_context) { - this.environment_context = environment_context; - } - - public void unsetEnvironment_context() { - this.environment_context = null; - } - - /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ - public boolean isSetEnvironment_context() { - return this.environment_context != null; - } - - public void setEnvironment_contextIsSet(boolean value) { - if (!value) { - this.environment_context = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case NEW_PART: - if (value == null) { - unsetNew_part(); - } else { - setNew_part((Partition)value); - } - break; - - case ENVIRONMENT_CONTEXT: - if (value == null) { - unsetEnvironment_context(); - } else { - setEnvironment_context((EnvironmentContext)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case NEW_PART: - return getNew_part(); - - case ENVIRONMENT_CONTEXT: - return getEnvironment_context(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case NEW_PART: - return isSetNew_part(); - case ENVIRONMENT_CONTEXT: - return isSetEnvironment_context(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_partition_with_environment_context_args) - return this.equals((alter_partition_with_environment_context_args)that); - return false; - } - - public boolean equals(alter_partition_with_environment_context_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_new_part = true && this.isSetNew_part(); - boolean that_present_new_part = true && that.isSetNew_part(); - if (this_present_new_part || that_present_new_part) { - if (!(this_present_new_part && that_present_new_part)) - return false; - if (!this.new_part.equals(that.new_part)) - return false; - } - - boolean this_present_environment_context = true && this.isSetEnvironment_context(); - boolean that_present_environment_context = true && that.isSetEnvironment_context(); - if (this_present_environment_context || that_present_environment_context) { - if (!(this_present_environment_context && that_present_environment_context)) - return false; - if (!this.environment_context.equals(that.environment_context)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_new_part = true && (isSetNew_part()); - list.add(present_new_part); - if (present_new_part) - list.add(new_part); - - boolean present_environment_context = true && (isSetEnvironment_context()); - list.add(present_environment_context); - if (present_environment_context) - list.add(environment_context); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_partition_with_environment_context_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_part()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.new_part); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEnvironment_context()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_partition_with_environment_context_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("new_part:"); - if (this.new_part == null) { - sb.append("null"); - } else { - sb.append(this.new_part); - } - first = false; - if (!first) sb.append(", "); - sb.append("environment_context:"); - if (this.environment_context == null) { - sb.append("null"); - } else { - sb.append(this.environment_context); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_with_environment_context_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partition_with_environment_context_result.class, metaDataMap); - } - - public alter_partition_with_environment_context_result() { - } - - public alter_partition_with_environment_context_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_partition_with_environment_context_result(alter_partition_with_environment_context_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public alter_partition_with_environment_context_result deepCopy() { - return new alter_partition_with_environment_context_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_partition_with_environment_context_result) - return this.equals((alter_partition_with_environment_context_result)that); - return false; - } - - public boolean equals(alter_partition_with_environment_context_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_partition_with_environment_context_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_partition_with_environment_context_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_partition_args"); - - 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 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 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 - private Partition new_part; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - NEW_PART((short)4, "new_part"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // NEW_PART - return NEW_PART; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(rename_partition_args.class, metaDataMap); - } - - public rename_partition_args() { - } - - public rename_partition_args( - String db_name, - String tbl_name, - List part_vals, - Partition new_part) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.new_part = new_part; - } - - /** - * Performs a deep copy on other. - */ - public rename_partition_args(rename_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(other.part_vals); - this.part_vals = __this__part_vals; - } - if (other.isSetNew_part()) { - this.new_part = new Partition(other.new_part); - } - } - - public rename_partition_args deepCopy() { - return new rename_partition_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - this.new_part = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - public Partition getNew_part() { - return this.new_part; - } - - public void setNew_part(Partition new_part) { - this.new_part = new_part; - } - - public void unsetNew_part() { - this.new_part = null; - } - - /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_part() { - return this.new_part != null; - } - - public void setNew_partIsSet(boolean value) { - if (!value) { - this.new_part = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case NEW_PART: - if (value == null) { - unsetNew_part(); - } else { - setNew_part((Partition)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case NEW_PART: - return getNew_part(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case NEW_PART: - return isSetNew_part(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof rename_partition_args) - return this.equals((rename_partition_args)that); - return false; - } - - public boolean equals(rename_partition_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_new_part = true && this.isSetNew_part(); - boolean that_present_new_part = true && that.isSetNew_part(); - if (this_present_new_part || that_present_new_part) { - if (!(this_present_new_part && that_present_new_part)) - return false; - if (!this.new_part.equals(that.new_part)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - boolean present_new_part = true && (isSetNew_part()); - list.add(present_new_part); - if (present_new_part) - list.add(new_part); - - return list.hashCode(); - } - - @Override - public int compareTo(rename_partition_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_part()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.new_part); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("rename_partition_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("new_part:"); - if (this.new_part == null) { - sb.append("null"); - } else { - sb.append(this.new_part); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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 _list1112 = iprot.readListBegin(); - struct.part_vals = new ArrayList(_list1112.size); - String _elem1113; - for (int _i1114 = 0; _i1114 < _list1112.size; ++_i1114) - { - _elem1113 = iprot.readString(); - struct.part_vals.add(_elem1113); - } - 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 _iter1115 : struct.part_vals) - { - oprot.writeString(_iter1115); - } - 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 _iter1116 : struct.part_vals) - { - oprot.writeString(_iter1116); - } - } - } - 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 _list1117 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.part_vals = new ArrayList(_list1117.size); - String _elem1118; - for (int _i1119 = 0; _i1119 < _list1117.size; ++_i1119) - { - _elem1118 = iprot.readString(); - struct.part_vals.add(_elem1118); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_partition_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(rename_partition_result.class, metaDataMap); - } - - public rename_partition_result() { - } - - public rename_partition_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public rename_partition_result(rename_partition_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public rename_partition_result deepCopy() { - return new rename_partition_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof rename_partition_result) - return this.equals((rename_partition_result)that); - return false; - } - - public boolean equals(rename_partition_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(rename_partition_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("rename_partition_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 partition_name_has_valid_characters_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_has_valid_characters_args"); - - 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)1); - private static final org.apache.thrift.protocol.TField THROW_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("throw_exception", org.apache.thrift.protocol.TType.BOOL, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new partition_name_has_valid_characters_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new partition_name_has_valid_characters_argsTupleSchemeFactory()); - } - - private List part_vals; // required - private boolean throw_exception; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PART_VALS((short)1, "part_vals"), - THROW_EXCEPTION((short)2, "throw_exception"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PART_VALS - return PART_VALS; - case 2: // THROW_EXCEPTION - return THROW_EXCEPTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __THROW_EXCEPTION_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.THROW_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("throw_exception", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partition_name_has_valid_characters_args.class, metaDataMap); - } - - public partition_name_has_valid_characters_args() { - } - - public partition_name_has_valid_characters_args( - List part_vals, - boolean throw_exception) - { - this(); - this.part_vals = part_vals; - this.throw_exception = throw_exception; - setThrow_exceptionIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public partition_name_has_valid_characters_args(partition_name_has_valid_characters_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(other.part_vals); - this.part_vals = __this__part_vals; - } - this.throw_exception = other.throw_exception; - } - - public partition_name_has_valid_characters_args deepCopy() { - return new partition_name_has_valid_characters_args(this); - } - - @Override - public void clear() { - this.part_vals = null; - setThrow_exceptionIsSet(false); - this.throw_exception = false; - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - public boolean isThrow_exception() { - return this.throw_exception; - } - - public void setThrow_exception(boolean throw_exception) { - this.throw_exception = throw_exception; - setThrow_exceptionIsSet(true); - } - - public void unsetThrow_exception() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __THROW_EXCEPTION_ISSET_ID); - } - - /** Returns true if field throw_exception is set (has been assigned a value) and false otherwise */ - public boolean isSetThrow_exception() { - return EncodingUtils.testBit(__isset_bitfield, __THROW_EXCEPTION_ISSET_ID); - } - - public void setThrow_exceptionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __THROW_EXCEPTION_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case THROW_EXCEPTION: - if (value == null) { - unsetThrow_exception(); - } else { - setThrow_exception((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PART_VALS: - return getPart_vals(); - - case THROW_EXCEPTION: - return isThrow_exception(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PART_VALS: - return isSetPart_vals(); - case THROW_EXCEPTION: - return isSetThrow_exception(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof partition_name_has_valid_characters_args) - return this.equals((partition_name_has_valid_characters_args)that); - return false; - } - - public boolean equals(partition_name_has_valid_characters_args that) { - if (that == null) - return false; - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_throw_exception = true; - boolean that_present_throw_exception = true; - if (this_present_throw_exception || that_present_throw_exception) { - if (!(this_present_throw_exception && that_present_throw_exception)) - return false; - if (this.throw_exception != that.throw_exception) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - boolean present_throw_exception = true; - list.add(present_throw_exception); - if (present_throw_exception) - list.add(throw_exception); - - return list.hashCode(); - } - - @Override - public int compareTo(partition_name_has_valid_characters_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetThrow_exception()).compareTo(other.isSetThrow_exception()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetThrow_exception()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.throw_exception, other.throw_exception); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("partition_name_has_valid_characters_args("); - boolean first = true; - - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("throw_exception:"); - sb.append(this.throw_exception); - 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 { - // 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 partition_name_has_valid_characters_argsStandardSchemeFactory implements SchemeFactory { - public partition_name_has_valid_characters_argsStandardScheme getScheme() { - return new partition_name_has_valid_characters_argsStandardScheme(); - } - } - - private static class partition_name_has_valid_characters_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_has_valid_characters_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_VALS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list1120 = iprot.readListBegin(); - struct.part_vals = new ArrayList(_list1120.size); - String _elem1121; - for (int _i1122 = 0; _i1122 < _list1120.size; ++_i1122) - { - _elem1121 = iprot.readString(); - struct.part_vals.add(_elem1121); - } - iprot.readListEnd(); - } - struct.setPart_valsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // THROW_EXCEPTION - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.throw_exception = iprot.readBool(); - struct.setThrow_exceptionIsSet(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_has_valid_characters_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - 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 _iter1123 : struct.part_vals) - { - oprot.writeString(_iter1123); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(THROW_EXCEPTION_FIELD_DESC); - oprot.writeBool(struct.throw_exception); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class partition_name_has_valid_characters_argsTupleSchemeFactory implements SchemeFactory { - public partition_name_has_valid_characters_argsTupleScheme getScheme() { - return new partition_name_has_valid_characters_argsTupleScheme(); - } - } - - private static class partition_name_has_valid_characters_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_has_valid_characters_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPart_vals()) { - optionals.set(0); - } - if (struct.isSetThrow_exception()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetPart_vals()) { - { - oprot.writeI32(struct.part_vals.size()); - for (String _iter1124 : struct.part_vals) - { - oprot.writeString(_iter1124); - } - } - } - if (struct.isSetThrow_exception()) { - oprot.writeBool(struct.throw_exception); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_has_valid_characters_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list1125 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.part_vals = new ArrayList(_list1125.size); - String _elem1126; - for (int _i1127 = 0; _i1127 < _list1125.size; ++_i1127) - { - _elem1126 = iprot.readString(); - struct.part_vals.add(_elem1126); - } - } - struct.setPart_valsIsSet(true); - } - if (incoming.get(1)) { - struct.throw_exception = iprot.readBool(); - struct.setThrow_exceptionIsSet(true); - } - } - } - - } - - public static class partition_name_has_valid_characters_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_has_valid_characters_result"); - - 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 partition_name_has_valid_characters_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new partition_name_has_valid_characters_resultTupleSchemeFactory()); - } - - private boolean success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partition_name_has_valid_characters_result.class, metaDataMap); - } - - public partition_name_has_valid_characters_result() { - } - - public partition_name_has_valid_characters_result( - boolean success, - MetaException o1) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public partition_name_has_valid_characters_result(partition_name_has_valid_characters_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public partition_name_has_valid_characters_result deepCopy() { - return new partition_name_has_valid_characters_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof partition_name_has_valid_characters_result) - return this.equals((partition_name_has_valid_characters_result)that); - return false; - } - - public boolean equals(partition_name_has_valid_characters_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(partition_name_has_valid_characters_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("partition_name_has_valid_characters_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 { - // 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 partition_name_has_valid_characters_resultStandardSchemeFactory implements SchemeFactory { - public partition_name_has_valid_characters_resultStandardScheme getScheme() { - return new partition_name_has_valid_characters_resultStandardScheme(); - } - } - - private static class partition_name_has_valid_characters_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_has_valid_characters_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, partition_name_has_valid_characters_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 partition_name_has_valid_characters_resultTupleSchemeFactory implements SchemeFactory { - public partition_name_has_valid_characters_resultTupleScheme getScheme() { - return new partition_name_has_valid_characters_resultTupleScheme(); - } - } - - private static class partition_name_has_valid_characters_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_has_valid_characters_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, partition_name_has_valid_characters_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_config_value_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_config_value_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NAME((short)1, "name"), - DEFAULT_VALUE((short)2, "defaultValue"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // DEFAULT_VALUE - return DEFAULT_VALUE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DEFAULT_VALUE, new org.apache.thrift.meta_data.FieldMetaData("defaultValue", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_config_value_args.class, metaDataMap); - } - - public get_config_value_args() { - } - - public get_config_value_args( - String name, - String defaultValue) - { - this(); - this.name = name; - this.defaultValue = defaultValue; - } - - /** - * Performs a deep copy on other. - */ - public get_config_value_args(get_config_value_args other) { - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetDefaultValue()) { - this.defaultValue = other.defaultValue; - } - } - - public get_config_value_args deepCopy() { - return new get_config_value_args(this); - } - - @Override - public void clear() { - this.name = null; - this.defaultValue = null; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public String getDefaultValue() { - return this.defaultValue; - } - - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; - } - - public void unsetDefaultValue() { - this.defaultValue = null; - } - - /** Returns true if field defaultValue is set (has been assigned a value) and false otherwise */ - public boolean isSetDefaultValue() { - return this.defaultValue != null; - } - - public void setDefaultValueIsSet(boolean value) { - if (!value) { - this.defaultValue = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case DEFAULT_VALUE: - if (value == null) { - unsetDefaultValue(); - } else { - setDefaultValue((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - case DEFAULT_VALUE: - return getDefaultValue(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - case DEFAULT_VALUE: - return isSetDefaultValue(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_config_value_args) - return this.equals((get_config_value_args)that); - return false; - } - - public boolean equals(get_config_value_args that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_defaultValue = true && this.isSetDefaultValue(); - boolean that_present_defaultValue = true && that.isSetDefaultValue(); - if (this_present_defaultValue || that_present_defaultValue) { - if (!(this_present_defaultValue && that_present_defaultValue)) - return false; - if (!this.defaultValue.equals(that.defaultValue)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); - - boolean present_defaultValue = true && (isSetDefaultValue()); - list.add(present_defaultValue); - if (present_defaultValue) - list.add(defaultValue); - - return list.hashCode(); - } - - @Override - public int compareTo(get_config_value_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDefaultValue()).compareTo(other.isSetDefaultValue()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDefaultValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultValue, other.defaultValue); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_config_value_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("defaultValue:"); - if (this.defaultValue == null) { - sb.append("null"); - } else { - sb.append(this.defaultValue); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_config_value_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_config_value_result.class, metaDataMap); - } - - public get_config_value_result() { - } - - public get_config_value_result( - String success, - ConfigValSecurityException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_config_value_result(get_config_value_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } - if (other.isSetO1()) { - this.o1 = new ConfigValSecurityException(other.o1); - } - } - - public get_config_value_result deepCopy() { - return new get_config_value_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public String getSuccess() { - return this.success; - } - - public void setSuccess(String success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public ConfigValSecurityException getO1() { - return this.o1; - } - - public void setO1(ConfigValSecurityException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((String)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((ConfigValSecurityException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_config_value_result) - return this.equals((get_config_value_result)that); - return false; - } - - public boolean equals(get_config_value_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_config_value_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_config_value_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_to_vals_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PART_NAME((short)1, "part_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PART_NAME - return PART_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partition_name_to_vals_args.class, metaDataMap); - } - - public partition_name_to_vals_args() { - } - - public partition_name_to_vals_args( - String part_name) - { - this(); - this.part_name = part_name; - } - - /** - * Performs a deep copy on other. - */ - public partition_name_to_vals_args(partition_name_to_vals_args other) { - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - } - - public partition_name_to_vals_args deepCopy() { - return new partition_name_to_vals_args(this); - } - - @Override - public void clear() { - this.part_name = null; - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; - } - - public void setPart_nameIsSet(boolean value) { - if (!value) { - this.part_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PART_NAME: - return getPart_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PART_NAME: - return isSetPart_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof partition_name_to_vals_args) - return this.equals((partition_name_to_vals_args)that); - return false; - } - - public boolean equals(partition_name_to_vals_args that) { - if (that == null) - return false; - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_part_name = true && (isSetPart_name()); - list.add(present_part_name); - if (present_part_name) - list.add(part_name); - - return list.hashCode(); - } - - @Override - public int compareTo(partition_name_to_vals_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("partition_name_to_vals_args("); - boolean first = true; - - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_to_vals_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); - } - - public partition_name_to_vals_result() { - } - - public partition_name_to_vals_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public partition_name_to_vals_result(partition_name_to_vals_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public partition_name_to_vals_result deepCopy() { - return new partition_name_to_vals_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof partition_name_to_vals_result) - return this.equals((partition_name_to_vals_result)that); - return false; - } - - public boolean equals(partition_name_to_vals_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(partition_name_to_vals_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("partition_name_to_vals_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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 _list1128 = iprot.readListBegin(); - struct.success = new ArrayList(_list1128.size); - String _elem1129; - for (int _i1130 = 0; _i1130 < _list1128.size; ++_i1130) - { - _elem1129 = iprot.readString(); - struct.success.add(_elem1129); - } - 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 _iter1131 : struct.success) - { - oprot.writeString(_iter1131); - } - 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 _iter1132 : struct.success) - { - oprot.writeString(_iter1132); - } - } - } - 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 _list1133 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list1133.size); - String _elem1134; - for (int _i1135 = 0; _i1135 < _list1133.size; ++_i1135) - { - _elem1134 = iprot.readString(); - struct.success.add(_elem1134); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_to_spec_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PART_NAME((short)1, "part_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PART_NAME - return PART_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partition_name_to_spec_args.class, metaDataMap); - } - - public partition_name_to_spec_args() { - } - - public partition_name_to_spec_args( - String part_name) - { - this(); - this.part_name = part_name; - } - - /** - * Performs a deep copy on other. - */ - public partition_name_to_spec_args(partition_name_to_spec_args other) { - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - } - - public partition_name_to_spec_args deepCopy() { - return new partition_name_to_spec_args(this); - } - - @Override - public void clear() { - this.part_name = null; - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; - } - - public void setPart_nameIsSet(boolean value) { - if (!value) { - this.part_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PART_NAME: - return getPart_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PART_NAME: - return isSetPart_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof partition_name_to_spec_args) - return this.equals((partition_name_to_spec_args)that); - return false; - } - - public boolean equals(partition_name_to_spec_args that) { - if (that == null) - return false; - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_part_name = true && (isSetPart_name()); - list.add(present_part_name); - if (present_part_name) - list.add(part_name); - - return list.hashCode(); - } - - @Override - public int compareTo(partition_name_to_spec_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("partition_name_to_spec_args("); - boolean first = true; - - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_to_spec_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partition_name_to_spec_result.class, metaDataMap); - } - - public partition_name_to_spec_result() { - } - - public partition_name_to_spec_result( - Map success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public partition_name_to_spec_result(partition_name_to_spec_result other) { - if (other.isSetSuccess()) { - Map __this__success = new HashMap(other.success); - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public partition_name_to_spec_result deepCopy() { - return new partition_name_to_spec_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public void putToSuccess(String key, String val) { - if (this.success == null) { - this.success = new HashMap(); - } - this.success.put(key, val); - } - - public Map getSuccess() { - return this.success; - } - - public void setSuccess(Map success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Map)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof partition_name_to_spec_result) - return this.equals((partition_name_to_spec_result)that); - return false; - } - - public boolean equals(partition_name_to_spec_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(partition_name_to_spec_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("partition_name_to_spec_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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 _map1136 = iprot.readMapBegin(); - struct.success = new HashMap(2*_map1136.size); - String _key1137; - String _val1138; - for (int _i1139 = 0; _i1139 < _map1136.size; ++_i1139) - { - _key1137 = iprot.readString(); - _val1138 = iprot.readString(); - struct.success.put(_key1137, _val1138); - } - 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 _iter1140 : struct.success.entrySet()) - { - oprot.writeString(_iter1140.getKey()); - oprot.writeString(_iter1140.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 _iter1141 : struct.success.entrySet()) - { - oprot.writeString(_iter1141.getKey()); - oprot.writeString(_iter1141.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 _map1142 = 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*_map1142.size); - String _key1143; - String _val1144; - for (int _i1145 = 0; _i1145 < _map1142.size; ++_i1145) - { - _key1143 = iprot.readString(); - _val1144 = iprot.readString(); - struct.success.put(_key1143, _val1144); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPartitionForEvent_args"); - - 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 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.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 - private PartitionEventType eventType; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - /** - * - * @see PartitionEventType - */ - EVENT_TYPE((short)4, "eventType"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // EVENT_TYPE - return EVENT_TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.EVENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("eventType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PartitionEventType.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPartitionForEvent_args.class, metaDataMap); - } - - public markPartitionForEvent_args() { - } - - public markPartitionForEvent_args( - String db_name, - String tbl_name, - Map part_vals, - PartitionEventType eventType) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.eventType = eventType; - } - - /** - * Performs a deep copy on other. - */ - public markPartitionForEvent_args(markPartitionForEvent_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - Map __this__part_vals = new HashMap(other.part_vals); - this.part_vals = __this__part_vals; - } - if (other.isSetEventType()) { - this.eventType = other.eventType; - } - } - - public markPartitionForEvent_args deepCopy() { - return new markPartitionForEvent_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - this.eventType = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public void putToPart_vals(String key, String val) { - if (this.part_vals == null) { - this.part_vals = new HashMap(); - } - this.part_vals.put(key, val); - } - - public Map getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(Map part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - /** - * - * @see PartitionEventType - */ - public PartitionEventType getEventType() { - return this.eventType; - } - - /** - * - * @see PartitionEventType - */ - public void setEventType(PartitionEventType eventType) { - this.eventType = eventType; - } - - public void unsetEventType() { - this.eventType = null; - } - - /** Returns true if field eventType is set (has been assigned a value) and false otherwise */ - public boolean isSetEventType() { - return this.eventType != null; - } - - public void setEventTypeIsSet(boolean value) { - if (!value) { - this.eventType = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((Map)value); - } - break; - - case EVENT_TYPE: - if (value == null) { - unsetEventType(); - } else { - setEventType((PartitionEventType)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case EVENT_TYPE: - return getEventType(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case EVENT_TYPE: - return isSetEventType(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof markPartitionForEvent_args) - return this.equals((markPartitionForEvent_args)that); - return false; - } - - public boolean equals(markPartitionForEvent_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_eventType = true && this.isSetEventType(); - boolean that_present_eventType = true && that.isSetEventType(); - if (this_present_eventType || that_present_eventType) { - if (!(this_present_eventType && that_present_eventType)) - return false; - if (!this.eventType.equals(that.eventType)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - boolean present_eventType = true && (isSetEventType()); - list.add(present_eventType); - if (present_eventType) - list.add(eventType.getValue()); - - return list.hashCode(); - } - - @Override - public int compareTo(markPartitionForEvent_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEventType()).compareTo(other.isSetEventType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEventType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, other.eventType); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("markPartitionForEvent_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("eventType:"); - if (this.eventType == null) { - sb.append("null"); - } else { - sb.append(this.eventType); - } - 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 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 _map1146 = iprot.readMapBegin(); - struct.part_vals = new HashMap(2*_map1146.size); - String _key1147; - String _val1148; - for (int _i1149 = 0; _i1149 < _map1146.size; ++_i1149) - { - _key1147 = iprot.readString(); - _val1148 = iprot.readString(); - struct.part_vals.put(_key1147, _val1148); - } - 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 = org.apache.hadoop.hive.metastore.api.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 _iter1150 : struct.part_vals.entrySet()) - { - oprot.writeString(_iter1150.getKey()); - oprot.writeString(_iter1150.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 _iter1151 : struct.part_vals.entrySet()) - { - oprot.writeString(_iter1151.getKey()); - oprot.writeString(_iter1151.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 _map1152 = 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*_map1152.size); - String _key1153; - String _val1154; - for (int _i1155 = 0; _i1155 < _map1152.size; ++_i1155) - { - _key1153 = iprot.readString(); - _val1154 = iprot.readString(); - struct.part_vals.put(_key1153, _val1154); - } - } - struct.setPart_valsIsSet(true); - } - if (incoming.get(3)) { - struct.eventType = org.apache.hadoop.hive.metastore.api.PartitionEventType.findByValue(iprot.readI32()); - struct.setEventTypeIsSet(true); - } - } - } - - } - - public static class markPartitionForEvent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPartitionForEvent_result"); - - 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 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 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 - private UnknownTableException o4; // required - private UnknownPartitionException o5; // required - private InvalidPartitionException o6; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"), - O5((short)5, "o5"), - O6((short)6, "o6"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - case 5: // O5 - return O5; - case 6: // O6 - return O6; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O5, new org.apache.thrift.meta_data.FieldMetaData("o5", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O6, new org.apache.thrift.meta_data.FieldMetaData("o6", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPartitionForEvent_result.class, metaDataMap); - } - - public markPartitionForEvent_result() { - } - - public markPartitionForEvent_result( - MetaException o1, - NoSuchObjectException o2, - UnknownDBException o3, - UnknownTableException o4, - UnknownPartitionException o5, - InvalidPartitionException o6) - { - this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - this.o5 = o5; - this.o6 = o6; - } - - /** - * Performs a deep copy on other. - */ - public markPartitionForEvent_result(markPartitionForEvent_result other) { - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new UnknownTableException(other.o4); - } - if (other.isSetO5()) { - this.o5 = new UnknownPartitionException(other.o5); - } - if (other.isSetO6()) { - this.o6 = new InvalidPartitionException(other.o6); - } - } - - public markPartitionForEvent_result deepCopy() { - return new markPartitionForEvent_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - this.o5 = null; - this.o6 = null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public UnknownDBException getO3() { - return this.o3; - } - - public void setO3(UnknownDBException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public UnknownTableException getO4() { - return this.o4; - } - - public void setO4(UnknownTableException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public UnknownPartitionException getO5() { - return this.o5; - } - - public void setO5(UnknownPartitionException o5) { - this.o5 = o5; - } - - public void unsetO5() { - this.o5 = null; - } - - /** Returns true if field o5 is set (has been assigned a value) and false otherwise */ - public boolean isSetO5() { - return this.o5 != null; - } - - public void setO5IsSet(boolean value) { - if (!value) { - this.o5 = null; - } - } - - public InvalidPartitionException getO6() { - return this.o6; - } - - public void setO6(InvalidPartitionException o6) { - this.o6 = o6; - } - - public void unsetO6() { - this.o6 = null; - } - - /** Returns true if field o6 is set (has been assigned a value) and false otherwise */ - public boolean isSetO6() { - return this.o6 != null; - } - - public void setO6IsSet(boolean value) { - if (!value) { - this.o6 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((UnknownTableException)value); - } - break; - - case O5: - if (value == null) { - unsetO5(); - } else { - setO5((UnknownPartitionException)value); - } - break; - - case O6: - if (value == null) { - unsetO6(); - } else { - setO6((InvalidPartitionException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - case O5: - return getO5(); - - case O6: - return getO6(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - case O5: - return isSetO5(); - case O6: - return isSetO6(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof markPartitionForEvent_result) - return this.equals((markPartitionForEvent_result)that); - return false; - } - - public boolean equals(markPartitionForEvent_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - boolean this_present_o5 = true && this.isSetO5(); - boolean that_present_o5 = true && that.isSetO5(); - if (this_present_o5 || that_present_o5) { - if (!(this_present_o5 && that_present_o5)) - return false; - if (!this.o5.equals(that.o5)) - return false; - } - - boolean this_present_o6 = true && this.isSetO6(); - boolean that_present_o6 = true && that.isSetO6(); - if (this_present_o6 || that_present_o6) { - if (!(this_present_o6 && that_present_o6)) - return false; - if (!this.o6.equals(that.o6)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - boolean present_o5 = true && (isSetO5()); - list.add(present_o5); - if (present_o5) - list.add(o5); - - boolean present_o6 = true && (isSetO6()); - list.add(present_o6); - if (present_o6) - list.add(o6); - - return list.hashCode(); - } - - @Override - public int compareTo(markPartitionForEvent_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO5()).compareTo(other.isSetO5()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO5()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o5, other.o5); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO6()).compareTo(other.isSetO6()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO6()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o6, other.o6); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("markPartitionForEvent_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - first = false; - if (!first) sb.append(", "); - sb.append("o5:"); - if (this.o5 == null) { - sb.append("null"); - } else { - sb.append(this.o5); - } - first = false; - if (!first) sb.append(", "); - sb.append("o6:"); - if (this.o6 == null) { - sb.append("null"); - } else { - sb.append(this.o6); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isPartitionMarkedForEvent_args"); - - 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 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.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 - private PartitionEventType eventType; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - /** - * - * @see PartitionEventType - */ - EVENT_TYPE((short)4, "eventType"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // EVENT_TYPE - return EVENT_TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.EVENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("eventType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PartitionEventType.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isPartitionMarkedForEvent_args.class, metaDataMap); - } - - public isPartitionMarkedForEvent_args() { - } - - public isPartitionMarkedForEvent_args( - String db_name, - String tbl_name, - Map part_vals, - PartitionEventType eventType) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.eventType = eventType; - } - - /** - * Performs a deep copy on other. - */ - public isPartitionMarkedForEvent_args(isPartitionMarkedForEvent_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - Map __this__part_vals = new HashMap(other.part_vals); - this.part_vals = __this__part_vals; - } - if (other.isSetEventType()) { - this.eventType = other.eventType; - } - } - - public isPartitionMarkedForEvent_args deepCopy() { - return new isPartitionMarkedForEvent_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - this.eventType = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public void putToPart_vals(String key, String val) { - if (this.part_vals == null) { - this.part_vals = new HashMap(); - } - this.part_vals.put(key, val); - } - - public Map getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(Map part_vals) { - this.part_vals = part_vals; - } - - public void unsetPart_vals() { - this.part_vals = null; - } - - /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; - } - - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } - } - - /** - * - * @see PartitionEventType - */ - public PartitionEventType getEventType() { - return this.eventType; - } - - /** - * - * @see PartitionEventType - */ - public void setEventType(PartitionEventType eventType) { - this.eventType = eventType; - } - - public void unsetEventType() { - this.eventType = null; - } - - /** Returns true if field eventType is set (has been assigned a value) and false otherwise */ - public boolean isSetEventType() { - return this.eventType != null; - } - - public void setEventTypeIsSet(boolean value) { - if (!value) { - this.eventType = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((Map)value); - } - break; - - case EVENT_TYPE: - if (value == null) { - unsetEventType(); - } else { - setEventType((PartitionEventType)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); - - case EVENT_TYPE: - return getEventType(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case EVENT_TYPE: - return isSetEventType(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof isPartitionMarkedForEvent_args) - return this.equals((isPartitionMarkedForEvent_args)that); - return false; - } - - public boolean equals(isPartitionMarkedForEvent_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) - return false; - if (!this.part_vals.equals(that.part_vals)) - return false; - } - - boolean this_present_eventType = true && this.isSetEventType(); - boolean that_present_eventType = true && that.isSetEventType(); - if (this_present_eventType || that_present_eventType) { - if (!(this_present_eventType && that_present_eventType)) - return false; - if (!this.eventType.equals(that.eventType)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_vals = true && (isSetPart_vals()); - list.add(present_part_vals); - if (present_part_vals) - list.add(part_vals); - - boolean present_eventType = true && (isSetEventType()); - list.add(present_eventType); - if (present_eventType) - list.add(eventType.getValue()); - - return list.hashCode(); - } - - @Override - public int compareTo(isPartitionMarkedForEvent_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_vals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEventType()).compareTo(other.isSetEventType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEventType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, other.eventType); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("isPartitionMarkedForEvent_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } - first = false; - if (!first) sb.append(", "); - sb.append("eventType:"); - if (this.eventType == null) { - sb.append("null"); - } else { - sb.append(this.eventType); - } - 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 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 _map1156 = iprot.readMapBegin(); - struct.part_vals = new HashMap(2*_map1156.size); - String _key1157; - String _val1158; - for (int _i1159 = 0; _i1159 < _map1156.size; ++_i1159) - { - _key1157 = iprot.readString(); - _val1158 = iprot.readString(); - struct.part_vals.put(_key1157, _val1158); - } - 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 = org.apache.hadoop.hive.metastore.api.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 _iter1160 : struct.part_vals.entrySet()) - { - oprot.writeString(_iter1160.getKey()); - oprot.writeString(_iter1160.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 _iter1161 : struct.part_vals.entrySet()) - { - oprot.writeString(_iter1161.getKey()); - oprot.writeString(_iter1161.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 _map1162 = 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*_map1162.size); - String _key1163; - String _val1164; - for (int _i1165 = 0; _i1165 < _map1162.size; ++_i1165) - { - _key1163 = iprot.readString(); - _val1164 = iprot.readString(); - struct.part_vals.put(_key1163, _val1164); - } - } - struct.setPart_valsIsSet(true); - } - if (incoming.get(3)) { - struct.eventType = org.apache.hadoop.hive.metastore.api.PartitionEventType.findByValue(iprot.readI32()); - struct.setEventTypeIsSet(true); - } - } - } - - } - - public static class isPartitionMarkedForEvent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isPartitionMarkedForEvent_result"); - - 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 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 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 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 - private UnknownDBException o3; // required - private UnknownTableException o4; // required - private UnknownPartitionException o5; // required - private InvalidPartitionException o6; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"), - O5((short)5, "o5"), - O6((short)6, "o6"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - case 5: // O5 - return O5; - case 6: // O6 - return O6; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O5, new org.apache.thrift.meta_data.FieldMetaData("o5", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O6, new org.apache.thrift.meta_data.FieldMetaData("o6", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isPartitionMarkedForEvent_result.class, metaDataMap); - } - - public isPartitionMarkedForEvent_result() { - } - - public isPartitionMarkedForEvent_result( - boolean success, - MetaException o1, - NoSuchObjectException o2, - UnknownDBException o3, - UnknownTableException o4, - UnknownPartitionException o5, - InvalidPartitionException o6) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - this.o5 = o5; - this.o6 = o6; - } - - /** - * Performs a deep copy on other. - */ - public isPartitionMarkedForEvent_result(isPartitionMarkedForEvent_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new UnknownTableException(other.o4); - } - if (other.isSetO5()) { - this.o5 = new UnknownPartitionException(other.o5); - } - if (other.isSetO6()) { - this.o6 = new InvalidPartitionException(other.o6); - } - } - - public isPartitionMarkedForEvent_result deepCopy() { - return new isPartitionMarkedForEvent_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - this.o5 = null; - this.o6 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public UnknownDBException getO3() { - return this.o3; - } - - public void setO3(UnknownDBException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public UnknownTableException getO4() { - return this.o4; - } - - public void setO4(UnknownTableException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public UnknownPartitionException getO5() { - return this.o5; - } - - public void setO5(UnknownPartitionException o5) { - this.o5 = o5; - } - - public void unsetO5() { - this.o5 = null; - } - - /** Returns true if field o5 is set (has been assigned a value) and false otherwise */ - public boolean isSetO5() { - return this.o5 != null; - } - - public void setO5IsSet(boolean value) { - if (!value) { - this.o5 = null; - } - } - - public InvalidPartitionException getO6() { - return this.o6; - } - - public void setO6(InvalidPartitionException o6) { - this.o6 = o6; - } - - public void unsetO6() { - this.o6 = null; - } - - /** Returns true if field o6 is set (has been assigned a value) and false otherwise */ - public boolean isSetO6() { - return this.o6 != null; - } - - public void setO6IsSet(boolean value) { - if (!value) { - this.o6 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((UnknownTableException)value); - } - break; - - case O5: - if (value == null) { - unsetO5(); - } else { - setO5((UnknownPartitionException)value); - } - break; - - case O6: - if (value == null) { - unsetO6(); - } else { - setO6((InvalidPartitionException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - case O5: - return getO5(); - - case O6: - return getO6(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - case O5: - return isSetO5(); - case O6: - return isSetO6(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof isPartitionMarkedForEvent_result) - return this.equals((isPartitionMarkedForEvent_result)that); - return false; - } - - public boolean equals(isPartitionMarkedForEvent_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - boolean this_present_o5 = true && this.isSetO5(); - boolean that_present_o5 = true && that.isSetO5(); - if (this_present_o5 || that_present_o5) { - if (!(this_present_o5 && that_present_o5)) - return false; - if (!this.o5.equals(that.o5)) - return false; - } - - boolean this_present_o6 = true && this.isSetO6(); - boolean that_present_o6 = true && that.isSetO6(); - if (this_present_o6 || that_present_o6) { - if (!(this_present_o6 && that_present_o6)) - return false; - if (!this.o6.equals(that.o6)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - boolean present_o5 = true && (isSetO5()); - list.add(present_o5); - if (present_o5) - list.add(o5); - - boolean present_o6 = true && (isSetO6()); - list.add(present_o6); - if (present_o6) - list.add(o6); - - return list.hashCode(); - } - - @Override - public int compareTo(isPartitionMarkedForEvent_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO5()).compareTo(other.isSetO5()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO5()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o5, other.o5); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO6()).compareTo(other.isSetO6()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO6()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o6, other.o6); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("isPartitionMarkedForEvent_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - first = false; - if (!first) sb.append(", "); - sb.append("o5:"); - if (this.o5 == null) { - sb.append("null"); - } else { - sb.append(this.o5); - } - first = false; - if (!first) sb.append(", "); - sb.append("o6:"); - if (this.o6 == null) { - sb.append("null"); - } else { - sb.append(this.o6); - } - 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 { - // 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_index_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NEW_INDEX((short)1, "new_index"), - INDEX_TABLE((short)2, "index_table"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NEW_INDEX - return NEW_INDEX; - case 2: // INDEX_TABLE - return INDEX_TABLE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.NEW_INDEX, new org.apache.thrift.meta_data.FieldMetaData("new_index", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class))); - tmpMap.put(_Fields.INDEX_TABLE, new org.apache.thrift.meta_data.FieldMetaData("index_table", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap); - } - - public add_index_args() { - } - - public add_index_args( - Index new_index, - Table index_table) - { - this(); - this.new_index = new_index; - this.index_table = index_table; - } - - /** - * Performs a deep copy on other. - */ - public add_index_args(add_index_args other) { - if (other.isSetNew_index()) { - this.new_index = new Index(other.new_index); - } - if (other.isSetIndex_table()) { - this.index_table = new Table(other.index_table); - } - } - - public add_index_args deepCopy() { - return new add_index_args(this); - } - - @Override - public void clear() { - this.new_index = null; - this.index_table = null; - } - - public Index getNew_index() { - return this.new_index; - } - - public void setNew_index(Index new_index) { - this.new_index = new_index; - } - - public void unsetNew_index() { - this.new_index = null; - } - - /** Returns true if field new_index is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_index() { - return this.new_index != null; - } - - public void setNew_indexIsSet(boolean value) { - if (!value) { - this.new_index = null; - } - } - - public Table getIndex_table() { - return this.index_table; - } - - public void setIndex_table(Table index_table) { - this.index_table = index_table; - } - - public void unsetIndex_table() { - this.index_table = null; - } - - /** Returns true if field index_table is set (has been assigned a value) and false otherwise */ - public boolean isSetIndex_table() { - return this.index_table != null; - } - - public void setIndex_tableIsSet(boolean value) { - if (!value) { - this.index_table = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NEW_INDEX: - if (value == null) { - unsetNew_index(); - } else { - setNew_index((Index)value); - } - break; - - case INDEX_TABLE: - if (value == null) { - unsetIndex_table(); - } else { - setIndex_table((Table)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NEW_INDEX: - return getNew_index(); - - case INDEX_TABLE: - return getIndex_table(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NEW_INDEX: - return isSetNew_index(); - case INDEX_TABLE: - return isSetIndex_table(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_index_args) - return this.equals((add_index_args)that); - return false; - } - - public boolean equals(add_index_args that) { - if (that == null) - return false; - - boolean this_present_new_index = true && this.isSetNew_index(); - boolean that_present_new_index = true && that.isSetNew_index(); - if (this_present_new_index || that_present_new_index) { - if (!(this_present_new_index && that_present_new_index)) - return false; - if (!this.new_index.equals(that.new_index)) - return false; - } - - boolean this_present_index_table = true && this.isSetIndex_table(); - boolean that_present_index_table = true && that.isSetIndex_table(); - if (this_present_index_table || that_present_index_table) { - if (!(this_present_index_table && that_present_index_table)) - return false; - if (!this.index_table.equals(that.index_table)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_new_index = true && (isSetNew_index()); - list.add(present_new_index); - if (present_new_index) - list.add(new_index); - - boolean present_index_table = true && (isSetIndex_table()); - list.add(present_index_table); - if (present_index_table) - list.add(index_table); - - return list.hashCode(); - } - - @Override - public int compareTo(add_index_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetNew_index()).compareTo(other.isSetNew_index()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_index()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_index, other.new_index); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIndex_table()).compareTo(other.isSetIndex_table()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIndex_table()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_table, other.index_table); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_index_args("); - boolean first = true; - - sb.append("new_index:"); - if (this.new_index == null) { - sb.append("null"); - } else { - sb.append(this.new_index); - } - first = false; - if (!first) sb.append(", "); - sb.append("index_table:"); - if (this.index_table == null) { - sb.append("null"); - } else { - sb.append(this.index_table); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_index_result"); - - 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 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 - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_index_result.class, metaDataMap); - } - - public add_index_result() { - } - - public add_index_result( - Index success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public add_index_result(add_index_result other) { - if (other.isSetSuccess()) { - this.success = new Index(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public add_index_result deepCopy() { - return new add_index_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public Index getSuccess() { - return this.success; - } - - public void setSuccess(Index success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public InvalidObjectException getO1() { - return this.o1; - } - - public void setO1(InvalidObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public AlreadyExistsException getO2() { - return this.o2; - } - - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Index)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_index_result) - return this.equals((add_index_result)that); - return false; - } - - public boolean equals(add_index_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(add_index_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_index_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_index_args"); - - 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 BASE_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("base_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); - 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 - private Index new_idx; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DBNAME((short)1, "dbname"), - BASE_TBL_NAME((short)2, "base_tbl_name"), - IDX_NAME((short)3, "idx_name"), - NEW_IDX((short)4, "new_idx"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // BASE_TBL_NAME - return BASE_TBL_NAME; - case 3: // IDX_NAME - return IDX_NAME; - case 4: // NEW_IDX - return NEW_IDX; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.BASE_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("base_tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IDX_NAME, new org.apache.thrift.meta_data.FieldMetaData("idx_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NEW_IDX, new org.apache.thrift.meta_data.FieldMetaData("new_idx", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_index_args.class, metaDataMap); - } - - public alter_index_args() { - } - - public alter_index_args( - String dbname, - String base_tbl_name, - String idx_name, - Index new_idx) - { - this(); - this.dbname = dbname; - this.base_tbl_name = base_tbl_name; - this.idx_name = idx_name; - this.new_idx = new_idx; - } - - /** - * Performs a deep copy on other. - */ - public alter_index_args(alter_index_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetBase_tbl_name()) { - this.base_tbl_name = other.base_tbl_name; - } - if (other.isSetIdx_name()) { - this.idx_name = other.idx_name; - } - if (other.isSetNew_idx()) { - this.new_idx = new Index(other.new_idx); - } - } - - public alter_index_args deepCopy() { - return new alter_index_args(this); - } - - @Override - public void clear() { - this.dbname = null; - this.base_tbl_name = null; - this.idx_name = null; - this.new_idx = null; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getBase_tbl_name() { - return this.base_tbl_name; - } - - public void setBase_tbl_name(String base_tbl_name) { - this.base_tbl_name = base_tbl_name; - } - - public void unsetBase_tbl_name() { - this.base_tbl_name = null; - } - - /** Returns true if field base_tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetBase_tbl_name() { - return this.base_tbl_name != null; - } - - public void setBase_tbl_nameIsSet(boolean value) { - if (!value) { - this.base_tbl_name = null; - } - } - - public String getIdx_name() { - return this.idx_name; - } - - public void setIdx_name(String idx_name) { - this.idx_name = idx_name; - } - - public void unsetIdx_name() { - this.idx_name = null; - } - - /** Returns true if field idx_name is set (has been assigned a value) and false otherwise */ - public boolean isSetIdx_name() { - return this.idx_name != null; - } - - public void setIdx_nameIsSet(boolean value) { - if (!value) { - this.idx_name = null; - } - } - - public Index getNew_idx() { - return this.new_idx; - } - - public void setNew_idx(Index new_idx) { - this.new_idx = new_idx; - } - - public void unsetNew_idx() { - this.new_idx = null; - } - - /** Returns true if field new_idx is set (has been assigned a value) and false otherwise */ - public boolean isSetNew_idx() { - return this.new_idx != null; - } - - public void setNew_idxIsSet(boolean value) { - if (!value) { - this.new_idx = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case BASE_TBL_NAME: - if (value == null) { - unsetBase_tbl_name(); - } else { - setBase_tbl_name((String)value); - } - break; - - case IDX_NAME: - if (value == null) { - unsetIdx_name(); - } else { - setIdx_name((String)value); - } - break; - - case NEW_IDX: - if (value == null) { - unsetNew_idx(); - } else { - setNew_idx((Index)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DBNAME: - return getDbname(); - - case BASE_TBL_NAME: - return getBase_tbl_name(); - - case IDX_NAME: - return getIdx_name(); - - case NEW_IDX: - return getNew_idx(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DBNAME: - return isSetDbname(); - case BASE_TBL_NAME: - return isSetBase_tbl_name(); - case IDX_NAME: - return isSetIdx_name(); - case NEW_IDX: - return isSetNew_idx(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_index_args) - return this.equals((alter_index_args)that); - return false; - } - - public boolean equals(alter_index_args that) { - if (that == null) - return false; - - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_base_tbl_name = true && this.isSetBase_tbl_name(); - boolean that_present_base_tbl_name = true && that.isSetBase_tbl_name(); - if (this_present_base_tbl_name || that_present_base_tbl_name) { - if (!(this_present_base_tbl_name && that_present_base_tbl_name)) - return false; - if (!this.base_tbl_name.equals(that.base_tbl_name)) - return false; - } - - boolean this_present_idx_name = true && this.isSetIdx_name(); - boolean that_present_idx_name = true && that.isSetIdx_name(); - if (this_present_idx_name || that_present_idx_name) { - if (!(this_present_idx_name && that_present_idx_name)) - return false; - if (!this.idx_name.equals(that.idx_name)) - return false; - } - - boolean this_present_new_idx = true && this.isSetNew_idx(); - boolean that_present_new_idx = true && that.isSetNew_idx(); - if (this_present_new_idx || that_present_new_idx) { - if (!(this_present_new_idx && that_present_new_idx)) - return false; - if (!this.new_idx.equals(that.new_idx)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); - - boolean present_base_tbl_name = true && (isSetBase_tbl_name()); - list.add(present_base_tbl_name); - if (present_base_tbl_name) - list.add(base_tbl_name); - - boolean present_idx_name = true && (isSetIdx_name()); - list.add(present_idx_name); - if (present_idx_name) - list.add(idx_name); - - boolean present_new_idx = true && (isSetNew_idx()); - list.add(present_new_idx); - if (present_new_idx) - list.add(new_idx); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_index_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBase_tbl_name()).compareTo(other.isSetBase_tbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBase_tbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base_tbl_name, other.base_tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIdx_name()).compareTo(other.isSetIdx_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIdx_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.idx_name, other.idx_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNew_idx()).compareTo(other.isSetNew_idx()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNew_idx()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_idx, other.new_idx); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_index_args("); - boolean first = true; - - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("base_tbl_name:"); - if (this.base_tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.base_tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("idx_name:"); - if (this.idx_name == null) { - sb.append("null"); - } else { - sb.append(this.idx_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("new_idx:"); - if (this.new_idx == null) { - sb.append("null"); - } else { - sb.append(this.new_idx); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_index_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_index_result.class, metaDataMap); - } - - public alter_index_result() { - } - - public alter_index_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_index_result(alter_index_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public alter_index_result deepCopy() { - return new alter_index_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_index_result) - return this.equals((alter_index_result)that); - return false; - } - - public boolean equals(alter_index_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_index_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_index_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_index_by_name_args"); - - 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 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 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 - private boolean deleteData; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - INDEX_NAME((short)3, "index_name"), - DELETE_DATA((short)4, "deleteData"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // INDEX_NAME - return INDEX_NAME; - case 4: // DELETE_DATA - return DELETE_DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_index_by_name_args.class, metaDataMap); - } - - public drop_index_by_name_args() { - } - - public drop_index_by_name_args( - String db_name, - String tbl_name, - String index_name, - boolean deleteData) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public drop_index_by_name_args(drop_index_by_name_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetIndex_name()) { - this.index_name = other.index_name; - } - this.deleteData = other.deleteData; - } - - public drop_index_by_name_args deepCopy() { - return new drop_index_by_name_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.index_name = null; - setDeleteDataIsSet(false); - this.deleteData = false; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getIndex_name() { - return this.index_name; - } - - public void setIndex_name(String index_name) { - this.index_name = index_name; - } - - public void unsetIndex_name() { - this.index_name = null; - } - - /** Returns true if field index_name is set (has been assigned a value) and false otherwise */ - public boolean isSetIndex_name() { - return this.index_name != null; - } - - public void setIndex_nameIsSet(boolean value) { - if (!value) { - this.index_name = null; - } - } - - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case INDEX_NAME: - if (value == null) { - unsetIndex_name(); - } else { - setIndex_name((String)value); - } - break; - - case DELETE_DATA: - if (value == null) { - unsetDeleteData(); - } else { - setDeleteData((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case INDEX_NAME: - return getIndex_name(); - - case DELETE_DATA: - return isDeleteData(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case INDEX_NAME: - return isSetIndex_name(); - case DELETE_DATA: - return isSetDeleteData(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_index_by_name_args) - return this.equals((drop_index_by_name_args)that); - return false; - } - - public boolean equals(drop_index_by_name_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_index_name = true && this.isSetIndex_name(); - boolean that_present_index_name = true && that.isSetIndex_name(); - if (this_present_index_name || that_present_index_name) { - if (!(this_present_index_name && that_present_index_name)) - return false; - if (!this.index_name.equals(that.index_name)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_index_name = true && (isSetIndex_name()); - list.add(present_index_name); - if (present_index_name) - list.add(index_name); - - boolean present_deleteData = true; - list.add(present_deleteData); - if (present_deleteData) - list.add(deleteData); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_index_by_name_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(other.isSetIndex_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIndex_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, other.index_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDeleteData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_index_by_name_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("index_name:"); - if (this.index_name == null) { - sb.append("null"); - } else { - sb.append(this.index_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - 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 { - // 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_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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_index_by_name_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_index_by_name_result.class, metaDataMap); - } - - public drop_index_by_name_result() { - } - - public drop_index_by_name_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public drop_index_by_name_result(drop_index_by_name_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public drop_index_by_name_result deepCopy() { - return new drop_index_by_name_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_index_by_name_result) - return this.equals((drop_index_by_name_result)that); - return false; - } - - public boolean equals(drop_index_by_name_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_index_by_name_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_index_by_name_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 { - // 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_by_name_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - INDEX_NAME((short)3, "index_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // INDEX_NAME - return INDEX_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); - } - - public get_index_by_name_args() { - } - - public get_index_by_name_args( - String db_name, - String tbl_name, - String index_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; - } - - /** - * Performs a deep copy on other. - */ - public get_index_by_name_args(get_index_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetIndex_name()) { - this.index_name = other.index_name; - } - } - - public get_index_by_name_args deepCopy() { - return new get_index_by_name_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.index_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getIndex_name() { - return this.index_name; - } - - public void setIndex_name(String index_name) { - this.index_name = index_name; - } - - public void unsetIndex_name() { - this.index_name = null; - } - - /** Returns true if field index_name is set (has been assigned a value) and false otherwise */ - public boolean isSetIndex_name() { - return this.index_name != null; - } - - public void setIndex_nameIsSet(boolean value) { - if (!value) { - this.index_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case INDEX_NAME: - if (value == null) { - unsetIndex_name(); - } else { - setIndex_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case INDEX_NAME: - return getIndex_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case INDEX_NAME: - return isSetIndex_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_index_by_name_args) - return this.equals((get_index_by_name_args)that); - return false; - } - - public boolean equals(get_index_by_name_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_index_name = true && this.isSetIndex_name(); - boolean that_present_index_name = true && that.isSetIndex_name(); - if (this_present_index_name || that_present_index_name) { - if (!(this_present_index_name && that_present_index_name)) - return false; - if (!this.index_name.equals(that.index_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_index_name = true && (isSetIndex_name()); - list.add(present_index_name); - if (present_index_name) - list.add(index_name); - - return list.hashCode(); - } - - @Override - public int compareTo(get_index_by_name_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(other.isSetIndex_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIndex_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, other.index_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_index_by_name_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("index_name:"); - if (this.index_name == null) { - sb.append("null"); - } else { - sb.append(this.index_name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_by_name_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_by_name_result.class, metaDataMap); - } - - public get_index_by_name_result() { - } - - public get_index_by_name_result( - Index success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_index_by_name_result(get_index_by_name_result other) { - if (other.isSetSuccess()) { - this.success = new Index(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_index_by_name_result deepCopy() { - return new get_index_by_name_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public Index getSuccess() { - return this.success; - } - - public void setSuccess(Index success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Index)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_index_by_name_result) - return this.equals((get_index_by_name_result)that); - return false; - } - - public boolean equals(get_index_by_name_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_index_by_name_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_index_by_name_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_indexes_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - MAX_INDEXES((short)3, "max_indexes"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // MAX_INDEXES - return MAX_INDEXES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAX_INDEXES_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_INDEXES, new org.apache.thrift.meta_data.FieldMetaData("max_indexes", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); - } - - public get_indexes_args() { - this.max_indexes = (short)-1; - - } - - public get_indexes_args( - String db_name, - String tbl_name, - short max_indexes) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public get_indexes_args(get_indexes_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - this.max_indexes = other.max_indexes; - } - - public get_indexes_args deepCopy() { - return new get_indexes_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_indexes = (short)-1; - - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public short getMax_indexes() { - return this.max_indexes; - } - - public void setMax_indexes(short max_indexes) { - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); - } - - public void unsetMax_indexes() { - __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 EncodingUtils.testBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); - } - - public void setMax_indexesIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case MAX_INDEXES: - if (value == null) { - unsetMax_indexes(); - } else { - setMax_indexes((Short)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case MAX_INDEXES: - return getMax_indexes(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_INDEXES: - return isSetMax_indexes(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_indexes_args) - return this.equals((get_indexes_args)that); - return false; - } - - public boolean equals(get_indexes_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_max_indexes = true; - boolean that_present_max_indexes = true; - if (this_present_max_indexes || that_present_max_indexes) { - if (!(this_present_max_indexes && that_present_max_indexes)) - return false; - if (this.max_indexes != that.max_indexes) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_max_indexes = true; - list.add(present_max_indexes); - if (present_max_indexes) - list.add(max_indexes); - - return list.hashCode(); - } - - @Override - public int compareTo(get_indexes_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(other.isSetMax_indexes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax_indexes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, other.max_indexes); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_indexes_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); - 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 { - // 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_indexes_result"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_indexes_result.class, metaDataMap); - } - - public get_indexes_result() { - } - - public get_indexes_result( - List success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_indexes_result(get_indexes_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (Index other_element : other.success) { - __this__success.add(new Index(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_indexes_result deepCopy() { - return new get_indexes_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Index elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_indexes_result) - return this.equals((get_indexes_result)that); - return false; - } - - public boolean equals(get_indexes_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_indexes_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_indexes_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 _list1166 = iprot.readListBegin(); - struct.success = new ArrayList(_list1166.size); - Index _elem1167; - for (int _i1168 = 0; _i1168 < _list1166.size; ++_i1168) - { - _elem1167 = new Index(); - _elem1167.read(iprot); - struct.success.add(_elem1167); - } - 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 _iter1169 : struct.success) - { - _iter1169.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 _iter1170 : struct.success) - { - _iter1170.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 _list1171 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list1171.size); - Index _elem1172; - for (int _i1173 = 0; _i1173 < _list1171.size; ++_i1173) - { - _elem1172 = new Index(); - _elem1172.read(iprot); - struct.success.add(_elem1172); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_names_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - MAX_INDEXES((short)3, "max_indexes"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // MAX_INDEXES - return MAX_INDEXES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAX_INDEXES_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_INDEXES, new org.apache.thrift.meta_data.FieldMetaData("max_indexes", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); - } - - public get_index_names_args() { - this.max_indexes = (short)-1; - - } - - public get_index_names_args( - String db_name, - String tbl_name, - short max_indexes) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public get_index_names_args(get_index_names_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - this.max_indexes = other.max_indexes; - } - - public get_index_names_args deepCopy() { - return new get_index_names_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_indexes = (short)-1; - - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public short getMax_indexes() { - return this.max_indexes; - } - - public void setMax_indexes(short max_indexes) { - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); - } - - public void unsetMax_indexes() { - __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 EncodingUtils.testBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); - } - - public void setMax_indexesIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case MAX_INDEXES: - if (value == null) { - unsetMax_indexes(); - } else { - setMax_indexes((Short)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case MAX_INDEXES: - return getMax_indexes(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_INDEXES: - return isSetMax_indexes(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_index_names_args) - return this.equals((get_index_names_args)that); - return false; - } - - public boolean equals(get_index_names_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_max_indexes = true; - boolean that_present_max_indexes = true; - if (this_present_max_indexes || that_present_max_indexes) { - if (!(this_present_max_indexes && that_present_max_indexes)) - return false; - if (this.max_indexes != that.max_indexes) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_max_indexes = true; - list.add(present_max_indexes); - if (present_max_indexes) - list.add(max_indexes); - - return list.hashCode(); - } - - @Override - public int compareTo(get_index_names_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(other.isSetMax_indexes()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMax_indexes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, other.max_indexes); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_index_names_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); - 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 { - // 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_names_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O2((short)1, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); - } - - public get_index_names_result() { - } - - public get_index_names_result( - List success, - MetaException o2) - { - this(); - this.success = success; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_index_names_result(get_index_names_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_index_names_result deepCopy() { - return new get_index_names_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o2 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_index_names_result) - return this.equals((get_index_names_result)that); - return false; - } - - public boolean equals(get_index_names_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_index_names_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_index_names_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 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 _list1174 = iprot.readListBegin(); - struct.success = new ArrayList(_list1174.size); - String _elem1175; - for (int _i1176 = 0; _i1176 < _list1174.size; ++_i1176) - { - _elem1175 = iprot.readString(); - struct.success.add(_elem1175); - } - 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 _iter1177 : struct.success) - { - oprot.writeString(_iter1177); - } - 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 _iter1178 : struct.success) - { - oprot.writeString(_iter1178); - } - } - } - 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 _list1179 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list1179.size); - String _elem1180; - for (int _i1181 = 0; _i1181 < _list1179.size; ++_i1181) - { - _elem1180 = iprot.readString(); - struct.success.add(_elem1180); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.o2 = new MetaException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - } - } - - } - - public static class get_primary_keys_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_primary_keys_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_primary_keys_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_primary_keys_argsTupleSchemeFactory()); - } - - private PrimaryKeysRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrimaryKeysRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_primary_keys_args.class, metaDataMap); - } - - public get_primary_keys_args() { - } - - public get_primary_keys_args( - PrimaryKeysRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public get_primary_keys_args(get_primary_keys_args other) { - if (other.isSetRequest()) { - this.request = new PrimaryKeysRequest(other.request); - } - } - - public get_primary_keys_args deepCopy() { - return new get_primary_keys_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public PrimaryKeysRequest getRequest() { - return this.request; - } - - public void setRequest(PrimaryKeysRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((PrimaryKeysRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_primary_keys_args) - return this.equals((get_primary_keys_args)that); - return false; - } - - public boolean equals(get_primary_keys_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(get_primary_keys_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_primary_keys_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 get_primary_keys_argsStandardSchemeFactory implements SchemeFactory { - public get_primary_keys_argsStandardScheme getScheme() { - return new get_primary_keys_argsStandardScheme(); - } - } - - private static class get_primary_keys_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_primary_keys_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new PrimaryKeysRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_primary_keys_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_primary_keys_argsTupleSchemeFactory implements SchemeFactory { - public get_primary_keys_argsTupleScheme getScheme() { - return new get_primary_keys_argsTupleScheme(); - } - } - - private static class get_primary_keys_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_primary_keys_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_primary_keys_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new PrimaryKeysRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class get_primary_keys_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_primary_keys_result"); - - 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 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_primary_keys_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_primary_keys_resultTupleSchemeFactory()); - } - - private PrimaryKeysResponse success; // required - private MetaException o1; // required - private NoSuchObjectException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrimaryKeysResponse.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_primary_keys_result.class, metaDataMap); - } - - public get_primary_keys_result() { - } - - public get_primary_keys_result( - PrimaryKeysResponse success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_primary_keys_result(get_primary_keys_result other) { - if (other.isSetSuccess()) { - this.success = new PrimaryKeysResponse(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_primary_keys_result deepCopy() { - return new get_primary_keys_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public PrimaryKeysResponse getSuccess() { - return this.success; - } - - public void setSuccess(PrimaryKeysResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((PrimaryKeysResponse)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_primary_keys_result) - return this.equals((get_primary_keys_result)that); - return false; - } - - public boolean equals(get_primary_keys_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_primary_keys_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_primary_keys_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_primary_keys_resultStandardSchemeFactory implements SchemeFactory { - public get_primary_keys_resultStandardScheme getScheme() { - return new get_primary_keys_resultStandardScheme(); - } - } - - private static class get_primary_keys_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_primary_keys_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 PrimaryKeysResponse(); - 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_primary_keys_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_primary_keys_resultTupleSchemeFactory implements SchemeFactory { - public get_primary_keys_resultTupleScheme getScheme() { - return new get_primary_keys_resultTupleScheme(); - } - } - - private static class get_primary_keys_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_primary_keys_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_primary_keys_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new PrimaryKeysResponse(); - 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_foreign_keys_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_foreign_keys_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_foreign_keys_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_foreign_keys_argsTupleSchemeFactory()); - } - - private ForeignKeysRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ForeignKeysRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_foreign_keys_args.class, metaDataMap); - } - - public get_foreign_keys_args() { - } - - public get_foreign_keys_args( - ForeignKeysRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public get_foreign_keys_args(get_foreign_keys_args other) { - if (other.isSetRequest()) { - this.request = new ForeignKeysRequest(other.request); - } - } - - public get_foreign_keys_args deepCopy() { - return new get_foreign_keys_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public ForeignKeysRequest getRequest() { - return this.request; - } - - public void setRequest(ForeignKeysRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((ForeignKeysRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_foreign_keys_args) - return this.equals((get_foreign_keys_args)that); - return false; - } - - public boolean equals(get_foreign_keys_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(get_foreign_keys_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_foreign_keys_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 get_foreign_keys_argsStandardSchemeFactory implements SchemeFactory { - public get_foreign_keys_argsStandardScheme getScheme() { - return new get_foreign_keys_argsStandardScheme(); - } - } - - private static class get_foreign_keys_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_foreign_keys_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new ForeignKeysRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_foreign_keys_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_foreign_keys_argsTupleSchemeFactory implements SchemeFactory { - public get_foreign_keys_argsTupleScheme getScheme() { - return new get_foreign_keys_argsTupleScheme(); - } - } - - private static class get_foreign_keys_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_foreign_keys_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_foreign_keys_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new ForeignKeysRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class get_foreign_keys_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_foreign_keys_result"); - - 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 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_foreign_keys_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_foreign_keys_resultTupleSchemeFactory()); - } - - private ForeignKeysResponse success; // required - private MetaException o1; // required - private NoSuchObjectException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ForeignKeysResponse.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_foreign_keys_result.class, metaDataMap); - } - - public get_foreign_keys_result() { - } - - public get_foreign_keys_result( - ForeignKeysResponse success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_foreign_keys_result(get_foreign_keys_result other) { - if (other.isSetSuccess()) { - this.success = new ForeignKeysResponse(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_foreign_keys_result deepCopy() { - return new get_foreign_keys_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public ForeignKeysResponse getSuccess() { - return this.success; - } - - public void setSuccess(ForeignKeysResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((ForeignKeysResponse)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_foreign_keys_result) - return this.equals((get_foreign_keys_result)that); - return false; - } - - public boolean equals(get_foreign_keys_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_foreign_keys_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_foreign_keys_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_foreign_keys_resultStandardSchemeFactory implements SchemeFactory { - public get_foreign_keys_resultStandardScheme getScheme() { - return new get_foreign_keys_resultStandardScheme(); - } - } - - private static class get_foreign_keys_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_foreign_keys_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 ForeignKeysResponse(); - 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_foreign_keys_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_foreign_keys_resultTupleSchemeFactory implements SchemeFactory { - public get_foreign_keys_resultTupleScheme getScheme() { - return new get_foreign_keys_resultTupleScheme(); - } - } - - private static class get_foreign_keys_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_foreign_keys_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_foreign_keys_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new ForeignKeysResponse(); - 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_unique_constraints_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_unique_constraints_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_unique_constraints_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_unique_constraints_argsTupleSchemeFactory()); - } - - private UniqueConstraintsRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UniqueConstraintsRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_unique_constraints_args.class, metaDataMap); - } - - public get_unique_constraints_args() { - } - - public get_unique_constraints_args( - UniqueConstraintsRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public get_unique_constraints_args(get_unique_constraints_args other) { - if (other.isSetRequest()) { - this.request = new UniqueConstraintsRequest(other.request); - } - } - - public get_unique_constraints_args deepCopy() { - return new get_unique_constraints_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public UniqueConstraintsRequest getRequest() { - return this.request; - } - - public void setRequest(UniqueConstraintsRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((UniqueConstraintsRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_unique_constraints_args) - return this.equals((get_unique_constraints_args)that); - return false; - } - - public boolean equals(get_unique_constraints_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(get_unique_constraints_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_unique_constraints_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 get_unique_constraints_argsStandardSchemeFactory implements SchemeFactory { - public get_unique_constraints_argsStandardScheme getScheme() { - return new get_unique_constraints_argsStandardScheme(); - } - } - - private static class get_unique_constraints_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_unique_constraints_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new UniqueConstraintsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_unique_constraints_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_unique_constraints_argsTupleSchemeFactory implements SchemeFactory { - public get_unique_constraints_argsTupleScheme getScheme() { - return new get_unique_constraints_argsTupleScheme(); - } - } - - private static class get_unique_constraints_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_unique_constraints_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_unique_constraints_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new UniqueConstraintsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class get_unique_constraints_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_unique_constraints_result"); - - 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 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_unique_constraints_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_unique_constraints_resultTupleSchemeFactory()); - } - - private UniqueConstraintsResponse success; // required - private MetaException o1; // required - private NoSuchObjectException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UniqueConstraintsResponse.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_unique_constraints_result.class, metaDataMap); - } - - public get_unique_constraints_result() { - } - - public get_unique_constraints_result( - UniqueConstraintsResponse success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_unique_constraints_result(get_unique_constraints_result other) { - if (other.isSetSuccess()) { - this.success = new UniqueConstraintsResponse(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_unique_constraints_result deepCopy() { - return new get_unique_constraints_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public UniqueConstraintsResponse getSuccess() { - return this.success; - } - - public void setSuccess(UniqueConstraintsResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((UniqueConstraintsResponse)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_unique_constraints_result) - return this.equals((get_unique_constraints_result)that); - return false; - } - - public boolean equals(get_unique_constraints_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_unique_constraints_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_unique_constraints_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_unique_constraints_resultStandardSchemeFactory implements SchemeFactory { - public get_unique_constraints_resultStandardScheme getScheme() { - return new get_unique_constraints_resultStandardScheme(); - } - } - - private static class get_unique_constraints_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_unique_constraints_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 UniqueConstraintsResponse(); - 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_unique_constraints_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_unique_constraints_resultTupleSchemeFactory implements SchemeFactory { - public get_unique_constraints_resultTupleScheme getScheme() { - return new get_unique_constraints_resultTupleScheme(); - } - } - - private static class get_unique_constraints_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_unique_constraints_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_unique_constraints_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new UniqueConstraintsResponse(); - 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_not_null_constraints_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_not_null_constraints_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_not_null_constraints_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_not_null_constraints_argsTupleSchemeFactory()); - } - - private NotNullConstraintsRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NotNullConstraintsRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_not_null_constraints_args.class, metaDataMap); - } - - public get_not_null_constraints_args() { - } - - public get_not_null_constraints_args( - NotNullConstraintsRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public get_not_null_constraints_args(get_not_null_constraints_args other) { - if (other.isSetRequest()) { - this.request = new NotNullConstraintsRequest(other.request); - } - } - - public get_not_null_constraints_args deepCopy() { - return new get_not_null_constraints_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public NotNullConstraintsRequest getRequest() { - return this.request; - } - - public void setRequest(NotNullConstraintsRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((NotNullConstraintsRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_not_null_constraints_args) - return this.equals((get_not_null_constraints_args)that); - return false; - } - - public boolean equals(get_not_null_constraints_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(get_not_null_constraints_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_not_null_constraints_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 get_not_null_constraints_argsStandardSchemeFactory implements SchemeFactory { - public get_not_null_constraints_argsStandardScheme getScheme() { - return new get_not_null_constraints_argsStandardScheme(); - } - } - - private static class get_not_null_constraints_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_not_null_constraints_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new NotNullConstraintsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_not_null_constraints_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_not_null_constraints_argsTupleSchemeFactory implements SchemeFactory { - public get_not_null_constraints_argsTupleScheme getScheme() { - return new get_not_null_constraints_argsTupleScheme(); - } - } - - private static class get_not_null_constraints_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_not_null_constraints_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_not_null_constraints_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new NotNullConstraintsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class get_not_null_constraints_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_not_null_constraints_result"); - - 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 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_not_null_constraints_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_not_null_constraints_resultTupleSchemeFactory()); - } - - private NotNullConstraintsResponse success; // required - private MetaException o1; // required - private NoSuchObjectException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NotNullConstraintsResponse.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_not_null_constraints_result.class, metaDataMap); - } - - public get_not_null_constraints_result() { - } - - public get_not_null_constraints_result( - NotNullConstraintsResponse success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_not_null_constraints_result(get_not_null_constraints_result other) { - if (other.isSetSuccess()) { - this.success = new NotNullConstraintsResponse(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_not_null_constraints_result deepCopy() { - return new get_not_null_constraints_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public NotNullConstraintsResponse getSuccess() { - return this.success; - } - - public void setSuccess(NotNullConstraintsResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((NotNullConstraintsResponse)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_not_null_constraints_result) - return this.equals((get_not_null_constraints_result)that); - return false; - } - - public boolean equals(get_not_null_constraints_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_not_null_constraints_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_not_null_constraints_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_not_null_constraints_resultStandardSchemeFactory implements SchemeFactory { - public get_not_null_constraints_resultStandardScheme getScheme() { - return new get_not_null_constraints_resultStandardScheme(); - } - } - - private static class get_not_null_constraints_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_not_null_constraints_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 NotNullConstraintsResponse(); - 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_not_null_constraints_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_not_null_constraints_resultTupleSchemeFactory implements SchemeFactory { - public get_not_null_constraints_resultTupleScheme getScheme() { - return new get_not_null_constraints_resultTupleScheme(); - } - } - - private static class get_not_null_constraints_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_not_null_constraints_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_not_null_constraints_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new NotNullConstraintsResponse(); - 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 update_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_table_column_statistics_args"); - - private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("stats_obj", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new update_table_column_statistics_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new update_table_column_statistics_argsTupleSchemeFactory()); - } - - private ColumnStatistics stats_obj; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - STATS_OBJ((short)1, "stats_obj"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STATS_OBJ - return STATS_OBJ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("stats_obj", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_table_column_statistics_args.class, metaDataMap); - } - - public update_table_column_statistics_args() { - } - - public update_table_column_statistics_args( - ColumnStatistics stats_obj) - { - this(); - this.stats_obj = stats_obj; - } - - /** - * Performs a deep copy on other. - */ - public update_table_column_statistics_args(update_table_column_statistics_args other) { - if (other.isSetStats_obj()) { - this.stats_obj = new ColumnStatistics(other.stats_obj); - } - } - - public update_table_column_statistics_args deepCopy() { - return new update_table_column_statistics_args(this); - } - - @Override - public void clear() { - this.stats_obj = null; - } - - public ColumnStatistics getStats_obj() { - return this.stats_obj; - } - - public void setStats_obj(ColumnStatistics stats_obj) { - this.stats_obj = stats_obj; - } - - public void unsetStats_obj() { - this.stats_obj = null; - } - - /** Returns true if field stats_obj is set (has been assigned a value) and false otherwise */ - public boolean isSetStats_obj() { - return this.stats_obj != null; - } - - public void setStats_objIsSet(boolean value) { - if (!value) { - this.stats_obj = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case STATS_OBJ: - if (value == null) { - unsetStats_obj(); - } else { - setStats_obj((ColumnStatistics)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case STATS_OBJ: - return getStats_obj(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case STATS_OBJ: - return isSetStats_obj(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof update_table_column_statistics_args) - return this.equals((update_table_column_statistics_args)that); - return false; - } - - public boolean equals(update_table_column_statistics_args that) { - if (that == null) - return false; - - boolean this_present_stats_obj = true && this.isSetStats_obj(); - boolean that_present_stats_obj = true && that.isSetStats_obj(); - if (this_present_stats_obj || that_present_stats_obj) { - if (!(this_present_stats_obj && that_present_stats_obj)) - return false; - if (!this.stats_obj.equals(that.stats_obj)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_stats_obj = true && (isSetStats_obj()); - list.add(present_stats_obj); - if (present_stats_obj) - list.add(stats_obj); - - return list.hashCode(); - } - - @Override - public int compareTo(update_table_column_statistics_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetStats_obj()).compareTo(other.isSetStats_obj()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStats_obj()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stats_obj, other.stats_obj); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("update_table_column_statistics_args("); - boolean first = true; - - sb.append("stats_obj:"); - if (this.stats_obj == null) { - sb.append("null"); - } else { - sb.append(this.stats_obj); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (stats_obj != null) { - stats_obj.validate(); - } - } - - 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 update_table_column_statistics_argsStandardSchemeFactory implements SchemeFactory { - public update_table_column_statistics_argsStandardScheme getScheme() { - return new update_table_column_statistics_argsStandardScheme(); - } - } - - private static class update_table_column_statistics_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, update_table_column_statistics_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: // STATS_OBJ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.stats_obj = new ColumnStatistics(); - struct.stats_obj.read(iprot); - struct.setStats_objIsSet(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, update_table_column_statistics_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.stats_obj != null) { - oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); - struct.stats_obj.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class update_table_column_statistics_argsTupleSchemeFactory implements SchemeFactory { - public update_table_column_statistics_argsTupleScheme getScheme() { - return new update_table_column_statistics_argsTupleScheme(); - } - } - - private static class update_table_column_statistics_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetStats_obj()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetStats_obj()) { - struct.stats_obj.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.stats_obj = new ColumnStatistics(); - struct.stats_obj.read(iprot); - struct.setStats_objIsSet(true); - } - } - } - - } - - public static class update_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_table_column_statistics_result"); - - 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 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 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 update_table_column_statistics_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new update_table_column_statistics_resultTupleSchemeFactory()); - } - - private boolean success; // required - private NoSuchObjectException o1; // required - private InvalidObjectException o2; // required - private MetaException o3; // required - private InvalidInputException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_table_column_statistics_result.class, metaDataMap); - } - - public update_table_column_statistics_result() { - } - - public update_table_column_statistics_result( - boolean success, - NoSuchObjectException o1, - InvalidObjectException o2, - MetaException o3, - InvalidInputException o4) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public update_table_column_statistics_result(update_table_column_statistics_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new InvalidInputException(other.o4); - } - } - - public update_table_column_statistics_result deepCopy() { - return new update_table_column_statistics_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public InvalidInputException getO4() { - return this.o4; - } - - public void setO4(InvalidInputException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((InvalidInputException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof update_table_column_statistics_result) - return this.equals((update_table_column_statistics_result)that); - return false; - } - - public boolean equals(update_table_column_statistics_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(update_table_column_statistics_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("update_table_column_statistics_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - 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 { - // 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 update_table_column_statistics_resultStandardSchemeFactory implements SchemeFactory { - public update_table_column_statistics_resultStandardScheme getScheme() { - return new update_table_column_statistics_resultStandardScheme(); - } - } - - private static class update_table_column_statistics_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, update_table_column_statistics_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 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 InvalidInputException(); - 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, update_table_column_statistics_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class update_table_column_statistics_resultTupleSchemeFactory implements SchemeFactory { - public update_table_column_statistics_resultTupleScheme getScheme() { - return new update_table_column_statistics_resultTupleScheme(); - } - } - - private static class update_table_column_statistics_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_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); - } - oprot.writeBitSet(optionals, 5); - 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); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - 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 InvalidObjectException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - if (incoming.get(3)) { - struct.o3 = new MetaException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } - if (incoming.get(4)) { - struct.o4 = new InvalidInputException(); - struct.o4.read(iprot); - struct.setO4IsSet(true); - } - } - } - - } - - public static class update_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_partition_column_statistics_args"); - - private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("stats_obj", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new update_partition_column_statistics_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new update_partition_column_statistics_argsTupleSchemeFactory()); - } - - private ColumnStatistics stats_obj; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - STATS_OBJ((short)1, "stats_obj"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STATS_OBJ - return STATS_OBJ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("stats_obj", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_partition_column_statistics_args.class, metaDataMap); - } - - public update_partition_column_statistics_args() { - } - - public update_partition_column_statistics_args( - ColumnStatistics stats_obj) - { - this(); - this.stats_obj = stats_obj; - } - - /** - * Performs a deep copy on other. - */ - public update_partition_column_statistics_args(update_partition_column_statistics_args other) { - if (other.isSetStats_obj()) { - this.stats_obj = new ColumnStatistics(other.stats_obj); - } - } - - public update_partition_column_statistics_args deepCopy() { - return new update_partition_column_statistics_args(this); - } - - @Override - public void clear() { - this.stats_obj = null; - } - - public ColumnStatistics getStats_obj() { - return this.stats_obj; - } - - public void setStats_obj(ColumnStatistics stats_obj) { - this.stats_obj = stats_obj; - } - - public void unsetStats_obj() { - this.stats_obj = null; - } - - /** Returns true if field stats_obj is set (has been assigned a value) and false otherwise */ - public boolean isSetStats_obj() { - return this.stats_obj != null; - } - - public void setStats_objIsSet(boolean value) { - if (!value) { - this.stats_obj = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case STATS_OBJ: - if (value == null) { - unsetStats_obj(); - } else { - setStats_obj((ColumnStatistics)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case STATS_OBJ: - return getStats_obj(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case STATS_OBJ: - return isSetStats_obj(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof update_partition_column_statistics_args) - return this.equals((update_partition_column_statistics_args)that); - return false; - } - - public boolean equals(update_partition_column_statistics_args that) { - if (that == null) - return false; - - boolean this_present_stats_obj = true && this.isSetStats_obj(); - boolean that_present_stats_obj = true && that.isSetStats_obj(); - if (this_present_stats_obj || that_present_stats_obj) { - if (!(this_present_stats_obj && that_present_stats_obj)) - return false; - if (!this.stats_obj.equals(that.stats_obj)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_stats_obj = true && (isSetStats_obj()); - list.add(present_stats_obj); - if (present_stats_obj) - list.add(stats_obj); - - return list.hashCode(); - } - - @Override - public int compareTo(update_partition_column_statistics_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetStats_obj()).compareTo(other.isSetStats_obj()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStats_obj()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stats_obj, other.stats_obj); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("update_partition_column_statistics_args("); - boolean first = true; - - sb.append("stats_obj:"); - if (this.stats_obj == null) { - sb.append("null"); - } else { - sb.append(this.stats_obj); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (stats_obj != null) { - stats_obj.validate(); - } - } - - 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 update_partition_column_statistics_argsStandardSchemeFactory implements SchemeFactory { - public update_partition_column_statistics_argsStandardScheme getScheme() { - return new update_partition_column_statistics_argsStandardScheme(); - } - } - - private static class update_partition_column_statistics_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, update_partition_column_statistics_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: // STATS_OBJ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.stats_obj = new ColumnStatistics(); - struct.stats_obj.read(iprot); - struct.setStats_objIsSet(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, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.stats_obj != null) { - oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); - struct.stats_obj.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class update_partition_column_statistics_argsTupleSchemeFactory implements SchemeFactory { - public update_partition_column_statistics_argsTupleScheme getScheme() { - return new update_partition_column_statistics_argsTupleScheme(); - } - } - - private static class update_partition_column_statistics_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetStats_obj()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetStats_obj()) { - struct.stats_obj.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.stats_obj = new ColumnStatistics(); - struct.stats_obj.read(iprot); - struct.setStats_objIsSet(true); - } - } - } - - } - - public static class update_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_partition_column_statistics_result"); - - 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 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 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 update_partition_column_statistics_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new update_partition_column_statistics_resultTupleSchemeFactory()); - } - - private boolean success; // required - private NoSuchObjectException o1; // required - private InvalidObjectException o2; // required - private MetaException o3; // required - private InvalidInputException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_partition_column_statistics_result.class, metaDataMap); - } - - public update_partition_column_statistics_result() { - } - - public update_partition_column_statistics_result( - boolean success, - NoSuchObjectException o1, - InvalidObjectException o2, - MetaException o3, - InvalidInputException o4) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public update_partition_column_statistics_result(update_partition_column_statistics_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new InvalidInputException(other.o4); - } - } - - public update_partition_column_statistics_result deepCopy() { - return new update_partition_column_statistics_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public InvalidInputException getO4() { - return this.o4; - } - - public void setO4(InvalidInputException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((InvalidInputException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof update_partition_column_statistics_result) - return this.equals((update_partition_column_statistics_result)that); - return false; - } - - public boolean equals(update_partition_column_statistics_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(update_partition_column_statistics_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("update_partition_column_statistics_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - 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 { - // 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 update_partition_column_statistics_resultStandardSchemeFactory implements SchemeFactory { - public update_partition_column_statistics_resultStandardScheme getScheme() { - return new update_partition_column_statistics_resultStandardScheme(); - } - } - - private static class update_partition_column_statistics_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, update_partition_column_statistics_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 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 InvalidInputException(); - 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, update_partition_column_statistics_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class update_partition_column_statistics_resultTupleSchemeFactory implements SchemeFactory { - public update_partition_column_statistics_resultTupleScheme getScheme() { - return new update_partition_column_statistics_resultTupleScheme(); - } - } - - private static class update_partition_column_statistics_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_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); - } - oprot.writeBitSet(optionals, 5); - 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); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - 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 InvalidObjectException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - if (incoming.get(3)) { - struct.o3 = new MetaException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } - if (incoming.get(4)) { - struct.o4 = new InvalidInputException(); - struct.o4.read(iprot); - struct.setO4IsSet(true); - } - } - } - - } - - public static class get_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_column_statistics_args"); - - 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 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 COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_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_table_column_statistics_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_table_column_statistics_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - private String col_name; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - COL_NAME((short)3, "col_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // COL_NAME - return COL_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_column_statistics_args.class, metaDataMap); - } - - public get_table_column_statistics_args() { - } - - public get_table_column_statistics_args( - String db_name, - String tbl_name, - String col_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.col_name = col_name; - } - - /** - * Performs a deep copy on other. - */ - public get_table_column_statistics_args(get_table_column_statistics_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetCol_name()) { - this.col_name = other.col_name; - } - } - - public get_table_column_statistics_args deepCopy() { - return new get_table_column_statistics_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.col_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getCol_name() { - return this.col_name; - } - - public void setCol_name(String col_name) { - this.col_name = col_name; - } - - public void unsetCol_name() { - this.col_name = null; - } - - /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ - public boolean isSetCol_name() { - return this.col_name != null; - } - - public void setCol_nameIsSet(boolean value) { - if (!value) { - this.col_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case COL_NAME: - if (value == null) { - unsetCol_name(); - } else { - setCol_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case COL_NAME: - return getCol_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case COL_NAME: - return isSetCol_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_column_statistics_args) - return this.equals((get_table_column_statistics_args)that); - return false; - } - - public boolean equals(get_table_column_statistics_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_col_name = true && this.isSetCol_name(); - boolean that_present_col_name = true && that.isSetCol_name(); - if (this_present_col_name || that_present_col_name) { - if (!(this_present_col_name && that_present_col_name)) - return false; - if (!this.col_name.equals(that.col_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_col_name = true && (isSetCol_name()); - list.add(present_col_name); - if (present_col_name) - list.add(col_name); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_column_statistics_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(other.isSetCol_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCol_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.col_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_column_statistics_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("col_name:"); - if (this.col_name == null) { - sb.append("null"); - } else { - sb.append(this.col_name); - } - 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 get_table_column_statistics_argsStandardSchemeFactory implements SchemeFactory { - public get_table_column_statistics_argsStandardScheme getScheme() { - return new get_table_column_statistics_argsStandardScheme(); - } - } - - private static class get_table_column_statistics_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_column_statistics_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: // COL_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.col_name = iprot.readString(); - struct.setCol_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_column_statistics_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.col_name != null) { - oprot.writeFieldBegin(COL_NAME_FIELD_DESC); - oprot.writeString(struct.col_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_table_column_statistics_argsTupleSchemeFactory implements SchemeFactory { - public get_table_column_statistics_argsTupleScheme getScheme() { - return new get_table_column_statistics_argsTupleScheme(); - } - } - - private static class get_table_column_statistics_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_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.isSetCol_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.isSetCol_name()) { - oprot.writeString(struct.col_name); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_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.col_name = iprot.readString(); - struct.setCol_nameIsSet(true); - } - } - } - - } - - public static class get_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_column_statistics_result"); - - 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 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 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 get_table_column_statistics_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_table_column_statistics_resultTupleSchemeFactory()); - } - - private ColumnStatistics success; // required - private NoSuchObjectException o1; // required - private MetaException o2; // required - private InvalidInputException o3; // required - private InvalidObjectException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_column_statistics_result.class, metaDataMap); - } - - public get_table_column_statistics_result() { - } - - public get_table_column_statistics_result( - ColumnStatistics success, - NoSuchObjectException o1, - MetaException o2, - InvalidInputException o3, - InvalidObjectException o4) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public get_table_column_statistics_result(get_table_column_statistics_result other) { - if (other.isSetSuccess()) { - this.success = new ColumnStatistics(other.success); - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new InvalidInputException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new InvalidObjectException(other.o4); - } - } - - public get_table_column_statistics_result deepCopy() { - return new get_table_column_statistics_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public ColumnStatistics getSuccess() { - return this.success; - } - - public void setSuccess(ColumnStatistics success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public InvalidInputException getO3() { - return this.o3; - } - - public void setO3(InvalidInputException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public InvalidObjectException getO4() { - return this.o4; - } - - public void setO4(InvalidObjectException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((ColumnStatistics)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((InvalidInputException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((InvalidObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_column_statistics_result) - return this.equals((get_table_column_statistics_result)that); - return false; - } - - public boolean equals(get_table_column_statistics_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_column_statistics_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_column_statistics_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_table_column_statistics_resultStandardSchemeFactory implements SchemeFactory { - public get_table_column_statistics_resultStandardScheme getScheme() { - return new get_table_column_statistics_resultStandardScheme(); - } - } - - private static class get_table_column_statistics_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_column_statistics_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 ColumnStatistics(); - 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; - case 3: // O3 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.o3 = new InvalidInputException(); - 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 InvalidObjectException(); - 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, get_table_column_statistics_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(); - } - if (struct.o4 != null) { - oprot.writeFieldBegin(O4_FIELD_DESC); - struct.o4.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_table_column_statistics_resultTupleSchemeFactory implements SchemeFactory { - public get_table_column_statistics_resultTupleScheme getScheme() { - return new get_table_column_statistics_resultTupleScheme(); - } - } - - private static class get_table_column_statistics_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_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); - } - oprot.writeBitSet(optionals, 5); - 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); - } - if (struct.isSetO4()) { - struct.o4.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.success = new ColumnStatistics(); - 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); - } - if (incoming.get(3)) { - struct.o3 = new InvalidInputException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } - if (incoming.get(4)) { - struct.o4 = new InvalidObjectException(); - struct.o4.read(iprot); - struct.setO4IsSet(true); - } - } - } - - } - - public static class get_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_column_statistics_args"); - - 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 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 org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_partition_column_statistics_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_partition_column_statistics_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - private String part_name; // required - private String col_name; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_NAME((short)3, "part_name"), - COL_NAME((short)4, "col_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_NAME - return PART_NAME; - case 4: // COL_NAME - return COL_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_column_statistics_args.class, metaDataMap); - } - - public get_partition_column_statistics_args() { - } - - public get_partition_column_statistics_args( - String db_name, - String tbl_name, - String part_name, - String col_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.col_name = col_name; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_column_statistics_args(get_partition_column_statistics_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - if (other.isSetCol_name()) { - this.col_name = other.col_name; - } - } - - public get_partition_column_statistics_args deepCopy() { - return new get_partition_column_statistics_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_name = null; - this.col_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; - } - - public void setPart_nameIsSet(boolean value) { - if (!value) { - this.part_name = null; - } - } - - public String getCol_name() { - return this.col_name; - } - - public void setCol_name(String col_name) { - this.col_name = col_name; - } - - public void unsetCol_name() { - this.col_name = null; - } - - /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ - public boolean isSetCol_name() { - return this.col_name != null; - } - - public void setCol_nameIsSet(boolean value) { - if (!value) { - this.col_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - case COL_NAME: - if (value == null) { - unsetCol_name(); - } else { - setCol_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_NAME: - return getPart_name(); - - case COL_NAME: - return getCol_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); - case COL_NAME: - return isSetCol_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_column_statistics_args) - return this.equals((get_partition_column_statistics_args)that); - return false; - } - - public boolean equals(get_partition_column_statistics_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - boolean this_present_col_name = true && this.isSetCol_name(); - boolean that_present_col_name = true && that.isSetCol_name(); - if (this_present_col_name || that_present_col_name) { - if (!(this_present_col_name && that_present_col_name)) - return false; - if (!this.col_name.equals(that.col_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_name = true && (isSetPart_name()); - list.add(present_part_name); - if (present_part_name) - list.add(part_name); - - boolean present_col_name = true && (isSetCol_name()); - list.add(present_col_name); - if (present_col_name) - list.add(col_name); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partition_column_statistics_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(other.isSetCol_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCol_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.col_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partition_column_statistics_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("col_name:"); - if (this.col_name == null) { - sb.append("null"); - } else { - sb.append(this.col_name); - } - 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 get_partition_column_statistics_argsStandardSchemeFactory implements SchemeFactory { - public get_partition_column_statistics_argsStandardScheme getScheme() { - return new get_partition_column_statistics_argsStandardScheme(); - } - } - - private static class get_partition_column_statistics_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_column_statistics_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: // COL_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.col_name = iprot.readString(); - struct.setCol_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_column_statistics_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(); - } - if (struct.col_name != null) { - oprot.writeFieldBegin(COL_NAME_FIELD_DESC); - oprot.writeString(struct.col_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_partition_column_statistics_argsTupleSchemeFactory implements SchemeFactory { - public get_partition_column_statistics_argsTupleScheme getScheme() { - return new get_partition_column_statistics_argsTupleScheme(); - } - } - - private static class get_partition_column_statistics_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_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.isSetCol_name()) { - 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.isSetCol_name()) { - oprot.writeString(struct.col_name); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_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.col_name = iprot.readString(); - struct.setCol_nameIsSet(true); - } - } - } - - } - - public static class get_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_column_statistics_result"); - - 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 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 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 get_partition_column_statistics_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_partition_column_statistics_resultTupleSchemeFactory()); - } - - private ColumnStatistics success; // required - private NoSuchObjectException o1; // required - private MetaException o2; // required - private InvalidInputException o3; // required - private InvalidObjectException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_column_statistics_result.class, metaDataMap); - } - - public get_partition_column_statistics_result() { - } - - public get_partition_column_statistics_result( - ColumnStatistics success, - NoSuchObjectException o1, - MetaException o2, - InvalidInputException o3, - InvalidObjectException o4) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public get_partition_column_statistics_result(get_partition_column_statistics_result other) { - if (other.isSetSuccess()) { - this.success = new ColumnStatistics(other.success); - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new InvalidInputException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new InvalidObjectException(other.o4); - } - } - - public get_partition_column_statistics_result deepCopy() { - return new get_partition_column_statistics_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public ColumnStatistics getSuccess() { - return this.success; - } - - public void setSuccess(ColumnStatistics success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public InvalidInputException getO3() { - return this.o3; - } - - public void setO3(InvalidInputException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public InvalidObjectException getO4() { - return this.o4; - } - - public void setO4(InvalidObjectException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((ColumnStatistics)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((InvalidInputException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((InvalidObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partition_column_statistics_result) - return this.equals((get_partition_column_statistics_result)that); - return false; - } - - public boolean equals(get_partition_column_statistics_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partition_column_statistics_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partition_column_statistics_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_partition_column_statistics_resultStandardSchemeFactory implements SchemeFactory { - public get_partition_column_statistics_resultStandardScheme getScheme() { - return new get_partition_column_statistics_resultStandardScheme(); - } - } - - private static class get_partition_column_statistics_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_column_statistics_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 ColumnStatistics(); - 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; - case 3: // O3 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.o3 = new InvalidInputException(); - 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 InvalidObjectException(); - 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, get_partition_column_statistics_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(); - } - if (struct.o4 != null) { - oprot.writeFieldBegin(O4_FIELD_DESC); - struct.o4.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_partition_column_statistics_resultTupleSchemeFactory implements SchemeFactory { - public get_partition_column_statistics_resultTupleScheme getScheme() { - return new get_partition_column_statistics_resultTupleScheme(); - } - } - - private static class get_partition_column_statistics_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_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); - } - oprot.writeBitSet(optionals, 5); - 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); - } - if (struct.isSetO4()) { - struct.o4.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.success = new ColumnStatistics(); - 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); - } - if (incoming.get(3)) { - struct.o3 = new InvalidInputException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } - if (incoming.get(4)) { - struct.o4 = new InvalidObjectException(); - struct.o4.read(iprot); - struct.setO4IsSet(true); - } - } - } - - } - - public static class get_table_statistics_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_statistics_req_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_table_statistics_req_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_table_statistics_req_argsTupleSchemeFactory()); - } - - private TableStatsRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TableStatsRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_statistics_req_args.class, metaDataMap); - } - - public get_table_statistics_req_args() { - } - - public get_table_statistics_req_args( - TableStatsRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public get_table_statistics_req_args(get_table_statistics_req_args other) { - if (other.isSetRequest()) { - this.request = new TableStatsRequest(other.request); - } - } - - public get_table_statistics_req_args deepCopy() { - return new get_table_statistics_req_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public TableStatsRequest getRequest() { - return this.request; - } - - public void setRequest(TableStatsRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((TableStatsRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_statistics_req_args) - return this.equals((get_table_statistics_req_args)that); - return false; - } - - public boolean equals(get_table_statistics_req_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_statistics_req_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_statistics_req_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 get_table_statistics_req_argsStandardSchemeFactory implements SchemeFactory { - public get_table_statistics_req_argsStandardScheme getScheme() { - return new get_table_statistics_req_argsStandardScheme(); - } - } - - private static class get_table_statistics_req_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_statistics_req_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new TableStatsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_statistics_req_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_table_statistics_req_argsTupleSchemeFactory implements SchemeFactory { - public get_table_statistics_req_argsTupleScheme getScheme() { - return new get_table_statistics_req_argsTupleScheme(); - } - } - - private static class get_table_statistics_req_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_table_statistics_req_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_table_statistics_req_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new TableStatsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class get_table_statistics_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_statistics_req_result"); - - 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 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_statistics_req_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_table_statistics_req_resultTupleSchemeFactory()); - } - - private TableStatsResult success; // required - private NoSuchObjectException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TableStatsResult.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_statistics_req_result.class, metaDataMap); - } - - public get_table_statistics_req_result() { - } - - public get_table_statistics_req_result( - TableStatsResult success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_table_statistics_req_result(get_table_statistics_req_result other) { - if (other.isSetSuccess()) { - this.success = new TableStatsResult(other.success); - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_table_statistics_req_result deepCopy() { - return new get_table_statistics_req_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public TableStatsResult getSuccess() { - return this.success; - } - - public void setSuccess(TableStatsResult success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((TableStatsResult)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_table_statistics_req_result) - return this.equals((get_table_statistics_req_result)that); - return false; - } - - public boolean equals(get_table_statistics_req_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_table_statistics_req_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_table_statistics_req_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_table_statistics_req_resultStandardSchemeFactory implements SchemeFactory { - public get_table_statistics_req_resultStandardScheme getScheme() { - return new get_table_statistics_req_resultStandardScheme(); - } - } - - private static class get_table_statistics_req_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_statistics_req_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 TableStatsResult(); - 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_table_statistics_req_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_statistics_req_resultTupleSchemeFactory implements SchemeFactory { - public get_table_statistics_req_resultTupleScheme getScheme() { - return new get_table_statistics_req_resultTupleScheme(); - } - } - - private static class get_table_statistics_req_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_table_statistics_req_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_statistics_req_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new TableStatsResult(); - 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 get_partitions_statistics_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_statistics_req_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_partitions_statistics_req_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_partitions_statistics_req_argsTupleSchemeFactory()); - } - - private PartitionsStatsRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsStatsRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_statistics_req_args.class, metaDataMap); - } - - public get_partitions_statistics_req_args() { - } - - public get_partitions_statistics_req_args( - PartitionsStatsRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_statistics_req_args(get_partitions_statistics_req_args other) { - if (other.isSetRequest()) { - this.request = new PartitionsStatsRequest(other.request); - } - } - - public get_partitions_statistics_req_args deepCopy() { - return new get_partitions_statistics_req_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public PartitionsStatsRequest getRequest() { - return this.request; - } - - public void setRequest(PartitionsStatsRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((PartitionsStatsRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_statistics_req_args) - return this.equals((get_partitions_statistics_req_args)that); - return false; - } - - public boolean equals(get_partitions_statistics_req_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_statistics_req_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_statistics_req_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 get_partitions_statistics_req_argsStandardSchemeFactory implements SchemeFactory { - public get_partitions_statistics_req_argsStandardScheme getScheme() { - return new get_partitions_statistics_req_argsStandardScheme(); - } - } - - private static class get_partitions_statistics_req_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_statistics_req_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new PartitionsStatsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_statistics_req_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_partitions_statistics_req_argsTupleSchemeFactory implements SchemeFactory { - public get_partitions_statistics_req_argsTupleScheme getScheme() { - return new get_partitions_statistics_req_argsTupleScheme(); - } - } - - private static class get_partitions_statistics_req_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_statistics_req_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_statistics_req_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new PartitionsStatsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class get_partitions_statistics_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_statistics_req_result"); - - 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 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_statistics_req_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_partitions_statistics_req_resultTupleSchemeFactory()); - } - - private PartitionsStatsResult success; // required - private NoSuchObjectException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsStatsResult.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_statistics_req_result.class, metaDataMap); - } - - public get_partitions_statistics_req_result() { - } - - public get_partitions_statistics_req_result( - PartitionsStatsResult success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_statistics_req_result(get_partitions_statistics_req_result other) { - if (other.isSetSuccess()) { - this.success = new PartitionsStatsResult(other.success); - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_partitions_statistics_req_result deepCopy() { - return new get_partitions_statistics_req_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public PartitionsStatsResult getSuccess() { - return this.success; - } - - public void setSuccess(PartitionsStatsResult success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((PartitionsStatsResult)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_partitions_statistics_req_result) - return this.equals((get_partitions_statistics_req_result)that); - return false; - } - - public boolean equals(get_partitions_statistics_req_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_partitions_statistics_req_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_partitions_statistics_req_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_partitions_statistics_req_resultStandardSchemeFactory implements SchemeFactory { - public get_partitions_statistics_req_resultStandardScheme getScheme() { - return new get_partitions_statistics_req_resultStandardScheme(); - } - } - - private static class get_partitions_statistics_req_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_statistics_req_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 PartitionsStatsResult(); - 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_partitions_statistics_req_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_partitions_statistics_req_resultTupleSchemeFactory implements SchemeFactory { - public get_partitions_statistics_req_resultTupleScheme getScheme() { - return new get_partitions_statistics_req_resultTupleScheme(); - } - } - - private static class get_partitions_statistics_req_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_statistics_req_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_partitions_statistics_req_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new PartitionsStatsResult(); - 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 get_aggr_stats_for_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_aggr_stats_for_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_aggr_stats_for_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_aggr_stats_for_argsTupleSchemeFactory()); - } - - private PartitionsStatsRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsStatsRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_aggr_stats_for_args.class, metaDataMap); - } - - public get_aggr_stats_for_args() { - } - - public get_aggr_stats_for_args( - PartitionsStatsRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public get_aggr_stats_for_args(get_aggr_stats_for_args other) { - if (other.isSetRequest()) { - this.request = new PartitionsStatsRequest(other.request); - } - } - - public get_aggr_stats_for_args deepCopy() { - return new get_aggr_stats_for_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public PartitionsStatsRequest getRequest() { - return this.request; - } - - public void setRequest(PartitionsStatsRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((PartitionsStatsRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_aggr_stats_for_args) - return this.equals((get_aggr_stats_for_args)that); - return false; - } - - public boolean equals(get_aggr_stats_for_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(get_aggr_stats_for_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_aggr_stats_for_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 get_aggr_stats_for_argsStandardSchemeFactory implements SchemeFactory { - public get_aggr_stats_for_argsStandardScheme getScheme() { - return new get_aggr_stats_for_argsStandardScheme(); - } - } - - private static class get_aggr_stats_for_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_aggr_stats_for_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new PartitionsStatsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_aggr_stats_for_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_aggr_stats_for_argsTupleSchemeFactory implements SchemeFactory { - public get_aggr_stats_for_argsTupleScheme getScheme() { - return new get_aggr_stats_for_argsTupleScheme(); - } - } - - private static class get_aggr_stats_for_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_aggr_stats_for_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_aggr_stats_for_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new PartitionsStatsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class get_aggr_stats_for_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_aggr_stats_for_result"); - - 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 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_aggr_stats_for_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_aggr_stats_for_resultTupleSchemeFactory()); - } - - private AggrStats success; // required - private NoSuchObjectException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AggrStats.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_aggr_stats_for_result.class, metaDataMap); - } - - public get_aggr_stats_for_result() { - } - - public get_aggr_stats_for_result( - AggrStats success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_aggr_stats_for_result(get_aggr_stats_for_result other) { - if (other.isSetSuccess()) { - this.success = new AggrStats(other.success); - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_aggr_stats_for_result deepCopy() { - return new get_aggr_stats_for_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public AggrStats getSuccess() { - return this.success; - } - - public void setSuccess(AggrStats success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((AggrStats)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_aggr_stats_for_result) - return this.equals((get_aggr_stats_for_result)that); - return false; - } - - public boolean equals(get_aggr_stats_for_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_aggr_stats_for_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_aggr_stats_for_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_aggr_stats_for_resultStandardSchemeFactory implements SchemeFactory { - public get_aggr_stats_for_resultStandardScheme getScheme() { - return new get_aggr_stats_for_resultStandardScheme(); - } - } - - private static class get_aggr_stats_for_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_aggr_stats_for_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 AggrStats(); - 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_aggr_stats_for_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_aggr_stats_for_resultTupleSchemeFactory implements SchemeFactory { - public get_aggr_stats_for_resultTupleScheme getScheme() { - return new get_aggr_stats_for_resultTupleScheme(); - } - } - - private static class get_aggr_stats_for_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_aggr_stats_for_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_aggr_stats_for_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new AggrStats(); - 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 set_aggr_stats_for_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_aggr_stats_for_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new set_aggr_stats_for_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new set_aggr_stats_for_argsTupleSchemeFactory()); - } - - private SetPartitionsStatsRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SetPartitionsStatsRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_aggr_stats_for_args.class, metaDataMap); - } - - public set_aggr_stats_for_args() { - } - - public set_aggr_stats_for_args( - SetPartitionsStatsRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public set_aggr_stats_for_args(set_aggr_stats_for_args other) { - if (other.isSetRequest()) { - this.request = new SetPartitionsStatsRequest(other.request); - } - } - - public set_aggr_stats_for_args deepCopy() { - return new set_aggr_stats_for_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public SetPartitionsStatsRequest getRequest() { - return this.request; - } - - public void setRequest(SetPartitionsStatsRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((SetPartitionsStatsRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof set_aggr_stats_for_args) - return this.equals((set_aggr_stats_for_args)that); - return false; - } - - public boolean equals(set_aggr_stats_for_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(set_aggr_stats_for_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("set_aggr_stats_for_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 set_aggr_stats_for_argsStandardSchemeFactory implements SchemeFactory { - public set_aggr_stats_for_argsStandardScheme getScheme() { - return new set_aggr_stats_for_argsStandardScheme(); - } - } - - private static class set_aggr_stats_for_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, set_aggr_stats_for_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new SetPartitionsStatsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_aggr_stats_for_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class set_aggr_stats_for_argsTupleSchemeFactory implements SchemeFactory { - public set_aggr_stats_for_argsTupleScheme getScheme() { - return new set_aggr_stats_for_argsTupleScheme(); - } - } - - private static class set_aggr_stats_for_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, set_aggr_stats_for_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, set_aggr_stats_for_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new SetPartitionsStatsRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class set_aggr_stats_for_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_aggr_stats_for_result"); - - 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 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 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 set_aggr_stats_for_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new set_aggr_stats_for_resultTupleSchemeFactory()); - } - - private boolean success; // required - private NoSuchObjectException o1; // required - private InvalidObjectException o2; // required - private MetaException o3; // required - private InvalidInputException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_aggr_stats_for_result.class, metaDataMap); - } - - public set_aggr_stats_for_result() { - } - - public set_aggr_stats_for_result( - boolean success, - NoSuchObjectException o1, - InvalidObjectException o2, - MetaException o3, - InvalidInputException o4) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public set_aggr_stats_for_result(set_aggr_stats_for_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new InvalidInputException(other.o4); - } - } - - public set_aggr_stats_for_result deepCopy() { - return new set_aggr_stats_for_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public InvalidInputException getO4() { - return this.o4; - } - - public void setO4(InvalidInputException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((InvalidInputException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof set_aggr_stats_for_result) - return this.equals((set_aggr_stats_for_result)that); - return false; - } - - public boolean equals(set_aggr_stats_for_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(set_aggr_stats_for_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("set_aggr_stats_for_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - 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 { - // 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 set_aggr_stats_for_resultStandardSchemeFactory implements SchemeFactory { - public set_aggr_stats_for_resultStandardScheme getScheme() { - return new set_aggr_stats_for_resultStandardScheme(); - } - } - - private static class set_aggr_stats_for_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, set_aggr_stats_for_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 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 InvalidInputException(); - 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, set_aggr_stats_for_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class set_aggr_stats_for_resultTupleSchemeFactory implements SchemeFactory { - public set_aggr_stats_for_resultTupleScheme getScheme() { - return new set_aggr_stats_for_resultTupleScheme(); - } - } - - private static class set_aggr_stats_for_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, set_aggr_stats_for_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); - } - oprot.writeBitSet(optionals, 5); - 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); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, set_aggr_stats_for_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - 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 InvalidObjectException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - if (incoming.get(3)) { - struct.o3 = new MetaException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } - if (incoming.get(4)) { - struct.o4 = new InvalidInputException(); - struct.o4.read(iprot); - struct.setO4IsSet(true); - } - } - } - - } - - public static class delete_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_partition_column_statistics_args"); - - 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 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 org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new delete_partition_column_statistics_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new delete_partition_column_statistics_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - private String part_name; // required - private String col_name; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_NAME((short)3, "part_name"), - COL_NAME((short)4, "col_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_NAME - return PART_NAME; - case 4: // COL_NAME - return COL_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_partition_column_statistics_args.class, metaDataMap); - } - - public delete_partition_column_statistics_args() { - } - - public delete_partition_column_statistics_args( - String db_name, - String tbl_name, - String part_name, - String col_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.col_name = col_name; - } - - /** - * Performs a deep copy on other. - */ - public delete_partition_column_statistics_args(delete_partition_column_statistics_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - if (other.isSetCol_name()) { - this.col_name = other.col_name; - } - } - - public delete_partition_column_statistics_args deepCopy() { - return new delete_partition_column_statistics_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_name = null; - this.col_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getPart_name() { - return this.part_name; - } - - public void setPart_name(String part_name) { - this.part_name = part_name; - } - - public void unsetPart_name() { - this.part_name = null; - } - - /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; - } - - public void setPart_nameIsSet(boolean value) { - if (!value) { - this.part_name = null; - } - } - - public String getCol_name() { - return this.col_name; - } - - public void setCol_name(String col_name) { - this.col_name = col_name; - } - - public void unsetCol_name() { - this.col_name = null; - } - - /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ - public boolean isSetCol_name() { - return this.col_name != null; - } - - public void setCol_nameIsSet(boolean value) { - if (!value) { - this.col_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - case COL_NAME: - if (value == null) { - unsetCol_name(); - } else { - setCol_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_NAME: - return getPart_name(); - - case COL_NAME: - return getCol_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); - case COL_NAME: - return isSetCol_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof delete_partition_column_statistics_args) - return this.equals((delete_partition_column_statistics_args)that); - return false; - } - - public boolean equals(delete_partition_column_statistics_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - boolean this_present_col_name = true && this.isSetCol_name(); - boolean that_present_col_name = true && that.isSetCol_name(); - if (this_present_col_name || that_present_col_name) { - if (!(this_present_col_name && that_present_col_name)) - return false; - if (!this.col_name.equals(that.col_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_part_name = true && (isSetPart_name()); - list.add(present_part_name); - if (present_part_name) - list.add(part_name); - - boolean present_col_name = true && (isSetCol_name()); - list.add(present_col_name); - if (present_col_name) - list.add(col_name); - - return list.hashCode(); - } - - @Override - public int compareTo(delete_partition_column_statistics_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPart_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(other.isSetCol_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCol_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.col_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("delete_partition_column_statistics_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("col_name:"); - if (this.col_name == null) { - sb.append("null"); - } else { - sb.append(this.col_name); - } - 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 delete_partition_column_statistics_argsStandardSchemeFactory implements SchemeFactory { - public delete_partition_column_statistics_argsStandardScheme getScheme() { - return new delete_partition_column_statistics_argsStandardScheme(); - } - } - - private static class delete_partition_column_statistics_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, delete_partition_column_statistics_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: // COL_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.col_name = iprot.readString(); - struct.setCol_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, delete_partition_column_statistics_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(); - } - if (struct.col_name != null) { - oprot.writeFieldBegin(COL_NAME_FIELD_DESC); - oprot.writeString(struct.col_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class delete_partition_column_statistics_argsTupleSchemeFactory implements SchemeFactory { - public delete_partition_column_statistics_argsTupleScheme getScheme() { - return new delete_partition_column_statistics_argsTupleScheme(); - } - } - - private static class delete_partition_column_statistics_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_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.isSetCol_name()) { - 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.isSetCol_name()) { - oprot.writeString(struct.col_name); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_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.col_name = iprot.readString(); - struct.setCol_nameIsSet(true); - } - } - } - - } - - public static class delete_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_partition_column_statistics_result"); - - 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 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 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 delete_partition_column_statistics_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new delete_partition_column_statistics_resultTupleSchemeFactory()); - } - - private boolean success; // required - private NoSuchObjectException o1; // required - private MetaException o2; // required - private InvalidObjectException o3; // required - private InvalidInputException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_partition_column_statistics_result.class, metaDataMap); - } - - public delete_partition_column_statistics_result() { - } - - public delete_partition_column_statistics_result( - boolean success, - NoSuchObjectException o1, - MetaException o2, - InvalidObjectException o3, - InvalidInputException o4) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public delete_partition_column_statistics_result(delete_partition_column_statistics_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new InvalidObjectException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new InvalidInputException(other.o4); - } - } - - public delete_partition_column_statistics_result deepCopy() { - return new delete_partition_column_statistics_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public InvalidObjectException getO3() { - return this.o3; - } - - public void setO3(InvalidObjectException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public InvalidInputException getO4() { - return this.o4; - } - - public void setO4(InvalidInputException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((InvalidObjectException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((InvalidInputException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof delete_partition_column_statistics_result) - return this.equals((delete_partition_column_statistics_result)that); - return false; - } - - public boolean equals(delete_partition_column_statistics_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(delete_partition_column_statistics_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("delete_partition_column_statistics_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - 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 { - // 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 delete_partition_column_statistics_resultStandardSchemeFactory implements SchemeFactory { - public delete_partition_column_statistics_resultStandardScheme getScheme() { - return new delete_partition_column_statistics_resultStandardScheme(); - } - } - - private static class delete_partition_column_statistics_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, delete_partition_column_statistics_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; - case 3: // O3 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.o3 = new InvalidObjectException(); - 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 InvalidInputException(); - 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, delete_partition_column_statistics_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class delete_partition_column_statistics_resultTupleSchemeFactory implements SchemeFactory { - public delete_partition_column_statistics_resultTupleScheme getScheme() { - return new delete_partition_column_statistics_resultTupleScheme(); - } - } - - private static class delete_partition_column_statistics_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_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); - } - oprot.writeBitSet(optionals, 5); - 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); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - 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); - } - if (incoming.get(3)) { - struct.o3 = new InvalidObjectException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } - if (incoming.get(4)) { - struct.o4 = new InvalidInputException(); - struct.o4.read(iprot); - struct.setO4IsSet(true); - } - } - } - - } - - public static class delete_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_table_column_statistics_args"); - - 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 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 COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new delete_table_column_statistics_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new delete_table_column_statistics_argsTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - private String col_name; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - COL_NAME((short)3, "col_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // COL_NAME - return COL_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_table_column_statistics_args.class, metaDataMap); - } - - public delete_table_column_statistics_args() { - } - - public delete_table_column_statistics_args( - String db_name, - String tbl_name, - String col_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.col_name = col_name; - } - - /** - * Performs a deep copy on other. - */ - public delete_table_column_statistics_args(delete_table_column_statistics_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetCol_name()) { - this.col_name = other.col_name; - } - } - - public delete_table_column_statistics_args deepCopy() { - return new delete_table_column_statistics_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.col_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public String getCol_name() { - return this.col_name; - } - - public void setCol_name(String col_name) { - this.col_name = col_name; - } - - public void unsetCol_name() { - this.col_name = null; - } - - /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ - public boolean isSetCol_name() { - return this.col_name != null; - } - - public void setCol_nameIsSet(boolean value) { - if (!value) { - this.col_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case COL_NAME: - if (value == null) { - unsetCol_name(); - } else { - setCol_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case COL_NAME: - return getCol_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case COL_NAME: - return isSetCol_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof delete_table_column_statistics_args) - return this.equals((delete_table_column_statistics_args)that); - return false; - } - - public boolean equals(delete_table_column_statistics_args that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_col_name = true && this.isSetCol_name(); - boolean that_present_col_name = true && that.isSetCol_name(); - if (this_present_col_name || that_present_col_name) { - if (!(this_present_col_name && that_present_col_name)) - return false; - if (!this.col_name.equals(that.col_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - boolean present_col_name = true && (isSetCol_name()); - list.add(present_col_name); - if (present_col_name) - list.add(col_name); - - return list.hashCode(); - } - - @Override - public int compareTo(delete_table_column_statistics_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(other.isSetCol_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCol_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.col_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("delete_table_column_statistics_args("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("col_name:"); - if (this.col_name == null) { - sb.append("null"); - } else { - sb.append(this.col_name); - } - 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 delete_table_column_statistics_argsStandardSchemeFactory implements SchemeFactory { - public delete_table_column_statistics_argsStandardScheme getScheme() { - return new delete_table_column_statistics_argsStandardScheme(); - } - } - - private static class delete_table_column_statistics_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, delete_table_column_statistics_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: // COL_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.col_name = iprot.readString(); - struct.setCol_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, delete_table_column_statistics_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.col_name != null) { - oprot.writeFieldBegin(COL_NAME_FIELD_DESC); - oprot.writeString(struct.col_name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class delete_table_column_statistics_argsTupleSchemeFactory implements SchemeFactory { - public delete_table_column_statistics_argsTupleScheme getScheme() { - return new delete_table_column_statistics_argsTupleScheme(); - } - } - - private static class delete_table_column_statistics_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_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.isSetCol_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.isSetCol_name()) { - oprot.writeString(struct.col_name); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_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.col_name = iprot.readString(); - struct.setCol_nameIsSet(true); - } - } - } - - } - - public static class delete_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_table_column_statistics_result"); - - 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 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 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 delete_table_column_statistics_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new delete_table_column_statistics_resultTupleSchemeFactory()); - } - - private boolean success; // required - private NoSuchObjectException o1; // required - private MetaException o2; // required - private InvalidObjectException o3; // required - private InvalidInputException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_table_column_statistics_result.class, metaDataMap); - } - - public delete_table_column_statistics_result() { - } - - public delete_table_column_statistics_result( - boolean success, - NoSuchObjectException o1, - MetaException o2, - InvalidObjectException o3, - InvalidInputException o4) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public delete_table_column_statistics_result(delete_table_column_statistics_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new InvalidObjectException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new InvalidInputException(other.o4); - } - } - - public delete_table_column_statistics_result deepCopy() { - return new delete_table_column_statistics_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public InvalidObjectException getO3() { - return this.o3; - } - - public void setO3(InvalidObjectException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public InvalidInputException getO4() { - return this.o4; - } - - public void setO4(InvalidInputException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((InvalidObjectException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((InvalidInputException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof delete_table_column_statistics_result) - return this.equals((delete_table_column_statistics_result)that); - return false; - } - - public boolean equals(delete_table_column_statistics_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(delete_table_column_statistics_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("delete_table_column_statistics_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - 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 { - // 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 delete_table_column_statistics_resultStandardSchemeFactory implements SchemeFactory { - public delete_table_column_statistics_resultStandardScheme getScheme() { - return new delete_table_column_statistics_resultStandardScheme(); - } - } - - private static class delete_table_column_statistics_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, delete_table_column_statistics_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; - case 3: // O3 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.o3 = new InvalidObjectException(); - 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 InvalidInputException(); - 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, delete_table_column_statistics_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class delete_table_column_statistics_resultTupleSchemeFactory implements SchemeFactory { - public delete_table_column_statistics_resultTupleScheme getScheme() { - return new delete_table_column_statistics_resultTupleScheme(); - } - } - - private static class delete_table_column_statistics_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_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); - } - oprot.writeBitSet(optionals, 5); - 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); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - 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); - } - if (incoming.get(3)) { - struct.o3 = new InvalidObjectException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } - if (incoming.get(4)) { - struct.o4 = new InvalidInputException(); - struct.o4.read(iprot); - struct.setO4IsSet(true); - } - } - } - - } - - public static class create_function_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_function_args"); - - private static final org.apache.thrift.protocol.TField FUNC_FIELD_DESC = new org.apache.thrift.protocol.TField("func", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new create_function_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new create_function_argsTupleSchemeFactory()); - } - - private Function func; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FUNC((short)1, "func"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FUNC - return FUNC; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.FUNC, new org.apache.thrift.meta_data.FieldMetaData("func", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_function_args.class, metaDataMap); - } - - public create_function_args() { - } - - public create_function_args( - Function func) - { - this(); - this.func = func; - } - - /** - * Performs a deep copy on other. - */ - public create_function_args(create_function_args other) { - if (other.isSetFunc()) { - this.func = new Function(other.func); - } - } - - public create_function_args deepCopy() { - return new create_function_args(this); - } - - @Override - public void clear() { - this.func = null; - } - - public Function getFunc() { - return this.func; - } - - public void setFunc(Function func) { - this.func = func; - } - - public void unsetFunc() { - this.func = null; - } - - /** Returns true if field func is set (has been assigned a value) and false otherwise */ - public boolean isSetFunc() { - return this.func != null; - } - - public void setFuncIsSet(boolean value) { - if (!value) { - this.func = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case FUNC: - if (value == null) { - unsetFunc(); - } else { - setFunc((Function)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case FUNC: - return getFunc(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case FUNC: - return isSetFunc(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_function_args) - return this.equals((create_function_args)that); - return false; - } - - public boolean equals(create_function_args that) { - if (that == null) - return false; - - boolean this_present_func = true && this.isSetFunc(); - boolean that_present_func = true && that.isSetFunc(); - if (this_present_func || that_present_func) { - if (!(this_present_func && that_present_func)) - return false; - if (!this.func.equals(that.func)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_func = true && (isSetFunc()); - list.add(present_func); - if (present_func) - list.add(func); - - return list.hashCode(); - } - - @Override - public int compareTo(create_function_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetFunc()).compareTo(other.isSetFunc()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFunc()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.func, other.func); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_function_args("); - boolean first = true; - - sb.append("func:"); - if (this.func == null) { - sb.append("null"); - } else { - sb.append(this.func); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (func != null) { - func.validate(); - } - } - - 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 create_function_argsStandardSchemeFactory implements SchemeFactory { - public create_function_argsStandardScheme getScheme() { - return new create_function_argsStandardScheme(); - } - } - - private static class create_function_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, create_function_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: // FUNC - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.func = new Function(); - struct.func.read(iprot); - struct.setFuncIsSet(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_function_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.func != null) { - oprot.writeFieldBegin(FUNC_FIELD_DESC); - struct.func.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class create_function_argsTupleSchemeFactory implements SchemeFactory { - public create_function_argsTupleScheme getScheme() { - return new create_function_argsTupleScheme(); - } - } - - private static class create_function_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, create_function_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetFunc()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetFunc()) { - struct.func.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, create_function_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.func = new Function(); - struct.func.read(iprot); - struct.setFuncIsSet(true); - } - } - } - - } - - public static class create_function_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_function_result"); - - 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 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_function_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new create_function_resultTupleSchemeFactory()); - } - - private AlreadyExistsException o1; // required - private InvalidObjectException o2; // required - private MetaException o3; // required - private NoSuchObjectException o4; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_function_result.class, metaDataMap); - } - - public create_function_result() { - } - - public create_function_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3, - NoSuchObjectException o4) - { - this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; - } - - /** - * Performs a deep copy on other. - */ - public create_function_result(create_function_result other) { - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new NoSuchObjectException(other.o4); - } - } - - public create_function_result deepCopy() { - return new create_function_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public AlreadyExistsException getO1() { - return this.o1; - } - - public void setO1(AlreadyExistsException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public NoSuchObjectException getO4() { - return this.o4; - } - - public void setO4(NoSuchObjectException o4) { - this.o4 = o4; - } - - public void unsetO4() { - this.o4 = null; - } - - /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; - } - - public void setO4IsSet(boolean value) { - if (!value) { - this.o4 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((AlreadyExistsException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - case O4: - if (value == null) { - unsetO4(); - } else { - setO4((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_function_result) - return this.equals((create_function_result)that); - return false; - } - - public boolean equals(create_function_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - boolean present_o4 = true && (isSetO4()); - list.add(present_o4); - if (present_o4) - list.add(o4); - - return list.hashCode(); - } - - @Override - public int compareTo(create_function_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO4()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_function_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - 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 create_function_resultStandardSchemeFactory implements SchemeFactory { - public create_function_resultStandardScheme getScheme() { - return new create_function_resultStandardScheme(); - } - } - - private static class create_function_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, create_function_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_function_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_function_resultTupleSchemeFactory implements SchemeFactory { - public create_function_resultTupleScheme getScheme() { - return new create_function_resultTupleScheme(); - } - } - - private static class create_function_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, create_function_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_function_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_function_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_function_args"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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 FUNC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("funcName", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new drop_function_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_function_argsTupleSchemeFactory()); - } - - private String dbName; // required - private String funcName; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "dbName"), - FUNC_NAME((short)2, "funcName"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // FUNC_NAME - return FUNC_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FUNC_NAME, new org.apache.thrift.meta_data.FieldMetaData("funcName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_function_args.class, metaDataMap); - } - - public drop_function_args() { - } - - public drop_function_args( - String dbName, - String funcName) - { - this(); - this.dbName = dbName; - this.funcName = funcName; - } - - /** - * Performs a deep copy on other. - */ - public drop_function_args(drop_function_args other) { - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetFuncName()) { - this.funcName = other.funcName; - } - } - - public drop_function_args deepCopy() { - return new drop_function_args(this); - } - - @Override - public void clear() { - this.dbName = null; - this.funcName = null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getFuncName() { - return this.funcName; - } - - public void setFuncName(String funcName) { - this.funcName = funcName; - } - - public void unsetFuncName() { - this.funcName = null; - } - - /** Returns true if field funcName is set (has been assigned a value) and false otherwise */ - public boolean isSetFuncName() { - return this.funcName != null; - } - - public void setFuncNameIsSet(boolean value) { - if (!value) { - this.funcName = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case FUNC_NAME: - if (value == null) { - unsetFuncName(); - } else { - setFuncName((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case FUNC_NAME: - return getFuncName(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case FUNC_NAME: - return isSetFuncName(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_function_args) - return this.equals((drop_function_args)that); - return false; - } - - public boolean equals(drop_function_args that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_funcName = true && this.isSetFuncName(); - boolean that_present_funcName = true && that.isSetFuncName(); - if (this_present_funcName || that_present_funcName) { - if (!(this_present_funcName && that_present_funcName)) - return false; - if (!this.funcName.equals(that.funcName)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_funcName = true && (isSetFuncName()); - list.add(present_funcName); - if (present_funcName) - list.add(funcName); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_function_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(other.isSetFuncName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFuncName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, other.funcName); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_function_args("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("funcName:"); - if (this.funcName == null) { - sb.append("null"); - } else { - sb.append(this.funcName); - } - 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 drop_function_argsStandardSchemeFactory implements SchemeFactory { - public drop_function_argsStandardScheme getScheme() { - return new drop_function_argsStandardScheme(); - } - } - - private static class drop_function_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_function_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.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // FUNC_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.funcName = iprot.readString(); - struct.setFuncNameIsSet(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_function_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - if (struct.funcName != null) { - oprot.writeFieldBegin(FUNC_NAME_FIELD_DESC); - oprot.writeString(struct.funcName); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class drop_function_argsTupleSchemeFactory implements SchemeFactory { - public drop_function_argsTupleScheme getScheme() { - return new drop_function_argsTupleScheme(); - } - } - - private static class drop_function_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_function_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetDbName()) { - optionals.set(0); - } - if (struct.isSetFuncName()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetDbName()) { - oprot.writeString(struct.dbName); - } - if (struct.isSetFuncName()) { - oprot.writeString(struct.funcName); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, drop_function_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.funcName = iprot.readString(); - struct.setFuncNameIsSet(true); - } - } - } - - } - - public static class drop_function_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_function_result"); - - 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_function_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_function_resultTupleSchemeFactory()); - } - - private NoSuchObjectException o1; // required - private MetaException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O3((short)2, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_function_result.class, metaDataMap); - } - - public drop_function_result() { - } - - public drop_function_result( - NoSuchObjectException o1, - MetaException o3) - { - this(); - this.o1 = o1; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public drop_function_result(drop_function_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - } - - public drop_function_result deepCopy() { - return new drop_function_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o3 = null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO3() { - return this.o3; - } - - public void setO3(MetaException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_function_result) - return this.equals((drop_function_result)that); - return false; - } - - public boolean equals(drop_function_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_function_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_function_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 drop_function_resultStandardSchemeFactory implements SchemeFactory { - public drop_function_resultStandardScheme getScheme() { - return new drop_function_resultStandardScheme(); - } - } - - private static class drop_function_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_function_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_function_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_function_resultTupleSchemeFactory implements SchemeFactory { - public drop_function_resultTupleScheme getScheme() { - return new drop_function_resultTupleScheme(); - } - } - - private static class drop_function_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_function_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_function_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 alter_function_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_function_args"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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 FUNC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("funcName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField NEW_FUNC_FIELD_DESC = new org.apache.thrift.protocol.TField("newFunc", org.apache.thrift.protocol.TType.STRUCT, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new alter_function_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new alter_function_argsTupleSchemeFactory()); - } - - private String dbName; // required - private String funcName; // required - private Function newFunc; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "dbName"), - FUNC_NAME((short)2, "funcName"), - NEW_FUNC((short)3, "newFunc"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // FUNC_NAME - return FUNC_NAME; - case 3: // NEW_FUNC - return NEW_FUNC; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FUNC_NAME, new org.apache.thrift.meta_data.FieldMetaData("funcName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NEW_FUNC, new org.apache.thrift.meta_data.FieldMetaData("newFunc", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_function_args.class, metaDataMap); - } - - public alter_function_args() { - } - - public alter_function_args( - String dbName, - String funcName, - Function newFunc) - { - this(); - this.dbName = dbName; - this.funcName = funcName; - this.newFunc = newFunc; - } - - /** - * Performs a deep copy on other. - */ - public alter_function_args(alter_function_args other) { - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetFuncName()) { - this.funcName = other.funcName; - } - if (other.isSetNewFunc()) { - this.newFunc = new Function(other.newFunc); - } - } - - public alter_function_args deepCopy() { - return new alter_function_args(this); - } - - @Override - public void clear() { - this.dbName = null; - this.funcName = null; - this.newFunc = null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getFuncName() { - return this.funcName; - } - - public void setFuncName(String funcName) { - this.funcName = funcName; - } - - public void unsetFuncName() { - this.funcName = null; - } - - /** Returns true if field funcName is set (has been assigned a value) and false otherwise */ - public boolean isSetFuncName() { - return this.funcName != null; - } - - public void setFuncNameIsSet(boolean value) { - if (!value) { - this.funcName = null; - } - } - - public Function getNewFunc() { - return this.newFunc; - } - - public void setNewFunc(Function newFunc) { - this.newFunc = newFunc; - } - - public void unsetNewFunc() { - this.newFunc = null; - } - - /** Returns true if field newFunc is set (has been assigned a value) and false otherwise */ - public boolean isSetNewFunc() { - return this.newFunc != null; - } - - public void setNewFuncIsSet(boolean value) { - if (!value) { - this.newFunc = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case FUNC_NAME: - if (value == null) { - unsetFuncName(); - } else { - setFuncName((String)value); - } - break; - - case NEW_FUNC: - if (value == null) { - unsetNewFunc(); - } else { - setNewFunc((Function)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case FUNC_NAME: - return getFuncName(); - - case NEW_FUNC: - return getNewFunc(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case FUNC_NAME: - return isSetFuncName(); - case NEW_FUNC: - return isSetNewFunc(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_function_args) - return this.equals((alter_function_args)that); - return false; - } - - public boolean equals(alter_function_args that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_funcName = true && this.isSetFuncName(); - boolean that_present_funcName = true && that.isSetFuncName(); - if (this_present_funcName || that_present_funcName) { - if (!(this_present_funcName && that_present_funcName)) - return false; - if (!this.funcName.equals(that.funcName)) - return false; - } - - boolean this_present_newFunc = true && this.isSetNewFunc(); - boolean that_present_newFunc = true && that.isSetNewFunc(); - if (this_present_newFunc || that_present_newFunc) { - if (!(this_present_newFunc && that_present_newFunc)) - return false; - if (!this.newFunc.equals(that.newFunc)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_funcName = true && (isSetFuncName()); - list.add(present_funcName); - if (present_funcName) - list.add(funcName); - - boolean present_newFunc = true && (isSetNewFunc()); - list.add(present_newFunc); - if (present_newFunc) - list.add(newFunc); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_function_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(other.isSetFuncName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFuncName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, other.funcName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNewFunc()).compareTo(other.isSetNewFunc()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNewFunc()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newFunc, other.newFunc); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_function_args("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("funcName:"); - if (this.funcName == null) { - sb.append("null"); - } else { - sb.append(this.funcName); - } - first = false; - if (!first) sb.append(", "); - sb.append("newFunc:"); - if (this.newFunc == null) { - sb.append("null"); - } else { - sb.append(this.newFunc); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (newFunc != null) { - newFunc.validate(); - } - } - - 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 alter_function_argsStandardSchemeFactory implements SchemeFactory { - public alter_function_argsStandardScheme getScheme() { - return new alter_function_argsStandardScheme(); - } - } - - private static class alter_function_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, alter_function_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.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // FUNC_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.funcName = iprot.readString(); - struct.setFuncNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NEW_FUNC - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.newFunc = new Function(); - struct.newFunc.read(iprot); - struct.setNewFuncIsSet(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_function_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - if (struct.funcName != null) { - oprot.writeFieldBegin(FUNC_NAME_FIELD_DESC); - oprot.writeString(struct.funcName); - oprot.writeFieldEnd(); - } - if (struct.newFunc != null) { - oprot.writeFieldBegin(NEW_FUNC_FIELD_DESC); - struct.newFunc.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class alter_function_argsTupleSchemeFactory implements SchemeFactory { - public alter_function_argsTupleScheme getScheme() { - return new alter_function_argsTupleScheme(); - } - } - - private static class alter_function_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, alter_function_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetDbName()) { - optionals.set(0); - } - if (struct.isSetFuncName()) { - optionals.set(1); - } - if (struct.isSetNewFunc()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetDbName()) { - oprot.writeString(struct.dbName); - } - if (struct.isSetFuncName()) { - oprot.writeString(struct.funcName); - } - if (struct.isSetNewFunc()) { - struct.newFunc.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, alter_function_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.funcName = iprot.readString(); - struct.setFuncNameIsSet(true); - } - if (incoming.get(2)) { - struct.newFunc = new Function(); - struct.newFunc.read(iprot); - struct.setNewFuncIsSet(true); - } - } - } - - } - - public static class alter_function_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_function_result"); - - 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_function_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new alter_function_resultTupleSchemeFactory()); - } - - private InvalidOperationException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_function_result.class, metaDataMap); - } - - public alter_function_result() { - } - - public alter_function_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public alter_function_result(alter_function_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public alter_function_result deepCopy() { - return new alter_function_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public InvalidOperationException getO1() { - return this.o1; - } - - public void setO1(InvalidOperationException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidOperationException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof alter_function_result) - return this.equals((alter_function_result)that); - return false; - } - - public boolean equals(alter_function_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(alter_function_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("alter_function_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 alter_function_resultStandardSchemeFactory implements SchemeFactory { - public alter_function_resultStandardScheme getScheme() { - return new alter_function_resultStandardScheme(); - } - } - - private static class alter_function_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, alter_function_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_function_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_function_resultTupleSchemeFactory implements SchemeFactory { - public alter_function_resultTupleScheme getScheme() { - return new alter_function_resultTupleScheme(); - } - } - - private static class alter_function_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, alter_function_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_function_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_functions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_functions_args"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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 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_functions_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_functions_argsTupleSchemeFactory()); - } - - private String dbName; // required - private String pattern; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "dbName"), - PATTERN((short)2, "pattern"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // PATTERN - return PATTERN; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PATTERN, new org.apache.thrift.meta_data.FieldMetaData("pattern", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_functions_args.class, metaDataMap); - } - - public get_functions_args() { - } - - public get_functions_args( - String dbName, - String pattern) - { - this(); - this.dbName = dbName; - this.pattern = pattern; - } - - /** - * Performs a deep copy on other. - */ - public get_functions_args(get_functions_args other) { - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetPattern()) { - this.pattern = other.pattern; - } - } - - public get_functions_args deepCopy() { - return new get_functions_args(this); - } - - @Override - public void clear() { - this.dbName = null; - this.pattern = null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getPattern() { - return this.pattern; - } - - public void setPattern(String pattern) { - this.pattern = pattern; - } - - public void unsetPattern() { - this.pattern = null; - } - - /** Returns true if field pattern is set (has been assigned a value) and false otherwise */ - public boolean isSetPattern() { - return this.pattern != null; - } - - public void setPatternIsSet(boolean value) { - if (!value) { - this.pattern = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case PATTERN: - if (value == null) { - unsetPattern(); - } else { - setPattern((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case PATTERN: - return getPattern(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case PATTERN: - return isSetPattern(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_functions_args) - return this.equals((get_functions_args)that); - return false; - } - - public boolean equals(get_functions_args that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_pattern = true && this.isSetPattern(); - boolean that_present_pattern = true && that.isSetPattern(); - if (this_present_pattern || that_present_pattern) { - if (!(this_present_pattern && that_present_pattern)) - return false; - if (!this.pattern.equals(that.pattern)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_pattern = true && (isSetPattern()); - list.add(present_pattern); - if (present_pattern) - list.add(pattern); - - return list.hashCode(); - } - - @Override - public int compareTo(get_functions_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPattern()).compareTo(other.isSetPattern()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPattern()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, other.pattern); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_functions_args("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("pattern:"); - if (this.pattern == null) { - sb.append("null"); - } else { - sb.append(this.pattern); - } - 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 get_functions_argsStandardSchemeFactory implements SchemeFactory { - public get_functions_argsStandardScheme getScheme() { - return new get_functions_argsStandardScheme(); - } - } - - private static class get_functions_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_functions_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.dbName = iprot.readString(); - struct.setDbNameIsSet(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_functions_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - 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_functions_argsTupleSchemeFactory implements SchemeFactory { - public get_functions_argsTupleScheme getScheme() { - return new get_functions_argsTupleScheme(); - } - } - - private static class get_functions_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_functions_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetDbName()) { - optionals.set(0); - } - if (struct.isSetPattern()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetDbName()) { - oprot.writeString(struct.dbName); - } - if (struct.isSetPattern()) { - oprot.writeString(struct.pattern); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_functions_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.pattern = iprot.readString(); - struct.setPatternIsSet(true); - } - } - } - - } - - public static class get_functions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_functions_result"); - - 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_functions_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_functions_resultTupleSchemeFactory()); - } - - private List success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_functions_result.class, metaDataMap); - } - - public get_functions_result() { - } - - public get_functions_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_functions_result(get_functions_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_functions_result deepCopy() { - return new get_functions_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_functions_result) - return this.equals((get_functions_result)that); - return false; - } - - public boolean equals(get_functions_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_functions_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_functions_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 get_functions_resultStandardSchemeFactory implements SchemeFactory { - public get_functions_resultStandardScheme getScheme() { - return new get_functions_resultStandardScheme(); - } - } - - private static class get_functions_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_functions_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 _list1182 = iprot.readListBegin(); - struct.success = new ArrayList(_list1182.size); - String _elem1183; - for (int _i1184 = 0; _i1184 < _list1182.size; ++_i1184) - { - _elem1183 = iprot.readString(); - struct.success.add(_elem1183); - } - 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_functions_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 _iter1185 : struct.success) - { - oprot.writeString(_iter1185); - } - 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_functions_resultTupleSchemeFactory implements SchemeFactory { - public get_functions_resultTupleScheme getScheme() { - return new get_functions_resultTupleScheme(); - } - } - - private static class get_functions_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_functions_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 _iter1186 : struct.success) - { - oprot.writeString(_iter1186); - } - } - } - if (struct.isSetO1()) { - struct.o1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_functions_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 _list1187 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list1187.size); - String _elem1188; - for (int _i1189 = 0; _i1189 < _list1187.size; ++_i1189) - { - _elem1188 = iprot.readString(); - struct.success.add(_elem1188); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.o1 = new MetaException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - } - } - - } - - public static class get_function_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_function_args"); - - private static final org.apache.thrift.protocol.TField DB_NAME_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 FUNC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("funcName", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_function_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_function_argsTupleSchemeFactory()); - } - - private String dbName; // required - private String funcName; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "dbName"), - FUNC_NAME((short)2, "funcName"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // FUNC_NAME - return FUNC_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FUNC_NAME, new org.apache.thrift.meta_data.FieldMetaData("funcName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_function_args.class, metaDataMap); - } - - public get_function_args() { - } - - public get_function_args( - String dbName, - String funcName) - { - this(); - this.dbName = dbName; - this.funcName = funcName; - } - - /** - * Performs a deep copy on other. - */ - public get_function_args(get_function_args other) { - if (other.isSetDbName()) { - this.dbName = other.dbName; - } - if (other.isSetFuncName()) { - this.funcName = other.funcName; - } - } - - public get_function_args deepCopy() { - return new get_function_args(this); - } - - @Override - public void clear() { - this.dbName = null; - this.funcName = null; - } - - public String getDbName() { - return this.dbName; - } - - public void setDbName(String dbName) { - this.dbName = dbName; - } - - public void unsetDbName() { - this.dbName = null; - } - - /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ - public boolean isSetDbName() { - return this.dbName != null; - } - - public void setDbNameIsSet(boolean value) { - if (!value) { - this.dbName = null; - } - } - - public String getFuncName() { - return this.funcName; - } - - public void setFuncName(String funcName) { - this.funcName = funcName; - } - - public void unsetFuncName() { - this.funcName = null; - } - - /** Returns true if field funcName is set (has been assigned a value) and false otherwise */ - public boolean isSetFuncName() { - return this.funcName != null; - } - - public void setFuncNameIsSet(boolean value) { - if (!value) { - this.funcName = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDbName(); - } else { - setDbName((String)value); - } - break; - - case FUNC_NAME: - if (value == null) { - unsetFuncName(); - } else { - setFuncName((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDbName(); - - case FUNC_NAME: - return getFuncName(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDbName(); - case FUNC_NAME: - return isSetFuncName(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_function_args) - return this.equals((get_function_args)that); - return false; - } - - public boolean equals(get_function_args that) { - if (that == null) - return false; - - boolean this_present_dbName = true && this.isSetDbName(); - boolean that_present_dbName = true && that.isSetDbName(); - if (this_present_dbName || that_present_dbName) { - if (!(this_present_dbName && that_present_dbName)) - return false; - if (!this.dbName.equals(that.dbName)) - return false; - } - - boolean this_present_funcName = true && this.isSetFuncName(); - boolean that_present_funcName = true && that.isSetFuncName(); - if (this_present_funcName || that_present_funcName) { - if (!(this_present_funcName && that_present_funcName)) - return false; - if (!this.funcName.equals(that.funcName)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_dbName = true && (isSetDbName()); - list.add(present_dbName); - if (present_dbName) - list.add(dbName); - - boolean present_funcName = true && (isSetFuncName()); - list.add(present_funcName); - if (present_funcName) - list.add(funcName); - - return list.hashCode(); - } - - @Override - public int compareTo(get_function_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(other.isSetFuncName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFuncName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, other.funcName); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_function_args("); - boolean first = true; - - sb.append("dbName:"); - if (this.dbName == null) { - sb.append("null"); - } else { - sb.append(this.dbName); - } - first = false; - if (!first) sb.append(", "); - sb.append("funcName:"); - if (this.funcName == null) { - sb.append("null"); - } else { - sb.append(this.funcName); - } - 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 get_function_argsStandardSchemeFactory implements SchemeFactory { - public get_function_argsStandardScheme getScheme() { - return new get_function_argsStandardScheme(); - } - } - - private static class get_function_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_function_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.dbName = iprot.readString(); - struct.setDbNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // FUNC_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.funcName = iprot.readString(); - struct.setFuncNameIsSet(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_function_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbName != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(struct.dbName); - oprot.writeFieldEnd(); - } - if (struct.funcName != null) { - oprot.writeFieldBegin(FUNC_NAME_FIELD_DESC); - oprot.writeString(struct.funcName); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_function_argsTupleSchemeFactory implements SchemeFactory { - public get_function_argsTupleScheme getScheme() { - return new get_function_argsTupleScheme(); - } - } - - private static class get_function_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_function_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetDbName()) { - optionals.set(0); - } - if (struct.isSetFuncName()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetDbName()) { - oprot.writeString(struct.dbName); - } - if (struct.isSetFuncName()) { - oprot.writeString(struct.funcName); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_function_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.funcName = iprot.readString(); - struct.setFuncNameIsSet(true); - } - } - } - - } - - public static class get_function_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_function_result"); - - 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 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_function_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_function_resultTupleSchemeFactory()); - } - - private Function success; // required - private MetaException o1; // required - private NoSuchObjectException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_function_result.class, metaDataMap); - } - - public get_function_result() { - } - - public get_function_result( - Function success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public get_function_result(get_function_result other) { - if (other.isSetSuccess()) { - this.success = new Function(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } - } - - public get_function_result deepCopy() { - return new get_function_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public Function getSuccess() { - return this.success; - } - - public void setSuccess(Function success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchObjectException getO2() { - return this.o2; - } - - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Function)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_function_result) - return this.equals((get_function_result)that); - return false; - } - - public boolean equals(get_function_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(get_function_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_function_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_function_resultStandardSchemeFactory implements SchemeFactory { - public get_function_resultStandardScheme getScheme() { - return new get_function_resultStandardScheme(); - } - } - - private static class get_function_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_function_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 Function(); - 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_function_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_function_resultTupleSchemeFactory implements SchemeFactory { - public get_function_resultTupleScheme getScheme() { - return new get_function_resultTupleScheme(); - } - } - - private static class get_function_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_function_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_function_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new Function(); - 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_all_functions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_functions_args"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_all_functions_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_all_functions_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 { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_functions_args.class, metaDataMap); - } - - public get_all_functions_args() { - } - - /** - * Performs a deep copy on other. - */ - public get_all_functions_args(get_all_functions_args other) { - } - - public get_all_functions_args deepCopy() { - return new get_all_functions_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_all_functions_args) - return this.equals((get_all_functions_args)that); - return false; - } - - public boolean equals(get_all_functions_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(get_all_functions_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_all_functions_args("); - boolean first = true; - - 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 get_all_functions_argsStandardSchemeFactory implements SchemeFactory { - public get_all_functions_argsStandardScheme getScheme() { - return new get_all_functions_argsStandardScheme(); - } - } - - private static class get_all_functions_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_functions_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_functions_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_all_functions_argsTupleSchemeFactory implements SchemeFactory { - public get_all_functions_argsTupleScheme getScheme() { - return new get_all_functions_argsTupleScheme(); - } - } - - private static class get_all_functions_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_all_functions_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_all_functions_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class get_all_functions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_functions_result"); - - 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_all_functions_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_all_functions_resultTupleSchemeFactory()); - } - - private GetAllFunctionsResponse success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetAllFunctionsResponse.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_functions_result.class, metaDataMap); - } - - public get_all_functions_result() { - } - - public get_all_functions_result( - GetAllFunctionsResponse success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_all_functions_result(get_all_functions_result other) { - if (other.isSetSuccess()) { - this.success = new GetAllFunctionsResponse(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_all_functions_result deepCopy() { - return new get_all_functions_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public GetAllFunctionsResponse getSuccess() { - return this.success; - } - - public void setSuccess(GetAllFunctionsResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((GetAllFunctionsResponse)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_all_functions_result) - return this.equals((get_all_functions_result)that); - return false; - } - - public boolean equals(get_all_functions_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_all_functions_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_all_functions_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_all_functions_resultStandardSchemeFactory implements SchemeFactory { - public get_all_functions_resultStandardScheme getScheme() { - return new get_all_functions_resultStandardScheme(); - } - } - - private static class get_all_functions_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_functions_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 GetAllFunctionsResponse(); - 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_all_functions_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_all_functions_resultTupleSchemeFactory implements SchemeFactory { - public get_all_functions_resultTupleScheme getScheme() { - return new get_all_functions_resultTupleScheme(); - } - } - - private static class get_all_functions_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_all_functions_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_all_functions_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new GetAllFunctionsResponse(); - 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 create_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_role_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ROLE((short)1, "role"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ROLE - return ROLE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Role.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_role_args.class, metaDataMap); - } - - public create_role_args() { - } - - public create_role_args( - Role role) - { - this(); - this.role = role; - } - - /** - * Performs a deep copy on other. - */ - public create_role_args(create_role_args other) { - if (other.isSetRole()) { - this.role = new Role(other.role); - } - } - - public create_role_args deepCopy() { - return new create_role_args(this); - } - - @Override - public void clear() { - this.role = null; - } - - public Role getRole() { - return this.role; - } - - public void setRole(Role role) { - this.role = role; - } - - public void unsetRole() { - this.role = null; - } - - /** Returns true if field role is set (has been assigned a value) and false otherwise */ - public boolean isSetRole() { - return this.role != null; - } - - public void setRoleIsSet(boolean value) { - if (!value) { - this.role = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ROLE: - if (value == null) { - unsetRole(); - } else { - setRole((Role)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ROLE: - return getRole(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ROLE: - return isSetRole(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_role_args) - return this.equals((create_role_args)that); - return false; - } - - public boolean equals(create_role_args that) { - if (that == null) - return false; - - boolean this_present_role = true && this.isSetRole(); - boolean that_present_role = true && that.isSetRole(); - if (this_present_role || that_present_role) { - if (!(this_present_role && that_present_role)) - return false; - if (!this.role.equals(that.role)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_role = true && (isSetRole()); - list.add(present_role); - if (present_role) - list.add(role); - - return list.hashCode(); - } - - @Override - public int compareTo(create_role_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRole()).compareTo(other.isSetRole()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRole()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, other.role); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_role_args("); - boolean first = true; - - sb.append("role:"); - if (this.role == null) { - sb.append("null"); - } else { - sb.append(this.role); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_role_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_role_result.class, metaDataMap); - } - - public create_role_result() { - } - - public create_role_result( - boolean success, - MetaException o1) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public create_role_result(create_role_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public create_role_result deepCopy() { - return new create_role_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof create_role_result) - return this.equals((create_role_result)that); - return false; - } - - public boolean equals(create_role_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(create_role_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("create_role_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 { - // 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_role_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ROLE_NAME((short)1, "role_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ROLE_NAME - return ROLE_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("role_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_role_args.class, metaDataMap); - } - - public drop_role_args() { - } - - public drop_role_args( - String role_name) - { - this(); - this.role_name = role_name; - } - - /** - * Performs a deep copy on other. - */ - public drop_role_args(drop_role_args other) { - if (other.isSetRole_name()) { - this.role_name = other.role_name; - } - } - - public drop_role_args deepCopy() { - return new drop_role_args(this); - } - - @Override - public void clear() { - this.role_name = null; - } - - public String getRole_name() { - return this.role_name; - } - - public void setRole_name(String role_name) { - this.role_name = role_name; - } - - public void unsetRole_name() { - this.role_name = null; - } - - /** Returns true if field role_name is set (has been assigned a value) and false otherwise */ - public boolean isSetRole_name() { - return this.role_name != null; - } - - public void setRole_nameIsSet(boolean value) { - if (!value) { - this.role_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ROLE_NAME: - if (value == null) { - unsetRole_name(); - } else { - setRole_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ROLE_NAME: - return getRole_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ROLE_NAME: - return isSetRole_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_role_args) - return this.equals((drop_role_args)that); - return false; - } - - public boolean equals(drop_role_args that) { - if (that == null) - return false; - - boolean this_present_role_name = true && this.isSetRole_name(); - boolean that_present_role_name = true && that.isSetRole_name(); - if (this_present_role_name || that_present_role_name) { - if (!(this_present_role_name && that_present_role_name)) - return false; - if (!this.role_name.equals(that.role_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_role_name = true && (isSetRole_name()); - list.add(present_role_name); - if (present_role_name) - list.add(role_name); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_role_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(other.isSetRole_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRole_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, other.role_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_role_args("); - boolean first = true; - - sb.append("role_name:"); - if (this.role_name == null) { - sb.append("null"); - } else { - sb.append(this.role_name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_role_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_role_result.class, metaDataMap); - } - - public drop_role_result() { - } - - public drop_role_result( - boolean success, - MetaException o1) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public drop_role_result(drop_role_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public drop_role_result deepCopy() { - return new drop_role_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof drop_role_result) - return this.equals((drop_role_result)that); - return false; - } - - public boolean equals(drop_role_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(drop_role_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("drop_role_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 { - // 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, Comparable { - 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 { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_role_names_args.class, metaDataMap); - } - - public get_role_names_args() { - } - - /** - * Performs a deep copy on other. - */ - public get_role_names_args(get_role_names_args other) { - } - - public get_role_names_args deepCopy() { - return new get_role_names_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_role_names_args) - return this.equals((get_role_names_args)that); - return false; - } - - public boolean equals(get_role_names_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(get_role_names_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_role_names_args("); - boolean first = true; - - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_names_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_role_names_result.class, metaDataMap); - } - - public get_role_names_result() { - } - - public get_role_names_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_role_names_result(get_role_names_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_role_names_result deepCopy() { - return new get_role_names_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_role_names_result) - return this.equals((get_role_names_result)that); - return false; - } - - public boolean equals(get_role_names_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_role_names_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_role_names_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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 _list1190 = iprot.readListBegin(); - struct.success = new ArrayList(_list1190.size); - String _elem1191; - for (int _i1192 = 0; _i1192 < _list1190.size; ++_i1192) - { - _elem1191 = iprot.readString(); - struct.success.add(_elem1191); - } - 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 _iter1193 : struct.success) - { - oprot.writeString(_iter1193); - } - 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 _iter1194 : struct.success) - { - oprot.writeString(_iter1194); - } - } - } - 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 _list1195 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list1195.size); - String _elem1196; - for (int _i1197 = 0; _i1197 < _list1195.size; ++_i1197) - { - _elem1196 = iprot.readString(); - struct.success.add(_elem1196); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_role_args"); - - 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 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 org.apache.thrift.protocol.TField GRANTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("grantor", org.apache.thrift.protocol.TType.STRING, (short)4); - 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 - private String grantor; // required - private PrincipalType grantorType; // required - private boolean grant_option; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ROLE_NAME((short)1, "role_name"), - PRINCIPAL_NAME((short)2, "principal_name"), - /** - * - * @see PrincipalType - */ - PRINCIPAL_TYPE((short)3, "principal_type"), - GRANTOR((short)4, "grantor"), - /** - * - * @see PrincipalType - */ - GRANTOR_TYPE((short)5, "grantorType"), - GRANT_OPTION((short)6, "grant_option"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ROLE_NAME - return ROLE_NAME; - case 2: // PRINCIPAL_NAME - return PRINCIPAL_NAME; - case 3: // PRINCIPAL_TYPE - return PRINCIPAL_TYPE; - case 4: // GRANTOR - return GRANTOR; - case 5: // GRANTOR_TYPE - return GRANTOR_TYPE; - case 6: // GRANT_OPTION - return GRANT_OPTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __GRANT_OPTION_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("role_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - tmpMap.put(_Fields.GRANTOR, new org.apache.thrift.meta_data.FieldMetaData("grantor", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GRANTOR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("grantorType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - tmpMap.put(_Fields.GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("grant_option", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_role_args.class, metaDataMap); - } - - public grant_role_args() { - } - - public grant_role_args( - String role_name, - String principal_name, - PrincipalType principal_type, - String grantor, - PrincipalType grantorType, - boolean grant_option) - { - this(); - this.role_name = role_name; - this.principal_name = principal_name; - this.principal_type = principal_type; - this.grantor = grantor; - this.grantorType = grantorType; - this.grant_option = grant_option; - setGrant_optionIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public grant_role_args(grant_role_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetRole_name()) { - this.role_name = other.role_name; - } - if (other.isSetPrincipal_name()) { - this.principal_name = other.principal_name; - } - if (other.isSetPrincipal_type()) { - this.principal_type = other.principal_type; - } - if (other.isSetGrantor()) { - this.grantor = other.grantor; - } - if (other.isSetGrantorType()) { - this.grantorType = other.grantorType; - } - this.grant_option = other.grant_option; - } - - public grant_role_args deepCopy() { - return new grant_role_args(this); - } - - @Override - public void clear() { - this.role_name = null; - this.principal_name = null; - this.principal_type = null; - this.grantor = null; - this.grantorType = null; - setGrant_optionIsSet(false); - this.grant_option = false; - } - - public String getRole_name() { - return this.role_name; - } - - public void setRole_name(String role_name) { - this.role_name = role_name; - } - - public void unsetRole_name() { - this.role_name = null; - } - - /** Returns true if field role_name is set (has been assigned a value) and false otherwise */ - public boolean isSetRole_name() { - return this.role_name != null; - } - - public void setRole_nameIsSet(boolean value) { - if (!value) { - this.role_name = null; - } - } - - public String getPrincipal_name() { - return this.principal_name; - } - - public void setPrincipal_name(String principal_name) { - this.principal_name = principal_name; - } - - public void unsetPrincipal_name() { - this.principal_name = null; - } - - /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipal_name() { - return this.principal_name != null; - } - - public void setPrincipal_nameIsSet(boolean value) { - if (!value) { - this.principal_name = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getPrincipal_type() { - return this.principal_type; - } - - /** - * - * @see PrincipalType - */ - public void setPrincipal_type(PrincipalType principal_type) { - this.principal_type = principal_type; - } - - public void unsetPrincipal_type() { - this.principal_type = null; - } - - /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipal_type() { - return this.principal_type != null; - } - - public void setPrincipal_typeIsSet(boolean value) { - if (!value) { - this.principal_type = null; - } - } - - public String getGrantor() { - return this.grantor; - } - - public void setGrantor(String grantor) { - this.grantor = grantor; - } - - public void unsetGrantor() { - this.grantor = null; - } - - /** Returns true if field grantor is set (has been assigned a value) and false otherwise */ - public boolean isSetGrantor() { - return this.grantor != null; - } - - public void setGrantorIsSet(boolean value) { - if (!value) { - this.grantor = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getGrantorType() { - return this.grantorType; - } - - /** - * - * @see PrincipalType - */ - public void setGrantorType(PrincipalType grantorType) { - this.grantorType = grantorType; - } - - public void unsetGrantorType() { - this.grantorType = null; - } - - /** Returns true if field grantorType is set (has been assigned a value) and false otherwise */ - public boolean isSetGrantorType() { - return this.grantorType != null; - } - - public void setGrantorTypeIsSet(boolean value) { - if (!value) { - this.grantorType = null; - } - } - - public boolean isGrant_option() { - return this.grant_option; - } - - public void setGrant_option(boolean grant_option) { - this.grant_option = grant_option; - setGrant_optionIsSet(true); - } - - public void unsetGrant_option() { - __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 EncodingUtils.testBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID); - } - - public void setGrant_optionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ROLE_NAME: - if (value == null) { - unsetRole_name(); - } else { - setRole_name((String)value); - } - break; - - case PRINCIPAL_NAME: - if (value == null) { - unsetPrincipal_name(); - } else { - setPrincipal_name((String)value); - } - break; - - case PRINCIPAL_TYPE: - if (value == null) { - unsetPrincipal_type(); - } else { - setPrincipal_type((PrincipalType)value); - } - break; - - case GRANTOR: - if (value == null) { - unsetGrantor(); - } else { - setGrantor((String)value); - } - break; - - case GRANTOR_TYPE: - if (value == null) { - unsetGrantorType(); - } else { - setGrantorType((PrincipalType)value); - } - break; - - case GRANT_OPTION: - if (value == null) { - unsetGrant_option(); - } else { - setGrant_option((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ROLE_NAME: - return getRole_name(); - - case PRINCIPAL_NAME: - return getPrincipal_name(); - - case PRINCIPAL_TYPE: - return getPrincipal_type(); - - case GRANTOR: - return getGrantor(); - - case GRANTOR_TYPE: - return getGrantorType(); - - case GRANT_OPTION: - return isGrant_option(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ROLE_NAME: - return isSetRole_name(); - case PRINCIPAL_NAME: - return isSetPrincipal_name(); - case PRINCIPAL_TYPE: - return isSetPrincipal_type(); - case GRANTOR: - return isSetGrantor(); - case GRANTOR_TYPE: - return isSetGrantorType(); - case GRANT_OPTION: - return isSetGrant_option(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof grant_role_args) - return this.equals((grant_role_args)that); - return false; - } - - public boolean equals(grant_role_args that) { - if (that == null) - return false; - - boolean this_present_role_name = true && this.isSetRole_name(); - boolean that_present_role_name = true && that.isSetRole_name(); - if (this_present_role_name || that_present_role_name) { - if (!(this_present_role_name && that_present_role_name)) - return false; - if (!this.role_name.equals(that.role_name)) - return false; - } - - boolean this_present_principal_name = true && this.isSetPrincipal_name(); - boolean that_present_principal_name = true && that.isSetPrincipal_name(); - if (this_present_principal_name || that_present_principal_name) { - if (!(this_present_principal_name && that_present_principal_name)) - return false; - if (!this.principal_name.equals(that.principal_name)) - return false; - } - - boolean this_present_principal_type = true && this.isSetPrincipal_type(); - boolean that_present_principal_type = true && that.isSetPrincipal_type(); - if (this_present_principal_type || that_present_principal_type) { - if (!(this_present_principal_type && that_present_principal_type)) - return false; - if (!this.principal_type.equals(that.principal_type)) - return false; - } - - boolean this_present_grantor = true && this.isSetGrantor(); - boolean that_present_grantor = true && that.isSetGrantor(); - if (this_present_grantor || that_present_grantor) { - if (!(this_present_grantor && that_present_grantor)) - return false; - if (!this.grantor.equals(that.grantor)) - return false; - } - - boolean this_present_grantorType = true && this.isSetGrantorType(); - boolean that_present_grantorType = true && that.isSetGrantorType(); - if (this_present_grantorType || that_present_grantorType) { - if (!(this_present_grantorType && that_present_grantorType)) - return false; - if (!this.grantorType.equals(that.grantorType)) - return false; - } - - boolean this_present_grant_option = true; - boolean that_present_grant_option = true; - if (this_present_grant_option || that_present_grant_option) { - if (!(this_present_grant_option && that_present_grant_option)) - return false; - if (this.grant_option != that.grant_option) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_role_name = true && (isSetRole_name()); - list.add(present_role_name); - if (present_role_name) - list.add(role_name); - - boolean present_principal_name = true && (isSetPrincipal_name()); - list.add(present_principal_name); - if (present_principal_name) - list.add(principal_name); - - boolean present_principal_type = true && (isSetPrincipal_type()); - list.add(present_principal_type); - if (present_principal_type) - list.add(principal_type.getValue()); - - boolean present_grantor = true && (isSetGrantor()); - list.add(present_grantor); - if (present_grantor) - list.add(grantor); - - boolean present_grantorType = true && (isSetGrantorType()); - list.add(present_grantorType); - if (present_grantorType) - list.add(grantorType.getValue()); - - boolean present_grant_option = true; - list.add(present_grant_option); - if (present_grant_option) - list.add(grant_option); - - return list.hashCode(); - } - - @Override - public int compareTo(grant_role_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(other.isSetRole_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRole_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, other.role_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipal_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipal_type()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(other.isSetGrantor()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantor()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantor, other.grantor); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrantorType()).compareTo(other.isSetGrantorType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrantorType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorType, other.grantorType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGrant_option()).compareTo(other.isSetGrant_option()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGrant_option()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grant_option, other.grant_option); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("grant_role_args("); - boolean first = true; - - sb.append("role_name:"); - if (this.role_name == null) { - sb.append("null"); - } else { - sb.append(this.role_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("principal_name:"); - if (this.principal_name == null) { - sb.append("null"); - } else { - sb.append(this.principal_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("principal_type:"); - if (this.principal_type == null) { - sb.append("null"); - } else { - sb.append(this.principal_type); - } - first = false; - if (!first) sb.append(", "); - sb.append("grantor:"); - if (this.grantor == null) { - sb.append("null"); - } else { - sb.append(this.grantor); - } - first = false; - if (!first) sb.append(", "); - sb.append("grantorType:"); - if (this.grantorType == null) { - sb.append("null"); - } else { - sb.append(this.grantorType); - } - first = false; - if (!first) sb.append(", "); - sb.append("grant_option:"); - sb.append(this.grant_option); - 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 { - // 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_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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_role_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_role_result.class, metaDataMap); - } - - public grant_role_result() { - } - - public grant_role_result( - boolean success, - MetaException o1) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public grant_role_result(grant_role_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public grant_role_result deepCopy() { - return new grant_role_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof grant_role_result) - return this.equals((grant_role_result)that); - return false; - } - - public boolean equals(grant_role_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(grant_role_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("grant_role_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 { - // 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_role_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ROLE_NAME((short)1, "role_name"), - PRINCIPAL_NAME((short)2, "principal_name"), - /** - * - * @see PrincipalType - */ - PRINCIPAL_TYPE((short)3, "principal_type"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ROLE_NAME - return ROLE_NAME; - case 2: // PRINCIPAL_NAME - return PRINCIPAL_NAME; - case 3: // PRINCIPAL_TYPE - return PRINCIPAL_TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("role_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_role_args.class, metaDataMap); - } - - public revoke_role_args() { - } - - public revoke_role_args( - String role_name, - String principal_name, - PrincipalType principal_type) - { - this(); - this.role_name = role_name; - this.principal_name = principal_name; - this.principal_type = principal_type; - } - - /** - * Performs a deep copy on other. - */ - public revoke_role_args(revoke_role_args other) { - if (other.isSetRole_name()) { - this.role_name = other.role_name; - } - if (other.isSetPrincipal_name()) { - this.principal_name = other.principal_name; - } - if (other.isSetPrincipal_type()) { - this.principal_type = other.principal_type; - } - } - - public revoke_role_args deepCopy() { - return new revoke_role_args(this); - } - - @Override - public void clear() { - this.role_name = null; - this.principal_name = null; - this.principal_type = null; - } - - public String getRole_name() { - return this.role_name; - } - - public void setRole_name(String role_name) { - this.role_name = role_name; - } - - public void unsetRole_name() { - this.role_name = null; - } - - /** Returns true if field role_name is set (has been assigned a value) and false otherwise */ - public boolean isSetRole_name() { - return this.role_name != null; - } - - public void setRole_nameIsSet(boolean value) { - if (!value) { - this.role_name = null; - } - } - - public String getPrincipal_name() { - return this.principal_name; - } - - public void setPrincipal_name(String principal_name) { - this.principal_name = principal_name; - } - - public void unsetPrincipal_name() { - this.principal_name = null; - } - - /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipal_name() { - return this.principal_name != null; - } - - public void setPrincipal_nameIsSet(boolean value) { - if (!value) { - this.principal_name = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getPrincipal_type() { - return this.principal_type; - } - - /** - * - * @see PrincipalType - */ - public void setPrincipal_type(PrincipalType principal_type) { - this.principal_type = principal_type; - } - - public void unsetPrincipal_type() { - this.principal_type = null; - } - - /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipal_type() { - return this.principal_type != null; - } - - public void setPrincipal_typeIsSet(boolean value) { - if (!value) { - this.principal_type = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ROLE_NAME: - if (value == null) { - unsetRole_name(); - } else { - setRole_name((String)value); - } - break; - - case PRINCIPAL_NAME: - if (value == null) { - unsetPrincipal_name(); - } else { - setPrincipal_name((String)value); - } - break; - - case PRINCIPAL_TYPE: - if (value == null) { - unsetPrincipal_type(); - } else { - setPrincipal_type((PrincipalType)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ROLE_NAME: - return getRole_name(); - - case PRINCIPAL_NAME: - return getPrincipal_name(); - - case PRINCIPAL_TYPE: - return getPrincipal_type(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ROLE_NAME: - return isSetRole_name(); - case PRINCIPAL_NAME: - return isSetPrincipal_name(); - case PRINCIPAL_TYPE: - return isSetPrincipal_type(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof revoke_role_args) - return this.equals((revoke_role_args)that); - return false; - } - - public boolean equals(revoke_role_args that) { - if (that == null) - return false; - - boolean this_present_role_name = true && this.isSetRole_name(); - boolean that_present_role_name = true && that.isSetRole_name(); - if (this_present_role_name || that_present_role_name) { - if (!(this_present_role_name && that_present_role_name)) - return false; - if (!this.role_name.equals(that.role_name)) - return false; - } - - boolean this_present_principal_name = true && this.isSetPrincipal_name(); - boolean that_present_principal_name = true && that.isSetPrincipal_name(); - if (this_present_principal_name || that_present_principal_name) { - if (!(this_present_principal_name && that_present_principal_name)) - return false; - if (!this.principal_name.equals(that.principal_name)) - return false; - } - - boolean this_present_principal_type = true && this.isSetPrincipal_type(); - boolean that_present_principal_type = true && that.isSetPrincipal_type(); - if (this_present_principal_type || that_present_principal_type) { - if (!(this_present_principal_type && that_present_principal_type)) - return false; - if (!this.principal_type.equals(that.principal_type)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_role_name = true && (isSetRole_name()); - list.add(present_role_name); - if (present_role_name) - list.add(role_name); - - boolean present_principal_name = true && (isSetPrincipal_name()); - list.add(present_principal_name); - if (present_principal_name) - list.add(principal_name); - - boolean present_principal_type = true && (isSetPrincipal_type()); - list.add(present_principal_type); - if (present_principal_type) - list.add(principal_type.getValue()); - - return list.hashCode(); - } - - @Override - public int compareTo(revoke_role_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(other.isSetRole_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRole_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, other.role_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipal_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipal_type()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("revoke_role_args("); - boolean first = true; - - sb.append("role_name:"); - if (this.role_name == null) { - sb.append("null"); - } else { - sb.append(this.role_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("principal_name:"); - if (this.principal_name == null) { - sb.append("null"); - } else { - sb.append(this.principal_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("principal_type:"); - if (this.principal_type == null) { - sb.append("null"); - } else { - sb.append(this.principal_type); - } - 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 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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setPrincipal_typeIsSet(true); - } - } - } - - } - - public static class revoke_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_role_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_role_result.class, metaDataMap); - } - - public revoke_role_result() { - } - - public revoke_role_result( - boolean success, - MetaException o1) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public revoke_role_result(revoke_role_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public revoke_role_result deepCopy() { - return new revoke_role_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof revoke_role_result) - return this.equals((revoke_role_result)that); - return false; - } - - public boolean equals(revoke_role_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(revoke_role_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("revoke_role_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 { - // 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_roles_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PRINCIPAL_NAME((short)1, "principal_name"), - /** - * - * @see PrincipalType - */ - PRINCIPAL_TYPE((short)2, "principal_type"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PRINCIPAL_NAME - return PRINCIPAL_NAME; - case 2: // PRINCIPAL_TYPE - return PRINCIPAL_TYPE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_roles_args.class, metaDataMap); - } - - public list_roles_args() { - } - - public list_roles_args( - String principal_name, - PrincipalType principal_type) - { - this(); - this.principal_name = principal_name; - this.principal_type = principal_type; - } - - /** - * Performs a deep copy on other. - */ - public list_roles_args(list_roles_args other) { - if (other.isSetPrincipal_name()) { - this.principal_name = other.principal_name; - } - if (other.isSetPrincipal_type()) { - this.principal_type = other.principal_type; - } - } - - public list_roles_args deepCopy() { - return new list_roles_args(this); - } - - @Override - public void clear() { - this.principal_name = null; - this.principal_type = null; - } - - public String getPrincipal_name() { - return this.principal_name; - } - - public void setPrincipal_name(String principal_name) { - this.principal_name = principal_name; - } - - public void unsetPrincipal_name() { - this.principal_name = null; - } - - /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipal_name() { - return this.principal_name != null; - } - - public void setPrincipal_nameIsSet(boolean value) { - if (!value) { - this.principal_name = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getPrincipal_type() { - return this.principal_type; - } - - /** - * - * @see PrincipalType - */ - public void setPrincipal_type(PrincipalType principal_type) { - this.principal_type = principal_type; - } - - public void unsetPrincipal_type() { - this.principal_type = null; - } - - /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipal_type() { - return this.principal_type != null; - } - - public void setPrincipal_typeIsSet(boolean value) { - if (!value) { - this.principal_type = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PRINCIPAL_NAME: - if (value == null) { - unsetPrincipal_name(); - } else { - setPrincipal_name((String)value); - } - break; - - case PRINCIPAL_TYPE: - if (value == null) { - unsetPrincipal_type(); - } else { - setPrincipal_type((PrincipalType)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PRINCIPAL_NAME: - return getPrincipal_name(); - - case PRINCIPAL_TYPE: - return getPrincipal_type(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PRINCIPAL_NAME: - return isSetPrincipal_name(); - case PRINCIPAL_TYPE: - return isSetPrincipal_type(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof list_roles_args) - return this.equals((list_roles_args)that); - return false; - } - - public boolean equals(list_roles_args that) { - if (that == null) - return false; - - boolean this_present_principal_name = true && this.isSetPrincipal_name(); - boolean that_present_principal_name = true && that.isSetPrincipal_name(); - if (this_present_principal_name || that_present_principal_name) { - if (!(this_present_principal_name && that_present_principal_name)) - return false; - if (!this.principal_name.equals(that.principal_name)) - return false; - } - - boolean this_present_principal_type = true && this.isSetPrincipal_type(); - boolean that_present_principal_type = true && that.isSetPrincipal_type(); - if (this_present_principal_type || that_present_principal_type) { - if (!(this_present_principal_type && that_present_principal_type)) - return false; - if (!this.principal_type.equals(that.principal_type)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_principal_name = true && (isSetPrincipal_name()); - list.add(present_principal_name); - if (present_principal_name) - list.add(principal_name); - - boolean present_principal_type = true && (isSetPrincipal_type()); - list.add(present_principal_type); - if (present_principal_type) - list.add(principal_type.getValue()); - - return list.hashCode(); - } - - @Override - public int compareTo(list_roles_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipal_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipal_type()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("list_roles_args("); - boolean first = true; - - sb.append("principal_name:"); - if (this.principal_name == null) { - sb.append("null"); - } else { - sb.append(this.principal_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("principal_type:"); - if (this.principal_type == null) { - sb.append("null"); - } else { - sb.append(this.principal_type); - } - 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 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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); - struct.setPrincipal_typeIsSet(true); - } - } - } - - } - - public static class list_roles_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_roles_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Role.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_roles_result.class, metaDataMap); - } - - public list_roles_result() { - } - - public list_roles_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public list_roles_result(list_roles_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (Role other_element : other.success) { - __this__success.add(new Role(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public list_roles_result deepCopy() { - return new list_roles_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Role elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof list_roles_result) - return this.equals((list_roles_result)that); - return false; - } - - public boolean equals(list_roles_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(list_roles_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("list_roles_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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 _list1198 = iprot.readListBegin(); - struct.success = new ArrayList(_list1198.size); - Role _elem1199; - for (int _i1200 = 0; _i1200 < _list1198.size; ++_i1200) - { - _elem1199 = new Role(); - _elem1199.read(iprot); - struct.success.add(_elem1199); - } - 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 _iter1201 : struct.success) - { - _iter1201.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 _iter1202 : struct.success) - { - _iter1202.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 _list1203 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list1203.size); - Role _elem1204; - for (int _i1205 = 0; _i1205 < _list1203.size; ++_i1205) - { - _elem1204 = new Role(); - _elem1204.read(iprot); - struct.success.add(_elem1204); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.o1 = new MetaException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - } - } - - } - - public static class grant_revoke_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_role_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new grant_revoke_role_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new grant_revoke_role_argsTupleSchemeFactory()); - } - - private GrantRevokeRoleRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GrantRevokeRoleRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_revoke_role_args.class, metaDataMap); - } - - public grant_revoke_role_args() { - } - - public grant_revoke_role_args( - GrantRevokeRoleRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public grant_revoke_role_args(grant_revoke_role_args other) { - if (other.isSetRequest()) { - this.request = new GrantRevokeRoleRequest(other.request); - } - } - - public grant_revoke_role_args deepCopy() { - return new grant_revoke_role_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public GrantRevokeRoleRequest getRequest() { - return this.request; - } - - public void setRequest(GrantRevokeRoleRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((GrantRevokeRoleRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof grant_revoke_role_args) - return this.equals((grant_revoke_role_args)that); - return false; - } - - public boolean equals(grant_revoke_role_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(grant_revoke_role_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("grant_revoke_role_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 grant_revoke_role_argsStandardSchemeFactory implements SchemeFactory { - public grant_revoke_role_argsStandardScheme getScheme() { - return new grant_revoke_role_argsStandardScheme(); - } - } - - private static class grant_revoke_role_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, grant_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new GrantRevokeRoleRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_revoke_role_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class grant_revoke_role_argsTupleSchemeFactory implements SchemeFactory { - public grant_revoke_role_argsTupleScheme getScheme() { - return new grant_revoke_role_argsTupleScheme(); - } - } - - private static class grant_revoke_role_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, grant_revoke_role_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_role_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new GrantRevokeRoleRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class grant_revoke_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_role_result"); - - 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 grant_revoke_role_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new grant_revoke_role_resultTupleSchemeFactory()); - } - - private GrantRevokeRoleResponse success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GrantRevokeRoleResponse.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_revoke_role_result.class, metaDataMap); - } - - public grant_revoke_role_result() { - } - - public grant_revoke_role_result( - GrantRevokeRoleResponse success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public grant_revoke_role_result(grant_revoke_role_result other) { - if (other.isSetSuccess()) { - this.success = new GrantRevokeRoleResponse(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public grant_revoke_role_result deepCopy() { - return new grant_revoke_role_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public GrantRevokeRoleResponse getSuccess() { - return this.success; - } - - public void setSuccess(GrantRevokeRoleResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((GrantRevokeRoleResponse)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof grant_revoke_role_result) - return this.equals((grant_revoke_role_result)that); - return false; - } - - public boolean equals(grant_revoke_role_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(grant_revoke_role_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("grant_revoke_role_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 grant_revoke_role_resultStandardSchemeFactory implements SchemeFactory { - public grant_revoke_role_resultStandardScheme getScheme() { - return new grant_revoke_role_resultStandardScheme(); - } - } - - private static class grant_revoke_role_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, grant_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.STRUCT) { - struct.success = new GrantRevokeRoleResponse(); - 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, grant_revoke_role_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 grant_revoke_role_resultTupleSchemeFactory implements SchemeFactory { - public grant_revoke_role_resultTupleScheme getScheme() { - return new grant_revoke_role_resultTupleScheme(); - } - } - - private static class grant_revoke_role_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, grant_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()) { - struct.success.write(oprot); - } - if (struct.isSetO1()) { - struct.o1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_role_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new GrantRevokeRoleResponse(); - 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 get_principals_in_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_principals_in_role_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_principals_in_role_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_principals_in_role_argsTupleSchemeFactory()); - } - - private GetPrincipalsInRoleRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetPrincipalsInRoleRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_principals_in_role_args.class, metaDataMap); - } - - public get_principals_in_role_args() { - } - - public get_principals_in_role_args( - GetPrincipalsInRoleRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public get_principals_in_role_args(get_principals_in_role_args other) { - if (other.isSetRequest()) { - this.request = new GetPrincipalsInRoleRequest(other.request); - } - } - - public get_principals_in_role_args deepCopy() { - return new get_principals_in_role_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public GetPrincipalsInRoleRequest getRequest() { - return this.request; - } - - public void setRequest(GetPrincipalsInRoleRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((GetPrincipalsInRoleRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_principals_in_role_args) - return this.equals((get_principals_in_role_args)that); - return false; - } - - public boolean equals(get_principals_in_role_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(get_principals_in_role_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_principals_in_role_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 get_principals_in_role_argsStandardSchemeFactory implements SchemeFactory { - public get_principals_in_role_argsStandardScheme getScheme() { - return new get_principals_in_role_argsStandardScheme(); - } - } - - private static class get_principals_in_role_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_principals_in_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new GetPrincipalsInRoleRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_principals_in_role_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_principals_in_role_argsTupleSchemeFactory implements SchemeFactory { - public get_principals_in_role_argsTupleScheme getScheme() { - return new get_principals_in_role_argsTupleScheme(); - } - } - - private static class get_principals_in_role_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_principals_in_role_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_principals_in_role_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new GetPrincipalsInRoleRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class get_principals_in_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_principals_in_role_result"); - - 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_principals_in_role_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_principals_in_role_resultTupleSchemeFactory()); - } - - private GetPrincipalsInRoleResponse success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetPrincipalsInRoleResponse.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_principals_in_role_result.class, metaDataMap); - } - - public get_principals_in_role_result() { - } - - public get_principals_in_role_result( - GetPrincipalsInRoleResponse success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_principals_in_role_result(get_principals_in_role_result other) { - if (other.isSetSuccess()) { - this.success = new GetPrincipalsInRoleResponse(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_principals_in_role_result deepCopy() { - return new get_principals_in_role_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public GetPrincipalsInRoleResponse getSuccess() { - return this.success; - } - - public void setSuccess(GetPrincipalsInRoleResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((GetPrincipalsInRoleResponse)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_principals_in_role_result) - return this.equals((get_principals_in_role_result)that); - return false; - } - - public boolean equals(get_principals_in_role_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_principals_in_role_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_principals_in_role_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_principals_in_role_resultStandardSchemeFactory implements SchemeFactory { - public get_principals_in_role_resultStandardScheme getScheme() { - return new get_principals_in_role_resultStandardScheme(); - } - } - - private static class get_principals_in_role_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_principals_in_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.STRUCT) { - struct.success = new GetPrincipalsInRoleResponse(); - 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_principals_in_role_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_principals_in_role_resultTupleSchemeFactory implements SchemeFactory { - public get_principals_in_role_resultTupleScheme getScheme() { - return new get_principals_in_role_resultTupleScheme(); - } - } - - private static class get_principals_in_role_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_principals_in_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()) { - struct.success.write(oprot); - } - if (struct.isSetO1()) { - struct.o1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_principals_in_role_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new GetPrincipalsInRoleResponse(); - 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 get_role_grants_for_principal_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_grants_for_principal_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", 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_grants_for_principal_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_role_grants_for_principal_argsTupleSchemeFactory()); - } - - private GetRoleGrantsForPrincipalRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetRoleGrantsForPrincipalRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_role_grants_for_principal_args.class, metaDataMap); - } - - public get_role_grants_for_principal_args() { - } - - public get_role_grants_for_principal_args( - GetRoleGrantsForPrincipalRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public get_role_grants_for_principal_args(get_role_grants_for_principal_args other) { - if (other.isSetRequest()) { - this.request = new GetRoleGrantsForPrincipalRequest(other.request); - } - } - - public get_role_grants_for_principal_args deepCopy() { - return new get_role_grants_for_principal_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public GetRoleGrantsForPrincipalRequest getRequest() { - return this.request; - } - - public void setRequest(GetRoleGrantsForPrincipalRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((GetRoleGrantsForPrincipalRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_role_grants_for_principal_args) - return this.equals((get_role_grants_for_principal_args)that); - return false; - } - - public boolean equals(get_role_grants_for_principal_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(get_role_grants_for_principal_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_role_grants_for_principal_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 get_role_grants_for_principal_argsStandardSchemeFactory implements SchemeFactory { - public get_role_grants_for_principal_argsStandardScheme getScheme() { - return new get_role_grants_for_principal_argsStandardScheme(); - } - } - - private static class get_role_grants_for_principal_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_grants_for_principal_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new GetRoleGrantsForPrincipalRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_grants_for_principal_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_role_grants_for_principal_argsTupleSchemeFactory implements SchemeFactory { - public get_role_grants_for_principal_argsTupleScheme getScheme() { - return new get_role_grants_for_principal_argsTupleScheme(); - } - } - - private static class get_role_grants_for_principal_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_role_grants_for_principal_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_role_grants_for_principal_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new GetRoleGrantsForPrincipalRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class get_role_grants_for_principal_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_grants_for_principal_result"); - - 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_role_grants_for_principal_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_role_grants_for_principal_resultTupleSchemeFactory()); - } - - private GetRoleGrantsForPrincipalResponse success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetRoleGrantsForPrincipalResponse.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_role_grants_for_principal_result.class, metaDataMap); - } - - public get_role_grants_for_principal_result() { - } - - public get_role_grants_for_principal_result( - GetRoleGrantsForPrincipalResponse success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_role_grants_for_principal_result(get_role_grants_for_principal_result other) { - if (other.isSetSuccess()) { - this.success = new GetRoleGrantsForPrincipalResponse(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_role_grants_for_principal_result deepCopy() { - return new get_role_grants_for_principal_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public GetRoleGrantsForPrincipalResponse getSuccess() { - return this.success; - } - - public void setSuccess(GetRoleGrantsForPrincipalResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((GetRoleGrantsForPrincipalResponse)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_role_grants_for_principal_result) - return this.equals((get_role_grants_for_principal_result)that); - return false; - } - - public boolean equals(get_role_grants_for_principal_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_role_grants_for_principal_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_role_grants_for_principal_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_role_grants_for_principal_resultStandardSchemeFactory implements SchemeFactory { - public get_role_grants_for_principal_resultStandardScheme getScheme() { - return new get_role_grants_for_principal_resultStandardScheme(); - } - } - - private static class get_role_grants_for_principal_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_grants_for_principal_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 GetRoleGrantsForPrincipalResponse(); - 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_role_grants_for_principal_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_role_grants_for_principal_resultTupleSchemeFactory implements SchemeFactory { - public get_role_grants_for_principal_resultTupleScheme getScheme() { - return new get_role_grants_for_principal_resultTupleScheme(); - } - } - - private static class get_role_grants_for_principal_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_role_grants_for_principal_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_role_grants_for_principal_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new GetRoleGrantsForPrincipalResponse(); - 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 get_privilege_set_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_privilege_set_args"); - - 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)1); - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - HIVE_OBJECT((short)1, "hiveObject"), - USER_NAME((short)2, "user_name"), - GROUP_NAMES((short)3, "group_names"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // HIVE_OBJECT - return HIVE_OBJECT; - case 2: // USER_NAME - return USER_NAME; - case 3: // GROUP_NAMES - return GROUP_NAMES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.HIVE_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("hiveObject", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectRef.class))); - tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_privilege_set_args.class, metaDataMap); - } - - public get_privilege_set_args() { - } - - public get_privilege_set_args( - HiveObjectRef hiveObject, - String user_name, - List group_names) - { - this(); - this.hiveObject = hiveObject; - this.user_name = user_name; - this.group_names = group_names; - } - - /** - * Performs a deep copy on other. - */ - public get_privilege_set_args(get_privilege_set_args other) { - if (other.isSetHiveObject()) { - this.hiveObject = new HiveObjectRef(other.hiveObject); - } - if (other.isSetUser_name()) { - this.user_name = other.user_name; - } - if (other.isSetGroup_names()) { - List __this__group_names = new ArrayList(other.group_names); - this.group_names = __this__group_names; - } - } - - public get_privilege_set_args deepCopy() { - return new get_privilege_set_args(this); - } - - @Override - public void clear() { - this.hiveObject = null; - this.user_name = null; - this.group_names = null; - } - - public HiveObjectRef getHiveObject() { - return this.hiveObject; - } - - public void setHiveObject(HiveObjectRef hiveObject) { - this.hiveObject = hiveObject; - } - - public void unsetHiveObject() { - this.hiveObject = null; - } - - /** Returns true if field hiveObject is set (has been assigned a value) and false otherwise */ - public boolean isSetHiveObject() { - return this.hiveObject != null; - } - - public void setHiveObjectIsSet(boolean value) { - if (!value) { - this.hiveObject = null; - } - } - - public String getUser_name() { - return this.user_name; - } - - public void setUser_name(String user_name) { - this.user_name = user_name; - } - - public void unsetUser_name() { - this.user_name = null; - } - - /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ - public boolean isSetUser_name() { - return this.user_name != null; - } - - public void setUser_nameIsSet(boolean value) { - if (!value) { - this.user_name = null; - } - } - - public int getGroup_namesSize() { - return (this.group_names == null) ? 0 : this.group_names.size(); - } - - public java.util.Iterator getGroup_namesIterator() { - return (this.group_names == null) ? null : this.group_names.iterator(); - } - - public void addToGroup_names(String elem) { - if (this.group_names == null) { - this.group_names = new ArrayList(); - } - this.group_names.add(elem); - } - - public List getGroup_names() { - return this.group_names; - } - - public void setGroup_names(List group_names) { - this.group_names = group_names; - } - - public void unsetGroup_names() { - this.group_names = null; - } - - /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ - public boolean isSetGroup_names() { - return this.group_names != null; - } - - public void setGroup_namesIsSet(boolean value) { - if (!value) { - this.group_names = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case HIVE_OBJECT: - if (value == null) { - unsetHiveObject(); - } else { - setHiveObject((HiveObjectRef)value); - } - break; - - case USER_NAME: - if (value == null) { - unsetUser_name(); - } else { - setUser_name((String)value); - } - break; - - case GROUP_NAMES: - if (value == null) { - unsetGroup_names(); - } else { - setGroup_names((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case HIVE_OBJECT: - return getHiveObject(); - - case USER_NAME: - return getUser_name(); - - case GROUP_NAMES: - return getGroup_names(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case HIVE_OBJECT: - return isSetHiveObject(); - case USER_NAME: - return isSetUser_name(); - case GROUP_NAMES: - return isSetGroup_names(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_privilege_set_args) - return this.equals((get_privilege_set_args)that); - return false; - } - - public boolean equals(get_privilege_set_args that) { - if (that == null) - return false; - - boolean this_present_hiveObject = true && this.isSetHiveObject(); - boolean that_present_hiveObject = true && that.isSetHiveObject(); - if (this_present_hiveObject || that_present_hiveObject) { - if (!(this_present_hiveObject && that_present_hiveObject)) - return false; - if (!this.hiveObject.equals(that.hiveObject)) - return false; - } - - boolean this_present_user_name = true && this.isSetUser_name(); - boolean that_present_user_name = true && that.isSetUser_name(); - if (this_present_user_name || that_present_user_name) { - if (!(this_present_user_name && that_present_user_name)) - return false; - if (!this.user_name.equals(that.user_name)) - return false; - } - - boolean this_present_group_names = true && this.isSetGroup_names(); - boolean that_present_group_names = true && that.isSetGroup_names(); - if (this_present_group_names || that_present_group_names) { - if (!(this_present_group_names && that_present_group_names)) - return false; - if (!this.group_names.equals(that.group_names)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_hiveObject = true && (isSetHiveObject()); - list.add(present_hiveObject); - if (present_hiveObject) - list.add(hiveObject); - - boolean present_user_name = true && (isSetUser_name()); - list.add(present_user_name); - if (present_user_name) - list.add(user_name); - - boolean present_group_names = true && (isSetGroup_names()); - list.add(present_group_names); - if (present_group_names) - list.add(group_names); - - return list.hashCode(); - } - - @Override - public int compareTo(get_privilege_set_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(other.isSetHiveObject()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHiveObject()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hiveObject, other.hiveObject); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUser_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGroup_names()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.group_names); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_privilege_set_args("); - boolean first = true; - - sb.append("hiveObject:"); - if (this.hiveObject == null) { - sb.append("null"); - } else { - sb.append(this.hiveObject); - } - first = false; - if (!first) sb.append(", "); - sb.append("user_name:"); - if (this.user_name == null) { - sb.append("null"); - } else { - sb.append(this.user_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("group_names:"); - if (this.group_names == null) { - sb.append("null"); - } else { - sb.append(this.group_names); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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 _list1206 = iprot.readListBegin(); - struct.group_names = new ArrayList(_list1206.size); - String _elem1207; - for (int _i1208 = 0; _i1208 < _list1206.size; ++_i1208) - { - _elem1207 = iprot.readString(); - struct.group_names.add(_elem1207); - } - 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 _iter1209 : struct.group_names) - { - oprot.writeString(_iter1209); - } - 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 _iter1210 : struct.group_names) - { - oprot.writeString(_iter1210); - } - } - } - } - - @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 _list1211 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.group_names = new ArrayList(_list1211.size); - String _elem1212; - for (int _i1213 = 0; _i1213 < _list1211.size; ++_i1213) - { - _elem1212 = iprot.readString(); - struct.group_names.add(_elem1212); - } - } - struct.setGroup_namesIsSet(true); - } - } - } - - } - - public static class get_privilege_set_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_privilege_set_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrincipalPrivilegeSet.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_privilege_set_result.class, metaDataMap); - } - - public get_privilege_set_result() { - } - - public get_privilege_set_result( - PrincipalPrivilegeSet success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_privilege_set_result(get_privilege_set_result other) { - if (other.isSetSuccess()) { - this.success = new PrincipalPrivilegeSet(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_privilege_set_result deepCopy() { - return new get_privilege_set_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public PrincipalPrivilegeSet getSuccess() { - return this.success; - } - - public void setSuccess(PrincipalPrivilegeSet success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((PrincipalPrivilegeSet)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_privilege_set_result) - return this.equals((get_privilege_set_result)that); - return false; - } - - public boolean equals(get_privilege_set_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_privilege_set_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_privilege_set_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_privileges_args"); - - 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 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PRINCIPAL_NAME((short)1, "principal_name"), - /** - * - * @see PrincipalType - */ - PRINCIPAL_TYPE((short)2, "principal_type"), - HIVE_OBJECT((short)3, "hiveObject"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PRINCIPAL_NAME - return PRINCIPAL_NAME; - case 2: // PRINCIPAL_TYPE - return PRINCIPAL_TYPE; - case 3: // HIVE_OBJECT - return HIVE_OBJECT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); - tmpMap.put(_Fields.HIVE_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("hiveObject", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectRef.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_privileges_args.class, metaDataMap); - } - - public list_privileges_args() { - } - - public list_privileges_args( - String principal_name, - PrincipalType principal_type, - HiveObjectRef hiveObject) - { - this(); - this.principal_name = principal_name; - this.principal_type = principal_type; - this.hiveObject = hiveObject; - } - - /** - * Performs a deep copy on other. - */ - public list_privileges_args(list_privileges_args other) { - if (other.isSetPrincipal_name()) { - this.principal_name = other.principal_name; - } - if (other.isSetPrincipal_type()) { - this.principal_type = other.principal_type; - } - if (other.isSetHiveObject()) { - this.hiveObject = new HiveObjectRef(other.hiveObject); - } - } - - public list_privileges_args deepCopy() { - return new list_privileges_args(this); - } - - @Override - public void clear() { - this.principal_name = null; - this.principal_type = null; - this.hiveObject = null; - } - - public String getPrincipal_name() { - return this.principal_name; - } - - public void setPrincipal_name(String principal_name) { - this.principal_name = principal_name; - } - - public void unsetPrincipal_name() { - this.principal_name = null; - } - - /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipal_name() { - return this.principal_name != null; - } - - public void setPrincipal_nameIsSet(boolean value) { - if (!value) { - this.principal_name = null; - } - } - - /** - * - * @see PrincipalType - */ - public PrincipalType getPrincipal_type() { - return this.principal_type; - } - - /** - * - * @see PrincipalType - */ - public void setPrincipal_type(PrincipalType principal_type) { - this.principal_type = principal_type; - } - - public void unsetPrincipal_type() { - this.principal_type = null; - } - - /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ - public boolean isSetPrincipal_type() { - return this.principal_type != null; - } - - public void setPrincipal_typeIsSet(boolean value) { - if (!value) { - this.principal_type = null; - } - } - - public HiveObjectRef getHiveObject() { - return this.hiveObject; - } - - public void setHiveObject(HiveObjectRef hiveObject) { - this.hiveObject = hiveObject; - } - - public void unsetHiveObject() { - this.hiveObject = null; - } - - /** Returns true if field hiveObject is set (has been assigned a value) and false otherwise */ - public boolean isSetHiveObject() { - return this.hiveObject != null; - } - - public void setHiveObjectIsSet(boolean value) { - if (!value) { - this.hiveObject = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PRINCIPAL_NAME: - if (value == null) { - unsetPrincipal_name(); - } else { - setPrincipal_name((String)value); - } - break; - - case PRINCIPAL_TYPE: - if (value == null) { - unsetPrincipal_type(); - } else { - setPrincipal_type((PrincipalType)value); - } - break; - - case HIVE_OBJECT: - if (value == null) { - unsetHiveObject(); - } else { - setHiveObject((HiveObjectRef)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PRINCIPAL_NAME: - return getPrincipal_name(); - - case PRINCIPAL_TYPE: - return getPrincipal_type(); - - case HIVE_OBJECT: - return getHiveObject(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PRINCIPAL_NAME: - return isSetPrincipal_name(); - case PRINCIPAL_TYPE: - return isSetPrincipal_type(); - case HIVE_OBJECT: - return isSetHiveObject(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof list_privileges_args) - return this.equals((list_privileges_args)that); - return false; - } - - public boolean equals(list_privileges_args that) { - if (that == null) - return false; - - boolean this_present_principal_name = true && this.isSetPrincipal_name(); - boolean that_present_principal_name = true && that.isSetPrincipal_name(); - if (this_present_principal_name || that_present_principal_name) { - if (!(this_present_principal_name && that_present_principal_name)) - return false; - if (!this.principal_name.equals(that.principal_name)) - return false; - } - - boolean this_present_principal_type = true && this.isSetPrincipal_type(); - boolean that_present_principal_type = true && that.isSetPrincipal_type(); - if (this_present_principal_type || that_present_principal_type) { - if (!(this_present_principal_type && that_present_principal_type)) - return false; - if (!this.principal_type.equals(that.principal_type)) - return false; - } - - boolean this_present_hiveObject = true && this.isSetHiveObject(); - boolean that_present_hiveObject = true && that.isSetHiveObject(); - if (this_present_hiveObject || that_present_hiveObject) { - if (!(this_present_hiveObject && that_present_hiveObject)) - return false; - if (!this.hiveObject.equals(that.hiveObject)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_principal_name = true && (isSetPrincipal_name()); - list.add(present_principal_name); - if (present_principal_name) - list.add(principal_name); - - boolean present_principal_type = true && (isSetPrincipal_type()); - list.add(present_principal_type); - if (present_principal_type) - list.add(principal_type.getValue()); - - boolean present_hiveObject = true && (isSetHiveObject()); - list.add(present_hiveObject); - if (present_hiveObject) - list.add(hiveObject); - - return list.hashCode(); - } - - @Override - public int compareTo(list_privileges_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipal_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrincipal_type()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(other.isSetHiveObject()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHiveObject()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hiveObject, other.hiveObject); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("list_privileges_args("); - boolean first = true; - - sb.append("principal_name:"); - if (this.principal_name == null) { - sb.append("null"); - } else { - sb.append(this.principal_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("principal_type:"); - if (this.principal_type == null) { - sb.append("null"); - } else { - sb.append(this.principal_type); - } - first = false; - if (!first) sb.append(", "); - sb.append("hiveObject:"); - if (this.hiveObject == null) { - sb.append("null"); - } else { - sb.append(this.hiveObject); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_privileges_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectPrivilege.class)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_privileges_result.class, metaDataMap); - } - - public list_privileges_result() { - } - - public list_privileges_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public list_privileges_result(list_privileges_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (HiveObjectPrivilege other_element : other.success) { - __this__success.add(new HiveObjectPrivilege(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public list_privileges_result deepCopy() { - return new list_privileges_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(HiveObjectPrivilege elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof list_privileges_result) - return this.equals((list_privileges_result)that); - return false; - } - - public boolean equals(list_privileges_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(list_privileges_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("list_privileges_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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 _list1214 = iprot.readListBegin(); - struct.success = new ArrayList(_list1214.size); - HiveObjectPrivilege _elem1215; - for (int _i1216 = 0; _i1216 < _list1214.size; ++_i1216) - { - _elem1215 = new HiveObjectPrivilege(); - _elem1215.read(iprot); - struct.success.add(_elem1215); - } - 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 _iter1217 : struct.success) - { - _iter1217.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 _iter1218 : struct.success) - { - _iter1218.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 _list1219 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list1219.size); - HiveObjectPrivilege _elem1220; - for (int _i1221 = 0; _i1221 < _list1219.size; ++_i1221) - { - _elem1220 = new HiveObjectPrivilege(); - _elem1220.read(iprot); - struct.success.add(_elem1220); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_privileges_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PRIVILEGES((short)1, "privileges"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PRIVILEGES - return PRIVILEGES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeBag.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_privileges_args.class, metaDataMap); - } - - public grant_privileges_args() { - } - - public grant_privileges_args( - PrivilegeBag privileges) - { - this(); - this.privileges = privileges; - } - - /** - * Performs a deep copy on other. - */ - public grant_privileges_args(grant_privileges_args other) { - if (other.isSetPrivileges()) { - this.privileges = new PrivilegeBag(other.privileges); - } - } - - public grant_privileges_args deepCopy() { - return new grant_privileges_args(this); - } - - @Override - public void clear() { - this.privileges = null; - } - - public PrivilegeBag getPrivileges() { - return this.privileges; - } - - public void setPrivileges(PrivilegeBag privileges) { - this.privileges = privileges; - } - - public void unsetPrivileges() { - this.privileges = null; - } - - /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ - public boolean isSetPrivileges() { - return this.privileges != null; - } - - public void setPrivilegesIsSet(boolean value) { - if (!value) { - this.privileges = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PRIVILEGES: - if (value == null) { - unsetPrivileges(); - } else { - setPrivileges((PrivilegeBag)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PRIVILEGES: - return getPrivileges(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PRIVILEGES: - return isSetPrivileges(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof grant_privileges_args) - return this.equals((grant_privileges_args)that); - return false; - } - - public boolean equals(grant_privileges_args that) { - if (that == null) - return false; - - boolean this_present_privileges = true && this.isSetPrivileges(); - boolean that_present_privileges = true && that.isSetPrivileges(); - if (this_present_privileges || that_present_privileges) { - if (!(this_present_privileges && that_present_privileges)) - return false; - if (!this.privileges.equals(that.privileges)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_privileges = true && (isSetPrivileges()); - list.add(present_privileges); - if (present_privileges) - list.add(privileges); - - return list.hashCode(); - } - - @Override - public int compareTo(grant_privileges_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrivileges()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("grant_privileges_args("); - boolean first = true; - - sb.append("privileges:"); - if (this.privileges == null) { - sb.append("null"); - } else { - sb.append(this.privileges); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_privileges_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_privileges_result.class, metaDataMap); - } - - public grant_privileges_result() { - } - - public grant_privileges_result( - boolean success, - MetaException o1) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public grant_privileges_result(grant_privileges_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public grant_privileges_result deepCopy() { - return new grant_privileges_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof grant_privileges_result) - return this.equals((grant_privileges_result)that); - return false; - } - - public boolean equals(grant_privileges_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(grant_privileges_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("grant_privileges_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 { - // 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_privileges_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PRIVILEGES((short)1, "privileges"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PRIVILEGES - return PRIVILEGES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeBag.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_privileges_args.class, metaDataMap); - } - - public revoke_privileges_args() { - } - - public revoke_privileges_args( - PrivilegeBag privileges) - { - this(); - this.privileges = privileges; - } - - /** - * Performs a deep copy on other. - */ - public revoke_privileges_args(revoke_privileges_args other) { - if (other.isSetPrivileges()) { - this.privileges = new PrivilegeBag(other.privileges); - } - } - - public revoke_privileges_args deepCopy() { - return new revoke_privileges_args(this); - } - - @Override - public void clear() { - this.privileges = null; - } - - public PrivilegeBag getPrivileges() { - return this.privileges; - } - - public void setPrivileges(PrivilegeBag privileges) { - this.privileges = privileges; - } - - public void unsetPrivileges() { - this.privileges = null; - } - - /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ - public boolean isSetPrivileges() { - return this.privileges != null; - } - - public void setPrivilegesIsSet(boolean value) { - if (!value) { - this.privileges = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PRIVILEGES: - if (value == null) { - unsetPrivileges(); - } else { - setPrivileges((PrivilegeBag)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PRIVILEGES: - return getPrivileges(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PRIVILEGES: - return isSetPrivileges(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof revoke_privileges_args) - return this.equals((revoke_privileges_args)that); - return false; - } - - public boolean equals(revoke_privileges_args that) { - if (that == null) - return false; - - boolean this_present_privileges = true && this.isSetPrivileges(); - boolean that_present_privileges = true && that.isSetPrivileges(); - if (this_present_privileges || that_present_privileges) { - if (!(this_present_privileges && that_present_privileges)) - return false; - if (!this.privileges.equals(that.privileges)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_privileges = true && (isSetPrivileges()); - list.add(present_privileges); - if (present_privileges) - list.add(privileges); - - return list.hashCode(); - } - - @Override - public int compareTo(revoke_privileges_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPrivileges()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("revoke_privileges_args("); - boolean first = true; - - sb.append("privileges:"); - if (this.privileges == null) { - sb.append("null"); - } else { - sb.append(this.privileges); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_privileges_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_privileges_result.class, metaDataMap); - } - - public revoke_privileges_result() { - } - - public revoke_privileges_result( - boolean success, - MetaException o1) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public revoke_privileges_result(revoke_privileges_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public revoke_privileges_result deepCopy() { - return new revoke_privileges_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof revoke_privileges_result) - return this.equals((revoke_privileges_result)that); - return false; - } - - public boolean equals(revoke_privileges_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(revoke_privileges_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("revoke_privileges_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 { - // 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 grant_revoke_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_privileges_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new grant_revoke_privileges_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new grant_revoke_privileges_argsTupleSchemeFactory()); - } - - private GrantRevokePrivilegeRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GrantRevokePrivilegeRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_revoke_privileges_args.class, metaDataMap); - } - - public grant_revoke_privileges_args() { - } - - public grant_revoke_privileges_args( - GrantRevokePrivilegeRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public grant_revoke_privileges_args(grant_revoke_privileges_args other) { - if (other.isSetRequest()) { - this.request = new GrantRevokePrivilegeRequest(other.request); - } - } - - public grant_revoke_privileges_args deepCopy() { - return new grant_revoke_privileges_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public GrantRevokePrivilegeRequest getRequest() { - return this.request; - } - - public void setRequest(GrantRevokePrivilegeRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((GrantRevokePrivilegeRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof grant_revoke_privileges_args) - return this.equals((grant_revoke_privileges_args)that); - return false; - } - - public boolean equals(grant_revoke_privileges_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(grant_revoke_privileges_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("grant_revoke_privileges_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 grant_revoke_privileges_argsStandardSchemeFactory implements SchemeFactory { - public grant_revoke_privileges_argsStandardScheme getScheme() { - return new grant_revoke_privileges_argsStandardScheme(); - } - } - - private static class grant_revoke_privileges_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, grant_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new GrantRevokePrivilegeRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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_revoke_privileges_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class grant_revoke_privileges_argsTupleSchemeFactory implements SchemeFactory { - public grant_revoke_privileges_argsTupleScheme getScheme() { - return new grant_revoke_privileges_argsTupleScheme(); - } - } - - private static class grant_revoke_privileges_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new GrantRevokePrivilegeRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class grant_revoke_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_privileges_result"); - - 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 grant_revoke_privileges_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new grant_revoke_privileges_resultTupleSchemeFactory()); - } - - private GrantRevokePrivilegeResponse success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GrantRevokePrivilegeResponse.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_revoke_privileges_result.class, metaDataMap); - } - - public grant_revoke_privileges_result() { - } - - public grant_revoke_privileges_result( - GrantRevokePrivilegeResponse success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public grant_revoke_privileges_result(grant_revoke_privileges_result other) { - if (other.isSetSuccess()) { - this.success = new GrantRevokePrivilegeResponse(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public grant_revoke_privileges_result deepCopy() { - return new grant_revoke_privileges_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public GrantRevokePrivilegeResponse getSuccess() { - return this.success; - } - - public void setSuccess(GrantRevokePrivilegeResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((GrantRevokePrivilegeResponse)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof grant_revoke_privileges_result) - return this.equals((grant_revoke_privileges_result)that); - return false; - } - - public boolean equals(grant_revoke_privileges_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(grant_revoke_privileges_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("grant_revoke_privileges_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 grant_revoke_privileges_resultStandardSchemeFactory implements SchemeFactory { - public grant_revoke_privileges_resultStandardScheme getScheme() { - return new grant_revoke_privileges_resultStandardScheme(); - } - } - - private static class grant_revoke_privileges_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, grant_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.STRUCT) { - struct.success = new GrantRevokePrivilegeResponse(); - 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, grant_revoke_privileges_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 grant_revoke_privileges_resultTupleSchemeFactory implements SchemeFactory { - public grant_revoke_privileges_resultTupleScheme getScheme() { - return new grant_revoke_privileges_resultTupleScheme(); - } - } - - private static class grant_revoke_privileges_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, grant_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()) { - struct.success.write(oprot); - } - if (struct.isSetO1()) { - struct.o1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new GrantRevokePrivilegeResponse(); - 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 set_ugi_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_ugi_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - USER_NAME((short)1, "user_name"), - GROUP_NAMES((short)2, "group_names"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // USER_NAME - return USER_NAME; - case 2: // GROUP_NAMES - return GROUP_NAMES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_ugi_args.class, metaDataMap); - } - - public set_ugi_args() { - } - - public set_ugi_args( - String user_name, - List group_names) - { - this(); - this.user_name = user_name; - this.group_names = group_names; - } - - /** - * Performs a deep copy on other. - */ - public set_ugi_args(set_ugi_args other) { - if (other.isSetUser_name()) { - this.user_name = other.user_name; - } - if (other.isSetGroup_names()) { - List __this__group_names = new ArrayList(other.group_names); - this.group_names = __this__group_names; - } - } - - public set_ugi_args deepCopy() { - return new set_ugi_args(this); - } - - @Override - public void clear() { - this.user_name = null; - this.group_names = null; - } - - public String getUser_name() { - return this.user_name; - } - - public void setUser_name(String user_name) { - this.user_name = user_name; - } - - public void unsetUser_name() { - this.user_name = null; - } - - /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ - public boolean isSetUser_name() { - return this.user_name != null; - } - - public void setUser_nameIsSet(boolean value) { - if (!value) { - this.user_name = null; - } - } - - public int getGroup_namesSize() { - return (this.group_names == null) ? 0 : this.group_names.size(); - } - - public java.util.Iterator getGroup_namesIterator() { - return (this.group_names == null) ? null : this.group_names.iterator(); - } - - public void addToGroup_names(String elem) { - if (this.group_names == null) { - this.group_names = new ArrayList(); - } - this.group_names.add(elem); - } - - public List getGroup_names() { - return this.group_names; - } - - public void setGroup_names(List group_names) { - this.group_names = group_names; - } - - public void unsetGroup_names() { - this.group_names = null; - } - - /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ - public boolean isSetGroup_names() { - return this.group_names != null; - } - - public void setGroup_namesIsSet(boolean value) { - if (!value) { - this.group_names = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case USER_NAME: - if (value == null) { - unsetUser_name(); - } else { - setUser_name((String)value); - } - break; - - case GROUP_NAMES: - if (value == null) { - unsetGroup_names(); - } else { - setGroup_names((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case USER_NAME: - return getUser_name(); - - case GROUP_NAMES: - return getGroup_names(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case USER_NAME: - return isSetUser_name(); - case GROUP_NAMES: - return isSetGroup_names(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof set_ugi_args) - return this.equals((set_ugi_args)that); - return false; - } - - public boolean equals(set_ugi_args that) { - if (that == null) - return false; - - boolean this_present_user_name = true && this.isSetUser_name(); - boolean that_present_user_name = true && that.isSetUser_name(); - if (this_present_user_name || that_present_user_name) { - if (!(this_present_user_name && that_present_user_name)) - return false; - if (!this.user_name.equals(that.user_name)) - return false; - } - - boolean this_present_group_names = true && this.isSetGroup_names(); - boolean that_present_group_names = true && that.isSetGroup_names(); - if (this_present_group_names || that_present_group_names) { - if (!(this_present_group_names && that_present_group_names)) - return false; - if (!this.group_names.equals(that.group_names)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_user_name = true && (isSetUser_name()); - list.add(present_user_name); - if (present_user_name) - list.add(user_name); - - boolean present_group_names = true && (isSetGroup_names()); - list.add(present_group_names); - if (present_group_names) - list.add(group_names); - - return list.hashCode(); - } - - @Override - public int compareTo(set_ugi_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUser_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGroup_names()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.group_names); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("set_ugi_args("); - boolean first = true; - - sb.append("user_name:"); - if (this.user_name == null) { - sb.append("null"); - } else { - sb.append(this.user_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("group_names:"); - if (this.group_names == null) { - sb.append("null"); - } else { - sb.append(this.group_names); - } - 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 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 _list1222 = iprot.readListBegin(); - struct.group_names = new ArrayList(_list1222.size); - String _elem1223; - for (int _i1224 = 0; _i1224 < _list1222.size; ++_i1224) - { - _elem1223 = iprot.readString(); - struct.group_names.add(_elem1223); - } - 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 _iter1225 : struct.group_names) - { - oprot.writeString(_iter1225); - } - 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 _iter1226 : struct.group_names) - { - oprot.writeString(_iter1226); - } - } - } - } - - @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 _list1227 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.group_names = new ArrayList(_list1227.size); - String _elem1228; - for (int _i1229 = 0; _i1229 < _list1227.size; ++_i1229) - { - _elem1228 = iprot.readString(); - struct.group_names.add(_elem1228); - } - } - struct.setGroup_namesIsSet(true); - } - } - } - - } - - public static class set_ugi_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_ugi_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_ugi_result.class, metaDataMap); - } - - public set_ugi_result() { - } - - public set_ugi_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public set_ugi_result(set_ugi_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public set_ugi_result deepCopy() { - return new set_ugi_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof set_ugi_result) - return this.equals((set_ugi_result)that); - return false; - } - - public boolean equals(set_ugi_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(set_ugi_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("set_ugi_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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 _list1230 = iprot.readListBegin(); - struct.success = new ArrayList(_list1230.size); - String _elem1231; - for (int _i1232 = 0; _i1232 < _list1230.size; ++_i1232) - { - _elem1231 = iprot.readString(); - struct.success.add(_elem1231); - } - 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 _iter1233 : struct.success) - { - oprot.writeString(_iter1233); - } - 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 _iter1234 : struct.success) - { - oprot.writeString(_iter1234); - } - } - } - 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 _list1235 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list1235.size); - String _elem1236; - for (int _i1237 = 0; _i1237 < _list1235.size; ++_i1237) - { - _elem1236 = iprot.readString(); - struct.success.add(_elem1236); - } - } - 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_delegation_token_args"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TOKEN_OWNER((short)1, "token_owner"), - RENEWER_KERBEROS_PRINCIPAL_NAME((short)2, "renewer_kerberos_principal_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TOKEN_OWNER - return TOKEN_OWNER; - case 2: // RENEWER_KERBEROS_PRINCIPAL_NAME - return RENEWER_KERBEROS_PRINCIPAL_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TOKEN_OWNER, new org.apache.thrift.meta_data.FieldMetaData("token_owner", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.RENEWER_KERBEROS_PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("renewer_kerberos_principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_delegation_token_args.class, metaDataMap); - } - - public get_delegation_token_args() { - } - - public get_delegation_token_args( - String token_owner, - String renewer_kerberos_principal_name) - { - this(); - this.token_owner = token_owner; - this.renewer_kerberos_principal_name = renewer_kerberos_principal_name; - } - - /** - * Performs a deep copy on other. - */ - public get_delegation_token_args(get_delegation_token_args other) { - if (other.isSetToken_owner()) { - this.token_owner = other.token_owner; - } - if (other.isSetRenewer_kerberos_principal_name()) { - this.renewer_kerberos_principal_name = other.renewer_kerberos_principal_name; - } - } - - public get_delegation_token_args deepCopy() { - return new get_delegation_token_args(this); - } - - @Override - public void clear() { - this.token_owner = null; - this.renewer_kerberos_principal_name = null; - } - - public String getToken_owner() { - return this.token_owner; - } - - public void setToken_owner(String token_owner) { - this.token_owner = token_owner; - } - - public void unsetToken_owner() { - this.token_owner = null; - } - - /** Returns true if field token_owner is set (has been assigned a value) and false otherwise */ - public boolean isSetToken_owner() { - return this.token_owner != null; - } - - public void setToken_ownerIsSet(boolean value) { - if (!value) { - this.token_owner = null; - } - } - - public String getRenewer_kerberos_principal_name() { - return this.renewer_kerberos_principal_name; - } - - public void setRenewer_kerberos_principal_name(String renewer_kerberos_principal_name) { - this.renewer_kerberos_principal_name = renewer_kerberos_principal_name; - } - - public void unsetRenewer_kerberos_principal_name() { - this.renewer_kerberos_principal_name = null; - } - - /** Returns true if field renewer_kerberos_principal_name is set (has been assigned a value) and false otherwise */ - public boolean isSetRenewer_kerberos_principal_name() { - return this.renewer_kerberos_principal_name != null; - } - - public void setRenewer_kerberos_principal_nameIsSet(boolean value) { - if (!value) { - this.renewer_kerberos_principal_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TOKEN_OWNER: - if (value == null) { - unsetToken_owner(); - } else { - setToken_owner((String)value); - } - break; - - case RENEWER_KERBEROS_PRINCIPAL_NAME: - if (value == null) { - unsetRenewer_kerberos_principal_name(); - } else { - setRenewer_kerberos_principal_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TOKEN_OWNER: - return getToken_owner(); - - case RENEWER_KERBEROS_PRINCIPAL_NAME: - return getRenewer_kerberos_principal_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TOKEN_OWNER: - return isSetToken_owner(); - case RENEWER_KERBEROS_PRINCIPAL_NAME: - return isSetRenewer_kerberos_principal_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_delegation_token_args) - return this.equals((get_delegation_token_args)that); - return false; - } - - public boolean equals(get_delegation_token_args that) { - if (that == null) - return false; - - boolean this_present_token_owner = true && this.isSetToken_owner(); - boolean that_present_token_owner = true && that.isSetToken_owner(); - if (this_present_token_owner || that_present_token_owner) { - if (!(this_present_token_owner && that_present_token_owner)) - return false; - if (!this.token_owner.equals(that.token_owner)) - return false; - } - - boolean this_present_renewer_kerberos_principal_name = true && this.isSetRenewer_kerberos_principal_name(); - boolean that_present_renewer_kerberos_principal_name = true && that.isSetRenewer_kerberos_principal_name(); - if (this_present_renewer_kerberos_principal_name || that_present_renewer_kerberos_principal_name) { - if (!(this_present_renewer_kerberos_principal_name && that_present_renewer_kerberos_principal_name)) - return false; - if (!this.renewer_kerberos_principal_name.equals(that.renewer_kerberos_principal_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_token_owner = true && (isSetToken_owner()); - list.add(present_token_owner); - if (present_token_owner) - list.add(token_owner); - - boolean present_renewer_kerberos_principal_name = true && (isSetRenewer_kerberos_principal_name()); - list.add(present_renewer_kerberos_principal_name); - if (present_renewer_kerberos_principal_name) - list.add(renewer_kerberos_principal_name); - - return list.hashCode(); - } - - @Override - public int compareTo(get_delegation_token_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetToken_owner()).compareTo(other.isSetToken_owner()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetToken_owner()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_owner, other.token_owner); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRenewer_kerberos_principal_name()).compareTo(other.isSetRenewer_kerberos_principal_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRenewer_kerberos_principal_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.renewer_kerberos_principal_name, other.renewer_kerberos_principal_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_delegation_token_args("); - boolean first = true; - - sb.append("token_owner:"); - if (this.token_owner == null) { - sb.append("null"); - } else { - sb.append(this.token_owner); - } - first = false; - if (!first) sb.append(", "); - sb.append("renewer_kerberos_principal_name:"); - if (this.renewer_kerberos_principal_name == null) { - sb.append("null"); - } else { - sb.append(this.renewer_kerberos_principal_name); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_delegation_token_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_delegation_token_result.class, metaDataMap); - } - - public get_delegation_token_result() { - } - - public get_delegation_token_result( - String success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_delegation_token_result(get_delegation_token_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_delegation_token_result deepCopy() { - return new get_delegation_token_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public String getSuccess() { - return this.success; - } - - public void setSuccess(String success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((String)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_delegation_token_result) - return this.equals((get_delegation_token_result)that); - return false; - } - - public boolean equals(get_delegation_token_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_delegation_token_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_delegation_token_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("renew_delegation_token_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TOKEN_STR_FORM((short)1, "token_str_form"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TOKEN_STR_FORM - return TOKEN_STR_FORM; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TOKEN_STR_FORM, new org.apache.thrift.meta_data.FieldMetaData("token_str_form", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(renew_delegation_token_args.class, metaDataMap); - } - - public renew_delegation_token_args() { - } - - public renew_delegation_token_args( - String token_str_form) - { - this(); - this.token_str_form = token_str_form; - } - - /** - * Performs a deep copy on other. - */ - public renew_delegation_token_args(renew_delegation_token_args other) { - if (other.isSetToken_str_form()) { - this.token_str_form = other.token_str_form; - } - } - - public renew_delegation_token_args deepCopy() { - return new renew_delegation_token_args(this); - } - - @Override - public void clear() { - this.token_str_form = null; - } - - public String getToken_str_form() { - return this.token_str_form; - } - - public void setToken_str_form(String token_str_form) { - this.token_str_form = token_str_form; - } - - public void unsetToken_str_form() { - this.token_str_form = null; - } - - /** Returns true if field token_str_form is set (has been assigned a value) and false otherwise */ - public boolean isSetToken_str_form() { - return this.token_str_form != null; - } - - public void setToken_str_formIsSet(boolean value) { - if (!value) { - this.token_str_form = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TOKEN_STR_FORM: - if (value == null) { - unsetToken_str_form(); - } else { - setToken_str_form((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TOKEN_STR_FORM: - return getToken_str_form(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TOKEN_STR_FORM: - return isSetToken_str_form(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof renew_delegation_token_args) - return this.equals((renew_delegation_token_args)that); - return false; - } - - public boolean equals(renew_delegation_token_args that) { - if (that == null) - return false; - - boolean this_present_token_str_form = true && this.isSetToken_str_form(); - boolean that_present_token_str_form = true && that.isSetToken_str_form(); - if (this_present_token_str_form || that_present_token_str_form) { - if (!(this_present_token_str_form && that_present_token_str_form)) - return false; - if (!this.token_str_form.equals(that.token_str_form)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_token_str_form = true && (isSetToken_str_form()); - list.add(present_token_str_form); - if (present_token_str_form) - list.add(token_str_form); - - return list.hashCode(); - } - - @Override - public int compareTo(renew_delegation_token_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetToken_str_form()).compareTo(other.isSetToken_str_form()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetToken_str_form()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_str_form, other.token_str_form); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("renew_delegation_token_args("); - boolean first = true; - - sb.append("token_str_form:"); - if (this.token_str_form == null) { - sb.append("null"); - } else { - sb.append(this.token_str_form); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("renew_delegation_token_result"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(renew_delegation_token_result.class, metaDataMap); - } - - public renew_delegation_token_result() { - } - - public renew_delegation_token_result( - long success, - MetaException o1) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public renew_delegation_token_result(renew_delegation_token_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public renew_delegation_token_result deepCopy() { - return new renew_delegation_token_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = 0; - this.o1 = null; - } - - public long getSuccess() { - return this.success; - } - - public void setSuccess(long success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Long)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof renew_delegation_token_result) - return this.equals((renew_delegation_token_result)that); - return false; - } - - public boolean equals(renew_delegation_token_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(renew_delegation_token_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("renew_delegation_token_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 { - // 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancel_delegation_token_args"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TOKEN_STR_FORM((short)1, "token_str_form"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TOKEN_STR_FORM - return TOKEN_STR_FORM; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TOKEN_STR_FORM, new org.apache.thrift.meta_data.FieldMetaData("token_str_form", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancel_delegation_token_args.class, metaDataMap); - } - - public cancel_delegation_token_args() { - } - - public cancel_delegation_token_args( - String token_str_form) - { - this(); - this.token_str_form = token_str_form; - } - - /** - * Performs a deep copy on other. - */ - public cancel_delegation_token_args(cancel_delegation_token_args other) { - if (other.isSetToken_str_form()) { - this.token_str_form = other.token_str_form; - } - } - - public cancel_delegation_token_args deepCopy() { - return new cancel_delegation_token_args(this); - } - - @Override - public void clear() { - this.token_str_form = null; - } - - public String getToken_str_form() { - return this.token_str_form; - } - - public void setToken_str_form(String token_str_form) { - this.token_str_form = token_str_form; - } - - public void unsetToken_str_form() { - this.token_str_form = null; - } - - /** Returns true if field token_str_form is set (has been assigned a value) and false otherwise */ - public boolean isSetToken_str_form() { - return this.token_str_form != null; - } - - public void setToken_str_formIsSet(boolean value) { - if (!value) { - this.token_str_form = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TOKEN_STR_FORM: - if (value == null) { - unsetToken_str_form(); - } else { - setToken_str_form((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TOKEN_STR_FORM: - return getToken_str_form(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TOKEN_STR_FORM: - return isSetToken_str_form(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof cancel_delegation_token_args) - return this.equals((cancel_delegation_token_args)that); - return false; - } - - public boolean equals(cancel_delegation_token_args that) { - if (that == null) - return false; - - boolean this_present_token_str_form = true && this.isSetToken_str_form(); - boolean that_present_token_str_form = true && that.isSetToken_str_form(); - if (this_present_token_str_form || that_present_token_str_form) { - if (!(this_present_token_str_form && that_present_token_str_form)) - return false; - if (!this.token_str_form.equals(that.token_str_form)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_token_str_form = true && (isSetToken_str_form()); - list.add(present_token_str_form); - if (present_token_str_form) - list.add(token_str_form); - - return list.hashCode(); - } - - @Override - public int compareTo(cancel_delegation_token_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetToken_str_form()).compareTo(other.isSetToken_str_form()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetToken_str_form()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_str_form, other.token_str_form); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("cancel_delegation_token_args("); - boolean first = true; - - sb.append("token_str_form:"); - if (this.token_str_form == null) { - sb.append("null"); - } else { - sb.append(this.token_str_form); - } - 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 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, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancel_delegation_token_result"); - - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancel_delegation_token_result.class, metaDataMap); - } - - public cancel_delegation_token_result() { - } - - public cancel_delegation_token_result( - MetaException o1) - { - this(); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public cancel_delegation_token_result(cancel_delegation_token_result other) { - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public cancel_delegation_token_result deepCopy() { - return new cancel_delegation_token_result(this); - } - - @Override - public void clear() { - this.o1 = null; - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof cancel_delegation_token_result) - return this.equals((cancel_delegation_token_result)that); - return false; - } - - public boolean equals(cancel_delegation_token_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(cancel_delegation_token_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("cancel_delegation_token_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 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); - } - } - } - - } - - public static class add_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_token_args"); - - private static final org.apache.thrift.protocol.TField TOKEN_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_identifier", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField DELEGATION_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("delegation_token", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new add_token_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_token_argsTupleSchemeFactory()); - } - - private String token_identifier; // required - private String delegation_token; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TOKEN_IDENTIFIER((short)1, "token_identifier"), - DELEGATION_TOKEN((short)2, "delegation_token"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TOKEN_IDENTIFIER - return TOKEN_IDENTIFIER; - case 2: // DELEGATION_TOKEN - return DELEGATION_TOKEN; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TOKEN_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("token_identifier", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DELEGATION_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("delegation_token", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_token_args.class, metaDataMap); - } - - public add_token_args() { - } - - public add_token_args( - String token_identifier, - String delegation_token) - { - this(); - this.token_identifier = token_identifier; - this.delegation_token = delegation_token; - } - - /** - * Performs a deep copy on other. - */ - public add_token_args(add_token_args other) { - if (other.isSetToken_identifier()) { - this.token_identifier = other.token_identifier; - } - if (other.isSetDelegation_token()) { - this.delegation_token = other.delegation_token; - } - } - - public add_token_args deepCopy() { - return new add_token_args(this); - } - - @Override - public void clear() { - this.token_identifier = null; - this.delegation_token = null; - } - - public String getToken_identifier() { - return this.token_identifier; - } - - public void setToken_identifier(String token_identifier) { - this.token_identifier = token_identifier; - } - - public void unsetToken_identifier() { - this.token_identifier = null; - } - - /** Returns true if field token_identifier is set (has been assigned a value) and false otherwise */ - public boolean isSetToken_identifier() { - return this.token_identifier != null; - } - - public void setToken_identifierIsSet(boolean value) { - if (!value) { - this.token_identifier = null; - } - } - - public String getDelegation_token() { - return this.delegation_token; - } - - public void setDelegation_token(String delegation_token) { - this.delegation_token = delegation_token; - } - - public void unsetDelegation_token() { - this.delegation_token = null; - } - - /** Returns true if field delegation_token is set (has been assigned a value) and false otherwise */ - public boolean isSetDelegation_token() { - return this.delegation_token != null; - } - - public void setDelegation_tokenIsSet(boolean value) { - if (!value) { - this.delegation_token = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TOKEN_IDENTIFIER: - if (value == null) { - unsetToken_identifier(); - } else { - setToken_identifier((String)value); - } - break; - - case DELEGATION_TOKEN: - if (value == null) { - unsetDelegation_token(); - } else { - setDelegation_token((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TOKEN_IDENTIFIER: - return getToken_identifier(); - - case DELEGATION_TOKEN: - return getDelegation_token(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TOKEN_IDENTIFIER: - return isSetToken_identifier(); - case DELEGATION_TOKEN: - return isSetDelegation_token(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_token_args) - return this.equals((add_token_args)that); - return false; - } - - public boolean equals(add_token_args that) { - if (that == null) - return false; - - boolean this_present_token_identifier = true && this.isSetToken_identifier(); - boolean that_present_token_identifier = true && that.isSetToken_identifier(); - if (this_present_token_identifier || that_present_token_identifier) { - if (!(this_present_token_identifier && that_present_token_identifier)) - return false; - if (!this.token_identifier.equals(that.token_identifier)) - return false; - } - - boolean this_present_delegation_token = true && this.isSetDelegation_token(); - boolean that_present_delegation_token = true && that.isSetDelegation_token(); - if (this_present_delegation_token || that_present_delegation_token) { - if (!(this_present_delegation_token && that_present_delegation_token)) - return false; - if (!this.delegation_token.equals(that.delegation_token)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_token_identifier = true && (isSetToken_identifier()); - list.add(present_token_identifier); - if (present_token_identifier) - list.add(token_identifier); - - boolean present_delegation_token = true && (isSetDelegation_token()); - list.add(present_delegation_token); - if (present_delegation_token) - list.add(delegation_token); - - return list.hashCode(); - } - - @Override - public int compareTo(add_token_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetToken_identifier()).compareTo(other.isSetToken_identifier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetToken_identifier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_identifier, other.token_identifier); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDelegation_token()).compareTo(other.isSetDelegation_token()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDelegation_token()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegation_token, other.delegation_token); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_token_args("); - boolean first = true; - - sb.append("token_identifier:"); - if (this.token_identifier == null) { - sb.append("null"); - } else { - sb.append(this.token_identifier); - } - first = false; - if (!first) sb.append(", "); - sb.append("delegation_token:"); - if (this.delegation_token == null) { - sb.append("null"); - } else { - sb.append(this.delegation_token); - } - 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 add_token_argsStandardSchemeFactory implements SchemeFactory { - public add_token_argsStandardScheme getScheme() { - return new add_token_argsStandardScheme(); - } - } - - private static class add_token_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_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_IDENTIFIER - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.token_identifier = iprot.readString(); - struct.setToken_identifierIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DELEGATION_TOKEN - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.delegation_token = iprot.readString(); - struct.setDelegation_tokenIsSet(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_token_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.token_identifier != null) { - oprot.writeFieldBegin(TOKEN_IDENTIFIER_FIELD_DESC); - oprot.writeString(struct.token_identifier); - oprot.writeFieldEnd(); - } - if (struct.delegation_token != null) { - oprot.writeFieldBegin(DELEGATION_TOKEN_FIELD_DESC); - oprot.writeString(struct.delegation_token); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class add_token_argsTupleSchemeFactory implements SchemeFactory { - public add_token_argsTupleScheme getScheme() { - return new add_token_argsTupleScheme(); - } - } - - private static class add_token_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_token_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetToken_identifier()) { - optionals.set(0); - } - if (struct.isSetDelegation_token()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetToken_identifier()) { - oprot.writeString(struct.token_identifier); - } - if (struct.isSetDelegation_token()) { - oprot.writeString(struct.delegation_token); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_token_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.token_identifier = iprot.readString(); - struct.setToken_identifierIsSet(true); - } - if (incoming.get(1)) { - struct.delegation_token = iprot.readString(); - struct.setDelegation_tokenIsSet(true); - } - } - } - - } - - public static class add_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_token_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new add_token_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_token_resultTupleSchemeFactory()); - } - - private boolean success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_token_result.class, metaDataMap); - } - - public add_token_result() { - } - - public add_token_result( - boolean success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public add_token_result(add_token_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - public add_token_result deepCopy() { - return new add_token_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_token_result) - return this.equals((add_token_result)that); - return false; - } - - public boolean equals(add_token_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(add_token_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_token_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - 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 { - // 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_token_resultStandardSchemeFactory implements SchemeFactory { - public add_token_resultStandardScheme getScheme() { - return new add_token_resultStandardScheme(); - } - } - - private static class add_token_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_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.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(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_token_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class add_token_resultTupleSchemeFactory implements SchemeFactory { - public add_token_resultTupleScheme getScheme() { - return new add_token_resultTupleScheme(); - } - } - - private static class add_token_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_token_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_token_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class remove_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_token_args"); - - private static final org.apache.thrift.protocol.TField TOKEN_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_identifier", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new remove_token_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new remove_token_argsTupleSchemeFactory()); - } - - private String token_identifier; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TOKEN_IDENTIFIER((short)1, "token_identifier"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TOKEN_IDENTIFIER - return TOKEN_IDENTIFIER; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TOKEN_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("token_identifier", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_token_args.class, metaDataMap); - } - - public remove_token_args() { - } - - public remove_token_args( - String token_identifier) - { - this(); - this.token_identifier = token_identifier; - } - - /** - * Performs a deep copy on other. - */ - public remove_token_args(remove_token_args other) { - if (other.isSetToken_identifier()) { - this.token_identifier = other.token_identifier; - } - } - - public remove_token_args deepCopy() { - return new remove_token_args(this); - } - - @Override - public void clear() { - this.token_identifier = null; - } - - public String getToken_identifier() { - return this.token_identifier; - } - - public void setToken_identifier(String token_identifier) { - this.token_identifier = token_identifier; - } - - public void unsetToken_identifier() { - this.token_identifier = null; - } - - /** Returns true if field token_identifier is set (has been assigned a value) and false otherwise */ - public boolean isSetToken_identifier() { - return this.token_identifier != null; - } - - public void setToken_identifierIsSet(boolean value) { - if (!value) { - this.token_identifier = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TOKEN_IDENTIFIER: - if (value == null) { - unsetToken_identifier(); - } else { - setToken_identifier((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TOKEN_IDENTIFIER: - return getToken_identifier(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TOKEN_IDENTIFIER: - return isSetToken_identifier(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof remove_token_args) - return this.equals((remove_token_args)that); - return false; - } - - public boolean equals(remove_token_args that) { - if (that == null) - return false; - - boolean this_present_token_identifier = true && this.isSetToken_identifier(); - boolean that_present_token_identifier = true && that.isSetToken_identifier(); - if (this_present_token_identifier || that_present_token_identifier) { - if (!(this_present_token_identifier && that_present_token_identifier)) - return false; - if (!this.token_identifier.equals(that.token_identifier)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_token_identifier = true && (isSetToken_identifier()); - list.add(present_token_identifier); - if (present_token_identifier) - list.add(token_identifier); - - return list.hashCode(); - } - - @Override - public int compareTo(remove_token_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetToken_identifier()).compareTo(other.isSetToken_identifier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetToken_identifier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_identifier, other.token_identifier); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("remove_token_args("); - boolean first = true; - - sb.append("token_identifier:"); - if (this.token_identifier == null) { - sb.append("null"); - } else { - sb.append(this.token_identifier); - } - 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 remove_token_argsStandardSchemeFactory implements SchemeFactory { - public remove_token_argsStandardScheme getScheme() { - return new remove_token_argsStandardScheme(); - } - } - - private static class remove_token_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, remove_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_IDENTIFIER - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.token_identifier = iprot.readString(); - struct.setToken_identifierIsSet(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, remove_token_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.token_identifier != null) { - oprot.writeFieldBegin(TOKEN_IDENTIFIER_FIELD_DESC); - oprot.writeString(struct.token_identifier); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class remove_token_argsTupleSchemeFactory implements SchemeFactory { - public remove_token_argsTupleScheme getScheme() { - return new remove_token_argsTupleScheme(); - } - } - - private static class remove_token_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, remove_token_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetToken_identifier()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetToken_identifier()) { - oprot.writeString(struct.token_identifier); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, remove_token_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.token_identifier = iprot.readString(); - struct.setToken_identifierIsSet(true); - } - } - } - - } - - public static class remove_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_token_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new remove_token_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new remove_token_resultTupleSchemeFactory()); - } - - private boolean success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_token_result.class, metaDataMap); - } - - public remove_token_result() { - } - - public remove_token_result( - boolean success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public remove_token_result(remove_token_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - public remove_token_result deepCopy() { - return new remove_token_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof remove_token_result) - return this.equals((remove_token_result)that); - return false; - } - - public boolean equals(remove_token_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(remove_token_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("remove_token_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - 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 { - // 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 remove_token_resultStandardSchemeFactory implements SchemeFactory { - public remove_token_resultStandardScheme getScheme() { - return new remove_token_resultStandardScheme(); - } - } - - private static class remove_token_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, remove_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.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(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, remove_token_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class remove_token_resultTupleSchemeFactory implements SchemeFactory { - public remove_token_resultTupleScheme getScheme() { - return new remove_token_resultTupleScheme(); - } - } - - private static class remove_token_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, remove_token_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, remove_token_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class get_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_token_args"); - - private static final org.apache.thrift.protocol.TField TOKEN_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_identifier", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_token_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_token_argsTupleSchemeFactory()); - } - - private String token_identifier; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TOKEN_IDENTIFIER((short)1, "token_identifier"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TOKEN_IDENTIFIER - return TOKEN_IDENTIFIER; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TOKEN_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("token_identifier", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_token_args.class, metaDataMap); - } - - public get_token_args() { - } - - public get_token_args( - String token_identifier) - { - this(); - this.token_identifier = token_identifier; - } - - /** - * Performs a deep copy on other. - */ - public get_token_args(get_token_args other) { - if (other.isSetToken_identifier()) { - this.token_identifier = other.token_identifier; - } - } - - public get_token_args deepCopy() { - return new get_token_args(this); - } - - @Override - public void clear() { - this.token_identifier = null; - } - - public String getToken_identifier() { - return this.token_identifier; - } - - public void setToken_identifier(String token_identifier) { - this.token_identifier = token_identifier; - } - - public void unsetToken_identifier() { - this.token_identifier = null; - } - - /** Returns true if field token_identifier is set (has been assigned a value) and false otherwise */ - public boolean isSetToken_identifier() { - return this.token_identifier != null; - } - - public void setToken_identifierIsSet(boolean value) { - if (!value) { - this.token_identifier = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TOKEN_IDENTIFIER: - if (value == null) { - unsetToken_identifier(); - } else { - setToken_identifier((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TOKEN_IDENTIFIER: - return getToken_identifier(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TOKEN_IDENTIFIER: - return isSetToken_identifier(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_token_args) - return this.equals((get_token_args)that); - return false; - } - - public boolean equals(get_token_args that) { - if (that == null) - return false; - - boolean this_present_token_identifier = true && this.isSetToken_identifier(); - boolean that_present_token_identifier = true && that.isSetToken_identifier(); - if (this_present_token_identifier || that_present_token_identifier) { - if (!(this_present_token_identifier && that_present_token_identifier)) - return false; - if (!this.token_identifier.equals(that.token_identifier)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_token_identifier = true && (isSetToken_identifier()); - list.add(present_token_identifier); - if (present_token_identifier) - list.add(token_identifier); - - return list.hashCode(); - } - - @Override - public int compareTo(get_token_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetToken_identifier()).compareTo(other.isSetToken_identifier()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetToken_identifier()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_identifier, other.token_identifier); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_token_args("); - boolean first = true; - - sb.append("token_identifier:"); - if (this.token_identifier == null) { - sb.append("null"); - } else { - sb.append(this.token_identifier); - } - 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 get_token_argsStandardSchemeFactory implements SchemeFactory { - public get_token_argsStandardScheme getScheme() { - return new get_token_argsStandardScheme(); - } - } - - private static class get_token_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_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_IDENTIFIER - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.token_identifier = iprot.readString(); - struct.setToken_identifierIsSet(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_token_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.token_identifier != null) { - oprot.writeFieldBegin(TOKEN_IDENTIFIER_FIELD_DESC); - oprot.writeString(struct.token_identifier); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_token_argsTupleSchemeFactory implements SchemeFactory { - public get_token_argsTupleScheme getScheme() { - return new get_token_argsTupleScheme(); - } - } - - private static class get_token_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_token_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetToken_identifier()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetToken_identifier()) { - oprot.writeString(struct.token_identifier); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_token_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.token_identifier = iprot.readString(); - struct.setToken_identifierIsSet(true); - } - } - } - - } - - public static class get_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_token_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_token_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_token_resultTupleSchemeFactory()); - } - - private String success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_token_result.class, metaDataMap); - } - - public get_token_result() { - } - - public get_token_result( - String success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public get_token_result(get_token_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } - } - - public get_token_result deepCopy() { - return new get_token_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public String getSuccess() { - return this.success; - } - - public void setSuccess(String success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_token_result) - return this.equals((get_token_result)that); - return false; - } - - public boolean equals(get_token_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(get_token_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_token_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - 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 get_token_resultStandardSchemeFactory implements SchemeFactory { - public get_token_resultStandardScheme getScheme() { - return new get_token_resultStandardScheme(); - } - } - - private static class get_token_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_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; - 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_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_token_resultTupleSchemeFactory implements SchemeFactory { - public get_token_resultTupleScheme getScheme() { - return new get_token_resultTupleScheme(); - } - } - - private static class get_token_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_token_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeString(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_token_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readString(); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class get_all_token_identifiers_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_token_identifiers_args"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_all_token_identifiers_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_all_token_identifiers_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 { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_token_identifiers_args.class, metaDataMap); - } - - public get_all_token_identifiers_args() { - } - - /** - * Performs a deep copy on other. - */ - public get_all_token_identifiers_args(get_all_token_identifiers_args other) { - } - - public get_all_token_identifiers_args deepCopy() { - return new get_all_token_identifiers_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_all_token_identifiers_args) - return this.equals((get_all_token_identifiers_args)that); - return false; - } - - public boolean equals(get_all_token_identifiers_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(get_all_token_identifiers_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_all_token_identifiers_args("); - boolean first = true; - - 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 get_all_token_identifiers_argsStandardSchemeFactory implements SchemeFactory { - public get_all_token_identifiers_argsStandardScheme getScheme() { - return new get_all_token_identifiers_argsStandardScheme(); - } - } - - private static class get_all_token_identifiers_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_token_identifiers_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_token_identifiers_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_all_token_identifiers_argsTupleSchemeFactory implements SchemeFactory { - public get_all_token_identifiers_argsTupleScheme getScheme() { - return new get_all_token_identifiers_argsTupleScheme(); - } - } - - private static class get_all_token_identifiers_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_all_token_identifiers_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_all_token_identifiers_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class get_all_token_identifiers_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_token_identifiers_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_all_token_identifiers_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_all_token_identifiers_resultTupleSchemeFactory()); - } - - private List success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_token_identifiers_result.class, metaDataMap); - } - - public get_all_token_identifiers_result() { - } - - public get_all_token_identifiers_result( - List success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public get_all_token_identifiers_result(get_all_token_identifiers_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - } - - public get_all_token_identifiers_result deepCopy() { - return new get_all_token_identifiers_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_all_token_identifiers_result) - return this.equals((get_all_token_identifiers_result)that); - return false; - } - - public boolean equals(get_all_token_identifiers_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(get_all_token_identifiers_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_all_token_identifiers_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - 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 get_all_token_identifiers_resultStandardSchemeFactory implements SchemeFactory { - public get_all_token_identifiers_resultStandardScheme getScheme() { - return new get_all_token_identifiers_resultStandardScheme(); - } - } - - private static class get_all_token_identifiers_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_token_identifiers_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 _list1238 = iprot.readListBegin(); - struct.success = new ArrayList(_list1238.size); - String _elem1239; - for (int _i1240 = 0; _i1240 < _list1238.size; ++_i1240) - { - _elem1239 = iprot.readString(); - struct.success.add(_elem1239); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(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_token_identifiers_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 _iter1241 : struct.success) - { - oprot.writeString(_iter1241); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_all_token_identifiers_resultTupleSchemeFactory implements SchemeFactory { - public get_all_token_identifiers_resultTupleScheme getScheme() { - return new get_all_token_identifiers_resultTupleScheme(); - } - } - - private static class get_all_token_identifiers_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_all_token_identifiers_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (String _iter1242 : struct.success) - { - oprot.writeString(_iter1242); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_all_token_identifiers_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list1243 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list1243.size); - String _elem1244; - for (int _i1245 = 0; _i1245 < _list1243.size; ++_i1245) - { - _elem1244 = iprot.readString(); - struct.success.add(_elem1244); - } - } - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class add_master_key_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_master_key_args"); - - private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new add_master_key_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_master_key_argsTupleSchemeFactory()); - } - - private String key; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - KEY((short)1, "key"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // KEY - return KEY; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_master_key_args.class, metaDataMap); - } - - public add_master_key_args() { - } - - public add_master_key_args( - String key) - { - this(); - this.key = key; - } - - /** - * Performs a deep copy on other. - */ - public add_master_key_args(add_master_key_args other) { - if (other.isSetKey()) { - this.key = other.key; - } - } - - public add_master_key_args deepCopy() { - return new add_master_key_args(this); - } - - @Override - public void clear() { - this.key = null; - } - - public String getKey() { - return this.key; - } - - public void setKey(String key) { - this.key = key; - } - - public void unsetKey() { - this.key = null; - } - - /** Returns true if field key is set (has been assigned a value) and false otherwise */ - public boolean isSetKey() { - return this.key != null; - } - - public void setKeyIsSet(boolean value) { - if (!value) { - this.key = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case KEY: - if (value == null) { - unsetKey(); - } else { - setKey((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case KEY: - return getKey(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case KEY: - return isSetKey(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_master_key_args) - return this.equals((add_master_key_args)that); - return false; - } - - public boolean equals(add_master_key_args that) { - if (that == null) - return false; - - boolean this_present_key = true && this.isSetKey(); - boolean that_present_key = true && that.isSetKey(); - if (this_present_key || that_present_key) { - if (!(this_present_key && that_present_key)) - return false; - if (!this.key.equals(that.key)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_key = true && (isSetKey()); - list.add(present_key); - if (present_key) - list.add(key); - - return list.hashCode(); - } - - @Override - public int compareTo(add_master_key_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKey()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_master_key_args("); - boolean first = true; - - sb.append("key:"); - if (this.key == null) { - sb.append("null"); - } else { - sb.append(this.key); - } - 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 add_master_key_argsStandardSchemeFactory implements SchemeFactory { - public add_master_key_argsStandardScheme getScheme() { - return new add_master_key_argsStandardScheme(); - } - } - - private static class add_master_key_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_master_key_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: // KEY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.key = iprot.readString(); - struct.setKeyIsSet(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_master_key_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.key != null) { - oprot.writeFieldBegin(KEY_FIELD_DESC); - oprot.writeString(struct.key); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class add_master_key_argsTupleSchemeFactory implements SchemeFactory { - public add_master_key_argsTupleScheme getScheme() { - return new add_master_key_argsTupleScheme(); - } - } - - private static class add_master_key_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_master_key_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetKey()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetKey()) { - oprot.writeString(struct.key); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_master_key_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.key = iprot.readString(); - struct.setKeyIsSet(true); - } - } - } - - } - - public static class add_master_key_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_master_key_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (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 add_master_key_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_master_key_resultTupleSchemeFactory()); - } - - private int success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_master_key_result.class, metaDataMap); - } - - public add_master_key_result() { - } - - public add_master_key_result( - int success, - MetaException o1) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public add_master_key_result(add_master_key_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public add_master_key_result deepCopy() { - return new add_master_key_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = 0; - this.o1 = null; - } - - public int getSuccess() { - return this.success; - } - - public void setSuccess(int success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Integer)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_master_key_result) - return this.equals((add_master_key_result)that); - return false; - } - - public boolean equals(add_master_key_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(add_master_key_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_master_key_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 { - // 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_master_key_resultStandardSchemeFactory implements SchemeFactory { - public add_master_key_resultStandardScheme getScheme() { - return new add_master_key_resultStandardScheme(); - } - } - - private static class add_master_key_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_master_key_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 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, add_master_key_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class add_master_key_resultTupleSchemeFactory implements SchemeFactory { - public add_master_key_resultTupleScheme getScheme() { - return new add_master_key_resultTupleScheme(); - } - } - - private static class add_master_key_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_master_key_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); - } - if (struct.isSetO1()) { - struct.o1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_master_key_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = iprot.readI32(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.o1 = new MetaException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - } - } - - } - - public static class update_master_key_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_master_key_args"); - - private static final org.apache.thrift.protocol.TField SEQ_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("seq_number", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new update_master_key_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new update_master_key_argsTupleSchemeFactory()); - } - - private int seq_number; // required - private String key; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SEQ_NUMBER((short)1, "seq_number"), - KEY((short)2, "key"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SEQ_NUMBER - return SEQ_NUMBER; - case 2: // KEY - return KEY; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SEQ_NUMBER_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SEQ_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("seq_number", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_master_key_args.class, metaDataMap); - } - - public update_master_key_args() { - } - - public update_master_key_args( - int seq_number, - String key) - { - this(); - this.seq_number = seq_number; - setSeq_numberIsSet(true); - this.key = key; - } - - /** - * Performs a deep copy on other. - */ - public update_master_key_args(update_master_key_args other) { - __isset_bitfield = other.__isset_bitfield; - this.seq_number = other.seq_number; - if (other.isSetKey()) { - this.key = other.key; - } - } - - public update_master_key_args deepCopy() { - return new update_master_key_args(this); - } - - @Override - public void clear() { - setSeq_numberIsSet(false); - this.seq_number = 0; - this.key = null; - } - - public int getSeq_number() { - return this.seq_number; - } - - public void setSeq_number(int seq_number) { - this.seq_number = seq_number; - setSeq_numberIsSet(true); - } - - public void unsetSeq_number() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SEQ_NUMBER_ISSET_ID); - } - - /** Returns true if field seq_number is set (has been assigned a value) and false otherwise */ - public boolean isSetSeq_number() { - return EncodingUtils.testBit(__isset_bitfield, __SEQ_NUMBER_ISSET_ID); - } - - public void setSeq_numberIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SEQ_NUMBER_ISSET_ID, value); - } - - public String getKey() { - return this.key; - } - - public void setKey(String key) { - this.key = key; - } - - public void unsetKey() { - this.key = null; - } - - /** Returns true if field key is set (has been assigned a value) and false otherwise */ - public boolean isSetKey() { - return this.key != null; - } - - public void setKeyIsSet(boolean value) { - if (!value) { - this.key = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SEQ_NUMBER: - if (value == null) { - unsetSeq_number(); - } else { - setSeq_number((Integer)value); - } - break; - - case KEY: - if (value == null) { - unsetKey(); - } else { - setKey((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SEQ_NUMBER: - return getSeq_number(); - - case KEY: - return getKey(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SEQ_NUMBER: - return isSetSeq_number(); - case KEY: - return isSetKey(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof update_master_key_args) - return this.equals((update_master_key_args)that); - return false; - } - - public boolean equals(update_master_key_args that) { - if (that == null) - return false; - - boolean this_present_seq_number = true; - boolean that_present_seq_number = true; - if (this_present_seq_number || that_present_seq_number) { - if (!(this_present_seq_number && that_present_seq_number)) - return false; - if (this.seq_number != that.seq_number) - return false; - } - - boolean this_present_key = true && this.isSetKey(); - boolean that_present_key = true && that.isSetKey(); - if (this_present_key || that_present_key) { - if (!(this_present_key && that_present_key)) - return false; - if (!this.key.equals(that.key)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_seq_number = true; - list.add(present_seq_number); - if (present_seq_number) - list.add(seq_number); - - boolean present_key = true && (isSetKey()); - list.add(present_key); - if (present_key) - list.add(key); - - return list.hashCode(); - } - - @Override - public int compareTo(update_master_key_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSeq_number()).compareTo(other.isSetSeq_number()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSeq_number()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.seq_number, other.seq_number); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKey()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("update_master_key_args("); - boolean first = true; - - sb.append("seq_number:"); - sb.append(this.seq_number); - first = false; - if (!first) sb.append(", "); - sb.append("key:"); - if (this.key == null) { - sb.append("null"); - } else { - sb.append(this.key); - } - 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 { - // 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 update_master_key_argsStandardSchemeFactory implements SchemeFactory { - public update_master_key_argsStandardScheme getScheme() { - return new update_master_key_argsStandardScheme(); - } - } - - private static class update_master_key_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, update_master_key_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: // SEQ_NUMBER - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.seq_number = iprot.readI32(); - struct.setSeq_numberIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // KEY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.key = iprot.readString(); - struct.setKeyIsSet(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, update_master_key_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SEQ_NUMBER_FIELD_DESC); - oprot.writeI32(struct.seq_number); - oprot.writeFieldEnd(); - if (struct.key != null) { - oprot.writeFieldBegin(KEY_FIELD_DESC); - oprot.writeString(struct.key); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class update_master_key_argsTupleSchemeFactory implements SchemeFactory { - public update_master_key_argsTupleScheme getScheme() { - return new update_master_key_argsTupleScheme(); - } - } - - private static class update_master_key_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, update_master_key_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSeq_number()) { - optionals.set(0); - } - if (struct.isSetKey()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSeq_number()) { - oprot.writeI32(struct.seq_number); - } - if (struct.isSetKey()) { - oprot.writeString(struct.key); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, update_master_key_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.seq_number = iprot.readI32(); - struct.setSeq_numberIsSet(true); - } - if (incoming.get(1)) { - struct.key = iprot.readString(); - struct.setKeyIsSet(true); - } - } - } - - } - - public static class update_master_key_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_master_key_result"); - - 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 update_master_key_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new update_master_key_resultTupleSchemeFactory()); - } - - private NoSuchObjectException o1; // required - private MetaException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_master_key_result.class, metaDataMap); - } - - public update_master_key_result() { - } - - public update_master_key_result( - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public update_master_key_result(update_master_key_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public update_master_key_result deepCopy() { - return new update_master_key_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof update_master_key_result) - return this.equals((update_master_key_result)that); - return false; - } - - public boolean equals(update_master_key_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(update_master_key_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("update_master_key_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 update_master_key_resultStandardSchemeFactory implements SchemeFactory { - public update_master_key_resultStandardScheme getScheme() { - return new update_master_key_resultStandardScheme(); - } - } - - private static class update_master_key_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, update_master_key_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 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, update_master_key_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 update_master_key_resultTupleSchemeFactory implements SchemeFactory { - public update_master_key_resultTupleScheme getScheme() { - return new update_master_key_resultTupleScheme(); - } - } - - private static class update_master_key_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, update_master_key_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, update_master_key_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.o2 = new MetaException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - } - } - - } - - public static class remove_master_key_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_master_key_args"); - - private static final org.apache.thrift.protocol.TField KEY_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("key_seq", org.apache.thrift.protocol.TType.I32, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new remove_master_key_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new remove_master_key_argsTupleSchemeFactory()); - } - - private int key_seq; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - KEY_SEQ((short)1, "key_seq"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // KEY_SEQ - return KEY_SEQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __KEY_SEQ_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.KEY_SEQ, new org.apache.thrift.meta_data.FieldMetaData("key_seq", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_master_key_args.class, metaDataMap); - } - - public remove_master_key_args() { - } - - public remove_master_key_args( - int key_seq) - { - this(); - this.key_seq = key_seq; - setKey_seqIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public remove_master_key_args(remove_master_key_args other) { - __isset_bitfield = other.__isset_bitfield; - this.key_seq = other.key_seq; - } - - public remove_master_key_args deepCopy() { - return new remove_master_key_args(this); - } - - @Override - public void clear() { - setKey_seqIsSet(false); - this.key_seq = 0; - } - - public int getKey_seq() { - return this.key_seq; - } - - public void setKey_seq(int key_seq) { - this.key_seq = key_seq; - setKey_seqIsSet(true); - } - - public void unsetKey_seq() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); - } - - /** Returns true if field key_seq is set (has been assigned a value) and false otherwise */ - public boolean isSetKey_seq() { - return EncodingUtils.testBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); - } - - public void setKey_seqIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEY_SEQ_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case KEY_SEQ: - if (value == null) { - unsetKey_seq(); - } else { - setKey_seq((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case KEY_SEQ: - return getKey_seq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case KEY_SEQ: - return isSetKey_seq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof remove_master_key_args) - return this.equals((remove_master_key_args)that); - return false; - } - - public boolean equals(remove_master_key_args that) { - if (that == null) - return false; - - boolean this_present_key_seq = true; - boolean that_present_key_seq = true; - if (this_present_key_seq || that_present_key_seq) { - if (!(this_present_key_seq && that_present_key_seq)) - return false; - if (this.key_seq != that.key_seq) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_key_seq = true; - list.add(present_key_seq); - if (present_key_seq) - list.add(key_seq); - - return list.hashCode(); - } - - @Override - public int compareTo(remove_master_key_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetKey_seq()).compareTo(other.isSetKey_seq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKey_seq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_seq, other.key_seq); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("remove_master_key_args("); - boolean first = true; - - sb.append("key_seq:"); - sb.append(this.key_seq); - 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 { - // 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 remove_master_key_argsStandardSchemeFactory implements SchemeFactory { - public remove_master_key_argsStandardScheme getScheme() { - return new remove_master_key_argsStandardScheme(); - } - } - - private static class remove_master_key_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, remove_master_key_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: // KEY_SEQ - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.key_seq = iprot.readI32(); - struct.setKey_seqIsSet(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, remove_master_key_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(KEY_SEQ_FIELD_DESC); - oprot.writeI32(struct.key_seq); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class remove_master_key_argsTupleSchemeFactory implements SchemeFactory { - public remove_master_key_argsTupleScheme getScheme() { - return new remove_master_key_argsTupleScheme(); - } - } - - private static class remove_master_key_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, remove_master_key_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetKey_seq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetKey_seq()) { - oprot.writeI32(struct.key_seq); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, remove_master_key_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.key_seq = iprot.readI32(); - struct.setKey_seqIsSet(true); - } - } - } - - } - - public static class remove_master_key_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_master_key_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new remove_master_key_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new remove_master_key_resultTupleSchemeFactory()); - } - - private boolean success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_master_key_result.class, metaDataMap); - } - - public remove_master_key_result() { - } - - public remove_master_key_result( - boolean success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public remove_master_key_result(remove_master_key_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - public remove_master_key_result deepCopy() { - return new remove_master_key_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - } - - public void unsetSuccess() { - __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return isSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof remove_master_key_result) - return this.equals((remove_master_key_result)that); - return false; - } - - public boolean equals(remove_master_key_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true; - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(remove_master_key_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("remove_master_key_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - 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 { - // 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 remove_master_key_resultStandardSchemeFactory implements SchemeFactory { - public remove_master_key_resultStandardScheme getScheme() { - return new remove_master_key_resultStandardScheme(); - } - } - - private static class remove_master_key_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, remove_master_key_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; - 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, remove_master_key_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class remove_master_key_resultTupleSchemeFactory implements SchemeFactory { - public remove_master_key_resultTupleScheme getScheme() { - return new remove_master_key_resultTupleScheme(); - } - } - - private static class remove_master_key_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, remove_master_key_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, remove_master_key_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class get_master_keys_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_master_keys_args"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_master_keys_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_master_keys_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 { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_master_keys_args.class, metaDataMap); - } - - public get_master_keys_args() { - } - - /** - * Performs a deep copy on other. - */ - public get_master_keys_args(get_master_keys_args other) { - } - - public get_master_keys_args deepCopy() { - return new get_master_keys_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_master_keys_args) - return this.equals((get_master_keys_args)that); - return false; - } - - public boolean equals(get_master_keys_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(get_master_keys_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_master_keys_args("); - boolean first = true; - - 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 get_master_keys_argsStandardSchemeFactory implements SchemeFactory { - public get_master_keys_argsStandardScheme getScheme() { - return new get_master_keys_argsStandardScheme(); - } - } - - private static class get_master_keys_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_master_keys_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_master_keys_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_master_keys_argsTupleSchemeFactory implements SchemeFactory { - public get_master_keys_argsTupleScheme getScheme() { - return new get_master_keys_argsTupleScheme(); - } - } - - private static class get_master_keys_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_master_keys_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_master_keys_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class get_master_keys_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_master_keys_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_master_keys_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_master_keys_resultTupleSchemeFactory()); - } - - private List success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_master_keys_result.class, metaDataMap); - } - - public get_master_keys_result() { - } - - public get_master_keys_result( - List success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public get_master_keys_result(get_master_keys_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - } - - public get_master_keys_result deepCopy() { - return new get_master_keys_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public void setSuccess(List success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_master_keys_result) - return this.equals((get_master_keys_result)that); - return false; - } - - public boolean equals(get_master_keys_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(get_master_keys_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_master_keys_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - 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 get_master_keys_resultStandardSchemeFactory implements SchemeFactory { - public get_master_keys_resultStandardScheme getScheme() { - return new get_master_keys_resultStandardScheme(); - } - } - - private static class get_master_keys_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_master_keys_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 _list1246 = iprot.readListBegin(); - struct.success = new ArrayList(_list1246.size); - String _elem1247; - for (int _i1248 = 0; _i1248 < _list1246.size; ++_i1248) - { - _elem1247 = iprot.readString(); - struct.success.add(_elem1247); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(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_master_keys_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 _iter1249 : struct.success) - { - oprot.writeString(_iter1249); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_master_keys_resultTupleSchemeFactory implements SchemeFactory { - public get_master_keys_resultTupleScheme getScheme() { - return new get_master_keys_resultTupleScheme(); - } - } - - private static class get_master_keys_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_master_keys_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (String _iter1250 : struct.success) - { - oprot.writeString(_iter1250); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_master_keys_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list1251 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list1251.size); - String _elem1252; - for (int _i1253 = 0; _i1253 < _list1251.size; ++_i1253) - { - _elem1252 = iprot.readString(); - struct.success.add(_elem1252); - } - } - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class get_open_txns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_args"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_open_txns_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_open_txns_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 { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_args.class, metaDataMap); - } - - public get_open_txns_args() { - } - - /** - * Performs a deep copy on other. - */ - public get_open_txns_args(get_open_txns_args other) { - } - - public get_open_txns_args deepCopy() { - return new get_open_txns_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_open_txns_args) - return this.equals((get_open_txns_args)that); - return false; - } - - public boolean equals(get_open_txns_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(get_open_txns_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_open_txns_args("); - boolean first = true; - - 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 get_open_txns_argsStandardSchemeFactory implements SchemeFactory { - public get_open_txns_argsStandardScheme getScheme() { - return new get_open_txns_argsStandardScheme(); - } - } - - private static class get_open_txns_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_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_open_txns_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_open_txns_argsTupleSchemeFactory implements SchemeFactory { - public get_open_txns_argsTupleScheme getScheme() { - return new get_open_txns_argsTupleScheme(); - } - } - - private static class get_open_txns_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class get_open_txns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_open_txns_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_open_txns_resultTupleSchemeFactory()); - } - - private GetOpenTxnsResponse success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetOpenTxnsResponse.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_result.class, metaDataMap); - } - - public get_open_txns_result() { - } - - public get_open_txns_result( - GetOpenTxnsResponse success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public get_open_txns_result(get_open_txns_result other) { - if (other.isSetSuccess()) { - this.success = new GetOpenTxnsResponse(other.success); - } - } - - public get_open_txns_result deepCopy() { - return new get_open_txns_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public GetOpenTxnsResponse getSuccess() { - return this.success; - } - - public void setSuccess(GetOpenTxnsResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((GetOpenTxnsResponse)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_open_txns_result) - return this.equals((get_open_txns_result)that); - return false; - } - - public boolean equals(get_open_txns_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(get_open_txns_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_open_txns_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_open_txns_resultStandardSchemeFactory implements SchemeFactory { - public get_open_txns_resultStandardScheme getScheme() { - return new get_open_txns_resultStandardScheme(); - } - } - - private static class get_open_txns_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_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 GetOpenTxnsResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(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_open_txns_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_open_txns_resultTupleSchemeFactory implements SchemeFactory { - public get_open_txns_resultTupleScheme getScheme() { - return new get_open_txns_resultTupleScheme(); - } - } - - private static class get_open_txns_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new GetOpenTxnsResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class get_open_txns_info_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_info_args"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_open_txns_info_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_open_txns_info_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 { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_info_args.class, metaDataMap); - } - - public get_open_txns_info_args() { - } - - /** - * Performs a deep copy on other. - */ - public get_open_txns_info_args(get_open_txns_info_args other) { - } - - public get_open_txns_info_args deepCopy() { - return new get_open_txns_info_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_open_txns_info_args) - return this.equals((get_open_txns_info_args)that); - return false; - } - - public boolean equals(get_open_txns_info_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(get_open_txns_info_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_open_txns_info_args("); - boolean first = true; - - 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 get_open_txns_info_argsStandardSchemeFactory implements SchemeFactory { - public get_open_txns_info_argsStandardScheme getScheme() { - return new get_open_txns_info_argsStandardScheme(); - } - } - - private static class get_open_txns_info_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_info_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_open_txns_info_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_open_txns_info_argsTupleSchemeFactory implements SchemeFactory { - public get_open_txns_info_argsTupleScheme getScheme() { - return new get_open_txns_info_argsTupleScheme(); - } - } - - private static class get_open_txns_info_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_info_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_info_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class get_open_txns_info_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_info_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_open_txns_info_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_open_txns_info_resultTupleSchemeFactory()); - } - - private GetOpenTxnsInfoResponse success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetOpenTxnsInfoResponse.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_info_result.class, metaDataMap); - } - - public get_open_txns_info_result() { - } - - public get_open_txns_info_result( - GetOpenTxnsInfoResponse success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public get_open_txns_info_result(get_open_txns_info_result other) { - if (other.isSetSuccess()) { - this.success = new GetOpenTxnsInfoResponse(other.success); - } - } - - public get_open_txns_info_result deepCopy() { - return new get_open_txns_info_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public GetOpenTxnsInfoResponse getSuccess() { - return this.success; - } - - public void setSuccess(GetOpenTxnsInfoResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((GetOpenTxnsInfoResponse)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_open_txns_info_result) - return this.equals((get_open_txns_info_result)that); - return false; - } - - public boolean equals(get_open_txns_info_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(get_open_txns_info_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_open_txns_info_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_open_txns_info_resultStandardSchemeFactory implements SchemeFactory { - public get_open_txns_info_resultStandardScheme getScheme() { - return new get_open_txns_info_resultStandardScheme(); - } - } - - private static class get_open_txns_info_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_info_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 GetOpenTxnsInfoResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(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_open_txns_info_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_open_txns_info_resultTupleSchemeFactory implements SchemeFactory { - public get_open_txns_info_resultTupleScheme getScheme() { - return new get_open_txns_info_resultTupleScheme(); - } - } - - private static class get_open_txns_info_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_info_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_info_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new GetOpenTxnsInfoResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class open_txns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("open_txns_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new open_txns_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new open_txns_argsTupleSchemeFactory()); - } - - private OpenTxnRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OpenTxnRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(open_txns_args.class, metaDataMap); - } - - public open_txns_args() { - } - - public open_txns_args( - OpenTxnRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public open_txns_args(open_txns_args other) { - if (other.isSetRqst()) { - this.rqst = new OpenTxnRequest(other.rqst); - } - } - - public open_txns_args deepCopy() { - return new open_txns_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public OpenTxnRequest getRqst() { - return this.rqst; - } - - public void setRqst(OpenTxnRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((OpenTxnRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof open_txns_args) - return this.equals((open_txns_args)that); - return false; - } - - public boolean equals(open_txns_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(open_txns_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("open_txns_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 open_txns_argsStandardSchemeFactory implements SchemeFactory { - public open_txns_argsStandardScheme getScheme() { - return new open_txns_argsStandardScheme(); - } - } - - private static class open_txns_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, open_txns_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new OpenTxnRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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, open_txns_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class open_txns_argsTupleSchemeFactory implements SchemeFactory { - public open_txns_argsTupleScheme getScheme() { - return new open_txns_argsTupleScheme(); - } - } - - private static class open_txns_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, open_txns_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, open_txns_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new OpenTxnRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class open_txns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("open_txns_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new open_txns_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new open_txns_resultTupleSchemeFactory()); - } - - private OpenTxnsResponse success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OpenTxnsResponse.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(open_txns_result.class, metaDataMap); - } - - public open_txns_result() { - } - - public open_txns_result( - OpenTxnsResponse success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public open_txns_result(open_txns_result other) { - if (other.isSetSuccess()) { - this.success = new OpenTxnsResponse(other.success); - } - } - - public open_txns_result deepCopy() { - return new open_txns_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public OpenTxnsResponse getSuccess() { - return this.success; - } - - public void setSuccess(OpenTxnsResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((OpenTxnsResponse)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof open_txns_result) - return this.equals((open_txns_result)that); - return false; - } - - public boolean equals(open_txns_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(open_txns_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("open_txns_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 open_txns_resultStandardSchemeFactory implements SchemeFactory { - public open_txns_resultStandardScheme getScheme() { - return new open_txns_resultStandardScheme(); - } - } - - private static class open_txns_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, open_txns_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 OpenTxnsResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(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, open_txns_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class open_txns_resultTupleSchemeFactory implements SchemeFactory { - public open_txns_resultTupleScheme getScheme() { - return new open_txns_resultTupleScheme(); - } - } - - private static class open_txns_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, open_txns_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, open_txns_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new OpenTxnsResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class abort_txn_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_txn_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new abort_txn_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new abort_txn_argsTupleSchemeFactory()); - } - - private AbortTxnRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AbortTxnRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_txn_args.class, metaDataMap); - } - - public abort_txn_args() { - } - - public abort_txn_args( - AbortTxnRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public abort_txn_args(abort_txn_args other) { - if (other.isSetRqst()) { - this.rqst = new AbortTxnRequest(other.rqst); - } - } - - public abort_txn_args deepCopy() { - return new abort_txn_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public AbortTxnRequest getRqst() { - return this.rqst; - } - - public void setRqst(AbortTxnRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((AbortTxnRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof abort_txn_args) - return this.equals((abort_txn_args)that); - return false; - } - - public boolean equals(abort_txn_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(abort_txn_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("abort_txn_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 abort_txn_argsStandardSchemeFactory implements SchemeFactory { - public abort_txn_argsStandardScheme getScheme() { - return new abort_txn_argsStandardScheme(); - } - } - - private static class abort_txn_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, abort_txn_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new AbortTxnRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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, abort_txn_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class abort_txn_argsTupleSchemeFactory implements SchemeFactory { - public abort_txn_argsTupleScheme getScheme() { - return new abort_txn_argsTupleScheme(); - } - } - - private static class abort_txn_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, abort_txn_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, abort_txn_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new AbortTxnRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class abort_txn_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_txn_result"); - - 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 abort_txn_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new abort_txn_resultTupleSchemeFactory()); - } - - private NoSuchTxnException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_txn_result.class, metaDataMap); - } - - public abort_txn_result() { - } - - public abort_txn_result( - NoSuchTxnException o1) - { - this(); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public abort_txn_result(abort_txn_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchTxnException(other.o1); - } - } - - public abort_txn_result deepCopy() { - return new abort_txn_result(this); - } - - @Override - public void clear() { - this.o1 = null; - } - - public NoSuchTxnException getO1() { - return this.o1; - } - - public void setO1(NoSuchTxnException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchTxnException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof abort_txn_result) - return this.equals((abort_txn_result)that); - return false; - } - - public boolean equals(abort_txn_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(abort_txn_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("abort_txn_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 abort_txn_resultStandardSchemeFactory implements SchemeFactory { - public abort_txn_resultStandardScheme getScheme() { - return new abort_txn_resultStandardScheme(); - } - } - - private static class abort_txn_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, abort_txn_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 NoSuchTxnException(); - 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, abort_txn_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 abort_txn_resultTupleSchemeFactory implements SchemeFactory { - public abort_txn_resultTupleScheme getScheme() { - return new abort_txn_resultTupleScheme(); - } - } - - private static class abort_txn_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, abort_txn_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, abort_txn_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.o1 = new NoSuchTxnException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - } - } - - } - - public static class abort_txns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_txns_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new abort_txns_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new abort_txns_argsTupleSchemeFactory()); - } - - private AbortTxnsRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AbortTxnsRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_txns_args.class, metaDataMap); - } - - public abort_txns_args() { - } - - public abort_txns_args( - AbortTxnsRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public abort_txns_args(abort_txns_args other) { - if (other.isSetRqst()) { - this.rqst = new AbortTxnsRequest(other.rqst); - } - } - - public abort_txns_args deepCopy() { - return new abort_txns_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public AbortTxnsRequest getRqst() { - return this.rqst; - } - - public void setRqst(AbortTxnsRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((AbortTxnsRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof abort_txns_args) - return this.equals((abort_txns_args)that); - return false; - } - - public boolean equals(abort_txns_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(abort_txns_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("abort_txns_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 abort_txns_argsStandardSchemeFactory implements SchemeFactory { - public abort_txns_argsStandardScheme getScheme() { - return new abort_txns_argsStandardScheme(); - } - } - - private static class abort_txns_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, abort_txns_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new AbortTxnsRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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, abort_txns_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class abort_txns_argsTupleSchemeFactory implements SchemeFactory { - public abort_txns_argsTupleScheme getScheme() { - return new abort_txns_argsTupleScheme(); - } - } - - private static class abort_txns_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, abort_txns_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, abort_txns_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new AbortTxnsRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class abort_txns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_txns_result"); - - 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 abort_txns_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new abort_txns_resultTupleSchemeFactory()); - } - - private NoSuchTxnException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_txns_result.class, metaDataMap); - } - - public abort_txns_result() { - } - - public abort_txns_result( - NoSuchTxnException o1) - { - this(); - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public abort_txns_result(abort_txns_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchTxnException(other.o1); - } - } - - public abort_txns_result deepCopy() { - return new abort_txns_result(this); - } - - @Override - public void clear() { - this.o1 = null; - } - - public NoSuchTxnException getO1() { - return this.o1; - } - - public void setO1(NoSuchTxnException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchTxnException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof abort_txns_result) - return this.equals((abort_txns_result)that); - return false; - } - - public boolean equals(abort_txns_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(abort_txns_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("abort_txns_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 abort_txns_resultStandardSchemeFactory implements SchemeFactory { - public abort_txns_resultStandardScheme getScheme() { - return new abort_txns_resultStandardScheme(); - } - } - - private static class abort_txns_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, abort_txns_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 NoSuchTxnException(); - 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, abort_txns_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 abort_txns_resultTupleSchemeFactory implements SchemeFactory { - public abort_txns_resultTupleScheme getScheme() { - return new abort_txns_resultTupleScheme(); - } - } - - private static class abort_txns_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, abort_txns_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, abort_txns_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.o1 = new NoSuchTxnException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - } - } - - } - - public static class commit_txn_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("commit_txn_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new commit_txn_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new commit_txn_argsTupleSchemeFactory()); - } - - private CommitTxnRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CommitTxnRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(commit_txn_args.class, metaDataMap); - } - - public commit_txn_args() { - } - - public commit_txn_args( - CommitTxnRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public commit_txn_args(commit_txn_args other) { - if (other.isSetRqst()) { - this.rqst = new CommitTxnRequest(other.rqst); - } - } - - public commit_txn_args deepCopy() { - return new commit_txn_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public CommitTxnRequest getRqst() { - return this.rqst; - } - - public void setRqst(CommitTxnRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((CommitTxnRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof commit_txn_args) - return this.equals((commit_txn_args)that); - return false; - } - - public boolean equals(commit_txn_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(commit_txn_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("commit_txn_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 commit_txn_argsStandardSchemeFactory implements SchemeFactory { - public commit_txn_argsStandardScheme getScheme() { - return new commit_txn_argsStandardScheme(); - } - } - - private static class commit_txn_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, commit_txn_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new CommitTxnRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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, commit_txn_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class commit_txn_argsTupleSchemeFactory implements SchemeFactory { - public commit_txn_argsTupleScheme getScheme() { - return new commit_txn_argsTupleScheme(); - } - } - - private static class commit_txn_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, commit_txn_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, commit_txn_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new CommitTxnRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class commit_txn_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("commit_txn_result"); - - 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 commit_txn_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new commit_txn_resultTupleSchemeFactory()); - } - - private NoSuchTxnException o1; // required - private TxnAbortedException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(commit_txn_result.class, metaDataMap); - } - - public commit_txn_result() { - } - - public commit_txn_result( - NoSuchTxnException o1, - TxnAbortedException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public commit_txn_result(commit_txn_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchTxnException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new TxnAbortedException(other.o2); - } - } - - public commit_txn_result deepCopy() { - return new commit_txn_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public NoSuchTxnException getO1() { - return this.o1; - } - - public void setO1(NoSuchTxnException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public TxnAbortedException getO2() { - return this.o2; - } - - public void setO2(TxnAbortedException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchTxnException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((TxnAbortedException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof commit_txn_result) - return this.equals((commit_txn_result)that); - return false; - } - - public boolean equals(commit_txn_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(commit_txn_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("commit_txn_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 commit_txn_resultStandardSchemeFactory implements SchemeFactory { - public commit_txn_resultStandardScheme getScheme() { - return new commit_txn_resultStandardScheme(); - } - } - - private static class commit_txn_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, commit_txn_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 NoSuchTxnException(); - 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 TxnAbortedException(); - 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, commit_txn_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 commit_txn_resultTupleSchemeFactory implements SchemeFactory { - public commit_txn_resultTupleScheme getScheme() { - return new commit_txn_resultTupleScheme(); - } - } - - private static class commit_txn_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, commit_txn_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, commit_txn_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.o1 = new NoSuchTxnException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - if (incoming.get(1)) { - struct.o2 = new TxnAbortedException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - } - } - - } - - public static class lock_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("lock_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new lock_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new lock_argsTupleSchemeFactory()); - } - - private LockRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LockRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(lock_args.class, metaDataMap); - } - - public lock_args() { - } - - public lock_args( - LockRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public lock_args(lock_args other) { - if (other.isSetRqst()) { - this.rqst = new LockRequest(other.rqst); - } - } - - public lock_args deepCopy() { - return new lock_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public LockRequest getRqst() { - return this.rqst; - } - - public void setRqst(LockRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((LockRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof lock_args) - return this.equals((lock_args)that); - return false; - } - - public boolean equals(lock_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(lock_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("lock_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 lock_argsStandardSchemeFactory implements SchemeFactory { - public lock_argsStandardScheme getScheme() { - return new lock_argsStandardScheme(); - } - } - - private static class lock_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, lock_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new LockRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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, lock_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class lock_argsTupleSchemeFactory implements SchemeFactory { - public lock_argsTupleScheme getScheme() { - return new lock_argsTupleScheme(); - } - } - - private static class lock_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, lock_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, lock_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new LockRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class lock_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("lock_result"); - - 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 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 lock_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new lock_resultTupleSchemeFactory()); - } - - private LockResponse success; // required - private NoSuchTxnException o1; // required - private TxnAbortedException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LockResponse.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(lock_result.class, metaDataMap); - } - - public lock_result() { - } - - public lock_result( - LockResponse success, - NoSuchTxnException o1, - TxnAbortedException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public lock_result(lock_result other) { - if (other.isSetSuccess()) { - this.success = new LockResponse(other.success); - } - if (other.isSetO1()) { - this.o1 = new NoSuchTxnException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new TxnAbortedException(other.o2); - } - } - - public lock_result deepCopy() { - return new lock_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - } - - public LockResponse getSuccess() { - return this.success; - } - - public void setSuccess(LockResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchTxnException getO1() { - return this.o1; - } - - public void setO1(NoSuchTxnException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public TxnAbortedException getO2() { - return this.o2; - } - - public void setO2(TxnAbortedException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((LockResponse)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchTxnException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((TxnAbortedException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof lock_result) - return this.equals((lock_result)that); - return false; - } - - public boolean equals(lock_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(lock_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("lock_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 lock_resultStandardSchemeFactory implements SchemeFactory { - public lock_resultStandardScheme getScheme() { - return new lock_resultStandardScheme(); - } - } - - private static class lock_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, lock_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 LockResponse(); - 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 NoSuchTxnException(); - 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 TxnAbortedException(); - 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, lock_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 lock_resultTupleSchemeFactory implements SchemeFactory { - public lock_resultTupleScheme getScheme() { - return new lock_resultTupleScheme(); - } - } - - private static class lock_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, lock_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, lock_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new LockResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.o1 = new NoSuchTxnException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - if (incoming.get(2)) { - struct.o2 = new TxnAbortedException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - } - } - - } - - public static class check_lock_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("check_lock_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new check_lock_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new check_lock_argsTupleSchemeFactory()); - } - - private CheckLockRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CheckLockRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(check_lock_args.class, metaDataMap); - } - - public check_lock_args() { - } - - public check_lock_args( - CheckLockRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public check_lock_args(check_lock_args other) { - if (other.isSetRqst()) { - this.rqst = new CheckLockRequest(other.rqst); - } - } - - public check_lock_args deepCopy() { - return new check_lock_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public CheckLockRequest getRqst() { - return this.rqst; - } - - public void setRqst(CheckLockRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((CheckLockRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof check_lock_args) - return this.equals((check_lock_args)that); - return false; - } - - public boolean equals(check_lock_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(check_lock_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("check_lock_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 check_lock_argsStandardSchemeFactory implements SchemeFactory { - public check_lock_argsStandardScheme getScheme() { - return new check_lock_argsStandardScheme(); - } - } - - private static class check_lock_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, check_lock_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new CheckLockRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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, check_lock_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class check_lock_argsTupleSchemeFactory implements SchemeFactory { - public check_lock_argsTupleScheme getScheme() { - return new check_lock_argsTupleScheme(); - } - } - - private static class check_lock_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, check_lock_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, check_lock_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new CheckLockRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class check_lock_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("check_lock_result"); - - 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 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 check_lock_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new check_lock_resultTupleSchemeFactory()); - } - - private LockResponse success; // required - private NoSuchTxnException o1; // required - private TxnAbortedException o2; // required - private NoSuchLockException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LockResponse.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(check_lock_result.class, metaDataMap); - } - - public check_lock_result() { - } - - public check_lock_result( - LockResponse success, - NoSuchTxnException o1, - TxnAbortedException o2, - NoSuchLockException o3) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public check_lock_result(check_lock_result other) { - if (other.isSetSuccess()) { - this.success = new LockResponse(other.success); - } - if (other.isSetO1()) { - this.o1 = new NoSuchTxnException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new TxnAbortedException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new NoSuchLockException(other.o3); - } - } - - public check_lock_result deepCopy() { - return new check_lock_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public LockResponse getSuccess() { - return this.success; - } - - public void setSuccess(LockResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchTxnException getO1() { - return this.o1; - } - - public void setO1(NoSuchTxnException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public TxnAbortedException getO2() { - return this.o2; - } - - public void setO2(TxnAbortedException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public NoSuchLockException getO3() { - return this.o3; - } - - public void setO3(NoSuchLockException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((LockResponse)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchTxnException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((TxnAbortedException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((NoSuchLockException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof check_lock_result) - return this.equals((check_lock_result)that); - return false; - } - - public boolean equals(check_lock_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(check_lock_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("check_lock_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 check_lock_resultStandardSchemeFactory implements SchemeFactory { - public check_lock_resultStandardScheme getScheme() { - return new check_lock_resultStandardScheme(); - } - } - - private static class check_lock_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, check_lock_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 LockResponse(); - 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 NoSuchTxnException(); - 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 TxnAbortedException(); - 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 NoSuchLockException(); - 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, check_lock_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 check_lock_resultTupleSchemeFactory implements SchemeFactory { - public check_lock_resultTupleScheme getScheme() { - return new check_lock_resultTupleScheme(); - } - } - - private static class check_lock_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, check_lock_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, check_lock_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.success = new LockResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.o1 = new NoSuchTxnException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - if (incoming.get(2)) { - struct.o2 = new TxnAbortedException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - if (incoming.get(3)) { - struct.o3 = new NoSuchLockException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } - } - } - - } - - public static class unlock_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unlock_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new unlock_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new unlock_argsTupleSchemeFactory()); - } - - private UnlockRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UnlockRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unlock_args.class, metaDataMap); - } - - public unlock_args() { - } - - public unlock_args( - UnlockRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public unlock_args(unlock_args other) { - if (other.isSetRqst()) { - this.rqst = new UnlockRequest(other.rqst); - } - } - - public unlock_args deepCopy() { - return new unlock_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public UnlockRequest getRqst() { - return this.rqst; - } - - public void setRqst(UnlockRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((UnlockRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof unlock_args) - return this.equals((unlock_args)that); - return false; - } - - public boolean equals(unlock_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(unlock_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("unlock_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 unlock_argsStandardSchemeFactory implements SchemeFactory { - public unlock_argsStandardScheme getScheme() { - return new unlock_argsStandardScheme(); - } - } - - private static class unlock_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, unlock_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new UnlockRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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, unlock_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class unlock_argsTupleSchemeFactory implements SchemeFactory { - public unlock_argsTupleScheme getScheme() { - return new unlock_argsTupleScheme(); - } - } - - private static class unlock_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, unlock_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, unlock_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new UnlockRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class unlock_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unlock_result"); - - 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 unlock_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new unlock_resultTupleSchemeFactory()); - } - - private NoSuchLockException o1; // required - private TxnOpenException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unlock_result.class, metaDataMap); - } - - public unlock_result() { - } - - public unlock_result( - NoSuchLockException o1, - TxnOpenException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public unlock_result(unlock_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchLockException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new TxnOpenException(other.o2); - } - } - - public unlock_result deepCopy() { - return new unlock_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public NoSuchLockException getO1() { - return this.o1; - } - - public void setO1(NoSuchLockException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public TxnOpenException getO2() { - return this.o2; - } - - public void setO2(TxnOpenException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchLockException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((TxnOpenException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof unlock_result) - return this.equals((unlock_result)that); - return false; - } - - public boolean equals(unlock_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(unlock_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("unlock_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 unlock_resultStandardSchemeFactory implements SchemeFactory { - public unlock_resultStandardScheme getScheme() { - return new unlock_resultStandardScheme(); - } - } - - private static class unlock_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, unlock_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 NoSuchLockException(); - 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 TxnOpenException(); - 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, unlock_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 unlock_resultTupleSchemeFactory implements SchemeFactory { - public unlock_resultTupleScheme getScheme() { - return new unlock_resultTupleScheme(); - } - } - - private static class unlock_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, unlock_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, unlock_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.o1 = new NoSuchLockException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - if (incoming.get(1)) { - struct.o2 = new TxnOpenException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - } - } - - } - - public static class show_locks_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_locks_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new show_locks_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new show_locks_argsTupleSchemeFactory()); - } - - private ShowLocksRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowLocksRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_locks_args.class, metaDataMap); - } - - public show_locks_args() { - } - - public show_locks_args( - ShowLocksRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public show_locks_args(show_locks_args other) { - if (other.isSetRqst()) { - this.rqst = new ShowLocksRequest(other.rqst); - } - } - - public show_locks_args deepCopy() { - return new show_locks_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public ShowLocksRequest getRqst() { - return this.rqst; - } - - public void setRqst(ShowLocksRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((ShowLocksRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof show_locks_args) - return this.equals((show_locks_args)that); - return false; - } - - public boolean equals(show_locks_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(show_locks_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("show_locks_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 show_locks_argsStandardSchemeFactory implements SchemeFactory { - public show_locks_argsStandardScheme getScheme() { - return new show_locks_argsStandardScheme(); - } - } - - private static class show_locks_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, show_locks_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new ShowLocksRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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, show_locks_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class show_locks_argsTupleSchemeFactory implements SchemeFactory { - public show_locks_argsTupleScheme getScheme() { - return new show_locks_argsTupleScheme(); - } - } - - private static class show_locks_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, show_locks_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, show_locks_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new ShowLocksRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class show_locks_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_locks_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new show_locks_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new show_locks_resultTupleSchemeFactory()); - } - - private ShowLocksResponse success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowLocksResponse.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_locks_result.class, metaDataMap); - } - - public show_locks_result() { - } - - public show_locks_result( - ShowLocksResponse success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public show_locks_result(show_locks_result other) { - if (other.isSetSuccess()) { - this.success = new ShowLocksResponse(other.success); - } - } - - public show_locks_result deepCopy() { - return new show_locks_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public ShowLocksResponse getSuccess() { - return this.success; - } - - public void setSuccess(ShowLocksResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((ShowLocksResponse)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof show_locks_result) - return this.equals((show_locks_result)that); - return false; - } - - public boolean equals(show_locks_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(show_locks_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("show_locks_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 show_locks_resultStandardSchemeFactory implements SchemeFactory { - public show_locks_resultStandardScheme getScheme() { - return new show_locks_resultStandardScheme(); - } - } - - private static class show_locks_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, show_locks_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 ShowLocksResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(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, show_locks_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class show_locks_resultTupleSchemeFactory implements SchemeFactory { - public show_locks_resultTupleScheme getScheme() { - return new show_locks_resultTupleScheme(); - } - } - - private static class show_locks_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, show_locks_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, show_locks_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new ShowLocksResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class heartbeat_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_args"); - - private static final org.apache.thrift.protocol.TField IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("ids", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new heartbeat_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new heartbeat_argsTupleSchemeFactory()); - } - - private HeartbeatRequest ids; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - IDS((short)1, "ids"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // IDS - return IDS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.IDS, new org.apache.thrift.meta_data.FieldMetaData("ids", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_args.class, metaDataMap); - } - - public heartbeat_args() { - } - - public heartbeat_args( - HeartbeatRequest ids) - { - this(); - this.ids = ids; - } - - /** - * Performs a deep copy on other. - */ - public heartbeat_args(heartbeat_args other) { - if (other.isSetIds()) { - this.ids = new HeartbeatRequest(other.ids); - } - } - - public heartbeat_args deepCopy() { - return new heartbeat_args(this); - } - - @Override - public void clear() { - this.ids = null; - } - - public HeartbeatRequest getIds() { - return this.ids; - } - - public void setIds(HeartbeatRequest ids) { - this.ids = ids; - } - - public void unsetIds() { - this.ids = null; - } - - /** Returns true if field ids is set (has been assigned a value) and false otherwise */ - public boolean isSetIds() { - return this.ids != null; - } - - public void setIdsIsSet(boolean value) { - if (!value) { - this.ids = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case IDS: - if (value == null) { - unsetIds(); - } else { - setIds((HeartbeatRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case IDS: - return getIds(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case IDS: - return isSetIds(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof heartbeat_args) - return this.equals((heartbeat_args)that); - return false; - } - - public boolean equals(heartbeat_args that) { - if (that == null) - return false; - - boolean this_present_ids = true && this.isSetIds(); - boolean that_present_ids = true && that.isSetIds(); - if (this_present_ids || that_present_ids) { - if (!(this_present_ids && that_present_ids)) - return false; - if (!this.ids.equals(that.ids)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_ids = true && (isSetIds()); - list.add(present_ids); - if (present_ids) - list.add(ids); - - return list.hashCode(); - } - - @Override - public int compareTo(heartbeat_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetIds()).compareTo(other.isSetIds()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIds()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ids, other.ids); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("heartbeat_args("); - boolean first = true; - - sb.append("ids:"); - if (this.ids == null) { - sb.append("null"); - } else { - sb.append(this.ids); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (ids != null) { - ids.validate(); - } - } - - 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 heartbeat_argsStandardSchemeFactory implements SchemeFactory { - public heartbeat_argsStandardScheme getScheme() { - return new heartbeat_argsStandardScheme(); - } - } - - private static class heartbeat_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_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: // IDS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ids = new HeartbeatRequest(); - struct.ids.read(iprot); - struct.setIdsIsSet(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, heartbeat_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.ids != null) { - oprot.writeFieldBegin(IDS_FIELD_DESC); - struct.ids.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class heartbeat_argsTupleSchemeFactory implements SchemeFactory { - public heartbeat_argsTupleScheme getScheme() { - return new heartbeat_argsTupleScheme(); - } - } - - private static class heartbeat_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetIds()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetIds()) { - struct.ids.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.ids = new HeartbeatRequest(); - struct.ids.read(iprot); - struct.setIdsIsSet(true); - } - } - } - - } - - public static class heartbeat_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_result"); - - 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 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 heartbeat_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new heartbeat_resultTupleSchemeFactory()); - } - - private NoSuchLockException o1; // required - private NoSuchTxnException o2; // required - private TxnAbortedException o3; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_result.class, metaDataMap); - } - - public heartbeat_result() { - } - - public heartbeat_result( - NoSuchLockException o1, - NoSuchTxnException o2, - TxnAbortedException o3) - { - this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - } - - /** - * Performs a deep copy on other. - */ - public heartbeat_result(heartbeat_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchLockException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchTxnException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new TxnAbortedException(other.o3); - } - } - - public heartbeat_result deepCopy() { - return new heartbeat_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public NoSuchLockException getO1() { - return this.o1; - } - - public void setO1(NoSuchLockException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public NoSuchTxnException getO2() { - return this.o2; - } - - public void setO2(NoSuchTxnException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public TxnAbortedException getO3() { - return this.o3; - } - - public void setO3(TxnAbortedException o3) { - this.o3 = o3; - } - - public void unsetO3() { - this.o3 = null; - } - - /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; - } - - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchLockException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchTxnException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((TxnAbortedException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof heartbeat_result) - return this.equals((heartbeat_result)that); - return false; - } - - public boolean equals(heartbeat_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - boolean present_o3 = true && (isSetO3()); - list.add(present_o3); - if (present_o3) - list.add(o3); - - return list.hashCode(); - } - - @Override - public int compareTo(heartbeat_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("heartbeat_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - 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 heartbeat_resultStandardSchemeFactory implements SchemeFactory { - public heartbeat_resultStandardScheme getScheme() { - return new heartbeat_resultStandardScheme(); - } - } - - private static class heartbeat_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_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 NoSuchLockException(); - 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 NoSuchTxnException(); - 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 TxnAbortedException(); - 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, heartbeat_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 heartbeat_resultTupleSchemeFactory implements SchemeFactory { - public heartbeat_resultTupleScheme getScheme() { - return new heartbeat_resultTupleScheme(); - } - } - - private static class heartbeat_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_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, heartbeat_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.o1 = new NoSuchLockException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - if (incoming.get(1)) { - struct.o2 = new NoSuchTxnException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - if (incoming.get(2)) { - struct.o3 = new TxnAbortedException(); - struct.o3.read(iprot); - struct.setO3IsSet(true); - } - } - } - - } - - public static class heartbeat_txn_range_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_txn_range_args"); - - private static final org.apache.thrift.protocol.TField TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("txns", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new heartbeat_txn_range_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new heartbeat_txn_range_argsTupleSchemeFactory()); - } - - private HeartbeatTxnRangeRequest txns; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TXNS((short)1, "txns"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TXNS - return TXNS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.TXNS, new org.apache.thrift.meta_data.FieldMetaData("txns", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatTxnRangeRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_txn_range_args.class, metaDataMap); - } - - public heartbeat_txn_range_args() { - } - - public heartbeat_txn_range_args( - HeartbeatTxnRangeRequest txns) - { - this(); - this.txns = txns; - } - - /** - * Performs a deep copy on other. - */ - public heartbeat_txn_range_args(heartbeat_txn_range_args other) { - if (other.isSetTxns()) { - this.txns = new HeartbeatTxnRangeRequest(other.txns); - } - } - - public heartbeat_txn_range_args deepCopy() { - return new heartbeat_txn_range_args(this); - } - - @Override - public void clear() { - this.txns = null; - } - - public HeartbeatTxnRangeRequest getTxns() { - return this.txns; - } - - public void setTxns(HeartbeatTxnRangeRequest txns) { - this.txns = txns; - } - - public void unsetTxns() { - this.txns = null; - } - - /** Returns true if field txns is set (has been assigned a value) and false otherwise */ - public boolean isSetTxns() { - return this.txns != null; - } - - public void setTxnsIsSet(boolean value) { - if (!value) { - this.txns = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TXNS: - if (value == null) { - unsetTxns(); - } else { - setTxns((HeartbeatTxnRangeRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TXNS: - return getTxns(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TXNS: - return isSetTxns(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof heartbeat_txn_range_args) - return this.equals((heartbeat_txn_range_args)that); - return false; - } - - public boolean equals(heartbeat_txn_range_args that) { - if (that == null) - return false; - - boolean this_present_txns = true && this.isSetTxns(); - boolean that_present_txns = true && that.isSetTxns(); - if (this_present_txns || that_present_txns) { - if (!(this_present_txns && that_present_txns)) - return false; - if (!this.txns.equals(that.txns)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_txns = true && (isSetTxns()); - list.add(present_txns); - if (present_txns) - list.add(txns); - - return list.hashCode(); - } - - @Override - public int compareTo(heartbeat_txn_range_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTxns()).compareTo(other.isSetTxns()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTxns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txns, other.txns); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("heartbeat_txn_range_args("); - boolean first = true; - - sb.append("txns:"); - if (this.txns == null) { - sb.append("null"); - } else { - sb.append(this.txns); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (txns != null) { - txns.validate(); - } - } - - 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 heartbeat_txn_range_argsStandardSchemeFactory implements SchemeFactory { - public heartbeat_txn_range_argsStandardScheme getScheme() { - return new heartbeat_txn_range_argsStandardScheme(); - } - } - - private static class heartbeat_txn_range_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range_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: // TXNS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.txns = new HeartbeatTxnRangeRequest(); - struct.txns.read(iprot); - struct.setTxnsIsSet(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, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.txns != null) { - oprot.writeFieldBegin(TXNS_FIELD_DESC); - struct.txns.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class heartbeat_txn_range_argsTupleSchemeFactory implements SchemeFactory { - public heartbeat_txn_range_argsTupleScheme getScheme() { - return new heartbeat_txn_range_argsTupleScheme(); - } - } - - private static class heartbeat_txn_range_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetTxns()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetTxns()) { - struct.txns.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.txns = new HeartbeatTxnRangeRequest(); - struct.txns.read(iprot); - struct.setTxnsIsSet(true); - } - } - } - - } - - public static class heartbeat_txn_range_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_txn_range_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new heartbeat_txn_range_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new heartbeat_txn_range_resultTupleSchemeFactory()); - } - - private HeartbeatTxnRangeResponse success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatTxnRangeResponse.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_txn_range_result.class, metaDataMap); - } - - public heartbeat_txn_range_result() { - } - - public heartbeat_txn_range_result( - HeartbeatTxnRangeResponse success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public heartbeat_txn_range_result(heartbeat_txn_range_result other) { - if (other.isSetSuccess()) { - this.success = new HeartbeatTxnRangeResponse(other.success); - } - } - - public heartbeat_txn_range_result deepCopy() { - return new heartbeat_txn_range_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public HeartbeatTxnRangeResponse getSuccess() { - return this.success; - } - - public void setSuccess(HeartbeatTxnRangeResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((HeartbeatTxnRangeResponse)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof heartbeat_txn_range_result) - return this.equals((heartbeat_txn_range_result)that); - return false; - } - - public boolean equals(heartbeat_txn_range_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(heartbeat_txn_range_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("heartbeat_txn_range_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 heartbeat_txn_range_resultStandardSchemeFactory implements SchemeFactory { - public heartbeat_txn_range_resultStandardScheme getScheme() { - return new heartbeat_txn_range_resultStandardScheme(); - } - } - - private static class heartbeat_txn_range_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range_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 HeartbeatTxnRangeResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(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, heartbeat_txn_range_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class heartbeat_txn_range_resultTupleSchemeFactory implements SchemeFactory { - public heartbeat_txn_range_resultTupleScheme getScheme() { - return new heartbeat_txn_range_resultTupleScheme(); - } - } - - private static class heartbeat_txn_range_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new HeartbeatTxnRangeResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new compact_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new compact_argsTupleSchemeFactory()); - } - - private CompactionRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_args.class, metaDataMap); - } - - public compact_args() { - } - - public compact_args( - CompactionRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public compact_args(compact_args other) { - if (other.isSetRqst()) { - this.rqst = new CompactionRequest(other.rqst); - } - } - - public compact_args deepCopy() { - return new compact_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public CompactionRequest getRqst() { - return this.rqst; - } - - public void setRqst(CompactionRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((CompactionRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof compact_args) - return this.equals((compact_args)that); - return false; - } - - public boolean equals(compact_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(compact_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("compact_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 compact_argsStandardSchemeFactory implements SchemeFactory { - public compact_argsStandardScheme getScheme() { - return new compact_argsStandardScheme(); - } - } - - private static class compact_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, compact_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new CompactionRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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, compact_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class compact_argsTupleSchemeFactory implements SchemeFactory { - public compact_argsTupleScheme getScheme() { - return new compact_argsTupleScheme(); - } - } - - private static class compact_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new CompactionRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_result"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new compact_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new compact_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 { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_result.class, metaDataMap); - } - - public compact_result() { - } - - /** - * Performs a deep copy on other. - */ - public compact_result(compact_result other) { - } - - public compact_result deepCopy() { - return new compact_result(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof compact_result) - return this.equals((compact_result)that); - return false; - } - - public boolean equals(compact_result that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(compact_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("compact_result("); - boolean first = true; - - 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 compact_resultStandardSchemeFactory implements SchemeFactory { - public compact_resultStandardScheme getScheme() { - return new compact_resultStandardScheme(); - } - } - - private static class compact_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, compact_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, compact_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class compact_resultTupleSchemeFactory implements SchemeFactory { - public compact_resultTupleScheme getScheme() { - return new compact_resultTupleScheme(); - } - } - - private static class compact_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class compact2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact2_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new compact2_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new compact2_argsTupleSchemeFactory()); - } - - private CompactionRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact2_args.class, metaDataMap); - } - - public compact2_args() { - } - - public compact2_args( - CompactionRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public compact2_args(compact2_args other) { - if (other.isSetRqst()) { - this.rqst = new CompactionRequest(other.rqst); - } - } - - public compact2_args deepCopy() { - return new compact2_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public CompactionRequest getRqst() { - return this.rqst; - } - - public void setRqst(CompactionRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((CompactionRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof compact2_args) - return this.equals((compact2_args)that); - return false; - } - - public boolean equals(compact2_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(compact2_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("compact2_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 compact2_argsStandardSchemeFactory implements SchemeFactory { - public compact2_argsStandardScheme getScheme() { - return new compact2_argsStandardScheme(); - } - } - - private static class compact2_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new CompactionRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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, compact2_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class compact2_argsTupleSchemeFactory implements SchemeFactory { - public compact2_argsTupleScheme getScheme() { - return new compact2_argsTupleScheme(); - } - } - - private static class compact2_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, compact2_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, compact2_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new CompactionRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class compact2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact2_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new compact2_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new compact2_resultTupleSchemeFactory()); - } - - private CompactionResponse success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionResponse.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact2_result.class, metaDataMap); - } - - public compact2_result() { - } - - public compact2_result( - CompactionResponse success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public compact2_result(compact2_result other) { - if (other.isSetSuccess()) { - this.success = new CompactionResponse(other.success); - } - } - - public compact2_result deepCopy() { - return new compact2_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public CompactionResponse getSuccess() { - return this.success; - } - - public void setSuccess(CompactionResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((CompactionResponse)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof compact2_result) - return this.equals((compact2_result)that); - return false; - } - - public boolean equals(compact2_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(compact2_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("compact2_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 compact2_resultStandardSchemeFactory implements SchemeFactory { - public compact2_resultStandardScheme getScheme() { - return new compact2_resultStandardScheme(); - } - } - - private static class compact2_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_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 CompactionResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(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, compact2_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class compact2_resultTupleSchemeFactory implements SchemeFactory { - public compact2_resultTupleScheme getScheme() { - return new compact2_resultTupleScheme(); - } - } - - private static class compact2_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, compact2_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, compact2_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new CompactionResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class show_compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_compact_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new show_compact_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new show_compact_argsTupleSchemeFactory()); - } - - private ShowCompactRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowCompactRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_compact_args.class, metaDataMap); - } - - public show_compact_args() { - } - - public show_compact_args( - ShowCompactRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public show_compact_args(show_compact_args other) { - if (other.isSetRqst()) { - this.rqst = new ShowCompactRequest(other.rqst); - } - } - - public show_compact_args deepCopy() { - return new show_compact_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public ShowCompactRequest getRqst() { - return this.rqst; - } - - public void setRqst(ShowCompactRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((ShowCompactRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof show_compact_args) - return this.equals((show_compact_args)that); - return false; - } - - public boolean equals(show_compact_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(show_compact_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("show_compact_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 show_compact_argsStandardSchemeFactory implements SchemeFactory { - public show_compact_argsStandardScheme getScheme() { - return new show_compact_argsStandardScheme(); - } - } - - private static class show_compact_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new ShowCompactRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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, show_compact_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class show_compact_argsTupleSchemeFactory implements SchemeFactory { - public show_compact_argsTupleScheme getScheme() { - return new show_compact_argsTupleScheme(); - } - } - - private static class show_compact_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, show_compact_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, show_compact_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new ShowCompactRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class show_compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_compact_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new show_compact_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new show_compact_resultTupleSchemeFactory()); - } - - private ShowCompactResponse success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowCompactResponse.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_compact_result.class, metaDataMap); - } - - public show_compact_result() { - } - - public show_compact_result( - ShowCompactResponse success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public show_compact_result(show_compact_result other) { - if (other.isSetSuccess()) { - this.success = new ShowCompactResponse(other.success); - } - } - - public show_compact_result deepCopy() { - return new show_compact_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public ShowCompactResponse getSuccess() { - return this.success; - } - - public void setSuccess(ShowCompactResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((ShowCompactResponse)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof show_compact_result) - return this.equals((show_compact_result)that); - return false; - } - - public boolean equals(show_compact_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(show_compact_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("show_compact_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 show_compact_resultStandardSchemeFactory implements SchemeFactory { - public show_compact_resultStandardScheme getScheme() { - return new show_compact_resultStandardScheme(); - } - } - - private static class show_compact_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_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 ShowCompactResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(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, show_compact_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class show_compact_resultTupleSchemeFactory implements SchemeFactory { - public show_compact_resultTupleScheme getScheme() { - return new show_compact_resultTupleScheme(); - } - } - - private static class show_compact_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, show_compact_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, show_compact_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new ShowCompactResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class add_dynamic_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_dynamic_partitions_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new add_dynamic_partitions_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_dynamic_partitions_argsTupleSchemeFactory()); - } - - private AddDynamicPartitions rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddDynamicPartitions.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_dynamic_partitions_args.class, metaDataMap); - } - - public add_dynamic_partitions_args() { - } - - public add_dynamic_partitions_args( - AddDynamicPartitions rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public add_dynamic_partitions_args(add_dynamic_partitions_args other) { - if (other.isSetRqst()) { - this.rqst = new AddDynamicPartitions(other.rqst); - } - } - - public add_dynamic_partitions_args deepCopy() { - return new add_dynamic_partitions_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public AddDynamicPartitions getRqst() { - return this.rqst; - } - - public void setRqst(AddDynamicPartitions rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((AddDynamicPartitions)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_dynamic_partitions_args) - return this.equals((add_dynamic_partitions_args)that); - return false; - } - - public boolean equals(add_dynamic_partitions_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(add_dynamic_partitions_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_dynamic_partitions_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 add_dynamic_partitions_argsStandardSchemeFactory implements SchemeFactory { - public add_dynamic_partitions_argsStandardScheme getScheme() { - return new add_dynamic_partitions_argsStandardScheme(); - } - } - - private static class add_dynamic_partitions_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new AddDynamicPartitions(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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_dynamic_partitions_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class add_dynamic_partitions_argsTupleSchemeFactory implements SchemeFactory { - public add_dynamic_partitions_argsTupleScheme getScheme() { - return new add_dynamic_partitions_argsTupleScheme(); - } - } - - private static class add_dynamic_partitions_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new AddDynamicPartitions(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class add_dynamic_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_dynamic_partitions_result"); - - 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 add_dynamic_partitions_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new add_dynamic_partitions_resultTupleSchemeFactory()); - } - - private NoSuchTxnException o1; // required - private TxnAbortedException o2; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_dynamic_partitions_result.class, metaDataMap); - } - - public add_dynamic_partitions_result() { - } - - public add_dynamic_partitions_result( - NoSuchTxnException o1, - TxnAbortedException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; - } - - /** - * Performs a deep copy on other. - */ - public add_dynamic_partitions_result(add_dynamic_partitions_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchTxnException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new TxnAbortedException(other.o2); - } - } - - public add_dynamic_partitions_result deepCopy() { - return new add_dynamic_partitions_result(this); - } - - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - } - - public NoSuchTxnException getO1() { - return this.o1; - } - - public void setO1(NoSuchTxnException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public TxnAbortedException getO2() { - return this.o2; - } - - public void setO2(TxnAbortedException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchTxnException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((TxnAbortedException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof add_dynamic_partitions_result) - return this.equals((add_dynamic_partitions_result)that); - return false; - } - - public boolean equals(add_dynamic_partitions_result that) { - if (that == null) - return false; - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - boolean present_o2 = true && (isSetO2()); - list.add(present_o2); - if (present_o2) - list.add(o2); - - return list.hashCode(); - } - - @Override - public int compareTo(add_dynamic_partitions_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("add_dynamic_partitions_result("); - boolean first = true; - - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - 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 add_dynamic_partitions_resultStandardSchemeFactory implements SchemeFactory { - public add_dynamic_partitions_resultStandardScheme getScheme() { - return new add_dynamic_partitions_resultStandardScheme(); - } - } - - private static class add_dynamic_partitions_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_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 NoSuchTxnException(); - 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 TxnAbortedException(); - 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, add_dynamic_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 add_dynamic_partitions_resultTupleSchemeFactory implements SchemeFactory { - public add_dynamic_partitions_resultTupleScheme getScheme() { - return new add_dynamic_partitions_resultTupleScheme(); - } - } - - private static class add_dynamic_partitions_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, add_dynamic_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, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.o1 = new NoSuchTxnException(); - struct.o1.read(iprot); - struct.setO1IsSet(true); - } - if (incoming.get(1)) { - struct.o2 = new TxnAbortedException(); - struct.o2.read(iprot); - struct.setO2IsSet(true); - } - } - } - - } - - public static class get_next_notification_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_next_notification_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_next_notification_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_next_notification_argsTupleSchemeFactory()); - } - - private NotificationEventRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NotificationEventRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_next_notification_args.class, metaDataMap); - } - - public get_next_notification_args() { - } - - public get_next_notification_args( - NotificationEventRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public get_next_notification_args(get_next_notification_args other) { - if (other.isSetRqst()) { - this.rqst = new NotificationEventRequest(other.rqst); - } - } - - public get_next_notification_args deepCopy() { - return new get_next_notification_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public NotificationEventRequest getRqst() { - return this.rqst; - } - - public void setRqst(NotificationEventRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((NotificationEventRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_next_notification_args) - return this.equals((get_next_notification_args)that); - return false; - } - - public boolean equals(get_next_notification_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(get_next_notification_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_next_notification_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 get_next_notification_argsStandardSchemeFactory implements SchemeFactory { - public get_next_notification_argsStandardScheme getScheme() { - return new get_next_notification_argsStandardScheme(); - } - } - - private static class get_next_notification_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_next_notification_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new NotificationEventRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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_next_notification_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_next_notification_argsTupleSchemeFactory implements SchemeFactory { - public get_next_notification_argsTupleScheme getScheme() { - return new get_next_notification_argsTupleScheme(); - } - } - - private static class get_next_notification_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_next_notification_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_next_notification_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new NotificationEventRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class get_next_notification_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_next_notification_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_next_notification_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_next_notification_resultTupleSchemeFactory()); - } - - private NotificationEventResponse success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NotificationEventResponse.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_next_notification_result.class, metaDataMap); - } - - public get_next_notification_result() { - } - - public get_next_notification_result( - NotificationEventResponse success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public get_next_notification_result(get_next_notification_result other) { - if (other.isSetSuccess()) { - this.success = new NotificationEventResponse(other.success); - } - } - - public get_next_notification_result deepCopy() { - return new get_next_notification_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public NotificationEventResponse getSuccess() { - return this.success; - } - - public void setSuccess(NotificationEventResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((NotificationEventResponse)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_next_notification_result) - return this.equals((get_next_notification_result)that); - return false; - } - - public boolean equals(get_next_notification_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(get_next_notification_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_next_notification_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_next_notification_resultStandardSchemeFactory implements SchemeFactory { - public get_next_notification_resultStandardScheme getScheme() { - return new get_next_notification_resultStandardScheme(); - } - } - - private static class get_next_notification_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_next_notification_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 NotificationEventResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(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_next_notification_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_next_notification_resultTupleSchemeFactory implements SchemeFactory { - public get_next_notification_resultTupleScheme getScheme() { - return new get_next_notification_resultTupleScheme(); - } - } - - private static class get_next_notification_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_next_notification_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_next_notification_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new NotificationEventResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class get_current_notificationEventId_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_current_notificationEventId_args"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_current_notificationEventId_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_current_notificationEventId_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 { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_current_notificationEventId_args.class, metaDataMap); - } - - public get_current_notificationEventId_args() { - } - - /** - * Performs a deep copy on other. - */ - public get_current_notificationEventId_args(get_current_notificationEventId_args other) { - } - - public get_current_notificationEventId_args deepCopy() { - return new get_current_notificationEventId_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_current_notificationEventId_args) - return this.equals((get_current_notificationEventId_args)that); - return false; - } - - public boolean equals(get_current_notificationEventId_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(get_current_notificationEventId_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_current_notificationEventId_args("); - boolean first = true; - - 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 get_current_notificationEventId_argsStandardSchemeFactory implements SchemeFactory { - public get_current_notificationEventId_argsStandardScheme getScheme() { - return new get_current_notificationEventId_argsStandardScheme(); - } - } - - private static class get_current_notificationEventId_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_current_notificationEventId_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_current_notificationEventId_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_current_notificationEventId_argsTupleSchemeFactory implements SchemeFactory { - public get_current_notificationEventId_argsTupleScheme getScheme() { - return new get_current_notificationEventId_argsTupleScheme(); - } - } - - private static class get_current_notificationEventId_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_current_notificationEventId_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_current_notificationEventId_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class get_current_notificationEventId_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_current_notificationEventId_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_current_notificationEventId_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_current_notificationEventId_resultTupleSchemeFactory()); - } - - private CurrentNotificationEventId success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CurrentNotificationEventId.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_current_notificationEventId_result.class, metaDataMap); - } - - public get_current_notificationEventId_result() { - } - - public get_current_notificationEventId_result( - CurrentNotificationEventId success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public get_current_notificationEventId_result(get_current_notificationEventId_result other) { - if (other.isSetSuccess()) { - this.success = new CurrentNotificationEventId(other.success); - } - } - - public get_current_notificationEventId_result deepCopy() { - return new get_current_notificationEventId_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public CurrentNotificationEventId getSuccess() { - return this.success; - } - - public void setSuccess(CurrentNotificationEventId success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((CurrentNotificationEventId)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_current_notificationEventId_result) - return this.equals((get_current_notificationEventId_result)that); - return false; - } - - public boolean equals(get_current_notificationEventId_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(get_current_notificationEventId_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_current_notificationEventId_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_current_notificationEventId_resultStandardSchemeFactory implements SchemeFactory { - public get_current_notificationEventId_resultStandardScheme getScheme() { - return new get_current_notificationEventId_resultStandardScheme(); - } - } - - private static class get_current_notificationEventId_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_current_notificationEventId_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 CurrentNotificationEventId(); - struct.success.read(iprot); - struct.setSuccessIsSet(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_current_notificationEventId_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_current_notificationEventId_resultTupleSchemeFactory implements SchemeFactory { - public get_current_notificationEventId_resultTupleScheme getScheme() { - return new get_current_notificationEventId_resultTupleScheme(); - } - } - - private static class get_current_notificationEventId_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_current_notificationEventId_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_current_notificationEventId_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new CurrentNotificationEventId(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class fire_listener_event_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fire_listener_event_args"); - - private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new fire_listener_event_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new fire_listener_event_argsTupleSchemeFactory()); - } - - private FireEventRequest rqst; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - RQST((short)1, "rqst"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // RQST - return RQST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FireEventRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fire_listener_event_args.class, metaDataMap); - } - - public fire_listener_event_args() { - } - - public fire_listener_event_args( - FireEventRequest rqst) - { - this(); - this.rqst = rqst; - } - - /** - * Performs a deep copy on other. - */ - public fire_listener_event_args(fire_listener_event_args other) { - if (other.isSetRqst()) { - this.rqst = new FireEventRequest(other.rqst); - } - } - - public fire_listener_event_args deepCopy() { - return new fire_listener_event_args(this); - } - - @Override - public void clear() { - this.rqst = null; - } - - public FireEventRequest getRqst() { - return this.rqst; - } - - public void setRqst(FireEventRequest rqst) { - this.rqst = rqst; - } - - public void unsetRqst() { - this.rqst = null; - } - - /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ - public boolean isSetRqst() { - return this.rqst != null; - } - - public void setRqstIsSet(boolean value) { - if (!value) { - this.rqst = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RQST: - if (value == null) { - unsetRqst(); - } else { - setRqst((FireEventRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RQST: - return getRqst(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case RQST: - return isSetRqst(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof fire_listener_event_args) - return this.equals((fire_listener_event_args)that); - return false; - } - - public boolean equals(fire_listener_event_args that) { - if (that == null) - return false; - - boolean this_present_rqst = true && this.isSetRqst(); - boolean that_present_rqst = true && that.isSetRqst(); - if (this_present_rqst || that_present_rqst) { - if (!(this_present_rqst && that_present_rqst)) - return false; - if (!this.rqst.equals(that.rqst)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_rqst = true && (isSetRqst()); - list.add(present_rqst); - if (present_rqst) - list.add(rqst); - - return list.hashCode(); - } - - @Override - public int compareTo(fire_listener_event_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRqst()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("fire_listener_event_args("); - boolean first = true; - - sb.append("rqst:"); - if (this.rqst == null) { - sb.append("null"); - } else { - sb.append(this.rqst); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (rqst != null) { - rqst.validate(); - } - } - - 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 fire_listener_event_argsStandardSchemeFactory implements SchemeFactory { - public fire_listener_event_argsStandardScheme getScheme() { - return new fire_listener_event_argsStandardScheme(); - } - } - - private static class fire_listener_event_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, fire_listener_event_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: // RQST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.rqst = new FireEventRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(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, fire_listener_event_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.rqst != null) { - oprot.writeFieldBegin(RQST_FIELD_DESC); - struct.rqst.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class fire_listener_event_argsTupleSchemeFactory implements SchemeFactory { - public fire_listener_event_argsTupleScheme getScheme() { - return new fire_listener_event_argsTupleScheme(); - } - } - - private static class fire_listener_event_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, fire_listener_event_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRqst()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRqst()) { - struct.rqst.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, fire_listener_event_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.rqst = new FireEventRequest(); - struct.rqst.read(iprot); - struct.setRqstIsSet(true); - } - } - } - - } - - public static class fire_listener_event_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fire_listener_event_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new fire_listener_event_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new fire_listener_event_resultTupleSchemeFactory()); - } - - private FireEventResponse success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FireEventResponse.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fire_listener_event_result.class, metaDataMap); - } - - public fire_listener_event_result() { - } - - public fire_listener_event_result( - FireEventResponse success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public fire_listener_event_result(fire_listener_event_result other) { - if (other.isSetSuccess()) { - this.success = new FireEventResponse(other.success); - } - } - - public fire_listener_event_result deepCopy() { - return new fire_listener_event_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public FireEventResponse getSuccess() { - return this.success; - } - - public void setSuccess(FireEventResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((FireEventResponse)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof fire_listener_event_result) - return this.equals((fire_listener_event_result)that); - return false; - } - - public boolean equals(fire_listener_event_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(fire_listener_event_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("fire_listener_event_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 fire_listener_event_resultStandardSchemeFactory implements SchemeFactory { - public fire_listener_event_resultStandardScheme getScheme() { - return new fire_listener_event_resultStandardScheme(); - } - } - - private static class fire_listener_event_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, fire_listener_event_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 FireEventResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(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, fire_listener_event_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class fire_listener_event_resultTupleSchemeFactory implements SchemeFactory { - public fire_listener_event_resultTupleScheme getScheme() { - return new fire_listener_event_resultTupleScheme(); - } - } - - private static class fire_listener_event_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, fire_listener_event_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, fire_listener_event_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new FireEventResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class flushCache_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("flushCache_args"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new flushCache_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new flushCache_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 { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flushCache_args.class, metaDataMap); - } - - public flushCache_args() { - } - - /** - * Performs a deep copy on other. - */ - public flushCache_args(flushCache_args other) { - } - - public flushCache_args deepCopy() { - return new flushCache_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof flushCache_args) - return this.equals((flushCache_args)that); - return false; - } - - public boolean equals(flushCache_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(flushCache_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("flushCache_args("); - boolean first = true; - - 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 flushCache_argsStandardSchemeFactory implements SchemeFactory { - public flushCache_argsStandardScheme getScheme() { - return new flushCache_argsStandardScheme(); - } - } - - private static class flushCache_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, flushCache_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, flushCache_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class flushCache_argsTupleSchemeFactory implements SchemeFactory { - public flushCache_argsTupleScheme getScheme() { - return new flushCache_argsTupleScheme(); - } - } - - private static class flushCache_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, flushCache_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, flushCache_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class flushCache_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("flushCache_result"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new flushCache_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new flushCache_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 { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flushCache_result.class, metaDataMap); - } - - public flushCache_result() { - } - - /** - * Performs a deep copy on other. - */ - public flushCache_result(flushCache_result other) { - } - - public flushCache_result deepCopy() { - return new flushCache_result(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof flushCache_result) - return this.equals((flushCache_result)that); - return false; - } - - public boolean equals(flushCache_result that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(flushCache_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("flushCache_result("); - boolean first = true; - - 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 flushCache_resultStandardSchemeFactory implements SchemeFactory { - public flushCache_resultStandardScheme getScheme() { - return new flushCache_resultStandardScheme(); - } - } - - private static class flushCache_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, flushCache_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, flushCache_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class flushCache_resultTupleSchemeFactory implements SchemeFactory { - public flushCache_resultTupleScheme getScheme() { - return new flushCache_resultTupleScheme(); - } - } - - private static class flushCache_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, flushCache_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, flushCache_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class cm_recycle_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cm_recycle_args"); - - private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new cm_recycle_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new cm_recycle_argsTupleSchemeFactory()); - } - - private CmRecycleRequest request; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQUEST((short)1, "request"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQUEST - return REQUEST; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CmRecycleRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cm_recycle_args.class, metaDataMap); - } - - public cm_recycle_args() { - } - - public cm_recycle_args( - CmRecycleRequest request) - { - this(); - this.request = request; - } - - /** - * Performs a deep copy on other. - */ - public cm_recycle_args(cm_recycle_args other) { - if (other.isSetRequest()) { - this.request = new CmRecycleRequest(other.request); - } - } - - public cm_recycle_args deepCopy() { - return new cm_recycle_args(this); - } - - @Override - public void clear() { - this.request = null; - } - - public CmRecycleRequest getRequest() { - return this.request; - } - - public void setRequest(CmRecycleRequest request) { - this.request = request; - } - - public void unsetRequest() { - this.request = null; - } - - /** Returns true if field request is set (has been assigned a value) and false otherwise */ - public boolean isSetRequest() { - return this.request != null; - } - - public void setRequestIsSet(boolean value) { - if (!value) { - this.request = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQUEST: - if (value == null) { - unsetRequest(); - } else { - setRequest((CmRecycleRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQUEST: - return getRequest(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQUEST: - return isSetRequest(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof cm_recycle_args) - return this.equals((cm_recycle_args)that); - return false; - } - - public boolean equals(cm_recycle_args that) { - if (that == null) - return false; - - boolean this_present_request = true && this.isSetRequest(); - boolean that_present_request = true && that.isSetRequest(); - if (this_present_request || that_present_request) { - if (!(this_present_request && that_present_request)) - return false; - if (!this.request.equals(that.request)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_request = true && (isSetRequest()); - list.add(present_request); - if (present_request) - list.add(request); - - return list.hashCode(); - } - - @Override - public int compareTo(cm_recycle_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRequest()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("cm_recycle_args("); - boolean first = true; - - sb.append("request:"); - if (this.request == null) { - sb.append("null"); - } else { - sb.append(this.request); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (request != null) { - request.validate(); - } - } - - 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 cm_recycle_argsStandardSchemeFactory implements SchemeFactory { - public cm_recycle_argsStandardScheme getScheme() { - return new cm_recycle_argsStandardScheme(); - } - } - - private static class cm_recycle_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, cm_recycle_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: // REQUEST - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.request = new CmRecycleRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(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, cm_recycle_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.request != null) { - oprot.writeFieldBegin(REQUEST_FIELD_DESC); - struct.request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class cm_recycle_argsTupleSchemeFactory implements SchemeFactory { - public cm_recycle_argsTupleScheme getScheme() { - return new cm_recycle_argsTupleScheme(); - } - } - - private static class cm_recycle_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, cm_recycle_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetRequest()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetRequest()) { - struct.request.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, cm_recycle_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.request = new CmRecycleRequest(); - struct.request.read(iprot); - struct.setRequestIsSet(true); - } - } - } - - } - - public static class cm_recycle_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cm_recycle_result"); - - 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 cm_recycle_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new cm_recycle_resultTupleSchemeFactory()); - } - - private CmRecycleResponse success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CmRecycleResponse.class))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cm_recycle_result.class, metaDataMap); - } - - public cm_recycle_result() { - } - - public cm_recycle_result( - CmRecycleResponse success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public cm_recycle_result(cm_recycle_result other) { - if (other.isSetSuccess()) { - this.success = new CmRecycleResponse(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public cm_recycle_result deepCopy() { - return new cm_recycle_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public CmRecycleResponse getSuccess() { - return this.success; - } - - public void setSuccess(CmRecycleResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((CmRecycleResponse)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof cm_recycle_result) - return this.equals((cm_recycle_result)that); - return false; - } - - public boolean equals(cm_recycle_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(cm_recycle_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("cm_recycle_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 cm_recycle_resultStandardSchemeFactory implements SchemeFactory { - public cm_recycle_resultStandardScheme getScheme() { - return new cm_recycle_resultStandardScheme(); - } - } - - private static class cm_recycle_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, cm_recycle_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 CmRecycleResponse(); - 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, cm_recycle_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 cm_recycle_resultTupleSchemeFactory implements SchemeFactory { - public cm_recycle_resultTupleScheme getScheme() { - return new cm_recycle_resultTupleScheme(); - } - } - - private static class cm_recycle_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, cm_recycle_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, cm_recycle_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new CmRecycleResponse(); - 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 get_file_metadata_by_expr_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_file_metadata_by_expr_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_file_metadata_by_expr_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_file_metadata_by_expr_argsTupleSchemeFactory()); - } - - private GetFileMetadataByExprRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetFileMetadataByExprRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_file_metadata_by_expr_args.class, metaDataMap); - } - - public get_file_metadata_by_expr_args() { - } - - public get_file_metadata_by_expr_args( - GetFileMetadataByExprRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public get_file_metadata_by_expr_args(get_file_metadata_by_expr_args other) { - if (other.isSetReq()) { - this.req = new GetFileMetadataByExprRequest(other.req); - } - } - - public get_file_metadata_by_expr_args deepCopy() { - return new get_file_metadata_by_expr_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public GetFileMetadataByExprRequest getReq() { - return this.req; - } - - public void setReq(GetFileMetadataByExprRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((GetFileMetadataByExprRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_file_metadata_by_expr_args) - return this.equals((get_file_metadata_by_expr_args)that); - return false; - } - - public boolean equals(get_file_metadata_by_expr_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(get_file_metadata_by_expr_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_file_metadata_by_expr_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 get_file_metadata_by_expr_argsStandardSchemeFactory implements SchemeFactory { - public get_file_metadata_by_expr_argsStandardScheme getScheme() { - return new get_file_metadata_by_expr_argsStandardScheme(); - } - } - - private static class get_file_metadata_by_expr_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_file_metadata_by_expr_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new GetFileMetadataByExprRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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_file_metadata_by_expr_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_file_metadata_by_expr_argsTupleSchemeFactory implements SchemeFactory { - public get_file_metadata_by_expr_argsTupleScheme getScheme() { - return new get_file_metadata_by_expr_argsTupleScheme(); - } - } - - private static class get_file_metadata_by_expr_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_by_expr_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_by_expr_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new GetFileMetadataByExprRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class get_file_metadata_by_expr_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_file_metadata_by_expr_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_file_metadata_by_expr_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_file_metadata_by_expr_resultTupleSchemeFactory()); - } - - private GetFileMetadataByExprResult success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetFileMetadataByExprResult.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_file_metadata_by_expr_result.class, metaDataMap); - } - - public get_file_metadata_by_expr_result() { - } - - public get_file_metadata_by_expr_result( - GetFileMetadataByExprResult success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public get_file_metadata_by_expr_result(get_file_metadata_by_expr_result other) { - if (other.isSetSuccess()) { - this.success = new GetFileMetadataByExprResult(other.success); - } - } - - public get_file_metadata_by_expr_result deepCopy() { - return new get_file_metadata_by_expr_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public GetFileMetadataByExprResult getSuccess() { - return this.success; - } - - public void setSuccess(GetFileMetadataByExprResult success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((GetFileMetadataByExprResult)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_file_metadata_by_expr_result) - return this.equals((get_file_metadata_by_expr_result)that); - return false; - } - - public boolean equals(get_file_metadata_by_expr_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(get_file_metadata_by_expr_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_file_metadata_by_expr_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_file_metadata_by_expr_resultStandardSchemeFactory implements SchemeFactory { - public get_file_metadata_by_expr_resultStandardScheme getScheme() { - return new get_file_metadata_by_expr_resultStandardScheme(); - } - } - - private static class get_file_metadata_by_expr_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_file_metadata_by_expr_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 GetFileMetadataByExprResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(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_file_metadata_by_expr_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_file_metadata_by_expr_resultTupleSchemeFactory implements SchemeFactory { - public get_file_metadata_by_expr_resultTupleScheme getScheme() { - return new get_file_metadata_by_expr_resultTupleScheme(); - } - } - - private static class get_file_metadata_by_expr_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_by_expr_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_by_expr_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new GetFileMetadataByExprResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class get_file_metadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_file_metadata_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_file_metadata_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_file_metadata_argsTupleSchemeFactory()); - } - - private GetFileMetadataRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetFileMetadataRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_file_metadata_args.class, metaDataMap); - } - - public get_file_metadata_args() { - } - - public get_file_metadata_args( - GetFileMetadataRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public get_file_metadata_args(get_file_metadata_args other) { - if (other.isSetReq()) { - this.req = new GetFileMetadataRequest(other.req); - } - } - - public get_file_metadata_args deepCopy() { - return new get_file_metadata_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public GetFileMetadataRequest getReq() { - return this.req; - } - - public void setReq(GetFileMetadataRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((GetFileMetadataRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_file_metadata_args) - return this.equals((get_file_metadata_args)that); - return false; - } - - public boolean equals(get_file_metadata_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(get_file_metadata_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_file_metadata_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 get_file_metadata_argsStandardSchemeFactory implements SchemeFactory { - public get_file_metadata_argsStandardScheme getScheme() { - return new get_file_metadata_argsStandardScheme(); - } - } - - private static class get_file_metadata_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_file_metadata_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new GetFileMetadataRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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_file_metadata_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_file_metadata_argsTupleSchemeFactory implements SchemeFactory { - public get_file_metadata_argsTupleScheme getScheme() { - return new get_file_metadata_argsTupleScheme(); - } - } - - private static class get_file_metadata_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new GetFileMetadataRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class get_file_metadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_file_metadata_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_file_metadata_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_file_metadata_resultTupleSchemeFactory()); - } - - private GetFileMetadataResult success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetFileMetadataResult.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_file_metadata_result.class, metaDataMap); - } - - public get_file_metadata_result() { - } - - public get_file_metadata_result( - GetFileMetadataResult success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public get_file_metadata_result(get_file_metadata_result other) { - if (other.isSetSuccess()) { - this.success = new GetFileMetadataResult(other.success); - } - } - - public get_file_metadata_result deepCopy() { - return new get_file_metadata_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public GetFileMetadataResult getSuccess() { - return this.success; - } - - public void setSuccess(GetFileMetadataResult success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((GetFileMetadataResult)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_file_metadata_result) - return this.equals((get_file_metadata_result)that); - return false; - } - - public boolean equals(get_file_metadata_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(get_file_metadata_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_file_metadata_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 get_file_metadata_resultStandardSchemeFactory implements SchemeFactory { - public get_file_metadata_resultStandardScheme getScheme() { - return new get_file_metadata_resultStandardScheme(); - } - } - - private static class get_file_metadata_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_file_metadata_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 GetFileMetadataResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(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_file_metadata_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_file_metadata_resultTupleSchemeFactory implements SchemeFactory { - public get_file_metadata_resultTupleScheme getScheme() { - return new get_file_metadata_resultTupleScheme(); - } - } - - private static class get_file_metadata_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new GetFileMetadataResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class put_file_metadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_file_metadata_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new put_file_metadata_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new put_file_metadata_argsTupleSchemeFactory()); - } - - private PutFileMetadataRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PutFileMetadataRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_file_metadata_args.class, metaDataMap); - } - - public put_file_metadata_args() { - } - - public put_file_metadata_args( - PutFileMetadataRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public put_file_metadata_args(put_file_metadata_args other) { - if (other.isSetReq()) { - this.req = new PutFileMetadataRequest(other.req); - } - } - - public put_file_metadata_args deepCopy() { - return new put_file_metadata_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public PutFileMetadataRequest getReq() { - return this.req; - } - - public void setReq(PutFileMetadataRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((PutFileMetadataRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof put_file_metadata_args) - return this.equals((put_file_metadata_args)that); - return false; - } - - public boolean equals(put_file_metadata_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(put_file_metadata_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("put_file_metadata_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 put_file_metadata_argsStandardSchemeFactory implements SchemeFactory { - public put_file_metadata_argsStandardScheme getScheme() { - return new put_file_metadata_argsStandardScheme(); - } - } - - private static class put_file_metadata_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, put_file_metadata_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new PutFileMetadataRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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, put_file_metadata_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class put_file_metadata_argsTupleSchemeFactory implements SchemeFactory { - public put_file_metadata_argsTupleScheme getScheme() { - return new put_file_metadata_argsTupleScheme(); - } - } - - private static class put_file_metadata_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, put_file_metadata_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, put_file_metadata_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new PutFileMetadataRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class put_file_metadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_file_metadata_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new put_file_metadata_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new put_file_metadata_resultTupleSchemeFactory()); - } - - private PutFileMetadataResult success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PutFileMetadataResult.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_file_metadata_result.class, metaDataMap); - } - - public put_file_metadata_result() { - } - - public put_file_metadata_result( - PutFileMetadataResult success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public put_file_metadata_result(put_file_metadata_result other) { - if (other.isSetSuccess()) { - this.success = new PutFileMetadataResult(other.success); - } - } - - public put_file_metadata_result deepCopy() { - return new put_file_metadata_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public PutFileMetadataResult getSuccess() { - return this.success; - } - - public void setSuccess(PutFileMetadataResult success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((PutFileMetadataResult)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof put_file_metadata_result) - return this.equals((put_file_metadata_result)that); - return false; - } - - public boolean equals(put_file_metadata_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(put_file_metadata_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("put_file_metadata_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 put_file_metadata_resultStandardSchemeFactory implements SchemeFactory { - public put_file_metadata_resultStandardScheme getScheme() { - return new put_file_metadata_resultStandardScheme(); - } - } - - private static class put_file_metadata_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, put_file_metadata_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 PutFileMetadataResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(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, put_file_metadata_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class put_file_metadata_resultTupleSchemeFactory implements SchemeFactory { - public put_file_metadata_resultTupleScheme getScheme() { - return new put_file_metadata_resultTupleScheme(); - } - } - - private static class put_file_metadata_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, put_file_metadata_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, put_file_metadata_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new PutFileMetadataResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class clear_file_metadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clear_file_metadata_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new clear_file_metadata_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new clear_file_metadata_argsTupleSchemeFactory()); - } - - private ClearFileMetadataRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClearFileMetadataRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clear_file_metadata_args.class, metaDataMap); - } - - public clear_file_metadata_args() { - } - - public clear_file_metadata_args( - ClearFileMetadataRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public clear_file_metadata_args(clear_file_metadata_args other) { - if (other.isSetReq()) { - this.req = new ClearFileMetadataRequest(other.req); - } - } - - public clear_file_metadata_args deepCopy() { - return new clear_file_metadata_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public ClearFileMetadataRequest getReq() { - return this.req; - } - - public void setReq(ClearFileMetadataRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((ClearFileMetadataRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof clear_file_metadata_args) - return this.equals((clear_file_metadata_args)that); - return false; - } - - public boolean equals(clear_file_metadata_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(clear_file_metadata_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("clear_file_metadata_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 clear_file_metadata_argsStandardSchemeFactory implements SchemeFactory { - public clear_file_metadata_argsStandardScheme getScheme() { - return new clear_file_metadata_argsStandardScheme(); - } - } - - private static class clear_file_metadata_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, clear_file_metadata_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new ClearFileMetadataRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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, clear_file_metadata_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class clear_file_metadata_argsTupleSchemeFactory implements SchemeFactory { - public clear_file_metadata_argsTupleScheme getScheme() { - return new clear_file_metadata_argsTupleScheme(); - } - } - - private static class clear_file_metadata_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, clear_file_metadata_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, clear_file_metadata_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new ClearFileMetadataRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class clear_file_metadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clear_file_metadata_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new clear_file_metadata_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new clear_file_metadata_resultTupleSchemeFactory()); - } - - private ClearFileMetadataResult success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClearFileMetadataResult.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clear_file_metadata_result.class, metaDataMap); - } - - public clear_file_metadata_result() { - } - - public clear_file_metadata_result( - ClearFileMetadataResult success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public clear_file_metadata_result(clear_file_metadata_result other) { - if (other.isSetSuccess()) { - this.success = new ClearFileMetadataResult(other.success); - } - } - - public clear_file_metadata_result deepCopy() { - return new clear_file_metadata_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public ClearFileMetadataResult getSuccess() { - return this.success; - } - - public void setSuccess(ClearFileMetadataResult success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((ClearFileMetadataResult)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof clear_file_metadata_result) - return this.equals((clear_file_metadata_result)that); - return false; - } - - public boolean equals(clear_file_metadata_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(clear_file_metadata_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("clear_file_metadata_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 clear_file_metadata_resultStandardSchemeFactory implements SchemeFactory { - public clear_file_metadata_resultStandardScheme getScheme() { - return new clear_file_metadata_resultStandardScheme(); - } - } - - private static class clear_file_metadata_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, clear_file_metadata_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 ClearFileMetadataResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(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, clear_file_metadata_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class clear_file_metadata_resultTupleSchemeFactory implements SchemeFactory { - public clear_file_metadata_resultTupleScheme getScheme() { - return new clear_file_metadata_resultTupleScheme(); - } - } - - private static class clear_file_metadata_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, clear_file_metadata_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, clear_file_metadata_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new ClearFileMetadataResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class cache_file_metadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cache_file_metadata_args"); - - private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new cache_file_metadata_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new cache_file_metadata_argsTupleSchemeFactory()); - } - - private CacheFileMetadataRequest req; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - REQ((short)1, "req"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // REQ - return REQ; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CacheFileMetadataRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cache_file_metadata_args.class, metaDataMap); - } - - public cache_file_metadata_args() { - } - - public cache_file_metadata_args( - CacheFileMetadataRequest req) - { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public cache_file_metadata_args(cache_file_metadata_args other) { - if (other.isSetReq()) { - this.req = new CacheFileMetadataRequest(other.req); - } - } - - public cache_file_metadata_args deepCopy() { - return new cache_file_metadata_args(this); - } - - @Override - public void clear() { - this.req = null; - } - - public CacheFileMetadataRequest getReq() { - return this.req; - } - - public void setReq(CacheFileMetadataRequest req) { - this.req = req; - } - - public void unsetReq() { - this.req = null; - } - - /** Returns true if field req is set (has been assigned a value) and false otherwise */ - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean value) { - if (!value) { - this.req = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case REQ: - if (value == null) { - unsetReq(); - } else { - setReq((CacheFileMetadataRequest)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case REQ: - return getReq(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case REQ: - return isSetReq(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof cache_file_metadata_args) - return this.equals((cache_file_metadata_args)that); - return false; - } - - public boolean equals(cache_file_metadata_args that) { - if (that == null) - return false; - - boolean this_present_req = true && this.isSetReq(); - boolean that_present_req = true && that.isSetReq(); - if (this_present_req || that_present_req) { - if (!(this_present_req && that_present_req)) - return false; - if (!this.req.equals(that.req)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); - } - - @Override - public int compareTo(cache_file_metadata_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("cache_file_metadata_args("); - boolean first = true; - - sb.append("req:"); - if (this.req == null) { - sb.append("null"); - } else { - sb.append(this.req); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (req != null) { - req.validate(); - } - } - - 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 cache_file_metadata_argsStandardSchemeFactory implements SchemeFactory { - public cache_file_metadata_argsStandardScheme getScheme() { - return new cache_file_metadata_argsStandardScheme(); - } - } - - private static class cache_file_metadata_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, cache_file_metadata_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: // REQ - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new CacheFileMetadataRequest(); - struct.req.read(iprot); - struct.setReqIsSet(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, cache_file_metadata_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - struct.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class cache_file_metadata_argsTupleSchemeFactory implements SchemeFactory { - public cache_file_metadata_argsTupleScheme getScheme() { - return new cache_file_metadata_argsTupleScheme(); - } - } - - private static class cache_file_metadata_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, cache_file_metadata_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetReq()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetReq()) { - struct.req.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, cache_file_metadata_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.req = new CacheFileMetadataRequest(); - struct.req.read(iprot); - struct.setReqIsSet(true); - } - } - } - - } - - public static class cache_file_metadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cache_file_metadata_result"); - - 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new cache_file_metadata_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new cache_file_metadata_resultTupleSchemeFactory()); - } - - private CacheFileMetadataResult success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CacheFileMetadataResult.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cache_file_metadata_result.class, metaDataMap); - } - - public cache_file_metadata_result() { - } - - public cache_file_metadata_result( - CacheFileMetadataResult success) - { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public cache_file_metadata_result(cache_file_metadata_result other) { - if (other.isSetSuccess()) { - this.success = new CacheFileMetadataResult(other.success); - } - } - - public cache_file_metadata_result deepCopy() { - return new cache_file_metadata_result(this); - } - - @Override - public void clear() { - this.success = null; - } - - public CacheFileMetadataResult getSuccess() { - return this.success; - } - - public void setSuccess(CacheFileMetadataResult success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((CacheFileMetadataResult)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof cache_file_metadata_result) - return this.equals((cache_file_metadata_result)that); - return false; - } - - public boolean equals(cache_file_metadata_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); - } - - @Override - public int compareTo(cache_file_metadata_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("cache_file_metadata_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - 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 { - 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 cache_file_metadata_resultStandardSchemeFactory implements SchemeFactory { - public cache_file_metadata_resultStandardScheme getScheme() { - return new cache_file_metadata_resultStandardScheme(); - } - } - - private static class cache_file_metadata_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, cache_file_metadata_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 CacheFileMetadataResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(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, cache_file_metadata_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class cache_file_metadata_resultTupleSchemeFactory implements SchemeFactory { - public cache_file_metadata_resultTupleScheme getScheme() { - return new cache_file_metadata_resultTupleScheme(); - } - } - - private static class cache_file_metadata_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, cache_file_metadata_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, cache_file_metadata_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new CacheFileMetadataResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - } - } - - } - - public static class get_metastore_db_uuid_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_metastore_db_uuid_args"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new get_metastore_db_uuid_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_metastore_db_uuid_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 { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - 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); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_metastore_db_uuid_args.class, metaDataMap); - } - - public get_metastore_db_uuid_args() { - } - - /** - * Performs a deep copy on other. - */ - public get_metastore_db_uuid_args(get_metastore_db_uuid_args other) { - } - - public get_metastore_db_uuid_args deepCopy() { - return new get_metastore_db_uuid_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_metastore_db_uuid_args) - return this.equals((get_metastore_db_uuid_args)that); - return false; - } - - public boolean equals(get_metastore_db_uuid_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - return list.hashCode(); - } - - @Override - public int compareTo(get_metastore_db_uuid_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_metastore_db_uuid_args("); - boolean first = true; - - 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 get_metastore_db_uuid_argsStandardSchemeFactory implements SchemeFactory { - public get_metastore_db_uuid_argsStandardScheme getScheme() { - return new get_metastore_db_uuid_argsStandardScheme(); - } - } - - private static class get_metastore_db_uuid_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_metastore_db_uuid_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_metastore_db_uuid_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class get_metastore_db_uuid_argsTupleSchemeFactory implements SchemeFactory { - public get_metastore_db_uuid_argsTupleScheme getScheme() { - return new get_metastore_db_uuid_argsTupleScheme(); - } - } - - private static class get_metastore_db_uuid_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_metastore_db_uuid_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, get_metastore_db_uuid_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class get_metastore_db_uuid_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_metastore_db_uuid_result"); - - 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_metastore_db_uuid_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new get_metastore_db_uuid_resultTupleSchemeFactory()); - } - - private String success; // required - private MetaException o1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_metastore_db_uuid_result.class, metaDataMap); - } - - public get_metastore_db_uuid_result() { - } - - public get_metastore_db_uuid_result( - String success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; - } - - /** - * Performs a deep copy on other. - */ - public get_metastore_db_uuid_result(get_metastore_db_uuid_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_metastore_db_uuid_result deepCopy() { - return new get_metastore_db_uuid_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - } - - public String getSuccess() { - return this.success; - } - - public void setSuccess(String success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public MetaException getO1() { - return this.o1; - } - - public void setO1(MetaException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((String)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_metastore_db_uuid_result) - return this.equals((get_metastore_db_uuid_result)that); - return false; - } - - public boolean equals(get_metastore_db_uuid_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_o1 = true && (isSetO1()); - list.add(present_o1); - if (present_o1) - list.add(o1); - - return list.hashCode(); - } - - @Override - public int compareTo(get_metastore_db_uuid_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("get_metastore_db_uuid_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - 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 get_metastore_db_uuid_resultStandardSchemeFactory implements SchemeFactory { - public get_metastore_db_uuid_resultStandardScheme getScheme() { - return new get_metastore_db_uuid_resultStandardScheme(); - } - } - - private static class get_metastore_db_uuid_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, get_metastore_db_uuid_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_metastore_db_uuid_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_metastore_db_uuid_resultTupleSchemeFactory implements SchemeFactory { - public get_metastore_db_uuid_resultTupleScheme getScheme() { - return new get_metastore_db_uuid_resultTupleScheme(); - } - } - - private static class get_metastore_db_uuid_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, get_metastore_db_uuid_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_metastore_db_uuid_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); - } - } - } - - } - -} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnAbortedException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnAbortedException.java deleted file mode 100644 index 689f646..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnAbortedException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class TxnAbortedException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TxnAbortedException"); - - 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 TxnAbortedExceptionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TxnAbortedExceptionTupleSchemeFactory()); - } - - private String message; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TxnAbortedException.class, metaDataMap); - } - - public TxnAbortedException() { - } - - public TxnAbortedException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public TxnAbortedException(TxnAbortedException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public TxnAbortedException deepCopy() { - return new TxnAbortedException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof TxnAbortedException) - return this.equals((TxnAbortedException)that); - return false; - } - - public boolean equals(TxnAbortedException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(TxnAbortedException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("TxnAbortedException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 TxnAbortedExceptionStandardSchemeFactory implements SchemeFactory { - public TxnAbortedExceptionStandardScheme getScheme() { - return new TxnAbortedExceptionStandardScheme(); - } - } - - private static class TxnAbortedExceptionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, TxnAbortedException 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, TxnAbortedException 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 TxnAbortedExceptionTupleSchemeFactory implements SchemeFactory { - public TxnAbortedExceptionTupleScheme getScheme() { - return new TxnAbortedExceptionTupleScheme(); - } - } - - private static class TxnAbortedExceptionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TxnAbortedException 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, TxnAbortedException 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); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java deleted file mode 100644 index ed382ed..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java +++ /dev/null @@ -1,1220 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class TxnInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TxnInfo"); - - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1); - 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)2); - private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField AGENT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("agentInfo", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField HEARTBEAT_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("heartbeatCount", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField META_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("metaInfo", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField STARTED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startedTime", org.apache.thrift.protocol.TType.I64, (short)8); - private static final org.apache.thrift.protocol.TField LAST_HEARTBEAT_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastHeartbeatTime", org.apache.thrift.protocol.TType.I64, (short)9); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TxnInfoStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TxnInfoTupleSchemeFactory()); - } - - private long id; // required - private TxnState state; // required - private String user; // required - private String hostname; // required - private String agentInfo; // optional - private int heartbeatCount; // optional - private String metaInfo; // optional - private long startedTime; // optional - private long lastHeartbeatTime; // 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 { - ID((short)1, "id"), - /** - * - * @see TxnState - */ - STATE((short)2, "state"), - USER((short)3, "user"), - HOSTNAME((short)4, "hostname"), - AGENT_INFO((short)5, "agentInfo"), - HEARTBEAT_COUNT((short)6, "heartbeatCount"), - META_INFO((short)7, "metaInfo"), - STARTED_TIME((short)8, "startedTime"), - LAST_HEARTBEAT_TIME((short)9, "lastHeartbeatTime"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ID - return ID; - case 2: // STATE - return STATE; - case 3: // USER - return USER; - case 4: // HOSTNAME - return HOSTNAME; - case 5: // AGENT_INFO - return AGENT_INFO; - case 6: // HEARTBEAT_COUNT - return HEARTBEAT_COUNT; - case 7: // META_INFO - return META_INFO; - case 8: // STARTED_TIME - return STARTED_TIME; - case 9: // LAST_HEARTBEAT_TIME - return LAST_HEARTBEAT_TIME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ID_ISSET_ID = 0; - private static final int __HEARTBEATCOUNT_ISSET_ID = 1; - private static final int __STARTEDTIME_ISSET_ID = 2; - private static final int __LASTHEARTBEATTIME_ISSET_ID = 3; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.AGENT_INFO,_Fields.HEARTBEAT_COUNT,_Fields.META_INFO,_Fields.STARTED_TIME,_Fields.LAST_HEARTBEAT_TIME}; - 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); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TxnState.class))); - tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.AGENT_INFO, new org.apache.thrift.meta_data.FieldMetaData("agentInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.HEARTBEAT_COUNT, new org.apache.thrift.meta_data.FieldMetaData("heartbeatCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.META_INFO, new org.apache.thrift.meta_data.FieldMetaData("metaInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.STARTED_TIME, new org.apache.thrift.meta_data.FieldMetaData("startedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.LAST_HEARTBEAT_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastHeartbeatTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TxnInfo.class, metaDataMap); - } - - public TxnInfo() { - this.agentInfo = "Unknown"; - - this.heartbeatCount = 0; - - } - - public TxnInfo( - long id, - TxnState state, - String user, - String hostname) - { - this(); - this.id = id; - setIdIsSet(true); - this.state = state; - this.user = user; - this.hostname = hostname; - } - - /** - * Performs a deep copy on other. - */ - public TxnInfo(TxnInfo other) { - __isset_bitfield = other.__isset_bitfield; - this.id = other.id; - if (other.isSetState()) { - this.state = other.state; - } - if (other.isSetUser()) { - this.user = other.user; - } - if (other.isSetHostname()) { - this.hostname = other.hostname; - } - if (other.isSetAgentInfo()) { - this.agentInfo = other.agentInfo; - } - this.heartbeatCount = other.heartbeatCount; - if (other.isSetMetaInfo()) { - this.metaInfo = other.metaInfo; - } - this.startedTime = other.startedTime; - this.lastHeartbeatTime = other.lastHeartbeatTime; - } - - public TxnInfo deepCopy() { - return new TxnInfo(this); - } - - @Override - public void clear() { - setIdIsSet(false); - this.id = 0; - this.state = null; - this.user = null; - this.hostname = null; - this.agentInfo = "Unknown"; - - this.heartbeatCount = 0; - - this.metaInfo = null; - setStartedTimeIsSet(false); - this.startedTime = 0; - setLastHeartbeatTimeIsSet(false); - this.lastHeartbeatTime = 0; - } - - public long getId() { - return this.id; - } - - public void setId(long id) { - this.id = id; - setIdIsSet(true); - } - - public void unsetId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); - } - - public void setIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); - } - - /** - * - * @see TxnState - */ - public TxnState getState() { - return this.state; - } - - /** - * - * @see TxnState - */ - public void setState(TxnState state) { - this.state = state; - } - - public void unsetState() { - this.state = null; - } - - /** Returns true if field state is set (has been assigned a value) and false otherwise */ - public boolean isSetState() { - return this.state != null; - } - - public void setStateIsSet(boolean value) { - if (!value) { - this.state = null; - } - } - - public String getUser() { - return this.user; - } - - public void setUser(String user) { - this.user = user; - } - - public void unsetUser() { - this.user = null; - } - - /** Returns true if field user is set (has been assigned a value) and false otherwise */ - public boolean isSetUser() { - return this.user != null; - } - - public void setUserIsSet(boolean value) { - if (!value) { - this.user = null; - } - } - - public String getHostname() { - return this.hostname; - } - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - public void unsetHostname() { - this.hostname = null; - } - - /** Returns true if field hostname is set (has been assigned a value) and false otherwise */ - public boolean isSetHostname() { - return this.hostname != null; - } - - public void setHostnameIsSet(boolean value) { - if (!value) { - this.hostname = null; - } - } - - public String getAgentInfo() { - return this.agentInfo; - } - - public void setAgentInfo(String agentInfo) { - this.agentInfo = agentInfo; - } - - public void unsetAgentInfo() { - this.agentInfo = null; - } - - /** Returns true if field agentInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetAgentInfo() { - return this.agentInfo != null; - } - - public void setAgentInfoIsSet(boolean value) { - if (!value) { - this.agentInfo = null; - } - } - - public int getHeartbeatCount() { - return this.heartbeatCount; - } - - public void setHeartbeatCount(int heartbeatCount) { - this.heartbeatCount = heartbeatCount; - setHeartbeatCountIsSet(true); - } - - public void unsetHeartbeatCount() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID); - } - - /** Returns true if field heartbeatCount is set (has been assigned a value) and false otherwise */ - public boolean isSetHeartbeatCount() { - return EncodingUtils.testBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID); - } - - public void setHeartbeatCountIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID, value); - } - - public String getMetaInfo() { - return this.metaInfo; - } - - public void setMetaInfo(String metaInfo) { - this.metaInfo = metaInfo; - } - - public void unsetMetaInfo() { - this.metaInfo = null; - } - - /** Returns true if field metaInfo is set (has been assigned a value) and false otherwise */ - public boolean isSetMetaInfo() { - return this.metaInfo != null; - } - - public void setMetaInfoIsSet(boolean value) { - if (!value) { - this.metaInfo = null; - } - } - - public long getStartedTime() { - return this.startedTime; - } - - public void setStartedTime(long startedTime) { - this.startedTime = startedTime; - setStartedTimeIsSet(true); - } - - public void unsetStartedTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTEDTIME_ISSET_ID); - } - - /** Returns true if field startedTime is set (has been assigned a value) and false otherwise */ - public boolean isSetStartedTime() { - return EncodingUtils.testBit(__isset_bitfield, __STARTEDTIME_ISSET_ID); - } - - public void setStartedTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTEDTIME_ISSET_ID, value); - } - - public long getLastHeartbeatTime() { - return this.lastHeartbeatTime; - } - - public void setLastHeartbeatTime(long lastHeartbeatTime) { - this.lastHeartbeatTime = lastHeartbeatTime; - setLastHeartbeatTimeIsSet(true); - } - - public void unsetLastHeartbeatTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTHEARTBEATTIME_ISSET_ID); - } - - /** Returns true if field lastHeartbeatTime is set (has been assigned a value) and false otherwise */ - public boolean isSetLastHeartbeatTime() { - return EncodingUtils.testBit(__isset_bitfield, __LASTHEARTBEATTIME_ISSET_ID); - } - - public void setLastHeartbeatTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTHEARTBEATTIME_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((Long)value); - } - break; - - case STATE: - if (value == null) { - unsetState(); - } else { - setState((TxnState)value); - } - break; - - case USER: - if (value == null) { - unsetUser(); - } else { - setUser((String)value); - } - break; - - case HOSTNAME: - if (value == null) { - unsetHostname(); - } else { - setHostname((String)value); - } - break; - - case AGENT_INFO: - if (value == null) { - unsetAgentInfo(); - } else { - setAgentInfo((String)value); - } - break; - - case HEARTBEAT_COUNT: - if (value == null) { - unsetHeartbeatCount(); - } else { - setHeartbeatCount((Integer)value); - } - break; - - case META_INFO: - if (value == null) { - unsetMetaInfo(); - } else { - setMetaInfo((String)value); - } - break; - - case STARTED_TIME: - if (value == null) { - unsetStartedTime(); - } else { - setStartedTime((Long)value); - } - break; - - case LAST_HEARTBEAT_TIME: - if (value == null) { - unsetLastHeartbeatTime(); - } else { - setLastHeartbeatTime((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - case STATE: - return getState(); - - case USER: - return getUser(); - - case HOSTNAME: - return getHostname(); - - case AGENT_INFO: - return getAgentInfo(); - - case HEARTBEAT_COUNT: - return getHeartbeatCount(); - - case META_INFO: - return getMetaInfo(); - - case STARTED_TIME: - return getStartedTime(); - - case LAST_HEARTBEAT_TIME: - return getLastHeartbeatTime(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ID: - return isSetId(); - case STATE: - return isSetState(); - case USER: - return isSetUser(); - case HOSTNAME: - return isSetHostname(); - case AGENT_INFO: - return isSetAgentInfo(); - case HEARTBEAT_COUNT: - return isSetHeartbeatCount(); - case META_INFO: - return isSetMetaInfo(); - case STARTED_TIME: - return isSetStartedTime(); - case LAST_HEARTBEAT_TIME: - return isSetLastHeartbeatTime(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof TxnInfo) - return this.equals((TxnInfo)that); - return false; - } - - public boolean equals(TxnInfo that) { - if (that == null) - return false; - - boolean this_present_id = true; - boolean that_present_id = true; - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (this.id != that.id) - return false; - } - - boolean this_present_state = true && this.isSetState(); - boolean that_present_state = true && that.isSetState(); - if (this_present_state || that_present_state) { - if (!(this_present_state && that_present_state)) - return false; - if (!this.state.equals(that.state)) - return false; - } - - boolean this_present_user = true && this.isSetUser(); - boolean that_present_user = true && that.isSetUser(); - if (this_present_user || that_present_user) { - if (!(this_present_user && that_present_user)) - return false; - if (!this.user.equals(that.user)) - return false; - } - - boolean this_present_hostname = true && this.isSetHostname(); - boolean that_present_hostname = true && that.isSetHostname(); - if (this_present_hostname || that_present_hostname) { - if (!(this_present_hostname && that_present_hostname)) - return false; - if (!this.hostname.equals(that.hostname)) - return false; - } - - boolean this_present_agentInfo = true && this.isSetAgentInfo(); - boolean that_present_agentInfo = true && that.isSetAgentInfo(); - if (this_present_agentInfo || that_present_agentInfo) { - if (!(this_present_agentInfo && that_present_agentInfo)) - return false; - if (!this.agentInfo.equals(that.agentInfo)) - return false; - } - - boolean this_present_heartbeatCount = true && this.isSetHeartbeatCount(); - boolean that_present_heartbeatCount = true && that.isSetHeartbeatCount(); - if (this_present_heartbeatCount || that_present_heartbeatCount) { - if (!(this_present_heartbeatCount && that_present_heartbeatCount)) - return false; - if (this.heartbeatCount != that.heartbeatCount) - return false; - } - - boolean this_present_metaInfo = true && this.isSetMetaInfo(); - boolean that_present_metaInfo = true && that.isSetMetaInfo(); - if (this_present_metaInfo || that_present_metaInfo) { - if (!(this_present_metaInfo && that_present_metaInfo)) - return false; - if (!this.metaInfo.equals(that.metaInfo)) - return false; - } - - boolean this_present_startedTime = true && this.isSetStartedTime(); - boolean that_present_startedTime = true && that.isSetStartedTime(); - if (this_present_startedTime || that_present_startedTime) { - if (!(this_present_startedTime && that_present_startedTime)) - return false; - if (this.startedTime != that.startedTime) - return false; - } - - boolean this_present_lastHeartbeatTime = true && this.isSetLastHeartbeatTime(); - boolean that_present_lastHeartbeatTime = true && that.isSetLastHeartbeatTime(); - if (this_present_lastHeartbeatTime || that_present_lastHeartbeatTime) { - if (!(this_present_lastHeartbeatTime && that_present_lastHeartbeatTime)) - return false; - if (this.lastHeartbeatTime != that.lastHeartbeatTime) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_id = true; - list.add(present_id); - if (present_id) - list.add(id); - - boolean present_state = true && (isSetState()); - list.add(present_state); - if (present_state) - list.add(state.getValue()); - - boolean present_user = true && (isSetUser()); - list.add(present_user); - if (present_user) - list.add(user); - - boolean present_hostname = true && (isSetHostname()); - list.add(present_hostname); - if (present_hostname) - list.add(hostname); - - boolean present_agentInfo = true && (isSetAgentInfo()); - list.add(present_agentInfo); - if (present_agentInfo) - list.add(agentInfo); - - boolean present_heartbeatCount = true && (isSetHeartbeatCount()); - list.add(present_heartbeatCount); - if (present_heartbeatCount) - list.add(heartbeatCount); - - boolean present_metaInfo = true && (isSetMetaInfo()); - list.add(present_metaInfo); - if (present_metaInfo) - list.add(metaInfo); - - boolean present_startedTime = true && (isSetStartedTime()); - list.add(present_startedTime); - if (present_startedTime) - list.add(startedTime); - - boolean present_lastHeartbeatTime = true && (isSetLastHeartbeatTime()); - list.add(present_lastHeartbeatTime); - if (present_lastHeartbeatTime) - list.add(lastHeartbeatTime); - - return list.hashCode(); - } - - @Override - public int compareTo(TxnInfo other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetState()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUser()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHostname()).compareTo(other.isSetHostname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHostname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, other.hostname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAgentInfo()).compareTo(other.isSetAgentInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAgentInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentInfo, other.agentInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetHeartbeatCount()).compareTo(other.isSetHeartbeatCount()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetHeartbeatCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.heartbeatCount, other.heartbeatCount); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMetaInfo()).compareTo(other.isSetMetaInfo()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMetaInfo()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metaInfo, other.metaInfo); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStartedTime()).compareTo(other.isSetStartedTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStartedTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startedTime, other.startedTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLastHeartbeatTime()).compareTo(other.isSetLastHeartbeatTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLastHeartbeatTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastHeartbeatTime, other.lastHeartbeatTime); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("TxnInfo("); - boolean first = true; - - sb.append("id:"); - sb.append(this.id); - first = false; - if (!first) sb.append(", "); - sb.append("state:"); - if (this.state == null) { - sb.append("null"); - } else { - sb.append(this.state); - } - first = false; - if (!first) sb.append(", "); - sb.append("user:"); - if (this.user == null) { - sb.append("null"); - } else { - sb.append(this.user); - } - first = false; - if (!first) sb.append(", "); - sb.append("hostname:"); - if (this.hostname == null) { - sb.append("null"); - } else { - sb.append(this.hostname); - } - first = false; - if (isSetAgentInfo()) { - if (!first) sb.append(", "); - sb.append("agentInfo:"); - if (this.agentInfo == null) { - sb.append("null"); - } else { - sb.append(this.agentInfo); - } - first = false; - } - if (isSetHeartbeatCount()) { - if (!first) sb.append(", "); - sb.append("heartbeatCount:"); - sb.append(this.heartbeatCount); - first = false; - } - if (isSetMetaInfo()) { - if (!first) sb.append(", "); - sb.append("metaInfo:"); - if (this.metaInfo == null) { - sb.append("null"); - } else { - sb.append(this.metaInfo); - } - first = false; - } - if (isSetStartedTime()) { - if (!first) sb.append(", "); - sb.append("startedTime:"); - sb.append(this.startedTime); - first = false; - } - if (isSetLastHeartbeatTime()) { - if (!first) sb.append(", "); - sb.append("lastHeartbeatTime:"); - sb.append(this.lastHeartbeatTime); - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString()); - } - - if (!isSetState()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); - } - - if (!isSetUser()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'user' is unset! Struct:" + toString()); - } - - if (!isSetHostname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'hostname' is unset! Struct:" + toString()); - } - - // 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 { - // 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 TxnInfoStandardSchemeFactory implements SchemeFactory { - public TxnInfoStandardScheme getScheme() { - return new TxnInfoStandardScheme(); - } - } - - private static class TxnInfoStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, TxnInfo 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: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.id = iprot.readI64(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STATE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.state = org.apache.hadoop.hive.metastore.api.TxnState.findByValue(iprot.readI32()); - struct.setStateIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // USER - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.user = iprot.readString(); - struct.setUserIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // HOSTNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.hostname = iprot.readString(); - struct.setHostnameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // AGENT_INFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.agentInfo = iprot.readString(); - struct.setAgentInfoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // HEARTBEAT_COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.heartbeatCount = iprot.readI32(); - struct.setHeartbeatCountIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // META_INFO - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.metaInfo = iprot.readString(); - struct.setMetaInfoIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // STARTED_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.startedTime = iprot.readI64(); - struct.setStartedTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // LAST_HEARTBEAT_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.lastHeartbeatTime = iprot.readI64(); - struct.setLastHeartbeatTimeIsSet(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, TxnInfo struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeI64(struct.id); - oprot.writeFieldEnd(); - if (struct.state != null) { - oprot.writeFieldBegin(STATE_FIELD_DESC); - oprot.writeI32(struct.state.getValue()); - oprot.writeFieldEnd(); - } - if (struct.user != null) { - oprot.writeFieldBegin(USER_FIELD_DESC); - oprot.writeString(struct.user); - oprot.writeFieldEnd(); - } - if (struct.hostname != null) { - oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); - oprot.writeString(struct.hostname); - oprot.writeFieldEnd(); - } - if (struct.agentInfo != null) { - if (struct.isSetAgentInfo()) { - oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC); - oprot.writeString(struct.agentInfo); - oprot.writeFieldEnd(); - } - } - if (struct.isSetHeartbeatCount()) { - oprot.writeFieldBegin(HEARTBEAT_COUNT_FIELD_DESC); - oprot.writeI32(struct.heartbeatCount); - oprot.writeFieldEnd(); - } - if (struct.metaInfo != null) { - if (struct.isSetMetaInfo()) { - oprot.writeFieldBegin(META_INFO_FIELD_DESC); - oprot.writeString(struct.metaInfo); - oprot.writeFieldEnd(); - } - } - if (struct.isSetStartedTime()) { - oprot.writeFieldBegin(STARTED_TIME_FIELD_DESC); - oprot.writeI64(struct.startedTime); - oprot.writeFieldEnd(); - } - if (struct.isSetLastHeartbeatTime()) { - oprot.writeFieldBegin(LAST_HEARTBEAT_TIME_FIELD_DESC); - oprot.writeI64(struct.lastHeartbeatTime); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class TxnInfoTupleSchemeFactory implements SchemeFactory { - public TxnInfoTupleScheme getScheme() { - return new TxnInfoTupleScheme(); - } - } - - private static class TxnInfoTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TxnInfo struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.id); - oprot.writeI32(struct.state.getValue()); - oprot.writeString(struct.user); - oprot.writeString(struct.hostname); - BitSet optionals = new BitSet(); - if (struct.isSetAgentInfo()) { - optionals.set(0); - } - if (struct.isSetHeartbeatCount()) { - optionals.set(1); - } - if (struct.isSetMetaInfo()) { - optionals.set(2); - } - if (struct.isSetStartedTime()) { - optionals.set(3); - } - if (struct.isSetLastHeartbeatTime()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetAgentInfo()) { - oprot.writeString(struct.agentInfo); - } - if (struct.isSetHeartbeatCount()) { - oprot.writeI32(struct.heartbeatCount); - } - if (struct.isSetMetaInfo()) { - oprot.writeString(struct.metaInfo); - } - if (struct.isSetStartedTime()) { - oprot.writeI64(struct.startedTime); - } - if (struct.isSetLastHeartbeatTime()) { - oprot.writeI64(struct.lastHeartbeatTime); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, TxnInfo struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.id = iprot.readI64(); - struct.setIdIsSet(true); - struct.state = org.apache.hadoop.hive.metastore.api.TxnState.findByValue(iprot.readI32()); - struct.setStateIsSet(true); - struct.user = iprot.readString(); - struct.setUserIsSet(true); - struct.hostname = iprot.readString(); - struct.setHostnameIsSet(true); - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.agentInfo = iprot.readString(); - struct.setAgentInfoIsSet(true); - } - if (incoming.get(1)) { - struct.heartbeatCount = iprot.readI32(); - struct.setHeartbeatCountIsSet(true); - } - if (incoming.get(2)) { - struct.metaInfo = iprot.readString(); - struct.setMetaInfoIsSet(true); - } - if (incoming.get(3)) { - struct.startedTime = iprot.readI64(); - struct.setStartedTimeIsSet(true); - } - if (incoming.get(4)) { - struct.lastHeartbeatTime = iprot.readI64(); - struct.setLastHeartbeatTimeIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnOpenException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnOpenException.java deleted file mode 100644 index 10b5f9b..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnOpenException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class TxnOpenException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TxnOpenException"); - - 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 TxnOpenExceptionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TxnOpenExceptionTupleSchemeFactory()); - } - - private String message; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TxnOpenException.class, metaDataMap); - } - - public TxnOpenException() { - } - - public TxnOpenException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public TxnOpenException(TxnOpenException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public TxnOpenException deepCopy() { - return new TxnOpenException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof TxnOpenException) - return this.equals((TxnOpenException)that); - return false; - } - - public boolean equals(TxnOpenException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(TxnOpenException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("TxnOpenException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 TxnOpenExceptionStandardSchemeFactory implements SchemeFactory { - public TxnOpenExceptionStandardScheme getScheme() { - return new TxnOpenExceptionStandardScheme(); - } - } - - private static class TxnOpenExceptionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, TxnOpenException 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, TxnOpenException 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 TxnOpenExceptionTupleSchemeFactory implements SchemeFactory { - public TxnOpenExceptionTupleScheme getScheme() { - return new TxnOpenExceptionTupleScheme(); - } - } - - private static class TxnOpenExceptionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, TxnOpenException 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, TxnOpenException 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); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnState.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnState.java deleted file mode 100644 index de59755..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnState.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - - -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum TxnState implements org.apache.thrift.TEnum { - COMMITTED(1), - ABORTED(2), - OPEN(3); - - private final int value; - - private TxnState(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static TxnState findByValue(int value) { - switch (value) { - case 1: - return COMMITTED; - case 2: - return ABORTED; - case 3: - return OPEN; - default: - return null; - } - } -} diff --git 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 deleted file mode 100644 index 14cd42e..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java +++ /dev/null @@ -1,768 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class Type implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Type"); - - 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 TYPE1_FIELD_DESC = new org.apache.thrift.protocol.TField("type1", org.apache.thrift.protocol.TType.STRING, (short)2); - 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; // 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 { - NAME((short)1, "name"), - TYPE1((short)2, "type1"), - TYPE2((short)3, "type2"), - FIELDS((short)4, "fields"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // TYPE1 - return TYPE1; - case 3: // TYPE2 - return TYPE2; - case 4: // FIELDS - return FIELDS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final _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); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TYPE1, new org.apache.thrift.meta_data.FieldMetaData("type1", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TYPE2, new org.apache.thrift.meta_data.FieldMetaData("type2", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.FIELDS, new org.apache.thrift.meta_data.FieldMetaData("fields", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Type.class, metaDataMap); - } - - public Type() { - } - - public Type( - String name) - { - this(); - this.name = name; - } - - /** - * Performs a deep copy on other. - */ - public Type(Type other) { - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetType1()) { - this.type1 = other.type1; - } - if (other.isSetType2()) { - this.type2 = other.type2; - } - if (other.isSetFields()) { - List __this__fields = new ArrayList(other.fields.size()); - for (FieldSchema other_element : other.fields) { - __this__fields.add(new FieldSchema(other_element)); - } - this.fields = __this__fields; - } - } - - public Type deepCopy() { - return new Type(this); - } - - @Override - public void clear() { - this.name = null; - this.type1 = null; - this.type2 = null; - this.fields = null; - } - - public String getName() { - return this.name; - } - - public void setName(String name) { - this.name = name; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public String getType1() { - return this.type1; - } - - public void setType1(String type1) { - this.type1 = type1; - } - - public void unsetType1() { - this.type1 = null; - } - - /** Returns true if field type1 is set (has been assigned a value) and false otherwise */ - public boolean isSetType1() { - return this.type1 != null; - } - - public void setType1IsSet(boolean value) { - if (!value) { - this.type1 = null; - } - } - - public String getType2() { - return this.type2; - } - - public void setType2(String type2) { - this.type2 = type2; - } - - public void unsetType2() { - this.type2 = null; - } - - /** Returns true if field type2 is set (has been assigned a value) and false otherwise */ - public boolean isSetType2() { - return this.type2 != null; - } - - public void setType2IsSet(boolean value) { - if (!value) { - this.type2 = null; - } - } - - public int getFieldsSize() { - return (this.fields == null) ? 0 : this.fields.size(); - } - - public java.util.Iterator getFieldsIterator() { - return (this.fields == null) ? null : this.fields.iterator(); - } - - public void addToFields(FieldSchema elem) { - if (this.fields == null) { - this.fields = new ArrayList(); - } - this.fields.add(elem); - } - - public List getFields() { - return this.fields; - } - - public void setFields(List fields) { - this.fields = fields; - } - - public void unsetFields() { - this.fields = null; - } - - /** Returns true if field fields is set (has been assigned a value) and false otherwise */ - public boolean isSetFields() { - return this.fields != null; - } - - public void setFieldsIsSet(boolean value) { - if (!value) { - this.fields = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case TYPE1: - if (value == null) { - unsetType1(); - } else { - setType1((String)value); - } - break; - - case TYPE2: - if (value == null) { - unsetType2(); - } else { - setType2((String)value); - } - break; - - case FIELDS: - if (value == null) { - unsetFields(); - } else { - setFields((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - case TYPE1: - return getType1(); - - case TYPE2: - return getType2(); - - case FIELDS: - return getFields(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - case TYPE1: - return isSetType1(); - case TYPE2: - return isSetType2(); - case FIELDS: - return isSetFields(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Type) - return this.equals((Type)that); - return false; - } - - public boolean equals(Type that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_type1 = true && this.isSetType1(); - boolean that_present_type1 = true && that.isSetType1(); - if (this_present_type1 || that_present_type1) { - if (!(this_present_type1 && that_present_type1)) - return false; - if (!this.type1.equals(that.type1)) - return false; - } - - boolean this_present_type2 = true && this.isSetType2(); - boolean that_present_type2 = true && that.isSetType2(); - if (this_present_type2 || that_present_type2) { - if (!(this_present_type2 && that_present_type2)) - return false; - if (!this.type2.equals(that.type2)) - return false; - } - - boolean this_present_fields = true && this.isSetFields(); - boolean that_present_fields = true && that.isSetFields(); - if (this_present_fields || that_present_fields) { - if (!(this_present_fields && that_present_fields)) - return false; - if (!this.fields.equals(that.fields)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); - - boolean present_type1 = true && (isSetType1()); - list.add(present_type1); - if (present_type1) - list.add(type1); - - boolean present_type2 = true && (isSetType2()); - list.add(present_type2); - if (present_type2) - list.add(type2); - - boolean present_fields = true && (isSetFields()); - list.add(present_fields); - if (present_fields) - list.add(fields); - - return list.hashCode(); - } - - @Override - public int compareTo(Type other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetType1()).compareTo(other.isSetType1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type1, other.type1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetType2()).compareTo(other.isSetType2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type2, other.type2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFields()).compareTo(other.isSetFields()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFields()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fields, other.fields); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("Type("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (isSetType1()) { - if (!first) sb.append(", "); - sb.append("type1:"); - if (this.type1 == null) { - sb.append("null"); - } else { - sb.append(this.type1); - } - first = false; - } - if (isSetType2()) { - if (!first) sb.append(", "); - sb.append("type2:"); - if (this.type2 == null) { - sb.append("null"); - } else { - sb.append(this.type2); - } - first = false; - } - if (isSetFields()) { - if (!first) sb.append(", "); - sb.append("fields:"); - if (this.fields == null) { - sb.append("null"); - } else { - sb.append(this.fields); - } - 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 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); - FieldSchema _elem1; - for (int _i2 = 0; _i2 < _list0.size; ++_i2) - { - _elem1 = new FieldSchema(); - _elem1.read(iprot); - struct.fields.add(_elem1); - } - 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); - FieldSchema _elem6; - for (int _i7 = 0; _i7 < _list5.size; ++_i7) - { - _elem6 = new FieldSchema(); - _elem6.read(iprot); - struct.fields.add(_elem6); - } - } - struct.setFieldsIsSet(true); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsRequest.java deleted file mode 100644 index ccbecfc..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsRequest.java +++ /dev/null @@ -1,490 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class UniqueConstraintsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UniqueConstraintsRequest"); - - 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 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 UniqueConstraintsRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new UniqueConstraintsRequestTupleSchemeFactory()); - } - - private String db_name; // required - private String tbl_name; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UniqueConstraintsRequest.class, metaDataMap); - } - - public UniqueConstraintsRequest() { - } - - public UniqueConstraintsRequest( - String db_name, - String tbl_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - } - - /** - * Performs a deep copy on other. - */ - public UniqueConstraintsRequest(UniqueConstraintsRequest other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - } - - public UniqueConstraintsRequest deepCopy() { - return new UniqueConstraintsRequest(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof UniqueConstraintsRequest) - return this.equals((UniqueConstraintsRequest)that); - return false; - } - - public boolean equals(UniqueConstraintsRequest that) { - if (that == null) - return false; - - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_db_name = true && (isSetDb_name()); - list.add(present_db_name); - if (present_db_name) - list.add(db_name); - - boolean present_tbl_name = true && (isSetTbl_name()); - list.add(present_tbl_name); - if (present_tbl_name) - list.add(tbl_name); - - return list.hashCode(); - } - - @Override - public int compareTo(UniqueConstraintsRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("UniqueConstraintsRequest("); - boolean first = true; - - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetDb_name()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'db_name' is unset! Struct:" + toString()); - } - - if (!isSetTbl_name()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tbl_name' is unset! Struct:" + toString()); - } - - // 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 UniqueConstraintsRequestStandardSchemeFactory implements SchemeFactory { - public UniqueConstraintsRequestStandardScheme getScheme() { - return new UniqueConstraintsRequestStandardScheme(); - } - } - - private static class UniqueConstraintsRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, UniqueConstraintsRequest 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; - 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, UniqueConstraintsRequest 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.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class UniqueConstraintsRequestTupleSchemeFactory implements SchemeFactory { - public UniqueConstraintsRequestTupleScheme getScheme() { - return new UniqueConstraintsRequestTupleScheme(); - } - } - - private static class UniqueConstraintsRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, UniqueConstraintsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.db_name); - oprot.writeString(struct.tbl_name); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, UniqueConstraintsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.db_name = iprot.readString(); - struct.setDb_nameIsSet(true); - struct.tbl_name = iprot.readString(); - struct.setTbl_nameIsSet(true); - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsResponse.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsResponse.java deleted file mode 100644 index 7de84ea..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsResponse.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class UniqueConstraintsResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UniqueConstraintsResponse"); - - private static final org.apache.thrift.protocol.TField UNIQUE_CONSTRAINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("uniqueConstraints", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new UniqueConstraintsResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new UniqueConstraintsResponseTupleSchemeFactory()); - } - - private List uniqueConstraints; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - UNIQUE_CONSTRAINTS((short)1, "uniqueConstraints"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // UNIQUE_CONSTRAINTS - return UNIQUE_CONSTRAINTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.UNIQUE_CONSTRAINTS, new org.apache.thrift.meta_data.FieldMetaData("uniqueConstraints", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLUniqueConstraint.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UniqueConstraintsResponse.class, metaDataMap); - } - - public UniqueConstraintsResponse() { - } - - public UniqueConstraintsResponse( - List uniqueConstraints) - { - this(); - this.uniqueConstraints = uniqueConstraints; - } - - /** - * Performs a deep copy on other. - */ - public UniqueConstraintsResponse(UniqueConstraintsResponse other) { - if (other.isSetUniqueConstraints()) { - List __this__uniqueConstraints = new ArrayList(other.uniqueConstraints.size()); - for (SQLUniqueConstraint other_element : other.uniqueConstraints) { - __this__uniqueConstraints.add(new SQLUniqueConstraint(other_element)); - } - this.uniqueConstraints = __this__uniqueConstraints; - } - } - - public UniqueConstraintsResponse deepCopy() { - return new UniqueConstraintsResponse(this); - } - - @Override - public void clear() { - this.uniqueConstraints = null; - } - - public int getUniqueConstraintsSize() { - return (this.uniqueConstraints == null) ? 0 : this.uniqueConstraints.size(); - } - - public java.util.Iterator getUniqueConstraintsIterator() { - return (this.uniqueConstraints == null) ? null : this.uniqueConstraints.iterator(); - } - - public void addToUniqueConstraints(SQLUniqueConstraint elem) { - if (this.uniqueConstraints == null) { - this.uniqueConstraints = new ArrayList(); - } - this.uniqueConstraints.add(elem); - } - - public List getUniqueConstraints() { - return this.uniqueConstraints; - } - - public void setUniqueConstraints(List uniqueConstraints) { - this.uniqueConstraints = uniqueConstraints; - } - - public void unsetUniqueConstraints() { - this.uniqueConstraints = null; - } - - /** Returns true if field uniqueConstraints is set (has been assigned a value) and false otherwise */ - public boolean isSetUniqueConstraints() { - return this.uniqueConstraints != null; - } - - public void setUniqueConstraintsIsSet(boolean value) { - if (!value) { - this.uniqueConstraints = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case UNIQUE_CONSTRAINTS: - if (value == null) { - unsetUniqueConstraints(); - } else { - setUniqueConstraints((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case UNIQUE_CONSTRAINTS: - return getUniqueConstraints(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case UNIQUE_CONSTRAINTS: - return isSetUniqueConstraints(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof UniqueConstraintsResponse) - return this.equals((UniqueConstraintsResponse)that); - return false; - } - - public boolean equals(UniqueConstraintsResponse that) { - if (that == null) - return false; - - boolean this_present_uniqueConstraints = true && this.isSetUniqueConstraints(); - boolean that_present_uniqueConstraints = true && that.isSetUniqueConstraints(); - if (this_present_uniqueConstraints || that_present_uniqueConstraints) { - if (!(this_present_uniqueConstraints && that_present_uniqueConstraints)) - return false; - if (!this.uniqueConstraints.equals(that.uniqueConstraints)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_uniqueConstraints = true && (isSetUniqueConstraints()); - list.add(present_uniqueConstraints); - if (present_uniqueConstraints) - list.add(uniqueConstraints); - - return list.hashCode(); - } - - @Override - public int compareTo(UniqueConstraintsResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetUniqueConstraints()).compareTo(other.isSetUniqueConstraints()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUniqueConstraints()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uniqueConstraints, other.uniqueConstraints); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("UniqueConstraintsResponse("); - boolean first = true; - - sb.append("uniqueConstraints:"); - if (this.uniqueConstraints == null) { - sb.append("null"); - } else { - sb.append(this.uniqueConstraints); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetUniqueConstraints()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'uniqueConstraints' is unset! Struct:" + toString()); - } - - // 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 UniqueConstraintsResponseStandardSchemeFactory implements SchemeFactory { - public UniqueConstraintsResponseStandardScheme getScheme() { - return new UniqueConstraintsResponseStandardScheme(); - } - } - - private static class UniqueConstraintsResponseStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, UniqueConstraintsResponse 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: // UNIQUE_CONSTRAINTS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list338 = iprot.readListBegin(); - struct.uniqueConstraints = new ArrayList(_list338.size); - SQLUniqueConstraint _elem339; - for (int _i340 = 0; _i340 < _list338.size; ++_i340) - { - _elem339 = new SQLUniqueConstraint(); - _elem339.read(iprot); - struct.uniqueConstraints.add(_elem339); - } - iprot.readListEnd(); - } - struct.setUniqueConstraintsIsSet(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, UniqueConstraintsResponse struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.uniqueConstraints != null) { - oprot.writeFieldBegin(UNIQUE_CONSTRAINTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.uniqueConstraints.size())); - for (SQLUniqueConstraint _iter341 : struct.uniqueConstraints) - { - _iter341.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class UniqueConstraintsResponseTupleSchemeFactory implements SchemeFactory { - public UniqueConstraintsResponseTupleScheme getScheme() { - return new UniqueConstraintsResponseTupleScheme(); - } - } - - private static class UniqueConstraintsResponseTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, UniqueConstraintsResponse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.uniqueConstraints.size()); - for (SQLUniqueConstraint _iter342 : struct.uniqueConstraints) - { - _iter342.write(oprot); - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, UniqueConstraintsResponse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TList _list343 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.uniqueConstraints = new ArrayList(_list343.size); - SQLUniqueConstraint _elem344; - for (int _i345 = 0; _i345 < _list343.size; ++_i345) - { - _elem344 = new SQLUniqueConstraint(); - _elem344.read(iprot); - struct.uniqueConstraints.add(_elem344); - } - } - struct.setUniqueConstraintsIsSet(true); - } - } - -} - diff --git 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 deleted file mode 100644 index a5ea86f..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class UnknownDBException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnknownDBException.class, metaDataMap); - } - - public UnknownDBException() { - } - - public UnknownDBException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public UnknownDBException(UnknownDBException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public UnknownDBException deepCopy() { - return new UnknownDBException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof UnknownDBException) - return this.equals((UnknownDBException)that); - return false; - } - - public boolean equals(UnknownDBException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(UnknownDBException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("UnknownDBException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 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); - } - } - } - -} - diff --git 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 deleted file mode 100644 index 538ce29..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownPartitionException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class UnknownPartitionException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnknownPartitionException.class, metaDataMap); - } - - public UnknownPartitionException() { - } - - public UnknownPartitionException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public UnknownPartitionException(UnknownPartitionException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public UnknownPartitionException deepCopy() { - return new UnknownPartitionException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof UnknownPartitionException) - return this.equals((UnknownPartitionException)that); - return false; - } - - public boolean equals(UnknownPartitionException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(UnknownPartitionException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("UnknownPartitionException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 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); - } - } - } - -} - diff --git 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 deleted file mode 100644 index 95bd0dd..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class UnknownTableException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - 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. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MESSAGE((short)1, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnknownTableException.class, metaDataMap); - } - - public UnknownTableException() { - } - - public UnknownTableException( - String message) - { - this(); - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public UnknownTableException(UnknownTableException other) { - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public UnknownTableException deepCopy() { - return new UnknownTableException(this); - } - - @Override - public void clear() { - this.message = null; - } - - public String getMessage() { - return this.message; - } - - public void setMessage(String message) { - this.message = message; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof UnknownTableException) - return this.equals((UnknownTableException)that); - return false; - } - - public boolean equals(UnknownTableException that) { - if (that == null) - return false; - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_message = true && (isSetMessage()); - list.add(present_message); - if (present_message) - list.add(message); - - return list.hashCode(); - } - - @Override - public int compareTo(UnknownTableException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("UnknownTableException("); - boolean first = true; - - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - 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 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); - } - } - } - -} - diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnlockRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnlockRequest.java deleted file mode 100644 index f28e808..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnlockRequest.java +++ /dev/null @@ -1,387 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class UnlockRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnlockRequest"); - - private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new UnlockRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new UnlockRequestTupleSchemeFactory()); - } - - private long lockid; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - LOCKID((short)1, "lockid"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // LOCKID - return LOCKID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __LOCKID_ISSET_ID = 0; - 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); - tmpMap.put(_Fields.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnlockRequest.class, metaDataMap); - } - - public UnlockRequest() { - } - - public UnlockRequest( - long lockid) - { - this(); - this.lockid = lockid; - setLockidIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public UnlockRequest(UnlockRequest other) { - __isset_bitfield = other.__isset_bitfield; - this.lockid = other.lockid; - } - - public UnlockRequest deepCopy() { - return new UnlockRequest(this); - } - - @Override - public void clear() { - setLockidIsSet(false); - this.lockid = 0; - } - - public long getLockid() { - return this.lockid; - } - - public void setLockid(long lockid) { - this.lockid = lockid; - setLockidIsSet(true); - } - - public void unsetLockid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKID_ISSET_ID); - } - - /** Returns true if field lockid is set (has been assigned a value) and false otherwise */ - public boolean isSetLockid() { - return EncodingUtils.testBit(__isset_bitfield, __LOCKID_ISSET_ID); - } - - public void setLockidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LOCKID: - if (value == null) { - unsetLockid(); - } else { - setLockid((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LOCKID: - return getLockid(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LOCKID: - return isSetLockid(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof UnlockRequest) - return this.equals((UnlockRequest)that); - return false; - } - - public boolean equals(UnlockRequest that) { - if (that == null) - return false; - - boolean this_present_lockid = true; - boolean that_present_lockid = true; - if (this_present_lockid || that_present_lockid) { - if (!(this_present_lockid && that_present_lockid)) - return false; - if (this.lockid != that.lockid) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_lockid = true; - list.add(present_lockid); - if (present_lockid) - list.add(lockid); - - return list.hashCode(); - } - - @Override - public int compareTo(UnlockRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLockid()).compareTo(other.isSetLockid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLockid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, other.lockid); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("UnlockRequest("); - boolean first = true; - - sb.append("lockid:"); - sb.append(this.lockid); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetLockid()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'lockid' is unset! Struct:" + toString()); - } - - // 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 { - // 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 UnlockRequestStandardSchemeFactory implements SchemeFactory { - public UnlockRequestStandardScheme getScheme() { - return new UnlockRequestStandardScheme(); - } - } - - private static class UnlockRequestStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, UnlockRequest 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: // LOCKID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.lockid = iprot.readI64(); - struct.setLockidIsSet(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, UnlockRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(LOCKID_FIELD_DESC); - oprot.writeI64(struct.lockid); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class UnlockRequestTupleSchemeFactory implements SchemeFactory { - public UnlockRequestTupleScheme getScheme() { - return new UnlockRequestTupleScheme(); - } - } - - private static class UnlockRequestTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, UnlockRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI64(struct.lockid); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, UnlockRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.lockid = iprot.readI64(); - struct.setLockidIsSet(true); - } - } - -} - diff --git 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 deleted file mode 100644 index 12a2bce..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java +++ /dev/null @@ -1,499 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class Version implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Version"); - - 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 - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - VERSION((short)1, "version"), - COMMENTS((short)2, "comments"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // VERSION - return VERSION; - case 2: // COMMENTS - return COMMENTS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // 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); - tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COMMENTS, new org.apache.thrift.meta_data.FieldMetaData("comments", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Version.class, metaDataMap); - } - - public Version() { - } - - public Version( - String version, - String comments) - { - this(); - this.version = version; - this.comments = comments; - } - - /** - * Performs a deep copy on other. - */ - public Version(Version other) { - if (other.isSetVersion()) { - this.version = other.version; - } - if (other.isSetComments()) { - this.comments = other.comments; - } - } - - public Version deepCopy() { - return new Version(this); - } - - @Override - public void clear() { - this.version = null; - this.comments = null; - } - - public String getVersion() { - return this.version; - } - - public void setVersion(String version) { - this.version = version; - } - - public void unsetVersion() { - this.version = null; - } - - /** Returns true if field version is set (has been assigned a value) and false otherwise */ - public boolean isSetVersion() { - return this.version != null; - } - - public void setVersionIsSet(boolean value) { - if (!value) { - this.version = null; - } - } - - public String getComments() { - return this.comments; - } - - public void setComments(String comments) { - this.comments = comments; - } - - public void unsetComments() { - this.comments = null; - } - - /** Returns true if field comments is set (has been assigned a value) and false otherwise */ - public boolean isSetComments() { - return this.comments != null; - } - - public void setCommentsIsSet(boolean value) { - if (!value) { - this.comments = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((String)value); - } - break; - - case COMMENTS: - if (value == null) { - unsetComments(); - } else { - setComments((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case VERSION: - return getVersion(); - - case COMMENTS: - return getComments(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case VERSION: - return isSetVersion(); - case COMMENTS: - return isSetComments(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Version) - return this.equals((Version)that); - return false; - } - - public boolean equals(Version that) { - if (that == null) - return false; - - boolean this_present_version = true && this.isSetVersion(); - boolean that_present_version = true && that.isSetVersion(); - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (!this.version.equals(that.version)) - return false; - } - - boolean this_present_comments = true && this.isSetComments(); - boolean that_present_comments = true && that.isSetComments(); - if (this_present_comments || that_present_comments) { - if (!(this_present_comments && that_present_comments)) - return false; - if (!this.comments.equals(that.comments)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_version = true && (isSetVersion()); - list.add(present_version); - if (present_version) - list.add(version); - - boolean present_comments = true && (isSetComments()); - list.add(present_comments); - if (present_comments) - list.add(comments); - - return list.hashCode(); - } - - @Override - public int compareTo(Version other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetComments()).compareTo(other.isSetComments()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetComments()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comments, other.comments); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - 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("Version("); - boolean first = true; - - sb.append("version:"); - if (this.version == null) { - sb.append("null"); - } else { - sb.append(this.version); - } - first = false; - if (!first) sb.append(", "); - sb.append("comments:"); - if (this.comments == null) { - sb.append("null"); - } else { - sb.append(this.comments); - } - 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 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); - } - } - } - -} - diff --git 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 deleted file mode 100644 index 8de8896..0000000 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * 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.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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -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 IS_IMMUTABLE = "immutable"; - - 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 META_TABLE_PARTITION_COLUMN_TYPES = "partition_columns.types"; - - 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"; - - public static final String TABLE_IS_TRANSACTIONAL = "transactional"; - - public static final String TABLE_NO_AUTO_COMPACT = "no_auto_compaction"; - - public static final String TABLE_TRANSACTIONAL_PROPERTIES = "transactional_properties"; - -} diff --git metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php deleted file mode 100644 index cc5e120..0000000 --- metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php +++ /dev/null @@ -1,46912 +0,0 @@ -send_getMetaConf($key); - return $this->recv_getMetaConf(); - } - - public function send_getMetaConf($key) - { - $args = new \metastore\ThriftHiveMetastore_getMetaConf_args(); - $args->key = $key; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'getMetaConf', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('getMetaConf', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_getMetaConf() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_getMetaConf_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_getMetaConf_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("getMetaConf failed: unknown result"); - } - - public function setMetaConf($key, $value) - { - $this->send_setMetaConf($key, $value); - $this->recv_setMetaConf(); - } - - public function send_setMetaConf($key, $value) - { - $args = new \metastore\ThriftHiveMetastore_setMetaConf_args(); - $args->key = $key; - $args->value = $value; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'setMetaConf', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('setMetaConf', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_setMetaConf() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_setMetaConf_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_setMetaConf_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->o1 !== null) { - throw $result->o1; - } - return; - } - - public function create_database(\metastore\Database $database) - { - $this->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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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_fields_with_environment_context($db_name, $table_name, \metastore\EnvironmentContext $environment_context) - { - $this->send_get_fields_with_environment_context($db_name, $table_name, $environment_context); - return $this->recv_get_fields_with_environment_context(); - } - - public function send_get_fields_with_environment_context($db_name, $table_name, \metastore\EnvironmentContext $environment_context) - { - $args = new \metastore\ThriftHiveMetastore_get_fields_with_environment_context_args(); - $args->db_name = $db_name; - $args->table_name = $table_name; - $args->environment_context = $environment_context; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_fields_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_fields_with_environment_context', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_fields_with_environment_context() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_fields_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_get_fields_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("get_fields_with_environment_context 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 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 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 get_schema_with_environment_context($db_name, $table_name, \metastore\EnvironmentContext $environment_context) - { - $this->send_get_schema_with_environment_context($db_name, $table_name, $environment_context); - return $this->recv_get_schema_with_environment_context(); - } - - public function send_get_schema_with_environment_context($db_name, $table_name, \metastore\EnvironmentContext $environment_context) - { - $args = new \metastore\ThriftHiveMetastore_get_schema_with_environment_context_args(); - $args->db_name = $db_name; - $args->table_name = $table_name; - $args->environment_context = $environment_context; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_schema_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_schema_with_environment_context', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_schema_with_environment_context() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_schema_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_get_schema_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("get_schema_with_environment_context 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 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 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 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 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 create_table_with_constraints(\metastore\Table $tbl, array $primaryKeys, array $foreignKeys, array $uniqueConstraints, array $notNullConstraints) - { - $this->send_create_table_with_constraints($tbl, $primaryKeys, $foreignKeys, $uniqueConstraints, $notNullConstraints); - $this->recv_create_table_with_constraints(); - } - - public function send_create_table_with_constraints(\metastore\Table $tbl, array $primaryKeys, array $foreignKeys, array $uniqueConstraints, array $notNullConstraints) - { - $args = new \metastore\ThriftHiveMetastore_create_table_with_constraints_args(); - $args->tbl = $tbl; - $args->primaryKeys = $primaryKeys; - $args->foreignKeys = $foreignKeys; - $args->uniqueConstraints = $uniqueConstraints; - $args->notNullConstraints = $notNullConstraints; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'create_table_with_constraints', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('create_table_with_constraints', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_create_table_with_constraints() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_create_table_with_constraints_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_constraints_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_constraint(\metastore\DropConstraintRequest $req) - { - $this->send_drop_constraint($req); - $this->recv_drop_constraint(); - } - - public function send_drop_constraint(\metastore\DropConstraintRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_drop_constraint_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'drop_constraint', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('drop_constraint', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_drop_constraint() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_constraint_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_constraint_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 add_primary_key(\metastore\AddPrimaryKeyRequest $req) - { - $this->send_add_primary_key($req); - $this->recv_add_primary_key(); - } - - public function send_add_primary_key(\metastore\AddPrimaryKeyRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_add_primary_key_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'add_primary_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('add_primary_key', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_add_primary_key() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_primary_key_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_primary_key_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_foreign_key(\metastore\AddForeignKeyRequest $req) - { - $this->send_add_foreign_key($req); - $this->recv_add_foreign_key(); - } - - public function send_add_foreign_key(\metastore\AddForeignKeyRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_add_foreign_key_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'add_foreign_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('add_foreign_key', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_add_foreign_key() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_foreign_key_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_foreign_key_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_unique_constraint(\metastore\AddUniqueConstraintRequest $req) - { - $this->send_add_unique_constraint($req); - $this->recv_add_unique_constraint(); - } - - public function send_add_unique_constraint(\metastore\AddUniqueConstraintRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_add_unique_constraint_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'add_unique_constraint', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('add_unique_constraint', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_add_unique_constraint() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_unique_constraint_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_unique_constraint_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_not_null_constraint(\metastore\AddNotNullConstraintRequest $req) - { - $this->send_add_not_null_constraint($req); - $this->recv_add_not_null_constraint(); - } - - public function send_add_not_null_constraint(\metastore\AddNotNullConstraintRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_add_not_null_constraint_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'add_not_null_constraint', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('add_not_null_constraint', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_add_not_null_constraint() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_not_null_constraint_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_not_null_constraint_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_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 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 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 drop_table_with_environment_context($dbname, $name, $deleteData, \metastore\EnvironmentContext $environment_context) - { - $this->send_drop_table_with_environment_context($dbname, $name, $deleteData, $environment_context); - $this->recv_drop_table_with_environment_context(); - } - - public function send_drop_table_with_environment_context($dbname, $name, $deleteData, \metastore\EnvironmentContext $environment_context) - { - $args = new \metastore\ThriftHiveMetastore_drop_table_with_environment_context_args(); - $args->dbname = $dbname; - $args->name = $name; - $args->deleteData = $deleteData; - $args->environment_context = $environment_context; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'drop_table_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('drop_table_with_environment_context', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_drop_table_with_environment_context() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_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_drop_table_with_environment_context_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 truncate_table($dbName, $tableName, array $partNames) - { - $this->send_truncate_table($dbName, $tableName, $partNames); - $this->recv_truncate_table(); - } - - public function send_truncate_table($dbName, $tableName, array $partNames) - { - $args = new \metastore\ThriftHiveMetastore_truncate_table_args(); - $args->dbName = $dbName; - $args->tableName = $tableName; - $args->partNames = $partNames; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'truncate_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('truncate_table', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_truncate_table() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_truncate_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_truncate_table_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->o1 !== null) { - throw $result->o1; - } - 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 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 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_tables_by_type($db_name, $pattern, $tableType) - { - $this->send_get_tables_by_type($db_name, $pattern, $tableType); - return $this->recv_get_tables_by_type(); - } - - public function send_get_tables_by_type($db_name, $pattern, $tableType) - { - $args = new \metastore\ThriftHiveMetastore_get_tables_by_type_args(); - $args->db_name = $db_name; - $args->pattern = $pattern; - $args->tableType = $tableType; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_tables_by_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_tables_by_type', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_tables_by_type() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_tables_by_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_tables_by_type_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_by_type failed: unknown result"); - } - - public function get_table_meta($db_patterns, $tbl_patterns, array $tbl_types) - { - $this->send_get_table_meta($db_patterns, $tbl_patterns, $tbl_types); - return $this->recv_get_table_meta(); - } - - public function send_get_table_meta($db_patterns, $tbl_patterns, array $tbl_types) - { - $args = new \metastore\ThriftHiveMetastore_get_table_meta_args(); - $args->db_patterns = $db_patterns; - $args->tbl_patterns = $tbl_patterns; - $args->tbl_types = $tbl_types; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_table_meta', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_table_meta', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_table_meta() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_meta_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_meta_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_table_meta 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 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 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 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 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, array $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, array $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 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 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; - } - throw new \Exception("get_table_objects_by_name failed: unknown result"); - } - - public function get_table_req(\metastore\GetTableRequest $req) - { - $this->send_get_table_req($req); - return $this->recv_get_table_req(); - } - - public function send_get_table_req(\metastore\GetTableRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_get_table_req_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_table_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_table_req', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_table_req() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_req_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_req_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_req failed: unknown result"); - } - - public function get_table_objects_by_name_req(\metastore\GetTablesRequest $req) - { - $this->send_get_table_objects_by_name_req($req); - return $this->recv_get_table_objects_by_name_req(); - } - - public function send_get_table_objects_by_name_req(\metastore\GetTablesRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_get_table_objects_by_name_req_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_table_objects_by_name_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_table_objects_by_name_req', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_table_objects_by_name_req() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_objects_by_name_req_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_req_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_req 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 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 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 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 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 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 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 alter_table_with_cascade($dbname, $tbl_name, \metastore\Table $new_tbl, $cascade) - { - $this->send_alter_table_with_cascade($dbname, $tbl_name, $new_tbl, $cascade); - $this->recv_alter_table_with_cascade(); - } - - public function send_alter_table_with_cascade($dbname, $tbl_name, \metastore\Table $new_tbl, $cascade) - { - $args = new \metastore\ThriftHiveMetastore_alter_table_with_cascade_args(); - $args->dbname = $dbname; - $args->tbl_name = $tbl_name; - $args->new_tbl = $new_tbl; - $args->cascade = $cascade; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'alter_table_with_cascade', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('alter_table_with_cascade', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_alter_table_with_cascade() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_table_with_cascade_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_cascade_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 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 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 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 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(array $new_parts) - { - $this->send_add_partitions($new_parts); - return $this->recv_add_partitions(); - } - - public function send_add_partitions(array $new_parts) - { - $args = new \metastore\ThriftHiveMetastore_add_partitions_args(); - $args->new_parts = $new_parts; - $bin_accel = ($this->output_ instanceof 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 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 add_partitions_pspec(array $new_parts) - { - $this->send_add_partitions_pspec($new_parts); - return $this->recv_add_partitions_pspec(); - } - - public function send_add_partitions_pspec(array $new_parts) - { - $args = new \metastore\ThriftHiveMetastore_add_partitions_pspec_args(); - $args->new_parts = $new_parts; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'add_partitions_pspec', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('add_partitions_pspec', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_add_partitions_pspec() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_partitions_pspec_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_pspec_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_pspec failed: unknown result"); - } - - public function append_partition($db_name, $tbl_name, array $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, array $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 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 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 add_partitions_req(\metastore\AddPartitionsRequest $request) - { - $this->send_add_partitions_req($request); - return $this->recv_add_partitions_req(); - } - - public function send_add_partitions_req(\metastore\AddPartitionsRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_add_partitions_req_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'add_partitions_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('add_partitions_req', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_add_partitions_req() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_partitions_req_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_req_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_req failed: unknown result"); - } - - public function append_partition_with_environment_context($db_name, $tbl_name, array $part_vals, \metastore\EnvironmentContext $environment_context) - { - $this->send_append_partition_with_environment_context($db_name, $tbl_name, $part_vals, $environment_context); - return $this->recv_append_partition_with_environment_context(); - } - - public function send_append_partition_with_environment_context($db_name, $tbl_name, array $part_vals, \metastore\EnvironmentContext $environment_context) - { - $args = new \metastore\ThriftHiveMetastore_append_partition_with_environment_context_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_vals = $part_vals; - $args->environment_context = $environment_context; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'append_partition_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('append_partition_with_environment_context', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_append_partition_with_environment_context() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_append_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_append_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("append_partition_with_environment_context 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 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 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 append_partition_by_name_with_environment_context($db_name, $tbl_name, $part_name, \metastore\EnvironmentContext $environment_context) - { - $this->send_append_partition_by_name_with_environment_context($db_name, $tbl_name, $part_name, $environment_context); - return $this->recv_append_partition_by_name_with_environment_context(); - } - - public function send_append_partition_by_name_with_environment_context($db_name, $tbl_name, $part_name, \metastore\EnvironmentContext $environment_context) - { - $args = new \metastore\ThriftHiveMetastore_append_partition_by_name_with_environment_context_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_name = $part_name; - $args->environment_context = $environment_context; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'append_partition_by_name_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('append_partition_by_name_with_environment_context', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_append_partition_by_name_with_environment_context() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_append_partition_by_name_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_append_partition_by_name_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("append_partition_by_name_with_environment_context failed: unknown result"); - } - - public function drop_partition($db_name, $tbl_name, array $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, array $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 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 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_with_environment_context($db_name, $tbl_name, array $part_vals, $deleteData, \metastore\EnvironmentContext $environment_context) - { - $this->send_drop_partition_with_environment_context($db_name, $tbl_name, $part_vals, $deleteData, $environment_context); - return $this->recv_drop_partition_with_environment_context(); - } - - public function send_drop_partition_with_environment_context($db_name, $tbl_name, array $part_vals, $deleteData, \metastore\EnvironmentContext $environment_context) - { - $args = new \metastore\ThriftHiveMetastore_drop_partition_with_environment_context_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_vals = $part_vals; - $args->deleteData = $deleteData; - $args->environment_context = $environment_context; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'drop_partition_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('drop_partition_with_environment_context', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_drop_partition_with_environment_context() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_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_drop_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; - } - throw new \Exception("drop_partition_with_environment_context 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 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 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 drop_partition_by_name_with_environment_context($db_name, $tbl_name, $part_name, $deleteData, \metastore\EnvironmentContext $environment_context) - { - $this->send_drop_partition_by_name_with_environment_context($db_name, $tbl_name, $part_name, $deleteData, $environment_context); - return $this->recv_drop_partition_by_name_with_environment_context(); - } - - public function send_drop_partition_by_name_with_environment_context($db_name, $tbl_name, $part_name, $deleteData, \metastore\EnvironmentContext $environment_context) - { - $args = new \metastore\ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_name = $part_name; - $args->deleteData = $deleteData; - $args->environment_context = $environment_context; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'drop_partition_by_name_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('drop_partition_by_name_with_environment_context', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_drop_partition_by_name_with_environment_context() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_partition_by_name_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_drop_partition_by_name_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; - } - throw new \Exception("drop_partition_by_name_with_environment_context failed: unknown result"); - } - - public function drop_partitions_req(\metastore\DropPartitionsRequest $req) - { - $this->send_drop_partitions_req($req); - return $this->recv_drop_partitions_req(); - } - - public function send_drop_partitions_req(\metastore\DropPartitionsRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_drop_partitions_req_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'drop_partitions_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('drop_partitions_req', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_drop_partitions_req() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_partitions_req_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_partitions_req_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_partitions_req failed: unknown result"); - } - - public function get_partition($db_name, $tbl_name, array $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, array $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 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 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 exchange_partition(array $partitionSpecs, $source_db, $source_table_name, $dest_db, $dest_table_name) - { - $this->send_exchange_partition($partitionSpecs, $source_db, $source_table_name, $dest_db, $dest_table_name); - return $this->recv_exchange_partition(); - } - - public function send_exchange_partition(array $partitionSpecs, $source_db, $source_table_name, $dest_db, $dest_table_name) - { - $args = new \metastore\ThriftHiveMetastore_exchange_partition_args(); - $args->partitionSpecs = $partitionSpecs; - $args->source_db = $source_db; - $args->source_table_name = $source_table_name; - $args->dest_db = $dest_db; - $args->dest_table_name = $dest_table_name; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'exchange_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('exchange_partition', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_exchange_partition() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_exchange_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_exchange_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; - } - if ($result->o4 !== null) { - throw $result->o4; - } - throw new \Exception("exchange_partition failed: unknown result"); - } - - public function exchange_partitions(array $partitionSpecs, $source_db, $source_table_name, $dest_db, $dest_table_name) - { - $this->send_exchange_partitions($partitionSpecs, $source_db, $source_table_name, $dest_db, $dest_table_name); - return $this->recv_exchange_partitions(); - } - - public function send_exchange_partitions(array $partitionSpecs, $source_db, $source_table_name, $dest_db, $dest_table_name) - { - $args = new \metastore\ThriftHiveMetastore_exchange_partitions_args(); - $args->partitionSpecs = $partitionSpecs; - $args->source_db = $source_db; - $args->source_table_name = $source_table_name; - $args->dest_db = $dest_db; - $args->dest_table_name = $dest_table_name; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'exchange_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('exchange_partitions', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_exchange_partitions() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_exchange_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_exchange_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; - } - if ($result->o4 !== null) { - throw $result->o4; - } - throw new \Exception("exchange_partitions failed: unknown result"); - } - - public function get_partition_with_auth($db_name, $tbl_name, array $part_vals, $user_name, array $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, array $part_vals, $user_name, array $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 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 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 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 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 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 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, array $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, array $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 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 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_partitions_pspec($db_name, $tbl_name, $max_parts) - { - $this->send_get_partitions_pspec($db_name, $tbl_name, $max_parts); - return $this->recv_get_partitions_pspec(); - } - - public function send_get_partitions_pspec($db_name, $tbl_name, $max_parts) - { - $args = new \metastore\ThriftHiveMetastore_get_partitions_pspec_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->max_parts = $max_parts; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_partitions_pspec', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_partitions_pspec', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_partitions_pspec() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_pspec_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_pspec_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_pspec 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 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 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, array $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, array $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 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 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, array $part_vals, $max_parts, $user_name, array $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, array $part_vals, $max_parts, $user_name, array $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 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 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, array $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, array $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 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 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 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 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_part_specs_by_filter($db_name, $tbl_name, $filter, $max_parts) - { - $this->send_get_part_specs_by_filter($db_name, $tbl_name, $filter, $max_parts); - return $this->recv_get_part_specs_by_filter(); - } - - public function send_get_part_specs_by_filter($db_name, $tbl_name, $filter, $max_parts) - { - $args = new \metastore\ThriftHiveMetastore_get_part_specs_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 TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_part_specs_by_filter', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_part_specs_by_filter', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_part_specs_by_filter() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_part_specs_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_part_specs_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_part_specs_by_filter failed: unknown result"); - } - - public function get_partitions_by_expr(\metastore\PartitionsByExprRequest $req) - { - $this->send_get_partitions_by_expr($req); - return $this->recv_get_partitions_by_expr(); - } - - public function send_get_partitions_by_expr(\metastore\PartitionsByExprRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_get_partitions_by_expr_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_partitions_by_expr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_partitions_by_expr', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_partitions_by_expr() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_by_expr_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_expr_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_expr failed: unknown result"); - } - - public function get_num_partitions_by_filter($db_name, $tbl_name, $filter) - { - $this->send_get_num_partitions_by_filter($db_name, $tbl_name, $filter); - return $this->recv_get_num_partitions_by_filter(); - } - - public function send_get_num_partitions_by_filter($db_name, $tbl_name, $filter) - { - $args = new \metastore\ThriftHiveMetastore_get_num_partitions_by_filter_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->filter = $filter; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_num_partitions_by_filter', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_num_partitions_by_filter', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_num_partitions_by_filter() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_num_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_num_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_num_partitions_by_filter failed: unknown result"); - } - - public function get_partitions_by_names($db_name, $tbl_name, array $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, array $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 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 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 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 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, array $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, array $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 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 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_partitions_with_environment_context($db_name, $tbl_name, array $new_parts, \metastore\EnvironmentContext $environment_context) - { - $this->send_alter_partitions_with_environment_context($db_name, $tbl_name, $new_parts, $environment_context); - $this->recv_alter_partitions_with_environment_context(); - } - - public function send_alter_partitions_with_environment_context($db_name, $tbl_name, array $new_parts, \metastore\EnvironmentContext $environment_context) - { - $args = new \metastore\ThriftHiveMetastore_alter_partitions_with_environment_context_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->new_parts = $new_parts; - $args->environment_context = $environment_context; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'alter_partitions_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('alter_partitions_with_environment_context', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_alter_partitions_with_environment_context() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_partitions_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_partitions_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 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 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 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, array $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, array $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 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 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 partition_name_has_valid_characters(array $part_vals, $throw_exception) - { - $this->send_partition_name_has_valid_characters($part_vals, $throw_exception); - return $this->recv_partition_name_has_valid_characters(); - } - - public function send_partition_name_has_valid_characters(array $part_vals, $throw_exception) - { - $args = new \metastore\ThriftHiveMetastore_partition_name_has_valid_characters_args(); - $args->part_vals = $part_vals; - $args->throw_exception = $throw_exception; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'partition_name_has_valid_characters', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('partition_name_has_valid_characters', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_partition_name_has_valid_characters() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_partition_name_has_valid_characters_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_has_valid_characters_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_has_valid_characters failed: unknown result"); - } - - 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 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 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 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 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 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 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, array $part_vals, $eventType) - { - $this->send_markPartitionForEvent($db_name, $tbl_name, $part_vals, $eventType); - $this->recv_markPartitionForEvent(); - } - - public function send_markPartitionForEvent($db_name, $tbl_name, array $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 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 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, array $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, array $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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 get_primary_keys(\metastore\PrimaryKeysRequest $request) - { - $this->send_get_primary_keys($request); - return $this->recv_get_primary_keys(); - } - - public function send_get_primary_keys(\metastore\PrimaryKeysRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_get_primary_keys_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_primary_keys', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_primary_keys', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_primary_keys() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_primary_keys_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_primary_keys_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_primary_keys failed: unknown result"); - } - - public function get_foreign_keys(\metastore\ForeignKeysRequest $request) - { - $this->send_get_foreign_keys($request); - return $this->recv_get_foreign_keys(); - } - - public function send_get_foreign_keys(\metastore\ForeignKeysRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_get_foreign_keys_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_foreign_keys', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_foreign_keys', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_foreign_keys() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_foreign_keys_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_foreign_keys_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_foreign_keys failed: unknown result"); - } - - public function get_unique_constraints(\metastore\UniqueConstraintsRequest $request) - { - $this->send_get_unique_constraints($request); - return $this->recv_get_unique_constraints(); - } - - public function send_get_unique_constraints(\metastore\UniqueConstraintsRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_get_unique_constraints_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_unique_constraints', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_unique_constraints', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_unique_constraints() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_unique_constraints_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_unique_constraints_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_unique_constraints failed: unknown result"); - } - - public function get_not_null_constraints(\metastore\NotNullConstraintsRequest $request) - { - $this->send_get_not_null_constraints($request); - return $this->recv_get_not_null_constraints(); - } - - public function send_get_not_null_constraints(\metastore\NotNullConstraintsRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_get_not_null_constraints_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_not_null_constraints', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_not_null_constraints', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_not_null_constraints() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_not_null_constraints_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_not_null_constraints_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_not_null_constraints failed: unknown result"); - } - - public function update_table_column_statistics(\metastore\ColumnStatistics $stats_obj) - { - $this->send_update_table_column_statistics($stats_obj); - return $this->recv_update_table_column_statistics(); - } - - public function send_update_table_column_statistics(\metastore\ColumnStatistics $stats_obj) - { - $args = new \metastore\ThriftHiveMetastore_update_table_column_statistics_args(); - $args->stats_obj = $stats_obj; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'update_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('update_table_column_statistics', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_update_table_column_statistics() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_update_table_column_statistics_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_update_table_column_statistics_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; - } - throw new \Exception("update_table_column_statistics failed: unknown result"); - } - - public function update_partition_column_statistics(\metastore\ColumnStatistics $stats_obj) - { - $this->send_update_partition_column_statistics($stats_obj); - return $this->recv_update_partition_column_statistics(); - } - - public function send_update_partition_column_statistics(\metastore\ColumnStatistics $stats_obj) - { - $args = new \metastore\ThriftHiveMetastore_update_partition_column_statistics_args(); - $args->stats_obj = $stats_obj; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'update_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('update_partition_column_statistics', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_update_partition_column_statistics() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_update_partition_column_statistics_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_update_partition_column_statistics_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; - } - throw new \Exception("update_partition_column_statistics failed: unknown result"); - } - - public function get_table_column_statistics($db_name, $tbl_name, $col_name) - { - $this->send_get_table_column_statistics($db_name, $tbl_name, $col_name); - return $this->recv_get_table_column_statistics(); - } - - public function send_get_table_column_statistics($db_name, $tbl_name, $col_name) - { - $args = new \metastore\ThriftHiveMetastore_get_table_column_statistics_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->col_name = $col_name; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_table_column_statistics', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_table_column_statistics() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_column_statistics_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_column_statistics_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; - } - throw new \Exception("get_table_column_statistics failed: unknown result"); - } - - public function get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) - { - $this->send_get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name); - return $this->recv_get_partition_column_statistics(); - } - - public function send_get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) - { - $args = new \metastore\ThriftHiveMetastore_get_partition_column_statistics_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_name = $part_name; - $args->col_name = $col_name; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_partition_column_statistics', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_partition_column_statistics() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partition_column_statistics_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_column_statistics_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; - } - throw new \Exception("get_partition_column_statistics failed: unknown result"); - } - - public function get_table_statistics_req(\metastore\TableStatsRequest $request) - { - $this->send_get_table_statistics_req($request); - return $this->recv_get_table_statistics_req(); - } - - public function send_get_table_statistics_req(\metastore\TableStatsRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_get_table_statistics_req_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_table_statistics_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_table_statistics_req', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_table_statistics_req() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_statistics_req_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_statistics_req_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_statistics_req failed: unknown result"); - } - - public function get_partitions_statistics_req(\metastore\PartitionsStatsRequest $request) - { - $this->send_get_partitions_statistics_req($request); - return $this->recv_get_partitions_statistics_req(); - } - - public function send_get_partitions_statistics_req(\metastore\PartitionsStatsRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_get_partitions_statistics_req_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_partitions_statistics_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_partitions_statistics_req', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_partitions_statistics_req() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_statistics_req_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_statistics_req_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_statistics_req failed: unknown result"); - } - - public function get_aggr_stats_for(\metastore\PartitionsStatsRequest $request) - { - $this->send_get_aggr_stats_for($request); - return $this->recv_get_aggr_stats_for(); - } - - public function send_get_aggr_stats_for(\metastore\PartitionsStatsRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_get_aggr_stats_for_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_aggr_stats_for', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_aggr_stats_for', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_aggr_stats_for() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_aggr_stats_for_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_aggr_stats_for_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_aggr_stats_for failed: unknown result"); - } - - public function set_aggr_stats_for(\metastore\SetPartitionsStatsRequest $request) - { - $this->send_set_aggr_stats_for($request); - return $this->recv_set_aggr_stats_for(); - } - - public function send_set_aggr_stats_for(\metastore\SetPartitionsStatsRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_set_aggr_stats_for_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'set_aggr_stats_for', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('set_aggr_stats_for', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_set_aggr_stats_for() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_set_aggr_stats_for_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_aggr_stats_for_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; - } - throw new \Exception("set_aggr_stats_for failed: unknown result"); - } - - public function delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) - { - $this->send_delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name); - return $this->recv_delete_partition_column_statistics(); - } - - public function send_delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) - { - $args = new \metastore\ThriftHiveMetastore_delete_partition_column_statistics_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_name = $part_name; - $args->col_name = $col_name; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'delete_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('delete_partition_column_statistics', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_delete_partition_column_statistics() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_delete_partition_column_statistics_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_delete_partition_column_statistics_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; - } - throw new \Exception("delete_partition_column_statistics failed: unknown result"); - } - - public function delete_table_column_statistics($db_name, $tbl_name, $col_name) - { - $this->send_delete_table_column_statistics($db_name, $tbl_name, $col_name); - return $this->recv_delete_table_column_statistics(); - } - - public function send_delete_table_column_statistics($db_name, $tbl_name, $col_name) - { - $args = new \metastore\ThriftHiveMetastore_delete_table_column_statistics_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->col_name = $col_name; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'delete_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('delete_table_column_statistics', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_delete_table_column_statistics() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_delete_table_column_statistics_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_delete_table_column_statistics_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; - } - throw new \Exception("delete_table_column_statistics failed: unknown result"); - } - - public function create_function(\metastore\Function $func) - { - $this->send_create_function($func); - $this->recv_create_function(); - } - - public function send_create_function(\metastore\Function $func) - { - $args = new \metastore\ThriftHiveMetastore_create_function_args(); - $args->func = $func; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'create_function', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('create_function', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_create_function() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_create_function_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_function_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_function($dbName, $funcName) - { - $this->send_drop_function($dbName, $funcName); - $this->recv_drop_function(); - } - - public function send_drop_function($dbName, $funcName) - { - $args = new \metastore\ThriftHiveMetastore_drop_function_args(); - $args->dbName = $dbName; - $args->funcName = $funcName; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'drop_function', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('drop_function', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_drop_function() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_function_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_function_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 alter_function($dbName, $funcName, \metastore\Function $newFunc) - { - $this->send_alter_function($dbName, $funcName, $newFunc); - $this->recv_alter_function(); - } - - public function send_alter_function($dbName, $funcName, \metastore\Function $newFunc) - { - $args = new \metastore\ThriftHiveMetastore_alter_function_args(); - $args->dbName = $dbName; - $args->funcName = $funcName; - $args->newFunc = $newFunc; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'alter_function', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('alter_function', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_alter_function() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_function_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_function_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_functions($dbName, $pattern) - { - $this->send_get_functions($dbName, $pattern); - return $this->recv_get_functions(); - } - - public function send_get_functions($dbName, $pattern) - { - $args = new \metastore\ThriftHiveMetastore_get_functions_args(); - $args->dbName = $dbName; - $args->pattern = $pattern; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_functions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_functions', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_functions() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_functions_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_functions_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_functions failed: unknown result"); - } - - public function get_function($dbName, $funcName) - { - $this->send_get_function($dbName, $funcName); - return $this->recv_get_function(); - } - - public function send_get_function($dbName, $funcName) - { - $args = new \metastore\ThriftHiveMetastore_get_function_args(); - $args->dbName = $dbName; - $args->funcName = $funcName; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_function', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_function', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_function() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_function_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_function_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_function failed: unknown result"); - } - - public function get_all_functions() - { - $this->send_get_all_functions(); - return $this->recv_get_all_functions(); - } - - public function send_get_all_functions() - { - $args = new \metastore\ThriftHiveMetastore_get_all_functions_args(); - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_all_functions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_all_functions', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_all_functions() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_all_functions_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_functions_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_functions 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 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 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 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 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 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 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 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 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 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 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 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 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 grant_revoke_role(\metastore\GrantRevokeRoleRequest $request) - { - $this->send_grant_revoke_role($request); - return $this->recv_grant_revoke_role(); - } - - public function send_grant_revoke_role(\metastore\GrantRevokeRoleRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_grant_revoke_role_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'grant_revoke_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('grant_revoke_role', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_grant_revoke_role() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_grant_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_grant_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("grant_revoke_role failed: unknown result"); - } - - public function get_principals_in_role(\metastore\GetPrincipalsInRoleRequest $request) - { - $this->send_get_principals_in_role($request); - return $this->recv_get_principals_in_role(); - } - - public function send_get_principals_in_role(\metastore\GetPrincipalsInRoleRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_get_principals_in_role_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_principals_in_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_principals_in_role', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_principals_in_role() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_principals_in_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_get_principals_in_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("get_principals_in_role failed: unknown result"); - } - - public function get_role_grants_for_principal(\metastore\GetRoleGrantsForPrincipalRequest $request) - { - $this->send_get_role_grants_for_principal($request); - return $this->recv_get_role_grants_for_principal(); - } - - public function send_get_role_grants_for_principal(\metastore\GetRoleGrantsForPrincipalRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_get_role_grants_for_principal_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_role_grants_for_principal', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_role_grants_for_principal', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_role_grants_for_principal() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_role_grants_for_principal_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_grants_for_principal_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_grants_for_principal failed: unknown result"); - } - - public function get_privilege_set(\metastore\HiveObjectRef $hiveObject, $user_name, array $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, array $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 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 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 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 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 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 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 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 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 grant_revoke_privileges(\metastore\GrantRevokePrivilegeRequest $request) - { - $this->send_grant_revoke_privileges($request); - return $this->recv_grant_revoke_privileges(); - } - - public function send_grant_revoke_privileges(\metastore\GrantRevokePrivilegeRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_grant_revoke_privileges_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'grant_revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('grant_revoke_privileges', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_grant_revoke_privileges() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_grant_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_grant_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("grant_revoke_privileges failed: unknown result"); - } - - public function set_ugi($user_name, array $group_names) - { - $this->send_set_ugi($user_name, $group_names); - return $this->recv_set_ugi(); - } - - public function send_set_ugi($user_name, array $group_names) - { - $args = new \metastore\ThriftHiveMetastore_set_ugi_args(); - $args->user_name = $user_name; - $args->group_names = $group_names; - $bin_accel = ($this->output_ instanceof 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 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 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 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 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 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 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 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; - } - - public function add_token($token_identifier, $delegation_token) - { - $this->send_add_token($token_identifier, $delegation_token); - return $this->recv_add_token(); - } - - public function send_add_token($token_identifier, $delegation_token) - { - $args = new \metastore\ThriftHiveMetastore_add_token_args(); - $args->token_identifier = $token_identifier; - $args->delegation_token = $delegation_token; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'add_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('add_token', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_add_token() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_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_add_token_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("add_token failed: unknown result"); - } - - public function remove_token($token_identifier) - { - $this->send_remove_token($token_identifier); - return $this->recv_remove_token(); - } - - public function send_remove_token($token_identifier) - { - $args = new \metastore\ThriftHiveMetastore_remove_token_args(); - $args->token_identifier = $token_identifier; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'remove_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('remove_token', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_remove_token() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_remove_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_remove_token_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("remove_token failed: unknown result"); - } - - public function get_token($token_identifier) - { - $this->send_get_token($token_identifier); - return $this->recv_get_token(); - } - - public function send_get_token($token_identifier) - { - $args = new \metastore\ThriftHiveMetastore_get_token_args(); - $args->token_identifier = $token_identifier; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_token', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_token() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_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_token_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("get_token failed: unknown result"); - } - - public function get_all_token_identifiers() - { - $this->send_get_all_token_identifiers(); - return $this->recv_get_all_token_identifiers(); - } - - public function send_get_all_token_identifiers() - { - $args = new \metastore\ThriftHiveMetastore_get_all_token_identifiers_args(); - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_all_token_identifiers', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_all_token_identifiers', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_all_token_identifiers() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_all_token_identifiers_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_token_identifiers_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("get_all_token_identifiers failed: unknown result"); - } - - public function add_master_key($key) - { - $this->send_add_master_key($key); - return $this->recv_add_master_key(); - } - - public function send_add_master_key($key) - { - $args = new \metastore\ThriftHiveMetastore_add_master_key_args(); - $args->key = $key; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'add_master_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('add_master_key', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_add_master_key() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_master_key_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_master_key_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("add_master_key failed: unknown result"); - } - - public function update_master_key($seq_number, $key) - { - $this->send_update_master_key($seq_number, $key); - $this->recv_update_master_key(); - } - - public function send_update_master_key($seq_number, $key) - { - $args = new \metastore\ThriftHiveMetastore_update_master_key_args(); - $args->seq_number = $seq_number; - $args->key = $key; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'update_master_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('update_master_key', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_update_master_key() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_update_master_key_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_update_master_key_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 remove_master_key($key_seq) - { - $this->send_remove_master_key($key_seq); - return $this->recv_remove_master_key(); - } - - public function send_remove_master_key($key_seq) - { - $args = new \metastore\ThriftHiveMetastore_remove_master_key_args(); - $args->key_seq = $key_seq; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'remove_master_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('remove_master_key', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_remove_master_key() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_remove_master_key_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_remove_master_key_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("remove_master_key failed: unknown result"); - } - - public function get_master_keys() - { - $this->send_get_master_keys(); - return $this->recv_get_master_keys(); - } - - public function send_get_master_keys() - { - $args = new \metastore\ThriftHiveMetastore_get_master_keys_args(); - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_master_keys', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_master_keys', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_master_keys() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_master_keys_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_master_keys_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("get_master_keys failed: unknown result"); - } - - public function get_open_txns() - { - $this->send_get_open_txns(); - return $this->recv_get_open_txns(); - } - - public function send_get_open_txns() - { - $args = new \metastore\ThriftHiveMetastore_get_open_txns_args(); - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_open_txns', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_open_txns', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_open_txns() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_open_txns_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_open_txns_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("get_open_txns failed: unknown result"); - } - - public function get_open_txns_info() - { - $this->send_get_open_txns_info(); - return $this->recv_get_open_txns_info(); - } - - public function send_get_open_txns_info() - { - $args = new \metastore\ThriftHiveMetastore_get_open_txns_info_args(); - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_open_txns_info', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_open_txns_info', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_open_txns_info() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_open_txns_info_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_open_txns_info_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("get_open_txns_info failed: unknown result"); - } - - public function open_txns(\metastore\OpenTxnRequest $rqst) - { - $this->send_open_txns($rqst); - return $this->recv_open_txns(); - } - - public function send_open_txns(\metastore\OpenTxnRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_open_txns_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'open_txns', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('open_txns', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_open_txns() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_open_txns_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_open_txns_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("open_txns failed: unknown result"); - } - - public function abort_txn(\metastore\AbortTxnRequest $rqst) - { - $this->send_abort_txn($rqst); - $this->recv_abort_txn(); - } - - public function send_abort_txn(\metastore\AbortTxnRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_abort_txn_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'abort_txn', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('abort_txn', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_abort_txn() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_abort_txn_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_abort_txn_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->o1 !== null) { - throw $result->o1; - } - return; - } - - public function abort_txns(\metastore\AbortTxnsRequest $rqst) - { - $this->send_abort_txns($rqst); - $this->recv_abort_txns(); - } - - public function send_abort_txns(\metastore\AbortTxnsRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_abort_txns_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'abort_txns', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('abort_txns', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_abort_txns() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_abort_txns_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_abort_txns_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->o1 !== null) { - throw $result->o1; - } - return; - } - - public function commit_txn(\metastore\CommitTxnRequest $rqst) - { - $this->send_commit_txn($rqst); - $this->recv_commit_txn(); - } - - public function send_commit_txn(\metastore\CommitTxnRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_commit_txn_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'commit_txn', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('commit_txn', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_commit_txn() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_commit_txn_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_commit_txn_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 lock(\metastore\LockRequest $rqst) - { - $this->send_lock($rqst); - return $this->recv_lock(); - } - - public function send_lock(\metastore\LockRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_lock_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'lock', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('lock', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_lock() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_lock_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_lock_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("lock failed: unknown result"); - } - - public function check_lock(\metastore\CheckLockRequest $rqst) - { - $this->send_check_lock($rqst); - return $this->recv_check_lock(); - } - - public function send_check_lock(\metastore\CheckLockRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_check_lock_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'check_lock', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('check_lock', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_check_lock() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_check_lock_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_check_lock_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("check_lock failed: unknown result"); - } - - public function unlock(\metastore\UnlockRequest $rqst) - { - $this->send_unlock($rqst); - $this->recv_unlock(); - } - - public function send_unlock(\metastore\UnlockRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_unlock_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'unlock', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('unlock', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_unlock() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_unlock_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_unlock_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 show_locks(\metastore\ShowLocksRequest $rqst) - { - $this->send_show_locks($rqst); - return $this->recv_show_locks(); - } - - public function send_show_locks(\metastore\ShowLocksRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_show_locks_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'show_locks', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('show_locks', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_show_locks() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_show_locks_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_show_locks_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("show_locks failed: unknown result"); - } - - public function heartbeat(\metastore\HeartbeatRequest $ids) - { - $this->send_heartbeat($ids); - $this->recv_heartbeat(); - } - - public function send_heartbeat(\metastore\HeartbeatRequest $ids) - { - $args = new \metastore\ThriftHiveMetastore_heartbeat_args(); - $args->ids = $ids; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'heartbeat', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('heartbeat', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_heartbeat() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_heartbeat_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_heartbeat_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 heartbeat_txn_range(\metastore\HeartbeatTxnRangeRequest $txns) - { - $this->send_heartbeat_txn_range($txns); - return $this->recv_heartbeat_txn_range(); - } - - public function send_heartbeat_txn_range(\metastore\HeartbeatTxnRangeRequest $txns) - { - $args = new \metastore\ThriftHiveMetastore_heartbeat_txn_range_args(); - $args->txns = $txns; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'heartbeat_txn_range', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('heartbeat_txn_range', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_heartbeat_txn_range() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_heartbeat_txn_range_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_heartbeat_txn_range_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("heartbeat_txn_range failed: unknown result"); - } - - public function compact(\metastore\CompactionRequest $rqst) - { - $this->send_compact($rqst); - $this->recv_compact(); - } - - public function send_compact(\metastore\CompactionRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_compact_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'compact', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('compact', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_compact() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_compact_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_compact_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - return; - } - - public function compact2(\metastore\CompactionRequest $rqst) - { - $this->send_compact2($rqst); - return $this->recv_compact2(); - } - - public function send_compact2(\metastore\CompactionRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_compact2_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'compact2', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('compact2', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_compact2() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_compact2_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_compact2_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("compact2 failed: unknown result"); - } - - public function show_compact(\metastore\ShowCompactRequest $rqst) - { - $this->send_show_compact($rqst); - return $this->recv_show_compact(); - } - - public function send_show_compact(\metastore\ShowCompactRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_show_compact_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'show_compact', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('show_compact', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_show_compact() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_show_compact_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_show_compact_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("show_compact failed: unknown result"); - } - - public function add_dynamic_partitions(\metastore\AddDynamicPartitions $rqst) - { - $this->send_add_dynamic_partitions($rqst); - $this->recv_add_dynamic_partitions(); - } - - public function send_add_dynamic_partitions(\metastore\AddDynamicPartitions $rqst) - { - $args = new \metastore\ThriftHiveMetastore_add_dynamic_partitions_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'add_dynamic_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('add_dynamic_partitions', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_add_dynamic_partitions() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_dynamic_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_dynamic_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 get_next_notification(\metastore\NotificationEventRequest $rqst) - { - $this->send_get_next_notification($rqst); - return $this->recv_get_next_notification(); - } - - public function send_get_next_notification(\metastore\NotificationEventRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_get_next_notification_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_next_notification', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_next_notification', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_next_notification() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_next_notification_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_next_notification_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("get_next_notification failed: unknown result"); - } - - public function get_current_notificationEventId() - { - $this->send_get_current_notificationEventId(); - return $this->recv_get_current_notificationEventId(); - } - - public function send_get_current_notificationEventId() - { - $args = new \metastore\ThriftHiveMetastore_get_current_notificationEventId_args(); - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_current_notificationEventId', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_current_notificationEventId', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_current_notificationEventId() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_current_notificationEventId_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_current_notificationEventId_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("get_current_notificationEventId failed: unknown result"); - } - - public function fire_listener_event(\metastore\FireEventRequest $rqst) - { - $this->send_fire_listener_event($rqst); - return $this->recv_fire_listener_event(); - } - - public function send_fire_listener_event(\metastore\FireEventRequest $rqst) - { - $args = new \metastore\ThriftHiveMetastore_fire_listener_event_args(); - $args->rqst = $rqst; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'fire_listener_event', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('fire_listener_event', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_fire_listener_event() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_fire_listener_event_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_fire_listener_event_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("fire_listener_event failed: unknown result"); - } - - public function flushCache() - { - $this->send_flushCache(); - $this->recv_flushCache(); - } - - public function send_flushCache() - { - $args = new \metastore\ThriftHiveMetastore_flushCache_args(); - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'flushCache', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('flushCache', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_flushCache() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_flushCache_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_flushCache_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - return; - } - - public function cm_recycle(\metastore\CmRecycleRequest $request) - { - $this->send_cm_recycle($request); - return $this->recv_cm_recycle(); - } - - public function send_cm_recycle(\metastore\CmRecycleRequest $request) - { - $args = new \metastore\ThriftHiveMetastore_cm_recycle_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'cm_recycle', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('cm_recycle', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_cm_recycle() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_cm_recycle_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_cm_recycle_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("cm_recycle failed: unknown result"); - } - - public function get_file_metadata_by_expr(\metastore\GetFileMetadataByExprRequest $req) - { - $this->send_get_file_metadata_by_expr($req); - return $this->recv_get_file_metadata_by_expr(); - } - - public function send_get_file_metadata_by_expr(\metastore\GetFileMetadataByExprRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_get_file_metadata_by_expr_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_file_metadata_by_expr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_file_metadata_by_expr', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_file_metadata_by_expr() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_file_metadata_by_expr_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_file_metadata_by_expr_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("get_file_metadata_by_expr failed: unknown result"); - } - - public function get_file_metadata(\metastore\GetFileMetadataRequest $req) - { - $this->send_get_file_metadata($req); - return $this->recv_get_file_metadata(); - } - - public function send_get_file_metadata(\metastore\GetFileMetadataRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_get_file_metadata_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_file_metadata', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_file_metadata', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_file_metadata() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_file_metadata_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_file_metadata_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("get_file_metadata failed: unknown result"); - } - - public function put_file_metadata(\metastore\PutFileMetadataRequest $req) - { - $this->send_put_file_metadata($req); - return $this->recv_put_file_metadata(); - } - - public function send_put_file_metadata(\metastore\PutFileMetadataRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_put_file_metadata_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'put_file_metadata', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('put_file_metadata', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_put_file_metadata() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_put_file_metadata_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_put_file_metadata_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("put_file_metadata failed: unknown result"); - } - - public function clear_file_metadata(\metastore\ClearFileMetadataRequest $req) - { - $this->send_clear_file_metadata($req); - return $this->recv_clear_file_metadata(); - } - - public function send_clear_file_metadata(\metastore\ClearFileMetadataRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_clear_file_metadata_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'clear_file_metadata', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('clear_file_metadata', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_clear_file_metadata() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_clear_file_metadata_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_clear_file_metadata_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("clear_file_metadata failed: unknown result"); - } - - public function cache_file_metadata(\metastore\CacheFileMetadataRequest $req) - { - $this->send_cache_file_metadata($req); - return $this->recv_cache_file_metadata(); - } - - public function send_cache_file_metadata(\metastore\CacheFileMetadataRequest $req) - { - $args = new \metastore\ThriftHiveMetastore_cache_file_metadata_args(); - $args->req = $req; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'cache_file_metadata', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('cache_file_metadata', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_cache_file_metadata() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_cache_file_metadata_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_cache_file_metadata_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("cache_file_metadata failed: unknown result"); - } - - public function get_metastore_db_uuid() - { - $this->send_get_metastore_db_uuid(); - return $this->recv_get_metastore_db_uuid(); - } - - public function send_get_metastore_db_uuid() - { - $args = new \metastore\ThriftHiveMetastore_get_metastore_db_uuid_args(); - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_metastore_db_uuid', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_metastore_db_uuid', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_metastore_db_uuid() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_metastore_db_uuid_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_metastore_db_uuid_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_metastore_db_uuid failed: unknown result"); - } - -} - -// HELPER FUNCTIONS AND STRUCTURES - -class ThriftHiveMetastore_getMetaConf_args { - static $_TSPEC; - - /** - * @var string - */ - public $key = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'key', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['key'])) { - $this->key = $vals['key']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_getMetaConf_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->key); - } 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_getMetaConf_args'); - if ($this->key !== null) { - $xfer += $output->writeFieldBegin('key', TType::STRING, 1); - $xfer += $output->writeString($this->key); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_getMetaConf_result { - static $_TSPEC; - - /** - * @var string - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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_getMetaConf_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_getMetaConf_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_setMetaConf_args { - static $_TSPEC; - - /** - * @var string - */ - public $key = null; - /** - * @var string - */ - public $value = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'key', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'value', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['key'])) { - $this->key = $vals['key']; - } - if (isset($vals['value'])) { - $this->value = $vals['value']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_setMetaConf_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->key); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->value); - } 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_setMetaConf_args'); - if ($this->key !== null) { - $xfer += $output->writeFieldBegin('key', TType::STRING, 1); - $xfer += $output->writeString($this->key); - $xfer += $output->writeFieldEnd(); - } - if ($this->value !== null) { - $xfer += $output->writeFieldBegin('value', TType::STRING, 2); - $xfer += $output->writeString($this->value); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_setMetaConf_result { - static $_TSPEC; - - /** - * @var \metastore\MetaException - */ - 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_setMetaConf_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_setMetaConf_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; - } - -} - -class ThriftHiveMetastore_create_database_args { - static $_TSPEC; - - /** - * @var \metastore\Database - */ - 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; - - /** - * @var \metastore\AlreadyExistsException - */ - public $o1 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var \metastore\Database - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - public $name = null; - /** - * @var bool - */ - public $deleteData = null; - /** - * @var bool - */ - 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; - - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\InvalidOperationException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size624 = 0; - $_etype627 = 0; - $xfer += $input->readListBegin($_etype627, $_size624); - for ($_i628 = 0; $_i628 < $_size624; ++$_i628) - { - $elem629 = null; - $xfer += $input->readString($elem629); - $this->success []= $elem629; - } - $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 $iter630) - { - $xfer += $output->writeString($iter630); - } - } - $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; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size631 = 0; - $_etype634 = 0; - $xfer += $input->readListBegin($_etype634, $_size631); - for ($_i635 = 0; $_i635 < $_size631; ++$_i635) - { - $elem636 = null; - $xfer += $input->readString($elem636); - $this->success []= $elem636; - } - $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 $iter637) - { - $xfer += $output->writeString($iter637); - } - } - $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; - - /** - * @var string - */ - public $dbname = null; - /** - * @var \metastore\Database - */ - 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; - - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var \metastore\Type - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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; - - /** - * @var \metastore\Type - */ - 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; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\AlreadyExistsException - */ - public $o1 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var array - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size638 = 0; - $_ktype639 = 0; - $_vtype640 = 0; - $xfer += $input->readMapBegin($_ktype639, $_vtype640, $_size638); - for ($_i642 = 0; $_i642 < $_size638; ++$_i642) - { - $key643 = ''; - $val644 = new \metastore\Type(); - $xfer += $input->readString($key643); - $val644 = new \metastore\Type(); - $xfer += $val644->read($input); - $this->success[$key643] = $val644; - } - $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 $kiter645 => $viter646) - { - $xfer += $output->writeString($kiter645); - $xfer += $viter646->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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - 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; - - /** - * @var \metastore\FieldSchema[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\UnknownTableException - */ - public $o2 = null; - /** - * @var \metastore\UnknownDBException - */ - 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(); - $_size647 = 0; - $_etype650 = 0; - $xfer += $input->readListBegin($_etype650, $_size647); - for ($_i651 = 0; $_i651 < $_size647; ++$_i651) - { - $elem652 = null; - $elem652 = new \metastore\FieldSchema(); - $xfer += $elem652->read($input); - $this->success []= $elem652; - } - $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 $iter653) - { - $xfer += $iter653->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_fields_with_environment_context_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $table_name = null; - /** - * @var \metastore\EnvironmentContext - */ - 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' => 'table_name', - 'type' => TType::STRING, - ), - 3 => 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['table_name'])) { - $this->table_name = $vals['table_name']; - } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_fields_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->table_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - 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_get_fields_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->table_name !== null) { - $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); - $xfer += $output->writeString($this->table_name); - $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, 3); - $xfer += $this->environment_context->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_fields_with_environment_context_result { - static $_TSPEC; - - /** - * @var \metastore\FieldSchema[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\UnknownTableException - */ - public $o2 = null; - /** - * @var \metastore\UnknownDBException - */ - 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_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::LST) { - $this->success = array(); - $_size654 = 0; - $_etype657 = 0; - $xfer += $input->readListBegin($_etype657, $_size654); - for ($_i658 = 0; $_i658 < $_size654; ++$_i658) - { - $elem659 = null; - $elem659 = new \metastore\FieldSchema(); - $xfer += $elem659->read($input); - $this->success []= $elem659; - } - $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_with_environment_context_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 $iter660) - { - $xfer += $iter660->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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - 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; - - /** - * @var \metastore\FieldSchema[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\UnknownTableException - */ - public $o2 = null; - /** - * @var \metastore\UnknownDBException - */ - 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(); - $_size661 = 0; - $_etype664 = 0; - $xfer += $input->readListBegin($_etype664, $_size661); - for ($_i665 = 0; $_i665 < $_size661; ++$_i665) - { - $elem666 = null; - $elem666 = new \metastore\FieldSchema(); - $xfer += $elem666->read($input); - $this->success []= $elem666; - } - $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 $iter667) - { - $xfer += $iter667->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_with_environment_context_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $table_name = null; - /** - * @var \metastore\EnvironmentContext - */ - 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' => 'table_name', - 'type' => TType::STRING, - ), - 3 => 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['table_name'])) { - $this->table_name = $vals['table_name']; - } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_schema_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->table_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - 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_get_schema_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->table_name !== null) { - $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); - $xfer += $output->writeString($this->table_name); - $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, 3); - $xfer += $this->environment_context->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_schema_with_environment_context_result { - static $_TSPEC; - - /** - * @var \metastore\FieldSchema[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\UnknownTableException - */ - public $o2 = null; - /** - * @var \metastore\UnknownDBException - */ - 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_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::LST) { - $this->success = array(); - $_size668 = 0; - $_etype671 = 0; - $xfer += $input->readListBegin($_etype671, $_size668); - for ($_i672 = 0; $_i672 < $_size668; ++$_i672) - { - $elem673 = null; - $elem673 = new \metastore\FieldSchema(); - $xfer += $elem673->read($input); - $this->success []= $elem673; - } - $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_with_environment_context_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 $iter674) - { - $xfer += $iter674->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; - - /** - * @var \metastore\Table - */ - 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; - - /** - * @var \metastore\AlreadyExistsException - */ - public $o1 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - public $o3 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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; - - /** - * @var \metastore\Table - */ - public $tbl = null; - /** - * @var \metastore\EnvironmentContext - */ - 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; - - /** - * @var \metastore\AlreadyExistsException - */ - public $o1 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - public $o3 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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_create_table_with_constraints_args { - static $_TSPEC; - - /** - * @var \metastore\Table - */ - public $tbl = null; - /** - * @var \metastore\SQLPrimaryKey[] - */ - public $primaryKeys = null; - /** - * @var \metastore\SQLForeignKey[] - */ - public $foreignKeys = null; - /** - * @var \metastore\SQLUniqueConstraint[] - */ - public $uniqueConstraints = null; - /** - * @var \metastore\SQLNotNullConstraint[] - */ - public $notNullConstraints = 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' => 'primaryKeys', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\SQLPrimaryKey', - ), - ), - 3 => array( - 'var' => 'foreignKeys', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\SQLForeignKey', - ), - ), - 4 => array( - 'var' => 'uniqueConstraints', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\SQLUniqueConstraint', - ), - ), - 5 => array( - 'var' => 'notNullConstraints', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\SQLNotNullConstraint', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tbl'])) { - $this->tbl = $vals['tbl']; - } - if (isset($vals['primaryKeys'])) { - $this->primaryKeys = $vals['primaryKeys']; - } - if (isset($vals['foreignKeys'])) { - $this->foreignKeys = $vals['foreignKeys']; - } - if (isset($vals['uniqueConstraints'])) { - $this->uniqueConstraints = $vals['uniqueConstraints']; - } - if (isset($vals['notNullConstraints'])) { - $this->notNullConstraints = $vals['notNullConstraints']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_create_table_with_constraints_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::LST) { - $this->primaryKeys = array(); - $_size675 = 0; - $_etype678 = 0; - $xfer += $input->readListBegin($_etype678, $_size675); - for ($_i679 = 0; $_i679 < $_size675; ++$_i679) - { - $elem680 = null; - $elem680 = new \metastore\SQLPrimaryKey(); - $xfer += $elem680->read($input); - $this->primaryKeys []= $elem680; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->foreignKeys = array(); - $_size681 = 0; - $_etype684 = 0; - $xfer += $input->readListBegin($_etype684, $_size681); - for ($_i685 = 0; $_i685 < $_size681; ++$_i685) - { - $elem686 = null; - $elem686 = new \metastore\SQLForeignKey(); - $xfer += $elem686->read($input); - $this->foreignKeys []= $elem686; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::LST) { - $this->uniqueConstraints = array(); - $_size687 = 0; - $_etype690 = 0; - $xfer += $input->readListBegin($_etype690, $_size687); - for ($_i691 = 0; $_i691 < $_size687; ++$_i691) - { - $elem692 = null; - $elem692 = new \metastore\SQLUniqueConstraint(); - $xfer += $elem692->read($input); - $this->uniqueConstraints []= $elem692; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::LST) { - $this->notNullConstraints = array(); - $_size693 = 0; - $_etype696 = 0; - $xfer += $input->readListBegin($_etype696, $_size693); - for ($_i697 = 0; $_i697 < $_size693; ++$_i697) - { - $elem698 = null; - $elem698 = new \metastore\SQLNotNullConstraint(); - $xfer += $elem698->read($input); - $this->notNullConstraints []= $elem698; - } - $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_create_table_with_constraints_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->primaryKeys !== null) { - if (!is_array($this->primaryKeys)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('primaryKeys', TType::LST, 2); - { - $output->writeListBegin(TType::STRUCT, count($this->primaryKeys)); - { - foreach ($this->primaryKeys as $iter699) - { - $xfer += $iter699->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->foreignKeys !== null) { - if (!is_array($this->foreignKeys)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('foreignKeys', TType::LST, 3); - { - $output->writeListBegin(TType::STRUCT, count($this->foreignKeys)); - { - foreach ($this->foreignKeys as $iter700) - { - $xfer += $iter700->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->uniqueConstraints !== null) { - if (!is_array($this->uniqueConstraints)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('uniqueConstraints', TType::LST, 4); - { - $output->writeListBegin(TType::STRUCT, count($this->uniqueConstraints)); - { - foreach ($this->uniqueConstraints as $iter701) - { - $xfer += $iter701->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->notNullConstraints !== null) { - if (!is_array($this->notNullConstraints)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('notNullConstraints', TType::LST, 5); - { - $output->writeListBegin(TType::STRUCT, count($this->notNullConstraints)); - { - foreach ($this->notNullConstraints as $iter702) - { - $xfer += $iter702->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_create_table_with_constraints_result { - static $_TSPEC; - - /** - * @var \metastore\AlreadyExistsException - */ - public $o1 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - public $o3 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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_constraints_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_constraints_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_constraint_args { - static $_TSPEC; - - /** - * @var \metastore\DropConstraintRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\DropConstraintRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_drop_constraint_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->req = new \metastore\DropConstraintRequest(); - $xfer += $this->req->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_constraint_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_drop_constraint_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_constraint_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_constraint_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_add_primary_key_args { - static $_TSPEC; - - /** - * @var \metastore\AddPrimaryKeyRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\AddPrimaryKeyRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_add_primary_key_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->req = new \metastore\AddPrimaryKeyRequest(); - $xfer += $this->req->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_primary_key_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_add_primary_key_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = 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\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_add_primary_key_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\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_add_primary_key_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_foreign_key_args { - static $_TSPEC; - - /** - * @var \metastore\AddForeignKeyRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\AddForeignKeyRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_add_foreign_key_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->req = new \metastore\AddForeignKeyRequest(); - $xfer += $this->req->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_foreign_key_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_add_foreign_key_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = 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\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_add_foreign_key_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\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_add_foreign_key_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_unique_constraint_args { - static $_TSPEC; - - /** - * @var \metastore\AddUniqueConstraintRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\AddUniqueConstraintRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_add_unique_constraint_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->req = new \metastore\AddUniqueConstraintRequest(); - $xfer += $this->req->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_unique_constraint_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_add_unique_constraint_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = 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\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_add_unique_constraint_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\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_add_unique_constraint_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_not_null_constraint_args { - static $_TSPEC; - - /** - * @var \metastore\AddNotNullConstraintRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\AddNotNullConstraintRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_add_not_null_constraint_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->req = new \metastore\AddNotNullConstraintRequest(); - $xfer += $this->req->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_not_null_constraint_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_add_not_null_constraint_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = 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\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_add_not_null_constraint_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\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_add_not_null_constraint_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_table_args { - static $_TSPEC; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $name = null; - /** - * @var bool - */ - 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; - - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_drop_table_with_environment_context_args { - static $_TSPEC; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $name = null; - /** - * @var bool - */ - public $deleteData = null; - /** - * @var \metastore\EnvironmentContext - */ - 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' => 'name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), - 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['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; - } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_drop_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->name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); - } 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_drop_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->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(); - } - 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_drop_table_with_environment_context_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_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\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_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->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_truncate_table_args { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tableName = null; - /** - * @var string[] - */ - public $partNames = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tableName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'partNames', - '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['tableName'])) { - $this->tableName = $vals['tableName']; - } - if (isset($vals['partNames'])) { - $this->partNames = $vals['partNames']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_truncate_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->tableName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->partNames = array(); - $_size703 = 0; - $_etype706 = 0; - $xfer += $input->readListBegin($_etype706, $_size703); - for ($_i707 = 0; $_i707 < $_size703; ++$_i707) - { - $elem708 = null; - $xfer += $input->readString($elem708); - $this->partNames []= $elem708; - } - $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_truncate_table_args'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tableName !== null) { - $xfer += $output->writeFieldBegin('tableName', TType::STRING, 2); - $xfer += $output->writeString($this->tableName); - $xfer += $output->writeFieldEnd(); - } - if ($this->partNames !== null) { - if (!is_array($this->partNames)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partNames', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->partNames)); - { - foreach ($this->partNames as $iter709) - { - $xfer += $output->writeString($iter709); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_truncate_table_result { - static $_TSPEC; - - /** - * @var \metastore\MetaException - */ - 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_truncate_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\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_truncate_table_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; - } - -} - -class ThriftHiveMetastore_get_tables_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - 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; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size710 = 0; - $_etype713 = 0; - $xfer += $input->readListBegin($_etype713, $_size710); - for ($_i714 = 0; $_i714 < $_size710; ++$_i714) - { - $elem715 = null; - $xfer += $input->readString($elem715); - $this->success []= $elem715; - } - $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 $iter716) - { - $xfer += $output->writeString($iter716); - } - } - $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_tables_by_type_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $pattern = null; - /** - * @var string - */ - public $tableType = 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, - ), - 3 => array( - 'var' => 'tableType', - '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']; - } - if (isset($vals['tableType'])) { - $this->tableType = $vals['tableType']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_tables_by_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->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; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tableType); - } 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_by_type_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(); - } - if ($this->tableType !== null) { - $xfer += $output->writeFieldBegin('tableType', TType::STRING, 3); - $xfer += $output->writeString($this->tableType); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_tables_by_type_result { - static $_TSPEC; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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_by_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::LST) { - $this->success = array(); - $_size717 = 0; - $_etype720 = 0; - $xfer += $input->readListBegin($_etype720, $_size717); - for ($_i721 = 0; $_i721 < $_size717; ++$_i721) - { - $elem722 = null; - $xfer += $input->readString($elem722); - $this->success []= $elem722; - } - $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_by_type_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 $iter723) - { - $xfer += $output->writeString($iter723); - } - } - $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_meta_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_patterns = null; - /** - * @var string - */ - public $tbl_patterns = null; - /** - * @var string[] - */ - public $tbl_types = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'db_patterns', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_patterns', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'tbl_types', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['db_patterns'])) { - $this->db_patterns = $vals['db_patterns']; - } - if (isset($vals['tbl_patterns'])) { - $this->tbl_patterns = $vals['tbl_patterns']; - } - if (isset($vals['tbl_types'])) { - $this->tbl_types = $vals['tbl_types']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_table_meta_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_patterns); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_patterns); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->tbl_types = array(); - $_size724 = 0; - $_etype727 = 0; - $xfer += $input->readListBegin($_etype727, $_size724); - for ($_i728 = 0; $_i728 < $_size724; ++$_i728) - { - $elem729 = null; - $xfer += $input->readString($elem729); - $this->tbl_types []= $elem729; - } - $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_meta_args'); - if ($this->db_patterns !== null) { - $xfer += $output->writeFieldBegin('db_patterns', TType::STRING, 1); - $xfer += $output->writeString($this->db_patterns); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_patterns !== null) { - $xfer += $output->writeFieldBegin('tbl_patterns', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_patterns); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_types !== null) { - if (!is_array($this->tbl_types)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tbl_types', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->tbl_types)); - { - foreach ($this->tbl_types as $iter730) - { - $xfer += $output->writeString($iter730); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_table_meta_result { - static $_TSPEC; - - /** - * @var \metastore\TableMeta[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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\TableMeta', - ), - ), - 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_table_meta_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(); - $_size731 = 0; - $_etype734 = 0; - $xfer += $input->readListBegin($_etype734, $_size731); - for ($_i735 = 0; $_i735 < $_size731; ++$_i735) - { - $elem736 = null; - $elem736 = new \metastore\TableMeta(); - $xfer += $elem736->read($input); - $this->success []= $elem736; - } - $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_table_meta_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 $iter737) - { - $xfer += $iter737->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_all_tables_args { - static $_TSPEC; - - /** - * @var string - */ - 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; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size738 = 0; - $_etype741 = 0; - $xfer += $input->readListBegin($_etype741, $_size738); - for ($_i742 = 0; $_i742 < $_size738; ++$_i742) - { - $elem743 = null; - $xfer += $input->readString($elem743); - $this->success []= $elem743; - } - $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 $iter744) - { - $xfer += $output->writeString($iter744); - } - } - $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; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - 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; - - /** - * @var \metastore\Table - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string[] - */ - 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(); - $_size745 = 0; - $_etype748 = 0; - $xfer += $input->readListBegin($_etype748, $_size745); - for ($_i749 = 0; $_i749 < $_size745; ++$_i749) - { - $elem750 = null; - $xfer += $input->readString($elem750); - $this->tbl_names []= $elem750; - } - $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 $iter751) - { - $xfer += $output->writeString($iter751); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_table_objects_by_name_result { - static $_TSPEC; - - /** - * @var \metastore\Table[] - */ - public $success = 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', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - 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(); - $_size752 = 0; - $_etype755 = 0; - $xfer += $input->readListBegin($_etype755, $_size752); - for ($_i756 = 0; $_i756 < $_size752; ++$_i756) - { - $elem757 = null; - $elem757 = new \metastore\Table(); - $xfer += $elem757->read($input); - $this->success []= $elem757; - } - $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_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 $iter758) - { - $xfer += $iter758->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_table_req_args { - static $_TSPEC; - - /** - * @var \metastore\GetTableRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetTableRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_table_req_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->req = new \metastore\GetTableRequest(); - $xfer += $this->req->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_req_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_table_req_result { - static $_TSPEC; - - /** - * @var \metastore\GetTableResult - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetTableResult', - ), - 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_req_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\GetTableResult(); - $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_req_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_req_args { - static $_TSPEC; - - /** - * @var \metastore\GetTablesRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetTablesRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_table_objects_by_name_req_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->req = new \metastore\GetTablesRequest(); - $xfer += $this->req->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_req_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_table_objects_by_name_req_result { - static $_TSPEC; - - /** - * @var \metastore\GetTablesResult - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\InvalidOperationException - */ - public $o2 = null; - /** - * @var \metastore\UnknownDBException - */ - public $o3 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetTablesResult', - ), - 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_req_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\GetTablesResult(); - $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\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_req_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_get_table_names_by_filter_args { - static $_TSPEC; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $filter = null; - /** - * @var int - */ - 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; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\InvalidOperationException - */ - public $o2 = null; - /** - * @var \metastore\UnknownDBException - */ - 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(); - $_size759 = 0; - $_etype762 = 0; - $xfer += $input->readListBegin($_etype762, $_size759); - for ($_i763 = 0; $_i763 < $_size759; ++$_i763) - { - $elem764 = null; - $xfer += $input->readString($elem764); - $this->success []= $elem764; - } - $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 $iter765) - { - $xfer += $output->writeString($iter765); - } - } - $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; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var \metastore\Table - */ - 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; - - /** - * @var \metastore\InvalidOperationException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var \metastore\Table - */ - public $new_tbl = null; - /** - * @var \metastore\EnvironmentContext - */ - 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; - - /** - * @var \metastore\InvalidOperationException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_alter_table_with_cascade_args { - static $_TSPEC; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var \metastore\Table - */ - public $new_tbl = null; - /** - * @var bool - */ - public $cascade = 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' => 'cascade', - 'type' => TType::BOOL, - ), - ); - } - 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['cascade'])) { - $this->cascade = $vals['cascade']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_alter_table_with_cascade_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::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_alter_table_with_cascade_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->cascade !== null) { - $xfer += $output->writeFieldBegin('cascade', TType::BOOL, 4); - $xfer += $output->writeBool($this->cascade); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_alter_table_with_cascade_result { - static $_TSPEC; - - /** - * @var \metastore\InvalidOperationException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_cascade_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_cascade_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; - - /** - * @var \metastore\Partition - */ - 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; - - /** - * @var \metastore\Partition - */ - public $success = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o1 = null; - /** - * @var \metastore\AlreadyExistsException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var \metastore\Partition - */ - public $new_part = null; - /** - * @var \metastore\EnvironmentContext - */ - 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; - - /** - * @var \metastore\Partition - */ - public $success = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o1 = null; - /** - * @var \metastore\AlreadyExistsException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var \metastore\Partition[] - */ - 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(); - $_size766 = 0; - $_etype769 = 0; - $xfer += $input->readListBegin($_etype769, $_size766); - for ($_i770 = 0; $_i770 < $_size766; ++$_i770) - { - $elem771 = null; - $elem771 = new \metastore\Partition(); - $xfer += $elem771->read($input); - $this->new_parts []= $elem771; - } - $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 $iter772) - { - $xfer += $iter772->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_add_partitions_result { - static $_TSPEC; - - /** - * @var int - */ - public $success = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o1 = null; - /** - * @var \metastore\AlreadyExistsException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - 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_add_partitions_pspec_args { - static $_TSPEC; - - /** - * @var \metastore\PartitionSpec[] - */ - 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\PartitionSpec', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['new_parts'])) { - $this->new_parts = $vals['new_parts']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_add_partitions_pspec_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(); - $_size773 = 0; - $_etype776 = 0; - $xfer += $input->readListBegin($_etype776, $_size773); - for ($_i777 = 0; $_i777 < $_size773; ++$_i777) - { - $elem778 = null; - $elem778 = new \metastore\PartitionSpec(); - $xfer += $elem778->read($input); - $this->new_parts []= $elem778; - } - $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_pspec_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 $iter779) - { - $xfer += $iter779->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_add_partitions_pspec_result { - static $_TSPEC; - - /** - * @var int - */ - public $success = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o1 = null; - /** - * @var \metastore\AlreadyExistsException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - 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_pspec_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_pspec_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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string[] - */ - 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(); - $_size780 = 0; - $_etype783 = 0; - $xfer += $input->readListBegin($_etype783, $_size780); - for ($_i784 = 0; $_i784 < $_size780; ++$_i784) - { - $elem785 = null; - $xfer += $input->readString($elem785); - $this->part_vals []= $elem785; - } - $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 $iter786) - { - $xfer += $output->writeString($iter786); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_append_partition_result { - static $_TSPEC; - - /** - * @var \metastore\Partition - */ - public $success = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o1 = null; - /** - * @var \metastore\AlreadyExistsException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - 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_add_partitions_req_args { - static $_TSPEC; - - /** - * @var \metastore\AddPartitionsRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\AddPartitionsRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_add_partitions_req_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->request = new \metastore\AddPartitionsRequest(); - $xfer += $this->request->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_req_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_add_partitions_req_result { - static $_TSPEC; - - /** - * @var \metastore\AddPartitionsResult - */ - public $success = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o1 = null; - /** - * @var \metastore\AlreadyExistsException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - public $o3 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\AddPartitionsResult', - ), - 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_req_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\AddPartitionsResult(); - $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_partitions_req_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_with_environment_context_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string[] - */ - public $part_vals = null; - /** - * @var \metastore\EnvironmentContext - */ - 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' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 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['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_append_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::LST) { - $this->part_vals = array(); - $_size787 = 0; - $_etype790 = 0; - $xfer += $input->readListBegin($_etype790, $_size787); - for ($_i791 = 0; $_i791 < $_size787; ++$_i791) - { - $elem792 = null; - $xfer += $input->readString($elem792); - $this->part_vals []= $elem792; - } - $xfer += $input->readListEnd(); - } 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_append_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->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 $iter793) - { - $xfer += $output->writeString($iter793); - } - } - $output->writeListEnd(); - } - $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_append_partition_with_environment_context_result { - static $_TSPEC; - - /** - * @var \metastore\Partition - */ - public $success = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o1 = null; - /** - * @var \metastore\AlreadyExistsException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - 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_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_append_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_append_partition_by_name_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - 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; - - /** - * @var \metastore\Partition - */ - public $success = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o1 = null; - /** - * @var \metastore\AlreadyExistsException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - 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_append_partition_by_name_with_environment_context_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - public $part_name = null; - /** - * @var \metastore\EnvironmentContext - */ - 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' => 'part_name', - 'type' => TType::STRING, - ), - 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['part_name'])) { - $this->part_name = $vals['part_name']; - } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_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::STRING) { - $xfer += $input->readString($this->part_name); - } 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_append_partition_by_name_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->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); - $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_append_partition_by_name_with_environment_context_result { - static $_TSPEC; - - /** - * @var \metastore\Partition - */ - public $success = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o1 = null; - /** - * @var \metastore\AlreadyExistsException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - 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_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_append_partition_by_name_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_drop_partition_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string[] - */ - public $part_vals = null; - /** - * @var bool - */ - 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(); - $_size794 = 0; - $_etype797 = 0; - $xfer += $input->readListBegin($_etype797, $_size794); - for ($_i798 = 0; $_i798 < $_size794; ++$_i798) - { - $elem799 = null; - $xfer += $input->readString($elem799); - $this->part_vals []= $elem799; - } - $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 $iter800) - { - $xfer += $output->writeString($iter800); - } - } - $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; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_with_environment_context_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string[] - */ - public $part_vals = null; - /** - * @var bool - */ - public $deleteData = null; - /** - * @var \metastore\EnvironmentContext - */ - 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' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), - 5 => 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['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; - } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_drop_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::LST) { - $this->part_vals = array(); - $_size801 = 0; - $_etype804 = 0; - $xfer += $input->readListBegin($_etype804, $_size801); - for ($_i805 = 0; $_i805 < $_size801; ++$_i805) - { - $elem806 = null; - $xfer += $input->readString($elem806); - $this->part_vals []= $elem806; - } - $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; - case 5: - 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_drop_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->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 $iter807) - { - $xfer += $output->writeString($iter807); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); - $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, 5); - $xfer += $this->environment_context->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_drop_partition_with_environment_context_result { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_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::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_with_environment_context_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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - public $part_name = null; - /** - * @var bool - */ - 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; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_drop_partition_by_name_with_environment_context_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - public $part_name = null; - /** - * @var bool - */ - public $deleteData = null; - /** - * @var \metastore\EnvironmentContext - */ - 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' => 'part_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), - 5 => 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['part_name'])) { - $this->part_name = $vals['part_name']; - } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; - } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_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::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; - case 5: - 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_drop_partition_by_name_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->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(); - } - 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, 5); - $xfer += $this->environment_context->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_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::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_with_environment_context_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_partitions_req_args { - static $_TSPEC; - - /** - * @var \metastore\DropPartitionsRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\DropPartitionsRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_drop_partitions_req_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->req = new \metastore\DropPartitionsRequest(); - $xfer += $this->req->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_partitions_req_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_drop_partitions_req_result { - static $_TSPEC; - - /** - * @var \metastore\DropPartitionsResult - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\DropPartitionsResult', - ), - 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_partitions_req_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\DropPartitionsResult(); - $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_drop_partitions_req_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_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string[] - */ - 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(); - $_size808 = 0; - $_etype811 = 0; - $xfer += $input->readListBegin($_etype811, $_size808); - for ($_i812 = 0; $_i812 < $_size808; ++$_i812) - { - $elem813 = null; - $xfer += $input->readString($elem813); - $this->part_vals []= $elem813; - } - $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 $iter814) - { - $xfer += $output->writeString($iter814); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_partition_result { - static $_TSPEC; - - /** - * @var \metastore\Partition - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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_exchange_partition_args { - static $_TSPEC; - - /** - * @var array - */ - public $partitionSpecs = null; - /** - * @var string - */ - public $source_db = null; - /** - * @var string - */ - public $source_table_name = null; - /** - * @var string - */ - public $dest_db = null; - /** - * @var string - */ - public $dest_table_name = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'partitionSpecs', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 2 => array( - 'var' => 'source_db', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'source_table_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'dest_db', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'dest_table_name', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['partitionSpecs'])) { - $this->partitionSpecs = $vals['partitionSpecs']; - } - if (isset($vals['source_db'])) { - $this->source_db = $vals['source_db']; - } - if (isset($vals['source_table_name'])) { - $this->source_table_name = $vals['source_table_name']; - } - if (isset($vals['dest_db'])) { - $this->dest_db = $vals['dest_db']; - } - if (isset($vals['dest_table_name'])) { - $this->dest_table_name = $vals['dest_table_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_exchange_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::MAP) { - $this->partitionSpecs = array(); - $_size815 = 0; - $_ktype816 = 0; - $_vtype817 = 0; - $xfer += $input->readMapBegin($_ktype816, $_vtype817, $_size815); - for ($_i819 = 0; $_i819 < $_size815; ++$_i819) - { - $key820 = ''; - $val821 = ''; - $xfer += $input->readString($key820); - $xfer += $input->readString($val821); - $this->partitionSpecs[$key820] = $val821; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->source_db); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->source_table_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dest_db); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dest_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_exchange_partition_args'); - if ($this->partitionSpecs !== null) { - if (!is_array($this->partitionSpecs)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partitionSpecs', TType::MAP, 1); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->partitionSpecs)); - { - foreach ($this->partitionSpecs as $kiter822 => $viter823) - { - $xfer += $output->writeString($kiter822); - $xfer += $output->writeString($viter823); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->source_db !== null) { - $xfer += $output->writeFieldBegin('source_db', TType::STRING, 2); - $xfer += $output->writeString($this->source_db); - $xfer += $output->writeFieldEnd(); - } - if ($this->source_table_name !== null) { - $xfer += $output->writeFieldBegin('source_table_name', TType::STRING, 3); - $xfer += $output->writeString($this->source_table_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->dest_db !== null) { - $xfer += $output->writeFieldBegin('dest_db', TType::STRING, 4); - $xfer += $output->writeString($this->dest_db); - $xfer += $output->writeFieldEnd(); - } - if ($this->dest_table_name !== null) { - $xfer += $output->writeFieldBegin('dest_table_name', TType::STRING, 5); - $xfer += $output->writeString($this->dest_table_name); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_exchange_partition_result { - static $_TSPEC; - - /** - * @var \metastore\Partition - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o2 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o3 = null; - /** - * @var \metastore\InvalidInputException - */ - public $o4 = 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', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidInputException', - ), - ); - } - 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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_exchange_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; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\InvalidObjectException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new \metastore\InvalidInputException(); - $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_exchange_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(); - } - 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_exchange_partitions_args { - static $_TSPEC; - - /** - * @var array - */ - public $partitionSpecs = null; - /** - * @var string - */ - public $source_db = null; - /** - * @var string - */ - public $source_table_name = null; - /** - * @var string - */ - public $dest_db = null; - /** - * @var string - */ - public $dest_table_name = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'partitionSpecs', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 2 => array( - 'var' => 'source_db', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'source_table_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'dest_db', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'dest_table_name', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['partitionSpecs'])) { - $this->partitionSpecs = $vals['partitionSpecs']; - } - if (isset($vals['source_db'])) { - $this->source_db = $vals['source_db']; - } - if (isset($vals['source_table_name'])) { - $this->source_table_name = $vals['source_table_name']; - } - if (isset($vals['dest_db'])) { - $this->dest_db = $vals['dest_db']; - } - if (isset($vals['dest_table_name'])) { - $this->dest_table_name = $vals['dest_table_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_exchange_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::MAP) { - $this->partitionSpecs = array(); - $_size824 = 0; - $_ktype825 = 0; - $_vtype826 = 0; - $xfer += $input->readMapBegin($_ktype825, $_vtype826, $_size824); - for ($_i828 = 0; $_i828 < $_size824; ++$_i828) - { - $key829 = ''; - $val830 = ''; - $xfer += $input->readString($key829); - $xfer += $input->readString($val830); - $this->partitionSpecs[$key829] = $val830; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->source_db); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->source_table_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dest_db); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dest_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_exchange_partitions_args'); - if ($this->partitionSpecs !== null) { - if (!is_array($this->partitionSpecs)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partitionSpecs', TType::MAP, 1); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->partitionSpecs)); - { - foreach ($this->partitionSpecs as $kiter831 => $viter832) - { - $xfer += $output->writeString($kiter831); - $xfer += $output->writeString($viter832); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->source_db !== null) { - $xfer += $output->writeFieldBegin('source_db', TType::STRING, 2); - $xfer += $output->writeString($this->source_db); - $xfer += $output->writeFieldEnd(); - } - if ($this->source_table_name !== null) { - $xfer += $output->writeFieldBegin('source_table_name', TType::STRING, 3); - $xfer += $output->writeString($this->source_table_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->dest_db !== null) { - $xfer += $output->writeFieldBegin('dest_db', TType::STRING, 4); - $xfer += $output->writeString($this->dest_db); - $xfer += $output->writeFieldEnd(); - } - if ($this->dest_table_name !== null) { - $xfer += $output->writeFieldBegin('dest_table_name', TType::STRING, 5); - $xfer += $output->writeString($this->dest_table_name); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_exchange_partitions_result { - static $_TSPEC; - - /** - * @var \metastore\Partition[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o2 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o3 = null; - /** - * @var \metastore\InvalidInputException - */ - public $o4 = 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', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidInputException', - ), - ); - } - 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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_exchange_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(); - $_size833 = 0; - $_etype836 = 0; - $xfer += $input->readListBegin($_etype836, $_size833); - for ($_i837 = 0; $_i837 < $_size833; ++$_i837) - { - $elem838 = null; - $elem838 = new \metastore\Partition(); - $xfer += $elem838->read($input); - $this->success []= $elem838; - } - $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; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\InvalidObjectException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new \metastore\InvalidInputException(); - $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_exchange_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 $iter839) - { - $xfer += $iter839->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(); - } - 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_get_partition_with_auth_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string[] - */ - public $part_vals = null; - /** - * @var string - */ - public $user_name = null; - /** - * @var string[] - */ - 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(); - $_size840 = 0; - $_etype843 = 0; - $xfer += $input->readListBegin($_etype843, $_size840); - for ($_i844 = 0; $_i844 < $_size840; ++$_i844) - { - $elem845 = null; - $xfer += $input->readString($elem845); - $this->part_vals []= $elem845; - } - $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(); - $_size846 = 0; - $_etype849 = 0; - $xfer += $input->readListBegin($_etype849, $_size846); - for ($_i850 = 0; $_i850 < $_size846; ++$_i850) - { - $elem851 = null; - $xfer += $input->readString($elem851); - $this->group_names []= $elem851; - } - $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 $iter852) - { - $xfer += $output->writeString($iter852); - } - } - $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 $iter853) - { - $xfer += $output->writeString($iter853); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_partition_with_auth_result { - static $_TSPEC; - - /** - * @var \metastore\Partition - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - 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; - - /** - * @var \metastore\Partition - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var int - */ - 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; - - /** - * @var \metastore\Partition[] - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size854 = 0; - $_etype857 = 0; - $xfer += $input->readListBegin($_etype857, $_size854); - for ($_i858 = 0; $_i858 < $_size854; ++$_i858) - { - $elem859 = null; - $elem859 = new \metastore\Partition(); - $xfer += $elem859->read($input); - $this->success []= $elem859; - } - $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 $iter860) - { - $xfer += $iter860->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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var int - */ - public $max_parts = -1; - /** - * @var string - */ - public $user_name = null; - /** - * @var string[] - */ - 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(); - $_size861 = 0; - $_etype864 = 0; - $xfer += $input->readListBegin($_etype864, $_size861); - for ($_i865 = 0; $_i865 < $_size861; ++$_i865) - { - $elem866 = null; - $xfer += $input->readString($elem866); - $this->group_names []= $elem866; - } - $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 $iter867) - { - $xfer += $output->writeString($iter867); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_partitions_with_auth_result { - static $_TSPEC; - - /** - * @var \metastore\Partition[] - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size868 = 0; - $_etype871 = 0; - $xfer += $input->readListBegin($_etype871, $_size868); - for ($_i872 = 0; $_i872 < $_size868; ++$_i872) - { - $elem873 = null; - $elem873 = new \metastore\Partition(); - $xfer += $elem873->read($input); - $this->success []= $elem873; - } - $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 $iter874) - { - $xfer += $iter874->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_pspec_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var int - */ - 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::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['max_parts'])) { - $this->max_parts = $vals['max_parts']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partitions_pspec_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::I32) { - $xfer += $input->readI32($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_pspec_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::I32, 3); - $xfer += $output->writeI32($this->max_parts); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_partitions_pspec_result { - static $_TSPEC; - - /** - * @var \metastore\PartitionSpec[] - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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\PartitionSpec', - ), - ), - 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_pspec_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(); - $_size875 = 0; - $_etype878 = 0; - $xfer += $input->readListBegin($_etype878, $_size875); - for ($_i879 = 0; $_i879 < $_size875; ++$_i879) - { - $elem880 = null; - $elem880 = new \metastore\PartitionSpec(); - $xfer += $elem880->read($input); - $this->success []= $elem880; - } - $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_pspec_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 $iter881) - { - $xfer += $iter881->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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var int - */ - 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; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size882 = 0; - $_etype885 = 0; - $xfer += $input->readListBegin($_etype885, $_size882); - for ($_i886 = 0; $_i886 < $_size882; ++$_i886) - { - $elem887 = null; - $xfer += $input->readString($elem887); - $this->success []= $elem887; - } - $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 $iter888) - { - $xfer += $output->writeString($iter888); - } - } - $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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string[] - */ - public $part_vals = null; - /** - * @var int - */ - 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(); - $_size889 = 0; - $_etype892 = 0; - $xfer += $input->readListBegin($_etype892, $_size889); - for ($_i893 = 0; $_i893 < $_size889; ++$_i893) - { - $elem894 = null; - $xfer += $input->readString($elem894); - $this->part_vals []= $elem894; - } - $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 $iter895) - { - $xfer += $output->writeString($iter895); - } - } - $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; - - /** - * @var \metastore\Partition[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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(); - $_size896 = 0; - $_etype899 = 0; - $xfer += $input->readListBegin($_etype899, $_size896); - for ($_i900 = 0; $_i900 < $_size896; ++$_i900) - { - $elem901 = null; - $elem901 = new \metastore\Partition(); - $xfer += $elem901->read($input); - $this->success []= $elem901; - } - $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 $iter902) - { - $xfer += $iter902->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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string[] - */ - public $part_vals = null; - /** - * @var int - */ - public $max_parts = -1; - /** - * @var string - */ - public $user_name = null; - /** - * @var string[] - */ - 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(); - $_size903 = 0; - $_etype906 = 0; - $xfer += $input->readListBegin($_etype906, $_size903); - for ($_i907 = 0; $_i907 < $_size903; ++$_i907) - { - $elem908 = null; - $xfer += $input->readString($elem908); - $this->part_vals []= $elem908; - } - $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(); - $_size909 = 0; - $_etype912 = 0; - $xfer += $input->readListBegin($_etype912, $_size909); - for ($_i913 = 0; $_i913 < $_size909; ++$_i913) - { - $elem914 = null; - $xfer += $input->readString($elem914); - $this->group_names []= $elem914; - } - $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 $iter915) - { - $xfer += $output->writeString($iter915); - } - } - $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 $iter916) - { - $xfer += $output->writeString($iter916); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_partitions_ps_with_auth_result { - static $_TSPEC; - - /** - * @var \metastore\Partition[] - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size917 = 0; - $_etype920 = 0; - $xfer += $input->readListBegin($_etype920, $_size917); - for ($_i921 = 0; $_i921 < $_size917; ++$_i921) - { - $elem922 = null; - $elem922 = new \metastore\Partition(); - $xfer += $elem922->read($input); - $this->success []= $elem922; - } - $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 $iter923) - { - $xfer += $iter923->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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string[] - */ - public $part_vals = null; - /** - * @var int - */ - 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(); - $_size924 = 0; - $_etype927 = 0; - $xfer += $input->readListBegin($_etype927, $_size924); - for ($_i928 = 0; $_i928 < $_size924; ++$_i928) - { - $elem929 = null; - $xfer += $input->readString($elem929); - $this->part_vals []= $elem929; - } - $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 $iter930) - { - $xfer += $output->writeString($iter930); - } - } - $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; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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(); - $_size931 = 0; - $_etype934 = 0; - $xfer += $input->readListBegin($_etype934, $_size931); - for ($_i935 = 0; $_i935 < $_size931; ++$_i935) - { - $elem936 = null; - $xfer += $input->readString($elem936); - $this->success []= $elem936; - } - $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 $iter937) - { - $xfer += $output->writeString($iter937); - } - } - $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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - public $filter = null; - /** - * @var int - */ - 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; - - /** - * @var \metastore\Partition[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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(); - $_size938 = 0; - $_etype941 = 0; - $xfer += $input->readListBegin($_etype941, $_size938); - for ($_i942 = 0; $_i942 < $_size938; ++$_i942) - { - $elem943 = null; - $elem943 = new \metastore\Partition(); - $xfer += $elem943->read($input); - $this->success []= $elem943; - } - $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 $iter944) - { - $xfer += $iter944->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_part_specs_by_filter_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - public $filter = null; - /** - * @var int - */ - 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::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['filter'])) { - $this->filter = $vals['filter']; - } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_part_specs_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::I32) { - $xfer += $input->readI32($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_part_specs_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::I32, 4); - $xfer += $output->writeI32($this->max_parts); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_part_specs_by_filter_result { - static $_TSPEC; - - /** - * @var \metastore\PartitionSpec[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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\PartitionSpec', - ), - ), - 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_part_specs_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(); - $_size945 = 0; - $_etype948 = 0; - $xfer += $input->readListBegin($_etype948, $_size945); - for ($_i949 = 0; $_i949 < $_size945; ++$_i949) - { - $elem950 = null; - $elem950 = new \metastore\PartitionSpec(); - $xfer += $elem950->read($input); - $this->success []= $elem950; - } - $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_part_specs_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 $iter951) - { - $xfer += $iter951->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_expr_args { - static $_TSPEC; - - /** - * @var \metastore\PartitionsByExprRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\PartitionsByExprRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_expr_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->req = new \metastore\PartitionsByExprRequest(); - $xfer += $this->req->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_expr_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_partitions_by_expr_result { - static $_TSPEC; - - /** - * @var \metastore\PartitionsByExprResult - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\PartitionsByExprResult', - ), - 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_expr_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\PartitionsByExprResult(); - $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_partitions_by_expr_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_num_partitions_by_filter_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - public $filter = 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' => 'filter', - '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['filter'])) { - $this->filter = $vals['filter']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_num_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; - 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_num_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_num_partitions_by_filter_result { - static $_TSPEC; - - /** - * @var int - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o2 = 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\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_num_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::I32) { - $xfer += $input->readI32($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_get_num_partitions_by_filter_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_partitions_by_names_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string[] - */ - 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(); - $_size952 = 0; - $_etype955 = 0; - $xfer += $input->readListBegin($_etype955, $_size952); - for ($_i956 = 0; $_i956 < $_size952; ++$_i956) - { - $elem957 = null; - $xfer += $input->readString($elem957); - $this->names []= $elem957; - } - $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 $iter958) - { - $xfer += $output->writeString($iter958); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_partitions_by_names_result { - static $_TSPEC; - - /** - * @var \metastore\Partition[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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(); - $_size959 = 0; - $_etype962 = 0; - $xfer += $input->readListBegin($_etype962, $_size959); - for ($_i963 = 0; $_i963 < $_size959; ++$_i963) - { - $elem964 = null; - $elem964 = new \metastore\Partition(); - $xfer += $elem964->read($input); - $this->success []= $elem964; - } - $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 $iter965) - { - $xfer += $iter965->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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var \metastore\Partition - */ - 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; - - /** - * @var \metastore\InvalidOperationException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var \metastore\Partition[] - */ - 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(); - $_size966 = 0; - $_etype969 = 0; - $xfer += $input->readListBegin($_etype969, $_size966); - for ($_i970 = 0; $_i970 < $_size966; ++$_i970) - { - $elem971 = null; - $elem971 = new \metastore\Partition(); - $xfer += $elem971->read($input); - $this->new_parts []= $elem971; - } - $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 $iter972) - { - $xfer += $iter972->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_alter_partitions_result { - static $_TSPEC; - - /** - * @var \metastore\InvalidOperationException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_partitions_with_environment_context_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var \metastore\Partition[] - */ - public $new_parts = null; - /** - * @var \metastore\EnvironmentContext - */ - 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_parts', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - '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_parts'])) { - $this->new_parts = $vals['new_parts']; - } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_alter_partitions_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::LST) { - $this->new_parts = array(); - $_size973 = 0; - $_etype976 = 0; - $xfer += $input->readListBegin($_etype976, $_size973); - for ($_i977 = 0; $_i977 < $_size973; ++$_i977) - { - $elem978 = null; - $elem978 = new \metastore\Partition(); - $xfer += $elem978->read($input); - $this->new_parts []= $elem978; - } - $xfer += $input->readListEnd(); - } 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_partitions_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_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 $iter979) - { - $xfer += $iter979->write($output); - } - } - $output->writeListEnd(); - } - $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_partitions_with_environment_context_result { - static $_TSPEC; - - /** - * @var \metastore\InvalidOperationException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_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_partitions_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_alter_partition_with_environment_context_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var \metastore\Partition - */ - public $new_part = null; - /** - * @var \metastore\EnvironmentContext - */ - 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; - - /** - * @var \metastore\InvalidOperationException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string[] - */ - public $part_vals = null; - /** - * @var \metastore\Partition - */ - 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(); - $_size980 = 0; - $_etype983 = 0; - $xfer += $input->readListBegin($_etype983, $_size980); - for ($_i984 = 0; $_i984 < $_size980; ++$_i984) - { - $elem985 = null; - $xfer += $input->readString($elem985); - $this->part_vals []= $elem985; - } - $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 $iter986) - { - $xfer += $output->writeString($iter986); - } - } - $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; - - /** - * @var \metastore\InvalidOperationException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_partition_name_has_valid_characters_args { - static $_TSPEC; - - /** - * @var string[] - */ - public $part_vals = null; - /** - * @var bool - */ - public $throw_exception = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 2 => array( - 'var' => 'throw_exception', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - if (isset($vals['throw_exception'])) { - $this->throw_exception = $vals['throw_exception']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_partition_name_has_valid_characters_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->part_vals = array(); - $_size987 = 0; - $_etype990 = 0; - $xfer += $input->readListBegin($_etype990, $_size987); - for ($_i991 = 0; $_i991 < $_size987; ++$_i991) - { - $elem992 = null; - $xfer += $input->readString($elem992); - $this->part_vals []= $elem992; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->throw_exception); - } 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_has_valid_characters_args'); - 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, 1); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter993) - { - $xfer += $output->writeString($iter993); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->throw_exception !== null) { - $xfer += $output->writeFieldBegin('throw_exception', TType::BOOL, 2); - $xfer += $output->writeBool($this->throw_exception); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_partition_name_has_valid_characters_result { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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_partition_name_has_valid_characters_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_partition_name_has_valid_characters_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_config_value_args { - static $_TSPEC; - - /** - * @var string - */ - public $name = null; - /** - * @var string - */ - 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; - - /** - * @var string - */ - public $success = null; - /** - * @var \metastore\ConfigValSecurityException - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size994 = 0; - $_etype997 = 0; - $xfer += $input->readListBegin($_etype997, $_size994); - for ($_i998 = 0; $_i998 < $_size994; ++$_i998) - { - $elem999 = null; - $xfer += $input->readString($elem999); - $this->success []= $elem999; - } - $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 $iter1000) - { - $xfer += $output->writeString($iter1000); - } - } - $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; - - /** - * @var string - */ - 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; - - /** - * @var array - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size1001 = 0; - $_ktype1002 = 0; - $_vtype1003 = 0; - $xfer += $input->readMapBegin($_ktype1002, $_vtype1003, $_size1001); - for ($_i1005 = 0; $_i1005 < $_size1001; ++$_i1005) - { - $key1006 = ''; - $val1007 = ''; - $xfer += $input->readString($key1006); - $xfer += $input->readString($val1007); - $this->success[$key1006] = $val1007; - } - $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 $kiter1008 => $viter1009) - { - $xfer += $output->writeString($kiter1008); - $xfer += $output->writeString($viter1009); - } - } - $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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var array - */ - public $part_vals = null; - /** - * @var int - */ - 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(); - $_size1010 = 0; - $_ktype1011 = 0; - $_vtype1012 = 0; - $xfer += $input->readMapBegin($_ktype1011, $_vtype1012, $_size1010); - for ($_i1014 = 0; $_i1014 < $_size1010; ++$_i1014) - { - $key1015 = ''; - $val1016 = ''; - $xfer += $input->readString($key1015); - $xfer += $input->readString($val1016); - $this->part_vals[$key1015] = $val1016; - } - $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 $kiter1017 => $viter1018) - { - $xfer += $output->writeString($kiter1017); - $xfer += $output->writeString($viter1018); - } - } - $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; - - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o2 = null; - /** - * @var \metastore\UnknownDBException - */ - public $o3 = null; - /** - * @var \metastore\UnknownTableException - */ - public $o4 = null; - /** - * @var \metastore\UnknownPartitionException - */ - public $o5 = null; - /** - * @var \metastore\InvalidPartitionException - */ - 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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var array - */ - public $part_vals = null; - /** - * @var int - */ - 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(); - $_size1019 = 0; - $_ktype1020 = 0; - $_vtype1021 = 0; - $xfer += $input->readMapBegin($_ktype1020, $_vtype1021, $_size1019); - for ($_i1023 = 0; $_i1023 < $_size1019; ++$_i1023) - { - $key1024 = ''; - $val1025 = ''; - $xfer += $input->readString($key1024); - $xfer += $input->readString($val1025); - $this->part_vals[$key1024] = $val1025; - } - $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 $kiter1026 => $viter1027) - { - $xfer += $output->writeString($kiter1026); - $xfer += $output->writeString($viter1027); - } - } - $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; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o2 = null; - /** - * @var \metastore\UnknownDBException - */ - public $o3 = null; - /** - * @var \metastore\UnknownTableException - */ - public $o4 = null; - /** - * @var \metastore\UnknownPartitionException - */ - public $o5 = null; - /** - * @var \metastore\InvalidPartitionException - */ - 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; - - /** - * @var \metastore\Index - */ - public $new_index = null; - /** - * @var \metastore\Table - */ - 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; - - /** - * @var \metastore\Index - */ - public $success = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o1 = null; - /** - * @var \metastore\AlreadyExistsException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $base_tbl_name = null; - /** - * @var string - */ - public $idx_name = null; - /** - * @var \metastore\Index - */ - 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; - - /** - * @var \metastore\InvalidOperationException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - public $index_name = null; - /** - * @var bool - */ - 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; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - 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; - - /** - * @var \metastore\Index - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var int - */ - 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; - - /** - * @var \metastore\Index[] - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size1028 = 0; - $_etype1031 = 0; - $xfer += $input->readListBegin($_etype1031, $_size1028); - for ($_i1032 = 0; $_i1032 < $_size1028; ++$_i1032) - { - $elem1033 = null; - $elem1033 = new \metastore\Index(); - $xfer += $elem1033->read($input); - $this->success []= $elem1033; - } - $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 $iter1034) - { - $xfer += $iter1034->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; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var int - */ - 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; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size1035 = 0; - $_etype1038 = 0; - $xfer += $input->readListBegin($_etype1038, $_size1035); - for ($_i1039 = 0; $_i1039 < $_size1035; ++$_i1039) - { - $elem1040 = null; - $xfer += $input->readString($elem1040); - $this->success []= $elem1040; - } - $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 $iter1041) - { - $xfer += $output->writeString($iter1041); - } - } - $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_primary_keys_args { - static $_TSPEC; - - /** - * @var \metastore\PrimaryKeysRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\PrimaryKeysRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_primary_keys_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->request = new \metastore\PrimaryKeysRequest(); - $xfer += $this->request->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_primary_keys_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_primary_keys_result { - static $_TSPEC; - - /** - * @var \metastore\PrimaryKeysResponse - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\PrimaryKeysResponse', - ), - 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_primary_keys_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\PrimaryKeysResponse(); - $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_primary_keys_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_foreign_keys_args { - static $_TSPEC; - - /** - * @var \metastore\ForeignKeysRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\ForeignKeysRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_foreign_keys_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->request = new \metastore\ForeignKeysRequest(); - $xfer += $this->request->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_foreign_keys_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_foreign_keys_result { - static $_TSPEC; - - /** - * @var \metastore\ForeignKeysResponse - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\ForeignKeysResponse', - ), - 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_foreign_keys_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\ForeignKeysResponse(); - $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_foreign_keys_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_unique_constraints_args { - static $_TSPEC; - - /** - * @var \metastore\UniqueConstraintsRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\UniqueConstraintsRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_unique_constraints_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->request = new \metastore\UniqueConstraintsRequest(); - $xfer += $this->request->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_unique_constraints_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_unique_constraints_result { - static $_TSPEC; - - /** - * @var \metastore\UniqueConstraintsResponse - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\UniqueConstraintsResponse', - ), - 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_unique_constraints_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\UniqueConstraintsResponse(); - $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_unique_constraints_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_not_null_constraints_args { - static $_TSPEC; - - /** - * @var \metastore\NotNullConstraintsRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\NotNullConstraintsRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_not_null_constraints_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->request = new \metastore\NotNullConstraintsRequest(); - $xfer += $this->request->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_not_null_constraints_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_not_null_constraints_result { - static $_TSPEC; - - /** - * @var \metastore\NotNullConstraintsResponse - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\NotNullConstraintsResponse', - ), - 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_not_null_constraints_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\NotNullConstraintsResponse(); - $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_not_null_constraints_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_update_table_column_statistics_args { - static $_TSPEC; - - /** - * @var \metastore\ColumnStatistics - */ - public $stats_obj = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'stats_obj', - 'type' => TType::STRUCT, - 'class' => '\metastore\ColumnStatistics', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['stats_obj'])) { - $this->stats_obj = $vals['stats_obj']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_update_table_column_statistics_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->stats_obj = new \metastore\ColumnStatistics(); - $xfer += $this->stats_obj->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_update_table_column_statistics_args'); - if ($this->stats_obj !== null) { - if (!is_object($this->stats_obj)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('stats_obj', TType::STRUCT, 1); - $xfer += $this->stats_obj->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_update_table_column_statistics_result { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - public $o3 = null; - /** - * @var \metastore\InvalidInputException - */ - public $o4 = 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\InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidInputException', - ), - ); - } - 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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_update_table_column_statistics_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\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\InvalidInputException(); - $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_update_table_column_statistics_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_update_partition_column_statistics_args { - static $_TSPEC; - - /** - * @var \metastore\ColumnStatistics - */ - public $stats_obj = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'stats_obj', - 'type' => TType::STRUCT, - 'class' => '\metastore\ColumnStatistics', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['stats_obj'])) { - $this->stats_obj = $vals['stats_obj']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_update_partition_column_statistics_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->stats_obj = new \metastore\ColumnStatistics(); - $xfer += $this->stats_obj->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_update_partition_column_statistics_args'); - if ($this->stats_obj !== null) { - if (!is_object($this->stats_obj)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('stats_obj', TType::STRUCT, 1); - $xfer += $this->stats_obj->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_update_partition_column_statistics_result { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - public $o3 = null; - /** - * @var \metastore\InvalidInputException - */ - public $o4 = 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\InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidInputException', - ), - ); - } - 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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_update_partition_column_statistics_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\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\InvalidInputException(); - $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_update_partition_column_statistics_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_table_column_statistics_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - public $col_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' => 'col_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['col_name'])) { - $this->col_name = $vals['col_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_table_column_statistics_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->col_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_column_statistics_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->col_name !== null) { - $xfer += $output->writeFieldBegin('col_name', TType::STRING, 3); - $xfer += $output->writeString($this->col_name); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_table_column_statistics_result { - static $_TSPEC; - - /** - * @var \metastore\ColumnStatistics - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = null; - /** - * @var \metastore\InvalidInputException - */ - public $o3 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o4 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\ColumnStatistics', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidInputException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', - ), - ); - } - 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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_table_column_statistics_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\ColumnStatistics(); - $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; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\InvalidInputException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new \metastore\InvalidObjectException(); - $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_get_table_column_statistics_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(); - } - 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_get_partition_column_statistics_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - public $part_name = null; - /** - * @var string - */ - public $col_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, - ), - 4 => array( - 'var' => 'col_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']; - } - if (isset($vals['col_name'])) { - $this->col_name = $vals['col_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partition_column_statistics_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::STRING) { - $xfer += $input->readString($this->col_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_column_statistics_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->col_name !== null) { - $xfer += $output->writeFieldBegin('col_name', TType::STRING, 4); - $xfer += $output->writeString($this->col_name); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_partition_column_statistics_result { - static $_TSPEC; - - /** - * @var \metastore\ColumnStatistics - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = null; - /** - * @var \metastore\InvalidInputException - */ - public $o3 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o4 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\ColumnStatistics', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidInputException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', - ), - ); - } - 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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partition_column_statistics_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\ColumnStatistics(); - $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; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\InvalidInputException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new \metastore\InvalidObjectException(); - $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_get_partition_column_statistics_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(); - } - 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_get_table_statistics_req_args { - static $_TSPEC; - - /** - * @var \metastore\TableStatsRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\TableStatsRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_table_statistics_req_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->request = new \metastore\TableStatsRequest(); - $xfer += $this->request->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_statistics_req_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_table_statistics_req_result { - static $_TSPEC; - - /** - * @var \metastore\TableStatsResult - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\TableStatsResult', - ), - 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_table_statistics_req_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\TableStatsResult(); - $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_table_statistics_req_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_statistics_req_args { - static $_TSPEC; - - /** - * @var \metastore\PartitionsStatsRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\PartitionsStatsRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partitions_statistics_req_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->request = new \metastore\PartitionsStatsRequest(); - $xfer += $this->request->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_statistics_req_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_partitions_statistics_req_result { - static $_TSPEC; - - /** - * @var \metastore\PartitionsStatsResult - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\PartitionsStatsResult', - ), - 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_statistics_req_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\PartitionsStatsResult(); - $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_partitions_statistics_req_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_aggr_stats_for_args { - static $_TSPEC; - - /** - * @var \metastore\PartitionsStatsRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\PartitionsStatsRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_aggr_stats_for_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->request = new \metastore\PartitionsStatsRequest(); - $xfer += $this->request->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_aggr_stats_for_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_aggr_stats_for_result { - static $_TSPEC; - - /** - * @var \metastore\AggrStats - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\AggrStats', - ), - 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_aggr_stats_for_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\AggrStats(); - $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_aggr_stats_for_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_set_aggr_stats_for_args { - static $_TSPEC; - - /** - * @var \metastore\SetPartitionsStatsRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\SetPartitionsStatsRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_set_aggr_stats_for_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->request = new \metastore\SetPartitionsStatsRequest(); - $xfer += $this->request->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_aggr_stats_for_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_set_aggr_stats_for_result { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - public $o3 = null; - /** - * @var \metastore\InvalidInputException - */ - public $o4 = 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\InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\MetaException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidInputException', - ), - ); - } - 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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_set_aggr_stats_for_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\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\InvalidInputException(); - $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_set_aggr_stats_for_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_delete_partition_column_statistics_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - public $part_name = null; - /** - * @var string - */ - public $col_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, - ), - 4 => array( - 'var' => 'col_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']; - } - if (isset($vals['col_name'])) { - $this->col_name = $vals['col_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_delete_partition_column_statistics_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::STRING) { - $xfer += $input->readString($this->col_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_delete_partition_column_statistics_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->col_name !== null) { - $xfer += $output->writeFieldBegin('col_name', TType::STRING, 4); - $xfer += $output->writeString($this->col_name); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_delete_partition_column_statistics_result { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o3 = null; - /** - * @var \metastore\InvalidInputException - */ - public $o4 = 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', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidInputException', - ), - ); - } - 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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_delete_partition_column_statistics_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; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\InvalidObjectException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new \metastore\InvalidInputException(); - $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_delete_partition_column_statistics_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_delete_table_column_statistics_args { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_name = null; - /** - * @var string - */ - public $col_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' => 'col_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['col_name'])) { - $this->col_name = $vals['col_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_delete_table_column_statistics_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->col_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_delete_table_column_statistics_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->col_name !== null) { - $xfer += $output->writeFieldBegin('col_name', TType::STRING, 3); - $xfer += $output->writeString($this->col_name); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_delete_table_column_statistics_result { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o3 = null; - /** - * @var \metastore\InvalidInputException - */ - public $o4 = 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', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidObjectException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => '\metastore\InvalidInputException', - ), - ); - } - 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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_delete_table_column_statistics_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; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\InvalidObjectException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new \metastore\InvalidInputException(); - $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_delete_table_column_statistics_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_create_function_args { - static $_TSPEC; - - /** - * @var \metastore\Function - */ - public $func = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'func', - 'type' => TType::STRUCT, - 'class' => '\metastore\Function', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['func'])) { - $this->func = $vals['func']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_create_function_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->func = new \metastore\Function(); - $xfer += $this->func->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_function_args'); - if ($this->func !== null) { - if (!is_object($this->func)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('func', TType::STRUCT, 1); - $xfer += $this->func->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_create_function_result { - static $_TSPEC; - - /** - * @var \metastore\AlreadyExistsException - */ - public $o1 = null; - /** - * @var \metastore\InvalidObjectException - */ - public $o2 = null; - /** - * @var \metastore\MetaException - */ - public $o3 = null; - /** - * @var \metastore\NoSuchObjectException - */ - 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_function_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_function_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_function_args { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $funcName = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'funcName', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['funcName'])) { - $this->funcName = $vals['funcName']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_drop_function_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->funcName); - } 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_function_args'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->funcName !== null) { - $xfer += $output->writeFieldBegin('funcName', TType::STRING, 2); - $xfer += $output->writeString($this->funcName); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_drop_function_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_function_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_function_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_alter_function_args { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $funcName = null; - /** - * @var \metastore\Function - */ - public $newFunc = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'funcName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'newFunc', - 'type' => TType::STRUCT, - 'class' => '\metastore\Function', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['funcName'])) { - $this->funcName = $vals['funcName']; - } - if (isset($vals['newFunc'])) { - $this->newFunc = $vals['newFunc']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_alter_function_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->funcName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->newFunc = new \metastore\Function(); - $xfer += $this->newFunc->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_function_args'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->funcName !== null) { - $xfer += $output->writeFieldBegin('funcName', TType::STRING, 2); - $xfer += $output->writeString($this->funcName); - $xfer += $output->writeFieldEnd(); - } - if ($this->newFunc !== null) { - if (!is_object($this->newFunc)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('newFunc', TType::STRUCT, 3); - $xfer += $this->newFunc->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_alter_function_result { - static $_TSPEC; - - /** - * @var \metastore\InvalidOperationException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - 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_function_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_function_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_functions_args { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $pattern = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'pattern', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['pattern'])) { - $this->pattern = $vals['pattern']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_functions_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->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_functions_args'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $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_functions_result { - static $_TSPEC; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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_functions_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(); - $_size1042 = 0; - $_etype1045 = 0; - $xfer += $input->readListBegin($_etype1045, $_size1042); - for ($_i1046 = 0; $_i1046 < $_size1042; ++$_i1046) - { - $elem1047 = null; - $xfer += $input->readString($elem1047); - $this->success []= $elem1047; - } - $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_functions_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 $iter1048) - { - $xfer += $output->writeString($iter1048); - } - } - $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_function_args { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $funcName = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'funcName', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['funcName'])) { - $this->funcName = $vals['funcName']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_function_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->funcName); - } 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_function_args'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->funcName !== null) { - $xfer += $output->writeFieldBegin('funcName', TType::STRING, 2); - $xfer += $output->writeString($this->funcName); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_function_result { - static $_TSPEC; - - /** - * @var \metastore\Function - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchObjectException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\Function', - ), - 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_function_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\Function(); - $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_function_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_all_functions_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_all_functions_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_functions_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_all_functions_result { - static $_TSPEC; - - /** - * @var \metastore\GetAllFunctionsResponse - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetAllFunctionsResponse', - ), - 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_functions_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\GetAllFunctionsResponse(); - $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_all_functions_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_create_role_args { - static $_TSPEC; - - /** - * @var \metastore\Role - */ - 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; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size1049 = 0; - $_etype1052 = 0; - $xfer += $input->readListBegin($_etype1052, $_size1049); - for ($_i1053 = 0; $_i1053 < $_size1049; ++$_i1053) - { - $elem1054 = null; - $xfer += $input->readString($elem1054); - $this->success []= $elem1054; - } - $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 $iter1055) - { - $xfer += $output->writeString($iter1055); - } - } - $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; - - /** - * @var string - */ - public $role_name = null; - /** - * @var string - */ - public $principal_name = null; - /** - * @var int - */ - public $principal_type = null; - /** - * @var string - */ - public $grantor = null; - /** - * @var int - */ - public $grantorType = null; - /** - * @var bool - */ - 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; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - public $role_name = null; - /** - * @var string - */ - public $principal_name = null; - /** - * @var int - */ - 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; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - public $principal_name = null; - /** - * @var int - */ - 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; - - /** - * @var \metastore\Role[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size1056 = 0; - $_etype1059 = 0; - $xfer += $input->readListBegin($_etype1059, $_size1056); - for ($_i1060 = 0; $_i1060 < $_size1056; ++$_i1060) - { - $elem1061 = null; - $elem1061 = new \metastore\Role(); - $xfer += $elem1061->read($input); - $this->success []= $elem1061; - } - $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 $iter1062) - { - $xfer += $iter1062->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_revoke_role_args { - static $_TSPEC; - - /** - * @var \metastore\GrantRevokeRoleRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\GrantRevokeRoleRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_grant_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::STRUCT) { - $this->request = new \metastore\GrantRevokeRoleRequest(); - $xfer += $this->request->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_revoke_role_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_grant_revoke_role_result { - static $_TSPEC; - - /** - * @var \metastore\GrantRevokeRoleResponse - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\GrantRevokeRoleResponse', - ), - 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_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::STRUCT) { - $this->success = new \metastore\GrantRevokeRoleResponse(); - $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_grant_revoke_role_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_get_principals_in_role_args { - static $_TSPEC; - - /** - * @var \metastore\GetPrincipalsInRoleRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetPrincipalsInRoleRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_principals_in_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->request = new \metastore\GetPrincipalsInRoleRequest(); - $xfer += $this->request->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_principals_in_role_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_principals_in_role_result { - static $_TSPEC; - - /** - * @var \metastore\GetPrincipalsInRoleResponse - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetPrincipalsInRoleResponse', - ), - 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_principals_in_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::STRUCT) { - $this->success = new \metastore\GetPrincipalsInRoleResponse(); - $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_principals_in_role_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_get_role_grants_for_principal_args { - static $_TSPEC; - - /** - * @var \metastore\GetRoleGrantsForPrincipalRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetRoleGrantsForPrincipalRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_role_grants_for_principal_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->request = new \metastore\GetRoleGrantsForPrincipalRequest(); - $xfer += $this->request->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_grants_for_principal_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_role_grants_for_principal_result { - static $_TSPEC; - - /** - * @var \metastore\GetRoleGrantsForPrincipalResponse - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetRoleGrantsForPrincipalResponse', - ), - 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_grants_for_principal_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\GetRoleGrantsForPrincipalResponse(); - $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_role_grants_for_principal_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_get_privilege_set_args { - static $_TSPEC; - - /** - * @var \metastore\HiveObjectRef - */ - public $hiveObject = null; - /** - * @var string - */ - public $user_name = null; - /** - * @var string[] - */ - 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(); - $_size1063 = 0; - $_etype1066 = 0; - $xfer += $input->readListBegin($_etype1066, $_size1063); - for ($_i1067 = 0; $_i1067 < $_size1063; ++$_i1067) - { - $elem1068 = null; - $xfer += $input->readString($elem1068); - $this->group_names []= $elem1068; - } - $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 $iter1069) - { - $xfer += $output->writeString($iter1069); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_privilege_set_result { - static $_TSPEC; - - /** - * @var \metastore\PrincipalPrivilegeSet - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - public $principal_name = null; - /** - * @var int - */ - public $principal_type = null; - /** - * @var \metastore\HiveObjectRef - */ - 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; - - /** - * @var \metastore\HiveObjectPrivilege[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size1070 = 0; - $_etype1073 = 0; - $xfer += $input->readListBegin($_etype1073, $_size1070); - for ($_i1074 = 0; $_i1074 < $_size1070; ++$_i1074) - { - $elem1075 = null; - $elem1075 = new \metastore\HiveObjectPrivilege(); - $xfer += $elem1075->read($input); - $this->success []= $elem1075; - } - $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 $iter1076) - { - $xfer += $iter1076->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; - - /** - * @var \metastore\PrivilegeBag - */ - 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; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var \metastore\PrivilegeBag - */ - 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; - - /** - * @var bool - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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_grant_revoke_privileges_args { - static $_TSPEC; - - /** - * @var \metastore\GrantRevokePrivilegeRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\GrantRevokePrivilegeRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_grant_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->request = new \metastore\GrantRevokePrivilegeRequest(); - $xfer += $this->request->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_revoke_privileges_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_grant_revoke_privileges_result { - static $_TSPEC; - - /** - * @var \metastore\GrantRevokePrivilegeResponse - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\GrantRevokePrivilegeResponse', - ), - 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_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::STRUCT) { - $this->success = new \metastore\GrantRevokePrivilegeResponse(); - $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_grant_revoke_privileges_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_set_ugi_args { - static $_TSPEC; - - /** - * @var string - */ - public $user_name = null; - /** - * @var string[] - */ - 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(); - $_size1077 = 0; - $_etype1080 = 0; - $xfer += $input->readListBegin($_etype1080, $_size1077); - for ($_i1081 = 0; $_i1081 < $_size1077; ++$_i1081) - { - $elem1082 = null; - $xfer += $input->readString($elem1082); - $this->group_names []= $elem1082; - } - $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 $iter1083) - { - $xfer += $output->writeString($iter1083); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_set_ugi_result { - static $_TSPEC; - - /** - * @var string[] - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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(); - $_size1084 = 0; - $_etype1087 = 0; - $xfer += $input->readListBegin($_etype1087, $_size1084); - for ($_i1088 = 0; $_i1088 < $_size1084; ++$_i1088) - { - $elem1089 = null; - $xfer += $input->readString($elem1089); - $this->success []= $elem1089; - } - $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 $iter1090) - { - $xfer += $output->writeString($iter1090); - } - } - $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; - - /** - * @var string - */ - public $token_owner = null; - /** - * @var string - */ - 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; - - /** - * @var string - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var int - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var \metastore\MetaException - */ - 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; - } - -} - -class ThriftHiveMetastore_add_token_args { - static $_TSPEC; - - /** - * @var string - */ - public $token_identifier = null; - /** - * @var string - */ - public $delegation_token = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'token_identifier', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'delegation_token', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['token_identifier'])) { - $this->token_identifier = $vals['token_identifier']; - } - if (isset($vals['delegation_token'])) { - $this->delegation_token = $vals['delegation_token']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_add_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_identifier); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->delegation_token); - } 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_token_args'); - if ($this->token_identifier !== null) { - $xfer += $output->writeFieldBegin('token_identifier', TType::STRING, 1); - $xfer += $output->writeString($this->token_identifier); - $xfer += $output->writeFieldEnd(); - } - if ($this->delegation_token !== null) { - $xfer += $output->writeFieldBegin('delegation_token', TType::STRING, 2); - $xfer += $output->writeString($this->delegation_token); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_add_token_result { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_add_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::BOOL) { - $xfer += $input->readBool($this->success); - } 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_token_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_remove_token_args { - static $_TSPEC; - - /** - * @var string - */ - public $token_identifier = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'token_identifier', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['token_identifier'])) { - $this->token_identifier = $vals['token_identifier']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_remove_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_identifier); - } 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_remove_token_args'); - if ($this->token_identifier !== null) { - $xfer += $output->writeFieldBegin('token_identifier', TType::STRING, 1); - $xfer += $output->writeString($this->token_identifier); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_remove_token_result { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_remove_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::BOOL) { - $xfer += $input->readBool($this->success); - } 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_remove_token_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_token_args { - static $_TSPEC; - - /** - * @var string - */ - public $token_identifier = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'token_identifier', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['token_identifier'])) { - $this->token_identifier = $vals['token_identifier']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_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_identifier); - } 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_token_args'); - if ($this->token_identifier !== null) { - $xfer += $output->writeFieldBegin('token_identifier', TType::STRING, 1); - $xfer += $output->writeString($this->token_identifier); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_token_result { - static $_TSPEC; - - /** - * @var string - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_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; - 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_token_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::STRING, 0); - $xfer += $output->writeString($this->success); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_all_token_identifiers_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_all_token_identifiers_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_token_identifiers_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_all_token_identifiers_result { - static $_TSPEC; - - /** - * @var string[] - */ - public $success = 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, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_all_token_identifiers_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(); - $_size1091 = 0; - $_etype1094 = 0; - $xfer += $input->readListBegin($_etype1094, $_size1091); - for ($_i1095 = 0; $_i1095 < $_size1091; ++$_i1095) - { - $elem1096 = null; - $xfer += $input->readString($elem1096); - $this->success []= $elem1096; - } - $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_all_token_identifiers_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 $iter1097) - { - $xfer += $output->writeString($iter1097); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_add_master_key_args { - static $_TSPEC; - - /** - * @var string - */ - public $key = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'key', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['key'])) { - $this->key = $vals['key']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_add_master_key_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->key); - } 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_master_key_args'); - if ($this->key !== null) { - $xfer += $output->writeFieldBegin('key', TType::STRING, 1); - $xfer += $output->writeString($this->key); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_add_master_key_result { - static $_TSPEC; - - /** - * @var int - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = 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\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_add_master_key_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\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_add_master_key_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_update_master_key_args { - static $_TSPEC; - - /** - * @var int - */ - public $seq_number = null; - /** - * @var string - */ - public $key = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'seq_number', - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'key', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['seq_number'])) { - $this->seq_number = $vals['seq_number']; - } - if (isset($vals['key'])) { - $this->key = $vals['key']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_update_master_key_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->seq_number); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->key); - } 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_update_master_key_args'); - if ($this->seq_number !== null) { - $xfer += $output->writeFieldBegin('seq_number', TType::I32, 1); - $xfer += $output->writeI32($this->seq_number); - $xfer += $output->writeFieldEnd(); - } - if ($this->key !== null) { - $xfer += $output->writeFieldBegin('key', TType::STRING, 2); - $xfer += $output->writeString($this->key); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_update_master_key_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchObjectException - */ - public $o1 = null; - /** - * @var \metastore\MetaException - */ - public $o2 = 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\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_update_master_key_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\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_update_master_key_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_remove_master_key_args { - static $_TSPEC; - - /** - * @var int - */ - public $key_seq = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'key_seq', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['key_seq'])) { - $this->key_seq = $vals['key_seq']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_remove_master_key_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->key_seq); - } 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_remove_master_key_args'); - if ($this->key_seq !== null) { - $xfer += $output->writeFieldBegin('key_seq', TType::I32, 1); - $xfer += $output->writeI32($this->key_seq); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_remove_master_key_result { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_remove_master_key_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; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_remove_master_key_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_master_keys_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_master_keys_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_master_keys_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_master_keys_result { - static $_TSPEC; - - /** - * @var string[] - */ - public $success = 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, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_master_keys_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(); - $_size1098 = 0; - $_etype1101 = 0; - $xfer += $input->readListBegin($_etype1101, $_size1098); - for ($_i1102 = 0; $_i1102 < $_size1098; ++$_i1102) - { - $elem1103 = null; - $xfer += $input->readString($elem1103); - $this->success []= $elem1103; - } - $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_master_keys_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 $iter1104) - { - $xfer += $output->writeString($iter1104); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_open_txns_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_open_txns_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_open_txns_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_open_txns_result { - static $_TSPEC; - - /** - * @var \metastore\GetOpenTxnsResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetOpenTxnsResponse', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_open_txns_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\GetOpenTxnsResponse(); - $xfer += $this->success->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_open_txns_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_open_txns_info_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_open_txns_info_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_open_txns_info_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_open_txns_info_result { - static $_TSPEC; - - /** - * @var \metastore\GetOpenTxnsInfoResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetOpenTxnsInfoResponse', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_open_txns_info_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\GetOpenTxnsInfoResponse(); - $xfer += $this->success->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_open_txns_info_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_open_txns_args { - static $_TSPEC; - - /** - * @var \metastore\OpenTxnRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\OpenTxnRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_open_txns_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->rqst = new \metastore\OpenTxnRequest(); - $xfer += $this->rqst->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_open_txns_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_open_txns_result { - static $_TSPEC; - - /** - * @var \metastore\OpenTxnsResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\OpenTxnsResponse', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_open_txns_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\OpenTxnsResponse(); - $xfer += $this->success->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_open_txns_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_abort_txn_args { - static $_TSPEC; - - /** - * @var \metastore\AbortTxnRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\AbortTxnRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_abort_txn_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->rqst = new \metastore\AbortTxnRequest(); - $xfer += $this->rqst->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_abort_txn_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_abort_txn_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchTxnException - */ - public $o1 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchTxnException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_abort_txn_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\NoSuchTxnException(); - $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_abort_txn_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; - } - -} - -class ThriftHiveMetastore_abort_txns_args { - static $_TSPEC; - - /** - * @var \metastore\AbortTxnsRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\AbortTxnsRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_abort_txns_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->rqst = new \metastore\AbortTxnsRequest(); - $xfer += $this->rqst->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_abort_txns_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_abort_txns_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchTxnException - */ - public $o1 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchTxnException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_abort_txns_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\NoSuchTxnException(); - $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_abort_txns_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; - } - -} - -class ThriftHiveMetastore_commit_txn_args { - static $_TSPEC; - - /** - * @var \metastore\CommitTxnRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\CommitTxnRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_commit_txn_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->rqst = new \metastore\CommitTxnRequest(); - $xfer += $this->rqst->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_commit_txn_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_commit_txn_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchTxnException - */ - public $o1 = null; - /** - * @var \metastore\TxnAbortedException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchTxnException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => '\metastore\TxnAbortedException', - ), - ); - } - 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_commit_txn_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\NoSuchTxnException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\TxnAbortedException(); - $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_commit_txn_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_lock_args { - static $_TSPEC; - - /** - * @var \metastore\LockRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\LockRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_lock_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->rqst = new \metastore\LockRequest(); - $xfer += $this->rqst->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_lock_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_lock_result { - static $_TSPEC; - - /** - * @var \metastore\LockResponse - */ - public $success = null; - /** - * @var \metastore\NoSuchTxnException - */ - public $o1 = null; - /** - * @var \metastore\TxnAbortedException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\LockResponse', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchTxnException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => '\metastore\TxnAbortedException', - ), - ); - } - 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_lock_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\LockResponse(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\NoSuchTxnException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\TxnAbortedException(); - $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_lock_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_check_lock_args { - static $_TSPEC; - - /** - * @var \metastore\CheckLockRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\CheckLockRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_check_lock_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->rqst = new \metastore\CheckLockRequest(); - $xfer += $this->rqst->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_check_lock_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_check_lock_result { - static $_TSPEC; - - /** - * @var \metastore\LockResponse - */ - public $success = null; - /** - * @var \metastore\NoSuchTxnException - */ - public $o1 = null; - /** - * @var \metastore\TxnAbortedException - */ - public $o2 = null; - /** - * @var \metastore\NoSuchLockException - */ - public $o3 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\LockResponse', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchTxnException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => '\metastore\TxnAbortedException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchLockException', - ), - ); - } - 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_check_lock_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\LockResponse(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new \metastore\NoSuchTxnException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\TxnAbortedException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\NoSuchLockException(); - $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_check_lock_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_unlock_args { - static $_TSPEC; - - /** - * @var \metastore\UnlockRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\UnlockRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_unlock_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->rqst = new \metastore\UnlockRequest(); - $xfer += $this->rqst->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_unlock_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_unlock_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchLockException - */ - public $o1 = null; - /** - * @var \metastore\TxnOpenException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchLockException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => '\metastore\TxnOpenException', - ), - ); - } - 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_unlock_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\NoSuchLockException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\TxnOpenException(); - $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_unlock_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_show_locks_args { - static $_TSPEC; - - /** - * @var \metastore\ShowLocksRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\ShowLocksRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_show_locks_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->rqst = new \metastore\ShowLocksRequest(); - $xfer += $this->rqst->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_show_locks_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_show_locks_result { - static $_TSPEC; - - /** - * @var \metastore\ShowLocksResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\ShowLocksResponse', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_show_locks_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\ShowLocksResponse(); - $xfer += $this->success->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_show_locks_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_heartbeat_args { - static $_TSPEC; - - /** - * @var \metastore\HeartbeatRequest - */ - public $ids = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'ids', - 'type' => TType::STRUCT, - 'class' => '\metastore\HeartbeatRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['ids'])) { - $this->ids = $vals['ids']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_heartbeat_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->ids = new \metastore\HeartbeatRequest(); - $xfer += $this->ids->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_heartbeat_args'); - if ($this->ids !== null) { - if (!is_object($this->ids)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('ids', TType::STRUCT, 1); - $xfer += $this->ids->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_heartbeat_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchLockException - */ - public $o1 = null; - /** - * @var \metastore\NoSuchTxnException - */ - public $o2 = null; - /** - * @var \metastore\TxnAbortedException - */ - public $o3 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchLockException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchTxnException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => '\metastore\TxnAbortedException', - ), - ); - } - 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_heartbeat_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\NoSuchLockException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\NoSuchTxnException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new \metastore\TxnAbortedException(); - $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_heartbeat_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_heartbeat_txn_range_args { - static $_TSPEC; - - /** - * @var \metastore\HeartbeatTxnRangeRequest - */ - public $txns = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'txns', - 'type' => TType::STRUCT, - 'class' => '\metastore\HeartbeatTxnRangeRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['txns'])) { - $this->txns = $vals['txns']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_heartbeat_txn_range_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->txns = new \metastore\HeartbeatTxnRangeRequest(); - $xfer += $this->txns->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_heartbeat_txn_range_args'); - if ($this->txns !== null) { - if (!is_object($this->txns)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('txns', TType::STRUCT, 1); - $xfer += $this->txns->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_heartbeat_txn_range_result { - static $_TSPEC; - - /** - * @var \metastore\HeartbeatTxnRangeResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\HeartbeatTxnRangeResponse', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_heartbeat_txn_range_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\HeartbeatTxnRangeResponse(); - $xfer += $this->success->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_heartbeat_txn_range_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_compact_args { - static $_TSPEC; - - /** - * @var \metastore\CompactionRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\CompactionRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_compact_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->rqst = new \metastore\CompactionRequest(); - $xfer += $this->rqst->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_compact_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_compact_result { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHiveMetastore_compact_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('ThriftHiveMetastore_compact_result'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_compact2_args { - static $_TSPEC; - - /** - * @var \metastore\CompactionRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\CompactionRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_compact2_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->rqst = new \metastore\CompactionRequest(); - $xfer += $this->rqst->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_compact2_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_compact2_result { - static $_TSPEC; - - /** - * @var \metastore\CompactionResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\CompactionResponse', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_compact2_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\CompactionResponse(); - $xfer += $this->success->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_compact2_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_show_compact_args { - static $_TSPEC; - - /** - * @var \metastore\ShowCompactRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\ShowCompactRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_show_compact_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->rqst = new \metastore\ShowCompactRequest(); - $xfer += $this->rqst->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_show_compact_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_show_compact_result { - static $_TSPEC; - - /** - * @var \metastore\ShowCompactResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\ShowCompactResponse', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_show_compact_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\ShowCompactResponse(); - $xfer += $this->success->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_show_compact_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_add_dynamic_partitions_args { - static $_TSPEC; - - /** - * @var \metastore\AddDynamicPartitions - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\AddDynamicPartitions', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_add_dynamic_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::STRUCT) { - $this->rqst = new \metastore\AddDynamicPartitions(); - $xfer += $this->rqst->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_dynamic_partitions_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_add_dynamic_partitions_result { - static $_TSPEC; - - /** - * @var \metastore\NoSuchTxnException - */ - public $o1 = null; - /** - * @var \metastore\TxnAbortedException - */ - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => '\metastore\NoSuchTxnException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => '\metastore\TxnAbortedException', - ), - ); - } - 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_add_dynamic_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\NoSuchTxnException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new \metastore\TxnAbortedException(); - $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_add_dynamic_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_get_next_notification_args { - static $_TSPEC; - - /** - * @var \metastore\NotificationEventRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\NotificationEventRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_next_notification_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->rqst = new \metastore\NotificationEventRequest(); - $xfer += $this->rqst->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_next_notification_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_next_notification_result { - static $_TSPEC; - - /** - * @var \metastore\NotificationEventResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\NotificationEventResponse', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_next_notification_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\NotificationEventResponse(); - $xfer += $this->success->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_next_notification_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_current_notificationEventId_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_current_notificationEventId_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_current_notificationEventId_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_current_notificationEventId_result { - static $_TSPEC; - - /** - * @var \metastore\CurrentNotificationEventId - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\CurrentNotificationEventId', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_current_notificationEventId_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\CurrentNotificationEventId(); - $xfer += $this->success->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_current_notificationEventId_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_fire_listener_event_args { - static $_TSPEC; - - /** - * @var \metastore\FireEventRequest - */ - public $rqst = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'rqst', - 'type' => TType::STRUCT, - 'class' => '\metastore\FireEventRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['rqst'])) { - $this->rqst = $vals['rqst']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_fire_listener_event_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->rqst = new \metastore\FireEventRequest(); - $xfer += $this->rqst->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_fire_listener_event_args'); - if ($this->rqst !== null) { - if (!is_object($this->rqst)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); - $xfer += $this->rqst->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_fire_listener_event_result { - static $_TSPEC; - - /** - * @var \metastore\FireEventResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\FireEventResponse', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_fire_listener_event_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\FireEventResponse(); - $xfer += $this->success->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_fire_listener_event_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_flushCache_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHiveMetastore_flushCache_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_flushCache_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_flushCache_result { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHiveMetastore_flushCache_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('ThriftHiveMetastore_flushCache_result'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_cm_recycle_args { - static $_TSPEC; - - /** - * @var \metastore\CmRecycleRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'request', - 'type' => TType::STRUCT, - 'class' => '\metastore\CmRecycleRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_cm_recycle_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->request = new \metastore\CmRecycleRequest(); - $xfer += $this->request->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_cm_recycle_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_cm_recycle_result { - static $_TSPEC; - - /** - * @var \metastore\CmRecycleResponse - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - public $o1 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\CmRecycleResponse', - ), - 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_cm_recycle_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\CmRecycleResponse(); - $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_cm_recycle_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_get_file_metadata_by_expr_args { - static $_TSPEC; - - /** - * @var \metastore\GetFileMetadataByExprRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetFileMetadataByExprRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_file_metadata_by_expr_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->req = new \metastore\GetFileMetadataByExprRequest(); - $xfer += $this->req->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_file_metadata_by_expr_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_file_metadata_by_expr_result { - static $_TSPEC; - - /** - * @var \metastore\GetFileMetadataByExprResult - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetFileMetadataByExprResult', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_file_metadata_by_expr_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\GetFileMetadataByExprResult(); - $xfer += $this->success->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_file_metadata_by_expr_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_file_metadata_args { - static $_TSPEC; - - /** - * @var \metastore\GetFileMetadataRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetFileMetadataRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_file_metadata_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->req = new \metastore\GetFileMetadataRequest(); - $xfer += $this->req->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_file_metadata_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_file_metadata_result { - static $_TSPEC; - - /** - * @var \metastore\GetFileMetadataResult - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\GetFileMetadataResult', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_file_metadata_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\GetFileMetadataResult(); - $xfer += $this->success->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_file_metadata_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_put_file_metadata_args { - static $_TSPEC; - - /** - * @var \metastore\PutFileMetadataRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\PutFileMetadataRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_put_file_metadata_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->req = new \metastore\PutFileMetadataRequest(); - $xfer += $this->req->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_put_file_metadata_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_put_file_metadata_result { - static $_TSPEC; - - /** - * @var \metastore\PutFileMetadataResult - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\PutFileMetadataResult', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_put_file_metadata_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\PutFileMetadataResult(); - $xfer += $this->success->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_put_file_metadata_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_clear_file_metadata_args { - static $_TSPEC; - - /** - * @var \metastore\ClearFileMetadataRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\ClearFileMetadataRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_clear_file_metadata_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->req = new \metastore\ClearFileMetadataRequest(); - $xfer += $this->req->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_clear_file_metadata_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_clear_file_metadata_result { - static $_TSPEC; - - /** - * @var \metastore\ClearFileMetadataResult - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\ClearFileMetadataResult', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_clear_file_metadata_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\ClearFileMetadataResult(); - $xfer += $this->success->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_clear_file_metadata_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_cache_file_metadata_args { - static $_TSPEC; - - /** - * @var \metastore\CacheFileMetadataRequest - */ - public $req = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'req', - 'type' => TType::STRUCT, - 'class' => '\metastore\CacheFileMetadataRequest', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['req'])) { - $this->req = $vals['req']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_cache_file_metadata_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->req = new \metastore\CacheFileMetadataRequest(); - $xfer += $this->req->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_cache_file_metadata_args'); - if ($this->req !== null) { - if (!is_object($this->req)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); - $xfer += $this->req->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_cache_file_metadata_result { - static $_TSPEC; - - /** - * @var \metastore\CacheFileMetadataResult - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\metastore\CacheFileMetadataResult', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_cache_file_metadata_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\CacheFileMetadataResult(); - $xfer += $this->success->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_cache_file_metadata_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_metastore_db_uuid_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_metastore_db_uuid_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_metastore_db_uuid_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHiveMetastore_get_metastore_db_uuid_result { - static $_TSPEC; - - /** - * @var string - */ - public $success = null; - /** - * @var \metastore\MetaException - */ - 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_metastore_db_uuid_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_metastore_db_uuid_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; - } - -} - - diff --git metastore/src/gen/thrift/gen-php/metastore/Types.php metastore/src/gen/thrift/gen-php/metastore/Types.php deleted file mode 100644 index aff783e..0000000 --- metastore/src/gen/thrift/gen-php/metastore/Types.php +++ /dev/null @@ -1,21087 +0,0 @@ - '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', - ); -} - -final class TxnState { - const COMMITTED = 1; - const ABORTED = 2; - const OPEN = 3; - static public $__names = array( - 1 => 'COMMITTED', - 2 => 'ABORTED', - 3 => 'OPEN', - ); -} - -final class LockLevel { - const DB = 1; - const TABLE = 2; - const PARTITION = 3; - static public $__names = array( - 1 => 'DB', - 2 => 'TABLE', - 3 => 'PARTITION', - ); -} - -final class LockState { - const ACQUIRED = 1; - const WAITING = 2; - const ABORT = 3; - const NOT_ACQUIRED = 4; - static public $__names = array( - 1 => 'ACQUIRED', - 2 => 'WAITING', - 3 => 'ABORT', - 4 => 'NOT_ACQUIRED', - ); -} - -final class LockType { - const SHARED_READ = 1; - const SHARED_WRITE = 2; - const EXCLUSIVE = 3; - static public $__names = array( - 1 => 'SHARED_READ', - 2 => 'SHARED_WRITE', - 3 => 'EXCLUSIVE', - ); -} - -final class CompactionType { - const MINOR = 1; - const MAJOR = 2; - static public $__names = array( - 1 => 'MINOR', - 2 => 'MAJOR', - ); -} - -final class GrantRevokeType { - const GRANT = 1; - const REVOKE = 2; - static public $__names = array( - 1 => 'GRANT', - 2 => 'REVOKE', - ); -} - -final class DataOperationType { - const SELECT = 1; - const INSERT = 2; - const UPDATE = 3; - const DELETE = 4; - const UNSET = 5; - const NO_TXN = 6; - static public $__names = array( - 1 => 'SELECT', - 2 => 'INSERT', - 3 => 'UPDATE', - 4 => 'DELETE', - 5 => 'UNSET', - 6 => 'NO_TXN', - ); -} - -final class EventRequestType { - const INSERT = 1; - const UPDATE = 2; - const DELETE = 3; - static public $__names = array( - 1 => 'INSERT', - 2 => 'UPDATE', - 3 => 'DELETE', - ); -} - -final class FunctionType { - const JAVA = 1; - static public $__names = array( - 1 => 'JAVA', - ); -} - -final class ResourceType { - const JAR = 1; - const FILE = 2; - const ARCHIVE = 3; - static public $__names = array( - 1 => 'JAR', - 2 => 'FILE', - 3 => 'ARCHIVE', - ); -} - -final class FileMetadataExprType { - const ORC_SARG = 1; - static public $__names = array( - 1 => 'ORC_SARG', - ); -} - -final class ClientCapability { - const TEST_CAPABILITY = 1; - static public $__names = array( - 1 => 'TEST_CAPABILITY', - ); -} - -class Version { - static $_TSPEC; - - /** - * @var string - */ - public $version = null; - /** - * @var string - */ - 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; - - /** - * @var string - */ - public $name = null; - /** - * @var string - */ - public $type = null; - /** - * @var string - */ - 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 SQLPrimaryKey { - static $_TSPEC; - - /** - * @var string - */ - public $table_db = null; - /** - * @var string - */ - public $table_name = null; - /** - * @var string - */ - public $column_name = null; - /** - * @var int - */ - public $key_seq = null; - /** - * @var string - */ - public $pk_name = null; - /** - * @var bool - */ - public $enable_cstr = null; - /** - * @var bool - */ - public $validate_cstr = null; - /** - * @var bool - */ - public $rely_cstr = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'table_db', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'table_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'column_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'key_seq', - 'type' => TType::I32, - ), - 5 => array( - 'var' => 'pk_name', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'enable_cstr', - 'type' => TType::BOOL, - ), - 7 => array( - 'var' => 'validate_cstr', - 'type' => TType::BOOL, - ), - 8 => array( - 'var' => 'rely_cstr', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['table_db'])) { - $this->table_db = $vals['table_db']; - } - if (isset($vals['table_name'])) { - $this->table_name = $vals['table_name']; - } - if (isset($vals['column_name'])) { - $this->column_name = $vals['column_name']; - } - if (isset($vals['key_seq'])) { - $this->key_seq = $vals['key_seq']; - } - if (isset($vals['pk_name'])) { - $this->pk_name = $vals['pk_name']; - } - if (isset($vals['enable_cstr'])) { - $this->enable_cstr = $vals['enable_cstr']; - } - if (isset($vals['validate_cstr'])) { - $this->validate_cstr = $vals['validate_cstr']; - } - if (isset($vals['rely_cstr'])) { - $this->rely_cstr = $vals['rely_cstr']; - } - } - } - - public function getName() { - return 'SQLPrimaryKey'; - } - - 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->table_db); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->column_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->key_seq); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pk_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->enable_cstr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->validate_cstr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->rely_cstr); - } 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('SQLPrimaryKey'); - if ($this->table_db !== null) { - $xfer += $output->writeFieldBegin('table_db', TType::STRING, 1); - $xfer += $output->writeString($this->table_db); - $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(); - } - if ($this->column_name !== null) { - $xfer += $output->writeFieldBegin('column_name', TType::STRING, 3); - $xfer += $output->writeString($this->column_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->key_seq !== null) { - $xfer += $output->writeFieldBegin('key_seq', TType::I32, 4); - $xfer += $output->writeI32($this->key_seq); - $xfer += $output->writeFieldEnd(); - } - if ($this->pk_name !== null) { - $xfer += $output->writeFieldBegin('pk_name', TType::STRING, 5); - $xfer += $output->writeString($this->pk_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->enable_cstr !== null) { - $xfer += $output->writeFieldBegin('enable_cstr', TType::BOOL, 6); - $xfer += $output->writeBool($this->enable_cstr); - $xfer += $output->writeFieldEnd(); - } - if ($this->validate_cstr !== null) { - $xfer += $output->writeFieldBegin('validate_cstr', TType::BOOL, 7); - $xfer += $output->writeBool($this->validate_cstr); - $xfer += $output->writeFieldEnd(); - } - if ($this->rely_cstr !== null) { - $xfer += $output->writeFieldBegin('rely_cstr', TType::BOOL, 8); - $xfer += $output->writeBool($this->rely_cstr); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class SQLForeignKey { - static $_TSPEC; - - /** - * @var string - */ - public $pktable_db = null; - /** - * @var string - */ - public $pktable_name = null; - /** - * @var string - */ - public $pkcolumn_name = null; - /** - * @var string - */ - public $fktable_db = null; - /** - * @var string - */ - public $fktable_name = null; - /** - * @var string - */ - public $fkcolumn_name = null; - /** - * @var int - */ - public $key_seq = null; - /** - * @var int - */ - public $update_rule = null; - /** - * @var int - */ - public $delete_rule = null; - /** - * @var string - */ - public $fk_name = null; - /** - * @var string - */ - public $pk_name = null; - /** - * @var bool - */ - public $enable_cstr = null; - /** - * @var bool - */ - public $validate_cstr = null; - /** - * @var bool - */ - public $rely_cstr = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'pktable_db', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'pktable_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'pkcolumn_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'fktable_db', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'fktable_name', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'fkcolumn_name', - 'type' => TType::STRING, - ), - 7 => array( - 'var' => 'key_seq', - 'type' => TType::I32, - ), - 8 => array( - 'var' => 'update_rule', - 'type' => TType::I32, - ), - 9 => array( - 'var' => 'delete_rule', - 'type' => TType::I32, - ), - 10 => array( - 'var' => 'fk_name', - 'type' => TType::STRING, - ), - 11 => array( - 'var' => 'pk_name', - 'type' => TType::STRING, - ), - 12 => array( - 'var' => 'enable_cstr', - 'type' => TType::BOOL, - ), - 13 => array( - 'var' => 'validate_cstr', - 'type' => TType::BOOL, - ), - 14 => array( - 'var' => 'rely_cstr', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['pktable_db'])) { - $this->pktable_db = $vals['pktable_db']; - } - if (isset($vals['pktable_name'])) { - $this->pktable_name = $vals['pktable_name']; - } - if (isset($vals['pkcolumn_name'])) { - $this->pkcolumn_name = $vals['pkcolumn_name']; - } - if (isset($vals['fktable_db'])) { - $this->fktable_db = $vals['fktable_db']; - } - if (isset($vals['fktable_name'])) { - $this->fktable_name = $vals['fktable_name']; - } - if (isset($vals['fkcolumn_name'])) { - $this->fkcolumn_name = $vals['fkcolumn_name']; - } - if (isset($vals['key_seq'])) { - $this->key_seq = $vals['key_seq']; - } - if (isset($vals['update_rule'])) { - $this->update_rule = $vals['update_rule']; - } - if (isset($vals['delete_rule'])) { - $this->delete_rule = $vals['delete_rule']; - } - if (isset($vals['fk_name'])) { - $this->fk_name = $vals['fk_name']; - } - if (isset($vals['pk_name'])) { - $this->pk_name = $vals['pk_name']; - } - if (isset($vals['enable_cstr'])) { - $this->enable_cstr = $vals['enable_cstr']; - } - if (isset($vals['validate_cstr'])) { - $this->validate_cstr = $vals['validate_cstr']; - } - if (isset($vals['rely_cstr'])) { - $this->rely_cstr = $vals['rely_cstr']; - } - } - } - - public function getName() { - return 'SQLForeignKey'; - } - - 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->pktable_db); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pktable_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pkcolumn_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->fktable_db); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->fktable_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->fkcolumn_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->key_seq); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->update_rule); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->delete_rule); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->fk_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 11: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pk_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 12: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->enable_cstr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 13: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->validate_cstr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 14: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->rely_cstr); - } 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('SQLForeignKey'); - if ($this->pktable_db !== null) { - $xfer += $output->writeFieldBegin('pktable_db', TType::STRING, 1); - $xfer += $output->writeString($this->pktable_db); - $xfer += $output->writeFieldEnd(); - } - if ($this->pktable_name !== null) { - $xfer += $output->writeFieldBegin('pktable_name', TType::STRING, 2); - $xfer += $output->writeString($this->pktable_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->pkcolumn_name !== null) { - $xfer += $output->writeFieldBegin('pkcolumn_name', TType::STRING, 3); - $xfer += $output->writeString($this->pkcolumn_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->fktable_db !== null) { - $xfer += $output->writeFieldBegin('fktable_db', TType::STRING, 4); - $xfer += $output->writeString($this->fktable_db); - $xfer += $output->writeFieldEnd(); - } - if ($this->fktable_name !== null) { - $xfer += $output->writeFieldBegin('fktable_name', TType::STRING, 5); - $xfer += $output->writeString($this->fktable_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->fkcolumn_name !== null) { - $xfer += $output->writeFieldBegin('fkcolumn_name', TType::STRING, 6); - $xfer += $output->writeString($this->fkcolumn_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->key_seq !== null) { - $xfer += $output->writeFieldBegin('key_seq', TType::I32, 7); - $xfer += $output->writeI32($this->key_seq); - $xfer += $output->writeFieldEnd(); - } - if ($this->update_rule !== null) { - $xfer += $output->writeFieldBegin('update_rule', TType::I32, 8); - $xfer += $output->writeI32($this->update_rule); - $xfer += $output->writeFieldEnd(); - } - if ($this->delete_rule !== null) { - $xfer += $output->writeFieldBegin('delete_rule', TType::I32, 9); - $xfer += $output->writeI32($this->delete_rule); - $xfer += $output->writeFieldEnd(); - } - if ($this->fk_name !== null) { - $xfer += $output->writeFieldBegin('fk_name', TType::STRING, 10); - $xfer += $output->writeString($this->fk_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->pk_name !== null) { - $xfer += $output->writeFieldBegin('pk_name', TType::STRING, 11); - $xfer += $output->writeString($this->pk_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->enable_cstr !== null) { - $xfer += $output->writeFieldBegin('enable_cstr', TType::BOOL, 12); - $xfer += $output->writeBool($this->enable_cstr); - $xfer += $output->writeFieldEnd(); - } - if ($this->validate_cstr !== null) { - $xfer += $output->writeFieldBegin('validate_cstr', TType::BOOL, 13); - $xfer += $output->writeBool($this->validate_cstr); - $xfer += $output->writeFieldEnd(); - } - if ($this->rely_cstr !== null) { - $xfer += $output->writeFieldBegin('rely_cstr', TType::BOOL, 14); - $xfer += $output->writeBool($this->rely_cstr); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class SQLUniqueConstraint { - static $_TSPEC; - - /** - * @var string - */ - public $table_db = null; - /** - * @var string - */ - public $table_name = null; - /** - * @var string - */ - public $column_name = null; - /** - * @var int - */ - public $key_seq = null; - /** - * @var string - */ - public $uk_name = null; - /** - * @var bool - */ - public $enable_cstr = null; - /** - * @var bool - */ - public $validate_cstr = null; - /** - * @var bool - */ - public $rely_cstr = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'table_db', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'table_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'column_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'key_seq', - 'type' => TType::I32, - ), - 5 => array( - 'var' => 'uk_name', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'enable_cstr', - 'type' => TType::BOOL, - ), - 7 => array( - 'var' => 'validate_cstr', - 'type' => TType::BOOL, - ), - 8 => array( - 'var' => 'rely_cstr', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['table_db'])) { - $this->table_db = $vals['table_db']; - } - if (isset($vals['table_name'])) { - $this->table_name = $vals['table_name']; - } - if (isset($vals['column_name'])) { - $this->column_name = $vals['column_name']; - } - if (isset($vals['key_seq'])) { - $this->key_seq = $vals['key_seq']; - } - if (isset($vals['uk_name'])) { - $this->uk_name = $vals['uk_name']; - } - if (isset($vals['enable_cstr'])) { - $this->enable_cstr = $vals['enable_cstr']; - } - if (isset($vals['validate_cstr'])) { - $this->validate_cstr = $vals['validate_cstr']; - } - if (isset($vals['rely_cstr'])) { - $this->rely_cstr = $vals['rely_cstr']; - } - } - } - - public function getName() { - return 'SQLUniqueConstraint'; - } - - 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->table_db); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->column_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->key_seq); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->uk_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->enable_cstr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->validate_cstr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->rely_cstr); - } 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('SQLUniqueConstraint'); - if ($this->table_db !== null) { - $xfer += $output->writeFieldBegin('table_db', TType::STRING, 1); - $xfer += $output->writeString($this->table_db); - $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(); - } - if ($this->column_name !== null) { - $xfer += $output->writeFieldBegin('column_name', TType::STRING, 3); - $xfer += $output->writeString($this->column_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->key_seq !== null) { - $xfer += $output->writeFieldBegin('key_seq', TType::I32, 4); - $xfer += $output->writeI32($this->key_seq); - $xfer += $output->writeFieldEnd(); - } - if ($this->uk_name !== null) { - $xfer += $output->writeFieldBegin('uk_name', TType::STRING, 5); - $xfer += $output->writeString($this->uk_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->enable_cstr !== null) { - $xfer += $output->writeFieldBegin('enable_cstr', TType::BOOL, 6); - $xfer += $output->writeBool($this->enable_cstr); - $xfer += $output->writeFieldEnd(); - } - if ($this->validate_cstr !== null) { - $xfer += $output->writeFieldBegin('validate_cstr', TType::BOOL, 7); - $xfer += $output->writeBool($this->validate_cstr); - $xfer += $output->writeFieldEnd(); - } - if ($this->rely_cstr !== null) { - $xfer += $output->writeFieldBegin('rely_cstr', TType::BOOL, 8); - $xfer += $output->writeBool($this->rely_cstr); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class SQLNotNullConstraint { - static $_TSPEC; - - /** - * @var string - */ - public $table_db = null; - /** - * @var string - */ - public $table_name = null; - /** - * @var string - */ - public $column_name = null; - /** - * @var string - */ - public $nn_name = null; - /** - * @var bool - */ - public $enable_cstr = null; - /** - * @var bool - */ - public $validate_cstr = null; - /** - * @var bool - */ - public $rely_cstr = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'table_db', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'table_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'column_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'nn_name', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'enable_cstr', - 'type' => TType::BOOL, - ), - 6 => array( - 'var' => 'validate_cstr', - 'type' => TType::BOOL, - ), - 7 => array( - 'var' => 'rely_cstr', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['table_db'])) { - $this->table_db = $vals['table_db']; - } - if (isset($vals['table_name'])) { - $this->table_name = $vals['table_name']; - } - if (isset($vals['column_name'])) { - $this->column_name = $vals['column_name']; - } - if (isset($vals['nn_name'])) { - $this->nn_name = $vals['nn_name']; - } - if (isset($vals['enable_cstr'])) { - $this->enable_cstr = $vals['enable_cstr']; - } - if (isset($vals['validate_cstr'])) { - $this->validate_cstr = $vals['validate_cstr']; - } - if (isset($vals['rely_cstr'])) { - $this->rely_cstr = $vals['rely_cstr']; - } - } - } - - public function getName() { - return 'SQLNotNullConstraint'; - } - - 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->table_db); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->column_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->nn_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->enable_cstr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->validate_cstr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->rely_cstr); - } 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('SQLNotNullConstraint'); - if ($this->table_db !== null) { - $xfer += $output->writeFieldBegin('table_db', TType::STRING, 1); - $xfer += $output->writeString($this->table_db); - $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(); - } - if ($this->column_name !== null) { - $xfer += $output->writeFieldBegin('column_name', TType::STRING, 3); - $xfer += $output->writeString($this->column_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->nn_name !== null) { - $xfer += $output->writeFieldBegin('nn_name', TType::STRING, 4); - $xfer += $output->writeString($this->nn_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->enable_cstr !== null) { - $xfer += $output->writeFieldBegin('enable_cstr', TType::BOOL, 5); - $xfer += $output->writeBool($this->enable_cstr); - $xfer += $output->writeFieldEnd(); - } - if ($this->validate_cstr !== null) { - $xfer += $output->writeFieldBegin('validate_cstr', TType::BOOL, 6); - $xfer += $output->writeBool($this->validate_cstr); - $xfer += $output->writeFieldEnd(); - } - if ($this->rely_cstr !== null) { - $xfer += $output->writeFieldBegin('rely_cstr', TType::BOOL, 7); - $xfer += $output->writeBool($this->rely_cstr); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Type { - static $_TSPEC; - - /** - * @var string - */ - public $name = null; - /** - * @var string - */ - public $type1 = null; - /** - * @var string - */ - public $type2 = null; - /** - * @var \metastore\FieldSchema[] - */ - 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; - - /** - * @var int - */ - public $objectType = null; - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $objectName = null; - /** - * @var string[] - */ - public $partValues = null; - /** - * @var string - */ - 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; - - /** - * @var string - */ - public $privilege = null; - /** - * @var int - */ - public $createTime = null; - /** - * @var string - */ - public $grantor = null; - /** - * @var int - */ - public $grantorType = null; - /** - * @var bool - */ - 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; - - /** - * @var \metastore\HiveObjectRef - */ - public $hiveObject = null; - /** - * @var string - */ - public $principalName = null; - /** - * @var int - */ - public $principalType = null; - /** - * @var \metastore\PrivilegeGrantInfo - */ - 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; - - /** - * @var \metastore\HiveObjectPrivilege[] - */ - 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; - - /** - * @var array - */ - public $userPrivileges = null; - /** - * @var array - */ - public $groupPrivileges = null; - /** - * @var array - */ - 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 GrantRevokePrivilegeRequest { - static $_TSPEC; - - /** - * @var int - */ - public $requestType = null; - /** - * @var \metastore\PrivilegeBag - */ - public $privileges = null; - /** - * @var bool - */ - public $revokeGrantOption = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'requestType', - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'privileges', - 'type' => TType::STRUCT, - 'class' => '\metastore\PrivilegeBag', - ), - 3 => array( - 'var' => 'revokeGrantOption', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['requestType'])) { - $this->requestType = $vals['requestType']; - } - if (isset($vals['privileges'])) { - $this->privileges = $vals['privileges']; - } - if (isset($vals['revokeGrantOption'])) { - $this->revokeGrantOption = $vals['revokeGrantOption']; - } - } - } - - public function getName() { - return 'GrantRevokePrivilegeRequest'; - } - - 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->requestType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->privileges = new \metastore\PrivilegeBag(); - $xfer += $this->privileges->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->revokeGrantOption); - } 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('GrantRevokePrivilegeRequest'); - if ($this->requestType !== null) { - $xfer += $output->writeFieldBegin('requestType', TType::I32, 1); - $xfer += $output->writeI32($this->requestType); - $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, 2); - $xfer += $this->privileges->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->revokeGrantOption !== null) { - $xfer += $output->writeFieldBegin('revokeGrantOption', TType::BOOL, 3); - $xfer += $output->writeBool($this->revokeGrantOption); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GrantRevokePrivilegeResponse { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'success', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'GrantRevokePrivilegeResponse'; - } - - 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::BOOL) { - $xfer += $input->readBool($this->success); - } 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('GrantRevokePrivilegeResponse'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 1); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Role { - static $_TSPEC; - - /** - * @var string - */ - public $roleName = null; - /** - * @var int - */ - public $createTime = null; - /** - * @var string - */ - 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 RolePrincipalGrant { - static $_TSPEC; - - /** - * @var string - */ - public $roleName = null; - /** - * @var string - */ - public $principalName = null; - /** - * @var int - */ - public $principalType = null; - /** - * @var bool - */ - public $grantOption = null; - /** - * @var int - */ - public $grantTime = null; - /** - * @var string - */ - public $grantorName = null; - /** - * @var int - */ - public $grantorPrincipalType = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'roleName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'principalName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'principalType', - 'type' => TType::I32, - ), - 4 => array( - 'var' => 'grantOption', - 'type' => TType::BOOL, - ), - 5 => array( - 'var' => 'grantTime', - 'type' => TType::I32, - ), - 6 => array( - 'var' => 'grantorName', - 'type' => TType::STRING, - ), - 7 => array( - 'var' => 'grantorPrincipalType', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['roleName'])) { - $this->roleName = $vals['roleName']; - } - if (isset($vals['principalName'])) { - $this->principalName = $vals['principalName']; - } - if (isset($vals['principalType'])) { - $this->principalType = $vals['principalType']; - } - if (isset($vals['grantOption'])) { - $this->grantOption = $vals['grantOption']; - } - if (isset($vals['grantTime'])) { - $this->grantTime = $vals['grantTime']; - } - if (isset($vals['grantorName'])) { - $this->grantorName = $vals['grantorName']; - } - if (isset($vals['grantorPrincipalType'])) { - $this->grantorPrincipalType = $vals['grantorPrincipalType']; - } - } - } - - public function getName() { - return 'RolePrincipalGrant'; - } - - 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::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::BOOL) { - $xfer += $input->readBool($this->grantOption); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->grantTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->grantorName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->grantorPrincipalType); - } 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('RolePrincipalGrant'); - if ($this->roleName !== null) { - $xfer += $output->writeFieldBegin('roleName', TType::STRING, 1); - $xfer += $output->writeString($this->roleName); - $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->grantOption !== null) { - $xfer += $output->writeFieldBegin('grantOption', TType::BOOL, 4); - $xfer += $output->writeBool($this->grantOption); - $xfer += $output->writeFieldEnd(); - } - if ($this->grantTime !== null) { - $xfer += $output->writeFieldBegin('grantTime', TType::I32, 5); - $xfer += $output->writeI32($this->grantTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->grantorName !== null) { - $xfer += $output->writeFieldBegin('grantorName', TType::STRING, 6); - $xfer += $output->writeString($this->grantorName); - $xfer += $output->writeFieldEnd(); - } - if ($this->grantorPrincipalType !== null) { - $xfer += $output->writeFieldBegin('grantorPrincipalType', TType::I32, 7); - $xfer += $output->writeI32($this->grantorPrincipalType); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetRoleGrantsForPrincipalRequest { - static $_TSPEC; - - /** - * @var string - */ - public $principal_name = null; - /** - * @var int - */ - 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 'GetRoleGrantsForPrincipalRequest'; - } - - 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('GetRoleGrantsForPrincipalRequest'); - 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 GetRoleGrantsForPrincipalResponse { - static $_TSPEC; - - /** - * @var \metastore\RolePrincipalGrant[] - */ - public $principalGrants = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'principalGrants', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\RolePrincipalGrant', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['principalGrants'])) { - $this->principalGrants = $vals['principalGrants']; - } - } - } - - public function getName() { - return 'GetRoleGrantsForPrincipalResponse'; - } - - 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->principalGrants = array(); - $_size69 = 0; - $_etype72 = 0; - $xfer += $input->readListBegin($_etype72, $_size69); - for ($_i73 = 0; $_i73 < $_size69; ++$_i73) - { - $elem74 = null; - $elem74 = new \metastore\RolePrincipalGrant(); - $xfer += $elem74->read($input); - $this->principalGrants []= $elem74; - } - $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('GetRoleGrantsForPrincipalResponse'); - if ($this->principalGrants !== null) { - if (!is_array($this->principalGrants)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('principalGrants', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->principalGrants)); - { - foreach ($this->principalGrants as $iter75) - { - $xfer += $iter75->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetPrincipalsInRoleRequest { - static $_TSPEC; - - /** - * @var string - */ - public $roleName = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'roleName', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['roleName'])) { - $this->roleName = $vals['roleName']; - } - } - } - - public function getName() { - return 'GetPrincipalsInRoleRequest'; - } - - 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; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('GetPrincipalsInRoleRequest'); - if ($this->roleName !== null) { - $xfer += $output->writeFieldBegin('roleName', TType::STRING, 1); - $xfer += $output->writeString($this->roleName); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetPrincipalsInRoleResponse { - static $_TSPEC; - - /** - * @var \metastore\RolePrincipalGrant[] - */ - public $principalGrants = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'principalGrants', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\RolePrincipalGrant', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['principalGrants'])) { - $this->principalGrants = $vals['principalGrants']; - } - } - } - - public function getName() { - return 'GetPrincipalsInRoleResponse'; - } - - 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->principalGrants = array(); - $_size76 = 0; - $_etype79 = 0; - $xfer += $input->readListBegin($_etype79, $_size76); - for ($_i80 = 0; $_i80 < $_size76; ++$_i80) - { - $elem81 = null; - $elem81 = new \metastore\RolePrincipalGrant(); - $xfer += $elem81->read($input); - $this->principalGrants []= $elem81; - } - $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('GetPrincipalsInRoleResponse'); - if ($this->principalGrants !== null) { - if (!is_array($this->principalGrants)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('principalGrants', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->principalGrants)); - { - foreach ($this->principalGrants as $iter82) - { - $xfer += $iter82->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GrantRevokeRoleRequest { - static $_TSPEC; - - /** - * @var int - */ - public $requestType = null; - /** - * @var string - */ - public $roleName = null; - /** - * @var string - */ - public $principalName = null; - /** - * @var int - */ - public $principalType = null; - /** - * @var string - */ - public $grantor = null; - /** - * @var int - */ - public $grantorType = null; - /** - * @var bool - */ - public $grantOption = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'requestType', - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'roleName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'principalName', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'principalType', - 'type' => TType::I32, - ), - 5 => array( - 'var' => 'grantor', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'grantorType', - 'type' => TType::I32, - ), - 7 => array( - 'var' => 'grantOption', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['requestType'])) { - $this->requestType = $vals['requestType']; - } - if (isset($vals['roleName'])) { - $this->roleName = $vals['roleName']; - } - if (isset($vals['principalName'])) { - $this->principalName = $vals['principalName']; - } - if (isset($vals['principalType'])) { - $this->principalType = $vals['principalType']; - } - 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 'GrantRevokeRoleRequest'; - } - - 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->requestType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->roleName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->principalName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->principalType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->grantor); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->grantorType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - 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('GrantRevokeRoleRequest'); - if ($this->requestType !== null) { - $xfer += $output->writeFieldBegin('requestType', TType::I32, 1); - $xfer += $output->writeI32($this->requestType); - $xfer += $output->writeFieldEnd(); - } - if ($this->roleName !== null) { - $xfer += $output->writeFieldBegin('roleName', TType::STRING, 2); - $xfer += $output->writeString($this->roleName); - $xfer += $output->writeFieldEnd(); - } - if ($this->principalName !== null) { - $xfer += $output->writeFieldBegin('principalName', TType::STRING, 3); - $xfer += $output->writeString($this->principalName); - $xfer += $output->writeFieldEnd(); - } - if ($this->principalType !== null) { - $xfer += $output->writeFieldBegin('principalType', TType::I32, 4); - $xfer += $output->writeI32($this->principalType); - $xfer += $output->writeFieldEnd(); - } - if ($this->grantor !== null) { - $xfer += $output->writeFieldBegin('grantor', TType::STRING, 5); - $xfer += $output->writeString($this->grantor); - $xfer += $output->writeFieldEnd(); - } - if ($this->grantorType !== null) { - $xfer += $output->writeFieldBegin('grantorType', TType::I32, 6); - $xfer += $output->writeI32($this->grantorType); - $xfer += $output->writeFieldEnd(); - } - if ($this->grantOption !== null) { - $xfer += $output->writeFieldBegin('grantOption', TType::BOOL, 7); - $xfer += $output->writeBool($this->grantOption); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GrantRevokeRoleResponse { - static $_TSPEC; - - /** - * @var bool - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'success', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'GrantRevokeRoleResponse'; - } - - 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::BOOL) { - $xfer += $input->readBool($this->success); - } 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('GrantRevokeRoleResponse'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 1); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Database { - static $_TSPEC; - - /** - * @var string - */ - public $name = null; - /** - * @var string - */ - public $description = null; - /** - * @var string - */ - public $locationUri = null; - /** - * @var array - */ - public $parameters = null; - /** - * @var \metastore\PrincipalPrivilegeSet - */ - public $privileges = null; - /** - * @var string - */ - public $ownerName = null; - /** - * @var int - */ - public $ownerType = 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', - ), - 6 => array( - 'var' => 'ownerName', - 'type' => TType::STRING, - ), - 7 => array( - 'var' => 'ownerType', - 'type' => TType::I32, - ), - ); - } - 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']; - } - if (isset($vals['ownerName'])) { - $this->ownerName = $vals['ownerName']; - } - if (isset($vals['ownerType'])) { - $this->ownerType = $vals['ownerType']; - } - } - } - - 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(); - $_size83 = 0; - $_ktype84 = 0; - $_vtype85 = 0; - $xfer += $input->readMapBegin($_ktype84, $_vtype85, $_size83); - for ($_i87 = 0; $_i87 < $_size83; ++$_i87) - { - $key88 = ''; - $val89 = ''; - $xfer += $input->readString($key88); - $xfer += $input->readString($val89); - $this->parameters[$key88] = $val89; - } - $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; - case 6: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->ownerName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->ownerType); - } 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 $kiter90 => $viter91) - { - $xfer += $output->writeString($kiter90); - $xfer += $output->writeString($viter91); - } - } - $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(); - } - if ($this->ownerName !== null) { - $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 6); - $xfer += $output->writeString($this->ownerName); - $xfer += $output->writeFieldEnd(); - } - if ($this->ownerType !== null) { - $xfer += $output->writeFieldBegin('ownerType', TType::I32, 7); - $xfer += $output->writeI32($this->ownerType); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class SerDeInfo { - static $_TSPEC; - - /** - * @var string - */ - public $name = null; - /** - * @var string - */ - public $serializationLib = null; - /** - * @var array - */ - 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(); - $_size92 = 0; - $_ktype93 = 0; - $_vtype94 = 0; - $xfer += $input->readMapBegin($_ktype93, $_vtype94, $_size92); - for ($_i96 = 0; $_i96 < $_size92; ++$_i96) - { - $key97 = ''; - $val98 = ''; - $xfer += $input->readString($key97); - $xfer += $input->readString($val98); - $this->parameters[$key97] = $val98; - } - $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 $kiter99 => $viter100) - { - $xfer += $output->writeString($kiter99); - $xfer += $output->writeString($viter100); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Order { - static $_TSPEC; - - /** - * @var string - */ - public $col = null; - /** - * @var int - */ - 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; - - /** - * @var string[] - */ - public $skewedColNames = null; - /** - * @var (string[])[] - */ - public $skewedColValues = null; - /** - * @var array - */ - 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(); - $_size101 = 0; - $_etype104 = 0; - $xfer += $input->readListBegin($_etype104, $_size101); - for ($_i105 = 0; $_i105 < $_size101; ++$_i105) - { - $elem106 = null; - $xfer += $input->readString($elem106); - $this->skewedColNames []= $elem106; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->skewedColValues = array(); - $_size107 = 0; - $_etype110 = 0; - $xfer += $input->readListBegin($_etype110, $_size107); - for ($_i111 = 0; $_i111 < $_size107; ++$_i111) - { - $elem112 = null; - $elem112 = array(); - $_size113 = 0; - $_etype116 = 0; - $xfer += $input->readListBegin($_etype116, $_size113); - for ($_i117 = 0; $_i117 < $_size113; ++$_i117) - { - $elem118 = null; - $xfer += $input->readString($elem118); - $elem112 []= $elem118; - } - $xfer += $input->readListEnd(); - $this->skewedColValues []= $elem112; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::MAP) { - $this->skewedColValueLocationMaps = array(); - $_size119 = 0; - $_ktype120 = 0; - $_vtype121 = 0; - $xfer += $input->readMapBegin($_ktype120, $_vtype121, $_size119); - for ($_i123 = 0; $_i123 < $_size119; ++$_i123) - { - $key124 = array(); - $val125 = ''; - $key124 = array(); - $_size126 = 0; - $_etype129 = 0; - $xfer += $input->readListBegin($_etype129, $_size126); - for ($_i130 = 0; $_i130 < $_size126; ++$_i130) - { - $elem131 = null; - $xfer += $input->readString($elem131); - $key124 []= $elem131; - } - $xfer += $input->readListEnd(); - $xfer += $input->readString($val125); - $this->skewedColValueLocationMaps[$key124] = $val125; - } - $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 $iter132) - { - $xfer += $output->writeString($iter132); - } - } - $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 $iter133) - { - { - $output->writeListBegin(TType::STRING, count($iter133)); - { - foreach ($iter133 as $iter134) - { - $xfer += $output->writeString($iter134); - } - } - $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 $kiter135 => $viter136) - { - { - $output->writeListBegin(TType::STRING, count($kiter135)); - { - foreach ($kiter135 as $iter137) - { - $xfer += $output->writeString($iter137); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeString($viter136); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class StorageDescriptor { - static $_TSPEC; - - /** - * @var \metastore\FieldSchema[] - */ - public $cols = null; - /** - * @var string - */ - public $location = null; - /** - * @var string - */ - public $inputFormat = null; - /** - * @var string - */ - public $outputFormat = null; - /** - * @var bool - */ - public $compressed = null; - /** - * @var int - */ - public $numBuckets = null; - /** - * @var \metastore\SerDeInfo - */ - public $serdeInfo = null; - /** - * @var string[] - */ - public $bucketCols = null; - /** - * @var \metastore\Order[] - */ - public $sortCols = null; - /** - * @var array - */ - public $parameters = null; - /** - * @var \metastore\SkewedInfo - */ - public $skewedInfo = null; - /** - * @var bool - */ - public $storedAsSubDirectories = 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', - ), - 12 => array( - 'var' => 'storedAsSubDirectories', - 'type' => TType::BOOL, - ), - ); - } - 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']; - } - if (isset($vals['storedAsSubDirectories'])) { - $this->storedAsSubDirectories = $vals['storedAsSubDirectories']; - } - } - } - - 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(); - $_size138 = 0; - $_etype141 = 0; - $xfer += $input->readListBegin($_etype141, $_size138); - for ($_i142 = 0; $_i142 < $_size138; ++$_i142) - { - $elem143 = null; - $elem143 = new \metastore\FieldSchema(); - $xfer += $elem143->read($input); - $this->cols []= $elem143; - } - $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(); - $_size144 = 0; - $_etype147 = 0; - $xfer += $input->readListBegin($_etype147, $_size144); - for ($_i148 = 0; $_i148 < $_size144; ++$_i148) - { - $elem149 = null; - $xfer += $input->readString($elem149); - $this->bucketCols []= $elem149; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::LST) { - $this->sortCols = array(); - $_size150 = 0; - $_etype153 = 0; - $xfer += $input->readListBegin($_etype153, $_size150); - for ($_i154 = 0; $_i154 < $_size150; ++$_i154) - { - $elem155 = null; - $elem155 = new \metastore\Order(); - $xfer += $elem155->read($input); - $this->sortCols []= $elem155; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::MAP) { - $this->parameters = array(); - $_size156 = 0; - $_ktype157 = 0; - $_vtype158 = 0; - $xfer += $input->readMapBegin($_ktype157, $_vtype158, $_size156); - for ($_i160 = 0; $_i160 < $_size156; ++$_i160) - { - $key161 = ''; - $val162 = ''; - $xfer += $input->readString($key161); - $xfer += $input->readString($val162); - $this->parameters[$key161] = $val162; - } - $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; - case 12: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->storedAsSubDirectories); - } 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 $iter163) - { - $xfer += $iter163->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 $iter164) - { - $xfer += $output->writeString($iter164); - } - } - $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 $iter165) - { - $xfer += $iter165->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 $kiter166 => $viter167) - { - $xfer += $output->writeString($kiter166); - $xfer += $output->writeString($viter167); - } - } - $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(); - } - if ($this->storedAsSubDirectories !== null) { - $xfer += $output->writeFieldBegin('storedAsSubDirectories', TType::BOOL, 12); - $xfer += $output->writeBool($this->storedAsSubDirectories); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Table { - static $_TSPEC; - - /** - * @var string - */ - public $tableName = null; - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $owner = null; - /** - * @var int - */ - public $createTime = null; - /** - * @var int - */ - public $lastAccessTime = null; - /** - * @var int - */ - public $retention = null; - /** - * @var \metastore\StorageDescriptor - */ - public $sd = null; - /** - * @var \metastore\FieldSchema[] - */ - public $partitionKeys = null; - /** - * @var array - */ - public $parameters = null; - /** - * @var string - */ - public $viewOriginalText = null; - /** - * @var string - */ - public $viewExpandedText = null; - /** - * @var string - */ - public $tableType = null; - /** - * @var \metastore\PrincipalPrivilegeSet - */ - public $privileges = null; - /** - * @var bool - */ - public $temporary = false; - /** - * @var bool - */ - public $rewriteEnabled = 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', - ), - 14 => array( - 'var' => 'temporary', - 'type' => TType::BOOL, - ), - 15 => array( - 'var' => 'rewriteEnabled', - 'type' => TType::BOOL, - ), - ); - } - 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']; - } - if (isset($vals['temporary'])) { - $this->temporary = $vals['temporary']; - } - if (isset($vals['rewriteEnabled'])) { - $this->rewriteEnabled = $vals['rewriteEnabled']; - } - } - } - - 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(); - $_size168 = 0; - $_etype171 = 0; - $xfer += $input->readListBegin($_etype171, $_size168); - for ($_i172 = 0; $_i172 < $_size168; ++$_i172) - { - $elem173 = null; - $elem173 = new \metastore\FieldSchema(); - $xfer += $elem173->read($input); - $this->partitionKeys []= $elem173; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::MAP) { - $this->parameters = array(); - $_size174 = 0; - $_ktype175 = 0; - $_vtype176 = 0; - $xfer += $input->readMapBegin($_ktype175, $_vtype176, $_size174); - for ($_i178 = 0; $_i178 < $_size174; ++$_i178) - { - $key179 = ''; - $val180 = ''; - $xfer += $input->readString($key179); - $xfer += $input->readString($val180); - $this->parameters[$key179] = $val180; - } - $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; - case 14: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->temporary); - } else { - $xfer += $input->skip($ftype); - } - break; - case 15: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->rewriteEnabled); - } 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 $iter181) - { - $xfer += $iter181->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 $kiter182 => $viter183) - { - $xfer += $output->writeString($kiter182); - $xfer += $output->writeString($viter183); - } - } - $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(); - } - if ($this->temporary !== null) { - $xfer += $output->writeFieldBegin('temporary', TType::BOOL, 14); - $xfer += $output->writeBool($this->temporary); - $xfer += $output->writeFieldEnd(); - } - if ($this->rewriteEnabled !== null) { - $xfer += $output->writeFieldBegin('rewriteEnabled', TType::BOOL, 15); - $xfer += $output->writeBool($this->rewriteEnabled); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Partition { - static $_TSPEC; - - /** - * @var string[] - */ - public $values = null; - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tableName = null; - /** - * @var int - */ - public $createTime = null; - /** - * @var int - */ - public $lastAccessTime = null; - /** - * @var \metastore\StorageDescriptor - */ - public $sd = null; - /** - * @var array - */ - public $parameters = null; - /** - * @var \metastore\PrincipalPrivilegeSet - */ - 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(); - $_size184 = 0; - $_etype187 = 0; - $xfer += $input->readListBegin($_etype187, $_size184); - for ($_i188 = 0; $_i188 < $_size184; ++$_i188) - { - $elem189 = null; - $xfer += $input->readString($elem189); - $this->values []= $elem189; - } - $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(); - $_size190 = 0; - $_ktype191 = 0; - $_vtype192 = 0; - $xfer += $input->readMapBegin($_ktype191, $_vtype192, $_size190); - for ($_i194 = 0; $_i194 < $_size190; ++$_i194) - { - $key195 = ''; - $val196 = ''; - $xfer += $input->readString($key195); - $xfer += $input->readString($val196); - $this->parameters[$key195] = $val196; - } - $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 $iter197) - { - $xfer += $output->writeString($iter197); - } - } - $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 $kiter198 => $viter199) - { - $xfer += $output->writeString($kiter198); - $xfer += $output->writeString($viter199); - } - } - $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 PartitionWithoutSD { - static $_TSPEC; - - /** - * @var string[] - */ - public $values = null; - /** - * @var int - */ - public $createTime = null; - /** - * @var int - */ - public $lastAccessTime = null; - /** - * @var string - */ - public $relativePath = null; - /** - * @var array - */ - public $parameters = null; - /** - * @var \metastore\PrincipalPrivilegeSet - */ - 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' => 'createTime', - 'type' => TType::I32, - ), - 3 => array( - 'var' => 'lastAccessTime', - 'type' => TType::I32, - ), - 4 => array( - 'var' => 'relativePath', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'parameters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 6 => array( - 'var' => 'privileges', - 'type' => TType::STRUCT, - 'class' => '\metastore\PrincipalPrivilegeSet', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['values'])) { - $this->values = $vals['values']; - } - if (isset($vals['createTime'])) { - $this->createTime = $vals['createTime']; - } - if (isset($vals['lastAccessTime'])) { - $this->lastAccessTime = $vals['lastAccessTime']; - } - if (isset($vals['relativePath'])) { - $this->relativePath = $vals['relativePath']; - } - if (isset($vals['parameters'])) { - $this->parameters = $vals['parameters']; - } - if (isset($vals['privileges'])) { - $this->privileges = $vals['privileges']; - } - } - } - - public function getName() { - return 'PartitionWithoutSD'; - } - - 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(); - $_size200 = 0; - $_etype203 = 0; - $xfer += $input->readListBegin($_etype203, $_size200); - for ($_i204 = 0; $_i204 < $_size200; ++$_i204) - { - $elem205 = null; - $xfer += $input->readString($elem205); - $this->values []= $elem205; - } - $xfer += $input->readListEnd(); - } 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::I32) { - $xfer += $input->readI32($this->lastAccessTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->relativePath); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::MAP) { - $this->parameters = array(); - $_size206 = 0; - $_ktype207 = 0; - $_vtype208 = 0; - $xfer += $input->readMapBegin($_ktype207, $_vtype208, $_size206); - for ($_i210 = 0; $_i210 < $_size206; ++$_i210) - { - $key211 = ''; - $val212 = ''; - $xfer += $input->readString($key211); - $xfer += $input->readString($val212); - $this->parameters[$key211] = $val212; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - 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('PartitionWithoutSD'); - 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 $iter213) - { - $xfer += $output->writeString($iter213); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->createTime !== null) { - $xfer += $output->writeFieldBegin('createTime', TType::I32, 2); - $xfer += $output->writeI32($this->createTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->lastAccessTime !== null) { - $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 3); - $xfer += $output->writeI32($this->lastAccessTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->relativePath !== null) { - $xfer += $output->writeFieldBegin('relativePath', TType::STRING, 4); - $xfer += $output->writeString($this->relativePath); - $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, 5); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); - { - foreach ($this->parameters as $kiter214 => $viter215) - { - $xfer += $output->writeString($kiter214); - $xfer += $output->writeString($viter215); - } - } - $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, 6); - $xfer += $this->privileges->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class PartitionSpecWithSharedSD { - static $_TSPEC; - - /** - * @var \metastore\PartitionWithoutSD[] - */ - public $partitions = null; - /** - * @var \metastore\StorageDescriptor - */ - public $sd = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'partitions', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\PartitionWithoutSD', - ), - ), - 2 => array( - 'var' => 'sd', - 'type' => TType::STRUCT, - 'class' => '\metastore\StorageDescriptor', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['partitions'])) { - $this->partitions = $vals['partitions']; - } - if (isset($vals['sd'])) { - $this->sd = $vals['sd']; - } - } - } - - public function getName() { - return 'PartitionSpecWithSharedSD'; - } - - 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->partitions = array(); - $_size216 = 0; - $_etype219 = 0; - $xfer += $input->readListBegin($_etype219, $_size216); - for ($_i220 = 0; $_i220 < $_size216; ++$_i220) - { - $elem221 = null; - $elem221 = new \metastore\PartitionWithoutSD(); - $xfer += $elem221->read($input); - $this->partitions []= $elem221; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->sd = new \metastore\StorageDescriptor(); - $xfer += $this->sd->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('PartitionSpecWithSharedSD'); - if ($this->partitions !== null) { - if (!is_array($this->partitions)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partitions', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->partitions)); - { - foreach ($this->partitions as $iter222) - { - $xfer += $iter222->write($output); - } - } - $output->writeListEnd(); - } - $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, 2); - $xfer += $this->sd->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class PartitionListComposingSpec { - static $_TSPEC; - - /** - * @var \metastore\Partition[] - */ - public $partitions = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'partitions', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['partitions'])) { - $this->partitions = $vals['partitions']; - } - } - } - - public function getName() { - return 'PartitionListComposingSpec'; - } - - 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->partitions = array(); - $_size223 = 0; - $_etype226 = 0; - $xfer += $input->readListBegin($_etype226, $_size223); - for ($_i227 = 0; $_i227 < $_size223; ++$_i227) - { - $elem228 = null; - $elem228 = new \metastore\Partition(); - $xfer += $elem228->read($input); - $this->partitions []= $elem228; - } - $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('PartitionListComposingSpec'); - if ($this->partitions !== null) { - if (!is_array($this->partitions)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partitions', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->partitions)); - { - foreach ($this->partitions as $iter229) - { - $xfer += $iter229->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class PartitionSpec { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tableName = null; - /** - * @var string - */ - public $rootPath = null; - /** - * @var \metastore\PartitionSpecWithSharedSD - */ - public $sharedSDPartitionSpec = null; - /** - * @var \metastore\PartitionListComposingSpec - */ - public $partitionList = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tableName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'rootPath', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'sharedSDPartitionSpec', - 'type' => TType::STRUCT, - 'class' => '\metastore\PartitionSpecWithSharedSD', - ), - 5 => array( - 'var' => 'partitionList', - 'type' => TType::STRUCT, - 'class' => '\metastore\PartitionListComposingSpec', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['tableName'])) { - $this->tableName = $vals['tableName']; - } - if (isset($vals['rootPath'])) { - $this->rootPath = $vals['rootPath']; - } - if (isset($vals['sharedSDPartitionSpec'])) { - $this->sharedSDPartitionSpec = $vals['sharedSDPartitionSpec']; - } - if (isset($vals['partitionList'])) { - $this->partitionList = $vals['partitionList']; - } - } - } - - public function getName() { - return 'PartitionSpec'; - } - - 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->tableName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->rootPath); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->sharedSDPartitionSpec = new \metastore\PartitionSpecWithSharedSD(); - $xfer += $this->sharedSDPartitionSpec->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRUCT) { - $this->partitionList = new \metastore\PartitionListComposingSpec(); - $xfer += $this->partitionList->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('PartitionSpec'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tableName !== null) { - $xfer += $output->writeFieldBegin('tableName', TType::STRING, 2); - $xfer += $output->writeString($this->tableName); - $xfer += $output->writeFieldEnd(); - } - if ($this->rootPath !== null) { - $xfer += $output->writeFieldBegin('rootPath', TType::STRING, 3); - $xfer += $output->writeString($this->rootPath); - $xfer += $output->writeFieldEnd(); - } - if ($this->sharedSDPartitionSpec !== null) { - if (!is_object($this->sharedSDPartitionSpec)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('sharedSDPartitionSpec', TType::STRUCT, 4); - $xfer += $this->sharedSDPartitionSpec->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->partitionList !== null) { - if (!is_object($this->partitionList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partitionList', TType::STRUCT, 5); - $xfer += $this->partitionList->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Index { - static $_TSPEC; - - /** - * @var string - */ - public $indexName = null; - /** - * @var string - */ - public $indexHandlerClass = null; - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $origTableName = null; - /** - * @var int - */ - public $createTime = null; - /** - * @var int - */ - public $lastAccessTime = null; - /** - * @var string - */ - public $indexTableName = null; - /** - * @var \metastore\StorageDescriptor - */ - public $sd = null; - /** - * @var array - */ - public $parameters = null; - /** - * @var bool - */ - 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(); - $_size230 = 0; - $_ktype231 = 0; - $_vtype232 = 0; - $xfer += $input->readMapBegin($_ktype231, $_vtype232, $_size230); - for ($_i234 = 0; $_i234 < $_size230; ++$_i234) - { - $key235 = ''; - $val236 = ''; - $xfer += $input->readString($key235); - $xfer += $input->readString($val236); - $this->parameters[$key235] = $val236; - } - $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 $kiter237 => $viter238) - { - $xfer += $output->writeString($kiter237); - $xfer += $output->writeString($viter238); - } - } - $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 BooleanColumnStatsData { - static $_TSPEC; - - /** - * @var int - */ - public $numTrues = null; - /** - * @var int - */ - public $numFalses = null; - /** - * @var int - */ - public $numNulls = null; - /** - * @var string - */ - public $bitVectors = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'numTrues', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'numFalses', - 'type' => TType::I64, - ), - 3 => array( - 'var' => 'numNulls', - 'type' => TType::I64, - ), - 4 => array( - 'var' => 'bitVectors', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['numTrues'])) { - $this->numTrues = $vals['numTrues']; - } - if (isset($vals['numFalses'])) { - $this->numFalses = $vals['numFalses']; - } - if (isset($vals['numNulls'])) { - $this->numNulls = $vals['numNulls']; - } - if (isset($vals['bitVectors'])) { - $this->bitVectors = $vals['bitVectors']; - } - } - } - - public function getName() { - return 'BooleanColumnStatsData'; - } - - 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::I64) { - $xfer += $input->readI64($this->numTrues); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numFalses); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numNulls); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->bitVectors); - } 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('BooleanColumnStatsData'); - if ($this->numTrues !== null) { - $xfer += $output->writeFieldBegin('numTrues', TType::I64, 1); - $xfer += $output->writeI64($this->numTrues); - $xfer += $output->writeFieldEnd(); - } - if ($this->numFalses !== null) { - $xfer += $output->writeFieldBegin('numFalses', TType::I64, 2); - $xfer += $output->writeI64($this->numFalses); - $xfer += $output->writeFieldEnd(); - } - if ($this->numNulls !== null) { - $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); - $xfer += $output->writeI64($this->numNulls); - $xfer += $output->writeFieldEnd(); - } - if ($this->bitVectors !== null) { - $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 4); - $xfer += $output->writeString($this->bitVectors); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class DoubleColumnStatsData { - static $_TSPEC; - - /** - * @var double - */ - public $lowValue = null; - /** - * @var double - */ - public $highValue = null; - /** - * @var int - */ - public $numNulls = null; - /** - * @var int - */ - public $numDVs = null; - /** - * @var string - */ - public $bitVectors = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'lowValue', - 'type' => TType::DOUBLE, - ), - 2 => array( - 'var' => 'highValue', - 'type' => TType::DOUBLE, - ), - 3 => array( - 'var' => 'numNulls', - 'type' => TType::I64, - ), - 4 => array( - 'var' => 'numDVs', - 'type' => TType::I64, - ), - 5 => array( - 'var' => 'bitVectors', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['lowValue'])) { - $this->lowValue = $vals['lowValue']; - } - if (isset($vals['highValue'])) { - $this->highValue = $vals['highValue']; - } - if (isset($vals['numNulls'])) { - $this->numNulls = $vals['numNulls']; - } - if (isset($vals['numDVs'])) { - $this->numDVs = $vals['numDVs']; - } - if (isset($vals['bitVectors'])) { - $this->bitVectors = $vals['bitVectors']; - } - } - } - - public function getName() { - return 'DoubleColumnStatsData'; - } - - 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::DOUBLE) { - $xfer += $input->readDouble($this->lowValue); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::DOUBLE) { - $xfer += $input->readDouble($this->highValue); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numNulls); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numDVs); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->bitVectors); - } 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('DoubleColumnStatsData'); - if ($this->lowValue !== null) { - $xfer += $output->writeFieldBegin('lowValue', TType::DOUBLE, 1); - $xfer += $output->writeDouble($this->lowValue); - $xfer += $output->writeFieldEnd(); - } - if ($this->highValue !== null) { - $xfer += $output->writeFieldBegin('highValue', TType::DOUBLE, 2); - $xfer += $output->writeDouble($this->highValue); - $xfer += $output->writeFieldEnd(); - } - if ($this->numNulls !== null) { - $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); - $xfer += $output->writeI64($this->numNulls); - $xfer += $output->writeFieldEnd(); - } - if ($this->numDVs !== null) { - $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); - $xfer += $output->writeI64($this->numDVs); - $xfer += $output->writeFieldEnd(); - } - if ($this->bitVectors !== null) { - $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 5); - $xfer += $output->writeString($this->bitVectors); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class LongColumnStatsData { - static $_TSPEC; - - /** - * @var int - */ - public $lowValue = null; - /** - * @var int - */ - public $highValue = null; - /** - * @var int - */ - public $numNulls = null; - /** - * @var int - */ - public $numDVs = null; - /** - * @var string - */ - public $bitVectors = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'lowValue', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'highValue', - 'type' => TType::I64, - ), - 3 => array( - 'var' => 'numNulls', - 'type' => TType::I64, - ), - 4 => array( - 'var' => 'numDVs', - 'type' => TType::I64, - ), - 5 => array( - 'var' => 'bitVectors', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['lowValue'])) { - $this->lowValue = $vals['lowValue']; - } - if (isset($vals['highValue'])) { - $this->highValue = $vals['highValue']; - } - if (isset($vals['numNulls'])) { - $this->numNulls = $vals['numNulls']; - } - if (isset($vals['numDVs'])) { - $this->numDVs = $vals['numDVs']; - } - if (isset($vals['bitVectors'])) { - $this->bitVectors = $vals['bitVectors']; - } - } - } - - public function getName() { - return 'LongColumnStatsData'; - } - - 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::I64) { - $xfer += $input->readI64($this->lowValue); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->highValue); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numNulls); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numDVs); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->bitVectors); - } 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('LongColumnStatsData'); - if ($this->lowValue !== null) { - $xfer += $output->writeFieldBegin('lowValue', TType::I64, 1); - $xfer += $output->writeI64($this->lowValue); - $xfer += $output->writeFieldEnd(); - } - if ($this->highValue !== null) { - $xfer += $output->writeFieldBegin('highValue', TType::I64, 2); - $xfer += $output->writeI64($this->highValue); - $xfer += $output->writeFieldEnd(); - } - if ($this->numNulls !== null) { - $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); - $xfer += $output->writeI64($this->numNulls); - $xfer += $output->writeFieldEnd(); - } - if ($this->numDVs !== null) { - $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); - $xfer += $output->writeI64($this->numDVs); - $xfer += $output->writeFieldEnd(); - } - if ($this->bitVectors !== null) { - $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 5); - $xfer += $output->writeString($this->bitVectors); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class StringColumnStatsData { - static $_TSPEC; - - /** - * @var int - */ - public $maxColLen = null; - /** - * @var double - */ - public $avgColLen = null; - /** - * @var int - */ - public $numNulls = null; - /** - * @var int - */ - public $numDVs = null; - /** - * @var string - */ - public $bitVectors = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'maxColLen', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'avgColLen', - 'type' => TType::DOUBLE, - ), - 3 => array( - 'var' => 'numNulls', - 'type' => TType::I64, - ), - 4 => array( - 'var' => 'numDVs', - 'type' => TType::I64, - ), - 5 => array( - 'var' => 'bitVectors', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['maxColLen'])) { - $this->maxColLen = $vals['maxColLen']; - } - if (isset($vals['avgColLen'])) { - $this->avgColLen = $vals['avgColLen']; - } - if (isset($vals['numNulls'])) { - $this->numNulls = $vals['numNulls']; - } - if (isset($vals['numDVs'])) { - $this->numDVs = $vals['numDVs']; - } - if (isset($vals['bitVectors'])) { - $this->bitVectors = $vals['bitVectors']; - } - } - } - - public function getName() { - return 'StringColumnStatsData'; - } - - 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::I64) { - $xfer += $input->readI64($this->maxColLen); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::DOUBLE) { - $xfer += $input->readDouble($this->avgColLen); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numNulls); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numDVs); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->bitVectors); - } 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('StringColumnStatsData'); - if ($this->maxColLen !== null) { - $xfer += $output->writeFieldBegin('maxColLen', TType::I64, 1); - $xfer += $output->writeI64($this->maxColLen); - $xfer += $output->writeFieldEnd(); - } - if ($this->avgColLen !== null) { - $xfer += $output->writeFieldBegin('avgColLen', TType::DOUBLE, 2); - $xfer += $output->writeDouble($this->avgColLen); - $xfer += $output->writeFieldEnd(); - } - if ($this->numNulls !== null) { - $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); - $xfer += $output->writeI64($this->numNulls); - $xfer += $output->writeFieldEnd(); - } - if ($this->numDVs !== null) { - $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); - $xfer += $output->writeI64($this->numDVs); - $xfer += $output->writeFieldEnd(); - } - if ($this->bitVectors !== null) { - $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 5); - $xfer += $output->writeString($this->bitVectors); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class BinaryColumnStatsData { - static $_TSPEC; - - /** - * @var int - */ - public $maxColLen = null; - /** - * @var double - */ - public $avgColLen = null; - /** - * @var int - */ - public $numNulls = null; - /** - * @var string - */ - public $bitVectors = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'maxColLen', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'avgColLen', - 'type' => TType::DOUBLE, - ), - 3 => array( - 'var' => 'numNulls', - 'type' => TType::I64, - ), - 4 => array( - 'var' => 'bitVectors', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['maxColLen'])) { - $this->maxColLen = $vals['maxColLen']; - } - if (isset($vals['avgColLen'])) { - $this->avgColLen = $vals['avgColLen']; - } - if (isset($vals['numNulls'])) { - $this->numNulls = $vals['numNulls']; - } - if (isset($vals['bitVectors'])) { - $this->bitVectors = $vals['bitVectors']; - } - } - } - - public function getName() { - return 'BinaryColumnStatsData'; - } - - 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::I64) { - $xfer += $input->readI64($this->maxColLen); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::DOUBLE) { - $xfer += $input->readDouble($this->avgColLen); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numNulls); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->bitVectors); - } 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('BinaryColumnStatsData'); - if ($this->maxColLen !== null) { - $xfer += $output->writeFieldBegin('maxColLen', TType::I64, 1); - $xfer += $output->writeI64($this->maxColLen); - $xfer += $output->writeFieldEnd(); - } - if ($this->avgColLen !== null) { - $xfer += $output->writeFieldBegin('avgColLen', TType::DOUBLE, 2); - $xfer += $output->writeDouble($this->avgColLen); - $xfer += $output->writeFieldEnd(); - } - if ($this->numNulls !== null) { - $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); - $xfer += $output->writeI64($this->numNulls); - $xfer += $output->writeFieldEnd(); - } - if ($this->bitVectors !== null) { - $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 4); - $xfer += $output->writeString($this->bitVectors); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Decimal { - static $_TSPEC; - - /** - * @var string - */ - public $unscaled = null; - /** - * @var int - */ - public $scale = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'unscaled', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'scale', - 'type' => TType::I16, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['unscaled'])) { - $this->unscaled = $vals['unscaled']; - } - if (isset($vals['scale'])) { - $this->scale = $vals['scale']; - } - } - } - - public function getName() { - return 'Decimal'; - } - - 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->unscaled); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->scale); - } 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('Decimal'); - if ($this->unscaled !== null) { - $xfer += $output->writeFieldBegin('unscaled', TType::STRING, 1); - $xfer += $output->writeString($this->unscaled); - $xfer += $output->writeFieldEnd(); - } - if ($this->scale !== null) { - $xfer += $output->writeFieldBegin('scale', TType::I16, 3); - $xfer += $output->writeI16($this->scale); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class DecimalColumnStatsData { - static $_TSPEC; - - /** - * @var \metastore\Decimal - */ - public $lowValue = null; - /** - * @var \metastore\Decimal - */ - public $highValue = null; - /** - * @var int - */ - public $numNulls = null; - /** - * @var int - */ - public $numDVs = null; - /** - * @var string - */ - public $bitVectors = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'lowValue', - 'type' => TType::STRUCT, - 'class' => '\metastore\Decimal', - ), - 2 => array( - 'var' => 'highValue', - 'type' => TType::STRUCT, - 'class' => '\metastore\Decimal', - ), - 3 => array( - 'var' => 'numNulls', - 'type' => TType::I64, - ), - 4 => array( - 'var' => 'numDVs', - 'type' => TType::I64, - ), - 5 => array( - 'var' => 'bitVectors', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['lowValue'])) { - $this->lowValue = $vals['lowValue']; - } - if (isset($vals['highValue'])) { - $this->highValue = $vals['highValue']; - } - if (isset($vals['numNulls'])) { - $this->numNulls = $vals['numNulls']; - } - if (isset($vals['numDVs'])) { - $this->numDVs = $vals['numDVs']; - } - if (isset($vals['bitVectors'])) { - $this->bitVectors = $vals['bitVectors']; - } - } - } - - public function getName() { - return 'DecimalColumnStatsData'; - } - - 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->lowValue = new \metastore\Decimal(); - $xfer += $this->lowValue->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->highValue = new \metastore\Decimal(); - $xfer += $this->highValue->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numNulls); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numDVs); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->bitVectors); - } 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('DecimalColumnStatsData'); - if ($this->lowValue !== null) { - if (!is_object($this->lowValue)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('lowValue', TType::STRUCT, 1); - $xfer += $this->lowValue->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->highValue !== null) { - if (!is_object($this->highValue)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('highValue', TType::STRUCT, 2); - $xfer += $this->highValue->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->numNulls !== null) { - $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); - $xfer += $output->writeI64($this->numNulls); - $xfer += $output->writeFieldEnd(); - } - if ($this->numDVs !== null) { - $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); - $xfer += $output->writeI64($this->numDVs); - $xfer += $output->writeFieldEnd(); - } - if ($this->bitVectors !== null) { - $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 5); - $xfer += $output->writeString($this->bitVectors); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Date { - static $_TSPEC; - - /** - * @var int - */ - public $daysSinceEpoch = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'daysSinceEpoch', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['daysSinceEpoch'])) { - $this->daysSinceEpoch = $vals['daysSinceEpoch']; - } - } - } - - public function getName() { - return 'Date'; - } - - 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::I64) { - $xfer += $input->readI64($this->daysSinceEpoch); - } 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('Date'); - if ($this->daysSinceEpoch !== null) { - $xfer += $output->writeFieldBegin('daysSinceEpoch', TType::I64, 1); - $xfer += $output->writeI64($this->daysSinceEpoch); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class DateColumnStatsData { - static $_TSPEC; - - /** - * @var \metastore\Date - */ - public $lowValue = null; - /** - * @var \metastore\Date - */ - public $highValue = null; - /** - * @var int - */ - public $numNulls = null; - /** - * @var int - */ - public $numDVs = null; - /** - * @var string - */ - public $bitVectors = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'lowValue', - 'type' => TType::STRUCT, - 'class' => '\metastore\Date', - ), - 2 => array( - 'var' => 'highValue', - 'type' => TType::STRUCT, - 'class' => '\metastore\Date', - ), - 3 => array( - 'var' => 'numNulls', - 'type' => TType::I64, - ), - 4 => array( - 'var' => 'numDVs', - 'type' => TType::I64, - ), - 5 => array( - 'var' => 'bitVectors', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['lowValue'])) { - $this->lowValue = $vals['lowValue']; - } - if (isset($vals['highValue'])) { - $this->highValue = $vals['highValue']; - } - if (isset($vals['numNulls'])) { - $this->numNulls = $vals['numNulls']; - } - if (isset($vals['numDVs'])) { - $this->numDVs = $vals['numDVs']; - } - if (isset($vals['bitVectors'])) { - $this->bitVectors = $vals['bitVectors']; - } - } - } - - public function getName() { - return 'DateColumnStatsData'; - } - - 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->lowValue = new \metastore\Date(); - $xfer += $this->lowValue->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->highValue = new \metastore\Date(); - $xfer += $this->highValue->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numNulls); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->numDVs); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->bitVectors); - } 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('DateColumnStatsData'); - if ($this->lowValue !== null) { - if (!is_object($this->lowValue)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('lowValue', TType::STRUCT, 1); - $xfer += $this->lowValue->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->highValue !== null) { - if (!is_object($this->highValue)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('highValue', TType::STRUCT, 2); - $xfer += $this->highValue->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->numNulls !== null) { - $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); - $xfer += $output->writeI64($this->numNulls); - $xfer += $output->writeFieldEnd(); - } - if ($this->numDVs !== null) { - $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); - $xfer += $output->writeI64($this->numDVs); - $xfer += $output->writeFieldEnd(); - } - if ($this->bitVectors !== null) { - $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 5); - $xfer += $output->writeString($this->bitVectors); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ColumnStatisticsData { - static $_TSPEC; - - /** - * @var \metastore\BooleanColumnStatsData - */ - public $booleanStats = null; - /** - * @var \metastore\LongColumnStatsData - */ - public $longStats = null; - /** - * @var \metastore\DoubleColumnStatsData - */ - public $doubleStats = null; - /** - * @var \metastore\StringColumnStatsData - */ - public $stringStats = null; - /** - * @var \metastore\BinaryColumnStatsData - */ - public $binaryStats = null; - /** - * @var \metastore\DecimalColumnStatsData - */ - public $decimalStats = null; - /** - * @var \metastore\DateColumnStatsData - */ - public $dateStats = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'booleanStats', - 'type' => TType::STRUCT, - 'class' => '\metastore\BooleanColumnStatsData', - ), - 2 => array( - 'var' => 'longStats', - 'type' => TType::STRUCT, - 'class' => '\metastore\LongColumnStatsData', - ), - 3 => array( - 'var' => 'doubleStats', - 'type' => TType::STRUCT, - 'class' => '\metastore\DoubleColumnStatsData', - ), - 4 => array( - 'var' => 'stringStats', - 'type' => TType::STRUCT, - 'class' => '\metastore\StringColumnStatsData', - ), - 5 => array( - 'var' => 'binaryStats', - 'type' => TType::STRUCT, - 'class' => '\metastore\BinaryColumnStatsData', - ), - 6 => array( - 'var' => 'decimalStats', - 'type' => TType::STRUCT, - 'class' => '\metastore\DecimalColumnStatsData', - ), - 7 => array( - 'var' => 'dateStats', - 'type' => TType::STRUCT, - 'class' => '\metastore\DateColumnStatsData', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['booleanStats'])) { - $this->booleanStats = $vals['booleanStats']; - } - if (isset($vals['longStats'])) { - $this->longStats = $vals['longStats']; - } - if (isset($vals['doubleStats'])) { - $this->doubleStats = $vals['doubleStats']; - } - if (isset($vals['stringStats'])) { - $this->stringStats = $vals['stringStats']; - } - if (isset($vals['binaryStats'])) { - $this->binaryStats = $vals['binaryStats']; - } - if (isset($vals['decimalStats'])) { - $this->decimalStats = $vals['decimalStats']; - } - if (isset($vals['dateStats'])) { - $this->dateStats = $vals['dateStats']; - } - } - } - - public function getName() { - return 'ColumnStatisticsData'; - } - - 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->booleanStats = new \metastore\BooleanColumnStatsData(); - $xfer += $this->booleanStats->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->longStats = new \metastore\LongColumnStatsData(); - $xfer += $this->longStats->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->doubleStats = new \metastore\DoubleColumnStatsData(); - $xfer += $this->doubleStats->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->stringStats = new \metastore\StringColumnStatsData(); - $xfer += $this->stringStats->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRUCT) { - $this->binaryStats = new \metastore\BinaryColumnStatsData(); - $xfer += $this->binaryStats->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRUCT) { - $this->decimalStats = new \metastore\DecimalColumnStatsData(); - $xfer += $this->decimalStats->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRUCT) { - $this->dateStats = new \metastore\DateColumnStatsData(); - $xfer += $this->dateStats->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('ColumnStatisticsData'); - if ($this->booleanStats !== null) { - if (!is_object($this->booleanStats)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('booleanStats', TType::STRUCT, 1); - $xfer += $this->booleanStats->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->longStats !== null) { - if (!is_object($this->longStats)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('longStats', TType::STRUCT, 2); - $xfer += $this->longStats->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->doubleStats !== null) { - if (!is_object($this->doubleStats)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('doubleStats', TType::STRUCT, 3); - $xfer += $this->doubleStats->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->stringStats !== null) { - if (!is_object($this->stringStats)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('stringStats', TType::STRUCT, 4); - $xfer += $this->stringStats->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->binaryStats !== null) { - if (!is_object($this->binaryStats)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('binaryStats', TType::STRUCT, 5); - $xfer += $this->binaryStats->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->decimalStats !== null) { - if (!is_object($this->decimalStats)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('decimalStats', TType::STRUCT, 6); - $xfer += $this->decimalStats->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->dateStats !== null) { - if (!is_object($this->dateStats)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('dateStats', TType::STRUCT, 7); - $xfer += $this->dateStats->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ColumnStatisticsObj { - static $_TSPEC; - - /** - * @var string - */ - public $colName = null; - /** - * @var string - */ - public $colType = null; - /** - * @var \metastore\ColumnStatisticsData - */ - public $statsData = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'colName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'colType', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'statsData', - 'type' => TType::STRUCT, - 'class' => '\metastore\ColumnStatisticsData', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['colName'])) { - $this->colName = $vals['colName']; - } - if (isset($vals['colType'])) { - $this->colType = $vals['colType']; - } - if (isset($vals['statsData'])) { - $this->statsData = $vals['statsData']; - } - } - } - - public function getName() { - return 'ColumnStatisticsObj'; - } - - 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->colName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->colType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->statsData = new \metastore\ColumnStatisticsData(); - $xfer += $this->statsData->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('ColumnStatisticsObj'); - if ($this->colName !== null) { - $xfer += $output->writeFieldBegin('colName', TType::STRING, 1); - $xfer += $output->writeString($this->colName); - $xfer += $output->writeFieldEnd(); - } - if ($this->colType !== null) { - $xfer += $output->writeFieldBegin('colType', TType::STRING, 2); - $xfer += $output->writeString($this->colType); - $xfer += $output->writeFieldEnd(); - } - if ($this->statsData !== null) { - if (!is_object($this->statsData)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('statsData', TType::STRUCT, 3); - $xfer += $this->statsData->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ColumnStatisticsDesc { - static $_TSPEC; - - /** - * @var bool - */ - public $isTblLevel = null; - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tableName = null; - /** - * @var string - */ - public $partName = null; - /** - * @var int - */ - public $lastAnalyzed = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'isTblLevel', - 'type' => TType::BOOL, - ), - 2 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'tableName', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'partName', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'lastAnalyzed', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['isTblLevel'])) { - $this->isTblLevel = $vals['isTblLevel']; - } - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['tableName'])) { - $this->tableName = $vals['tableName']; - } - if (isset($vals['partName'])) { - $this->partName = $vals['partName']; - } - if (isset($vals['lastAnalyzed'])) { - $this->lastAnalyzed = $vals['lastAnalyzed']; - } - } - } - - public function getName() { - return 'ColumnStatisticsDesc'; - } - - 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::BOOL) { - $xfer += $input->readBool($this->isTblLevel); - } 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::STRING) { - $xfer += $input->readString($this->partName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->lastAnalyzed); - } 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('ColumnStatisticsDesc'); - if ($this->isTblLevel !== null) { - $xfer += $output->writeFieldBegin('isTblLevel', TType::BOOL, 1); - $xfer += $output->writeBool($this->isTblLevel); - $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->partName !== null) { - $xfer += $output->writeFieldBegin('partName', TType::STRING, 4); - $xfer += $output->writeString($this->partName); - $xfer += $output->writeFieldEnd(); - } - if ($this->lastAnalyzed !== null) { - $xfer += $output->writeFieldBegin('lastAnalyzed', TType::I64, 5); - $xfer += $output->writeI64($this->lastAnalyzed); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ColumnStatistics { - static $_TSPEC; - - /** - * @var \metastore\ColumnStatisticsDesc - */ - public $statsDesc = null; - /** - * @var \metastore\ColumnStatisticsObj[] - */ - public $statsObj = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'statsDesc', - 'type' => TType::STRUCT, - 'class' => '\metastore\ColumnStatisticsDesc', - ), - 2 => array( - 'var' => 'statsObj', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\ColumnStatisticsObj', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['statsDesc'])) { - $this->statsDesc = $vals['statsDesc']; - } - if (isset($vals['statsObj'])) { - $this->statsObj = $vals['statsObj']; - } - } - } - - public function getName() { - return 'ColumnStatistics'; - } - - 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->statsDesc = new \metastore\ColumnStatisticsDesc(); - $xfer += $this->statsDesc->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->statsObj = array(); - $_size239 = 0; - $_etype242 = 0; - $xfer += $input->readListBegin($_etype242, $_size239); - for ($_i243 = 0; $_i243 < $_size239; ++$_i243) - { - $elem244 = null; - $elem244 = new \metastore\ColumnStatisticsObj(); - $xfer += $elem244->read($input); - $this->statsObj []= $elem244; - } - $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('ColumnStatistics'); - if ($this->statsDesc !== null) { - if (!is_object($this->statsDesc)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('statsDesc', TType::STRUCT, 1); - $xfer += $this->statsDesc->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->statsObj !== null) { - if (!is_array($this->statsObj)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('statsObj', TType::LST, 2); - { - $output->writeListBegin(TType::STRUCT, count($this->statsObj)); - { - foreach ($this->statsObj as $iter245) - { - $xfer += $iter245->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class AggrStats { - static $_TSPEC; - - /** - * @var \metastore\ColumnStatisticsObj[] - */ - public $colStats = null; - /** - * @var int - */ - public $partsFound = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'colStats', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\ColumnStatisticsObj', - ), - ), - 2 => array( - 'var' => 'partsFound', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['colStats'])) { - $this->colStats = $vals['colStats']; - } - if (isset($vals['partsFound'])) { - $this->partsFound = $vals['partsFound']; - } - } - } - - public function getName() { - return 'AggrStats'; - } - - 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->colStats = array(); - $_size246 = 0; - $_etype249 = 0; - $xfer += $input->readListBegin($_etype249, $_size246); - for ($_i250 = 0; $_i250 < $_size246; ++$_i250) - { - $elem251 = null; - $elem251 = new \metastore\ColumnStatisticsObj(); - $xfer += $elem251->read($input); - $this->colStats []= $elem251; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->partsFound); - } 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('AggrStats'); - if ($this->colStats !== null) { - if (!is_array($this->colStats)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('colStats', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->colStats)); - { - foreach ($this->colStats as $iter252) - { - $xfer += $iter252->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->partsFound !== null) { - $xfer += $output->writeFieldBegin('partsFound', TType::I64, 2); - $xfer += $output->writeI64($this->partsFound); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class SetPartitionsStatsRequest { - static $_TSPEC; - - /** - * @var \metastore\ColumnStatistics[] - */ - public $colStats = null; - /** - * @var bool - */ - public $needMerge = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'colStats', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\ColumnStatistics', - ), - ), - 2 => array( - 'var' => 'needMerge', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['colStats'])) { - $this->colStats = $vals['colStats']; - } - if (isset($vals['needMerge'])) { - $this->needMerge = $vals['needMerge']; - } - } - } - - public function getName() { - return 'SetPartitionsStatsRequest'; - } - - 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->colStats = array(); - $_size253 = 0; - $_etype256 = 0; - $xfer += $input->readListBegin($_etype256, $_size253); - for ($_i257 = 0; $_i257 < $_size253; ++$_i257) - { - $elem258 = null; - $elem258 = new \metastore\ColumnStatistics(); - $xfer += $elem258->read($input); - $this->colStats []= $elem258; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->needMerge); - } 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('SetPartitionsStatsRequest'); - if ($this->colStats !== null) { - if (!is_array($this->colStats)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('colStats', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->colStats)); - { - foreach ($this->colStats as $iter259) - { - $xfer += $iter259->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->needMerge !== null) { - $xfer += $output->writeFieldBegin('needMerge', TType::BOOL, 2); - $xfer += $output->writeBool($this->needMerge); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Schema { - static $_TSPEC; - - /** - * @var \metastore\FieldSchema[] - */ - public $fieldSchemas = null; - /** - * @var array - */ - 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(); - $_size260 = 0; - $_etype263 = 0; - $xfer += $input->readListBegin($_etype263, $_size260); - for ($_i264 = 0; $_i264 < $_size260; ++$_i264) - { - $elem265 = null; - $elem265 = new \metastore\FieldSchema(); - $xfer += $elem265->read($input); - $this->fieldSchemas []= $elem265; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::MAP) { - $this->properties = array(); - $_size266 = 0; - $_ktype267 = 0; - $_vtype268 = 0; - $xfer += $input->readMapBegin($_ktype267, $_vtype268, $_size266); - for ($_i270 = 0; $_i270 < $_size266; ++$_i270) - { - $key271 = ''; - $val272 = ''; - $xfer += $input->readString($key271); - $xfer += $input->readString($val272); - $this->properties[$key271] = $val272; - } - $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 $iter273) - { - $xfer += $iter273->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 $kiter274 => $viter275) - { - $xfer += $output->writeString($kiter274); - $xfer += $output->writeString($viter275); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class EnvironmentContext { - static $_TSPEC; - - /** - * @var array - */ - 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(); - $_size276 = 0; - $_ktype277 = 0; - $_vtype278 = 0; - $xfer += $input->readMapBegin($_ktype277, $_vtype278, $_size276); - for ($_i280 = 0; $_i280 < $_size276; ++$_i280) - { - $key281 = ''; - $val282 = ''; - $xfer += $input->readString($key281); - $xfer += $input->readString($val282); - $this->properties[$key281] = $val282; - } - $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 $kiter283 => $viter284) - { - $xfer += $output->writeString($kiter283); - $xfer += $output->writeString($viter284); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class PrimaryKeysRequest { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_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, - ), - ); - } - 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']; - } - } - } - - public function getName() { - return 'PrimaryKeysRequest'; - } - - 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; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('PrimaryKeysRequest'); - 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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class PrimaryKeysResponse { - static $_TSPEC; - - /** - * @var \metastore\SQLPrimaryKey[] - */ - public $primaryKeys = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'primaryKeys', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\SQLPrimaryKey', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['primaryKeys'])) { - $this->primaryKeys = $vals['primaryKeys']; - } - } - } - - public function getName() { - return 'PrimaryKeysResponse'; - } - - 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->primaryKeys = array(); - $_size285 = 0; - $_etype288 = 0; - $xfer += $input->readListBegin($_etype288, $_size285); - for ($_i289 = 0; $_i289 < $_size285; ++$_i289) - { - $elem290 = null; - $elem290 = new \metastore\SQLPrimaryKey(); - $xfer += $elem290->read($input); - $this->primaryKeys []= $elem290; - } - $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('PrimaryKeysResponse'); - if ($this->primaryKeys !== null) { - if (!is_array($this->primaryKeys)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('primaryKeys', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->primaryKeys)); - { - foreach ($this->primaryKeys as $iter291) - { - $xfer += $iter291->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ForeignKeysRequest { - static $_TSPEC; - - /** - * @var string - */ - public $parent_db_name = null; - /** - * @var string - */ - public $parent_tbl_name = null; - /** - * @var string - */ - public $foreign_db_name = null; - /** - * @var string - */ - public $foreign_tbl_name = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'parent_db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'parent_tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'foreign_db_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'foreign_tbl_name', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['parent_db_name'])) { - $this->parent_db_name = $vals['parent_db_name']; - } - if (isset($vals['parent_tbl_name'])) { - $this->parent_tbl_name = $vals['parent_tbl_name']; - } - if (isset($vals['foreign_db_name'])) { - $this->foreign_db_name = $vals['foreign_db_name']; - } - if (isset($vals['foreign_tbl_name'])) { - $this->foreign_tbl_name = $vals['foreign_tbl_name']; - } - } - } - - public function getName() { - return 'ForeignKeysRequest'; - } - - 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->parent_db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->parent_tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->foreign_db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->foreign_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('ForeignKeysRequest'); - if ($this->parent_db_name !== null) { - $xfer += $output->writeFieldBegin('parent_db_name', TType::STRING, 1); - $xfer += $output->writeString($this->parent_db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->parent_tbl_name !== null) { - $xfer += $output->writeFieldBegin('parent_tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->parent_tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->foreign_db_name !== null) { - $xfer += $output->writeFieldBegin('foreign_db_name', TType::STRING, 3); - $xfer += $output->writeString($this->foreign_db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->foreign_tbl_name !== null) { - $xfer += $output->writeFieldBegin('foreign_tbl_name', TType::STRING, 4); - $xfer += $output->writeString($this->foreign_tbl_name); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ForeignKeysResponse { - static $_TSPEC; - - /** - * @var \metastore\SQLForeignKey[] - */ - public $foreignKeys = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'foreignKeys', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\SQLForeignKey', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['foreignKeys'])) { - $this->foreignKeys = $vals['foreignKeys']; - } - } - } - - public function getName() { - return 'ForeignKeysResponse'; - } - - 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->foreignKeys = array(); - $_size292 = 0; - $_etype295 = 0; - $xfer += $input->readListBegin($_etype295, $_size292); - for ($_i296 = 0; $_i296 < $_size292; ++$_i296) - { - $elem297 = null; - $elem297 = new \metastore\SQLForeignKey(); - $xfer += $elem297->read($input); - $this->foreignKeys []= $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('ForeignKeysResponse'); - if ($this->foreignKeys !== null) { - if (!is_array($this->foreignKeys)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('foreignKeys', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->foreignKeys)); - { - foreach ($this->foreignKeys as $iter298) - { - $xfer += $iter298->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class UniqueConstraintsRequest { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_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, - ), - ); - } - 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']; - } - } - } - - public function getName() { - return 'UniqueConstraintsRequest'; - } - - 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; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('UniqueConstraintsRequest'); - 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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class UniqueConstraintsResponse { - static $_TSPEC; - - /** - * @var \metastore\SQLUniqueConstraint[] - */ - public $uniqueConstraints = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'uniqueConstraints', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\SQLUniqueConstraint', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['uniqueConstraints'])) { - $this->uniqueConstraints = $vals['uniqueConstraints']; - } - } - } - - public function getName() { - return 'UniqueConstraintsResponse'; - } - - 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->uniqueConstraints = array(); - $_size299 = 0; - $_etype302 = 0; - $xfer += $input->readListBegin($_etype302, $_size299); - for ($_i303 = 0; $_i303 < $_size299; ++$_i303) - { - $elem304 = null; - $elem304 = new \metastore\SQLUniqueConstraint(); - $xfer += $elem304->read($input); - $this->uniqueConstraints []= $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('UniqueConstraintsResponse'); - if ($this->uniqueConstraints !== null) { - if (!is_array($this->uniqueConstraints)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('uniqueConstraints', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->uniqueConstraints)); - { - foreach ($this->uniqueConstraints as $iter305) - { - $xfer += $iter305->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class NotNullConstraintsRequest { - static $_TSPEC; - - /** - * @var string - */ - public $db_name = null; - /** - * @var string - */ - public $tbl_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, - ), - ); - } - 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']; - } - } - } - - public function getName() { - return 'NotNullConstraintsRequest'; - } - - 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; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('NotNullConstraintsRequest'); - 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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class NotNullConstraintsResponse { - static $_TSPEC; - - /** - * @var \metastore\SQLNotNullConstraint[] - */ - public $notNullConstraints = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'notNullConstraints', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\SQLNotNullConstraint', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['notNullConstraints'])) { - $this->notNullConstraints = $vals['notNullConstraints']; - } - } - } - - public function getName() { - return 'NotNullConstraintsResponse'; - } - - 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->notNullConstraints = array(); - $_size306 = 0; - $_etype309 = 0; - $xfer += $input->readListBegin($_etype309, $_size306); - for ($_i310 = 0; $_i310 < $_size306; ++$_i310) - { - $elem311 = null; - $elem311 = new \metastore\SQLNotNullConstraint(); - $xfer += $elem311->read($input); - $this->notNullConstraints []= $elem311; - } - $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('NotNullConstraintsResponse'); - if ($this->notNullConstraints !== null) { - if (!is_array($this->notNullConstraints)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('notNullConstraints', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->notNullConstraints)); - { - foreach ($this->notNullConstraints as $iter312) - { - $xfer += $iter312->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class DropConstraintRequest { - static $_TSPEC; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $tablename = null; - /** - * @var string - */ - public $constraintname = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbname', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tablename', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'constraintname', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['tablename'])) { - $this->tablename = $vals['tablename']; - } - if (isset($vals['constraintname'])) { - $this->constraintname = $vals['constraintname']; - } - } - } - - public function getName() { - return 'DropConstraintRequest'; - } - - 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->tablename); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->constraintname); - } 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('DropConstraintRequest'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); - $xfer += $output->writeFieldEnd(); - } - if ($this->tablename !== null) { - $xfer += $output->writeFieldBegin('tablename', TType::STRING, 2); - $xfer += $output->writeString($this->tablename); - $xfer += $output->writeFieldEnd(); - } - if ($this->constraintname !== null) { - $xfer += $output->writeFieldBegin('constraintname', TType::STRING, 3); - $xfer += $output->writeString($this->constraintname); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class AddPrimaryKeyRequest { - static $_TSPEC; - - /** - * @var \metastore\SQLPrimaryKey[] - */ - public $primaryKeyCols = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'primaryKeyCols', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\SQLPrimaryKey', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['primaryKeyCols'])) { - $this->primaryKeyCols = $vals['primaryKeyCols']; - } - } - } - - public function getName() { - return 'AddPrimaryKeyRequest'; - } - - 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->primaryKeyCols = array(); - $_size313 = 0; - $_etype316 = 0; - $xfer += $input->readListBegin($_etype316, $_size313); - for ($_i317 = 0; $_i317 < $_size313; ++$_i317) - { - $elem318 = null; - $elem318 = new \metastore\SQLPrimaryKey(); - $xfer += $elem318->read($input); - $this->primaryKeyCols []= $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('AddPrimaryKeyRequest'); - if ($this->primaryKeyCols !== null) { - if (!is_array($this->primaryKeyCols)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('primaryKeyCols', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->primaryKeyCols)); - { - foreach ($this->primaryKeyCols as $iter319) - { - $xfer += $iter319->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class AddForeignKeyRequest { - static $_TSPEC; - - /** - * @var \metastore\SQLForeignKey[] - */ - public $foreignKeyCols = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'foreignKeyCols', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\SQLForeignKey', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['foreignKeyCols'])) { - $this->foreignKeyCols = $vals['foreignKeyCols']; - } - } - } - - public function getName() { - return 'AddForeignKeyRequest'; - } - - 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->foreignKeyCols = array(); - $_size320 = 0; - $_etype323 = 0; - $xfer += $input->readListBegin($_etype323, $_size320); - for ($_i324 = 0; $_i324 < $_size320; ++$_i324) - { - $elem325 = null; - $elem325 = new \metastore\SQLForeignKey(); - $xfer += $elem325->read($input); - $this->foreignKeyCols []= $elem325; - } - $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('AddForeignKeyRequest'); - if ($this->foreignKeyCols !== null) { - if (!is_array($this->foreignKeyCols)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('foreignKeyCols', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->foreignKeyCols)); - { - foreach ($this->foreignKeyCols as $iter326) - { - $xfer += $iter326->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class AddUniqueConstraintRequest { - static $_TSPEC; - - /** - * @var \metastore\SQLUniqueConstraint[] - */ - public $uniqueConstraintCols = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'uniqueConstraintCols', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\SQLUniqueConstraint', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['uniqueConstraintCols'])) { - $this->uniqueConstraintCols = $vals['uniqueConstraintCols']; - } - } - } - - public function getName() { - return 'AddUniqueConstraintRequest'; - } - - 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->uniqueConstraintCols = array(); - $_size327 = 0; - $_etype330 = 0; - $xfer += $input->readListBegin($_etype330, $_size327); - for ($_i331 = 0; $_i331 < $_size327; ++$_i331) - { - $elem332 = null; - $elem332 = new \metastore\SQLUniqueConstraint(); - $xfer += $elem332->read($input); - $this->uniqueConstraintCols []= $elem332; - } - $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('AddUniqueConstraintRequest'); - if ($this->uniqueConstraintCols !== null) { - if (!is_array($this->uniqueConstraintCols)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('uniqueConstraintCols', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->uniqueConstraintCols)); - { - foreach ($this->uniqueConstraintCols as $iter333) - { - $xfer += $iter333->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class AddNotNullConstraintRequest { - static $_TSPEC; - - /** - * @var \metastore\SQLNotNullConstraint[] - */ - public $notNullConstraintCols = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'notNullConstraintCols', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\SQLNotNullConstraint', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['notNullConstraintCols'])) { - $this->notNullConstraintCols = $vals['notNullConstraintCols']; - } - } - } - - public function getName() { - return 'AddNotNullConstraintRequest'; - } - - 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->notNullConstraintCols = array(); - $_size334 = 0; - $_etype337 = 0; - $xfer += $input->readListBegin($_etype337, $_size334); - for ($_i338 = 0; $_i338 < $_size334; ++$_i338) - { - $elem339 = null; - $elem339 = new \metastore\SQLNotNullConstraint(); - $xfer += $elem339->read($input); - $this->notNullConstraintCols []= $elem339; - } - $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('AddNotNullConstraintRequest'); - if ($this->notNullConstraintCols !== null) { - if (!is_array($this->notNullConstraintCols)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('notNullConstraintCols', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->notNullConstraintCols)); - { - foreach ($this->notNullConstraintCols as $iter340) - { - $xfer += $iter340->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class PartitionsByExprResult { - static $_TSPEC; - - /** - * @var \metastore\Partition[] - */ - public $partitions = null; - /** - * @var bool - */ - public $hasUnknownPartitions = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'partitions', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', - ), - ), - 2 => array( - 'var' => 'hasUnknownPartitions', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['partitions'])) { - $this->partitions = $vals['partitions']; - } - if (isset($vals['hasUnknownPartitions'])) { - $this->hasUnknownPartitions = $vals['hasUnknownPartitions']; - } - } - } - - public function getName() { - return 'PartitionsByExprResult'; - } - - 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->partitions = array(); - $_size341 = 0; - $_etype344 = 0; - $xfer += $input->readListBegin($_etype344, $_size341); - for ($_i345 = 0; $_i345 < $_size341; ++$_i345) - { - $elem346 = null; - $elem346 = new \metastore\Partition(); - $xfer += $elem346->read($input); - $this->partitions []= $elem346; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->hasUnknownPartitions); - } 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('PartitionsByExprResult'); - if ($this->partitions !== null) { - if (!is_array($this->partitions)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partitions', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->partitions)); - { - foreach ($this->partitions as $iter347) - { - $xfer += $iter347->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->hasUnknownPartitions !== null) { - $xfer += $output->writeFieldBegin('hasUnknownPartitions', TType::BOOL, 2); - $xfer += $output->writeBool($this->hasUnknownPartitions); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class PartitionsByExprRequest { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tblName = null; - /** - * @var string - */ - public $expr = null; - /** - * @var string - */ - public $defaultPartitionName = null; - /** - * @var int - */ - public $maxParts = -1; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tblName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'expr', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'defaultPartitionName', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'maxParts', - 'type' => TType::I16, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['tblName'])) { - $this->tblName = $vals['tblName']; - } - if (isset($vals['expr'])) { - $this->expr = $vals['expr']; - } - if (isset($vals['defaultPartitionName'])) { - $this->defaultPartitionName = $vals['defaultPartitionName']; - } - if (isset($vals['maxParts'])) { - $this->maxParts = $vals['maxParts']; - } - } - } - - public function getName() { - return 'PartitionsByExprRequest'; - } - - 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->tblName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->expr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->defaultPartitionName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->maxParts); - } 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('PartitionsByExprRequest'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tblName !== null) { - $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); - $xfer += $output->writeString($this->tblName); - $xfer += $output->writeFieldEnd(); - } - if ($this->expr !== null) { - $xfer += $output->writeFieldBegin('expr', TType::STRING, 3); - $xfer += $output->writeString($this->expr); - $xfer += $output->writeFieldEnd(); - } - if ($this->defaultPartitionName !== null) { - $xfer += $output->writeFieldBegin('defaultPartitionName', TType::STRING, 4); - $xfer += $output->writeString($this->defaultPartitionName); - $xfer += $output->writeFieldEnd(); - } - if ($this->maxParts !== null) { - $xfer += $output->writeFieldBegin('maxParts', TType::I16, 5); - $xfer += $output->writeI16($this->maxParts); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TableStatsResult { - static $_TSPEC; - - /** - * @var \metastore\ColumnStatisticsObj[] - */ - public $tableStats = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tableStats', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\ColumnStatisticsObj', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tableStats'])) { - $this->tableStats = $vals['tableStats']; - } - } - } - - public function getName() { - return 'TableStatsResult'; - } - - 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->tableStats = array(); - $_size348 = 0; - $_etype351 = 0; - $xfer += $input->readListBegin($_etype351, $_size348); - for ($_i352 = 0; $_i352 < $_size348; ++$_i352) - { - $elem353 = null; - $elem353 = new \metastore\ColumnStatisticsObj(); - $xfer += $elem353->read($input); - $this->tableStats []= $elem353; - } - $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('TableStatsResult'); - if ($this->tableStats !== null) { - if (!is_array($this->tableStats)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tableStats', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->tableStats)); - { - foreach ($this->tableStats as $iter354) - { - $xfer += $iter354->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class PartitionsStatsResult { - static $_TSPEC; - - /** - * @var array - */ - public $partStats = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'partStats', - '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\ColumnStatisticsObj', - ), - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['partStats'])) { - $this->partStats = $vals['partStats']; - } - } - } - - public function getName() { - return 'PartitionsStatsResult'; - } - - 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->partStats = array(); - $_size355 = 0; - $_ktype356 = 0; - $_vtype357 = 0; - $xfer += $input->readMapBegin($_ktype356, $_vtype357, $_size355); - for ($_i359 = 0; $_i359 < $_size355; ++$_i359) - { - $key360 = ''; - $val361 = array(); - $xfer += $input->readString($key360); - $val361 = array(); - $_size362 = 0; - $_etype365 = 0; - $xfer += $input->readListBegin($_etype365, $_size362); - for ($_i366 = 0; $_i366 < $_size362; ++$_i366) - { - $elem367 = null; - $elem367 = new \metastore\ColumnStatisticsObj(); - $xfer += $elem367->read($input); - $val361 []= $elem367; - } - $xfer += $input->readListEnd(); - $this->partStats[$key360] = $val361; - } - $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('PartitionsStatsResult'); - if ($this->partStats !== null) { - if (!is_array($this->partStats)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partStats', TType::MAP, 1); - { - $output->writeMapBegin(TType::STRING, TType::LST, count($this->partStats)); - { - foreach ($this->partStats as $kiter368 => $viter369) - { - $xfer += $output->writeString($kiter368); - { - $output->writeListBegin(TType::STRUCT, count($viter369)); - { - foreach ($viter369 as $iter370) - { - $xfer += $iter370->write($output); - } - } - $output->writeListEnd(); - } - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TableStatsRequest { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tblName = null; - /** - * @var string[] - */ - public $colNames = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tblName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'colNames', - '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['tblName'])) { - $this->tblName = $vals['tblName']; - } - if (isset($vals['colNames'])) { - $this->colNames = $vals['colNames']; - } - } - } - - public function getName() { - return 'TableStatsRequest'; - } - - 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->tblName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->colNames = array(); - $_size371 = 0; - $_etype374 = 0; - $xfer += $input->readListBegin($_etype374, $_size371); - for ($_i375 = 0; $_i375 < $_size371; ++$_i375) - { - $elem376 = null; - $xfer += $input->readString($elem376); - $this->colNames []= $elem376; - } - $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('TableStatsRequest'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tblName !== null) { - $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); - $xfer += $output->writeString($this->tblName); - $xfer += $output->writeFieldEnd(); - } - if ($this->colNames !== null) { - if (!is_array($this->colNames)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('colNames', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->colNames)); - { - foreach ($this->colNames as $iter377) - { - $xfer += $output->writeString($iter377); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class PartitionsStatsRequest { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tblName = null; - /** - * @var string[] - */ - public $colNames = null; - /** - * @var string[] - */ - public $partNames = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tblName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'colNames', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'partNames', - '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['tblName'])) { - $this->tblName = $vals['tblName']; - } - if (isset($vals['colNames'])) { - $this->colNames = $vals['colNames']; - } - if (isset($vals['partNames'])) { - $this->partNames = $vals['partNames']; - } - } - } - - public function getName() { - return 'PartitionsStatsRequest'; - } - - 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->tblName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->colNames = array(); - $_size378 = 0; - $_etype381 = 0; - $xfer += $input->readListBegin($_etype381, $_size378); - for ($_i382 = 0; $_i382 < $_size378; ++$_i382) - { - $elem383 = null; - $xfer += $input->readString($elem383); - $this->colNames []= $elem383; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::LST) { - $this->partNames = array(); - $_size384 = 0; - $_etype387 = 0; - $xfer += $input->readListBegin($_etype387, $_size384); - for ($_i388 = 0; $_i388 < $_size384; ++$_i388) - { - $elem389 = null; - $xfer += $input->readString($elem389); - $this->partNames []= $elem389; - } - $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('PartitionsStatsRequest'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tblName !== null) { - $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); - $xfer += $output->writeString($this->tblName); - $xfer += $output->writeFieldEnd(); - } - if ($this->colNames !== null) { - if (!is_array($this->colNames)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('colNames', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->colNames)); - { - foreach ($this->colNames as $iter390) - { - $xfer += $output->writeString($iter390); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->partNames !== null) { - if (!is_array($this->partNames)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partNames', TType::LST, 4); - { - $output->writeListBegin(TType::STRING, count($this->partNames)); - { - foreach ($this->partNames as $iter391) - { - $xfer += $output->writeString($iter391); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class AddPartitionsResult { - static $_TSPEC; - - /** - * @var \metastore\Partition[] - */ - public $partitions = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'partitions', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['partitions'])) { - $this->partitions = $vals['partitions']; - } - } - } - - public function getName() { - return 'AddPartitionsResult'; - } - - 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->partitions = array(); - $_size392 = 0; - $_etype395 = 0; - $xfer += $input->readListBegin($_etype395, $_size392); - for ($_i396 = 0; $_i396 < $_size392; ++$_i396) - { - $elem397 = null; - $elem397 = new \metastore\Partition(); - $xfer += $elem397->read($input); - $this->partitions []= $elem397; - } - $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('AddPartitionsResult'); - if ($this->partitions !== null) { - if (!is_array($this->partitions)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partitions', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->partitions)); - { - foreach ($this->partitions as $iter398) - { - $xfer += $iter398->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class AddPartitionsRequest { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tblName = null; - /** - * @var \metastore\Partition[] - */ - public $parts = null; - /** - * @var bool - */ - public $ifNotExists = null; - /** - * @var bool - */ - public $needResult = true; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tblName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'parts', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', - ), - ), - 4 => array( - 'var' => 'ifNotExists', - 'type' => TType::BOOL, - ), - 5 => array( - 'var' => 'needResult', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['tblName'])) { - $this->tblName = $vals['tblName']; - } - if (isset($vals['parts'])) { - $this->parts = $vals['parts']; - } - if (isset($vals['ifNotExists'])) { - $this->ifNotExists = $vals['ifNotExists']; - } - if (isset($vals['needResult'])) { - $this->needResult = $vals['needResult']; - } - } - } - - public function getName() { - return 'AddPartitionsRequest'; - } - - 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->tblName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->parts = array(); - $_size399 = 0; - $_etype402 = 0; - $xfer += $input->readListBegin($_etype402, $_size399); - for ($_i403 = 0; $_i403 < $_size399; ++$_i403) - { - $elem404 = null; - $elem404 = new \metastore\Partition(); - $xfer += $elem404->read($input); - $this->parts []= $elem404; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->ifNotExists); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->needResult); - } 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('AddPartitionsRequest'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tblName !== null) { - $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); - $xfer += $output->writeString($this->tblName); - $xfer += $output->writeFieldEnd(); - } - if ($this->parts !== null) { - if (!is_array($this->parts)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('parts', TType::LST, 3); - { - $output->writeListBegin(TType::STRUCT, count($this->parts)); - { - foreach ($this->parts as $iter405) - { - $xfer += $iter405->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->ifNotExists !== null) { - $xfer += $output->writeFieldBegin('ifNotExists', TType::BOOL, 4); - $xfer += $output->writeBool($this->ifNotExists); - $xfer += $output->writeFieldEnd(); - } - if ($this->needResult !== null) { - $xfer += $output->writeFieldBegin('needResult', TType::BOOL, 5); - $xfer += $output->writeBool($this->needResult); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class DropPartitionsResult { - static $_TSPEC; - - /** - * @var \metastore\Partition[] - */ - public $partitions = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'partitions', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Partition', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['partitions'])) { - $this->partitions = $vals['partitions']; - } - } - } - - public function getName() { - return 'DropPartitionsResult'; - } - - 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->partitions = array(); - $_size406 = 0; - $_etype409 = 0; - $xfer += $input->readListBegin($_etype409, $_size406); - for ($_i410 = 0; $_i410 < $_size406; ++$_i410) - { - $elem411 = null; - $elem411 = new \metastore\Partition(); - $xfer += $elem411->read($input); - $this->partitions []= $elem411; - } - $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('DropPartitionsResult'); - if ($this->partitions !== null) { - if (!is_array($this->partitions)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partitions', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->partitions)); - { - foreach ($this->partitions as $iter412) - { - $xfer += $iter412->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class DropPartitionsExpr { - static $_TSPEC; - - /** - * @var string - */ - public $expr = null; - /** - * @var int - */ - public $partArchiveLevel = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'expr', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'partArchiveLevel', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['expr'])) { - $this->expr = $vals['expr']; - } - if (isset($vals['partArchiveLevel'])) { - $this->partArchiveLevel = $vals['partArchiveLevel']; - } - } - } - - public function getName() { - return 'DropPartitionsExpr'; - } - - 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->expr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->partArchiveLevel); - } 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('DropPartitionsExpr'); - if ($this->expr !== null) { - $xfer += $output->writeFieldBegin('expr', TType::STRING, 1); - $xfer += $output->writeString($this->expr); - $xfer += $output->writeFieldEnd(); - } - if ($this->partArchiveLevel !== null) { - $xfer += $output->writeFieldBegin('partArchiveLevel', TType::I32, 2); - $xfer += $output->writeI32($this->partArchiveLevel); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class RequestPartsSpec { - static $_TSPEC; - - /** - * @var string[] - */ - public $names = null; - /** - * @var \metastore\DropPartitionsExpr[] - */ - public $exprs = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'names', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 2 => array( - 'var' => 'exprs', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\DropPartitionsExpr', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['names'])) { - $this->names = $vals['names']; - } - if (isset($vals['exprs'])) { - $this->exprs = $vals['exprs']; - } - } - } - - public function getName() { - return 'RequestPartsSpec'; - } - - 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->names = array(); - $_size413 = 0; - $_etype416 = 0; - $xfer += $input->readListBegin($_etype416, $_size413); - for ($_i417 = 0; $_i417 < $_size413; ++$_i417) - { - $elem418 = null; - $xfer += $input->readString($elem418); - $this->names []= $elem418; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->exprs = array(); - $_size419 = 0; - $_etype422 = 0; - $xfer += $input->readListBegin($_etype422, $_size419); - for ($_i423 = 0; $_i423 < $_size419; ++$_i423) - { - $elem424 = null; - $elem424 = new \metastore\DropPartitionsExpr(); - $xfer += $elem424->read($input); - $this->exprs []= $elem424; - } - $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('RequestPartsSpec'); - 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, 1); - { - $output->writeListBegin(TType::STRING, count($this->names)); - { - foreach ($this->names as $iter425) - { - $xfer += $output->writeString($iter425); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->exprs !== null) { - if (!is_array($this->exprs)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('exprs', TType::LST, 2); - { - $output->writeListBegin(TType::STRUCT, count($this->exprs)); - { - foreach ($this->exprs as $iter426) - { - $xfer += $iter426->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class DropPartitionsRequest { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tblName = null; - /** - * @var \metastore\RequestPartsSpec - */ - public $parts = null; - /** - * @var bool - */ - public $deleteData = null; - /** - * @var bool - */ - public $ifExists = true; - /** - * @var bool - */ - public $ignoreProtection = null; - /** - * @var \metastore\EnvironmentContext - */ - public $environmentContext = null; - /** - * @var bool - */ - public $needResult = true; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tblName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'parts', - 'type' => TType::STRUCT, - 'class' => '\metastore\RequestPartsSpec', - ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), - 5 => array( - 'var' => 'ifExists', - 'type' => TType::BOOL, - ), - 6 => array( - 'var' => 'ignoreProtection', - 'type' => TType::BOOL, - ), - 7 => array( - 'var' => 'environmentContext', - 'type' => TType::STRUCT, - 'class' => '\metastore\EnvironmentContext', - ), - 8 => array( - 'var' => 'needResult', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['tblName'])) { - $this->tblName = $vals['tblName']; - } - if (isset($vals['parts'])) { - $this->parts = $vals['parts']; - } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; - } - if (isset($vals['ifExists'])) { - $this->ifExists = $vals['ifExists']; - } - if (isset($vals['ignoreProtection'])) { - $this->ignoreProtection = $vals['ignoreProtection']; - } - if (isset($vals['environmentContext'])) { - $this->environmentContext = $vals['environmentContext']; - } - if (isset($vals['needResult'])) { - $this->needResult = $vals['needResult']; - } - } - } - - public function getName() { - return 'DropPartitionsRequest'; - } - - 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->tblName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->parts = new \metastore\RequestPartsSpec(); - $xfer += $this->parts->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->ifExists); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->ignoreProtection); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRUCT) { - $this->environmentContext = new \metastore\EnvironmentContext(); - $xfer += $this->environmentContext->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->needResult); - } 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('DropPartitionsRequest'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tblName !== null) { - $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); - $xfer += $output->writeString($this->tblName); - $xfer += $output->writeFieldEnd(); - } - if ($this->parts !== null) { - if (!is_object($this->parts)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('parts', TType::STRUCT, 3); - $xfer += $this->parts->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); - $xfer += $output->writeFieldEnd(); - } - if ($this->ifExists !== null) { - $xfer += $output->writeFieldBegin('ifExists', TType::BOOL, 5); - $xfer += $output->writeBool($this->ifExists); - $xfer += $output->writeFieldEnd(); - } - if ($this->ignoreProtection !== null) { - $xfer += $output->writeFieldBegin('ignoreProtection', TType::BOOL, 6); - $xfer += $output->writeBool($this->ignoreProtection); - $xfer += $output->writeFieldEnd(); - } - if ($this->environmentContext !== null) { - if (!is_object($this->environmentContext)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('environmentContext', TType::STRUCT, 7); - $xfer += $this->environmentContext->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->needResult !== null) { - $xfer += $output->writeFieldBegin('needResult', TType::BOOL, 8); - $xfer += $output->writeBool($this->needResult); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ResourceUri { - static $_TSPEC; - - /** - * @var int - */ - public $resourceType = null; - /** - * @var string - */ - public $uri = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'resourceType', - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'uri', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['resourceType'])) { - $this->resourceType = $vals['resourceType']; - } - if (isset($vals['uri'])) { - $this->uri = $vals['uri']; - } - } - } - - public function getName() { - return 'ResourceUri'; - } - - 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->resourceType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->uri); - } 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('ResourceUri'); - if ($this->resourceType !== null) { - $xfer += $output->writeFieldBegin('resourceType', TType::I32, 1); - $xfer += $output->writeI32($this->resourceType); - $xfer += $output->writeFieldEnd(); - } - if ($this->uri !== null) { - $xfer += $output->writeFieldBegin('uri', TType::STRING, 2); - $xfer += $output->writeString($this->uri); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Function { - static $_TSPEC; - - /** - * @var string - */ - public $functionName = null; - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $className = null; - /** - * @var string - */ - public $ownerName = null; - /** - * @var int - */ - public $ownerType = null; - /** - * @var int - */ - public $createTime = null; - /** - * @var int - */ - public $functionType = null; - /** - * @var \metastore\ResourceUri[] - */ - public $resourceUris = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'functionName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'className', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'ownerName', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'ownerType', - 'type' => TType::I32, - ), - 6 => array( - 'var' => 'createTime', - 'type' => TType::I32, - ), - 7 => array( - 'var' => 'functionType', - 'type' => TType::I32, - ), - 8 => array( - 'var' => 'resourceUris', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\ResourceUri', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['functionName'])) { - $this->functionName = $vals['functionName']; - } - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['className'])) { - $this->className = $vals['className']; - } - if (isset($vals['ownerName'])) { - $this->ownerName = $vals['ownerName']; - } - if (isset($vals['ownerType'])) { - $this->ownerType = $vals['ownerType']; - } - if (isset($vals['createTime'])) { - $this->createTime = $vals['createTime']; - } - if (isset($vals['functionType'])) { - $this->functionType = $vals['functionType']; - } - if (isset($vals['resourceUris'])) { - $this->resourceUris = $vals['resourceUris']; - } - } - } - - public function getName() { - return 'Function'; - } - - 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->functionName); - } 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->className); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->ownerName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->ownerType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->createTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->functionType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::LST) { - $this->resourceUris = array(); - $_size427 = 0; - $_etype430 = 0; - $xfer += $input->readListBegin($_etype430, $_size427); - for ($_i431 = 0; $_i431 < $_size427; ++$_i431) - { - $elem432 = null; - $elem432 = new \metastore\ResourceUri(); - $xfer += $elem432->read($input); - $this->resourceUris []= $elem432; - } - $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('Function'); - if ($this->functionName !== null) { - $xfer += $output->writeFieldBegin('functionName', TType::STRING, 1); - $xfer += $output->writeString($this->functionName); - $xfer += $output->writeFieldEnd(); - } - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->className !== null) { - $xfer += $output->writeFieldBegin('className', TType::STRING, 3); - $xfer += $output->writeString($this->className); - $xfer += $output->writeFieldEnd(); - } - if ($this->ownerName !== null) { - $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 4); - $xfer += $output->writeString($this->ownerName); - $xfer += $output->writeFieldEnd(); - } - if ($this->ownerType !== null) { - $xfer += $output->writeFieldBegin('ownerType', TType::I32, 5); - $xfer += $output->writeI32($this->ownerType); - $xfer += $output->writeFieldEnd(); - } - if ($this->createTime !== null) { - $xfer += $output->writeFieldBegin('createTime', TType::I32, 6); - $xfer += $output->writeI32($this->createTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->functionType !== null) { - $xfer += $output->writeFieldBegin('functionType', TType::I32, 7); - $xfer += $output->writeI32($this->functionType); - $xfer += $output->writeFieldEnd(); - } - if ($this->resourceUris !== null) { - if (!is_array($this->resourceUris)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('resourceUris', TType::LST, 8); - { - $output->writeListBegin(TType::STRUCT, count($this->resourceUris)); - { - foreach ($this->resourceUris as $iter433) - { - $xfer += $iter433->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TxnInfo { - static $_TSPEC; - - /** - * @var int - */ - public $id = null; - /** - * @var int - */ - public $state = null; - /** - * @var string - */ - public $user = null; - /** - * @var string - */ - public $hostname = null; - /** - * @var string - */ - public $agentInfo = "Unknown"; - /** - * @var int - */ - public $heartbeatCount = 0; - /** - * @var string - */ - public $metaInfo = null; - /** - * @var int - */ - public $startedTime = null; - /** - * @var int - */ - public $lastHeartbeatTime = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'id', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'state', - 'type' => TType::I32, - ), - 3 => array( - 'var' => 'user', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'hostname', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'agentInfo', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'heartbeatCount', - 'type' => TType::I32, - ), - 7 => array( - 'var' => 'metaInfo', - 'type' => TType::STRING, - ), - 8 => array( - 'var' => 'startedTime', - 'type' => TType::I64, - ), - 9 => array( - 'var' => 'lastHeartbeatTime', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['id'])) { - $this->id = $vals['id']; - } - if (isset($vals['state'])) { - $this->state = $vals['state']; - } - if (isset($vals['user'])) { - $this->user = $vals['user']; - } - if (isset($vals['hostname'])) { - $this->hostname = $vals['hostname']; - } - if (isset($vals['agentInfo'])) { - $this->agentInfo = $vals['agentInfo']; - } - if (isset($vals['heartbeatCount'])) { - $this->heartbeatCount = $vals['heartbeatCount']; - } - if (isset($vals['metaInfo'])) { - $this->metaInfo = $vals['metaInfo']; - } - if (isset($vals['startedTime'])) { - $this->startedTime = $vals['startedTime']; - } - if (isset($vals['lastHeartbeatTime'])) { - $this->lastHeartbeatTime = $vals['lastHeartbeatTime']; - } - } - } - - public function getName() { - return 'TxnInfo'; - } - - 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::I64) { - $xfer += $input->readI64($this->id); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->state); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->user); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->hostname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->agentInfo); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->heartbeatCount); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->metaInfo); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->startedTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->lastHeartbeatTime); - } 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('TxnInfo'); - if ($this->id !== null) { - $xfer += $output->writeFieldBegin('id', TType::I64, 1); - $xfer += $output->writeI64($this->id); - $xfer += $output->writeFieldEnd(); - } - if ($this->state !== null) { - $xfer += $output->writeFieldBegin('state', TType::I32, 2); - $xfer += $output->writeI32($this->state); - $xfer += $output->writeFieldEnd(); - } - if ($this->user !== null) { - $xfer += $output->writeFieldBegin('user', TType::STRING, 3); - $xfer += $output->writeString($this->user); - $xfer += $output->writeFieldEnd(); - } - if ($this->hostname !== null) { - $xfer += $output->writeFieldBegin('hostname', TType::STRING, 4); - $xfer += $output->writeString($this->hostname); - $xfer += $output->writeFieldEnd(); - } - if ($this->agentInfo !== null) { - $xfer += $output->writeFieldBegin('agentInfo', TType::STRING, 5); - $xfer += $output->writeString($this->agentInfo); - $xfer += $output->writeFieldEnd(); - } - if ($this->heartbeatCount !== null) { - $xfer += $output->writeFieldBegin('heartbeatCount', TType::I32, 6); - $xfer += $output->writeI32($this->heartbeatCount); - $xfer += $output->writeFieldEnd(); - } - if ($this->metaInfo !== null) { - $xfer += $output->writeFieldBegin('metaInfo', TType::STRING, 7); - $xfer += $output->writeString($this->metaInfo); - $xfer += $output->writeFieldEnd(); - } - if ($this->startedTime !== null) { - $xfer += $output->writeFieldBegin('startedTime', TType::I64, 8); - $xfer += $output->writeI64($this->startedTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->lastHeartbeatTime !== null) { - $xfer += $output->writeFieldBegin('lastHeartbeatTime', TType::I64, 9); - $xfer += $output->writeI64($this->lastHeartbeatTime); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetOpenTxnsInfoResponse { - static $_TSPEC; - - /** - * @var int - */ - public $txn_high_water_mark = null; - /** - * @var \metastore\TxnInfo[] - */ - public $open_txns = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'txn_high_water_mark', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'open_txns', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\TxnInfo', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['txn_high_water_mark'])) { - $this->txn_high_water_mark = $vals['txn_high_water_mark']; - } - if (isset($vals['open_txns'])) { - $this->open_txns = $vals['open_txns']; - } - } - } - - public function getName() { - return 'GetOpenTxnsInfoResponse'; - } - - 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::I64) { - $xfer += $input->readI64($this->txn_high_water_mark); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->open_txns = array(); - $_size434 = 0; - $_etype437 = 0; - $xfer += $input->readListBegin($_etype437, $_size434); - for ($_i438 = 0; $_i438 < $_size434; ++$_i438) - { - $elem439 = null; - $elem439 = new \metastore\TxnInfo(); - $xfer += $elem439->read($input); - $this->open_txns []= $elem439; - } - $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('GetOpenTxnsInfoResponse'); - if ($this->txn_high_water_mark !== null) { - $xfer += $output->writeFieldBegin('txn_high_water_mark', TType::I64, 1); - $xfer += $output->writeI64($this->txn_high_water_mark); - $xfer += $output->writeFieldEnd(); - } - if ($this->open_txns !== null) { - if (!is_array($this->open_txns)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('open_txns', TType::LST, 2); - { - $output->writeListBegin(TType::STRUCT, count($this->open_txns)); - { - foreach ($this->open_txns as $iter440) - { - $xfer += $iter440->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetOpenTxnsResponse { - static $_TSPEC; - - /** - * @var int - */ - public $txn_high_water_mark = null; - /** - * @var int[] - */ - public $open_txns = null; - /** - * @var int - */ - public $min_open_txn = null; - /** - * @var string - */ - public $abortedBits = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'txn_high_water_mark', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'open_txns', - 'type' => TType::LST, - 'etype' => TType::I64, - 'elem' => array( - 'type' => TType::I64, - ), - ), - 3 => array( - 'var' => 'min_open_txn', - 'type' => TType::I64, - ), - 4 => array( - 'var' => 'abortedBits', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['txn_high_water_mark'])) { - $this->txn_high_water_mark = $vals['txn_high_water_mark']; - } - if (isset($vals['open_txns'])) { - $this->open_txns = $vals['open_txns']; - } - if (isset($vals['min_open_txn'])) { - $this->min_open_txn = $vals['min_open_txn']; - } - if (isset($vals['abortedBits'])) { - $this->abortedBits = $vals['abortedBits']; - } - } - } - - public function getName() { - return 'GetOpenTxnsResponse'; - } - - 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::I64) { - $xfer += $input->readI64($this->txn_high_water_mark); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->open_txns = array(); - $_size441 = 0; - $_etype444 = 0; - $xfer += $input->readListBegin($_etype444, $_size441); - for ($_i445 = 0; $_i445 < $_size441; ++$_i445) - { - $elem446 = null; - $xfer += $input->readI64($elem446); - $this->open_txns []= $elem446; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->min_open_txn); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->abortedBits); - } 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('GetOpenTxnsResponse'); - if ($this->txn_high_water_mark !== null) { - $xfer += $output->writeFieldBegin('txn_high_water_mark', TType::I64, 1); - $xfer += $output->writeI64($this->txn_high_water_mark); - $xfer += $output->writeFieldEnd(); - } - if ($this->open_txns !== null) { - if (!is_array($this->open_txns)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('open_txns', TType::LST, 2); - { - $output->writeListBegin(TType::I64, count($this->open_txns)); - { - foreach ($this->open_txns as $iter447) - { - $xfer += $output->writeI64($iter447); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->min_open_txn !== null) { - $xfer += $output->writeFieldBegin('min_open_txn', TType::I64, 3); - $xfer += $output->writeI64($this->min_open_txn); - $xfer += $output->writeFieldEnd(); - } - if ($this->abortedBits !== null) { - $xfer += $output->writeFieldBegin('abortedBits', TType::STRING, 4); - $xfer += $output->writeString($this->abortedBits); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class OpenTxnRequest { - static $_TSPEC; - - /** - * @var int - */ - public $num_txns = null; - /** - * @var string - */ - public $user = null; - /** - * @var string - */ - public $hostname = null; - /** - * @var string - */ - public $agentInfo = "Unknown"; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'num_txns', - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'user', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'hostname', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'agentInfo', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['num_txns'])) { - $this->num_txns = $vals['num_txns']; - } - if (isset($vals['user'])) { - $this->user = $vals['user']; - } - if (isset($vals['hostname'])) { - $this->hostname = $vals['hostname']; - } - if (isset($vals['agentInfo'])) { - $this->agentInfo = $vals['agentInfo']; - } - } - } - - public function getName() { - return 'OpenTxnRequest'; - } - - 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->num_txns); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->user); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->hostname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->agentInfo); - } 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('OpenTxnRequest'); - if ($this->num_txns !== null) { - $xfer += $output->writeFieldBegin('num_txns', TType::I32, 1); - $xfer += $output->writeI32($this->num_txns); - $xfer += $output->writeFieldEnd(); - } - if ($this->user !== null) { - $xfer += $output->writeFieldBegin('user', TType::STRING, 2); - $xfer += $output->writeString($this->user); - $xfer += $output->writeFieldEnd(); - } - if ($this->hostname !== null) { - $xfer += $output->writeFieldBegin('hostname', TType::STRING, 3); - $xfer += $output->writeString($this->hostname); - $xfer += $output->writeFieldEnd(); - } - if ($this->agentInfo !== null) { - $xfer += $output->writeFieldBegin('agentInfo', TType::STRING, 4); - $xfer += $output->writeString($this->agentInfo); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class OpenTxnsResponse { - static $_TSPEC; - - /** - * @var int[] - */ - public $txn_ids = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'txn_ids', - 'type' => TType::LST, - 'etype' => TType::I64, - 'elem' => array( - 'type' => TType::I64, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['txn_ids'])) { - $this->txn_ids = $vals['txn_ids']; - } - } - } - - public function getName() { - return 'OpenTxnsResponse'; - } - - 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->txn_ids = array(); - $_size448 = 0; - $_etype451 = 0; - $xfer += $input->readListBegin($_etype451, $_size448); - for ($_i452 = 0; $_i452 < $_size448; ++$_i452) - { - $elem453 = null; - $xfer += $input->readI64($elem453); - $this->txn_ids []= $elem453; - } - $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('OpenTxnsResponse'); - if ($this->txn_ids !== null) { - if (!is_array($this->txn_ids)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('txn_ids', TType::LST, 1); - { - $output->writeListBegin(TType::I64, count($this->txn_ids)); - { - foreach ($this->txn_ids as $iter454) - { - $xfer += $output->writeI64($iter454); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class AbortTxnRequest { - static $_TSPEC; - - /** - * @var int - */ - public $txnid = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'txnid', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['txnid'])) { - $this->txnid = $vals['txnid']; - } - } - } - - public function getName() { - return 'AbortTxnRequest'; - } - - 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::I64) { - $xfer += $input->readI64($this->txnid); - } 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('AbortTxnRequest'); - if ($this->txnid !== null) { - $xfer += $output->writeFieldBegin('txnid', TType::I64, 1); - $xfer += $output->writeI64($this->txnid); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class AbortTxnsRequest { - static $_TSPEC; - - /** - * @var int[] - */ - public $txn_ids = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'txn_ids', - 'type' => TType::LST, - 'etype' => TType::I64, - 'elem' => array( - 'type' => TType::I64, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['txn_ids'])) { - $this->txn_ids = $vals['txn_ids']; - } - } - } - - public function getName() { - return 'AbortTxnsRequest'; - } - - 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->txn_ids = array(); - $_size455 = 0; - $_etype458 = 0; - $xfer += $input->readListBegin($_etype458, $_size455); - for ($_i459 = 0; $_i459 < $_size455; ++$_i459) - { - $elem460 = null; - $xfer += $input->readI64($elem460); - $this->txn_ids []= $elem460; - } - $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('AbortTxnsRequest'); - if ($this->txn_ids !== null) { - if (!is_array($this->txn_ids)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('txn_ids', TType::LST, 1); - { - $output->writeListBegin(TType::I64, count($this->txn_ids)); - { - foreach ($this->txn_ids as $iter461) - { - $xfer += $output->writeI64($iter461); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class CommitTxnRequest { - static $_TSPEC; - - /** - * @var int - */ - public $txnid = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'txnid', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['txnid'])) { - $this->txnid = $vals['txnid']; - } - } - } - - public function getName() { - return 'CommitTxnRequest'; - } - - 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::I64) { - $xfer += $input->readI64($this->txnid); - } 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('CommitTxnRequest'); - if ($this->txnid !== null) { - $xfer += $output->writeFieldBegin('txnid', TType::I64, 1); - $xfer += $output->writeI64($this->txnid); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class LockComponent { - static $_TSPEC; - - /** - * @var int - */ - public $type = null; - /** - * @var int - */ - public $level = null; - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $tablename = null; - /** - * @var string - */ - public $partitionname = null; - /** - * @var int - */ - public $operationType = 5; - /** - * @var bool - */ - public $isAcid = false; - /** - * @var bool - */ - public $isDynamicPartitionWrite = false; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'type', - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'level', - 'type' => TType::I32, - ), - 3 => array( - 'var' => 'dbname', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'tablename', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'partitionname', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'operationType', - 'type' => TType::I32, - ), - 7 => array( - 'var' => 'isAcid', - 'type' => TType::BOOL, - ), - 8 => array( - 'var' => 'isDynamicPartitionWrite', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - if (isset($vals['level'])) { - $this->level = $vals['level']; - } - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['tablename'])) { - $this->tablename = $vals['tablename']; - } - if (isset($vals['partitionname'])) { - $this->partitionname = $vals['partitionname']; - } - if (isset($vals['operationType'])) { - $this->operationType = $vals['operationType']; - } - if (isset($vals['isAcid'])) { - $this->isAcid = $vals['isAcid']; - } - if (isset($vals['isDynamicPartitionWrite'])) { - $this->isDynamicPartitionWrite = $vals['isDynamicPartitionWrite']; - } - } - } - - public function getName() { - return 'LockComponent'; - } - - 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->type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->level); - } 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->tablename); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->partitionname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->operationType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->isAcid); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->isDynamicPartitionWrite); - } 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('LockComponent'); - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::I32, 1); - $xfer += $output->writeI32($this->type); - $xfer += $output->writeFieldEnd(); - } - if ($this->level !== null) { - $xfer += $output->writeFieldBegin('level', TType::I32, 2); - $xfer += $output->writeI32($this->level); - $xfer += $output->writeFieldEnd(); - } - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 3); - $xfer += $output->writeString($this->dbname); - $xfer += $output->writeFieldEnd(); - } - if ($this->tablename !== null) { - $xfer += $output->writeFieldBegin('tablename', TType::STRING, 4); - $xfer += $output->writeString($this->tablename); - $xfer += $output->writeFieldEnd(); - } - if ($this->partitionname !== null) { - $xfer += $output->writeFieldBegin('partitionname', TType::STRING, 5); - $xfer += $output->writeString($this->partitionname); - $xfer += $output->writeFieldEnd(); - } - if ($this->operationType !== null) { - $xfer += $output->writeFieldBegin('operationType', TType::I32, 6); - $xfer += $output->writeI32($this->operationType); - $xfer += $output->writeFieldEnd(); - } - if ($this->isAcid !== null) { - $xfer += $output->writeFieldBegin('isAcid', TType::BOOL, 7); - $xfer += $output->writeBool($this->isAcid); - $xfer += $output->writeFieldEnd(); - } - if ($this->isDynamicPartitionWrite !== null) { - $xfer += $output->writeFieldBegin('isDynamicPartitionWrite', TType::BOOL, 8); - $xfer += $output->writeBool($this->isDynamicPartitionWrite); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class LockRequest { - static $_TSPEC; - - /** - * @var \metastore\LockComponent[] - */ - public $component = null; - /** - * @var int - */ - public $txnid = null; - /** - * @var string - */ - public $user = null; - /** - * @var string - */ - public $hostname = null; - /** - * @var string - */ - public $agentInfo = "Unknown"; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'component', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\LockComponent', - ), - ), - 2 => array( - 'var' => 'txnid', - 'type' => TType::I64, - ), - 3 => array( - 'var' => 'user', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'hostname', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'agentInfo', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['component'])) { - $this->component = $vals['component']; - } - if (isset($vals['txnid'])) { - $this->txnid = $vals['txnid']; - } - if (isset($vals['user'])) { - $this->user = $vals['user']; - } - if (isset($vals['hostname'])) { - $this->hostname = $vals['hostname']; - } - if (isset($vals['agentInfo'])) { - $this->agentInfo = $vals['agentInfo']; - } - } - } - - public function getName() { - return 'LockRequest'; - } - - 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->component = array(); - $_size462 = 0; - $_etype465 = 0; - $xfer += $input->readListBegin($_etype465, $_size462); - for ($_i466 = 0; $_i466 < $_size462; ++$_i466) - { - $elem467 = null; - $elem467 = new \metastore\LockComponent(); - $xfer += $elem467->read($input); - $this->component []= $elem467; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->txnid); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->user); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->hostname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->agentInfo); - } 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('LockRequest'); - if ($this->component !== null) { - if (!is_array($this->component)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('component', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->component)); - { - foreach ($this->component as $iter468) - { - $xfer += $iter468->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->txnid !== null) { - $xfer += $output->writeFieldBegin('txnid', TType::I64, 2); - $xfer += $output->writeI64($this->txnid); - $xfer += $output->writeFieldEnd(); - } - if ($this->user !== null) { - $xfer += $output->writeFieldBegin('user', TType::STRING, 3); - $xfer += $output->writeString($this->user); - $xfer += $output->writeFieldEnd(); - } - if ($this->hostname !== null) { - $xfer += $output->writeFieldBegin('hostname', TType::STRING, 4); - $xfer += $output->writeString($this->hostname); - $xfer += $output->writeFieldEnd(); - } - if ($this->agentInfo !== null) { - $xfer += $output->writeFieldBegin('agentInfo', TType::STRING, 5); - $xfer += $output->writeString($this->agentInfo); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class LockResponse { - static $_TSPEC; - - /** - * @var int - */ - public $lockid = null; - /** - * @var int - */ - public $state = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'lockid', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'state', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['lockid'])) { - $this->lockid = $vals['lockid']; - } - if (isset($vals['state'])) { - $this->state = $vals['state']; - } - } - } - - public function getName() { - return 'LockResponse'; - } - - 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::I64) { - $xfer += $input->readI64($this->lockid); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - 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('LockResponse'); - if ($this->lockid !== null) { - $xfer += $output->writeFieldBegin('lockid', TType::I64, 1); - $xfer += $output->writeI64($this->lockid); - $xfer += $output->writeFieldEnd(); - } - if ($this->state !== null) { - $xfer += $output->writeFieldBegin('state', TType::I32, 2); - $xfer += $output->writeI32($this->state); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class CheckLockRequest { - static $_TSPEC; - - /** - * @var int - */ - public $lockid = null; - /** - * @var int - */ - public $txnid = null; - /** - * @var int - */ - public $elapsed_ms = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'lockid', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'txnid', - 'type' => TType::I64, - ), - 3 => array( - 'var' => 'elapsed_ms', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['lockid'])) { - $this->lockid = $vals['lockid']; - } - if (isset($vals['txnid'])) { - $this->txnid = $vals['txnid']; - } - if (isset($vals['elapsed_ms'])) { - $this->elapsed_ms = $vals['elapsed_ms']; - } - } - } - - public function getName() { - return 'CheckLockRequest'; - } - - 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::I64) { - $xfer += $input->readI64($this->lockid); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->txnid); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->elapsed_ms); - } 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('CheckLockRequest'); - if ($this->lockid !== null) { - $xfer += $output->writeFieldBegin('lockid', TType::I64, 1); - $xfer += $output->writeI64($this->lockid); - $xfer += $output->writeFieldEnd(); - } - if ($this->txnid !== null) { - $xfer += $output->writeFieldBegin('txnid', TType::I64, 2); - $xfer += $output->writeI64($this->txnid); - $xfer += $output->writeFieldEnd(); - } - if ($this->elapsed_ms !== null) { - $xfer += $output->writeFieldBegin('elapsed_ms', TType::I64, 3); - $xfer += $output->writeI64($this->elapsed_ms); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class UnlockRequest { - static $_TSPEC; - - /** - * @var int - */ - public $lockid = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'lockid', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['lockid'])) { - $this->lockid = $vals['lockid']; - } - } - } - - public function getName() { - return 'UnlockRequest'; - } - - 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::I64) { - $xfer += $input->readI64($this->lockid); - } 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('UnlockRequest'); - if ($this->lockid !== null) { - $xfer += $output->writeFieldBegin('lockid', TType::I64, 1); - $xfer += $output->writeI64($this->lockid); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ShowLocksRequest { - static $_TSPEC; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $tablename = null; - /** - * @var string - */ - public $partname = null; - /** - * @var bool - */ - public $isExtended = false; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbname', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tablename', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'partname', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'isExtended', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['tablename'])) { - $this->tablename = $vals['tablename']; - } - if (isset($vals['partname'])) { - $this->partname = $vals['partname']; - } - if (isset($vals['isExtended'])) { - $this->isExtended = $vals['isExtended']; - } - } - } - - public function getName() { - return 'ShowLocksRequest'; - } - - 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->tablename); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->partname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->isExtended); - } 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('ShowLocksRequest'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); - $xfer += $output->writeFieldEnd(); - } - if ($this->tablename !== null) { - $xfer += $output->writeFieldBegin('tablename', TType::STRING, 2); - $xfer += $output->writeString($this->tablename); - $xfer += $output->writeFieldEnd(); - } - if ($this->partname !== null) { - $xfer += $output->writeFieldBegin('partname', TType::STRING, 3); - $xfer += $output->writeString($this->partname); - $xfer += $output->writeFieldEnd(); - } - if ($this->isExtended !== null) { - $xfer += $output->writeFieldBegin('isExtended', TType::BOOL, 4); - $xfer += $output->writeBool($this->isExtended); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ShowLocksResponseElement { - static $_TSPEC; - - /** - * @var int - */ - public $lockid = null; - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $tablename = null; - /** - * @var string - */ - public $partname = null; - /** - * @var int - */ - public $state = null; - /** - * @var int - */ - public $type = null; - /** - * @var int - */ - public $txnid = null; - /** - * @var int - */ - public $lastheartbeat = null; - /** - * @var int - */ - public $acquiredat = null; - /** - * @var string - */ - public $user = null; - /** - * @var string - */ - public $hostname = null; - /** - * @var int - */ - public $heartbeatCount = 0; - /** - * @var string - */ - public $agentInfo = null; - /** - * @var int - */ - public $blockedByExtId = null; - /** - * @var int - */ - public $blockedByIntId = null; - /** - * @var int - */ - public $lockIdInternal = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'lockid', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'dbname', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'tablename', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'partname', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'state', - 'type' => TType::I32, - ), - 6 => array( - 'var' => 'type', - 'type' => TType::I32, - ), - 7 => array( - 'var' => 'txnid', - 'type' => TType::I64, - ), - 8 => array( - 'var' => 'lastheartbeat', - 'type' => TType::I64, - ), - 9 => array( - 'var' => 'acquiredat', - 'type' => TType::I64, - ), - 10 => array( - 'var' => 'user', - 'type' => TType::STRING, - ), - 11 => array( - 'var' => 'hostname', - 'type' => TType::STRING, - ), - 12 => array( - 'var' => 'heartbeatCount', - 'type' => TType::I32, - ), - 13 => array( - 'var' => 'agentInfo', - 'type' => TType::STRING, - ), - 14 => array( - 'var' => 'blockedByExtId', - 'type' => TType::I64, - ), - 15 => array( - 'var' => 'blockedByIntId', - 'type' => TType::I64, - ), - 16 => array( - 'var' => 'lockIdInternal', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['lockid'])) { - $this->lockid = $vals['lockid']; - } - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['tablename'])) { - $this->tablename = $vals['tablename']; - } - if (isset($vals['partname'])) { - $this->partname = $vals['partname']; - } - if (isset($vals['state'])) { - $this->state = $vals['state']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - if (isset($vals['txnid'])) { - $this->txnid = $vals['txnid']; - } - if (isset($vals['lastheartbeat'])) { - $this->lastheartbeat = $vals['lastheartbeat']; - } - if (isset($vals['acquiredat'])) { - $this->acquiredat = $vals['acquiredat']; - } - if (isset($vals['user'])) { - $this->user = $vals['user']; - } - if (isset($vals['hostname'])) { - $this->hostname = $vals['hostname']; - } - if (isset($vals['heartbeatCount'])) { - $this->heartbeatCount = $vals['heartbeatCount']; - } - if (isset($vals['agentInfo'])) { - $this->agentInfo = $vals['agentInfo']; - } - if (isset($vals['blockedByExtId'])) { - $this->blockedByExtId = $vals['blockedByExtId']; - } - if (isset($vals['blockedByIntId'])) { - $this->blockedByIntId = $vals['blockedByIntId']; - } - if (isset($vals['lockIdInternal'])) { - $this->lockIdInternal = $vals['lockIdInternal']; - } - } - } - - public function getName() { - return 'ShowLocksResponseElement'; - } - - 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::I64) { - $xfer += $input->readI64($this->lockid); - } 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::STRING) { - $xfer += $input->readString($this->partname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->state); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->txnid); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->lastheartbeat); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->acquiredat); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->user); - } else { - $xfer += $input->skip($ftype); - } - break; - case 11: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->hostname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 12: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->heartbeatCount); - } else { - $xfer += $input->skip($ftype); - } - break; - case 13: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->agentInfo); - } else { - $xfer += $input->skip($ftype); - } - break; - case 14: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->blockedByExtId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 15: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->blockedByIntId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 16: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->lockIdInternal); - } 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('ShowLocksResponseElement'); - if ($this->lockid !== null) { - $xfer += $output->writeFieldBegin('lockid', TType::I64, 1); - $xfer += $output->writeI64($this->lockid); - $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->partname !== null) { - $xfer += $output->writeFieldBegin('partname', TType::STRING, 4); - $xfer += $output->writeString($this->partname); - $xfer += $output->writeFieldEnd(); - } - if ($this->state !== null) { - $xfer += $output->writeFieldBegin('state', TType::I32, 5); - $xfer += $output->writeI32($this->state); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::I32, 6); - $xfer += $output->writeI32($this->type); - $xfer += $output->writeFieldEnd(); - } - if ($this->txnid !== null) { - $xfer += $output->writeFieldBegin('txnid', TType::I64, 7); - $xfer += $output->writeI64($this->txnid); - $xfer += $output->writeFieldEnd(); - } - if ($this->lastheartbeat !== null) { - $xfer += $output->writeFieldBegin('lastheartbeat', TType::I64, 8); - $xfer += $output->writeI64($this->lastheartbeat); - $xfer += $output->writeFieldEnd(); - } - if ($this->acquiredat !== null) { - $xfer += $output->writeFieldBegin('acquiredat', TType::I64, 9); - $xfer += $output->writeI64($this->acquiredat); - $xfer += $output->writeFieldEnd(); - } - if ($this->user !== null) { - $xfer += $output->writeFieldBegin('user', TType::STRING, 10); - $xfer += $output->writeString($this->user); - $xfer += $output->writeFieldEnd(); - } - if ($this->hostname !== null) { - $xfer += $output->writeFieldBegin('hostname', TType::STRING, 11); - $xfer += $output->writeString($this->hostname); - $xfer += $output->writeFieldEnd(); - } - if ($this->heartbeatCount !== null) { - $xfer += $output->writeFieldBegin('heartbeatCount', TType::I32, 12); - $xfer += $output->writeI32($this->heartbeatCount); - $xfer += $output->writeFieldEnd(); - } - if ($this->agentInfo !== null) { - $xfer += $output->writeFieldBegin('agentInfo', TType::STRING, 13); - $xfer += $output->writeString($this->agentInfo); - $xfer += $output->writeFieldEnd(); - } - if ($this->blockedByExtId !== null) { - $xfer += $output->writeFieldBegin('blockedByExtId', TType::I64, 14); - $xfer += $output->writeI64($this->blockedByExtId); - $xfer += $output->writeFieldEnd(); - } - if ($this->blockedByIntId !== null) { - $xfer += $output->writeFieldBegin('blockedByIntId', TType::I64, 15); - $xfer += $output->writeI64($this->blockedByIntId); - $xfer += $output->writeFieldEnd(); - } - if ($this->lockIdInternal !== null) { - $xfer += $output->writeFieldBegin('lockIdInternal', TType::I64, 16); - $xfer += $output->writeI64($this->lockIdInternal); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ShowLocksResponse { - static $_TSPEC; - - /** - * @var \metastore\ShowLocksResponseElement[] - */ - public $locks = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'locks', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\ShowLocksResponseElement', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['locks'])) { - $this->locks = $vals['locks']; - } - } - } - - public function getName() { - return 'ShowLocksResponse'; - } - - 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->locks = array(); - $_size469 = 0; - $_etype472 = 0; - $xfer += $input->readListBegin($_etype472, $_size469); - for ($_i473 = 0; $_i473 < $_size469; ++$_i473) - { - $elem474 = null; - $elem474 = new \metastore\ShowLocksResponseElement(); - $xfer += $elem474->read($input); - $this->locks []= $elem474; - } - $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('ShowLocksResponse'); - if ($this->locks !== null) { - if (!is_array($this->locks)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('locks', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->locks)); - { - foreach ($this->locks as $iter475) - { - $xfer += $iter475->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class HeartbeatRequest { - static $_TSPEC; - - /** - * @var int - */ - public $lockid = null; - /** - * @var int - */ - public $txnid = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'lockid', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'txnid', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['lockid'])) { - $this->lockid = $vals['lockid']; - } - if (isset($vals['txnid'])) { - $this->txnid = $vals['txnid']; - } - } - } - - public function getName() { - return 'HeartbeatRequest'; - } - - 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::I64) { - $xfer += $input->readI64($this->lockid); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->txnid); - } 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('HeartbeatRequest'); - if ($this->lockid !== null) { - $xfer += $output->writeFieldBegin('lockid', TType::I64, 1); - $xfer += $output->writeI64($this->lockid); - $xfer += $output->writeFieldEnd(); - } - if ($this->txnid !== null) { - $xfer += $output->writeFieldBegin('txnid', TType::I64, 2); - $xfer += $output->writeI64($this->txnid); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class HeartbeatTxnRangeRequest { - static $_TSPEC; - - /** - * @var int - */ - public $min = null; - /** - * @var int - */ - public $max = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'min', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'max', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['min'])) { - $this->min = $vals['min']; - } - if (isset($vals['max'])) { - $this->max = $vals['max']; - } - } - } - - public function getName() { - return 'HeartbeatTxnRangeRequest'; - } - - 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::I64) { - $xfer += $input->readI64($this->min); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->max); - } 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('HeartbeatTxnRangeRequest'); - if ($this->min !== null) { - $xfer += $output->writeFieldBegin('min', TType::I64, 1); - $xfer += $output->writeI64($this->min); - $xfer += $output->writeFieldEnd(); - } - if ($this->max !== null) { - $xfer += $output->writeFieldBegin('max', TType::I64, 2); - $xfer += $output->writeI64($this->max); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class HeartbeatTxnRangeResponse { - static $_TSPEC; - - /** - * @var int[] - */ - public $aborted = null; - /** - * @var int[] - */ - public $nosuch = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'aborted', - 'type' => TType::SET, - 'etype' => TType::I64, - 'elem' => array( - 'type' => TType::I64, - ), - ), - 2 => array( - 'var' => 'nosuch', - 'type' => TType::SET, - 'etype' => TType::I64, - 'elem' => array( - 'type' => TType::I64, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['aborted'])) { - $this->aborted = $vals['aborted']; - } - if (isset($vals['nosuch'])) { - $this->nosuch = $vals['nosuch']; - } - } - } - - public function getName() { - return 'HeartbeatTxnRangeResponse'; - } - - 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::SET) { - $this->aborted = array(); - $_size476 = 0; - $_etype479 = 0; - $xfer += $input->readSetBegin($_etype479, $_size476); - for ($_i480 = 0; $_i480 < $_size476; ++$_i480) - { - $elem481 = null; - $xfer += $input->readI64($elem481); - if (is_scalar($elem481)) { - $this->aborted[$elem481] = true; - } else { - $this->aborted []= $elem481; - } - } - $xfer += $input->readSetEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::SET) { - $this->nosuch = array(); - $_size482 = 0; - $_etype485 = 0; - $xfer += $input->readSetBegin($_etype485, $_size482); - for ($_i486 = 0; $_i486 < $_size482; ++$_i486) - { - $elem487 = null; - $xfer += $input->readI64($elem487); - if (is_scalar($elem487)) { - $this->nosuch[$elem487] = true; - } else { - $this->nosuch []= $elem487; - } - } - $xfer += $input->readSetEnd(); - } 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('HeartbeatTxnRangeResponse'); - if ($this->aborted !== null) { - if (!is_array($this->aborted)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('aborted', TType::SET, 1); - { - $output->writeSetBegin(TType::I64, count($this->aborted)); - { - foreach ($this->aborted as $iter488 => $iter489) - { - if (is_scalar($iter489)) { - $xfer += $output->writeI64($iter488); - } else { - $xfer += $output->writeI64($iter489); - } - } - } - $output->writeSetEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->nosuch !== null) { - if (!is_array($this->nosuch)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('nosuch', TType::SET, 2); - { - $output->writeSetBegin(TType::I64, count($this->nosuch)); - { - foreach ($this->nosuch as $iter490 => $iter491) - { - if (is_scalar($iter491)) { - $xfer += $output->writeI64($iter490); - } else { - $xfer += $output->writeI64($iter491); - } - } - } - $output->writeSetEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class CompactionRequest { - static $_TSPEC; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $tablename = null; - /** - * @var string - */ - public $partitionname = null; - /** - * @var int - */ - public $type = null; - /** - * @var string - */ - public $runas = null; - /** - * @var array - */ - public $properties = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbname', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tablename', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'partitionname', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'type', - 'type' => TType::I32, - ), - 5 => array( - 'var' => 'runas', - 'type' => TType::STRING, - ), - 6 => 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['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['tablename'])) { - $this->tablename = $vals['tablename']; - } - if (isset($vals['partitionname'])) { - $this->partitionname = $vals['partitionname']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - if (isset($vals['runas'])) { - $this->runas = $vals['runas']; - } - if (isset($vals['properties'])) { - $this->properties = $vals['properties']; - } - } - } - - public function getName() { - return 'CompactionRequest'; - } - - 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->tablename); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->partitionname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->runas); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::MAP) { - $this->properties = array(); - $_size492 = 0; - $_ktype493 = 0; - $_vtype494 = 0; - $xfer += $input->readMapBegin($_ktype493, $_vtype494, $_size492); - for ($_i496 = 0; $_i496 < $_size492; ++$_i496) - { - $key497 = ''; - $val498 = ''; - $xfer += $input->readString($key497); - $xfer += $input->readString($val498); - $this->properties[$key497] = $val498; - } - $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('CompactionRequest'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); - $xfer += $output->writeFieldEnd(); - } - if ($this->tablename !== null) { - $xfer += $output->writeFieldBegin('tablename', TType::STRING, 2); - $xfer += $output->writeString($this->tablename); - $xfer += $output->writeFieldEnd(); - } - if ($this->partitionname !== null) { - $xfer += $output->writeFieldBegin('partitionname', TType::STRING, 3); - $xfer += $output->writeString($this->partitionname); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::I32, 4); - $xfer += $output->writeI32($this->type); - $xfer += $output->writeFieldEnd(); - } - if ($this->runas !== null) { - $xfer += $output->writeFieldBegin('runas', TType::STRING, 5); - $xfer += $output->writeString($this->runas); - $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, 6); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); - { - foreach ($this->properties as $kiter499 => $viter500) - { - $xfer += $output->writeString($kiter499); - $xfer += $output->writeString($viter500); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class CompactionResponse { - static $_TSPEC; - - /** - * @var int - */ - public $id = null; - /** - * @var string - */ - public $state = null; - /** - * @var bool - */ - public $accepted = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'id', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'state', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'accepted', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['id'])) { - $this->id = $vals['id']; - } - if (isset($vals['state'])) { - $this->state = $vals['state']; - } - if (isset($vals['accepted'])) { - $this->accepted = $vals['accepted']; - } - } - } - - public function getName() { - return 'CompactionResponse'; - } - - 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::I64) { - $xfer += $input->readI64($this->id); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->state); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->accepted); - } 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('CompactionResponse'); - if ($this->id !== null) { - $xfer += $output->writeFieldBegin('id', TType::I64, 1); - $xfer += $output->writeI64($this->id); - $xfer += $output->writeFieldEnd(); - } - if ($this->state !== null) { - $xfer += $output->writeFieldBegin('state', TType::STRING, 2); - $xfer += $output->writeString($this->state); - $xfer += $output->writeFieldEnd(); - } - if ($this->accepted !== null) { - $xfer += $output->writeFieldBegin('accepted', TType::BOOL, 3); - $xfer += $output->writeBool($this->accepted); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ShowCompactRequest { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ShowCompactRequest'; - } - - 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('ShowCompactRequest'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ShowCompactResponseElement { - static $_TSPEC; - - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $tablename = null; - /** - * @var string - */ - public $partitionname = null; - /** - * @var int - */ - public $type = null; - /** - * @var string - */ - public $state = null; - /** - * @var string - */ - public $workerid = null; - /** - * @var int - */ - public $start = null; - /** - * @var string - */ - public $runAs = null; - /** - * @var int - */ - public $hightestTxnId = null; - /** - * @var string - */ - public $metaInfo = null; - /** - * @var int - */ - public $endTime = null; - /** - * @var string - */ - public $hadoopJobId = "None"; - /** - * @var int - */ - public $id = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbname', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tablename', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'partitionname', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'type', - 'type' => TType::I32, - ), - 5 => array( - 'var' => 'state', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'workerid', - 'type' => TType::STRING, - ), - 7 => array( - 'var' => 'start', - 'type' => TType::I64, - ), - 8 => array( - 'var' => 'runAs', - 'type' => TType::STRING, - ), - 9 => array( - 'var' => 'hightestTxnId', - 'type' => TType::I64, - ), - 10 => array( - 'var' => 'metaInfo', - 'type' => TType::STRING, - ), - 11 => array( - 'var' => 'endTime', - 'type' => TType::I64, - ), - 12 => array( - 'var' => 'hadoopJobId', - 'type' => TType::STRING, - ), - 13 => array( - 'var' => 'id', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['tablename'])) { - $this->tablename = $vals['tablename']; - } - if (isset($vals['partitionname'])) { - $this->partitionname = $vals['partitionname']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - if (isset($vals['state'])) { - $this->state = $vals['state']; - } - if (isset($vals['workerid'])) { - $this->workerid = $vals['workerid']; - } - if (isset($vals['start'])) { - $this->start = $vals['start']; - } - if (isset($vals['runAs'])) { - $this->runAs = $vals['runAs']; - } - if (isset($vals['hightestTxnId'])) { - $this->hightestTxnId = $vals['hightestTxnId']; - } - if (isset($vals['metaInfo'])) { - $this->metaInfo = $vals['metaInfo']; - } - if (isset($vals['endTime'])) { - $this->endTime = $vals['endTime']; - } - if (isset($vals['hadoopJobId'])) { - $this->hadoopJobId = $vals['hadoopJobId']; - } - if (isset($vals['id'])) { - $this->id = $vals['id']; - } - } - } - - public function getName() { - return 'ShowCompactResponseElement'; - } - - 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->tablename); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->partitionname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->state); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->workerid); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->start); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->runAs); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->hightestTxnId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->metaInfo); - } else { - $xfer += $input->skip($ftype); - } - break; - case 11: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->endTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 12: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->hadoopJobId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 13: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->id); - } 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('ShowCompactResponseElement'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); - $xfer += $output->writeFieldEnd(); - } - if ($this->tablename !== null) { - $xfer += $output->writeFieldBegin('tablename', TType::STRING, 2); - $xfer += $output->writeString($this->tablename); - $xfer += $output->writeFieldEnd(); - } - if ($this->partitionname !== null) { - $xfer += $output->writeFieldBegin('partitionname', TType::STRING, 3); - $xfer += $output->writeString($this->partitionname); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::I32, 4); - $xfer += $output->writeI32($this->type); - $xfer += $output->writeFieldEnd(); - } - if ($this->state !== null) { - $xfer += $output->writeFieldBegin('state', TType::STRING, 5); - $xfer += $output->writeString($this->state); - $xfer += $output->writeFieldEnd(); - } - if ($this->workerid !== null) { - $xfer += $output->writeFieldBegin('workerid', TType::STRING, 6); - $xfer += $output->writeString($this->workerid); - $xfer += $output->writeFieldEnd(); - } - if ($this->start !== null) { - $xfer += $output->writeFieldBegin('start', TType::I64, 7); - $xfer += $output->writeI64($this->start); - $xfer += $output->writeFieldEnd(); - } - if ($this->runAs !== null) { - $xfer += $output->writeFieldBegin('runAs', TType::STRING, 8); - $xfer += $output->writeString($this->runAs); - $xfer += $output->writeFieldEnd(); - } - if ($this->hightestTxnId !== null) { - $xfer += $output->writeFieldBegin('hightestTxnId', TType::I64, 9); - $xfer += $output->writeI64($this->hightestTxnId); - $xfer += $output->writeFieldEnd(); - } - if ($this->metaInfo !== null) { - $xfer += $output->writeFieldBegin('metaInfo', TType::STRING, 10); - $xfer += $output->writeString($this->metaInfo); - $xfer += $output->writeFieldEnd(); - } - if ($this->endTime !== null) { - $xfer += $output->writeFieldBegin('endTime', TType::I64, 11); - $xfer += $output->writeI64($this->endTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->hadoopJobId !== null) { - $xfer += $output->writeFieldBegin('hadoopJobId', TType::STRING, 12); - $xfer += $output->writeString($this->hadoopJobId); - $xfer += $output->writeFieldEnd(); - } - if ($this->id !== null) { - $xfer += $output->writeFieldBegin('id', TType::I64, 13); - $xfer += $output->writeI64($this->id); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ShowCompactResponse { - static $_TSPEC; - - /** - * @var \metastore\ShowCompactResponseElement[] - */ - public $compacts = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'compacts', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\ShowCompactResponseElement', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['compacts'])) { - $this->compacts = $vals['compacts']; - } - } - } - - public function getName() { - return 'ShowCompactResponse'; - } - - 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->compacts = array(); - $_size501 = 0; - $_etype504 = 0; - $xfer += $input->readListBegin($_etype504, $_size501); - for ($_i505 = 0; $_i505 < $_size501; ++$_i505) - { - $elem506 = null; - $elem506 = new \metastore\ShowCompactResponseElement(); - $xfer += $elem506->read($input); - $this->compacts []= $elem506; - } - $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('ShowCompactResponse'); - if ($this->compacts !== null) { - if (!is_array($this->compacts)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('compacts', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->compacts)); - { - foreach ($this->compacts as $iter507) - { - $xfer += $iter507->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class AddDynamicPartitions { - static $_TSPEC; - - /** - * @var int - */ - public $txnid = null; - /** - * @var string - */ - public $dbname = null; - /** - * @var string - */ - public $tablename = null; - /** - * @var string[] - */ - public $partitionnames = null; - /** - * @var int - */ - public $operationType = 5; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'txnid', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'dbname', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'tablename', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'partitionnames', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 5 => array( - 'var' => 'operationType', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['txnid'])) { - $this->txnid = $vals['txnid']; - } - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['tablename'])) { - $this->tablename = $vals['tablename']; - } - if (isset($vals['partitionnames'])) { - $this->partitionnames = $vals['partitionnames']; - } - if (isset($vals['operationType'])) { - $this->operationType = $vals['operationType']; - } - } - } - - public function getName() { - return 'AddDynamicPartitions'; - } - - 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::I64) { - $xfer += $input->readI64($this->txnid); - } 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::LST) { - $this->partitionnames = array(); - $_size508 = 0; - $_etype511 = 0; - $xfer += $input->readListBegin($_etype511, $_size508); - for ($_i512 = 0; $_i512 < $_size508; ++$_i512) - { - $elem513 = null; - $xfer += $input->readString($elem513); - $this->partitionnames []= $elem513; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->operationType); - } 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('AddDynamicPartitions'); - if ($this->txnid !== null) { - $xfer += $output->writeFieldBegin('txnid', TType::I64, 1); - $xfer += $output->writeI64($this->txnid); - $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->partitionnames !== null) { - if (!is_array($this->partitionnames)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partitionnames', TType::LST, 4); - { - $output->writeListBegin(TType::STRING, count($this->partitionnames)); - { - foreach ($this->partitionnames as $iter514) - { - $xfer += $output->writeString($iter514); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->operationType !== null) { - $xfer += $output->writeFieldBegin('operationType', TType::I32, 5); - $xfer += $output->writeI32($this->operationType); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class NotificationEventRequest { - static $_TSPEC; - - /** - * @var int - */ - public $lastEvent = null; - /** - * @var int - */ - public $maxEvents = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'lastEvent', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'maxEvents', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['lastEvent'])) { - $this->lastEvent = $vals['lastEvent']; - } - if (isset($vals['maxEvents'])) { - $this->maxEvents = $vals['maxEvents']; - } - } - } - - public function getName() { - return 'NotificationEventRequest'; - } - - 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::I64) { - $xfer += $input->readI64($this->lastEvent); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->maxEvents); - } 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('NotificationEventRequest'); - if ($this->lastEvent !== null) { - $xfer += $output->writeFieldBegin('lastEvent', TType::I64, 1); - $xfer += $output->writeI64($this->lastEvent); - $xfer += $output->writeFieldEnd(); - } - if ($this->maxEvents !== null) { - $xfer += $output->writeFieldBegin('maxEvents', TType::I32, 2); - $xfer += $output->writeI32($this->maxEvents); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class NotificationEvent { - static $_TSPEC; - - /** - * @var int - */ - public $eventId = null; - /** - * @var int - */ - public $eventTime = null; - /** - * @var string - */ - public $eventType = null; - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tableName = null; - /** - * @var string - */ - public $message = null; - /** - * @var string - */ - public $messageFormat = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'eventId', - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'eventTime', - 'type' => TType::I32, - ), - 3 => array( - 'var' => 'eventType', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'tableName', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'message', - 'type' => TType::STRING, - ), - 7 => array( - 'var' => 'messageFormat', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['eventId'])) { - $this->eventId = $vals['eventId']; - } - if (isset($vals['eventTime'])) { - $this->eventTime = $vals['eventTime']; - } - if (isset($vals['eventType'])) { - $this->eventType = $vals['eventType']; - } - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['tableName'])) { - $this->tableName = $vals['tableName']; - } - if (isset($vals['message'])) { - $this->message = $vals['message']; - } - if (isset($vals['messageFormat'])) { - $this->messageFormat = $vals['messageFormat']; - } - } - } - - public function getName() { - return 'NotificationEvent'; - } - - 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::I64) { - $xfer += $input->readI64($this->eventId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->eventTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->eventType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tableName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->message); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->messageFormat); - } 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('NotificationEvent'); - if ($this->eventId !== null) { - $xfer += $output->writeFieldBegin('eventId', TType::I64, 1); - $xfer += $output->writeI64($this->eventId); - $xfer += $output->writeFieldEnd(); - } - if ($this->eventTime !== null) { - $xfer += $output->writeFieldBegin('eventTime', TType::I32, 2); - $xfer += $output->writeI32($this->eventTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->eventType !== null) { - $xfer += $output->writeFieldBegin('eventType', TType::STRING, 3); - $xfer += $output->writeString($this->eventType); - $xfer += $output->writeFieldEnd(); - } - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 4); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tableName !== null) { - $xfer += $output->writeFieldBegin('tableName', TType::STRING, 5); - $xfer += $output->writeString($this->tableName); - $xfer += $output->writeFieldEnd(); - } - if ($this->message !== null) { - $xfer += $output->writeFieldBegin('message', TType::STRING, 6); - $xfer += $output->writeString($this->message); - $xfer += $output->writeFieldEnd(); - } - if ($this->messageFormat !== null) { - $xfer += $output->writeFieldBegin('messageFormat', TType::STRING, 7); - $xfer += $output->writeString($this->messageFormat); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class NotificationEventResponse { - static $_TSPEC; - - /** - * @var \metastore\NotificationEvent[] - */ - public $events = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'events', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\NotificationEvent', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['events'])) { - $this->events = $vals['events']; - } - } - } - - public function getName() { - return 'NotificationEventResponse'; - } - - 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->events = array(); - $_size515 = 0; - $_etype518 = 0; - $xfer += $input->readListBegin($_etype518, $_size515); - for ($_i519 = 0; $_i519 < $_size515; ++$_i519) - { - $elem520 = null; - $elem520 = new \metastore\NotificationEvent(); - $xfer += $elem520->read($input); - $this->events []= $elem520; - } - $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('NotificationEventResponse'); - if ($this->events !== null) { - if (!is_array($this->events)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('events', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->events)); - { - foreach ($this->events as $iter521) - { - $xfer += $iter521->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class CurrentNotificationEventId { - static $_TSPEC; - - /** - * @var int - */ - public $eventId = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'eventId', - 'type' => TType::I64, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['eventId'])) { - $this->eventId = $vals['eventId']; - } - } - } - - public function getName() { - return 'CurrentNotificationEventId'; - } - - 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::I64) { - $xfer += $input->readI64($this->eventId); - } 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('CurrentNotificationEventId'); - if ($this->eventId !== null) { - $xfer += $output->writeFieldBegin('eventId', TType::I64, 1); - $xfer += $output->writeI64($this->eventId); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class InsertEventRequestData { - static $_TSPEC; - - /** - * @var bool - */ - public $replace = null; - /** - * @var string[] - */ - public $filesAdded = null; - /** - * @var string[] - */ - public $filesAddedChecksum = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'replace', - 'type' => TType::BOOL, - ), - 2 => array( - 'var' => 'filesAdded', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 3 => array( - 'var' => 'filesAddedChecksum', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['replace'])) { - $this->replace = $vals['replace']; - } - if (isset($vals['filesAdded'])) { - $this->filesAdded = $vals['filesAdded']; - } - if (isset($vals['filesAddedChecksum'])) { - $this->filesAddedChecksum = $vals['filesAddedChecksum']; - } - } - } - - public function getName() { - return 'InsertEventRequestData'; - } - - 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::BOOL) { - $xfer += $input->readBool($this->replace); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->filesAdded = array(); - $_size522 = 0; - $_etype525 = 0; - $xfer += $input->readListBegin($_etype525, $_size522); - for ($_i526 = 0; $_i526 < $_size522; ++$_i526) - { - $elem527 = null; - $xfer += $input->readString($elem527); - $this->filesAdded []= $elem527; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->filesAddedChecksum = array(); - $_size528 = 0; - $_etype531 = 0; - $xfer += $input->readListBegin($_etype531, $_size528); - for ($_i532 = 0; $_i532 < $_size528; ++$_i532) - { - $elem533 = null; - $xfer += $input->readString($elem533); - $this->filesAddedChecksum []= $elem533; - } - $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('InsertEventRequestData'); - if ($this->replace !== null) { - $xfer += $output->writeFieldBegin('replace', TType::BOOL, 1); - $xfer += $output->writeBool($this->replace); - $xfer += $output->writeFieldEnd(); - } - if ($this->filesAdded !== null) { - if (!is_array($this->filesAdded)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('filesAdded', TType::LST, 2); - { - $output->writeListBegin(TType::STRING, count($this->filesAdded)); - { - foreach ($this->filesAdded as $iter534) - { - $xfer += $output->writeString($iter534); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->filesAddedChecksum !== null) { - if (!is_array($this->filesAddedChecksum)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('filesAddedChecksum', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->filesAddedChecksum)); - { - foreach ($this->filesAddedChecksum as $iter535) - { - $xfer += $output->writeString($iter535); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class FireEventRequestData { - static $_TSPEC; - - /** - * @var \metastore\InsertEventRequestData - */ - public $insertData = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'insertData', - 'type' => TType::STRUCT, - 'class' => '\metastore\InsertEventRequestData', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['insertData'])) { - $this->insertData = $vals['insertData']; - } - } - } - - public function getName() { - return 'FireEventRequestData'; - } - - 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->insertData = new \metastore\InsertEventRequestData(); - $xfer += $this->insertData->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('FireEventRequestData'); - if ($this->insertData !== null) { - if (!is_object($this->insertData)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('insertData', TType::STRUCT, 1); - $xfer += $this->insertData->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class FireEventRequest { - static $_TSPEC; - - /** - * @var bool - */ - public $successful = null; - /** - * @var \metastore\FireEventRequestData - */ - public $data = null; - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tableName = null; - /** - * @var string[] - */ - public $partitionVals = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'successful', - 'type' => TType::BOOL, - ), - 2 => array( - 'var' => 'data', - 'type' => TType::STRUCT, - 'class' => '\metastore\FireEventRequestData', - ), - 3 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'tableName', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'partitionVals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['successful'])) { - $this->successful = $vals['successful']; - } - if (isset($vals['data'])) { - $this->data = $vals['data']; - } - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['tableName'])) { - $this->tableName = $vals['tableName']; - } - if (isset($vals['partitionVals'])) { - $this->partitionVals = $vals['partitionVals']; - } - } - } - - public function getName() { - return 'FireEventRequest'; - } - - 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::BOOL) { - $xfer += $input->readBool($this->successful); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->data = new \metastore\FireEventRequestData(); - $xfer += $this->data->read($input); - } 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->tableName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::LST) { - $this->partitionVals = array(); - $_size536 = 0; - $_etype539 = 0; - $xfer += $input->readListBegin($_etype539, $_size536); - for ($_i540 = 0; $_i540 < $_size536; ++$_i540) - { - $elem541 = null; - $xfer += $input->readString($elem541); - $this->partitionVals []= $elem541; - } - $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('FireEventRequest'); - if ($this->successful !== null) { - $xfer += $output->writeFieldBegin('successful', TType::BOOL, 1); - $xfer += $output->writeBool($this->successful); - $xfer += $output->writeFieldEnd(); - } - if ($this->data !== null) { - if (!is_object($this->data)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('data', TType::STRUCT, 2); - $xfer += $this->data->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 3); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tableName !== null) { - $xfer += $output->writeFieldBegin('tableName', TType::STRING, 4); - $xfer += $output->writeString($this->tableName); - $xfer += $output->writeFieldEnd(); - } - if ($this->partitionVals !== null) { - if (!is_array($this->partitionVals)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partitionVals', TType::LST, 5); - { - $output->writeListBegin(TType::STRING, count($this->partitionVals)); - { - foreach ($this->partitionVals as $iter542) - { - $xfer += $output->writeString($iter542); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class FireEventResponse { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'FireEventResponse'; - } - - 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('FireEventResponse'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class MetadataPpdResult { - static $_TSPEC; - - /** - * @var string - */ - public $metadata = null; - /** - * @var string - */ - public $includeBitset = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'metadata', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'includeBitset', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['metadata'])) { - $this->metadata = $vals['metadata']; - } - if (isset($vals['includeBitset'])) { - $this->includeBitset = $vals['includeBitset']; - } - } - } - - public function getName() { - return 'MetadataPpdResult'; - } - - 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->metadata); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->includeBitset); - } 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('MetadataPpdResult'); - if ($this->metadata !== null) { - $xfer += $output->writeFieldBegin('metadata', TType::STRING, 1); - $xfer += $output->writeString($this->metadata); - $xfer += $output->writeFieldEnd(); - } - if ($this->includeBitset !== null) { - $xfer += $output->writeFieldBegin('includeBitset', TType::STRING, 2); - $xfer += $output->writeString($this->includeBitset); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetFileMetadataByExprResult { - static $_TSPEC; - - /** - * @var array - */ - public $metadata = null; - /** - * @var bool - */ - public $isSupported = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'metadata', - 'type' => TType::MAP, - 'ktype' => TType::I64, - 'vtype' => TType::STRUCT, - 'key' => array( - 'type' => TType::I64, - ), - 'val' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\MetadataPpdResult', - ), - ), - 2 => array( - 'var' => 'isSupported', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['metadata'])) { - $this->metadata = $vals['metadata']; - } - if (isset($vals['isSupported'])) { - $this->isSupported = $vals['isSupported']; - } - } - } - - public function getName() { - return 'GetFileMetadataByExprResult'; - } - - 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->metadata = array(); - $_size543 = 0; - $_ktype544 = 0; - $_vtype545 = 0; - $xfer += $input->readMapBegin($_ktype544, $_vtype545, $_size543); - for ($_i547 = 0; $_i547 < $_size543; ++$_i547) - { - $key548 = 0; - $val549 = new \metastore\MetadataPpdResult(); - $xfer += $input->readI64($key548); - $val549 = new \metastore\MetadataPpdResult(); - $xfer += $val549->read($input); - $this->metadata[$key548] = $val549; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->isSupported); - } 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('GetFileMetadataByExprResult'); - if ($this->metadata !== null) { - if (!is_array($this->metadata)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('metadata', TType::MAP, 1); - { - $output->writeMapBegin(TType::I64, TType::STRUCT, count($this->metadata)); - { - foreach ($this->metadata as $kiter550 => $viter551) - { - $xfer += $output->writeI64($kiter550); - $xfer += $viter551->write($output); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->isSupported !== null) { - $xfer += $output->writeFieldBegin('isSupported', TType::BOOL, 2); - $xfer += $output->writeBool($this->isSupported); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetFileMetadataByExprRequest { - static $_TSPEC; - - /** - * @var int[] - */ - public $fileIds = null; - /** - * @var string - */ - public $expr = null; - /** - * @var bool - */ - public $doGetFooters = null; - /** - * @var int - */ - public $type = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'fileIds', - 'type' => TType::LST, - 'etype' => TType::I64, - 'elem' => array( - 'type' => TType::I64, - ), - ), - 2 => array( - 'var' => 'expr', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'doGetFooters', - 'type' => TType::BOOL, - ), - 4 => array( - 'var' => 'type', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['fileIds'])) { - $this->fileIds = $vals['fileIds']; - } - if (isset($vals['expr'])) { - $this->expr = $vals['expr']; - } - if (isset($vals['doGetFooters'])) { - $this->doGetFooters = $vals['doGetFooters']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - } - } - - public function getName() { - return 'GetFileMetadataByExprRequest'; - } - - 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->fileIds = array(); - $_size552 = 0; - $_etype555 = 0; - $xfer += $input->readListBegin($_etype555, $_size552); - for ($_i556 = 0; $_i556 < $_size552; ++$_i556) - { - $elem557 = null; - $xfer += $input->readI64($elem557); - $this->fileIds []= $elem557; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->expr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->doGetFooters); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($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('GetFileMetadataByExprRequest'); - if ($this->fileIds !== null) { - if (!is_array($this->fileIds)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('fileIds', TType::LST, 1); - { - $output->writeListBegin(TType::I64, count($this->fileIds)); - { - foreach ($this->fileIds as $iter558) - { - $xfer += $output->writeI64($iter558); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->expr !== null) { - $xfer += $output->writeFieldBegin('expr', TType::STRING, 2); - $xfer += $output->writeString($this->expr); - $xfer += $output->writeFieldEnd(); - } - if ($this->doGetFooters !== null) { - $xfer += $output->writeFieldBegin('doGetFooters', TType::BOOL, 3); - $xfer += $output->writeBool($this->doGetFooters); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::I32, 4); - $xfer += $output->writeI32($this->type); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetFileMetadataResult { - static $_TSPEC; - - /** - * @var array - */ - public $metadata = null; - /** - * @var bool - */ - public $isSupported = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'metadata', - 'type' => TType::MAP, - 'ktype' => TType::I64, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::I64, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 2 => array( - 'var' => 'isSupported', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['metadata'])) { - $this->metadata = $vals['metadata']; - } - if (isset($vals['isSupported'])) { - $this->isSupported = $vals['isSupported']; - } - } - } - - public function getName() { - return 'GetFileMetadataResult'; - } - - 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->metadata = array(); - $_size559 = 0; - $_ktype560 = 0; - $_vtype561 = 0; - $xfer += $input->readMapBegin($_ktype560, $_vtype561, $_size559); - for ($_i563 = 0; $_i563 < $_size559; ++$_i563) - { - $key564 = 0; - $val565 = ''; - $xfer += $input->readI64($key564); - $xfer += $input->readString($val565); - $this->metadata[$key564] = $val565; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->isSupported); - } 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('GetFileMetadataResult'); - if ($this->metadata !== null) { - if (!is_array($this->metadata)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('metadata', TType::MAP, 1); - { - $output->writeMapBegin(TType::I64, TType::STRING, count($this->metadata)); - { - foreach ($this->metadata as $kiter566 => $viter567) - { - $xfer += $output->writeI64($kiter566); - $xfer += $output->writeString($viter567); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->isSupported !== null) { - $xfer += $output->writeFieldBegin('isSupported', TType::BOOL, 2); - $xfer += $output->writeBool($this->isSupported); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetFileMetadataRequest { - static $_TSPEC; - - /** - * @var int[] - */ - public $fileIds = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'fileIds', - 'type' => TType::LST, - 'etype' => TType::I64, - 'elem' => array( - 'type' => TType::I64, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['fileIds'])) { - $this->fileIds = $vals['fileIds']; - } - } - } - - public function getName() { - return 'GetFileMetadataRequest'; - } - - 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->fileIds = array(); - $_size568 = 0; - $_etype571 = 0; - $xfer += $input->readListBegin($_etype571, $_size568); - for ($_i572 = 0; $_i572 < $_size568; ++$_i572) - { - $elem573 = null; - $xfer += $input->readI64($elem573); - $this->fileIds []= $elem573; - } - $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('GetFileMetadataRequest'); - if ($this->fileIds !== null) { - if (!is_array($this->fileIds)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('fileIds', TType::LST, 1); - { - $output->writeListBegin(TType::I64, count($this->fileIds)); - { - foreach ($this->fileIds as $iter574) - { - $xfer += $output->writeI64($iter574); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class PutFileMetadataResult { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'PutFileMetadataResult'; - } - - 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('PutFileMetadataResult'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class PutFileMetadataRequest { - static $_TSPEC; - - /** - * @var int[] - */ - public $fileIds = null; - /** - * @var string[] - */ - public $metadata = null; - /** - * @var int - */ - public $type = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'fileIds', - 'type' => TType::LST, - 'etype' => TType::I64, - 'elem' => array( - 'type' => TType::I64, - ), - ), - 2 => array( - 'var' => 'metadata', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 3 => array( - 'var' => 'type', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['fileIds'])) { - $this->fileIds = $vals['fileIds']; - } - if (isset($vals['metadata'])) { - $this->metadata = $vals['metadata']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - } - } - - public function getName() { - return 'PutFileMetadataRequest'; - } - - 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->fileIds = array(); - $_size575 = 0; - $_etype578 = 0; - $xfer += $input->readListBegin($_etype578, $_size575); - for ($_i579 = 0; $_i579 < $_size575; ++$_i579) - { - $elem580 = null; - $xfer += $input->readI64($elem580); - $this->fileIds []= $elem580; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->metadata = array(); - $_size581 = 0; - $_etype584 = 0; - $xfer += $input->readListBegin($_etype584, $_size581); - for ($_i585 = 0; $_i585 < $_size581; ++$_i585) - { - $elem586 = null; - $xfer += $input->readString($elem586); - $this->metadata []= $elem586; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I32) { - $xfer += $input->readI32($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('PutFileMetadataRequest'); - if ($this->fileIds !== null) { - if (!is_array($this->fileIds)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('fileIds', TType::LST, 1); - { - $output->writeListBegin(TType::I64, count($this->fileIds)); - { - foreach ($this->fileIds as $iter587) - { - $xfer += $output->writeI64($iter587); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->metadata !== null) { - if (!is_array($this->metadata)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('metadata', TType::LST, 2); - { - $output->writeListBegin(TType::STRING, count($this->metadata)); - { - foreach ($this->metadata as $iter588) - { - $xfer += $output->writeString($iter588); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::I32, 3); - $xfer += $output->writeI32($this->type); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ClearFileMetadataResult { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ClearFileMetadataResult'; - } - - 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('ClearFileMetadataResult'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ClearFileMetadataRequest { - static $_TSPEC; - - /** - * @var int[] - */ - public $fileIds = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'fileIds', - 'type' => TType::LST, - 'etype' => TType::I64, - 'elem' => array( - 'type' => TType::I64, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['fileIds'])) { - $this->fileIds = $vals['fileIds']; - } - } - } - - public function getName() { - return 'ClearFileMetadataRequest'; - } - - 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->fileIds = array(); - $_size589 = 0; - $_etype592 = 0; - $xfer += $input->readListBegin($_etype592, $_size589); - for ($_i593 = 0; $_i593 < $_size589; ++$_i593) - { - $elem594 = null; - $xfer += $input->readI64($elem594); - $this->fileIds []= $elem594; - } - $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('ClearFileMetadataRequest'); - if ($this->fileIds !== null) { - if (!is_array($this->fileIds)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('fileIds', TType::LST, 1); - { - $output->writeListBegin(TType::I64, count($this->fileIds)); - { - foreach ($this->fileIds as $iter595) - { - $xfer += $output->writeI64($iter595); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class CacheFileMetadataResult { - static $_TSPEC; - - /** - * @var bool - */ - public $isSupported = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'isSupported', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['isSupported'])) { - $this->isSupported = $vals['isSupported']; - } - } - } - - public function getName() { - return 'CacheFileMetadataResult'; - } - - 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::BOOL) { - $xfer += $input->readBool($this->isSupported); - } 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('CacheFileMetadataResult'); - if ($this->isSupported !== null) { - $xfer += $output->writeFieldBegin('isSupported', TType::BOOL, 1); - $xfer += $output->writeBool($this->isSupported); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class CacheFileMetadataRequest { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tblName = null; - /** - * @var string - */ - public $partName = null; - /** - * @var bool - */ - public $isAllParts = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tblName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'partName', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'isAllParts', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['tblName'])) { - $this->tblName = $vals['tblName']; - } - if (isset($vals['partName'])) { - $this->partName = $vals['partName']; - } - if (isset($vals['isAllParts'])) { - $this->isAllParts = $vals['isAllParts']; - } - } - } - - public function getName() { - return 'CacheFileMetadataRequest'; - } - - 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->tblName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->partName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->isAllParts); - } 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('CacheFileMetadataRequest'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tblName !== null) { - $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); - $xfer += $output->writeString($this->tblName); - $xfer += $output->writeFieldEnd(); - } - if ($this->partName !== null) { - $xfer += $output->writeFieldBegin('partName', TType::STRING, 3); - $xfer += $output->writeString($this->partName); - $xfer += $output->writeFieldEnd(); - } - if ($this->isAllParts !== null) { - $xfer += $output->writeFieldBegin('isAllParts', TType::BOOL, 4); - $xfer += $output->writeBool($this->isAllParts); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetAllFunctionsResponse { - static $_TSPEC; - - /** - * @var \metastore\Function[] - */ - public $functions = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'functions', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Function', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['functions'])) { - $this->functions = $vals['functions']; - } - } - } - - public function getName() { - return 'GetAllFunctionsResponse'; - } - - 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->functions = array(); - $_size596 = 0; - $_etype599 = 0; - $xfer += $input->readListBegin($_etype599, $_size596); - for ($_i600 = 0; $_i600 < $_size596; ++$_i600) - { - $elem601 = null; - $elem601 = new \metastore\Function(); - $xfer += $elem601->read($input); - $this->functions []= $elem601; - } - $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('GetAllFunctionsResponse'); - if ($this->functions !== null) { - if (!is_array($this->functions)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('functions', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->functions)); - { - foreach ($this->functions as $iter602) - { - $xfer += $iter602->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ClientCapabilities { - static $_TSPEC; - - /** - * @var int[] - */ - public $values = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'values', - 'type' => TType::LST, - 'etype' => TType::I32, - 'elem' => array( - 'type' => TType::I32, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['values'])) { - $this->values = $vals['values']; - } - } - } - - public function getName() { - return 'ClientCapabilities'; - } - - 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(); - $_size603 = 0; - $_etype606 = 0; - $xfer += $input->readListBegin($_etype606, $_size603); - for ($_i607 = 0; $_i607 < $_size603; ++$_i607) - { - $elem608 = null; - $xfer += $input->readI32($elem608); - $this->values []= $elem608; - } - $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('ClientCapabilities'); - 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::I32, count($this->values)); - { - foreach ($this->values as $iter609) - { - $xfer += $output->writeI32($iter609); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetTableRequest { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tblName = null; - /** - * @var \metastore\ClientCapabilities - */ - public $capabilities = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tblName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'capabilities', - 'type' => TType::STRUCT, - 'class' => '\metastore\ClientCapabilities', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['tblName'])) { - $this->tblName = $vals['tblName']; - } - if (isset($vals['capabilities'])) { - $this->capabilities = $vals['capabilities']; - } - } - } - - public function getName() { - return 'GetTableRequest'; - } - - 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->tblName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->capabilities = new \metastore\ClientCapabilities(); - $xfer += $this->capabilities->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('GetTableRequest'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tblName !== null) { - $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); - $xfer += $output->writeString($this->tblName); - $xfer += $output->writeFieldEnd(); - } - if ($this->capabilities !== null) { - if (!is_object($this->capabilities)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('capabilities', TType::STRUCT, 3); - $xfer += $this->capabilities->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetTableResult { - static $_TSPEC; - - /** - * @var \metastore\Table - */ - public $table = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'table', - 'type' => TType::STRUCT, - 'class' => '\metastore\Table', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['table'])) { - $this->table = $vals['table']; - } - } - } - - public function getName() { - return 'GetTableResult'; - } - - 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->table = new \metastore\Table(); - $xfer += $this->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('GetTableResult'); - if ($this->table !== null) { - if (!is_object($this->table)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('table', TType::STRUCT, 1); - $xfer += $this->table->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetTablesRequest { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string[] - */ - public $tblNames = null; - /** - * @var \metastore\ClientCapabilities - */ - public $capabilities = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tblNames', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 3 => array( - 'var' => 'capabilities', - 'type' => TType::STRUCT, - 'class' => '\metastore\ClientCapabilities', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['tblNames'])) { - $this->tblNames = $vals['tblNames']; - } - if (isset($vals['capabilities'])) { - $this->capabilities = $vals['capabilities']; - } - } - } - - public function getName() { - return 'GetTablesRequest'; - } - - 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->tblNames = array(); - $_size610 = 0; - $_etype613 = 0; - $xfer += $input->readListBegin($_etype613, $_size610); - for ($_i614 = 0; $_i614 < $_size610; ++$_i614) - { - $elem615 = null; - $xfer += $input->readString($elem615); - $this->tblNames []= $elem615; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->capabilities = new \metastore\ClientCapabilities(); - $xfer += $this->capabilities->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('GetTablesRequest'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tblNames !== null) { - if (!is_array($this->tblNames)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tblNames', TType::LST, 2); - { - $output->writeListBegin(TType::STRING, count($this->tblNames)); - { - foreach ($this->tblNames as $iter616) - { - $xfer += $output->writeString($iter616); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->capabilities !== null) { - if (!is_object($this->capabilities)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('capabilities', TType::STRUCT, 3); - $xfer += $this->capabilities->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class GetTablesResult { - static $_TSPEC; - - /** - * @var \metastore\Table[] - */ - public $tables = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tables', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\metastore\Table', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tables'])) { - $this->tables = $vals['tables']; - } - } - } - - public function getName() { - return 'GetTablesResult'; - } - - 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->tables = array(); - $_size617 = 0; - $_etype620 = 0; - $xfer += $input->readListBegin($_etype620, $_size617); - for ($_i621 = 0; $_i621 < $_size617; ++$_i621) - { - $elem622 = null; - $elem622 = new \metastore\Table(); - $xfer += $elem622->read($input); - $this->tables []= $elem622; - } - $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('GetTablesResult'); - if ($this->tables !== null) { - if (!is_array($this->tables)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tables', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->tables)); - { - foreach ($this->tables as $iter623) - { - $xfer += $iter623->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class CmRecycleRequest { - static $_TSPEC; - - /** - * @var string - */ - public $dataPath = null; - /** - * @var bool - */ - public $purge = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dataPath', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'purge', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dataPath'])) { - $this->dataPath = $vals['dataPath']; - } - if (isset($vals['purge'])) { - $this->purge = $vals['purge']; - } - } - } - - public function getName() { - return 'CmRecycleRequest'; - } - - 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->dataPath); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->purge); - } 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('CmRecycleRequest'); - if ($this->dataPath !== null) { - $xfer += $output->writeFieldBegin('dataPath', TType::STRING, 1); - $xfer += $output->writeString($this->dataPath); - $xfer += $output->writeFieldEnd(); - } - if ($this->purge !== null) { - $xfer += $output->writeFieldBegin('purge', TType::BOOL, 2); - $xfer += $output->writeBool($this->purge); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class CmRecycleResponse { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'CmRecycleResponse'; - } - - 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('CmRecycleResponse'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TableMeta { - static $_TSPEC; - - /** - * @var string - */ - public $dbName = null; - /** - * @var string - */ - public $tableName = null; - /** - * @var string - */ - public $tableType = null; - /** - * @var string - */ - public $comments = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tableName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'tableType', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'comments', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['tableName'])) { - $this->tableName = $vals['tableName']; - } - if (isset($vals['tableType'])) { - $this->tableType = $vals['tableType']; - } - if (isset($vals['comments'])) { - $this->comments = $vals['comments']; - } - } - } - - public function getName() { - return 'TableMeta'; - } - - 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->tableName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tableType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - 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('TableMeta'); - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tableName !== null) { - $xfer += $output->writeFieldBegin('tableName', TType::STRING, 2); - $xfer += $output->writeString($this->tableName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tableType !== null) { - $xfer += $output->writeFieldBegin('tableType', TType::STRING, 3); - $xfer += $output->writeString($this->tableType); - $xfer += $output->writeFieldEnd(); - } - if ($this->comments !== null) { - $xfer += $output->writeFieldBegin('comments', TType::STRING, 4); - $xfer += $output->writeString($this->comments); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class MetaException extends TException { - static $_TSPEC; - - /** - * @var string - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var string - */ - 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; - - /** - * @var string - */ - 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; - } - -} - -class InvalidInputException extends TException { - static $_TSPEC; - - /** - * @var string - */ - 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 'InvalidInputException'; - } - - 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('InvalidInputException'); - 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 NoSuchTxnException extends TException { - static $_TSPEC; - - /** - * @var string - */ - 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 'NoSuchTxnException'; - } - - 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('NoSuchTxnException'); - 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 TxnAbortedException extends TException { - static $_TSPEC; - - /** - * @var string - */ - 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 'TxnAbortedException'; - } - - 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('TxnAbortedException'); - 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 TxnOpenException extends TException { - static $_TSPEC; - - /** - * @var string - */ - 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 'TxnOpenException'; - } - - 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('TxnOpenException'); - 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 NoSuchLockException extends TException { - static $_TSPEC; - - /** - * @var string - */ - 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 'NoSuchLockException'; - } - - 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('NoSuchLockException'); - 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; - } - -} - -final class Constant extends \Thrift\Type\TConstant { - static protected $DDL_TIME; - static protected $HIVE_FILTER_FIELD_OWNER; - static protected $HIVE_FILTER_FIELD_PARAMS; - static protected $HIVE_FILTER_FIELD_LAST_ACCESS; - static protected $IS_ARCHIVED; - static protected $ORIGINAL_LOCATION; - static protected $IS_IMMUTABLE; - static protected $META_TABLE_COLUMNS; - static protected $META_TABLE_COLUMN_TYPES; - static protected $BUCKET_FIELD_NAME; - static protected $BUCKET_COUNT; - static protected $FIELD_TO_DIMENSION; - static protected $META_TABLE_NAME; - static protected $META_TABLE_DB; - static protected $META_TABLE_LOCATION; - static protected $META_TABLE_SERDE; - static protected $META_TABLE_PARTITION_COLUMNS; - static protected $META_TABLE_PARTITION_COLUMN_TYPES; - static protected $FILE_INPUT_FORMAT; - static protected $FILE_OUTPUT_FORMAT; - static protected $META_TABLE_STORAGE; - static protected $TABLE_IS_TRANSACTIONAL; - static protected $TABLE_NO_AUTO_COMPACT; - static protected $TABLE_TRANSACTIONAL_PROPERTIES; - - static protected function init_DDL_TIME() { - return "transient_lastDdlTime"; - } - - static protected function init_HIVE_FILTER_FIELD_OWNER() { - return "hive_filter_field_owner__"; - } - - static protected function init_HIVE_FILTER_FIELD_PARAMS() { - return "hive_filter_field_params__"; - } - - static protected function init_HIVE_FILTER_FIELD_LAST_ACCESS() { - return "hive_filter_field_last_access__"; - } - - static protected function init_IS_ARCHIVED() { - return "is_archived"; - } - - static protected function init_ORIGINAL_LOCATION() { - return "original_location"; - } - - static protected function init_IS_IMMUTABLE() { - return "immutable"; - } - - static protected function init_META_TABLE_COLUMNS() { - return "columns"; - } - - static protected function init_META_TABLE_COLUMN_TYPES() { - return "columns.types"; - } - - static protected function init_BUCKET_FIELD_NAME() { - return "bucket_field_name"; - } - - static protected function init_BUCKET_COUNT() { - return "bucket_count"; - } - - static protected function init_FIELD_TO_DIMENSION() { - return "field_to_dimension"; - } - - static protected function init_META_TABLE_NAME() { - return "name"; - } - - static protected function init_META_TABLE_DB() { - return "db"; - } - - static protected function init_META_TABLE_LOCATION() { - return "location"; - } - - static protected function init_META_TABLE_SERDE() { - return "serde"; - } - - static protected function init_META_TABLE_PARTITION_COLUMNS() { - return "partition_columns"; - } - - static protected function init_META_TABLE_PARTITION_COLUMN_TYPES() { - return "partition_columns.types"; - } - - static protected function init_FILE_INPUT_FORMAT() { - return "file.inputformat"; - } - - static protected function init_FILE_OUTPUT_FORMAT() { - return "file.outputformat"; - } - - static protected function init_META_TABLE_STORAGE() { - return "storage_handler"; - } - - static protected function init_TABLE_IS_TRANSACTIONAL() { - return "transactional"; - } - - static protected function init_TABLE_NO_AUTO_COMPACT() { - return "no_auto_compaction"; - } - - static protected function init_TABLE_TRANSACTIONAL_PROPERTIES() { - return "transactional_properties"; - } -} - - diff --git metastore/src/gen/thrift/gen-py/__init__.py metastore/src/gen/thrift/gen-py/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote deleted file mode 100755 index 46dcac9..0000000 --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote +++ /dev/null @@ -1,1298 +0,0 @@ -#!/usr/bin/env python -# -# Autogenerated by Thrift Compiler (0.9.3) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -import sys -import pprint -from urlparse import urlparse -from thrift.transport import TTransport -from thrift.transport import TSocket -from thrift.transport import TSSLSocket -from thrift.transport import THttpClient -from thrift.protocol import TBinaryProtocol - -from hive_metastore import ThriftHiveMetastore -from hive_metastore.ttypes import * - -if len(sys.argv) <= 1 or sys.argv[1] == '--help': - print('') - print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] function [arg1 [arg2...]]') - print('') - print('Functions:') - print(' string getMetaConf(string key)') - print(' void setMetaConf(string key, string value)') - print(' void create_database(Database database)') - print(' Database get_database(string name)') - print(' void drop_database(string name, bool deleteData, bool cascade)') - print(' get_databases(string pattern)') - print(' get_all_databases()') - print(' void alter_database(string dbname, Database db)') - print(' Type get_type(string name)') - print(' bool create_type(Type type)') - print(' bool drop_type(string type)') - print(' get_type_all(string name)') - print(' get_fields(string db_name, string table_name)') - print(' get_fields_with_environment_context(string db_name, string table_name, EnvironmentContext environment_context)') - print(' get_schema(string db_name, string table_name)') - print(' get_schema_with_environment_context(string db_name, string table_name, EnvironmentContext environment_context)') - print(' void create_table(Table tbl)') - print(' void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context)') - print(' void create_table_with_constraints(Table tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints)') - print(' void drop_constraint(DropConstraintRequest req)') - print(' void add_primary_key(AddPrimaryKeyRequest req)') - print(' void add_foreign_key(AddForeignKeyRequest req)') - print(' void add_unique_constraint(AddUniqueConstraintRequest req)') - print(' void add_not_null_constraint(AddNotNullConstraintRequest req)') - print(' void drop_table(string dbname, string name, bool deleteData)') - print(' void drop_table_with_environment_context(string dbname, string name, bool deleteData, EnvironmentContext environment_context)') - print(' void truncate_table(string dbName, string tableName, partNames)') - print(' get_tables(string db_name, string pattern)') - print(' get_tables_by_type(string db_name, string pattern, string tableType)') - print(' get_table_meta(string db_patterns, string tbl_patterns, tbl_types)') - print(' get_all_tables(string db_name)') - print(' Table get_table(string dbname, string tbl_name)') - print(' get_table_objects_by_name(string dbname, tbl_names)') - print(' GetTableResult get_table_req(GetTableRequest req)') - print(' GetTablesResult get_table_objects_by_name_req(GetTablesRequest req)') - print(' get_table_names_by_filter(string dbname, string filter, i16 max_tables)') - print(' void alter_table(string dbname, string tbl_name, Table new_tbl)') - print(' void alter_table_with_environment_context(string dbname, string tbl_name, Table new_tbl, EnvironmentContext environment_context)') - print(' void alter_table_with_cascade(string dbname, string tbl_name, Table new_tbl, bool cascade)') - print(' Partition add_partition(Partition new_part)') - print(' Partition add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context)') - print(' i32 add_partitions( new_parts)') - print(' i32 add_partitions_pspec( new_parts)') - print(' Partition append_partition(string db_name, string tbl_name, part_vals)') - print(' AddPartitionsResult add_partitions_req(AddPartitionsRequest request)') - print(' Partition append_partition_with_environment_context(string db_name, string tbl_name, part_vals, EnvironmentContext environment_context)') - print(' Partition append_partition_by_name(string db_name, string tbl_name, string part_name)') - print(' Partition append_partition_by_name_with_environment_context(string db_name, string tbl_name, string part_name, EnvironmentContext environment_context)') - print(' bool drop_partition(string db_name, string tbl_name, part_vals, bool deleteData)') - print(' bool drop_partition_with_environment_context(string db_name, string tbl_name, part_vals, bool deleteData, EnvironmentContext environment_context)') - print(' bool drop_partition_by_name(string db_name, string tbl_name, string part_name, bool deleteData)') - print(' bool drop_partition_by_name_with_environment_context(string db_name, string tbl_name, string part_name, bool deleteData, EnvironmentContext environment_context)') - print(' DropPartitionsResult drop_partitions_req(DropPartitionsRequest req)') - print(' Partition get_partition(string db_name, string tbl_name, part_vals)') - print(' Partition exchange_partition( partitionSpecs, string source_db, string source_table_name, string dest_db, string dest_table_name)') - print(' exchange_partitions( partitionSpecs, string source_db, string source_table_name, string dest_db, string dest_table_name)') - print(' Partition get_partition_with_auth(string db_name, string tbl_name, part_vals, string user_name, group_names)') - print(' Partition get_partition_by_name(string db_name, string tbl_name, string part_name)') - print(' get_partitions(string db_name, string tbl_name, i16 max_parts)') - print(' get_partitions_with_auth(string db_name, string tbl_name, i16 max_parts, string user_name, group_names)') - print(' get_partitions_pspec(string db_name, string tbl_name, i32 max_parts)') - print(' get_partition_names(string db_name, string tbl_name, i16 max_parts)') - print(' get_partitions_ps(string db_name, string tbl_name, part_vals, i16 max_parts)') - print(' get_partitions_ps_with_auth(string db_name, string tbl_name, part_vals, i16 max_parts, string user_name, group_names)') - print(' get_partition_names_ps(string db_name, string tbl_name, part_vals, i16 max_parts)') - print(' get_partitions_by_filter(string db_name, string tbl_name, string filter, i16 max_parts)') - print(' get_part_specs_by_filter(string db_name, string tbl_name, string filter, i32 max_parts)') - print(' PartitionsByExprResult get_partitions_by_expr(PartitionsByExprRequest req)') - print(' i32 get_num_partitions_by_filter(string db_name, string tbl_name, string filter)') - print(' get_partitions_by_names(string db_name, string tbl_name, names)') - print(' void alter_partition(string db_name, string tbl_name, Partition new_part)') - print(' void alter_partitions(string db_name, string tbl_name, new_parts)') - print(' void alter_partitions_with_environment_context(string db_name, string tbl_name, new_parts, EnvironmentContext environment_context)') - print(' void alter_partition_with_environment_context(string db_name, string tbl_name, Partition new_part, EnvironmentContext environment_context)') - print(' void rename_partition(string db_name, string tbl_name, part_vals, Partition new_part)') - print(' bool partition_name_has_valid_characters( part_vals, bool throw_exception)') - print(' string get_config_value(string name, string defaultValue)') - print(' partition_name_to_vals(string part_name)') - print(' partition_name_to_spec(string part_name)') - print(' void markPartitionForEvent(string db_name, string tbl_name, part_vals, PartitionEventType eventType)') - print(' bool isPartitionMarkedForEvent(string db_name, string tbl_name, part_vals, PartitionEventType eventType)') - print(' Index add_index(Index new_index, Table index_table)') - print(' void alter_index(string dbname, string base_tbl_name, string idx_name, Index new_idx)') - print(' bool drop_index_by_name(string db_name, string tbl_name, string index_name, bool deleteData)') - print(' Index get_index_by_name(string db_name, string tbl_name, string index_name)') - print(' get_indexes(string db_name, string tbl_name, i16 max_indexes)') - print(' get_index_names(string db_name, string tbl_name, i16 max_indexes)') - print(' PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request)') - print(' ForeignKeysResponse get_foreign_keys(ForeignKeysRequest request)') - print(' UniqueConstraintsResponse get_unique_constraints(UniqueConstraintsRequest request)') - print(' NotNullConstraintsResponse get_not_null_constraints(NotNullConstraintsRequest request)') - print(' bool update_table_column_statistics(ColumnStatistics stats_obj)') - print(' bool update_partition_column_statistics(ColumnStatistics stats_obj)') - print(' ColumnStatistics get_table_column_statistics(string db_name, string tbl_name, string col_name)') - print(' ColumnStatistics get_partition_column_statistics(string db_name, string tbl_name, string part_name, string col_name)') - print(' TableStatsResult get_table_statistics_req(TableStatsRequest request)') - print(' PartitionsStatsResult get_partitions_statistics_req(PartitionsStatsRequest request)') - print(' AggrStats get_aggr_stats_for(PartitionsStatsRequest request)') - print(' bool set_aggr_stats_for(SetPartitionsStatsRequest request)') - print(' bool delete_partition_column_statistics(string db_name, string tbl_name, string part_name, string col_name)') - print(' bool delete_table_column_statistics(string db_name, string tbl_name, string col_name)') - print(' void create_function(Function func)') - print(' void drop_function(string dbName, string funcName)') - print(' void alter_function(string dbName, string funcName, Function newFunc)') - print(' get_functions(string dbName, string pattern)') - print(' Function get_function(string dbName, string funcName)') - print(' GetAllFunctionsResponse get_all_functions()') - print(' bool create_role(Role role)') - print(' bool drop_role(string role_name)') - print(' get_role_names()') - print(' bool grant_role(string role_name, string principal_name, PrincipalType principal_type, string grantor, PrincipalType grantorType, bool grant_option)') - print(' bool revoke_role(string role_name, string principal_name, PrincipalType principal_type)') - print(' list_roles(string principal_name, PrincipalType principal_type)') - print(' GrantRevokeRoleResponse grant_revoke_role(GrantRevokeRoleRequest request)') - print(' GetPrincipalsInRoleResponse get_principals_in_role(GetPrincipalsInRoleRequest request)') - print(' GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request)') - print(' PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, string user_name, group_names)') - print(' list_privileges(string principal_name, PrincipalType principal_type, HiveObjectRef hiveObject)') - print(' bool grant_privileges(PrivilegeBag privileges)') - print(' bool revoke_privileges(PrivilegeBag privileges)') - print(' GrantRevokePrivilegeResponse grant_revoke_privileges(GrantRevokePrivilegeRequest request)') - print(' set_ugi(string user_name, group_names)') - print(' string get_delegation_token(string token_owner, string renewer_kerberos_principal_name)') - print(' i64 renew_delegation_token(string token_str_form)') - print(' void cancel_delegation_token(string token_str_form)') - print(' bool add_token(string token_identifier, string delegation_token)') - print(' bool remove_token(string token_identifier)') - print(' string get_token(string token_identifier)') - print(' get_all_token_identifiers()') - print(' i32 add_master_key(string key)') - print(' void update_master_key(i32 seq_number, string key)') - print(' bool remove_master_key(i32 key_seq)') - print(' get_master_keys()') - print(' GetOpenTxnsResponse get_open_txns()') - print(' GetOpenTxnsInfoResponse get_open_txns_info()') - print(' OpenTxnsResponse open_txns(OpenTxnRequest rqst)') - print(' void abort_txn(AbortTxnRequest rqst)') - print(' void abort_txns(AbortTxnsRequest rqst)') - print(' void commit_txn(CommitTxnRequest rqst)') - print(' LockResponse lock(LockRequest rqst)') - print(' LockResponse check_lock(CheckLockRequest rqst)') - print(' void unlock(UnlockRequest rqst)') - print(' ShowLocksResponse show_locks(ShowLocksRequest rqst)') - print(' void heartbeat(HeartbeatRequest ids)') - print(' HeartbeatTxnRangeResponse heartbeat_txn_range(HeartbeatTxnRangeRequest txns)') - print(' void compact(CompactionRequest rqst)') - print(' CompactionResponse compact2(CompactionRequest rqst)') - print(' ShowCompactResponse show_compact(ShowCompactRequest rqst)') - print(' void add_dynamic_partitions(AddDynamicPartitions rqst)') - print(' NotificationEventResponse get_next_notification(NotificationEventRequest rqst)') - print(' CurrentNotificationEventId get_current_notificationEventId()') - print(' FireEventResponse fire_listener_event(FireEventRequest rqst)') - print(' void flushCache()') - print(' CmRecycleResponse cm_recycle(CmRecycleRequest request)') - print(' GetFileMetadataByExprResult get_file_metadata_by_expr(GetFileMetadataByExprRequest req)') - print(' GetFileMetadataResult get_file_metadata(GetFileMetadataRequest req)') - print(' PutFileMetadataResult put_file_metadata(PutFileMetadataRequest req)') - print(' ClearFileMetadataResult clear_file_metadata(ClearFileMetadataRequest req)') - print(' CacheFileMetadataResult cache_file_metadata(CacheFileMetadataRequest req)') - print(' string get_metastore_db_uuid()') - print(' string getName()') - print(' string getVersion()') - print(' fb_status getStatus()') - print(' string getStatusDetails()') - print(' getCounters()') - print(' i64 getCounter(string key)') - print(' void setOption(string key, string value)') - print(' string getOption(string key)') - print(' getOptions()') - print(' string getCpuProfile(i32 profileDurationInSec)') - print(' i64 aliveSince()') - print(' void reinitialize()') - print(' void shutdown()') - print('') - sys.exit(0) - -pp = pprint.PrettyPrinter(indent = 2) -host = 'localhost' -port = 9090 -uri = '' -framed = False -ssl = False -http = False -argi = 1 - -if sys.argv[argi] == '-h': - parts = sys.argv[argi+1].split(':') - host = parts[0] - if len(parts) > 1: - port = int(parts[1]) - argi += 2 - -if sys.argv[argi] == '-u': - url = urlparse(sys.argv[argi+1]) - parts = url[1].split(':') - host = parts[0] - if len(parts) > 1: - port = int(parts[1]) - else: - port = 80 - uri = url[2] - if url[4]: - uri += '?%s' % url[4] - http = True - argi += 2 - -if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': - framed = True - argi += 1 - -if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl': - ssl = True - argi += 1 - -cmd = sys.argv[argi] -args = sys.argv[argi+1:] - -if http: - transport = THttpClient.THttpClient(host, port, uri) -else: - socket = TSSLSocket.TSSLSocket(host, port, validate=False) if ssl else TSocket.TSocket(host, port) - if framed: - transport = TTransport.TFramedTransport(socket) - else: - transport = TTransport.TBufferedTransport(socket) -protocol = TBinaryProtocol.TBinaryProtocol(transport) -client = ThriftHiveMetastore.Client(protocol) -transport.open() - -if cmd == 'getMetaConf': - if len(args) != 1: - print('getMetaConf requires 1 args') - sys.exit(1) - pp.pprint(client.getMetaConf(args[0],)) - -elif cmd == 'setMetaConf': - if len(args) != 2: - print('setMetaConf requires 2 args') - sys.exit(1) - pp.pprint(client.setMetaConf(args[0],args[1],)) - -elif cmd == 'create_database': - if len(args) != 1: - print('create_database requires 1 args') - sys.exit(1) - pp.pprint(client.create_database(eval(args[0]),)) - -elif cmd == 'get_database': - if len(args) != 1: - print('get_database requires 1 args') - sys.exit(1) - pp.pprint(client.get_database(args[0],)) - -elif cmd == 'drop_database': - if len(args) != 3: - print('drop_database requires 3 args') - sys.exit(1) - pp.pprint(client.drop_database(args[0],eval(args[1]),eval(args[2]),)) - -elif cmd == 'get_databases': - if len(args) != 1: - print('get_databases requires 1 args') - sys.exit(1) - pp.pprint(client.get_databases(args[0],)) - -elif cmd == 'get_all_databases': - if len(args) != 0: - print('get_all_databases requires 0 args') - sys.exit(1) - pp.pprint(client.get_all_databases()) - -elif cmd == 'alter_database': - if len(args) != 2: - print('alter_database requires 2 args') - sys.exit(1) - pp.pprint(client.alter_database(args[0],eval(args[1]),)) - -elif cmd == 'get_type': - if len(args) != 1: - print('get_type requires 1 args') - sys.exit(1) - pp.pprint(client.get_type(args[0],)) - -elif cmd == 'create_type': - if len(args) != 1: - print('create_type requires 1 args') - sys.exit(1) - pp.pprint(client.create_type(eval(args[0]),)) - -elif cmd == 'drop_type': - if len(args) != 1: - print('drop_type requires 1 args') - sys.exit(1) - pp.pprint(client.drop_type(args[0],)) - -elif cmd == 'get_type_all': - if len(args) != 1: - print('get_type_all requires 1 args') - sys.exit(1) - pp.pprint(client.get_type_all(args[0],)) - -elif cmd == 'get_fields': - if len(args) != 2: - print('get_fields requires 2 args') - sys.exit(1) - pp.pprint(client.get_fields(args[0],args[1],)) - -elif cmd == 'get_fields_with_environment_context': - if len(args) != 3: - print('get_fields_with_environment_context requires 3 args') - sys.exit(1) - pp.pprint(client.get_fields_with_environment_context(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_schema': - if len(args) != 2: - print('get_schema requires 2 args') - sys.exit(1) - pp.pprint(client.get_schema(args[0],args[1],)) - -elif cmd == 'get_schema_with_environment_context': - if len(args) != 3: - print('get_schema_with_environment_context requires 3 args') - sys.exit(1) - pp.pprint(client.get_schema_with_environment_context(args[0],args[1],eval(args[2]),)) - -elif cmd == 'create_table': - if len(args) != 1: - print('create_table requires 1 args') - sys.exit(1) - pp.pprint(client.create_table(eval(args[0]),)) - -elif cmd == 'create_table_with_environment_context': - if len(args) != 2: - print('create_table_with_environment_context requires 2 args') - sys.exit(1) - pp.pprint(client.create_table_with_environment_context(eval(args[0]),eval(args[1]),)) - -elif cmd == 'create_table_with_constraints': - if len(args) != 5: - print('create_table_with_constraints requires 5 args') - sys.exit(1) - pp.pprint(client.create_table_with_constraints(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) - -elif cmd == 'drop_constraint': - if len(args) != 1: - print('drop_constraint requires 1 args') - sys.exit(1) - pp.pprint(client.drop_constraint(eval(args[0]),)) - -elif cmd == 'add_primary_key': - if len(args) != 1: - print('add_primary_key requires 1 args') - sys.exit(1) - pp.pprint(client.add_primary_key(eval(args[0]),)) - -elif cmd == 'add_foreign_key': - if len(args) != 1: - print('add_foreign_key requires 1 args') - sys.exit(1) - pp.pprint(client.add_foreign_key(eval(args[0]),)) - -elif cmd == 'add_unique_constraint': - if len(args) != 1: - print('add_unique_constraint requires 1 args') - sys.exit(1) - pp.pprint(client.add_unique_constraint(eval(args[0]),)) - -elif cmd == 'add_not_null_constraint': - if len(args) != 1: - print('add_not_null_constraint requires 1 args') - sys.exit(1) - pp.pprint(client.add_not_null_constraint(eval(args[0]),)) - -elif cmd == 'drop_table': - if len(args) != 3: - print('drop_table requires 3 args') - sys.exit(1) - pp.pprint(client.drop_table(args[0],args[1],eval(args[2]),)) - -elif cmd == 'drop_table_with_environment_context': - if len(args) != 4: - print('drop_table_with_environment_context requires 4 args') - sys.exit(1) - pp.pprint(client.drop_table_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'truncate_table': - if len(args) != 3: - print('truncate_table requires 3 args') - sys.exit(1) - pp.pprint(client.truncate_table(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_tables': - if len(args) != 2: - print('get_tables requires 2 args') - sys.exit(1) - pp.pprint(client.get_tables(args[0],args[1],)) - -elif cmd == 'get_tables_by_type': - if len(args) != 3: - print('get_tables_by_type requires 3 args') - sys.exit(1) - pp.pprint(client.get_tables_by_type(args[0],args[1],args[2],)) - -elif cmd == 'get_table_meta': - if len(args) != 3: - print('get_table_meta requires 3 args') - sys.exit(1) - pp.pprint(client.get_table_meta(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_all_tables': - if len(args) != 1: - print('get_all_tables requires 1 args') - sys.exit(1) - pp.pprint(client.get_all_tables(args[0],)) - -elif cmd == 'get_table': - if len(args) != 2: - print('get_table requires 2 args') - sys.exit(1) - pp.pprint(client.get_table(args[0],args[1],)) - -elif cmd == 'get_table_objects_by_name': - if len(args) != 2: - print('get_table_objects_by_name requires 2 args') - sys.exit(1) - pp.pprint(client.get_table_objects_by_name(args[0],eval(args[1]),)) - -elif cmd == 'get_table_req': - if len(args) != 1: - print('get_table_req requires 1 args') - sys.exit(1) - pp.pprint(client.get_table_req(eval(args[0]),)) - -elif cmd == 'get_table_objects_by_name_req': - if len(args) != 1: - print('get_table_objects_by_name_req requires 1 args') - sys.exit(1) - pp.pprint(client.get_table_objects_by_name_req(eval(args[0]),)) - -elif cmd == 'get_table_names_by_filter': - if len(args) != 3: - print('get_table_names_by_filter requires 3 args') - sys.exit(1) - pp.pprint(client.get_table_names_by_filter(args[0],args[1],eval(args[2]),)) - -elif cmd == 'alter_table': - if len(args) != 3: - print('alter_table requires 3 args') - sys.exit(1) - pp.pprint(client.alter_table(args[0],args[1],eval(args[2]),)) - -elif cmd == 'alter_table_with_environment_context': - if len(args) != 4: - print('alter_table_with_environment_context requires 4 args') - sys.exit(1) - pp.pprint(client.alter_table_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'alter_table_with_cascade': - if len(args) != 4: - print('alter_table_with_cascade requires 4 args') - sys.exit(1) - pp.pprint(client.alter_table_with_cascade(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'add_partition': - if len(args) != 1: - print('add_partition requires 1 args') - sys.exit(1) - pp.pprint(client.add_partition(eval(args[0]),)) - -elif cmd == 'add_partition_with_environment_context': - if len(args) != 2: - print('add_partition_with_environment_context requires 2 args') - sys.exit(1) - pp.pprint(client.add_partition_with_environment_context(eval(args[0]),eval(args[1]),)) - -elif cmd == 'add_partitions': - if len(args) != 1: - print('add_partitions requires 1 args') - sys.exit(1) - pp.pprint(client.add_partitions(eval(args[0]),)) - -elif cmd == 'add_partitions_pspec': - if len(args) != 1: - print('add_partitions_pspec requires 1 args') - sys.exit(1) - pp.pprint(client.add_partitions_pspec(eval(args[0]),)) - -elif cmd == 'append_partition': - if len(args) != 3: - print('append_partition requires 3 args') - sys.exit(1) - pp.pprint(client.append_partition(args[0],args[1],eval(args[2]),)) - -elif cmd == 'add_partitions_req': - if len(args) != 1: - print('add_partitions_req requires 1 args') - sys.exit(1) - pp.pprint(client.add_partitions_req(eval(args[0]),)) - -elif cmd == 'append_partition_with_environment_context': - if len(args) != 4: - print('append_partition_with_environment_context requires 4 args') - sys.exit(1) - pp.pprint(client.append_partition_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'append_partition_by_name': - if len(args) != 3: - print('append_partition_by_name requires 3 args') - sys.exit(1) - pp.pprint(client.append_partition_by_name(args[0],args[1],args[2],)) - -elif cmd == 'append_partition_by_name_with_environment_context': - if len(args) != 4: - print('append_partition_by_name_with_environment_context requires 4 args') - sys.exit(1) - pp.pprint(client.append_partition_by_name_with_environment_context(args[0],args[1],args[2],eval(args[3]),)) - -elif cmd == 'drop_partition': - if len(args) != 4: - print('drop_partition requires 4 args') - sys.exit(1) - pp.pprint(client.drop_partition(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'drop_partition_with_environment_context': - if len(args) != 5: - print('drop_partition_with_environment_context requires 5 args') - sys.exit(1) - pp.pprint(client.drop_partition_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),eval(args[4]),)) - -elif cmd == 'drop_partition_by_name': - if len(args) != 4: - print('drop_partition_by_name requires 4 args') - sys.exit(1) - pp.pprint(client.drop_partition_by_name(args[0],args[1],args[2],eval(args[3]),)) - -elif cmd == 'drop_partition_by_name_with_environment_context': - if len(args) != 5: - print('drop_partition_by_name_with_environment_context requires 5 args') - sys.exit(1) - pp.pprint(client.drop_partition_by_name_with_environment_context(args[0],args[1],args[2],eval(args[3]),eval(args[4]),)) - -elif cmd == 'drop_partitions_req': - if len(args) != 1: - print('drop_partitions_req requires 1 args') - sys.exit(1) - pp.pprint(client.drop_partitions_req(eval(args[0]),)) - -elif cmd == 'get_partition': - if len(args) != 3: - print('get_partition requires 3 args') - sys.exit(1) - pp.pprint(client.get_partition(args[0],args[1],eval(args[2]),)) - -elif cmd == 'exchange_partition': - if len(args) != 5: - print('exchange_partition requires 5 args') - sys.exit(1) - pp.pprint(client.exchange_partition(eval(args[0]),args[1],args[2],args[3],args[4],)) - -elif cmd == 'exchange_partitions': - if len(args) != 5: - print('exchange_partitions requires 5 args') - sys.exit(1) - pp.pprint(client.exchange_partitions(eval(args[0]),args[1],args[2],args[3],args[4],)) - -elif cmd == 'get_partition_with_auth': - if len(args) != 5: - print('get_partition_with_auth requires 5 args') - sys.exit(1) - pp.pprint(client.get_partition_with_auth(args[0],args[1],eval(args[2]),args[3],eval(args[4]),)) - -elif cmd == 'get_partition_by_name': - if len(args) != 3: - print('get_partition_by_name requires 3 args') - sys.exit(1) - pp.pprint(client.get_partition_by_name(args[0],args[1],args[2],)) - -elif cmd == 'get_partitions': - if len(args) != 3: - print('get_partitions requires 3 args') - sys.exit(1) - pp.pprint(client.get_partitions(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_partitions_with_auth': - if len(args) != 5: - print('get_partitions_with_auth requires 5 args') - sys.exit(1) - pp.pprint(client.get_partitions_with_auth(args[0],args[1],eval(args[2]),args[3],eval(args[4]),)) - -elif cmd == 'get_partitions_pspec': - if len(args) != 3: - print('get_partitions_pspec requires 3 args') - sys.exit(1) - pp.pprint(client.get_partitions_pspec(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_partition_names': - if len(args) != 3: - print('get_partition_names requires 3 args') - sys.exit(1) - pp.pprint(client.get_partition_names(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_partitions_ps': - if len(args) != 4: - print('get_partitions_ps requires 4 args') - sys.exit(1) - pp.pprint(client.get_partitions_ps(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'get_partitions_ps_with_auth': - if len(args) != 6: - print('get_partitions_ps_with_auth requires 6 args') - sys.exit(1) - pp.pprint(client.get_partitions_ps_with_auth(args[0],args[1],eval(args[2]),eval(args[3]),args[4],eval(args[5]),)) - -elif cmd == 'get_partition_names_ps': - if len(args) != 4: - print('get_partition_names_ps requires 4 args') - sys.exit(1) - pp.pprint(client.get_partition_names_ps(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'get_partitions_by_filter': - if len(args) != 4: - print('get_partitions_by_filter requires 4 args') - sys.exit(1) - pp.pprint(client.get_partitions_by_filter(args[0],args[1],args[2],eval(args[3]),)) - -elif cmd == 'get_part_specs_by_filter': - if len(args) != 4: - print('get_part_specs_by_filter requires 4 args') - sys.exit(1) - pp.pprint(client.get_part_specs_by_filter(args[0],args[1],args[2],eval(args[3]),)) - -elif cmd == 'get_partitions_by_expr': - if len(args) != 1: - print('get_partitions_by_expr requires 1 args') - sys.exit(1) - pp.pprint(client.get_partitions_by_expr(eval(args[0]),)) - -elif cmd == 'get_num_partitions_by_filter': - if len(args) != 3: - print('get_num_partitions_by_filter requires 3 args') - sys.exit(1) - pp.pprint(client.get_num_partitions_by_filter(args[0],args[1],args[2],)) - -elif cmd == 'get_partitions_by_names': - if len(args) != 3: - print('get_partitions_by_names requires 3 args') - sys.exit(1) - pp.pprint(client.get_partitions_by_names(args[0],args[1],eval(args[2]),)) - -elif cmd == 'alter_partition': - if len(args) != 3: - print('alter_partition requires 3 args') - sys.exit(1) - pp.pprint(client.alter_partition(args[0],args[1],eval(args[2]),)) - -elif cmd == 'alter_partitions': - if len(args) != 3: - print('alter_partitions requires 3 args') - sys.exit(1) - pp.pprint(client.alter_partitions(args[0],args[1],eval(args[2]),)) - -elif cmd == 'alter_partitions_with_environment_context': - if len(args) != 4: - print('alter_partitions_with_environment_context requires 4 args') - sys.exit(1) - pp.pprint(client.alter_partitions_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'alter_partition_with_environment_context': - if len(args) != 4: - print('alter_partition_with_environment_context requires 4 args') - sys.exit(1) - pp.pprint(client.alter_partition_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'rename_partition': - if len(args) != 4: - print('rename_partition requires 4 args') - sys.exit(1) - pp.pprint(client.rename_partition(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'partition_name_has_valid_characters': - if len(args) != 2: - print('partition_name_has_valid_characters requires 2 args') - sys.exit(1) - pp.pprint(client.partition_name_has_valid_characters(eval(args[0]),eval(args[1]),)) - -elif cmd == 'get_config_value': - if len(args) != 2: - print('get_config_value requires 2 args') - sys.exit(1) - pp.pprint(client.get_config_value(args[0],args[1],)) - -elif cmd == 'partition_name_to_vals': - if len(args) != 1: - print('partition_name_to_vals requires 1 args') - sys.exit(1) - pp.pprint(client.partition_name_to_vals(args[0],)) - -elif cmd == 'partition_name_to_spec': - if len(args) != 1: - print('partition_name_to_spec requires 1 args') - sys.exit(1) - pp.pprint(client.partition_name_to_spec(args[0],)) - -elif cmd == 'markPartitionForEvent': - if len(args) != 4: - print('markPartitionForEvent requires 4 args') - sys.exit(1) - pp.pprint(client.markPartitionForEvent(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'isPartitionMarkedForEvent': - if len(args) != 4: - print('isPartitionMarkedForEvent requires 4 args') - sys.exit(1) - pp.pprint(client.isPartitionMarkedForEvent(args[0],args[1],eval(args[2]),eval(args[3]),)) - -elif cmd == 'add_index': - if len(args) != 2: - print('add_index requires 2 args') - sys.exit(1) - pp.pprint(client.add_index(eval(args[0]),eval(args[1]),)) - -elif cmd == 'alter_index': - if len(args) != 4: - print('alter_index requires 4 args') - sys.exit(1) - pp.pprint(client.alter_index(args[0],args[1],args[2],eval(args[3]),)) - -elif cmd == 'drop_index_by_name': - if len(args) != 4: - print('drop_index_by_name requires 4 args') - sys.exit(1) - pp.pprint(client.drop_index_by_name(args[0],args[1],args[2],eval(args[3]),)) - -elif cmd == 'get_index_by_name': - if len(args) != 3: - print('get_index_by_name requires 3 args') - sys.exit(1) - pp.pprint(client.get_index_by_name(args[0],args[1],args[2],)) - -elif cmd == 'get_indexes': - if len(args) != 3: - print('get_indexes requires 3 args') - sys.exit(1) - pp.pprint(client.get_indexes(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_index_names': - if len(args) != 3: - print('get_index_names requires 3 args') - sys.exit(1) - pp.pprint(client.get_index_names(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_primary_keys': - if len(args) != 1: - print('get_primary_keys requires 1 args') - sys.exit(1) - pp.pprint(client.get_primary_keys(eval(args[0]),)) - -elif cmd == 'get_foreign_keys': - if len(args) != 1: - print('get_foreign_keys requires 1 args') - sys.exit(1) - pp.pprint(client.get_foreign_keys(eval(args[0]),)) - -elif cmd == 'get_unique_constraints': - if len(args) != 1: - print('get_unique_constraints requires 1 args') - sys.exit(1) - pp.pprint(client.get_unique_constraints(eval(args[0]),)) - -elif cmd == 'get_not_null_constraints': - if len(args) != 1: - print('get_not_null_constraints requires 1 args') - sys.exit(1) - pp.pprint(client.get_not_null_constraints(eval(args[0]),)) - -elif cmd == 'update_table_column_statistics': - if len(args) != 1: - print('update_table_column_statistics requires 1 args') - sys.exit(1) - pp.pprint(client.update_table_column_statistics(eval(args[0]),)) - -elif cmd == 'update_partition_column_statistics': - if len(args) != 1: - print('update_partition_column_statistics requires 1 args') - sys.exit(1) - pp.pprint(client.update_partition_column_statistics(eval(args[0]),)) - -elif cmd == 'get_table_column_statistics': - if len(args) != 3: - print('get_table_column_statistics requires 3 args') - sys.exit(1) - pp.pprint(client.get_table_column_statistics(args[0],args[1],args[2],)) - -elif cmd == 'get_partition_column_statistics': - if len(args) != 4: - print('get_partition_column_statistics requires 4 args') - sys.exit(1) - pp.pprint(client.get_partition_column_statistics(args[0],args[1],args[2],args[3],)) - -elif cmd == 'get_table_statistics_req': - if len(args) != 1: - print('get_table_statistics_req requires 1 args') - sys.exit(1) - pp.pprint(client.get_table_statistics_req(eval(args[0]),)) - -elif cmd == 'get_partitions_statistics_req': - if len(args) != 1: - print('get_partitions_statistics_req requires 1 args') - sys.exit(1) - pp.pprint(client.get_partitions_statistics_req(eval(args[0]),)) - -elif cmd == 'get_aggr_stats_for': - if len(args) != 1: - print('get_aggr_stats_for requires 1 args') - sys.exit(1) - pp.pprint(client.get_aggr_stats_for(eval(args[0]),)) - -elif cmd == 'set_aggr_stats_for': - if len(args) != 1: - print('set_aggr_stats_for requires 1 args') - sys.exit(1) - pp.pprint(client.set_aggr_stats_for(eval(args[0]),)) - -elif cmd == 'delete_partition_column_statistics': - if len(args) != 4: - print('delete_partition_column_statistics requires 4 args') - sys.exit(1) - pp.pprint(client.delete_partition_column_statistics(args[0],args[1],args[2],args[3],)) - -elif cmd == 'delete_table_column_statistics': - if len(args) != 3: - print('delete_table_column_statistics requires 3 args') - sys.exit(1) - pp.pprint(client.delete_table_column_statistics(args[0],args[1],args[2],)) - -elif cmd == 'create_function': - if len(args) != 1: - print('create_function requires 1 args') - sys.exit(1) - pp.pprint(client.create_function(eval(args[0]),)) - -elif cmd == 'drop_function': - if len(args) != 2: - print('drop_function requires 2 args') - sys.exit(1) - pp.pprint(client.drop_function(args[0],args[1],)) - -elif cmd == 'alter_function': - if len(args) != 3: - print('alter_function requires 3 args') - sys.exit(1) - pp.pprint(client.alter_function(args[0],args[1],eval(args[2]),)) - -elif cmd == 'get_functions': - if len(args) != 2: - print('get_functions requires 2 args') - sys.exit(1) - pp.pprint(client.get_functions(args[0],args[1],)) - -elif cmd == 'get_function': - if len(args) != 2: - print('get_function requires 2 args') - sys.exit(1) - pp.pprint(client.get_function(args[0],args[1],)) - -elif cmd == 'get_all_functions': - if len(args) != 0: - print('get_all_functions requires 0 args') - sys.exit(1) - pp.pprint(client.get_all_functions()) - -elif cmd == 'create_role': - if len(args) != 1: - print('create_role requires 1 args') - sys.exit(1) - pp.pprint(client.create_role(eval(args[0]),)) - -elif cmd == 'drop_role': - if len(args) != 1: - print('drop_role requires 1 args') - sys.exit(1) - pp.pprint(client.drop_role(args[0],)) - -elif cmd == 'get_role_names': - if len(args) != 0: - print('get_role_names requires 0 args') - sys.exit(1) - pp.pprint(client.get_role_names()) - -elif cmd == 'grant_role': - if len(args) != 6: - print('grant_role requires 6 args') - sys.exit(1) - pp.pprint(client.grant_role(args[0],args[1],eval(args[2]),args[3],eval(args[4]),eval(args[5]),)) - -elif cmd == 'revoke_role': - if len(args) != 3: - print('revoke_role requires 3 args') - sys.exit(1) - pp.pprint(client.revoke_role(args[0],args[1],eval(args[2]),)) - -elif cmd == 'list_roles': - if len(args) != 2: - print('list_roles requires 2 args') - sys.exit(1) - pp.pprint(client.list_roles(args[0],eval(args[1]),)) - -elif cmd == 'grant_revoke_role': - if len(args) != 1: - print('grant_revoke_role requires 1 args') - sys.exit(1) - pp.pprint(client.grant_revoke_role(eval(args[0]),)) - -elif cmd == 'get_principals_in_role': - if len(args) != 1: - print('get_principals_in_role requires 1 args') - sys.exit(1) - pp.pprint(client.get_principals_in_role(eval(args[0]),)) - -elif cmd == 'get_role_grants_for_principal': - if len(args) != 1: - print('get_role_grants_for_principal requires 1 args') - sys.exit(1) - pp.pprint(client.get_role_grants_for_principal(eval(args[0]),)) - -elif cmd == 'get_privilege_set': - if len(args) != 3: - print('get_privilege_set requires 3 args') - sys.exit(1) - pp.pprint(client.get_privilege_set(eval(args[0]),args[1],eval(args[2]),)) - -elif cmd == 'list_privileges': - if len(args) != 3: - print('list_privileges requires 3 args') - sys.exit(1) - pp.pprint(client.list_privileges(args[0],eval(args[1]),eval(args[2]),)) - -elif cmd == 'grant_privileges': - if len(args) != 1: - print('grant_privileges requires 1 args') - sys.exit(1) - pp.pprint(client.grant_privileges(eval(args[0]),)) - -elif cmd == 'revoke_privileges': - if len(args) != 1: - print('revoke_privileges requires 1 args') - sys.exit(1) - pp.pprint(client.revoke_privileges(eval(args[0]),)) - -elif cmd == 'grant_revoke_privileges': - if len(args) != 1: - print('grant_revoke_privileges requires 1 args') - sys.exit(1) - pp.pprint(client.grant_revoke_privileges(eval(args[0]),)) - -elif cmd == 'set_ugi': - if len(args) != 2: - print('set_ugi requires 2 args') - sys.exit(1) - pp.pprint(client.set_ugi(args[0],eval(args[1]),)) - -elif cmd == 'get_delegation_token': - if len(args) != 2: - print('get_delegation_token requires 2 args') - sys.exit(1) - pp.pprint(client.get_delegation_token(args[0],args[1],)) - -elif cmd == 'renew_delegation_token': - if len(args) != 1: - print('renew_delegation_token requires 1 args') - sys.exit(1) - pp.pprint(client.renew_delegation_token(args[0],)) - -elif cmd == 'cancel_delegation_token': - if len(args) != 1: - print('cancel_delegation_token requires 1 args') - sys.exit(1) - pp.pprint(client.cancel_delegation_token(args[0],)) - -elif cmd == 'add_token': - if len(args) != 2: - print('add_token requires 2 args') - sys.exit(1) - pp.pprint(client.add_token(args[0],args[1],)) - -elif cmd == 'remove_token': - if len(args) != 1: - print('remove_token requires 1 args') - sys.exit(1) - pp.pprint(client.remove_token(args[0],)) - -elif cmd == 'get_token': - if len(args) != 1: - print('get_token requires 1 args') - sys.exit(1) - pp.pprint(client.get_token(args[0],)) - -elif cmd == 'get_all_token_identifiers': - if len(args) != 0: - print('get_all_token_identifiers requires 0 args') - sys.exit(1) - pp.pprint(client.get_all_token_identifiers()) - -elif cmd == 'add_master_key': - if len(args) != 1: - print('add_master_key requires 1 args') - sys.exit(1) - pp.pprint(client.add_master_key(args[0],)) - -elif cmd == 'update_master_key': - if len(args) != 2: - print('update_master_key requires 2 args') - sys.exit(1) - pp.pprint(client.update_master_key(eval(args[0]),args[1],)) - -elif cmd == 'remove_master_key': - if len(args) != 1: - print('remove_master_key requires 1 args') - sys.exit(1) - pp.pprint(client.remove_master_key(eval(args[0]),)) - -elif cmd == 'get_master_keys': - if len(args) != 0: - print('get_master_keys requires 0 args') - sys.exit(1) - pp.pprint(client.get_master_keys()) - -elif cmd == 'get_open_txns': - if len(args) != 0: - print('get_open_txns requires 0 args') - sys.exit(1) - pp.pprint(client.get_open_txns()) - -elif cmd == 'get_open_txns_info': - if len(args) != 0: - print('get_open_txns_info requires 0 args') - sys.exit(1) - pp.pprint(client.get_open_txns_info()) - -elif cmd == 'open_txns': - if len(args) != 1: - print('open_txns requires 1 args') - sys.exit(1) - pp.pprint(client.open_txns(eval(args[0]),)) - -elif cmd == 'abort_txn': - if len(args) != 1: - print('abort_txn requires 1 args') - sys.exit(1) - pp.pprint(client.abort_txn(eval(args[0]),)) - -elif cmd == 'abort_txns': - if len(args) != 1: - print('abort_txns requires 1 args') - sys.exit(1) - pp.pprint(client.abort_txns(eval(args[0]),)) - -elif cmd == 'commit_txn': - if len(args) != 1: - print('commit_txn requires 1 args') - sys.exit(1) - pp.pprint(client.commit_txn(eval(args[0]),)) - -elif cmd == 'lock': - if len(args) != 1: - print('lock requires 1 args') - sys.exit(1) - pp.pprint(client.lock(eval(args[0]),)) - -elif cmd == 'check_lock': - if len(args) != 1: - print('check_lock requires 1 args') - sys.exit(1) - pp.pprint(client.check_lock(eval(args[0]),)) - -elif cmd == 'unlock': - if len(args) != 1: - print('unlock requires 1 args') - sys.exit(1) - pp.pprint(client.unlock(eval(args[0]),)) - -elif cmd == 'show_locks': - if len(args) != 1: - print('show_locks requires 1 args') - sys.exit(1) - pp.pprint(client.show_locks(eval(args[0]),)) - -elif cmd == 'heartbeat': - if len(args) != 1: - print('heartbeat requires 1 args') - sys.exit(1) - pp.pprint(client.heartbeat(eval(args[0]),)) - -elif cmd == 'heartbeat_txn_range': - if len(args) != 1: - print('heartbeat_txn_range requires 1 args') - sys.exit(1) - pp.pprint(client.heartbeat_txn_range(eval(args[0]),)) - -elif cmd == 'compact': - if len(args) != 1: - print('compact requires 1 args') - sys.exit(1) - pp.pprint(client.compact(eval(args[0]),)) - -elif cmd == 'compact2': - if len(args) != 1: - print('compact2 requires 1 args') - sys.exit(1) - pp.pprint(client.compact2(eval(args[0]),)) - -elif cmd == 'show_compact': - if len(args) != 1: - print('show_compact requires 1 args') - sys.exit(1) - pp.pprint(client.show_compact(eval(args[0]),)) - -elif cmd == 'add_dynamic_partitions': - if len(args) != 1: - print('add_dynamic_partitions requires 1 args') - sys.exit(1) - pp.pprint(client.add_dynamic_partitions(eval(args[0]),)) - -elif cmd == 'get_next_notification': - if len(args) != 1: - print('get_next_notification requires 1 args') - sys.exit(1) - pp.pprint(client.get_next_notification(eval(args[0]),)) - -elif cmd == 'get_current_notificationEventId': - if len(args) != 0: - print('get_current_notificationEventId requires 0 args') - sys.exit(1) - pp.pprint(client.get_current_notificationEventId()) - -elif cmd == 'fire_listener_event': - if len(args) != 1: - print('fire_listener_event requires 1 args') - sys.exit(1) - pp.pprint(client.fire_listener_event(eval(args[0]),)) - -elif cmd == 'flushCache': - if len(args) != 0: - print('flushCache requires 0 args') - sys.exit(1) - pp.pprint(client.flushCache()) - -elif cmd == 'cm_recycle': - if len(args) != 1: - print('cm_recycle requires 1 args') - sys.exit(1) - pp.pprint(client.cm_recycle(eval(args[0]),)) - -elif cmd == 'get_file_metadata_by_expr': - if len(args) != 1: - print('get_file_metadata_by_expr requires 1 args') - sys.exit(1) - pp.pprint(client.get_file_metadata_by_expr(eval(args[0]),)) - -elif cmd == 'get_file_metadata': - if len(args) != 1: - print('get_file_metadata requires 1 args') - sys.exit(1) - pp.pprint(client.get_file_metadata(eval(args[0]),)) - -elif cmd == 'put_file_metadata': - if len(args) != 1: - print('put_file_metadata requires 1 args') - sys.exit(1) - pp.pprint(client.put_file_metadata(eval(args[0]),)) - -elif cmd == 'clear_file_metadata': - if len(args) != 1: - print('clear_file_metadata requires 1 args') - sys.exit(1) - pp.pprint(client.clear_file_metadata(eval(args[0]),)) - -elif cmd == 'cache_file_metadata': - if len(args) != 1: - print('cache_file_metadata requires 1 args') - sys.exit(1) - pp.pprint(client.cache_file_metadata(eval(args[0]),)) - -elif cmd == 'get_metastore_db_uuid': - if len(args) != 0: - print('get_metastore_db_uuid requires 0 args') - sys.exit(1) - pp.pprint(client.get_metastore_db_uuid()) - -elif cmd == 'getName': - if len(args) != 0: - print('getName requires 0 args') - sys.exit(1) - pp.pprint(client.getName()) - -elif cmd == 'getVersion': - if len(args) != 0: - print('getVersion requires 0 args') - sys.exit(1) - pp.pprint(client.getVersion()) - -elif cmd == 'getStatus': - if len(args) != 0: - print('getStatus requires 0 args') - sys.exit(1) - pp.pprint(client.getStatus()) - -elif cmd == 'getStatusDetails': - if len(args) != 0: - print('getStatusDetails requires 0 args') - sys.exit(1) - pp.pprint(client.getStatusDetails()) - -elif cmd == 'getCounters': - if len(args) != 0: - print('getCounters requires 0 args') - sys.exit(1) - pp.pprint(client.getCounters()) - -elif cmd == 'getCounter': - if len(args) != 1: - print('getCounter requires 1 args') - sys.exit(1) - pp.pprint(client.getCounter(args[0],)) - -elif cmd == 'setOption': - if len(args) != 2: - print('setOption requires 2 args') - sys.exit(1) - pp.pprint(client.setOption(args[0],args[1],)) - -elif cmd == 'getOption': - if len(args) != 1: - print('getOption requires 1 args') - sys.exit(1) - pp.pprint(client.getOption(args[0],)) - -elif cmd == 'getOptions': - if len(args) != 0: - print('getOptions requires 0 args') - sys.exit(1) - pp.pprint(client.getOptions()) - -elif cmd == 'getCpuProfile': - if len(args) != 1: - print('getCpuProfile requires 1 args') - sys.exit(1) - pp.pprint(client.getCpuProfile(eval(args[0]),)) - -elif cmd == 'aliveSince': - if len(args) != 0: - print('aliveSince requires 0 args') - sys.exit(1) - pp.pprint(client.aliveSince()) - -elif cmd == 'reinitialize': - if len(args) != 0: - print('reinitialize requires 0 args') - sys.exit(1) - pp.pprint(client.reinitialize()) - -elif cmd == 'shutdown': - if len(args) != 0: - print('shutdown requires 0 args') - sys.exit(1) - pp.pprint(client.shutdown()) - -else: - print('Unrecognized method %s' % cmd) - sys.exit(1) - -transport.close() diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py deleted file mode 100644 index 2ecf555..0000000 --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py +++ /dev/null @@ -1,38112 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.9.3) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -from thrift.Thrift import TType, TMessageType, TException, TApplicationException -import fb303.FacebookService -import logging -from ttypes import * -from thrift.Thrift import TProcessor -from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol, TProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class Iface(fb303.FacebookService.Iface): - """ - This interface is live. - """ - def getMetaConf(self, key): - """ - Parameters: - - key - """ - pass - - def setMetaConf(self, key, value): - """ - Parameters: - - key - - value - """ - pass - - def create_database(self, database): - """ - Parameters: - - database - """ - pass - - def get_database(self, name): - """ - Parameters: - - name - """ - pass - - def drop_database(self, name, deleteData, cascade): - """ - Parameters: - - name - - deleteData - - cascade - """ - pass - - def get_databases(self, pattern): - """ - Parameters: - - pattern - """ - pass - - def get_all_databases(self): - pass - - def alter_database(self, dbname, db): - """ - Parameters: - - dbname - - db - """ - pass - - def get_type(self, name): - """ - Parameters: - - name - """ - pass - - def create_type(self, type): - """ - Parameters: - - type - """ - pass - - def drop_type(self, type): - """ - Parameters: - - type - """ - pass - - def get_type_all(self, name): - """ - Parameters: - - name - """ - pass - - def get_fields(self, db_name, table_name): - """ - Parameters: - - db_name - - table_name - """ - pass - - def get_fields_with_environment_context(self, db_name, table_name, environment_context): - """ - Parameters: - - db_name - - table_name - - environment_context - """ - pass - - def get_schema(self, db_name, table_name): - """ - Parameters: - - db_name - - table_name - """ - pass - - def get_schema_with_environment_context(self, db_name, table_name, environment_context): - """ - Parameters: - - db_name - - table_name - - environment_context - """ - pass - - def create_table(self, tbl): - """ - Parameters: - - tbl - """ - pass - - def create_table_with_environment_context(self, tbl, environment_context): - """ - Parameters: - - tbl - - environment_context - """ - pass - - def create_table_with_constraints(self, tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints): - """ - Parameters: - - tbl - - primaryKeys - - foreignKeys - - uniqueConstraints - - notNullConstraints - """ - pass - - def drop_constraint(self, req): - """ - Parameters: - - req - """ - pass - - def add_primary_key(self, req): - """ - Parameters: - - req - """ - pass - - def add_foreign_key(self, req): - """ - Parameters: - - req - """ - pass - - def add_unique_constraint(self, req): - """ - Parameters: - - req - """ - pass - - def add_not_null_constraint(self, req): - """ - Parameters: - - req - """ - pass - - def drop_table(self, dbname, name, deleteData): - """ - Parameters: - - dbname - - name - - deleteData - """ - pass - - def drop_table_with_environment_context(self, dbname, name, deleteData, environment_context): - """ - Parameters: - - dbname - - name - - deleteData - - environment_context - """ - pass - - def truncate_table(self, dbName, tableName, partNames): - """ - Parameters: - - dbName - - tableName - - partNames - """ - pass - - def get_tables(self, db_name, pattern): - """ - Parameters: - - db_name - - pattern - """ - pass - - def get_tables_by_type(self, db_name, pattern, tableType): - """ - Parameters: - - db_name - - pattern - - tableType - """ - pass - - def get_table_meta(self, db_patterns, tbl_patterns, tbl_types): - """ - Parameters: - - db_patterns - - tbl_patterns - - tbl_types - """ - pass - - def get_all_tables(self, db_name): - """ - Parameters: - - db_name - """ - pass - - def get_table(self, dbname, tbl_name): - """ - Parameters: - - dbname - - tbl_name - """ - pass - - def get_table_objects_by_name(self, dbname, tbl_names): - """ - Parameters: - - dbname - - tbl_names - """ - pass - - def get_table_req(self, req): - """ - Parameters: - - req - """ - pass - - def get_table_objects_by_name_req(self, req): - """ - Parameters: - - req - """ - pass - - def get_table_names_by_filter(self, dbname, filter, max_tables): - """ - Parameters: - - dbname - - filter - - max_tables - """ - pass - - def alter_table(self, dbname, tbl_name, new_tbl): - """ - Parameters: - - dbname - - tbl_name - - new_tbl - """ - pass - - def alter_table_with_environment_context(self, dbname, tbl_name, new_tbl, environment_context): - """ - Parameters: - - dbname - - tbl_name - - new_tbl - - environment_context - """ - pass - - def alter_table_with_cascade(self, dbname, tbl_name, new_tbl, cascade): - """ - Parameters: - - dbname - - tbl_name - - new_tbl - - cascade - """ - pass - - def add_partition(self, new_part): - """ - Parameters: - - new_part - """ - pass - - def add_partition_with_environment_context(self, new_part, environment_context): - """ - Parameters: - - new_part - - environment_context - """ - pass - - def add_partitions(self, new_parts): - """ - Parameters: - - new_parts - """ - pass - - def add_partitions_pspec(self, new_parts): - """ - Parameters: - - new_parts - """ - pass - - def append_partition(self, db_name, tbl_name, part_vals): - """ - Parameters: - - db_name - - tbl_name - - part_vals - """ - pass - - def add_partitions_req(self, request): - """ - Parameters: - - request - """ - pass - - def append_partition_with_environment_context(self, db_name, tbl_name, part_vals, environment_context): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - environment_context - """ - pass - - def append_partition_by_name(self, db_name, tbl_name, part_name): - """ - Parameters: - - db_name - - tbl_name - - part_name - """ - pass - - def append_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, environment_context): - """ - Parameters: - - db_name - - tbl_name - - part_name - - environment_context - """ - pass - - def drop_partition(self, db_name, tbl_name, part_vals, deleteData): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - deleteData - """ - pass - - def drop_partition_with_environment_context(self, db_name, tbl_name, part_vals, deleteData, environment_context): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - deleteData - - environment_context - """ - pass - - def drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): - """ - Parameters: - - db_name - - tbl_name - - part_name - - deleteData - """ - pass - - def drop_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, deleteData, environment_context): - """ - Parameters: - - db_name - - tbl_name - - part_name - - deleteData - - environment_context - """ - pass - - def drop_partitions_req(self, req): - """ - Parameters: - - req - """ - pass - - def get_partition(self, db_name, tbl_name, part_vals): - """ - Parameters: - - db_name - - tbl_name - - part_vals - """ - pass - - def exchange_partition(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): - """ - Parameters: - - partitionSpecs - - source_db - - source_table_name - - dest_db - - dest_table_name - """ - pass - - def exchange_partitions(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): - """ - Parameters: - - partitionSpecs - - source_db - - source_table_name - - dest_db - - dest_table_name - """ - pass - - def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - user_name - - group_names - """ - pass - - def get_partition_by_name(self, db_name, tbl_name, part_name): - """ - Parameters: - - db_name - - tbl_name - - part_name - """ - pass - - def get_partitions(self, db_name, tbl_name, max_parts): - """ - Parameters: - - db_name - - tbl_name - - max_parts - """ - pass - - def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): - """ - Parameters: - - db_name - - tbl_name - - max_parts - - user_name - - group_names - """ - pass - - def get_partitions_pspec(self, db_name, tbl_name, max_parts): - """ - Parameters: - - db_name - - tbl_name - - max_parts - """ - pass - - def get_partition_names(self, db_name, tbl_name, max_parts): - """ - Parameters: - - db_name - - tbl_name - - max_parts - """ - pass - - def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - max_parts - """ - pass - - def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - max_parts - - user_name - - group_names - """ - pass - - def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - max_parts - """ - pass - - def get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): - """ - Parameters: - - db_name - - tbl_name - - filter - - max_parts - """ - pass - - def get_part_specs_by_filter(self, db_name, tbl_name, filter, max_parts): - """ - Parameters: - - db_name - - tbl_name - - filter - - max_parts - """ - pass - - def get_partitions_by_expr(self, req): - """ - Parameters: - - req - """ - pass - - def get_num_partitions_by_filter(self, db_name, tbl_name, filter): - """ - Parameters: - - db_name - - tbl_name - - filter - """ - pass - - def get_partitions_by_names(self, db_name, tbl_name, names): - """ - Parameters: - - db_name - - tbl_name - - names - """ - pass - - def alter_partition(self, db_name, tbl_name, new_part): - """ - Parameters: - - db_name - - tbl_name - - new_part - """ - pass - - def alter_partitions(self, db_name, tbl_name, new_parts): - """ - Parameters: - - db_name - - tbl_name - - new_parts - """ - pass - - def alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context): - """ - Parameters: - - db_name - - tbl_name - - new_parts - - environment_context - """ - pass - - def alter_partition_with_environment_context(self, db_name, tbl_name, new_part, environment_context): - """ - Parameters: - - db_name - - tbl_name - - new_part - - environment_context - """ - pass - - def rename_partition(self, db_name, tbl_name, part_vals, new_part): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - new_part - """ - pass - - def partition_name_has_valid_characters(self, part_vals, throw_exception): - """ - Parameters: - - part_vals - - throw_exception - """ - pass - - def get_config_value(self, name, defaultValue): - """ - Parameters: - - name - - defaultValue - """ - pass - - def partition_name_to_vals(self, part_name): - """ - Parameters: - - part_name - """ - pass - - def partition_name_to_spec(self, part_name): - """ - Parameters: - - part_name - """ - pass - - def markPartitionForEvent(self, db_name, tbl_name, part_vals, eventType): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - eventType - """ - pass - - def isPartitionMarkedForEvent(self, db_name, tbl_name, part_vals, eventType): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - eventType - """ - pass - - def add_index(self, new_index, index_table): - """ - Parameters: - - new_index - - index_table - """ - pass - - def alter_index(self, dbname, base_tbl_name, idx_name, new_idx): - """ - Parameters: - - dbname - - base_tbl_name - - idx_name - - new_idx - """ - pass - - def drop_index_by_name(self, db_name, tbl_name, index_name, deleteData): - """ - Parameters: - - db_name - - tbl_name - - index_name - - deleteData - """ - pass - - def get_index_by_name(self, db_name, tbl_name, index_name): - """ - Parameters: - - db_name - - tbl_name - - index_name - """ - pass - - def get_indexes(self, db_name, tbl_name, max_indexes): - """ - Parameters: - - db_name - - tbl_name - - max_indexes - """ - pass - - def get_index_names(self, db_name, tbl_name, max_indexes): - """ - Parameters: - - db_name - - tbl_name - - max_indexes - """ - pass - - def get_primary_keys(self, request): - """ - Parameters: - - request - """ - pass - - def get_foreign_keys(self, request): - """ - Parameters: - - request - """ - pass - - def get_unique_constraints(self, request): - """ - Parameters: - - request - """ - pass - - def get_not_null_constraints(self, request): - """ - Parameters: - - request - """ - pass - - def update_table_column_statistics(self, stats_obj): - """ - Parameters: - - stats_obj - """ - pass - - def update_partition_column_statistics(self, stats_obj): - """ - Parameters: - - stats_obj - """ - pass - - def get_table_column_statistics(self, db_name, tbl_name, col_name): - """ - Parameters: - - db_name - - tbl_name - - col_name - """ - pass - - def get_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): - """ - Parameters: - - db_name - - tbl_name - - part_name - - col_name - """ - pass - - def get_table_statistics_req(self, request): - """ - Parameters: - - request - """ - pass - - def get_partitions_statistics_req(self, request): - """ - Parameters: - - request - """ - pass - - def get_aggr_stats_for(self, request): - """ - Parameters: - - request - """ - pass - - def set_aggr_stats_for(self, request): - """ - Parameters: - - request - """ - pass - - def delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): - """ - Parameters: - - db_name - - tbl_name - - part_name - - col_name - """ - pass - - def delete_table_column_statistics(self, db_name, tbl_name, col_name): - """ - Parameters: - - db_name - - tbl_name - - col_name - """ - pass - - def create_function(self, func): - """ - Parameters: - - func - """ - pass - - def drop_function(self, dbName, funcName): - """ - Parameters: - - dbName - - funcName - """ - pass - - def alter_function(self, dbName, funcName, newFunc): - """ - Parameters: - - dbName - - funcName - - newFunc - """ - pass - - def get_functions(self, dbName, pattern): - """ - Parameters: - - dbName - - pattern - """ - pass - - def get_function(self, dbName, funcName): - """ - Parameters: - - dbName - - funcName - """ - pass - - def get_all_functions(self): - pass - - def create_role(self, role): - """ - Parameters: - - role - """ - pass - - def drop_role(self, role_name): - """ - Parameters: - - role_name - """ - pass - - def get_role_names(self): - pass - - def grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option): - """ - Parameters: - - role_name - - principal_name - - principal_type - - grantor - - grantorType - - grant_option - """ - pass - - def revoke_role(self, role_name, principal_name, principal_type): - """ - Parameters: - - role_name - - principal_name - - principal_type - """ - pass - - def list_roles(self, principal_name, principal_type): - """ - Parameters: - - principal_name - - principal_type - """ - pass - - def grant_revoke_role(self, request): - """ - Parameters: - - request - """ - pass - - def get_principals_in_role(self, request): - """ - Parameters: - - request - """ - pass - - def get_role_grants_for_principal(self, request): - """ - Parameters: - - request - """ - pass - - def get_privilege_set(self, hiveObject, user_name, group_names): - """ - Parameters: - - hiveObject - - user_name - - group_names - """ - pass - - def list_privileges(self, principal_name, principal_type, hiveObject): - """ - Parameters: - - principal_name - - principal_type - - hiveObject - """ - pass - - def grant_privileges(self, privileges): - """ - Parameters: - - privileges - """ - pass - - def revoke_privileges(self, privileges): - """ - Parameters: - - privileges - """ - pass - - def grant_revoke_privileges(self, request): - """ - Parameters: - - request - """ - pass - - def set_ugi(self, user_name, group_names): - """ - Parameters: - - user_name - - group_names - """ - pass - - def get_delegation_token(self, token_owner, renewer_kerberos_principal_name): - """ - Parameters: - - token_owner - - renewer_kerberos_principal_name - """ - pass - - def renew_delegation_token(self, token_str_form): - """ - Parameters: - - token_str_form - """ - pass - - def cancel_delegation_token(self, token_str_form): - """ - Parameters: - - token_str_form - """ - pass - - def add_token(self, token_identifier, delegation_token): - """ - Parameters: - - token_identifier - - delegation_token - """ - pass - - def remove_token(self, token_identifier): - """ - Parameters: - - token_identifier - """ - pass - - def get_token(self, token_identifier): - """ - Parameters: - - token_identifier - """ - pass - - def get_all_token_identifiers(self): - pass - - def add_master_key(self, key): - """ - Parameters: - - key - """ - pass - - def update_master_key(self, seq_number, key): - """ - Parameters: - - seq_number - - key - """ - pass - - def remove_master_key(self, key_seq): - """ - Parameters: - - key_seq - """ - pass - - def get_master_keys(self): - pass - - def get_open_txns(self): - pass - - def get_open_txns_info(self): - pass - - def open_txns(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def abort_txn(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def abort_txns(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def commit_txn(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def lock(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def check_lock(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def unlock(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def show_locks(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def heartbeat(self, ids): - """ - Parameters: - - ids - """ - pass - - def heartbeat_txn_range(self, txns): - """ - Parameters: - - txns - """ - pass - - def compact(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def compact2(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def show_compact(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def add_dynamic_partitions(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def get_next_notification(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def get_current_notificationEventId(self): - pass - - def fire_listener_event(self, rqst): - """ - Parameters: - - rqst - """ - pass - - def flushCache(self): - pass - - def cm_recycle(self, request): - """ - Parameters: - - request - """ - pass - - def get_file_metadata_by_expr(self, req): - """ - Parameters: - - req - """ - pass - - def get_file_metadata(self, req): - """ - Parameters: - - req - """ - pass - - def put_file_metadata(self, req): - """ - Parameters: - - req - """ - pass - - def clear_file_metadata(self, req): - """ - Parameters: - - req - """ - pass - - def cache_file_metadata(self, req): - """ - Parameters: - - req - """ - pass - - def get_metastore_db_uuid(self): - pass - - -class Client(fb303.FacebookService.Client, Iface): - """ - This interface is live. - """ - def __init__(self, iprot, oprot=None): - fb303.FacebookService.Client.__init__(self, iprot, oprot) - - def getMetaConf(self, key): - """ - Parameters: - - key - """ - self.send_getMetaConf(key) - return self.recv_getMetaConf() - - def send_getMetaConf(self, key): - self._oprot.writeMessageBegin('getMetaConf', TMessageType.CALL, self._seqid) - args = getMetaConf_args() - args.key = key - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getMetaConf(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getMetaConf_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "getMetaConf failed: unknown result") - - def setMetaConf(self, key, value): - """ - Parameters: - - key - - value - """ - self.send_setMetaConf(key, value) - self.recv_setMetaConf() - - def send_setMetaConf(self, key, value): - self._oprot.writeMessageBegin('setMetaConf', TMessageType.CALL, self._seqid) - args = setMetaConf_args() - args.key = key - args.value = value - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_setMetaConf(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = setMetaConf_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - return - - def create_database(self, database): - """ - Parameters: - - database - """ - self.send_create_database(database) - self.recv_create_database() - - def send_create_database(self, database): - self._oprot.writeMessageBegin('create_database', TMessageType.CALL, self._seqid) - args = create_database_args() - args.database = database - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_create_database(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = create_database_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - return - - def get_database(self, name): - """ - Parameters: - - name - """ - self.send_get_database(name) - return self.recv_get_database() - - def send_get_database(self, name): - self._oprot.writeMessageBegin('get_database', TMessageType.CALL, self._seqid) - args = get_database_args() - args.name = name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_database(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_database_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_database failed: unknown result") - - def drop_database(self, name, deleteData, cascade): - """ - Parameters: - - name - - deleteData - - cascade - """ - self.send_drop_database(name, deleteData, cascade) - self.recv_drop_database() - - def send_drop_database(self, name, deleteData, cascade): - self._oprot.writeMessageBegin('drop_database', TMessageType.CALL, self._seqid) - args = drop_database_args() - args.name = name - args.deleteData = deleteData - args.cascade = cascade - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_database(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_database_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - return - - def get_databases(self, pattern): - """ - Parameters: - - pattern - """ - self.send_get_databases(pattern) - return self.recv_get_databases() - - def send_get_databases(self, pattern): - self._oprot.writeMessageBegin('get_databases', TMessageType.CALL, self._seqid) - args = get_databases_args() - args.pattern = pattern - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_databases(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_databases_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_databases failed: unknown result") - - def get_all_databases(self): - self.send_get_all_databases() - return self.recv_get_all_databases() - - def send_get_all_databases(self): - self._oprot.writeMessageBegin('get_all_databases', TMessageType.CALL, self._seqid) - args = get_all_databases_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_all_databases(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_all_databases_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result") - - def alter_database(self, dbname, db): - """ - Parameters: - - dbname - - db - """ - self.send_alter_database(dbname, db) - self.recv_alter_database() - - def send_alter_database(self, dbname, db): - self._oprot.writeMessageBegin('alter_database', TMessageType.CALL, self._seqid) - args = alter_database_args() - args.dbname = dbname - args.db = db - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_database(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = alter_database_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def get_type(self, name): - """ - Parameters: - - name - """ - self.send_get_type(name) - return self.recv_get_type() - - def send_get_type(self, name): - self._oprot.writeMessageBegin('get_type', TMessageType.CALL, self._seqid) - args = get_type_args() - args.name = name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_type(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_type_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type failed: unknown result") - - def create_type(self, type): - """ - Parameters: - - type - """ - self.send_create_type(type) - return self.recv_create_type() - - def send_create_type(self, type): - self._oprot.writeMessageBegin('create_type', TMessageType.CALL, self._seqid) - args = create_type_args() - args.type = type - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_create_type(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = create_type_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_type failed: unknown result") - - def drop_type(self, type): - """ - Parameters: - - type - """ - self.send_drop_type(type) - return self.recv_drop_type() - - def send_drop_type(self, type): - self._oprot.writeMessageBegin('drop_type', TMessageType.CALL, self._seqid) - args = drop_type_args() - args.type = type - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_type(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_type_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_type failed: unknown result") - - def get_type_all(self, name): - """ - Parameters: - - name - """ - self.send_get_type_all(name) - return self.recv_get_type_all() - - def send_get_type_all(self, name): - self._oprot.writeMessageBegin('get_type_all', TMessageType.CALL, self._seqid) - args = get_type_all_args() - args.name = name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_type_all(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_type_all_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type_all failed: unknown result") - - def get_fields(self, db_name, table_name): - """ - Parameters: - - db_name - - table_name - """ - self.send_get_fields(db_name, table_name) - return self.recv_get_fields() - - def send_get_fields(self, db_name, table_name): - self._oprot.writeMessageBegin('get_fields', TMessageType.CALL, self._seqid) - args = get_fields_args() - args.db_name = db_name - args.table_name = table_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_fields(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_fields_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_fields failed: unknown result") - - def get_fields_with_environment_context(self, db_name, table_name, environment_context): - """ - Parameters: - - db_name - - table_name - - environment_context - """ - self.send_get_fields_with_environment_context(db_name, table_name, environment_context) - return self.recv_get_fields_with_environment_context() - - def send_get_fields_with_environment_context(self, db_name, table_name, environment_context): - self._oprot.writeMessageBegin('get_fields_with_environment_context', TMessageType.CALL, self._seqid) - args = get_fields_with_environment_context_args() - args.db_name = db_name - args.table_name = table_name - args.environment_context = environment_context - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_fields_with_environment_context(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_fields_with_environment_context_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_fields_with_environment_context failed: unknown result") - - def get_schema(self, db_name, table_name): - """ - Parameters: - - db_name - - table_name - """ - self.send_get_schema(db_name, table_name) - return self.recv_get_schema() - - def send_get_schema(self, db_name, table_name): - self._oprot.writeMessageBegin('get_schema', TMessageType.CALL, self._seqid) - args = get_schema_args() - args.db_name = db_name - args.table_name = table_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_schema(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_schema_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema failed: unknown result") - - def get_schema_with_environment_context(self, db_name, table_name, environment_context): - """ - Parameters: - - db_name - - table_name - - environment_context - """ - self.send_get_schema_with_environment_context(db_name, table_name, environment_context) - return self.recv_get_schema_with_environment_context() - - def send_get_schema_with_environment_context(self, db_name, table_name, environment_context): - self._oprot.writeMessageBegin('get_schema_with_environment_context', TMessageType.CALL, self._seqid) - args = get_schema_with_environment_context_args() - args.db_name = db_name - args.table_name = table_name - args.environment_context = environment_context - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_schema_with_environment_context(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_schema_with_environment_context_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema_with_environment_context failed: unknown result") - - def create_table(self, tbl): - """ - Parameters: - - tbl - """ - self.send_create_table(tbl) - self.recv_create_table() - - def send_create_table(self, tbl): - self._oprot.writeMessageBegin('create_table', TMessageType.CALL, self._seqid) - args = create_table_args() - args.tbl = tbl - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_create_table(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = create_table_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - return - - def create_table_with_environment_context(self, tbl, environment_context): - """ - Parameters: - - tbl - - environment_context - """ - self.send_create_table_with_environment_context(tbl, environment_context) - self.recv_create_table_with_environment_context() - - def send_create_table_with_environment_context(self, tbl, environment_context): - self._oprot.writeMessageBegin('create_table_with_environment_context', TMessageType.CALL, self._seqid) - args = create_table_with_environment_context_args() - args.tbl = tbl - args.environment_context = environment_context - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_create_table_with_environment_context(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = create_table_with_environment_context_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - return - - def create_table_with_constraints(self, tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints): - """ - Parameters: - - tbl - - primaryKeys - - foreignKeys - - uniqueConstraints - - notNullConstraints - """ - self.send_create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints) - self.recv_create_table_with_constraints() - - def send_create_table_with_constraints(self, tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints): - self._oprot.writeMessageBegin('create_table_with_constraints', TMessageType.CALL, self._seqid) - args = create_table_with_constraints_args() - args.tbl = tbl - args.primaryKeys = primaryKeys - args.foreignKeys = foreignKeys - args.uniqueConstraints = uniqueConstraints - args.notNullConstraints = notNullConstraints - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_create_table_with_constraints(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = create_table_with_constraints_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - return - - def drop_constraint(self, req): - """ - Parameters: - - req - """ - self.send_drop_constraint(req) - self.recv_drop_constraint() - - def send_drop_constraint(self, req): - self._oprot.writeMessageBegin('drop_constraint', TMessageType.CALL, self._seqid) - args = drop_constraint_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_constraint(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_constraint_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o3 is not None: - raise result.o3 - return - - def add_primary_key(self, req): - """ - Parameters: - - req - """ - self.send_add_primary_key(req) - self.recv_add_primary_key() - - def send_add_primary_key(self, req): - self._oprot.writeMessageBegin('add_primary_key', TMessageType.CALL, self._seqid) - args = add_primary_key_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_primary_key(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_primary_key_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def add_foreign_key(self, req): - """ - Parameters: - - req - """ - self.send_add_foreign_key(req) - self.recv_add_foreign_key() - - def send_add_foreign_key(self, req): - self._oprot.writeMessageBegin('add_foreign_key', TMessageType.CALL, self._seqid) - args = add_foreign_key_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_foreign_key(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_foreign_key_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def add_unique_constraint(self, req): - """ - Parameters: - - req - """ - self.send_add_unique_constraint(req) - self.recv_add_unique_constraint() - - def send_add_unique_constraint(self, req): - self._oprot.writeMessageBegin('add_unique_constraint', TMessageType.CALL, self._seqid) - args = add_unique_constraint_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_unique_constraint(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_unique_constraint_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def add_not_null_constraint(self, req): - """ - Parameters: - - req - """ - self.send_add_not_null_constraint(req) - self.recv_add_not_null_constraint() - - def send_add_not_null_constraint(self, req): - self._oprot.writeMessageBegin('add_not_null_constraint', TMessageType.CALL, self._seqid) - args = add_not_null_constraint_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_not_null_constraint(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_not_null_constraint_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def drop_table(self, dbname, name, deleteData): - """ - Parameters: - - dbname - - name - - deleteData - """ - self.send_drop_table(dbname, name, deleteData) - self.recv_drop_table() - - def send_drop_table(self, dbname, name, deleteData): - self._oprot.writeMessageBegin('drop_table', TMessageType.CALL, self._seqid) - args = drop_table_args() - args.dbname = dbname - args.name = name - args.deleteData = deleteData - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_table(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_table_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o3 is not None: - raise result.o3 - return - - def drop_table_with_environment_context(self, dbname, name, deleteData, environment_context): - """ - Parameters: - - dbname - - name - - deleteData - - environment_context - """ - self.send_drop_table_with_environment_context(dbname, name, deleteData, environment_context) - self.recv_drop_table_with_environment_context() - - def send_drop_table_with_environment_context(self, dbname, name, deleteData, environment_context): - self._oprot.writeMessageBegin('drop_table_with_environment_context', TMessageType.CALL, self._seqid) - args = drop_table_with_environment_context_args() - args.dbname = dbname - args.name = name - args.deleteData = deleteData - args.environment_context = environment_context - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_table_with_environment_context(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_table_with_environment_context_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o3 is not None: - raise result.o3 - return - - def truncate_table(self, dbName, tableName, partNames): - """ - Parameters: - - dbName - - tableName - - partNames - """ - self.send_truncate_table(dbName, tableName, partNames) - self.recv_truncate_table() - - def send_truncate_table(self, dbName, tableName, partNames): - self._oprot.writeMessageBegin('truncate_table', TMessageType.CALL, self._seqid) - args = truncate_table_args() - args.dbName = dbName - args.tableName = tableName - args.partNames = partNames - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_truncate_table(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = truncate_table_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - return - - def get_tables(self, db_name, pattern): - """ - Parameters: - - db_name - - pattern - """ - self.send_get_tables(db_name, pattern) - return self.recv_get_tables() - - def send_get_tables(self, db_name, pattern): - self._oprot.writeMessageBegin('get_tables', TMessageType.CALL, self._seqid) - args = get_tables_args() - args.db_name = db_name - args.pattern = pattern - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_tables(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_tables_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables failed: unknown result") - - def get_tables_by_type(self, db_name, pattern, tableType): - """ - Parameters: - - db_name - - pattern - - tableType - """ - self.send_get_tables_by_type(db_name, pattern, tableType) - return self.recv_get_tables_by_type() - - def send_get_tables_by_type(self, db_name, pattern, tableType): - self._oprot.writeMessageBegin('get_tables_by_type', TMessageType.CALL, self._seqid) - args = get_tables_by_type_args() - args.db_name = db_name - args.pattern = pattern - args.tableType = tableType - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_tables_by_type(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_tables_by_type_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables_by_type failed: unknown result") - - def get_table_meta(self, db_patterns, tbl_patterns, tbl_types): - """ - Parameters: - - db_patterns - - tbl_patterns - - tbl_types - """ - self.send_get_table_meta(db_patterns, tbl_patterns, tbl_types) - return self.recv_get_table_meta() - - def send_get_table_meta(self, db_patterns, tbl_patterns, tbl_types): - self._oprot.writeMessageBegin('get_table_meta', TMessageType.CALL, self._seqid) - args = get_table_meta_args() - args.db_patterns = db_patterns - args.tbl_patterns = tbl_patterns - args.tbl_types = tbl_types - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_table_meta(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_table_meta_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_meta failed: unknown result") - - def get_all_tables(self, db_name): - """ - Parameters: - - db_name - """ - self.send_get_all_tables(db_name) - return self.recv_get_all_tables() - - def send_get_all_tables(self, db_name): - self._oprot.writeMessageBegin('get_all_tables', TMessageType.CALL, self._seqid) - args = get_all_tables_args() - args.db_name = db_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_all_tables(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_all_tables_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result") - - def get_table(self, dbname, tbl_name): - """ - Parameters: - - dbname - - tbl_name - """ - self.send_get_table(dbname, tbl_name) - return self.recv_get_table() - - def send_get_table(self, dbname, tbl_name): - self._oprot.writeMessageBegin('get_table', TMessageType.CALL, self._seqid) - args = get_table_args() - args.dbname = dbname - args.tbl_name = tbl_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_table(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_table_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table failed: unknown result") - - def get_table_objects_by_name(self, dbname, tbl_names): - """ - Parameters: - - dbname - - tbl_names - """ - self.send_get_table_objects_by_name(dbname, tbl_names) - return self.recv_get_table_objects_by_name() - - def send_get_table_objects_by_name(self, dbname, tbl_names): - self._oprot.writeMessageBegin('get_table_objects_by_name', TMessageType.CALL, self._seqid) - args = get_table_objects_by_name_args() - args.dbname = dbname - args.tbl_names = tbl_names - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_table_objects_by_name(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_table_objects_by_name_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_objects_by_name failed: unknown result") - - def get_table_req(self, req): - """ - Parameters: - - req - """ - self.send_get_table_req(req) - return self.recv_get_table_req() - - def send_get_table_req(self, req): - self._oprot.writeMessageBegin('get_table_req', TMessageType.CALL, self._seqid) - args = get_table_req_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_table_req(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_table_req_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_req failed: unknown result") - - def get_table_objects_by_name_req(self, req): - """ - Parameters: - - req - """ - self.send_get_table_objects_by_name_req(req) - return self.recv_get_table_objects_by_name_req() - - def send_get_table_objects_by_name_req(self, req): - self._oprot.writeMessageBegin('get_table_objects_by_name_req', TMessageType.CALL, self._seqid) - args = get_table_objects_by_name_req_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_table_objects_by_name_req(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_table_objects_by_name_req_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_objects_by_name_req failed: unknown result") - - def get_table_names_by_filter(self, dbname, filter, max_tables): - """ - Parameters: - - dbname - - filter - - max_tables - """ - self.send_get_table_names_by_filter(dbname, filter, max_tables) - return self.recv_get_table_names_by_filter() - - def send_get_table_names_by_filter(self, dbname, filter, max_tables): - self._oprot.writeMessageBegin('get_table_names_by_filter', TMessageType.CALL, self._seqid) - args = get_table_names_by_filter_args() - args.dbname = dbname - args.filter = filter - args.max_tables = max_tables - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_table_names_by_filter(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_table_names_by_filter_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_names_by_filter failed: unknown result") - - def alter_table(self, dbname, tbl_name, new_tbl): - """ - Parameters: - - dbname - - tbl_name - - new_tbl - """ - self.send_alter_table(dbname, tbl_name, new_tbl) - self.recv_alter_table() - - def send_alter_table(self, dbname, tbl_name, new_tbl): - self._oprot.writeMessageBegin('alter_table', TMessageType.CALL, self._seqid) - args = alter_table_args() - args.dbname = dbname - args.tbl_name = tbl_name - args.new_tbl = new_tbl - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_table(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = alter_table_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def alter_table_with_environment_context(self, dbname, tbl_name, new_tbl, environment_context): - """ - Parameters: - - dbname - - tbl_name - - new_tbl - - environment_context - """ - self.send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context) - self.recv_alter_table_with_environment_context() - - def send_alter_table_with_environment_context(self, dbname, tbl_name, new_tbl, environment_context): - self._oprot.writeMessageBegin('alter_table_with_environment_context', TMessageType.CALL, self._seqid) - args = alter_table_with_environment_context_args() - args.dbname = dbname - args.tbl_name = tbl_name - args.new_tbl = new_tbl - args.environment_context = environment_context - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_table_with_environment_context(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = alter_table_with_environment_context_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def alter_table_with_cascade(self, dbname, tbl_name, new_tbl, cascade): - """ - Parameters: - - dbname - - tbl_name - - new_tbl - - cascade - """ - self.send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade) - self.recv_alter_table_with_cascade() - - def send_alter_table_with_cascade(self, dbname, tbl_name, new_tbl, cascade): - self._oprot.writeMessageBegin('alter_table_with_cascade', TMessageType.CALL, self._seqid) - args = alter_table_with_cascade_args() - args.dbname = dbname - args.tbl_name = tbl_name - args.new_tbl = new_tbl - args.cascade = cascade - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_table_with_cascade(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = alter_table_with_cascade_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def add_partition(self, new_part): - """ - Parameters: - - new_part - """ - self.send_add_partition(new_part) - return self.recv_add_partition() - - def send_add_partition(self, new_part): - self._oprot.writeMessageBegin('add_partition', TMessageType.CALL, self._seqid) - args = add_partition_args() - args.new_part = new_part - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_partition(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_partition_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partition failed: unknown result") - - def add_partition_with_environment_context(self, new_part, environment_context): - """ - Parameters: - - new_part - - environment_context - """ - self.send_add_partition_with_environment_context(new_part, environment_context) - return self.recv_add_partition_with_environment_context() - - def send_add_partition_with_environment_context(self, new_part, environment_context): - self._oprot.writeMessageBegin('add_partition_with_environment_context', TMessageType.CALL, self._seqid) - args = add_partition_with_environment_context_args() - args.new_part = new_part - args.environment_context = environment_context - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_partition_with_environment_context(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_partition_with_environment_context_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partition_with_environment_context failed: unknown result") - - def add_partitions(self, new_parts): - """ - Parameters: - - new_parts - """ - self.send_add_partitions(new_parts) - return self.recv_add_partitions() - - def send_add_partitions(self, new_parts): - self._oprot.writeMessageBegin('add_partitions', TMessageType.CALL, self._seqid) - args = add_partitions_args() - args.new_parts = new_parts - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_partitions(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_partitions_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partitions failed: unknown result") - - def add_partitions_pspec(self, new_parts): - """ - Parameters: - - new_parts - """ - self.send_add_partitions_pspec(new_parts) - return self.recv_add_partitions_pspec() - - def send_add_partitions_pspec(self, new_parts): - self._oprot.writeMessageBegin('add_partitions_pspec', TMessageType.CALL, self._seqid) - args = add_partitions_pspec_args() - args.new_parts = new_parts - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_partitions_pspec(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_partitions_pspec_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partitions_pspec failed: unknown result") - - def append_partition(self, db_name, tbl_name, part_vals): - """ - Parameters: - - db_name - - tbl_name - - part_vals - """ - self.send_append_partition(db_name, tbl_name, part_vals) - return self.recv_append_partition() - - def send_append_partition(self, db_name, tbl_name, part_vals): - self._oprot.writeMessageBegin('append_partition', TMessageType.CALL, self._seqid) - args = append_partition_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_vals = part_vals - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_append_partition(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = append_partition_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition failed: unknown result") - - def add_partitions_req(self, request): - """ - Parameters: - - request - """ - self.send_add_partitions_req(request) - return self.recv_add_partitions_req() - - def send_add_partitions_req(self, request): - self._oprot.writeMessageBegin('add_partitions_req', TMessageType.CALL, self._seqid) - args = add_partitions_req_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_partitions_req(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_partitions_req_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partitions_req failed: unknown result") - - def append_partition_with_environment_context(self, db_name, tbl_name, part_vals, environment_context): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - environment_context - """ - self.send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context) - return self.recv_append_partition_with_environment_context() - - def send_append_partition_with_environment_context(self, db_name, tbl_name, part_vals, environment_context): - self._oprot.writeMessageBegin('append_partition_with_environment_context', TMessageType.CALL, self._seqid) - args = append_partition_with_environment_context_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_vals = part_vals - args.environment_context = environment_context - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_append_partition_with_environment_context(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = append_partition_with_environment_context_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition_with_environment_context failed: unknown result") - - def append_partition_by_name(self, db_name, tbl_name, part_name): - """ - Parameters: - - db_name - - tbl_name - - part_name - """ - self.send_append_partition_by_name(db_name, tbl_name, part_name) - return self.recv_append_partition_by_name() - - def send_append_partition_by_name(self, db_name, tbl_name, part_name): - self._oprot.writeMessageBegin('append_partition_by_name', TMessageType.CALL, self._seqid) - args = append_partition_by_name_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_name = part_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_append_partition_by_name(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = append_partition_by_name_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition_by_name failed: unknown result") - - def append_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, environment_context): - """ - Parameters: - - db_name - - tbl_name - - part_name - - environment_context - """ - self.send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context) - return self.recv_append_partition_by_name_with_environment_context() - - def send_append_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, environment_context): - self._oprot.writeMessageBegin('append_partition_by_name_with_environment_context', TMessageType.CALL, self._seqid) - args = append_partition_by_name_with_environment_context_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_name = part_name - args.environment_context = environment_context - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_append_partition_by_name_with_environment_context(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = append_partition_by_name_with_environment_context_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition_by_name_with_environment_context failed: unknown result") - - def drop_partition(self, db_name, tbl_name, part_vals, deleteData): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - deleteData - """ - self.send_drop_partition(db_name, tbl_name, part_vals, deleteData) - return self.recv_drop_partition() - - def send_drop_partition(self, db_name, tbl_name, part_vals, deleteData): - self._oprot.writeMessageBegin('drop_partition', TMessageType.CALL, self._seqid) - args = drop_partition_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_vals = part_vals - args.deleteData = deleteData - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_partition(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_partition_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition failed: unknown result") - - def drop_partition_with_environment_context(self, db_name, tbl_name, part_vals, deleteData, environment_context): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - deleteData - - environment_context - """ - self.send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context) - return self.recv_drop_partition_with_environment_context() - - def send_drop_partition_with_environment_context(self, db_name, tbl_name, part_vals, deleteData, environment_context): - self._oprot.writeMessageBegin('drop_partition_with_environment_context', TMessageType.CALL, self._seqid) - args = drop_partition_with_environment_context_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_vals = part_vals - args.deleteData = deleteData - args.environment_context = environment_context - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_partition_with_environment_context(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_partition_with_environment_context_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition_with_environment_context failed: unknown result") - - def drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): - """ - Parameters: - - db_name - - tbl_name - - part_name - - deleteData - """ - self.send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) - return self.recv_drop_partition_by_name() - - def send_drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): - self._oprot.writeMessageBegin('drop_partition_by_name', TMessageType.CALL, self._seqid) - args = drop_partition_by_name_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_name = part_name - args.deleteData = deleteData - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_partition_by_name(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_partition_by_name_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition_by_name failed: unknown result") - - def drop_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, deleteData, environment_context): - """ - Parameters: - - db_name - - tbl_name - - part_name - - deleteData - - environment_context - """ - self.send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context) - return self.recv_drop_partition_by_name_with_environment_context() - - def send_drop_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, deleteData, environment_context): - self._oprot.writeMessageBegin('drop_partition_by_name_with_environment_context', TMessageType.CALL, self._seqid) - args = drop_partition_by_name_with_environment_context_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_name = part_name - args.deleteData = deleteData - args.environment_context = environment_context - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_partition_by_name_with_environment_context(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_partition_by_name_with_environment_context_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition_by_name_with_environment_context failed: unknown result") - - def drop_partitions_req(self, req): - """ - Parameters: - - req - """ - self.send_drop_partitions_req(req) - return self.recv_drop_partitions_req() - - def send_drop_partitions_req(self, req): - self._oprot.writeMessageBegin('drop_partitions_req', TMessageType.CALL, self._seqid) - args = drop_partitions_req_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_partitions_req(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_partitions_req_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partitions_req failed: unknown result") - - def get_partition(self, db_name, tbl_name, part_vals): - """ - Parameters: - - db_name - - tbl_name - - part_vals - """ - self.send_get_partition(db_name, tbl_name, part_vals) - return self.recv_get_partition() - - def send_get_partition(self, db_name, tbl_name, part_vals): - self._oprot.writeMessageBegin('get_partition', TMessageType.CALL, self._seqid) - args = get_partition_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_vals = part_vals - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partition(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partition_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result") - - def exchange_partition(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): - """ - Parameters: - - partitionSpecs - - source_db - - source_table_name - - dest_db - - dest_table_name - """ - self.send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) - return self.recv_exchange_partition() - - def send_exchange_partition(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): - self._oprot.writeMessageBegin('exchange_partition', TMessageType.CALL, self._seqid) - args = exchange_partition_args() - args.partitionSpecs = partitionSpecs - args.source_db = source_db - args.source_table_name = source_table_name - args.dest_db = dest_db - args.dest_table_name = dest_table_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_exchange_partition(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = exchange_partition_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - raise TApplicationException(TApplicationException.MISSING_RESULT, "exchange_partition failed: unknown result") - - def exchange_partitions(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): - """ - Parameters: - - partitionSpecs - - source_db - - source_table_name - - dest_db - - dest_table_name - """ - self.send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) - return self.recv_exchange_partitions() - - def send_exchange_partitions(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): - self._oprot.writeMessageBegin('exchange_partitions', TMessageType.CALL, self._seqid) - args = exchange_partitions_args() - args.partitionSpecs = partitionSpecs - args.source_db = source_db - args.source_table_name = source_table_name - args.dest_db = dest_db - args.dest_table_name = dest_table_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_exchange_partitions(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = exchange_partitions_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - raise TApplicationException(TApplicationException.MISSING_RESULT, "exchange_partitions failed: unknown result") - - def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - user_name - - group_names - """ - self.send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) - return self.recv_get_partition_with_auth() - - def send_get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): - self._oprot.writeMessageBegin('get_partition_with_auth', TMessageType.CALL, self._seqid) - args = 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 - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partition_with_auth(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partition_with_auth_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_with_auth failed: unknown result") - - def get_partition_by_name(self, db_name, tbl_name, part_name): - """ - Parameters: - - db_name - - tbl_name - - part_name - """ - self.send_get_partition_by_name(db_name, tbl_name, part_name) - return self.recv_get_partition_by_name() - - def send_get_partition_by_name(self, db_name, tbl_name, part_name): - self._oprot.writeMessageBegin('get_partition_by_name', TMessageType.CALL, self._seqid) - args = get_partition_by_name_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_name = part_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partition_by_name(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partition_by_name_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_by_name failed: unknown result") - - def get_partitions(self, db_name, tbl_name, max_parts): - """ - Parameters: - - db_name - - tbl_name - - max_parts - """ - self.send_get_partitions(db_name, tbl_name, max_parts) - return self.recv_get_partitions() - - def send_get_partitions(self, db_name, tbl_name, max_parts): - self._oprot.writeMessageBegin('get_partitions', TMessageType.CALL, self._seqid) - args = get_partitions_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.max_parts = max_parts - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partitions(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partitions_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result") - - def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): - """ - Parameters: - - db_name - - tbl_name - - max_parts - - user_name - - group_names - """ - self.send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) - return self.recv_get_partitions_with_auth() - - def send_get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): - self._oprot.writeMessageBegin('get_partitions_with_auth', TMessageType.CALL, self._seqid) - args = 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 - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partitions_with_auth(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partitions_with_auth_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_with_auth failed: unknown result") - - def get_partitions_pspec(self, db_name, tbl_name, max_parts): - """ - Parameters: - - db_name - - tbl_name - - max_parts - """ - self.send_get_partitions_pspec(db_name, tbl_name, max_parts) - return self.recv_get_partitions_pspec() - - def send_get_partitions_pspec(self, db_name, tbl_name, max_parts): - self._oprot.writeMessageBegin('get_partitions_pspec', TMessageType.CALL, self._seqid) - args = get_partitions_pspec_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.max_parts = max_parts - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partitions_pspec(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partitions_pspec_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_pspec failed: unknown result") - - def get_partition_names(self, db_name, tbl_name, max_parts): - """ - Parameters: - - db_name - - tbl_name - - max_parts - """ - self.send_get_partition_names(db_name, tbl_name, max_parts) - return self.recv_get_partition_names() - - def send_get_partition_names(self, db_name, tbl_name, max_parts): - self._oprot.writeMessageBegin('get_partition_names', TMessageType.CALL, self._seqid) - args = get_partition_names_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.max_parts = max_parts - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partition_names(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partition_names_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names failed: unknown result") - - def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - max_parts - """ - self.send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) - return self.recv_get_partitions_ps() - - def send_get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): - self._oprot.writeMessageBegin('get_partitions_ps', TMessageType.CALL, self._seqid) - args = get_partitions_ps_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_vals = part_vals - args.max_parts = max_parts - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partitions_ps(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partitions_ps_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result") - - def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - max_parts - - user_name - - group_names - """ - self.send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) - return self.recv_get_partitions_ps_with_auth() - - def send_get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): - self._oprot.writeMessageBegin('get_partitions_ps_with_auth', TMessageType.CALL, self._seqid) - args = 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 - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partitions_ps_with_auth(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partitions_ps_with_auth_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result") - - def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - max_parts - """ - self.send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) - return self.recv_get_partition_names_ps() - - def send_get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): - self._oprot.writeMessageBegin('get_partition_names_ps', TMessageType.CALL, self._seqid) - args = 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 - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partition_names_ps(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partition_names_ps_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names_ps failed: unknown result") - - def get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): - """ - Parameters: - - db_name - - tbl_name - - filter - - max_parts - """ - self.send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) - return self.recv_get_partitions_by_filter() - - def send_get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): - self._oprot.writeMessageBegin('get_partitions_by_filter', TMessageType.CALL, self._seqid) - args = get_partitions_by_filter_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.filter = filter - args.max_parts = max_parts - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partitions_by_filter(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partitions_by_filter_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_filter failed: unknown result") - - def get_part_specs_by_filter(self, db_name, tbl_name, filter, max_parts): - """ - Parameters: - - db_name - - tbl_name - - filter - - max_parts - """ - self.send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts) - return self.recv_get_part_specs_by_filter() - - def send_get_part_specs_by_filter(self, db_name, tbl_name, filter, max_parts): - self._oprot.writeMessageBegin('get_part_specs_by_filter', TMessageType.CALL, self._seqid) - args = get_part_specs_by_filter_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.filter = filter - args.max_parts = max_parts - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_part_specs_by_filter(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_part_specs_by_filter_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_part_specs_by_filter failed: unknown result") - - def get_partitions_by_expr(self, req): - """ - Parameters: - - req - """ - self.send_get_partitions_by_expr(req) - return self.recv_get_partitions_by_expr() - - def send_get_partitions_by_expr(self, req): - self._oprot.writeMessageBegin('get_partitions_by_expr', TMessageType.CALL, self._seqid) - args = get_partitions_by_expr_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partitions_by_expr(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partitions_by_expr_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_expr failed: unknown result") - - def get_num_partitions_by_filter(self, db_name, tbl_name, filter): - """ - Parameters: - - db_name - - tbl_name - - filter - """ - self.send_get_num_partitions_by_filter(db_name, tbl_name, filter) - return self.recv_get_num_partitions_by_filter() - - def send_get_num_partitions_by_filter(self, db_name, tbl_name, filter): - self._oprot.writeMessageBegin('get_num_partitions_by_filter', TMessageType.CALL, self._seqid) - args = get_num_partitions_by_filter_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.filter = filter - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_num_partitions_by_filter(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_num_partitions_by_filter_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_num_partitions_by_filter failed: unknown result") - - def get_partitions_by_names(self, db_name, tbl_name, names): - """ - Parameters: - - db_name - - tbl_name - - names - """ - self.send_get_partitions_by_names(db_name, tbl_name, names) - return self.recv_get_partitions_by_names() - - def send_get_partitions_by_names(self, db_name, tbl_name, names): - self._oprot.writeMessageBegin('get_partitions_by_names', TMessageType.CALL, self._seqid) - args = get_partitions_by_names_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.names = names - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partitions_by_names(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partitions_by_names_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_names failed: unknown result") - - def alter_partition(self, db_name, tbl_name, new_part): - """ - Parameters: - - db_name - - tbl_name - - new_part - """ - self.send_alter_partition(db_name, tbl_name, new_part) - self.recv_alter_partition() - - def send_alter_partition(self, db_name, tbl_name, new_part): - self._oprot.writeMessageBegin('alter_partition', TMessageType.CALL, self._seqid) - args = alter_partition_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.new_part = new_part - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_partition(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = alter_partition_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def alter_partitions(self, db_name, tbl_name, new_parts): - """ - Parameters: - - db_name - - tbl_name - - new_parts - """ - self.send_alter_partitions(db_name, tbl_name, new_parts) - self.recv_alter_partitions() - - def send_alter_partitions(self, db_name, tbl_name, new_parts): - self._oprot.writeMessageBegin('alter_partitions', TMessageType.CALL, self._seqid) - args = alter_partitions_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.new_parts = new_parts - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_partitions(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = alter_partitions_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context): - """ - Parameters: - - db_name - - tbl_name - - new_parts - - environment_context - """ - self.send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context) - self.recv_alter_partitions_with_environment_context() - - def send_alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context): - self._oprot.writeMessageBegin('alter_partitions_with_environment_context', TMessageType.CALL, self._seqid) - args = alter_partitions_with_environment_context_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.new_parts = new_parts - args.environment_context = environment_context - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_partitions_with_environment_context(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = alter_partitions_with_environment_context_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def alter_partition_with_environment_context(self, db_name, tbl_name, new_part, environment_context): - """ - Parameters: - - db_name - - tbl_name - - new_part - - environment_context - """ - self.send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context) - self.recv_alter_partition_with_environment_context() - - def send_alter_partition_with_environment_context(self, db_name, tbl_name, new_part, environment_context): - self._oprot.writeMessageBegin('alter_partition_with_environment_context', TMessageType.CALL, self._seqid) - args = 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 - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_partition_with_environment_context(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = alter_partition_with_environment_context_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def rename_partition(self, db_name, tbl_name, part_vals, new_part): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - new_part - """ - self.send_rename_partition(db_name, tbl_name, part_vals, new_part) - self.recv_rename_partition() - - def send_rename_partition(self, db_name, tbl_name, part_vals, new_part): - self._oprot.writeMessageBegin('rename_partition', TMessageType.CALL, self._seqid) - args = rename_partition_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_vals = part_vals - args.new_part = new_part - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_rename_partition(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = rename_partition_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def partition_name_has_valid_characters(self, part_vals, throw_exception): - """ - Parameters: - - part_vals - - throw_exception - """ - self.send_partition_name_has_valid_characters(part_vals, throw_exception) - return self.recv_partition_name_has_valid_characters() - - def send_partition_name_has_valid_characters(self, part_vals, throw_exception): - self._oprot.writeMessageBegin('partition_name_has_valid_characters', TMessageType.CALL, self._seqid) - args = partition_name_has_valid_characters_args() - args.part_vals = part_vals - args.throw_exception = throw_exception - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_partition_name_has_valid_characters(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = partition_name_has_valid_characters_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_has_valid_characters failed: unknown result") - - def get_config_value(self, name, defaultValue): - """ - Parameters: - - name - - defaultValue - """ - self.send_get_config_value(name, defaultValue) - return self.recv_get_config_value() - - def send_get_config_value(self, name, defaultValue): - self._oprot.writeMessageBegin('get_config_value', TMessageType.CALL, self._seqid) - args = get_config_value_args() - args.name = name - args.defaultValue = defaultValue - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_config_value(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_config_value_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_config_value failed: unknown result") - - def partition_name_to_vals(self, part_name): - """ - Parameters: - - part_name - """ - self.send_partition_name_to_vals(part_name) - return self.recv_partition_name_to_vals() - - def send_partition_name_to_vals(self, part_name): - self._oprot.writeMessageBegin('partition_name_to_vals', TMessageType.CALL, self._seqid) - args = partition_name_to_vals_args() - args.part_name = part_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_partition_name_to_vals(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = partition_name_to_vals_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_vals failed: unknown result") - - def partition_name_to_spec(self, part_name): - """ - Parameters: - - part_name - """ - self.send_partition_name_to_spec(part_name) - return self.recv_partition_name_to_spec() - - def send_partition_name_to_spec(self, part_name): - self._oprot.writeMessageBegin('partition_name_to_spec', TMessageType.CALL, self._seqid) - args = partition_name_to_spec_args() - args.part_name = part_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_partition_name_to_spec(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = partition_name_to_spec_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_spec failed: unknown result") - - def markPartitionForEvent(self, db_name, tbl_name, part_vals, eventType): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - eventType - """ - self.send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType) - self.recv_markPartitionForEvent() - - def send_markPartitionForEvent(self, db_name, tbl_name, part_vals, eventType): - self._oprot.writeMessageBegin('markPartitionForEvent', TMessageType.CALL, self._seqid) - args = markPartitionForEvent_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_vals = part_vals - args.eventType = eventType - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_markPartitionForEvent(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = markPartitionForEvent_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - if result.o5 is not None: - raise result.o5 - if result.o6 is not None: - raise result.o6 - return - - def isPartitionMarkedForEvent(self, db_name, tbl_name, part_vals, eventType): - """ - Parameters: - - db_name - - tbl_name - - part_vals - - eventType - """ - self.send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType) - return self.recv_isPartitionMarkedForEvent() - - def send_isPartitionMarkedForEvent(self, db_name, tbl_name, part_vals, eventType): - self._oprot.writeMessageBegin('isPartitionMarkedForEvent', TMessageType.CALL, self._seqid) - args = isPartitionMarkedForEvent_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_vals = part_vals - args.eventType = eventType - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_isPartitionMarkedForEvent(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = isPartitionMarkedForEvent_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - if result.o5 is not None: - raise result.o5 - if result.o6 is not None: - raise result.o6 - raise TApplicationException(TApplicationException.MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result") - - def add_index(self, new_index, index_table): - """ - Parameters: - - new_index - - index_table - """ - self.send_add_index(new_index, index_table) - return self.recv_add_index() - - def send_add_index(self, new_index, index_table): - self._oprot.writeMessageBegin('add_index', TMessageType.CALL, self._seqid) - args = add_index_args() - args.new_index = new_index - args.index_table = index_table - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_index(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_index_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_index failed: unknown result") - - def alter_index(self, dbname, base_tbl_name, idx_name, new_idx): - """ - Parameters: - - dbname - - base_tbl_name - - idx_name - - new_idx - """ - self.send_alter_index(dbname, base_tbl_name, idx_name, new_idx) - self.recv_alter_index() - - def send_alter_index(self, dbname, base_tbl_name, idx_name, new_idx): - self._oprot.writeMessageBegin('alter_index', TMessageType.CALL, self._seqid) - args = alter_index_args() - args.dbname = dbname - args.base_tbl_name = base_tbl_name - args.idx_name = idx_name - args.new_idx = new_idx - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_index(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = alter_index_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def drop_index_by_name(self, db_name, tbl_name, index_name, deleteData): - """ - Parameters: - - db_name - - tbl_name - - index_name - - deleteData - """ - self.send_drop_index_by_name(db_name, tbl_name, index_name, deleteData) - return self.recv_drop_index_by_name() - - def send_drop_index_by_name(self, db_name, tbl_name, index_name, deleteData): - self._oprot.writeMessageBegin('drop_index_by_name', TMessageType.CALL, self._seqid) - args = drop_index_by_name_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.index_name = index_name - args.deleteData = deleteData - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_index_by_name(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_index_by_name_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_index_by_name failed: unknown result") - - def get_index_by_name(self, db_name, tbl_name, index_name): - """ - Parameters: - - db_name - - tbl_name - - index_name - """ - self.send_get_index_by_name(db_name, tbl_name, index_name) - return self.recv_get_index_by_name() - - def send_get_index_by_name(self, db_name, tbl_name, index_name): - self._oprot.writeMessageBegin('get_index_by_name', TMessageType.CALL, self._seqid) - args = get_index_by_name_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.index_name = index_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_index_by_name(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_index_by_name_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_by_name failed: unknown result") - - def get_indexes(self, db_name, tbl_name, max_indexes): - """ - Parameters: - - db_name - - tbl_name - - max_indexes - """ - self.send_get_indexes(db_name, tbl_name, max_indexes) - return self.recv_get_indexes() - - def send_get_indexes(self, db_name, tbl_name, max_indexes): - self._oprot.writeMessageBegin('get_indexes', TMessageType.CALL, self._seqid) - args = get_indexes_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.max_indexes = max_indexes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_indexes(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_indexes_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_indexes failed: unknown result") - - def get_index_names(self, db_name, tbl_name, max_indexes): - """ - Parameters: - - db_name - - tbl_name - - max_indexes - """ - self.send_get_index_names(db_name, tbl_name, max_indexes) - return self.recv_get_index_names() - - def send_get_index_names(self, db_name, tbl_name, max_indexes): - self._oprot.writeMessageBegin('get_index_names', TMessageType.CALL, self._seqid) - args = get_index_names_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.max_indexes = max_indexes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_index_names(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_index_names_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result") - - def get_primary_keys(self, request): - """ - Parameters: - - request - """ - self.send_get_primary_keys(request) - return self.recv_get_primary_keys() - - def send_get_primary_keys(self, request): - self._oprot.writeMessageBegin('get_primary_keys', TMessageType.CALL, self._seqid) - args = get_primary_keys_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_primary_keys(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_primary_keys_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_primary_keys failed: unknown result") - - def get_foreign_keys(self, request): - """ - Parameters: - - request - """ - self.send_get_foreign_keys(request) - return self.recv_get_foreign_keys() - - def send_get_foreign_keys(self, request): - self._oprot.writeMessageBegin('get_foreign_keys', TMessageType.CALL, self._seqid) - args = get_foreign_keys_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_foreign_keys(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_foreign_keys_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_foreign_keys failed: unknown result") - - def get_unique_constraints(self, request): - """ - Parameters: - - request - """ - self.send_get_unique_constraints(request) - return self.recv_get_unique_constraints() - - def send_get_unique_constraints(self, request): - self._oprot.writeMessageBegin('get_unique_constraints', TMessageType.CALL, self._seqid) - args = get_unique_constraints_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_unique_constraints(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_unique_constraints_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_unique_constraints failed: unknown result") - - def get_not_null_constraints(self, request): - """ - Parameters: - - request - """ - self.send_get_not_null_constraints(request) - return self.recv_get_not_null_constraints() - - def send_get_not_null_constraints(self, request): - self._oprot.writeMessageBegin('get_not_null_constraints', TMessageType.CALL, self._seqid) - args = get_not_null_constraints_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_not_null_constraints(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_not_null_constraints_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_not_null_constraints failed: unknown result") - - def update_table_column_statistics(self, stats_obj): - """ - Parameters: - - stats_obj - """ - self.send_update_table_column_statistics(stats_obj) - return self.recv_update_table_column_statistics() - - def send_update_table_column_statistics(self, stats_obj): - self._oprot.writeMessageBegin('update_table_column_statistics', TMessageType.CALL, self._seqid) - args = update_table_column_statistics_args() - args.stats_obj = stats_obj - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_update_table_column_statistics(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = update_table_column_statistics_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - raise TApplicationException(TApplicationException.MISSING_RESULT, "update_table_column_statistics failed: unknown result") - - def update_partition_column_statistics(self, stats_obj): - """ - Parameters: - - stats_obj - """ - self.send_update_partition_column_statistics(stats_obj) - return self.recv_update_partition_column_statistics() - - def send_update_partition_column_statistics(self, stats_obj): - self._oprot.writeMessageBegin('update_partition_column_statistics', TMessageType.CALL, self._seqid) - args = update_partition_column_statistics_args() - args.stats_obj = stats_obj - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_update_partition_column_statistics(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = update_partition_column_statistics_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - raise TApplicationException(TApplicationException.MISSING_RESULT, "update_partition_column_statistics failed: unknown result") - - def get_table_column_statistics(self, db_name, tbl_name, col_name): - """ - Parameters: - - db_name - - tbl_name - - col_name - """ - self.send_get_table_column_statistics(db_name, tbl_name, col_name) - return self.recv_get_table_column_statistics() - - def send_get_table_column_statistics(self, db_name, tbl_name, col_name): - self._oprot.writeMessageBegin('get_table_column_statistics', TMessageType.CALL, self._seqid) - args = get_table_column_statistics_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.col_name = col_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_table_column_statistics(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_table_column_statistics_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_column_statistics failed: unknown result") - - def get_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): - """ - Parameters: - - db_name - - tbl_name - - part_name - - col_name - """ - self.send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name) - return self.recv_get_partition_column_statistics() - - def send_get_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): - self._oprot.writeMessageBegin('get_partition_column_statistics', TMessageType.CALL, self._seqid) - args = get_partition_column_statistics_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_name = part_name - args.col_name = col_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partition_column_statistics(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partition_column_statistics_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_column_statistics failed: unknown result") - - def get_table_statistics_req(self, request): - """ - Parameters: - - request - """ - self.send_get_table_statistics_req(request) - return self.recv_get_table_statistics_req() - - def send_get_table_statistics_req(self, request): - self._oprot.writeMessageBegin('get_table_statistics_req', TMessageType.CALL, self._seqid) - args = get_table_statistics_req_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_table_statistics_req(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_table_statistics_req_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_statistics_req failed: unknown result") - - def get_partitions_statistics_req(self, request): - """ - Parameters: - - request - """ - self.send_get_partitions_statistics_req(request) - return self.recv_get_partitions_statistics_req() - - def send_get_partitions_statistics_req(self, request): - self._oprot.writeMessageBegin('get_partitions_statistics_req', TMessageType.CALL, self._seqid) - args = get_partitions_statistics_req_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_partitions_statistics_req(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_partitions_statistics_req_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_statistics_req failed: unknown result") - - def get_aggr_stats_for(self, request): - """ - Parameters: - - request - """ - self.send_get_aggr_stats_for(request) - return self.recv_get_aggr_stats_for() - - def send_get_aggr_stats_for(self, request): - self._oprot.writeMessageBegin('get_aggr_stats_for', TMessageType.CALL, self._seqid) - args = get_aggr_stats_for_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_aggr_stats_for(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_aggr_stats_for_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_aggr_stats_for failed: unknown result") - - def set_aggr_stats_for(self, request): - """ - Parameters: - - request - """ - self.send_set_aggr_stats_for(request) - return self.recv_set_aggr_stats_for() - - def send_set_aggr_stats_for(self, request): - self._oprot.writeMessageBegin('set_aggr_stats_for', TMessageType.CALL, self._seqid) - args = set_aggr_stats_for_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_set_aggr_stats_for(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = set_aggr_stats_for_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - raise TApplicationException(TApplicationException.MISSING_RESULT, "set_aggr_stats_for failed: unknown result") - - def delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): - """ - Parameters: - - db_name - - tbl_name - - part_name - - col_name - """ - self.send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name) - return self.recv_delete_partition_column_statistics() - - def send_delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): - self._oprot.writeMessageBegin('delete_partition_column_statistics', TMessageType.CALL, self._seqid) - args = delete_partition_column_statistics_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.part_name = part_name - args.col_name = col_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_delete_partition_column_statistics(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = delete_partition_column_statistics_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_partition_column_statistics failed: unknown result") - - def delete_table_column_statistics(self, db_name, tbl_name, col_name): - """ - Parameters: - - db_name - - tbl_name - - col_name - """ - self.send_delete_table_column_statistics(db_name, tbl_name, col_name) - return self.recv_delete_table_column_statistics() - - def send_delete_table_column_statistics(self, db_name, tbl_name, col_name): - self._oprot.writeMessageBegin('delete_table_column_statistics', TMessageType.CALL, self._seqid) - args = delete_table_column_statistics_args() - args.db_name = db_name - args.tbl_name = tbl_name - args.col_name = col_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_delete_table_column_statistics(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = delete_table_column_statistics_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_table_column_statistics failed: unknown result") - - def create_function(self, func): - """ - Parameters: - - func - """ - self.send_create_function(func) - self.recv_create_function() - - def send_create_function(self, func): - self._oprot.writeMessageBegin('create_function', TMessageType.CALL, self._seqid) - args = create_function_args() - args.func = func - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_create_function(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = create_function_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - if result.o4 is not None: - raise result.o4 - return - - def drop_function(self, dbName, funcName): - """ - Parameters: - - dbName - - funcName - """ - self.send_drop_function(dbName, funcName) - self.recv_drop_function() - - def send_drop_function(self, dbName, funcName): - self._oprot.writeMessageBegin('drop_function', TMessageType.CALL, self._seqid) - args = drop_function_args() - args.dbName = dbName - args.funcName = funcName - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_function(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_function_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o3 is not None: - raise result.o3 - return - - def alter_function(self, dbName, funcName, newFunc): - """ - Parameters: - - dbName - - funcName - - newFunc - """ - self.send_alter_function(dbName, funcName, newFunc) - self.recv_alter_function() - - def send_alter_function(self, dbName, funcName, newFunc): - self._oprot.writeMessageBegin('alter_function', TMessageType.CALL, self._seqid) - args = alter_function_args() - args.dbName = dbName - args.funcName = funcName - args.newFunc = newFunc - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_alter_function(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = alter_function_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def get_functions(self, dbName, pattern): - """ - Parameters: - - dbName - - pattern - """ - self.send_get_functions(dbName, pattern) - return self.recv_get_functions() - - def send_get_functions(self, dbName, pattern): - self._oprot.writeMessageBegin('get_functions', TMessageType.CALL, self._seqid) - args = get_functions_args() - args.dbName = dbName - args.pattern = pattern - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_functions(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_functions_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_functions failed: unknown result") - - def get_function(self, dbName, funcName): - """ - Parameters: - - dbName - - funcName - """ - self.send_get_function(dbName, funcName) - return self.recv_get_function() - - def send_get_function(self, dbName, funcName): - self._oprot.writeMessageBegin('get_function', TMessageType.CALL, self._seqid) - args = get_function_args() - args.dbName = dbName - args.funcName = funcName - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_function(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_function_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_function failed: unknown result") - - def get_all_functions(self): - self.send_get_all_functions() - return self.recv_get_all_functions() - - def send_get_all_functions(self): - self._oprot.writeMessageBegin('get_all_functions', TMessageType.CALL, self._seqid) - args = get_all_functions_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_all_functions(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_all_functions_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_functions failed: unknown result") - - def create_role(self, role): - """ - Parameters: - - role - """ - self.send_create_role(role) - return self.recv_create_role() - - def send_create_role(self, role): - self._oprot.writeMessageBegin('create_role', TMessageType.CALL, self._seqid) - args = create_role_args() - args.role = role - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_create_role(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = create_role_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "create_role failed: unknown result") - - def drop_role(self, role_name): - """ - Parameters: - - role_name - """ - self.send_drop_role(role_name) - return self.recv_drop_role() - - def send_drop_role(self, role_name): - self._oprot.writeMessageBegin('drop_role', TMessageType.CALL, self._seqid) - args = drop_role_args() - args.role_name = role_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_drop_role(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = drop_role_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_role failed: unknown result") - - def get_role_names(self): - self.send_get_role_names() - return self.recv_get_role_names() - - def send_get_role_names(self): - self._oprot.writeMessageBegin('get_role_names', TMessageType.CALL, self._seqid) - args = get_role_names_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_role_names(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_role_names_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_role_names failed: unknown result") - - def grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option): - """ - Parameters: - - role_name - - principal_name - - principal_type - - grantor - - grantorType - - grant_option - """ - self.send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) - return self.recv_grant_role() - - def send_grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option): - self._oprot.writeMessageBegin('grant_role', TMessageType.CALL, self._seqid) - args = 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 - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_grant_role(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = grant_role_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_role failed: unknown result") - - def revoke_role(self, role_name, principal_name, principal_type): - """ - Parameters: - - role_name - - principal_name - - principal_type - """ - self.send_revoke_role(role_name, principal_name, principal_type) - return self.recv_revoke_role() - - def send_revoke_role(self, role_name, principal_name, principal_type): - self._oprot.writeMessageBegin('revoke_role', TMessageType.CALL, self._seqid) - args = revoke_role_args() - args.role_name = role_name - args.principal_name = principal_name - args.principal_type = principal_type - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_revoke_role(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = revoke_role_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_role failed: unknown result") - - def list_roles(self, principal_name, principal_type): - """ - Parameters: - - principal_name - - principal_type - """ - self.send_list_roles(principal_name, principal_type) - return self.recv_list_roles() - - def send_list_roles(self, principal_name, principal_type): - self._oprot.writeMessageBegin('list_roles', TMessageType.CALL, self._seqid) - args = list_roles_args() - args.principal_name = principal_name - args.principal_type = principal_type - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_list_roles(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = list_roles_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "list_roles failed: unknown result") - - def grant_revoke_role(self, request): - """ - Parameters: - - request - """ - self.send_grant_revoke_role(request) - return self.recv_grant_revoke_role() - - def send_grant_revoke_role(self, request): - self._oprot.writeMessageBegin('grant_revoke_role', TMessageType.CALL, self._seqid) - args = grant_revoke_role_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_grant_revoke_role(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = grant_revoke_role_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_revoke_role failed: unknown result") - - def get_principals_in_role(self, request): - """ - Parameters: - - request - """ - self.send_get_principals_in_role(request) - return self.recv_get_principals_in_role() - - def send_get_principals_in_role(self, request): - self._oprot.writeMessageBegin('get_principals_in_role', TMessageType.CALL, self._seqid) - args = get_principals_in_role_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_principals_in_role(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_principals_in_role_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_principals_in_role failed: unknown result") - - def get_role_grants_for_principal(self, request): - """ - Parameters: - - request - """ - self.send_get_role_grants_for_principal(request) - return self.recv_get_role_grants_for_principal() - - def send_get_role_grants_for_principal(self, request): - self._oprot.writeMessageBegin('get_role_grants_for_principal', TMessageType.CALL, self._seqid) - args = get_role_grants_for_principal_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_role_grants_for_principal(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_role_grants_for_principal_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_role_grants_for_principal failed: unknown result") - - def get_privilege_set(self, hiveObject, user_name, group_names): - """ - Parameters: - - hiveObject - - user_name - - group_names - """ - self.send_get_privilege_set(hiveObject, user_name, group_names) - return self.recv_get_privilege_set() - - def send_get_privilege_set(self, hiveObject, user_name, group_names): - self._oprot.writeMessageBegin('get_privilege_set', TMessageType.CALL, self._seqid) - args = get_privilege_set_args() - args.hiveObject = hiveObject - args.user_name = user_name - args.group_names = group_names - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_privilege_set(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_privilege_set_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_privilege_set failed: unknown result") - - def list_privileges(self, principal_name, principal_type, hiveObject): - """ - Parameters: - - principal_name - - principal_type - - hiveObject - """ - self.send_list_privileges(principal_name, principal_type, hiveObject) - return self.recv_list_privileges() - - def send_list_privileges(self, principal_name, principal_type, hiveObject): - self._oprot.writeMessageBegin('list_privileges', TMessageType.CALL, self._seqid) - args = list_privileges_args() - args.principal_name = principal_name - args.principal_type = principal_type - args.hiveObject = hiveObject - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_list_privileges(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = list_privileges_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "list_privileges failed: unknown result") - - def grant_privileges(self, privileges): - """ - Parameters: - - privileges - """ - self.send_grant_privileges(privileges) - return self.recv_grant_privileges() - - def send_grant_privileges(self, privileges): - self._oprot.writeMessageBegin('grant_privileges', TMessageType.CALL, self._seqid) - args = grant_privileges_args() - args.privileges = privileges - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_grant_privileges(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = grant_privileges_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_privileges failed: unknown result") - - def revoke_privileges(self, privileges): - """ - Parameters: - - privileges - """ - self.send_revoke_privileges(privileges) - return self.recv_revoke_privileges() - - def send_revoke_privileges(self, privileges): - self._oprot.writeMessageBegin('revoke_privileges', TMessageType.CALL, self._seqid) - args = revoke_privileges_args() - args.privileges = privileges - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_revoke_privileges(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = revoke_privileges_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result") - - def grant_revoke_privileges(self, request): - """ - Parameters: - - request - """ - self.send_grant_revoke_privileges(request) - return self.recv_grant_revoke_privileges() - - def send_grant_revoke_privileges(self, request): - self._oprot.writeMessageBegin('grant_revoke_privileges', TMessageType.CALL, self._seqid) - args = grant_revoke_privileges_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_grant_revoke_privileges(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = grant_revoke_privileges_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_revoke_privileges failed: unknown result") - - def set_ugi(self, user_name, group_names): - """ - Parameters: - - user_name - - group_names - """ - self.send_set_ugi(user_name, group_names) - return self.recv_set_ugi() - - def send_set_ugi(self, user_name, group_names): - self._oprot.writeMessageBegin('set_ugi', TMessageType.CALL, self._seqid) - args = set_ugi_args() - args.user_name = user_name - args.group_names = group_names - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_set_ugi(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = set_ugi_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "set_ugi failed: unknown result") - - def get_delegation_token(self, token_owner, renewer_kerberos_principal_name): - """ - Parameters: - - token_owner - - renewer_kerberos_principal_name - """ - self.send_get_delegation_token(token_owner, renewer_kerberos_principal_name) - return self.recv_get_delegation_token() - - def send_get_delegation_token(self, token_owner, renewer_kerberos_principal_name): - self._oprot.writeMessageBegin('get_delegation_token', TMessageType.CALL, self._seqid) - args = get_delegation_token_args() - args.token_owner = token_owner - args.renewer_kerberos_principal_name = renewer_kerberos_principal_name - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_delegation_token(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_delegation_token_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_delegation_token failed: unknown result") - - def renew_delegation_token(self, token_str_form): - """ - Parameters: - - token_str_form - """ - self.send_renew_delegation_token(token_str_form) - return self.recv_renew_delegation_token() - - def send_renew_delegation_token(self, token_str_form): - self._oprot.writeMessageBegin('renew_delegation_token', TMessageType.CALL, self._seqid) - args = renew_delegation_token_args() - args.token_str_form = token_str_form - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_renew_delegation_token(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = renew_delegation_token_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "renew_delegation_token failed: unknown result") - - def cancel_delegation_token(self, token_str_form): - """ - Parameters: - - token_str_form - """ - self.send_cancel_delegation_token(token_str_form) - self.recv_cancel_delegation_token() - - def send_cancel_delegation_token(self, token_str_form): - self._oprot.writeMessageBegin('cancel_delegation_token', TMessageType.CALL, self._seqid) - args = cancel_delegation_token_args() - args.token_str_form = token_str_form - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_cancel_delegation_token(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = cancel_delegation_token_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - return - - def add_token(self, token_identifier, delegation_token): - """ - Parameters: - - token_identifier - - delegation_token - """ - self.send_add_token(token_identifier, delegation_token) - return self.recv_add_token() - - def send_add_token(self, token_identifier, delegation_token): - self._oprot.writeMessageBegin('add_token', TMessageType.CALL, self._seqid) - args = add_token_args() - args.token_identifier = token_identifier - args.delegation_token = delegation_token - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_token(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_token_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_token failed: unknown result") - - def remove_token(self, token_identifier): - """ - Parameters: - - token_identifier - """ - self.send_remove_token(token_identifier) - return self.recv_remove_token() - - def send_remove_token(self, token_identifier): - self._oprot.writeMessageBegin('remove_token', TMessageType.CALL, self._seqid) - args = remove_token_args() - args.token_identifier = token_identifier - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_remove_token(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = remove_token_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "remove_token failed: unknown result") - - def get_token(self, token_identifier): - """ - Parameters: - - token_identifier - """ - self.send_get_token(token_identifier) - return self.recv_get_token() - - def send_get_token(self, token_identifier): - self._oprot.writeMessageBegin('get_token', TMessageType.CALL, self._seqid) - args = get_token_args() - args.token_identifier = token_identifier - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_token(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_token_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_token failed: unknown result") - - def get_all_token_identifiers(self): - self.send_get_all_token_identifiers() - return self.recv_get_all_token_identifiers() - - def send_get_all_token_identifiers(self): - self._oprot.writeMessageBegin('get_all_token_identifiers', TMessageType.CALL, self._seqid) - args = get_all_token_identifiers_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_all_token_identifiers(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_all_token_identifiers_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_token_identifiers failed: unknown result") - - def add_master_key(self, key): - """ - Parameters: - - key - """ - self.send_add_master_key(key) - return self.recv_add_master_key() - - def send_add_master_key(self, key): - self._oprot.writeMessageBegin('add_master_key', TMessageType.CALL, self._seqid) - args = add_master_key_args() - args.key = key - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_master_key(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_master_key_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "add_master_key failed: unknown result") - - def update_master_key(self, seq_number, key): - """ - Parameters: - - seq_number - - key - """ - self.send_update_master_key(seq_number, key) - self.recv_update_master_key() - - def send_update_master_key(self, seq_number, key): - self._oprot.writeMessageBegin('update_master_key', TMessageType.CALL, self._seqid) - args = update_master_key_args() - args.seq_number = seq_number - args.key = key - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_update_master_key(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = update_master_key_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def remove_master_key(self, key_seq): - """ - Parameters: - - key_seq - """ - self.send_remove_master_key(key_seq) - return self.recv_remove_master_key() - - def send_remove_master_key(self, key_seq): - self._oprot.writeMessageBegin('remove_master_key', TMessageType.CALL, self._seqid) - args = remove_master_key_args() - args.key_seq = key_seq - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_remove_master_key(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = remove_master_key_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "remove_master_key failed: unknown result") - - def get_master_keys(self): - self.send_get_master_keys() - return self.recv_get_master_keys() - - def send_get_master_keys(self): - self._oprot.writeMessageBegin('get_master_keys', TMessageType.CALL, self._seqid) - args = get_master_keys_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_master_keys(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_master_keys_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_master_keys failed: unknown result") - - def get_open_txns(self): - self.send_get_open_txns() - return self.recv_get_open_txns() - - def send_get_open_txns(self): - self._oprot.writeMessageBegin('get_open_txns', TMessageType.CALL, self._seqid) - args = get_open_txns_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_open_txns(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_open_txns_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_open_txns failed: unknown result") - - def get_open_txns_info(self): - self.send_get_open_txns_info() - return self.recv_get_open_txns_info() - - def send_get_open_txns_info(self): - self._oprot.writeMessageBegin('get_open_txns_info', TMessageType.CALL, self._seqid) - args = get_open_txns_info_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_open_txns_info(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_open_txns_info_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_open_txns_info failed: unknown result") - - def open_txns(self, rqst): - """ - Parameters: - - rqst - """ - self.send_open_txns(rqst) - return self.recv_open_txns() - - def send_open_txns(self, rqst): - self._oprot.writeMessageBegin('open_txns', TMessageType.CALL, self._seqid) - args = open_txns_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_open_txns(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = open_txns_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "open_txns failed: unknown result") - - def abort_txn(self, rqst): - """ - Parameters: - - rqst - """ - self.send_abort_txn(rqst) - self.recv_abort_txn() - - def send_abort_txn(self, rqst): - self._oprot.writeMessageBegin('abort_txn', TMessageType.CALL, self._seqid) - args = abort_txn_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_abort_txn(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = abort_txn_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - return - - def abort_txns(self, rqst): - """ - Parameters: - - rqst - """ - self.send_abort_txns(rqst) - self.recv_abort_txns() - - def send_abort_txns(self, rqst): - self._oprot.writeMessageBegin('abort_txns', TMessageType.CALL, self._seqid) - args = abort_txns_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_abort_txns(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = abort_txns_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - return - - def commit_txn(self, rqst): - """ - Parameters: - - rqst - """ - self.send_commit_txn(rqst) - self.recv_commit_txn() - - def send_commit_txn(self, rqst): - self._oprot.writeMessageBegin('commit_txn', TMessageType.CALL, self._seqid) - args = commit_txn_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_commit_txn(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = commit_txn_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def lock(self, rqst): - """ - Parameters: - - rqst - """ - self.send_lock(rqst) - return self.recv_lock() - - def send_lock(self, rqst): - self._oprot.writeMessageBegin('lock', TMessageType.CALL, self._seqid) - args = lock_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_lock(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = lock_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - raise TApplicationException(TApplicationException.MISSING_RESULT, "lock failed: unknown result") - - def check_lock(self, rqst): - """ - Parameters: - - rqst - """ - self.send_check_lock(rqst) - return self.recv_check_lock() - - def send_check_lock(self, rqst): - self._oprot.writeMessageBegin('check_lock', TMessageType.CALL, self._seqid) - args = check_lock_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_check_lock(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = check_lock_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - raise TApplicationException(TApplicationException.MISSING_RESULT, "check_lock failed: unknown result") - - def unlock(self, rqst): - """ - Parameters: - - rqst - """ - self.send_unlock(rqst) - self.recv_unlock() - - def send_unlock(self, rqst): - self._oprot.writeMessageBegin('unlock', TMessageType.CALL, self._seqid) - args = unlock_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_unlock(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = unlock_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def show_locks(self, rqst): - """ - Parameters: - - rqst - """ - self.send_show_locks(rqst) - return self.recv_show_locks() - - def send_show_locks(self, rqst): - self._oprot.writeMessageBegin('show_locks', TMessageType.CALL, self._seqid) - args = show_locks_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_show_locks(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = show_locks_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "show_locks failed: unknown result") - - def heartbeat(self, ids): - """ - Parameters: - - ids - """ - self.send_heartbeat(ids) - self.recv_heartbeat() - - def send_heartbeat(self, ids): - self._oprot.writeMessageBegin('heartbeat', TMessageType.CALL, self._seqid) - args = heartbeat_args() - args.ids = ids - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_heartbeat(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = heartbeat_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - if result.o3 is not None: - raise result.o3 - return - - def heartbeat_txn_range(self, txns): - """ - Parameters: - - txns - """ - self.send_heartbeat_txn_range(txns) - return self.recv_heartbeat_txn_range() - - def send_heartbeat_txn_range(self, txns): - self._oprot.writeMessageBegin('heartbeat_txn_range', TMessageType.CALL, self._seqid) - args = heartbeat_txn_range_args() - args.txns = txns - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_heartbeat_txn_range(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = heartbeat_txn_range_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "heartbeat_txn_range failed: unknown result") - - def compact(self, rqst): - """ - Parameters: - - rqst - """ - self.send_compact(rqst) - self.recv_compact() - - def send_compact(self, rqst): - self._oprot.writeMessageBegin('compact', TMessageType.CALL, self._seqid) - args = compact_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_compact(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = compact_result() - result.read(iprot) - iprot.readMessageEnd() - return - - def compact2(self, rqst): - """ - Parameters: - - rqst - """ - self.send_compact2(rqst) - return self.recv_compact2() - - def send_compact2(self, rqst): - self._oprot.writeMessageBegin('compact2', TMessageType.CALL, self._seqid) - args = compact2_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_compact2(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = compact2_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "compact2 failed: unknown result") - - def show_compact(self, rqst): - """ - Parameters: - - rqst - """ - self.send_show_compact(rqst) - return self.recv_show_compact() - - def send_show_compact(self, rqst): - self._oprot.writeMessageBegin('show_compact', TMessageType.CALL, self._seqid) - args = show_compact_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_show_compact(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = show_compact_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "show_compact failed: unknown result") - - def add_dynamic_partitions(self, rqst): - """ - Parameters: - - rqst - """ - self.send_add_dynamic_partitions(rqst) - self.recv_add_dynamic_partitions() - - def send_add_dynamic_partitions(self, rqst): - self._oprot.writeMessageBegin('add_dynamic_partitions', TMessageType.CALL, self._seqid) - args = add_dynamic_partitions_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_add_dynamic_partitions(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = add_dynamic_partitions_result() - result.read(iprot) - iprot.readMessageEnd() - if result.o1 is not None: - raise result.o1 - if result.o2 is not None: - raise result.o2 - return - - def get_next_notification(self, rqst): - """ - Parameters: - - rqst - """ - self.send_get_next_notification(rqst) - return self.recv_get_next_notification() - - def send_get_next_notification(self, rqst): - self._oprot.writeMessageBegin('get_next_notification', TMessageType.CALL, self._seqid) - args = get_next_notification_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_next_notification(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_next_notification_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_next_notification failed: unknown result") - - def get_current_notificationEventId(self): - self.send_get_current_notificationEventId() - return self.recv_get_current_notificationEventId() - - def send_get_current_notificationEventId(self): - self._oprot.writeMessageBegin('get_current_notificationEventId', TMessageType.CALL, self._seqid) - args = get_current_notificationEventId_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_current_notificationEventId(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_current_notificationEventId_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_current_notificationEventId failed: unknown result") - - def fire_listener_event(self, rqst): - """ - Parameters: - - rqst - """ - self.send_fire_listener_event(rqst) - return self.recv_fire_listener_event() - - def send_fire_listener_event(self, rqst): - self._oprot.writeMessageBegin('fire_listener_event', TMessageType.CALL, self._seqid) - args = fire_listener_event_args() - args.rqst = rqst - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_fire_listener_event(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = fire_listener_event_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "fire_listener_event failed: unknown result") - - def flushCache(self): - self.send_flushCache() - self.recv_flushCache() - - def send_flushCache(self): - self._oprot.writeMessageBegin('flushCache', TMessageType.CALL, self._seqid) - args = flushCache_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_flushCache(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = flushCache_result() - result.read(iprot) - iprot.readMessageEnd() - return - - def cm_recycle(self, request): - """ - Parameters: - - request - """ - self.send_cm_recycle(request) - return self.recv_cm_recycle() - - def send_cm_recycle(self, request): - self._oprot.writeMessageBegin('cm_recycle', TMessageType.CALL, self._seqid) - args = cm_recycle_args() - args.request = request - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_cm_recycle(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = cm_recycle_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "cm_recycle failed: unknown result") - - def get_file_metadata_by_expr(self, req): - """ - Parameters: - - req - """ - self.send_get_file_metadata_by_expr(req) - return self.recv_get_file_metadata_by_expr() - - def send_get_file_metadata_by_expr(self, req): - self._oprot.writeMessageBegin('get_file_metadata_by_expr', TMessageType.CALL, self._seqid) - args = get_file_metadata_by_expr_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_file_metadata_by_expr(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_file_metadata_by_expr_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_file_metadata_by_expr failed: unknown result") - - def get_file_metadata(self, req): - """ - Parameters: - - req - """ - self.send_get_file_metadata(req) - return self.recv_get_file_metadata() - - def send_get_file_metadata(self, req): - self._oprot.writeMessageBegin('get_file_metadata', TMessageType.CALL, self._seqid) - args = get_file_metadata_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_file_metadata(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_file_metadata_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_file_metadata failed: unknown result") - - def put_file_metadata(self, req): - """ - Parameters: - - req - """ - self.send_put_file_metadata(req) - return self.recv_put_file_metadata() - - def send_put_file_metadata(self, req): - self._oprot.writeMessageBegin('put_file_metadata', TMessageType.CALL, self._seqid) - args = put_file_metadata_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_put_file_metadata(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = put_file_metadata_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "put_file_metadata failed: unknown result") - - def clear_file_metadata(self, req): - """ - Parameters: - - req - """ - self.send_clear_file_metadata(req) - return self.recv_clear_file_metadata() - - def send_clear_file_metadata(self, req): - self._oprot.writeMessageBegin('clear_file_metadata', TMessageType.CALL, self._seqid) - args = clear_file_metadata_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_clear_file_metadata(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = clear_file_metadata_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "clear_file_metadata failed: unknown result") - - def cache_file_metadata(self, req): - """ - Parameters: - - req - """ - self.send_cache_file_metadata(req) - return self.recv_cache_file_metadata() - - def send_cache_file_metadata(self, req): - self._oprot.writeMessageBegin('cache_file_metadata', TMessageType.CALL, self._seqid) - args = cache_file_metadata_args() - args.req = req - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_cache_file_metadata(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = cache_file_metadata_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "cache_file_metadata failed: unknown result") - - def get_metastore_db_uuid(self): - self.send_get_metastore_db_uuid() - return self.recv_get_metastore_db_uuid() - - def send_get_metastore_db_uuid(self): - self._oprot.writeMessageBegin('get_metastore_db_uuid', TMessageType.CALL, self._seqid) - args = get_metastore_db_uuid_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get_metastore_db_uuid(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_metastore_db_uuid_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.o1 is not None: - raise result.o1 - raise TApplicationException(TApplicationException.MISSING_RESULT, "get_metastore_db_uuid failed: unknown result") - - -class Processor(fb303.FacebookService.Processor, Iface, TProcessor): - def __init__(self, handler): - fb303.FacebookService.Processor.__init__(self, handler) - self._processMap["getMetaConf"] = Processor.process_getMetaConf - self._processMap["setMetaConf"] = Processor.process_setMetaConf - self._processMap["create_database"] = Processor.process_create_database - self._processMap["get_database"] = Processor.process_get_database - self._processMap["drop_database"] = Processor.process_drop_database - self._processMap["get_databases"] = Processor.process_get_databases - self._processMap["get_all_databases"] = Processor.process_get_all_databases - self._processMap["alter_database"] = Processor.process_alter_database - self._processMap["get_type"] = Processor.process_get_type - self._processMap["create_type"] = Processor.process_create_type - self._processMap["drop_type"] = Processor.process_drop_type - self._processMap["get_type_all"] = Processor.process_get_type_all - self._processMap["get_fields"] = Processor.process_get_fields - self._processMap["get_fields_with_environment_context"] = Processor.process_get_fields_with_environment_context - self._processMap["get_schema"] = Processor.process_get_schema - self._processMap["get_schema_with_environment_context"] = Processor.process_get_schema_with_environment_context - self._processMap["create_table"] = Processor.process_create_table - self._processMap["create_table_with_environment_context"] = Processor.process_create_table_with_environment_context - self._processMap["create_table_with_constraints"] = Processor.process_create_table_with_constraints - self._processMap["drop_constraint"] = Processor.process_drop_constraint - self._processMap["add_primary_key"] = Processor.process_add_primary_key - self._processMap["add_foreign_key"] = Processor.process_add_foreign_key - self._processMap["add_unique_constraint"] = Processor.process_add_unique_constraint - self._processMap["add_not_null_constraint"] = Processor.process_add_not_null_constraint - self._processMap["drop_table"] = Processor.process_drop_table - self._processMap["drop_table_with_environment_context"] = Processor.process_drop_table_with_environment_context - self._processMap["truncate_table"] = Processor.process_truncate_table - self._processMap["get_tables"] = Processor.process_get_tables - self._processMap["get_tables_by_type"] = Processor.process_get_tables_by_type - self._processMap["get_table_meta"] = Processor.process_get_table_meta - self._processMap["get_all_tables"] = Processor.process_get_all_tables - self._processMap["get_table"] = Processor.process_get_table - self._processMap["get_table_objects_by_name"] = Processor.process_get_table_objects_by_name - self._processMap["get_table_req"] = Processor.process_get_table_req - self._processMap["get_table_objects_by_name_req"] = Processor.process_get_table_objects_by_name_req - self._processMap["get_table_names_by_filter"] = Processor.process_get_table_names_by_filter - self._processMap["alter_table"] = Processor.process_alter_table - self._processMap["alter_table_with_environment_context"] = Processor.process_alter_table_with_environment_context - self._processMap["alter_table_with_cascade"] = Processor.process_alter_table_with_cascade - self._processMap["add_partition"] = Processor.process_add_partition - self._processMap["add_partition_with_environment_context"] = Processor.process_add_partition_with_environment_context - self._processMap["add_partitions"] = Processor.process_add_partitions - self._processMap["add_partitions_pspec"] = Processor.process_add_partitions_pspec - self._processMap["append_partition"] = Processor.process_append_partition - self._processMap["add_partitions_req"] = Processor.process_add_partitions_req - self._processMap["append_partition_with_environment_context"] = Processor.process_append_partition_with_environment_context - self._processMap["append_partition_by_name"] = Processor.process_append_partition_by_name - self._processMap["append_partition_by_name_with_environment_context"] = Processor.process_append_partition_by_name_with_environment_context - self._processMap["drop_partition"] = Processor.process_drop_partition - self._processMap["drop_partition_with_environment_context"] = Processor.process_drop_partition_with_environment_context - self._processMap["drop_partition_by_name"] = Processor.process_drop_partition_by_name - self._processMap["drop_partition_by_name_with_environment_context"] = Processor.process_drop_partition_by_name_with_environment_context - self._processMap["drop_partitions_req"] = Processor.process_drop_partitions_req - self._processMap["get_partition"] = Processor.process_get_partition - self._processMap["exchange_partition"] = Processor.process_exchange_partition - self._processMap["exchange_partitions"] = Processor.process_exchange_partitions - self._processMap["get_partition_with_auth"] = Processor.process_get_partition_with_auth - self._processMap["get_partition_by_name"] = Processor.process_get_partition_by_name - self._processMap["get_partitions"] = Processor.process_get_partitions - self._processMap["get_partitions_with_auth"] = Processor.process_get_partitions_with_auth - self._processMap["get_partitions_pspec"] = Processor.process_get_partitions_pspec - self._processMap["get_partition_names"] = Processor.process_get_partition_names - self._processMap["get_partitions_ps"] = Processor.process_get_partitions_ps - self._processMap["get_partitions_ps_with_auth"] = Processor.process_get_partitions_ps_with_auth - self._processMap["get_partition_names_ps"] = Processor.process_get_partition_names_ps - self._processMap["get_partitions_by_filter"] = Processor.process_get_partitions_by_filter - self._processMap["get_part_specs_by_filter"] = Processor.process_get_part_specs_by_filter - self._processMap["get_partitions_by_expr"] = Processor.process_get_partitions_by_expr - self._processMap["get_num_partitions_by_filter"] = Processor.process_get_num_partitions_by_filter - self._processMap["get_partitions_by_names"] = Processor.process_get_partitions_by_names - self._processMap["alter_partition"] = Processor.process_alter_partition - self._processMap["alter_partitions"] = Processor.process_alter_partitions - self._processMap["alter_partitions_with_environment_context"] = Processor.process_alter_partitions_with_environment_context - self._processMap["alter_partition_with_environment_context"] = Processor.process_alter_partition_with_environment_context - self._processMap["rename_partition"] = Processor.process_rename_partition - self._processMap["partition_name_has_valid_characters"] = Processor.process_partition_name_has_valid_characters - self._processMap["get_config_value"] = Processor.process_get_config_value - self._processMap["partition_name_to_vals"] = Processor.process_partition_name_to_vals - self._processMap["partition_name_to_spec"] = Processor.process_partition_name_to_spec - self._processMap["markPartitionForEvent"] = Processor.process_markPartitionForEvent - self._processMap["isPartitionMarkedForEvent"] = Processor.process_isPartitionMarkedForEvent - self._processMap["add_index"] = Processor.process_add_index - self._processMap["alter_index"] = Processor.process_alter_index - self._processMap["drop_index_by_name"] = Processor.process_drop_index_by_name - self._processMap["get_index_by_name"] = Processor.process_get_index_by_name - self._processMap["get_indexes"] = Processor.process_get_indexes - self._processMap["get_index_names"] = Processor.process_get_index_names - self._processMap["get_primary_keys"] = Processor.process_get_primary_keys - self._processMap["get_foreign_keys"] = Processor.process_get_foreign_keys - self._processMap["get_unique_constraints"] = Processor.process_get_unique_constraints - self._processMap["get_not_null_constraints"] = Processor.process_get_not_null_constraints - self._processMap["update_table_column_statistics"] = Processor.process_update_table_column_statistics - self._processMap["update_partition_column_statistics"] = Processor.process_update_partition_column_statistics - self._processMap["get_table_column_statistics"] = Processor.process_get_table_column_statistics - self._processMap["get_partition_column_statistics"] = Processor.process_get_partition_column_statistics - self._processMap["get_table_statistics_req"] = Processor.process_get_table_statistics_req - self._processMap["get_partitions_statistics_req"] = Processor.process_get_partitions_statistics_req - self._processMap["get_aggr_stats_for"] = Processor.process_get_aggr_stats_for - self._processMap["set_aggr_stats_for"] = Processor.process_set_aggr_stats_for - self._processMap["delete_partition_column_statistics"] = Processor.process_delete_partition_column_statistics - self._processMap["delete_table_column_statistics"] = Processor.process_delete_table_column_statistics - self._processMap["create_function"] = Processor.process_create_function - self._processMap["drop_function"] = Processor.process_drop_function - self._processMap["alter_function"] = Processor.process_alter_function - self._processMap["get_functions"] = Processor.process_get_functions - self._processMap["get_function"] = Processor.process_get_function - self._processMap["get_all_functions"] = Processor.process_get_all_functions - self._processMap["create_role"] = Processor.process_create_role - self._processMap["drop_role"] = Processor.process_drop_role - self._processMap["get_role_names"] = Processor.process_get_role_names - self._processMap["grant_role"] = Processor.process_grant_role - self._processMap["revoke_role"] = Processor.process_revoke_role - self._processMap["list_roles"] = Processor.process_list_roles - self._processMap["grant_revoke_role"] = Processor.process_grant_revoke_role - self._processMap["get_principals_in_role"] = Processor.process_get_principals_in_role - self._processMap["get_role_grants_for_principal"] = Processor.process_get_role_grants_for_principal - self._processMap["get_privilege_set"] = Processor.process_get_privilege_set - self._processMap["list_privileges"] = Processor.process_list_privileges - self._processMap["grant_privileges"] = Processor.process_grant_privileges - self._processMap["revoke_privileges"] = Processor.process_revoke_privileges - self._processMap["grant_revoke_privileges"] = Processor.process_grant_revoke_privileges - self._processMap["set_ugi"] = Processor.process_set_ugi - self._processMap["get_delegation_token"] = Processor.process_get_delegation_token - self._processMap["renew_delegation_token"] = Processor.process_renew_delegation_token - self._processMap["cancel_delegation_token"] = Processor.process_cancel_delegation_token - self._processMap["add_token"] = Processor.process_add_token - self._processMap["remove_token"] = Processor.process_remove_token - self._processMap["get_token"] = Processor.process_get_token - self._processMap["get_all_token_identifiers"] = Processor.process_get_all_token_identifiers - self._processMap["add_master_key"] = Processor.process_add_master_key - self._processMap["update_master_key"] = Processor.process_update_master_key - self._processMap["remove_master_key"] = Processor.process_remove_master_key - self._processMap["get_master_keys"] = Processor.process_get_master_keys - self._processMap["get_open_txns"] = Processor.process_get_open_txns - self._processMap["get_open_txns_info"] = Processor.process_get_open_txns_info - self._processMap["open_txns"] = Processor.process_open_txns - self._processMap["abort_txn"] = Processor.process_abort_txn - self._processMap["abort_txns"] = Processor.process_abort_txns - self._processMap["commit_txn"] = Processor.process_commit_txn - self._processMap["lock"] = Processor.process_lock - self._processMap["check_lock"] = Processor.process_check_lock - self._processMap["unlock"] = Processor.process_unlock - self._processMap["show_locks"] = Processor.process_show_locks - self._processMap["heartbeat"] = Processor.process_heartbeat - self._processMap["heartbeat_txn_range"] = Processor.process_heartbeat_txn_range - self._processMap["compact"] = Processor.process_compact - self._processMap["compact2"] = Processor.process_compact2 - self._processMap["show_compact"] = Processor.process_show_compact - self._processMap["add_dynamic_partitions"] = Processor.process_add_dynamic_partitions - self._processMap["get_next_notification"] = Processor.process_get_next_notification - self._processMap["get_current_notificationEventId"] = Processor.process_get_current_notificationEventId - self._processMap["fire_listener_event"] = Processor.process_fire_listener_event - self._processMap["flushCache"] = Processor.process_flushCache - self._processMap["cm_recycle"] = Processor.process_cm_recycle - self._processMap["get_file_metadata_by_expr"] = Processor.process_get_file_metadata_by_expr - self._processMap["get_file_metadata"] = Processor.process_get_file_metadata - self._processMap["put_file_metadata"] = Processor.process_put_file_metadata - self._processMap["clear_file_metadata"] = Processor.process_clear_file_metadata - self._processMap["cache_file_metadata"] = Processor.process_cache_file_metadata - self._processMap["get_metastore_db_uuid"] = Processor.process_get_metastore_db_uuid - - def process(self, iprot, oprot): - (name, type, seqid) = iprot.readMessageBegin() - if name not in self._processMap: - iprot.skip(TType.STRUCT) - iprot.readMessageEnd() - x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) - oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) - x.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - return - else: - self._processMap[name](self, seqid, iprot, oprot) - return True - - def process_getMetaConf(self, seqid, iprot, oprot): - args = getMetaConf_args() - args.read(iprot) - iprot.readMessageEnd() - result = getMetaConf_result() - try: - result.success = self._handler.getMetaConf(args.key) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getMetaConf", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_setMetaConf(self, seqid, iprot, oprot): - args = setMetaConf_args() - args.read(iprot) - iprot.readMessageEnd() - result = setMetaConf_result() - try: - self._handler.setMetaConf(args.key, args.value) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("setMetaConf", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_create_database(self, seqid, iprot, oprot): - args = create_database_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_database_result() - try: - self._handler.create_database(args.database) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except AlreadyExistsException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except InvalidObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("create_database", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_database(self, seqid, iprot, oprot): - args = get_database_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_database_result() - try: - result.success = self._handler.get_database(args.name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_database", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_database(self, seqid, iprot, oprot): - args = drop_database_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_database_result() - try: - self._handler.drop_database(args.name, args.deleteData, args.cascade) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except InvalidOperationException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_database", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_databases(self, seqid, iprot, oprot): - args = get_databases_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_databases_result() - try: - result.success = self._handler.get_databases(args.pattern) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_databases", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_all_databases(self, seqid, iprot, oprot): - args = get_all_databases_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_all_databases_result() - try: - result.success = self._handler.get_all_databases() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_all_databases", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_database(self, seqid, iprot, oprot): - args = alter_database_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_database_result() - try: - self._handler.alter_database(args.dbname, args.db) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("alter_database", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_type(self, seqid, iprot, oprot): - args = get_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_type_result() - try: - result.success = self._handler.get_type(args.name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_type", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_create_type(self, seqid, iprot, oprot): - args = create_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_type_result() - try: - result.success = self._handler.create_type(args.type) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except AlreadyExistsException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except InvalidObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("create_type", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_type(self, seqid, iprot, oprot): - args = drop_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_type_result() - try: - result.success = self._handler.drop_type(args.type) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_type", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_type_all(self, seqid, iprot, oprot): - args = get_type_all_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_type_all_result() - try: - result.success = self._handler.get_type_all(args.name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_type_all", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_fields(self, seqid, iprot, oprot): - args = get_fields_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_fields_result() - try: - result.success = self._handler.get_fields(args.db_name, args.table_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except UnknownTableException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except UnknownDBException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_fields", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_fields_with_environment_context(self, seqid, iprot, oprot): - args = get_fields_with_environment_context_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_fields_with_environment_context_result() - try: - result.success = self._handler.get_fields_with_environment_context(args.db_name, args.table_name, args.environment_context) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except UnknownTableException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except UnknownDBException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_fields_with_environment_context", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_schema(self, seqid, iprot, oprot): - args = get_schema_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_schema_result() - try: - result.success = self._handler.get_schema(args.db_name, args.table_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except UnknownTableException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except UnknownDBException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_schema", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_schema_with_environment_context(self, seqid, iprot, oprot): - args = get_schema_with_environment_context_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_schema_with_environment_context_result() - try: - result.success = self._handler.get_schema_with_environment_context(args.db_name, args.table_name, args.environment_context) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except UnknownTableException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except UnknownDBException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_schema_with_environment_context", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_create_table(self, seqid, iprot, oprot): - args = create_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_table_result() - try: - self._handler.create_table(args.tbl) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except AlreadyExistsException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except InvalidObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except NoSuchObjectException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("create_table", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_create_table_with_environment_context(self, seqid, iprot, oprot): - args = create_table_with_environment_context_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_table_with_environment_context_result() - try: - self._handler.create_table_with_environment_context(args.tbl, args.environment_context) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except AlreadyExistsException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except InvalidObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except NoSuchObjectException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("create_table_with_environment_context", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_create_table_with_constraints(self, seqid, iprot, oprot): - args = create_table_with_constraints_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_table_with_constraints_result() - try: - self._handler.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys, args.uniqueConstraints, args.notNullConstraints) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except AlreadyExistsException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except InvalidObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except NoSuchObjectException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("create_table_with_constraints", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_constraint(self, seqid, iprot, oprot): - args = drop_constraint_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_constraint_result() - try: - self._handler.drop_constraint(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_constraint", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_primary_key(self, seqid, iprot, oprot): - args = add_primary_key_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_primary_key_result() - try: - self._handler.add_primary_key(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_primary_key", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_foreign_key(self, seqid, iprot, oprot): - args = add_foreign_key_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_foreign_key_result() - try: - self._handler.add_foreign_key(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_foreign_key", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_unique_constraint(self, seqid, iprot, oprot): - args = add_unique_constraint_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_unique_constraint_result() - try: - self._handler.add_unique_constraint(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_unique_constraint", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_not_null_constraint(self, seqid, iprot, oprot): - args = add_not_null_constraint_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_not_null_constraint_result() - try: - self._handler.add_not_null_constraint(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_not_null_constraint", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_table(self, seqid, iprot, oprot): - args = drop_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_table_result() - try: - self._handler.drop_table(args.dbname, args.name, args.deleteData) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_table", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_table_with_environment_context(self, seqid, iprot, oprot): - args = drop_table_with_environment_context_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_table_with_environment_context_result() - try: - self._handler.drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_table_with_environment_context", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_truncate_table(self, seqid, iprot, oprot): - args = truncate_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = truncate_table_result() - try: - self._handler.truncate_table(args.dbName, args.tableName, args.partNames) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("truncate_table", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_tables(self, seqid, iprot, oprot): - args = get_tables_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_tables_result() - try: - result.success = self._handler.get_tables(args.db_name, args.pattern) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_tables", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_tables_by_type(self, seqid, iprot, oprot): - args = get_tables_by_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_tables_by_type_result() - try: - result.success = self._handler.get_tables_by_type(args.db_name, args.pattern, args.tableType) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_tables_by_type", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_table_meta(self, seqid, iprot, oprot): - args = get_table_meta_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_table_meta_result() - try: - result.success = self._handler.get_table_meta(args.db_patterns, args.tbl_patterns, args.tbl_types) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_table_meta", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_all_tables(self, seqid, iprot, oprot): - args = get_all_tables_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_all_tables_result() - try: - result.success = self._handler.get_all_tables(args.db_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_all_tables", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_table(self, seqid, iprot, oprot): - args = get_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_table_result() - try: - result.success = self._handler.get_table(args.dbname, args.tbl_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_table", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_table_objects_by_name(self, seqid, iprot, oprot): - args = get_table_objects_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_table_objects_by_name_result() - try: - result.success = self._handler.get_table_objects_by_name(args.dbname, args.tbl_names) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_table_objects_by_name", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_table_req(self, seqid, iprot, oprot): - args = get_table_req_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_table_req_result() - try: - result.success = self._handler.get_table_req(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_table_req", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_table_objects_by_name_req(self, seqid, iprot, oprot): - args = get_table_objects_by_name_req_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_table_objects_by_name_req_result() - try: - result.success = self._handler.get_table_objects_by_name_req(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except InvalidOperationException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except UnknownDBException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_table_objects_by_name_req", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_table_names_by_filter(self, seqid, iprot, oprot): - args = get_table_names_by_filter_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_table_names_by_filter_result() - try: - result.success = self._handler.get_table_names_by_filter(args.dbname, args.filter, args.max_tables) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except InvalidOperationException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except UnknownDBException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_table_names_by_filter", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_table(self, seqid, iprot, oprot): - args = alter_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_table_result() - try: - self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidOperationException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("alter_table", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_table_with_environment_context(self, seqid, iprot, oprot): - args = alter_table_with_environment_context_args() - args.read(iprot) - iprot.readMessageEnd() - 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) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidOperationException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("alter_table_with_environment_context", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_table_with_cascade(self, seqid, iprot, oprot): - args = alter_table_with_cascade_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_table_with_cascade_result() - try: - self._handler.alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidOperationException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("alter_table_with_cascade", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_partition(self, seqid, iprot, oprot): - args = add_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_partition_result() - try: - result.success = self._handler.add_partition(args.new_part) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except AlreadyExistsException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_partition", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_partition_with_environment_context(self, seqid, iprot, oprot): - args = add_partition_with_environment_context_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_partition_with_environment_context_result() - try: - result.success = self._handler.add_partition_with_environment_context(args.new_part, args.environment_context) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except AlreadyExistsException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_partition_with_environment_context", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_partitions(self, seqid, iprot, oprot): - args = add_partitions_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_partitions_result() - try: - result.success = self._handler.add_partitions(args.new_parts) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except AlreadyExistsException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_partitions", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_partitions_pspec(self, seqid, iprot, oprot): - args = add_partitions_pspec_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_partitions_pspec_result() - try: - result.success = self._handler.add_partitions_pspec(args.new_parts) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except AlreadyExistsException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_partitions_pspec", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_append_partition(self, seqid, iprot, oprot): - args = append_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = append_partition_result() - try: - result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except AlreadyExistsException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("append_partition", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_partitions_req(self, seqid, iprot, oprot): - args = add_partitions_req_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_partitions_req_result() - try: - result.success = self._handler.add_partitions_req(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except AlreadyExistsException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_partitions_req", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_append_partition_with_environment_context(self, seqid, iprot, oprot): - args = append_partition_with_environment_context_args() - args.read(iprot) - iprot.readMessageEnd() - result = append_partition_with_environment_context_result() - try: - result.success = self._handler.append_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.environment_context) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except AlreadyExistsException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("append_partition_with_environment_context", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_append_partition_by_name(self, seqid, iprot, oprot): - args = append_partition_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = append_partition_by_name_result() - try: - result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except AlreadyExistsException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("append_partition_by_name", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_append_partition_by_name_with_environment_context(self, seqid, iprot, oprot): - args = append_partition_by_name_with_environment_context_args() - args.read(iprot) - iprot.readMessageEnd() - result = append_partition_by_name_with_environment_context_result() - try: - result.success = self._handler.append_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.environment_context) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except AlreadyExistsException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("append_partition_by_name_with_environment_context", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_partition(self, seqid, iprot, oprot): - args = drop_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_partition_result() - try: - result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_partition", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_partition_with_environment_context(self, seqid, iprot, oprot): - args = drop_partition_with_environment_context_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_partition_with_environment_context_result() - try: - result.success = self._handler.drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_partition_with_environment_context", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_partition_by_name(self, seqid, iprot, oprot): - args = drop_partition_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - 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) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_partition_by_name", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_partition_by_name_with_environment_context(self, seqid, iprot, oprot): - args = drop_partition_by_name_with_environment_context_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_partition_by_name_with_environment_context_result() - try: - result.success = self._handler.drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_partition_by_name_with_environment_context", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_partitions_req(self, seqid, iprot, oprot): - args = drop_partitions_req_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_partitions_req_result() - try: - result.success = self._handler.drop_partitions_req(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_partitions_req", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partition(self, seqid, iprot, oprot): - args = get_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_result() - try: - result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partition", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_exchange_partition(self, seqid, iprot, oprot): - args = exchange_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = exchange_partition_result() - try: - result.success = self._handler.exchange_partition(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except InvalidObjectException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except InvalidInputException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("exchange_partition", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_exchange_partitions(self, seqid, iprot, oprot): - args = exchange_partitions_args() - args.read(iprot) - iprot.readMessageEnd() - result = exchange_partitions_result() - try: - result.success = self._handler.exchange_partitions(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except InvalidObjectException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except InvalidInputException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("exchange_partitions", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partition_with_auth(self, seqid, iprot, oprot): - args = get_partition_with_auth_args() - args.read(iprot) - iprot.readMessageEnd() - 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) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partition_with_auth", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partition_by_name(self, seqid, iprot, oprot): - args = get_partition_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_by_name_result() - try: - result.success = self._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partition_by_name", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partitions(self, seqid, iprot, oprot): - args = get_partitions_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_result() - try: - result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partitions", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partitions_with_auth(self, seqid, iprot, oprot): - args = get_partitions_with_auth_args() - args.read(iprot) - iprot.readMessageEnd() - 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) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partitions_with_auth", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partitions_pspec(self, seqid, iprot, oprot): - args = get_partitions_pspec_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_pspec_result() - try: - result.success = self._handler.get_partitions_pspec(args.db_name, args.tbl_name, args.max_parts) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partitions_pspec", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partition_names(self, seqid, iprot, oprot): - args = get_partition_names_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_names_result() - try: - result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partition_names", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partitions_ps(self, seqid, iprot, oprot): - args = get_partitions_ps_args() - args.read(iprot) - iprot.readMessageEnd() - 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) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partitions_ps", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partitions_ps_with_auth(self, seqid, iprot, oprot): - args = get_partitions_ps_with_auth_args() - args.read(iprot) - iprot.readMessageEnd() - 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) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partitions_ps_with_auth", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partition_names_ps(self, seqid, iprot, oprot): - args = get_partition_names_ps_args() - args.read(iprot) - iprot.readMessageEnd() - 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) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partition_names_ps", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partitions_by_filter(self, seqid, iprot, oprot): - args = get_partitions_by_filter_args() - args.read(iprot) - iprot.readMessageEnd() - 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) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partitions_by_filter", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_part_specs_by_filter(self, seqid, iprot, oprot): - args = get_part_specs_by_filter_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_part_specs_by_filter_result() - try: - result.success = self._handler.get_part_specs_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_part_specs_by_filter", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partitions_by_expr(self, seqid, iprot, oprot): - args = get_partitions_by_expr_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_by_expr_result() - try: - result.success = self._handler.get_partitions_by_expr(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partitions_by_expr", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_num_partitions_by_filter(self, seqid, iprot, oprot): - args = get_num_partitions_by_filter_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_num_partitions_by_filter_result() - try: - result.success = self._handler.get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_num_partitions_by_filter", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partitions_by_names(self, seqid, iprot, oprot): - args = get_partitions_by_names_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_by_names_result() - try: - result.success = self._handler.get_partitions_by_names(args.db_name, args.tbl_name, args.names) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partitions_by_names", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_partition(self, seqid, iprot, oprot): - args = alter_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_partition_result() - try: - self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidOperationException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("alter_partition", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_partitions(self, seqid, iprot, oprot): - args = alter_partitions_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_partitions_result() - try: - self._handler.alter_partitions(args.db_name, args.tbl_name, args.new_parts) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidOperationException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("alter_partitions", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_partitions_with_environment_context(self, seqid, iprot, oprot): - args = alter_partitions_with_environment_context_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_partitions_with_environment_context_result() - try: - self._handler.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidOperationException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("alter_partitions_with_environment_context", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_partition_with_environment_context(self, seqid, iprot, oprot): - args = alter_partition_with_environment_context_args() - args.read(iprot) - iprot.readMessageEnd() - 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) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidOperationException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("alter_partition_with_environment_context", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_rename_partition(self, seqid, iprot, oprot): - args = rename_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = rename_partition_result() - try: - self._handler.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidOperationException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("rename_partition", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_partition_name_has_valid_characters(self, seqid, iprot, oprot): - args = partition_name_has_valid_characters_args() - args.read(iprot) - iprot.readMessageEnd() - result = partition_name_has_valid_characters_result() - try: - result.success = self._handler.partition_name_has_valid_characters(args.part_vals, args.throw_exception) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("partition_name_has_valid_characters", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_config_value(self, seqid, iprot, oprot): - args = get_config_value_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_config_value_result() - try: - result.success = self._handler.get_config_value(args.name, args.defaultValue) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except ConfigValSecurityException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_config_value", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_partition_name_to_vals(self, seqid, iprot, oprot): - args = partition_name_to_vals_args() - args.read(iprot) - iprot.readMessageEnd() - result = partition_name_to_vals_result() - try: - result.success = self._handler.partition_name_to_vals(args.part_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("partition_name_to_vals", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_partition_name_to_spec(self, seqid, iprot, oprot): - args = partition_name_to_spec_args() - args.read(iprot) - iprot.readMessageEnd() - result = partition_name_to_spec_result() - try: - result.success = self._handler.partition_name_to_spec(args.part_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("partition_name_to_spec", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_markPartitionForEvent(self, seqid, iprot, oprot): - args = markPartitionForEvent_args() - args.read(iprot) - iprot.readMessageEnd() - result = markPartitionForEvent_result() - try: - self._handler.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except UnknownDBException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except UnknownTableException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except UnknownPartitionException as o5: - msg_type = TMessageType.REPLY - result.o5 = o5 - except InvalidPartitionException as o6: - msg_type = TMessageType.REPLY - result.o6 = o6 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("markPartitionForEvent", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_isPartitionMarkedForEvent(self, seqid, iprot, oprot): - args = isPartitionMarkedForEvent_args() - args.read(iprot) - iprot.readMessageEnd() - result = isPartitionMarkedForEvent_result() - try: - result.success = self._handler.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except UnknownDBException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except UnknownTableException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except UnknownPartitionException as o5: - msg_type = TMessageType.REPLY - result.o5 = o5 - except InvalidPartitionException as o6: - msg_type = TMessageType.REPLY - result.o6 = o6 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("isPartitionMarkedForEvent", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_index(self, seqid, iprot, oprot): - args = add_index_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_index_result() - try: - result.success = self._handler.add_index(args.new_index, args.index_table) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except AlreadyExistsException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_index", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_index(self, seqid, iprot, oprot): - args = alter_index_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_index_result() - try: - self._handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidOperationException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("alter_index", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_index_by_name(self, seqid, iprot, oprot): - args = drop_index_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - 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) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_index_by_name", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_index_by_name(self, seqid, iprot, oprot): - args = get_index_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_index_by_name_result() - try: - result.success = self._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_index_by_name", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_indexes(self, seqid, iprot, oprot): - args = get_indexes_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_indexes_result() - try: - result.success = self._handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_indexes", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_index_names(self, seqid, iprot, oprot): - args = get_index_names_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_index_names_result() - try: - result.success = self._handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_index_names", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_primary_keys(self, seqid, iprot, oprot): - args = get_primary_keys_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_primary_keys_result() - try: - result.success = self._handler.get_primary_keys(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_primary_keys", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_foreign_keys(self, seqid, iprot, oprot): - args = get_foreign_keys_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_foreign_keys_result() - try: - result.success = self._handler.get_foreign_keys(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_foreign_keys", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_unique_constraints(self, seqid, iprot, oprot): - args = get_unique_constraints_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_unique_constraints_result() - try: - result.success = self._handler.get_unique_constraints(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_unique_constraints", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_not_null_constraints(self, seqid, iprot, oprot): - args = get_not_null_constraints_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_not_null_constraints_result() - try: - result.success = self._handler.get_not_null_constraints(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_not_null_constraints", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_update_table_column_statistics(self, seqid, iprot, oprot): - args = update_table_column_statistics_args() - args.read(iprot) - iprot.readMessageEnd() - result = update_table_column_statistics_result() - try: - result.success = self._handler.update_table_column_statistics(args.stats_obj) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except InvalidObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except InvalidInputException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("update_table_column_statistics", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_update_partition_column_statistics(self, seqid, iprot, oprot): - args = update_partition_column_statistics_args() - args.read(iprot) - iprot.readMessageEnd() - result = update_partition_column_statistics_result() - try: - result.success = self._handler.update_partition_column_statistics(args.stats_obj) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except InvalidObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except InvalidInputException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("update_partition_column_statistics", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_table_column_statistics(self, seqid, iprot, oprot): - args = get_table_column_statistics_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_table_column_statistics_result() - try: - result.success = self._handler.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except InvalidInputException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except InvalidObjectException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_table_column_statistics", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partition_column_statistics(self, seqid, iprot, oprot): - args = get_partition_column_statistics_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_column_statistics_result() - try: - result.success = self._handler.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except InvalidInputException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except InvalidObjectException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partition_column_statistics", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_table_statistics_req(self, seqid, iprot, oprot): - args = get_table_statistics_req_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_table_statistics_req_result() - try: - result.success = self._handler.get_table_statistics_req(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_table_statistics_req", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_partitions_statistics_req(self, seqid, iprot, oprot): - args = get_partitions_statistics_req_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_statistics_req_result() - try: - result.success = self._handler.get_partitions_statistics_req(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_partitions_statistics_req", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_aggr_stats_for(self, seqid, iprot, oprot): - args = get_aggr_stats_for_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_aggr_stats_for_result() - try: - result.success = self._handler.get_aggr_stats_for(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_aggr_stats_for", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_set_aggr_stats_for(self, seqid, iprot, oprot): - args = set_aggr_stats_for_args() - args.read(iprot) - iprot.readMessageEnd() - result = set_aggr_stats_for_result() - try: - result.success = self._handler.set_aggr_stats_for(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except InvalidObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except InvalidInputException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("set_aggr_stats_for", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_delete_partition_column_statistics(self, seqid, iprot, oprot): - args = delete_partition_column_statistics_args() - args.read(iprot) - iprot.readMessageEnd() - result = delete_partition_column_statistics_result() - try: - result.success = self._handler.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except InvalidObjectException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except InvalidInputException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("delete_partition_column_statistics", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_delete_table_column_statistics(self, seqid, iprot, oprot): - args = delete_table_column_statistics_args() - args.read(iprot) - iprot.readMessageEnd() - result = delete_table_column_statistics_result() - try: - result.success = self._handler.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except InvalidObjectException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except InvalidInputException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("delete_table_column_statistics", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_create_function(self, seqid, iprot, oprot): - args = create_function_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_function_result() - try: - self._handler.create_function(args.func) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except AlreadyExistsException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except InvalidObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except NoSuchObjectException as o4: - msg_type = TMessageType.REPLY - result.o4 = o4 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("create_function", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_function(self, seqid, iprot, oprot): - args = drop_function_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_function_result() - try: - self._handler.drop_function(args.dbName, args.funcName) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_function", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_alter_function(self, seqid, iprot, oprot): - args = alter_function_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_function_result() - try: - self._handler.alter_function(args.dbName, args.funcName, args.newFunc) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidOperationException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("alter_function", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_functions(self, seqid, iprot, oprot): - args = get_functions_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_functions_result() - try: - result.success = self._handler.get_functions(args.dbName, args.pattern) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_functions", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_function(self, seqid, iprot, oprot): - args = get_function_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_function_result() - try: - result.success = self._handler.get_function(args.dbName, args.funcName) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchObjectException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_function", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_all_functions(self, seqid, iprot, oprot): - args = get_all_functions_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_all_functions_result() - try: - result.success = self._handler.get_all_functions() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_all_functions", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_create_role(self, seqid, iprot, oprot): - args = create_role_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_role_result() - try: - result.success = self._handler.create_role(args.role) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("create_role", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_drop_role(self, seqid, iprot, oprot): - args = drop_role_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_role_result() - try: - result.success = self._handler.drop_role(args.role_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("drop_role", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_role_names(self, seqid, iprot, oprot): - args = get_role_names_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_role_names_result() - try: - result.success = self._handler.get_role_names() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_role_names", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_grant_role(self, seqid, iprot, oprot): - args = grant_role_args() - args.read(iprot) - iprot.readMessageEnd() - 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) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("grant_role", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_revoke_role(self, seqid, iprot, oprot): - args = revoke_role_args() - args.read(iprot) - iprot.readMessageEnd() - result = revoke_role_result() - try: - result.success = self._handler.revoke_role(args.role_name, args.principal_name, args.principal_type) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("revoke_role", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_list_roles(self, seqid, iprot, oprot): - args = list_roles_args() - args.read(iprot) - iprot.readMessageEnd() - result = list_roles_result() - try: - result.success = self._handler.list_roles(args.principal_name, args.principal_type) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("list_roles", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_grant_revoke_role(self, seqid, iprot, oprot): - args = grant_revoke_role_args() - args.read(iprot) - iprot.readMessageEnd() - result = grant_revoke_role_result() - try: - result.success = self._handler.grant_revoke_role(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("grant_revoke_role", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_principals_in_role(self, seqid, iprot, oprot): - args = get_principals_in_role_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_principals_in_role_result() - try: - result.success = self._handler.get_principals_in_role(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_principals_in_role", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_role_grants_for_principal(self, seqid, iprot, oprot): - args = get_role_grants_for_principal_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_role_grants_for_principal_result() - try: - result.success = self._handler.get_role_grants_for_principal(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_role_grants_for_principal", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_privilege_set(self, seqid, iprot, oprot): - args = get_privilege_set_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_privilege_set_result() - try: - result.success = self._handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_privilege_set", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_list_privileges(self, seqid, iprot, oprot): - args = list_privileges_args() - args.read(iprot) - iprot.readMessageEnd() - result = list_privileges_result() - try: - result.success = self._handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("list_privileges", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_grant_privileges(self, seqid, iprot, oprot): - args = grant_privileges_args() - args.read(iprot) - iprot.readMessageEnd() - result = grant_privileges_result() - try: - result.success = self._handler.grant_privileges(args.privileges) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("grant_privileges", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_revoke_privileges(self, seqid, iprot, oprot): - args = revoke_privileges_args() - args.read(iprot) - iprot.readMessageEnd() - result = revoke_privileges_result() - try: - result.success = self._handler.revoke_privileges(args.privileges) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("revoke_privileges", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_grant_revoke_privileges(self, seqid, iprot, oprot): - args = grant_revoke_privileges_args() - args.read(iprot) - iprot.readMessageEnd() - result = grant_revoke_privileges_result() - try: - result.success = self._handler.grant_revoke_privileges(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("grant_revoke_privileges", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_set_ugi(self, seqid, iprot, oprot): - args = set_ugi_args() - args.read(iprot) - iprot.readMessageEnd() - result = set_ugi_result() - try: - result.success = self._handler.set_ugi(args.user_name, args.group_names) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("set_ugi", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_delegation_token(self, seqid, iprot, oprot): - args = get_delegation_token_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_delegation_token_result() - try: - result.success = self._handler.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_delegation_token", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_renew_delegation_token(self, seqid, iprot, oprot): - args = renew_delegation_token_args() - args.read(iprot) - iprot.readMessageEnd() - result = renew_delegation_token_result() - try: - result.success = self._handler.renew_delegation_token(args.token_str_form) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("renew_delegation_token", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_cancel_delegation_token(self, seqid, iprot, oprot): - args = cancel_delegation_token_args() - args.read(iprot) - iprot.readMessageEnd() - result = cancel_delegation_token_result() - try: - self._handler.cancel_delegation_token(args.token_str_form) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("cancel_delegation_token", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_token(self, seqid, iprot, oprot): - args = add_token_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_token_result() - try: - result.success = self._handler.add_token(args.token_identifier, args.delegation_token) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_token", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_remove_token(self, seqid, iprot, oprot): - args = remove_token_args() - args.read(iprot) - iprot.readMessageEnd() - result = remove_token_result() - try: - result.success = self._handler.remove_token(args.token_identifier) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("remove_token", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_token(self, seqid, iprot, oprot): - args = get_token_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_token_result() - try: - result.success = self._handler.get_token(args.token_identifier) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_token", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_all_token_identifiers(self, seqid, iprot, oprot): - args = get_all_token_identifiers_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_all_token_identifiers_result() - try: - result.success = self._handler.get_all_token_identifiers() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_all_token_identifiers", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_master_key(self, seqid, iprot, oprot): - args = add_master_key_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_master_key_result() - try: - result.success = self._handler.add_master_key(args.key) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_master_key", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_update_master_key(self, seqid, iprot, oprot): - args = update_master_key_args() - args.read(iprot) - iprot.readMessageEnd() - result = update_master_key_result() - try: - self._handler.update_master_key(args.seq_number, args.key) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchObjectException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except MetaException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("update_master_key", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_remove_master_key(self, seqid, iprot, oprot): - args = remove_master_key_args() - args.read(iprot) - iprot.readMessageEnd() - result = remove_master_key_result() - try: - result.success = self._handler.remove_master_key(args.key_seq) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("remove_master_key", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_master_keys(self, seqid, iprot, oprot): - args = get_master_keys_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_master_keys_result() - try: - result.success = self._handler.get_master_keys() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_master_keys", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_open_txns(self, seqid, iprot, oprot): - args = get_open_txns_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_open_txns_result() - try: - result.success = self._handler.get_open_txns() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_open_txns", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_open_txns_info(self, seqid, iprot, oprot): - args = get_open_txns_info_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_open_txns_info_result() - try: - result.success = self._handler.get_open_txns_info() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_open_txns_info", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_open_txns(self, seqid, iprot, oprot): - args = open_txns_args() - args.read(iprot) - iprot.readMessageEnd() - result = open_txns_result() - try: - result.success = self._handler.open_txns(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("open_txns", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_abort_txn(self, seqid, iprot, oprot): - args = abort_txn_args() - args.read(iprot) - iprot.readMessageEnd() - result = abort_txn_result() - try: - self._handler.abort_txn(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchTxnException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("abort_txn", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_abort_txns(self, seqid, iprot, oprot): - args = abort_txns_args() - args.read(iprot) - iprot.readMessageEnd() - result = abort_txns_result() - try: - self._handler.abort_txns(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchTxnException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("abort_txns", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_commit_txn(self, seqid, iprot, oprot): - args = commit_txn_args() - args.read(iprot) - iprot.readMessageEnd() - result = commit_txn_result() - try: - self._handler.commit_txn(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchTxnException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except TxnAbortedException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("commit_txn", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_lock(self, seqid, iprot, oprot): - args = lock_args() - args.read(iprot) - iprot.readMessageEnd() - result = lock_result() - try: - result.success = self._handler.lock(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchTxnException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except TxnAbortedException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("lock", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_check_lock(self, seqid, iprot, oprot): - args = check_lock_args() - args.read(iprot) - iprot.readMessageEnd() - result = check_lock_result() - try: - result.success = self._handler.check_lock(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchTxnException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except TxnAbortedException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except NoSuchLockException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("check_lock", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_unlock(self, seqid, iprot, oprot): - args = unlock_args() - args.read(iprot) - iprot.readMessageEnd() - result = unlock_result() - try: - self._handler.unlock(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchLockException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except TxnOpenException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("unlock", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_show_locks(self, seqid, iprot, oprot): - args = show_locks_args() - args.read(iprot) - iprot.readMessageEnd() - result = show_locks_result() - try: - result.success = self._handler.show_locks(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("show_locks", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_heartbeat(self, seqid, iprot, oprot): - args = heartbeat_args() - args.read(iprot) - iprot.readMessageEnd() - result = heartbeat_result() - try: - self._handler.heartbeat(args.ids) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchLockException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except NoSuchTxnException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except TxnAbortedException as o3: - msg_type = TMessageType.REPLY - result.o3 = o3 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("heartbeat", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_heartbeat_txn_range(self, seqid, iprot, oprot): - args = heartbeat_txn_range_args() - args.read(iprot) - iprot.readMessageEnd() - result = heartbeat_txn_range_result() - try: - result.success = self._handler.heartbeat_txn_range(args.txns) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("heartbeat_txn_range", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_compact(self, seqid, iprot, oprot): - args = compact_args() - args.read(iprot) - iprot.readMessageEnd() - result = compact_result() - try: - self._handler.compact(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("compact", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_compact2(self, seqid, iprot, oprot): - args = compact2_args() - args.read(iprot) - iprot.readMessageEnd() - result = compact2_result() - try: - result.success = self._handler.compact2(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("compact2", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_show_compact(self, seqid, iprot, oprot): - args = show_compact_args() - args.read(iprot) - iprot.readMessageEnd() - result = show_compact_result() - try: - result.success = self._handler.show_compact(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("show_compact", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_add_dynamic_partitions(self, seqid, iprot, oprot): - args = add_dynamic_partitions_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_dynamic_partitions_result() - try: - self._handler.add_dynamic_partitions(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except NoSuchTxnException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except TxnAbortedException as o2: - msg_type = TMessageType.REPLY - result.o2 = o2 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("add_dynamic_partitions", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_next_notification(self, seqid, iprot, oprot): - args = get_next_notification_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_next_notification_result() - try: - result.success = self._handler.get_next_notification(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_next_notification", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_current_notificationEventId(self, seqid, iprot, oprot): - args = get_current_notificationEventId_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_current_notificationEventId_result() - try: - result.success = self._handler.get_current_notificationEventId() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_current_notificationEventId", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_fire_listener_event(self, seqid, iprot, oprot): - args = fire_listener_event_args() - args.read(iprot) - iprot.readMessageEnd() - result = fire_listener_event_result() - try: - result.success = self._handler.fire_listener_event(args.rqst) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("fire_listener_event", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_flushCache(self, seqid, iprot, oprot): - args = flushCache_args() - args.read(iprot) - iprot.readMessageEnd() - result = flushCache_result() - try: - self._handler.flushCache() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("flushCache", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_cm_recycle(self, seqid, iprot, oprot): - args = cm_recycle_args() - args.read(iprot) - iprot.readMessageEnd() - result = cm_recycle_result() - try: - result.success = self._handler.cm_recycle(args.request) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("cm_recycle", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_file_metadata_by_expr(self, seqid, iprot, oprot): - args = get_file_metadata_by_expr_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_file_metadata_by_expr_result() - try: - result.success = self._handler.get_file_metadata_by_expr(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_file_metadata_by_expr", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_file_metadata(self, seqid, iprot, oprot): - args = get_file_metadata_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_file_metadata_result() - try: - result.success = self._handler.get_file_metadata(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_file_metadata", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_put_file_metadata(self, seqid, iprot, oprot): - args = put_file_metadata_args() - args.read(iprot) - iprot.readMessageEnd() - result = put_file_metadata_result() - try: - result.success = self._handler.put_file_metadata(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("put_file_metadata", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_clear_file_metadata(self, seqid, iprot, oprot): - args = clear_file_metadata_args() - args.read(iprot) - iprot.readMessageEnd() - result = clear_file_metadata_result() - try: - result.success = self._handler.clear_file_metadata(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("clear_file_metadata", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_cache_file_metadata(self, seqid, iprot, oprot): - args = cache_file_metadata_args() - args.read(iprot) - iprot.readMessageEnd() - result = cache_file_metadata_result() - try: - result.success = self._handler.cache_file_metadata(args.req) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("cache_file_metadata", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get_metastore_db_uuid(self, seqid, iprot, oprot): - args = get_metastore_db_uuid_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_metastore_db_uuid_result() - try: - result.success = self._handler.get_metastore_db_uuid() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except MetaException as o1: - msg_type = TMessageType.REPLY - result.o1 = o1 - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get_metastore_db_uuid", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - -# HELPER FUNCTIONS AND STRUCTURES - -class getMetaConf_args: - """ - Attributes: - - key - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'key', None, None, ), # 1 - ) - - def __init__(self, key=None,): - self.key = key - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.key = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getMetaConf_args') - if self.key is not None: - oprot.writeFieldBegin('key', TType.STRING, 1) - oprot.writeString(self.key) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.key) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getMetaConf_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getMetaConf_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class setMetaConf_args: - """ - Attributes: - - key - - value - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'key', None, None, ), # 1 - (2, TType.STRING, 'value', None, None, ), # 2 - ) - - def __init__(self, key=None, value=None,): - self.key = key - self.value = value - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.key = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.value = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('setMetaConf_args') - if self.key is not None: - oprot.writeFieldBegin('key', TType.STRING, 1) - oprot.writeString(self.key) - oprot.writeFieldEnd() - if self.value is not None: - oprot.writeFieldBegin('value', TType.STRING, 2) - oprot.writeString(self.value) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.key) - value = (value * 31) ^ hash(self.value) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class setMetaConf_result: - """ - Attributes: - - o1 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, o1=None,): - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('setMetaConf_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_database_args: - """ - Attributes: - - database - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 1 - ) - - def __init__(self, database=None,): - self.database = database - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.database = Database() - self.database.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_database_args') - if self.database is not None: - oprot.writeFieldBegin('database', TType.STRUCT, 1) - self.database.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.database) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_database_result: - """ - Attributes: - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, o1=None, o2=None, o3=None,): - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_database_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_database_args: - """ - Attributes: - - name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - ) - - def __init__(self, name=None,): - self.name = name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_database_args') - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_database_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Database, Database.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Database() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_database_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_database_args: - """ - Attributes: - - name - - deleteData - - cascade - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.BOOL, 'deleteData', None, None, ), # 2 - (3, TType.BOOL, 'cascade', None, None, ), # 3 - ) - - def __init__(self, name=None, deleteData=None, cascade=None,): - self.name = name - self.deleteData = deleteData - self.cascade = cascade - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.BOOL: - self.cascade = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_database_args') - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.deleteData is not None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 2) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - if self.cascade is not None: - oprot.writeFieldBegin('cascade', TType.BOOL, 3) - oprot.writeBool(self.cascade) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.name) - value = (value * 31) ^ hash(self.deleteData) - value = (value * 31) ^ hash(self.cascade) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_database_result: - """ - Attributes: - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, o1=None, o2=None, o3=None,): - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidOperationException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_database_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_databases_args: - """ - Attributes: - - pattern - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'pattern', None, None, ), # 1 - ) - - def __init__(self, pattern=None,): - self.pattern = pattern - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.pattern = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_databases_args') - if self.pattern is not None: - oprot.writeFieldBegin('pattern', TType.STRING, 1) - oprot.writeString(self.pattern) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.pattern) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_databases_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype625, _size622) = iprot.readListBegin() - for _i626 in xrange(_size622): - _elem627 = iprot.readString() - self.success.append(_elem627) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_databases_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter628 in self.success: - oprot.writeString(iter628) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_all_databases_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_all_databases_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_all_databases_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype632, _size629) = iprot.readListBegin() - for _i633 in xrange(_size629): - _elem634 = iprot.readString() - self.success.append(_elem634) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_all_databases_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter635 in self.success: - oprot.writeString(iter635) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_database_args: - """ - Attributes: - - dbname - - db - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRUCT, 'db', (Database, Database.thrift_spec), None, ), # 2 - ) - - def __init__(self, dbname=None, db=None,): - self.dbname = dbname - self.db = db - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.db = Database() - self.db.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_database_args') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.db is not None: - oprot.writeFieldBegin('db', TType.STRUCT, 2) - self.db.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.db) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_database_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_database_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_type_args: - """ - Attributes: - - name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - ) - - def __init__(self, name=None,): - self.name = name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_type_args') - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_type_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Type, Type.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Type() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_type_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_type_args: - """ - Attributes: - - type - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'type', (Type, Type.thrift_spec), None, ), # 1 - ) - - def __init__(self, type=None,): - self.type = type - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.type = Type() - self.type.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_type_args') - if self.type is not None: - oprot.writeFieldBegin('type', TType.STRUCT, 1) - self.type.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.type) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_type_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_type_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_type_args: - """ - Attributes: - - type - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'type', None, None, ), # 1 - ) - - def __init__(self, type=None,): - self.type = type - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.type = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_type_args') - if self.type is not None: - oprot.writeFieldBegin('type', TType.STRING, 1) - oprot.writeString(self.type) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.type) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_type_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_type_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_type_all_args: - """ - Attributes: - - name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - ) - - def __init__(self, name=None,): - self.name = name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_type_all_args') - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_type_all_result: - """ - Attributes: - - success - - o2 - """ - - thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(Type, Type.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o2=None,): - self.success = success - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.MAP: - self.success = {} - (_ktype637, _vtype638, _size636 ) = iprot.readMapBegin() - for _i640 in xrange(_size636): - _key641 = iprot.readString() - _val642 = Type() - _val642.read(iprot) - self.success[_key641] = _val642 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_type_all_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) - oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) - for kiter643,viter644 in self.success.items(): - oprot.writeString(kiter643) - viter644.write(oprot) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 1) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_fields_args: - """ - Attributes: - - db_name - - table_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 - ) - - def __init__(self, db_name=None, table_name=None,): - self.db_name = db_name - self.table_name = table_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.table_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_fields_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.table_name is not None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.table_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_fields_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype648, _size645) = iprot.readListBegin() - for _i649 in xrange(_size645): - _elem650 = FieldSchema() - _elem650.read(iprot) - self.success.append(_elem650) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = UnknownTableException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_fields_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter651 in self.success: - iter651.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_fields_with_environment_context_args: - """ - Attributes: - - db_name - - table_name - - environment_context - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 - (3, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 3 - ) - - def __init__(self, db_name=None, table_name=None, environment_context=None,): - self.db_name = db_name - self.table_name = table_name - self.environment_context = environment_context - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.table_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.environment_context = EnvironmentContext() - self.environment_context.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_fields_with_environment_context_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.table_name is not None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) - oprot.writeFieldEnd() - if self.environment_context is not None: - oprot.writeFieldBegin('environment_context', TType.STRUCT, 3) - self.environment_context.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.table_name) - value = (value * 31) ^ hash(self.environment_context) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_fields_with_environment_context_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype655, _size652) = iprot.readListBegin() - for _i656 in xrange(_size652): - _elem657 = FieldSchema() - _elem657.read(iprot) - self.success.append(_elem657) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = UnknownTableException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_fields_with_environment_context_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter658 in self.success: - iter658.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_schema_args: - """ - Attributes: - - db_name - - table_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 - ) - - def __init__(self, db_name=None, table_name=None,): - self.db_name = db_name - self.table_name = table_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.table_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_schema_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.table_name is not None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.table_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_schema_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype662, _size659) = iprot.readListBegin() - for _i663 in xrange(_size659): - _elem664 = FieldSchema() - _elem664.read(iprot) - self.success.append(_elem664) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = UnknownTableException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_schema_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter665 in self.success: - iter665.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_schema_with_environment_context_args: - """ - Attributes: - - db_name - - table_name - - environment_context - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 - (3, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 3 - ) - - def __init__(self, db_name=None, table_name=None, environment_context=None,): - self.db_name = db_name - self.table_name = table_name - self.environment_context = environment_context - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.table_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.environment_context = EnvironmentContext() - self.environment_context.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_schema_with_environment_context_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.table_name is not None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) - oprot.writeFieldEnd() - if self.environment_context is not None: - oprot.writeFieldBegin('environment_context', TType.STRUCT, 3) - self.environment_context.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.table_name) - value = (value * 31) ^ hash(self.environment_context) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_schema_with_environment_context_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype669, _size666) = iprot.readListBegin() - for _i670 in xrange(_size666): - _elem671 = FieldSchema() - _elem671.read(iprot) - self.success.append(_elem671) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = UnknownTableException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_schema_with_environment_context_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter672 in self.success: - iter672.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_table_args: - """ - Attributes: - - tbl - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1 - ) - - def __init__(self, tbl=None,): - self.tbl = tbl - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.tbl = Table() - self.tbl.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_table_args') - if self.tbl is not None: - oprot.writeFieldBegin('tbl', TType.STRUCT, 1) - self.tbl.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tbl) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_table_result: - """ - Attributes: - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 - ) - - def __init__(self, o1=None, o2=None, o3=None, o4=None,): - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = NoSuchObjectException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_table_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_table_with_environment_context_args: - """ - Attributes: - - tbl - - environment_context - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 2 - ) - - def __init__(self, tbl=None, environment_context=None,): - self.tbl = tbl - self.environment_context = environment_context - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.tbl = Table() - self.tbl.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.environment_context = EnvironmentContext() - self.environment_context.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_table_with_environment_context_args') - if self.tbl is not None: - oprot.writeFieldBegin('tbl', TType.STRUCT, 1) - self.tbl.write(oprot) - oprot.writeFieldEnd() - if self.environment_context is not None: - oprot.writeFieldBegin('environment_context', TType.STRUCT, 2) - self.environment_context.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tbl) - value = (value * 31) ^ hash(self.environment_context) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_table_with_environment_context_result: - """ - Attributes: - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 - ) - - def __init__(self, o1=None, o2=None, o3=None, o4=None,): - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = NoSuchObjectException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_table_with_environment_context_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_table_with_constraints_args: - """ - Attributes: - - tbl - - primaryKeys - - foreignKeys - - uniqueConstraints - - notNullConstraints - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1 - (2, TType.LIST, 'primaryKeys', (TType.STRUCT,(SQLPrimaryKey, SQLPrimaryKey.thrift_spec)), None, ), # 2 - (3, TType.LIST, 'foreignKeys', (TType.STRUCT,(SQLForeignKey, SQLForeignKey.thrift_spec)), None, ), # 3 - (4, TType.LIST, 'uniqueConstraints', (TType.STRUCT,(SQLUniqueConstraint, SQLUniqueConstraint.thrift_spec)), None, ), # 4 - (5, TType.LIST, 'notNullConstraints', (TType.STRUCT,(SQLNotNullConstraint, SQLNotNullConstraint.thrift_spec)), None, ), # 5 - ) - - def __init__(self, tbl=None, primaryKeys=None, foreignKeys=None, uniqueConstraints=None, notNullConstraints=None,): - self.tbl = tbl - self.primaryKeys = primaryKeys - self.foreignKeys = foreignKeys - self.uniqueConstraints = uniqueConstraints - self.notNullConstraints = notNullConstraints - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.tbl = Table() - self.tbl.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.primaryKeys = [] - (_etype676, _size673) = iprot.readListBegin() - for _i677 in xrange(_size673): - _elem678 = SQLPrimaryKey() - _elem678.read(iprot) - self.primaryKeys.append(_elem678) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.foreignKeys = [] - (_etype682, _size679) = iprot.readListBegin() - for _i683 in xrange(_size679): - _elem684 = SQLForeignKey() - _elem684.read(iprot) - self.foreignKeys.append(_elem684) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.uniqueConstraints = [] - (_etype688, _size685) = iprot.readListBegin() - for _i689 in xrange(_size685): - _elem690 = SQLUniqueConstraint() - _elem690.read(iprot) - self.uniqueConstraints.append(_elem690) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.LIST: - self.notNullConstraints = [] - (_etype694, _size691) = iprot.readListBegin() - for _i695 in xrange(_size691): - _elem696 = SQLNotNullConstraint() - _elem696.read(iprot) - self.notNullConstraints.append(_elem696) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_table_with_constraints_args') - if self.tbl is not None: - oprot.writeFieldBegin('tbl', TType.STRUCT, 1) - self.tbl.write(oprot) - oprot.writeFieldEnd() - if self.primaryKeys is not None: - oprot.writeFieldBegin('primaryKeys', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys)) - for iter697 in self.primaryKeys: - iter697.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.foreignKeys is not None: - oprot.writeFieldBegin('foreignKeys', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys)) - for iter698 in self.foreignKeys: - iter698.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.uniqueConstraints is not None: - oprot.writeFieldBegin('uniqueConstraints', TType.LIST, 4) - oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints)) - for iter699 in self.uniqueConstraints: - iter699.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.notNullConstraints is not None: - oprot.writeFieldBegin('notNullConstraints', TType.LIST, 5) - oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints)) - for iter700 in self.notNullConstraints: - iter700.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tbl) - value = (value * 31) ^ hash(self.primaryKeys) - value = (value * 31) ^ hash(self.foreignKeys) - value = (value * 31) ^ hash(self.uniqueConstraints) - value = (value * 31) ^ hash(self.notNullConstraints) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_table_with_constraints_result: - """ - Attributes: - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 - ) - - def __init__(self, o1=None, o2=None, o3=None, o4=None,): - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = NoSuchObjectException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_table_with_constraints_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_constraint_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (DropConstraintRequest, DropConstraintRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = DropConstraintRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_constraint_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_constraint_result: - """ - Attributes: - - o1 - - o3 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o3=None,): - self.o1 = o1 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_constraint_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 2) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_primary_key_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (AddPrimaryKeyRequest, AddPrimaryKeyRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = AddPrimaryKeyRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_primary_key_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_primary_key_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_primary_key_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_foreign_key_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (AddForeignKeyRequest, AddForeignKeyRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = AddForeignKeyRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_foreign_key_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_foreign_key_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_foreign_key_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_unique_constraint_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (AddUniqueConstraintRequest, AddUniqueConstraintRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = AddUniqueConstraintRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_unique_constraint_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_unique_constraint_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_unique_constraint_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_not_null_constraint_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (AddNotNullConstraintRequest, AddNotNullConstraintRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = AddNotNullConstraintRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_not_null_constraint_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_not_null_constraint_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_not_null_constraint_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_table_args: - """ - Attributes: - - dbname - - name - - deleteData - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'name', None, None, ), # 2 - (3, TType.BOOL, 'deleteData', None, None, ), # 3 - ) - - def __init__(self, dbname=None, name=None, deleteData=None,): - self.dbname = dbname - self.name = name - self.deleteData = deleteData - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_table_args') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.deleteData is not None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 3) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.name) - value = (value * 31) ^ hash(self.deleteData) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_table_result: - """ - Attributes: - - o1 - - o3 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o3=None,): - self.o1 = o1 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_table_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 2) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_table_with_environment_context_args: - """ - Attributes: - - dbname - - name - - deleteData - - environment_context - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'name', None, None, ), # 2 - (3, TType.BOOL, 'deleteData', None, None, ), # 3 - (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4 - ) - - def __init__(self, dbname=None, name=None, deleteData=None, environment_context=None,): - self.dbname = dbname - self.name = name - self.deleteData = deleteData - self.environment_context = environment_context - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.environment_context = EnvironmentContext() - self.environment_context.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_table_with_environment_context_args') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.deleteData is not None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 3) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - if self.environment_context is not None: - oprot.writeFieldBegin('environment_context', TType.STRUCT, 4) - self.environment_context.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.name) - value = (value * 31) ^ hash(self.deleteData) - value = (value * 31) ^ hash(self.environment_context) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_table_with_environment_context_result: - """ - Attributes: - - o1 - - o3 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o3=None,): - self.o1 = o1 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_table_with_environment_context_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 2) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class truncate_table_args: - """ - Attributes: - - dbName - - tableName - - partNames - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'tableName', None, None, ), # 2 - (3, TType.LIST, 'partNames', (TType.STRING,None), None, ), # 3 - ) - - def __init__(self, dbName=None, tableName=None, partNames=None,): - self.dbName = dbName - self.tableName = tableName - self.partNames = partNames - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tableName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.partNames = [] - (_etype704, _size701) = iprot.readListBegin() - for _i705 in xrange(_size701): - _elem706 = iprot.readString() - self.partNames.append(_elem706) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('truncate_table_args') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 2) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.partNames is not None: - oprot.writeFieldBegin('partNames', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.partNames)) - for iter707 in self.partNames: - oprot.writeString(iter707) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tableName) - value = (value * 31) ^ hash(self.partNames) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class truncate_table_result: - """ - Attributes: - - o1 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, o1=None,): - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('truncate_table_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_tables_args: - """ - Attributes: - - db_name - - pattern - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'pattern', None, None, ), # 2 - ) - - def __init__(self, db_name=None, pattern=None,): - self.db_name = db_name - self.pattern = pattern - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.pattern = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_tables_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.pattern is not None: - oprot.writeFieldBegin('pattern', TType.STRING, 2) - oprot.writeString(self.pattern) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.pattern) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_tables_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype711, _size708) = iprot.readListBegin() - for _i712 in xrange(_size708): - _elem713 = iprot.readString() - self.success.append(_elem713) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_tables_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter714 in self.success: - oprot.writeString(iter714) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_tables_by_type_args: - """ - Attributes: - - db_name - - pattern - - tableType - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'pattern', None, None, ), # 2 - (3, TType.STRING, 'tableType', None, None, ), # 3 - ) - - def __init__(self, db_name=None, pattern=None, tableType=None,): - self.db_name = db_name - self.pattern = pattern - self.tableType = tableType - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.pattern = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.tableType = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_tables_by_type_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.pattern is not None: - oprot.writeFieldBegin('pattern', TType.STRING, 2) - oprot.writeString(self.pattern) - oprot.writeFieldEnd() - if self.tableType is not None: - oprot.writeFieldBegin('tableType', TType.STRING, 3) - oprot.writeString(self.tableType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.pattern) - value = (value * 31) ^ hash(self.tableType) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_tables_by_type_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype718, _size715) = iprot.readListBegin() - for _i719 in xrange(_size715): - _elem720 = iprot.readString() - self.success.append(_elem720) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_tables_by_type_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter721 in self.success: - oprot.writeString(iter721) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_meta_args: - """ - Attributes: - - db_patterns - - tbl_patterns - - tbl_types - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_patterns', None, None, ), # 1 - (2, TType.STRING, 'tbl_patterns', None, None, ), # 2 - (3, TType.LIST, 'tbl_types', (TType.STRING,None), None, ), # 3 - ) - - def __init__(self, db_patterns=None, tbl_patterns=None, tbl_types=None,): - self.db_patterns = db_patterns - self.tbl_patterns = tbl_patterns - self.tbl_types = tbl_types - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_patterns = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_patterns = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.tbl_types = [] - (_etype725, _size722) = iprot.readListBegin() - for _i726 in xrange(_size722): - _elem727 = iprot.readString() - self.tbl_types.append(_elem727) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_meta_args') - if self.db_patterns is not None: - oprot.writeFieldBegin('db_patterns', TType.STRING, 1) - oprot.writeString(self.db_patterns) - oprot.writeFieldEnd() - if self.tbl_patterns is not None: - oprot.writeFieldBegin('tbl_patterns', TType.STRING, 2) - oprot.writeString(self.tbl_patterns) - oprot.writeFieldEnd() - if self.tbl_types is not None: - oprot.writeFieldBegin('tbl_types', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.tbl_types)) - for iter728 in self.tbl_types: - oprot.writeString(iter728) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_patterns) - value = (value * 31) ^ hash(self.tbl_patterns) - value = (value * 31) ^ hash(self.tbl_types) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_meta_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TableMeta, TableMeta.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype732, _size729) = iprot.readListBegin() - for _i733 in xrange(_size729): - _elem734 = TableMeta() - _elem734.read(iprot) - self.success.append(_elem734) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_meta_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter735 in self.success: - iter735.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_all_tables_args: - """ - Attributes: - - db_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - ) - - def __init__(self, db_name=None,): - self.db_name = db_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_all_tables_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_all_tables_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype739, _size736) = iprot.readListBegin() - for _i740 in xrange(_size736): - _elem741 = iprot.readString() - self.success.append(_elem741) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_all_tables_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter742 in self.success: - oprot.writeString(iter742) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_args: - """ - Attributes: - - dbname - - tbl_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - ) - - def __init__(self, dbname=None, tbl_name=None,): - self.dbname = dbname - self.tbl_name = tbl_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_args') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.tbl_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Table() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_objects_by_name_args: - """ - Attributes: - - dbname - - tbl_names - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.LIST, 'tbl_names', (TType.STRING,None), None, ), # 2 - ) - - def __init__(self, dbname=None, tbl_names=None,): - self.dbname = dbname - self.tbl_names = tbl_names - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.tbl_names = [] - (_etype746, _size743) = iprot.readListBegin() - for _i747 in xrange(_size743): - _elem748 = iprot.readString() - self.tbl_names.append(_elem748) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_objects_by_name_args') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tbl_names is not None: - oprot.writeFieldBegin('tbl_names', TType.LIST, 2) - oprot.writeListBegin(TType.STRING, len(self.tbl_names)) - for iter749 in self.tbl_names: - oprot.writeString(iter749) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.tbl_names) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_objects_by_name_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Table, Table.thrift_spec)), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype753, _size750) = iprot.readListBegin() - for _i754 in xrange(_size750): - _elem755 = Table() - _elem755.read(iprot) - self.success.append(_elem755) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_objects_by_name_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter756 in self.success: - iter756.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_req_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (GetTableRequest, GetTableRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = GetTableRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_req_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_req_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (GetTableResult, GetTableResult.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = GetTableResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_req_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_objects_by_name_req_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (GetTablesRequest, GetTablesRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = GetTablesRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_objects_by_name_req_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_objects_by_name_req_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (GetTablesResult, GetTablesResult.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = GetTablesResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidOperationException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_objects_by_name_req_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_names_by_filter_args: - """ - Attributes: - - dbname - - filter - - max_tables - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'filter', None, None, ), # 2 - (3, TType.I16, 'max_tables', None, -1, ), # 3 - ) - - def __init__(self, dbname=None, filter=None, max_tables=thrift_spec[3][4],): - self.dbname = dbname - self.filter = filter - self.max_tables = max_tables - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.filter = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.max_tables = iprot.readI16() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_names_by_filter_args') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.filter is not None: - oprot.writeFieldBegin('filter', TType.STRING, 2) - oprot.writeString(self.filter) - oprot.writeFieldEnd() - if self.max_tables is not None: - oprot.writeFieldBegin('max_tables', TType.I16, 3) - oprot.writeI16(self.max_tables) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.filter) - value = (value * 31) ^ hash(self.max_tables) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_names_by_filter_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype760, _size757) = iprot.readListBegin() - for _i761 in xrange(_size757): - _elem762 = iprot.readString() - self.success.append(_elem762) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidOperationException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_names_by_filter_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter763 in self.success: - oprot.writeString(iter763) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_table_args: - """ - Attributes: - - dbname - - tbl_name - - new_tbl - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3 - ) - - def __init__(self, dbname=None, tbl_name=None, new_tbl=None,): - self.dbname = dbname - self.tbl_name = tbl_name - self.new_tbl = new_tbl - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.new_tbl = Table() - self.new_tbl.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_table_args') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.new_tbl is not None: - oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) - self.new_tbl.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.new_tbl) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_table_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_table_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_table_with_environment_context_args: - """ - Attributes: - - dbname - - tbl_name - - new_tbl - - environment_context - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4 - ) - - def __init__(self, dbname=None, tbl_name=None, new_tbl=None, environment_context=None,): - self.dbname = dbname - self.tbl_name = tbl_name - self.new_tbl = new_tbl - self.environment_context = environment_context - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.new_tbl = Table() - self.new_tbl.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.environment_context = EnvironmentContext() - self.environment_context.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_table_with_environment_context_args') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.new_tbl is not None: - oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) - self.new_tbl.write(oprot) - oprot.writeFieldEnd() - if self.environment_context is not None: - oprot.writeFieldBegin('environment_context', TType.STRUCT, 4) - self.environment_context.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.new_tbl) - value = (value * 31) ^ hash(self.environment_context) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_table_with_environment_context_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_table_with_environment_context_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_table_with_cascade_args: - """ - Attributes: - - dbname - - tbl_name - - new_tbl - - cascade - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3 - (4, TType.BOOL, 'cascade', None, None, ), # 4 - ) - - def __init__(self, dbname=None, tbl_name=None, new_tbl=None, cascade=None,): - self.dbname = dbname - self.tbl_name = tbl_name - self.new_tbl = new_tbl - self.cascade = cascade - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.new_tbl = Table() - self.new_tbl.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.cascade = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_table_with_cascade_args') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.new_tbl is not None: - oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) - self.new_tbl.write(oprot) - oprot.writeFieldEnd() - if self.cascade is not None: - oprot.writeFieldBegin('cascade', TType.BOOL, 4) - oprot.writeBool(self.cascade) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.new_tbl) - value = (value * 31) ^ hash(self.cascade) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_table_with_cascade_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_table_with_cascade_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_partition_args: - """ - Attributes: - - new_part - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1 - ) - - def __init__(self, new_part=None,): - self.new_part = new_part - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.new_part = Partition() - self.new_part.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_partition_args') - if self.new_part is not None: - oprot.writeFieldBegin('new_part', TType.STRUCT, 1) - self.new_part.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.new_part) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_partition_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_partition_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_partition_with_environment_context_args: - """ - Attributes: - - new_part - - environment_context - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 2 - ) - - def __init__(self, new_part=None, environment_context=None,): - self.new_part = new_part - self.environment_context = environment_context - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.new_part = Partition() - self.new_part.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.environment_context = EnvironmentContext() - self.environment_context.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_partition_with_environment_context_args') - if self.new_part is not None: - oprot.writeFieldBegin('new_part', TType.STRUCT, 1) - self.new_part.write(oprot) - oprot.writeFieldEnd() - if self.environment_context is not None: - oprot.writeFieldBegin('environment_context', TType.STRUCT, 2) - self.environment_context.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.new_part) - value = (value * 31) ^ hash(self.environment_context) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_partition_with_environment_context_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_partition_with_environment_context_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_partitions_args: - """ - Attributes: - - new_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'new_parts', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1 - ) - - def __init__(self, new_parts=None,): - self.new_parts = new_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.new_parts = [] - (_etype767, _size764) = iprot.readListBegin() - for _i768 in xrange(_size764): - _elem769 = Partition() - _elem769.read(iprot) - self.new_parts.append(_elem769) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_partitions_args') - if self.new_parts is not None: - oprot.writeFieldBegin('new_parts', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) - for iter770 in self.new_parts: - iter770.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.new_parts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_partitions_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.I32: - self.success = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_partitions_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_partitions_pspec_args: - """ - Attributes: - - new_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'new_parts', (TType.STRUCT,(PartitionSpec, PartitionSpec.thrift_spec)), None, ), # 1 - ) - - def __init__(self, new_parts=None,): - self.new_parts = new_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.new_parts = [] - (_etype774, _size771) = iprot.readListBegin() - for _i775 in xrange(_size771): - _elem776 = PartitionSpec() - _elem776.read(iprot) - self.new_parts.append(_elem776) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_partitions_pspec_args') - if self.new_parts is not None: - oprot.writeFieldBegin('new_parts', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) - for iter777 in self.new_parts: - iter777.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.new_parts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_partitions_pspec_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.I32: - self.success = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_partitions_pspec_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_partition_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype781, _size778) = iprot.readListBegin() - for _i782 in xrange(_size778): - _elem783 = iprot.readString() - self.part_vals.append(_elem783) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('append_partition_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter784 in self.part_vals: - oprot.writeString(iter784) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_vals) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_partition_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('append_partition_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_partitions_req_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (AddPartitionsRequest, AddPartitionsRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = AddPartitionsRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_partitions_req_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_partitions_req_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (AddPartitionsResult, AddPartitionsResult.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = AddPartitionsResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_partitions_req_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_partition_with_environment_context_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - environment_context - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, environment_context=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.environment_context = environment_context - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype788, _size785) = iprot.readListBegin() - for _i789 in xrange(_size785): - _elem790 = iprot.readString() - self.part_vals.append(_elem790) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.environment_context = EnvironmentContext() - self.environment_context.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('append_partition_with_environment_context_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter791 in self.part_vals: - oprot.writeString(iter791) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.environment_context is not None: - oprot.writeFieldBegin('environment_context', TType.STRUCT, 4) - self.environment_context.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_vals) - value = (value * 31) ^ hash(self.environment_context) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_partition_with_environment_context_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('append_partition_with_environment_context_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_partition_by_name_args: - """ - Attributes: - - db_name - - tbl_name - - part_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, part_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('append_partition_by_name_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_name is not None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_partition_by_name_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('append_partition_by_name_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_partition_by_name_with_environment_context_args: - """ - Attributes: - - db_name - - tbl_name - - part_name - - environment_context - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 - (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_name=None, environment_context=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name - self.environment_context = environment_context - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.environment_context = EnvironmentContext() - self.environment_context.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('append_partition_by_name_with_environment_context_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_name is not None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - if self.environment_context is not None: - oprot.writeFieldBegin('environment_context', TType.STRUCT, 4) - self.environment_context.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_name) - value = (value * 31) ^ hash(self.environment_context) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_partition_by_name_with_environment_context_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('append_partition_by_name_with_environment_context_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partition_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - deleteData - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.deleteData = deleteData - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype795, _size792) = iprot.readListBegin() - for _i796 in xrange(_size792): - _elem797 = iprot.readString() - self.part_vals.append(_elem797) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partition_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter798 in self.part_vals: - oprot.writeString(iter798) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.deleteData is not None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_vals) - value = (value * 31) ^ hash(self.deleteData) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partition_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partition_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partition_with_environment_context_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - deleteData - - environment_context - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 - (5, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 5 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None, environment_context=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.deleteData = deleteData - self.environment_context = environment_context - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype802, _size799) = iprot.readListBegin() - for _i803 in xrange(_size799): - _elem804 = iprot.readString() - self.part_vals.append(_elem804) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRUCT: - self.environment_context = EnvironmentContext() - self.environment_context.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partition_with_environment_context_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter805 in self.part_vals: - oprot.writeString(iter805) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.deleteData is not None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - if self.environment_context is not None: - oprot.writeFieldBegin('environment_context', TType.STRUCT, 5) - self.environment_context.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_vals) - value = (value * 31) ^ hash(self.deleteData) - value = (value * 31) ^ hash(self.environment_context) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partition_with_environment_context_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partition_with_environment_context_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partition_by_name_args: - """ - Attributes: - - db_name - - tbl_name - - part_name - - deleteData - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_name=None, deleteData=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name - self.deleteData = deleteData - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partition_by_name_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_name is not None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - if self.deleteData is not None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_name) - value = (value * 31) ^ hash(self.deleteData) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partition_by_name_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partition_by_name_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partition_by_name_with_environment_context_args: - """ - Attributes: - - db_name - - tbl_name - - part_name - - deleteData - - environment_context - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 - (5, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 5 - ) - - def __init__(self, db_name=None, tbl_name=None, part_name=None, deleteData=None, environment_context=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name - self.deleteData = deleteData - self.environment_context = environment_context - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRUCT: - self.environment_context = EnvironmentContext() - self.environment_context.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partition_by_name_with_environment_context_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_name is not None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - if self.deleteData is not None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - if self.environment_context is not None: - oprot.writeFieldBegin('environment_context', TType.STRUCT, 5) - self.environment_context.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_name) - value = (value * 31) ^ hash(self.deleteData) - value = (value * 31) ^ hash(self.environment_context) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partition_by_name_with_environment_context_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partition_by_name_with_environment_context_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partitions_req_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (DropPartitionsRequest, DropPartitionsRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = DropPartitionsRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partitions_req_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_partitions_req_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (DropPartitionsResult, DropPartitionsResult.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = DropPartitionsResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_partitions_req_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype809, _size806) = iprot.readListBegin() - for _i810 in xrange(_size806): - _elem811 = iprot.readString() - self.part_vals.append(_elem811) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter812 in self.part_vals: - oprot.writeString(iter812) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_vals) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class exchange_partition_args: - """ - Attributes: - - partitionSpecs - - source_db - - source_table_name - - dest_db - - dest_table_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.MAP, 'partitionSpecs', (TType.STRING,None,TType.STRING,None), None, ), # 1 - (2, TType.STRING, 'source_db', None, None, ), # 2 - (3, TType.STRING, 'source_table_name', None, None, ), # 3 - (4, TType.STRING, 'dest_db', None, None, ), # 4 - (5, TType.STRING, 'dest_table_name', None, None, ), # 5 - ) - - def __init__(self, partitionSpecs=None, source_db=None, source_table_name=None, dest_db=None, dest_table_name=None,): - self.partitionSpecs = partitionSpecs - self.source_db = source_db - self.source_table_name = source_table_name - self.dest_db = dest_db - self.dest_table_name = dest_table_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.MAP: - self.partitionSpecs = {} - (_ktype814, _vtype815, _size813 ) = iprot.readMapBegin() - for _i817 in xrange(_size813): - _key818 = iprot.readString() - _val819 = iprot.readString() - self.partitionSpecs[_key818] = _val819 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.source_db = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.source_table_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.dest_db = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.dest_table_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('exchange_partition_args') - if self.partitionSpecs is not None: - oprot.writeFieldBegin('partitionSpecs', TType.MAP, 1) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.partitionSpecs)) - for kiter820,viter821 in self.partitionSpecs.items(): - oprot.writeString(kiter820) - oprot.writeString(viter821) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.source_db is not None: - oprot.writeFieldBegin('source_db', TType.STRING, 2) - oprot.writeString(self.source_db) - oprot.writeFieldEnd() - if self.source_table_name is not None: - oprot.writeFieldBegin('source_table_name', TType.STRING, 3) - oprot.writeString(self.source_table_name) - oprot.writeFieldEnd() - if self.dest_db is not None: - oprot.writeFieldBegin('dest_db', TType.STRING, 4) - oprot.writeString(self.dest_db) - oprot.writeFieldEnd() - if self.dest_table_name is not None: - oprot.writeFieldBegin('dest_table_name', TType.STRING, 5) - oprot.writeString(self.dest_table_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.partitionSpecs) - value = (value * 31) ^ hash(self.source_db) - value = (value * 31) ^ hash(self.source_table_name) - value = (value * 31) ^ hash(self.dest_db) - value = (value * 31) ^ hash(self.dest_table_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class exchange_partition_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = InvalidObjectException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = InvalidInputException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('exchange_partition_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class exchange_partitions_args: - """ - Attributes: - - partitionSpecs - - source_db - - source_table_name - - dest_db - - dest_table_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.MAP, 'partitionSpecs', (TType.STRING,None,TType.STRING,None), None, ), # 1 - (2, TType.STRING, 'source_db', None, None, ), # 2 - (3, TType.STRING, 'source_table_name', None, None, ), # 3 - (4, TType.STRING, 'dest_db', None, None, ), # 4 - (5, TType.STRING, 'dest_table_name', None, None, ), # 5 - ) - - def __init__(self, partitionSpecs=None, source_db=None, source_table_name=None, dest_db=None, dest_table_name=None,): - self.partitionSpecs = partitionSpecs - self.source_db = source_db - self.source_table_name = source_table_name - self.dest_db = dest_db - self.dest_table_name = dest_table_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.MAP: - self.partitionSpecs = {} - (_ktype823, _vtype824, _size822 ) = iprot.readMapBegin() - for _i826 in xrange(_size822): - _key827 = iprot.readString() - _val828 = iprot.readString() - self.partitionSpecs[_key827] = _val828 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.source_db = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.source_table_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.dest_db = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.dest_table_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('exchange_partitions_args') - if self.partitionSpecs is not None: - oprot.writeFieldBegin('partitionSpecs', TType.MAP, 1) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.partitionSpecs)) - for kiter829,viter830 in self.partitionSpecs.items(): - oprot.writeString(kiter829) - oprot.writeString(viter830) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.source_db is not None: - oprot.writeFieldBegin('source_db', TType.STRING, 2) - oprot.writeString(self.source_db) - oprot.writeFieldEnd() - if self.source_table_name is not None: - oprot.writeFieldBegin('source_table_name', TType.STRING, 3) - oprot.writeString(self.source_table_name) - oprot.writeFieldEnd() - if self.dest_db is not None: - oprot.writeFieldBegin('dest_db', TType.STRING, 4) - oprot.writeString(self.dest_db) - oprot.writeFieldEnd() - if self.dest_table_name is not None: - oprot.writeFieldBegin('dest_table_name', TType.STRING, 5) - oprot.writeString(self.dest_table_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.partitionSpecs) - value = (value * 31) ^ hash(self.source_db) - value = (value * 31) ^ hash(self.source_table_name) - value = (value * 31) ^ hash(self.dest_db) - value = (value * 31) ^ hash(self.dest_table_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class exchange_partitions_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype834, _size831) = iprot.readListBegin() - for _i835 in xrange(_size831): - _elem836 = Partition() - _elem836.read(iprot) - self.success.append(_elem836) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = InvalidObjectException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = InvalidInputException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('exchange_partitions_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter837 in self.success: - iter837.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_with_auth_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - user_name - - group_names - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.STRING, 'user_name', None, None, ), # 4 - (5, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 5 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, user_name=None, group_names=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.user_name = user_name - self.group_names = group_names - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype841, _size838) = iprot.readListBegin() - for _i842 in xrange(_size838): - _elem843 = iprot.readString() - self.part_vals.append(_elem843) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.user_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.LIST: - self.group_names = [] - (_etype847, _size844) = iprot.readListBegin() - for _i848 in xrange(_size844): - _elem849 = iprot.readString() - self.group_names.append(_elem849) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_with_auth_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter850 in self.part_vals: - oprot.writeString(iter850) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.user_name is not None: - oprot.writeFieldBegin('user_name', TType.STRING, 4) - oprot.writeString(self.user_name) - oprot.writeFieldEnd() - if self.group_names is not None: - oprot.writeFieldBegin('group_names', TType.LIST, 5) - oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter851 in self.group_names: - oprot.writeString(iter851) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_vals) - value = (value * 31) ^ hash(self.user_name) - value = (value * 31) ^ hash(self.group_names) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_with_auth_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_with_auth_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_by_name_args: - """ - Attributes: - - db_name - - tbl_name - - part_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, part_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_by_name_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_name is not None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_by_name_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_by_name_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_args: - """ - Attributes: - - db_name - - tbl_name - - max_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_parts', None, -1, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_parts = max_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.max_parts = iprot.readI16() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.max_parts is not None: - oprot.writeFieldBegin('max_parts', TType.I16, 3) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.max_parts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype855, _size852) = iprot.readListBegin() - for _i856 in xrange(_size852): - _elem857 = Partition() - _elem857.read(iprot) - self.success.append(_elem857) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter858 in self.success: - iter858.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_with_auth_args: - """ - Attributes: - - db_name - - tbl_name - - max_parts - - user_name - - group_names - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_parts', None, -1, ), # 3 - (4, TType.STRING, 'user_name', None, None, ), # 4 - (5, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 5 - ) - - def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4], user_name=None, group_names=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_parts = max_parts - self.user_name = user_name - self.group_names = group_names - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.max_parts = iprot.readI16() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.user_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.LIST: - self.group_names = [] - (_etype862, _size859) = iprot.readListBegin() - for _i863 in xrange(_size859): - _elem864 = iprot.readString() - self.group_names.append(_elem864) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_with_auth_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.max_parts is not None: - oprot.writeFieldBegin('max_parts', TType.I16, 3) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() - if self.user_name is not None: - oprot.writeFieldBegin('user_name', TType.STRING, 4) - oprot.writeString(self.user_name) - oprot.writeFieldEnd() - if self.group_names is not None: - oprot.writeFieldBegin('group_names', TType.LIST, 5) - oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter865 in self.group_names: - oprot.writeString(iter865) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.max_parts) - value = (value * 31) ^ hash(self.user_name) - value = (value * 31) ^ hash(self.group_names) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_with_auth_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype869, _size866) = iprot.readListBegin() - for _i870 in xrange(_size866): - _elem871 = Partition() - _elem871.read(iprot) - self.success.append(_elem871) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_with_auth_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter872 in self.success: - iter872.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_pspec_args: - """ - Attributes: - - db_name - - tbl_name - - max_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I32, 'max_parts', None, -1, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_parts = max_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.max_parts = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_pspec_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.max_parts is not None: - oprot.writeFieldBegin('max_parts', TType.I32, 3) - oprot.writeI32(self.max_parts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.max_parts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_pspec_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(PartitionSpec, PartitionSpec.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype876, _size873) = iprot.readListBegin() - for _i877 in xrange(_size873): - _elem878 = PartitionSpec() - _elem878.read(iprot) - self.success.append(_elem878) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_pspec_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter879 in self.success: - iter879.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_names_args: - """ - Attributes: - - db_name - - tbl_name - - max_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_parts', None, -1, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_parts = max_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.max_parts = iprot.readI16() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_names_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.max_parts is not None: - oprot.writeFieldBegin('max_parts', TType.I16, 3) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.max_parts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_names_result: - """ - Attributes: - - success - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o2=None,): - self.success = success - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype883, _size880) = iprot.readListBegin() - for _i884 in xrange(_size880): - _elem885 = iprot.readString() - self.success.append(_elem885) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_names_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter886 in self.success: - oprot.writeString(iter886) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 1) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_ps_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - max_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.max_parts = max_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype890, _size887) = iprot.readListBegin() - for _i891 in xrange(_size887): - _elem892 = iprot.readString() - self.part_vals.append(_elem892) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_ps_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter893 in self.part_vals: - oprot.writeString(iter893) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.max_parts is not None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_vals) - value = (value * 31) ^ hash(self.max_parts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_ps_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype897, _size894) = iprot.readListBegin() - for _i898 in xrange(_size894): - _elem899 = Partition() - _elem899.read(iprot) - self.success.append(_elem899) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_ps_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter900 in self.success: - iter900.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_ps_with_auth_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - max_parts - - user_name - - group_names - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 - (5, TType.STRING, 'user_name', None, None, ), # 5 - (6, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 6 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4], user_name=None, group_names=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.max_parts = max_parts - self.user_name = user_name - self.group_names = group_names - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype904, _size901) = iprot.readListBegin() - for _i905 in xrange(_size901): - _elem906 = iprot.readString() - self.part_vals.append(_elem906) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.user_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.LIST: - self.group_names = [] - (_etype910, _size907) = iprot.readListBegin() - for _i911 in xrange(_size907): - _elem912 = iprot.readString() - self.group_names.append(_elem912) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_ps_with_auth_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter913 in self.part_vals: - oprot.writeString(iter913) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.max_parts is not None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() - if self.user_name is not None: - oprot.writeFieldBegin('user_name', TType.STRING, 5) - oprot.writeString(self.user_name) - oprot.writeFieldEnd() - if self.group_names is not None: - oprot.writeFieldBegin('group_names', TType.LIST, 6) - oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter914 in self.group_names: - oprot.writeString(iter914) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_vals) - value = (value * 31) ^ hash(self.max_parts) - value = (value * 31) ^ hash(self.user_name) - value = (value * 31) ^ hash(self.group_names) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_ps_with_auth_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype918, _size915) = iprot.readListBegin() - for _i919 in xrange(_size915): - _elem920 = Partition() - _elem920.read(iprot) - self.success.append(_elem920) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_ps_with_auth_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter921 in self.success: - iter921.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_names_ps_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - max_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.max_parts = max_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype925, _size922) = iprot.readListBegin() - for _i926 in xrange(_size922): - _elem927 = iprot.readString() - self.part_vals.append(_elem927) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_names_ps_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter928 in self.part_vals: - oprot.writeString(iter928) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.max_parts is not None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_vals) - value = (value * 31) ^ hash(self.max_parts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_names_ps_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype932, _size929) = iprot.readListBegin() - for _i933 in xrange(_size929): - _elem934 = iprot.readString() - self.success.append(_elem934) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_names_ps_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter935 in self.success: - oprot.writeString(iter935) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_by_filter_args: - """ - Attributes: - - db_name - - tbl_name - - filter - - max_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'filter', None, None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.filter = filter - self.max_parts = max_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.filter = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_by_filter_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.filter is not None: - oprot.writeFieldBegin('filter', TType.STRING, 3) - oprot.writeString(self.filter) - oprot.writeFieldEnd() - if self.max_parts is not None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.filter) - value = (value * 31) ^ hash(self.max_parts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_by_filter_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype939, _size936) = iprot.readListBegin() - for _i940 in xrange(_size936): - _elem941 = Partition() - _elem941.read(iprot) - self.success.append(_elem941) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_by_filter_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter942 in self.success: - iter942.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_part_specs_by_filter_args: - """ - Attributes: - - db_name - - tbl_name - - filter - - max_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'filter', None, None, ), # 3 - (4, TType.I32, 'max_parts', None, -1, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.filter = filter - self.max_parts = max_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.filter = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.max_parts = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_part_specs_by_filter_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.filter is not None: - oprot.writeFieldBegin('filter', TType.STRING, 3) - oprot.writeString(self.filter) - oprot.writeFieldEnd() - if self.max_parts is not None: - oprot.writeFieldBegin('max_parts', TType.I32, 4) - oprot.writeI32(self.max_parts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.filter) - value = (value * 31) ^ hash(self.max_parts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_part_specs_by_filter_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(PartitionSpec, PartitionSpec.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype946, _size943) = iprot.readListBegin() - for _i947 in xrange(_size943): - _elem948 = PartitionSpec() - _elem948.read(iprot) - self.success.append(_elem948) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_part_specs_by_filter_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter949 in self.success: - iter949.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_by_expr_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (PartitionsByExprRequest, PartitionsByExprRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = PartitionsByExprRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_by_expr_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_by_expr_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (PartitionsByExprResult, PartitionsByExprResult.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = PartitionsByExprResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_by_expr_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_num_partitions_by_filter_args: - """ - Attributes: - - db_name - - tbl_name - - filter - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'filter', None, None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, filter=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.filter = filter - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.filter = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_num_partitions_by_filter_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.filter is not None: - oprot.writeFieldBegin('filter', TType.STRING, 3) - oprot.writeString(self.filter) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.filter) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_num_partitions_by_filter_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.I32: - self.success = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_num_partitions_by_filter_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_by_names_args: - """ - Attributes: - - db_name - - tbl_name - - names - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'names', (TType.STRING,None), None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, names=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.names = names - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.names = [] - (_etype953, _size950) = iprot.readListBegin() - for _i954 in xrange(_size950): - _elem955 = iprot.readString() - self.names.append(_elem955) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_by_names_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.names is not None: - oprot.writeFieldBegin('names', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.names)) - for iter956 in self.names: - oprot.writeString(iter956) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.names) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_by_names_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype960, _size957) = iprot.readListBegin() - for _i961 in xrange(_size957): - _elem962 = Partition() - _elem962.read(iprot) - self.success.append(_elem962) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_by_names_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter963 in self.success: - iter963.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_partition_args: - """ - Attributes: - - db_name - - tbl_name - - new_part - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, new_part=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.new_part = new_part - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.new_part = Partition() - self.new_part.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_partition_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.new_part is not None: - oprot.writeFieldBegin('new_part', TType.STRUCT, 3) - self.new_part.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.new_part) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_partition_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_partition_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_partitions_args: - """ - Attributes: - - db_name - - tbl_name - - new_parts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'new_parts', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, new_parts=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.new_parts = new_parts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.new_parts = [] - (_etype967, _size964) = iprot.readListBegin() - for _i968 in xrange(_size964): - _elem969 = Partition() - _elem969.read(iprot) - self.new_parts.append(_elem969) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_partitions_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.new_parts is not None: - oprot.writeFieldBegin('new_parts', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) - for iter970 in self.new_parts: - iter970.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.new_parts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_partitions_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_partitions_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_partitions_with_environment_context_args: - """ - Attributes: - - db_name - - tbl_name - - new_parts - - environment_context - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'new_parts', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 3 - (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, new_parts=None, environment_context=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.new_parts = new_parts - self.environment_context = environment_context - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.new_parts = [] - (_etype974, _size971) = iprot.readListBegin() - for _i975 in xrange(_size971): - _elem976 = Partition() - _elem976.read(iprot) - self.new_parts.append(_elem976) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.environment_context = EnvironmentContext() - self.environment_context.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_partitions_with_environment_context_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.new_parts is not None: - oprot.writeFieldBegin('new_parts', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) - for iter977 in self.new_parts: - iter977.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.environment_context is not None: - oprot.writeFieldBegin('environment_context', TType.STRUCT, 4) - self.environment_context.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.new_parts) - value = (value * 31) ^ hash(self.environment_context) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_partitions_with_environment_context_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_partitions_with_environment_context_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_partition_with_environment_context_args: - """ - Attributes: - - db_name - - tbl_name - - new_part - - environment_context - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, new_part=None, environment_context=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.new_part = new_part - self.environment_context = environment_context - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.new_part = Partition() - self.new_part.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.environment_context = EnvironmentContext() - self.environment_context.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_partition_with_environment_context_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.new_part is not None: - oprot.writeFieldBegin('new_part', TType.STRUCT, 3) - self.new_part.write(oprot) - oprot.writeFieldEnd() - if self.environment_context is not None: - oprot.writeFieldBegin('environment_context', TType.STRUCT, 4) - self.environment_context.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.new_part) - value = (value * 31) ^ hash(self.environment_context) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_partition_with_environment_context_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_partition_with_environment_context_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class rename_partition_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - new_part - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, new_part=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.new_part = new_part - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype981, _size978) = iprot.readListBegin() - for _i982 in xrange(_size978): - _elem983 = iprot.readString() - self.part_vals.append(_elem983) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.new_part = Partition() - self.new_part.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('rename_partition_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter984 in self.part_vals: - oprot.writeString(iter984) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.new_part is not None: - oprot.writeFieldBegin('new_part', TType.STRUCT, 4) - self.new_part.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_vals) - value = (value * 31) ^ hash(self.new_part) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class rename_partition_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('rename_partition_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class partition_name_has_valid_characters_args: - """ - Attributes: - - part_vals - - throw_exception - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 1 - (2, TType.BOOL, 'throw_exception', None, None, ), # 2 - ) - - def __init__(self, part_vals=None, throw_exception=None,): - self.part_vals = part_vals - self.throw_exception = throw_exception - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.part_vals = [] - (_etype988, _size985) = iprot.readListBegin() - for _i989 in xrange(_size985): - _elem990 = iprot.readString() - self.part_vals.append(_elem990) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.throw_exception = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('partition_name_has_valid_characters_args') - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.LIST, 1) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter991 in self.part_vals: - oprot.writeString(iter991) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.throw_exception is not None: - oprot.writeFieldBegin('throw_exception', TType.BOOL, 2) - oprot.writeBool(self.throw_exception) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.part_vals) - value = (value * 31) ^ hash(self.throw_exception) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class partition_name_has_valid_characters_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('partition_name_has_valid_characters_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_config_value_args: - """ - Attributes: - - name - - defaultValue - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'defaultValue', None, None, ), # 2 - ) - - def __init__(self, name=None, defaultValue=None,): - self.name = name - self.defaultValue = defaultValue - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.defaultValue = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_config_value_args') - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.defaultValue is not None: - oprot.writeFieldBegin('defaultValue', TType.STRING, 2) - oprot.writeString(self.defaultValue) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.name) - value = (value * 31) ^ hash(self.defaultValue) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_config_value_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = ConfigValSecurityException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_config_value_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class partition_name_to_vals_args: - """ - Attributes: - - part_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'part_name', None, None, ), # 1 - ) - - def __init__(self, part_name=None,): - self.part_name = part_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.part_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('partition_name_to_vals_args') - if self.part_name is not None: - oprot.writeFieldBegin('part_name', TType.STRING, 1) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.part_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class partition_name_to_vals_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype995, _size992) = iprot.readListBegin() - for _i996 in xrange(_size992): - _elem997 = iprot.readString() - self.success.append(_elem997) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('partition_name_to_vals_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter998 in self.success: - oprot.writeString(iter998) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class partition_name_to_spec_args: - """ - Attributes: - - part_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'part_name', None, None, ), # 1 - ) - - def __init__(self, part_name=None,): - self.part_name = part_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.part_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('partition_name_to_spec_args') - if self.part_name is not None: - oprot.writeFieldBegin('part_name', TType.STRING, 1) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.part_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class partition_name_to_spec_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.MAP: - self.success = {} - (_ktype1000, _vtype1001, _size999 ) = iprot.readMapBegin() - for _i1003 in xrange(_size999): - _key1004 = iprot.readString() - _val1005 = iprot.readString() - self.success[_key1004] = _val1005 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('partition_name_to_spec_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter1006,viter1007 in self.success.items(): - oprot.writeString(kiter1006) - oprot.writeString(viter1007) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class markPartitionForEvent_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - eventType - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.MAP, 'part_vals', (TType.STRING,None,TType.STRING,None), None, ), # 3 - (4, TType.I32, 'eventType', None, None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, eventType=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.eventType = eventType - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.part_vals = {} - (_ktype1009, _vtype1010, _size1008 ) = iprot.readMapBegin() - for _i1012 in xrange(_size1008): - _key1013 = iprot.readString() - _val1014 = iprot.readString() - self.part_vals[_key1013] = _val1014 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.eventType = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('markPartitionForEvent_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals)) - for kiter1015,viter1016 in self.part_vals.items(): - oprot.writeString(kiter1015) - oprot.writeString(viter1016) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.eventType is not None: - oprot.writeFieldBegin('eventType', TType.I32, 4) - oprot.writeI32(self.eventType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_vals) - value = (value * 31) ^ hash(self.eventType) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class markPartitionForEvent_result: - """ - Attributes: - - o1 - - o2 - - o3 - - o4 - - o5 - - o6 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 4 - (5, TType.STRUCT, 'o5', (UnknownPartitionException, UnknownPartitionException.thrift_spec), None, ), # 5 - (6, TType.STRUCT, 'o6', (InvalidPartitionException, InvalidPartitionException.thrift_spec), None, ), # 6 - ) - - def __init__(self, o1=None, o2=None, o3=None, o4=None, o5=None, o6=None,): - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - self.o5 = o5 - self.o6 = o6 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = UnknownTableException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRUCT: - self.o5 = UnknownPartitionException() - self.o5.read(iprot) - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRUCT: - self.o6 = InvalidPartitionException() - self.o6.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('markPartitionForEvent_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - if self.o5 is not None: - oprot.writeFieldBegin('o5', TType.STRUCT, 5) - self.o5.write(oprot) - oprot.writeFieldEnd() - if self.o6 is not None: - oprot.writeFieldBegin('o6', TType.STRUCT, 6) - self.o6.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - value = (value * 31) ^ hash(self.o5) - value = (value * 31) ^ hash(self.o6) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class isPartitionMarkedForEvent_args: - """ - Attributes: - - db_name - - tbl_name - - part_vals - - eventType - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.MAP, 'part_vals', (TType.STRING,None,TType.STRING,None), None, ), # 3 - (4, TType.I32, 'eventType', None, None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_vals=None, eventType=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.eventType = eventType - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.part_vals = {} - (_ktype1018, _vtype1019, _size1017 ) = iprot.readMapBegin() - for _i1021 in xrange(_size1017): - _key1022 = iprot.readString() - _val1023 = iprot.readString() - self.part_vals[_key1022] = _val1023 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.eventType = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('isPartitionMarkedForEvent_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals is not None: - oprot.writeFieldBegin('part_vals', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals)) - for kiter1024,viter1025 in self.part_vals.items(): - oprot.writeString(kiter1024) - oprot.writeString(viter1025) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.eventType is not None: - oprot.writeFieldBegin('eventType', TType.I32, 4) - oprot.writeI32(self.eventType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_vals) - value = (value * 31) ^ hash(self.eventType) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class isPartitionMarkedForEvent_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - - o4 - - o5 - - o6 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 4 - (5, TType.STRUCT, 'o5', (UnknownPartitionException, UnknownPartitionException.thrift_spec), None, ), # 5 - (6, TType.STRUCT, 'o6', (InvalidPartitionException, InvalidPartitionException.thrift_spec), None, ), # 6 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None, o5=None, o6=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - self.o5 = o5 - self.o6 = o6 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = UnknownTableException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRUCT: - self.o5 = UnknownPartitionException() - self.o5.read(iprot) - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRUCT: - self.o6 = InvalidPartitionException() - self.o6.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('isPartitionMarkedForEvent_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - if self.o5 is not None: - oprot.writeFieldBegin('o5', TType.STRUCT, 5) - self.o5.write(oprot) - oprot.writeFieldEnd() - if self.o6 is not None: - oprot.writeFieldBegin('o6', TType.STRUCT, 6) - self.o6.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - value = (value * 31) ^ hash(self.o5) - value = (value * 31) ^ hash(self.o6) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_index_args: - """ - Attributes: - - new_index - - index_table - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'new_index', (Index, Index.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'index_table', (Table, Table.thrift_spec), None, ), # 2 - ) - - def __init__(self, new_index=None, index_table=None,): - self.new_index = new_index - self.index_table = index_table - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.new_index = Index() - self.new_index.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.index_table = Table() - self.index_table.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_index_args') - if self.new_index is not None: - oprot.writeFieldBegin('new_index', TType.STRUCT, 1) - self.new_index.write(oprot) - oprot.writeFieldEnd() - if self.index_table is not None: - oprot.writeFieldBegin('index_table', TType.STRUCT, 2) - self.index_table.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.new_index) - value = (value * 31) ^ hash(self.index_table) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_index_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Index() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_index_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_index_args: - """ - Attributes: - - dbname - - base_tbl_name - - idx_name - - new_idx - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'base_tbl_name', None, None, ), # 2 - (3, TType.STRING, 'idx_name', None, None, ), # 3 - (4, TType.STRUCT, 'new_idx', (Index, Index.thrift_spec), None, ), # 4 - ) - - def __init__(self, dbname=None, base_tbl_name=None, idx_name=None, new_idx=None,): - self.dbname = dbname - self.base_tbl_name = base_tbl_name - self.idx_name = idx_name - self.new_idx = new_idx - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.base_tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.idx_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.new_idx = Index() - self.new_idx.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_index_args') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.base_tbl_name is not None: - oprot.writeFieldBegin('base_tbl_name', TType.STRING, 2) - oprot.writeString(self.base_tbl_name) - oprot.writeFieldEnd() - if self.idx_name is not None: - oprot.writeFieldBegin('idx_name', TType.STRING, 3) - oprot.writeString(self.idx_name) - oprot.writeFieldEnd() - if self.new_idx is not None: - oprot.writeFieldBegin('new_idx', TType.STRUCT, 4) - self.new_idx.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.base_tbl_name) - value = (value * 31) ^ hash(self.idx_name) - value = (value * 31) ^ hash(self.new_idx) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_index_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_index_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_index_by_name_args: - """ - Attributes: - - db_name - - tbl_name - - index_name - - deleteData - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'index_name', None, None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, index_name=None, deleteData=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.index_name = index_name - self.deleteData = deleteData - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.index_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_index_by_name_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.index_name is not None: - oprot.writeFieldBegin('index_name', TType.STRING, 3) - oprot.writeString(self.index_name) - oprot.writeFieldEnd() - if self.deleteData is not None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.index_name) - value = (value * 31) ^ hash(self.deleteData) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_index_by_name_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_index_by_name_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_index_by_name_args: - """ - Attributes: - - db_name - - tbl_name - - index_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'index_name', None, None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, index_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.index_name = index_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.index_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_index_by_name_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.index_name is not None: - oprot.writeFieldBegin('index_name', TType.STRING, 3) - oprot.writeString(self.index_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.index_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_index_by_name_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Index() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_index_by_name_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_indexes_args: - """ - Attributes: - - db_name - - tbl_name - - max_indexes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_indexes', None, -1, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_indexes = max_indexes - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.max_indexes = iprot.readI16() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_indexes_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.max_indexes is not None: - oprot.writeFieldBegin('max_indexes', TType.I16, 3) - oprot.writeI16(self.max_indexes) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.max_indexes) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_indexes_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Index, Index.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype1029, _size1026) = iprot.readListBegin() - for _i1030 in xrange(_size1026): - _elem1031 = Index() - _elem1031.read(iprot) - self.success.append(_elem1031) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_indexes_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter1032 in self.success: - iter1032.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_index_names_args: - """ - Attributes: - - db_name - - tbl_name - - max_indexes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_indexes', None, -1, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_indexes = max_indexes - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.max_indexes = iprot.readI16() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_index_names_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.max_indexes is not None: - oprot.writeFieldBegin('max_indexes', TType.I16, 3) - oprot.writeI16(self.max_indexes) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.max_indexes) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_index_names_result: - """ - Attributes: - - success - - o2 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o2=None,): - self.success = success - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype1036, _size1033) = iprot.readListBegin() - for _i1037 in xrange(_size1033): - _elem1038 = iprot.readString() - self.success.append(_elem1038) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_index_names_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter1039 in self.success: - oprot.writeString(iter1039) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 1) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_primary_keys_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (PrimaryKeysRequest, PrimaryKeysRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = PrimaryKeysRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_primary_keys_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_primary_keys_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (PrimaryKeysResponse, PrimaryKeysResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = PrimaryKeysResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_primary_keys_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_foreign_keys_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (ForeignKeysRequest, ForeignKeysRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = ForeignKeysRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_foreign_keys_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_foreign_keys_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (ForeignKeysResponse, ForeignKeysResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = ForeignKeysResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_foreign_keys_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_unique_constraints_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (UniqueConstraintsRequest, UniqueConstraintsRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = UniqueConstraintsRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_unique_constraints_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_unique_constraints_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (UniqueConstraintsResponse, UniqueConstraintsResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = UniqueConstraintsResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_unique_constraints_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_not_null_constraints_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (NotNullConstraintsRequest, NotNullConstraintsRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = NotNullConstraintsRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_not_null_constraints_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_not_null_constraints_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (NotNullConstraintsResponse, NotNullConstraintsResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = NotNullConstraintsResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_not_null_constraints_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class update_table_column_statistics_args: - """ - Attributes: - - stats_obj - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'stats_obj', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 1 - ) - - def __init__(self, stats_obj=None,): - self.stats_obj = stats_obj - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.stats_obj = ColumnStatistics() - self.stats_obj.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('update_table_column_statistics_args') - if self.stats_obj is not None: - oprot.writeFieldBegin('stats_obj', TType.STRUCT, 1) - self.stats_obj.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.stats_obj) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class update_table_column_statistics_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = InvalidInputException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('update_table_column_statistics_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class update_partition_column_statistics_args: - """ - Attributes: - - stats_obj - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'stats_obj', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 1 - ) - - def __init__(self, stats_obj=None,): - self.stats_obj = stats_obj - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.stats_obj = ColumnStatistics() - self.stats_obj.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('update_partition_column_statistics_args') - if self.stats_obj is not None: - oprot.writeFieldBegin('stats_obj', TType.STRUCT, 1) - self.stats_obj.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.stats_obj) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class update_partition_column_statistics_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = InvalidInputException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('update_partition_column_statistics_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_column_statistics_args: - """ - Attributes: - - db_name - - tbl_name - - col_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'col_name', None, None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, col_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.col_name = col_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.col_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_column_statistics_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.col_name is not None: - oprot.writeFieldBegin('col_name', TType.STRING, 3) - oprot.writeString(self.col_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.col_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_column_statistics_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 4 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = ColumnStatistics() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = InvalidInputException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = InvalidObjectException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_column_statistics_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_column_statistics_args: - """ - Attributes: - - db_name - - tbl_name - - part_name - - col_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 - (4, TType.STRING, 'col_name', None, None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_name=None, col_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name - self.col_name = col_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.col_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_column_statistics_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_name is not None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - if self.col_name is not None: - oprot.writeFieldBegin('col_name', TType.STRING, 4) - oprot.writeString(self.col_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_name) - value = (value * 31) ^ hash(self.col_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partition_column_statistics_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 4 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = ColumnStatistics() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = InvalidInputException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = InvalidObjectException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partition_column_statistics_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_statistics_req_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (TableStatsRequest, TableStatsRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = TableStatsRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_statistics_req_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_table_statistics_req_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TableStatsResult, TableStatsResult.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = TableStatsResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_table_statistics_req_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_statistics_req_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (PartitionsStatsRequest, PartitionsStatsRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = PartitionsStatsRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_statistics_req_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_partitions_statistics_req_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (PartitionsStatsResult, PartitionsStatsResult.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = PartitionsStatsResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_statistics_req_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_aggr_stats_for_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (PartitionsStatsRequest, PartitionsStatsRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = PartitionsStatsRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_aggr_stats_for_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_aggr_stats_for_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (AggrStats, AggrStats.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = AggrStats() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_aggr_stats_for_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class set_aggr_stats_for_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (SetPartitionsStatsRequest, SetPartitionsStatsRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = SetPartitionsStatsRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('set_aggr_stats_for_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class set_aggr_stats_for_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = InvalidInputException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('set_aggr_stats_for_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class delete_partition_column_statistics_args: - """ - Attributes: - - db_name - - tbl_name - - part_name - - col_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 - (4, TType.STRING, 'col_name', None, None, ), # 4 - ) - - def __init__(self, db_name=None, tbl_name=None, part_name=None, col_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name - self.col_name = col_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.col_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('delete_partition_column_statistics_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_name is not None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) - oprot.writeFieldEnd() - if self.col_name is not None: - oprot.writeFieldBegin('col_name', TType.STRING, 4) - oprot.writeString(self.col_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.part_name) - value = (value * 31) ^ hash(self.col_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class delete_partition_column_statistics_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = InvalidObjectException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = InvalidInputException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('delete_partition_column_statistics_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class delete_table_column_statistics_args: - """ - Attributes: - - db_name - - tbl_name - - col_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'col_name', None, None, ), # 3 - ) - - def __init__(self, db_name=None, tbl_name=None, col_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.col_name = col_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.col_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('delete_table_column_statistics_args') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.col_name is not None: - oprot.writeFieldBegin('col_name', TType.STRING, 3) - oprot.writeString(self.col_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - value = (value * 31) ^ hash(self.col_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class delete_table_column_statistics_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = InvalidObjectException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = InvalidInputException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('delete_table_column_statistics_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_function_args: - """ - Attributes: - - func - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'func', (Function, Function.thrift_spec), None, ), # 1 - ) - - def __init__(self, func=None,): - self.func = func - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.func = Function() - self.func.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_function_args') - if self.func is not None: - oprot.writeFieldBegin('func', TType.STRUCT, 1) - self.func.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.func) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_function_result: - """ - Attributes: - - o1 - - o2 - - o3 - - o4 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 - ) - - def __init__(self, o1=None, o2=None, o3=None, o4=None,): - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - self.o4 = o4 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = NoSuchObjectException() - self.o4.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_function_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 is not None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - value = (value * 31) ^ hash(self.o4) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_function_args: - """ - Attributes: - - dbName - - funcName - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'funcName', None, None, ), # 2 - ) - - def __init__(self, dbName=None, funcName=None,): - self.dbName = dbName - self.funcName = funcName - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.funcName = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_function_args') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.funcName is not None: - oprot.writeFieldBegin('funcName', TType.STRING, 2) - oprot.writeString(self.funcName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.funcName) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_function_result: - """ - Attributes: - - o1 - - o3 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o3=None,): - self.o1 = o1 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_function_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 2) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_function_args: - """ - Attributes: - - dbName - - funcName - - newFunc - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'funcName', None, None, ), # 2 - (3, TType.STRUCT, 'newFunc', (Function, Function.thrift_spec), None, ), # 3 - ) - - def __init__(self, dbName=None, funcName=None, newFunc=None,): - self.dbName = dbName - self.funcName = funcName - self.newFunc = newFunc - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.funcName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.newFunc = Function() - self.newFunc.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_function_args') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.funcName is not None: - oprot.writeFieldBegin('funcName', TType.STRING, 2) - oprot.writeString(self.funcName) - oprot.writeFieldEnd() - if self.newFunc is not None: - oprot.writeFieldBegin('newFunc', TType.STRUCT, 3) - self.newFunc.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.funcName) - value = (value * 31) ^ hash(self.newFunc) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class alter_function_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('alter_function_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_functions_args: - """ - Attributes: - - dbName - - pattern - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'pattern', None, None, ), # 2 - ) - - def __init__(self, dbName=None, pattern=None,): - self.dbName = dbName - self.pattern = pattern - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.pattern = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_functions_args') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.pattern is not None: - oprot.writeFieldBegin('pattern', TType.STRING, 2) - oprot.writeString(self.pattern) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.pattern) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_functions_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype1043, _size1040) = iprot.readListBegin() - for _i1044 in xrange(_size1040): - _elem1045 = iprot.readString() - self.success.append(_elem1045) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_functions_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter1046 in self.success: - oprot.writeString(iter1046) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_function_args: - """ - Attributes: - - dbName - - funcName - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'funcName', None, None, ), # 2 - ) - - def __init__(self, dbName=None, funcName=None,): - self.dbName = dbName - self.funcName = funcName - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.funcName = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_function_args') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.funcName is not None: - oprot.writeFieldBegin('funcName', TType.STRING, 2) - oprot.writeString(self.funcName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.funcName) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_function_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (Function, Function.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Function() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_function_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_all_functions_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_all_functions_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_all_functions_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (GetAllFunctionsResponse, GetAllFunctionsResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = GetAllFunctionsResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_all_functions_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_role_args: - """ - Attributes: - - role - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'role', (Role, Role.thrift_spec), None, ), # 1 - ) - - def __init__(self, role=None,): - self.role = role - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.role = Role() - self.role.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_role_args') - if self.role is not None: - oprot.writeFieldBegin('role', TType.STRUCT, 1) - self.role.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.role) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class create_role_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('create_role_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_role_args: - """ - Attributes: - - role_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'role_name', None, None, ), # 1 - ) - - def __init__(self, role_name=None,): - self.role_name = role_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.role_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_role_args') - if self.role_name is not None: - oprot.writeFieldBegin('role_name', TType.STRING, 1) - oprot.writeString(self.role_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.role_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class drop_role_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('drop_role_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_role_names_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_role_names_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_role_names_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype1050, _size1047) = iprot.readListBegin() - for _i1051 in xrange(_size1047): - _elem1052 = iprot.readString() - self.success.append(_elem1052) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_role_names_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter1053 in self.success: - oprot.writeString(iter1053) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class grant_role_args: - """ - Attributes: - - role_name - - principal_name - - principal_type - - grantor - - grantorType - - grant_option - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'role_name', None, None, ), # 1 - (2, TType.STRING, 'principal_name', None, None, ), # 2 - (3, TType.I32, 'principal_type', None, None, ), # 3 - (4, TType.STRING, 'grantor', None, None, ), # 4 - (5, TType.I32, 'grantorType', None, None, ), # 5 - (6, TType.BOOL, 'grant_option', None, None, ), # 6 - ) - - def __init__(self, role_name=None, principal_name=None, principal_type=None, grantor=None, grantorType=None, grant_option=None,): - self.role_name = role_name - self.principal_name = principal_name - self.principal_type = principal_type - self.grantor = grantor - self.grantorType = grantorType - self.grant_option = grant_option - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.role_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.principal_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.principal_type = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.grantor = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.grantorType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.BOOL: - self.grant_option = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('grant_role_args') - if self.role_name is not None: - oprot.writeFieldBegin('role_name', TType.STRING, 1) - oprot.writeString(self.role_name) - oprot.writeFieldEnd() - if self.principal_name is not None: - oprot.writeFieldBegin('principal_name', TType.STRING, 2) - oprot.writeString(self.principal_name) - oprot.writeFieldEnd() - if self.principal_type is not None: - oprot.writeFieldBegin('principal_type', TType.I32, 3) - oprot.writeI32(self.principal_type) - oprot.writeFieldEnd() - if self.grantor is not None: - oprot.writeFieldBegin('grantor', TType.STRING, 4) - oprot.writeString(self.grantor) - oprot.writeFieldEnd() - if self.grantorType is not None: - oprot.writeFieldBegin('grantorType', TType.I32, 5) - oprot.writeI32(self.grantorType) - oprot.writeFieldEnd() - if self.grant_option is not None: - oprot.writeFieldBegin('grant_option', TType.BOOL, 6) - oprot.writeBool(self.grant_option) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.role_name) - value = (value * 31) ^ hash(self.principal_name) - value = (value * 31) ^ hash(self.principal_type) - value = (value * 31) ^ hash(self.grantor) - value = (value * 31) ^ hash(self.grantorType) - value = (value * 31) ^ hash(self.grant_option) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class grant_role_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('grant_role_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class revoke_role_args: - """ - Attributes: - - role_name - - principal_name - - principal_type - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'role_name', None, None, ), # 1 - (2, TType.STRING, 'principal_name', None, None, ), # 2 - (3, TType.I32, 'principal_type', None, None, ), # 3 - ) - - def __init__(self, role_name=None, principal_name=None, principal_type=None,): - self.role_name = role_name - self.principal_name = principal_name - self.principal_type = principal_type - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.role_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.principal_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.principal_type = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('revoke_role_args') - if self.role_name is not None: - oprot.writeFieldBegin('role_name', TType.STRING, 1) - oprot.writeString(self.role_name) - oprot.writeFieldEnd() - if self.principal_name is not None: - oprot.writeFieldBegin('principal_name', TType.STRING, 2) - oprot.writeString(self.principal_name) - oprot.writeFieldEnd() - if self.principal_type is not None: - oprot.writeFieldBegin('principal_type', TType.I32, 3) - oprot.writeI32(self.principal_type) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.role_name) - value = (value * 31) ^ hash(self.principal_name) - value = (value * 31) ^ hash(self.principal_type) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class revoke_role_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('revoke_role_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class list_roles_args: - """ - Attributes: - - principal_name - - principal_type - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'principal_name', None, None, ), # 1 - (2, TType.I32, 'principal_type', None, None, ), # 2 - ) - - def __init__(self, principal_name=None, principal_type=None,): - self.principal_name = principal_name - self.principal_type = principal_type - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.principal_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.principal_type = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('list_roles_args') - if self.principal_name is not None: - oprot.writeFieldBegin('principal_name', TType.STRING, 1) - oprot.writeString(self.principal_name) - oprot.writeFieldEnd() - if self.principal_type is not None: - oprot.writeFieldBegin('principal_type', TType.I32, 2) - oprot.writeI32(self.principal_type) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.principal_name) - value = (value * 31) ^ hash(self.principal_type) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class list_roles_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Role, Role.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype1057, _size1054) = iprot.readListBegin() - for _i1058 in xrange(_size1054): - _elem1059 = Role() - _elem1059.read(iprot) - self.success.append(_elem1059) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('list_roles_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter1060 in self.success: - iter1060.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class grant_revoke_role_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (GrantRevokeRoleRequest, GrantRevokeRoleRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = GrantRevokeRoleRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('grant_revoke_role_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class grant_revoke_role_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (GrantRevokeRoleResponse, GrantRevokeRoleResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = GrantRevokeRoleResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('grant_revoke_role_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_principals_in_role_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (GetPrincipalsInRoleRequest, GetPrincipalsInRoleRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = GetPrincipalsInRoleRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_principals_in_role_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_principals_in_role_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (GetPrincipalsInRoleResponse, GetPrincipalsInRoleResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = GetPrincipalsInRoleResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_principals_in_role_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_role_grants_for_principal_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (GetRoleGrantsForPrincipalRequest, GetRoleGrantsForPrincipalRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = GetRoleGrantsForPrincipalRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_role_grants_for_principal_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_role_grants_for_principal_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (GetRoleGrantsForPrincipalResponse, GetRoleGrantsForPrincipalResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = GetRoleGrantsForPrincipalResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_role_grants_for_principal_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_privilege_set_args: - """ - Attributes: - - hiveObject - - user_name - - group_names - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 1 - (2, TType.STRING, 'user_name', None, None, ), # 2 - (3, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 3 - ) - - def __init__(self, hiveObject=None, user_name=None, group_names=None,): - self.hiveObject = hiveObject - self.user_name = user_name - self.group_names = group_names - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.hiveObject = HiveObjectRef() - self.hiveObject.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.user_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.group_names = [] - (_etype1064, _size1061) = iprot.readListBegin() - for _i1065 in xrange(_size1061): - _elem1066 = iprot.readString() - self.group_names.append(_elem1066) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_privilege_set_args') - if self.hiveObject is not None: - oprot.writeFieldBegin('hiveObject', TType.STRUCT, 1) - self.hiveObject.write(oprot) - oprot.writeFieldEnd() - if self.user_name is not None: - oprot.writeFieldBegin('user_name', TType.STRING, 2) - oprot.writeString(self.user_name) - oprot.writeFieldEnd() - if self.group_names is not None: - oprot.writeFieldBegin('group_names', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter1067 in self.group_names: - oprot.writeString(iter1067) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.hiveObject) - value = (value * 31) ^ hash(self.user_name) - value = (value * 31) ^ hash(self.group_names) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_privilege_set_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = PrincipalPrivilegeSet() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_privilege_set_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class list_privileges_args: - """ - Attributes: - - principal_name - - principal_type - - hiveObject - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'principal_name', None, None, ), # 1 - (2, TType.I32, 'principal_type', None, None, ), # 2 - (3, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 3 - ) - - def __init__(self, principal_name=None, principal_type=None, hiveObject=None,): - self.principal_name = principal_name - self.principal_type = principal_type - self.hiveObject = hiveObject - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.principal_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.principal_type = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.hiveObject = HiveObjectRef() - self.hiveObject.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('list_privileges_args') - if self.principal_name is not None: - oprot.writeFieldBegin('principal_name', TType.STRING, 1) - oprot.writeString(self.principal_name) - oprot.writeFieldEnd() - if self.principal_type is not None: - oprot.writeFieldBegin('principal_type', TType.I32, 2) - oprot.writeI32(self.principal_type) - oprot.writeFieldEnd() - if self.hiveObject is not None: - oprot.writeFieldBegin('hiveObject', TType.STRUCT, 3) - self.hiveObject.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.principal_name) - value = (value * 31) ^ hash(self.principal_type) - value = (value * 31) ^ hash(self.hiveObject) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class list_privileges_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(HiveObjectPrivilege, HiveObjectPrivilege.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype1071, _size1068) = iprot.readListBegin() - for _i1072 in xrange(_size1068): - _elem1073 = HiveObjectPrivilege() - _elem1073.read(iprot) - self.success.append(_elem1073) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('list_privileges_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter1074 in self.success: - iter1074.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class grant_privileges_args: - """ - Attributes: - - privileges - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 1 - ) - - def __init__(self, privileges=None,): - self.privileges = privileges - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.privileges = PrivilegeBag() - self.privileges.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('grant_privileges_args') - if self.privileges is not None: - oprot.writeFieldBegin('privileges', TType.STRUCT, 1) - self.privileges.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.privileges) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class grant_privileges_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('grant_privileges_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class revoke_privileges_args: - """ - Attributes: - - privileges - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 1 - ) - - def __init__(self, privileges=None,): - self.privileges = privileges - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.privileges = PrivilegeBag() - self.privileges.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('revoke_privileges_args') - if self.privileges is not None: - oprot.writeFieldBegin('privileges', TType.STRUCT, 1) - self.privileges.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.privileges) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class revoke_privileges_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('revoke_privileges_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class grant_revoke_privileges_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (GrantRevokePrivilegeRequest, GrantRevokePrivilegeRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = GrantRevokePrivilegeRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('grant_revoke_privileges_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class grant_revoke_privileges_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (GrantRevokePrivilegeResponse, GrantRevokePrivilegeResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = GrantRevokePrivilegeResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('grant_revoke_privileges_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class set_ugi_args: - """ - Attributes: - - user_name - - group_names - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'user_name', None, None, ), # 1 - (2, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 2 - ) - - def __init__(self, user_name=None, group_names=None,): - self.user_name = user_name - self.group_names = group_names - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.user_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.group_names = [] - (_etype1078, _size1075) = iprot.readListBegin() - for _i1079 in xrange(_size1075): - _elem1080 = iprot.readString() - self.group_names.append(_elem1080) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('set_ugi_args') - if self.user_name is not None: - oprot.writeFieldBegin('user_name', TType.STRING, 1) - oprot.writeString(self.user_name) - oprot.writeFieldEnd() - if self.group_names is not None: - oprot.writeFieldBegin('group_names', TType.LIST, 2) - oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter1081 in self.group_names: - oprot.writeString(iter1081) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.user_name) - value = (value * 31) ^ hash(self.group_names) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class set_ugi_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype1085, _size1082) = iprot.readListBegin() - for _i1086 in xrange(_size1082): - _elem1087 = iprot.readString() - self.success.append(_elem1087) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('set_ugi_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter1088 in self.success: - oprot.writeString(iter1088) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_delegation_token_args: - """ - Attributes: - - token_owner - - renewer_kerberos_principal_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'token_owner', None, None, ), # 1 - (2, TType.STRING, 'renewer_kerberos_principal_name', None, None, ), # 2 - ) - - def __init__(self, token_owner=None, renewer_kerberos_principal_name=None,): - self.token_owner = token_owner - self.renewer_kerberos_principal_name = renewer_kerberos_principal_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.token_owner = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.renewer_kerberos_principal_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_delegation_token_args') - if self.token_owner is not None: - oprot.writeFieldBegin('token_owner', TType.STRING, 1) - oprot.writeString(self.token_owner) - oprot.writeFieldEnd() - if self.renewer_kerberos_principal_name is not None: - oprot.writeFieldBegin('renewer_kerberos_principal_name', TType.STRING, 2) - oprot.writeString(self.renewer_kerberos_principal_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.token_owner) - value = (value * 31) ^ hash(self.renewer_kerberos_principal_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_delegation_token_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_delegation_token_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class renew_delegation_token_args: - """ - Attributes: - - token_str_form - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'token_str_form', None, None, ), # 1 - ) - - def __init__(self, token_str_form=None,): - self.token_str_form = token_str_form - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.token_str_form = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('renew_delegation_token_args') - if self.token_str_form is not None: - oprot.writeFieldBegin('token_str_form', TType.STRING, 1) - oprot.writeString(self.token_str_form) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.token_str_form) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class renew_delegation_token_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.I64, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.I64: - self.success = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('renew_delegation_token_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.I64, 0) - oprot.writeI64(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class cancel_delegation_token_args: - """ - Attributes: - - token_str_form - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'token_str_form', None, None, ), # 1 - ) - - def __init__(self, token_str_form=None,): - self.token_str_form = token_str_form - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.token_str_form = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('cancel_delegation_token_args') - if self.token_str_form is not None: - oprot.writeFieldBegin('token_str_form', TType.STRING, 1) - oprot.writeString(self.token_str_form) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.token_str_form) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class cancel_delegation_token_result: - """ - Attributes: - - o1 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, o1=None,): - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('cancel_delegation_token_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_token_args: - """ - Attributes: - - token_identifier - - delegation_token - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'token_identifier', None, None, ), # 1 - (2, TType.STRING, 'delegation_token', None, None, ), # 2 - ) - - def __init__(self, token_identifier=None, delegation_token=None,): - self.token_identifier = token_identifier - self.delegation_token = delegation_token - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.token_identifier = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.delegation_token = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_token_args') - if self.token_identifier is not None: - oprot.writeFieldBegin('token_identifier', TType.STRING, 1) - oprot.writeString(self.token_identifier) - oprot.writeFieldEnd() - if self.delegation_token is not None: - oprot.writeFieldBegin('delegation_token', TType.STRING, 2) - oprot.writeString(self.delegation_token) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.token_identifier) - value = (value * 31) ^ hash(self.delegation_token) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_token_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_token_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class remove_token_args: - """ - Attributes: - - token_identifier - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'token_identifier', None, None, ), # 1 - ) - - def __init__(self, token_identifier=None,): - self.token_identifier = token_identifier - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.token_identifier = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('remove_token_args') - if self.token_identifier is not None: - oprot.writeFieldBegin('token_identifier', TType.STRING, 1) - oprot.writeString(self.token_identifier) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.token_identifier) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class remove_token_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('remove_token_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_token_args: - """ - Attributes: - - token_identifier - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'token_identifier', None, None, ), # 1 - ) - - def __init__(self, token_identifier=None,): - self.token_identifier = token_identifier - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.token_identifier = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_token_args') - if self.token_identifier is not None: - oprot.writeFieldBegin('token_identifier', TType.STRING, 1) - oprot.writeString(self.token_identifier) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.token_identifier) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_token_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_token_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_all_token_identifiers_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_all_token_identifiers_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_all_token_identifiers_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype1092, _size1089) = iprot.readListBegin() - for _i1093 in xrange(_size1089): - _elem1094 = iprot.readString() - self.success.append(_elem1094) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_all_token_identifiers_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter1095 in self.success: - oprot.writeString(iter1095) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_master_key_args: - """ - Attributes: - - key - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'key', None, None, ), # 1 - ) - - def __init__(self, key=None,): - self.key = key - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.key = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_master_key_args') - if self.key is not None: - oprot.writeFieldBegin('key', TType.STRING, 1) - oprot.writeString(self.key) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.key) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_master_key_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.I32: - self.success = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_master_key_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class update_master_key_args: - """ - Attributes: - - seq_number - - key - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'seq_number', None, None, ), # 1 - (2, TType.STRING, 'key', None, None, ), # 2 - ) - - def __init__(self, seq_number=None, key=None,): - self.seq_number = seq_number - self.key = key - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.seq_number = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.key = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('update_master_key_args') - if self.seq_number is not None: - oprot.writeFieldBegin('seq_number', TType.I32, 1) - oprot.writeI32(self.seq_number) - oprot.writeFieldEnd() - if self.key is not None: - oprot.writeFieldBegin('key', TType.STRING, 2) - oprot.writeString(self.key) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.seq_number) - value = (value * 31) ^ hash(self.key) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class update_master_key_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('update_master_key_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class remove_master_key_args: - """ - Attributes: - - key_seq - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'key_seq', None, None, ), # 1 - ) - - def __init__(self, key_seq=None,): - self.key_seq = key_seq - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.key_seq = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('remove_master_key_args') - if self.key_seq is not None: - oprot.writeFieldBegin('key_seq', TType.I32, 1) - oprot.writeI32(self.key_seq) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.key_seq) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class remove_master_key_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('remove_master_key_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_master_keys_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_master_keys_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_master_keys_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype1099, _size1096) = iprot.readListBegin() - for _i1100 in xrange(_size1096): - _elem1101 = iprot.readString() - self.success.append(_elem1101) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_master_keys_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter1102 in self.success: - oprot.writeString(iter1102) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_open_txns_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_open_txns_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_open_txns_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (GetOpenTxnsResponse, GetOpenTxnsResponse.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = GetOpenTxnsResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_open_txns_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_open_txns_info_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_open_txns_info_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_open_txns_info_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (GetOpenTxnsInfoResponse, GetOpenTxnsInfoResponse.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = GetOpenTxnsInfoResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_open_txns_info_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class open_txns_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (OpenTxnRequest, OpenTxnRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = OpenTxnRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('open_txns_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class open_txns_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (OpenTxnsResponse, OpenTxnsResponse.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = OpenTxnsResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('open_txns_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class abort_txn_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (AbortTxnRequest, AbortTxnRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = AbortTxnRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('abort_txn_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class abort_txn_result: - """ - Attributes: - - o1 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 - ) - - def __init__(self, o1=None,): - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('abort_txn_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class abort_txns_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (AbortTxnsRequest, AbortTxnsRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = AbortTxnsRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('abort_txns_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class abort_txns_result: - """ - Attributes: - - o1 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 - ) - - def __init__(self, o1=None,): - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('abort_txns_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class commit_txn_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (CommitTxnRequest, CommitTxnRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = CommitTxnRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('commit_txn_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class commit_txn_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = TxnAbortedException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('commit_txn_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class lock_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (LockRequest, LockRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = LockRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('lock_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class lock_result: - """ - Attributes: - - success - - o1 - - o2 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (LockResponse, LockResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, o1=None, o2=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = LockResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = TxnAbortedException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('lock_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class check_lock_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (CheckLockRequest, CheckLockRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = CheckLockRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('check_lock_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class check_lock_result: - """ - Attributes: - - success - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (LockResponse, LockResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (NoSuchLockException, NoSuchLockException.thrift_spec), None, ), # 3 - ) - - def __init__(self, success=None, o1=None, o2=None, o3=None,): - self.success = success - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = LockResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = TxnAbortedException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = NoSuchLockException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('check_lock_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class unlock_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (UnlockRequest, UnlockRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = UnlockRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('unlock_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class unlock_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchLockException, NoSuchLockException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (TxnOpenException, TxnOpenException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchLockException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = TxnOpenException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('unlock_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class show_locks_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (ShowLocksRequest, ShowLocksRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = ShowLocksRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('show_locks_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class show_locks_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (ShowLocksResponse, ShowLocksResponse.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = ShowLocksResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('show_locks_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class heartbeat_args: - """ - Attributes: - - ids - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'ids', (HeartbeatRequest, HeartbeatRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, ids=None,): - self.ids = ids - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.ids = HeartbeatRequest() - self.ids.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('heartbeat_args') - if self.ids is not None: - oprot.writeFieldBegin('ids', TType.STRUCT, 1) - self.ids.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.ids) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class heartbeat_result: - """ - Attributes: - - o1 - - o2 - - o3 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchLockException, NoSuchLockException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 3 - ) - - def __init__(self, o1=None, o2=None, o3=None,): - self.o1 = o1 - self.o2 = o2 - self.o3 = o3 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchLockException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchTxnException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = TxnAbortedException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('heartbeat_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 is not None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - value = (value * 31) ^ hash(self.o3) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class heartbeat_txn_range_args: - """ - Attributes: - - txns - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'txns', (HeartbeatTxnRangeRequest, HeartbeatTxnRangeRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, txns=None,): - self.txns = txns - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.txns = HeartbeatTxnRangeRequest() - self.txns.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('heartbeat_txn_range_args') - if self.txns is not None: - oprot.writeFieldBegin('txns', TType.STRUCT, 1) - self.txns.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.txns) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class heartbeat_txn_range_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (HeartbeatTxnRangeResponse, HeartbeatTxnRangeResponse.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = HeartbeatTxnRangeResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('heartbeat_txn_range_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class compact_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (CompactionRequest, CompactionRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = CompactionRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('compact_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class compact_result: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('compact_result') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class compact2_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (CompactionRequest, CompactionRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = CompactionRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('compact2_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class compact2_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (CompactionResponse, CompactionResponse.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = CompactionResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('compact2_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class show_compact_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (ShowCompactRequest, ShowCompactRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = ShowCompactRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('show_compact_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class show_compact_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (ShowCompactResponse, ShowCompactResponse.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = ShowCompactResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('show_compact_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_dynamic_partitions_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (AddDynamicPartitions, AddDynamicPartitions.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = AddDynamicPartitions() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_dynamic_partitions_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class add_dynamic_partitions_result: - """ - Attributes: - - o1 - - o2 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 - ) - - def __init__(self, o1=None, o2=None,): - self.o1 = o1 - self.o2 = o2 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchTxnException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = TxnAbortedException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('add_dynamic_partitions_result') - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - if self.o2 is not None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.o1) - value = (value * 31) ^ hash(self.o2) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_next_notification_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (NotificationEventRequest, NotificationEventRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = NotificationEventRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_next_notification_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_next_notification_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (NotificationEventResponse, NotificationEventResponse.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = NotificationEventResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_next_notification_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_current_notificationEventId_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_current_notificationEventId_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_current_notificationEventId_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (CurrentNotificationEventId, CurrentNotificationEventId.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = CurrentNotificationEventId() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_current_notificationEventId_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fire_listener_event_args: - """ - Attributes: - - rqst - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'rqst', (FireEventRequest, FireEventRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, rqst=None,): - self.rqst = rqst - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.rqst = FireEventRequest() - self.rqst.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('fire_listener_event_args') - if self.rqst is not None: - oprot.writeFieldBegin('rqst', TType.STRUCT, 1) - self.rqst.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.rqst) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fire_listener_event_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (FireEventResponse, FireEventResponse.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = FireEventResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('fire_listener_event_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class flushCache_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('flushCache_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class flushCache_result: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('flushCache_result') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class cm_recycle_args: - """ - Attributes: - - request - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'request', (CmRecycleRequest, CmRecycleRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, request=None,): - self.request = request - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.request = CmRecycleRequest() - self.request.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('cm_recycle_args') - if self.request is not None: - oprot.writeFieldBegin('request', TType.STRUCT, 1) - self.request.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.request) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class cm_recycle_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (CmRecycleResponse, CmRecycleResponse.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = CmRecycleResponse() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('cm_recycle_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_file_metadata_by_expr_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (GetFileMetadataByExprRequest, GetFileMetadataByExprRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = GetFileMetadataByExprRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_file_metadata_by_expr_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_file_metadata_by_expr_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (GetFileMetadataByExprResult, GetFileMetadataByExprResult.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = GetFileMetadataByExprResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_file_metadata_by_expr_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_file_metadata_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (GetFileMetadataRequest, GetFileMetadataRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = GetFileMetadataRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_file_metadata_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_file_metadata_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (GetFileMetadataResult, GetFileMetadataResult.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = GetFileMetadataResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_file_metadata_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class put_file_metadata_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (PutFileMetadataRequest, PutFileMetadataRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = PutFileMetadataRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('put_file_metadata_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class put_file_metadata_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (PutFileMetadataResult, PutFileMetadataResult.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = PutFileMetadataResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('put_file_metadata_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class clear_file_metadata_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (ClearFileMetadataRequest, ClearFileMetadataRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = ClearFileMetadataRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('clear_file_metadata_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class clear_file_metadata_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (ClearFileMetadataResult, ClearFileMetadataResult.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = ClearFileMetadataResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('clear_file_metadata_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class cache_file_metadata_args: - """ - Attributes: - - req - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'req', (CacheFileMetadataRequest, CacheFileMetadataRequest.thrift_spec), None, ), # 1 - ) - - def __init__(self, req=None,): - self.req = req - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.req = CacheFileMetadataRequest() - self.req.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('cache_file_metadata_args') - if self.req is not None: - oprot.writeFieldBegin('req', TType.STRUCT, 1) - self.req.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.req) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class cache_file_metadata_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (CacheFileMetadataResult, CacheFileMetadataResult.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = CacheFileMetadataResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('cache_file_metadata_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_metastore_db_uuid_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_metastore_db_uuid_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_metastore_db_uuid_result: - """ - Attributes: - - success - - o1 - """ - - thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, o1=None,): - self.success = success - self.o1 = o1 - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.o1 = MetaException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_metastore_db_uuid_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) - oprot.writeFieldEnd() - if self.o1 is not None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.o1) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) diff --git metastore/src/gen/thrift/gen-py/hive_metastore/__init__.py metastore/src/gen/thrift/gen-py/hive_metastore/__init__.py deleted file mode 100644 index e9ee039..0000000 --- metastore/src/gen/thrift/gen-py/hive_metastore/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['ttypes', 'constants', 'ThriftHiveMetastore'] diff --git metastore/src/gen/thrift/gen-py/hive_metastore/constants.py metastore/src/gen/thrift/gen-py/hive_metastore/constants.py deleted file mode 100644 index 5100236..0000000 --- metastore/src/gen/thrift/gen-py/hive_metastore/constants.py +++ /dev/null @@ -1,35 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.9.3) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -from thrift.Thrift import TType, TMessageType, TException, TApplicationException -from ttypes import * - -DDL_TIME = "transient_lastDdlTime" -HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__" -HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__" -HIVE_FILTER_FIELD_LAST_ACCESS = "hive_filter_field_last_access__" -IS_ARCHIVED = "is_archived" -ORIGINAL_LOCATION = "original_location" -IS_IMMUTABLE = "immutable" -META_TABLE_COLUMNS = "columns" -META_TABLE_COLUMN_TYPES = "columns.types" -BUCKET_FIELD_NAME = "bucket_field_name" -BUCKET_COUNT = "bucket_count" -FIELD_TO_DIMENSION = "field_to_dimension" -META_TABLE_NAME = "name" -META_TABLE_DB = "db" -META_TABLE_LOCATION = "location" -META_TABLE_SERDE = "serde" -META_TABLE_PARTITION_COLUMNS = "partition_columns" -META_TABLE_PARTITION_COLUMN_TYPES = "partition_columns.types" -FILE_INPUT_FORMAT = "file.inputformat" -FILE_OUTPUT_FORMAT = "file.outputformat" -META_TABLE_STORAGE = "storage_handler" -TABLE_IS_TRANSACTIONAL = "transactional" -TABLE_NO_AUTO_COMPACT = "no_auto_compaction" -TABLE_TRANSACTIONAL_PROPERTIES = "transactional_properties" diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py deleted file mode 100644 index 53671e3..0000000 --- metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ /dev/null @@ -1,15011 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.9.3) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# -# options string: py -# - -from thrift.Thrift import TType, TMessageType, TException, TApplicationException -import fb303.ttypes - - -from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol, TProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class HiveObjectType: - GLOBAL = 1 - DATABASE = 2 - TABLE = 3 - PARTITION = 4 - COLUMN = 5 - - _VALUES_TO_NAMES = { - 1: "GLOBAL", - 2: "DATABASE", - 3: "TABLE", - 4: "PARTITION", - 5: "COLUMN", - } - - _NAMES_TO_VALUES = { - "GLOBAL": 1, - "DATABASE": 2, - "TABLE": 3, - "PARTITION": 4, - "COLUMN": 5, - } - -class PrincipalType: - USER = 1 - ROLE = 2 - GROUP = 3 - - _VALUES_TO_NAMES = { - 1: "USER", - 2: "ROLE", - 3: "GROUP", - } - - _NAMES_TO_VALUES = { - "USER": 1, - "ROLE": 2, - "GROUP": 3, - } - -class PartitionEventType: - LOAD_DONE = 1 - - _VALUES_TO_NAMES = { - 1: "LOAD_DONE", - } - - _NAMES_TO_VALUES = { - "LOAD_DONE": 1, - } - -class TxnState: - COMMITTED = 1 - ABORTED = 2 - OPEN = 3 - - _VALUES_TO_NAMES = { - 1: "COMMITTED", - 2: "ABORTED", - 3: "OPEN", - } - - _NAMES_TO_VALUES = { - "COMMITTED": 1, - "ABORTED": 2, - "OPEN": 3, - } - -class LockLevel: - DB = 1 - TABLE = 2 - PARTITION = 3 - - _VALUES_TO_NAMES = { - 1: "DB", - 2: "TABLE", - 3: "PARTITION", - } - - _NAMES_TO_VALUES = { - "DB": 1, - "TABLE": 2, - "PARTITION": 3, - } - -class LockState: - ACQUIRED = 1 - WAITING = 2 - ABORT = 3 - NOT_ACQUIRED = 4 - - _VALUES_TO_NAMES = { - 1: "ACQUIRED", - 2: "WAITING", - 3: "ABORT", - 4: "NOT_ACQUIRED", - } - - _NAMES_TO_VALUES = { - "ACQUIRED": 1, - "WAITING": 2, - "ABORT": 3, - "NOT_ACQUIRED": 4, - } - -class LockType: - SHARED_READ = 1 - SHARED_WRITE = 2 - EXCLUSIVE = 3 - - _VALUES_TO_NAMES = { - 1: "SHARED_READ", - 2: "SHARED_WRITE", - 3: "EXCLUSIVE", - } - - _NAMES_TO_VALUES = { - "SHARED_READ": 1, - "SHARED_WRITE": 2, - "EXCLUSIVE": 3, - } - -class CompactionType: - MINOR = 1 - MAJOR = 2 - - _VALUES_TO_NAMES = { - 1: "MINOR", - 2: "MAJOR", - } - - _NAMES_TO_VALUES = { - "MINOR": 1, - "MAJOR": 2, - } - -class GrantRevokeType: - GRANT = 1 - REVOKE = 2 - - _VALUES_TO_NAMES = { - 1: "GRANT", - 2: "REVOKE", - } - - _NAMES_TO_VALUES = { - "GRANT": 1, - "REVOKE": 2, - } - -class DataOperationType: - SELECT = 1 - INSERT = 2 - UPDATE = 3 - DELETE = 4 - UNSET = 5 - NO_TXN = 6 - - _VALUES_TO_NAMES = { - 1: "SELECT", - 2: "INSERT", - 3: "UPDATE", - 4: "DELETE", - 5: "UNSET", - 6: "NO_TXN", - } - - _NAMES_TO_VALUES = { - "SELECT": 1, - "INSERT": 2, - "UPDATE": 3, - "DELETE": 4, - "UNSET": 5, - "NO_TXN": 6, - } - -class EventRequestType: - INSERT = 1 - UPDATE = 2 - DELETE = 3 - - _VALUES_TO_NAMES = { - 1: "INSERT", - 2: "UPDATE", - 3: "DELETE", - } - - _NAMES_TO_VALUES = { - "INSERT": 1, - "UPDATE": 2, - "DELETE": 3, - } - -class FunctionType: - JAVA = 1 - - _VALUES_TO_NAMES = { - 1: "JAVA", - } - - _NAMES_TO_VALUES = { - "JAVA": 1, - } - -class ResourceType: - JAR = 1 - FILE = 2 - ARCHIVE = 3 - - _VALUES_TO_NAMES = { - 1: "JAR", - 2: "FILE", - 3: "ARCHIVE", - } - - _NAMES_TO_VALUES = { - "JAR": 1, - "FILE": 2, - "ARCHIVE": 3, - } - -class FileMetadataExprType: - ORC_SARG = 1 - - _VALUES_TO_NAMES = { - 1: "ORC_SARG", - } - - _NAMES_TO_VALUES = { - "ORC_SARG": 1, - } - -class ClientCapability: - TEST_CAPABILITY = 1 - - _VALUES_TO_NAMES = { - 1: "TEST_CAPABILITY", - } - - _NAMES_TO_VALUES = { - "TEST_CAPABILITY": 1, - } - - -class Version: - """ - Attributes: - - version - - comments - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'version', None, None, ), # 1 - (2, TType.STRING, 'comments', None, None, ), # 2 - ) - - def __init__(self, version=None, comments=None,): - self.version = version - self.comments = comments - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.version = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.comments = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Version') - if self.version is not None: - oprot.writeFieldBegin('version', TType.STRING, 1) - oprot.writeString(self.version) - oprot.writeFieldEnd() - if self.comments is not None: - oprot.writeFieldBegin('comments', TType.STRING, 2) - oprot.writeString(self.comments) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.version) - value = (value * 31) ^ hash(self.comments) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class FieldSchema: - """ - Attributes: - - name - - type - - comment - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'type', None, None, ), # 2 - (3, TType.STRING, 'comment', None, None, ), # 3 - ) - - def __init__(self, name=None, type=None, comment=None,): - self.name = name - self.type = type - self.comment = comment - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.type = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.comment = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('FieldSchema') - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.type is not None: - oprot.writeFieldBegin('type', TType.STRING, 2) - oprot.writeString(self.type) - oprot.writeFieldEnd() - if self.comment is not None: - oprot.writeFieldBegin('comment', TType.STRING, 3) - oprot.writeString(self.comment) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.name) - value = (value * 31) ^ hash(self.type) - value = (value * 31) ^ hash(self.comment) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class SQLPrimaryKey: - """ - Attributes: - - table_db - - table_name - - column_name - - key_seq - - pk_name - - enable_cstr - - validate_cstr - - rely_cstr - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table_db', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 - (3, TType.STRING, 'column_name', None, None, ), # 3 - (4, TType.I32, 'key_seq', None, None, ), # 4 - (5, TType.STRING, 'pk_name', None, None, ), # 5 - (6, TType.BOOL, 'enable_cstr', None, None, ), # 6 - (7, TType.BOOL, 'validate_cstr', None, None, ), # 7 - (8, TType.BOOL, 'rely_cstr', None, None, ), # 8 - ) - - def __init__(self, table_db=None, table_name=None, column_name=None, key_seq=None, pk_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,): - self.table_db = table_db - self.table_name = table_name - self.column_name = column_name - self.key_seq = key_seq - self.pk_name = pk_name - self.enable_cstr = enable_cstr - self.validate_cstr = validate_cstr - self.rely_cstr = rely_cstr - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.table_db = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.table_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.column_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.key_seq = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.pk_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.BOOL: - self.enable_cstr = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.BOOL: - self.validate_cstr = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.BOOL: - self.rely_cstr = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('SQLPrimaryKey') - if self.table_db is not None: - oprot.writeFieldBegin('table_db', TType.STRING, 1) - oprot.writeString(self.table_db) - oprot.writeFieldEnd() - if self.table_name is not None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) - oprot.writeFieldEnd() - if self.column_name is not None: - oprot.writeFieldBegin('column_name', TType.STRING, 3) - oprot.writeString(self.column_name) - oprot.writeFieldEnd() - if self.key_seq is not None: - oprot.writeFieldBegin('key_seq', TType.I32, 4) - oprot.writeI32(self.key_seq) - oprot.writeFieldEnd() - if self.pk_name is not None: - oprot.writeFieldBegin('pk_name', TType.STRING, 5) - oprot.writeString(self.pk_name) - oprot.writeFieldEnd() - if self.enable_cstr is not None: - oprot.writeFieldBegin('enable_cstr', TType.BOOL, 6) - oprot.writeBool(self.enable_cstr) - oprot.writeFieldEnd() - if self.validate_cstr is not None: - oprot.writeFieldBegin('validate_cstr', TType.BOOL, 7) - oprot.writeBool(self.validate_cstr) - oprot.writeFieldEnd() - if self.rely_cstr is not None: - oprot.writeFieldBegin('rely_cstr', TType.BOOL, 8) - oprot.writeBool(self.rely_cstr) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table_db) - value = (value * 31) ^ hash(self.table_name) - value = (value * 31) ^ hash(self.column_name) - value = (value * 31) ^ hash(self.key_seq) - value = (value * 31) ^ hash(self.pk_name) - value = (value * 31) ^ hash(self.enable_cstr) - value = (value * 31) ^ hash(self.validate_cstr) - value = (value * 31) ^ hash(self.rely_cstr) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class SQLForeignKey: - """ - Attributes: - - pktable_db - - pktable_name - - pkcolumn_name - - fktable_db - - fktable_name - - fkcolumn_name - - key_seq - - update_rule - - delete_rule - - fk_name - - pk_name - - enable_cstr - - validate_cstr - - rely_cstr - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'pktable_db', None, None, ), # 1 - (2, TType.STRING, 'pktable_name', None, None, ), # 2 - (3, TType.STRING, 'pkcolumn_name', None, None, ), # 3 - (4, TType.STRING, 'fktable_db', None, None, ), # 4 - (5, TType.STRING, 'fktable_name', None, None, ), # 5 - (6, TType.STRING, 'fkcolumn_name', None, None, ), # 6 - (7, TType.I32, 'key_seq', None, None, ), # 7 - (8, TType.I32, 'update_rule', None, None, ), # 8 - (9, TType.I32, 'delete_rule', None, None, ), # 9 - (10, TType.STRING, 'fk_name', None, None, ), # 10 - (11, TType.STRING, 'pk_name', None, None, ), # 11 - (12, TType.BOOL, 'enable_cstr', None, None, ), # 12 - (13, TType.BOOL, 'validate_cstr', None, None, ), # 13 - (14, TType.BOOL, 'rely_cstr', None, None, ), # 14 - ) - - def __init__(self, pktable_db=None, pktable_name=None, pkcolumn_name=None, fktable_db=None, fktable_name=None, fkcolumn_name=None, key_seq=None, update_rule=None, delete_rule=None, fk_name=None, pk_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,): - self.pktable_db = pktable_db - self.pktable_name = pktable_name - self.pkcolumn_name = pkcolumn_name - self.fktable_db = fktable_db - self.fktable_name = fktable_name - self.fkcolumn_name = fkcolumn_name - self.key_seq = key_seq - self.update_rule = update_rule - self.delete_rule = delete_rule - self.fk_name = fk_name - self.pk_name = pk_name - self.enable_cstr = enable_cstr - self.validate_cstr = validate_cstr - self.rely_cstr = rely_cstr - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.pktable_db = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.pktable_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.pkcolumn_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.fktable_db = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.fktable_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.fkcolumn_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I32: - self.key_seq = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.I32: - self.update_rule = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.I32: - self.delete_rule = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.STRING: - self.fk_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 11: - if ftype == TType.STRING: - self.pk_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 12: - if ftype == TType.BOOL: - self.enable_cstr = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 13: - if ftype == TType.BOOL: - self.validate_cstr = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 14: - if ftype == TType.BOOL: - self.rely_cstr = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('SQLForeignKey') - if self.pktable_db is not None: - oprot.writeFieldBegin('pktable_db', TType.STRING, 1) - oprot.writeString(self.pktable_db) - oprot.writeFieldEnd() - if self.pktable_name is not None: - oprot.writeFieldBegin('pktable_name', TType.STRING, 2) - oprot.writeString(self.pktable_name) - oprot.writeFieldEnd() - if self.pkcolumn_name is not None: - oprot.writeFieldBegin('pkcolumn_name', TType.STRING, 3) - oprot.writeString(self.pkcolumn_name) - oprot.writeFieldEnd() - if self.fktable_db is not None: - oprot.writeFieldBegin('fktable_db', TType.STRING, 4) - oprot.writeString(self.fktable_db) - oprot.writeFieldEnd() - if self.fktable_name is not None: - oprot.writeFieldBegin('fktable_name', TType.STRING, 5) - oprot.writeString(self.fktable_name) - oprot.writeFieldEnd() - if self.fkcolumn_name is not None: - oprot.writeFieldBegin('fkcolumn_name', TType.STRING, 6) - oprot.writeString(self.fkcolumn_name) - oprot.writeFieldEnd() - if self.key_seq is not None: - oprot.writeFieldBegin('key_seq', TType.I32, 7) - oprot.writeI32(self.key_seq) - oprot.writeFieldEnd() - if self.update_rule is not None: - oprot.writeFieldBegin('update_rule', TType.I32, 8) - oprot.writeI32(self.update_rule) - oprot.writeFieldEnd() - if self.delete_rule is not None: - oprot.writeFieldBegin('delete_rule', TType.I32, 9) - oprot.writeI32(self.delete_rule) - oprot.writeFieldEnd() - if self.fk_name is not None: - oprot.writeFieldBegin('fk_name', TType.STRING, 10) - oprot.writeString(self.fk_name) - oprot.writeFieldEnd() - if self.pk_name is not None: - oprot.writeFieldBegin('pk_name', TType.STRING, 11) - oprot.writeString(self.pk_name) - oprot.writeFieldEnd() - if self.enable_cstr is not None: - oprot.writeFieldBegin('enable_cstr', TType.BOOL, 12) - oprot.writeBool(self.enable_cstr) - oprot.writeFieldEnd() - if self.validate_cstr is not None: - oprot.writeFieldBegin('validate_cstr', TType.BOOL, 13) - oprot.writeBool(self.validate_cstr) - oprot.writeFieldEnd() - if self.rely_cstr is not None: - oprot.writeFieldBegin('rely_cstr', TType.BOOL, 14) - oprot.writeBool(self.rely_cstr) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.pktable_db) - value = (value * 31) ^ hash(self.pktable_name) - value = (value * 31) ^ hash(self.pkcolumn_name) - value = (value * 31) ^ hash(self.fktable_db) - value = (value * 31) ^ hash(self.fktable_name) - value = (value * 31) ^ hash(self.fkcolumn_name) - value = (value * 31) ^ hash(self.key_seq) - value = (value * 31) ^ hash(self.update_rule) - value = (value * 31) ^ hash(self.delete_rule) - value = (value * 31) ^ hash(self.fk_name) - value = (value * 31) ^ hash(self.pk_name) - value = (value * 31) ^ hash(self.enable_cstr) - value = (value * 31) ^ hash(self.validate_cstr) - value = (value * 31) ^ hash(self.rely_cstr) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class SQLUniqueConstraint: - """ - Attributes: - - table_db - - table_name - - column_name - - key_seq - - uk_name - - enable_cstr - - validate_cstr - - rely_cstr - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table_db', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 - (3, TType.STRING, 'column_name', None, None, ), # 3 - (4, TType.I32, 'key_seq', None, None, ), # 4 - (5, TType.STRING, 'uk_name', None, None, ), # 5 - (6, TType.BOOL, 'enable_cstr', None, None, ), # 6 - (7, TType.BOOL, 'validate_cstr', None, None, ), # 7 - (8, TType.BOOL, 'rely_cstr', None, None, ), # 8 - ) - - def __init__(self, table_db=None, table_name=None, column_name=None, key_seq=None, uk_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,): - self.table_db = table_db - self.table_name = table_name - self.column_name = column_name - self.key_seq = key_seq - self.uk_name = uk_name - self.enable_cstr = enable_cstr - self.validate_cstr = validate_cstr - self.rely_cstr = rely_cstr - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.table_db = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.table_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.column_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.key_seq = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.uk_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.BOOL: - self.enable_cstr = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.BOOL: - self.validate_cstr = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.BOOL: - self.rely_cstr = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('SQLUniqueConstraint') - if self.table_db is not None: - oprot.writeFieldBegin('table_db', TType.STRING, 1) - oprot.writeString(self.table_db) - oprot.writeFieldEnd() - if self.table_name is not None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) - oprot.writeFieldEnd() - if self.column_name is not None: - oprot.writeFieldBegin('column_name', TType.STRING, 3) - oprot.writeString(self.column_name) - oprot.writeFieldEnd() - if self.key_seq is not None: - oprot.writeFieldBegin('key_seq', TType.I32, 4) - oprot.writeI32(self.key_seq) - oprot.writeFieldEnd() - if self.uk_name is not None: - oprot.writeFieldBegin('uk_name', TType.STRING, 5) - oprot.writeString(self.uk_name) - oprot.writeFieldEnd() - if self.enable_cstr is not None: - oprot.writeFieldBegin('enable_cstr', TType.BOOL, 6) - oprot.writeBool(self.enable_cstr) - oprot.writeFieldEnd() - if self.validate_cstr is not None: - oprot.writeFieldBegin('validate_cstr', TType.BOOL, 7) - oprot.writeBool(self.validate_cstr) - oprot.writeFieldEnd() - if self.rely_cstr is not None: - oprot.writeFieldBegin('rely_cstr', TType.BOOL, 8) - oprot.writeBool(self.rely_cstr) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table_db) - value = (value * 31) ^ hash(self.table_name) - value = (value * 31) ^ hash(self.column_name) - value = (value * 31) ^ hash(self.key_seq) - value = (value * 31) ^ hash(self.uk_name) - value = (value * 31) ^ hash(self.enable_cstr) - value = (value * 31) ^ hash(self.validate_cstr) - value = (value * 31) ^ hash(self.rely_cstr) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class SQLNotNullConstraint: - """ - Attributes: - - table_db - - table_name - - column_name - - nn_name - - enable_cstr - - validate_cstr - - rely_cstr - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table_db', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 - (3, TType.STRING, 'column_name', None, None, ), # 3 - (4, TType.STRING, 'nn_name', None, None, ), # 4 - (5, TType.BOOL, 'enable_cstr', None, None, ), # 5 - (6, TType.BOOL, 'validate_cstr', None, None, ), # 6 - (7, TType.BOOL, 'rely_cstr', None, None, ), # 7 - ) - - def __init__(self, table_db=None, table_name=None, column_name=None, nn_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,): - self.table_db = table_db - self.table_name = table_name - self.column_name = column_name - self.nn_name = nn_name - self.enable_cstr = enable_cstr - self.validate_cstr = validate_cstr - self.rely_cstr = rely_cstr - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.table_db = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.table_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.column_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.nn_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.BOOL: - self.enable_cstr = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.BOOL: - self.validate_cstr = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.BOOL: - self.rely_cstr = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('SQLNotNullConstraint') - if self.table_db is not None: - oprot.writeFieldBegin('table_db', TType.STRING, 1) - oprot.writeString(self.table_db) - oprot.writeFieldEnd() - if self.table_name is not None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) - oprot.writeFieldEnd() - if self.column_name is not None: - oprot.writeFieldBegin('column_name', TType.STRING, 3) - oprot.writeString(self.column_name) - oprot.writeFieldEnd() - if self.nn_name is not None: - oprot.writeFieldBegin('nn_name', TType.STRING, 4) - oprot.writeString(self.nn_name) - oprot.writeFieldEnd() - if self.enable_cstr is not None: - oprot.writeFieldBegin('enable_cstr', TType.BOOL, 5) - oprot.writeBool(self.enable_cstr) - oprot.writeFieldEnd() - if self.validate_cstr is not None: - oprot.writeFieldBegin('validate_cstr', TType.BOOL, 6) - oprot.writeBool(self.validate_cstr) - oprot.writeFieldEnd() - if self.rely_cstr is not None: - oprot.writeFieldBegin('rely_cstr', TType.BOOL, 7) - oprot.writeBool(self.rely_cstr) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table_db) - value = (value * 31) ^ hash(self.table_name) - value = (value * 31) ^ hash(self.column_name) - value = (value * 31) ^ hash(self.nn_name) - value = (value * 31) ^ hash(self.enable_cstr) - value = (value * 31) ^ hash(self.validate_cstr) - value = (value * 31) ^ hash(self.rely_cstr) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Type: - """ - Attributes: - - name - - type1 - - type2 - - fields - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'type1', None, None, ), # 2 - (3, TType.STRING, 'type2', None, None, ), # 3 - (4, TType.LIST, 'fields', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 4 - ) - - def __init__(self, name=None, type1=None, type2=None, fields=None,): - self.name = name - self.type1 = type1 - self.type2 = type2 - self.fields = fields - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.type1 = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.type2 = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.fields = [] - (_etype3, _size0) = iprot.readListBegin() - for _i4 in xrange(_size0): - _elem5 = FieldSchema() - _elem5.read(iprot) - self.fields.append(_elem5) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Type') - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.type1 is not None: - oprot.writeFieldBegin('type1', TType.STRING, 2) - oprot.writeString(self.type1) - oprot.writeFieldEnd() - if self.type2 is not None: - oprot.writeFieldBegin('type2', TType.STRING, 3) - oprot.writeString(self.type2) - oprot.writeFieldEnd() - if self.fields is not None: - oprot.writeFieldBegin('fields', TType.LIST, 4) - oprot.writeListBegin(TType.STRUCT, len(self.fields)) - for iter6 in self.fields: - iter6.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.name) - value = (value * 31) ^ hash(self.type1) - value = (value * 31) ^ hash(self.type2) - value = (value * 31) ^ hash(self.fields) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class HiveObjectRef: - """ - Attributes: - - objectType - - dbName - - objectName - - partValues - - columnName - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'objectType', None, None, ), # 1 - (2, TType.STRING, 'dbName', None, None, ), # 2 - (3, TType.STRING, 'objectName', None, None, ), # 3 - (4, TType.LIST, 'partValues', (TType.STRING,None), None, ), # 4 - (5, TType.STRING, 'columnName', None, None, ), # 5 - ) - - def __init__(self, objectType=None, dbName=None, objectName=None, partValues=None, columnName=None,): - self.objectType = objectType - self.dbName = dbName - self.objectName = objectName - self.partValues = partValues - self.columnName = columnName - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.objectType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.objectName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.partValues = [] - (_etype10, _size7) = iprot.readListBegin() - for _i11 in xrange(_size7): - _elem12 = iprot.readString() - self.partValues.append(_elem12) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.columnName = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('HiveObjectRef') - if self.objectType is not None: - oprot.writeFieldBegin('objectType', TType.I32, 1) - oprot.writeI32(self.objectType) - oprot.writeFieldEnd() - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 2) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.objectName is not None: - oprot.writeFieldBegin('objectName', TType.STRING, 3) - oprot.writeString(self.objectName) - oprot.writeFieldEnd() - if self.partValues is not None: - oprot.writeFieldBegin('partValues', TType.LIST, 4) - oprot.writeListBegin(TType.STRING, len(self.partValues)) - for iter13 in self.partValues: - oprot.writeString(iter13) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.columnName is not None: - oprot.writeFieldBegin('columnName', TType.STRING, 5) - oprot.writeString(self.columnName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.objectType) - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.objectName) - value = (value * 31) ^ hash(self.partValues) - value = (value * 31) ^ hash(self.columnName) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PrivilegeGrantInfo: - """ - Attributes: - - privilege - - createTime - - grantor - - grantorType - - grantOption - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'privilege', None, None, ), # 1 - (2, TType.I32, 'createTime', None, None, ), # 2 - (3, TType.STRING, 'grantor', None, None, ), # 3 - (4, TType.I32, 'grantorType', None, None, ), # 4 - (5, TType.BOOL, 'grantOption', None, None, ), # 5 - ) - - def __init__(self, privilege=None, createTime=None, grantor=None, grantorType=None, grantOption=None,): - self.privilege = privilege - self.createTime = createTime - self.grantor = grantor - self.grantorType = grantorType - self.grantOption = grantOption - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.privilege = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.createTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.grantor = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.grantorType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.BOOL: - self.grantOption = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PrivilegeGrantInfo') - if self.privilege is not None: - oprot.writeFieldBegin('privilege', TType.STRING, 1) - oprot.writeString(self.privilege) - oprot.writeFieldEnd() - if self.createTime is not None: - oprot.writeFieldBegin('createTime', TType.I32, 2) - oprot.writeI32(self.createTime) - oprot.writeFieldEnd() - if self.grantor is not None: - oprot.writeFieldBegin('grantor', TType.STRING, 3) - oprot.writeString(self.grantor) - oprot.writeFieldEnd() - if self.grantorType is not None: - oprot.writeFieldBegin('grantorType', TType.I32, 4) - oprot.writeI32(self.grantorType) - oprot.writeFieldEnd() - if self.grantOption is not None: - oprot.writeFieldBegin('grantOption', TType.BOOL, 5) - oprot.writeBool(self.grantOption) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.privilege) - value = (value * 31) ^ hash(self.createTime) - value = (value * 31) ^ hash(self.grantor) - value = (value * 31) ^ hash(self.grantorType) - value = (value * 31) ^ hash(self.grantOption) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class HiveObjectPrivilege: - """ - Attributes: - - hiveObject - - principalName - - principalType - - grantInfo - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 1 - (2, TType.STRING, 'principalName', None, None, ), # 2 - (3, TType.I32, 'principalType', None, None, ), # 3 - (4, TType.STRUCT, 'grantInfo', (PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec), None, ), # 4 - ) - - def __init__(self, hiveObject=None, principalName=None, principalType=None, grantInfo=None,): - self.hiveObject = hiveObject - self.principalName = principalName - self.principalType = principalType - self.grantInfo = grantInfo - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.hiveObject = HiveObjectRef() - self.hiveObject.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.principalName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.principalType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.grantInfo = PrivilegeGrantInfo() - self.grantInfo.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('HiveObjectPrivilege') - if self.hiveObject is not None: - oprot.writeFieldBegin('hiveObject', TType.STRUCT, 1) - self.hiveObject.write(oprot) - oprot.writeFieldEnd() - if self.principalName is not None: - oprot.writeFieldBegin('principalName', TType.STRING, 2) - oprot.writeString(self.principalName) - oprot.writeFieldEnd() - if self.principalType is not None: - oprot.writeFieldBegin('principalType', TType.I32, 3) - oprot.writeI32(self.principalType) - oprot.writeFieldEnd() - if self.grantInfo is not None: - oprot.writeFieldBegin('grantInfo', TType.STRUCT, 4) - self.grantInfo.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.hiveObject) - value = (value * 31) ^ hash(self.principalName) - value = (value * 31) ^ hash(self.principalType) - value = (value * 31) ^ hash(self.grantInfo) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PrivilegeBag: - """ - Attributes: - - privileges - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'privileges', (TType.STRUCT,(HiveObjectPrivilege, HiveObjectPrivilege.thrift_spec)), None, ), # 1 - ) - - def __init__(self, privileges=None,): - self.privileges = privileges - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.privileges = [] - (_etype17, _size14) = iprot.readListBegin() - for _i18 in xrange(_size14): - _elem19 = HiveObjectPrivilege() - _elem19.read(iprot) - self.privileges.append(_elem19) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PrivilegeBag') - if self.privileges is not None: - oprot.writeFieldBegin('privileges', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.privileges)) - for iter20 in self.privileges: - iter20.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.privileges) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PrincipalPrivilegeSet: - """ - Attributes: - - userPrivileges - - groupPrivileges - - rolePrivileges - """ - - thrift_spec = ( - None, # 0 - (1, TType.MAP, 'userPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 1 - (2, TType.MAP, 'groupPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 2 - (3, TType.MAP, 'rolePrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 3 - ) - - def __init__(self, userPrivileges=None, groupPrivileges=None, rolePrivileges=None,): - self.userPrivileges = userPrivileges - self.groupPrivileges = groupPrivileges - self.rolePrivileges = rolePrivileges - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.MAP: - self.userPrivileges = {} - (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin() - for _i25 in xrange(_size21): - _key26 = iprot.readString() - _val27 = [] - (_etype31, _size28) = iprot.readListBegin() - for _i32 in xrange(_size28): - _elem33 = PrivilegeGrantInfo() - _elem33.read(iprot) - _val27.append(_elem33) - iprot.readListEnd() - self.userPrivileges[_key26] = _val27 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.MAP: - self.groupPrivileges = {} - (_ktype35, _vtype36, _size34 ) = iprot.readMapBegin() - for _i38 in xrange(_size34): - _key39 = iprot.readString() - _val40 = [] - (_etype44, _size41) = iprot.readListBegin() - for _i45 in xrange(_size41): - _elem46 = PrivilegeGrantInfo() - _elem46.read(iprot) - _val40.append(_elem46) - iprot.readListEnd() - self.groupPrivileges[_key39] = _val40 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.rolePrivileges = {} - (_ktype48, _vtype49, _size47 ) = iprot.readMapBegin() - for _i51 in xrange(_size47): - _key52 = iprot.readString() - _val53 = [] - (_etype57, _size54) = iprot.readListBegin() - for _i58 in xrange(_size54): - _elem59 = PrivilegeGrantInfo() - _elem59.read(iprot) - _val53.append(_elem59) - iprot.readListEnd() - self.rolePrivileges[_key52] = _val53 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PrincipalPrivilegeSet') - if self.userPrivileges is not None: - oprot.writeFieldBegin('userPrivileges', TType.MAP, 1) - oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.userPrivileges)) - for kiter60,viter61 in self.userPrivileges.items(): - oprot.writeString(kiter60) - oprot.writeListBegin(TType.STRUCT, len(viter61)) - for iter62 in viter61: - iter62.write(oprot) - oprot.writeListEnd() - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.groupPrivileges is not None: - oprot.writeFieldBegin('groupPrivileges', TType.MAP, 2) - oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.groupPrivileges)) - for kiter63,viter64 in self.groupPrivileges.items(): - oprot.writeString(kiter63) - oprot.writeListBegin(TType.STRUCT, len(viter64)) - for iter65 in viter64: - iter65.write(oprot) - oprot.writeListEnd() - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.rolePrivileges is not None: - oprot.writeFieldBegin('rolePrivileges', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.rolePrivileges)) - for kiter66,viter67 in self.rolePrivileges.items(): - oprot.writeString(kiter66) - oprot.writeListBegin(TType.STRUCT, len(viter67)) - for iter68 in viter67: - iter68.write(oprot) - oprot.writeListEnd() - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.userPrivileges) - value = (value * 31) ^ hash(self.groupPrivileges) - value = (value * 31) ^ hash(self.rolePrivileges) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GrantRevokePrivilegeRequest: - """ - Attributes: - - requestType - - privileges - - revokeGrantOption - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'requestType', None, None, ), # 1 - (2, TType.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 2 - (3, TType.BOOL, 'revokeGrantOption', None, None, ), # 3 - ) - - def __init__(self, requestType=None, privileges=None, revokeGrantOption=None,): - self.requestType = requestType - self.privileges = privileges - self.revokeGrantOption = revokeGrantOption - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.requestType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.privileges = PrivilegeBag() - self.privileges.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.BOOL: - self.revokeGrantOption = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GrantRevokePrivilegeRequest') - if self.requestType is not None: - oprot.writeFieldBegin('requestType', TType.I32, 1) - oprot.writeI32(self.requestType) - oprot.writeFieldEnd() - if self.privileges is not None: - oprot.writeFieldBegin('privileges', TType.STRUCT, 2) - self.privileges.write(oprot) - oprot.writeFieldEnd() - if self.revokeGrantOption is not None: - oprot.writeFieldBegin('revokeGrantOption', TType.BOOL, 3) - oprot.writeBool(self.revokeGrantOption) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.requestType) - value = (value * 31) ^ hash(self.privileges) - value = (value * 31) ^ hash(self.revokeGrantOption) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GrantRevokePrivilegeResponse: - """ - Attributes: - - success - """ - - thrift_spec = ( - None, # 0 - (1, TType.BOOL, 'success', None, None, ), # 1 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GrantRevokePrivilegeResponse') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 1) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Role: - """ - Attributes: - - roleName - - createTime - - ownerName - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'roleName', None, None, ), # 1 - (2, TType.I32, 'createTime', None, None, ), # 2 - (3, TType.STRING, 'ownerName', None, None, ), # 3 - ) - - def __init__(self, roleName=None, createTime=None, ownerName=None,): - self.roleName = roleName - self.createTime = createTime - self.ownerName = ownerName - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.roleName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.createTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.ownerName = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Role') - if self.roleName is not None: - oprot.writeFieldBegin('roleName', TType.STRING, 1) - oprot.writeString(self.roleName) - oprot.writeFieldEnd() - if self.createTime is not None: - oprot.writeFieldBegin('createTime', TType.I32, 2) - oprot.writeI32(self.createTime) - oprot.writeFieldEnd() - if self.ownerName is not None: - oprot.writeFieldBegin('ownerName', TType.STRING, 3) - oprot.writeString(self.ownerName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.roleName) - value = (value * 31) ^ hash(self.createTime) - value = (value * 31) ^ hash(self.ownerName) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class RolePrincipalGrant: - """ - Attributes: - - roleName - - principalName - - principalType - - grantOption - - grantTime - - grantorName - - grantorPrincipalType - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'roleName', None, None, ), # 1 - (2, TType.STRING, 'principalName', None, None, ), # 2 - (3, TType.I32, 'principalType', None, None, ), # 3 - (4, TType.BOOL, 'grantOption', None, None, ), # 4 - (5, TType.I32, 'grantTime', None, None, ), # 5 - (6, TType.STRING, 'grantorName', None, None, ), # 6 - (7, TType.I32, 'grantorPrincipalType', None, None, ), # 7 - ) - - def __init__(self, roleName=None, principalName=None, principalType=None, grantOption=None, grantTime=None, grantorName=None, grantorPrincipalType=None,): - self.roleName = roleName - self.principalName = principalName - self.principalType = principalType - self.grantOption = grantOption - self.grantTime = grantTime - self.grantorName = grantorName - self.grantorPrincipalType = grantorPrincipalType - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.roleName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.principalName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.principalType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.grantOption = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.grantTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.grantorName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I32: - self.grantorPrincipalType = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('RolePrincipalGrant') - if self.roleName is not None: - oprot.writeFieldBegin('roleName', TType.STRING, 1) - oprot.writeString(self.roleName) - oprot.writeFieldEnd() - if self.principalName is not None: - oprot.writeFieldBegin('principalName', TType.STRING, 2) - oprot.writeString(self.principalName) - oprot.writeFieldEnd() - if self.principalType is not None: - oprot.writeFieldBegin('principalType', TType.I32, 3) - oprot.writeI32(self.principalType) - oprot.writeFieldEnd() - if self.grantOption is not None: - oprot.writeFieldBegin('grantOption', TType.BOOL, 4) - oprot.writeBool(self.grantOption) - oprot.writeFieldEnd() - if self.grantTime is not None: - oprot.writeFieldBegin('grantTime', TType.I32, 5) - oprot.writeI32(self.grantTime) - oprot.writeFieldEnd() - if self.grantorName is not None: - oprot.writeFieldBegin('grantorName', TType.STRING, 6) - oprot.writeString(self.grantorName) - oprot.writeFieldEnd() - if self.grantorPrincipalType is not None: - oprot.writeFieldBegin('grantorPrincipalType', TType.I32, 7) - oprot.writeI32(self.grantorPrincipalType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.roleName) - value = (value * 31) ^ hash(self.principalName) - value = (value * 31) ^ hash(self.principalType) - value = (value * 31) ^ hash(self.grantOption) - value = (value * 31) ^ hash(self.grantTime) - value = (value * 31) ^ hash(self.grantorName) - value = (value * 31) ^ hash(self.grantorPrincipalType) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetRoleGrantsForPrincipalRequest: - """ - Attributes: - - principal_name - - principal_type - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'principal_name', None, None, ), # 1 - (2, TType.I32, 'principal_type', None, None, ), # 2 - ) - - def __init__(self, principal_name=None, principal_type=None,): - self.principal_name = principal_name - self.principal_type = principal_type - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.principal_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.principal_type = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetRoleGrantsForPrincipalRequest') - if self.principal_name is not None: - oprot.writeFieldBegin('principal_name', TType.STRING, 1) - oprot.writeString(self.principal_name) - oprot.writeFieldEnd() - if self.principal_type is not None: - oprot.writeFieldBegin('principal_type', TType.I32, 2) - oprot.writeI32(self.principal_type) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.principal_name is None: - raise TProtocol.TProtocolException(message='Required field principal_name is unset!') - if self.principal_type is None: - raise TProtocol.TProtocolException(message='Required field principal_type is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.principal_name) - value = (value * 31) ^ hash(self.principal_type) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetRoleGrantsForPrincipalResponse: - """ - Attributes: - - principalGrants - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'principalGrants', (TType.STRUCT,(RolePrincipalGrant, RolePrincipalGrant.thrift_spec)), None, ), # 1 - ) - - def __init__(self, principalGrants=None,): - self.principalGrants = principalGrants - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.principalGrants = [] - (_etype72, _size69) = iprot.readListBegin() - for _i73 in xrange(_size69): - _elem74 = RolePrincipalGrant() - _elem74.read(iprot) - self.principalGrants.append(_elem74) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetRoleGrantsForPrincipalResponse') - if self.principalGrants is not None: - oprot.writeFieldBegin('principalGrants', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.principalGrants)) - for iter75 in self.principalGrants: - iter75.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.principalGrants is None: - raise TProtocol.TProtocolException(message='Required field principalGrants is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.principalGrants) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetPrincipalsInRoleRequest: - """ - Attributes: - - roleName - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'roleName', None, None, ), # 1 - ) - - def __init__(self, roleName=None,): - self.roleName = roleName - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.roleName = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetPrincipalsInRoleRequest') - if self.roleName is not None: - oprot.writeFieldBegin('roleName', TType.STRING, 1) - oprot.writeString(self.roleName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.roleName is None: - raise TProtocol.TProtocolException(message='Required field roleName is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.roleName) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetPrincipalsInRoleResponse: - """ - Attributes: - - principalGrants - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'principalGrants', (TType.STRUCT,(RolePrincipalGrant, RolePrincipalGrant.thrift_spec)), None, ), # 1 - ) - - def __init__(self, principalGrants=None,): - self.principalGrants = principalGrants - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.principalGrants = [] - (_etype79, _size76) = iprot.readListBegin() - for _i80 in xrange(_size76): - _elem81 = RolePrincipalGrant() - _elem81.read(iprot) - self.principalGrants.append(_elem81) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetPrincipalsInRoleResponse') - if self.principalGrants is not None: - oprot.writeFieldBegin('principalGrants', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.principalGrants)) - for iter82 in self.principalGrants: - iter82.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.principalGrants is None: - raise TProtocol.TProtocolException(message='Required field principalGrants is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.principalGrants) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GrantRevokeRoleRequest: - """ - Attributes: - - requestType - - roleName - - principalName - - principalType - - grantor - - grantorType - - grantOption - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'requestType', None, None, ), # 1 - (2, TType.STRING, 'roleName', None, None, ), # 2 - (3, TType.STRING, 'principalName', None, None, ), # 3 - (4, TType.I32, 'principalType', None, None, ), # 4 - (5, TType.STRING, 'grantor', None, None, ), # 5 - (6, TType.I32, 'grantorType', None, None, ), # 6 - (7, TType.BOOL, 'grantOption', None, None, ), # 7 - ) - - def __init__(self, requestType=None, roleName=None, principalName=None, principalType=None, grantor=None, grantorType=None, grantOption=None,): - self.requestType = requestType - self.roleName = roleName - self.principalName = principalName - self.principalType = principalType - self.grantor = grantor - self.grantorType = grantorType - self.grantOption = grantOption - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.requestType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.roleName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.principalName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.principalType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.grantor = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.grantorType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.BOOL: - self.grantOption = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GrantRevokeRoleRequest') - if self.requestType is not None: - oprot.writeFieldBegin('requestType', TType.I32, 1) - oprot.writeI32(self.requestType) - oprot.writeFieldEnd() - if self.roleName is not None: - oprot.writeFieldBegin('roleName', TType.STRING, 2) - oprot.writeString(self.roleName) - oprot.writeFieldEnd() - if self.principalName is not None: - oprot.writeFieldBegin('principalName', TType.STRING, 3) - oprot.writeString(self.principalName) - oprot.writeFieldEnd() - if self.principalType is not None: - oprot.writeFieldBegin('principalType', TType.I32, 4) - oprot.writeI32(self.principalType) - oprot.writeFieldEnd() - if self.grantor is not None: - oprot.writeFieldBegin('grantor', TType.STRING, 5) - oprot.writeString(self.grantor) - oprot.writeFieldEnd() - if self.grantorType is not None: - oprot.writeFieldBegin('grantorType', TType.I32, 6) - oprot.writeI32(self.grantorType) - oprot.writeFieldEnd() - if self.grantOption is not None: - oprot.writeFieldBegin('grantOption', TType.BOOL, 7) - oprot.writeBool(self.grantOption) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.requestType) - value = (value * 31) ^ hash(self.roleName) - value = (value * 31) ^ hash(self.principalName) - value = (value * 31) ^ hash(self.principalType) - value = (value * 31) ^ hash(self.grantor) - value = (value * 31) ^ hash(self.grantorType) - value = (value * 31) ^ hash(self.grantOption) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GrantRevokeRoleResponse: - """ - Attributes: - - success - """ - - thrift_spec = ( - None, # 0 - (1, TType.BOOL, 'success', None, None, ), # 1 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GrantRevokeRoleResponse') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 1) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Database: - """ - Attributes: - - name - - description - - locationUri - - parameters - - privileges - - ownerName - - ownerType - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'description', None, None, ), # 2 - (3, TType.STRING, 'locationUri', None, None, ), # 3 - (4, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 4 - (5, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 5 - (6, TType.STRING, 'ownerName', None, None, ), # 6 - (7, TType.I32, 'ownerType', None, None, ), # 7 - ) - - def __init__(self, name=None, description=None, locationUri=None, parameters=None, privileges=None, ownerName=None, ownerType=None,): - self.name = name - self.description = description - self.locationUri = locationUri - self.parameters = parameters - self.privileges = privileges - self.ownerName = ownerName - self.ownerType = ownerType - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.description = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.locationUri = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.parameters = {} - (_ktype84, _vtype85, _size83 ) = iprot.readMapBegin() - for _i87 in xrange(_size83): - _key88 = iprot.readString() - _val89 = iprot.readString() - self.parameters[_key88] = _val89 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRUCT: - self.privileges = PrincipalPrivilegeSet() - self.privileges.read(iprot) - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.ownerName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I32: - self.ownerType = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Database') - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.description is not None: - oprot.writeFieldBegin('description', TType.STRING, 2) - oprot.writeString(self.description) - oprot.writeFieldEnd() - if self.locationUri is not None: - oprot.writeFieldBegin('locationUri', TType.STRING, 3) - oprot.writeString(self.locationUri) - oprot.writeFieldEnd() - if self.parameters is not None: - oprot.writeFieldBegin('parameters', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter90,viter91 in self.parameters.items(): - oprot.writeString(kiter90) - oprot.writeString(viter91) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.privileges is not None: - oprot.writeFieldBegin('privileges', TType.STRUCT, 5) - self.privileges.write(oprot) - oprot.writeFieldEnd() - if self.ownerName is not None: - oprot.writeFieldBegin('ownerName', TType.STRING, 6) - oprot.writeString(self.ownerName) - oprot.writeFieldEnd() - if self.ownerType is not None: - oprot.writeFieldBegin('ownerType', TType.I32, 7) - oprot.writeI32(self.ownerType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.name) - value = (value * 31) ^ hash(self.description) - value = (value * 31) ^ hash(self.locationUri) - value = (value * 31) ^ hash(self.parameters) - value = (value * 31) ^ hash(self.privileges) - value = (value * 31) ^ hash(self.ownerName) - value = (value * 31) ^ hash(self.ownerType) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class SerDeInfo: - """ - Attributes: - - name - - serializationLib - - parameters - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'serializationLib', None, None, ), # 2 - (3, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 3 - ) - - def __init__(self, name=None, serializationLib=None, parameters=None,): - self.name = name - self.serializationLib = serializationLib - self.parameters = parameters - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.serializationLib = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.parameters = {} - (_ktype93, _vtype94, _size92 ) = iprot.readMapBegin() - for _i96 in xrange(_size92): - _key97 = iprot.readString() - _val98 = iprot.readString() - self.parameters[_key97] = _val98 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('SerDeInfo') - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.serializationLib is not None: - oprot.writeFieldBegin('serializationLib', TType.STRING, 2) - oprot.writeString(self.serializationLib) - oprot.writeFieldEnd() - if self.parameters is not None: - oprot.writeFieldBegin('parameters', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter99,viter100 in self.parameters.items(): - oprot.writeString(kiter99) - oprot.writeString(viter100) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.name) - value = (value * 31) ^ hash(self.serializationLib) - value = (value * 31) ^ hash(self.parameters) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Order: - """ - Attributes: - - col - - order - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'col', None, None, ), # 1 - (2, TType.I32, 'order', None, None, ), # 2 - ) - - def __init__(self, col=None, order=None,): - self.col = col - self.order = order - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.col = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.order = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Order') - if self.col is not None: - oprot.writeFieldBegin('col', TType.STRING, 1) - oprot.writeString(self.col) - oprot.writeFieldEnd() - if self.order is not None: - oprot.writeFieldBegin('order', TType.I32, 2) - oprot.writeI32(self.order) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.col) - value = (value * 31) ^ hash(self.order) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class SkewedInfo: - """ - Attributes: - - skewedColNames - - skewedColValues - - skewedColValueLocationMaps - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'skewedColNames', (TType.STRING,None), None, ), # 1 - (2, TType.LIST, 'skewedColValues', (TType.LIST,(TType.STRING,None)), None, ), # 2 - (3, TType.MAP, 'skewedColValueLocationMaps', (TType.LIST,(TType.STRING,None),TType.STRING,None), None, ), # 3 - ) - - def __init__(self, skewedColNames=None, skewedColValues=None, skewedColValueLocationMaps=None,): - self.skewedColNames = skewedColNames - self.skewedColValues = skewedColValues - self.skewedColValueLocationMaps = skewedColValueLocationMaps - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.skewedColNames = [] - (_etype104, _size101) = iprot.readListBegin() - for _i105 in xrange(_size101): - _elem106 = iprot.readString() - self.skewedColNames.append(_elem106) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.skewedColValues = [] - (_etype110, _size107) = iprot.readListBegin() - for _i111 in xrange(_size107): - _elem112 = [] - (_etype116, _size113) = iprot.readListBegin() - for _i117 in xrange(_size113): - _elem118 = iprot.readString() - _elem112.append(_elem118) - iprot.readListEnd() - self.skewedColValues.append(_elem112) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.skewedColValueLocationMaps = {} - (_ktype120, _vtype121, _size119 ) = iprot.readMapBegin() - for _i123 in xrange(_size119): - _key124 = [] - (_etype129, _size126) = iprot.readListBegin() - for _i130 in xrange(_size126): - _elem131 = iprot.readString() - _key124.append(_elem131) - iprot.readListEnd() - _val125 = iprot.readString() - self.skewedColValueLocationMaps[_key124] = _val125 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('SkewedInfo') - if self.skewedColNames is not None: - oprot.writeFieldBegin('skewedColNames', TType.LIST, 1) - oprot.writeListBegin(TType.STRING, len(self.skewedColNames)) - for iter132 in self.skewedColNames: - oprot.writeString(iter132) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.skewedColValues is not None: - oprot.writeFieldBegin('skewedColValues', TType.LIST, 2) - oprot.writeListBegin(TType.LIST, len(self.skewedColValues)) - for iter133 in self.skewedColValues: - oprot.writeListBegin(TType.STRING, len(iter133)) - for iter134 in iter133: - oprot.writeString(iter134) - oprot.writeListEnd() - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.skewedColValueLocationMaps is not None: - oprot.writeFieldBegin('skewedColValueLocationMaps', TType.MAP, 3) - oprot.writeMapBegin(TType.LIST, TType.STRING, len(self.skewedColValueLocationMaps)) - for kiter135,viter136 in self.skewedColValueLocationMaps.items(): - oprot.writeListBegin(TType.STRING, len(kiter135)) - for iter137 in kiter135: - oprot.writeString(iter137) - oprot.writeListEnd() - oprot.writeString(viter136) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.skewedColNames) - value = (value * 31) ^ hash(self.skewedColValues) - value = (value * 31) ^ hash(self.skewedColValueLocationMaps) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class StorageDescriptor: - """ - Attributes: - - cols - - location - - inputFormat - - outputFormat - - compressed - - numBuckets - - serdeInfo - - bucketCols - - sortCols - - parameters - - skewedInfo - - storedAsSubDirectories - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'cols', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1 - (2, TType.STRING, 'location', None, None, ), # 2 - (3, TType.STRING, 'inputFormat', None, None, ), # 3 - (4, TType.STRING, 'outputFormat', None, None, ), # 4 - (5, TType.BOOL, 'compressed', None, None, ), # 5 - (6, TType.I32, 'numBuckets', None, None, ), # 6 - (7, TType.STRUCT, 'serdeInfo', (SerDeInfo, SerDeInfo.thrift_spec), None, ), # 7 - (8, TType.LIST, 'bucketCols', (TType.STRING,None), None, ), # 8 - (9, TType.LIST, 'sortCols', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 9 - (10, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 10 - (11, TType.STRUCT, 'skewedInfo', (SkewedInfo, SkewedInfo.thrift_spec), None, ), # 11 - (12, TType.BOOL, 'storedAsSubDirectories', None, None, ), # 12 - ) - - def __init__(self, cols=None, location=None, inputFormat=None, outputFormat=None, compressed=None, numBuckets=None, serdeInfo=None, bucketCols=None, sortCols=None, parameters=None, skewedInfo=None, storedAsSubDirectories=None,): - self.cols = cols - self.location = location - self.inputFormat = inputFormat - self.outputFormat = outputFormat - self.compressed = compressed - self.numBuckets = numBuckets - self.serdeInfo = serdeInfo - self.bucketCols = bucketCols - self.sortCols = sortCols - self.parameters = parameters - self.skewedInfo = skewedInfo - self.storedAsSubDirectories = storedAsSubDirectories - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.cols = [] - (_etype141, _size138) = iprot.readListBegin() - for _i142 in xrange(_size138): - _elem143 = FieldSchema() - _elem143.read(iprot) - self.cols.append(_elem143) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.location = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.inputFormat = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.outputFormat = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.BOOL: - self.compressed = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.numBuckets = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRUCT: - self.serdeInfo = SerDeInfo() - self.serdeInfo.read(iprot) - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.LIST: - self.bucketCols = [] - (_etype147, _size144) = iprot.readListBegin() - for _i148 in xrange(_size144): - _elem149 = iprot.readString() - self.bucketCols.append(_elem149) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.LIST: - self.sortCols = [] - (_etype153, _size150) = iprot.readListBegin() - for _i154 in xrange(_size150): - _elem155 = Order() - _elem155.read(iprot) - self.sortCols.append(_elem155) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.MAP: - self.parameters = {} - (_ktype157, _vtype158, _size156 ) = iprot.readMapBegin() - for _i160 in xrange(_size156): - _key161 = iprot.readString() - _val162 = iprot.readString() - self.parameters[_key161] = _val162 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 11: - if ftype == TType.STRUCT: - self.skewedInfo = SkewedInfo() - self.skewedInfo.read(iprot) - else: - iprot.skip(ftype) - elif fid == 12: - if ftype == TType.BOOL: - self.storedAsSubDirectories = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('StorageDescriptor') - if self.cols is not None: - oprot.writeFieldBegin('cols', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.cols)) - for iter163 in self.cols: - iter163.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.location is not None: - oprot.writeFieldBegin('location', TType.STRING, 2) - oprot.writeString(self.location) - oprot.writeFieldEnd() - if self.inputFormat is not None: - oprot.writeFieldBegin('inputFormat', TType.STRING, 3) - oprot.writeString(self.inputFormat) - oprot.writeFieldEnd() - if self.outputFormat is not None: - oprot.writeFieldBegin('outputFormat', TType.STRING, 4) - oprot.writeString(self.outputFormat) - oprot.writeFieldEnd() - if self.compressed is not None: - oprot.writeFieldBegin('compressed', TType.BOOL, 5) - oprot.writeBool(self.compressed) - oprot.writeFieldEnd() - if self.numBuckets is not None: - oprot.writeFieldBegin('numBuckets', TType.I32, 6) - oprot.writeI32(self.numBuckets) - oprot.writeFieldEnd() - if self.serdeInfo is not None: - oprot.writeFieldBegin('serdeInfo', TType.STRUCT, 7) - self.serdeInfo.write(oprot) - oprot.writeFieldEnd() - if self.bucketCols is not None: - oprot.writeFieldBegin('bucketCols', TType.LIST, 8) - oprot.writeListBegin(TType.STRING, len(self.bucketCols)) - for iter164 in self.bucketCols: - oprot.writeString(iter164) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.sortCols is not None: - oprot.writeFieldBegin('sortCols', TType.LIST, 9) - oprot.writeListBegin(TType.STRUCT, len(self.sortCols)) - for iter165 in self.sortCols: - iter165.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.parameters is not None: - oprot.writeFieldBegin('parameters', TType.MAP, 10) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter166,viter167 in self.parameters.items(): - oprot.writeString(kiter166) - oprot.writeString(viter167) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.skewedInfo is not None: - oprot.writeFieldBegin('skewedInfo', TType.STRUCT, 11) - self.skewedInfo.write(oprot) - oprot.writeFieldEnd() - if self.storedAsSubDirectories is not None: - oprot.writeFieldBegin('storedAsSubDirectories', TType.BOOL, 12) - oprot.writeBool(self.storedAsSubDirectories) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.cols) - value = (value * 31) ^ hash(self.location) - value = (value * 31) ^ hash(self.inputFormat) - value = (value * 31) ^ hash(self.outputFormat) - value = (value * 31) ^ hash(self.compressed) - value = (value * 31) ^ hash(self.numBuckets) - value = (value * 31) ^ hash(self.serdeInfo) - value = (value * 31) ^ hash(self.bucketCols) - value = (value * 31) ^ hash(self.sortCols) - value = (value * 31) ^ hash(self.parameters) - value = (value * 31) ^ hash(self.skewedInfo) - value = (value * 31) ^ hash(self.storedAsSubDirectories) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Table: - """ - Attributes: - - tableName - - dbName - - owner - - createTime - - lastAccessTime - - retention - - sd - - partitionKeys - - parameters - - viewOriginalText - - viewExpandedText - - tableType - - privileges - - temporary - - rewriteEnabled - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'dbName', None, None, ), # 2 - (3, TType.STRING, 'owner', None, None, ), # 3 - (4, TType.I32, 'createTime', None, None, ), # 4 - (5, TType.I32, 'lastAccessTime', None, None, ), # 5 - (6, TType.I32, 'retention', None, None, ), # 6 - (7, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 7 - (8, TType.LIST, 'partitionKeys', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 8 - (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9 - (10, TType.STRING, 'viewOriginalText', None, None, ), # 10 - (11, TType.STRING, 'viewExpandedText', None, None, ), # 11 - (12, TType.STRING, 'tableType', None, None, ), # 12 - (13, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 13 - (14, TType.BOOL, 'temporary', None, False, ), # 14 - (15, TType.BOOL, 'rewriteEnabled', None, None, ), # 15 - ) - - def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None, privileges=None, temporary=thrift_spec[14][4], rewriteEnabled=None,): - self.tableName = tableName - self.dbName = dbName - self.owner = owner - self.createTime = createTime - self.lastAccessTime = lastAccessTime - self.retention = retention - self.sd = sd - self.partitionKeys = partitionKeys - self.parameters = parameters - self.viewOriginalText = viewOriginalText - self.viewExpandedText = viewExpandedText - self.tableType = tableType - self.privileges = privileges - self.temporary = temporary - self.rewriteEnabled = rewriteEnabled - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.owner = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.createTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.lastAccessTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.retention = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRUCT: - self.sd = StorageDescriptor() - self.sd.read(iprot) - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.LIST: - self.partitionKeys = [] - (_etype171, _size168) = iprot.readListBegin() - for _i172 in xrange(_size168): - _elem173 = FieldSchema() - _elem173.read(iprot) - self.partitionKeys.append(_elem173) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.MAP: - self.parameters = {} - (_ktype175, _vtype176, _size174 ) = iprot.readMapBegin() - for _i178 in xrange(_size174): - _key179 = iprot.readString() - _val180 = iprot.readString() - self.parameters[_key179] = _val180 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.STRING: - self.viewOriginalText = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 11: - if ftype == TType.STRING: - self.viewExpandedText = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 12: - if ftype == TType.STRING: - self.tableType = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 13: - if ftype == TType.STRUCT: - self.privileges = PrincipalPrivilegeSet() - self.privileges.read(iprot) - else: - iprot.skip(ftype) - elif fid == 14: - if ftype == TType.BOOL: - self.temporary = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 15: - if ftype == TType.BOOL: - self.rewriteEnabled = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Table') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 2) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.owner is not None: - oprot.writeFieldBegin('owner', TType.STRING, 3) - oprot.writeString(self.owner) - oprot.writeFieldEnd() - if self.createTime is not None: - oprot.writeFieldBegin('createTime', TType.I32, 4) - oprot.writeI32(self.createTime) - oprot.writeFieldEnd() - if self.lastAccessTime is not None: - oprot.writeFieldBegin('lastAccessTime', TType.I32, 5) - oprot.writeI32(self.lastAccessTime) - oprot.writeFieldEnd() - if self.retention is not None: - oprot.writeFieldBegin('retention', TType.I32, 6) - oprot.writeI32(self.retention) - oprot.writeFieldEnd() - if self.sd is not None: - oprot.writeFieldBegin('sd', TType.STRUCT, 7) - self.sd.write(oprot) - oprot.writeFieldEnd() - if self.partitionKeys is not None: - oprot.writeFieldBegin('partitionKeys', TType.LIST, 8) - oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys)) - for iter181 in self.partitionKeys: - iter181.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.parameters is not None: - oprot.writeFieldBegin('parameters', TType.MAP, 9) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter182,viter183 in self.parameters.items(): - oprot.writeString(kiter182) - oprot.writeString(viter183) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.viewOriginalText is not None: - oprot.writeFieldBegin('viewOriginalText', TType.STRING, 10) - oprot.writeString(self.viewOriginalText) - oprot.writeFieldEnd() - if self.viewExpandedText is not None: - oprot.writeFieldBegin('viewExpandedText', TType.STRING, 11) - oprot.writeString(self.viewExpandedText) - oprot.writeFieldEnd() - if self.tableType is not None: - oprot.writeFieldBegin('tableType', TType.STRING, 12) - oprot.writeString(self.tableType) - oprot.writeFieldEnd() - if self.privileges is not None: - oprot.writeFieldBegin('privileges', TType.STRUCT, 13) - self.privileges.write(oprot) - oprot.writeFieldEnd() - if self.temporary is not None: - oprot.writeFieldBegin('temporary', TType.BOOL, 14) - oprot.writeBool(self.temporary) - oprot.writeFieldEnd() - if self.rewriteEnabled is not None: - oprot.writeFieldBegin('rewriteEnabled', TType.BOOL, 15) - oprot.writeBool(self.rewriteEnabled) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tableName) - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.owner) - value = (value * 31) ^ hash(self.createTime) - value = (value * 31) ^ hash(self.lastAccessTime) - value = (value * 31) ^ hash(self.retention) - value = (value * 31) ^ hash(self.sd) - value = (value * 31) ^ hash(self.partitionKeys) - value = (value * 31) ^ hash(self.parameters) - value = (value * 31) ^ hash(self.viewOriginalText) - value = (value * 31) ^ hash(self.viewExpandedText) - value = (value * 31) ^ hash(self.tableType) - value = (value * 31) ^ hash(self.privileges) - value = (value * 31) ^ hash(self.temporary) - value = (value * 31) ^ hash(self.rewriteEnabled) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Partition: - """ - Attributes: - - values - - dbName - - tableName - - createTime - - lastAccessTime - - sd - - parameters - - privileges - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'values', (TType.STRING,None), None, ), # 1 - (2, TType.STRING, 'dbName', None, None, ), # 2 - (3, TType.STRING, 'tableName', None, None, ), # 3 - (4, TType.I32, 'createTime', None, None, ), # 4 - (5, TType.I32, 'lastAccessTime', None, None, ), # 5 - (6, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 6 - (7, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 7 - (8, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 8 - ) - - def __init__(self, values=None, dbName=None, tableName=None, createTime=None, lastAccessTime=None, sd=None, parameters=None, privileges=None,): - self.values = values - self.dbName = dbName - self.tableName = tableName - self.createTime = createTime - self.lastAccessTime = lastAccessTime - self.sd = sd - self.parameters = parameters - self.privileges = privileges - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.values = [] - (_etype187, _size184) = iprot.readListBegin() - for _i188 in xrange(_size184): - _elem189 = iprot.readString() - self.values.append(_elem189) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.tableName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.createTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.lastAccessTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRUCT: - self.sd = StorageDescriptor() - self.sd.read(iprot) - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.MAP: - self.parameters = {} - (_ktype191, _vtype192, _size190 ) = iprot.readMapBegin() - for _i194 in xrange(_size190): - _key195 = iprot.readString() - _val196 = iprot.readString() - self.parameters[_key195] = _val196 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.STRUCT: - self.privileges = PrincipalPrivilegeSet() - self.privileges.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Partition') - if self.values is not None: - oprot.writeFieldBegin('values', TType.LIST, 1) - oprot.writeListBegin(TType.STRING, len(self.values)) - for iter197 in self.values: - oprot.writeString(iter197) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 2) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 3) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.createTime is not None: - oprot.writeFieldBegin('createTime', TType.I32, 4) - oprot.writeI32(self.createTime) - oprot.writeFieldEnd() - if self.lastAccessTime is not None: - oprot.writeFieldBegin('lastAccessTime', TType.I32, 5) - oprot.writeI32(self.lastAccessTime) - oprot.writeFieldEnd() - if self.sd is not None: - oprot.writeFieldBegin('sd', TType.STRUCT, 6) - self.sd.write(oprot) - oprot.writeFieldEnd() - if self.parameters is not None: - oprot.writeFieldBegin('parameters', TType.MAP, 7) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter198,viter199 in self.parameters.items(): - oprot.writeString(kiter198) - oprot.writeString(viter199) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.privileges is not None: - oprot.writeFieldBegin('privileges', TType.STRUCT, 8) - self.privileges.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.values) - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tableName) - value = (value * 31) ^ hash(self.createTime) - value = (value * 31) ^ hash(self.lastAccessTime) - value = (value * 31) ^ hash(self.sd) - value = (value * 31) ^ hash(self.parameters) - value = (value * 31) ^ hash(self.privileges) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PartitionWithoutSD: - """ - Attributes: - - values - - createTime - - lastAccessTime - - relativePath - - parameters - - privileges - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'values', (TType.STRING,None), None, ), # 1 - (2, TType.I32, 'createTime', None, None, ), # 2 - (3, TType.I32, 'lastAccessTime', None, None, ), # 3 - (4, TType.STRING, 'relativePath', None, None, ), # 4 - (5, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 5 - (6, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 6 - ) - - def __init__(self, values=None, createTime=None, lastAccessTime=None, relativePath=None, parameters=None, privileges=None,): - self.values = values - self.createTime = createTime - self.lastAccessTime = lastAccessTime - self.relativePath = relativePath - self.parameters = parameters - self.privileges = privileges - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.values = [] - (_etype203, _size200) = iprot.readListBegin() - for _i204 in xrange(_size200): - _elem205 = iprot.readString() - self.values.append(_elem205) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.createTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.lastAccessTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.relativePath = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.MAP: - self.parameters = {} - (_ktype207, _vtype208, _size206 ) = iprot.readMapBegin() - for _i210 in xrange(_size206): - _key211 = iprot.readString() - _val212 = iprot.readString() - self.parameters[_key211] = _val212 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRUCT: - self.privileges = PrincipalPrivilegeSet() - self.privileges.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PartitionWithoutSD') - if self.values is not None: - oprot.writeFieldBegin('values', TType.LIST, 1) - oprot.writeListBegin(TType.STRING, len(self.values)) - for iter213 in self.values: - oprot.writeString(iter213) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.createTime is not None: - oprot.writeFieldBegin('createTime', TType.I32, 2) - oprot.writeI32(self.createTime) - oprot.writeFieldEnd() - if self.lastAccessTime is not None: - oprot.writeFieldBegin('lastAccessTime', TType.I32, 3) - oprot.writeI32(self.lastAccessTime) - oprot.writeFieldEnd() - if self.relativePath is not None: - oprot.writeFieldBegin('relativePath', TType.STRING, 4) - oprot.writeString(self.relativePath) - oprot.writeFieldEnd() - if self.parameters is not None: - oprot.writeFieldBegin('parameters', TType.MAP, 5) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter214,viter215 in self.parameters.items(): - oprot.writeString(kiter214) - oprot.writeString(viter215) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.privileges is not None: - oprot.writeFieldBegin('privileges', TType.STRUCT, 6) - self.privileges.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.values) - value = (value * 31) ^ hash(self.createTime) - value = (value * 31) ^ hash(self.lastAccessTime) - value = (value * 31) ^ hash(self.relativePath) - value = (value * 31) ^ hash(self.parameters) - value = (value * 31) ^ hash(self.privileges) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PartitionSpecWithSharedSD: - """ - Attributes: - - partitions - - sd - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'partitions', (TType.STRUCT,(PartitionWithoutSD, PartitionWithoutSD.thrift_spec)), None, ), # 1 - (2, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 2 - ) - - def __init__(self, partitions=None, sd=None,): - self.partitions = partitions - self.sd = sd - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.partitions = [] - (_etype219, _size216) = iprot.readListBegin() - for _i220 in xrange(_size216): - _elem221 = PartitionWithoutSD() - _elem221.read(iprot) - self.partitions.append(_elem221) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.sd = StorageDescriptor() - self.sd.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PartitionSpecWithSharedSD') - if self.partitions is not None: - oprot.writeFieldBegin('partitions', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.partitions)) - for iter222 in self.partitions: - iter222.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.sd is not None: - oprot.writeFieldBegin('sd', TType.STRUCT, 2) - self.sd.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.partitions) - value = (value * 31) ^ hash(self.sd) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PartitionListComposingSpec: - """ - Attributes: - - partitions - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'partitions', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1 - ) - - def __init__(self, partitions=None,): - self.partitions = partitions - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.partitions = [] - (_etype226, _size223) = iprot.readListBegin() - for _i227 in xrange(_size223): - _elem228 = Partition() - _elem228.read(iprot) - self.partitions.append(_elem228) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PartitionListComposingSpec') - if self.partitions is not None: - oprot.writeFieldBegin('partitions', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.partitions)) - for iter229 in self.partitions: - iter229.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.partitions) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PartitionSpec: - """ - Attributes: - - dbName - - tableName - - rootPath - - sharedSDPartitionSpec - - partitionList - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'tableName', None, None, ), # 2 - (3, TType.STRING, 'rootPath', None, None, ), # 3 - (4, TType.STRUCT, 'sharedSDPartitionSpec', (PartitionSpecWithSharedSD, PartitionSpecWithSharedSD.thrift_spec), None, ), # 4 - (5, TType.STRUCT, 'partitionList', (PartitionListComposingSpec, PartitionListComposingSpec.thrift_spec), None, ), # 5 - ) - - def __init__(self, dbName=None, tableName=None, rootPath=None, sharedSDPartitionSpec=None, partitionList=None,): - self.dbName = dbName - self.tableName = tableName - self.rootPath = rootPath - self.sharedSDPartitionSpec = sharedSDPartitionSpec - self.partitionList = partitionList - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tableName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.rootPath = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.sharedSDPartitionSpec = PartitionSpecWithSharedSD() - self.sharedSDPartitionSpec.read(iprot) - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRUCT: - self.partitionList = PartitionListComposingSpec() - self.partitionList.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PartitionSpec') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 2) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.rootPath is not None: - oprot.writeFieldBegin('rootPath', TType.STRING, 3) - oprot.writeString(self.rootPath) - oprot.writeFieldEnd() - if self.sharedSDPartitionSpec is not None: - oprot.writeFieldBegin('sharedSDPartitionSpec', TType.STRUCT, 4) - self.sharedSDPartitionSpec.write(oprot) - oprot.writeFieldEnd() - if self.partitionList is not None: - oprot.writeFieldBegin('partitionList', TType.STRUCT, 5) - self.partitionList.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tableName) - value = (value * 31) ^ hash(self.rootPath) - value = (value * 31) ^ hash(self.sharedSDPartitionSpec) - value = (value * 31) ^ hash(self.partitionList) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Index: - """ - Attributes: - - indexName - - indexHandlerClass - - dbName - - origTableName - - createTime - - lastAccessTime - - indexTableName - - sd - - parameters - - deferredRebuild - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'indexName', None, None, ), # 1 - (2, TType.STRING, 'indexHandlerClass', None, None, ), # 2 - (3, TType.STRING, 'dbName', None, None, ), # 3 - (4, TType.STRING, 'origTableName', None, None, ), # 4 - (5, TType.I32, 'createTime', None, None, ), # 5 - (6, TType.I32, 'lastAccessTime', None, None, ), # 6 - (7, TType.STRING, 'indexTableName', None, None, ), # 7 - (8, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 8 - (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9 - (10, TType.BOOL, 'deferredRebuild', None, None, ), # 10 - ) - - def __init__(self, indexName=None, indexHandlerClass=None, dbName=None, origTableName=None, createTime=None, lastAccessTime=None, indexTableName=None, sd=None, parameters=None, deferredRebuild=None,): - self.indexName = indexName - self.indexHandlerClass = indexHandlerClass - self.dbName = dbName - self.origTableName = origTableName - self.createTime = createTime - self.lastAccessTime = lastAccessTime - self.indexTableName = indexTableName - self.sd = sd - self.parameters = parameters - self.deferredRebuild = deferredRebuild - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.indexName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.indexHandlerClass = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.origTableName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.createTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.lastAccessTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRING: - self.indexTableName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.STRUCT: - self.sd = StorageDescriptor() - self.sd.read(iprot) - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.MAP: - self.parameters = {} - (_ktype231, _vtype232, _size230 ) = iprot.readMapBegin() - for _i234 in xrange(_size230): - _key235 = iprot.readString() - _val236 = iprot.readString() - self.parameters[_key235] = _val236 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.BOOL: - self.deferredRebuild = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Index') - if self.indexName is not None: - oprot.writeFieldBegin('indexName', TType.STRING, 1) - oprot.writeString(self.indexName) - oprot.writeFieldEnd() - if self.indexHandlerClass is not None: - oprot.writeFieldBegin('indexHandlerClass', TType.STRING, 2) - oprot.writeString(self.indexHandlerClass) - oprot.writeFieldEnd() - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 3) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.origTableName is not None: - oprot.writeFieldBegin('origTableName', TType.STRING, 4) - oprot.writeString(self.origTableName) - oprot.writeFieldEnd() - if self.createTime is not None: - oprot.writeFieldBegin('createTime', TType.I32, 5) - oprot.writeI32(self.createTime) - oprot.writeFieldEnd() - if self.lastAccessTime is not None: - oprot.writeFieldBegin('lastAccessTime', TType.I32, 6) - oprot.writeI32(self.lastAccessTime) - oprot.writeFieldEnd() - if self.indexTableName is not None: - oprot.writeFieldBegin('indexTableName', TType.STRING, 7) - oprot.writeString(self.indexTableName) - oprot.writeFieldEnd() - if self.sd is not None: - oprot.writeFieldBegin('sd', TType.STRUCT, 8) - self.sd.write(oprot) - oprot.writeFieldEnd() - if self.parameters is not None: - oprot.writeFieldBegin('parameters', TType.MAP, 9) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter237,viter238 in self.parameters.items(): - oprot.writeString(kiter237) - oprot.writeString(viter238) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.deferredRebuild is not None: - oprot.writeFieldBegin('deferredRebuild', TType.BOOL, 10) - oprot.writeBool(self.deferredRebuild) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.indexName) - value = (value * 31) ^ hash(self.indexHandlerClass) - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.origTableName) - value = (value * 31) ^ hash(self.createTime) - value = (value * 31) ^ hash(self.lastAccessTime) - value = (value * 31) ^ hash(self.indexTableName) - value = (value * 31) ^ hash(self.sd) - value = (value * 31) ^ hash(self.parameters) - value = (value * 31) ^ hash(self.deferredRebuild) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class BooleanColumnStatsData: - """ - Attributes: - - numTrues - - numFalses - - numNulls - - bitVectors - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'numTrues', None, None, ), # 1 - (2, TType.I64, 'numFalses', None, None, ), # 2 - (3, TType.I64, 'numNulls', None, None, ), # 3 - (4, TType.STRING, 'bitVectors', None, None, ), # 4 - ) - - def __init__(self, numTrues=None, numFalses=None, numNulls=None, bitVectors=None,): - self.numTrues = numTrues - self.numFalses = numFalses - self.numNulls = numNulls - self.bitVectors = bitVectors - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.numTrues = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I64: - self.numFalses = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.numNulls = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.bitVectors = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('BooleanColumnStatsData') - if self.numTrues is not None: - oprot.writeFieldBegin('numTrues', TType.I64, 1) - oprot.writeI64(self.numTrues) - oprot.writeFieldEnd() - if self.numFalses is not None: - oprot.writeFieldBegin('numFalses', TType.I64, 2) - oprot.writeI64(self.numFalses) - oprot.writeFieldEnd() - if self.numNulls is not None: - oprot.writeFieldBegin('numNulls', TType.I64, 3) - oprot.writeI64(self.numNulls) - oprot.writeFieldEnd() - if self.bitVectors is not None: - oprot.writeFieldBegin('bitVectors', TType.STRING, 4) - oprot.writeString(self.bitVectors) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.numTrues is None: - raise TProtocol.TProtocolException(message='Required field numTrues is unset!') - if self.numFalses is None: - raise TProtocol.TProtocolException(message='Required field numFalses is unset!') - if self.numNulls is None: - raise TProtocol.TProtocolException(message='Required field numNulls is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.numTrues) - value = (value * 31) ^ hash(self.numFalses) - value = (value * 31) ^ hash(self.numNulls) - value = (value * 31) ^ hash(self.bitVectors) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class DoubleColumnStatsData: - """ - Attributes: - - lowValue - - highValue - - numNulls - - numDVs - - bitVectors - """ - - thrift_spec = ( - None, # 0 - (1, TType.DOUBLE, 'lowValue', None, None, ), # 1 - (2, TType.DOUBLE, 'highValue', None, None, ), # 2 - (3, TType.I64, 'numNulls', None, None, ), # 3 - (4, TType.I64, 'numDVs', None, None, ), # 4 - (5, TType.STRING, 'bitVectors', None, None, ), # 5 - ) - - def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None, bitVectors=None,): - self.lowValue = lowValue - self.highValue = highValue - self.numNulls = numNulls - self.numDVs = numDVs - self.bitVectors = bitVectors - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.DOUBLE: - self.lowValue = iprot.readDouble() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.DOUBLE: - self.highValue = iprot.readDouble() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.numNulls = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I64: - self.numDVs = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.bitVectors = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('DoubleColumnStatsData') - if self.lowValue is not None: - oprot.writeFieldBegin('lowValue', TType.DOUBLE, 1) - oprot.writeDouble(self.lowValue) - oprot.writeFieldEnd() - if self.highValue is not None: - oprot.writeFieldBegin('highValue', TType.DOUBLE, 2) - oprot.writeDouble(self.highValue) - oprot.writeFieldEnd() - if self.numNulls is not None: - oprot.writeFieldBegin('numNulls', TType.I64, 3) - oprot.writeI64(self.numNulls) - oprot.writeFieldEnd() - if self.numDVs is not None: - oprot.writeFieldBegin('numDVs', TType.I64, 4) - oprot.writeI64(self.numDVs) - oprot.writeFieldEnd() - if self.bitVectors is not None: - oprot.writeFieldBegin('bitVectors', TType.STRING, 5) - oprot.writeString(self.bitVectors) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.numNulls is None: - raise TProtocol.TProtocolException(message='Required field numNulls is unset!') - if self.numDVs is None: - raise TProtocol.TProtocolException(message='Required field numDVs is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.lowValue) - value = (value * 31) ^ hash(self.highValue) - value = (value * 31) ^ hash(self.numNulls) - value = (value * 31) ^ hash(self.numDVs) - value = (value * 31) ^ hash(self.bitVectors) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class LongColumnStatsData: - """ - Attributes: - - lowValue - - highValue - - numNulls - - numDVs - - bitVectors - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'lowValue', None, None, ), # 1 - (2, TType.I64, 'highValue', None, None, ), # 2 - (3, TType.I64, 'numNulls', None, None, ), # 3 - (4, TType.I64, 'numDVs', None, None, ), # 4 - (5, TType.STRING, 'bitVectors', None, None, ), # 5 - ) - - def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None, bitVectors=None,): - self.lowValue = lowValue - self.highValue = highValue - self.numNulls = numNulls - self.numDVs = numDVs - self.bitVectors = bitVectors - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.lowValue = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I64: - self.highValue = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.numNulls = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I64: - self.numDVs = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.bitVectors = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('LongColumnStatsData') - if self.lowValue is not None: - oprot.writeFieldBegin('lowValue', TType.I64, 1) - oprot.writeI64(self.lowValue) - oprot.writeFieldEnd() - if self.highValue is not None: - oprot.writeFieldBegin('highValue', TType.I64, 2) - oprot.writeI64(self.highValue) - oprot.writeFieldEnd() - if self.numNulls is not None: - oprot.writeFieldBegin('numNulls', TType.I64, 3) - oprot.writeI64(self.numNulls) - oprot.writeFieldEnd() - if self.numDVs is not None: - oprot.writeFieldBegin('numDVs', TType.I64, 4) - oprot.writeI64(self.numDVs) - oprot.writeFieldEnd() - if self.bitVectors is not None: - oprot.writeFieldBegin('bitVectors', TType.STRING, 5) - oprot.writeString(self.bitVectors) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.numNulls is None: - raise TProtocol.TProtocolException(message='Required field numNulls is unset!') - if self.numDVs is None: - raise TProtocol.TProtocolException(message='Required field numDVs is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.lowValue) - value = (value * 31) ^ hash(self.highValue) - value = (value * 31) ^ hash(self.numNulls) - value = (value * 31) ^ hash(self.numDVs) - value = (value * 31) ^ hash(self.bitVectors) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class StringColumnStatsData: - """ - Attributes: - - maxColLen - - avgColLen - - numNulls - - numDVs - - bitVectors - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'maxColLen', None, None, ), # 1 - (2, TType.DOUBLE, 'avgColLen', None, None, ), # 2 - (3, TType.I64, 'numNulls', None, None, ), # 3 - (4, TType.I64, 'numDVs', None, None, ), # 4 - (5, TType.STRING, 'bitVectors', None, None, ), # 5 - ) - - def __init__(self, maxColLen=None, avgColLen=None, numNulls=None, numDVs=None, bitVectors=None,): - self.maxColLen = maxColLen - self.avgColLen = avgColLen - self.numNulls = numNulls - self.numDVs = numDVs - self.bitVectors = bitVectors - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.maxColLen = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.DOUBLE: - self.avgColLen = iprot.readDouble() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.numNulls = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I64: - self.numDVs = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.bitVectors = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('StringColumnStatsData') - if self.maxColLen is not None: - oprot.writeFieldBegin('maxColLen', TType.I64, 1) - oprot.writeI64(self.maxColLen) - oprot.writeFieldEnd() - if self.avgColLen is not None: - oprot.writeFieldBegin('avgColLen', TType.DOUBLE, 2) - oprot.writeDouble(self.avgColLen) - oprot.writeFieldEnd() - if self.numNulls is not None: - oprot.writeFieldBegin('numNulls', TType.I64, 3) - oprot.writeI64(self.numNulls) - oprot.writeFieldEnd() - if self.numDVs is not None: - oprot.writeFieldBegin('numDVs', TType.I64, 4) - oprot.writeI64(self.numDVs) - oprot.writeFieldEnd() - if self.bitVectors is not None: - oprot.writeFieldBegin('bitVectors', TType.STRING, 5) - oprot.writeString(self.bitVectors) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.maxColLen is None: - raise TProtocol.TProtocolException(message='Required field maxColLen is unset!') - if self.avgColLen is None: - raise TProtocol.TProtocolException(message='Required field avgColLen is unset!') - if self.numNulls is None: - raise TProtocol.TProtocolException(message='Required field numNulls is unset!') - if self.numDVs is None: - raise TProtocol.TProtocolException(message='Required field numDVs is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.maxColLen) - value = (value * 31) ^ hash(self.avgColLen) - value = (value * 31) ^ hash(self.numNulls) - value = (value * 31) ^ hash(self.numDVs) - value = (value * 31) ^ hash(self.bitVectors) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class BinaryColumnStatsData: - """ - Attributes: - - maxColLen - - avgColLen - - numNulls - - bitVectors - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'maxColLen', None, None, ), # 1 - (2, TType.DOUBLE, 'avgColLen', None, None, ), # 2 - (3, TType.I64, 'numNulls', None, None, ), # 3 - (4, TType.STRING, 'bitVectors', None, None, ), # 4 - ) - - def __init__(self, maxColLen=None, avgColLen=None, numNulls=None, bitVectors=None,): - self.maxColLen = maxColLen - self.avgColLen = avgColLen - self.numNulls = numNulls - self.bitVectors = bitVectors - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.maxColLen = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.DOUBLE: - self.avgColLen = iprot.readDouble() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.numNulls = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.bitVectors = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('BinaryColumnStatsData') - if self.maxColLen is not None: - oprot.writeFieldBegin('maxColLen', TType.I64, 1) - oprot.writeI64(self.maxColLen) - oprot.writeFieldEnd() - if self.avgColLen is not None: - oprot.writeFieldBegin('avgColLen', TType.DOUBLE, 2) - oprot.writeDouble(self.avgColLen) - oprot.writeFieldEnd() - if self.numNulls is not None: - oprot.writeFieldBegin('numNulls', TType.I64, 3) - oprot.writeI64(self.numNulls) - oprot.writeFieldEnd() - if self.bitVectors is not None: - oprot.writeFieldBegin('bitVectors', TType.STRING, 4) - oprot.writeString(self.bitVectors) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.maxColLen is None: - raise TProtocol.TProtocolException(message='Required field maxColLen is unset!') - if self.avgColLen is None: - raise TProtocol.TProtocolException(message='Required field avgColLen is unset!') - if self.numNulls is None: - raise TProtocol.TProtocolException(message='Required field numNulls is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.maxColLen) - value = (value * 31) ^ hash(self.avgColLen) - value = (value * 31) ^ hash(self.numNulls) - value = (value * 31) ^ hash(self.bitVectors) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Decimal: - """ - Attributes: - - unscaled - - scale - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'unscaled', None, None, ), # 1 - None, # 2 - (3, TType.I16, 'scale', None, None, ), # 3 - ) - - def __init__(self, unscaled=None, scale=None,): - self.unscaled = unscaled - self.scale = scale - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.unscaled = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.scale = iprot.readI16() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Decimal') - if self.unscaled is not None: - oprot.writeFieldBegin('unscaled', TType.STRING, 1) - oprot.writeString(self.unscaled) - oprot.writeFieldEnd() - if self.scale is not None: - oprot.writeFieldBegin('scale', TType.I16, 3) - oprot.writeI16(self.scale) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.unscaled is None: - raise TProtocol.TProtocolException(message='Required field unscaled is unset!') - if self.scale is None: - raise TProtocol.TProtocolException(message='Required field scale is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.unscaled) - value = (value * 31) ^ hash(self.scale) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class DecimalColumnStatsData: - """ - Attributes: - - lowValue - - highValue - - numNulls - - numDVs - - bitVectors - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'lowValue', (Decimal, Decimal.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'highValue', (Decimal, Decimal.thrift_spec), None, ), # 2 - (3, TType.I64, 'numNulls', None, None, ), # 3 - (4, TType.I64, 'numDVs', None, None, ), # 4 - (5, TType.STRING, 'bitVectors', None, None, ), # 5 - ) - - def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None, bitVectors=None,): - self.lowValue = lowValue - self.highValue = highValue - self.numNulls = numNulls - self.numDVs = numDVs - self.bitVectors = bitVectors - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.lowValue = Decimal() - self.lowValue.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.highValue = Decimal() - self.highValue.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.numNulls = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I64: - self.numDVs = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.bitVectors = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('DecimalColumnStatsData') - if self.lowValue is not None: - oprot.writeFieldBegin('lowValue', TType.STRUCT, 1) - self.lowValue.write(oprot) - oprot.writeFieldEnd() - if self.highValue is not None: - oprot.writeFieldBegin('highValue', TType.STRUCT, 2) - self.highValue.write(oprot) - oprot.writeFieldEnd() - if self.numNulls is not None: - oprot.writeFieldBegin('numNulls', TType.I64, 3) - oprot.writeI64(self.numNulls) - oprot.writeFieldEnd() - if self.numDVs is not None: - oprot.writeFieldBegin('numDVs', TType.I64, 4) - oprot.writeI64(self.numDVs) - oprot.writeFieldEnd() - if self.bitVectors is not None: - oprot.writeFieldBegin('bitVectors', TType.STRING, 5) - oprot.writeString(self.bitVectors) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.numNulls is None: - raise TProtocol.TProtocolException(message='Required field numNulls is unset!') - if self.numDVs is None: - raise TProtocol.TProtocolException(message='Required field numDVs is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.lowValue) - value = (value * 31) ^ hash(self.highValue) - value = (value * 31) ^ hash(self.numNulls) - value = (value * 31) ^ hash(self.numDVs) - value = (value * 31) ^ hash(self.bitVectors) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Date: - """ - Attributes: - - daysSinceEpoch - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'daysSinceEpoch', None, None, ), # 1 - ) - - def __init__(self, daysSinceEpoch=None,): - self.daysSinceEpoch = daysSinceEpoch - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.daysSinceEpoch = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Date') - if self.daysSinceEpoch is not None: - oprot.writeFieldBegin('daysSinceEpoch', TType.I64, 1) - oprot.writeI64(self.daysSinceEpoch) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.daysSinceEpoch is None: - raise TProtocol.TProtocolException(message='Required field daysSinceEpoch is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.daysSinceEpoch) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class DateColumnStatsData: - """ - Attributes: - - lowValue - - highValue - - numNulls - - numDVs - - bitVectors - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'lowValue', (Date, Date.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'highValue', (Date, Date.thrift_spec), None, ), # 2 - (3, TType.I64, 'numNulls', None, None, ), # 3 - (4, TType.I64, 'numDVs', None, None, ), # 4 - (5, TType.STRING, 'bitVectors', None, None, ), # 5 - ) - - def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None, bitVectors=None,): - self.lowValue = lowValue - self.highValue = highValue - self.numNulls = numNulls - self.numDVs = numDVs - self.bitVectors = bitVectors - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.lowValue = Date() - self.lowValue.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.highValue = Date() - self.highValue.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.numNulls = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I64: - self.numDVs = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.bitVectors = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('DateColumnStatsData') - if self.lowValue is not None: - oprot.writeFieldBegin('lowValue', TType.STRUCT, 1) - self.lowValue.write(oprot) - oprot.writeFieldEnd() - if self.highValue is not None: - oprot.writeFieldBegin('highValue', TType.STRUCT, 2) - self.highValue.write(oprot) - oprot.writeFieldEnd() - if self.numNulls is not None: - oprot.writeFieldBegin('numNulls', TType.I64, 3) - oprot.writeI64(self.numNulls) - oprot.writeFieldEnd() - if self.numDVs is not None: - oprot.writeFieldBegin('numDVs', TType.I64, 4) - oprot.writeI64(self.numDVs) - oprot.writeFieldEnd() - if self.bitVectors is not None: - oprot.writeFieldBegin('bitVectors', TType.STRING, 5) - oprot.writeString(self.bitVectors) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.numNulls is None: - raise TProtocol.TProtocolException(message='Required field numNulls is unset!') - if self.numDVs is None: - raise TProtocol.TProtocolException(message='Required field numDVs is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.lowValue) - value = (value * 31) ^ hash(self.highValue) - value = (value * 31) ^ hash(self.numNulls) - value = (value * 31) ^ hash(self.numDVs) - value = (value * 31) ^ hash(self.bitVectors) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ColumnStatisticsData: - """ - Attributes: - - booleanStats - - longStats - - doubleStats - - stringStats - - binaryStats - - decimalStats - - dateStats - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'booleanStats', (BooleanColumnStatsData, BooleanColumnStatsData.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'longStats', (LongColumnStatsData, LongColumnStatsData.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'doubleStats', (DoubleColumnStatsData, DoubleColumnStatsData.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'stringStats', (StringColumnStatsData, StringColumnStatsData.thrift_spec), None, ), # 4 - (5, TType.STRUCT, 'binaryStats', (BinaryColumnStatsData, BinaryColumnStatsData.thrift_spec), None, ), # 5 - (6, TType.STRUCT, 'decimalStats', (DecimalColumnStatsData, DecimalColumnStatsData.thrift_spec), None, ), # 6 - (7, TType.STRUCT, 'dateStats', (DateColumnStatsData, DateColumnStatsData.thrift_spec), None, ), # 7 - ) - - def __init__(self, booleanStats=None, longStats=None, doubleStats=None, stringStats=None, binaryStats=None, decimalStats=None, dateStats=None,): - self.booleanStats = booleanStats - self.longStats = longStats - self.doubleStats = doubleStats - self.stringStats = stringStats - self.binaryStats = binaryStats - self.decimalStats = decimalStats - self.dateStats = dateStats - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.booleanStats = BooleanColumnStatsData() - self.booleanStats.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.longStats = LongColumnStatsData() - self.longStats.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.doubleStats = DoubleColumnStatsData() - self.doubleStats.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.stringStats = StringColumnStatsData() - self.stringStats.read(iprot) - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRUCT: - self.binaryStats = BinaryColumnStatsData() - self.binaryStats.read(iprot) - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRUCT: - self.decimalStats = DecimalColumnStatsData() - self.decimalStats.read(iprot) - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRUCT: - self.dateStats = DateColumnStatsData() - self.dateStats.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ColumnStatisticsData') - if self.booleanStats is not None: - oprot.writeFieldBegin('booleanStats', TType.STRUCT, 1) - self.booleanStats.write(oprot) - oprot.writeFieldEnd() - if self.longStats is not None: - oprot.writeFieldBegin('longStats', TType.STRUCT, 2) - self.longStats.write(oprot) - oprot.writeFieldEnd() - if self.doubleStats is not None: - oprot.writeFieldBegin('doubleStats', TType.STRUCT, 3) - self.doubleStats.write(oprot) - oprot.writeFieldEnd() - if self.stringStats is not None: - oprot.writeFieldBegin('stringStats', TType.STRUCT, 4) - self.stringStats.write(oprot) - oprot.writeFieldEnd() - if self.binaryStats is not None: - oprot.writeFieldBegin('binaryStats', TType.STRUCT, 5) - self.binaryStats.write(oprot) - oprot.writeFieldEnd() - if self.decimalStats is not None: - oprot.writeFieldBegin('decimalStats', TType.STRUCT, 6) - self.decimalStats.write(oprot) - oprot.writeFieldEnd() - if self.dateStats is not None: - oprot.writeFieldBegin('dateStats', TType.STRUCT, 7) - self.dateStats.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.booleanStats) - value = (value * 31) ^ hash(self.longStats) - value = (value * 31) ^ hash(self.doubleStats) - value = (value * 31) ^ hash(self.stringStats) - value = (value * 31) ^ hash(self.binaryStats) - value = (value * 31) ^ hash(self.decimalStats) - value = (value * 31) ^ hash(self.dateStats) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ColumnStatisticsObj: - """ - Attributes: - - colName - - colType - - statsData - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'colName', None, None, ), # 1 - (2, TType.STRING, 'colType', None, None, ), # 2 - (3, TType.STRUCT, 'statsData', (ColumnStatisticsData, ColumnStatisticsData.thrift_spec), None, ), # 3 - ) - - def __init__(self, colName=None, colType=None, statsData=None,): - self.colName = colName - self.colType = colType - self.statsData = statsData - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.colName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.colType = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.statsData = ColumnStatisticsData() - self.statsData.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ColumnStatisticsObj') - if self.colName is not None: - oprot.writeFieldBegin('colName', TType.STRING, 1) - oprot.writeString(self.colName) - oprot.writeFieldEnd() - if self.colType is not None: - oprot.writeFieldBegin('colType', TType.STRING, 2) - oprot.writeString(self.colType) - oprot.writeFieldEnd() - if self.statsData is not None: - oprot.writeFieldBegin('statsData', TType.STRUCT, 3) - self.statsData.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.colName is None: - raise TProtocol.TProtocolException(message='Required field colName is unset!') - if self.colType is None: - raise TProtocol.TProtocolException(message='Required field colType is unset!') - if self.statsData is None: - raise TProtocol.TProtocolException(message='Required field statsData is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.colName) - value = (value * 31) ^ hash(self.colType) - value = (value * 31) ^ hash(self.statsData) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ColumnStatisticsDesc: - """ - Attributes: - - isTblLevel - - dbName - - tableName - - partName - - lastAnalyzed - """ - - thrift_spec = ( - None, # 0 - (1, TType.BOOL, 'isTblLevel', None, None, ), # 1 - (2, TType.STRING, 'dbName', None, None, ), # 2 - (3, TType.STRING, 'tableName', None, None, ), # 3 - (4, TType.STRING, 'partName', None, None, ), # 4 - (5, TType.I64, 'lastAnalyzed', None, None, ), # 5 - ) - - def __init__(self, isTblLevel=None, dbName=None, tableName=None, partName=None, lastAnalyzed=None,): - self.isTblLevel = isTblLevel - self.dbName = dbName - self.tableName = tableName - self.partName = partName - self.lastAnalyzed = lastAnalyzed - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.BOOL: - self.isTblLevel = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.tableName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.partName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I64: - self.lastAnalyzed = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ColumnStatisticsDesc') - if self.isTblLevel is not None: - oprot.writeFieldBegin('isTblLevel', TType.BOOL, 1) - oprot.writeBool(self.isTblLevel) - oprot.writeFieldEnd() - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 2) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 3) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.partName is not None: - oprot.writeFieldBegin('partName', TType.STRING, 4) - oprot.writeString(self.partName) - oprot.writeFieldEnd() - if self.lastAnalyzed is not None: - oprot.writeFieldBegin('lastAnalyzed', TType.I64, 5) - oprot.writeI64(self.lastAnalyzed) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.isTblLevel is None: - raise TProtocol.TProtocolException(message='Required field isTblLevel is unset!') - if self.dbName is None: - raise TProtocol.TProtocolException(message='Required field dbName is unset!') - if self.tableName is None: - raise TProtocol.TProtocolException(message='Required field tableName is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.isTblLevel) - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tableName) - value = (value * 31) ^ hash(self.partName) - value = (value * 31) ^ hash(self.lastAnalyzed) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ColumnStatistics: - """ - Attributes: - - statsDesc - - statsObj - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'statsDesc', (ColumnStatisticsDesc, ColumnStatisticsDesc.thrift_spec), None, ), # 1 - (2, TType.LIST, 'statsObj', (TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec)), None, ), # 2 - ) - - def __init__(self, statsDesc=None, statsObj=None,): - self.statsDesc = statsDesc - self.statsObj = statsObj - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.statsDesc = ColumnStatisticsDesc() - self.statsDesc.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.statsObj = [] - (_etype242, _size239) = iprot.readListBegin() - for _i243 in xrange(_size239): - _elem244 = ColumnStatisticsObj() - _elem244.read(iprot) - self.statsObj.append(_elem244) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ColumnStatistics') - if self.statsDesc is not None: - oprot.writeFieldBegin('statsDesc', TType.STRUCT, 1) - self.statsDesc.write(oprot) - oprot.writeFieldEnd() - if self.statsObj is not None: - oprot.writeFieldBegin('statsObj', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.statsObj)) - for iter245 in self.statsObj: - iter245.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.statsDesc is None: - raise TProtocol.TProtocolException(message='Required field statsDesc is unset!') - if self.statsObj is None: - raise TProtocol.TProtocolException(message='Required field statsObj is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.statsDesc) - value = (value * 31) ^ hash(self.statsObj) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AggrStats: - """ - Attributes: - - colStats - - partsFound - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'colStats', (TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec)), None, ), # 1 - (2, TType.I64, 'partsFound', None, None, ), # 2 - ) - - def __init__(self, colStats=None, partsFound=None,): - self.colStats = colStats - self.partsFound = partsFound - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.colStats = [] - (_etype249, _size246) = iprot.readListBegin() - for _i250 in xrange(_size246): - _elem251 = ColumnStatisticsObj() - _elem251.read(iprot) - self.colStats.append(_elem251) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I64: - self.partsFound = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AggrStats') - if self.colStats is not None: - oprot.writeFieldBegin('colStats', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.colStats)) - for iter252 in self.colStats: - iter252.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.partsFound is not None: - oprot.writeFieldBegin('partsFound', TType.I64, 2) - oprot.writeI64(self.partsFound) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.colStats is None: - raise TProtocol.TProtocolException(message='Required field colStats is unset!') - if self.partsFound is None: - raise TProtocol.TProtocolException(message='Required field partsFound is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.colStats) - value = (value * 31) ^ hash(self.partsFound) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class SetPartitionsStatsRequest: - """ - Attributes: - - colStats - - needMerge - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'colStats', (TType.STRUCT,(ColumnStatistics, ColumnStatistics.thrift_spec)), None, ), # 1 - (2, TType.BOOL, 'needMerge', None, None, ), # 2 - ) - - def __init__(self, colStats=None, needMerge=None,): - self.colStats = colStats - self.needMerge = needMerge - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.colStats = [] - (_etype256, _size253) = iprot.readListBegin() - for _i257 in xrange(_size253): - _elem258 = ColumnStatistics() - _elem258.read(iprot) - self.colStats.append(_elem258) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.needMerge = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('SetPartitionsStatsRequest') - if self.colStats is not None: - oprot.writeFieldBegin('colStats', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.colStats)) - for iter259 in self.colStats: - iter259.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.needMerge is not None: - oprot.writeFieldBegin('needMerge', TType.BOOL, 2) - oprot.writeBool(self.needMerge) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.colStats is None: - raise TProtocol.TProtocolException(message='Required field colStats is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.colStats) - value = (value * 31) ^ hash(self.needMerge) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Schema: - """ - Attributes: - - fieldSchemas - - properties - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'fieldSchemas', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1 - (2, TType.MAP, 'properties', (TType.STRING,None,TType.STRING,None), None, ), # 2 - ) - - def __init__(self, fieldSchemas=None, properties=None,): - self.fieldSchemas = fieldSchemas - self.properties = properties - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.fieldSchemas = [] - (_etype263, _size260) = iprot.readListBegin() - for _i264 in xrange(_size260): - _elem265 = FieldSchema() - _elem265.read(iprot) - self.fieldSchemas.append(_elem265) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.MAP: - self.properties = {} - (_ktype267, _vtype268, _size266 ) = iprot.readMapBegin() - for _i270 in xrange(_size266): - _key271 = iprot.readString() - _val272 = iprot.readString() - self.properties[_key271] = _val272 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Schema') - if self.fieldSchemas is not None: - oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas)) - for iter273 in self.fieldSchemas: - iter273.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.properties is not None: - oprot.writeFieldBegin('properties', TType.MAP, 2) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) - for kiter274,viter275 in self.properties.items(): - oprot.writeString(kiter274) - oprot.writeString(viter275) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.fieldSchemas) - value = (value * 31) ^ hash(self.properties) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class EnvironmentContext: - """ - Attributes: - - properties - """ - - thrift_spec = ( - None, # 0 - (1, TType.MAP, 'properties', (TType.STRING,None,TType.STRING,None), None, ), # 1 - ) - - def __init__(self, properties=None,): - self.properties = properties - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.MAP: - self.properties = {} - (_ktype277, _vtype278, _size276 ) = iprot.readMapBegin() - for _i280 in xrange(_size276): - _key281 = iprot.readString() - _val282 = iprot.readString() - self.properties[_key281] = _val282 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('EnvironmentContext') - if self.properties is not None: - oprot.writeFieldBegin('properties', TType.MAP, 1) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) - for kiter283,viter284 in self.properties.items(): - oprot.writeString(kiter283) - oprot.writeString(viter284) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.properties) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PrimaryKeysRequest: - """ - Attributes: - - db_name - - tbl_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - ) - - def __init__(self, db_name=None, tbl_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PrimaryKeysRequest') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.db_name is None: - raise TProtocol.TProtocolException(message='Required field db_name is unset!') - if self.tbl_name is None: - raise TProtocol.TProtocolException(message='Required field tbl_name is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PrimaryKeysResponse: - """ - Attributes: - - primaryKeys - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'primaryKeys', (TType.STRUCT,(SQLPrimaryKey, SQLPrimaryKey.thrift_spec)), None, ), # 1 - ) - - def __init__(self, primaryKeys=None,): - self.primaryKeys = primaryKeys - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.primaryKeys = [] - (_etype288, _size285) = iprot.readListBegin() - for _i289 in xrange(_size285): - _elem290 = SQLPrimaryKey() - _elem290.read(iprot) - self.primaryKeys.append(_elem290) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PrimaryKeysResponse') - if self.primaryKeys is not None: - oprot.writeFieldBegin('primaryKeys', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys)) - for iter291 in self.primaryKeys: - iter291.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.primaryKeys is None: - raise TProtocol.TProtocolException(message='Required field primaryKeys is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.primaryKeys) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ForeignKeysRequest: - """ - Attributes: - - parent_db_name - - parent_tbl_name - - foreign_db_name - - foreign_tbl_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'parent_db_name', None, None, ), # 1 - (2, TType.STRING, 'parent_tbl_name', None, None, ), # 2 - (3, TType.STRING, 'foreign_db_name', None, None, ), # 3 - (4, TType.STRING, 'foreign_tbl_name', None, None, ), # 4 - ) - - def __init__(self, parent_db_name=None, parent_tbl_name=None, foreign_db_name=None, foreign_tbl_name=None,): - self.parent_db_name = parent_db_name - self.parent_tbl_name = parent_tbl_name - self.foreign_db_name = foreign_db_name - self.foreign_tbl_name = foreign_tbl_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.parent_db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.parent_tbl_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.foreign_db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.foreign_tbl_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ForeignKeysRequest') - if self.parent_db_name is not None: - oprot.writeFieldBegin('parent_db_name', TType.STRING, 1) - oprot.writeString(self.parent_db_name) - oprot.writeFieldEnd() - if self.parent_tbl_name is not None: - oprot.writeFieldBegin('parent_tbl_name', TType.STRING, 2) - oprot.writeString(self.parent_tbl_name) - oprot.writeFieldEnd() - if self.foreign_db_name is not None: - oprot.writeFieldBegin('foreign_db_name', TType.STRING, 3) - oprot.writeString(self.foreign_db_name) - oprot.writeFieldEnd() - if self.foreign_tbl_name is not None: - oprot.writeFieldBegin('foreign_tbl_name', TType.STRING, 4) - oprot.writeString(self.foreign_tbl_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.parent_db_name) - value = (value * 31) ^ hash(self.parent_tbl_name) - value = (value * 31) ^ hash(self.foreign_db_name) - value = (value * 31) ^ hash(self.foreign_tbl_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ForeignKeysResponse: - """ - Attributes: - - foreignKeys - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'foreignKeys', (TType.STRUCT,(SQLForeignKey, SQLForeignKey.thrift_spec)), None, ), # 1 - ) - - def __init__(self, foreignKeys=None,): - self.foreignKeys = foreignKeys - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.foreignKeys = [] - (_etype295, _size292) = iprot.readListBegin() - for _i296 in xrange(_size292): - _elem297 = SQLForeignKey() - _elem297.read(iprot) - self.foreignKeys.append(_elem297) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ForeignKeysResponse') - if self.foreignKeys is not None: - oprot.writeFieldBegin('foreignKeys', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys)) - for iter298 in self.foreignKeys: - iter298.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.foreignKeys is None: - raise TProtocol.TProtocolException(message='Required field foreignKeys is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.foreignKeys) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class UniqueConstraintsRequest: - """ - Attributes: - - db_name - - tbl_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - ) - - def __init__(self, db_name=None, tbl_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('UniqueConstraintsRequest') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.db_name is None: - raise TProtocol.TProtocolException(message='Required field db_name is unset!') - if self.tbl_name is None: - raise TProtocol.TProtocolException(message='Required field tbl_name is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class UniqueConstraintsResponse: - """ - Attributes: - - uniqueConstraints - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'uniqueConstraints', (TType.STRUCT,(SQLUniqueConstraint, SQLUniqueConstraint.thrift_spec)), None, ), # 1 - ) - - def __init__(self, uniqueConstraints=None,): - self.uniqueConstraints = uniqueConstraints - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.uniqueConstraints = [] - (_etype302, _size299) = iprot.readListBegin() - for _i303 in xrange(_size299): - _elem304 = SQLUniqueConstraint() - _elem304.read(iprot) - self.uniqueConstraints.append(_elem304) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('UniqueConstraintsResponse') - if self.uniqueConstraints is not None: - oprot.writeFieldBegin('uniqueConstraints', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints)) - for iter305 in self.uniqueConstraints: - iter305.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.uniqueConstraints is None: - raise TProtocol.TProtocolException(message='Required field uniqueConstraints is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.uniqueConstraints) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class NotNullConstraintsRequest: - """ - Attributes: - - db_name - - tbl_name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - ) - - def __init__(self, db_name=None, tbl_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('NotNullConstraintsRequest') - if self.db_name is not None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name is not None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.db_name is None: - raise TProtocol.TProtocolException(message='Required field db_name is unset!') - if self.tbl_name is None: - raise TProtocol.TProtocolException(message='Required field tbl_name is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.db_name) - value = (value * 31) ^ hash(self.tbl_name) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class NotNullConstraintsResponse: - """ - Attributes: - - notNullConstraints - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'notNullConstraints', (TType.STRUCT,(SQLNotNullConstraint, SQLNotNullConstraint.thrift_spec)), None, ), # 1 - ) - - def __init__(self, notNullConstraints=None,): - self.notNullConstraints = notNullConstraints - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.notNullConstraints = [] - (_etype309, _size306) = iprot.readListBegin() - for _i310 in xrange(_size306): - _elem311 = SQLNotNullConstraint() - _elem311.read(iprot) - self.notNullConstraints.append(_elem311) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('NotNullConstraintsResponse') - if self.notNullConstraints is not None: - oprot.writeFieldBegin('notNullConstraints', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints)) - for iter312 in self.notNullConstraints: - iter312.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.notNullConstraints is None: - raise TProtocol.TProtocolException(message='Required field notNullConstraints is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.notNullConstraints) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class DropConstraintRequest: - """ - Attributes: - - dbname - - tablename - - constraintname - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tablename', None, None, ), # 2 - (3, TType.STRING, 'constraintname', None, None, ), # 3 - ) - - def __init__(self, dbname=None, tablename=None, constraintname=None,): - self.dbname = dbname - self.tablename = tablename - self.constraintname = constraintname - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tablename = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.constraintname = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('DropConstraintRequest') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tablename is not None: - oprot.writeFieldBegin('tablename', TType.STRING, 2) - oprot.writeString(self.tablename) - oprot.writeFieldEnd() - if self.constraintname is not None: - oprot.writeFieldBegin('constraintname', TType.STRING, 3) - oprot.writeString(self.constraintname) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dbname is None: - raise TProtocol.TProtocolException(message='Required field dbname is unset!') - if self.tablename is None: - raise TProtocol.TProtocolException(message='Required field tablename is unset!') - if self.constraintname is None: - raise TProtocol.TProtocolException(message='Required field constraintname is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.tablename) - value = (value * 31) ^ hash(self.constraintname) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AddPrimaryKeyRequest: - """ - Attributes: - - primaryKeyCols - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'primaryKeyCols', (TType.STRUCT,(SQLPrimaryKey, SQLPrimaryKey.thrift_spec)), None, ), # 1 - ) - - def __init__(self, primaryKeyCols=None,): - self.primaryKeyCols = primaryKeyCols - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.primaryKeyCols = [] - (_etype316, _size313) = iprot.readListBegin() - for _i317 in xrange(_size313): - _elem318 = SQLPrimaryKey() - _elem318.read(iprot) - self.primaryKeyCols.append(_elem318) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AddPrimaryKeyRequest') - if self.primaryKeyCols is not None: - oprot.writeFieldBegin('primaryKeyCols', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.primaryKeyCols)) - for iter319 in self.primaryKeyCols: - iter319.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.primaryKeyCols is None: - raise TProtocol.TProtocolException(message='Required field primaryKeyCols is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.primaryKeyCols) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AddForeignKeyRequest: - """ - Attributes: - - foreignKeyCols - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'foreignKeyCols', (TType.STRUCT,(SQLForeignKey, SQLForeignKey.thrift_spec)), None, ), # 1 - ) - - def __init__(self, foreignKeyCols=None,): - self.foreignKeyCols = foreignKeyCols - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.foreignKeyCols = [] - (_etype323, _size320) = iprot.readListBegin() - for _i324 in xrange(_size320): - _elem325 = SQLForeignKey() - _elem325.read(iprot) - self.foreignKeyCols.append(_elem325) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AddForeignKeyRequest') - if self.foreignKeyCols is not None: - oprot.writeFieldBegin('foreignKeyCols', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.foreignKeyCols)) - for iter326 in self.foreignKeyCols: - iter326.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.foreignKeyCols is None: - raise TProtocol.TProtocolException(message='Required field foreignKeyCols is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.foreignKeyCols) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AddUniqueConstraintRequest: - """ - Attributes: - - uniqueConstraintCols - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'uniqueConstraintCols', (TType.STRUCT,(SQLUniqueConstraint, SQLUniqueConstraint.thrift_spec)), None, ), # 1 - ) - - def __init__(self, uniqueConstraintCols=None,): - self.uniqueConstraintCols = uniqueConstraintCols - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.uniqueConstraintCols = [] - (_etype330, _size327) = iprot.readListBegin() - for _i331 in xrange(_size327): - _elem332 = SQLUniqueConstraint() - _elem332.read(iprot) - self.uniqueConstraintCols.append(_elem332) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AddUniqueConstraintRequest') - if self.uniqueConstraintCols is not None: - oprot.writeFieldBegin('uniqueConstraintCols', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraintCols)) - for iter333 in self.uniqueConstraintCols: - iter333.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.uniqueConstraintCols is None: - raise TProtocol.TProtocolException(message='Required field uniqueConstraintCols is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.uniqueConstraintCols) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AddNotNullConstraintRequest: - """ - Attributes: - - notNullConstraintCols - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'notNullConstraintCols', (TType.STRUCT,(SQLNotNullConstraint, SQLNotNullConstraint.thrift_spec)), None, ), # 1 - ) - - def __init__(self, notNullConstraintCols=None,): - self.notNullConstraintCols = notNullConstraintCols - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.notNullConstraintCols = [] - (_etype337, _size334) = iprot.readListBegin() - for _i338 in xrange(_size334): - _elem339 = SQLNotNullConstraint() - _elem339.read(iprot) - self.notNullConstraintCols.append(_elem339) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AddNotNullConstraintRequest') - if self.notNullConstraintCols is not None: - oprot.writeFieldBegin('notNullConstraintCols', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraintCols)) - for iter340 in self.notNullConstraintCols: - iter340.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.notNullConstraintCols is None: - raise TProtocol.TProtocolException(message='Required field notNullConstraintCols is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.notNullConstraintCols) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PartitionsByExprResult: - """ - Attributes: - - partitions - - hasUnknownPartitions - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'partitions', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1 - (2, TType.BOOL, 'hasUnknownPartitions', None, None, ), # 2 - ) - - def __init__(self, partitions=None, hasUnknownPartitions=None,): - self.partitions = partitions - self.hasUnknownPartitions = hasUnknownPartitions - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.partitions = [] - (_etype344, _size341) = iprot.readListBegin() - for _i345 in xrange(_size341): - _elem346 = Partition() - _elem346.read(iprot) - self.partitions.append(_elem346) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.hasUnknownPartitions = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PartitionsByExprResult') - if self.partitions is not None: - oprot.writeFieldBegin('partitions', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.partitions)) - for iter347 in self.partitions: - iter347.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.hasUnknownPartitions is not None: - oprot.writeFieldBegin('hasUnknownPartitions', TType.BOOL, 2) - oprot.writeBool(self.hasUnknownPartitions) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.partitions is None: - raise TProtocol.TProtocolException(message='Required field partitions is unset!') - if self.hasUnknownPartitions is None: - raise TProtocol.TProtocolException(message='Required field hasUnknownPartitions is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.partitions) - value = (value * 31) ^ hash(self.hasUnknownPartitions) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PartitionsByExprRequest: - """ - Attributes: - - dbName - - tblName - - expr - - defaultPartitionName - - maxParts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'tblName', None, None, ), # 2 - (3, TType.STRING, 'expr', None, None, ), # 3 - (4, TType.STRING, 'defaultPartitionName', None, None, ), # 4 - (5, TType.I16, 'maxParts', None, -1, ), # 5 - ) - - def __init__(self, dbName=None, tblName=None, expr=None, defaultPartitionName=None, maxParts=thrift_spec[5][4],): - self.dbName = dbName - self.tblName = tblName - self.expr = expr - self.defaultPartitionName = defaultPartitionName - self.maxParts = maxParts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tblName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.expr = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.defaultPartitionName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I16: - self.maxParts = iprot.readI16() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PartitionsByExprRequest') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tblName is not None: - oprot.writeFieldBegin('tblName', TType.STRING, 2) - oprot.writeString(self.tblName) - oprot.writeFieldEnd() - if self.expr is not None: - oprot.writeFieldBegin('expr', TType.STRING, 3) - oprot.writeString(self.expr) - oprot.writeFieldEnd() - if self.defaultPartitionName is not None: - oprot.writeFieldBegin('defaultPartitionName', TType.STRING, 4) - oprot.writeString(self.defaultPartitionName) - oprot.writeFieldEnd() - if self.maxParts is not None: - oprot.writeFieldBegin('maxParts', TType.I16, 5) - oprot.writeI16(self.maxParts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dbName is None: - raise TProtocol.TProtocolException(message='Required field dbName is unset!') - if self.tblName is None: - raise TProtocol.TProtocolException(message='Required field tblName is unset!') - if self.expr is None: - raise TProtocol.TProtocolException(message='Required field expr is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tblName) - value = (value * 31) ^ hash(self.expr) - value = (value * 31) ^ hash(self.defaultPartitionName) - value = (value * 31) ^ hash(self.maxParts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TableStatsResult: - """ - Attributes: - - tableStats - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'tableStats', (TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec)), None, ), # 1 - ) - - def __init__(self, tableStats=None,): - self.tableStats = tableStats - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.tableStats = [] - (_etype351, _size348) = iprot.readListBegin() - for _i352 in xrange(_size348): - _elem353 = ColumnStatisticsObj() - _elem353.read(iprot) - self.tableStats.append(_elem353) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TableStatsResult') - if self.tableStats is not None: - oprot.writeFieldBegin('tableStats', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.tableStats)) - for iter354 in self.tableStats: - iter354.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.tableStats is None: - raise TProtocol.TProtocolException(message='Required field tableStats is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tableStats) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PartitionsStatsResult: - """ - Attributes: - - partStats - """ - - thrift_spec = ( - None, # 0 - (1, TType.MAP, 'partStats', (TType.STRING,None,TType.LIST,(TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec))), None, ), # 1 - ) - - def __init__(self, partStats=None,): - self.partStats = partStats - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.MAP: - self.partStats = {} - (_ktype356, _vtype357, _size355 ) = iprot.readMapBegin() - for _i359 in xrange(_size355): - _key360 = iprot.readString() - _val361 = [] - (_etype365, _size362) = iprot.readListBegin() - for _i366 in xrange(_size362): - _elem367 = ColumnStatisticsObj() - _elem367.read(iprot) - _val361.append(_elem367) - iprot.readListEnd() - self.partStats[_key360] = _val361 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PartitionsStatsResult') - if self.partStats is not None: - oprot.writeFieldBegin('partStats', TType.MAP, 1) - oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.partStats)) - for kiter368,viter369 in self.partStats.items(): - oprot.writeString(kiter368) - oprot.writeListBegin(TType.STRUCT, len(viter369)) - for iter370 in viter369: - iter370.write(oprot) - oprot.writeListEnd() - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.partStats is None: - raise TProtocol.TProtocolException(message='Required field partStats is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.partStats) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TableStatsRequest: - """ - Attributes: - - dbName - - tblName - - colNames - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'tblName', None, None, ), # 2 - (3, TType.LIST, 'colNames', (TType.STRING,None), None, ), # 3 - ) - - def __init__(self, dbName=None, tblName=None, colNames=None,): - self.dbName = dbName - self.tblName = tblName - self.colNames = colNames - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tblName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.colNames = [] - (_etype374, _size371) = iprot.readListBegin() - for _i375 in xrange(_size371): - _elem376 = iprot.readString() - self.colNames.append(_elem376) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TableStatsRequest') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tblName is not None: - oprot.writeFieldBegin('tblName', TType.STRING, 2) - oprot.writeString(self.tblName) - oprot.writeFieldEnd() - if self.colNames is not None: - oprot.writeFieldBegin('colNames', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.colNames)) - for iter377 in self.colNames: - oprot.writeString(iter377) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dbName is None: - raise TProtocol.TProtocolException(message='Required field dbName is unset!') - if self.tblName is None: - raise TProtocol.TProtocolException(message='Required field tblName is unset!') - if self.colNames is None: - raise TProtocol.TProtocolException(message='Required field colNames is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tblName) - value = (value * 31) ^ hash(self.colNames) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PartitionsStatsRequest: - """ - Attributes: - - dbName - - tblName - - colNames - - partNames - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'tblName', None, None, ), # 2 - (3, TType.LIST, 'colNames', (TType.STRING,None), None, ), # 3 - (4, TType.LIST, 'partNames', (TType.STRING,None), None, ), # 4 - ) - - def __init__(self, dbName=None, tblName=None, colNames=None, partNames=None,): - self.dbName = dbName - self.tblName = tblName - self.colNames = colNames - self.partNames = partNames - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tblName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.colNames = [] - (_etype381, _size378) = iprot.readListBegin() - for _i382 in xrange(_size378): - _elem383 = iprot.readString() - self.colNames.append(_elem383) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.partNames = [] - (_etype387, _size384) = iprot.readListBegin() - for _i388 in xrange(_size384): - _elem389 = iprot.readString() - self.partNames.append(_elem389) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PartitionsStatsRequest') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tblName is not None: - oprot.writeFieldBegin('tblName', TType.STRING, 2) - oprot.writeString(self.tblName) - oprot.writeFieldEnd() - if self.colNames is not None: - oprot.writeFieldBegin('colNames', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.colNames)) - for iter390 in self.colNames: - oprot.writeString(iter390) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.partNames is not None: - oprot.writeFieldBegin('partNames', TType.LIST, 4) - oprot.writeListBegin(TType.STRING, len(self.partNames)) - for iter391 in self.partNames: - oprot.writeString(iter391) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dbName is None: - raise TProtocol.TProtocolException(message='Required field dbName is unset!') - if self.tblName is None: - raise TProtocol.TProtocolException(message='Required field tblName is unset!') - if self.colNames is None: - raise TProtocol.TProtocolException(message='Required field colNames is unset!') - if self.partNames is None: - raise TProtocol.TProtocolException(message='Required field partNames is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tblName) - value = (value * 31) ^ hash(self.colNames) - value = (value * 31) ^ hash(self.partNames) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AddPartitionsResult: - """ - Attributes: - - partitions - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'partitions', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1 - ) - - def __init__(self, partitions=None,): - self.partitions = partitions - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.partitions = [] - (_etype395, _size392) = iprot.readListBegin() - for _i396 in xrange(_size392): - _elem397 = Partition() - _elem397.read(iprot) - self.partitions.append(_elem397) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AddPartitionsResult') - if self.partitions is not None: - oprot.writeFieldBegin('partitions', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.partitions)) - for iter398 in self.partitions: - iter398.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.partitions) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AddPartitionsRequest: - """ - Attributes: - - dbName - - tblName - - parts - - ifNotExists - - needResult - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'tblName', None, None, ), # 2 - (3, TType.LIST, 'parts', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 3 - (4, TType.BOOL, 'ifNotExists', None, None, ), # 4 - (5, TType.BOOL, 'needResult', None, True, ), # 5 - ) - - def __init__(self, dbName=None, tblName=None, parts=None, ifNotExists=None, needResult=thrift_spec[5][4],): - self.dbName = dbName - self.tblName = tblName - self.parts = parts - self.ifNotExists = ifNotExists - self.needResult = needResult - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tblName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.parts = [] - (_etype402, _size399) = iprot.readListBegin() - for _i403 in xrange(_size399): - _elem404 = Partition() - _elem404.read(iprot) - self.parts.append(_elem404) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.ifNotExists = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.BOOL: - self.needResult = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AddPartitionsRequest') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tblName is not None: - oprot.writeFieldBegin('tblName', TType.STRING, 2) - oprot.writeString(self.tblName) - oprot.writeFieldEnd() - if self.parts is not None: - oprot.writeFieldBegin('parts', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.parts)) - for iter405 in self.parts: - iter405.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.ifNotExists is not None: - oprot.writeFieldBegin('ifNotExists', TType.BOOL, 4) - oprot.writeBool(self.ifNotExists) - oprot.writeFieldEnd() - if self.needResult is not None: - oprot.writeFieldBegin('needResult', TType.BOOL, 5) - oprot.writeBool(self.needResult) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dbName is None: - raise TProtocol.TProtocolException(message='Required field dbName is unset!') - if self.tblName is None: - raise TProtocol.TProtocolException(message='Required field tblName is unset!') - if self.parts is None: - raise TProtocol.TProtocolException(message='Required field parts is unset!') - if self.ifNotExists is None: - raise TProtocol.TProtocolException(message='Required field ifNotExists is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tblName) - value = (value * 31) ^ hash(self.parts) - value = (value * 31) ^ hash(self.ifNotExists) - value = (value * 31) ^ hash(self.needResult) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class DropPartitionsResult: - """ - Attributes: - - partitions - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'partitions', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1 - ) - - def __init__(self, partitions=None,): - self.partitions = partitions - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.partitions = [] - (_etype409, _size406) = iprot.readListBegin() - for _i410 in xrange(_size406): - _elem411 = Partition() - _elem411.read(iprot) - self.partitions.append(_elem411) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('DropPartitionsResult') - if self.partitions is not None: - oprot.writeFieldBegin('partitions', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.partitions)) - for iter412 in self.partitions: - iter412.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.partitions) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class DropPartitionsExpr: - """ - Attributes: - - expr - - partArchiveLevel - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'expr', None, None, ), # 1 - (2, TType.I32, 'partArchiveLevel', None, None, ), # 2 - ) - - def __init__(self, expr=None, partArchiveLevel=None,): - self.expr = expr - self.partArchiveLevel = partArchiveLevel - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.expr = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.partArchiveLevel = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('DropPartitionsExpr') - if self.expr is not None: - oprot.writeFieldBegin('expr', TType.STRING, 1) - oprot.writeString(self.expr) - oprot.writeFieldEnd() - if self.partArchiveLevel is not None: - oprot.writeFieldBegin('partArchiveLevel', TType.I32, 2) - oprot.writeI32(self.partArchiveLevel) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.expr is None: - raise TProtocol.TProtocolException(message='Required field expr is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.expr) - value = (value * 31) ^ hash(self.partArchiveLevel) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class RequestPartsSpec: - """ - Attributes: - - names - - exprs - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'names', (TType.STRING,None), None, ), # 1 - (2, TType.LIST, 'exprs', (TType.STRUCT,(DropPartitionsExpr, DropPartitionsExpr.thrift_spec)), None, ), # 2 - ) - - def __init__(self, names=None, exprs=None,): - self.names = names - self.exprs = exprs - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.names = [] - (_etype416, _size413) = iprot.readListBegin() - for _i417 in xrange(_size413): - _elem418 = iprot.readString() - self.names.append(_elem418) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.exprs = [] - (_etype422, _size419) = iprot.readListBegin() - for _i423 in xrange(_size419): - _elem424 = DropPartitionsExpr() - _elem424.read(iprot) - self.exprs.append(_elem424) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('RequestPartsSpec') - if self.names is not None: - oprot.writeFieldBegin('names', TType.LIST, 1) - oprot.writeListBegin(TType.STRING, len(self.names)) - for iter425 in self.names: - oprot.writeString(iter425) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.exprs is not None: - oprot.writeFieldBegin('exprs', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.exprs)) - for iter426 in self.exprs: - iter426.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.names) - value = (value * 31) ^ hash(self.exprs) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class DropPartitionsRequest: - """ - Attributes: - - dbName - - tblName - - parts - - deleteData - - ifExists - - ignoreProtection - - environmentContext - - needResult - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'tblName', None, None, ), # 2 - (3, TType.STRUCT, 'parts', (RequestPartsSpec, RequestPartsSpec.thrift_spec), None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 - (5, TType.BOOL, 'ifExists', None, True, ), # 5 - (6, TType.BOOL, 'ignoreProtection', None, None, ), # 6 - (7, TType.STRUCT, 'environmentContext', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 7 - (8, TType.BOOL, 'needResult', None, True, ), # 8 - ) - - def __init__(self, dbName=None, tblName=None, parts=None, deleteData=None, ifExists=thrift_spec[5][4], ignoreProtection=None, environmentContext=None, needResult=thrift_spec[8][4],): - self.dbName = dbName - self.tblName = tblName - self.parts = parts - self.deleteData = deleteData - self.ifExists = ifExists - self.ignoreProtection = ignoreProtection - self.environmentContext = environmentContext - self.needResult = needResult - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tblName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.parts = RequestPartsSpec() - self.parts.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.BOOL: - self.ifExists = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.BOOL: - self.ignoreProtection = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRUCT: - self.environmentContext = EnvironmentContext() - self.environmentContext.read(iprot) - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.BOOL: - self.needResult = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('DropPartitionsRequest') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tblName is not None: - oprot.writeFieldBegin('tblName', TType.STRING, 2) - oprot.writeString(self.tblName) - oprot.writeFieldEnd() - if self.parts is not None: - oprot.writeFieldBegin('parts', TType.STRUCT, 3) - self.parts.write(oprot) - oprot.writeFieldEnd() - if self.deleteData is not None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) - oprot.writeFieldEnd() - if self.ifExists is not None: - oprot.writeFieldBegin('ifExists', TType.BOOL, 5) - oprot.writeBool(self.ifExists) - oprot.writeFieldEnd() - if self.ignoreProtection is not None: - oprot.writeFieldBegin('ignoreProtection', TType.BOOL, 6) - oprot.writeBool(self.ignoreProtection) - oprot.writeFieldEnd() - if self.environmentContext is not None: - oprot.writeFieldBegin('environmentContext', TType.STRUCT, 7) - self.environmentContext.write(oprot) - oprot.writeFieldEnd() - if self.needResult is not None: - oprot.writeFieldBegin('needResult', TType.BOOL, 8) - oprot.writeBool(self.needResult) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dbName is None: - raise TProtocol.TProtocolException(message='Required field dbName is unset!') - if self.tblName is None: - raise TProtocol.TProtocolException(message='Required field tblName is unset!') - if self.parts is None: - raise TProtocol.TProtocolException(message='Required field parts is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tblName) - value = (value * 31) ^ hash(self.parts) - value = (value * 31) ^ hash(self.deleteData) - value = (value * 31) ^ hash(self.ifExists) - value = (value * 31) ^ hash(self.ignoreProtection) - value = (value * 31) ^ hash(self.environmentContext) - value = (value * 31) ^ hash(self.needResult) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ResourceUri: - """ - Attributes: - - resourceType - - uri - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'resourceType', None, None, ), # 1 - (2, TType.STRING, 'uri', None, None, ), # 2 - ) - - def __init__(self, resourceType=None, uri=None,): - self.resourceType = resourceType - self.uri = uri - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.resourceType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.uri = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ResourceUri') - if self.resourceType is not None: - oprot.writeFieldBegin('resourceType', TType.I32, 1) - oprot.writeI32(self.resourceType) - oprot.writeFieldEnd() - if self.uri is not None: - oprot.writeFieldBegin('uri', TType.STRING, 2) - oprot.writeString(self.uri) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.resourceType) - value = (value * 31) ^ hash(self.uri) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Function: - """ - Attributes: - - functionName - - dbName - - className - - ownerName - - ownerType - - createTime - - functionType - - resourceUris - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'functionName', None, None, ), # 1 - (2, TType.STRING, 'dbName', None, None, ), # 2 - (3, TType.STRING, 'className', None, None, ), # 3 - (4, TType.STRING, 'ownerName', None, None, ), # 4 - (5, TType.I32, 'ownerType', None, None, ), # 5 - (6, TType.I32, 'createTime', None, None, ), # 6 - (7, TType.I32, 'functionType', None, None, ), # 7 - (8, TType.LIST, 'resourceUris', (TType.STRUCT,(ResourceUri, ResourceUri.thrift_spec)), None, ), # 8 - ) - - def __init__(self, functionName=None, dbName=None, className=None, ownerName=None, ownerType=None, createTime=None, functionType=None, resourceUris=None,): - self.functionName = functionName - self.dbName = dbName - self.className = className - self.ownerName = ownerName - self.ownerType = ownerType - self.createTime = createTime - self.functionType = functionType - self.resourceUris = resourceUris - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.functionName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.className = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.ownerName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.ownerType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.createTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I32: - self.functionType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.LIST: - self.resourceUris = [] - (_etype430, _size427) = iprot.readListBegin() - for _i431 in xrange(_size427): - _elem432 = ResourceUri() - _elem432.read(iprot) - self.resourceUris.append(_elem432) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Function') - if self.functionName is not None: - oprot.writeFieldBegin('functionName', TType.STRING, 1) - oprot.writeString(self.functionName) - oprot.writeFieldEnd() - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 2) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.className is not None: - oprot.writeFieldBegin('className', TType.STRING, 3) - oprot.writeString(self.className) - oprot.writeFieldEnd() - if self.ownerName is not None: - oprot.writeFieldBegin('ownerName', TType.STRING, 4) - oprot.writeString(self.ownerName) - oprot.writeFieldEnd() - if self.ownerType is not None: - oprot.writeFieldBegin('ownerType', TType.I32, 5) - oprot.writeI32(self.ownerType) - oprot.writeFieldEnd() - if self.createTime is not None: - oprot.writeFieldBegin('createTime', TType.I32, 6) - oprot.writeI32(self.createTime) - oprot.writeFieldEnd() - if self.functionType is not None: - oprot.writeFieldBegin('functionType', TType.I32, 7) - oprot.writeI32(self.functionType) - oprot.writeFieldEnd() - if self.resourceUris is not None: - oprot.writeFieldBegin('resourceUris', TType.LIST, 8) - oprot.writeListBegin(TType.STRUCT, len(self.resourceUris)) - for iter433 in self.resourceUris: - iter433.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.functionName) - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.className) - value = (value * 31) ^ hash(self.ownerName) - value = (value * 31) ^ hash(self.ownerType) - value = (value * 31) ^ hash(self.createTime) - value = (value * 31) ^ hash(self.functionType) - value = (value * 31) ^ hash(self.resourceUris) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TxnInfo: - """ - Attributes: - - id - - state - - user - - hostname - - agentInfo - - heartbeatCount - - metaInfo - - startedTime - - lastHeartbeatTime - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'id', None, None, ), # 1 - (2, TType.I32, 'state', None, None, ), # 2 - (3, TType.STRING, 'user', None, None, ), # 3 - (4, TType.STRING, 'hostname', None, None, ), # 4 - (5, TType.STRING, 'agentInfo', None, "Unknown", ), # 5 - (6, TType.I32, 'heartbeatCount', None, 0, ), # 6 - (7, TType.STRING, 'metaInfo', None, None, ), # 7 - (8, TType.I64, 'startedTime', None, None, ), # 8 - (9, TType.I64, 'lastHeartbeatTime', None, None, ), # 9 - ) - - def __init__(self, id=None, state=None, user=None, hostname=None, agentInfo=thrift_spec[5][4], heartbeatCount=thrift_spec[6][4], metaInfo=None, startedTime=None, lastHeartbeatTime=None,): - self.id = id - self.state = state - self.user = user - self.hostname = hostname - self.agentInfo = agentInfo - self.heartbeatCount = heartbeatCount - self.metaInfo = metaInfo - self.startedTime = startedTime - self.lastHeartbeatTime = lastHeartbeatTime - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.id = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.state = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.user = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.hostname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.agentInfo = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.heartbeatCount = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRING: - self.metaInfo = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.I64: - self.startedTime = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.I64: - self.lastHeartbeatTime = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TxnInfo') - if self.id is not None: - oprot.writeFieldBegin('id', TType.I64, 1) - oprot.writeI64(self.id) - oprot.writeFieldEnd() - if self.state is not None: - oprot.writeFieldBegin('state', TType.I32, 2) - oprot.writeI32(self.state) - oprot.writeFieldEnd() - if self.user is not None: - oprot.writeFieldBegin('user', TType.STRING, 3) - oprot.writeString(self.user) - oprot.writeFieldEnd() - if self.hostname is not None: - oprot.writeFieldBegin('hostname', TType.STRING, 4) - oprot.writeString(self.hostname) - oprot.writeFieldEnd() - if self.agentInfo is not None: - oprot.writeFieldBegin('agentInfo', TType.STRING, 5) - oprot.writeString(self.agentInfo) - oprot.writeFieldEnd() - if self.heartbeatCount is not None: - oprot.writeFieldBegin('heartbeatCount', TType.I32, 6) - oprot.writeI32(self.heartbeatCount) - oprot.writeFieldEnd() - if self.metaInfo is not None: - oprot.writeFieldBegin('metaInfo', TType.STRING, 7) - oprot.writeString(self.metaInfo) - oprot.writeFieldEnd() - if self.startedTime is not None: - oprot.writeFieldBegin('startedTime', TType.I64, 8) - oprot.writeI64(self.startedTime) - oprot.writeFieldEnd() - if self.lastHeartbeatTime is not None: - oprot.writeFieldBegin('lastHeartbeatTime', TType.I64, 9) - oprot.writeI64(self.lastHeartbeatTime) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.id is None: - raise TProtocol.TProtocolException(message='Required field id is unset!') - if self.state is None: - raise TProtocol.TProtocolException(message='Required field state is unset!') - if self.user is None: - raise TProtocol.TProtocolException(message='Required field user is unset!') - if self.hostname is None: - raise TProtocol.TProtocolException(message='Required field hostname is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.id) - value = (value * 31) ^ hash(self.state) - value = (value * 31) ^ hash(self.user) - value = (value * 31) ^ hash(self.hostname) - value = (value * 31) ^ hash(self.agentInfo) - value = (value * 31) ^ hash(self.heartbeatCount) - value = (value * 31) ^ hash(self.metaInfo) - value = (value * 31) ^ hash(self.startedTime) - value = (value * 31) ^ hash(self.lastHeartbeatTime) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetOpenTxnsInfoResponse: - """ - Attributes: - - txn_high_water_mark - - open_txns - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'txn_high_water_mark', None, None, ), # 1 - (2, TType.LIST, 'open_txns', (TType.STRUCT,(TxnInfo, TxnInfo.thrift_spec)), None, ), # 2 - ) - - def __init__(self, txn_high_water_mark=None, open_txns=None,): - self.txn_high_water_mark = txn_high_water_mark - self.open_txns = open_txns - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.txn_high_water_mark = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.open_txns = [] - (_etype437, _size434) = iprot.readListBegin() - for _i438 in xrange(_size434): - _elem439 = TxnInfo() - _elem439.read(iprot) - self.open_txns.append(_elem439) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetOpenTxnsInfoResponse') - if self.txn_high_water_mark is not None: - oprot.writeFieldBegin('txn_high_water_mark', TType.I64, 1) - oprot.writeI64(self.txn_high_water_mark) - oprot.writeFieldEnd() - if self.open_txns is not None: - oprot.writeFieldBegin('open_txns', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.open_txns)) - for iter440 in self.open_txns: - iter440.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.txn_high_water_mark is None: - raise TProtocol.TProtocolException(message='Required field txn_high_water_mark is unset!') - if self.open_txns is None: - raise TProtocol.TProtocolException(message='Required field open_txns is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.txn_high_water_mark) - value = (value * 31) ^ hash(self.open_txns) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetOpenTxnsResponse: - """ - Attributes: - - txn_high_water_mark - - open_txns - - min_open_txn - - abortedBits - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'txn_high_water_mark', None, None, ), # 1 - (2, TType.LIST, 'open_txns', (TType.I64,None), None, ), # 2 - (3, TType.I64, 'min_open_txn', None, None, ), # 3 - (4, TType.STRING, 'abortedBits', None, None, ), # 4 - ) - - def __init__(self, txn_high_water_mark=None, open_txns=None, min_open_txn=None, abortedBits=None,): - self.txn_high_water_mark = txn_high_water_mark - self.open_txns = open_txns - self.min_open_txn = min_open_txn - self.abortedBits = abortedBits - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.txn_high_water_mark = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.open_txns = [] - (_etype444, _size441) = iprot.readListBegin() - for _i445 in xrange(_size441): - _elem446 = iprot.readI64() - self.open_txns.append(_elem446) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.min_open_txn = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.abortedBits = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetOpenTxnsResponse') - if self.txn_high_water_mark is not None: - oprot.writeFieldBegin('txn_high_water_mark', TType.I64, 1) - oprot.writeI64(self.txn_high_water_mark) - oprot.writeFieldEnd() - if self.open_txns is not None: - oprot.writeFieldBegin('open_txns', TType.LIST, 2) - oprot.writeListBegin(TType.I64, len(self.open_txns)) - for iter447 in self.open_txns: - oprot.writeI64(iter447) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.min_open_txn is not None: - oprot.writeFieldBegin('min_open_txn', TType.I64, 3) - oprot.writeI64(self.min_open_txn) - oprot.writeFieldEnd() - if self.abortedBits is not None: - oprot.writeFieldBegin('abortedBits', TType.STRING, 4) - oprot.writeString(self.abortedBits) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.txn_high_water_mark is None: - raise TProtocol.TProtocolException(message='Required field txn_high_water_mark is unset!') - if self.open_txns is None: - raise TProtocol.TProtocolException(message='Required field open_txns is unset!') - if self.abortedBits is None: - raise TProtocol.TProtocolException(message='Required field abortedBits is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.txn_high_water_mark) - value = (value * 31) ^ hash(self.open_txns) - value = (value * 31) ^ hash(self.min_open_txn) - value = (value * 31) ^ hash(self.abortedBits) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class OpenTxnRequest: - """ - Attributes: - - num_txns - - user - - hostname - - agentInfo - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'num_txns', None, None, ), # 1 - (2, TType.STRING, 'user', None, None, ), # 2 - (3, TType.STRING, 'hostname', None, None, ), # 3 - (4, TType.STRING, 'agentInfo', None, "Unknown", ), # 4 - ) - - def __init__(self, num_txns=None, user=None, hostname=None, agentInfo=thrift_spec[4][4],): - self.num_txns = num_txns - self.user = user - self.hostname = hostname - self.agentInfo = agentInfo - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.num_txns = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.user = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.hostname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.agentInfo = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('OpenTxnRequest') - if self.num_txns is not None: - oprot.writeFieldBegin('num_txns', TType.I32, 1) - oprot.writeI32(self.num_txns) - oprot.writeFieldEnd() - if self.user is not None: - oprot.writeFieldBegin('user', TType.STRING, 2) - oprot.writeString(self.user) - oprot.writeFieldEnd() - if self.hostname is not None: - oprot.writeFieldBegin('hostname', TType.STRING, 3) - oprot.writeString(self.hostname) - oprot.writeFieldEnd() - if self.agentInfo is not None: - oprot.writeFieldBegin('agentInfo', TType.STRING, 4) - oprot.writeString(self.agentInfo) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.num_txns is None: - raise TProtocol.TProtocolException(message='Required field num_txns is unset!') - if self.user is None: - raise TProtocol.TProtocolException(message='Required field user is unset!') - if self.hostname is None: - raise TProtocol.TProtocolException(message='Required field hostname is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.num_txns) - value = (value * 31) ^ hash(self.user) - value = (value * 31) ^ hash(self.hostname) - value = (value * 31) ^ hash(self.agentInfo) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class OpenTxnsResponse: - """ - Attributes: - - txn_ids - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'txn_ids', (TType.I64,None), None, ), # 1 - ) - - def __init__(self, txn_ids=None,): - self.txn_ids = txn_ids - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.txn_ids = [] - (_etype451, _size448) = iprot.readListBegin() - for _i452 in xrange(_size448): - _elem453 = iprot.readI64() - self.txn_ids.append(_elem453) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('OpenTxnsResponse') - if self.txn_ids is not None: - oprot.writeFieldBegin('txn_ids', TType.LIST, 1) - oprot.writeListBegin(TType.I64, len(self.txn_ids)) - for iter454 in self.txn_ids: - oprot.writeI64(iter454) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.txn_ids is None: - raise TProtocol.TProtocolException(message='Required field txn_ids is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.txn_ids) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AbortTxnRequest: - """ - Attributes: - - txnid - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'txnid', None, None, ), # 1 - ) - - def __init__(self, txnid=None,): - self.txnid = txnid - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.txnid = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AbortTxnRequest') - if self.txnid is not None: - oprot.writeFieldBegin('txnid', TType.I64, 1) - oprot.writeI64(self.txnid) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.txnid is None: - raise TProtocol.TProtocolException(message='Required field txnid is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.txnid) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AbortTxnsRequest: - """ - Attributes: - - txn_ids - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'txn_ids', (TType.I64,None), None, ), # 1 - ) - - def __init__(self, txn_ids=None,): - self.txn_ids = txn_ids - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.txn_ids = [] - (_etype458, _size455) = iprot.readListBegin() - for _i459 in xrange(_size455): - _elem460 = iprot.readI64() - self.txn_ids.append(_elem460) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AbortTxnsRequest') - if self.txn_ids is not None: - oprot.writeFieldBegin('txn_ids', TType.LIST, 1) - oprot.writeListBegin(TType.I64, len(self.txn_ids)) - for iter461 in self.txn_ids: - oprot.writeI64(iter461) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.txn_ids is None: - raise TProtocol.TProtocolException(message='Required field txn_ids is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.txn_ids) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class CommitTxnRequest: - """ - Attributes: - - txnid - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'txnid', None, None, ), # 1 - ) - - def __init__(self, txnid=None,): - self.txnid = txnid - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.txnid = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('CommitTxnRequest') - if self.txnid is not None: - oprot.writeFieldBegin('txnid', TType.I64, 1) - oprot.writeI64(self.txnid) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.txnid is None: - raise TProtocol.TProtocolException(message='Required field txnid is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.txnid) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class LockComponent: - """ - Attributes: - - type - - level - - dbname - - tablename - - partitionname - - operationType - - isAcid - - isDynamicPartitionWrite - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'type', None, None, ), # 1 - (2, TType.I32, 'level', None, None, ), # 2 - (3, TType.STRING, 'dbname', None, None, ), # 3 - (4, TType.STRING, 'tablename', None, None, ), # 4 - (5, TType.STRING, 'partitionname', None, None, ), # 5 - (6, TType.I32, 'operationType', None, 5, ), # 6 - (7, TType.BOOL, 'isAcid', None, False, ), # 7 - (8, TType.BOOL, 'isDynamicPartitionWrite', None, False, ), # 8 - ) - - def __init__(self, type=None, level=None, dbname=None, tablename=None, partitionname=None, operationType=thrift_spec[6][4], isAcid=thrift_spec[7][4], isDynamicPartitionWrite=thrift_spec[8][4],): - self.type = type - self.level = level - self.dbname = dbname - self.tablename = tablename - self.partitionname = partitionname - self.operationType = operationType - self.isAcid = isAcid - self.isDynamicPartitionWrite = isDynamicPartitionWrite - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.type = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.level = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.tablename = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.partitionname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.operationType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.BOOL: - self.isAcid = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.BOOL: - self.isDynamicPartitionWrite = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('LockComponent') - if self.type is not None: - oprot.writeFieldBegin('type', TType.I32, 1) - oprot.writeI32(self.type) - oprot.writeFieldEnd() - if self.level is not None: - oprot.writeFieldBegin('level', TType.I32, 2) - oprot.writeI32(self.level) - oprot.writeFieldEnd() - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 3) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tablename is not None: - oprot.writeFieldBegin('tablename', TType.STRING, 4) - oprot.writeString(self.tablename) - oprot.writeFieldEnd() - if self.partitionname is not None: - oprot.writeFieldBegin('partitionname', TType.STRING, 5) - oprot.writeString(self.partitionname) - oprot.writeFieldEnd() - if self.operationType is not None: - oprot.writeFieldBegin('operationType', TType.I32, 6) - oprot.writeI32(self.operationType) - oprot.writeFieldEnd() - if self.isAcid is not None: - oprot.writeFieldBegin('isAcid', TType.BOOL, 7) - oprot.writeBool(self.isAcid) - oprot.writeFieldEnd() - if self.isDynamicPartitionWrite is not None: - oprot.writeFieldBegin('isDynamicPartitionWrite', TType.BOOL, 8) - oprot.writeBool(self.isDynamicPartitionWrite) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.type is None: - raise TProtocol.TProtocolException(message='Required field type is unset!') - if self.level is None: - raise TProtocol.TProtocolException(message='Required field level is unset!') - if self.dbname is None: - raise TProtocol.TProtocolException(message='Required field dbname is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.type) - value = (value * 31) ^ hash(self.level) - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.tablename) - value = (value * 31) ^ hash(self.partitionname) - value = (value * 31) ^ hash(self.operationType) - value = (value * 31) ^ hash(self.isAcid) - value = (value * 31) ^ hash(self.isDynamicPartitionWrite) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class LockRequest: - """ - Attributes: - - component - - txnid - - user - - hostname - - agentInfo - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'component', (TType.STRUCT,(LockComponent, LockComponent.thrift_spec)), None, ), # 1 - (2, TType.I64, 'txnid', None, None, ), # 2 - (3, TType.STRING, 'user', None, None, ), # 3 - (4, TType.STRING, 'hostname', None, None, ), # 4 - (5, TType.STRING, 'agentInfo', None, "Unknown", ), # 5 - ) - - def __init__(self, component=None, txnid=None, user=None, hostname=None, agentInfo=thrift_spec[5][4],): - self.component = component - self.txnid = txnid - self.user = user - self.hostname = hostname - self.agentInfo = agentInfo - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.component = [] - (_etype465, _size462) = iprot.readListBegin() - for _i466 in xrange(_size462): - _elem467 = LockComponent() - _elem467.read(iprot) - self.component.append(_elem467) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I64: - self.txnid = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.user = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.hostname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.agentInfo = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('LockRequest') - if self.component is not None: - oprot.writeFieldBegin('component', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.component)) - for iter468 in self.component: - iter468.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.txnid is not None: - oprot.writeFieldBegin('txnid', TType.I64, 2) - oprot.writeI64(self.txnid) - oprot.writeFieldEnd() - if self.user is not None: - oprot.writeFieldBegin('user', TType.STRING, 3) - oprot.writeString(self.user) - oprot.writeFieldEnd() - if self.hostname is not None: - oprot.writeFieldBegin('hostname', TType.STRING, 4) - oprot.writeString(self.hostname) - oprot.writeFieldEnd() - if self.agentInfo is not None: - oprot.writeFieldBegin('agentInfo', TType.STRING, 5) - oprot.writeString(self.agentInfo) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.component is None: - raise TProtocol.TProtocolException(message='Required field component is unset!') - if self.user is None: - raise TProtocol.TProtocolException(message='Required field user is unset!') - if self.hostname is None: - raise TProtocol.TProtocolException(message='Required field hostname is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.component) - value = (value * 31) ^ hash(self.txnid) - value = (value * 31) ^ hash(self.user) - value = (value * 31) ^ hash(self.hostname) - value = (value * 31) ^ hash(self.agentInfo) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class LockResponse: - """ - Attributes: - - lockid - - state - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'lockid', None, None, ), # 1 - (2, TType.I32, 'state', None, None, ), # 2 - ) - - def __init__(self, lockid=None, state=None,): - self.lockid = lockid - self.state = state - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.lockid = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.state = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('LockResponse') - if self.lockid is not None: - oprot.writeFieldBegin('lockid', TType.I64, 1) - oprot.writeI64(self.lockid) - oprot.writeFieldEnd() - if self.state is not None: - oprot.writeFieldBegin('state', TType.I32, 2) - oprot.writeI32(self.state) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.lockid is None: - raise TProtocol.TProtocolException(message='Required field lockid is unset!') - if self.state is None: - raise TProtocol.TProtocolException(message='Required field state is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.lockid) - value = (value * 31) ^ hash(self.state) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class CheckLockRequest: - """ - Attributes: - - lockid - - txnid - - elapsed_ms - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'lockid', None, None, ), # 1 - (2, TType.I64, 'txnid', None, None, ), # 2 - (3, TType.I64, 'elapsed_ms', None, None, ), # 3 - ) - - def __init__(self, lockid=None, txnid=None, elapsed_ms=None,): - self.lockid = lockid - self.txnid = txnid - self.elapsed_ms = elapsed_ms - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.lockid = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I64: - self.txnid = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.elapsed_ms = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('CheckLockRequest') - if self.lockid is not None: - oprot.writeFieldBegin('lockid', TType.I64, 1) - oprot.writeI64(self.lockid) - oprot.writeFieldEnd() - if self.txnid is not None: - oprot.writeFieldBegin('txnid', TType.I64, 2) - oprot.writeI64(self.txnid) - oprot.writeFieldEnd() - if self.elapsed_ms is not None: - oprot.writeFieldBegin('elapsed_ms', TType.I64, 3) - oprot.writeI64(self.elapsed_ms) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.lockid is None: - raise TProtocol.TProtocolException(message='Required field lockid is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.lockid) - value = (value * 31) ^ hash(self.txnid) - value = (value * 31) ^ hash(self.elapsed_ms) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class UnlockRequest: - """ - Attributes: - - lockid - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'lockid', None, None, ), # 1 - ) - - def __init__(self, lockid=None,): - self.lockid = lockid - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.lockid = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('UnlockRequest') - if self.lockid is not None: - oprot.writeFieldBegin('lockid', TType.I64, 1) - oprot.writeI64(self.lockid) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.lockid is None: - raise TProtocol.TProtocolException(message='Required field lockid is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.lockid) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ShowLocksRequest: - """ - Attributes: - - dbname - - tablename - - partname - - isExtended - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tablename', None, None, ), # 2 - (3, TType.STRING, 'partname', None, None, ), # 3 - (4, TType.BOOL, 'isExtended', None, False, ), # 4 - ) - - def __init__(self, dbname=None, tablename=None, partname=None, isExtended=thrift_spec[4][4],): - self.dbname = dbname - self.tablename = tablename - self.partname = partname - self.isExtended = isExtended - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tablename = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.partname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.isExtended = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ShowLocksRequest') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tablename is not None: - oprot.writeFieldBegin('tablename', TType.STRING, 2) - oprot.writeString(self.tablename) - oprot.writeFieldEnd() - if self.partname is not None: - oprot.writeFieldBegin('partname', TType.STRING, 3) - oprot.writeString(self.partname) - oprot.writeFieldEnd() - if self.isExtended is not None: - oprot.writeFieldBegin('isExtended', TType.BOOL, 4) - oprot.writeBool(self.isExtended) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.tablename) - value = (value * 31) ^ hash(self.partname) - value = (value * 31) ^ hash(self.isExtended) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ShowLocksResponseElement: - """ - Attributes: - - lockid - - dbname - - tablename - - partname - - state - - type - - txnid - - lastheartbeat - - acquiredat - - user - - hostname - - heartbeatCount - - agentInfo - - blockedByExtId - - blockedByIntId - - lockIdInternal - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'lockid', None, None, ), # 1 - (2, TType.STRING, 'dbname', None, None, ), # 2 - (3, TType.STRING, 'tablename', None, None, ), # 3 - (4, TType.STRING, 'partname', None, None, ), # 4 - (5, TType.I32, 'state', None, None, ), # 5 - (6, TType.I32, 'type', None, None, ), # 6 - (7, TType.I64, 'txnid', None, None, ), # 7 - (8, TType.I64, 'lastheartbeat', None, None, ), # 8 - (9, TType.I64, 'acquiredat', None, None, ), # 9 - (10, TType.STRING, 'user', None, None, ), # 10 - (11, TType.STRING, 'hostname', None, None, ), # 11 - (12, TType.I32, 'heartbeatCount', None, 0, ), # 12 - (13, TType.STRING, 'agentInfo', None, None, ), # 13 - (14, TType.I64, 'blockedByExtId', None, None, ), # 14 - (15, TType.I64, 'blockedByIntId', None, None, ), # 15 - (16, TType.I64, 'lockIdInternal', None, None, ), # 16 - ) - - def __init__(self, lockid=None, dbname=None, tablename=None, partname=None, state=None, type=None, txnid=None, lastheartbeat=None, acquiredat=None, user=None, hostname=None, heartbeatCount=thrift_spec[12][4], agentInfo=None, blockedByExtId=None, blockedByIntId=None, lockIdInternal=None,): - self.lockid = lockid - self.dbname = dbname - self.tablename = tablename - self.partname = partname - self.state = state - self.type = type - self.txnid = txnid - self.lastheartbeat = lastheartbeat - self.acquiredat = acquiredat - self.user = user - self.hostname = hostname - self.heartbeatCount = heartbeatCount - self.agentInfo = agentInfo - self.blockedByExtId = blockedByExtId - self.blockedByIntId = blockedByIntId - self.lockIdInternal = lockIdInternal - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.lockid = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.tablename = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.partname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.state = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.type = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I64: - self.txnid = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.I64: - self.lastheartbeat = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.I64: - self.acquiredat = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.STRING: - self.user = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 11: - if ftype == TType.STRING: - self.hostname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 12: - if ftype == TType.I32: - self.heartbeatCount = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 13: - if ftype == TType.STRING: - self.agentInfo = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 14: - if ftype == TType.I64: - self.blockedByExtId = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 15: - if ftype == TType.I64: - self.blockedByIntId = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 16: - if ftype == TType.I64: - self.lockIdInternal = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ShowLocksResponseElement') - if self.lockid is not None: - oprot.writeFieldBegin('lockid', TType.I64, 1) - oprot.writeI64(self.lockid) - oprot.writeFieldEnd() - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 2) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tablename is not None: - oprot.writeFieldBegin('tablename', TType.STRING, 3) - oprot.writeString(self.tablename) - oprot.writeFieldEnd() - if self.partname is not None: - oprot.writeFieldBegin('partname', TType.STRING, 4) - oprot.writeString(self.partname) - oprot.writeFieldEnd() - if self.state is not None: - oprot.writeFieldBegin('state', TType.I32, 5) - oprot.writeI32(self.state) - oprot.writeFieldEnd() - if self.type is not None: - oprot.writeFieldBegin('type', TType.I32, 6) - oprot.writeI32(self.type) - oprot.writeFieldEnd() - if self.txnid is not None: - oprot.writeFieldBegin('txnid', TType.I64, 7) - oprot.writeI64(self.txnid) - oprot.writeFieldEnd() - if self.lastheartbeat is not None: - oprot.writeFieldBegin('lastheartbeat', TType.I64, 8) - oprot.writeI64(self.lastheartbeat) - oprot.writeFieldEnd() - if self.acquiredat is not None: - oprot.writeFieldBegin('acquiredat', TType.I64, 9) - oprot.writeI64(self.acquiredat) - oprot.writeFieldEnd() - if self.user is not None: - oprot.writeFieldBegin('user', TType.STRING, 10) - oprot.writeString(self.user) - oprot.writeFieldEnd() - if self.hostname is not None: - oprot.writeFieldBegin('hostname', TType.STRING, 11) - oprot.writeString(self.hostname) - oprot.writeFieldEnd() - if self.heartbeatCount is not None: - oprot.writeFieldBegin('heartbeatCount', TType.I32, 12) - oprot.writeI32(self.heartbeatCount) - oprot.writeFieldEnd() - if self.agentInfo is not None: - oprot.writeFieldBegin('agentInfo', TType.STRING, 13) - oprot.writeString(self.agentInfo) - oprot.writeFieldEnd() - if self.blockedByExtId is not None: - oprot.writeFieldBegin('blockedByExtId', TType.I64, 14) - oprot.writeI64(self.blockedByExtId) - oprot.writeFieldEnd() - if self.blockedByIntId is not None: - oprot.writeFieldBegin('blockedByIntId', TType.I64, 15) - oprot.writeI64(self.blockedByIntId) - oprot.writeFieldEnd() - if self.lockIdInternal is not None: - oprot.writeFieldBegin('lockIdInternal', TType.I64, 16) - oprot.writeI64(self.lockIdInternal) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.lockid is None: - raise TProtocol.TProtocolException(message='Required field lockid is unset!') - if self.dbname is None: - raise TProtocol.TProtocolException(message='Required field dbname is unset!') - if self.state is None: - raise TProtocol.TProtocolException(message='Required field state is unset!') - if self.type is None: - raise TProtocol.TProtocolException(message='Required field type is unset!') - if self.lastheartbeat is None: - raise TProtocol.TProtocolException(message='Required field lastheartbeat is unset!') - if self.user is None: - raise TProtocol.TProtocolException(message='Required field user is unset!') - if self.hostname is None: - raise TProtocol.TProtocolException(message='Required field hostname is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.lockid) - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.tablename) - value = (value * 31) ^ hash(self.partname) - value = (value * 31) ^ hash(self.state) - value = (value * 31) ^ hash(self.type) - value = (value * 31) ^ hash(self.txnid) - value = (value * 31) ^ hash(self.lastheartbeat) - value = (value * 31) ^ hash(self.acquiredat) - value = (value * 31) ^ hash(self.user) - value = (value * 31) ^ hash(self.hostname) - value = (value * 31) ^ hash(self.heartbeatCount) - value = (value * 31) ^ hash(self.agentInfo) - value = (value * 31) ^ hash(self.blockedByExtId) - value = (value * 31) ^ hash(self.blockedByIntId) - value = (value * 31) ^ hash(self.lockIdInternal) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ShowLocksResponse: - """ - Attributes: - - locks - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'locks', (TType.STRUCT,(ShowLocksResponseElement, ShowLocksResponseElement.thrift_spec)), None, ), # 1 - ) - - def __init__(self, locks=None,): - self.locks = locks - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.locks = [] - (_etype472, _size469) = iprot.readListBegin() - for _i473 in xrange(_size469): - _elem474 = ShowLocksResponseElement() - _elem474.read(iprot) - self.locks.append(_elem474) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ShowLocksResponse') - if self.locks is not None: - oprot.writeFieldBegin('locks', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.locks)) - for iter475 in self.locks: - iter475.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.locks) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class HeartbeatRequest: - """ - Attributes: - - lockid - - txnid - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'lockid', None, None, ), # 1 - (2, TType.I64, 'txnid', None, None, ), # 2 - ) - - def __init__(self, lockid=None, txnid=None,): - self.lockid = lockid - self.txnid = txnid - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.lockid = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I64: - self.txnid = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('HeartbeatRequest') - if self.lockid is not None: - oprot.writeFieldBegin('lockid', TType.I64, 1) - oprot.writeI64(self.lockid) - oprot.writeFieldEnd() - if self.txnid is not None: - oprot.writeFieldBegin('txnid', TType.I64, 2) - oprot.writeI64(self.txnid) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.lockid) - value = (value * 31) ^ hash(self.txnid) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class HeartbeatTxnRangeRequest: - """ - Attributes: - - min - - max - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'min', None, None, ), # 1 - (2, TType.I64, 'max', None, None, ), # 2 - ) - - def __init__(self, min=None, max=None,): - self.min = min - self.max = max - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.min = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I64: - self.max = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('HeartbeatTxnRangeRequest') - if self.min is not None: - oprot.writeFieldBegin('min', TType.I64, 1) - oprot.writeI64(self.min) - oprot.writeFieldEnd() - if self.max is not None: - oprot.writeFieldBegin('max', TType.I64, 2) - oprot.writeI64(self.max) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.min is None: - raise TProtocol.TProtocolException(message='Required field min is unset!') - if self.max is None: - raise TProtocol.TProtocolException(message='Required field max is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.min) - value = (value * 31) ^ hash(self.max) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class HeartbeatTxnRangeResponse: - """ - Attributes: - - aborted - - nosuch - """ - - thrift_spec = ( - None, # 0 - (1, TType.SET, 'aborted', (TType.I64,None), None, ), # 1 - (2, TType.SET, 'nosuch', (TType.I64,None), None, ), # 2 - ) - - def __init__(self, aborted=None, nosuch=None,): - self.aborted = aborted - self.nosuch = nosuch - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.SET: - self.aborted = set() - (_etype479, _size476) = iprot.readSetBegin() - for _i480 in xrange(_size476): - _elem481 = iprot.readI64() - self.aborted.add(_elem481) - iprot.readSetEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.SET: - self.nosuch = set() - (_etype485, _size482) = iprot.readSetBegin() - for _i486 in xrange(_size482): - _elem487 = iprot.readI64() - self.nosuch.add(_elem487) - iprot.readSetEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('HeartbeatTxnRangeResponse') - if self.aborted is not None: - oprot.writeFieldBegin('aborted', TType.SET, 1) - oprot.writeSetBegin(TType.I64, len(self.aborted)) - for iter488 in self.aborted: - oprot.writeI64(iter488) - oprot.writeSetEnd() - oprot.writeFieldEnd() - if self.nosuch is not None: - oprot.writeFieldBegin('nosuch', TType.SET, 2) - oprot.writeSetBegin(TType.I64, len(self.nosuch)) - for iter489 in self.nosuch: - oprot.writeI64(iter489) - oprot.writeSetEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.aborted is None: - raise TProtocol.TProtocolException(message='Required field aborted is unset!') - if self.nosuch is None: - raise TProtocol.TProtocolException(message='Required field nosuch is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.aborted) - value = (value * 31) ^ hash(self.nosuch) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class CompactionRequest: - """ - Attributes: - - dbname - - tablename - - partitionname - - type - - runas - - properties - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tablename', None, None, ), # 2 - (3, TType.STRING, 'partitionname', None, None, ), # 3 - (4, TType.I32, 'type', None, None, ), # 4 - (5, TType.STRING, 'runas', None, None, ), # 5 - (6, TType.MAP, 'properties', (TType.STRING,None,TType.STRING,None), None, ), # 6 - ) - - def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, runas=None, properties=None,): - self.dbname = dbname - self.tablename = tablename - self.partitionname = partitionname - self.type = type - self.runas = runas - self.properties = properties - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tablename = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.partitionname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.type = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.runas = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.MAP: - self.properties = {} - (_ktype491, _vtype492, _size490 ) = iprot.readMapBegin() - for _i494 in xrange(_size490): - _key495 = iprot.readString() - _val496 = iprot.readString() - self.properties[_key495] = _val496 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('CompactionRequest') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tablename is not None: - oprot.writeFieldBegin('tablename', TType.STRING, 2) - oprot.writeString(self.tablename) - oprot.writeFieldEnd() - if self.partitionname is not None: - oprot.writeFieldBegin('partitionname', TType.STRING, 3) - oprot.writeString(self.partitionname) - oprot.writeFieldEnd() - if self.type is not None: - oprot.writeFieldBegin('type', TType.I32, 4) - oprot.writeI32(self.type) - oprot.writeFieldEnd() - if self.runas is not None: - oprot.writeFieldBegin('runas', TType.STRING, 5) - oprot.writeString(self.runas) - oprot.writeFieldEnd() - if self.properties is not None: - oprot.writeFieldBegin('properties', TType.MAP, 6) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) - for kiter497,viter498 in self.properties.items(): - oprot.writeString(kiter497) - oprot.writeString(viter498) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dbname is None: - raise TProtocol.TProtocolException(message='Required field dbname is unset!') - if self.tablename is None: - raise TProtocol.TProtocolException(message='Required field tablename is unset!') - if self.type is None: - raise TProtocol.TProtocolException(message='Required field type is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.tablename) - value = (value * 31) ^ hash(self.partitionname) - value = (value * 31) ^ hash(self.type) - value = (value * 31) ^ hash(self.runas) - value = (value * 31) ^ hash(self.properties) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class CompactionResponse: - """ - Attributes: - - id - - state - - accepted - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'id', None, None, ), # 1 - (2, TType.STRING, 'state', None, None, ), # 2 - (3, TType.BOOL, 'accepted', None, None, ), # 3 - ) - - def __init__(self, id=None, state=None, accepted=None,): - self.id = id - self.state = state - self.accepted = accepted - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.id = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.state = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.BOOL: - self.accepted = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('CompactionResponse') - if self.id is not None: - oprot.writeFieldBegin('id', TType.I64, 1) - oprot.writeI64(self.id) - oprot.writeFieldEnd() - if self.state is not None: - oprot.writeFieldBegin('state', TType.STRING, 2) - oprot.writeString(self.state) - oprot.writeFieldEnd() - if self.accepted is not None: - oprot.writeFieldBegin('accepted', TType.BOOL, 3) - oprot.writeBool(self.accepted) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.id is None: - raise TProtocol.TProtocolException(message='Required field id is unset!') - if self.state is None: - raise TProtocol.TProtocolException(message='Required field state is unset!') - if self.accepted is None: - raise TProtocol.TProtocolException(message='Required field accepted is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.id) - value = (value * 31) ^ hash(self.state) - value = (value * 31) ^ hash(self.accepted) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ShowCompactRequest: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ShowCompactRequest') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ShowCompactResponseElement: - """ - Attributes: - - dbname - - tablename - - partitionname - - type - - state - - workerid - - start - - runAs - - hightestTxnId - - metaInfo - - endTime - - hadoopJobId - - id - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tablename', None, None, ), # 2 - (3, TType.STRING, 'partitionname', None, None, ), # 3 - (4, TType.I32, 'type', None, None, ), # 4 - (5, TType.STRING, 'state', None, None, ), # 5 - (6, TType.STRING, 'workerid', None, None, ), # 6 - (7, TType.I64, 'start', None, None, ), # 7 - (8, TType.STRING, 'runAs', None, None, ), # 8 - (9, TType.I64, 'hightestTxnId', None, None, ), # 9 - (10, TType.STRING, 'metaInfo', None, None, ), # 10 - (11, TType.I64, 'endTime', None, None, ), # 11 - (12, TType.STRING, 'hadoopJobId', None, "None", ), # 12 - (13, TType.I64, 'id', None, None, ), # 13 - ) - - def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, state=None, workerid=None, start=None, runAs=None, hightestTxnId=None, metaInfo=None, endTime=None, hadoopJobId=thrift_spec[12][4], id=None,): - self.dbname = dbname - self.tablename = tablename - self.partitionname = partitionname - self.type = type - self.state = state - self.workerid = workerid - self.start = start - self.runAs = runAs - self.hightestTxnId = hightestTxnId - self.metaInfo = metaInfo - self.endTime = endTime - self.hadoopJobId = hadoopJobId - self.id = id - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tablename = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.partitionname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.type = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.state = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.workerid = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I64: - self.start = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.STRING: - self.runAs = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.I64: - self.hightestTxnId = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.STRING: - self.metaInfo = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 11: - if ftype == TType.I64: - self.endTime = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 12: - if ftype == TType.STRING: - self.hadoopJobId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 13: - if ftype == TType.I64: - self.id = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ShowCompactResponseElement') - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tablename is not None: - oprot.writeFieldBegin('tablename', TType.STRING, 2) - oprot.writeString(self.tablename) - oprot.writeFieldEnd() - if self.partitionname is not None: - oprot.writeFieldBegin('partitionname', TType.STRING, 3) - oprot.writeString(self.partitionname) - oprot.writeFieldEnd() - if self.type is not None: - oprot.writeFieldBegin('type', TType.I32, 4) - oprot.writeI32(self.type) - oprot.writeFieldEnd() - if self.state is not None: - oprot.writeFieldBegin('state', TType.STRING, 5) - oprot.writeString(self.state) - oprot.writeFieldEnd() - if self.workerid is not None: - oprot.writeFieldBegin('workerid', TType.STRING, 6) - oprot.writeString(self.workerid) - oprot.writeFieldEnd() - if self.start is not None: - oprot.writeFieldBegin('start', TType.I64, 7) - oprot.writeI64(self.start) - oprot.writeFieldEnd() - if self.runAs is not None: - oprot.writeFieldBegin('runAs', TType.STRING, 8) - oprot.writeString(self.runAs) - oprot.writeFieldEnd() - if self.hightestTxnId is not None: - oprot.writeFieldBegin('hightestTxnId', TType.I64, 9) - oprot.writeI64(self.hightestTxnId) - oprot.writeFieldEnd() - if self.metaInfo is not None: - oprot.writeFieldBegin('metaInfo', TType.STRING, 10) - oprot.writeString(self.metaInfo) - oprot.writeFieldEnd() - if self.endTime is not None: - oprot.writeFieldBegin('endTime', TType.I64, 11) - oprot.writeI64(self.endTime) - oprot.writeFieldEnd() - if self.hadoopJobId is not None: - oprot.writeFieldBegin('hadoopJobId', TType.STRING, 12) - oprot.writeString(self.hadoopJobId) - oprot.writeFieldEnd() - if self.id is not None: - oprot.writeFieldBegin('id', TType.I64, 13) - oprot.writeI64(self.id) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dbname is None: - raise TProtocol.TProtocolException(message='Required field dbname is unset!') - if self.tablename is None: - raise TProtocol.TProtocolException(message='Required field tablename is unset!') - if self.type is None: - raise TProtocol.TProtocolException(message='Required field type is unset!') - if self.state is None: - raise TProtocol.TProtocolException(message='Required field state is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.tablename) - value = (value * 31) ^ hash(self.partitionname) - value = (value * 31) ^ hash(self.type) - value = (value * 31) ^ hash(self.state) - value = (value * 31) ^ hash(self.workerid) - value = (value * 31) ^ hash(self.start) - value = (value * 31) ^ hash(self.runAs) - value = (value * 31) ^ hash(self.hightestTxnId) - value = (value * 31) ^ hash(self.metaInfo) - value = (value * 31) ^ hash(self.endTime) - value = (value * 31) ^ hash(self.hadoopJobId) - value = (value * 31) ^ hash(self.id) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ShowCompactResponse: - """ - Attributes: - - compacts - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'compacts', (TType.STRUCT,(ShowCompactResponseElement, ShowCompactResponseElement.thrift_spec)), None, ), # 1 - ) - - def __init__(self, compacts=None,): - self.compacts = compacts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.compacts = [] - (_etype502, _size499) = iprot.readListBegin() - for _i503 in xrange(_size499): - _elem504 = ShowCompactResponseElement() - _elem504.read(iprot) - self.compacts.append(_elem504) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ShowCompactResponse') - if self.compacts is not None: - oprot.writeFieldBegin('compacts', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.compacts)) - for iter505 in self.compacts: - iter505.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.compacts is None: - raise TProtocol.TProtocolException(message='Required field compacts is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.compacts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AddDynamicPartitions: - """ - Attributes: - - txnid - - dbname - - tablename - - partitionnames - - operationType - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'txnid', None, None, ), # 1 - (2, TType.STRING, 'dbname', None, None, ), # 2 - (3, TType.STRING, 'tablename', None, None, ), # 3 - (4, TType.LIST, 'partitionnames', (TType.STRING,None), None, ), # 4 - (5, TType.I32, 'operationType', None, 5, ), # 5 - ) - - def __init__(self, txnid=None, dbname=None, tablename=None, partitionnames=None, operationType=thrift_spec[5][4],): - self.txnid = txnid - self.dbname = dbname - self.tablename = tablename - self.partitionnames = partitionnames - self.operationType = operationType - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.txnid = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.dbname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.tablename = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.partitionnames = [] - (_etype509, _size506) = iprot.readListBegin() - for _i510 in xrange(_size506): - _elem511 = iprot.readString() - self.partitionnames.append(_elem511) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.operationType = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AddDynamicPartitions') - if self.txnid is not None: - oprot.writeFieldBegin('txnid', TType.I64, 1) - oprot.writeI64(self.txnid) - oprot.writeFieldEnd() - if self.dbname is not None: - oprot.writeFieldBegin('dbname', TType.STRING, 2) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.tablename is not None: - oprot.writeFieldBegin('tablename', TType.STRING, 3) - oprot.writeString(self.tablename) - oprot.writeFieldEnd() - if self.partitionnames is not None: - oprot.writeFieldBegin('partitionnames', TType.LIST, 4) - oprot.writeListBegin(TType.STRING, len(self.partitionnames)) - for iter512 in self.partitionnames: - oprot.writeString(iter512) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.operationType is not None: - oprot.writeFieldBegin('operationType', TType.I32, 5) - oprot.writeI32(self.operationType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.txnid is None: - raise TProtocol.TProtocolException(message='Required field txnid is unset!') - if self.dbname is None: - raise TProtocol.TProtocolException(message='Required field dbname is unset!') - if self.tablename is None: - raise TProtocol.TProtocolException(message='Required field tablename is unset!') - if self.partitionnames is None: - raise TProtocol.TProtocolException(message='Required field partitionnames is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.txnid) - value = (value * 31) ^ hash(self.dbname) - value = (value * 31) ^ hash(self.tablename) - value = (value * 31) ^ hash(self.partitionnames) - value = (value * 31) ^ hash(self.operationType) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class NotificationEventRequest: - """ - Attributes: - - lastEvent - - maxEvents - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'lastEvent', None, None, ), # 1 - (2, TType.I32, 'maxEvents', None, None, ), # 2 - ) - - def __init__(self, lastEvent=None, maxEvents=None,): - self.lastEvent = lastEvent - self.maxEvents = maxEvents - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.lastEvent = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.maxEvents = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('NotificationEventRequest') - if self.lastEvent is not None: - oprot.writeFieldBegin('lastEvent', TType.I64, 1) - oprot.writeI64(self.lastEvent) - oprot.writeFieldEnd() - if self.maxEvents is not None: - oprot.writeFieldBegin('maxEvents', TType.I32, 2) - oprot.writeI32(self.maxEvents) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.lastEvent is None: - raise TProtocol.TProtocolException(message='Required field lastEvent is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.lastEvent) - value = (value * 31) ^ hash(self.maxEvents) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class NotificationEvent: - """ - Attributes: - - eventId - - eventTime - - eventType - - dbName - - tableName - - message - - messageFormat - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'eventId', None, None, ), # 1 - (2, TType.I32, 'eventTime', None, None, ), # 2 - (3, TType.STRING, 'eventType', None, None, ), # 3 - (4, TType.STRING, 'dbName', None, None, ), # 4 - (5, TType.STRING, 'tableName', None, None, ), # 5 - (6, TType.STRING, 'message', None, None, ), # 6 - (7, TType.STRING, 'messageFormat', None, None, ), # 7 - ) - - def __init__(self, eventId=None, eventTime=None, eventType=None, dbName=None, tableName=None, message=None, messageFormat=None,): - self.eventId = eventId - self.eventTime = eventTime - self.eventType = eventType - self.dbName = dbName - self.tableName = tableName - self.message = message - self.messageFormat = messageFormat - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.eventId = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.eventTime = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.eventType = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.tableName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRING: - self.messageFormat = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('NotificationEvent') - if self.eventId is not None: - oprot.writeFieldBegin('eventId', TType.I64, 1) - oprot.writeI64(self.eventId) - oprot.writeFieldEnd() - if self.eventTime is not None: - oprot.writeFieldBegin('eventTime', TType.I32, 2) - oprot.writeI32(self.eventTime) - oprot.writeFieldEnd() - if self.eventType is not None: - oprot.writeFieldBegin('eventType', TType.STRING, 3) - oprot.writeString(self.eventType) - oprot.writeFieldEnd() - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 4) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 5) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 6) - oprot.writeString(self.message) - oprot.writeFieldEnd() - if self.messageFormat is not None: - oprot.writeFieldBegin('messageFormat', TType.STRING, 7) - oprot.writeString(self.messageFormat) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.eventId is None: - raise TProtocol.TProtocolException(message='Required field eventId is unset!') - if self.eventTime is None: - raise TProtocol.TProtocolException(message='Required field eventTime is unset!') - if self.eventType is None: - raise TProtocol.TProtocolException(message='Required field eventType is unset!') - if self.message is None: - raise TProtocol.TProtocolException(message='Required field message is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.eventId) - value = (value * 31) ^ hash(self.eventTime) - value = (value * 31) ^ hash(self.eventType) - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tableName) - value = (value * 31) ^ hash(self.message) - value = (value * 31) ^ hash(self.messageFormat) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class NotificationEventResponse: - """ - Attributes: - - events - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'events', (TType.STRUCT,(NotificationEvent, NotificationEvent.thrift_spec)), None, ), # 1 - ) - - def __init__(self, events=None,): - self.events = events - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.events = [] - (_etype516, _size513) = iprot.readListBegin() - for _i517 in xrange(_size513): - _elem518 = NotificationEvent() - _elem518.read(iprot) - self.events.append(_elem518) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('NotificationEventResponse') - if self.events is not None: - oprot.writeFieldBegin('events', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.events)) - for iter519 in self.events: - iter519.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.events is None: - raise TProtocol.TProtocolException(message='Required field events is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.events) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class CurrentNotificationEventId: - """ - Attributes: - - eventId - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'eventId', None, None, ), # 1 - ) - - def __init__(self, eventId=None,): - self.eventId = eventId - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I64: - self.eventId = iprot.readI64() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('CurrentNotificationEventId') - if self.eventId is not None: - oprot.writeFieldBegin('eventId', TType.I64, 1) - oprot.writeI64(self.eventId) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.eventId is None: - raise TProtocol.TProtocolException(message='Required field eventId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.eventId) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class InsertEventRequestData: - """ - Attributes: - - replace - - filesAdded - - filesAddedChecksum - """ - - thrift_spec = ( - None, # 0 - (1, TType.BOOL, 'replace', None, None, ), # 1 - (2, TType.LIST, 'filesAdded', (TType.STRING,None), None, ), # 2 - (3, TType.LIST, 'filesAddedChecksum', (TType.STRING,None), None, ), # 3 - ) - - def __init__(self, replace=None, filesAdded=None, filesAddedChecksum=None,): - self.replace = replace - self.filesAdded = filesAdded - self.filesAddedChecksum = filesAddedChecksum - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.BOOL: - self.replace = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.filesAdded = [] - (_etype523, _size520) = iprot.readListBegin() - for _i524 in xrange(_size520): - _elem525 = iprot.readString() - self.filesAdded.append(_elem525) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.filesAddedChecksum = [] - (_etype529, _size526) = iprot.readListBegin() - for _i530 in xrange(_size526): - _elem531 = iprot.readString() - self.filesAddedChecksum.append(_elem531) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('InsertEventRequestData') - if self.replace is not None: - oprot.writeFieldBegin('replace', TType.BOOL, 1) - oprot.writeBool(self.replace) - oprot.writeFieldEnd() - if self.filesAdded is not None: - oprot.writeFieldBegin('filesAdded', TType.LIST, 2) - oprot.writeListBegin(TType.STRING, len(self.filesAdded)) - for iter532 in self.filesAdded: - oprot.writeString(iter532) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.filesAddedChecksum is not None: - oprot.writeFieldBegin('filesAddedChecksum', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.filesAddedChecksum)) - for iter533 in self.filesAddedChecksum: - oprot.writeString(iter533) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.filesAdded is None: - raise TProtocol.TProtocolException(message='Required field filesAdded is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.replace) - value = (value * 31) ^ hash(self.filesAdded) - value = (value * 31) ^ hash(self.filesAddedChecksum) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class FireEventRequestData: - """ - Attributes: - - insertData - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'insertData', (InsertEventRequestData, InsertEventRequestData.thrift_spec), None, ), # 1 - ) - - def __init__(self, insertData=None,): - self.insertData = insertData - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.insertData = InsertEventRequestData() - self.insertData.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('FireEventRequestData') - if self.insertData is not None: - oprot.writeFieldBegin('insertData', TType.STRUCT, 1) - self.insertData.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.insertData) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class FireEventRequest: - """ - Attributes: - - successful - - data - - dbName - - tableName - - partitionVals - """ - - thrift_spec = ( - None, # 0 - (1, TType.BOOL, 'successful', None, None, ), # 1 - (2, TType.STRUCT, 'data', (FireEventRequestData, FireEventRequestData.thrift_spec), None, ), # 2 - (3, TType.STRING, 'dbName', None, None, ), # 3 - (4, TType.STRING, 'tableName', None, None, ), # 4 - (5, TType.LIST, 'partitionVals', (TType.STRING,None), None, ), # 5 - ) - - def __init__(self, successful=None, data=None, dbName=None, tableName=None, partitionVals=None,): - self.successful = successful - self.data = data - self.dbName = dbName - self.tableName = tableName - self.partitionVals = partitionVals - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.BOOL: - self.successful = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.data = FireEventRequestData() - self.data.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.tableName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.LIST: - self.partitionVals = [] - (_etype537, _size534) = iprot.readListBegin() - for _i538 in xrange(_size534): - _elem539 = iprot.readString() - self.partitionVals.append(_elem539) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('FireEventRequest') - if self.successful is not None: - oprot.writeFieldBegin('successful', TType.BOOL, 1) - oprot.writeBool(self.successful) - oprot.writeFieldEnd() - if self.data is not None: - oprot.writeFieldBegin('data', TType.STRUCT, 2) - self.data.write(oprot) - oprot.writeFieldEnd() - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 3) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 4) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.partitionVals is not None: - oprot.writeFieldBegin('partitionVals', TType.LIST, 5) - oprot.writeListBegin(TType.STRING, len(self.partitionVals)) - for iter540 in self.partitionVals: - oprot.writeString(iter540) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.successful is None: - raise TProtocol.TProtocolException(message='Required field successful is unset!') - if self.data is None: - raise TProtocol.TProtocolException(message='Required field data is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.successful) - value = (value * 31) ^ hash(self.data) - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tableName) - value = (value * 31) ^ hash(self.partitionVals) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class FireEventResponse: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('FireEventResponse') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class MetadataPpdResult: - """ - Attributes: - - metadata - - includeBitset - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'metadata', None, None, ), # 1 - (2, TType.STRING, 'includeBitset', None, None, ), # 2 - ) - - def __init__(self, metadata=None, includeBitset=None,): - self.metadata = metadata - self.includeBitset = includeBitset - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.metadata = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.includeBitset = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('MetadataPpdResult') - if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.STRING, 1) - oprot.writeString(self.metadata) - oprot.writeFieldEnd() - if self.includeBitset is not None: - oprot.writeFieldBegin('includeBitset', TType.STRING, 2) - oprot.writeString(self.includeBitset) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.metadata) - value = (value * 31) ^ hash(self.includeBitset) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetFileMetadataByExprResult: - """ - Attributes: - - metadata - - isSupported - """ - - thrift_spec = ( - None, # 0 - (1, TType.MAP, 'metadata', (TType.I64,None,TType.STRUCT,(MetadataPpdResult, MetadataPpdResult.thrift_spec)), None, ), # 1 - (2, TType.BOOL, 'isSupported', None, None, ), # 2 - ) - - def __init__(self, metadata=None, isSupported=None,): - self.metadata = metadata - self.isSupported = isSupported - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.MAP: - self.metadata = {} - (_ktype542, _vtype543, _size541 ) = iprot.readMapBegin() - for _i545 in xrange(_size541): - _key546 = iprot.readI64() - _val547 = MetadataPpdResult() - _val547.read(iprot) - self.metadata[_key546] = _val547 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.isSupported = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetFileMetadataByExprResult') - if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 1) - oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.metadata)) - for kiter548,viter549 in self.metadata.items(): - oprot.writeI64(kiter548) - viter549.write(oprot) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.isSupported is not None: - oprot.writeFieldBegin('isSupported', TType.BOOL, 2) - oprot.writeBool(self.isSupported) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.metadata is None: - raise TProtocol.TProtocolException(message='Required field metadata is unset!') - if self.isSupported is None: - raise TProtocol.TProtocolException(message='Required field isSupported is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.metadata) - value = (value * 31) ^ hash(self.isSupported) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetFileMetadataByExprRequest: - """ - Attributes: - - fileIds - - expr - - doGetFooters - - type - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'fileIds', (TType.I64,None), None, ), # 1 - (2, TType.STRING, 'expr', None, None, ), # 2 - (3, TType.BOOL, 'doGetFooters', None, None, ), # 3 - (4, TType.I32, 'type', None, None, ), # 4 - ) - - def __init__(self, fileIds=None, expr=None, doGetFooters=None, type=None,): - self.fileIds = fileIds - self.expr = expr - self.doGetFooters = doGetFooters - self.type = type - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.fileIds = [] - (_etype553, _size550) = iprot.readListBegin() - for _i554 in xrange(_size550): - _elem555 = iprot.readI64() - self.fileIds.append(_elem555) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.expr = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.BOOL: - self.doGetFooters = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.type = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetFileMetadataByExprRequest') - if self.fileIds is not None: - oprot.writeFieldBegin('fileIds', TType.LIST, 1) - oprot.writeListBegin(TType.I64, len(self.fileIds)) - for iter556 in self.fileIds: - oprot.writeI64(iter556) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.expr is not None: - oprot.writeFieldBegin('expr', TType.STRING, 2) - oprot.writeString(self.expr) - oprot.writeFieldEnd() - if self.doGetFooters is not None: - oprot.writeFieldBegin('doGetFooters', TType.BOOL, 3) - oprot.writeBool(self.doGetFooters) - oprot.writeFieldEnd() - if self.type is not None: - oprot.writeFieldBegin('type', TType.I32, 4) - oprot.writeI32(self.type) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.fileIds is None: - raise TProtocol.TProtocolException(message='Required field fileIds is unset!') - if self.expr is None: - raise TProtocol.TProtocolException(message='Required field expr is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.fileIds) - value = (value * 31) ^ hash(self.expr) - value = (value * 31) ^ hash(self.doGetFooters) - value = (value * 31) ^ hash(self.type) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetFileMetadataResult: - """ - Attributes: - - metadata - - isSupported - """ - - thrift_spec = ( - None, # 0 - (1, TType.MAP, 'metadata', (TType.I64,None,TType.STRING,None), None, ), # 1 - (2, TType.BOOL, 'isSupported', None, None, ), # 2 - ) - - def __init__(self, metadata=None, isSupported=None,): - self.metadata = metadata - self.isSupported = isSupported - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.MAP: - self.metadata = {} - (_ktype558, _vtype559, _size557 ) = iprot.readMapBegin() - for _i561 in xrange(_size557): - _key562 = iprot.readI64() - _val563 = iprot.readString() - self.metadata[_key562] = _val563 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.isSupported = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetFileMetadataResult') - if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.MAP, 1) - oprot.writeMapBegin(TType.I64, TType.STRING, len(self.metadata)) - for kiter564,viter565 in self.metadata.items(): - oprot.writeI64(kiter564) - oprot.writeString(viter565) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.isSupported is not None: - oprot.writeFieldBegin('isSupported', TType.BOOL, 2) - oprot.writeBool(self.isSupported) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.metadata is None: - raise TProtocol.TProtocolException(message='Required field metadata is unset!') - if self.isSupported is None: - raise TProtocol.TProtocolException(message='Required field isSupported is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.metadata) - value = (value * 31) ^ hash(self.isSupported) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetFileMetadataRequest: - """ - Attributes: - - fileIds - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'fileIds', (TType.I64,None), None, ), # 1 - ) - - def __init__(self, fileIds=None,): - self.fileIds = fileIds - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.fileIds = [] - (_etype569, _size566) = iprot.readListBegin() - for _i570 in xrange(_size566): - _elem571 = iprot.readI64() - self.fileIds.append(_elem571) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetFileMetadataRequest') - if self.fileIds is not None: - oprot.writeFieldBegin('fileIds', TType.LIST, 1) - oprot.writeListBegin(TType.I64, len(self.fileIds)) - for iter572 in self.fileIds: - oprot.writeI64(iter572) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.fileIds is None: - raise TProtocol.TProtocolException(message='Required field fileIds is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.fileIds) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PutFileMetadataResult: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PutFileMetadataResult') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class PutFileMetadataRequest: - """ - Attributes: - - fileIds - - metadata - - type - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'fileIds', (TType.I64,None), None, ), # 1 - (2, TType.LIST, 'metadata', (TType.STRING,None), None, ), # 2 - (3, TType.I32, 'type', None, None, ), # 3 - ) - - def __init__(self, fileIds=None, metadata=None, type=None,): - self.fileIds = fileIds - self.metadata = metadata - self.type = type - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.fileIds = [] - (_etype576, _size573) = iprot.readListBegin() - for _i577 in xrange(_size573): - _elem578 = iprot.readI64() - self.fileIds.append(_elem578) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.metadata = [] - (_etype582, _size579) = iprot.readListBegin() - for _i583 in xrange(_size579): - _elem584 = iprot.readString() - self.metadata.append(_elem584) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.type = iprot.readI32() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('PutFileMetadataRequest') - if self.fileIds is not None: - oprot.writeFieldBegin('fileIds', TType.LIST, 1) - oprot.writeListBegin(TType.I64, len(self.fileIds)) - for iter585 in self.fileIds: - oprot.writeI64(iter585) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.metadata is not None: - oprot.writeFieldBegin('metadata', TType.LIST, 2) - oprot.writeListBegin(TType.STRING, len(self.metadata)) - for iter586 in self.metadata: - oprot.writeString(iter586) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.type is not None: - oprot.writeFieldBegin('type', TType.I32, 3) - oprot.writeI32(self.type) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.fileIds is None: - raise TProtocol.TProtocolException(message='Required field fileIds is unset!') - if self.metadata is None: - raise TProtocol.TProtocolException(message='Required field metadata is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.fileIds) - value = (value * 31) ^ hash(self.metadata) - value = (value * 31) ^ hash(self.type) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ClearFileMetadataResult: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ClearFileMetadataResult') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ClearFileMetadataRequest: - """ - Attributes: - - fileIds - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'fileIds', (TType.I64,None), None, ), # 1 - ) - - def __init__(self, fileIds=None,): - self.fileIds = fileIds - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.fileIds = [] - (_etype590, _size587) = iprot.readListBegin() - for _i591 in xrange(_size587): - _elem592 = iprot.readI64() - self.fileIds.append(_elem592) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ClearFileMetadataRequest') - if self.fileIds is not None: - oprot.writeFieldBegin('fileIds', TType.LIST, 1) - oprot.writeListBegin(TType.I64, len(self.fileIds)) - for iter593 in self.fileIds: - oprot.writeI64(iter593) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.fileIds is None: - raise TProtocol.TProtocolException(message='Required field fileIds is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.fileIds) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class CacheFileMetadataResult: - """ - Attributes: - - isSupported - """ - - thrift_spec = ( - None, # 0 - (1, TType.BOOL, 'isSupported', None, None, ), # 1 - ) - - def __init__(self, isSupported=None,): - self.isSupported = isSupported - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.BOOL: - self.isSupported = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('CacheFileMetadataResult') - if self.isSupported is not None: - oprot.writeFieldBegin('isSupported', TType.BOOL, 1) - oprot.writeBool(self.isSupported) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.isSupported is None: - raise TProtocol.TProtocolException(message='Required field isSupported is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.isSupported) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class CacheFileMetadataRequest: - """ - Attributes: - - dbName - - tblName - - partName - - isAllParts - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'tblName', None, None, ), # 2 - (3, TType.STRING, 'partName', None, None, ), # 3 - (4, TType.BOOL, 'isAllParts', None, None, ), # 4 - ) - - def __init__(self, dbName=None, tblName=None, partName=None, isAllParts=None,): - self.dbName = dbName - self.tblName = tblName - self.partName = partName - self.isAllParts = isAllParts - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tblName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.partName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.isAllParts = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('CacheFileMetadataRequest') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tblName is not None: - oprot.writeFieldBegin('tblName', TType.STRING, 2) - oprot.writeString(self.tblName) - oprot.writeFieldEnd() - if self.partName is not None: - oprot.writeFieldBegin('partName', TType.STRING, 3) - oprot.writeString(self.partName) - oprot.writeFieldEnd() - if self.isAllParts is not None: - oprot.writeFieldBegin('isAllParts', TType.BOOL, 4) - oprot.writeBool(self.isAllParts) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dbName is None: - raise TProtocol.TProtocolException(message='Required field dbName is unset!') - if self.tblName is None: - raise TProtocol.TProtocolException(message='Required field tblName is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tblName) - value = (value * 31) ^ hash(self.partName) - value = (value * 31) ^ hash(self.isAllParts) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetAllFunctionsResponse: - """ - Attributes: - - functions - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'functions', (TType.STRUCT,(Function, Function.thrift_spec)), None, ), # 1 - ) - - def __init__(self, functions=None,): - self.functions = functions - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.functions = [] - (_etype597, _size594) = iprot.readListBegin() - for _i598 in xrange(_size594): - _elem599 = Function() - _elem599.read(iprot) - self.functions.append(_elem599) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetAllFunctionsResponse') - if self.functions is not None: - oprot.writeFieldBegin('functions', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.functions)) - for iter600 in self.functions: - iter600.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.functions) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ClientCapabilities: - """ - Attributes: - - values - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'values', (TType.I32,None), None, ), # 1 - ) - - def __init__(self, values=None,): - self.values = values - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.values = [] - (_etype604, _size601) = iprot.readListBegin() - for _i605 in xrange(_size601): - _elem606 = iprot.readI32() - self.values.append(_elem606) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ClientCapabilities') - if self.values is not None: - oprot.writeFieldBegin('values', TType.LIST, 1) - oprot.writeListBegin(TType.I32, len(self.values)) - for iter607 in self.values: - oprot.writeI32(iter607) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.values is None: - raise TProtocol.TProtocolException(message='Required field values is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.values) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetTableRequest: - """ - Attributes: - - dbName - - tblName - - capabilities - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'tblName', None, None, ), # 2 - (3, TType.STRUCT, 'capabilities', (ClientCapabilities, ClientCapabilities.thrift_spec), None, ), # 3 - ) - - def __init__(self, dbName=None, tblName=None, capabilities=None,): - self.dbName = dbName - self.tblName = tblName - self.capabilities = capabilities - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tblName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.capabilities = ClientCapabilities() - self.capabilities.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetTableRequest') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tblName is not None: - oprot.writeFieldBegin('tblName', TType.STRING, 2) - oprot.writeString(self.tblName) - oprot.writeFieldEnd() - if self.capabilities is not None: - oprot.writeFieldBegin('capabilities', TType.STRUCT, 3) - self.capabilities.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dbName is None: - raise TProtocol.TProtocolException(message='Required field dbName is unset!') - if self.tblName is None: - raise TProtocol.TProtocolException(message='Required field tblName is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tblName) - value = (value * 31) ^ hash(self.capabilities) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetTableResult: - """ - Attributes: - - table - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'table', (Table, Table.thrift_spec), None, ), # 1 - ) - - def __init__(self, table=None,): - self.table = table - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.table = Table() - self.table.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetTableResult') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRUCT, 1) - self.table.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetTablesRequest: - """ - Attributes: - - dbName - - tblNames - - capabilities - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.LIST, 'tblNames', (TType.STRING,None), None, ), # 2 - (3, TType.STRUCT, 'capabilities', (ClientCapabilities, ClientCapabilities.thrift_spec), None, ), # 3 - ) - - def __init__(self, dbName=None, tblNames=None, capabilities=None,): - self.dbName = dbName - self.tblNames = tblNames - self.capabilities = capabilities - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.tblNames = [] - (_etype611, _size608) = iprot.readListBegin() - for _i612 in xrange(_size608): - _elem613 = iprot.readString() - self.tblNames.append(_elem613) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.capabilities = ClientCapabilities() - self.capabilities.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetTablesRequest') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tblNames is not None: - oprot.writeFieldBegin('tblNames', TType.LIST, 2) - oprot.writeListBegin(TType.STRING, len(self.tblNames)) - for iter614 in self.tblNames: - oprot.writeString(iter614) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.capabilities is not None: - oprot.writeFieldBegin('capabilities', TType.STRUCT, 3) - self.capabilities.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dbName is None: - raise TProtocol.TProtocolException(message='Required field dbName is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tblNames) - value = (value * 31) ^ hash(self.capabilities) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class GetTablesResult: - """ - Attributes: - - tables - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'tables', (TType.STRUCT,(Table, Table.thrift_spec)), None, ), # 1 - ) - - def __init__(self, tables=None,): - self.tables = tables - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.tables = [] - (_etype618, _size615) = iprot.readListBegin() - for _i619 in xrange(_size615): - _elem620 = Table() - _elem620.read(iprot) - self.tables.append(_elem620) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('GetTablesResult') - if self.tables is not None: - oprot.writeFieldBegin('tables', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.tables)) - for iter621 in self.tables: - iter621.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.tables is None: - raise TProtocol.TProtocolException(message='Required field tables is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tables) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class CmRecycleRequest: - """ - Attributes: - - dataPath - - purge - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dataPath', None, None, ), # 1 - (2, TType.BOOL, 'purge', None, None, ), # 2 - ) - - def __init__(self, dataPath=None, purge=None,): - self.dataPath = dataPath - self.purge = purge - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dataPath = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.purge = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('CmRecycleRequest') - if self.dataPath is not None: - oprot.writeFieldBegin('dataPath', TType.STRING, 1) - oprot.writeString(self.dataPath) - oprot.writeFieldEnd() - if self.purge is not None: - oprot.writeFieldBegin('purge', TType.BOOL, 2) - oprot.writeBool(self.purge) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dataPath is None: - raise TProtocol.TProtocolException(message='Required field dataPath is unset!') - if self.purge is None: - raise TProtocol.TProtocolException(message='Required field purge is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dataPath) - value = (value * 31) ^ hash(self.purge) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class CmRecycleResponse: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('CmRecycleResponse') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TableMeta: - """ - Attributes: - - dbName - - tableName - - tableType - - comments - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'dbName', None, None, ), # 1 - (2, TType.STRING, 'tableName', None, None, ), # 2 - (3, TType.STRING, 'tableType', None, None, ), # 3 - (4, TType.STRING, 'comments', None, None, ), # 4 - ) - - def __init__(self, dbName=None, tableName=None, tableType=None, comments=None,): - self.dbName = dbName - self.tableName = tableName - self.tableType = tableType - self.comments = comments - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.dbName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tableName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.tableType = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.comments = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TableMeta') - if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 1) - oprot.writeString(self.dbName) - oprot.writeFieldEnd() - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 2) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.tableType is not None: - oprot.writeFieldBegin('tableType', TType.STRING, 3) - oprot.writeString(self.tableType) - oprot.writeFieldEnd() - if self.comments is not None: - oprot.writeFieldBegin('comments', TType.STRING, 4) - oprot.writeString(self.comments) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.dbName is None: - raise TProtocol.TProtocolException(message='Required field dbName is unset!') - if self.tableName is None: - raise TProtocol.TProtocolException(message='Required field tableName is unset!') - if self.tableType is None: - raise TProtocol.TProtocolException(message='Required field tableType is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.dbName) - value = (value * 31) ^ hash(self.tableName) - value = (value * 31) ^ hash(self.tableType) - value = (value * 31) ^ hash(self.comments) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class MetaException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('MetaException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class UnknownTableException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('UnknownTableException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class UnknownDBException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('UnknownDBException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AlreadyExistsException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AlreadyExistsException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class InvalidPartitionException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('InvalidPartitionException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class UnknownPartitionException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('UnknownPartitionException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class InvalidObjectException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('InvalidObjectException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class NoSuchObjectException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('NoSuchObjectException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class IndexAlreadyExistsException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('IndexAlreadyExistsException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class InvalidOperationException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('InvalidOperationException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ConfigValSecurityException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ConfigValSecurityException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class InvalidInputException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('InvalidInputException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class NoSuchTxnException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('NoSuchTxnException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TxnAbortedException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TxnAbortedException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TxnOpenException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TxnOpenException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class NoSuchLockException(TException): - """ - Attributes: - - message - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = message - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('NoSuchLockException') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __str__(self): - return repr(self) - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) diff --git metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb deleted file mode 100644 index 6aa7143..0000000 --- metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb +++ /dev/null @@ -1,57 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.9.3) -# -# 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" - -HIVE_FILTER_FIELD_OWNER = %q"hive_filter_field_owner__" - -HIVE_FILTER_FIELD_PARAMS = %q"hive_filter_field_params__" - -HIVE_FILTER_FIELD_LAST_ACCESS = %q"hive_filter_field_last_access__" - -IS_ARCHIVED = %q"is_archived" - -ORIGINAL_LOCATION = %q"original_location" - -IS_IMMUTABLE = %q"immutable" - -META_TABLE_COLUMNS = %q"columns" - -META_TABLE_COLUMN_TYPES = %q"columns.types" - -BUCKET_FIELD_NAME = %q"bucket_field_name" - -BUCKET_COUNT = %q"bucket_count" - -FIELD_TO_DIMENSION = %q"field_to_dimension" - -META_TABLE_NAME = %q"name" - -META_TABLE_DB = %q"db" - -META_TABLE_LOCATION = %q"location" - -META_TABLE_SERDE = %q"serde" - -META_TABLE_PARTITION_COLUMNS = %q"partition_columns" - -META_TABLE_PARTITION_COLUMN_TYPES = %q"partition_columns.types" - -FILE_INPUT_FORMAT = %q"file.inputformat" - -FILE_OUTPUT_FORMAT = %q"file.outputformat" - -META_TABLE_STORAGE = %q"storage_handler" - -TABLE_IS_TRANSACTIONAL = %q"transactional" - -TABLE_NO_AUTO_COMPACT = %q"no_auto_compaction" - -TABLE_TRANSACTIONAL_PROPERTIES = %q"transactional_properties" - diff --git metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb deleted file mode 100644 index 02c5717..0000000 --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ /dev/null @@ -1,3478 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.9.3) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -require 'thrift' -require 'fb303_types' - - -module HiveObjectType - GLOBAL = 1 - DATABASE = 2 - TABLE = 3 - PARTITION = 4 - COLUMN = 5 - VALUE_MAP = {1 => "GLOBAL", 2 => "DATABASE", 3 => "TABLE", 4 => "PARTITION", 5 => "COLUMN"} - VALID_VALUES = Set.new([GLOBAL, DATABASE, TABLE, PARTITION, COLUMN]).freeze -end - -module PrincipalType - USER = 1 - ROLE = 2 - GROUP = 3 - VALUE_MAP = {1 => "USER", 2 => "ROLE", 3 => "GROUP"} - VALID_VALUES = Set.new([USER, ROLE, GROUP]).freeze -end - -module PartitionEventType - LOAD_DONE = 1 - VALUE_MAP = {1 => "LOAD_DONE"} - VALID_VALUES = Set.new([LOAD_DONE]).freeze -end - -module TxnState - COMMITTED = 1 - ABORTED = 2 - OPEN = 3 - VALUE_MAP = {1 => "COMMITTED", 2 => "ABORTED", 3 => "OPEN"} - VALID_VALUES = Set.new([COMMITTED, ABORTED, OPEN]).freeze -end - -module LockLevel - DB = 1 - TABLE = 2 - PARTITION = 3 - VALUE_MAP = {1 => "DB", 2 => "TABLE", 3 => "PARTITION"} - VALID_VALUES = Set.new([DB, TABLE, PARTITION]).freeze -end - -module LockState - ACQUIRED = 1 - WAITING = 2 - ABORT = 3 - NOT_ACQUIRED = 4 - VALUE_MAP = {1 => "ACQUIRED", 2 => "WAITING", 3 => "ABORT", 4 => "NOT_ACQUIRED"} - VALID_VALUES = Set.new([ACQUIRED, WAITING, ABORT, NOT_ACQUIRED]).freeze -end - -module LockType - SHARED_READ = 1 - SHARED_WRITE = 2 - EXCLUSIVE = 3 - VALUE_MAP = {1 => "SHARED_READ", 2 => "SHARED_WRITE", 3 => "EXCLUSIVE"} - VALID_VALUES = Set.new([SHARED_READ, SHARED_WRITE, EXCLUSIVE]).freeze -end - -module CompactionType - MINOR = 1 - MAJOR = 2 - VALUE_MAP = {1 => "MINOR", 2 => "MAJOR"} - VALID_VALUES = Set.new([MINOR, MAJOR]).freeze -end - -module GrantRevokeType - GRANT = 1 - REVOKE = 2 - VALUE_MAP = {1 => "GRANT", 2 => "REVOKE"} - VALID_VALUES = Set.new([GRANT, REVOKE]).freeze -end - -module DataOperationType - SELECT = 1 - INSERT = 2 - UPDATE = 3 - DELETE = 4 - UNSET = 5 - NO_TXN = 6 - VALUE_MAP = {1 => "SELECT", 2 => "INSERT", 3 => "UPDATE", 4 => "DELETE", 5 => "UNSET", 6 => "NO_TXN"} - VALID_VALUES = Set.new([SELECT, INSERT, UPDATE, DELETE, UNSET, NO_TXN]).freeze -end - -module EventRequestType - INSERT = 1 - UPDATE = 2 - DELETE = 3 - VALUE_MAP = {1 => "INSERT", 2 => "UPDATE", 3 => "DELETE"} - VALID_VALUES = Set.new([INSERT, UPDATE, DELETE]).freeze -end - -module FunctionType - JAVA = 1 - VALUE_MAP = {1 => "JAVA"} - VALID_VALUES = Set.new([JAVA]).freeze -end - -module ResourceType - JAR = 1 - FILE = 2 - ARCHIVE = 3 - VALUE_MAP = {1 => "JAR", 2 => "FILE", 3 => "ARCHIVE"} - VALID_VALUES = Set.new([JAR, FILE, ARCHIVE]).freeze -end - -module FileMetadataExprType - ORC_SARG = 1 - VALUE_MAP = {1 => "ORC_SARG"} - VALID_VALUES = Set.new([ORC_SARG]).freeze -end - -module ClientCapability - TEST_CAPABILITY = 1 - VALUE_MAP = {1 => "TEST_CAPABILITY"} - VALID_VALUES = Set.new([TEST_CAPABILITY]).freeze -end - -class Version - include ::Thrift::Struct, ::Thrift::Struct_Union - VERSION = 1 - COMMENTS = 2 - - FIELDS = { - VERSION => {:type => ::Thrift::Types::STRING, :name => 'version'}, - COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class FieldSchema - include ::Thrift::Struct, ::Thrift::Struct_Union - NAME = 1 - TYPE = 2 - COMMENT = 3 - - FIELDS = { - NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, - TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'}, - COMMENT => {:type => ::Thrift::Types::STRING, :name => 'comment'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class SQLPrimaryKey - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLE_DB = 1 - TABLE_NAME = 2 - COLUMN_NAME = 3 - KEY_SEQ = 4 - PK_NAME = 5 - ENABLE_CSTR = 6 - VALIDATE_CSTR = 7 - RELY_CSTR = 8 - - FIELDS = { - TABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'table_db'}, - TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, - COLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'column_name'}, - KEY_SEQ => {:type => ::Thrift::Types::I32, :name => 'key_seq'}, - PK_NAME => {:type => ::Thrift::Types::STRING, :name => 'pk_name'}, - ENABLE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'enable_cstr'}, - VALIDATE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'validate_cstr'}, - RELY_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'rely_cstr'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class SQLForeignKey - include ::Thrift::Struct, ::Thrift::Struct_Union - PKTABLE_DB = 1 - PKTABLE_NAME = 2 - PKCOLUMN_NAME = 3 - FKTABLE_DB = 4 - FKTABLE_NAME = 5 - FKCOLUMN_NAME = 6 - KEY_SEQ = 7 - UPDATE_RULE = 8 - DELETE_RULE = 9 - FK_NAME = 10 - PK_NAME = 11 - ENABLE_CSTR = 12 - VALIDATE_CSTR = 13 - RELY_CSTR = 14 - - FIELDS = { - PKTABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'pktable_db'}, - PKTABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'pktable_name'}, - PKCOLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'pkcolumn_name'}, - FKTABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'fktable_db'}, - FKTABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'fktable_name'}, - FKCOLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'fkcolumn_name'}, - KEY_SEQ => {:type => ::Thrift::Types::I32, :name => 'key_seq'}, - UPDATE_RULE => {:type => ::Thrift::Types::I32, :name => 'update_rule'}, - DELETE_RULE => {:type => ::Thrift::Types::I32, :name => 'delete_rule'}, - FK_NAME => {:type => ::Thrift::Types::STRING, :name => 'fk_name'}, - PK_NAME => {:type => ::Thrift::Types::STRING, :name => 'pk_name'}, - ENABLE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'enable_cstr'}, - VALIDATE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'validate_cstr'}, - RELY_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'rely_cstr'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class SQLUniqueConstraint - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLE_DB = 1 - TABLE_NAME = 2 - COLUMN_NAME = 3 - KEY_SEQ = 4 - UK_NAME = 5 - ENABLE_CSTR = 6 - VALIDATE_CSTR = 7 - RELY_CSTR = 8 - - FIELDS = { - TABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'table_db'}, - TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, - COLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'column_name'}, - KEY_SEQ => {:type => ::Thrift::Types::I32, :name => 'key_seq'}, - UK_NAME => {:type => ::Thrift::Types::STRING, :name => 'uk_name'}, - ENABLE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'enable_cstr'}, - VALIDATE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'validate_cstr'}, - RELY_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'rely_cstr'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class SQLNotNullConstraint - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLE_DB = 1 - TABLE_NAME = 2 - COLUMN_NAME = 3 - NN_NAME = 4 - ENABLE_CSTR = 5 - VALIDATE_CSTR = 6 - RELY_CSTR = 7 - - FIELDS = { - TABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'table_db'}, - TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, - COLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'column_name'}, - NN_NAME => {:type => ::Thrift::Types::STRING, :name => 'nn_name'}, - ENABLE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'enable_cstr'}, - VALIDATE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'validate_cstr'}, - RELY_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'rely_cstr'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class Type - include ::Thrift::Struct, ::Thrift::Struct_Union - NAME = 1 - TYPE1 = 2 - TYPE2 = 3 - FIELDS = 4 - - FIELDS = { - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class HiveObjectRef - include ::Thrift::Struct, ::Thrift::Struct_Union - OBJECTTYPE = 1 - DBNAME = 2 - OBJECTNAME = 3 - PARTVALUES = 4 - COLUMNNAME = 5 - - FIELDS = { - 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}}, - COLUMNNAME => {:type => ::Thrift::Types::STRING, :name => 'columnName'} - } - - def struct_fields; FIELDS; end - - def validate - unless @objectType.nil? || ::HiveObjectType::VALID_VALUES.include?(@objectType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field objectType!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class PrivilegeGrantInfo - include ::Thrift::Struct, ::Thrift::Struct_Union - PRIVILEGE = 1 - CREATETIME = 2 - GRANTOR = 3 - GRANTORTYPE = 4 - GRANTOPTION = 5 - - FIELDS = { - 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}, - GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption'} - } - - def struct_fields; FIELDS; end - - def validate - unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class HiveObjectPrivilege - include ::Thrift::Struct, ::Thrift::Struct_Union - HIVEOBJECT = 1 - PRINCIPALNAME = 2 - PRINCIPALTYPE = 3 - GRANTINFO = 4 - - FIELDS = { - 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} - } - - def struct_fields; FIELDS; end - - def validate - unless @principalType.nil? || ::PrincipalType::VALID_VALUES.include?(@principalType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principalType!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class PrivilegeBag - include ::Thrift::Struct, ::Thrift::Struct_Union - PRIVILEGES = 1 - - FIELDS = { - PRIVILEGES => {:type => ::Thrift::Types::LIST, :name => 'privileges', :element => {:type => ::Thrift::Types::STRUCT, :class => ::HiveObjectPrivilege}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class PrincipalPrivilegeSet - include ::Thrift::Struct, ::Thrift::Struct_Union - USERPRIVILEGES = 1 - GROUPPRIVILEGES = 2 - 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}}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class GrantRevokePrivilegeRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUESTTYPE = 1 - PRIVILEGES = 2 - REVOKEGRANTOPTION = 3 - - FIELDS = { - REQUESTTYPE => {:type => ::Thrift::Types::I32, :name => 'requestType', :enum_class => ::GrantRevokeType}, - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrivilegeBag}, - REVOKEGRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'revokeGrantOption', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - unless @requestType.nil? || ::GrantRevokeType::VALID_VALUES.include?(@requestType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field requestType!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class GrantRevokePrivilegeResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class Role - include ::Thrift::Struct, ::Thrift::Struct_Union - ROLENAME = 1 - CREATETIME = 2 - OWNERNAME = 3 - - FIELDS = { - ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'}, - CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, - OWNERNAME => {:type => ::Thrift::Types::STRING, :name => 'ownerName'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class RolePrincipalGrant - include ::Thrift::Struct, ::Thrift::Struct_Union - ROLENAME = 1 - PRINCIPALNAME = 2 - PRINCIPALTYPE = 3 - GRANTOPTION = 4 - GRANTTIME = 5 - GRANTORNAME = 6 - GRANTORPRINCIPALTYPE = 7 - - FIELDS = { - ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'}, - PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'}, - PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => ::PrincipalType}, - GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption'}, - GRANTTIME => {:type => ::Thrift::Types::I32, :name => 'grantTime'}, - GRANTORNAME => {:type => ::Thrift::Types::STRING, :name => 'grantorName'}, - GRANTORPRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorPrincipalType', :enum_class => ::PrincipalType} - } - - def struct_fields; FIELDS; end - - def validate - unless @principalType.nil? || ::PrincipalType::VALID_VALUES.include?(@principalType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principalType!') - end - unless @grantorPrincipalType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorPrincipalType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorPrincipalType!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class GetRoleGrantsForPrincipalRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - PRINCIPAL_NAME = 1 - PRINCIPAL_TYPE = 2 - - FIELDS = { - PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, - PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => ::PrincipalType} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field principal_name is unset!') unless @principal_name - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field principal_type is unset!') unless @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 - - ::Thrift::Struct.generate_accessors self -end - -class GetRoleGrantsForPrincipalResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - PRINCIPALGRANTS = 1 - - FIELDS = { - PRINCIPALGRANTS => {:type => ::Thrift::Types::LIST, :name => 'principalGrants', :element => {:type => ::Thrift::Types::STRUCT, :class => ::RolePrincipalGrant}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field principalGrants is unset!') unless @principalGrants - end - - ::Thrift::Struct.generate_accessors self -end - -class GetPrincipalsInRoleRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - ROLENAME = 1 - - FIELDS = { - ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field roleName is unset!') unless @roleName - end - - ::Thrift::Struct.generate_accessors self -end - -class GetPrincipalsInRoleResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - PRINCIPALGRANTS = 1 - - FIELDS = { - PRINCIPALGRANTS => {:type => ::Thrift::Types::LIST, :name => 'principalGrants', :element => {:type => ::Thrift::Types::STRUCT, :class => ::RolePrincipalGrant}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field principalGrants is unset!') unless @principalGrants - end - - ::Thrift::Struct.generate_accessors self -end - -class GrantRevokeRoleRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUESTTYPE = 1 - ROLENAME = 2 - PRINCIPALNAME = 3 - PRINCIPALTYPE = 4 - GRANTOR = 5 - GRANTORTYPE = 6 - GRANTOPTION = 7 - - FIELDS = { - REQUESTTYPE => {:type => ::Thrift::Types::I32, :name => 'requestType', :enum_class => ::GrantRevokeType}, - ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'}, - PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'}, - PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => ::PrincipalType}, - GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor', :optional => true}, - GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :optional => true, :enum_class => ::PrincipalType}, - GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - unless @requestType.nil? || ::GrantRevokeType::VALID_VALUES.include?(@requestType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field requestType!') - end - unless @principalType.nil? || ::PrincipalType::VALID_VALUES.include?(@principalType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principalType!') - end - unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class GrantRevokeRoleResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class Database - include ::Thrift::Struct, ::Thrift::Struct_Union - NAME = 1 - DESCRIPTION = 2 - LOCATIONURI = 3 - PARAMETERS = 4 - PRIVILEGES = 5 - OWNERNAME = 6 - OWNERTYPE = 7 - - FIELDS = { - NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, - 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}, - OWNERNAME => {:type => ::Thrift::Types::STRING, :name => 'ownerName', :optional => true}, - OWNERTYPE => {:type => ::Thrift::Types::I32, :name => 'ownerType', :optional => true, :enum_class => ::PrincipalType} - } - - def struct_fields; FIELDS; end - - def validate - unless @ownerType.nil? || ::PrincipalType::VALID_VALUES.include?(@ownerType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field ownerType!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class SerDeInfo - include ::Thrift::Struct, ::Thrift::Struct_Union - NAME = 1 - SERIALIZATIONLIB = 2 - PARAMETERS = 3 - - FIELDS = { - NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, - SERIALIZATIONLIB => {:type => ::Thrift::Types::STRING, :name => 'serializationLib'}, - PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class Order - include ::Thrift::Struct, ::Thrift::Struct_Union - COL = 1 - ORDER = 2 - - FIELDS = { - COL => {:type => ::Thrift::Types::STRING, :name => 'col'}, - ORDER => {:type => ::Thrift::Types::I32, :name => 'order'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class SkewedInfo - include ::Thrift::Struct, ::Thrift::Struct_Union - SKEWEDCOLNAMES = 1 - SKEWEDCOLVALUES = 2 - SKEWEDCOLVALUELOCATIONMAPS = 3 - - FIELDS = { - SKEWEDCOLNAMES => {:type => ::Thrift::Types::LIST, :name => 'skewedColNames', :element => {:type => ::Thrift::Types::STRING}}, - SKEWEDCOLVALUES => {:type => ::Thrift::Types::LIST, :name => 'skewedColValues', :element => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRING}}}, - SKEWEDCOLVALUELOCATIONMAPS => {:type => ::Thrift::Types::MAP, :name => 'skewedColValueLocationMaps', :key => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRING}}, :value => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class StorageDescriptor - include ::Thrift::Struct, ::Thrift::Struct_Union - COLS = 1 - LOCATION = 2 - INPUTFORMAT = 3 - OUTPUTFORMAT = 4 - COMPRESSED = 5 - NUMBUCKETS = 6 - SERDEINFO = 7 - BUCKETCOLS = 8 - SORTCOLS = 9 - PARAMETERS = 10 - SKEWEDINFO = 11 - STOREDASSUBDIRECTORIES = 12 - - FIELDS = { - 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}, - 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}}, - 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}, - STOREDASSUBDIRECTORIES => {:type => ::Thrift::Types::BOOL, :name => 'storedAsSubDirectories', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class Table - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - DBNAME = 2 - OWNER = 3 - CREATETIME = 4 - LASTACCESSTIME = 5 - RETENTION = 6 - SD = 7 - PARTITIONKEYS = 8 - PARAMETERS = 9 - VIEWORIGINALTEXT = 10 - VIEWEXPANDEDTEXT = 11 - TABLETYPE = 12 - PRIVILEGES = 13 - TEMPORARY = 14 - REWRITEENABLED = 15 - - FIELDS = { - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - OWNER => {:type => ::Thrift::Types::STRING, :name => 'owner'}, - 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}}, - 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}, - TEMPORARY => {:type => ::Thrift::Types::BOOL, :name => 'temporary', :default => false, :optional => true}, - REWRITEENABLED => {:type => ::Thrift::Types::BOOL, :name => 'rewriteEnabled', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class Partition - include ::Thrift::Struct, ::Thrift::Struct_Union - VALUES = 1 - DBNAME = 2 - TABLENAME = 3 - CREATETIME = 4 - LASTACCESSTIME = 5 - SD = 6 - PARAMETERS = 7 - PRIVILEGES = 8 - - FIELDS = { - VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}}, - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - 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}, - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class PartitionWithoutSD - include ::Thrift::Struct, ::Thrift::Struct_Union - VALUES = 1 - CREATETIME = 2 - LASTACCESSTIME = 3 - RELATIVEPATH = 4 - PARAMETERS = 5 - PRIVILEGES = 6 - - FIELDS = { - VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}}, - CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, - LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, - RELATIVEPATH => {:type => ::Thrift::Types::STRING, :name => 'relativePath'}, - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class PartitionSpecWithSharedSD - include ::Thrift::Struct, ::Thrift::Struct_Union - PARTITIONS = 1 - SD = 2 - - FIELDS = { - PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::PartitionWithoutSD}}, - SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => ::StorageDescriptor} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class PartitionListComposingSpec - include ::Thrift::Struct, ::Thrift::Struct_Union - PARTITIONS = 1 - - FIELDS = { - PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class PartitionSpec - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TABLENAME = 2 - ROOTPATH = 3 - SHAREDSDPARTITIONSPEC = 4 - PARTITIONLIST = 5 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, - ROOTPATH => {:type => ::Thrift::Types::STRING, :name => 'rootPath'}, - SHAREDSDPARTITIONSPEC => {:type => ::Thrift::Types::STRUCT, :name => 'sharedSDPartitionSpec', :class => ::PartitionSpecWithSharedSD, :optional => true}, - PARTITIONLIST => {:type => ::Thrift::Types::STRUCT, :name => 'partitionList', :class => ::PartitionListComposingSpec, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class Index - include ::Thrift::Struct, ::Thrift::Struct_Union - INDEXNAME = 1 - INDEXHANDLERCLASS = 2 - DBNAME = 3 - ORIGTABLENAME = 4 - CREATETIME = 5 - LASTACCESSTIME = 6 - INDEXTABLENAME = 7 - SD = 8 - PARAMETERS = 9 - DEFERREDREBUILD = 10 - - FIELDS = { - INDEXNAME => {:type => ::Thrift::Types::STRING, :name => 'indexName'}, - INDEXHANDLERCLASS => {:type => ::Thrift::Types::STRING, :name => 'indexHandlerClass'}, - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - ORIGTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'origTableName'}, - 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}, - PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - DEFERREDREBUILD => {:type => ::Thrift::Types::BOOL, :name => 'deferredRebuild'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class BooleanColumnStatsData - include ::Thrift::Struct, ::Thrift::Struct_Union - NUMTRUES = 1 - NUMFALSES = 2 - NUMNULLS = 3 - BITVECTORS = 4 - - FIELDS = { - NUMTRUES => {:type => ::Thrift::Types::I64, :name => 'numTrues'}, - NUMFALSES => {:type => ::Thrift::Types::I64, :name => 'numFalses'}, - NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, - BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numTrues is unset!') unless @numTrues - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numFalses is unset!') unless @numFalses - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls - end - - ::Thrift::Struct.generate_accessors self -end - -class DoubleColumnStatsData - include ::Thrift::Struct, ::Thrift::Struct_Union - LOWVALUE = 1 - HIGHVALUE = 2 - NUMNULLS = 3 - NUMDVS = 4 - BITVECTORS = 5 - - FIELDS = { - LOWVALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'lowValue', :optional => true}, - HIGHVALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'highValue', :optional => true}, - NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, - NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}, - BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs - end - - ::Thrift::Struct.generate_accessors self -end - -class LongColumnStatsData - include ::Thrift::Struct, ::Thrift::Struct_Union - LOWVALUE = 1 - HIGHVALUE = 2 - NUMNULLS = 3 - NUMDVS = 4 - BITVECTORS = 5 - - FIELDS = { - LOWVALUE => {:type => ::Thrift::Types::I64, :name => 'lowValue', :optional => true}, - HIGHVALUE => {:type => ::Thrift::Types::I64, :name => 'highValue', :optional => true}, - NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, - NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}, - BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs - end - - ::Thrift::Struct.generate_accessors self -end - -class StringColumnStatsData - include ::Thrift::Struct, ::Thrift::Struct_Union - MAXCOLLEN = 1 - AVGCOLLEN = 2 - NUMNULLS = 3 - NUMDVS = 4 - BITVECTORS = 5 - - FIELDS = { - MAXCOLLEN => {:type => ::Thrift::Types::I64, :name => 'maxColLen'}, - AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'}, - NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, - NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}, - BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxColLen is unset!') unless @maxColLen - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field avgColLen is unset!') unless @avgColLen - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs - end - - ::Thrift::Struct.generate_accessors self -end - -class BinaryColumnStatsData - include ::Thrift::Struct, ::Thrift::Struct_Union - MAXCOLLEN = 1 - AVGCOLLEN = 2 - NUMNULLS = 3 - BITVECTORS = 4 - - FIELDS = { - MAXCOLLEN => {:type => ::Thrift::Types::I64, :name => 'maxColLen'}, - AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'}, - NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, - BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxColLen is unset!') unless @maxColLen - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field avgColLen is unset!') unless @avgColLen - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls - end - - ::Thrift::Struct.generate_accessors self -end - -class Decimal - include ::Thrift::Struct, ::Thrift::Struct_Union - UNSCALED = 1 - SCALE = 3 - - FIELDS = { - UNSCALED => {:type => ::Thrift::Types::STRING, :name => 'unscaled', :binary => true}, - SCALE => {:type => ::Thrift::Types::I16, :name => 'scale'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field unscaled is unset!') unless @unscaled - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field scale is unset!') unless @scale - end - - ::Thrift::Struct.generate_accessors self -end - -class DecimalColumnStatsData - include ::Thrift::Struct, ::Thrift::Struct_Union - LOWVALUE = 1 - HIGHVALUE = 2 - NUMNULLS = 3 - NUMDVS = 4 - BITVECTORS = 5 - - FIELDS = { - LOWVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'lowValue', :class => ::Decimal, :optional => true}, - HIGHVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'highValue', :class => ::Decimal, :optional => true}, - NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, - NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}, - BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs - end - - ::Thrift::Struct.generate_accessors self -end - -class Date - include ::Thrift::Struct, ::Thrift::Struct_Union - DAYSSINCEEPOCH = 1 - - FIELDS = { - DAYSSINCEEPOCH => {:type => ::Thrift::Types::I64, :name => 'daysSinceEpoch'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field daysSinceEpoch is unset!') unless @daysSinceEpoch - end - - ::Thrift::Struct.generate_accessors self -end - -class DateColumnStatsData - include ::Thrift::Struct, ::Thrift::Struct_Union - LOWVALUE = 1 - HIGHVALUE = 2 - NUMNULLS = 3 - NUMDVS = 4 - BITVECTORS = 5 - - FIELDS = { - LOWVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'lowValue', :class => ::Date, :optional => true}, - HIGHVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'highValue', :class => ::Date, :optional => true}, - NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, - NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}, - BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs - end - - ::Thrift::Struct.generate_accessors self -end - -class ColumnStatisticsData < ::Thrift::Union - include ::Thrift::Struct_Union - class << self - def booleanStats(val) - ColumnStatisticsData.new(:booleanStats, val) - end - - def longStats(val) - ColumnStatisticsData.new(:longStats, val) - end - - def doubleStats(val) - ColumnStatisticsData.new(:doubleStats, val) - end - - def stringStats(val) - ColumnStatisticsData.new(:stringStats, val) - end - - def binaryStats(val) - ColumnStatisticsData.new(:binaryStats, val) - end - - def decimalStats(val) - ColumnStatisticsData.new(:decimalStats, val) - end - - def dateStats(val) - ColumnStatisticsData.new(:dateStats, val) - end - end - - BOOLEANSTATS = 1 - LONGSTATS = 2 - DOUBLESTATS = 3 - STRINGSTATS = 4 - BINARYSTATS = 5 - DECIMALSTATS = 6 - DATESTATS = 7 - - FIELDS = { - BOOLEANSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'booleanStats', :class => ::BooleanColumnStatsData}, - LONGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'longStats', :class => ::LongColumnStatsData}, - DOUBLESTATS => {:type => ::Thrift::Types::STRUCT, :name => 'doubleStats', :class => ::DoubleColumnStatsData}, - STRINGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'stringStats', :class => ::StringColumnStatsData}, - BINARYSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'binaryStats', :class => ::BinaryColumnStatsData}, - DECIMALSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'decimalStats', :class => ::DecimalColumnStatsData}, - DATESTATS => {:type => ::Thrift::Types::STRUCT, :name => 'dateStats', :class => ::DateColumnStatsData} - } - - def struct_fields; FIELDS; end - - def validate - raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? - end - - ::Thrift::Union.generate_accessors self -end - -class ColumnStatisticsObj - include ::Thrift::Struct, ::Thrift::Struct_Union - COLNAME = 1 - COLTYPE = 2 - STATSDATA = 3 - - FIELDS = { - COLNAME => {:type => ::Thrift::Types::STRING, :name => 'colName'}, - COLTYPE => {:type => ::Thrift::Types::STRING, :name => 'colType'}, - STATSDATA => {:type => ::Thrift::Types::STRUCT, :name => 'statsData', :class => ::ColumnStatisticsData} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colName is unset!') unless @colName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colType is unset!') unless @colType - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsData is unset!') unless @statsData - end - - ::Thrift::Struct.generate_accessors self -end - -class ColumnStatisticsDesc - include ::Thrift::Struct, ::Thrift::Struct_Union - ISTBLLEVEL = 1 - DBNAME = 2 - TABLENAME = 3 - PARTNAME = 4 - LASTANALYZED = 5 - - FIELDS = { - ISTBLLEVEL => {:type => ::Thrift::Types::BOOL, :name => 'isTblLevel'}, - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, - PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partName', :optional => true}, - LASTANALYZED => {:type => ::Thrift::Types::I64, :name => 'lastAnalyzed', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isTblLevel is unset!') if @isTblLevel.nil? - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableName is unset!') unless @tableName - end - - ::Thrift::Struct.generate_accessors self -end - -class ColumnStatistics - include ::Thrift::Struct, ::Thrift::Struct_Union - STATSDESC = 1 - STATSOBJ = 2 - - FIELDS = { - STATSDESC => {:type => ::Thrift::Types::STRUCT, :name => 'statsDesc', :class => ::ColumnStatisticsDesc}, - STATSOBJ => {:type => ::Thrift::Types::LIST, :name => 'statsObj', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsDesc is unset!') unless @statsDesc - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsObj is unset!') unless @statsObj - end - - ::Thrift::Struct.generate_accessors self -end - -class AggrStats - include ::Thrift::Struct, ::Thrift::Struct_Union - COLSTATS = 1 - PARTSFOUND = 2 - - FIELDS = { - COLSTATS => {:type => ::Thrift::Types::LIST, :name => 'colStats', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}}, - PARTSFOUND => {:type => ::Thrift::Types::I64, :name => 'partsFound'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colStats is unset!') unless @colStats - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partsFound is unset!') unless @partsFound - end - - ::Thrift::Struct.generate_accessors self -end - -class SetPartitionsStatsRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - COLSTATS = 1 - NEEDMERGE = 2 - - FIELDS = { - COLSTATS => {:type => ::Thrift::Types::LIST, :name => 'colStats', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatistics}}, - NEEDMERGE => {:type => ::Thrift::Types::BOOL, :name => 'needMerge', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colStats is unset!') unless @colStats - end - - ::Thrift::Struct.generate_accessors self -end - -class Schema - include ::Thrift::Struct, ::Thrift::Struct_Union - FIELDSCHEMAS = 1 - PROPERTIES = 2 - - FIELDS = { - 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}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class EnvironmentContext - include ::Thrift::Struct, ::Thrift::Struct_Union - PROPERTIES = 1 - - FIELDS = { - PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class PrimaryKeysRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field db_name is unset!') unless @db_name - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tbl_name is unset!') unless @tbl_name - end - - ::Thrift::Struct.generate_accessors self -end - -class PrimaryKeysResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - PRIMARYKEYS = 1 - - FIELDS = { - PRIMARYKEYS => {:type => ::Thrift::Types::LIST, :name => 'primaryKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLPrimaryKey}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field primaryKeys is unset!') unless @primaryKeys - end - - ::Thrift::Struct.generate_accessors self -end - -class ForeignKeysRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - PARENT_DB_NAME = 1 - PARENT_TBL_NAME = 2 - FOREIGN_DB_NAME = 3 - FOREIGN_TBL_NAME = 4 - - FIELDS = { - PARENT_DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'parent_db_name'}, - PARENT_TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'parent_tbl_name'}, - FOREIGN_DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'foreign_db_name'}, - FOREIGN_TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'foreign_tbl_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class ForeignKeysResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - FOREIGNKEYS = 1 - - FIELDS = { - FOREIGNKEYS => {:type => ::Thrift::Types::LIST, :name => 'foreignKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLForeignKey}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field foreignKeys is unset!') unless @foreignKeys - end - - ::Thrift::Struct.generate_accessors self -end - -class UniqueConstraintsRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field db_name is unset!') unless @db_name - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tbl_name is unset!') unless @tbl_name - end - - ::Thrift::Struct.generate_accessors self -end - -class UniqueConstraintsResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - UNIQUECONSTRAINTS = 1 - - FIELDS = { - UNIQUECONSTRAINTS => {:type => ::Thrift::Types::LIST, :name => 'uniqueConstraints', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLUniqueConstraint}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field uniqueConstraints is unset!') unless @uniqueConstraints - end - - ::Thrift::Struct.generate_accessors self -end - -class NotNullConstraintsRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field db_name is unset!') unless @db_name - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tbl_name is unset!') unless @tbl_name - end - - ::Thrift::Struct.generate_accessors self -end - -class NotNullConstraintsResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - NOTNULLCONSTRAINTS = 1 - - FIELDS = { - NOTNULLCONSTRAINTS => {:type => ::Thrift::Types::LIST, :name => 'notNullConstraints', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLNotNullConstraint}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field notNullConstraints is unset!') unless @notNullConstraints - end - - ::Thrift::Struct.generate_accessors self -end - -class DropConstraintRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TABLENAME = 2 - CONSTRAINTNAME = 3 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'}, - CONSTRAINTNAME => {:type => ::Thrift::Types::STRING, :name => 'constraintname'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field constraintname is unset!') unless @constraintname - end - - ::Thrift::Struct.generate_accessors self -end - -class AddPrimaryKeyRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - PRIMARYKEYCOLS = 1 - - FIELDS = { - PRIMARYKEYCOLS => {:type => ::Thrift::Types::LIST, :name => 'primaryKeyCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLPrimaryKey}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field primaryKeyCols is unset!') unless @primaryKeyCols - end - - ::Thrift::Struct.generate_accessors self -end - -class AddForeignKeyRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - FOREIGNKEYCOLS = 1 - - FIELDS = { - FOREIGNKEYCOLS => {:type => ::Thrift::Types::LIST, :name => 'foreignKeyCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLForeignKey}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field foreignKeyCols is unset!') unless @foreignKeyCols - end - - ::Thrift::Struct.generate_accessors self -end - -class AddUniqueConstraintRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - UNIQUECONSTRAINTCOLS = 1 - - FIELDS = { - UNIQUECONSTRAINTCOLS => {:type => ::Thrift::Types::LIST, :name => 'uniqueConstraintCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLUniqueConstraint}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field uniqueConstraintCols is unset!') unless @uniqueConstraintCols - end - - ::Thrift::Struct.generate_accessors self -end - -class AddNotNullConstraintRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - NOTNULLCONSTRAINTCOLS = 1 - - FIELDS = { - NOTNULLCONSTRAINTCOLS => {:type => ::Thrift::Types::LIST, :name => 'notNullConstraintCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLNotNullConstraint}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field notNullConstraintCols is unset!') unless @notNullConstraintCols - end - - ::Thrift::Struct.generate_accessors self -end - -class PartitionsByExprResult - include ::Thrift::Struct, ::Thrift::Struct_Union - PARTITIONS = 1 - HASUNKNOWNPARTITIONS = 2 - - FIELDS = { - PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, - HASUNKNOWNPARTITIONS => {:type => ::Thrift::Types::BOOL, :name => 'hasUnknownPartitions'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partitions is unset!') unless @partitions - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hasUnknownPartitions is unset!') if @hasUnknownPartitions.nil? - end - - ::Thrift::Struct.generate_accessors self -end - -class PartitionsByExprRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBLNAME = 2 - EXPR = 3 - DEFAULTPARTITIONNAME = 4 - MAXPARTS = 5 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, - EXPR => {:type => ::Thrift::Types::STRING, :name => 'expr', :binary => true}, - DEFAULTPARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'defaultPartitionName', :optional => true}, - MAXPARTS => {:type => ::Thrift::Types::I16, :name => 'maxParts', :default => -1, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expr is unset!') unless @expr - end - - ::Thrift::Struct.generate_accessors self -end - -class TableStatsResult - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLESTATS = 1 - - FIELDS = { - TABLESTATS => {:type => ::Thrift::Types::LIST, :name => 'tableStats', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableStats is unset!') unless @tableStats - end - - ::Thrift::Struct.generate_accessors self -end - -class PartitionsStatsResult - include ::Thrift::Struct, ::Thrift::Struct_Union - PARTSTATS = 1 - - FIELDS = { - PARTSTATS => {:type => ::Thrift::Types::MAP, :name => 'partStats', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partStats is unset!') unless @partStats - end - - ::Thrift::Struct.generate_accessors self -end - -class TableStatsRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBLNAME = 2 - COLNAMES = 3 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, - COLNAMES => {:type => ::Thrift::Types::LIST, :name => 'colNames', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colNames is unset!') unless @colNames - end - - ::Thrift::Struct.generate_accessors self -end - -class PartitionsStatsRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBLNAME = 2 - COLNAMES = 3 - PARTNAMES = 4 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, - COLNAMES => {:type => ::Thrift::Types::LIST, :name => 'colNames', :element => {:type => ::Thrift::Types::STRING}}, - PARTNAMES => {:type => ::Thrift::Types::LIST, :name => 'partNames', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colNames is unset!') unless @colNames - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partNames is unset!') unless @partNames - end - - ::Thrift::Struct.generate_accessors self -end - -class AddPartitionsResult - include ::Thrift::Struct, ::Thrift::Struct_Union - PARTITIONS = 1 - - FIELDS = { - PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class AddPartitionsRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBLNAME = 2 - PARTS = 3 - IFNOTEXISTS = 4 - NEEDRESULT = 5 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, - PARTS => {:type => ::Thrift::Types::LIST, :name => 'parts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, - IFNOTEXISTS => {:type => ::Thrift::Types::BOOL, :name => 'ifNotExists'}, - NEEDRESULT => {:type => ::Thrift::Types::BOOL, :name => 'needResult', :default => true, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field parts is unset!') unless @parts - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field ifNotExists is unset!') if @ifNotExists.nil? - end - - ::Thrift::Struct.generate_accessors self -end - -class DropPartitionsResult - include ::Thrift::Struct, ::Thrift::Struct_Union - PARTITIONS = 1 - - FIELDS = { - PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class DropPartitionsExpr - include ::Thrift::Struct, ::Thrift::Struct_Union - EXPR = 1 - PARTARCHIVELEVEL = 2 - - FIELDS = { - EXPR => {:type => ::Thrift::Types::STRING, :name => 'expr', :binary => true}, - PARTARCHIVELEVEL => {:type => ::Thrift::Types::I32, :name => 'partArchiveLevel', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expr is unset!') unless @expr - end - - ::Thrift::Struct.generate_accessors self -end - -class RequestPartsSpec < ::Thrift::Union - include ::Thrift::Struct_Union - class << self - def names(val) - RequestPartsSpec.new(:names, val) - end - - def exprs(val) - RequestPartsSpec.new(:exprs, val) - end - end - - NAMES = 1 - EXPRS = 2 - - FIELDS = { - NAMES => {:type => ::Thrift::Types::LIST, :name => 'names', :element => {:type => ::Thrift::Types::STRING}}, - EXPRS => {:type => ::Thrift::Types::LIST, :name => 'exprs', :element => {:type => ::Thrift::Types::STRUCT, :class => ::DropPartitionsExpr}} - } - - def struct_fields; FIELDS; end - - def validate - raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? - end - - ::Thrift::Union.generate_accessors self -end - -class DropPartitionsRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBLNAME = 2 - PARTS = 3 - DELETEDATA = 4 - IFEXISTS = 5 - IGNOREPROTECTION = 6 - ENVIRONMENTCONTEXT = 7 - NEEDRESULT = 8 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, - PARTS => {:type => ::Thrift::Types::STRUCT, :name => 'parts', :class => ::RequestPartsSpec}, - DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData', :optional => true}, - IFEXISTS => {:type => ::Thrift::Types::BOOL, :name => 'ifExists', :default => true, :optional => true}, - IGNOREPROTECTION => {:type => ::Thrift::Types::BOOL, :name => 'ignoreProtection', :optional => true}, - ENVIRONMENTCONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environmentContext', :class => ::EnvironmentContext, :optional => true}, - NEEDRESULT => {:type => ::Thrift::Types::BOOL, :name => 'needResult', :default => true, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field parts is unset!') unless @parts - end - - ::Thrift::Struct.generate_accessors self -end - -class ResourceUri - include ::Thrift::Struct, ::Thrift::Struct_Union - RESOURCETYPE = 1 - URI = 2 - - FIELDS = { - RESOURCETYPE => {:type => ::Thrift::Types::I32, :name => 'resourceType', :enum_class => ::ResourceType}, - URI => {:type => ::Thrift::Types::STRING, :name => 'uri'} - } - - def struct_fields; FIELDS; end - - def validate - unless @resourceType.nil? || ::ResourceType::VALID_VALUES.include?(@resourceType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field resourceType!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class Function - include ::Thrift::Struct, ::Thrift::Struct_Union - FUNCTIONNAME = 1 - DBNAME = 2 - CLASSNAME = 3 - OWNERNAME = 4 - OWNERTYPE = 5 - CREATETIME = 6 - FUNCTIONTYPE = 7 - RESOURCEURIS = 8 - - FIELDS = { - FUNCTIONNAME => {:type => ::Thrift::Types::STRING, :name => 'functionName'}, - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - CLASSNAME => {:type => ::Thrift::Types::STRING, :name => 'className'}, - OWNERNAME => {:type => ::Thrift::Types::STRING, :name => 'ownerName'}, - OWNERTYPE => {:type => ::Thrift::Types::I32, :name => 'ownerType', :enum_class => ::PrincipalType}, - CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, - FUNCTIONTYPE => {:type => ::Thrift::Types::I32, :name => 'functionType', :enum_class => ::FunctionType}, - RESOURCEURIS => {:type => ::Thrift::Types::LIST, :name => 'resourceUris', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ResourceUri}} - } - - def struct_fields; FIELDS; end - - def validate - unless @ownerType.nil? || ::PrincipalType::VALID_VALUES.include?(@ownerType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field ownerType!') - end - unless @functionType.nil? || ::FunctionType::VALID_VALUES.include?(@functionType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field functionType!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class TxnInfo - include ::Thrift::Struct, ::Thrift::Struct_Union - ID = 1 - STATE = 2 - USER = 3 - HOSTNAME = 4 - AGENTINFO = 5 - HEARTBEATCOUNT = 6 - METAINFO = 7 - STARTEDTIME = 8 - LASTHEARTBEATTIME = 9 - - FIELDS = { - ID => {:type => ::Thrift::Types::I64, :name => 'id'}, - STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::TxnState}, - USER => {:type => ::Thrift::Types::STRING, :name => 'user'}, - HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'}, - AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :default => %q"Unknown", :optional => true}, - HEARTBEATCOUNT => {:type => ::Thrift::Types::I32, :name => 'heartbeatCount', :default => 0, :optional => true}, - METAINFO => {:type => ::Thrift::Types::STRING, :name => 'metaInfo', :optional => true}, - STARTEDTIME => {:type => ::Thrift::Types::I64, :name => 'startedTime', :optional => true}, - LASTHEARTBEATTIME => {:type => ::Thrift::Types::I64, :name => 'lastHeartbeatTime', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field user is unset!') unless @user - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostname is unset!') unless @hostname - unless @state.nil? || ::TxnState::VALID_VALUES.include?(@state) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class GetOpenTxnsInfoResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - TXN_HIGH_WATER_MARK = 1 - OPEN_TXNS = 2 - - FIELDS = { - TXN_HIGH_WATER_MARK => {:type => ::Thrift::Types::I64, :name => 'txn_high_water_mark'}, - OPEN_TXNS => {:type => ::Thrift::Types::LIST, :name => 'open_txns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::TxnInfo}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txn_high_water_mark is unset!') unless @txn_high_water_mark - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field open_txns is unset!') unless @open_txns - end - - ::Thrift::Struct.generate_accessors self -end - -class GetOpenTxnsResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - TXN_HIGH_WATER_MARK = 1 - OPEN_TXNS = 2 - MIN_OPEN_TXN = 3 - ABORTEDBITS = 4 - - FIELDS = { - TXN_HIGH_WATER_MARK => {:type => ::Thrift::Types::I64, :name => 'txn_high_water_mark'}, - OPEN_TXNS => {:type => ::Thrift::Types::LIST, :name => 'open_txns', :element => {:type => ::Thrift::Types::I64}}, - MIN_OPEN_TXN => {:type => ::Thrift::Types::I64, :name => 'min_open_txn', :optional => true}, - ABORTEDBITS => {:type => ::Thrift::Types::STRING, :name => 'abortedBits', :binary => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txn_high_water_mark is unset!') unless @txn_high_water_mark - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field open_txns is unset!') unless @open_txns - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field abortedBits is unset!') unless @abortedBits - end - - ::Thrift::Struct.generate_accessors self -end - -class OpenTxnRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - NUM_TXNS = 1 - USER = 2 - HOSTNAME = 3 - AGENTINFO = 4 - - FIELDS = { - NUM_TXNS => {:type => ::Thrift::Types::I32, :name => 'num_txns'}, - USER => {:type => ::Thrift::Types::STRING, :name => 'user'}, - HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'}, - AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :default => %q"Unknown", :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field num_txns is unset!') unless @num_txns - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field user is unset!') unless @user - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostname is unset!') unless @hostname - end - - ::Thrift::Struct.generate_accessors self -end - -class OpenTxnsResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - TXN_IDS = 1 - - FIELDS = { - TXN_IDS => {:type => ::Thrift::Types::LIST, :name => 'txn_ids', :element => {:type => ::Thrift::Types::I64}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txn_ids is unset!') unless @txn_ids - end - - ::Thrift::Struct.generate_accessors self -end - -class AbortTxnRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - TXNID = 1 - - FIELDS = { - TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnid is unset!') unless @txnid - end - - ::Thrift::Struct.generate_accessors self -end - -class AbortTxnsRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - TXN_IDS = 1 - - FIELDS = { - TXN_IDS => {:type => ::Thrift::Types::LIST, :name => 'txn_ids', :element => {:type => ::Thrift::Types::I64}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txn_ids is unset!') unless @txn_ids - end - - ::Thrift::Struct.generate_accessors self -end - -class CommitTxnRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - TXNID = 1 - - FIELDS = { - TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnid is unset!') unless @txnid - end - - ::Thrift::Struct.generate_accessors self -end - -class LockComponent - include ::Thrift::Struct, ::Thrift::Struct_Union - TYPE = 1 - LEVEL = 2 - DBNAME = 3 - TABLENAME = 4 - PARTITIONNAME = 5 - OPERATIONTYPE = 6 - ISACID = 7 - ISDYNAMICPARTITIONWRITE = 8 - - FIELDS = { - TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::LockType}, - LEVEL => {:type => ::Thrift::Types::I32, :name => 'level', :enum_class => ::LockLevel}, - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true}, - PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true}, - OPERATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'operationType', :default => 5, :optional => true, :enum_class => ::DataOperationType}, - ISACID => {:type => ::Thrift::Types::BOOL, :name => 'isAcid', :default => false, :optional => true}, - ISDYNAMICPARTITIONWRITE => {:type => ::Thrift::Types::BOOL, :name => 'isDynamicPartitionWrite', :default => false, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field level is unset!') unless @level - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname - unless @type.nil? || ::LockType::VALID_VALUES.include?(@type) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') - end - unless @level.nil? || ::LockLevel::VALID_VALUES.include?(@level) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field level!') - end - unless @operationType.nil? || ::DataOperationType::VALID_VALUES.include?(@operationType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationType!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class LockRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - COMPONENT = 1 - TXNID = 2 - USER = 3 - HOSTNAME = 4 - AGENTINFO = 5 - - FIELDS = { - COMPONENT => {:type => ::Thrift::Types::LIST, :name => 'component', :element => {:type => ::Thrift::Types::STRUCT, :class => ::LockComponent}}, - TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true}, - USER => {:type => ::Thrift::Types::STRING, :name => 'user'}, - HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'}, - AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :default => %q"Unknown", :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field component is unset!') unless @component - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field user is unset!') unless @user - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostname is unset!') unless @hostname - end - - ::Thrift::Struct.generate_accessors self -end - -class LockResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - LOCKID = 1 - STATE = 2 - - FIELDS = { - LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'}, - STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::LockState} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lockid is unset!') unless @lockid - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state - unless @state.nil? || ::LockState::VALID_VALUES.include?(@state) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class CheckLockRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - LOCKID = 1 - TXNID = 2 - ELAPSED_MS = 3 - - FIELDS = { - LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'}, - TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true}, - ELAPSED_MS => {:type => ::Thrift::Types::I64, :name => 'elapsed_ms', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lockid is unset!') unless @lockid - end - - ::Thrift::Struct.generate_accessors self -end - -class UnlockRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - LOCKID = 1 - - FIELDS = { - LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lockid is unset!') unless @lockid - end - - ::Thrift::Struct.generate_accessors self -end - -class ShowLocksRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TABLENAME = 2 - PARTNAME = 3 - ISEXTENDED = 4 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname', :optional => true}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true}, - PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partname', :optional => true}, - ISEXTENDED => {:type => ::Thrift::Types::BOOL, :name => 'isExtended', :default => false, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class ShowLocksResponseElement - include ::Thrift::Struct, ::Thrift::Struct_Union - LOCKID = 1 - DBNAME = 2 - TABLENAME = 3 - PARTNAME = 4 - STATE = 5 - TYPE = 6 - TXNID = 7 - LASTHEARTBEAT = 8 - ACQUIREDAT = 9 - USER = 10 - HOSTNAME = 11 - HEARTBEATCOUNT = 12 - AGENTINFO = 13 - BLOCKEDBYEXTID = 14 - BLOCKEDBYINTID = 15 - LOCKIDINTERNAL = 16 - - FIELDS = { - LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'}, - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true}, - PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partname', :optional => true}, - STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::LockState}, - TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::LockType}, - TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true}, - LASTHEARTBEAT => {:type => ::Thrift::Types::I64, :name => 'lastheartbeat'}, - ACQUIREDAT => {:type => ::Thrift::Types::I64, :name => 'acquiredat', :optional => true}, - USER => {:type => ::Thrift::Types::STRING, :name => 'user'}, - HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'}, - HEARTBEATCOUNT => {:type => ::Thrift::Types::I32, :name => 'heartbeatCount', :default => 0, :optional => true}, - AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :optional => true}, - BLOCKEDBYEXTID => {:type => ::Thrift::Types::I64, :name => 'blockedByExtId', :optional => true}, - BLOCKEDBYINTID => {:type => ::Thrift::Types::I64, :name => 'blockedByIntId', :optional => true}, - LOCKIDINTERNAL => {:type => ::Thrift::Types::I64, :name => 'lockIdInternal', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lockid is unset!') unless @lockid - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lastheartbeat is unset!') unless @lastheartbeat - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field user is unset!') unless @user - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostname is unset!') unless @hostname - unless @state.nil? || ::LockState::VALID_VALUES.include?(@state) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') - end - unless @type.nil? || ::LockType::VALID_VALUES.include?(@type) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class ShowLocksResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - LOCKS = 1 - - FIELDS = { - LOCKS => {:type => ::Thrift::Types::LIST, :name => 'locks', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ShowLocksResponseElement}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class HeartbeatRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - LOCKID = 1 - TXNID = 2 - - FIELDS = { - LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid', :optional => true}, - TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class HeartbeatTxnRangeRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - MIN = 1 - MAX = 2 - - FIELDS = { - MIN => {:type => ::Thrift::Types::I64, :name => 'min'}, - MAX => {:type => ::Thrift::Types::I64, :name => 'max'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field min is unset!') unless @min - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field max is unset!') unless @max - end - - ::Thrift::Struct.generate_accessors self -end - -class HeartbeatTxnRangeResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - ABORTED = 1 - NOSUCH = 2 - - FIELDS = { - ABORTED => {:type => ::Thrift::Types::SET, :name => 'aborted', :element => {:type => ::Thrift::Types::I64}}, - NOSUCH => {:type => ::Thrift::Types::SET, :name => 'nosuch', :element => {:type => ::Thrift::Types::I64}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field aborted is unset!') unless @aborted - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nosuch is unset!') unless @nosuch - end - - ::Thrift::Struct.generate_accessors self -end - -class CompactionRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TABLENAME = 2 - PARTITIONNAME = 3 - TYPE = 4 - RUNAS = 5 - PROPERTIES = 6 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'}, - PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true}, - TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::CompactionType}, - RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runas', :optional => true}, - PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type - unless @type.nil? || ::CompactionType::VALID_VALUES.include?(@type) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class CompactionResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - ID = 1 - STATE = 2 - ACCEPTED = 3 - - FIELDS = { - ID => {:type => ::Thrift::Types::I64, :name => 'id'}, - STATE => {:type => ::Thrift::Types::STRING, :name => 'state'}, - ACCEPTED => {:type => ::Thrift::Types::BOOL, :name => 'accepted'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field accepted is unset!') if @accepted.nil? - end - - ::Thrift::Struct.generate_accessors self -end - -class ShowCompactRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class ShowCompactResponseElement - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TABLENAME = 2 - PARTITIONNAME = 3 - TYPE = 4 - STATE = 5 - WORKERID = 6 - START = 7 - RUNAS = 8 - HIGHTESTTXNID = 9 - METAINFO = 10 - ENDTIME = 11 - HADOOPJOBID = 12 - ID = 13 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'}, - PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true}, - TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::CompactionType}, - STATE => {:type => ::Thrift::Types::STRING, :name => 'state'}, - WORKERID => {:type => ::Thrift::Types::STRING, :name => 'workerid', :optional => true}, - START => {:type => ::Thrift::Types::I64, :name => 'start', :optional => true}, - RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runAs', :optional => true}, - HIGHTESTTXNID => {:type => ::Thrift::Types::I64, :name => 'hightestTxnId', :optional => true}, - METAINFO => {:type => ::Thrift::Types::STRING, :name => 'metaInfo', :optional => true}, - ENDTIME => {:type => ::Thrift::Types::I64, :name => 'endTime', :optional => true}, - HADOOPJOBID => {:type => ::Thrift::Types::STRING, :name => 'hadoopJobId', :default => %q"None", :optional => true}, - ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state - unless @type.nil? || ::CompactionType::VALID_VALUES.include?(@type) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class ShowCompactResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - COMPACTS = 1 - - FIELDS = { - COMPACTS => {:type => ::Thrift::Types::LIST, :name => 'compacts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ShowCompactResponseElement}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field compacts is unset!') unless @compacts - end - - ::Thrift::Struct.generate_accessors self -end - -class AddDynamicPartitions - include ::Thrift::Struct, ::Thrift::Struct_Union - TXNID = 1 - DBNAME = 2 - TABLENAME = 3 - PARTITIONNAMES = 4 - OPERATIONTYPE = 5 - - FIELDS = { - TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid'}, - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'}, - PARTITIONNAMES => {:type => ::Thrift::Types::LIST, :name => 'partitionnames', :element => {:type => ::Thrift::Types::STRING}}, - OPERATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'operationType', :default => 5, :optional => true, :enum_class => ::DataOperationType} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnid is unset!') unless @txnid - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partitionnames is unset!') unless @partitionnames - unless @operationType.nil? || ::DataOperationType::VALID_VALUES.include?(@operationType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationType!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class NotificationEventRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - LASTEVENT = 1 - MAXEVENTS = 2 - - FIELDS = { - LASTEVENT => {:type => ::Thrift::Types::I64, :name => 'lastEvent'}, - MAXEVENTS => {:type => ::Thrift::Types::I32, :name => 'maxEvents', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lastEvent is unset!') unless @lastEvent - end - - ::Thrift::Struct.generate_accessors self -end - -class NotificationEvent - include ::Thrift::Struct, ::Thrift::Struct_Union - EVENTID = 1 - EVENTTIME = 2 - EVENTTYPE = 3 - DBNAME = 4 - TABLENAME = 5 - MESSAGE = 6 - MESSAGEFORMAT = 7 - - FIELDS = { - EVENTID => {:type => ::Thrift::Types::I64, :name => 'eventId'}, - EVENTTIME => {:type => ::Thrift::Types::I32, :name => 'eventTime'}, - EVENTTYPE => {:type => ::Thrift::Types::STRING, :name => 'eventType'}, - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName', :optional => true}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :optional => true}, - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}, - MESSAGEFORMAT => {:type => ::Thrift::Types::STRING, :name => 'messageFormat', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventId is unset!') unless @eventId - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventTime is unset!') unless @eventTime - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventType is unset!') unless @eventType - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field message is unset!') unless @message - end - - ::Thrift::Struct.generate_accessors self -end - -class NotificationEventResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - EVENTS = 1 - - FIELDS = { - EVENTS => {:type => ::Thrift::Types::LIST, :name => 'events', :element => {:type => ::Thrift::Types::STRUCT, :class => ::NotificationEvent}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field events is unset!') unless @events - end - - ::Thrift::Struct.generate_accessors self -end - -class CurrentNotificationEventId - include ::Thrift::Struct, ::Thrift::Struct_Union - EVENTID = 1 - - FIELDS = { - EVENTID => {:type => ::Thrift::Types::I64, :name => 'eventId'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventId is unset!') unless @eventId - end - - ::Thrift::Struct.generate_accessors self -end - -class InsertEventRequestData - include ::Thrift::Struct, ::Thrift::Struct_Union - REPLACE = 1 - FILESADDED = 2 - FILESADDEDCHECKSUM = 3 - - FIELDS = { - REPLACE => {:type => ::Thrift::Types::BOOL, :name => 'replace', :optional => true}, - FILESADDED => {:type => ::Thrift::Types::LIST, :name => 'filesAdded', :element => {:type => ::Thrift::Types::STRING}}, - FILESADDEDCHECKSUM => {:type => ::Thrift::Types::LIST, :name => 'filesAddedChecksum', :element => {:type => ::Thrift::Types::STRING}, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field filesAdded is unset!') unless @filesAdded - end - - ::Thrift::Struct.generate_accessors self -end - -class FireEventRequestData < ::Thrift::Union - include ::Thrift::Struct_Union - class << self - def insertData(val) - FireEventRequestData.new(:insertData, val) - end - end - - INSERTDATA = 1 - - FIELDS = { - INSERTDATA => {:type => ::Thrift::Types::STRUCT, :name => 'insertData', :class => ::InsertEventRequestData} - } - - def struct_fields; FIELDS; end - - def validate - raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? - end - - ::Thrift::Union.generate_accessors self -end - -class FireEventRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESSFUL = 1 - DATA = 2 - DBNAME = 3 - TABLENAME = 4 - PARTITIONVALS = 5 - - FIELDS = { - SUCCESSFUL => {:type => ::Thrift::Types::BOOL, :name => 'successful'}, - DATA => {:type => ::Thrift::Types::STRUCT, :name => 'data', :class => ::FireEventRequestData}, - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName', :optional => true}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :optional => true}, - PARTITIONVALS => {:type => ::Thrift::Types::LIST, :name => 'partitionVals', :element => {:type => ::Thrift::Types::STRING}, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field successful is unset!') if @successful.nil? - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field data is unset!') unless @data - end - - ::Thrift::Struct.generate_accessors self -end - -class FireEventResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class MetadataPpdResult - include ::Thrift::Struct, ::Thrift::Struct_Union - METADATA = 1 - INCLUDEBITSET = 2 - - FIELDS = { - METADATA => {:type => ::Thrift::Types::STRING, :name => 'metadata', :binary => true, :optional => true}, - INCLUDEBITSET => {:type => ::Thrift::Types::STRING, :name => 'includeBitset', :binary => true, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class GetFileMetadataByExprResult - include ::Thrift::Struct, ::Thrift::Struct_Union - METADATA = 1 - ISSUPPORTED = 2 - - FIELDS = { - METADATA => {:type => ::Thrift::Types::MAP, :name => 'metadata', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::MetadataPpdResult}}, - ISSUPPORTED => {:type => ::Thrift::Types::BOOL, :name => 'isSupported'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field metadata is unset!') unless @metadata - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isSupported is unset!') if @isSupported.nil? - end - - ::Thrift::Struct.generate_accessors self -end - -class GetFileMetadataByExprRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - FILEIDS = 1 - EXPR = 2 - DOGETFOOTERS = 3 - TYPE = 4 - - FIELDS = { - FILEIDS => {:type => ::Thrift::Types::LIST, :name => 'fileIds', :element => {:type => ::Thrift::Types::I64}}, - EXPR => {:type => ::Thrift::Types::STRING, :name => 'expr', :binary => true}, - DOGETFOOTERS => {:type => ::Thrift::Types::BOOL, :name => 'doGetFooters', :optional => true}, - TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :optional => true, :enum_class => ::FileMetadataExprType} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileIds is unset!') unless @fileIds - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expr is unset!') unless @expr - unless @type.nil? || ::FileMetadataExprType::VALID_VALUES.include?(@type) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class GetFileMetadataResult - include ::Thrift::Struct, ::Thrift::Struct_Union - METADATA = 1 - ISSUPPORTED = 2 - - FIELDS = { - METADATA => {:type => ::Thrift::Types::MAP, :name => 'metadata', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::STRING, :binary => true}}, - ISSUPPORTED => {:type => ::Thrift::Types::BOOL, :name => 'isSupported'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field metadata is unset!') unless @metadata - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isSupported is unset!') if @isSupported.nil? - end - - ::Thrift::Struct.generate_accessors self -end - -class GetFileMetadataRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - FILEIDS = 1 - - FIELDS = { - FILEIDS => {:type => ::Thrift::Types::LIST, :name => 'fileIds', :element => {:type => ::Thrift::Types::I64}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileIds is unset!') unless @fileIds - end - - ::Thrift::Struct.generate_accessors self -end - -class PutFileMetadataResult - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class PutFileMetadataRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - FILEIDS = 1 - METADATA = 2 - TYPE = 3 - - FIELDS = { - FILEIDS => {:type => ::Thrift::Types::LIST, :name => 'fileIds', :element => {:type => ::Thrift::Types::I64}}, - METADATA => {:type => ::Thrift::Types::LIST, :name => 'metadata', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, - TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :optional => true, :enum_class => ::FileMetadataExprType} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileIds is unset!') unless @fileIds - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field metadata is unset!') unless @metadata - unless @type.nil? || ::FileMetadataExprType::VALID_VALUES.include?(@type) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') - end - end - - ::Thrift::Struct.generate_accessors self -end - -class ClearFileMetadataResult - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class ClearFileMetadataRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - FILEIDS = 1 - - FIELDS = { - FILEIDS => {:type => ::Thrift::Types::LIST, :name => 'fileIds', :element => {:type => ::Thrift::Types::I64}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileIds is unset!') unless @fileIds - end - - ::Thrift::Struct.generate_accessors self -end - -class CacheFileMetadataResult - include ::Thrift::Struct, ::Thrift::Struct_Union - ISSUPPORTED = 1 - - FIELDS = { - ISSUPPORTED => {:type => ::Thrift::Types::BOOL, :name => 'isSupported'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isSupported is unset!') if @isSupported.nil? - end - - ::Thrift::Struct.generate_accessors self -end - -class CacheFileMetadataRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBLNAME = 2 - PARTNAME = 3 - ISALLPARTS = 4 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, - PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partName', :optional => true}, - ISALLPARTS => {:type => ::Thrift::Types::BOOL, :name => 'isAllParts', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName - end - - ::Thrift::Struct.generate_accessors self -end - -class GetAllFunctionsResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - FUNCTIONS = 1 - - FIELDS = { - FUNCTIONS => {:type => ::Thrift::Types::LIST, :name => 'functions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Function}, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class ClientCapabilities - include ::Thrift::Struct, ::Thrift::Struct_Union - VALUES = 1 - - FIELDS = { - VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::I32, :enum_class => ::ClientCapability}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field values is unset!') unless @values - end - - ::Thrift::Struct.generate_accessors self -end - -class GetTableRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBLNAME = 2 - CAPABILITIES = 3 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, - CAPABILITIES => {:type => ::Thrift::Types::STRUCT, :name => 'capabilities', :class => ::ClientCapabilities, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName - end - - ::Thrift::Struct.generate_accessors self -end - -class GetTableResult - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLE = 1 - - FIELDS = { - TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'table', :class => ::Table} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table is unset!') unless @table - end - - ::Thrift::Struct.generate_accessors self -end - -class GetTablesRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBLNAMES = 2 - CAPABILITIES = 3 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - TBLNAMES => {:type => ::Thrift::Types::LIST, :name => 'tblNames', :element => {:type => ::Thrift::Types::STRING}, :optional => true}, - CAPABILITIES => {:type => ::Thrift::Types::STRUCT, :name => 'capabilities', :class => ::ClientCapabilities, :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName - end - - ::Thrift::Struct.generate_accessors self -end - -class GetTablesResult - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLES = 1 - - FIELDS = { - TABLES => {:type => ::Thrift::Types::LIST, :name => 'tables', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Table}} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tables is unset!') unless @tables - end - - ::Thrift::Struct.generate_accessors self -end - -class CmRecycleRequest - include ::Thrift::Struct, ::Thrift::Struct_Union - DATAPATH = 1 - PURGE = 2 - - FIELDS = { - DATAPATH => {:type => ::Thrift::Types::STRING, :name => 'dataPath'}, - PURGE => {:type => ::Thrift::Types::BOOL, :name => 'purge'} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dataPath is unset!') unless @dataPath - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field purge is unset!') if @purge.nil? - end - - ::Thrift::Struct.generate_accessors self -end - -class CmRecycleResponse - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class TableMeta - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TABLENAME = 2 - TABLETYPE = 3 - COMMENTS = 4 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, - TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'}, - COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments', :optional => true} - } - - def struct_fields; FIELDS; end - - def validate - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableName is unset!') unless @tableName - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableType is unset!') unless @tableType - end - - ::Thrift::Struct.generate_accessors self -end - -class MetaException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class UnknownTableException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class UnknownDBException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class AlreadyExistsException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class InvalidPartitionException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class UnknownPartitionException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class InvalidObjectException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class NoSuchObjectException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class IndexAlreadyExistsException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class InvalidOperationException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class ConfigValSecurityException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class InvalidInputException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class NoSuchTxnException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class TxnAbortedException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class TxnOpenException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - -class NoSuchLockException < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end - - MESSAGE = 1 - - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self -end - diff --git metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb deleted file mode 100644 index cfe08f6..0000000 --- metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb +++ /dev/null @@ -1,10618 +0,0 @@ -# -# Autogenerated by Thrift Compiler (0.9.3) -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -require 'thrift' -require 'facebook_service' -require 'hive_metastore_types' - -module ThriftHiveMetastore - class Client < ::FacebookService::Client - include ::Thrift::Client - - def getMetaConf(key) - send_getMetaConf(key) - return recv_getMetaConf() - end - - def send_getMetaConf(key) - send_message('getMetaConf', GetMetaConf_args, :key => key) - end - - def recv_getMetaConf() - result = receive_message(GetMetaConf_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getMetaConf failed: unknown result') - end - - def setMetaConf(key, value) - send_setMetaConf(key, value) - recv_setMetaConf() - end - - def send_setMetaConf(key, value) - send_message('setMetaConf', SetMetaConf_args, :key => key, :value => value) - end - - def recv_setMetaConf() - result = receive_message(SetMetaConf_result) - raise result.o1 unless result.o1.nil? - return - end - - def create_database(database) - send_create_database(database) - recv_create_database() - end - - def send_create_database(database) - send_message('create_database', Create_database_args, :database => database) - end - - def recv_create_database() - result = receive_message(Create_database_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - return - end - - def get_database(name) - send_get_database(name) - return recv_get_database() - end - - def send_get_database(name) - send_message('get_database', Get_database_args, :name => name) - end - - def recv_get_database() - result = receive_message(Get_database_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_database failed: unknown result') - end - - def drop_database(name, deleteData, cascade) - send_drop_database(name, deleteData, cascade) - recv_drop_database() - end - - def send_drop_database(name, deleteData, cascade) - send_message('drop_database', Drop_database_args, :name => name, :deleteData => deleteData, :cascade => cascade) - end - - def recv_drop_database() - result = receive_message(Drop_database_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - return - end - - def get_databases(pattern) - send_get_databases(pattern) - return recv_get_databases() - end - - def send_get_databases(pattern) - send_message('get_databases', Get_databases_args, :pattern => pattern) - end - - def recv_get_databases() - result = receive_message(Get_databases_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_databases failed: unknown result') - end - - def get_all_databases() - send_get_all_databases() - return recv_get_all_databases() - end - - def send_get_all_databases() - send_message('get_all_databases', Get_all_databases_args) - end - - def recv_get_all_databases() - result = receive_message(Get_all_databases_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_databases failed: unknown result') - end - - def alter_database(dbname, db) - send_alter_database(dbname, db) - recv_alter_database() - end - - def send_alter_database(dbname, db) - send_message('alter_database', Alter_database_args, :dbname => dbname, :db => db) - end - - def recv_alter_database() - result = receive_message(Alter_database_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def get_type(name) - send_get_type(name) - return recv_get_type() - end - - def send_get_type(name) - send_message('get_type', Get_type_args, :name => name) - end - - def recv_get_type() - result = receive_message(Get_type_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_type failed: unknown result') - end - - def create_type(type) - send_create_type(type) - return recv_create_type() - end - - def send_create_type(type) - send_message('create_type', Create_type_args, :type => type) - end - - def recv_create_type() - result = receive_message(Create_type_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'create_type failed: unknown result') - end - - def drop_type(type) - send_drop_type(type) - return recv_drop_type() - end - - def send_drop_type(type) - send_message('drop_type', Drop_type_args, :type => type) - end - - def recv_drop_type() - result = receive_message(Drop_type_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_type failed: unknown result') - end - - def get_type_all(name) - send_get_type_all(name) - return recv_get_type_all() - end - - def send_get_type_all(name) - send_message('get_type_all', Get_type_all_args, :name => name) - end - - def recv_get_type_all() - result = receive_message(Get_type_all_result) - return result.success unless result.success.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_type_all failed: unknown result') - end - - def get_fields(db_name, table_name) - send_get_fields(db_name, table_name) - return recv_get_fields() - end - - def send_get_fields(db_name, table_name) - send_message('get_fields', Get_fields_args, :db_name => db_name, :table_name => table_name) - end - - def recv_get_fields() - result = receive_message(Get_fields_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_fields failed: unknown result') - end - - def get_fields_with_environment_context(db_name, table_name, environment_context) - send_get_fields_with_environment_context(db_name, table_name, environment_context) - return recv_get_fields_with_environment_context() - end - - def send_get_fields_with_environment_context(db_name, table_name, environment_context) - send_message('get_fields_with_environment_context', Get_fields_with_environment_context_args, :db_name => db_name, :table_name => table_name, :environment_context => environment_context) - end - - def recv_get_fields_with_environment_context() - result = receive_message(Get_fields_with_environment_context_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_fields_with_environment_context failed: unknown result') - end - - def get_schema(db_name, table_name) - send_get_schema(db_name, table_name) - return recv_get_schema() - end - - def send_get_schema(db_name, table_name) - send_message('get_schema', Get_schema_args, :db_name => db_name, :table_name => table_name) - end - - def recv_get_schema() - result = receive_message(Get_schema_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_schema failed: unknown result') - end - - def get_schema_with_environment_context(db_name, table_name, environment_context) - send_get_schema_with_environment_context(db_name, table_name, environment_context) - return recv_get_schema_with_environment_context() - end - - def send_get_schema_with_environment_context(db_name, table_name, environment_context) - send_message('get_schema_with_environment_context', Get_schema_with_environment_context_args, :db_name => db_name, :table_name => table_name, :environment_context => environment_context) - end - - def recv_get_schema_with_environment_context() - result = receive_message(Get_schema_with_environment_context_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_schema_with_environment_context failed: unknown result') - end - - def create_table(tbl) - send_create_table(tbl) - recv_create_table() - end - - def send_create_table(tbl) - send_message('create_table', Create_table_args, :tbl => tbl) - end - - def recv_create_table() - result = receive_message(Create_table_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - return - end - - def create_table_with_environment_context(tbl, environment_context) - send_create_table_with_environment_context(tbl, environment_context) - recv_create_table_with_environment_context() - end - - def send_create_table_with_environment_context(tbl, environment_context) - send_message('create_table_with_environment_context', Create_table_with_environment_context_args, :tbl => tbl, :environment_context => environment_context) - end - - def recv_create_table_with_environment_context() - result = receive_message(Create_table_with_environment_context_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - return - end - - def create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints) - send_create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints) - recv_create_table_with_constraints() - end - - def send_create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints) - send_message('create_table_with_constraints', Create_table_with_constraints_args, :tbl => tbl, :primaryKeys => primaryKeys, :foreignKeys => foreignKeys, :uniqueConstraints => uniqueConstraints, :notNullConstraints => notNullConstraints) - end - - def recv_create_table_with_constraints() - result = receive_message(Create_table_with_constraints_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - return - end - - def drop_constraint(req) - send_drop_constraint(req) - recv_drop_constraint() - end - - def send_drop_constraint(req) - send_message('drop_constraint', Drop_constraint_args, :req => req) - end - - def recv_drop_constraint() - result = receive_message(Drop_constraint_result) - raise result.o1 unless result.o1.nil? - raise result.o3 unless result.o3.nil? - return - end - - def add_primary_key(req) - send_add_primary_key(req) - recv_add_primary_key() - end - - def send_add_primary_key(req) - send_message('add_primary_key', Add_primary_key_args, :req => req) - end - - def recv_add_primary_key() - result = receive_message(Add_primary_key_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def add_foreign_key(req) - send_add_foreign_key(req) - recv_add_foreign_key() - end - - def send_add_foreign_key(req) - send_message('add_foreign_key', Add_foreign_key_args, :req => req) - end - - def recv_add_foreign_key() - result = receive_message(Add_foreign_key_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def add_unique_constraint(req) - send_add_unique_constraint(req) - recv_add_unique_constraint() - end - - def send_add_unique_constraint(req) - send_message('add_unique_constraint', Add_unique_constraint_args, :req => req) - end - - def recv_add_unique_constraint() - result = receive_message(Add_unique_constraint_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def add_not_null_constraint(req) - send_add_not_null_constraint(req) - recv_add_not_null_constraint() - end - - def send_add_not_null_constraint(req) - send_message('add_not_null_constraint', Add_not_null_constraint_args, :req => req) - end - - def recv_add_not_null_constraint() - result = receive_message(Add_not_null_constraint_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def drop_table(dbname, name, deleteData) - send_drop_table(dbname, name, deleteData) - recv_drop_table() - end - - def send_drop_table(dbname, name, deleteData) - send_message('drop_table', Drop_table_args, :dbname => dbname, :name => name, :deleteData => deleteData) - end - - def recv_drop_table() - result = receive_message(Drop_table_result) - raise result.o1 unless result.o1.nil? - raise result.o3 unless result.o3.nil? - return - end - - def drop_table_with_environment_context(dbname, name, deleteData, environment_context) - send_drop_table_with_environment_context(dbname, name, deleteData, environment_context) - recv_drop_table_with_environment_context() - end - - def send_drop_table_with_environment_context(dbname, name, deleteData, environment_context) - send_message('drop_table_with_environment_context', Drop_table_with_environment_context_args, :dbname => dbname, :name => name, :deleteData => deleteData, :environment_context => environment_context) - end - - def recv_drop_table_with_environment_context() - result = receive_message(Drop_table_with_environment_context_result) - raise result.o1 unless result.o1.nil? - raise result.o3 unless result.o3.nil? - return - end - - def truncate_table(dbName, tableName, partNames) - send_truncate_table(dbName, tableName, partNames) - recv_truncate_table() - end - - def send_truncate_table(dbName, tableName, partNames) - send_message('truncate_table', Truncate_table_args, :dbName => dbName, :tableName => tableName, :partNames => partNames) - end - - def recv_truncate_table() - result = receive_message(Truncate_table_result) - raise result.o1 unless result.o1.nil? - return - end - - def get_tables(db_name, pattern) - send_get_tables(db_name, pattern) - return recv_get_tables() - end - - def send_get_tables(db_name, pattern) - send_message('get_tables', Get_tables_args, :db_name => db_name, :pattern => pattern) - end - - def recv_get_tables() - result = receive_message(Get_tables_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_tables failed: unknown result') - end - - def get_tables_by_type(db_name, pattern, tableType) - send_get_tables_by_type(db_name, pattern, tableType) - return recv_get_tables_by_type() - end - - def send_get_tables_by_type(db_name, pattern, tableType) - send_message('get_tables_by_type', Get_tables_by_type_args, :db_name => db_name, :pattern => pattern, :tableType => tableType) - end - - def recv_get_tables_by_type() - result = receive_message(Get_tables_by_type_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_tables_by_type failed: unknown result') - end - - def get_table_meta(db_patterns, tbl_patterns, tbl_types) - send_get_table_meta(db_patterns, tbl_patterns, tbl_types) - return recv_get_table_meta() - end - - def send_get_table_meta(db_patterns, tbl_patterns, tbl_types) - send_message('get_table_meta', Get_table_meta_args, :db_patterns => db_patterns, :tbl_patterns => tbl_patterns, :tbl_types => tbl_types) - end - - def recv_get_table_meta() - result = receive_message(Get_table_meta_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_meta failed: unknown result') - end - - def get_all_tables(db_name) - send_get_all_tables(db_name) - return recv_get_all_tables() - end - - def send_get_all_tables(db_name) - send_message('get_all_tables', Get_all_tables_args, :db_name => db_name) - end - - def recv_get_all_tables() - result = receive_message(Get_all_tables_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_tables failed: unknown result') - end - - def get_table(dbname, tbl_name) - send_get_table(dbname, tbl_name) - return recv_get_table() - end - - def send_get_table(dbname, tbl_name) - send_message('get_table', Get_table_args, :dbname => dbname, :tbl_name => tbl_name) - end - - def recv_get_table() - result = receive_message(Get_table_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table failed: unknown result') - end - - def get_table_objects_by_name(dbname, tbl_names) - send_get_table_objects_by_name(dbname, tbl_names) - return recv_get_table_objects_by_name() - end - - def send_get_table_objects_by_name(dbname, tbl_names) - send_message('get_table_objects_by_name', Get_table_objects_by_name_args, :dbname => dbname, :tbl_names => tbl_names) - end - - def recv_get_table_objects_by_name() - result = receive_message(Get_table_objects_by_name_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_objects_by_name failed: unknown result') - end - - def get_table_req(req) - send_get_table_req(req) - return recv_get_table_req() - end - - def send_get_table_req(req) - send_message('get_table_req', Get_table_req_args, :req => req) - end - - def recv_get_table_req() - result = receive_message(Get_table_req_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_req failed: unknown result') - end - - def get_table_objects_by_name_req(req) - send_get_table_objects_by_name_req(req) - return recv_get_table_objects_by_name_req() - end - - def send_get_table_objects_by_name_req(req) - send_message('get_table_objects_by_name_req', Get_table_objects_by_name_req_args, :req => req) - end - - def recv_get_table_objects_by_name_req() - result = receive_message(Get_table_objects_by_name_req_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_objects_by_name_req failed: unknown result') - end - - def get_table_names_by_filter(dbname, filter, max_tables) - send_get_table_names_by_filter(dbname, filter, max_tables) - return recv_get_table_names_by_filter() - end - - def send_get_table_names_by_filter(dbname, filter, max_tables) - send_message('get_table_names_by_filter', Get_table_names_by_filter_args, :dbname => dbname, :filter => filter, :max_tables => max_tables) - end - - def recv_get_table_names_by_filter() - result = receive_message(Get_table_names_by_filter_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_names_by_filter failed: unknown result') - end - - def alter_table(dbname, tbl_name, new_tbl) - send_alter_table(dbname, tbl_name, new_tbl) - recv_alter_table() - end - - def send_alter_table(dbname, tbl_name, new_tbl) - send_message('alter_table', Alter_table_args, :dbname => dbname, :tbl_name => tbl_name, :new_tbl => new_tbl) - end - - def recv_alter_table() - result = receive_message(Alter_table_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context) - send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context) - recv_alter_table_with_environment_context() - end - - def send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context) - send_message('alter_table_with_environment_context', Alter_table_with_environment_context_args, :dbname => dbname, :tbl_name => tbl_name, :new_tbl => new_tbl, :environment_context => environment_context) - end - - def recv_alter_table_with_environment_context() - result = receive_message(Alter_table_with_environment_context_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade) - send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade) - recv_alter_table_with_cascade() - end - - def send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade) - send_message('alter_table_with_cascade', Alter_table_with_cascade_args, :dbname => dbname, :tbl_name => tbl_name, :new_tbl => new_tbl, :cascade => cascade) - end - - def recv_alter_table_with_cascade() - result = receive_message(Alter_table_with_cascade_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def add_partition(new_part) - send_add_partition(new_part) - return recv_add_partition() - end - - def send_add_partition(new_part) - send_message('add_partition', Add_partition_args, :new_part => new_part) - end - - def recv_add_partition() - result = receive_message(Add_partition_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partition failed: unknown result') - end - - def add_partition_with_environment_context(new_part, environment_context) - send_add_partition_with_environment_context(new_part, environment_context) - return recv_add_partition_with_environment_context() - end - - def send_add_partition_with_environment_context(new_part, environment_context) - send_message('add_partition_with_environment_context', Add_partition_with_environment_context_args, :new_part => new_part, :environment_context => environment_context) - end - - def recv_add_partition_with_environment_context() - result = receive_message(Add_partition_with_environment_context_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partition_with_environment_context failed: unknown result') - end - - def add_partitions(new_parts) - send_add_partitions(new_parts) - return recv_add_partitions() - end - - def send_add_partitions(new_parts) - send_message('add_partitions', Add_partitions_args, :new_parts => new_parts) - end - - def recv_add_partitions() - result = receive_message(Add_partitions_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partitions failed: unknown result') - end - - def add_partitions_pspec(new_parts) - send_add_partitions_pspec(new_parts) - return recv_add_partitions_pspec() - end - - def send_add_partitions_pspec(new_parts) - send_message('add_partitions_pspec', Add_partitions_pspec_args, :new_parts => new_parts) - end - - def recv_add_partitions_pspec() - result = receive_message(Add_partitions_pspec_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partitions_pspec failed: unknown result') - end - - def append_partition(db_name, tbl_name, part_vals) - send_append_partition(db_name, tbl_name, part_vals) - return recv_append_partition() - end - - def send_append_partition(db_name, tbl_name, part_vals) - send_message('append_partition', Append_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals) - end - - def recv_append_partition() - result = receive_message(Append_partition_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition failed: unknown result') - end - - def add_partitions_req(request) - send_add_partitions_req(request) - return recv_add_partitions_req() - end - - def send_add_partitions_req(request) - send_message('add_partitions_req', Add_partitions_req_args, :request => request) - end - - def recv_add_partitions_req() - result = receive_message(Add_partitions_req_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partitions_req failed: unknown result') - end - - def append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context) - send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context) - return recv_append_partition_with_environment_context() - end - - def send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context) - send_message('append_partition_with_environment_context', Append_partition_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :environment_context => environment_context) - end - - def recv_append_partition_with_environment_context() - result = receive_message(Append_partition_with_environment_context_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition_with_environment_context failed: unknown result') - end - - def append_partition_by_name(db_name, tbl_name, part_name) - send_append_partition_by_name(db_name, tbl_name, part_name) - return recv_append_partition_by_name() - end - - def send_append_partition_by_name(db_name, tbl_name, part_name) - send_message('append_partition_by_name', Append_partition_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name) - end - - def recv_append_partition_by_name() - result = receive_message(Append_partition_by_name_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition_by_name failed: unknown result') - end - - def append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context) - send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context) - return recv_append_partition_by_name_with_environment_context() - end - - def send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context) - send_message('append_partition_by_name_with_environment_context', Append_partition_by_name_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :environment_context => environment_context) - end - - def recv_append_partition_by_name_with_environment_context() - result = receive_message(Append_partition_by_name_with_environment_context_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition_by_name_with_environment_context failed: unknown result') - end - - def drop_partition(db_name, tbl_name, part_vals, deleteData) - send_drop_partition(db_name, tbl_name, part_vals, deleteData) - return recv_drop_partition() - end - - def send_drop_partition(db_name, tbl_name, part_vals, deleteData) - send_message('drop_partition', Drop_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :deleteData => deleteData) - end - - def recv_drop_partition() - result = receive_message(Drop_partition_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition failed: unknown result') - end - - def drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context) - send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context) - return recv_drop_partition_with_environment_context() - end - - def send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context) - send_message('drop_partition_with_environment_context', Drop_partition_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :deleteData => deleteData, :environment_context => environment_context) - end - - def recv_drop_partition_with_environment_context() - result = receive_message(Drop_partition_with_environment_context_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition_with_environment_context failed: unknown result') - end - - def drop_partition_by_name(db_name, tbl_name, part_name, deleteData) - send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) - return recv_drop_partition_by_name() - end - - def send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) - send_message('drop_partition_by_name', Drop_partition_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :deleteData => deleteData) - end - - def recv_drop_partition_by_name() - result = receive_message(Drop_partition_by_name_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition_by_name failed: unknown result') - end - - def drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context) - send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context) - return recv_drop_partition_by_name_with_environment_context() - end - - def send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context) - send_message('drop_partition_by_name_with_environment_context', Drop_partition_by_name_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :deleteData => deleteData, :environment_context => environment_context) - end - - def recv_drop_partition_by_name_with_environment_context() - result = receive_message(Drop_partition_by_name_with_environment_context_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition_by_name_with_environment_context failed: unknown result') - end - - def drop_partitions_req(req) - send_drop_partitions_req(req) - return recv_drop_partitions_req() - end - - def send_drop_partitions_req(req) - send_message('drop_partitions_req', Drop_partitions_req_args, :req => req) - end - - def recv_drop_partitions_req() - result = receive_message(Drop_partitions_req_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partitions_req failed: unknown result') - end - - def get_partition(db_name, tbl_name, part_vals) - send_get_partition(db_name, tbl_name, part_vals) - return recv_get_partition() - end - - def send_get_partition(db_name, tbl_name, part_vals) - send_message('get_partition', Get_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals) - end - - def recv_get_partition() - result = receive_message(Get_partition_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition failed: unknown result') - end - - def exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) - send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) - return recv_exchange_partition() - end - - def send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) - send_message('exchange_partition', Exchange_partition_args, :partitionSpecs => partitionSpecs, :source_db => source_db, :source_table_name => source_table_name, :dest_db => dest_db, :dest_table_name => dest_table_name) - end - - def recv_exchange_partition() - result = receive_message(Exchange_partition_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'exchange_partition failed: unknown result') - end - - def exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) - send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) - return recv_exchange_partitions() - end - - def send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) - send_message('exchange_partitions', Exchange_partitions_args, :partitionSpecs => partitionSpecs, :source_db => source_db, :source_table_name => source_table_name, :dest_db => dest_db, :dest_table_name => dest_table_name) - end - - def recv_exchange_partitions() - result = receive_message(Exchange_partitions_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'exchange_partitions failed: unknown result') - end - - def get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) - send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) - return recv_get_partition_with_auth() - end - - def send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) - send_message('get_partition_with_auth', Get_partition_with_auth_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :user_name => user_name, :group_names => group_names) - end - - def recv_get_partition_with_auth() - result = receive_message(Get_partition_with_auth_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_with_auth failed: unknown result') - end - - def get_partition_by_name(db_name, tbl_name, part_name) - send_get_partition_by_name(db_name, tbl_name, part_name) - return recv_get_partition_by_name() - end - - def send_get_partition_by_name(db_name, tbl_name, part_name) - send_message('get_partition_by_name', Get_partition_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name) - end - - def recv_get_partition_by_name() - result = receive_message(Get_partition_by_name_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_by_name failed: unknown result') - end - - def get_partitions(db_name, tbl_name, max_parts) - send_get_partitions(db_name, tbl_name, max_parts) - return recv_get_partitions() - end - - def send_get_partitions(db_name, tbl_name, max_parts) - send_message('get_partitions', Get_partitions_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts) - end - - def recv_get_partitions() - result = receive_message(Get_partitions_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions failed: unknown result') - end - - def get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) - send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) - return recv_get_partitions_with_auth() - end - - def send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) - send_message('get_partitions_with_auth', Get_partitions_with_auth_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts, :user_name => user_name, :group_names => group_names) - end - - def recv_get_partitions_with_auth() - result = receive_message(Get_partitions_with_auth_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_with_auth failed: unknown result') - end - - def get_partitions_pspec(db_name, tbl_name, max_parts) - send_get_partitions_pspec(db_name, tbl_name, max_parts) - return recv_get_partitions_pspec() - end - - def send_get_partitions_pspec(db_name, tbl_name, max_parts) - send_message('get_partitions_pspec', Get_partitions_pspec_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts) - end - - def recv_get_partitions_pspec() - result = receive_message(Get_partitions_pspec_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_pspec failed: unknown result') - end - - def get_partition_names(db_name, tbl_name, max_parts) - send_get_partition_names(db_name, tbl_name, max_parts) - return recv_get_partition_names() - end - - def send_get_partition_names(db_name, tbl_name, max_parts) - send_message('get_partition_names', Get_partition_names_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts) - end - - def recv_get_partition_names() - result = receive_message(Get_partition_names_result) - return result.success unless result.success.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_names failed: unknown result') - end - - def get_partitions_ps(db_name, tbl_name, part_vals, max_parts) - send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) - return recv_get_partitions_ps() - end - - def send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) - send_message('get_partitions_ps', Get_partitions_ps_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :max_parts => max_parts) - end - - def recv_get_partitions_ps() - result = receive_message(Get_partitions_ps_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_ps failed: unknown result') - end - - def get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) - send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) - return recv_get_partitions_ps_with_auth() - end - - def send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) - send_message('get_partitions_ps_with_auth', Get_partitions_ps_with_auth_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :max_parts => max_parts, :user_name => user_name, :group_names => group_names) - end - - def recv_get_partitions_ps_with_auth() - result = receive_message(Get_partitions_ps_with_auth_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_ps_with_auth failed: unknown result') - end - - def get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) - send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) - return recv_get_partition_names_ps() - end - - def send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) - send_message('get_partition_names_ps', Get_partition_names_ps_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :max_parts => max_parts) - end - - def recv_get_partition_names_ps() - result = receive_message(Get_partition_names_ps_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_names_ps failed: unknown result') - end - - def get_partitions_by_filter(db_name, tbl_name, filter, max_parts) - send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) - return recv_get_partitions_by_filter() - end - - def send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) - send_message('get_partitions_by_filter', Get_partitions_by_filter_args, :db_name => db_name, :tbl_name => tbl_name, :filter => filter, :max_parts => max_parts) - end - - def recv_get_partitions_by_filter() - result = receive_message(Get_partitions_by_filter_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_by_filter failed: unknown result') - end - - def get_part_specs_by_filter(db_name, tbl_name, filter, max_parts) - send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts) - return recv_get_part_specs_by_filter() - end - - def send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts) - send_message('get_part_specs_by_filter', Get_part_specs_by_filter_args, :db_name => db_name, :tbl_name => tbl_name, :filter => filter, :max_parts => max_parts) - end - - def recv_get_part_specs_by_filter() - result = receive_message(Get_part_specs_by_filter_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_part_specs_by_filter failed: unknown result') - end - - def get_partitions_by_expr(req) - send_get_partitions_by_expr(req) - return recv_get_partitions_by_expr() - end - - def send_get_partitions_by_expr(req) - send_message('get_partitions_by_expr', Get_partitions_by_expr_args, :req => req) - end - - def recv_get_partitions_by_expr() - result = receive_message(Get_partitions_by_expr_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_by_expr failed: unknown result') - end - - def get_num_partitions_by_filter(db_name, tbl_name, filter) - send_get_num_partitions_by_filter(db_name, tbl_name, filter) - return recv_get_num_partitions_by_filter() - end - - def send_get_num_partitions_by_filter(db_name, tbl_name, filter) - send_message('get_num_partitions_by_filter', Get_num_partitions_by_filter_args, :db_name => db_name, :tbl_name => tbl_name, :filter => filter) - end - - def recv_get_num_partitions_by_filter() - result = receive_message(Get_num_partitions_by_filter_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_num_partitions_by_filter failed: unknown result') - end - - def get_partitions_by_names(db_name, tbl_name, names) - send_get_partitions_by_names(db_name, tbl_name, names) - return recv_get_partitions_by_names() - end - - def send_get_partitions_by_names(db_name, tbl_name, names) - send_message('get_partitions_by_names', Get_partitions_by_names_args, :db_name => db_name, :tbl_name => tbl_name, :names => names) - end - - def recv_get_partitions_by_names() - result = receive_message(Get_partitions_by_names_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_by_names failed: unknown result') - end - - def alter_partition(db_name, tbl_name, new_part) - send_alter_partition(db_name, tbl_name, new_part) - recv_alter_partition() - end - - def send_alter_partition(db_name, tbl_name, new_part) - send_message('alter_partition', Alter_partition_args, :db_name => db_name, :tbl_name => tbl_name, :new_part => new_part) - end - - def recv_alter_partition() - result = receive_message(Alter_partition_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def alter_partitions(db_name, tbl_name, new_parts) - send_alter_partitions(db_name, tbl_name, new_parts) - recv_alter_partitions() - end - - def send_alter_partitions(db_name, tbl_name, new_parts) - send_message('alter_partitions', Alter_partitions_args, :db_name => db_name, :tbl_name => tbl_name, :new_parts => new_parts) - end - - def recv_alter_partitions() - result = receive_message(Alter_partitions_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context) - send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context) - recv_alter_partitions_with_environment_context() - end - - def send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context) - send_message('alter_partitions_with_environment_context', Alter_partitions_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :new_parts => new_parts, :environment_context => environment_context) - end - - def recv_alter_partitions_with_environment_context() - result = receive_message(Alter_partitions_with_environment_context_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context) - send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context) - recv_alter_partition_with_environment_context() - end - - def send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context) - send_message('alter_partition_with_environment_context', Alter_partition_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :new_part => new_part, :environment_context => environment_context) - end - - def recv_alter_partition_with_environment_context() - result = receive_message(Alter_partition_with_environment_context_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def rename_partition(db_name, tbl_name, part_vals, new_part) - send_rename_partition(db_name, tbl_name, part_vals, new_part) - recv_rename_partition() - end - - def send_rename_partition(db_name, tbl_name, part_vals, new_part) - send_message('rename_partition', Rename_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :new_part => new_part) - end - - def recv_rename_partition() - result = receive_message(Rename_partition_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def partition_name_has_valid_characters(part_vals, throw_exception) - send_partition_name_has_valid_characters(part_vals, throw_exception) - return recv_partition_name_has_valid_characters() - end - - def send_partition_name_has_valid_characters(part_vals, throw_exception) - send_message('partition_name_has_valid_characters', Partition_name_has_valid_characters_args, :part_vals => part_vals, :throw_exception => throw_exception) - end - - def recv_partition_name_has_valid_characters() - result = receive_message(Partition_name_has_valid_characters_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'partition_name_has_valid_characters failed: unknown result') - end - - def get_config_value(name, defaultValue) - send_get_config_value(name, defaultValue) - return recv_get_config_value() - end - - def send_get_config_value(name, defaultValue) - send_message('get_config_value', Get_config_value_args, :name => name, :defaultValue => defaultValue) - end - - def recv_get_config_value() - result = receive_message(Get_config_value_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_config_value failed: unknown result') - end - - def partition_name_to_vals(part_name) - send_partition_name_to_vals(part_name) - return recv_partition_name_to_vals() - end - - def send_partition_name_to_vals(part_name) - send_message('partition_name_to_vals', Partition_name_to_vals_args, :part_name => part_name) - end - - def recv_partition_name_to_vals() - result = receive_message(Partition_name_to_vals_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'partition_name_to_vals failed: unknown result') - end - - def partition_name_to_spec(part_name) - send_partition_name_to_spec(part_name) - return recv_partition_name_to_spec() - end - - def send_partition_name_to_spec(part_name) - send_message('partition_name_to_spec', Partition_name_to_spec_args, :part_name => part_name) - end - - def recv_partition_name_to_spec() - result = receive_message(Partition_name_to_spec_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'partition_name_to_spec failed: unknown result') - end - - def markPartitionForEvent(db_name, tbl_name, part_vals, eventType) - send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType) - recv_markPartitionForEvent() - end - - def send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType) - send_message('markPartitionForEvent', MarkPartitionForEvent_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :eventType => eventType) - end - - def recv_markPartitionForEvent() - result = receive_message(MarkPartitionForEvent_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - raise result.o5 unless result.o5.nil? - raise result.o6 unless result.o6.nil? - return - end - - def isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType) - send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType) - return recv_isPartitionMarkedForEvent() - end - - def send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType) - send_message('isPartitionMarkedForEvent', IsPartitionMarkedForEvent_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :eventType => eventType) - end - - def recv_isPartitionMarkedForEvent() - result = receive_message(IsPartitionMarkedForEvent_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - raise result.o5 unless result.o5.nil? - raise result.o6 unless result.o6.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'isPartitionMarkedForEvent failed: unknown result') - end - - def add_index(new_index, index_table) - send_add_index(new_index, index_table) - return recv_add_index() - end - - def send_add_index(new_index, index_table) - send_message('add_index', Add_index_args, :new_index => new_index, :index_table => index_table) - end - - def recv_add_index() - result = receive_message(Add_index_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_index failed: unknown result') - end - - def alter_index(dbname, base_tbl_name, idx_name, new_idx) - send_alter_index(dbname, base_tbl_name, idx_name, new_idx) - recv_alter_index() - end - - def send_alter_index(dbname, base_tbl_name, idx_name, new_idx) - send_message('alter_index', Alter_index_args, :dbname => dbname, :base_tbl_name => base_tbl_name, :idx_name => idx_name, :new_idx => new_idx) - end - - def recv_alter_index() - result = receive_message(Alter_index_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def drop_index_by_name(db_name, tbl_name, index_name, deleteData) - send_drop_index_by_name(db_name, tbl_name, index_name, deleteData) - return recv_drop_index_by_name() - end - - def send_drop_index_by_name(db_name, tbl_name, index_name, deleteData) - send_message('drop_index_by_name', Drop_index_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :index_name => index_name, :deleteData => deleteData) - end - - def recv_drop_index_by_name() - result = receive_message(Drop_index_by_name_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_index_by_name failed: unknown result') - end - - def get_index_by_name(db_name, tbl_name, index_name) - send_get_index_by_name(db_name, tbl_name, index_name) - return recv_get_index_by_name() - end - - def send_get_index_by_name(db_name, tbl_name, index_name) - send_message('get_index_by_name', Get_index_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :index_name => index_name) - end - - def recv_get_index_by_name() - result = receive_message(Get_index_by_name_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_by_name failed: unknown result') - end - - def get_indexes(db_name, tbl_name, max_indexes) - send_get_indexes(db_name, tbl_name, max_indexes) - return recv_get_indexes() - end - - def send_get_indexes(db_name, tbl_name, max_indexes) - send_message('get_indexes', Get_indexes_args, :db_name => db_name, :tbl_name => tbl_name, :max_indexes => max_indexes) - end - - def recv_get_indexes() - result = receive_message(Get_indexes_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_indexes failed: unknown result') - end - - def get_index_names(db_name, tbl_name, max_indexes) - send_get_index_names(db_name, tbl_name, max_indexes) - return recv_get_index_names() - end - - def send_get_index_names(db_name, tbl_name, max_indexes) - send_message('get_index_names', Get_index_names_args, :db_name => db_name, :tbl_name => tbl_name, :max_indexes => max_indexes) - end - - def recv_get_index_names() - result = receive_message(Get_index_names_result) - return result.success unless result.success.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_names failed: unknown result') - end - - def get_primary_keys(request) - send_get_primary_keys(request) - return recv_get_primary_keys() - end - - def send_get_primary_keys(request) - send_message('get_primary_keys', Get_primary_keys_args, :request => request) - end - - def recv_get_primary_keys() - result = receive_message(Get_primary_keys_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_primary_keys failed: unknown result') - end - - def get_foreign_keys(request) - send_get_foreign_keys(request) - return recv_get_foreign_keys() - end - - def send_get_foreign_keys(request) - send_message('get_foreign_keys', Get_foreign_keys_args, :request => request) - end - - def recv_get_foreign_keys() - result = receive_message(Get_foreign_keys_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_foreign_keys failed: unknown result') - end - - def get_unique_constraints(request) - send_get_unique_constraints(request) - return recv_get_unique_constraints() - end - - def send_get_unique_constraints(request) - send_message('get_unique_constraints', Get_unique_constraints_args, :request => request) - end - - def recv_get_unique_constraints() - result = receive_message(Get_unique_constraints_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_unique_constraints failed: unknown result') - end - - def get_not_null_constraints(request) - send_get_not_null_constraints(request) - return recv_get_not_null_constraints() - end - - def send_get_not_null_constraints(request) - send_message('get_not_null_constraints', Get_not_null_constraints_args, :request => request) - end - - def recv_get_not_null_constraints() - result = receive_message(Get_not_null_constraints_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_not_null_constraints failed: unknown result') - end - - def update_table_column_statistics(stats_obj) - send_update_table_column_statistics(stats_obj) - return recv_update_table_column_statistics() - end - - def send_update_table_column_statistics(stats_obj) - send_message('update_table_column_statistics', Update_table_column_statistics_args, :stats_obj => stats_obj) - end - - def recv_update_table_column_statistics() - result = receive_message(Update_table_column_statistics_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'update_table_column_statistics failed: unknown result') - end - - def update_partition_column_statistics(stats_obj) - send_update_partition_column_statistics(stats_obj) - return recv_update_partition_column_statistics() - end - - def send_update_partition_column_statistics(stats_obj) - send_message('update_partition_column_statistics', Update_partition_column_statistics_args, :stats_obj => stats_obj) - end - - def recv_update_partition_column_statistics() - result = receive_message(Update_partition_column_statistics_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'update_partition_column_statistics failed: unknown result') - end - - def get_table_column_statistics(db_name, tbl_name, col_name) - send_get_table_column_statistics(db_name, tbl_name, col_name) - return recv_get_table_column_statistics() - end - - def send_get_table_column_statistics(db_name, tbl_name, col_name) - send_message('get_table_column_statistics', Get_table_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :col_name => col_name) - end - - def recv_get_table_column_statistics() - result = receive_message(Get_table_column_statistics_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_column_statistics failed: unknown result') - end - - def get_partition_column_statistics(db_name, tbl_name, part_name, col_name) - send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name) - return recv_get_partition_column_statistics() - end - - def send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name) - send_message('get_partition_column_statistics', Get_partition_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :col_name => col_name) - end - - def recv_get_partition_column_statistics() - result = receive_message(Get_partition_column_statistics_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_column_statistics failed: unknown result') - end - - def get_table_statistics_req(request) - send_get_table_statistics_req(request) - return recv_get_table_statistics_req() - end - - def send_get_table_statistics_req(request) - send_message('get_table_statistics_req', Get_table_statistics_req_args, :request => request) - end - - def recv_get_table_statistics_req() - result = receive_message(Get_table_statistics_req_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_statistics_req failed: unknown result') - end - - def get_partitions_statistics_req(request) - send_get_partitions_statistics_req(request) - return recv_get_partitions_statistics_req() - end - - def send_get_partitions_statistics_req(request) - send_message('get_partitions_statistics_req', Get_partitions_statistics_req_args, :request => request) - end - - def recv_get_partitions_statistics_req() - result = receive_message(Get_partitions_statistics_req_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_statistics_req failed: unknown result') - end - - def get_aggr_stats_for(request) - send_get_aggr_stats_for(request) - return recv_get_aggr_stats_for() - end - - def send_get_aggr_stats_for(request) - send_message('get_aggr_stats_for', Get_aggr_stats_for_args, :request => request) - end - - def recv_get_aggr_stats_for() - result = receive_message(Get_aggr_stats_for_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_aggr_stats_for failed: unknown result') - end - - def set_aggr_stats_for(request) - send_set_aggr_stats_for(request) - return recv_set_aggr_stats_for() - end - - def send_set_aggr_stats_for(request) - send_message('set_aggr_stats_for', Set_aggr_stats_for_args, :request => request) - end - - def recv_set_aggr_stats_for() - result = receive_message(Set_aggr_stats_for_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'set_aggr_stats_for failed: unknown result') - end - - def delete_partition_column_statistics(db_name, tbl_name, part_name, col_name) - send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name) - return recv_delete_partition_column_statistics() - end - - def send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name) - send_message('delete_partition_column_statistics', Delete_partition_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :col_name => col_name) - end - - def recv_delete_partition_column_statistics() - result = receive_message(Delete_partition_column_statistics_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'delete_partition_column_statistics failed: unknown result') - end - - def delete_table_column_statistics(db_name, tbl_name, col_name) - send_delete_table_column_statistics(db_name, tbl_name, col_name) - return recv_delete_table_column_statistics() - end - - def send_delete_table_column_statistics(db_name, tbl_name, col_name) - send_message('delete_table_column_statistics', Delete_table_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :col_name => col_name) - end - - def recv_delete_table_column_statistics() - result = receive_message(Delete_table_column_statistics_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'delete_table_column_statistics failed: unknown result') - end - - def create_function(func) - send_create_function(func) - recv_create_function() - end - - def send_create_function(func) - send_message('create_function', Create_function_args, :func => func) - end - - def recv_create_function() - result = receive_message(Create_function_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise result.o4 unless result.o4.nil? - return - end - - def drop_function(dbName, funcName) - send_drop_function(dbName, funcName) - recv_drop_function() - end - - def send_drop_function(dbName, funcName) - send_message('drop_function', Drop_function_args, :dbName => dbName, :funcName => funcName) - end - - def recv_drop_function() - result = receive_message(Drop_function_result) - raise result.o1 unless result.o1.nil? - raise result.o3 unless result.o3.nil? - return - end - - def alter_function(dbName, funcName, newFunc) - send_alter_function(dbName, funcName, newFunc) - recv_alter_function() - end - - def send_alter_function(dbName, funcName, newFunc) - send_message('alter_function', Alter_function_args, :dbName => dbName, :funcName => funcName, :newFunc => newFunc) - end - - def recv_alter_function() - result = receive_message(Alter_function_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def get_functions(dbName, pattern) - send_get_functions(dbName, pattern) - return recv_get_functions() - end - - def send_get_functions(dbName, pattern) - send_message('get_functions', Get_functions_args, :dbName => dbName, :pattern => pattern) - end - - def recv_get_functions() - result = receive_message(Get_functions_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_functions failed: unknown result') - end - - def get_function(dbName, funcName) - send_get_function(dbName, funcName) - return recv_get_function() - end - - def send_get_function(dbName, funcName) - send_message('get_function', Get_function_args, :dbName => dbName, :funcName => funcName) - end - - def recv_get_function() - result = receive_message(Get_function_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_function failed: unknown result') - end - - def get_all_functions() - send_get_all_functions() - return recv_get_all_functions() - end - - def send_get_all_functions() - send_message('get_all_functions', Get_all_functions_args) - end - - def recv_get_all_functions() - result = receive_message(Get_all_functions_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_functions failed: unknown result') - end - - def create_role(role) - send_create_role(role) - return recv_create_role() - end - - def send_create_role(role) - send_message('create_role', Create_role_args, :role => role) - end - - def recv_create_role() - result = receive_message(Create_role_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'create_role failed: unknown result') - end - - def drop_role(role_name) - send_drop_role(role_name) - return recv_drop_role() - end - - def send_drop_role(role_name) - send_message('drop_role', Drop_role_args, :role_name => role_name) - end - - def recv_drop_role() - result = receive_message(Drop_role_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_role failed: unknown result') - end - - def get_role_names() - send_get_role_names() - return recv_get_role_names() - end - - def send_get_role_names() - send_message('get_role_names', Get_role_names_args) - end - - def recv_get_role_names() - result = receive_message(Get_role_names_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_role_names failed: unknown result') - end - - def grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) - send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) - return recv_grant_role() - end - - def send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) - send_message('grant_role', Grant_role_args, :role_name => role_name, :principal_name => principal_name, :principal_type => principal_type, :grantor => grantor, :grantorType => grantorType, :grant_option => grant_option) - end - - def recv_grant_role() - result = receive_message(Grant_role_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'grant_role failed: unknown result') - end - - def revoke_role(role_name, principal_name, principal_type) - send_revoke_role(role_name, principal_name, principal_type) - return recv_revoke_role() - end - - def send_revoke_role(role_name, principal_name, principal_type) - send_message('revoke_role', Revoke_role_args, :role_name => role_name, :principal_name => principal_name, :principal_type => principal_type) - end - - def recv_revoke_role() - result = receive_message(Revoke_role_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'revoke_role failed: unknown result') - end - - def list_roles(principal_name, principal_type) - send_list_roles(principal_name, principal_type) - return recv_list_roles() - end - - def send_list_roles(principal_name, principal_type) - send_message('list_roles', List_roles_args, :principal_name => principal_name, :principal_type => principal_type) - end - - def recv_list_roles() - result = receive_message(List_roles_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_roles failed: unknown result') - end - - def grant_revoke_role(request) - send_grant_revoke_role(request) - return recv_grant_revoke_role() - end - - def send_grant_revoke_role(request) - send_message('grant_revoke_role', Grant_revoke_role_args, :request => request) - end - - def recv_grant_revoke_role() - result = receive_message(Grant_revoke_role_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'grant_revoke_role failed: unknown result') - end - - def get_principals_in_role(request) - send_get_principals_in_role(request) - return recv_get_principals_in_role() - end - - def send_get_principals_in_role(request) - send_message('get_principals_in_role', Get_principals_in_role_args, :request => request) - end - - def recv_get_principals_in_role() - result = receive_message(Get_principals_in_role_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_principals_in_role failed: unknown result') - end - - def get_role_grants_for_principal(request) - send_get_role_grants_for_principal(request) - return recv_get_role_grants_for_principal() - end - - def send_get_role_grants_for_principal(request) - send_message('get_role_grants_for_principal', Get_role_grants_for_principal_args, :request => request) - end - - def recv_get_role_grants_for_principal() - result = receive_message(Get_role_grants_for_principal_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_role_grants_for_principal failed: unknown result') - end - - def get_privilege_set(hiveObject, user_name, group_names) - send_get_privilege_set(hiveObject, user_name, group_names) - return recv_get_privilege_set() - end - - def send_get_privilege_set(hiveObject, user_name, group_names) - send_message('get_privilege_set', Get_privilege_set_args, :hiveObject => hiveObject, :user_name => user_name, :group_names => group_names) - end - - def recv_get_privilege_set() - result = receive_message(Get_privilege_set_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_privilege_set failed: unknown result') - end - - def list_privileges(principal_name, principal_type, hiveObject) - send_list_privileges(principal_name, principal_type, hiveObject) - return recv_list_privileges() - end - - def send_list_privileges(principal_name, principal_type, hiveObject) - send_message('list_privileges', List_privileges_args, :principal_name => principal_name, :principal_type => principal_type, :hiveObject => hiveObject) - end - - def recv_list_privileges() - result = receive_message(List_privileges_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_privileges failed: unknown result') - end - - def grant_privileges(privileges) - send_grant_privileges(privileges) - return recv_grant_privileges() - end - - def send_grant_privileges(privileges) - send_message('grant_privileges', Grant_privileges_args, :privileges => privileges) - end - - def recv_grant_privileges() - result = receive_message(Grant_privileges_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'grant_privileges failed: unknown result') - end - - def revoke_privileges(privileges) - send_revoke_privileges(privileges) - return recv_revoke_privileges() - end - - def send_revoke_privileges(privileges) - send_message('revoke_privileges', Revoke_privileges_args, :privileges => privileges) - end - - def recv_revoke_privileges() - result = receive_message(Revoke_privileges_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'revoke_privileges failed: unknown result') - end - - def grant_revoke_privileges(request) - send_grant_revoke_privileges(request) - return recv_grant_revoke_privileges() - end - - def send_grant_revoke_privileges(request) - send_message('grant_revoke_privileges', Grant_revoke_privileges_args, :request => request) - end - - def recv_grant_revoke_privileges() - result = receive_message(Grant_revoke_privileges_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'grant_revoke_privileges failed: unknown result') - end - - def set_ugi(user_name, group_names) - send_set_ugi(user_name, group_names) - return recv_set_ugi() - end - - def send_set_ugi(user_name, group_names) - send_message('set_ugi', Set_ugi_args, :user_name => user_name, :group_names => group_names) - end - - def recv_set_ugi() - result = receive_message(Set_ugi_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'set_ugi failed: unknown result') - end - - def get_delegation_token(token_owner, renewer_kerberos_principal_name) - send_get_delegation_token(token_owner, renewer_kerberos_principal_name) - return recv_get_delegation_token() - end - - def send_get_delegation_token(token_owner, renewer_kerberos_principal_name) - send_message('get_delegation_token', Get_delegation_token_args, :token_owner => token_owner, :renewer_kerberos_principal_name => renewer_kerberos_principal_name) - end - - def recv_get_delegation_token() - result = receive_message(Get_delegation_token_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_delegation_token failed: unknown result') - end - - def renew_delegation_token(token_str_form) - send_renew_delegation_token(token_str_form) - return recv_renew_delegation_token() - end - - def send_renew_delegation_token(token_str_form) - send_message('renew_delegation_token', Renew_delegation_token_args, :token_str_form => token_str_form) - end - - def recv_renew_delegation_token() - result = receive_message(Renew_delegation_token_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'renew_delegation_token failed: unknown result') - end - - def cancel_delegation_token(token_str_form) - send_cancel_delegation_token(token_str_form) - recv_cancel_delegation_token() - end - - def send_cancel_delegation_token(token_str_form) - send_message('cancel_delegation_token', Cancel_delegation_token_args, :token_str_form => token_str_form) - end - - def recv_cancel_delegation_token() - result = receive_message(Cancel_delegation_token_result) - raise result.o1 unless result.o1.nil? - return - end - - def add_token(token_identifier, delegation_token) - send_add_token(token_identifier, delegation_token) - return recv_add_token() - end - - def send_add_token(token_identifier, delegation_token) - send_message('add_token', Add_token_args, :token_identifier => token_identifier, :delegation_token => delegation_token) - end - - def recv_add_token() - result = receive_message(Add_token_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_token failed: unknown result') - end - - def remove_token(token_identifier) - send_remove_token(token_identifier) - return recv_remove_token() - end - - def send_remove_token(token_identifier) - send_message('remove_token', Remove_token_args, :token_identifier => token_identifier) - end - - def recv_remove_token() - result = receive_message(Remove_token_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'remove_token failed: unknown result') - end - - def get_token(token_identifier) - send_get_token(token_identifier) - return recv_get_token() - end - - def send_get_token(token_identifier) - send_message('get_token', Get_token_args, :token_identifier => token_identifier) - end - - def recv_get_token() - result = receive_message(Get_token_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_token failed: unknown result') - end - - def get_all_token_identifiers() - send_get_all_token_identifiers() - return recv_get_all_token_identifiers() - end - - def send_get_all_token_identifiers() - send_message('get_all_token_identifiers', Get_all_token_identifiers_args) - end - - def recv_get_all_token_identifiers() - result = receive_message(Get_all_token_identifiers_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_token_identifiers failed: unknown result') - end - - def add_master_key(key) - send_add_master_key(key) - return recv_add_master_key() - end - - def send_add_master_key(key) - send_message('add_master_key', Add_master_key_args, :key => key) - end - - def recv_add_master_key() - result = receive_message(Add_master_key_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_master_key failed: unknown result') - end - - def update_master_key(seq_number, key) - send_update_master_key(seq_number, key) - recv_update_master_key() - end - - def send_update_master_key(seq_number, key) - send_message('update_master_key', Update_master_key_args, :seq_number => seq_number, :key => key) - end - - def recv_update_master_key() - result = receive_message(Update_master_key_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def remove_master_key(key_seq) - send_remove_master_key(key_seq) - return recv_remove_master_key() - end - - def send_remove_master_key(key_seq) - send_message('remove_master_key', Remove_master_key_args, :key_seq => key_seq) - end - - def recv_remove_master_key() - result = receive_message(Remove_master_key_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'remove_master_key failed: unknown result') - end - - def get_master_keys() - send_get_master_keys() - return recv_get_master_keys() - end - - def send_get_master_keys() - send_message('get_master_keys', Get_master_keys_args) - end - - def recv_get_master_keys() - result = receive_message(Get_master_keys_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_master_keys failed: unknown result') - end - - def get_open_txns() - send_get_open_txns() - return recv_get_open_txns() - end - - def send_get_open_txns() - send_message('get_open_txns', Get_open_txns_args) - end - - def recv_get_open_txns() - result = receive_message(Get_open_txns_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_open_txns failed: unknown result') - end - - def get_open_txns_info() - send_get_open_txns_info() - return recv_get_open_txns_info() - end - - def send_get_open_txns_info() - send_message('get_open_txns_info', Get_open_txns_info_args) - end - - def recv_get_open_txns_info() - result = receive_message(Get_open_txns_info_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_open_txns_info failed: unknown result') - end - - def open_txns(rqst) - send_open_txns(rqst) - return recv_open_txns() - end - - def send_open_txns(rqst) - send_message('open_txns', Open_txns_args, :rqst => rqst) - end - - def recv_open_txns() - result = receive_message(Open_txns_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'open_txns failed: unknown result') - end - - def abort_txn(rqst) - send_abort_txn(rqst) - recv_abort_txn() - end - - def send_abort_txn(rqst) - send_message('abort_txn', Abort_txn_args, :rqst => rqst) - end - - def recv_abort_txn() - result = receive_message(Abort_txn_result) - raise result.o1 unless result.o1.nil? - return - end - - def abort_txns(rqst) - send_abort_txns(rqst) - recv_abort_txns() - end - - def send_abort_txns(rqst) - send_message('abort_txns', Abort_txns_args, :rqst => rqst) - end - - def recv_abort_txns() - result = receive_message(Abort_txns_result) - raise result.o1 unless result.o1.nil? - return - end - - def commit_txn(rqst) - send_commit_txn(rqst) - recv_commit_txn() - end - - def send_commit_txn(rqst) - send_message('commit_txn', Commit_txn_args, :rqst => rqst) - end - - def recv_commit_txn() - result = receive_message(Commit_txn_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def lock(rqst) - send_lock(rqst) - return recv_lock() - end - - def send_lock(rqst) - send_message('lock', Lock_args, :rqst => rqst) - end - - def recv_lock() - result = receive_message(Lock_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'lock failed: unknown result') - end - - def check_lock(rqst) - send_check_lock(rqst) - return recv_check_lock() - end - - def send_check_lock(rqst) - send_message('check_lock', Check_lock_args, :rqst => rqst) - end - - def recv_check_lock() - result = receive_message(Check_lock_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'check_lock failed: unknown result') - end - - def unlock(rqst) - send_unlock(rqst) - recv_unlock() - end - - def send_unlock(rqst) - send_message('unlock', Unlock_args, :rqst => rqst) - end - - def recv_unlock() - result = receive_message(Unlock_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def show_locks(rqst) - send_show_locks(rqst) - return recv_show_locks() - end - - def send_show_locks(rqst) - send_message('show_locks', Show_locks_args, :rqst => rqst) - end - - def recv_show_locks() - result = receive_message(Show_locks_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'show_locks failed: unknown result') - end - - def heartbeat(ids) - send_heartbeat(ids) - recv_heartbeat() - end - - def send_heartbeat(ids) - send_message('heartbeat', Heartbeat_args, :ids => ids) - end - - def recv_heartbeat() - result = receive_message(Heartbeat_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - raise result.o3 unless result.o3.nil? - return - end - - def heartbeat_txn_range(txns) - send_heartbeat_txn_range(txns) - return recv_heartbeat_txn_range() - end - - def send_heartbeat_txn_range(txns) - send_message('heartbeat_txn_range', Heartbeat_txn_range_args, :txns => txns) - end - - def recv_heartbeat_txn_range() - result = receive_message(Heartbeat_txn_range_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'heartbeat_txn_range failed: unknown result') - end - - def compact(rqst) - send_compact(rqst) - recv_compact() - end - - def send_compact(rqst) - send_message('compact', Compact_args, :rqst => rqst) - end - - def recv_compact() - result = receive_message(Compact_result) - return - end - - def compact2(rqst) - send_compact2(rqst) - return recv_compact2() - end - - def send_compact2(rqst) - send_message('compact2', Compact2_args, :rqst => rqst) - end - - def recv_compact2() - result = receive_message(Compact2_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'compact2 failed: unknown result') - end - - def show_compact(rqst) - send_show_compact(rqst) - return recv_show_compact() - end - - def send_show_compact(rqst) - send_message('show_compact', Show_compact_args, :rqst => rqst) - end - - def recv_show_compact() - result = receive_message(Show_compact_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'show_compact failed: unknown result') - end - - def add_dynamic_partitions(rqst) - send_add_dynamic_partitions(rqst) - recv_add_dynamic_partitions() - end - - def send_add_dynamic_partitions(rqst) - send_message('add_dynamic_partitions', Add_dynamic_partitions_args, :rqst => rqst) - end - - def recv_add_dynamic_partitions() - result = receive_message(Add_dynamic_partitions_result) - raise result.o1 unless result.o1.nil? - raise result.o2 unless result.o2.nil? - return - end - - def get_next_notification(rqst) - send_get_next_notification(rqst) - return recv_get_next_notification() - end - - def send_get_next_notification(rqst) - send_message('get_next_notification', Get_next_notification_args, :rqst => rqst) - end - - def recv_get_next_notification() - result = receive_message(Get_next_notification_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_next_notification failed: unknown result') - end - - def get_current_notificationEventId() - send_get_current_notificationEventId() - return recv_get_current_notificationEventId() - end - - def send_get_current_notificationEventId() - send_message('get_current_notificationEventId', Get_current_notificationEventId_args) - end - - def recv_get_current_notificationEventId() - result = receive_message(Get_current_notificationEventId_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_current_notificationEventId failed: unknown result') - end - - def fire_listener_event(rqst) - send_fire_listener_event(rqst) - return recv_fire_listener_event() - end - - def send_fire_listener_event(rqst) - send_message('fire_listener_event', Fire_listener_event_args, :rqst => rqst) - end - - def recv_fire_listener_event() - result = receive_message(Fire_listener_event_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fire_listener_event failed: unknown result') - end - - def flushCache() - send_flushCache() - recv_flushCache() - end - - def send_flushCache() - send_message('flushCache', FlushCache_args) - end - - def recv_flushCache() - result = receive_message(FlushCache_result) - return - end - - def cm_recycle(request) - send_cm_recycle(request) - return recv_cm_recycle() - end - - def send_cm_recycle(request) - send_message('cm_recycle', Cm_recycle_args, :request => request) - end - - def recv_cm_recycle() - result = receive_message(Cm_recycle_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'cm_recycle failed: unknown result') - end - - def get_file_metadata_by_expr(req) - send_get_file_metadata_by_expr(req) - return recv_get_file_metadata_by_expr() - end - - def send_get_file_metadata_by_expr(req) - send_message('get_file_metadata_by_expr', Get_file_metadata_by_expr_args, :req => req) - end - - def recv_get_file_metadata_by_expr() - result = receive_message(Get_file_metadata_by_expr_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_file_metadata_by_expr failed: unknown result') - end - - def get_file_metadata(req) - send_get_file_metadata(req) - return recv_get_file_metadata() - end - - def send_get_file_metadata(req) - send_message('get_file_metadata', Get_file_metadata_args, :req => req) - end - - def recv_get_file_metadata() - result = receive_message(Get_file_metadata_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_file_metadata failed: unknown result') - end - - def put_file_metadata(req) - send_put_file_metadata(req) - return recv_put_file_metadata() - end - - def send_put_file_metadata(req) - send_message('put_file_metadata', Put_file_metadata_args, :req => req) - end - - def recv_put_file_metadata() - result = receive_message(Put_file_metadata_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'put_file_metadata failed: unknown result') - end - - def clear_file_metadata(req) - send_clear_file_metadata(req) - return recv_clear_file_metadata() - end - - def send_clear_file_metadata(req) - send_message('clear_file_metadata', Clear_file_metadata_args, :req => req) - end - - def recv_clear_file_metadata() - result = receive_message(Clear_file_metadata_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'clear_file_metadata failed: unknown result') - end - - def cache_file_metadata(req) - send_cache_file_metadata(req) - return recv_cache_file_metadata() - end - - def send_cache_file_metadata(req) - send_message('cache_file_metadata', Cache_file_metadata_args, :req => req) - end - - def recv_cache_file_metadata() - result = receive_message(Cache_file_metadata_result) - return result.success unless result.success.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'cache_file_metadata failed: unknown result') - end - - def get_metastore_db_uuid() - send_get_metastore_db_uuid() - return recv_get_metastore_db_uuid() - end - - def send_get_metastore_db_uuid() - send_message('get_metastore_db_uuid', Get_metastore_db_uuid_args) - end - - def recv_get_metastore_db_uuid() - result = receive_message(Get_metastore_db_uuid_result) - return result.success unless result.success.nil? - raise result.o1 unless result.o1.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_metastore_db_uuid failed: unknown result') - end - - end - - class Processor < ::FacebookService::Processor - include ::Thrift::Processor - - def process_getMetaConf(seqid, iprot, oprot) - args = read_args(iprot, GetMetaConf_args) - result = GetMetaConf_result.new() - begin - result.success = @handler.getMetaConf(args.key) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'getMetaConf', seqid) - end - - def process_setMetaConf(seqid, iprot, oprot) - args = read_args(iprot, SetMetaConf_args) - result = SetMetaConf_result.new() - begin - @handler.setMetaConf(args.key, args.value) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'setMetaConf', seqid) - end - - def process_create_database(seqid, iprot, oprot) - args = read_args(iprot, Create_database_args) - result = Create_database_result.new() - begin - @handler.create_database(args.database) - rescue ::AlreadyExistsException => o1 - result.o1 = o1 - rescue ::InvalidObjectException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'create_database', seqid) - end - - def process_get_database(seqid, iprot, oprot) - args = read_args(iprot, Get_database_args) - result = Get_database_result.new() - begin - result.success = @handler.get_database(args.name) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_database', seqid) - end - - def process_drop_database(seqid, iprot, oprot) - args = read_args(iprot, Drop_database_args) - result = Drop_database_result.new() - begin - @handler.drop_database(args.name, args.deleteData, args.cascade) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::InvalidOperationException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'drop_database', seqid) - end - - def process_get_databases(seqid, iprot, oprot) - args = read_args(iprot, Get_databases_args) - result = Get_databases_result.new() - begin - result.success = @handler.get_databases(args.pattern) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_databases', seqid) - end - - def process_get_all_databases(seqid, iprot, oprot) - args = read_args(iprot, Get_all_databases_args) - result = Get_all_databases_result.new() - begin - result.success = @handler.get_all_databases() - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_all_databases', seqid) - end - - def process_alter_database(seqid, iprot, oprot) - args = read_args(iprot, Alter_database_args) - result = Alter_database_result.new() - begin - @handler.alter_database(args.dbname, args.db) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'alter_database', seqid) - end - - def process_get_type(seqid, iprot, oprot) - args = read_args(iprot, Get_type_args) - result = Get_type_result.new() - begin - result.success = @handler.get_type(args.name) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_type', seqid) - end - - def process_create_type(seqid, iprot, oprot) - args = read_args(iprot, Create_type_args) - result = Create_type_result.new() - begin - result.success = @handler.create_type(args.type) - rescue ::AlreadyExistsException => o1 - result.o1 = o1 - rescue ::InvalidObjectException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'create_type', seqid) - end - - def process_drop_type(seqid, iprot, oprot) - args = read_args(iprot, Drop_type_args) - result = Drop_type_result.new() - begin - result.success = @handler.drop_type(args.type) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'drop_type', seqid) - end - - def process_get_type_all(seqid, iprot, oprot) - args = read_args(iprot, Get_type_all_args) - result = Get_type_all_result.new() - begin - result.success = @handler.get_type_all(args.name) - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_type_all', seqid) - end - - def process_get_fields(seqid, iprot, oprot) - args = read_args(iprot, Get_fields_args) - result = Get_fields_result.new() - begin - result.success = @handler.get_fields(args.db_name, args.table_name) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::UnknownTableException => o2 - result.o2 = o2 - rescue ::UnknownDBException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'get_fields', seqid) - end - - def process_get_fields_with_environment_context(seqid, iprot, oprot) - args = read_args(iprot, Get_fields_with_environment_context_args) - result = Get_fields_with_environment_context_result.new() - begin - result.success = @handler.get_fields_with_environment_context(args.db_name, args.table_name, args.environment_context) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::UnknownTableException => o2 - result.o2 = o2 - rescue ::UnknownDBException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'get_fields_with_environment_context', seqid) - end - - def process_get_schema(seqid, iprot, oprot) - args = read_args(iprot, Get_schema_args) - result = Get_schema_result.new() - begin - result.success = @handler.get_schema(args.db_name, args.table_name) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::UnknownTableException => o2 - result.o2 = o2 - rescue ::UnknownDBException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'get_schema', seqid) - end - - def process_get_schema_with_environment_context(seqid, iprot, oprot) - args = read_args(iprot, Get_schema_with_environment_context_args) - result = Get_schema_with_environment_context_result.new() - begin - result.success = @handler.get_schema_with_environment_context(args.db_name, args.table_name, args.environment_context) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::UnknownTableException => o2 - result.o2 = o2 - rescue ::UnknownDBException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'get_schema_with_environment_context', seqid) - end - - def process_create_table(seqid, iprot, oprot) - args = read_args(iprot, Create_table_args) - result = Create_table_result.new() - begin - @handler.create_table(args.tbl) - rescue ::AlreadyExistsException => o1 - result.o1 = o1 - rescue ::InvalidObjectException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - rescue ::NoSuchObjectException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'create_table', seqid) - end - - def process_create_table_with_environment_context(seqid, iprot, oprot) - args = read_args(iprot, Create_table_with_environment_context_args) - result = Create_table_with_environment_context_result.new() - begin - @handler.create_table_with_environment_context(args.tbl, args.environment_context) - rescue ::AlreadyExistsException => o1 - result.o1 = o1 - rescue ::InvalidObjectException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - rescue ::NoSuchObjectException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'create_table_with_environment_context', seqid) - end - - def process_create_table_with_constraints(seqid, iprot, oprot) - args = read_args(iprot, Create_table_with_constraints_args) - result = Create_table_with_constraints_result.new() - begin - @handler.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys, args.uniqueConstraints, args.notNullConstraints) - rescue ::AlreadyExistsException => o1 - result.o1 = o1 - rescue ::InvalidObjectException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - rescue ::NoSuchObjectException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'create_table_with_constraints', seqid) - end - - def process_drop_constraint(seqid, iprot, oprot) - args = read_args(iprot, Drop_constraint_args) - result = Drop_constraint_result.new() - begin - @handler.drop_constraint(args.req) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'drop_constraint', seqid) - end - - def process_add_primary_key(seqid, iprot, oprot) - args = read_args(iprot, Add_primary_key_args) - result = Add_primary_key_result.new() - begin - @handler.add_primary_key(args.req) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'add_primary_key', seqid) - end - - def process_add_foreign_key(seqid, iprot, oprot) - args = read_args(iprot, Add_foreign_key_args) - result = Add_foreign_key_result.new() - begin - @handler.add_foreign_key(args.req) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'add_foreign_key', seqid) - end - - def process_add_unique_constraint(seqid, iprot, oprot) - args = read_args(iprot, Add_unique_constraint_args) - result = Add_unique_constraint_result.new() - begin - @handler.add_unique_constraint(args.req) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'add_unique_constraint', seqid) - end - - def process_add_not_null_constraint(seqid, iprot, oprot) - args = read_args(iprot, Add_not_null_constraint_args) - result = Add_not_null_constraint_result.new() - begin - @handler.add_not_null_constraint(args.req) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'add_not_null_constraint', seqid) - end - - def process_drop_table(seqid, iprot, oprot) - args = read_args(iprot, Drop_table_args) - result = Drop_table_result.new() - begin - @handler.drop_table(args.dbname, args.name, args.deleteData) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'drop_table', seqid) - end - - def process_drop_table_with_environment_context(seqid, iprot, oprot) - args = read_args(iprot, Drop_table_with_environment_context_args) - result = Drop_table_with_environment_context_result.new() - begin - @handler.drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'drop_table_with_environment_context', seqid) - end - - def process_truncate_table(seqid, iprot, oprot) - args = read_args(iprot, Truncate_table_args) - result = Truncate_table_result.new() - begin - @handler.truncate_table(args.dbName, args.tableName, args.partNames) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'truncate_table', seqid) - end - - def process_get_tables(seqid, iprot, oprot) - args = read_args(iprot, Get_tables_args) - result = Get_tables_result.new() - begin - result.success = @handler.get_tables(args.db_name, args.pattern) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_tables', seqid) - end - - def process_get_tables_by_type(seqid, iprot, oprot) - args = read_args(iprot, Get_tables_by_type_args) - result = Get_tables_by_type_result.new() - begin - result.success = @handler.get_tables_by_type(args.db_name, args.pattern, args.tableType) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_tables_by_type', seqid) - end - - def process_get_table_meta(seqid, iprot, oprot) - args = read_args(iprot, Get_table_meta_args) - result = Get_table_meta_result.new() - begin - result.success = @handler.get_table_meta(args.db_patterns, args.tbl_patterns, args.tbl_types) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_table_meta', seqid) - end - - def process_get_all_tables(seqid, iprot, oprot) - args = read_args(iprot, Get_all_tables_args) - result = Get_all_tables_result.new() - begin - result.success = @handler.get_all_tables(args.db_name) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_all_tables', seqid) - end - - def process_get_table(seqid, iprot, oprot) - args = read_args(iprot, Get_table_args) - result = Get_table_result.new() - begin - result.success = @handler.get_table(args.dbname, args.tbl_name) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_table', seqid) - end - - def process_get_table_objects_by_name(seqid, iprot, oprot) - args = read_args(iprot, Get_table_objects_by_name_args) - result = Get_table_objects_by_name_result.new() - result.success = @handler.get_table_objects_by_name(args.dbname, args.tbl_names) - write_result(result, oprot, 'get_table_objects_by_name', seqid) - end - - def process_get_table_req(seqid, iprot, oprot) - args = read_args(iprot, Get_table_req_args) - result = Get_table_req_result.new() - begin - result.success = @handler.get_table_req(args.req) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_table_req', seqid) - end - - def process_get_table_objects_by_name_req(seqid, iprot, oprot) - args = read_args(iprot, Get_table_objects_by_name_req_args) - result = Get_table_objects_by_name_req_result.new() - begin - result.success = @handler.get_table_objects_by_name_req(args.req) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::InvalidOperationException => o2 - result.o2 = o2 - rescue ::UnknownDBException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'get_table_objects_by_name_req', seqid) - end - - def process_get_table_names_by_filter(seqid, iprot, oprot) - args = read_args(iprot, Get_table_names_by_filter_args) - 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 - result.o1 = o1 - rescue ::InvalidOperationException => o2 - result.o2 = o2 - rescue ::UnknownDBException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'get_table_names_by_filter', seqid) - end - - def process_alter_table(seqid, iprot, oprot) - args = read_args(iprot, Alter_table_args) - result = Alter_table_result.new() - begin - @handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) - rescue ::InvalidOperationException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'alter_table', seqid) - end - - def process_alter_table_with_environment_context(seqid, iprot, oprot) - args = read_args(iprot, Alter_table_with_environment_context_args) - 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 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'alter_table_with_environment_context', seqid) - end - - def process_alter_table_with_cascade(seqid, iprot, oprot) - args = read_args(iprot, Alter_table_with_cascade_args) - result = Alter_table_with_cascade_result.new() - begin - @handler.alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade) - rescue ::InvalidOperationException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'alter_table_with_cascade', seqid) - end - - def process_add_partition(seqid, iprot, oprot) - args = read_args(iprot, Add_partition_args) - result = Add_partition_result.new() - begin - result.success = @handler.add_partition(args.new_part) - rescue ::InvalidObjectException => o1 - result.o1 = o1 - rescue ::AlreadyExistsException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'add_partition', seqid) - end - - def process_add_partition_with_environment_context(seqid, iprot, oprot) - args = read_args(iprot, Add_partition_with_environment_context_args) - 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 - result.o1 = o1 - rescue ::AlreadyExistsException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'add_partition_with_environment_context', seqid) - end - - def process_add_partitions(seqid, iprot, oprot) - args = read_args(iprot, Add_partitions_args) - result = Add_partitions_result.new() - begin - result.success = @handler.add_partitions(args.new_parts) - rescue ::InvalidObjectException => o1 - result.o1 = o1 - rescue ::AlreadyExistsException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'add_partitions', seqid) - end - - def process_add_partitions_pspec(seqid, iprot, oprot) - args = read_args(iprot, Add_partitions_pspec_args) - result = Add_partitions_pspec_result.new() - begin - result.success = @handler.add_partitions_pspec(args.new_parts) - rescue ::InvalidObjectException => o1 - result.o1 = o1 - rescue ::AlreadyExistsException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'add_partitions_pspec', seqid) - end - - def process_append_partition(seqid, iprot, oprot) - args = read_args(iprot, Append_partition_args) - result = Append_partition_result.new() - begin - result.success = @handler.append_partition(args.db_name, args.tbl_name, args.part_vals) - rescue ::InvalidObjectException => o1 - result.o1 = o1 - rescue ::AlreadyExistsException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'append_partition', seqid) - end - - def process_add_partitions_req(seqid, iprot, oprot) - args = read_args(iprot, Add_partitions_req_args) - result = Add_partitions_req_result.new() - begin - result.success = @handler.add_partitions_req(args.request) - rescue ::InvalidObjectException => o1 - result.o1 = o1 - rescue ::AlreadyExistsException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'add_partitions_req', seqid) - end - - def process_append_partition_with_environment_context(seqid, iprot, oprot) - args = read_args(iprot, Append_partition_with_environment_context_args) - result = Append_partition_with_environment_context_result.new() - begin - result.success = @handler.append_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.environment_context) - rescue ::InvalidObjectException => o1 - result.o1 = o1 - rescue ::AlreadyExistsException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'append_partition_with_environment_context', seqid) - end - - def process_append_partition_by_name(seqid, iprot, oprot) - args = read_args(iprot, Append_partition_by_name_args) - 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 - result.o1 = o1 - rescue ::AlreadyExistsException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'append_partition_by_name', seqid) - end - - def process_append_partition_by_name_with_environment_context(seqid, iprot, oprot) - args = read_args(iprot, Append_partition_by_name_with_environment_context_args) - result = Append_partition_by_name_with_environment_context_result.new() - begin - result.success = @handler.append_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.environment_context) - rescue ::InvalidObjectException => o1 - result.o1 = o1 - rescue ::AlreadyExistsException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'append_partition_by_name_with_environment_context', seqid) - end - - def process_drop_partition(seqid, iprot, oprot) - args = read_args(iprot, Drop_partition_args) - 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 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'drop_partition', seqid) - end - - def process_drop_partition_with_environment_context(seqid, iprot, oprot) - args = read_args(iprot, Drop_partition_with_environment_context_args) - result = Drop_partition_with_environment_context_result.new() - begin - result.success = @handler.drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'drop_partition_with_environment_context', seqid) - end - - def process_drop_partition_by_name(seqid, iprot, oprot) - args = read_args(iprot, Drop_partition_by_name_args) - 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 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'drop_partition_by_name', seqid) - end - - def process_drop_partition_by_name_with_environment_context(seqid, iprot, oprot) - args = read_args(iprot, Drop_partition_by_name_with_environment_context_args) - result = Drop_partition_by_name_with_environment_context_result.new() - begin - result.success = @handler.drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'drop_partition_by_name_with_environment_context', seqid) - end - - def process_drop_partitions_req(seqid, iprot, oprot) - args = read_args(iprot, Drop_partitions_req_args) - result = Drop_partitions_req_result.new() - begin - result.success = @handler.drop_partitions_req(args.req) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'drop_partitions_req', seqid) - end - - def process_get_partition(seqid, iprot, oprot) - args = read_args(iprot, Get_partition_args) - result = Get_partition_result.new() - begin - result.success = @handler.get_partition(args.db_name, args.tbl_name, args.part_vals) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partition', seqid) - end - - def process_exchange_partition(seqid, iprot, oprot) - args = read_args(iprot, Exchange_partition_args) - result = Exchange_partition_result.new() - begin - result.success = @handler.exchange_partition(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - rescue ::InvalidObjectException => o3 - result.o3 = o3 - rescue ::InvalidInputException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'exchange_partition', seqid) - end - - def process_exchange_partitions(seqid, iprot, oprot) - args = read_args(iprot, Exchange_partitions_args) - result = Exchange_partitions_result.new() - begin - result.success = @handler.exchange_partitions(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - rescue ::InvalidObjectException => o3 - result.o3 = o3 - rescue ::InvalidInputException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'exchange_partitions', seqid) - end - - def process_get_partition_with_auth(seqid, iprot, oprot) - args = read_args(iprot, Get_partition_with_auth_args) - 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 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partition_with_auth', seqid) - end - - def process_get_partition_by_name(seqid, iprot, oprot) - args = read_args(iprot, Get_partition_by_name_args) - 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 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partition_by_name', seqid) - end - - def process_get_partitions(seqid, iprot, oprot) - args = read_args(iprot, Get_partitions_args) - result = Get_partitions_result.new() - begin - result.success = @handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partitions', seqid) - end - - def process_get_partitions_with_auth(seqid, iprot, oprot) - args = read_args(iprot, Get_partitions_with_auth_args) - 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 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partitions_with_auth', seqid) - end - - def process_get_partitions_pspec(seqid, iprot, oprot) - args = read_args(iprot, Get_partitions_pspec_args) - result = Get_partitions_pspec_result.new() - begin - result.success = @handler.get_partitions_pspec(args.db_name, args.tbl_name, args.max_parts) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partitions_pspec', seqid) - end - - def process_get_partition_names(seqid, iprot, oprot) - args = read_args(iprot, Get_partition_names_args) - 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 - result.o2 = o2 - end - write_result(result, oprot, 'get_partition_names', seqid) - end - - def process_get_partitions_ps(seqid, iprot, oprot) - args = read_args(iprot, Get_partitions_ps_args) - 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 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partitions_ps', seqid) - end - - def process_get_partitions_ps_with_auth(seqid, iprot, oprot) - args = read_args(iprot, Get_partitions_ps_with_auth_args) - 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 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partitions_ps_with_auth', seqid) - end - - def process_get_partition_names_ps(seqid, iprot, oprot) - args = read_args(iprot, Get_partition_names_ps_args) - 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 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partition_names_ps', seqid) - end - - def process_get_partitions_by_filter(seqid, iprot, oprot) - args = read_args(iprot, Get_partitions_by_filter_args) - 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 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partitions_by_filter', seqid) - end - - def process_get_part_specs_by_filter(seqid, iprot, oprot) - args = read_args(iprot, Get_part_specs_by_filter_args) - result = Get_part_specs_by_filter_result.new() - begin - result.success = @handler.get_part_specs_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_part_specs_by_filter', seqid) - end - - def process_get_partitions_by_expr(seqid, iprot, oprot) - args = read_args(iprot, Get_partitions_by_expr_args) - result = Get_partitions_by_expr_result.new() - begin - result.success = @handler.get_partitions_by_expr(args.req) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partitions_by_expr', seqid) - end - - def process_get_num_partitions_by_filter(seqid, iprot, oprot) - args = read_args(iprot, Get_num_partitions_by_filter_args) - result = Get_num_partitions_by_filter_result.new() - begin - result.success = @handler.get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_num_partitions_by_filter', seqid) - end - - def process_get_partitions_by_names(seqid, iprot, oprot) - args = read_args(iprot, Get_partitions_by_names_args) - 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 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partitions_by_names', seqid) - end - - def process_alter_partition(seqid, iprot, oprot) - args = read_args(iprot, Alter_partition_args) - result = Alter_partition_result.new() - begin - @handler.alter_partition(args.db_name, args.tbl_name, args.new_part) - rescue ::InvalidOperationException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'alter_partition', seqid) - end - - def process_alter_partitions(seqid, iprot, oprot) - args = read_args(iprot, Alter_partitions_args) - result = Alter_partitions_result.new() - begin - @handler.alter_partitions(args.db_name, args.tbl_name, args.new_parts) - rescue ::InvalidOperationException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'alter_partitions', seqid) - end - - def process_alter_partitions_with_environment_context(seqid, iprot, oprot) - args = read_args(iprot, Alter_partitions_with_environment_context_args) - result = Alter_partitions_with_environment_context_result.new() - begin - @handler.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context) - rescue ::InvalidOperationException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'alter_partitions_with_environment_context', seqid) - end - - def process_alter_partition_with_environment_context(seqid, iprot, oprot) - args = read_args(iprot, Alter_partition_with_environment_context_args) - 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 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'alter_partition_with_environment_context', seqid) - end - - def process_rename_partition(seqid, iprot, oprot) - args = read_args(iprot, Rename_partition_args) - result = Rename_partition_result.new() - begin - @handler.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part) - rescue ::InvalidOperationException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'rename_partition', seqid) - end - - def process_partition_name_has_valid_characters(seqid, iprot, oprot) - args = read_args(iprot, Partition_name_has_valid_characters_args) - result = Partition_name_has_valid_characters_result.new() - begin - result.success = @handler.partition_name_has_valid_characters(args.part_vals, args.throw_exception) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'partition_name_has_valid_characters', seqid) - end - - def process_get_config_value(seqid, iprot, oprot) - args = read_args(iprot, Get_config_value_args) - result = Get_config_value_result.new() - begin - result.success = @handler.get_config_value(args.name, args.defaultValue) - rescue ::ConfigValSecurityException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_config_value', seqid) - end - - def process_partition_name_to_vals(seqid, iprot, oprot) - args = read_args(iprot, Partition_name_to_vals_args) - result = Partition_name_to_vals_result.new() - begin - result.success = @handler.partition_name_to_vals(args.part_name) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'partition_name_to_vals', seqid) - end - - def process_partition_name_to_spec(seqid, iprot, oprot) - args = read_args(iprot, Partition_name_to_spec_args) - result = Partition_name_to_spec_result.new() - begin - result.success = @handler.partition_name_to_spec(args.part_name) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'partition_name_to_spec', seqid) - end - - def process_markPartitionForEvent(seqid, iprot, oprot) - args = read_args(iprot, MarkPartitionForEvent_args) - result = MarkPartitionForEvent_result.new() - begin - @handler.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - rescue ::UnknownDBException => o3 - result.o3 = o3 - rescue ::UnknownTableException => o4 - result.o4 = o4 - rescue ::UnknownPartitionException => o5 - result.o5 = o5 - rescue ::InvalidPartitionException => o6 - result.o6 = o6 - end - write_result(result, oprot, 'markPartitionForEvent', seqid) - end - - def process_isPartitionMarkedForEvent(seqid, iprot, oprot) - args = read_args(iprot, IsPartitionMarkedForEvent_args) - result = IsPartitionMarkedForEvent_result.new() - begin - result.success = @handler.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - rescue ::UnknownDBException => o3 - result.o3 = o3 - rescue ::UnknownTableException => o4 - result.o4 = o4 - rescue ::UnknownPartitionException => o5 - result.o5 = o5 - rescue ::InvalidPartitionException => o6 - result.o6 = o6 - end - write_result(result, oprot, 'isPartitionMarkedForEvent', seqid) - end - - def process_add_index(seqid, iprot, oprot) - args = read_args(iprot, Add_index_args) - result = Add_index_result.new() - begin - result.success = @handler.add_index(args.new_index, args.index_table) - rescue ::InvalidObjectException => o1 - result.o1 = o1 - rescue ::AlreadyExistsException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'add_index', seqid) - end - - def process_alter_index(seqid, iprot, oprot) - args = read_args(iprot, Alter_index_args) - result = Alter_index_result.new() - begin - @handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) - rescue ::InvalidOperationException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'alter_index', seqid) - end - - def process_drop_index_by_name(seqid, iprot, oprot) - args = read_args(iprot, Drop_index_by_name_args) - 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 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'drop_index_by_name', seqid) - end - - def process_get_index_by_name(seqid, iprot, oprot) - args = read_args(iprot, Get_index_by_name_args) - 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 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_index_by_name', seqid) - end - - def process_get_indexes(seqid, iprot, oprot) - args = read_args(iprot, Get_indexes_args) - result = Get_indexes_result.new() - begin - result.success = @handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_indexes', seqid) - end - - def process_get_index_names(seqid, iprot, oprot) - args = read_args(iprot, Get_index_names_args) - 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 - result.o2 = o2 - end - write_result(result, oprot, 'get_index_names', seqid) - end - - def process_get_primary_keys(seqid, iprot, oprot) - args = read_args(iprot, Get_primary_keys_args) - result = Get_primary_keys_result.new() - begin - result.success = @handler.get_primary_keys(args.request) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_primary_keys', seqid) - end - - def process_get_foreign_keys(seqid, iprot, oprot) - args = read_args(iprot, Get_foreign_keys_args) - result = Get_foreign_keys_result.new() - begin - result.success = @handler.get_foreign_keys(args.request) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_foreign_keys', seqid) - end - - def process_get_unique_constraints(seqid, iprot, oprot) - args = read_args(iprot, Get_unique_constraints_args) - result = Get_unique_constraints_result.new() - begin - result.success = @handler.get_unique_constraints(args.request) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_unique_constraints', seqid) - end - - def process_get_not_null_constraints(seqid, iprot, oprot) - args = read_args(iprot, Get_not_null_constraints_args) - result = Get_not_null_constraints_result.new() - begin - result.success = @handler.get_not_null_constraints(args.request) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_not_null_constraints', seqid) - end - - def process_update_table_column_statistics(seqid, iprot, oprot) - args = read_args(iprot, Update_table_column_statistics_args) - result = Update_table_column_statistics_result.new() - begin - result.success = @handler.update_table_column_statistics(args.stats_obj) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::InvalidObjectException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - rescue ::InvalidInputException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'update_table_column_statistics', seqid) - end - - def process_update_partition_column_statistics(seqid, iprot, oprot) - args = read_args(iprot, Update_partition_column_statistics_args) - result = Update_partition_column_statistics_result.new() - begin - result.success = @handler.update_partition_column_statistics(args.stats_obj) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::InvalidObjectException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - rescue ::InvalidInputException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'update_partition_column_statistics', seqid) - end - - def process_get_table_column_statistics(seqid, iprot, oprot) - args = read_args(iprot, Get_table_column_statistics_args) - result = Get_table_column_statistics_result.new() - begin - result.success = @handler.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - rescue ::InvalidInputException => o3 - result.o3 = o3 - rescue ::InvalidObjectException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'get_table_column_statistics', seqid) - end - - def process_get_partition_column_statistics(seqid, iprot, oprot) - args = read_args(iprot, Get_partition_column_statistics_args) - result = Get_partition_column_statistics_result.new() - begin - result.success = @handler.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - rescue ::InvalidInputException => o3 - result.o3 = o3 - rescue ::InvalidObjectException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'get_partition_column_statistics', seqid) - end - - def process_get_table_statistics_req(seqid, iprot, oprot) - args = read_args(iprot, Get_table_statistics_req_args) - result = Get_table_statistics_req_result.new() - begin - result.success = @handler.get_table_statistics_req(args.request) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_table_statistics_req', seqid) - end - - def process_get_partitions_statistics_req(seqid, iprot, oprot) - args = read_args(iprot, Get_partitions_statistics_req_args) - result = Get_partitions_statistics_req_result.new() - begin - result.success = @handler.get_partitions_statistics_req(args.request) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_partitions_statistics_req', seqid) - end - - def process_get_aggr_stats_for(seqid, iprot, oprot) - args = read_args(iprot, Get_aggr_stats_for_args) - result = Get_aggr_stats_for_result.new() - begin - result.success = @handler.get_aggr_stats_for(args.request) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_aggr_stats_for', seqid) - end - - def process_set_aggr_stats_for(seqid, iprot, oprot) - args = read_args(iprot, Set_aggr_stats_for_args) - result = Set_aggr_stats_for_result.new() - begin - result.success = @handler.set_aggr_stats_for(args.request) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::InvalidObjectException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - rescue ::InvalidInputException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'set_aggr_stats_for', seqid) - end - - def process_delete_partition_column_statistics(seqid, iprot, oprot) - args = read_args(iprot, Delete_partition_column_statistics_args) - result = Delete_partition_column_statistics_result.new() - begin - result.success = @handler.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - rescue ::InvalidObjectException => o3 - result.o3 = o3 - rescue ::InvalidInputException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'delete_partition_column_statistics', seqid) - end - - def process_delete_table_column_statistics(seqid, iprot, oprot) - args = read_args(iprot, Delete_table_column_statistics_args) - result = Delete_table_column_statistics_result.new() - begin - result.success = @handler.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - rescue ::InvalidObjectException => o3 - result.o3 = o3 - rescue ::InvalidInputException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'delete_table_column_statistics', seqid) - end - - def process_create_function(seqid, iprot, oprot) - args = read_args(iprot, Create_function_args) - result = Create_function_result.new() - begin - @handler.create_function(args.func) - rescue ::AlreadyExistsException => o1 - result.o1 = o1 - rescue ::InvalidObjectException => o2 - result.o2 = o2 - rescue ::MetaException => o3 - result.o3 = o3 - rescue ::NoSuchObjectException => o4 - result.o4 = o4 - end - write_result(result, oprot, 'create_function', seqid) - end - - def process_drop_function(seqid, iprot, oprot) - args = read_args(iprot, Drop_function_args) - result = Drop_function_result.new() - begin - @handler.drop_function(args.dbName, args.funcName) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'drop_function', seqid) - end - - def process_alter_function(seqid, iprot, oprot) - args = read_args(iprot, Alter_function_args) - result = Alter_function_result.new() - begin - @handler.alter_function(args.dbName, args.funcName, args.newFunc) - rescue ::InvalidOperationException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'alter_function', seqid) - end - - def process_get_functions(seqid, iprot, oprot) - args = read_args(iprot, Get_functions_args) - result = Get_functions_result.new() - begin - result.success = @handler.get_functions(args.dbName, args.pattern) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_functions', seqid) - end - - def process_get_function(seqid, iprot, oprot) - args = read_args(iprot, Get_function_args) - result = Get_function_result.new() - begin - result.success = @handler.get_function(args.dbName, args.funcName) - rescue ::MetaException => o1 - result.o1 = o1 - rescue ::NoSuchObjectException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'get_function', seqid) - end - - def process_get_all_functions(seqid, iprot, oprot) - args = read_args(iprot, Get_all_functions_args) - result = Get_all_functions_result.new() - begin - result.success = @handler.get_all_functions() - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_all_functions', seqid) - end - - def process_create_role(seqid, iprot, oprot) - args = read_args(iprot, Create_role_args) - result = Create_role_result.new() - begin - result.success = @handler.create_role(args.role) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'create_role', seqid) - end - - def process_drop_role(seqid, iprot, oprot) - args = read_args(iprot, Drop_role_args) - result = Drop_role_result.new() - begin - result.success = @handler.drop_role(args.role_name) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'drop_role', seqid) - end - - def process_get_role_names(seqid, iprot, oprot) - args = read_args(iprot, Get_role_names_args) - result = Get_role_names_result.new() - begin - result.success = @handler.get_role_names() - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_role_names', seqid) - end - - def process_grant_role(seqid, iprot, oprot) - args = read_args(iprot, Grant_role_args) - 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 - result.o1 = o1 - end - write_result(result, oprot, 'grant_role', seqid) - end - - def process_revoke_role(seqid, iprot, oprot) - args = read_args(iprot, Revoke_role_args) - result = Revoke_role_result.new() - begin - result.success = @handler.revoke_role(args.role_name, args.principal_name, args.principal_type) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'revoke_role', seqid) - end - - def process_list_roles(seqid, iprot, oprot) - args = read_args(iprot, List_roles_args) - result = List_roles_result.new() - begin - result.success = @handler.list_roles(args.principal_name, args.principal_type) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'list_roles', seqid) - end - - def process_grant_revoke_role(seqid, iprot, oprot) - args = read_args(iprot, Grant_revoke_role_args) - result = Grant_revoke_role_result.new() - begin - result.success = @handler.grant_revoke_role(args.request) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'grant_revoke_role', seqid) - end - - def process_get_principals_in_role(seqid, iprot, oprot) - args = read_args(iprot, Get_principals_in_role_args) - result = Get_principals_in_role_result.new() - begin - result.success = @handler.get_principals_in_role(args.request) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_principals_in_role', seqid) - end - - def process_get_role_grants_for_principal(seqid, iprot, oprot) - args = read_args(iprot, Get_role_grants_for_principal_args) - result = Get_role_grants_for_principal_result.new() - begin - result.success = @handler.get_role_grants_for_principal(args.request) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_role_grants_for_principal', seqid) - end - - def process_get_privilege_set(seqid, iprot, oprot) - args = read_args(iprot, Get_privilege_set_args) - result = Get_privilege_set_result.new() - begin - result.success = @handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_privilege_set', seqid) - end - - def process_list_privileges(seqid, iprot, oprot) - args = read_args(iprot, List_privileges_args) - result = List_privileges_result.new() - begin - result.success = @handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'list_privileges', seqid) - end - - def process_grant_privileges(seqid, iprot, oprot) - args = read_args(iprot, Grant_privileges_args) - result = Grant_privileges_result.new() - begin - result.success = @handler.grant_privileges(args.privileges) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'grant_privileges', seqid) - end - - def process_revoke_privileges(seqid, iprot, oprot) - args = read_args(iprot, Revoke_privileges_args) - result = Revoke_privileges_result.new() - begin - result.success = @handler.revoke_privileges(args.privileges) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'revoke_privileges', seqid) - end - - def process_grant_revoke_privileges(seqid, iprot, oprot) - args = read_args(iprot, Grant_revoke_privileges_args) - result = Grant_revoke_privileges_result.new() - begin - result.success = @handler.grant_revoke_privileges(args.request) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'grant_revoke_privileges', seqid) - end - - def process_set_ugi(seqid, iprot, oprot) - args = read_args(iprot, Set_ugi_args) - result = Set_ugi_result.new() - begin - result.success = @handler.set_ugi(args.user_name, args.group_names) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'set_ugi', seqid) - end - - def process_get_delegation_token(seqid, iprot, oprot) - args = read_args(iprot, Get_delegation_token_args) - result = Get_delegation_token_result.new() - begin - result.success = @handler.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_delegation_token', seqid) - end - - def process_renew_delegation_token(seqid, iprot, oprot) - args = read_args(iprot, Renew_delegation_token_args) - result = Renew_delegation_token_result.new() - begin - result.success = @handler.renew_delegation_token(args.token_str_form) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'renew_delegation_token', seqid) - end - - def process_cancel_delegation_token(seqid, iprot, oprot) - args = read_args(iprot, Cancel_delegation_token_args) - result = Cancel_delegation_token_result.new() - begin - @handler.cancel_delegation_token(args.token_str_form) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'cancel_delegation_token', seqid) - end - - def process_add_token(seqid, iprot, oprot) - args = read_args(iprot, Add_token_args) - result = Add_token_result.new() - result.success = @handler.add_token(args.token_identifier, args.delegation_token) - write_result(result, oprot, 'add_token', seqid) - end - - def process_remove_token(seqid, iprot, oprot) - args = read_args(iprot, Remove_token_args) - result = Remove_token_result.new() - result.success = @handler.remove_token(args.token_identifier) - write_result(result, oprot, 'remove_token', seqid) - end - - def process_get_token(seqid, iprot, oprot) - args = read_args(iprot, Get_token_args) - result = Get_token_result.new() - result.success = @handler.get_token(args.token_identifier) - write_result(result, oprot, 'get_token', seqid) - end - - def process_get_all_token_identifiers(seqid, iprot, oprot) - args = read_args(iprot, Get_all_token_identifiers_args) - result = Get_all_token_identifiers_result.new() - result.success = @handler.get_all_token_identifiers() - write_result(result, oprot, 'get_all_token_identifiers', seqid) - end - - def process_add_master_key(seqid, iprot, oprot) - args = read_args(iprot, Add_master_key_args) - result = Add_master_key_result.new() - begin - result.success = @handler.add_master_key(args.key) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'add_master_key', seqid) - end - - def process_update_master_key(seqid, iprot, oprot) - args = read_args(iprot, Update_master_key_args) - result = Update_master_key_result.new() - begin - @handler.update_master_key(args.seq_number, args.key) - rescue ::NoSuchObjectException => o1 - result.o1 = o1 - rescue ::MetaException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'update_master_key', seqid) - end - - def process_remove_master_key(seqid, iprot, oprot) - args = read_args(iprot, Remove_master_key_args) - result = Remove_master_key_result.new() - result.success = @handler.remove_master_key(args.key_seq) - write_result(result, oprot, 'remove_master_key', seqid) - end - - def process_get_master_keys(seqid, iprot, oprot) - args = read_args(iprot, Get_master_keys_args) - result = Get_master_keys_result.new() - result.success = @handler.get_master_keys() - write_result(result, oprot, 'get_master_keys', seqid) - end - - def process_get_open_txns(seqid, iprot, oprot) - args = read_args(iprot, Get_open_txns_args) - result = Get_open_txns_result.new() - result.success = @handler.get_open_txns() - write_result(result, oprot, 'get_open_txns', seqid) - end - - def process_get_open_txns_info(seqid, iprot, oprot) - args = read_args(iprot, Get_open_txns_info_args) - result = Get_open_txns_info_result.new() - result.success = @handler.get_open_txns_info() - write_result(result, oprot, 'get_open_txns_info', seqid) - end - - def process_open_txns(seqid, iprot, oprot) - args = read_args(iprot, Open_txns_args) - result = Open_txns_result.new() - result.success = @handler.open_txns(args.rqst) - write_result(result, oprot, 'open_txns', seqid) - end - - def process_abort_txn(seqid, iprot, oprot) - args = read_args(iprot, Abort_txn_args) - result = Abort_txn_result.new() - begin - @handler.abort_txn(args.rqst) - rescue ::NoSuchTxnException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'abort_txn', seqid) - end - - def process_abort_txns(seqid, iprot, oprot) - args = read_args(iprot, Abort_txns_args) - result = Abort_txns_result.new() - begin - @handler.abort_txns(args.rqst) - rescue ::NoSuchTxnException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'abort_txns', seqid) - end - - def process_commit_txn(seqid, iprot, oprot) - args = read_args(iprot, Commit_txn_args) - result = Commit_txn_result.new() - begin - @handler.commit_txn(args.rqst) - rescue ::NoSuchTxnException => o1 - result.o1 = o1 - rescue ::TxnAbortedException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'commit_txn', seqid) - end - - def process_lock(seqid, iprot, oprot) - args = read_args(iprot, Lock_args) - result = Lock_result.new() - begin - result.success = @handler.lock(args.rqst) - rescue ::NoSuchTxnException => o1 - result.o1 = o1 - rescue ::TxnAbortedException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'lock', seqid) - end - - def process_check_lock(seqid, iprot, oprot) - args = read_args(iprot, Check_lock_args) - result = Check_lock_result.new() - begin - result.success = @handler.check_lock(args.rqst) - rescue ::NoSuchTxnException => o1 - result.o1 = o1 - rescue ::TxnAbortedException => o2 - result.o2 = o2 - rescue ::NoSuchLockException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'check_lock', seqid) - end - - def process_unlock(seqid, iprot, oprot) - args = read_args(iprot, Unlock_args) - result = Unlock_result.new() - begin - @handler.unlock(args.rqst) - rescue ::NoSuchLockException => o1 - result.o1 = o1 - rescue ::TxnOpenException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'unlock', seqid) - end - - def process_show_locks(seqid, iprot, oprot) - args = read_args(iprot, Show_locks_args) - result = Show_locks_result.new() - result.success = @handler.show_locks(args.rqst) - write_result(result, oprot, 'show_locks', seqid) - end - - def process_heartbeat(seqid, iprot, oprot) - args = read_args(iprot, Heartbeat_args) - result = Heartbeat_result.new() - begin - @handler.heartbeat(args.ids) - rescue ::NoSuchLockException => o1 - result.o1 = o1 - rescue ::NoSuchTxnException => o2 - result.o2 = o2 - rescue ::TxnAbortedException => o3 - result.o3 = o3 - end - write_result(result, oprot, 'heartbeat', seqid) - end - - def process_heartbeat_txn_range(seqid, iprot, oprot) - args = read_args(iprot, Heartbeat_txn_range_args) - result = Heartbeat_txn_range_result.new() - result.success = @handler.heartbeat_txn_range(args.txns) - write_result(result, oprot, 'heartbeat_txn_range', seqid) - end - - def process_compact(seqid, iprot, oprot) - args = read_args(iprot, Compact_args) - result = Compact_result.new() - @handler.compact(args.rqst) - write_result(result, oprot, 'compact', seqid) - end - - def process_compact2(seqid, iprot, oprot) - args = read_args(iprot, Compact2_args) - result = Compact2_result.new() - result.success = @handler.compact2(args.rqst) - write_result(result, oprot, 'compact2', seqid) - end - - def process_show_compact(seqid, iprot, oprot) - args = read_args(iprot, Show_compact_args) - result = Show_compact_result.new() - result.success = @handler.show_compact(args.rqst) - write_result(result, oprot, 'show_compact', seqid) - end - - def process_add_dynamic_partitions(seqid, iprot, oprot) - args = read_args(iprot, Add_dynamic_partitions_args) - result = Add_dynamic_partitions_result.new() - begin - @handler.add_dynamic_partitions(args.rqst) - rescue ::NoSuchTxnException => o1 - result.o1 = o1 - rescue ::TxnAbortedException => o2 - result.o2 = o2 - end - write_result(result, oprot, 'add_dynamic_partitions', seqid) - end - - def process_get_next_notification(seqid, iprot, oprot) - args = read_args(iprot, Get_next_notification_args) - result = Get_next_notification_result.new() - result.success = @handler.get_next_notification(args.rqst) - write_result(result, oprot, 'get_next_notification', seqid) - end - - def process_get_current_notificationEventId(seqid, iprot, oprot) - args = read_args(iprot, Get_current_notificationEventId_args) - result = Get_current_notificationEventId_result.new() - result.success = @handler.get_current_notificationEventId() - write_result(result, oprot, 'get_current_notificationEventId', seqid) - end - - def process_fire_listener_event(seqid, iprot, oprot) - args = read_args(iprot, Fire_listener_event_args) - result = Fire_listener_event_result.new() - result.success = @handler.fire_listener_event(args.rqst) - write_result(result, oprot, 'fire_listener_event', seqid) - end - - def process_flushCache(seqid, iprot, oprot) - args = read_args(iprot, FlushCache_args) - result = FlushCache_result.new() - @handler.flushCache() - write_result(result, oprot, 'flushCache', seqid) - end - - def process_cm_recycle(seqid, iprot, oprot) - args = read_args(iprot, Cm_recycle_args) - result = Cm_recycle_result.new() - begin - result.success = @handler.cm_recycle(args.request) - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'cm_recycle', seqid) - end - - def process_get_file_metadata_by_expr(seqid, iprot, oprot) - args = read_args(iprot, Get_file_metadata_by_expr_args) - result = Get_file_metadata_by_expr_result.new() - result.success = @handler.get_file_metadata_by_expr(args.req) - write_result(result, oprot, 'get_file_metadata_by_expr', seqid) - end - - def process_get_file_metadata(seqid, iprot, oprot) - args = read_args(iprot, Get_file_metadata_args) - result = Get_file_metadata_result.new() - result.success = @handler.get_file_metadata(args.req) - write_result(result, oprot, 'get_file_metadata', seqid) - end - - def process_put_file_metadata(seqid, iprot, oprot) - args = read_args(iprot, Put_file_metadata_args) - result = Put_file_metadata_result.new() - result.success = @handler.put_file_metadata(args.req) - write_result(result, oprot, 'put_file_metadata', seqid) - end - - def process_clear_file_metadata(seqid, iprot, oprot) - args = read_args(iprot, Clear_file_metadata_args) - result = Clear_file_metadata_result.new() - result.success = @handler.clear_file_metadata(args.req) - write_result(result, oprot, 'clear_file_metadata', seqid) - end - - def process_cache_file_metadata(seqid, iprot, oprot) - args = read_args(iprot, Cache_file_metadata_args) - result = Cache_file_metadata_result.new() - result.success = @handler.cache_file_metadata(args.req) - write_result(result, oprot, 'cache_file_metadata', seqid) - end - - def process_get_metastore_db_uuid(seqid, iprot, oprot) - args = read_args(iprot, Get_metastore_db_uuid_args) - result = Get_metastore_db_uuid_result.new() - begin - result.success = @handler.get_metastore_db_uuid() - rescue ::MetaException => o1 - result.o1 = o1 - end - write_result(result, oprot, 'get_metastore_db_uuid', seqid) - end - - end - - # HELPER FUNCTIONS AND STRUCTURES - - class GetMetaConf_args - include ::Thrift::Struct, ::Thrift::Struct_Union - KEY = 1 - - FIELDS = { - KEY => {:type => ::Thrift::Types::STRING, :name => 'key'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetMetaConf_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class SetMetaConf_args - include ::Thrift::Struct, ::Thrift::Struct_Union - KEY = 1 - VALUE = 2 - - FIELDS = { - KEY => {:type => ::Thrift::Types::STRING, :name => 'key'}, - VALUE => {:type => ::Thrift::Types::STRING, :name => 'value'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class SetMetaConf_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_database_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DATABASE = 1 - - FIELDS = { - DATABASE => {:type => ::Thrift::Types::STRUCT, :name => 'database', :class => ::Database} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_database_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_database_args - include ::Thrift::Struct, ::Thrift::Struct_Union - NAME = 1 - - FIELDS = { - NAME => {:type => ::Thrift::Types::STRING, :name => 'name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_database_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_database_args - include ::Thrift::Struct, ::Thrift::Struct_Union - NAME = 1 - DELETEDATA = 2 - CASCADE = 3 - - FIELDS = { - NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, - DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'}, - CASCADE => {:type => ::Thrift::Types::BOOL, :name => 'cascade'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_database_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_databases_args - include ::Thrift::Struct, ::Thrift::Struct_Union - PATTERN = 1 - - FIELDS = { - PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_databases_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_all_databases_args - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_all_databases_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_database_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - DB = 2 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - DB => {:type => ::Thrift::Types::STRUCT, :name => 'db', :class => ::Database} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_database_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_type_args - include ::Thrift::Struct, ::Thrift::Struct_Union - NAME = 1 - - FIELDS = { - NAME => {:type => ::Thrift::Types::STRING, :name => 'name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_type_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_type_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TYPE = 1 - - FIELDS = { - TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'type', :class => ::Type} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_type_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_type_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TYPE = 1 - - FIELDS = { - TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_type_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_type_all_args - include ::Thrift::Struct, ::Thrift::Struct_Union - NAME = 1 - - FIELDS = { - NAME => {:type => ::Thrift::Types::STRING, :name => 'name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_type_all_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_fields_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TABLE_NAME = 2 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_fields_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_fields_with_environment_context_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TABLE_NAME = 2 - ENVIRONMENT_CONTEXT = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_fields_with_environment_context_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_schema_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TABLE_NAME = 2 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_schema_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_schema_with_environment_context_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TABLE_NAME = 2 - ENVIRONMENT_CONTEXT = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_schema_with_environment_context_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_table_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TBL = 1 - - FIELDS = { - TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => ::Table} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_table_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - O3 = 3 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_table_with_environment_context_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TBL = 1 - ENVIRONMENT_CONTEXT = 2 - - FIELDS = { - 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 - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_table_with_environment_context_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - O3 = 3 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_table_with_constraints_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TBL = 1 - PRIMARYKEYS = 2 - FOREIGNKEYS = 3 - UNIQUECONSTRAINTS = 4 - NOTNULLCONSTRAINTS = 5 - - FIELDS = { - TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => ::Table}, - PRIMARYKEYS => {:type => ::Thrift::Types::LIST, :name => 'primaryKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLPrimaryKey}}, - FOREIGNKEYS => {:type => ::Thrift::Types::LIST, :name => 'foreignKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLForeignKey}}, - UNIQUECONSTRAINTS => {:type => ::Thrift::Types::LIST, :name => 'uniqueConstraints', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLUniqueConstraint}}, - NOTNULLCONSTRAINTS => {:type => ::Thrift::Types::LIST, :name => 'notNullConstraints', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLNotNullConstraint}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_table_with_constraints_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - O3 = 3 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_constraint_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::DropConstraintRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_constraint_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O3 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_primary_key_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::AddPrimaryKeyRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_primary_key_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_foreign_key_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::AddForeignKeyRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_foreign_key_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_unique_constraint_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::AddUniqueConstraintRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_unique_constraint_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_not_null_constraint_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::AddNotNullConstraintRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_not_null_constraint_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_table_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - NAME = 2 - DELETEDATA = 3 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, - DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_table_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O3 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_table_with_environment_context_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - NAME = 2 - DELETEDATA = 3 - ENVIRONMENT_CONTEXT = 4 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, - DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_table_with_environment_context_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O3 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Truncate_table_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TABLENAME = 2 - PARTNAMES = 3 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, - PARTNAMES => {:type => ::Thrift::Types::LIST, :name => 'partNames', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Truncate_table_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_tables_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - PATTERN = 2 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_tables_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_tables_by_type_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - PATTERN = 2 - TABLETYPE = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'}, - TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_tables_by_type_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_meta_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_PATTERNS = 1 - TBL_PATTERNS = 2 - TBL_TYPES = 3 - - FIELDS = { - DB_PATTERNS => {:type => ::Thrift::Types::STRING, :name => 'db_patterns'}, - TBL_PATTERNS => {:type => ::Thrift::Types::STRING, :name => 'tbl_patterns'}, - TBL_TYPES => {:type => ::Thrift::Types::LIST, :name => 'tbl_types', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_meta_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::TableMeta}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_all_tables_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_all_tables_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBL_NAME = 2 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_objects_by_name_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBL_NAMES = 2 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - TBL_NAMES => {:type => ::Thrift::Types::LIST, :name => 'tbl_names', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_objects_by_name_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Table}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_req_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::GetTableRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_req_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetTableResult}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_objects_by_name_req_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::GetTablesRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_objects_by_name_req_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetTablesResult}, - 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 - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_names_by_filter_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - FILTER = 2 - MAX_TABLES = 3 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'}, - MAX_TABLES => {:type => ::Thrift::Types::I16, :name => 'max_tables', :default => -1} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_names_by_filter_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_table_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBL_NAME = 2 - NEW_TBL = 3 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_table_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_table_with_environment_context_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBL_NAME = 2 - NEW_TBL = 3 - ENVIRONMENT_CONTEXT = 4 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_table_with_environment_context_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_table_with_cascade_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - TBL_NAME = 2 - NEW_TBL = 3 - CASCADE = 4 - - 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}, - CASCADE => {:type => ::Thrift::Types::BOOL, :name => 'cascade'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_table_with_cascade_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_partition_args - include ::Thrift::Struct, ::Thrift::Struct_Union - NEW_PART = 1 - - FIELDS = { - NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => ::Partition} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_partition_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_partition_with_environment_context_args - include ::Thrift::Struct, ::Thrift::Struct_Union - NEW_PART = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_partition_with_environment_context_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_partitions_args - include ::Thrift::Struct, ::Thrift::Struct_Union - NEW_PARTS = 1 - - FIELDS = { - NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_partitions_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_partitions_pspec_args - include ::Thrift::Struct, ::Thrift::Struct_Union - NEW_PARTS = 1 - - FIELDS = { - NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::PartitionSpec}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_partitions_pspec_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Append_partition_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_VALS = 3 - - FIELDS = { - 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}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Append_partition_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_partitions_req_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::AddPartitionsRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_partitions_req_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::AddPartitionsResult}, - 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 - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Append_partition_with_environment_context_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_VALS = 3 - ENVIRONMENT_CONTEXT = 4 - - FIELDS = { - 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}}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Append_partition_with_environment_context_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Append_partition_by_name_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_NAME = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Append_partition_by_name_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Append_partition_by_name_with_environment_context_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_NAME = 3 - ENVIRONMENT_CONTEXT = 4 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Append_partition_by_name_with_environment_context_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_partition_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_VALS = 3 - DELETEDATA = 4 - - FIELDS = { - 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}}, - DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_partition_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_partition_with_environment_context_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_VALS = 3 - DELETEDATA = 4 - ENVIRONMENT_CONTEXT = 5 - - FIELDS = { - 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}}, - DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_partition_with_environment_context_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_partition_by_name_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_NAME = 3 - DELETEDATA = 4 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, - DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_partition_by_name_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_partition_by_name_with_environment_context_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_NAME = 3 - DELETEDATA = 4 - ENVIRONMENT_CONTEXT = 5 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, - DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_partition_by_name_with_environment_context_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_partitions_req_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::DropPartitionsRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_partitions_req_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::DropPartitionsResult}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partition_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_VALS = 3 - - FIELDS = { - 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}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partition_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Exchange_partition_args - include ::Thrift::Struct, ::Thrift::Struct_Union - PARTITIONSPECS = 1 - SOURCE_DB = 2 - SOURCE_TABLE_NAME = 3 - DEST_DB = 4 - DEST_TABLE_NAME = 5 - - FIELDS = { - PARTITIONSPECS => {:type => ::Thrift::Types::MAP, :name => 'partitionSpecs', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - SOURCE_DB => {:type => ::Thrift::Types::STRING, :name => 'source_db'}, - SOURCE_TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'source_table_name'}, - DEST_DB => {:type => ::Thrift::Types::STRING, :name => 'dest_db'}, - DEST_TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'dest_table_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Exchange_partition_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - O4 = 4 - - 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}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidObjectException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Exchange_partitions_args - include ::Thrift::Struct, ::Thrift::Struct_Union - PARTITIONSPECS = 1 - SOURCE_DB = 2 - SOURCE_TABLE_NAME = 3 - DEST_DB = 4 - DEST_TABLE_NAME = 5 - - FIELDS = { - PARTITIONSPECS => {:type => ::Thrift::Types::MAP, :name => 'partitionSpecs', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, - SOURCE_DB => {:type => ::Thrift::Types::STRING, :name => 'source_db'}, - SOURCE_TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'source_table_name'}, - DEST_DB => {:type => ::Thrift::Types::STRING, :name => 'dest_db'}, - DEST_TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'dest_table_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Exchange_partitions_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - O4 = 4 - - 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}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidObjectException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partition_with_auth_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_VALS = 3 - USER_NAME = 4 - GROUP_NAMES = 5 - - FIELDS = { - 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}}, - USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, - GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partition_with_auth_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partition_by_name_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_NAME = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partition_by_name_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - MAX_PARTS = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_with_auth_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - MAX_PARTS = 3 - USER_NAME = 4 - GROUP_NAMES = 5 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1}, - USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, - GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_with_auth_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_pspec_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - MAX_PARTS = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - MAX_PARTS => {:type => ::Thrift::Types::I32, :name => 'max_parts', :default => -1} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_pspec_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::PartitionSpec}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partition_names_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - MAX_PARTS = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partition_names_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O2 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_ps_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_VALS = 3 - MAX_PARTS = 4 - - FIELDS = { - 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}}, - MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_ps_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_ps_with_auth_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_VALS = 3 - MAX_PARTS = 4 - USER_NAME = 5 - GROUP_NAMES = 6 - - FIELDS = { - 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}}, - MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1}, - USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, - GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_ps_with_auth_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partition_names_ps_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_VALS = 3 - MAX_PARTS = 4 - - FIELDS = { - 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}}, - MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partition_names_ps_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_by_filter_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - FILTER = 3 - MAX_PARTS = 4 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'}, - MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_by_filter_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_part_specs_by_filter_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - FILTER = 3 - MAX_PARTS = 4 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'}, - MAX_PARTS => {:type => ::Thrift::Types::I32, :name => 'max_parts', :default => -1} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_part_specs_by_filter_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::PartitionSpec}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_by_expr_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::PartitionsByExprRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_by_expr_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::PartitionsByExprResult}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_num_partitions_by_filter_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - FILTER = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_num_partitions_by_filter_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_by_names_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - NAMES = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - NAMES => {:type => ::Thrift::Types::LIST, :name => 'names', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_by_names_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_partition_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - NEW_PART = 3 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_partition_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_partitions_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - NEW_PARTS = 3 - - 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}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_partitions_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_partitions_with_environment_context_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - NEW_PARTS = 3 - ENVIRONMENT_CONTEXT = 4 - - 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}}, - ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_partitions_with_environment_context_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_partition_with_environment_context_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - NEW_PART = 3 - ENVIRONMENT_CONTEXT = 4 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_partition_with_environment_context_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Rename_partition_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_VALS = 3 - NEW_PART = 4 - - FIELDS = { - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Rename_partition_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Partition_name_has_valid_characters_args - include ::Thrift::Struct, ::Thrift::Struct_Union - PART_VALS = 1 - THROW_EXCEPTION = 2 - - FIELDS = { - PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}, - THROW_EXCEPTION => {:type => ::Thrift::Types::BOOL, :name => 'throw_exception'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Partition_name_has_valid_characters_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_config_value_args - include ::Thrift::Struct, ::Thrift::Struct_Union - NAME = 1 - DEFAULTVALUE = 2 - - FIELDS = { - NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, - DEFAULTVALUE => {:type => ::Thrift::Types::STRING, :name => 'defaultValue'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_config_value_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::ConfigValSecurityException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Partition_name_to_vals_args - include ::Thrift::Struct, ::Thrift::Struct_Union - PART_NAME = 1 - - FIELDS = { - PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Partition_name_to_vals_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Partition_name_to_spec_args - include ::Thrift::Struct, ::Thrift::Struct_Union - PART_NAME = 1 - - FIELDS = { - PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Partition_name_to_spec_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class MarkPartitionForEvent_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_VALS = 3 - EVENTTYPE = 4 - - FIELDS = { - 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} - } - - def struct_fields; FIELDS; end - - def validate - unless @eventType.nil? || ::PartitionEventType::VALID_VALUES.include?(@eventType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field eventType!') - end - end - - ::Thrift::Struct.generate_accessors self - end - - class MarkPartitionForEvent_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - O3 = 3 - O4 = 4 - O5 = 5 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class IsPartitionMarkedForEvent_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_VALS = 3 - EVENTTYPE = 4 - - FIELDS = { - 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} - } - - def struct_fields; FIELDS; end - - def validate - unless @eventType.nil? || ::PartitionEventType::VALID_VALUES.include?(@eventType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field eventType!') - end - end - - ::Thrift::Struct.generate_accessors self - end - - class IsPartitionMarkedForEvent_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - O4 = 4 - O5 = 5 - O6 = 6 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_index_args - include ::Thrift::Struct, ::Thrift::Struct_Union - NEW_INDEX = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_index_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_index_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - BASE_TBL_NAME = 2 - IDX_NAME = 3 - NEW_IDX = 4 - - FIELDS = { - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_index_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_index_by_name_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - INDEX_NAME = 3 - DELETEDATA = 4 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - INDEX_NAME => {:type => ::Thrift::Types::STRING, :name => 'index_name'}, - DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_index_by_name_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_index_by_name_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - INDEX_NAME = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - INDEX_NAME => {:type => ::Thrift::Types::STRING, :name => 'index_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_index_by_name_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_indexes_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - MAX_INDEXES = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - MAX_INDEXES => {:type => ::Thrift::Types::I16, :name => 'max_indexes', :default => -1} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_indexes_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_index_names_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - MAX_INDEXES = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - MAX_INDEXES => {:type => ::Thrift::Types::I16, :name => 'max_indexes', :default => -1} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_index_names_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O2 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_primary_keys_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::PrimaryKeysRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_primary_keys_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::PrimaryKeysResponse}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_foreign_keys_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::ForeignKeysRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_foreign_keys_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ForeignKeysResponse}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_unique_constraints_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::UniqueConstraintsRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_unique_constraints_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::UniqueConstraintsResponse}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_not_null_constraints_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::NotNullConstraintsRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_not_null_constraints_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::NotNullConstraintsResponse}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Update_table_column_statistics_args - include ::Thrift::Struct, ::Thrift::Struct_Union - STATS_OBJ = 1 - - FIELDS = { - STATS_OBJ => {:type => ::Thrift::Types::STRUCT, :name => 'stats_obj', :class => ::ColumnStatistics} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Update_table_column_statistics_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - O4 = 4 - - 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 => ::InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Update_partition_column_statistics_args - include ::Thrift::Struct, ::Thrift::Struct_Union - STATS_OBJ = 1 - - FIELDS = { - STATS_OBJ => {:type => ::Thrift::Types::STRUCT, :name => 'stats_obj', :class => ::ColumnStatistics} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Update_partition_column_statistics_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - O4 = 4 - - 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 => ::InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_column_statistics_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - COL_NAME = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_column_statistics_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - O4 = 4 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ColumnStatistics}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidInputException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidObjectException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partition_column_statistics_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_NAME = 3 - COL_NAME = 4 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, - COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partition_column_statistics_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - O4 = 4 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ColumnStatistics}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidInputException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidObjectException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_statistics_req_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::TableStatsRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_table_statistics_req_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::TableStatsResult}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_statistics_req_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::PartitionsStatsRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_partitions_statistics_req_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::PartitionsStatsResult}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_aggr_stats_for_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::PartitionsStatsRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_aggr_stats_for_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::AggrStats}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Set_aggr_stats_for_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::SetPartitionsStatsRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Set_aggr_stats_for_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - O4 = 4 - - 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 => ::InvalidObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Delete_partition_column_statistics_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - PART_NAME = 3 - COL_NAME = 4 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, - COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Delete_partition_column_statistics_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - O4 = 4 - - 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}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidObjectException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Delete_table_column_statistics_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DB_NAME = 1 - TBL_NAME = 2 - COL_NAME = 3 - - FIELDS = { - DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, - TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Delete_table_column_statistics_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - O4 = 4 - - 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}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidObjectException}, - O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_function_args - include ::Thrift::Struct, ::Thrift::Struct_Union - FUNC = 1 - - FIELDS = { - FUNC => {:type => ::Thrift::Types::STRUCT, :name => 'func', :class => ::Function} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_function_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - O3 = 3 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_function_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - FUNCNAME = 2 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - FUNCNAME => {:type => ::Thrift::Types::STRING, :name => 'funcName'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_function_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O3 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_function_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - FUNCNAME = 2 - NEWFUNC = 3 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - FUNCNAME => {:type => ::Thrift::Types::STRING, :name => 'funcName'}, - NEWFUNC => {:type => ::Thrift::Types::STRUCT, :name => 'newFunc', :class => ::Function} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Alter_function_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_functions_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - PATTERN = 2 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_functions_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_function_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DBNAME = 1 - FUNCNAME = 2 - - FIELDS = { - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, - FUNCNAME => {:type => ::Thrift::Types::STRING, :name => 'funcName'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_function_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Function}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_all_functions_args - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_all_functions_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetAllFunctionsResponse}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_role_args - include ::Thrift::Struct, ::Thrift::Struct_Union - ROLE = 1 - - FIELDS = { - ROLE => {:type => ::Thrift::Types::STRUCT, :name => 'role', :class => ::Role} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Create_role_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_role_args - include ::Thrift::Struct, ::Thrift::Struct_Union - ROLE_NAME = 1 - - FIELDS = { - ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Drop_role_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_role_names_args - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_role_names_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Grant_role_args - include ::Thrift::Struct, ::Thrift::Struct_Union - ROLE_NAME = 1 - PRINCIPAL_NAME = 2 - PRINCIPAL_TYPE = 3 - GRANTOR = 4 - GRANTORTYPE = 5 - GRANT_OPTION = 6 - - 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}, - GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'}, - 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) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') - end - unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!') - end - end - - ::Thrift::Struct.generate_accessors self - end - - class Grant_role_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Revoke_role_args - include ::Thrift::Struct, ::Thrift::Struct_Union - ROLE_NAME = 1 - PRINCIPAL_NAME = 2 - PRINCIPAL_TYPE = 3 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - 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 - - ::Thrift::Struct.generate_accessors self - end - - class Revoke_role_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class List_roles_args - include ::Thrift::Struct, ::Thrift::Struct_Union - PRINCIPAL_NAME = 1 - PRINCIPAL_TYPE = 2 - - FIELDS = { - PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, - 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) - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') - end - end - - ::Thrift::Struct.generate_accessors self - end - - class List_roles_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Grant_revoke_role_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::GrantRevokeRoleRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Grant_revoke_role_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GrantRevokeRoleResponse}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_principals_in_role_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::GetPrincipalsInRoleRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_principals_in_role_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetPrincipalsInRoleResponse}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_role_grants_for_principal_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::GetRoleGrantsForPrincipalRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_role_grants_for_principal_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetRoleGrantsForPrincipalResponse}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_privilege_set_args - include ::Thrift::Struct, ::Thrift::Struct_Union - HIVEOBJECT = 1 - USER_NAME = 2 - GROUP_NAMES = 3 - - FIELDS = { - 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}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_privilege_set_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::PrincipalPrivilegeSet}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class List_privileges_args - include ::Thrift::Struct, ::Thrift::Struct_Union - PRINCIPAL_NAME = 1 - PRINCIPAL_TYPE = 2 - HIVEOBJECT = 3 - - 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} - } - - def struct_fields; FIELDS; end - - def validate - 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 - - ::Thrift::Struct.generate_accessors self - end - - class List_privileges_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - 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} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Grant_privileges_args - include ::Thrift::Struct, ::Thrift::Struct_Union - PRIVILEGES = 1 - - FIELDS = { - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrivilegeBag} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Grant_privileges_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Revoke_privileges_args - include ::Thrift::Struct, ::Thrift::Struct_Union - PRIVILEGES = 1 - - FIELDS = { - PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrivilegeBag} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Revoke_privileges_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Grant_revoke_privileges_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::GrantRevokePrivilegeRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Grant_revoke_privileges_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GrantRevokePrivilegeResponse}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Set_ugi_args - include ::Thrift::Struct, ::Thrift::Struct_Union - USER_NAME = 1 - GROUP_NAMES = 2 - - FIELDS = { - USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, - GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Set_ugi_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_delegation_token_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TOKEN_OWNER = 1 - RENEWER_KERBEROS_PRINCIPAL_NAME = 2 - - FIELDS = { - TOKEN_OWNER => {:type => ::Thrift::Types::STRING, :name => 'token_owner'}, - RENEWER_KERBEROS_PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'renewer_kerberos_principal_name'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_delegation_token_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Renew_delegation_token_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TOKEN_STR_FORM = 1 - - FIELDS = { - TOKEN_STR_FORM => {:type => ::Thrift::Types::STRING, :name => 'token_str_form'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Renew_delegation_token_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::I64, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Cancel_delegation_token_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TOKEN_STR_FORM = 1 - - FIELDS = { - TOKEN_STR_FORM => {:type => ::Thrift::Types::STRING, :name => 'token_str_form'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Cancel_delegation_token_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_token_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TOKEN_IDENTIFIER = 1 - DELEGATION_TOKEN = 2 - - FIELDS = { - TOKEN_IDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'token_identifier'}, - DELEGATION_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'delegation_token'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_token_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Remove_token_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TOKEN_IDENTIFIER = 1 - - FIELDS = { - TOKEN_IDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'token_identifier'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Remove_token_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_token_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TOKEN_IDENTIFIER = 1 - - FIELDS = { - TOKEN_IDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'token_identifier'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_token_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_all_token_identifiers_args - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_all_token_identifiers_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_master_key_args - include ::Thrift::Struct, ::Thrift::Struct_Union - KEY = 1 - - FIELDS = { - KEY => {:type => ::Thrift::Types::STRING, :name => 'key'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_master_key_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Update_master_key_args - include ::Thrift::Struct, ::Thrift::Struct_Union - SEQ_NUMBER = 1 - KEY = 2 - - FIELDS = { - SEQ_NUMBER => {:type => ::Thrift::Types::I32, :name => 'seq_number'}, - KEY => {:type => ::Thrift::Types::STRING, :name => 'key'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Update_master_key_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Remove_master_key_args - include ::Thrift::Struct, ::Thrift::Struct_Union - KEY_SEQ = 1 - - FIELDS = { - KEY_SEQ => {:type => ::Thrift::Types::I32, :name => 'key_seq'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Remove_master_key_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_master_keys_args - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_master_keys_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_open_txns_args - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_open_txns_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetOpenTxnsResponse} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_open_txns_info_args - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_open_txns_info_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetOpenTxnsInfoResponse} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Open_txns_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::OpenTxnRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Open_txns_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::OpenTxnsResponse} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Abort_txn_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::AbortTxnRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Abort_txn_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Abort_txns_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::AbortTxnsRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Abort_txns_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Commit_txn_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::CommitTxnRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Commit_txn_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::TxnAbortedException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Lock_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::LockRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Lock_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::LockResponse}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::TxnAbortedException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Check_lock_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::CheckLockRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Check_lock_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - O2 = 2 - O3 = 3 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::LockResponse}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::TxnAbortedException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::NoSuchLockException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Unlock_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::UnlockRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Unlock_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchLockException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::TxnOpenException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Show_locks_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::ShowLocksRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Show_locks_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ShowLocksResponse} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Heartbeat_args - include ::Thrift::Struct, ::Thrift::Struct_Union - IDS = 1 - - FIELDS = { - IDS => {:type => ::Thrift::Types::STRUCT, :name => 'ids', :class => ::HeartbeatRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Heartbeat_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - O3 = 3 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchLockException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchTxnException}, - O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::TxnAbortedException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Heartbeat_txn_range_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TXNS = 1 - - FIELDS = { - TXNS => {:type => ::Thrift::Types::STRUCT, :name => 'txns', :class => ::HeartbeatTxnRangeRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Heartbeat_txn_range_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::HeartbeatTxnRangeResponse} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Compact_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::CompactionRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Compact_result - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Compact2_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::CompactionRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Compact2_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::CompactionResponse} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Show_compact_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::ShowCompactRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Show_compact_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ShowCompactResponse} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_dynamic_partitions_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::AddDynamicPartitions} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Add_dynamic_partitions_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - - FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::TxnAbortedException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_next_notification_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::NotificationEventRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_next_notification_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::NotificationEventResponse} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_current_notificationEventId_args - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_current_notificationEventId_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::CurrentNotificationEventId} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Fire_listener_event_args - include ::Thrift::Struct, ::Thrift::Struct_Union - RQST = 1 - - FIELDS = { - RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::FireEventRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Fire_listener_event_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::FireEventResponse} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class FlushCache_args - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class FlushCache_result - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Cm_recycle_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQUEST = 1 - - FIELDS = { - REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::CmRecycleRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Cm_recycle_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::CmRecycleResponse}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_file_metadata_by_expr_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::GetFileMetadataByExprRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_file_metadata_by_expr_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetFileMetadataByExprResult} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_file_metadata_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::GetFileMetadataRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_file_metadata_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetFileMetadataResult} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Put_file_metadata_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::PutFileMetadataRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Put_file_metadata_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::PutFileMetadataResult} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Clear_file_metadata_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::ClearFileMetadataRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Clear_file_metadata_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ClearFileMetadataResult} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Cache_file_metadata_args - include ::Thrift::Struct, ::Thrift::Struct_Union - REQ = 1 - - FIELDS = { - REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::CacheFileMetadataRequest} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Cache_file_metadata_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::CacheFileMetadataResult} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_metastore_db_uuid_args - include ::Thrift::Struct, ::Thrift::Struct_Union - - FIELDS = { - - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_metastore_db_uuid_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - O1 = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - -end - diff --git metastore/src/main/resources/thrift-replacements.txt metastore/src/main/resources/thrift-replacements.txt deleted file mode 100644 index 528ed08..0000000 --- metastore/src/main/resources/thrift-replacements.txt +++ /dev/null @@ -1,60 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################################### -# # -# Used for the internalizing of String instance field assignments in the Thrift generated files # -# FieldSchema.java, Partition.java, SerDeInfo.java, and StorageDescriptor.java. # -# # -# Look in hive/metastore/pom.xml for the thriftif profile. # -# Usage: thriftif profile automatically refers to this file. # -# # -################################################################################################### - -# Fix constructors and setters of String instance fields - -this\.name\ \=\ name;=this.name\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(name); -this\.serializationLib\ \=\ serializationLib;=this.serializationLib\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(serializationLib); -this\.type\ \=\ type;=this.type\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(type); -this\.comment\ \=\ comment;=this.comment\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(comment); -this\.location\ \=\ location;=this.location\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(location); -this\.inputFormat\ \=\ inputFormat;=this.inputFormat\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(inputFormat); -this\.outputFormat\ \=\ outputFormat;=this.outputFormat\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(outputFormat); -this\.dbName\ \=\ dbName;=this.dbName\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(dbName); -this\.tableName\ \=\ tableName;=this.tableName\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(tableName); - -# Fix constructors and setters of List instance fields - -this\.bucketCols\ \=\ bucketCols;=this.bucketCols\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(bucketCols); - -# Fix constructors and setters of Map instance fields - -this\.parameters\ \=\ parameters;=this.parameters\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(parameters); - -# Fix copy constructors - -this\.name\ \=\ other\.name;=this.name\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(other.name); -this\.serializationLib\ \=\ other\.serializationLib;=this.serializationLib\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(other.serializationLib); -this\.type\ \=\ other\.type;=this.type\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(other.type); -this\.comment\ \=\ other\.comment;=this.comment\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(other.comment); -this\.location\ \=\ other\.location;=this.location\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(other.location); -this\.inputFormat\ \=\ other\.inputFormat;=this.inputFormat\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(other.inputFormat); -this\.outputFormat\ \=\ other\.outputFormat;=this.outputFormat\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(other.outputFormat); -this\.dbName\ \=\ other\.dbName;=this.dbName\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(other.dbName); -this\.tableName\ \=\ other\.tableName;=this.tableName\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(other.tableName); - -__this__parameters_copy_key\ \=\ other_element_key;=__this__parameters_copy_key\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(other_element_key); -__this__parameters_copy_value\ \=\ other_element_value;=__this__parameters_copy_value\ \=\ org.apache.hive.common.util.HiveStringUtils.intern(other_element_value); -__this_values\.add(other_element);=__this_values.add(org.apache.hive.common.util.HiveStringUtils.intern(other_element)); diff --git pom.xml pom.xml index 6f6d9f4..9c2967f 100644 --- pom.xml +++ pom.xml @@ -1263,7 +1263,7 @@ - + diff --git ql/pom.xml ql/pom.xml index 5732965..16b88d6 100644 --- ql/pom.xml +++ ql/pom.xml @@ -871,10 +871,11 @@ org.apache.hive:hive-llap-common org.apache.hive:hive-llap-client org.apache.hive:hive-metastore + org.apache.hive:hive-standalone-metastore org.apache.hive:hive-service-rpc com.esotericsoftware:kryo-shaded - com.esotericsoftware:minlog - org.objenesis:objenesis + com.esotericsoftware:minlog + org.objenesis:objenesis org.apache.parquet:parquet-hadoop-bundle org.apache.thrift:libthrift org.apache.thrift:libfb303 diff --git standalone-metastore/pom.xml standalone-metastore/pom.xml index ffb2ee2..9ee16bd 100644 --- standalone-metastore/pom.xml +++ standalone-metastore/pom.xml @@ -59,6 +59,16 @@ hive-storage-api ${storage-api.version} + + org.apache.thrift + libfb303 + ${libfb303.version} + + + org.apache.thrift + libthrift + ${libthrift.version} + @@ -76,4 +86,65 @@ + + + thriftif + + + + com.google.code.maven-replacer-plugin + replacer + 1.5.3 + + + process-thrift-sources + process-sources + + replace + + + + + ${basedir}/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ + + FieldSchema.java + Partition.java + SerDeInfo.java + StorageDescriptor.java + + ${basedir}/src/main/resources/thrift-replacements.txt + true + false + + + + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-source + generate-sources + + add-source + + + + src/gen/thrift/gen-javabean + + + + + + + + + diff --git standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp new file mode 100644 index 0000000..f4cc70f --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp @@ -0,0 +1,73653 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "ThriftHiveMetastore.h" + +namespace Apache { namespace Hadoop { namespace Hive { + + +ThriftHiveMetastore_getMetaConf_args::~ThriftHiveMetastore_getMetaConf_args() throw() { +} + + +uint32_t ThriftHiveMetastore_getMetaConf_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->key); + this->__isset.key = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_getMetaConf_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_getMetaConf_args"); + + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->key); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_getMetaConf_pargs::~ThriftHiveMetastore_getMetaConf_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_getMetaConf_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_getMetaConf_pargs"); + + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->key))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_getMetaConf_result::~ThriftHiveMetastore_getMetaConf_result() throw() { +} + + +uint32_t ThriftHiveMetastore_getMetaConf_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_getMetaConf_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_getMetaConf_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_getMetaConf_presult::~ThriftHiveMetastore_getMetaConf_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_getMetaConf_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_setMetaConf_args::~ThriftHiveMetastore_setMetaConf_args() throw() { +} + + +uint32_t ThriftHiveMetastore_setMetaConf_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->key); + this->__isset.key = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->value); + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_setMetaConf_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_setMetaConf_args"); + + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->key); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->value); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_setMetaConf_pargs::~ThriftHiveMetastore_setMetaConf_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_setMetaConf_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_setMetaConf_pargs"); + + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->key))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->value))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_setMetaConf_result::~ThriftHiveMetastore_setMetaConf_result() throw() { +} + + +uint32_t ThriftHiveMetastore_setMetaConf_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_setMetaConf_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_setMetaConf_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_setMetaConf_presult::~ThriftHiveMetastore_setMetaConf_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_setMetaConf_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_create_database_args::~ThriftHiveMetastore_create_database_args() throw() { +} + + +uint32_t ThriftHiveMetastore_create_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->database.read(iprot); + this->__isset.database = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_create_database_pargs::~ThriftHiveMetastore_create_database_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_create_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_create_database_result::~ThriftHiveMetastore_create_database_result() throw() { +} + + +uint32_t ThriftHiveMetastore_create_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_database_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_database_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_create_database_presult::~ThriftHiveMetastore_create_database_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_create_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_database_args::~ThriftHiveMetastore_get_database_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_database_pargs::~ThriftHiveMetastore_get_database_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_database_result::~ThriftHiveMetastore_get_database_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_database_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_database_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_database_presult::~ThriftHiveMetastore_get_database_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_database_args::~ThriftHiveMetastore_drop_database_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->cascade); + this->__isset.cascade = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_drop_database_pargs::~ThriftHiveMetastore_drop_database_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_drop_database_result::~ThriftHiveMetastore_drop_database_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_database_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_database_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_database_presult::~ThriftHiveMetastore_drop_database_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_databases_args::~ThriftHiveMetastore_get_databases_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_databases_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->pattern); + this->__isset.pattern = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_databases_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_databases_pargs::~ThriftHiveMetastore_get_databases_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_databases_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_databases_result::~ThriftHiveMetastore_get_databases_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_databases_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size861; + ::apache::thrift::protocol::TType _etype864; + xfer += iprot->readListBegin(_etype864, _size861); + this->success.resize(_size861); + uint32_t _i865; + for (_i865 = 0; _i865 < _size861; ++_i865) + { + xfer += iprot->readString(this->success[_i865]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_databases_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_databases_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter866; + for (_iter866 = this->success.begin(); _iter866 != this->success.end(); ++_iter866) + { + xfer += oprot->writeString((*_iter866)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_databases_presult::~ThriftHiveMetastore_get_databases_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_databases_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size867; + ::apache::thrift::protocol::TType _etype870; + xfer += iprot->readListBegin(_etype870, _size867); + (*(this->success)).resize(_size867); + uint32_t _i871; + for (_i871 = 0; _i871 < _size867; ++_i871) + { + xfer += iprot->readString((*(this->success))[_i871]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_all_databases_args::~ThriftHiveMetastore_get_all_databases_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_databases_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_all_databases_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_all_databases_pargs::~ThriftHiveMetastore_get_all_databases_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_databases_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_all_databases_result::~ThriftHiveMetastore_get_all_databases_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_databases_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size872; + ::apache::thrift::protocol::TType _etype875; + xfer += iprot->readListBegin(_etype875, _size872); + this->success.resize(_size872); + uint32_t _i876; + for (_i876 = 0; _i876 < _size872; ++_i876) + { + xfer += iprot->readString(this->success[_i876]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_all_databases_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter877; + for (_iter877 = this->success.begin(); _iter877 != this->success.end(); ++_iter877) + { + xfer += oprot->writeString((*_iter877)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_all_databases_presult::~ThriftHiveMetastore_get_all_databases_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_databases_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size878; + ::apache::thrift::protocol::TType _etype881; + xfer += iprot->readListBegin(_etype881, _size878); + (*(this->success)).resize(_size878); + uint32_t _i882; + for (_i882 = 0; _i882 < _size878; ++_i882) + { + xfer += iprot->readString((*(this->success))[_i882]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_alter_database_args::~ThriftHiveMetastore_alter_database_args() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->db.read(iprot); + this->__isset.db = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_alter_database_pargs::~ThriftHiveMetastore_alter_database_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_alter_database_result::~ThriftHiveMetastore_alter_database_result() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_database_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_database_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_database_presult::~ThriftHiveMetastore_alter_database_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_type_args::~ThriftHiveMetastore_get_type_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_type_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_type_pargs::~ThriftHiveMetastore_get_type_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_type_result::~ThriftHiveMetastore_get_type_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_type_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_type_presult::~ThriftHiveMetastore_get_type_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_create_type_args::~ThriftHiveMetastore_create_type_args() throw() { +} + + +uint32_t ThriftHiveMetastore_create_type_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->type.read(iprot); + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_create_type_pargs::~ThriftHiveMetastore_create_type_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_create_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_create_type_result::~ThriftHiveMetastore_create_type_result() throw() { +} + + +uint32_t ThriftHiveMetastore_create_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_type_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_type_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_create_type_presult::~ThriftHiveMetastore_create_type_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_create_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_type_args::~ThriftHiveMetastore_drop_type_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_type_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->type); + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_drop_type_pargs::~ThriftHiveMetastore_drop_type_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_drop_type_result::~ThriftHiveMetastore_drop_type_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_type_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_type_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_type_presult::~ThriftHiveMetastore_drop_type_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_type_all_args::~ThriftHiveMetastore_get_type_all_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_type_all_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_type_all_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_type_all_pargs::~ThriftHiveMetastore_get_type_all_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_type_all_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_type_all_result::~ThriftHiveMetastore_get_type_all_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_type_all_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->success.clear(); + uint32_t _size883; + ::apache::thrift::protocol::TType _ktype884; + ::apache::thrift::protocol::TType _vtype885; + xfer += iprot->readMapBegin(_ktype884, _vtype885, _size883); + uint32_t _i887; + for (_i887 = 0; _i887 < _size883; ++_i887) + { + std::string _key888; + xfer += iprot->readString(_key888); + Type& _val889 = this->success[_key888]; + xfer += _val889.read(iprot); + } + xfer += iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_type_all_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_all_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::map ::const_iterator _iter890; + for (_iter890 = this->success.begin(); _iter890 != this->success.end(); ++_iter890) + { + xfer += oprot->writeString(_iter890->first); + xfer += _iter890->second.write(oprot); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_type_all_presult::~ThriftHiveMetastore_get_type_all_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_type_all_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + (*(this->success)).clear(); + uint32_t _size891; + ::apache::thrift::protocol::TType _ktype892; + ::apache::thrift::protocol::TType _vtype893; + xfer += iprot->readMapBegin(_ktype892, _vtype893, _size891); + uint32_t _i895; + for (_i895 = 0; _i895 < _size891; ++_i895) + { + std::string _key896; + xfer += iprot->readString(_key896); + Type& _val897 = (*(this->success))[_key896]; + xfer += _val897.read(iprot); + } + xfer += iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_fields_args::~ThriftHiveMetastore_get_fields_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_fields_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_fields_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_fields_pargs::~ThriftHiveMetastore_get_fields_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_fields_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_fields_result::~ThriftHiveMetastore_get_fields_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_fields_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size898; + ::apache::thrift::protocol::TType _etype901; + xfer += iprot->readListBegin(_etype901, _size898); + this->success.resize(_size898); + uint32_t _i902; + for (_i902 = 0; _i902 < _size898; ++_i902) + { + xfer += this->success[_i902].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_fields_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter903; + for (_iter903 = this->success.begin(); _iter903 != this->success.end(); ++_iter903) + { + xfer += (*_iter903).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_fields_presult::~ThriftHiveMetastore_get_fields_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_fields_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size904; + ::apache::thrift::protocol::TType _etype907; + xfer += iprot->readListBegin(_etype907, _size904); + (*(this->success)).resize(_size904); + uint32_t _i908; + for (_i908 = 0; _i908 < _size904; ++_i908) + { + xfer += (*(this->success))[_i908].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_fields_with_environment_context_args::~ThriftHiveMetastore_get_fields_with_environment_context_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_fields_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environment_context.read(iprot); + this->__isset.environment_context = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_fields_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_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("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->environment_context.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_fields_with_environment_context_pargs::~ThriftHiveMetastore_get_fields_with_environment_context_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_fields_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_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("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->environment_context)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_fields_with_environment_context_result::~ThriftHiveMetastore_get_fields_with_environment_context_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_fields_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size909; + ::apache::thrift::protocol::TType _etype912; + xfer += iprot->readListBegin(_etype912, _size909); + this->success.resize(_size909); + uint32_t _i913; + for (_i913 = 0; _i913 < _size909; ++_i913) + { + xfer += this->success[_i913].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_fields_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_with_environment_context_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter914; + for (_iter914 = this->success.begin(); _iter914 != this->success.end(); ++_iter914) + { + xfer += (*_iter914).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_fields_with_environment_context_presult::~ThriftHiveMetastore_get_fields_with_environment_context_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_fields_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size915; + ::apache::thrift::protocol::TType _etype918; + xfer += iprot->readListBegin(_etype918, _size915); + (*(this->success)).resize(_size915); + uint32_t _i919; + for (_i919 = 0; _i919 < _size915; ++_i919) + { + xfer += (*(this->success))[_i919].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_schema_args::~ThriftHiveMetastore_get_schema_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_schema_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_schema_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_schema_pargs::~ThriftHiveMetastore_get_schema_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_schema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_schema_result::~ThriftHiveMetastore_get_schema_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_schema_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size920; + ::apache::thrift::protocol::TType _etype923; + xfer += iprot->readListBegin(_etype923, _size920); + this->success.resize(_size920); + uint32_t _i924; + for (_i924 = 0; _i924 < _size920; ++_i924) + { + xfer += this->success[_i924].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_schema_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter925; + for (_iter925 = this->success.begin(); _iter925 != this->success.end(); ++_iter925) + { + xfer += (*_iter925).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_schema_presult::~ThriftHiveMetastore_get_schema_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_schema_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size926; + ::apache::thrift::protocol::TType _etype929; + xfer += iprot->readListBegin(_etype929, _size926); + (*(this->success)).resize(_size926); + uint32_t _i930; + for (_i930 = 0; _i930 < _size926; ++_i930) + { + xfer += (*(this->success))[_i930].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_schema_with_environment_context_args::~ThriftHiveMetastore_get_schema_with_environment_context_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_schema_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environment_context.read(iprot); + this->__isset.environment_context = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_schema_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_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("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->environment_context.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_schema_with_environment_context_pargs::~ThriftHiveMetastore_get_schema_with_environment_context_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_schema_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_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("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->environment_context)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_schema_with_environment_context_result::~ThriftHiveMetastore_get_schema_with_environment_context_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_schema_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size931; + ::apache::thrift::protocol::TType _etype934; + xfer += iprot->readListBegin(_etype934, _size931); + this->success.resize(_size931); + uint32_t _i935; + for (_i935 = 0; _i935 < _size931; ++_i935) + { + xfer += this->success[_i935].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_schema_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_with_environment_context_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter936; + for (_iter936 = this->success.begin(); _iter936 != this->success.end(); ++_iter936) + { + xfer += (*_iter936).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_schema_with_environment_context_presult::~ThriftHiveMetastore_get_schema_with_environment_context_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_schema_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size937; + ::apache::thrift::protocol::TType _etype940; + xfer += iprot->readListBegin(_etype940, _size937); + (*(this->success)).resize(_size937); + uint32_t _i941; + for (_i941 = 0; _i941 < _size937; ++_i941) + { + xfer += (*(this->success))[_i941].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_create_table_args::~ThriftHiveMetastore_create_table_args() throw() { +} + + +uint32_t ThriftHiveMetastore_create_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tbl.read(iprot); + this->__isset.tbl = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_create_table_pargs::~ThriftHiveMetastore_create_table_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_create_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_create_table_result::~ThriftHiveMetastore_create_table_result() throw() { +} + + +uint32_t ThriftHiveMetastore_create_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_create_table_presult::~ThriftHiveMetastore_create_table_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_create_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_create_table_with_environment_context_args::~ThriftHiveMetastore_create_table_with_environment_context_args() throw() { +} + + +uint32_t ThriftHiveMetastore_create_table_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tbl.read(iprot); + this->__isset.tbl = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environment_context.read(iprot); + this->__isset.environment_context = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_table_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_create_table_with_environment_context_pargs::~ThriftHiveMetastore_create_table_with_environment_context_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_create_table_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_create_table_with_environment_context_result::~ThriftHiveMetastore_create_table_with_environment_context_result() throw() { +} + + +uint32_t ThriftHiveMetastore_create_table_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_table_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_with_environment_context_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_create_table_with_environment_context_presult::~ThriftHiveMetastore_create_table_with_environment_context_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_create_table_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_create_table_with_constraints_args::~ThriftHiveMetastore_create_table_with_constraints_args() throw() { +} + + +uint32_t ThriftHiveMetastore_create_table_with_constraints_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->tbl.read(iprot); + this->__isset.tbl = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->primaryKeys.clear(); + uint32_t _size942; + ::apache::thrift::protocol::TType _etype945; + xfer += iprot->readListBegin(_etype945, _size942); + this->primaryKeys.resize(_size942); + uint32_t _i946; + for (_i946 = 0; _i946 < _size942; ++_i946) + { + xfer += this->primaryKeys[_i946].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.primaryKeys = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->foreignKeys.clear(); + uint32_t _size947; + ::apache::thrift::protocol::TType _etype950; + xfer += iprot->readListBegin(_etype950, _size947); + this->foreignKeys.resize(_size947); + uint32_t _i951; + for (_i951 = 0; _i951 < _size947; ++_i951) + { + xfer += this->foreignKeys[_i951].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.foreignKeys = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->uniqueConstraints.clear(); + uint32_t _size952; + ::apache::thrift::protocol::TType _etype955; + xfer += iprot->readListBegin(_etype955, _size952); + this->uniqueConstraints.resize(_size952); + uint32_t _i956; + for (_i956 = 0; _i956 < _size952; ++_i956) + { + xfer += this->uniqueConstraints[_i956].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.uniqueConstraints = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->notNullConstraints.clear(); + uint32_t _size957; + ::apache::thrift::protocol::TType _etype960; + xfer += iprot->readListBegin(_etype960, _size957); + this->notNullConstraints.resize(_size957); + uint32_t _i961; + for (_i961 = 0; _i961 < _size957; ++_i961) + { + xfer += this->notNullConstraints[_i961].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.notNullConstraints = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_table_with_constraints_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_with_constraints_args"); + + xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->tbl.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("primaryKeys", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->primaryKeys.size())); + std::vector ::const_iterator _iter962; + for (_iter962 = this->primaryKeys.begin(); _iter962 != this->primaryKeys.end(); ++_iter962) + { + xfer += (*_iter962).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("foreignKeys", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->foreignKeys.size())); + std::vector ::const_iterator _iter963; + for (_iter963 = this->foreignKeys.begin(); _iter963 != this->foreignKeys.end(); ++_iter963) + { + xfer += (*_iter963).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("uniqueConstraints", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->uniqueConstraints.size())); + std::vector ::const_iterator _iter964; + for (_iter964 = this->uniqueConstraints.begin(); _iter964 != this->uniqueConstraints.end(); ++_iter964) + { + xfer += (*_iter964).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("notNullConstraints", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->notNullConstraints.size())); + std::vector ::const_iterator _iter965; + for (_iter965 = this->notNullConstraints.begin(); _iter965 != this->notNullConstraints.end(); ++_iter965) + { + xfer += (*_iter965).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_create_table_with_constraints_pargs::~ThriftHiveMetastore_create_table_with_constraints_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_create_table_with_constraints_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_with_constraints_pargs"); + + xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->tbl)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("primaryKeys", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->primaryKeys)).size())); + std::vector ::const_iterator _iter966; + for (_iter966 = (*(this->primaryKeys)).begin(); _iter966 != (*(this->primaryKeys)).end(); ++_iter966) + { + xfer += (*_iter966).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("foreignKeys", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->foreignKeys)).size())); + std::vector ::const_iterator _iter967; + for (_iter967 = (*(this->foreignKeys)).begin(); _iter967 != (*(this->foreignKeys)).end(); ++_iter967) + { + xfer += (*_iter967).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("uniqueConstraints", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->uniqueConstraints)).size())); + std::vector ::const_iterator _iter968; + for (_iter968 = (*(this->uniqueConstraints)).begin(); _iter968 != (*(this->uniqueConstraints)).end(); ++_iter968) + { + xfer += (*_iter968).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("notNullConstraints", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->notNullConstraints)).size())); + std::vector ::const_iterator _iter969; + for (_iter969 = (*(this->notNullConstraints)).begin(); _iter969 != (*(this->notNullConstraints)).end(); ++_iter969) + { + xfer += (*_iter969).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_create_table_with_constraints_result::~ThriftHiveMetastore_create_table_with_constraints_result() throw() { +} + + +uint32_t ThriftHiveMetastore_create_table_with_constraints_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_table_with_constraints_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_with_constraints_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_create_table_with_constraints_presult::~ThriftHiveMetastore_create_table_with_constraints_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_create_table_with_constraints_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_constraint_args::~ThriftHiveMetastore_drop_constraint_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_constraint_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_constraint_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_constraint_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_constraint_pargs::~ThriftHiveMetastore_drop_constraint_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_constraint_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_constraint_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_constraint_result::~ThriftHiveMetastore_drop_constraint_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_constraint_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_constraint_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_constraint_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_constraint_presult::~ThriftHiveMetastore_drop_constraint_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_constraint_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_primary_key_args::~ThriftHiveMetastore_add_primary_key_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_primary_key_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_primary_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_primary_key_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_primary_key_pargs::~ThriftHiveMetastore_add_primary_key_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_primary_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_primary_key_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_primary_key_result::~ThriftHiveMetastore_add_primary_key_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_primary_key_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_primary_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_primary_key_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_primary_key_presult::~ThriftHiveMetastore_add_primary_key_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_primary_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_foreign_key_args::~ThriftHiveMetastore_add_foreign_key_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_foreign_key_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_foreign_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_foreign_key_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_foreign_key_pargs::~ThriftHiveMetastore_add_foreign_key_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_foreign_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_foreign_key_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_foreign_key_result::~ThriftHiveMetastore_add_foreign_key_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_foreign_key_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_foreign_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_foreign_key_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_foreign_key_presult::~ThriftHiveMetastore_add_foreign_key_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_foreign_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_unique_constraint_args::~ThriftHiveMetastore_add_unique_constraint_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_unique_constraint_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_unique_constraint_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_unique_constraint_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_unique_constraint_pargs::~ThriftHiveMetastore_add_unique_constraint_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_unique_constraint_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_unique_constraint_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_unique_constraint_result::~ThriftHiveMetastore_add_unique_constraint_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_unique_constraint_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_unique_constraint_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_unique_constraint_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_unique_constraint_presult::~ThriftHiveMetastore_add_unique_constraint_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_unique_constraint_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_not_null_constraint_args::~ThriftHiveMetastore_add_not_null_constraint_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_not_null_constraint_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_not_null_constraint_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_not_null_constraint_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_not_null_constraint_pargs::~ThriftHiveMetastore_add_not_null_constraint_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_not_null_constraint_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_not_null_constraint_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_not_null_constraint_result::~ThriftHiveMetastore_add_not_null_constraint_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_not_null_constraint_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_not_null_constraint_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_not_null_constraint_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_not_null_constraint_presult::~ThriftHiveMetastore_add_not_null_constraint_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_not_null_constraint_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_table_args::~ThriftHiveMetastore_drop_table_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_drop_table_pargs::~ThriftHiveMetastore_drop_table_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_drop_table_result::~ThriftHiveMetastore_drop_table_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_table_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_table_presult::~ThriftHiveMetastore_drop_table_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_table_with_environment_context_args::~ThriftHiveMetastore_drop_table_with_environment_context_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_table_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environment_context.read(iprot); + this->__isset.environment_context = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_table_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_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("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->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; +} + + +ThriftHiveMetastore_drop_table_with_environment_context_pargs::~ThriftHiveMetastore_drop_table_with_environment_context_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_table_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_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("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->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; +} + + +ThriftHiveMetastore_drop_table_with_environment_context_result::~ThriftHiveMetastore_drop_table_with_environment_context_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_table_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_table_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_table_with_environment_context_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_table_with_environment_context_presult::~ThriftHiveMetastore_drop_table_with_environment_context_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_table_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_truncate_table_args::~ThriftHiveMetastore_truncate_table_args() throw() { +} + + +uint32_t ThriftHiveMetastore_truncate_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partNames.clear(); + uint32_t _size970; + ::apache::thrift::protocol::TType _etype973; + xfer += iprot->readListBegin(_etype973, _size970); + this->partNames.resize(_size970); + uint32_t _i974; + for (_i974 = 0; _i974 < _size970; ++_i974) + { + xfer += iprot->readString(this->partNames[_i974]); + } + xfer += iprot->readListEnd(); + } + this->__isset.partNames = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_truncate_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_truncate_table_args"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("partNames", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->partNames.size())); + std::vector ::const_iterator _iter975; + for (_iter975 = this->partNames.begin(); _iter975 != this->partNames.end(); ++_iter975) + { + xfer += oprot->writeString((*_iter975)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_truncate_table_pargs::~ThriftHiveMetastore_truncate_table_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_truncate_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_truncate_table_pargs"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("partNames", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->partNames)).size())); + std::vector ::const_iterator _iter976; + for (_iter976 = (*(this->partNames)).begin(); _iter976 != (*(this->partNames)).end(); ++_iter976) + { + xfer += oprot->writeString((*_iter976)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_truncate_table_result::~ThriftHiveMetastore_truncate_table_result() throw() { +} + + +uint32_t ThriftHiveMetastore_truncate_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_truncate_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_truncate_table_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_truncate_table_presult::~ThriftHiveMetastore_truncate_table_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_truncate_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_tables_args::~ThriftHiveMetastore_get_tables_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_tables_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->pattern); + this->__isset.pattern = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_tables_pargs::~ThriftHiveMetastore_get_tables_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_tables_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_tables_result::~ThriftHiveMetastore_get_tables_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_tables_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size977; + ::apache::thrift::protocol::TType _etype980; + xfer += iprot->readListBegin(_etype980, _size977); + this->success.resize(_size977); + uint32_t _i981; + for (_i981 = 0; _i981 < _size977; ++_i981) + { + xfer += iprot->readString(this->success[_i981]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter982; + for (_iter982 = this->success.begin(); _iter982 != this->success.end(); ++_iter982) + { + xfer += oprot->writeString((*_iter982)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_tables_presult::~ThriftHiveMetastore_get_tables_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_tables_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size983; + ::apache::thrift::protocol::TType _etype986; + xfer += iprot->readListBegin(_etype986, _size983); + (*(this->success)).resize(_size983); + uint32_t _i987; + for (_i987 = 0; _i987 < _size983; ++_i987) + { + xfer += iprot->readString((*(this->success))[_i987]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_tables_by_type_args::~ThriftHiveMetastore_get_tables_by_type_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_tables_by_type_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->pattern); + this->__isset.pattern = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableType); + this->__isset.tableType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_by_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_by_type_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->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->tableType); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_tables_by_type_pargs::~ThriftHiveMetastore_get_tables_by_type_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_tables_by_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_by_type_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->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->tableType))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_tables_by_type_result::~ThriftHiveMetastore_get_tables_by_type_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_tables_by_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size988; + ::apache::thrift::protocol::TType _etype991; + xfer += iprot->readListBegin(_etype991, _size988); + this->success.resize(_size988); + uint32_t _i992; + for (_i992 = 0; _i992 < _size988; ++_i992) + { + xfer += iprot->readString(this->success[_i992]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_tables_by_type_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_by_type_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter993; + for (_iter993 = this->success.begin(); _iter993 != this->success.end(); ++_iter993) + { + xfer += oprot->writeString((*_iter993)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_tables_by_type_presult::~ThriftHiveMetastore_get_tables_by_type_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_tables_by_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size994; + ::apache::thrift::protocol::TType _etype997; + xfer += iprot->readListBegin(_etype997, _size994); + (*(this->success)).resize(_size994); + uint32_t _i998; + for (_i998 = 0; _i998 < _size994; ++_i998) + { + xfer += iprot->readString((*(this->success))[_i998]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_table_meta_args::~ThriftHiveMetastore_get_table_meta_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_meta_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_patterns); + this->__isset.db_patterns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_patterns); + this->__isset.tbl_patterns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->tbl_types.clear(); + uint32_t _size999; + ::apache::thrift::protocol::TType _etype1002; + xfer += iprot->readListBegin(_etype1002, _size999); + this->tbl_types.resize(_size999); + uint32_t _i1003; + for (_i1003 = 0; _i1003 < _size999; ++_i1003) + { + xfer += iprot->readString(this->tbl_types[_i1003]); + } + xfer += iprot->readListEnd(); + } + this->__isset.tbl_types = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_meta_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_meta_args"); + + xfer += oprot->writeFieldBegin("db_patterns", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_patterns); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tbl_patterns", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_patterns); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tbl_types", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->tbl_types.size())); + std::vector ::const_iterator _iter1004; + for (_iter1004 = this->tbl_types.begin(); _iter1004 != this->tbl_types.end(); ++_iter1004) + { + xfer += oprot->writeString((*_iter1004)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_meta_pargs::~ThriftHiveMetastore_get_table_meta_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_meta_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_meta_pargs"); + + xfer += oprot->writeFieldBegin("db_patterns", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_patterns))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tbl_patterns", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_patterns))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tbl_types", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->tbl_types)).size())); + std::vector ::const_iterator _iter1005; + for (_iter1005 = (*(this->tbl_types)).begin(); _iter1005 != (*(this->tbl_types)).end(); ++_iter1005) + { + xfer += oprot->writeString((*_iter1005)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_meta_result::~ThriftHiveMetastore_get_table_meta_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_meta_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1006; + ::apache::thrift::protocol::TType _etype1009; + xfer += iprot->readListBegin(_etype1009, _size1006); + this->success.resize(_size1006); + uint32_t _i1010; + for (_i1010 = 0; _i1010 < _size1006; ++_i1010) + { + xfer += this->success[_i1010].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_meta_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_meta_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1011; + for (_iter1011 = this->success.begin(); _iter1011 != this->success.end(); ++_iter1011) + { + xfer += (*_iter1011).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_meta_presult::~ThriftHiveMetastore_get_table_meta_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_meta_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1012; + ::apache::thrift::protocol::TType _etype1015; + xfer += iprot->readListBegin(_etype1015, _size1012); + (*(this->success)).resize(_size1012); + uint32_t _i1016; + for (_i1016 = 0; _i1016 < _size1012; ++_i1016) + { + xfer += (*(this->success))[_i1016].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_all_tables_args::~ThriftHiveMetastore_get_all_tables_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_tables_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_all_tables_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_all_tables_pargs::~ThriftHiveMetastore_get_all_tables_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_tables_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_all_tables_result::~ThriftHiveMetastore_get_all_tables_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_tables_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1017; + ::apache::thrift::protocol::TType _etype1020; + xfer += iprot->readListBegin(_etype1020, _size1017); + this->success.resize(_size1017); + uint32_t _i1021; + for (_i1021 = 0; _i1021 < _size1017; ++_i1021) + { + xfer += iprot->readString(this->success[_i1021]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_all_tables_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_tables_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter1022; + for (_iter1022 = this->success.begin(); _iter1022 != this->success.end(); ++_iter1022) + { + xfer += oprot->writeString((*_iter1022)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_all_tables_presult::~ThriftHiveMetastore_get_all_tables_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_tables_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1023; + ::apache::thrift::protocol::TType _etype1026; + xfer += iprot->readListBegin(_etype1026, _size1023); + (*(this->success)).resize(_size1023); + uint32_t _i1027; + for (_i1027 = 0; _i1027 < _size1023; ++_i1027) + { + xfer += iprot->readString((*(this->success))[_i1027]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_table_args::~ThriftHiveMetastore_get_table_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_table_pargs::~ThriftHiveMetastore_get_table_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_table_result::~ThriftHiveMetastore_get_table_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_presult::~ThriftHiveMetastore_get_table_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_table_objects_by_name_args::~ThriftHiveMetastore_get_table_objects_by_name_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->tbl_names.clear(); + uint32_t _size1028; + ::apache::thrift::protocol::TType _etype1031; + xfer += iprot->readListBegin(_etype1031, _size1028); + this->tbl_names.resize(_size1028); + uint32_t _i1032; + for (_i1032 = 0; _i1032 < _size1028; ++_i1032) + { + xfer += iprot->readString(this->tbl_names[_i1032]); + } + xfer += iprot->readListEnd(); + } + this->__isset.tbl_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1033; + for (_iter1033 = this->tbl_names.begin(); _iter1033 != this->tbl_names.end(); ++_iter1033) + { + xfer += oprot->writeString((*_iter1033)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_objects_by_name_pargs::~ThriftHiveMetastore_get_table_objects_by_name_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_objects_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1034; + for (_iter1034 = (*(this->tbl_names)).begin(); _iter1034 != (*(this->tbl_names)).end(); ++_iter1034) + { + xfer += oprot->writeString((*_iter1034)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_objects_by_name_result::~ThriftHiveMetastore_get_table_objects_by_name_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1035; + ::apache::thrift::protocol::TType _etype1038; + xfer += iprot->readListBegin(_etype1038, _size1035); + this->success.resize(_size1035); + uint32_t _i1039; + for (_i1039 = 0; _i1039 < _size1035; ++_i1039) + { + xfer += this->success[_i1039].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_objects_by_name_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector
::const_iterator _iter1040; + for (_iter1040 = this->success.begin(); _iter1040 != this->success.end(); ++_iter1040) + { + xfer += (*_iter1040).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_objects_by_name_presult::~ThriftHiveMetastore_get_table_objects_by_name_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_objects_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1041; + ::apache::thrift::protocol::TType _etype1044; + xfer += iprot->readListBegin(_etype1044, _size1041); + (*(this->success)).resize(_size1041); + uint32_t _i1045; + for (_i1045 = 0; _i1045 < _size1041; ++_i1045) + { + xfer += (*(this->success))[_i1045].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_table_req_args::~ThriftHiveMetastore_get_table_req_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_req_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_req_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_req_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_req_pargs::~ThriftHiveMetastore_get_table_req_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_req_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_req_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_req_result::~ThriftHiveMetastore_get_table_req_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_req_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_req_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_req_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_req_presult::~ThriftHiveMetastore_get_table_req_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_req_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_table_objects_by_name_req_args::~ThriftHiveMetastore_get_table_objects_by_name_req_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_objects_by_name_req_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_objects_by_name_req_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_objects_by_name_req_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_objects_by_name_req_pargs::~ThriftHiveMetastore_get_table_objects_by_name_req_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_objects_by_name_req_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_objects_by_name_req_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_objects_by_name_req_result::~ThriftHiveMetastore_get_table_objects_by_name_req_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_objects_by_name_req_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_objects_by_name_req_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_objects_by_name_req_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_objects_by_name_req_presult::~ThriftHiveMetastore_get_table_objects_by_name_req_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_objects_by_name_req_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_table_names_by_filter_args::~ThriftHiveMetastore_get_table_names_by_filter_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_names_by_filter_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->filter); + this->__isset.filter = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_tables); + this->__isset.max_tables = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_names_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_table_names_by_filter_pargs::~ThriftHiveMetastore_get_table_names_by_filter_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_names_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_table_names_by_filter_result::~ThriftHiveMetastore_get_table_names_by_filter_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1046; + ::apache::thrift::protocol::TType _etype1049; + xfer += iprot->readListBegin(_etype1049, _size1046); + this->success.resize(_size1046); + uint32_t _i1050; + for (_i1050 = 0; _i1050 < _size1046; ++_i1050) + { + xfer += iprot->readString(this->success[_i1050]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_names_by_filter_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter1051; + for (_iter1051 = this->success.begin(); _iter1051 != this->success.end(); ++_iter1051) + { + xfer += oprot->writeString((*_iter1051)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_names_by_filter_presult::~ThriftHiveMetastore_get_table_names_by_filter_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_names_by_filter_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1052; + ::apache::thrift::protocol::TType _etype1055; + xfer += iprot->readListBegin(_etype1055, _size1052); + (*(this->success)).resize(_size1052); + uint32_t _i1056; + for (_i1056 = 0; _i1056 < _size1052; ++_i1056) + { + xfer += iprot->readString((*(this->success))[_i1056]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_alter_table_args::~ThriftHiveMetastore_alter_table_args() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_tbl.read(iprot); + this->__isset.new_tbl = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_alter_table_pargs::~ThriftHiveMetastore_alter_table_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_alter_table_result::~ThriftHiveMetastore_alter_table_result() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_table_presult::~ThriftHiveMetastore_alter_table_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_alter_table_with_environment_context_args::~ThriftHiveMetastore_alter_table_with_environment_context_args() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_table_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_tbl.read(iprot); + this->__isset.new_tbl = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environment_context.read(iprot); + this->__isset.environment_context = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_table_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_alter_table_with_environment_context_pargs::~ThriftHiveMetastore_alter_table_with_environment_context_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_table_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_alter_table_with_environment_context_result::~ThriftHiveMetastore_alter_table_with_environment_context_result() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_table_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_table_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_with_environment_context_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_table_with_environment_context_presult::~ThriftHiveMetastore_alter_table_with_environment_context_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_table_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_alter_table_with_cascade_args::~ThriftHiveMetastore_alter_table_with_cascade_args() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_table_with_cascade_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_tbl.read(iprot); + this->__isset.new_tbl = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->cascade); + this->__isset.cascade = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_table_with_cascade_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_with_cascade_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("cascade", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->cascade); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_table_with_cascade_pargs::~ThriftHiveMetastore_alter_table_with_cascade_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_table_with_cascade_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_with_cascade_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("cascade", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool((*(this->cascade))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_table_with_cascade_result::~ThriftHiveMetastore_alter_table_with_cascade_result() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_table_with_cascade_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_table_with_cascade_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_with_cascade_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_table_with_cascade_presult::~ThriftHiveMetastore_alter_table_with_cascade_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_table_with_cascade_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_partition_args::~ThriftHiveMetastore_add_partition_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_part.read(iprot); + this->__isset.new_part = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_add_partition_pargs::~ThriftHiveMetastore_add_partition_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_add_partition_result::~ThriftHiveMetastore_add_partition_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_partition_presult::~ThriftHiveMetastore_add_partition_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_partition_with_environment_context_args::~ThriftHiveMetastore_add_partition_with_environment_context_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partition_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_part.read(iprot); + this->__isset.new_part = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environment_context.read(iprot); + this->__isset.environment_context = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partition_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_add_partition_with_environment_context_pargs::~ThriftHiveMetastore_add_partition_with_environment_context_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partition_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_add_partition_with_environment_context_result::~ThriftHiveMetastore_add_partition_with_environment_context_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partition_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partition_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_with_environment_context_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_partition_with_environment_context_presult::~ThriftHiveMetastore_add_partition_with_environment_context_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partition_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_partitions_args::~ThriftHiveMetastore_add_partitions_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->new_parts.clear(); + uint32_t _size1057; + ::apache::thrift::protocol::TType _etype1060; + xfer += iprot->readListBegin(_etype1060, _size1057); + this->new_parts.resize(_size1057); + uint32_t _i1061; + for (_i1061 = 0; _i1061 < _size1057; ++_i1061) + { + xfer += this->new_parts[_i1061].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.new_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1062; + for (_iter1062 = this->new_parts.begin(); _iter1062 != this->new_parts.end(); ++_iter1062) + { + xfer += (*_iter1062).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_partitions_pargs::~ThriftHiveMetastore_add_partitions_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1063; + for (_iter1063 = (*(this->new_parts)).begin(); _iter1063 != (*(this->new_parts)).end(); ++_iter1063) + { + xfer += (*_iter1063).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_partitions_result::~ThriftHiveMetastore_add_partitions_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_partitions_presult::~ThriftHiveMetastore_add_partitions_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_partitions_pspec_args::~ThriftHiveMetastore_add_partitions_pspec_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partitions_pspec_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->new_parts.clear(); + uint32_t _size1064; + ::apache::thrift::protocol::TType _etype1067; + xfer += iprot->readListBegin(_etype1067, _size1064); + this->new_parts.resize(_size1064); + uint32_t _i1068; + for (_i1068 = 0; _i1068 < _size1064; ++_i1068) + { + xfer += this->new_parts[_i1068].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.new_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partitions_pspec_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_pspec_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())); + std::vector ::const_iterator _iter1069; + for (_iter1069 = this->new_parts.begin(); _iter1069 != this->new_parts.end(); ++_iter1069) + { + xfer += (*_iter1069).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_partitions_pspec_pargs::~ThriftHiveMetastore_add_partitions_pspec_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partitions_pspec_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_pspec_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())); + std::vector ::const_iterator _iter1070; + for (_iter1070 = (*(this->new_parts)).begin(); _iter1070 != (*(this->new_parts)).end(); ++_iter1070) + { + xfer += (*_iter1070).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_partitions_pspec_result::~ThriftHiveMetastore_add_partitions_pspec_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partitions_pspec_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partitions_pspec_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_pspec_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_partitions_pspec_presult::~ThriftHiveMetastore_add_partitions_pspec_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partitions_pspec_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_append_partition_args::~ThriftHiveMetastore_append_partition_args() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size1071; + ::apache::thrift::protocol::TType _etype1074; + xfer += iprot->readListBegin(_etype1074, _size1071); + this->part_vals.resize(_size1071); + uint32_t _i1075; + for (_i1075 = 0; _i1075 < _size1071; ++_i1075) + { + xfer += iprot->readString(this->part_vals[_i1075]); + } + xfer += iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_append_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1076; + for (_iter1076 = this->part_vals.begin(); _iter1076 != this->part_vals.end(); ++_iter1076) + { + xfer += oprot->writeString((*_iter1076)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_append_partition_pargs::~ThriftHiveMetastore_append_partition_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1077; + for (_iter1077 = (*(this->part_vals)).begin(); _iter1077 != (*(this->part_vals)).end(); ++_iter1077) + { + xfer += oprot->writeString((*_iter1077)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_append_partition_result::~ThriftHiveMetastore_append_partition_result() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_append_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_append_partition_presult::~ThriftHiveMetastore_append_partition_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_partitions_req_args::~ThriftHiveMetastore_add_partitions_req_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partitions_req_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partitions_req_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_req_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_partitions_req_pargs::~ThriftHiveMetastore_add_partitions_req_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partitions_req_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_req_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_partitions_req_result::~ThriftHiveMetastore_add_partitions_req_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partitions_req_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_partitions_req_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partitions_req_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_partitions_req_presult::~ThriftHiveMetastore_add_partitions_req_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_partitions_req_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_append_partition_with_environment_context_args::~ThriftHiveMetastore_append_partition_with_environment_context_args() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size1078; + ::apache::thrift::protocol::TType _etype1081; + xfer += iprot->readListBegin(_etype1081, _size1078); + this->part_vals.resize(_size1078); + uint32_t _i1082; + for (_i1082 = 0; _i1082 < _size1078; ++_i1082) + { + xfer += iprot->readString(this->part_vals[_i1082]); + } + xfer += iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environment_context.read(iprot); + this->__isset.environment_context = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_append_partition_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_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("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); + std::vector ::const_iterator _iter1083; + for (_iter1083 = this->part_vals.begin(); _iter1083 != this->part_vals.end(); ++_iter1083) + { + xfer += oprot->writeString((*_iter1083)); + } + xfer += oprot->writeListEnd(); + } + 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; +} + + +ThriftHiveMetastore_append_partition_with_environment_context_pargs::~ThriftHiveMetastore_append_partition_with_environment_context_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_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("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); + std::vector ::const_iterator _iter1084; + for (_iter1084 = (*(this->part_vals)).begin(); _iter1084 != (*(this->part_vals)).end(); ++_iter1084) + { + xfer += oprot->writeString((*_iter1084)); + } + xfer += oprot->writeListEnd(); + } + 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; +} + + +ThriftHiveMetastore_append_partition_with_environment_context_result::~ThriftHiveMetastore_append_partition_with_environment_context_result() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_append_partition_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_with_environment_context_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_append_partition_with_environment_context_presult::~ThriftHiveMetastore_append_partition_with_environment_context_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_append_partition_by_name_args::~ThriftHiveMetastore_append_partition_by_name_args() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_append_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_append_partition_by_name_pargs::~ThriftHiveMetastore_append_partition_by_name_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_append_partition_by_name_result::~ThriftHiveMetastore_append_partition_by_name_result() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_append_partition_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_append_partition_by_name_presult::~ThriftHiveMetastore_append_partition_by_name_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_append_partition_by_name_with_environment_context_args::~ThriftHiveMetastore_append_partition_by_name_with_environment_context_args() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_by_name_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environment_context.read(iprot); + this->__isset.environment_context = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_append_partition_by_name_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_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("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->part_name); + 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; +} + + +ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs::~ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_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("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->part_name))); + 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; +} + + +ThriftHiveMetastore_append_partition_by_name_with_environment_context_result::~ThriftHiveMetastore_append_partition_by_name_with_environment_context_result() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_by_name_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_append_partition_by_name_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_with_environment_context_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult::~ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_partition_args::~ThriftHiveMetastore_drop_partition_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size1085; + ::apache::thrift::protocol::TType _etype1088; + xfer += iprot->readListBegin(_etype1088, _size1085); + this->part_vals.resize(_size1085); + uint32_t _i1089; + for (_i1089 = 0; _i1089 < _size1085; ++_i1089) + { + xfer += iprot->readString(this->part_vals[_i1089]); + } + xfer += iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1090; + for (_iter1090 = this->part_vals.begin(); _iter1090 != this->part_vals.end(); ++_iter1090) + { + xfer += oprot->writeString((*_iter1090)); + } + 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; +} + + +ThriftHiveMetastore_drop_partition_pargs::~ThriftHiveMetastore_drop_partition_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1091; + for (_iter1091 = (*(this->part_vals)).begin(); _iter1091 != (*(this->part_vals)).end(); ++_iter1091) + { + xfer += oprot->writeString((*_iter1091)); + } + 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; +} + + +ThriftHiveMetastore_drop_partition_result::~ThriftHiveMetastore_drop_partition_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_partition_presult::~ThriftHiveMetastore_drop_partition_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_partition_with_environment_context_args::~ThriftHiveMetastore_drop_partition_with_environment_context_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size1092; + ::apache::thrift::protocol::TType _etype1095; + xfer += iprot->readListBegin(_etype1095, _size1092); + this->part_vals.resize(_size1092); + uint32_t _i1096; + for (_i1096 = 0; _i1096 < _size1092; ++_i1096) + { + xfer += iprot->readString(this->part_vals[_i1096]); + } + xfer += iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environment_context.read(iprot); + this->__isset.environment_context = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_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("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); + std::vector ::const_iterator _iter1097; + for (_iter1097 = this->part_vals.begin(); _iter1097 != this->part_vals.end(); ++_iter1097) + { + xfer += oprot->writeString((*_iter1097)); + } + 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->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->environment_context.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_partition_with_environment_context_pargs::~ThriftHiveMetastore_drop_partition_with_environment_context_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_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("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); + std::vector ::const_iterator _iter1098; + for (_iter1098 = (*(this->part_vals)).begin(); _iter1098 != (*(this->part_vals)).end(); ++_iter1098) + { + xfer += oprot->writeString((*_iter1098)); + } + 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->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->environment_context)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_partition_with_environment_context_result::~ThriftHiveMetastore_drop_partition_with_environment_context_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_with_environment_context_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_partition_with_environment_context_presult::~ThriftHiveMetastore_drop_partition_with_environment_context_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_partition_by_name_args::~ThriftHiveMetastore_drop_partition_by_name_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_drop_partition_by_name_pargs::~ThriftHiveMetastore_drop_partition_by_name_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_drop_partition_by_name_result::~ThriftHiveMetastore_drop_partition_by_name_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partition_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_partition_by_name_presult::~ThriftHiveMetastore_drop_partition_by_name_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args::~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environment_context.read(iprot); + this->__isset.environment_context = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_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("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->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->environment_context.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs::~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_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("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->writeFieldBegin("environment_context", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += (*(this->environment_context)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result::~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult::~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_partitions_req_args::~ThriftHiveMetastore_drop_partitions_req_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partitions_req_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partitions_req_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partitions_req_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_partitions_req_pargs::~ThriftHiveMetastore_drop_partitions_req_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partitions_req_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partitions_req_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_partitions_req_result::~ThriftHiveMetastore_drop_partitions_req_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partitions_req_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_partitions_req_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partitions_req_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_partitions_req_presult::~ThriftHiveMetastore_drop_partitions_req_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_partitions_req_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partition_args::~ThriftHiveMetastore_get_partition_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size1099; + ::apache::thrift::protocol::TType _etype1102; + xfer += iprot->readListBegin(_etype1102, _size1099); + this->part_vals.resize(_size1099); + uint32_t _i1103; + for (_i1103 = 0; _i1103 < _size1099; ++_i1103) + { + xfer += iprot->readString(this->part_vals[_i1103]); + } + xfer += iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1104; + for (_iter1104 = this->part_vals.begin(); _iter1104 != this->part_vals.end(); ++_iter1104) + { + xfer += oprot->writeString((*_iter1104)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partition_pargs::~ThriftHiveMetastore_get_partition_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1105; + for (_iter1105 = (*(this->part_vals)).begin(); _iter1105 != (*(this->part_vals)).end(); ++_iter1105) + { + xfer += oprot->writeString((*_iter1105)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partition_result::~ThriftHiveMetastore_get_partition_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partition_presult::~ThriftHiveMetastore_get_partition_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_exchange_partition_args::~ThriftHiveMetastore_exchange_partition_args() throw() { +} + + +uint32_t ThriftHiveMetastore_exchange_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->partitionSpecs.clear(); + uint32_t _size1106; + ::apache::thrift::protocol::TType _ktype1107; + ::apache::thrift::protocol::TType _vtype1108; + xfer += iprot->readMapBegin(_ktype1107, _vtype1108, _size1106); + uint32_t _i1110; + for (_i1110 = 0; _i1110 < _size1106; ++_i1110) + { + std::string _key1111; + xfer += iprot->readString(_key1111); + std::string& _val1112 = this->partitionSpecs[_key1111]; + xfer += iprot->readString(_val1112); + } + xfer += iprot->readMapEnd(); + } + this->__isset.partitionSpecs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->source_db); + this->__isset.source_db = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->source_table_name); + this->__isset.source_table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dest_db); + this->__isset.dest_db = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dest_table_name); + this->__isset.dest_table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_exchange_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_exchange_partition_args"); + + xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->partitionSpecs.size())); + std::map ::const_iterator _iter1113; + for (_iter1113 = this->partitionSpecs.begin(); _iter1113 != this->partitionSpecs.end(); ++_iter1113) + { + xfer += oprot->writeString(_iter1113->first); + xfer += oprot->writeString(_iter1113->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("source_db", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->source_db); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("source_table_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->source_table_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dest_db", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->dest_db); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dest_table_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->dest_table_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_exchange_partition_pargs::~ThriftHiveMetastore_exchange_partition_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_exchange_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_exchange_partition_pargs"); + + xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->partitionSpecs)).size())); + std::map ::const_iterator _iter1114; + for (_iter1114 = (*(this->partitionSpecs)).begin(); _iter1114 != (*(this->partitionSpecs)).end(); ++_iter1114) + { + xfer += oprot->writeString(_iter1114->first); + xfer += oprot->writeString(_iter1114->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("source_db", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->source_db))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("source_table_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->source_table_name))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dest_db", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->dest_db))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dest_table_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->dest_table_name))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_exchange_partition_result::~ThriftHiveMetastore_exchange_partition_result() throw() { +} + + +uint32_t ThriftHiveMetastore_exchange_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_exchange_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_exchange_partition_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_exchange_partition_presult::~ThriftHiveMetastore_exchange_partition_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_exchange_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_exchange_partitions_args::~ThriftHiveMetastore_exchange_partitions_args() throw() { +} + + +uint32_t ThriftHiveMetastore_exchange_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->partitionSpecs.clear(); + uint32_t _size1115; + ::apache::thrift::protocol::TType _ktype1116; + ::apache::thrift::protocol::TType _vtype1117; + xfer += iprot->readMapBegin(_ktype1116, _vtype1117, _size1115); + uint32_t _i1119; + for (_i1119 = 0; _i1119 < _size1115; ++_i1119) + { + std::string _key1120; + xfer += iprot->readString(_key1120); + std::string& _val1121 = this->partitionSpecs[_key1120]; + xfer += iprot->readString(_val1121); + } + xfer += iprot->readMapEnd(); + } + this->__isset.partitionSpecs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->source_db); + this->__isset.source_db = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->source_table_name); + this->__isset.source_table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dest_db); + this->__isset.dest_db = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dest_table_name); + this->__isset.dest_table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_exchange_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_exchange_partitions_args"); + + xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->partitionSpecs.size())); + std::map ::const_iterator _iter1122; + for (_iter1122 = this->partitionSpecs.begin(); _iter1122 != this->partitionSpecs.end(); ++_iter1122) + { + xfer += oprot->writeString(_iter1122->first); + xfer += oprot->writeString(_iter1122->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("source_db", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->source_db); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("source_table_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->source_table_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dest_db", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->dest_db); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dest_table_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->dest_table_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_exchange_partitions_pargs::~ThriftHiveMetastore_exchange_partitions_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_exchange_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_exchange_partitions_pargs"); + + xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->partitionSpecs)).size())); + std::map ::const_iterator _iter1123; + for (_iter1123 = (*(this->partitionSpecs)).begin(); _iter1123 != (*(this->partitionSpecs)).end(); ++_iter1123) + { + xfer += oprot->writeString(_iter1123->first); + xfer += oprot->writeString(_iter1123->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("source_db", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->source_db))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("source_table_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->source_table_name))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dest_db", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->dest_db))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dest_table_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->dest_table_name))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_exchange_partitions_result::~ThriftHiveMetastore_exchange_partitions_result() throw() { +} + + +uint32_t ThriftHiveMetastore_exchange_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1124; + ::apache::thrift::protocol::TType _etype1127; + xfer += iprot->readListBegin(_etype1127, _size1124); + this->success.resize(_size1124); + uint32_t _i1128; + for (_i1128 = 0; _i1128 < _size1124; ++_i1128) + { + xfer += this->success[_i1128].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_exchange_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_exchange_partitions_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1129; + for (_iter1129 = this->success.begin(); _iter1129 != this->success.end(); ++_iter1129) + { + xfer += (*_iter1129).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_exchange_partitions_presult::~ThriftHiveMetastore_exchange_partitions_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_exchange_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1130; + ::apache::thrift::protocol::TType _etype1133; + xfer += iprot->readListBegin(_etype1133, _size1130); + (*(this->success)).resize(_size1130); + uint32_t _i1134; + for (_i1134 = 0; _i1134 < _size1130; ++_i1134) + { + xfer += (*(this->success))[_i1134].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partition_with_auth_args::~ThriftHiveMetastore_get_partition_with_auth_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_with_auth_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size1135; + ::apache::thrift::protocol::TType _etype1138; + xfer += iprot->readListBegin(_etype1138, _size1135); + this->part_vals.resize(_size1135); + uint32_t _i1139; + for (_i1139 = 0; _i1139 < _size1135; ++_i1139) + { + xfer += iprot->readString(this->part_vals[_i1139]); + } + xfer += iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size1140; + ::apache::thrift::protocol::TType _etype1143; + xfer += iprot->readListBegin(_etype1143, _size1140); + this->group_names.resize(_size1140); + uint32_t _i1144; + for (_i1144 = 0; _i1144 < _size1140; ++_i1144) + { + xfer += iprot->readString(this->group_names[_i1144]); + } + xfer += iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1145; + for (_iter1145 = this->part_vals.begin(); _iter1145 != this->part_vals.end(); ++_iter1145) + { + xfer += oprot->writeString((*_iter1145)); + } + 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())); + std::vector ::const_iterator _iter1146; + for (_iter1146 = this->group_names.begin(); _iter1146 != this->group_names.end(); ++_iter1146) + { + xfer += oprot->writeString((*_iter1146)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partition_with_auth_pargs::~ThriftHiveMetastore_get_partition_with_auth_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1147; + for (_iter1147 = (*(this->part_vals)).begin(); _iter1147 != (*(this->part_vals)).end(); ++_iter1147) + { + xfer += oprot->writeString((*_iter1147)); + } + 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())); + std::vector ::const_iterator _iter1148; + for (_iter1148 = (*(this->group_names)).begin(); _iter1148 != (*(this->group_names)).end(); ++_iter1148) + { + xfer += oprot->writeString((*_iter1148)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partition_with_auth_result::~ThriftHiveMetastore_get_partition_with_auth_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_with_auth_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_with_auth_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_with_auth_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partition_with_auth_presult::~ThriftHiveMetastore_get_partition_with_auth_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_with_auth_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partition_by_name_args::~ThriftHiveMetastore_get_partition_by_name_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_partition_by_name_pargs::~ThriftHiveMetastore_get_partition_by_name_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_partition_by_name_result::~ThriftHiveMetastore_get_partition_by_name_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partition_by_name_presult::~ThriftHiveMetastore_get_partition_by_name_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partitions_args::~ThriftHiveMetastore_get_partitions_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_partitions_pargs::~ThriftHiveMetastore_get_partitions_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_partitions_result::~ThriftHiveMetastore_get_partitions_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1149; + ::apache::thrift::protocol::TType _etype1152; + xfer += iprot->readListBegin(_etype1152, _size1149); + this->success.resize(_size1149); + uint32_t _i1153; + for (_i1153 = 0; _i1153 < _size1149; ++_i1153) + { + xfer += this->success[_i1153].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1154; + for (_iter1154 = this->success.begin(); _iter1154 != this->success.end(); ++_iter1154) + { + xfer += (*_iter1154).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_presult::~ThriftHiveMetastore_get_partitions_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1155; + ::apache::thrift::protocol::TType _etype1158; + xfer += iprot->readListBegin(_etype1158, _size1155); + (*(this->success)).resize(_size1155); + uint32_t _i1159; + for (_i1159 = 0; _i1159 < _size1155; ++_i1159) + { + xfer += (*(this->success))[_i1159].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partitions_with_auth_args::~ThriftHiveMetastore_get_partitions_with_auth_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size1160; + ::apache::thrift::protocol::TType _etype1163; + xfer += iprot->readListBegin(_etype1163, _size1160); + this->group_names.resize(_size1160); + uint32_t _i1164; + for (_i1164 = 0; _i1164 < _size1160; ++_i1164) + { + xfer += iprot->readString(this->group_names[_i1164]); + } + xfer += iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1165; + for (_iter1165 = this->group_names.begin(); _iter1165 != this->group_names.end(); ++_iter1165) + { + xfer += oprot->writeString((*_iter1165)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_with_auth_pargs::~ThriftHiveMetastore_get_partitions_with_auth_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1166; + for (_iter1166 = (*(this->group_names)).begin(); _iter1166 != (*(this->group_names)).end(); ++_iter1166) + { + xfer += oprot->writeString((*_iter1166)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_with_auth_result::~ThriftHiveMetastore_get_partitions_with_auth_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1167; + ::apache::thrift::protocol::TType _etype1170; + xfer += iprot->readListBegin(_etype1170, _size1167); + this->success.resize(_size1167); + uint32_t _i1171; + for (_i1171 = 0; _i1171 < _size1167; ++_i1171) + { + xfer += this->success[_i1171].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_with_auth_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1172; + for (_iter1172 = this->success.begin(); _iter1172 != this->success.end(); ++_iter1172) + { + xfer += (*_iter1172).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_with_auth_presult::~ThriftHiveMetastore_get_partitions_with_auth_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_with_auth_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1173; + ::apache::thrift::protocol::TType _etype1176; + xfer += iprot->readListBegin(_etype1176, _size1173); + (*(this->success)).resize(_size1173); + uint32_t _i1177; + for (_i1177 = 0; _i1177 < _size1173; ++_i1177) + { + xfer += (*(this->success))[_i1177].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partitions_pspec_args::~ThriftHiveMetastore_get_partitions_pspec_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_pspec_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_pspec_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pspec_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_I32, 3); + xfer += oprot->writeI32(this->max_parts); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_pspec_pargs::~ThriftHiveMetastore_get_partitions_pspec_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_pspec_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pspec_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_I32, 3); + xfer += oprot->writeI32((*(this->max_parts))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_pspec_result::~ThriftHiveMetastore_get_partitions_pspec_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_pspec_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1178; + ::apache::thrift::protocol::TType _etype1181; + xfer += iprot->readListBegin(_etype1181, _size1178); + this->success.resize(_size1178); + uint32_t _i1182; + for (_i1182 = 0; _i1182 < _size1178; ++_i1182) + { + xfer += this->success[_i1182].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_pspec_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pspec_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1183; + for (_iter1183 = this->success.begin(); _iter1183 != this->success.end(); ++_iter1183) + { + xfer += (*_iter1183).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_pspec_presult::~ThriftHiveMetastore_get_partitions_pspec_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_pspec_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1184; + ::apache::thrift::protocol::TType _etype1187; + xfer += iprot->readListBegin(_etype1187, _size1184); + (*(this->success)).resize(_size1184); + uint32_t _i1188; + for (_i1188 = 0; _i1188 < _size1184; ++_i1188) + { + xfer += (*(this->success))[_i1188].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partition_names_args::~ThriftHiveMetastore_get_partition_names_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_partition_names_pargs::~ThriftHiveMetastore_get_partition_names_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_partition_names_result::~ThriftHiveMetastore_get_partition_names_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1189; + ::apache::thrift::protocol::TType _etype1192; + xfer += iprot->readListBegin(_etype1192, _size1189); + this->success.resize(_size1189); + uint32_t _i1193; + for (_i1193 = 0; _i1193 < _size1189; ++_i1193) + { + xfer += iprot->readString(this->success[_i1193]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter1194; + for (_iter1194 = this->success.begin(); _iter1194 != this->success.end(); ++_iter1194) + { + xfer += oprot->writeString((*_iter1194)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partition_names_presult::~ThriftHiveMetastore_get_partition_names_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1195; + ::apache::thrift::protocol::TType _etype1198; + xfer += iprot->readListBegin(_etype1198, _size1195); + (*(this->success)).resize(_size1195); + uint32_t _i1199; + for (_i1199 = 0; _i1199 < _size1195; ++_i1199) + { + xfer += iprot->readString((*(this->success))[_i1199]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partitions_ps_args::~ThriftHiveMetastore_get_partitions_ps_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size1200; + ::apache::thrift::protocol::TType _etype1203; + xfer += iprot->readListBegin(_etype1203, _size1200); + this->part_vals.resize(_size1200); + uint32_t _i1204; + for (_i1204 = 0; _i1204 < _size1200; ++_i1204) + { + xfer += iprot->readString(this->part_vals[_i1204]); + } + xfer += iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1205; + for (_iter1205 = this->part_vals.begin(); _iter1205 != this->part_vals.end(); ++_iter1205) + { + xfer += oprot->writeString((*_iter1205)); + } + 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; +} + + +ThriftHiveMetastore_get_partitions_ps_pargs::~ThriftHiveMetastore_get_partitions_ps_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1206; + for (_iter1206 = (*(this->part_vals)).begin(); _iter1206 != (*(this->part_vals)).end(); ++_iter1206) + { + xfer += oprot->writeString((*_iter1206)); + } + 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; +} + + +ThriftHiveMetastore_get_partitions_ps_result::~ThriftHiveMetastore_get_partitions_ps_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1207; + ::apache::thrift::protocol::TType _etype1210; + xfer += iprot->readListBegin(_etype1210, _size1207); + this->success.resize(_size1207); + uint32_t _i1211; + for (_i1211 = 0; _i1211 < _size1207; ++_i1211) + { + xfer += this->success[_i1211].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1212; + for (_iter1212 = this->success.begin(); _iter1212 != this->success.end(); ++_iter1212) + { + xfer += (*_iter1212).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_ps_presult::~ThriftHiveMetastore_get_partitions_ps_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1213; + ::apache::thrift::protocol::TType _etype1216; + xfer += iprot->readListBegin(_etype1216, _size1213); + (*(this->success)).resize(_size1213); + uint32_t _i1217; + for (_i1217 = 0; _i1217 < _size1213; ++_i1217) + { + xfer += (*(this->success))[_i1217].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partitions_ps_with_auth_args::~ThriftHiveMetastore_get_partitions_ps_with_auth_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size1218; + ::apache::thrift::protocol::TType _etype1221; + xfer += iprot->readListBegin(_etype1221, _size1218); + this->part_vals.resize(_size1218); + uint32_t _i1222; + for (_i1222 = 0; _i1222 < _size1218; ++_i1222) + { + xfer += iprot->readString(this->part_vals[_i1222]); + } + xfer += iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size1223; + ::apache::thrift::protocol::TType _etype1226; + xfer += iprot->readListBegin(_etype1226, _size1223); + this->group_names.resize(_size1223); + uint32_t _i1227; + for (_i1227 = 0; _i1227 < _size1223; ++_i1227) + { + xfer += iprot->readString(this->group_names[_i1227]); + } + xfer += iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1228; + for (_iter1228 = this->part_vals.begin(); _iter1228 != this->part_vals.end(); ++_iter1228) + { + xfer += oprot->writeString((*_iter1228)); + } + 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())); + std::vector ::const_iterator _iter1229; + for (_iter1229 = this->group_names.begin(); _iter1229 != this->group_names.end(); ++_iter1229) + { + xfer += oprot->writeString((*_iter1229)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_ps_with_auth_pargs::~ThriftHiveMetastore_get_partitions_ps_with_auth_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1230; + for (_iter1230 = (*(this->part_vals)).begin(); _iter1230 != (*(this->part_vals)).end(); ++_iter1230) + { + xfer += oprot->writeString((*_iter1230)); + } + 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())); + std::vector ::const_iterator _iter1231; + for (_iter1231 = (*(this->group_names)).begin(); _iter1231 != (*(this->group_names)).end(); ++_iter1231) + { + xfer += oprot->writeString((*_iter1231)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_ps_with_auth_result::~ThriftHiveMetastore_get_partitions_ps_with_auth_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1232; + ::apache::thrift::protocol::TType _etype1235; + xfer += iprot->readListBegin(_etype1235, _size1232); + this->success.resize(_size1232); + uint32_t _i1236; + for (_i1236 = 0; _i1236 < _size1232; ++_i1236) + { + xfer += this->success[_i1236].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_with_auth_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1237; + for (_iter1237 = this->success.begin(); _iter1237 != this->success.end(); ++_iter1237) + { + xfer += (*_iter1237).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_ps_with_auth_presult::~ThriftHiveMetastore_get_partitions_ps_with_auth_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1238; + ::apache::thrift::protocol::TType _etype1241; + xfer += iprot->readListBegin(_etype1241, _size1238); + (*(this->success)).resize(_size1238); + uint32_t _i1242; + for (_i1242 = 0; _i1242 < _size1238; ++_i1242) + { + xfer += (*(this->success))[_i1242].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partition_names_ps_args::~ThriftHiveMetastore_get_partition_names_ps_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size1243; + ::apache::thrift::protocol::TType _etype1246; + xfer += iprot->readListBegin(_etype1246, _size1243); + this->part_vals.resize(_size1243); + uint32_t _i1247; + for (_i1247 = 0; _i1247 < _size1243; ++_i1247) + { + xfer += iprot->readString(this->part_vals[_i1247]); + } + xfer += iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1248; + for (_iter1248 = this->part_vals.begin(); _iter1248 != this->part_vals.end(); ++_iter1248) + { + xfer += oprot->writeString((*_iter1248)); + } + 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; +} + + +ThriftHiveMetastore_get_partition_names_ps_pargs::~ThriftHiveMetastore_get_partition_names_ps_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1249; + for (_iter1249 = (*(this->part_vals)).begin(); _iter1249 != (*(this->part_vals)).end(); ++_iter1249) + { + xfer += oprot->writeString((*_iter1249)); + } + 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; +} + + +ThriftHiveMetastore_get_partition_names_ps_result::~ThriftHiveMetastore_get_partition_names_ps_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1250; + ::apache::thrift::protocol::TType _etype1253; + xfer += iprot->readListBegin(_etype1253, _size1250); + this->success.resize(_size1250); + uint32_t _i1254; + for (_i1254 = 0; _i1254 < _size1250; ++_i1254) + { + xfer += iprot->readString(this->success[_i1254]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter1255; + for (_iter1255 = this->success.begin(); _iter1255 != this->success.end(); ++_iter1255) + { + xfer += oprot->writeString((*_iter1255)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partition_names_ps_presult::~ThriftHiveMetastore_get_partition_names_ps_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1256; + ::apache::thrift::protocol::TType _etype1259; + xfer += iprot->readListBegin(_etype1259, _size1256); + (*(this->success)).resize(_size1256); + uint32_t _i1260; + for (_i1260 = 0; _i1260 < _size1256; ++_i1260) + { + xfer += iprot->readString((*(this->success))[_i1260]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partitions_by_filter_args::~ThriftHiveMetastore_get_partitions_by_filter_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->filter); + this->__isset.filter = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_partitions_by_filter_pargs::~ThriftHiveMetastore_get_partitions_by_filter_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_partitions_by_filter_result::~ThriftHiveMetastore_get_partitions_by_filter_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1261; + ::apache::thrift::protocol::TType _etype1264; + xfer += iprot->readListBegin(_etype1264, _size1261); + this->success.resize(_size1261); + uint32_t _i1265; + for (_i1265 = 0; _i1265 < _size1261; ++_i1265) + { + xfer += this->success[_i1265].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1266; + for (_iter1266 = this->success.begin(); _iter1266 != this->success.end(); ++_iter1266) + { + xfer += (*_iter1266).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_by_filter_presult::~ThriftHiveMetastore_get_partitions_by_filter_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1267; + ::apache::thrift::protocol::TType _etype1270; + xfer += iprot->readListBegin(_etype1270, _size1267); + (*(this->success)).resize(_size1267); + uint32_t _i1271; + for (_i1271 = 0; _i1271 < _size1267; ++_i1271) + { + xfer += (*(this->success))[_i1271].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_part_specs_by_filter_args::~ThriftHiveMetastore_get_part_specs_by_filter_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_part_specs_by_filter_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->filter); + this->__isset.filter = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_part_specs_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_part_specs_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_I32, 4); + xfer += oprot->writeI32(this->max_parts); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_part_specs_by_filter_pargs::~ThriftHiveMetastore_get_part_specs_by_filter_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_part_specs_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_part_specs_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_I32, 4); + xfer += oprot->writeI32((*(this->max_parts))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_part_specs_by_filter_result::~ThriftHiveMetastore_get_part_specs_by_filter_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_part_specs_by_filter_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1272; + ::apache::thrift::protocol::TType _etype1275; + xfer += iprot->readListBegin(_etype1275, _size1272); + this->success.resize(_size1272); + uint32_t _i1276; + for (_i1276 = 0; _i1276 < _size1272; ++_i1276) + { + xfer += this->success[_i1276].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_part_specs_by_filter_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_part_specs_by_filter_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1277; + for (_iter1277 = this->success.begin(); _iter1277 != this->success.end(); ++_iter1277) + { + xfer += (*_iter1277).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_part_specs_by_filter_presult::~ThriftHiveMetastore_get_part_specs_by_filter_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_part_specs_by_filter_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1278; + ::apache::thrift::protocol::TType _etype1281; + xfer += iprot->readListBegin(_etype1281, _size1278); + (*(this->success)).resize(_size1278); + uint32_t _i1282; + for (_i1282 = 0; _i1282 < _size1278; ++_i1282) + { + xfer += (*(this->success))[_i1282].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partitions_by_expr_args::~ThriftHiveMetastore_get_partitions_by_expr_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_by_expr_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_by_expr_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_expr_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_by_expr_pargs::~ThriftHiveMetastore_get_partitions_by_expr_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_by_expr_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_expr_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_by_expr_result::~ThriftHiveMetastore_get_partitions_by_expr_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_by_expr_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_by_expr_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_expr_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_by_expr_presult::~ThriftHiveMetastore_get_partitions_by_expr_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_by_expr_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_num_partitions_by_filter_args::~ThriftHiveMetastore_get_num_partitions_by_filter_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_num_partitions_by_filter_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->filter); + this->__isset.filter = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_num_partitions_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_num_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->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_num_partitions_by_filter_pargs::~ThriftHiveMetastore_get_num_partitions_by_filter_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_num_partitions_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_num_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->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_num_partitions_by_filter_result::~ThriftHiveMetastore_get_num_partitions_by_filter_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_num_partitions_by_filter_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_num_partitions_by_filter_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_num_partitions_by_filter_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_num_partitions_by_filter_presult::~ThriftHiveMetastore_get_num_partitions_by_filter_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_num_partitions_by_filter_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partitions_by_names_args::~ThriftHiveMetastore_get_partitions_by_names_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_by_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->names.clear(); + uint32_t _size1283; + ::apache::thrift::protocol::TType _etype1286; + xfer += iprot->readListBegin(_etype1286, _size1283); + this->names.resize(_size1283); + uint32_t _i1287; + for (_i1287 = 0; _i1287 < _size1283; ++_i1287) + { + xfer += iprot->readString(this->names[_i1287]); + } + xfer += iprot->readListEnd(); + } + this->__isset.names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_by_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1288; + for (_iter1288 = this->names.begin(); _iter1288 != this->names.end(); ++_iter1288) + { + xfer += oprot->writeString((*_iter1288)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_by_names_pargs::~ThriftHiveMetastore_get_partitions_by_names_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_by_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1289; + for (_iter1289 = (*(this->names)).begin(); _iter1289 != (*(this->names)).end(); ++_iter1289) + { + xfer += oprot->writeString((*_iter1289)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_by_names_result::~ThriftHiveMetastore_get_partitions_by_names_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_by_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1290; + ::apache::thrift::protocol::TType _etype1293; + xfer += iprot->readListBegin(_etype1293, _size1290); + this->success.resize(_size1290); + uint32_t _i1294; + for (_i1294 = 0; _i1294 < _size1290; ++_i1294) + { + xfer += this->success[_i1294].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_by_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_names_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1295; + for (_iter1295 = this->success.begin(); _iter1295 != this->success.end(); ++_iter1295) + { + xfer += (*_iter1295).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_by_names_presult::~ThriftHiveMetastore_get_partitions_by_names_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_by_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1296; + ::apache::thrift::protocol::TType _etype1299; + xfer += iprot->readListBegin(_etype1299, _size1296); + (*(this->success)).resize(_size1296); + uint32_t _i1300; + for (_i1300 = 0; _i1300 < _size1296; ++_i1300) + { + xfer += (*(this->success))[_i1300].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_alter_partition_args::~ThriftHiveMetastore_alter_partition_args() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_part.read(iprot); + this->__isset.new_part = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_alter_partition_pargs::~ThriftHiveMetastore_alter_partition_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_alter_partition_result::~ThriftHiveMetastore_alter_partition_result() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_partition_presult::~ThriftHiveMetastore_alter_partition_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_alter_partitions_args::~ThriftHiveMetastore_alter_partitions_args() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->new_parts.clear(); + uint32_t _size1301; + ::apache::thrift::protocol::TType _etype1304; + xfer += iprot->readListBegin(_etype1304, _size1301); + this->new_parts.resize(_size1301); + uint32_t _i1305; + for (_i1305 = 0; _i1305 < _size1301; ++_i1305) + { + xfer += this->new_parts[_i1305].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.new_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1306; + for (_iter1306 = this->new_parts.begin(); _iter1306 != this->new_parts.end(); ++_iter1306) + { + xfer += (*_iter1306).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_partitions_pargs::~ThriftHiveMetastore_alter_partitions_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1307; + for (_iter1307 = (*(this->new_parts)).begin(); _iter1307 != (*(this->new_parts)).end(); ++_iter1307) + { + xfer += (*_iter1307).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_partitions_result::~ThriftHiveMetastore_alter_partitions_result() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partitions_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_partitions_presult::~ThriftHiveMetastore_alter_partitions_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_alter_partitions_with_environment_context_args::~ThriftHiveMetastore_alter_partitions_with_environment_context_args() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partitions_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->new_parts.clear(); + uint32_t _size1308; + ::apache::thrift::protocol::TType _etype1311; + xfer += iprot->readListBegin(_etype1311, _size1308); + this->new_parts.resize(_size1308); + uint32_t _i1312; + for (_i1312 = 0; _i1312 < _size1308; ++_i1312) + { + xfer += this->new_parts[_i1312].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.new_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environment_context.read(iprot); + this->__isset.environment_context = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_partitions_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partitions_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_parts", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->new_parts.size())); + std::vector ::const_iterator _iter1313; + for (_iter1313 = this->new_parts.begin(); _iter1313 != this->new_parts.end(); ++_iter1313) + { + xfer += (*_iter1313).write(oprot); + } + xfer += oprot->writeListEnd(); + } + 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; +} + + +ThriftHiveMetastore_alter_partitions_with_environment_context_pargs::~ThriftHiveMetastore_alter_partitions_with_environment_context_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partitions_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partitions_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_parts", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->new_parts)).size())); + std::vector ::const_iterator _iter1314; + for (_iter1314 = (*(this->new_parts)).begin(); _iter1314 != (*(this->new_parts)).end(); ++_iter1314) + { + xfer += (*_iter1314).write(oprot); + } + xfer += oprot->writeListEnd(); + } + 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; +} + + +ThriftHiveMetastore_alter_partitions_with_environment_context_result::~ThriftHiveMetastore_alter_partitions_with_environment_context_result() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partitions_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_partitions_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partitions_with_environment_context_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_partitions_with_environment_context_presult::~ThriftHiveMetastore_alter_partitions_with_environment_context_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partitions_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_alter_partition_with_environment_context_args::~ThriftHiveMetastore_alter_partition_with_environment_context_args() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_part.read(iprot); + this->__isset.new_part = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environment_context.read(iprot); + this->__isset.environment_context = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_alter_partition_with_environment_context_pargs::~ThriftHiveMetastore_alter_partition_with_environment_context_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_alter_partition_with_environment_context_result::~ThriftHiveMetastore_alter_partition_with_environment_context_result() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_with_environment_context_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_partition_with_environment_context_presult::~ThriftHiveMetastore_alter_partition_with_environment_context_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_partition_with_environment_context_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_rename_partition_args::~ThriftHiveMetastore_rename_partition_args() throw() { +} + + +uint32_t ThriftHiveMetastore_rename_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size1315; + ::apache::thrift::protocol::TType _etype1318; + xfer += iprot->readListBegin(_etype1318, _size1315); + this->part_vals.resize(_size1315); + uint32_t _i1319; + for (_i1319 = 0; _i1319 < _size1315; ++_i1319) + { + xfer += iprot->readString(this->part_vals[_i1319]); + } + xfer += iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_part.read(iprot); + this->__isset.new_part = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_rename_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1320; + for (_iter1320 = this->part_vals.begin(); _iter1320 != this->part_vals.end(); ++_iter1320) + { + xfer += oprot->writeString((*_iter1320)); + } + 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; +} + + +ThriftHiveMetastore_rename_partition_pargs::~ThriftHiveMetastore_rename_partition_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_rename_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1321; + for (_iter1321 = (*(this->part_vals)).begin(); _iter1321 != (*(this->part_vals)).end(); ++_iter1321) + { + xfer += oprot->writeString((*_iter1321)); + } + 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; +} + + +ThriftHiveMetastore_rename_partition_result::~ThriftHiveMetastore_rename_partition_result() throw() { +} + + +uint32_t ThriftHiveMetastore_rename_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_rename_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_rename_partition_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_rename_partition_presult::~ThriftHiveMetastore_rename_partition_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_rename_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_partition_name_has_valid_characters_args::~ThriftHiveMetastore_partition_name_has_valid_characters_args() throw() { +} + + +uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size1322; + ::apache::thrift::protocol::TType _etype1325; + xfer += iprot->readListBegin(_etype1325, _size1322); + this->part_vals.resize(_size1322); + uint32_t _i1326; + for (_i1326 = 0; _i1326 < _size1322; ++_i1326) + { + xfer += iprot->readString(this->part_vals[_i1326]); + } + xfer += iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->throw_exception); + this->__isset.throw_exception = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_has_valid_characters_args"); + + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); + std::vector ::const_iterator _iter1327; + for (_iter1327 = this->part_vals.begin(); _iter1327 != this->part_vals.end(); ++_iter1327) + { + xfer += oprot->writeString((*_iter1327)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("throw_exception", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->throw_exception); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_partition_name_has_valid_characters_pargs::~ThriftHiveMetastore_partition_name_has_valid_characters_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_has_valid_characters_pargs"); + + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); + std::vector ::const_iterator _iter1328; + for (_iter1328 = (*(this->part_vals)).begin(); _iter1328 != (*(this->part_vals)).end(); ++_iter1328) + { + xfer += oprot->writeString((*_iter1328)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("throw_exception", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->throw_exception))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_partition_name_has_valid_characters_result::~ThriftHiveMetastore_partition_name_has_valid_characters_result() throw() { +} + + +uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_has_valid_characters_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_partition_name_has_valid_characters_presult::~ThriftHiveMetastore_partition_name_has_valid_characters_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_partition_name_has_valid_characters_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_config_value_args::~ThriftHiveMetastore_get_config_value_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_config_value_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->defaultValue); + this->__isset.defaultValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_config_value_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_config_value_pargs::~ThriftHiveMetastore_get_config_value_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_config_value_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_config_value_result::~ThriftHiveMetastore_get_config_value_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_config_value_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_config_value_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_config_value_presult::~ThriftHiveMetastore_get_config_value_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_config_value_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_partition_name_to_vals_args::~ThriftHiveMetastore_partition_name_to_vals_args() throw() { +} + + +uint32_t ThriftHiveMetastore_partition_name_to_vals_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_partition_name_to_vals_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_partition_name_to_vals_pargs::~ThriftHiveMetastore_partition_name_to_vals_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_partition_name_to_vals_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_partition_name_to_vals_result::~ThriftHiveMetastore_partition_name_to_vals_result() throw() { +} + + +uint32_t ThriftHiveMetastore_partition_name_to_vals_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1329; + ::apache::thrift::protocol::TType _etype1332; + xfer += iprot->readListBegin(_etype1332, _size1329); + this->success.resize(_size1329); + uint32_t _i1333; + for (_i1333 = 0; _i1333 < _size1329; ++_i1333) + { + xfer += iprot->readString(this->success[_i1333]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter1334; + for (_iter1334 = this->success.begin(); _iter1334 != this->success.end(); ++_iter1334) + { + xfer += oprot->writeString((*_iter1334)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_partition_name_to_vals_presult::~ThriftHiveMetastore_partition_name_to_vals_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1335; + ::apache::thrift::protocol::TType _etype1338; + xfer += iprot->readListBegin(_etype1338, _size1335); + (*(this->success)).resize(_size1335); + uint32_t _i1339; + for (_i1339 = 0; _i1339 < _size1335; ++_i1339) + { + xfer += iprot->readString((*(this->success))[_i1339]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_partition_name_to_spec_args::~ThriftHiveMetastore_partition_name_to_spec_args() throw() { +} + + +uint32_t ThriftHiveMetastore_partition_name_to_spec_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_partition_name_to_spec_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_partition_name_to_spec_pargs::~ThriftHiveMetastore_partition_name_to_spec_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_partition_name_to_spec_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_partition_name_to_spec_result::~ThriftHiveMetastore_partition_name_to_spec_result() throw() { +} + + +uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->success.clear(); + uint32_t _size1340; + ::apache::thrift::protocol::TType _ktype1341; + ::apache::thrift::protocol::TType _vtype1342; + xfer += iprot->readMapBegin(_ktype1341, _vtype1342, _size1340); + uint32_t _i1344; + for (_i1344 = 0; _i1344 < _size1340; ++_i1344) + { + std::string _key1345; + xfer += iprot->readString(_key1345); + std::string& _val1346 = this->success[_key1345]; + xfer += iprot->readString(_val1346); + } + xfer += iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::map ::const_iterator _iter1347; + for (_iter1347 = this->success.begin(); _iter1347 != this->success.end(); ++_iter1347) + { + xfer += oprot->writeString(_iter1347->first); + xfer += oprot->writeString(_iter1347->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_partition_name_to_spec_presult::~ThriftHiveMetastore_partition_name_to_spec_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + (*(this->success)).clear(); + uint32_t _size1348; + ::apache::thrift::protocol::TType _ktype1349; + ::apache::thrift::protocol::TType _vtype1350; + xfer += iprot->readMapBegin(_ktype1349, _vtype1350, _size1348); + uint32_t _i1352; + for (_i1352 = 0; _i1352 < _size1348; ++_i1352) + { + std::string _key1353; + xfer += iprot->readString(_key1353); + std::string& _val1354 = (*(this->success))[_key1353]; + xfer += iprot->readString(_val1354); + } + xfer += iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_markPartitionForEvent_args::~ThriftHiveMetastore_markPartitionForEvent_args() throw() { +} + + +uint32_t ThriftHiveMetastore_markPartitionForEvent_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->part_vals.clear(); + uint32_t _size1355; + ::apache::thrift::protocol::TType _ktype1356; + ::apache::thrift::protocol::TType _vtype1357; + xfer += iprot->readMapBegin(_ktype1356, _vtype1357, _size1355); + uint32_t _i1359; + for (_i1359 = 0; _i1359 < _size1355; ++_i1359) + { + std::string _key1360; + xfer += iprot->readString(_key1360); + std::string& _val1361 = this->part_vals[_key1360]; + xfer += iprot->readString(_val1361); + } + xfer += iprot->readMapEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast1362; + xfer += iprot->readI32(ecast1362); + this->eventType = (PartitionEventType::type)ecast1362; + this->__isset.eventType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_markPartitionForEvent_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::map ::const_iterator _iter1363; + for (_iter1363 = this->part_vals.begin(); _iter1363 != this->part_vals.end(); ++_iter1363) + { + xfer += oprot->writeString(_iter1363->first); + xfer += oprot->writeString(_iter1363->second); + } + 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; +} + + +ThriftHiveMetastore_markPartitionForEvent_pargs::~ThriftHiveMetastore_markPartitionForEvent_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_markPartitionForEvent_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::map ::const_iterator _iter1364; + for (_iter1364 = (*(this->part_vals)).begin(); _iter1364 != (*(this->part_vals)).end(); ++_iter1364) + { + xfer += oprot->writeString(_iter1364->first); + xfer += oprot->writeString(_iter1364->second); + } + 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; +} + + +ThriftHiveMetastore_markPartitionForEvent_result::~ThriftHiveMetastore_markPartitionForEvent_result() throw() { +} + + +uint32_t ThriftHiveMetastore_markPartitionForEvent_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o5.read(iprot); + this->__isset.o5 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o6.read(iprot); + this->__isset.o6 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_markPartitionForEvent_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_markPartitionForEvent_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o5) { + xfer += oprot->writeFieldBegin("o5", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->o5.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o6) { + xfer += oprot->writeFieldBegin("o6", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->o6.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_markPartitionForEvent_presult::~ThriftHiveMetastore_markPartitionForEvent_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_markPartitionForEvent_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o5.read(iprot); + this->__isset.o5 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o6.read(iprot); + this->__isset.o6 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_isPartitionMarkedForEvent_args::~ThriftHiveMetastore_isPartitionMarkedForEvent_args() throw() { +} + + +uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->part_vals.clear(); + uint32_t _size1365; + ::apache::thrift::protocol::TType _ktype1366; + ::apache::thrift::protocol::TType _vtype1367; + xfer += iprot->readMapBegin(_ktype1366, _vtype1367, _size1365); + uint32_t _i1369; + for (_i1369 = 0; _i1369 < _size1365; ++_i1369) + { + std::string _key1370; + xfer += iprot->readString(_key1370); + std::string& _val1371 = this->part_vals[_key1370]; + xfer += iprot->readString(_val1371); + } + xfer += iprot->readMapEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast1372; + xfer += iprot->readI32(ecast1372); + this->eventType = (PartitionEventType::type)ecast1372; + this->__isset.eventType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::map ::const_iterator _iter1373; + for (_iter1373 = this->part_vals.begin(); _iter1373 != this->part_vals.end(); ++_iter1373) + { + xfer += oprot->writeString(_iter1373->first); + xfer += oprot->writeString(_iter1373->second); + } + 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; +} + + +ThriftHiveMetastore_isPartitionMarkedForEvent_pargs::~ThriftHiveMetastore_isPartitionMarkedForEvent_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::map ::const_iterator _iter1374; + for (_iter1374 = (*(this->part_vals)).begin(); _iter1374 != (*(this->part_vals)).end(); ++_iter1374) + { + xfer += oprot->writeString(_iter1374->first); + xfer += oprot->writeString(_iter1374->second); + } + 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; +} + + +ThriftHiveMetastore_isPartitionMarkedForEvent_result::~ThriftHiveMetastore_isPartitionMarkedForEvent_result() throw() { +} + + +uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o5.read(iprot); + this->__isset.o5 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o6.read(iprot); + this->__isset.o6 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_isPartitionMarkedForEvent_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o5) { + xfer += oprot->writeFieldBegin("o5", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->o5.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o6) { + xfer += oprot->writeFieldBegin("o6", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->o6.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_isPartitionMarkedForEvent_presult::~ThriftHiveMetastore_isPartitionMarkedForEvent_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o5.read(iprot); + this->__isset.o5 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o6.read(iprot); + this->__isset.o6 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_index_args::~ThriftHiveMetastore_add_index_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_index_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_index.read(iprot); + this->__isset.new_index = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->index_table.read(iprot); + this->__isset.index_table = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_add_index_pargs::~ThriftHiveMetastore_add_index_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_add_index_result::~ThriftHiveMetastore_add_index_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_index_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_index_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_index_presult::~ThriftHiveMetastore_add_index_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_index_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_alter_index_args::~ThriftHiveMetastore_alter_index_args() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_index_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->base_tbl_name); + this->__isset.base_tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->idx_name); + this->__isset.idx_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_idx.read(iprot); + this->__isset.new_idx = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_alter_index_pargs::~ThriftHiveMetastore_alter_index_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_alter_index_result::~ThriftHiveMetastore_alter_index_result() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_index_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_index_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_index_presult::~ThriftHiveMetastore_alter_index_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_index_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_index_by_name_args::~ThriftHiveMetastore_drop_index_by_name_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_index_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->index_name); + this->__isset.index_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_drop_index_by_name_pargs::~ThriftHiveMetastore_drop_index_by_name_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_drop_index_by_name_result::~ThriftHiveMetastore_drop_index_by_name_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_index_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_index_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_index_by_name_presult::~ThriftHiveMetastore_drop_index_by_name_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_index_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_index_by_name_args::~ThriftHiveMetastore_get_index_by_name_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_index_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->index_name); + this->__isset.index_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_index_by_name_pargs::~ThriftHiveMetastore_get_index_by_name_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_index_by_name_result::~ThriftHiveMetastore_get_index_by_name_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_index_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_index_by_name_presult::~ThriftHiveMetastore_get_index_by_name_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_index_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_indexes_args::~ThriftHiveMetastore_get_indexes_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_indexes_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_indexes); + this->__isset.max_indexes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_indexes_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_indexes_pargs::~ThriftHiveMetastore_get_indexes_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_indexes_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_indexes_result::~ThriftHiveMetastore_get_indexes_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_indexes_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1375; + ::apache::thrift::protocol::TType _etype1378; + xfer += iprot->readListBegin(_etype1378, _size1375); + this->success.resize(_size1375); + uint32_t _i1379; + for (_i1379 = 0; _i1379 < _size1375; ++_i1379) + { + xfer += this->success[_i1379].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_indexes_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1380; + for (_iter1380 = this->success.begin(); _iter1380 != this->success.end(); ++_iter1380) + { + xfer += (*_iter1380).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_indexes_presult::~ThriftHiveMetastore_get_indexes_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_indexes_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1381; + ::apache::thrift::protocol::TType _etype1384; + xfer += iprot->readListBegin(_etype1384, _size1381); + (*(this->success)).resize(_size1381); + uint32_t _i1385; + for (_i1385 = 0; _i1385 < _size1381; ++_i1385) + { + xfer += (*(this->success))[_i1385].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_index_names_args::~ThriftHiveMetastore_get_index_names_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_index_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_indexes); + this->__isset.max_indexes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_index_names_pargs::~ThriftHiveMetastore_get_index_names_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_index_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_index_names_result::~ThriftHiveMetastore_get_index_names_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_index_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1386; + ::apache::thrift::protocol::TType _etype1389; + xfer += iprot->readListBegin(_etype1389, _size1386); + this->success.resize(_size1386); + uint32_t _i1390; + for (_i1390 = 0; _i1390 < _size1386; ++_i1390) + { + xfer += iprot->readString(this->success[_i1390]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter1391; + for (_iter1391 = this->success.begin(); _iter1391 != this->success.end(); ++_iter1391) + { + xfer += oprot->writeString((*_iter1391)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_index_names_presult::~ThriftHiveMetastore_get_index_names_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_index_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1392; + ::apache::thrift::protocol::TType _etype1395; + xfer += iprot->readListBegin(_etype1395, _size1392); + (*(this->success)).resize(_size1392); + uint32_t _i1396; + for (_i1396 = 0; _i1396 < _size1392; ++_i1396) + { + xfer += iprot->readString((*(this->success))[_i1396]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_primary_keys_args::~ThriftHiveMetastore_get_primary_keys_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_primary_keys_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_primary_keys_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_primary_keys_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_primary_keys_pargs::~ThriftHiveMetastore_get_primary_keys_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_primary_keys_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_primary_keys_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_primary_keys_result::~ThriftHiveMetastore_get_primary_keys_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_primary_keys_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_primary_keys_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_primary_keys_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_primary_keys_presult::~ThriftHiveMetastore_get_primary_keys_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_primary_keys_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_foreign_keys_args::~ThriftHiveMetastore_get_foreign_keys_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_foreign_keys_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_foreign_keys_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_foreign_keys_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_foreign_keys_pargs::~ThriftHiveMetastore_get_foreign_keys_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_foreign_keys_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_foreign_keys_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_foreign_keys_result::~ThriftHiveMetastore_get_foreign_keys_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_foreign_keys_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_foreign_keys_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_foreign_keys_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_foreign_keys_presult::~ThriftHiveMetastore_get_foreign_keys_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_foreign_keys_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_unique_constraints_args::~ThriftHiveMetastore_get_unique_constraints_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_unique_constraints_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_unique_constraints_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_unique_constraints_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_unique_constraints_pargs::~ThriftHiveMetastore_get_unique_constraints_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_unique_constraints_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_unique_constraints_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_unique_constraints_result::~ThriftHiveMetastore_get_unique_constraints_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_unique_constraints_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_unique_constraints_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_unique_constraints_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_unique_constraints_presult::~ThriftHiveMetastore_get_unique_constraints_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_unique_constraints_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_not_null_constraints_args::~ThriftHiveMetastore_get_not_null_constraints_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_not_null_constraints_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_not_null_constraints_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_not_null_constraints_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_not_null_constraints_pargs::~ThriftHiveMetastore_get_not_null_constraints_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_not_null_constraints_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_not_null_constraints_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_not_null_constraints_result::~ThriftHiveMetastore_get_not_null_constraints_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_not_null_constraints_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_not_null_constraints_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_not_null_constraints_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_not_null_constraints_presult::~ThriftHiveMetastore_get_not_null_constraints_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_not_null_constraints_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_update_table_column_statistics_args::~ThriftHiveMetastore_update_table_column_statistics_args() throw() { +} + + +uint32_t ThriftHiveMetastore_update_table_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->stats_obj.read(iprot); + this->__isset.stats_obj = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_update_table_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_table_column_statistics_args"); + + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->stats_obj.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_update_table_column_statistics_pargs::~ThriftHiveMetastore_update_table_column_statistics_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_update_table_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_table_column_statistics_pargs"); + + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->stats_obj)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_update_table_column_statistics_result::~ThriftHiveMetastore_update_table_column_statistics_result() throw() { +} + + +uint32_t ThriftHiveMetastore_update_table_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_update_table_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_table_column_statistics_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_update_table_column_statistics_presult::~ThriftHiveMetastore_update_table_column_statistics_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_update_table_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_update_partition_column_statistics_args::~ThriftHiveMetastore_update_partition_column_statistics_args() throw() { +} + + +uint32_t ThriftHiveMetastore_update_partition_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->stats_obj.read(iprot); + this->__isset.stats_obj = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_update_partition_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_partition_column_statistics_args"); + + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->stats_obj.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_update_partition_column_statistics_pargs::~ThriftHiveMetastore_update_partition_column_statistics_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_update_partition_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_partition_column_statistics_pargs"); + + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->stats_obj)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_update_partition_column_statistics_result::~ThriftHiveMetastore_update_partition_column_statistics_result() throw() { +} + + +uint32_t ThriftHiveMetastore_update_partition_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_update_partition_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_partition_column_statistics_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_update_partition_column_statistics_presult::~ThriftHiveMetastore_update_partition_column_statistics_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_update_partition_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_table_column_statistics_args::~ThriftHiveMetastore_get_table_column_statistics_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->col_name); + this->__isset.col_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->col_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_column_statistics_pargs::~ThriftHiveMetastore_get_table_column_statistics_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->col_name))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_column_statistics_result::~ThriftHiveMetastore_get_table_column_statistics_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_column_statistics_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_column_statistics_presult::~ThriftHiveMetastore_get_table_column_statistics_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partition_column_statistics_args::~ThriftHiveMetastore_get_partition_column_statistics_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->col_name); + this->__isset.col_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->col_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partition_column_statistics_pargs::~ThriftHiveMetastore_get_partition_column_statistics_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->col_name))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partition_column_statistics_result::~ThriftHiveMetastore_get_partition_column_statistics_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_column_statistics_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partition_column_statistics_presult::~ThriftHiveMetastore_get_partition_column_statistics_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partition_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_table_statistics_req_args::~ThriftHiveMetastore_get_table_statistics_req_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_statistics_req_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_statistics_req_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_statistics_req_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_statistics_req_pargs::~ThriftHiveMetastore_get_table_statistics_req_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_statistics_req_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_statistics_req_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_statistics_req_result::~ThriftHiveMetastore_get_table_statistics_req_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_statistics_req_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_statistics_req_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_statistics_req_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_table_statistics_req_presult::~ThriftHiveMetastore_get_table_statistics_req_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_table_statistics_req_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_partitions_statistics_req_args::~ThriftHiveMetastore_get_partitions_statistics_req_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_statistics_req_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_statistics_req_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_statistics_req_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_statistics_req_pargs::~ThriftHiveMetastore_get_partitions_statistics_req_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_statistics_req_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_statistics_req_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_statistics_req_result::~ThriftHiveMetastore_get_partitions_statistics_req_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_statistics_req_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partitions_statistics_req_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_statistics_req_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_partitions_statistics_req_presult::~ThriftHiveMetastore_get_partitions_statistics_req_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_partitions_statistics_req_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_aggr_stats_for_args::~ThriftHiveMetastore_get_aggr_stats_for_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_aggr_stats_for_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_aggr_stats_for_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_aggr_stats_for_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_aggr_stats_for_pargs::~ThriftHiveMetastore_get_aggr_stats_for_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_aggr_stats_for_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_aggr_stats_for_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_aggr_stats_for_result::~ThriftHiveMetastore_get_aggr_stats_for_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_aggr_stats_for_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_aggr_stats_for_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_aggr_stats_for_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_aggr_stats_for_presult::~ThriftHiveMetastore_get_aggr_stats_for_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_aggr_stats_for_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_set_aggr_stats_for_args::~ThriftHiveMetastore_set_aggr_stats_for_args() throw() { +} + + +uint32_t ThriftHiveMetastore_set_aggr_stats_for_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_set_aggr_stats_for_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_aggr_stats_for_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_set_aggr_stats_for_pargs::~ThriftHiveMetastore_set_aggr_stats_for_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_set_aggr_stats_for_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_aggr_stats_for_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_set_aggr_stats_for_result::~ThriftHiveMetastore_set_aggr_stats_for_result() throw() { +} + + +uint32_t ThriftHiveMetastore_set_aggr_stats_for_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_set_aggr_stats_for_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_aggr_stats_for_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_set_aggr_stats_for_presult::~ThriftHiveMetastore_set_aggr_stats_for_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_set_aggr_stats_for_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_delete_partition_column_statistics_args::~ThriftHiveMetastore_delete_partition_column_statistics_args() throw() { +} + + +uint32_t ThriftHiveMetastore_delete_partition_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->col_name); + this->__isset.col_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_delete_partition_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_partition_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->col_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_delete_partition_column_statistics_pargs::~ThriftHiveMetastore_delete_partition_column_statistics_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_delete_partition_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_partition_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->col_name))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_delete_partition_column_statistics_result::~ThriftHiveMetastore_delete_partition_column_statistics_result() throw() { +} + + +uint32_t ThriftHiveMetastore_delete_partition_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_delete_partition_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_partition_column_statistics_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_delete_partition_column_statistics_presult::~ThriftHiveMetastore_delete_partition_column_statistics_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_delete_partition_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_delete_table_column_statistics_args::~ThriftHiveMetastore_delete_table_column_statistics_args() throw() { +} + + +uint32_t ThriftHiveMetastore_delete_table_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->col_name); + this->__isset.col_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_delete_table_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_table_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->col_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_delete_table_column_statistics_pargs::~ThriftHiveMetastore_delete_table_column_statistics_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_delete_table_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_table_column_statistics_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("col_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->col_name))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_delete_table_column_statistics_result::~ThriftHiveMetastore_delete_table_column_statistics_result() throw() { +} + + +uint32_t ThriftHiveMetastore_delete_table_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_delete_table_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_table_column_statistics_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_delete_table_column_statistics_presult::~ThriftHiveMetastore_delete_table_column_statistics_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_delete_table_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_create_function_args::~ThriftHiveMetastore_create_function_args() throw() { +} + + +uint32_t ThriftHiveMetastore_create_function_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->func.read(iprot); + this->__isset.func = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_function_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_function_args"); + + xfer += oprot->writeFieldBegin("func", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->func.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_create_function_pargs::~ThriftHiveMetastore_create_function_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_create_function_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_function_pargs"); + + xfer += oprot->writeFieldBegin("func", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->func)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_create_function_result::~ThriftHiveMetastore_create_function_result() throw() { +} + + +uint32_t ThriftHiveMetastore_create_function_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_function_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_function_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_create_function_presult::~ThriftHiveMetastore_create_function_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_create_function_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_function_args::~ThriftHiveMetastore_drop_function_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_function_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->funcName); + this->__isset.funcName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_function_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_function_args"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->funcName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_function_pargs::~ThriftHiveMetastore_drop_function_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_function_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_function_pargs"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->funcName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_function_result::~ThriftHiveMetastore_drop_function_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_function_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_function_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_function_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_function_presult::~ThriftHiveMetastore_drop_function_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_function_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_alter_function_args::~ThriftHiveMetastore_alter_function_args() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_function_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->funcName); + this->__isset.funcName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->newFunc.read(iprot); + this->__isset.newFunc = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_function_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_function_args"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->funcName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("newFunc", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->newFunc.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_function_pargs::~ThriftHiveMetastore_alter_function_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_function_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_function_pargs"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->funcName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("newFunc", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->newFunc)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_function_result::~ThriftHiveMetastore_alter_function_result() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_function_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_alter_function_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_function_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_alter_function_presult::~ThriftHiveMetastore_alter_function_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_alter_function_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_functions_args::~ThriftHiveMetastore_get_functions_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_functions_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->pattern); + this->__isset.pattern = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_functions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_functions_args"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + 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; +} + + +ThriftHiveMetastore_get_functions_pargs::~ThriftHiveMetastore_get_functions_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_functions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_functions_pargs"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbName))); + 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; +} + + +ThriftHiveMetastore_get_functions_result::~ThriftHiveMetastore_get_functions_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_functions_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1397; + ::apache::thrift::protocol::TType _etype1400; + xfer += iprot->readListBegin(_etype1400, _size1397); + this->success.resize(_size1397); + uint32_t _i1401; + for (_i1401 = 0; _i1401 < _size1397; ++_i1401) + { + xfer += iprot->readString(this->success[_i1401]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_functions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_functions_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter1402; + for (_iter1402 = this->success.begin(); _iter1402 != this->success.end(); ++_iter1402) + { + xfer += oprot->writeString((*_iter1402)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_functions_presult::~ThriftHiveMetastore_get_functions_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_functions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1403; + ::apache::thrift::protocol::TType _etype1406; + xfer += iprot->readListBegin(_etype1406, _size1403); + (*(this->success)).resize(_size1403); + uint32_t _i1407; + for (_i1407 = 0; _i1407 < _size1403; ++_i1407) + { + xfer += iprot->readString((*(this->success))[_i1407]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_function_args::~ThriftHiveMetastore_get_function_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_function_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->funcName); + this->__isset.funcName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_function_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_function_args"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->funcName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_function_pargs::~ThriftHiveMetastore_get_function_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_function_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_function_pargs"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("funcName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->funcName))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_function_result::~ThriftHiveMetastore_get_function_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_function_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_function_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_function_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_function_presult::~ThriftHiveMetastore_get_function_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_function_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_all_functions_args::~ThriftHiveMetastore_get_all_functions_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_functions_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_all_functions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_functions_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_all_functions_pargs::~ThriftHiveMetastore_get_all_functions_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_functions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_functions_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_all_functions_result::~ThriftHiveMetastore_get_all_functions_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_functions_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_all_functions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_functions_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_all_functions_presult::~ThriftHiveMetastore_get_all_functions_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_functions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_create_role_args::~ThriftHiveMetastore_create_role_args() throw() { +} + + +uint32_t ThriftHiveMetastore_create_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->role.read(iprot); + this->__isset.role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_create_role_pargs::~ThriftHiveMetastore_create_role_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_create_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_create_role_result::~ThriftHiveMetastore_create_role_result() throw() { +} + + +uint32_t ThriftHiveMetastore_create_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_create_role_presult::~ThriftHiveMetastore_create_role_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_create_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_drop_role_args::~ThriftHiveMetastore_drop_role_args() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_drop_role_pargs::~ThriftHiveMetastore_drop_role_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_drop_role_result::~ThriftHiveMetastore_drop_role_result() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_drop_role_presult::~ThriftHiveMetastore_drop_role_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_drop_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_role_names_args::~ThriftHiveMetastore_get_role_names_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_role_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_role_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_role_names_pargs::~ThriftHiveMetastore_get_role_names_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_role_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_role_names_result::~ThriftHiveMetastore_get_role_names_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_role_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1408; + ::apache::thrift::protocol::TType _etype1411; + xfer += iprot->readListBegin(_etype1411, _size1408); + this->success.resize(_size1408); + uint32_t _i1412; + for (_i1412 = 0; _i1412 < _size1408; ++_i1412) + { + xfer += iprot->readString(this->success[_i1412]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_role_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter1413; + for (_iter1413 = this->success.begin(); _iter1413 != this->success.end(); ++_iter1413) + { + xfer += oprot->writeString((*_iter1413)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_role_names_presult::~ThriftHiveMetastore_get_role_names_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_role_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1414; + ::apache::thrift::protocol::TType _etype1417; + xfer += iprot->readListBegin(_etype1417, _size1414); + (*(this->success)).resize(_size1414); + uint32_t _i1418; + for (_i1418 = 0; _i1418 < _size1414; ++_i1418) + { + xfer += iprot->readString((*(this->success))[_i1418]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_grant_role_args::~ThriftHiveMetastore_grant_role_args() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast1419; + xfer += iprot->readI32(ecast1419); + this->principal_type = (PrincipalType::type)ecast1419; + this->__isset.principal_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast1420; + xfer += iprot->readI32(ecast1420); + this->grantorType = (PrincipalType::type)ecast1420; + this->__isset.grantorType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->grant_option); + this->__isset.grant_option = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_grant_role_pargs::~ThriftHiveMetastore_grant_role_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_grant_role_result::~ThriftHiveMetastore_grant_role_result() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_grant_role_presult::~ThriftHiveMetastore_grant_role_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_revoke_role_args::~ThriftHiveMetastore_revoke_role_args() throw() { +} + + +uint32_t ThriftHiveMetastore_revoke_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast1421; + xfer += iprot->readI32(ecast1421); + this->principal_type = (PrincipalType::type)ecast1421; + this->__isset.principal_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_revoke_role_pargs::~ThriftHiveMetastore_revoke_role_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_revoke_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_revoke_role_result::~ThriftHiveMetastore_revoke_role_result() throw() { +} + + +uint32_t ThriftHiveMetastore_revoke_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_revoke_role_presult::~ThriftHiveMetastore_revoke_role_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_revoke_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_list_roles_args::~ThriftHiveMetastore_list_roles_args() throw() { +} + + +uint32_t ThriftHiveMetastore_list_roles_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast1422; + xfer += iprot->readI32(ecast1422); + this->principal_type = (PrincipalType::type)ecast1422; + this->__isset.principal_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_roles_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_list_roles_pargs::~ThriftHiveMetastore_list_roles_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_list_roles_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_list_roles_result::~ThriftHiveMetastore_list_roles_result() throw() { +} + + +uint32_t ThriftHiveMetastore_list_roles_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1423; + ::apache::thrift::protocol::TType _etype1426; + xfer += iprot->readListBegin(_etype1426, _size1423); + this->success.resize(_size1423); + uint32_t _i1427; + for (_i1427 = 0; _i1427 < _size1423; ++_i1427) + { + xfer += this->success[_i1427].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_roles_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1428; + for (_iter1428 = this->success.begin(); _iter1428 != this->success.end(); ++_iter1428) + { + xfer += (*_iter1428).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_list_roles_presult::~ThriftHiveMetastore_list_roles_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1429; + ::apache::thrift::protocol::TType _etype1432; + xfer += iprot->readListBegin(_etype1432, _size1429); + (*(this->success)).resize(_size1429); + uint32_t _i1433; + for (_i1433 = 0; _i1433 < _size1429; ++_i1433) + { + xfer += (*(this->success))[_i1433].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_grant_revoke_role_args::~ThriftHiveMetastore_grant_revoke_role_args() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_revoke_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_revoke_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_role_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_grant_revoke_role_pargs::~ThriftHiveMetastore_grant_revoke_role_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_revoke_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_role_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_grant_revoke_role_result::~ThriftHiveMetastore_grant_revoke_role_result() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_revoke_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_revoke_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_role_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_grant_revoke_role_presult::~ThriftHiveMetastore_grant_revoke_role_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_revoke_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_principals_in_role_args::~ThriftHiveMetastore_get_principals_in_role_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_principals_in_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_principals_in_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_principals_in_role_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_principals_in_role_pargs::~ThriftHiveMetastore_get_principals_in_role_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_principals_in_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_principals_in_role_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_principals_in_role_result::~ThriftHiveMetastore_get_principals_in_role_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_principals_in_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_principals_in_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_principals_in_role_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_principals_in_role_presult::~ThriftHiveMetastore_get_principals_in_role_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_principals_in_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_role_grants_for_principal_args::~ThriftHiveMetastore_get_role_grants_for_principal_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_role_grants_for_principal_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_role_grants_for_principal_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_grants_for_principal_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_role_grants_for_principal_pargs::~ThriftHiveMetastore_get_role_grants_for_principal_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_role_grants_for_principal_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_grants_for_principal_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_role_grants_for_principal_result::~ThriftHiveMetastore_get_role_grants_for_principal_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_role_grants_for_principal_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_role_grants_for_principal_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_grants_for_principal_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_role_grants_for_principal_presult::~ThriftHiveMetastore_get_role_grants_for_principal_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_role_grants_for_principal_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_privilege_set_args::~ThriftHiveMetastore_get_privilege_set_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_privilege_set_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->hiveObject.read(iprot); + this->__isset.hiveObject = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size1434; + ::apache::thrift::protocol::TType _etype1437; + xfer += iprot->readListBegin(_etype1437, _size1434); + this->group_names.resize(_size1434); + uint32_t _i1438; + for (_i1438 = 0; _i1438 < _size1434; ++_i1438) + { + xfer += iprot->readString(this->group_names[_i1438]); + } + xfer += iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1439; + for (_iter1439 = this->group_names.begin(); _iter1439 != this->group_names.end(); ++_iter1439) + { + xfer += oprot->writeString((*_iter1439)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_privilege_set_pargs::~ThriftHiveMetastore_get_privilege_set_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1440; + for (_iter1440 = (*(this->group_names)).begin(); _iter1440 != (*(this->group_names)).end(); ++_iter1440) + { + xfer += oprot->writeString((*_iter1440)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_privilege_set_result::~ThriftHiveMetastore_get_privilege_set_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_privilege_set_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_privilege_set_presult::~ThriftHiveMetastore_get_privilege_set_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_privilege_set_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_list_privileges_args::~ThriftHiveMetastore_list_privileges_args() throw() { +} + + +uint32_t ThriftHiveMetastore_list_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast1441; + xfer += iprot->readI32(ecast1441); + this->principal_type = (PrincipalType::type)ecast1441; + this->__isset.principal_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->hiveObject.read(iprot); + this->__isset.hiveObject = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_list_privileges_pargs::~ThriftHiveMetastore_list_privileges_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_list_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_list_privileges_result::~ThriftHiveMetastore_list_privileges_result() throw() { +} + + +uint32_t ThriftHiveMetastore_list_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1442; + ::apache::thrift::protocol::TType _etype1445; + xfer += iprot->readListBegin(_etype1445, _size1442); + this->success.resize(_size1442); + uint32_t _i1446; + for (_i1446 = 0; _i1446 < _size1442; ++_i1446) + { + xfer += this->success[_i1446].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter1447; + for (_iter1447 = this->success.begin(); _iter1447 != this->success.end(); ++_iter1447) + { + xfer += (*_iter1447).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_list_privileges_presult::~ThriftHiveMetastore_list_privileges_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_list_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1448; + ::apache::thrift::protocol::TType _etype1451; + xfer += iprot->readListBegin(_etype1451, _size1448); + (*(this->success)).resize(_size1448); + uint32_t _i1452; + for (_i1452 = 0; _i1452 < _size1448; ++_i1452) + { + xfer += (*(this->success))[_i1452].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_grant_privileges_args::~ThriftHiveMetastore_grant_privileges_args() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_grant_privileges_pargs::~ThriftHiveMetastore_grant_privileges_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_grant_privileges_result::~ThriftHiveMetastore_grant_privileges_result() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_grant_privileges_presult::~ThriftHiveMetastore_grant_privileges_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_revoke_privileges_args::~ThriftHiveMetastore_revoke_privileges_args() throw() { +} + + +uint32_t ThriftHiveMetastore_revoke_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_revoke_privileges_pargs::~ThriftHiveMetastore_revoke_privileges_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_revoke_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_revoke_privileges_result::~ThriftHiveMetastore_revoke_privileges_result() throw() { +} + + +uint32_t ThriftHiveMetastore_revoke_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_revoke_privileges_presult::~ThriftHiveMetastore_revoke_privileges_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_revoke_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_grant_revoke_privileges_args::~ThriftHiveMetastore_grant_revoke_privileges_args() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_revoke_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_revoke_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_privileges_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_grant_revoke_privileges_pargs::~ThriftHiveMetastore_grant_revoke_privileges_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_revoke_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_privileges_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_grant_revoke_privileges_result::~ThriftHiveMetastore_grant_revoke_privileges_result() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_revoke_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_revoke_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_revoke_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_grant_revoke_privileges_presult::~ThriftHiveMetastore_grant_revoke_privileges_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_grant_revoke_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_set_ugi_args::~ThriftHiveMetastore_set_ugi_args() throw() { +} + + +uint32_t ThriftHiveMetastore_set_ugi_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size1453; + ::apache::thrift::protocol::TType _etype1456; + xfer += iprot->readListBegin(_etype1456, _size1453); + this->group_names.resize(_size1453); + uint32_t _i1457; + for (_i1457 = 0; _i1457 < _size1453; ++_i1457) + { + xfer += iprot->readString(this->group_names[_i1457]); + } + xfer += iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_set_ugi_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1458; + for (_iter1458 = this->group_names.begin(); _iter1458 != this->group_names.end(); ++_iter1458) + { + xfer += oprot->writeString((*_iter1458)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_set_ugi_pargs::~ThriftHiveMetastore_set_ugi_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_set_ugi_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter1459; + for (_iter1459 = (*(this->group_names)).begin(); _iter1459 != (*(this->group_names)).end(); ++_iter1459) + { + xfer += oprot->writeString((*_iter1459)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_set_ugi_result::~ThriftHiveMetastore_set_ugi_result() throw() { +} + + +uint32_t ThriftHiveMetastore_set_ugi_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1460; + ::apache::thrift::protocol::TType _etype1463; + xfer += iprot->readListBegin(_etype1463, _size1460); + this->success.resize(_size1460); + uint32_t _i1464; + for (_i1464 = 0; _i1464 < _size1460; ++_i1464) + { + xfer += iprot->readString(this->success[_i1464]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_set_ugi_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter1465; + for (_iter1465 = this->success.begin(); _iter1465 != this->success.end(); ++_iter1465) + { + xfer += oprot->writeString((*_iter1465)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_set_ugi_presult::~ThriftHiveMetastore_set_ugi_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_set_ugi_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1466; + ::apache::thrift::protocol::TType _etype1469; + xfer += iprot->readListBegin(_etype1469, _size1466); + (*(this->success)).resize(_size1466); + uint32_t _i1470; + for (_i1470 = 0; _i1470 < _size1466; ++_i1470) + { + xfer += iprot->readString((*(this->success))[_i1470]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_delegation_token_args::~ThriftHiveMetastore_get_delegation_token_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token_owner); + this->__isset.token_owner = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->renewer_kerberos_principal_name); + this->__isset.renewer_kerberos_principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_delegation_token_pargs::~ThriftHiveMetastore_get_delegation_token_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_get_delegation_token_result::~ThriftHiveMetastore_get_delegation_token_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_delegation_token_presult::~ThriftHiveMetastore_get_delegation_token_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_renew_delegation_token_args::~ThriftHiveMetastore_renew_delegation_token_args() throw() { +} + + +uint32_t ThriftHiveMetastore_renew_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token_str_form); + this->__isset.token_str_form = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_renew_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_renew_delegation_token_pargs::~ThriftHiveMetastore_renew_delegation_token_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_renew_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_renew_delegation_token_result::~ThriftHiveMetastore_renew_delegation_token_result() throw() { +} + + +uint32_t ThriftHiveMetastore_renew_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_renew_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0); + xfer += oprot->writeI64(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_renew_delegation_token_presult::~ThriftHiveMetastore_renew_delegation_token_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_renew_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_cancel_delegation_token_args::~ThriftHiveMetastore_cancel_delegation_token_args() throw() { +} + + +uint32_t ThriftHiveMetastore_cancel_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token_str_form); + this->__isset.token_str_form = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_cancel_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_cancel_delegation_token_pargs::~ThriftHiveMetastore_cancel_delegation_token_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_cancel_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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; +} + + +ThriftHiveMetastore_cancel_delegation_token_result::~ThriftHiveMetastore_cancel_delegation_token_result() throw() { +} + + +uint32_t ThriftHiveMetastore_cancel_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_cancel_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_cancel_delegation_token_presult::~ThriftHiveMetastore_cancel_delegation_token_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_cancel_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_token_args::~ThriftHiveMetastore_add_token_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token_identifier); + this->__isset.token_identifier = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->delegation_token); + this->__isset.delegation_token = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_token_args"); + + xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->token_identifier); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("delegation_token", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->delegation_token); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_token_pargs::~ThriftHiveMetastore_add_token_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_token_pargs"); + + xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->token_identifier))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("delegation_token", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->delegation_token))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_token_result::~ThriftHiveMetastore_add_token_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_token_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_token_presult::~ThriftHiveMetastore_add_token_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_remove_token_args::~ThriftHiveMetastore_remove_token_args() throw() { +} + + +uint32_t ThriftHiveMetastore_remove_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token_identifier); + this->__isset.token_identifier = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_token_args"); + + xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->token_identifier); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_remove_token_pargs::~ThriftHiveMetastore_remove_token_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_remove_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_token_pargs"); + + xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->token_identifier))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_remove_token_result::~ThriftHiveMetastore_remove_token_result() throw() { +} + + +uint32_t ThriftHiveMetastore_remove_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_token_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_remove_token_presult::~ThriftHiveMetastore_remove_token_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_remove_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_token_args::~ThriftHiveMetastore_get_token_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token_identifier); + this->__isset.token_identifier = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_token_args"); + + xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->token_identifier); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_token_pargs::~ThriftHiveMetastore_get_token_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_token_pargs"); + + xfer += oprot->writeFieldBegin("token_identifier", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->token_identifier))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_token_result::~ThriftHiveMetastore_get_token_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_token_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_token_presult::~ThriftHiveMetastore_get_token_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_all_token_identifiers_args::~ThriftHiveMetastore_get_all_token_identifiers_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_token_identifiers_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_all_token_identifiers_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_token_identifiers_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_all_token_identifiers_pargs::~ThriftHiveMetastore_get_all_token_identifiers_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_token_identifiers_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_token_identifiers_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_all_token_identifiers_result::~ThriftHiveMetastore_get_all_token_identifiers_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_token_identifiers_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1471; + ::apache::thrift::protocol::TType _etype1474; + xfer += iprot->readListBegin(_etype1474, _size1471); + this->success.resize(_size1471); + uint32_t _i1475; + for (_i1475 = 0; _i1475 < _size1471; ++_i1475) + { + xfer += iprot->readString(this->success[_i1475]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_all_token_identifiers_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_token_identifiers_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter1476; + for (_iter1476 = this->success.begin(); _iter1476 != this->success.end(); ++_iter1476) + { + xfer += oprot->writeString((*_iter1476)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_all_token_identifiers_presult::~ThriftHiveMetastore_get_all_token_identifiers_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_all_token_identifiers_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1477; + ::apache::thrift::protocol::TType _etype1480; + xfer += iprot->readListBegin(_etype1480, _size1477); + (*(this->success)).resize(_size1477); + uint32_t _i1481; + for (_i1481 = 0; _i1481 < _size1477; ++_i1481) + { + xfer += iprot->readString((*(this->success))[_i1481]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_master_key_args::~ThriftHiveMetastore_add_master_key_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_master_key_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->key); + this->__isset.key = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_master_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_master_key_args"); + + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->key); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_master_key_pargs::~ThriftHiveMetastore_add_master_key_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_master_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_master_key_pargs"); + + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->key))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_master_key_result::~ThriftHiveMetastore_add_master_key_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_master_key_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_master_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_master_key_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_master_key_presult::~ThriftHiveMetastore_add_master_key_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_master_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_update_master_key_args::~ThriftHiveMetastore_update_master_key_args() throw() { +} + + +uint32_t ThriftHiveMetastore_update_master_key_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->seq_number); + this->__isset.seq_number = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->key); + this->__isset.key = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_update_master_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_master_key_args"); + + xfer += oprot->writeFieldBegin("seq_number", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->seq_number); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->key); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_update_master_key_pargs::~ThriftHiveMetastore_update_master_key_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_update_master_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_master_key_pargs"); + + xfer += oprot->writeFieldBegin("seq_number", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((*(this->seq_number))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->key))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_update_master_key_result::~ThriftHiveMetastore_update_master_key_result() throw() { +} + + +uint32_t ThriftHiveMetastore_update_master_key_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_update_master_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_master_key_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_update_master_key_presult::~ThriftHiveMetastore_update_master_key_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_update_master_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_remove_master_key_args::~ThriftHiveMetastore_remove_master_key_args() throw() { +} + + +uint32_t ThriftHiveMetastore_remove_master_key_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->key_seq); + this->__isset.key_seq = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_master_key_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_master_key_args"); + + xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->key_seq); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_remove_master_key_pargs::~ThriftHiveMetastore_remove_master_key_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_remove_master_key_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_master_key_pargs"); + + xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((*(this->key_seq))); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_remove_master_key_result::~ThriftHiveMetastore_remove_master_key_result() throw() { +} + + +uint32_t ThriftHiveMetastore_remove_master_key_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_master_key_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_master_key_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_remove_master_key_presult::~ThriftHiveMetastore_remove_master_key_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_remove_master_key_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_master_keys_args::~ThriftHiveMetastore_get_master_keys_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_master_keys_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_master_keys_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_master_keys_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_master_keys_pargs::~ThriftHiveMetastore_get_master_keys_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_master_keys_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_master_keys_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_master_keys_result::~ThriftHiveMetastore_get_master_keys_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_master_keys_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size1482; + ::apache::thrift::protocol::TType _etype1485; + xfer += iprot->readListBegin(_etype1485, _size1482); + this->success.resize(_size1482); + uint32_t _i1486; + for (_i1486 = 0; _i1486 < _size1482; ++_i1486) + { + xfer += iprot->readString(this->success[_i1486]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_master_keys_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_master_keys_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter1487; + for (_iter1487 = this->success.begin(); _iter1487 != this->success.end(); ++_iter1487) + { + xfer += oprot->writeString((*_iter1487)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_master_keys_presult::~ThriftHiveMetastore_get_master_keys_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_master_keys_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size1488; + ::apache::thrift::protocol::TType _etype1491; + xfer += iprot->readListBegin(_etype1491, _size1488); + (*(this->success)).resize(_size1488); + uint32_t _i1492; + for (_i1492 = 0; _i1492 < _size1488; ++_i1492) + { + xfer += iprot->readString((*(this->success))[_i1492]); + } + xfer += iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_open_txns_args::~ThriftHiveMetastore_get_open_txns_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_open_txns_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_open_txns_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_open_txns_pargs::~ThriftHiveMetastore_get_open_txns_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_open_txns_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_open_txns_result::~ThriftHiveMetastore_get_open_txns_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_open_txns_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_open_txns_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_open_txns_presult::~ThriftHiveMetastore_get_open_txns_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_open_txns_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_open_txns_info_args::~ThriftHiveMetastore_get_open_txns_info_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_open_txns_info_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_open_txns_info_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_info_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_open_txns_info_pargs::~ThriftHiveMetastore_get_open_txns_info_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_open_txns_info_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_info_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_open_txns_info_result::~ThriftHiveMetastore_get_open_txns_info_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_open_txns_info_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_open_txns_info_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_open_txns_info_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_open_txns_info_presult::~ThriftHiveMetastore_get_open_txns_info_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_open_txns_info_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_open_txns_args::~ThriftHiveMetastore_open_txns_args() throw() { +} + + +uint32_t ThriftHiveMetastore_open_txns_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_open_txns_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_open_txns_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_open_txns_pargs::~ThriftHiveMetastore_open_txns_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_open_txns_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_open_txns_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_open_txns_result::~ThriftHiveMetastore_open_txns_result() throw() { +} + + +uint32_t ThriftHiveMetastore_open_txns_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_open_txns_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_open_txns_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_open_txns_presult::~ThriftHiveMetastore_open_txns_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_open_txns_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_abort_txn_args::~ThriftHiveMetastore_abort_txn_args() throw() { +} + + +uint32_t ThriftHiveMetastore_abort_txn_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_abort_txn_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txn_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_abort_txn_pargs::~ThriftHiveMetastore_abort_txn_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_abort_txn_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txn_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_abort_txn_result::~ThriftHiveMetastore_abort_txn_result() throw() { +} + + +uint32_t ThriftHiveMetastore_abort_txn_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_abort_txn_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txn_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_abort_txn_presult::~ThriftHiveMetastore_abort_txn_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_abort_txn_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_abort_txns_args::~ThriftHiveMetastore_abort_txns_args() throw() { +} + + +uint32_t ThriftHiveMetastore_abort_txns_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_abort_txns_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txns_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_abort_txns_pargs::~ThriftHiveMetastore_abort_txns_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_abort_txns_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txns_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_abort_txns_result::~ThriftHiveMetastore_abort_txns_result() throw() { +} + + +uint32_t ThriftHiveMetastore_abort_txns_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_abort_txns_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_abort_txns_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_abort_txns_presult::~ThriftHiveMetastore_abort_txns_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_abort_txns_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_commit_txn_args::~ThriftHiveMetastore_commit_txn_args() throw() { +} + + +uint32_t ThriftHiveMetastore_commit_txn_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_commit_txn_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_commit_txn_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_commit_txn_pargs::~ThriftHiveMetastore_commit_txn_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_commit_txn_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_commit_txn_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_commit_txn_result::~ThriftHiveMetastore_commit_txn_result() throw() { +} + + +uint32_t ThriftHiveMetastore_commit_txn_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_commit_txn_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_commit_txn_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_commit_txn_presult::~ThriftHiveMetastore_commit_txn_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_commit_txn_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_lock_args::~ThriftHiveMetastore_lock_args() throw() { +} + + +uint32_t ThriftHiveMetastore_lock_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_lock_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_lock_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_lock_pargs::~ThriftHiveMetastore_lock_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_lock_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_lock_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_lock_result::~ThriftHiveMetastore_lock_result() throw() { +} + + +uint32_t ThriftHiveMetastore_lock_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_lock_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_lock_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_lock_presult::~ThriftHiveMetastore_lock_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_lock_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_check_lock_args::~ThriftHiveMetastore_check_lock_args() throw() { +} + + +uint32_t ThriftHiveMetastore_check_lock_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_check_lock_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_check_lock_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_check_lock_pargs::~ThriftHiveMetastore_check_lock_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_check_lock_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_check_lock_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_check_lock_result::~ThriftHiveMetastore_check_lock_result() throw() { +} + + +uint32_t ThriftHiveMetastore_check_lock_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_check_lock_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_check_lock_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_check_lock_presult::~ThriftHiveMetastore_check_lock_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_check_lock_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_unlock_args::~ThriftHiveMetastore_unlock_args() throw() { +} + + +uint32_t ThriftHiveMetastore_unlock_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_unlock_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_unlock_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_unlock_pargs::~ThriftHiveMetastore_unlock_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_unlock_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_unlock_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_unlock_result::~ThriftHiveMetastore_unlock_result() throw() { +} + + +uint32_t ThriftHiveMetastore_unlock_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_unlock_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_unlock_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_unlock_presult::~ThriftHiveMetastore_unlock_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_unlock_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_show_locks_args::~ThriftHiveMetastore_show_locks_args() throw() { +} + + +uint32_t ThriftHiveMetastore_show_locks_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_show_locks_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_locks_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_show_locks_pargs::~ThriftHiveMetastore_show_locks_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_show_locks_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_locks_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_show_locks_result::~ThriftHiveMetastore_show_locks_result() throw() { +} + + +uint32_t ThriftHiveMetastore_show_locks_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_show_locks_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_locks_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_show_locks_presult::~ThriftHiveMetastore_show_locks_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_show_locks_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_heartbeat_args::~ThriftHiveMetastore_heartbeat_args() throw() { +} + + +uint32_t ThriftHiveMetastore_heartbeat_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ids.read(iprot); + this->__isset.ids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_heartbeat_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_args"); + + xfer += oprot->writeFieldBegin("ids", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ids.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_heartbeat_pargs::~ThriftHiveMetastore_heartbeat_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_heartbeat_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_pargs"); + + xfer += oprot->writeFieldBegin("ids", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->ids)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_heartbeat_result::~ThriftHiveMetastore_heartbeat_result() throw() { +} + + +uint32_t ThriftHiveMetastore_heartbeat_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_heartbeat_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_heartbeat_presult::~ThriftHiveMetastore_heartbeat_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_heartbeat_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_heartbeat_txn_range_args::~ThriftHiveMetastore_heartbeat_txn_range_args() throw() { +} + + +uint32_t ThriftHiveMetastore_heartbeat_txn_range_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->txns.read(iprot); + this->__isset.txns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_heartbeat_txn_range_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_txn_range_args"); + + xfer += oprot->writeFieldBegin("txns", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->txns.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_heartbeat_txn_range_pargs::~ThriftHiveMetastore_heartbeat_txn_range_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_heartbeat_txn_range_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_txn_range_pargs"); + + xfer += oprot->writeFieldBegin("txns", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->txns)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_heartbeat_txn_range_result::~ThriftHiveMetastore_heartbeat_txn_range_result() throw() { +} + + +uint32_t ThriftHiveMetastore_heartbeat_txn_range_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_heartbeat_txn_range_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_heartbeat_txn_range_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_heartbeat_txn_range_presult::~ThriftHiveMetastore_heartbeat_txn_range_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_heartbeat_txn_range_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_compact_args::~ThriftHiveMetastore_compact_args() throw() { +} + + +uint32_t ThriftHiveMetastore_compact_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_compact_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_compact_pargs::~ThriftHiveMetastore_compact_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_compact_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_compact_result::~ThriftHiveMetastore_compact_result() throw() { +} + + +uint32_t ThriftHiveMetastore_compact_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_compact_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact_result"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_compact_presult::~ThriftHiveMetastore_compact_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_compact_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_compact2_args::~ThriftHiveMetastore_compact2_args() throw() { +} + + +uint32_t ThriftHiveMetastore_compact2_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_compact2_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact2_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_compact2_pargs::~ThriftHiveMetastore_compact2_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_compact2_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact2_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_compact2_result::~ThriftHiveMetastore_compact2_result() throw() { +} + + +uint32_t ThriftHiveMetastore_compact2_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_compact2_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_compact2_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_compact2_presult::~ThriftHiveMetastore_compact2_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_compact2_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_show_compact_args::~ThriftHiveMetastore_show_compact_args() throw() { +} + + +uint32_t ThriftHiveMetastore_show_compact_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_show_compact_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_compact_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_show_compact_pargs::~ThriftHiveMetastore_show_compact_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_show_compact_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_compact_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_show_compact_result::~ThriftHiveMetastore_show_compact_result() throw() { +} + + +uint32_t ThriftHiveMetastore_show_compact_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_show_compact_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_show_compact_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_show_compact_presult::~ThriftHiveMetastore_show_compact_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_show_compact_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_add_dynamic_partitions_args::~ThriftHiveMetastore_add_dynamic_partitions_args() throw() { +} + + +uint32_t ThriftHiveMetastore_add_dynamic_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_dynamic_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_dynamic_partitions_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_dynamic_partitions_pargs::~ThriftHiveMetastore_add_dynamic_partitions_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_add_dynamic_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_dynamic_partitions_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_dynamic_partitions_result::~ThriftHiveMetastore_add_dynamic_partitions_result() throw() { +} + + +uint32_t ThriftHiveMetastore_add_dynamic_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_dynamic_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_dynamic_partitions_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_add_dynamic_partitions_presult::~ThriftHiveMetastore_add_dynamic_partitions_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_add_dynamic_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_next_notification_args::~ThriftHiveMetastore_get_next_notification_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_next_notification_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_next_notification_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_next_notification_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_next_notification_pargs::~ThriftHiveMetastore_get_next_notification_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_next_notification_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_next_notification_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_next_notification_result::~ThriftHiveMetastore_get_next_notification_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_next_notification_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_next_notification_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_next_notification_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_next_notification_presult::~ThriftHiveMetastore_get_next_notification_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_next_notification_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_current_notificationEventId_args::~ThriftHiveMetastore_get_current_notificationEventId_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_current_notificationEventId_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_current_notificationEventId_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_current_notificationEventId_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_current_notificationEventId_pargs::~ThriftHiveMetastore_get_current_notificationEventId_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_current_notificationEventId_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_current_notificationEventId_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_current_notificationEventId_result::~ThriftHiveMetastore_get_current_notificationEventId_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_current_notificationEventId_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_current_notificationEventId_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_current_notificationEventId_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_current_notificationEventId_presult::~ThriftHiveMetastore_get_current_notificationEventId_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_current_notificationEventId_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_fire_listener_event_args::~ThriftHiveMetastore_fire_listener_event_args() throw() { +} + + +uint32_t ThriftHiveMetastore_fire_listener_event_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->rqst.read(iprot); + this->__isset.rqst = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_fire_listener_event_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_fire_listener_event_args"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->rqst.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_fire_listener_event_pargs::~ThriftHiveMetastore_fire_listener_event_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_fire_listener_event_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_fire_listener_event_pargs"); + + xfer += oprot->writeFieldBegin("rqst", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->rqst)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_fire_listener_event_result::~ThriftHiveMetastore_fire_listener_event_result() throw() { +} + + +uint32_t ThriftHiveMetastore_fire_listener_event_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_fire_listener_event_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_fire_listener_event_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_fire_listener_event_presult::~ThriftHiveMetastore_fire_listener_event_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_fire_listener_event_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_flushCache_args::~ThriftHiveMetastore_flushCache_args() throw() { +} + + +uint32_t ThriftHiveMetastore_flushCache_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_flushCache_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_flushCache_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_flushCache_pargs::~ThriftHiveMetastore_flushCache_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_flushCache_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_flushCache_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_flushCache_result::~ThriftHiveMetastore_flushCache_result() throw() { +} + + +uint32_t ThriftHiveMetastore_flushCache_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_flushCache_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_flushCache_result"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_flushCache_presult::~ThriftHiveMetastore_flushCache_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_flushCache_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_cm_recycle_args::~ThriftHiveMetastore_cm_recycle_args() throw() { +} + + +uint32_t ThriftHiveMetastore_cm_recycle_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->request.read(iprot); + this->__isset.request = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_cm_recycle_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_cm_recycle_args"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->request.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_cm_recycle_pargs::~ThriftHiveMetastore_cm_recycle_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_cm_recycle_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_cm_recycle_pargs"); + + xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->request)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_cm_recycle_result::~ThriftHiveMetastore_cm_recycle_result() throw() { +} + + +uint32_t ThriftHiveMetastore_cm_recycle_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_cm_recycle_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_cm_recycle_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_cm_recycle_presult::~ThriftHiveMetastore_cm_recycle_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_cm_recycle_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_file_metadata_by_expr_args::~ThriftHiveMetastore_get_file_metadata_by_expr_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_file_metadata_by_expr_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_file_metadata_by_expr_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_file_metadata_by_expr_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_file_metadata_by_expr_pargs::~ThriftHiveMetastore_get_file_metadata_by_expr_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_file_metadata_by_expr_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_file_metadata_by_expr_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_file_metadata_by_expr_result::~ThriftHiveMetastore_get_file_metadata_by_expr_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_file_metadata_by_expr_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_file_metadata_by_expr_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_file_metadata_by_expr_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_file_metadata_by_expr_presult::~ThriftHiveMetastore_get_file_metadata_by_expr_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_file_metadata_by_expr_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_file_metadata_args::~ThriftHiveMetastore_get_file_metadata_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_file_metadata_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_file_metadata_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_file_metadata_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_file_metadata_pargs::~ThriftHiveMetastore_get_file_metadata_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_file_metadata_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_file_metadata_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_file_metadata_result::~ThriftHiveMetastore_get_file_metadata_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_file_metadata_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_file_metadata_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_file_metadata_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_file_metadata_presult::~ThriftHiveMetastore_get_file_metadata_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_file_metadata_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_put_file_metadata_args::~ThriftHiveMetastore_put_file_metadata_args() throw() { +} + + +uint32_t ThriftHiveMetastore_put_file_metadata_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_put_file_metadata_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_put_file_metadata_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_put_file_metadata_pargs::~ThriftHiveMetastore_put_file_metadata_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_put_file_metadata_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_put_file_metadata_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_put_file_metadata_result::~ThriftHiveMetastore_put_file_metadata_result() throw() { +} + + +uint32_t ThriftHiveMetastore_put_file_metadata_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_put_file_metadata_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_put_file_metadata_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_put_file_metadata_presult::~ThriftHiveMetastore_put_file_metadata_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_put_file_metadata_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_clear_file_metadata_args::~ThriftHiveMetastore_clear_file_metadata_args() throw() { +} + + +uint32_t ThriftHiveMetastore_clear_file_metadata_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_clear_file_metadata_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_clear_file_metadata_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_clear_file_metadata_pargs::~ThriftHiveMetastore_clear_file_metadata_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_clear_file_metadata_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_clear_file_metadata_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_clear_file_metadata_result::~ThriftHiveMetastore_clear_file_metadata_result() throw() { +} + + +uint32_t ThriftHiveMetastore_clear_file_metadata_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_clear_file_metadata_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_clear_file_metadata_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_clear_file_metadata_presult::~ThriftHiveMetastore_clear_file_metadata_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_clear_file_metadata_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_cache_file_metadata_args::~ThriftHiveMetastore_cache_file_metadata_args() throw() { +} + + +uint32_t ThriftHiveMetastore_cache_file_metadata_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->req.read(iprot); + this->__isset.req = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_cache_file_metadata_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_cache_file_metadata_args"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->req.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_cache_file_metadata_pargs::~ThriftHiveMetastore_cache_file_metadata_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_cache_file_metadata_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_cache_file_metadata_pargs"); + + xfer += oprot->writeFieldBegin("req", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->req)).write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_cache_file_metadata_result::~ThriftHiveMetastore_cache_file_metadata_result() throw() { +} + + +uint32_t ThriftHiveMetastore_cache_file_metadata_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_cache_file_metadata_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_cache_file_metadata_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_cache_file_metadata_presult::~ThriftHiveMetastore_cache_file_metadata_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_cache_file_metadata_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + + +ThriftHiveMetastore_get_metastore_db_uuid_args::~ThriftHiveMetastore_get_metastore_db_uuid_args() throw() { +} + + +uint32_t ThriftHiveMetastore_get_metastore_db_uuid_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_metastore_db_uuid_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_metastore_db_uuid_args"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_metastore_db_uuid_pargs::~ThriftHiveMetastore_get_metastore_db_uuid_pargs() throw() { +} + + +uint32_t ThriftHiveMetastore_get_metastore_db_uuid_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_metastore_db_uuid_pargs"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_metastore_db_uuid_result::~ThriftHiveMetastore_get_metastore_db_uuid_result() throw() { +} + + +uint32_t ThriftHiveMetastore_get_metastore_db_uuid_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_metastore_db_uuid_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_metastore_db_uuid_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + + +ThriftHiveMetastore_get_metastore_db_uuid_presult::~ThriftHiveMetastore_get_metastore_db_uuid_presult() throw() { +} + + +uint32_t ThriftHiveMetastore_get_metastore_db_uuid_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +void ThriftHiveMetastoreClient::getMetaConf(std::string& _return, const std::string& key) +{ + send_getMetaConf(key); + recv_getMetaConf(_return); +} + +void ThriftHiveMetastoreClient::send_getMetaConf(const std::string& key) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getMetaConf", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_getMetaConf_pargs args; + args.key = &key; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_getMetaConf(std::string& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getMetaConf") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_getMetaConf_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getMetaConf failed: unknown result"); +} + +void ThriftHiveMetastoreClient::setMetaConf(const std::string& key, const std::string& value) +{ + send_setMetaConf(key, value); + recv_setMetaConf(); +} + +void ThriftHiveMetastoreClient::send_setMetaConf(const std::string& key, const std::string& value) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("setMetaConf", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_setMetaConf_pargs args; + args.key = &key; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_setMetaConf() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("setMetaConf") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_setMetaConf_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + return; +} + +void ThriftHiveMetastoreClient::create_database(const Database& database) +{ + send_create_database(database); + recv_create_database(); +} + +void ThriftHiveMetastoreClient::send_create_database(const Database& database) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_database_pargs args; + args.database = &database; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_create_database() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_create_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name) +{ + send_get_database(name); + recv_get_database(_return); +} + +void ThriftHiveMetastoreClient::send_get_database(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_database_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_database(Database& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_database_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); +} + +void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData, const bool cascade) +{ + send_drop_database(name, deleteData, cascade); + recv_drop_database(); +} + +void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData, const bool cascade) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_database_pargs args; + args.name = &name; + args.deleteData = &deleteData; + args.cascade = &cascade; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_drop_database() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_drop_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +{ + send_get_databases(pattern); + recv_get_databases(_return); +} + +void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_databases_pargs args; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_databases") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_databases_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +{ + send_get_all_databases(); + recv_get_all_databases(_return); +} + +void ThriftHiveMetastoreClient::send_get_all_databases() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_databases_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_all_databases") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_all_databases_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); +} + +void ThriftHiveMetastoreClient::alter_database(const std::string& dbname, const Database& db) +{ + send_alter_database(dbname, db); + recv_alter_database(); +} + +void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, const Database& db) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_database_pargs args; + args.dbname = &dbname; + args.db = &db; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_alter_database() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_alter_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) +{ + send_get_type(name); + recv_get_type(_return); +} + +void ThriftHiveMetastoreClient::send_get_type(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_type_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_type(Type& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::create_type(const Type& type) +{ + send_create_type(type); + return recv_create_type(); +} + +void ThriftHiveMetastoreClient::send_create_type(const Type& type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_type_pargs args; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_create_type() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_create_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_type(const std::string& type) +{ + send_drop_type(type); + return recv_drop_type(); +} + +void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_type_pargs args; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_drop_type() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_drop_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) +{ + send_get_type_all(name); + recv_get_type_all(_return); +} + +void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_type_all_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_type_all") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_type_all_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) +{ + send_get_fields(db_name, table_name); + recv_get_fields(_return); +} + +void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_fields_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_fields") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_fields_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) +{ + send_get_fields_with_environment_context(db_name, table_name, environment_context); + recv_get_fields_with_environment_context(_return); +} + +void ThriftHiveMetastoreClient::send_get_fields_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_fields_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_fields_with_environment_context_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_fields_with_environment_context(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_fields_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_fields_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields_with_environment_context failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) +{ + send_get_schema(db_name, table_name); + recv_get_schema(_return); +} + +void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_schema_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_schema") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_schema_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) +{ + send_get_schema_with_environment_context(db_name, table_name, environment_context); + recv_get_schema_with_environment_context(_return); +} + +void ThriftHiveMetastoreClient::send_get_schema_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_schema_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_schema_with_environment_context_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_schema_with_environment_context(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_schema_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_schema_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema_with_environment_context failed: unknown result"); +} + +void ThriftHiveMetastoreClient::create_table(const Table& tbl) +{ + send_create_table(tbl); + recv_create_table(); +} + +void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_table_pargs args; + args.tbl = &tbl; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_create_table() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_create_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + return; +} + +void ThriftHiveMetastoreClient::create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) +{ + send_create_table_with_environment_context(tbl, environment_context); + recv_create_table_with_environment_context(); +} + +void ThriftHiveMetastoreClient::send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_table_with_environment_context_pargs args; + args.tbl = &tbl; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_create_table_with_environment_context() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_table_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_create_table_with_environment_context_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + return; +} + +void ThriftHiveMetastoreClient::create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) +{ + send_create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints); + recv_create_table_with_constraints(); +} + +void ThriftHiveMetastoreClient::send_create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_table_with_constraints", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_table_with_constraints_pargs args; + args.tbl = &tbl; + args.primaryKeys = &primaryKeys; + args.foreignKeys = &foreignKeys; + args.uniqueConstraints = &uniqueConstraints; + args.notNullConstraints = ¬NullConstraints; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_create_table_with_constraints() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_table_with_constraints") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_create_table_with_constraints_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + return; +} + +void ThriftHiveMetastoreClient::drop_constraint(const DropConstraintRequest& req) +{ + send_drop_constraint(req); + recv_drop_constraint(); +} + +void ThriftHiveMetastoreClient::send_drop_constraint(const DropConstraintRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_constraint", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_constraint_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_drop_constraint() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_constraint") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_drop_constraint_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::add_primary_key(const AddPrimaryKeyRequest& req) +{ + send_add_primary_key(req); + recv_add_primary_key(); +} + +void ThriftHiveMetastoreClient::send_add_primary_key(const AddPrimaryKeyRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_primary_key", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_primary_key_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_add_primary_key() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_primary_key") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_add_primary_key_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::add_foreign_key(const AddForeignKeyRequest& req) +{ + send_add_foreign_key(req); + recv_add_foreign_key(); +} + +void ThriftHiveMetastoreClient::send_add_foreign_key(const AddForeignKeyRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_foreign_key", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_foreign_key_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_add_foreign_key() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_foreign_key") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_add_foreign_key_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::add_unique_constraint(const AddUniqueConstraintRequest& req) +{ + send_add_unique_constraint(req); + recv_add_unique_constraint(); +} + +void ThriftHiveMetastoreClient::send_add_unique_constraint(const AddUniqueConstraintRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_unique_constraint", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_unique_constraint_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_add_unique_constraint() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_unique_constraint") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_add_unique_constraint_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::add_not_null_constraint(const AddNotNullConstraintRequest& req) +{ + send_add_not_null_constraint(req); + recv_add_not_null_constraint(); +} + +void ThriftHiveMetastoreClient::send_add_not_null_constraint(const AddNotNullConstraintRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_not_null_constraint", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_not_null_constraint_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_add_not_null_constraint() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_not_null_constraint") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_add_not_null_constraint_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +{ + send_drop_table(dbname, name, deleteData); + recv_drop_table(); +} + +void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_table_pargs args; + args.dbname = &dbname; + args.name = &name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_drop_table() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_drop_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) +{ + send_drop_table_with_environment_context(dbname, name, deleteData, environment_context); + recv_drop_table_with_environment_context(); +} + +void ThriftHiveMetastoreClient::send_drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_table_with_environment_context_pargs args; + args.dbname = &dbname; + args.name = &name; + args.deleteData = &deleteData; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_drop_table_with_environment_context() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_table_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_drop_table_with_environment_context_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) +{ + send_truncate_table(dbName, tableName, partNames); + recv_truncate_table(); +} + +void ThriftHiveMetastoreClient::send_truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("truncate_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_truncate_table_pargs args; + args.dbName = &dbName; + args.tableName = &tableName; + args.partNames = &partNames; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_truncate_table() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("truncate_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_truncate_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + return; +} + +void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) +{ + send_get_tables(db_name, pattern); + recv_get_tables(_return); +} + +void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_tables_pargs args; + args.db_name = &db_name; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_tables") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_tables_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType) +{ + send_get_tables_by_type(db_name, pattern, tableType); + recv_get_tables_by_type(_return); +} + +void ThriftHiveMetastoreClient::send_get_tables_by_type(const std::string& db_name, const std::string& pattern, const std::string& tableType) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_tables_by_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_tables_by_type_pargs args; + args.db_name = &db_name; + args.pattern = &pattern; + args.tableType = &tableType; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_tables_by_type(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_tables_by_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_tables_by_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables_by_type failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) +{ + send_get_table_meta(db_patterns, tbl_patterns, tbl_types); + recv_get_table_meta(_return); +} + +void ThriftHiveMetastoreClient::send_get_table_meta(const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_table_meta", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_meta_pargs args; + args.db_patterns = &db_patterns; + args.tbl_patterns = &tbl_patterns; + args.tbl_types = &tbl_types; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_table_meta(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_meta") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_table_meta_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_meta failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) +{ + send_get_all_tables(db_name); + recv_get_all_tables(_return); +} + +void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_tables_pargs args; + args.db_name = &db_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_all_tables") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_all_tables_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) +{ + send_get_table(dbname, tbl_name); + recv_get_table(_return); +} + +void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_table(Table& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_table_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names) +{ + send_get_table_objects_by_name(dbname, tbl_names); + recv_get_table_objects_by_name(_return); +} + +void ThriftHiveMetastoreClient::send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_objects_by_name_pargs args; + args.dbname = &dbname; + args.tbl_names = &tbl_names; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_table_objects_by_name(std::vector
& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_objects_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_table_objects_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_table_req(GetTableResult& _return, const GetTableRequest& req) +{ + send_get_table_req(req); + recv_get_table_req(_return); +} + +void ThriftHiveMetastoreClient::send_get_table_req(const GetTableRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_table_req", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_req_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_table_req(GetTableResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_req") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_table_req_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_req failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req) +{ + send_get_table_objects_by_name_req(req); + recv_get_table_objects_by_name_req(_return); +} + +void ThriftHiveMetastoreClient::send_get_table_objects_by_name_req(const GetTablesRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_table_objects_by_name_req", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_objects_by_name_req_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_table_objects_by_name_req(GetTablesResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_objects_by_name_req") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_table_objects_by_name_req_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_objects_by_name_req failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) +{ + send_get_table_names_by_filter(dbname, filter, max_tables); + recv_get_table_names_by_filter(_return); +} + +void ThriftHiveMetastoreClient::send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_names_by_filter_pargs args; + args.dbname = &dbname; + args.filter = &filter; + args.max_tables = &max_tables; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_names_by_filter") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_table_names_by_filter_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); +} + +void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +{ + send_alter_table(dbname, tbl_name, new_tbl); + recv_alter_table(); +} + +void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_alter_table() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_alter_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) +{ + send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); + recv_alter_table_with_environment_context(); +} + +void ThriftHiveMetastoreClient::send_alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_table_with_environment_context_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_alter_table_with_environment_context() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_table_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_alter_table_with_environment_context_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) +{ + send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade); + recv_alter_table_with_cascade(); +} + +void ThriftHiveMetastoreClient::send_alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_table_with_cascade", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_table_with_cascade_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; + args.cascade = &cascade; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_alter_table_with_cascade() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_table_with_cascade") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_alter_table_with_cascade_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) +{ + send_add_partition(new_part); + recv_add_partition(_return); +} + +void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partition_pargs args; + args.new_part = &new_part; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_add_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); +} + +void ThriftHiveMetastoreClient::add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) +{ + send_add_partition_with_environment_context(new_part, environment_context); + recv_add_partition_with_environment_context(_return); +} + +void ThriftHiveMetastoreClient::send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partition_with_environment_context_pargs args; + args.new_part = &new_part; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_add_partition_with_environment_context(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_partition_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_add_partition_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition_with_environment_context failed: unknown result"); +} + +int32_t ThriftHiveMetastoreClient::add_partitions(const std::vector & new_parts) +{ + send_add_partitions(new_parts); + return recv_add_partitions(); +} + +void ThriftHiveMetastoreClient::send_add_partitions(const std::vector & new_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partitions_pargs args; + args.new_parts = &new_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +int32_t ThriftHiveMetastoreClient::recv_add_partitions() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_partitions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + int32_t _return; + ThriftHiveMetastore_add_partitions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions failed: unknown result"); +} + +int32_t ThriftHiveMetastoreClient::add_partitions_pspec(const std::vector & new_parts) +{ + send_add_partitions_pspec(new_parts); + return recv_add_partitions_pspec(); +} + +void ThriftHiveMetastoreClient::send_add_partitions_pspec(const std::vector & new_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_partitions_pspec", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partitions_pspec_pargs args; + args.new_parts = &new_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +int32_t ThriftHiveMetastoreClient::recv_add_partitions_pspec() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_partitions_pspec") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + int32_t _return; + ThriftHiveMetastore_add_partitions_pspec_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions_pspec failed: unknown result"); +} + +void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + send_append_partition(db_name, tbl_name, part_vals); + recv_append_partition(_return); +} + +void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("append_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_append_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result"); +} + +void ThriftHiveMetastoreClient::add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request) +{ + send_add_partitions_req(request); + recv_add_partitions_req(_return); +} + +void ThriftHiveMetastoreClient::send_add_partitions_req(const AddPartitionsRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partitions_req_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_add_partitions_req(AddPartitionsResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_partitions_req") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_add_partitions_req_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions_req failed: unknown result"); +} + +void ThriftHiveMetastoreClient::append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) +{ + send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context); + recv_append_partition_with_environment_context(_return); +} + +void ThriftHiveMetastoreClient::send_append_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_append_partition_with_environment_context(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("append_partition_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_append_partition_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_with_environment_context failed: unknown result"); +} + +void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + send_append_partition_by_name(db_name, tbl_name, part_name); + recv_append_partition_by_name(_return); +} + +void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("append_partition_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_append_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result"); +} + +void ThriftHiveMetastoreClient::append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) +{ + send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context); + recv_append_partition_by_name_with_environment_context(_return); +} + +void ThriftHiveMetastoreClient::send_append_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_append_partition_by_name_with_environment_context(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("append_partition_by_name_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name_with_environment_context failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +{ + send_drop_partition(db_name, tbl_name, part_vals, deleteData); + return recv_drop_partition(); +} + +void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_drop_partition() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_drop_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) +{ + send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); + return recv_drop_partition_with_environment_context(); +} + +void ThriftHiveMetastoreClient::send_drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partition_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.deleteData = &deleteData; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_drop_partition_with_environment_context() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_partition_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_drop_partition_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_with_environment_context failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +{ + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + return recv_drop_partition_by_name(); +} + +void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_partition_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_drop_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) +{ + send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); + return recv_drop_partition_by_name_with_environment_context(); +} + +void ThriftHiveMetastoreClient::send_drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.deleteData = &deleteData; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_drop_partition_by_name_with_environment_context() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_partition_by_name_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name_with_environment_context failed: unknown result"); +} + +void ThriftHiveMetastoreClient::drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req) +{ + send_drop_partitions_req(req); + recv_drop_partitions_req(_return); +} + +void ThriftHiveMetastoreClient::send_drop_partitions_req(const DropPartitionsRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_partitions_req", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partitions_req_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_drop_partitions_req(DropPartitionsResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_partitions_req") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_drop_partitions_req_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partitions_req failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + send_get_partition(db_name, tbl_name, part_vals); + recv_get_partition(_return); +} + +void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); +} + +void ThriftHiveMetastoreClient::exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) +{ + send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); + recv_exchange_partition(_return); +} + +void ThriftHiveMetastoreClient::send_exchange_partition(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_exchange_partition_pargs args; + args.partitionSpecs = &partitionSpecs; + args.source_db = &source_db; + args.source_table_name = &source_table_name; + args.dest_db = &dest_db; + args.dest_table_name = &dest_table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_exchange_partition(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("exchange_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_exchange_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "exchange_partition failed: unknown result"); +} + +void ThriftHiveMetastoreClient::exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) +{ + send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); + recv_exchange_partitions(_return); +} + +void ThriftHiveMetastoreClient::send_exchange_partitions(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("exchange_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_exchange_partitions_pargs args; + args.partitionSpecs = &partitionSpecs; + args.source_db = &source_db; + args.source_table_name = &source_table_name; + args.dest_db = &dest_db; + args.dest_table_name = &dest_table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_exchange_partitions(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("exchange_partitions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_exchange_partitions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "exchange_partitions failed: unknown result"); +} + +void ThriftHiveMetastoreClient::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) +{ + send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); + recv_get_partition_with_auth(_return); +} + +void ThriftHiveMetastoreClient::send_get_partition_with_auth(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) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_with_auth_pargs 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; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partition_with_auth") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partition_with_auth_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_with_auth failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + send_get_partition_by_name(db_name, tbl_name, part_name); + recv_get_partition_by_name(_return); +} + +void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partition_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +{ + send_get_partitions(db_name, tbl_name, max_parts); + recv_get_partitions(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partitions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); +} + +void ThriftHiveMetastoreClient::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) +{ + send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); + recv_get_partitions_with_auth(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions_with_auth(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) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_with_auth_pargs 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; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_with_auth") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partitions_with_auth_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) +{ + send_get_partitions_pspec(db_name, tbl_name, max_parts); + recv_get_partitions_pspec(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions_pspec(const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partitions_pspec", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_pspec_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions_pspec(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_pspec") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partitions_pspec_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_pspec failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +{ + send_get_partition_names(db_name, tbl_name, max_parts); + recv_get_partition_names(_return); +} + +void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_names_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partition_names") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partition_names_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); +} + +void ThriftHiveMetastoreClient::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) +{ + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partitions_ps(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_ps_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_ps") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partitions_ps_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); +} + +void ThriftHiveMetastoreClient::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) +{ + send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); + recv_get_partitions_ps_with_auth(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(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) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_ps_with_auth_pargs 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; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_ps_with_auth") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partitions_ps_with_auth_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); +} + +void ThriftHiveMetastoreClient::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) +{ + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partition_names_ps(_return); +} + +void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_names_ps_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partition_names_ps") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partition_names_ps_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); +} + +void ThriftHiveMetastoreClient::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) +{ + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); + recv_get_partitions_by_filter(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_by_filter_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.filter = &filter; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_by_filter") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partitions_by_filter_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) +{ + send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts); + recv_get_part_specs_by_filter(_return); +} + +void ThriftHiveMetastoreClient::send_get_part_specs_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_part_specs_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_part_specs_by_filter_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.filter = &filter; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_part_specs_by_filter(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_part_specs_by_filter") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_part_specs_by_filter_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_part_specs_by_filter failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req) +{ + send_get_partitions_by_expr(req); + recv_get_partitions_by_expr(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions_by_expr(const PartitionsByExprRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_by_expr_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions_by_expr(PartitionsByExprResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_by_expr") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partitions_by_expr_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_expr failed: unknown result"); +} + +int32_t ThriftHiveMetastoreClient::get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) +{ + send_get_num_partitions_by_filter(db_name, tbl_name, filter); + return recv_get_num_partitions_by_filter(); +} + +void ThriftHiveMetastoreClient::send_get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_num_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_num_partitions_by_filter_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.filter = &filter; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +int32_t ThriftHiveMetastoreClient::recv_get_num_partitions_by_filter() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_num_partitions_by_filter") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + int32_t _return; + ThriftHiveMetastore_get_num_partitions_by_filter_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_num_partitions_by_filter failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) +{ + send_get_partitions_by_names(db_name, tbl_name, names); + recv_get_partitions_by_names(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions_by_names(const std::string& db_name, const std::string& tbl_name, const std::vector & names) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_by_names_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.names = &names; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions_by_names(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_by_names") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partitions_by_names_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_names failed: unknown result"); +} + +void ThriftHiveMetastoreClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +{ + send_alter_partition(db_name, tbl_name, new_part); + recv_alter_partition(); +} + +void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.new_part = &new_part; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_alter_partition() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_alter_partition_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) +{ + send_alter_partitions(db_name, tbl_name, new_parts); + recv_alter_partitions(); +} + +void ThriftHiveMetastoreClient::send_alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_partitions_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.new_parts = &new_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_alter_partitions() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_partitions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_alter_partitions_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) +{ + send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context); + recv_alter_partitions_with_environment_context(); +} + +void ThriftHiveMetastoreClient::send_alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_partitions_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_partitions_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.new_parts = &new_parts; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_alter_partitions_with_environment_context() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_partitions_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_alter_partitions_with_environment_context_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) +{ + send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); + recv_alter_partition_with_environment_context(); +} + +void ThriftHiveMetastoreClient::send_alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_partition_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.new_part = &new_part; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_alter_partition_with_environment_context() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_partition_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_alter_partition_with_environment_context_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) +{ + send_rename_partition(db_name, tbl_name, part_vals, new_part); + recv_rename_partition(); +} + +void ThriftHiveMetastoreClient::send_rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_rename_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.new_part = &new_part; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_rename_partition() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("rename_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_rename_partition_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +bool ThriftHiveMetastoreClient::partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) +{ + send_partition_name_has_valid_characters(part_vals, throw_exception); + return recv_partition_name_has_valid_characters(); +} + +void ThriftHiveMetastoreClient::send_partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_partition_name_has_valid_characters_pargs args; + args.part_vals = &part_vals; + args.throw_exception = &throw_exception; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_partition_name_has_valid_characters() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("partition_name_has_valid_characters") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_partition_name_has_valid_characters_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_has_valid_characters failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) +{ + send_get_config_value(name, defaultValue); + recv_get_config_value(_return); +} + +void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_config_value_pargs args; + args.name = &name; + args.defaultValue = &defaultValue; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_config_value") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_config_value_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); +} + +void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) +{ + send_partition_name_to_vals(part_name); + recv_partition_name_to_vals(_return); +} + +void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_partition_name_to_vals_pargs args; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("partition_name_to_vals") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_partition_name_to_vals_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); +} + +void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) +{ + send_partition_name_to_spec(part_name); + recv_partition_name_to_spec(_return); +} + +void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_partition_name_to_spec_pargs args; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("partition_name_to_spec") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_partition_name_to_spec_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); +} + +void ThriftHiveMetastoreClient::markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +{ + send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); + recv_markPartitionForEvent(); +} + +void ThriftHiveMetastoreClient::send_markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_markPartitionForEvent_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.eventType = &eventType; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_markPartitionForEvent() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("markPartitionForEvent") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_markPartitionForEvent_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + if (result.__isset.o5) { + throw result.o5; + } + if (result.__isset.o6) { + throw result.o6; + } + return; +} + +bool ThriftHiveMetastoreClient::isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +{ + send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); + return recv_isPartitionMarkedForEvent(); +} + +void ThriftHiveMetastoreClient::send_isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_isPartitionMarkedForEvent_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.eventType = &eventType; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_isPartitionMarkedForEvent() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("isPartitionMarkedForEvent") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_isPartitionMarkedForEvent_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + if (result.__isset.o5) { + throw result.o5; + } + if (result.__isset.o6) { + throw result.o6; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result"); +} + +void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) +{ + send_add_index(new_index, index_table); + recv_add_index(_return); +} + +void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_index_pargs args; + args.new_index = &new_index; + args.index_table = &index_table; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_add_index(Index& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_index") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_add_index_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); +} + +void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +{ + send_alter_index(dbname, base_tbl_name, idx_name, new_idx); + recv_alter_index(); +} + +void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_index_pargs args; + args.dbname = &dbname; + args.base_tbl_name = &base_tbl_name; + args.idx_name = &idx_name; + args.new_idx = &new_idx; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_alter_index() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_index") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_alter_index_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +{ + send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); + return recv_drop_index_by_name(); +} + +void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_index_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.index_name = &index_name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_drop_index_by_name() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_index_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_drop_index_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +{ + send_get_index_by_name(db_name, tbl_name, index_name); + recv_get_index_by_name(_return); +} + +void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_index_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.index_name = &index_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_index_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_index_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_by_name failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +{ + send_get_indexes(db_name, tbl_name, max_indexes); + recv_get_indexes(_return); +} + +void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_indexes_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_indexes = &max_indexes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_indexes") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_indexes_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +{ + send_get_index_names(db_name, tbl_name, max_indexes); + recv_get_index_names(_return); +} + +void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_index_names_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_indexes = &max_indexes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_index_names") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_index_names_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request) +{ + send_get_primary_keys(request); + recv_get_primary_keys(_return); +} + +void ThriftHiveMetastoreClient::send_get_primary_keys(const PrimaryKeysRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_primary_keys", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_primary_keys_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_primary_keys(PrimaryKeysResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_primary_keys") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_primary_keys_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_primary_keys failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request) +{ + send_get_foreign_keys(request); + recv_get_foreign_keys(_return); +} + +void ThriftHiveMetastoreClient::send_get_foreign_keys(const ForeignKeysRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_foreign_keys", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_foreign_keys_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_foreign_keys(ForeignKeysResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_foreign_keys") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_foreign_keys_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_foreign_keys failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request) +{ + send_get_unique_constraints(request); + recv_get_unique_constraints(_return); +} + +void ThriftHiveMetastoreClient::send_get_unique_constraints(const UniqueConstraintsRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_unique_constraints", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_unique_constraints_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_unique_constraints(UniqueConstraintsResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_unique_constraints") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_unique_constraints_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_unique_constraints failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request) +{ + send_get_not_null_constraints(request); + recv_get_not_null_constraints(_return); +} + +void ThriftHiveMetastoreClient::send_get_not_null_constraints(const NotNullConstraintsRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_not_null_constraints", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_not_null_constraints_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_not_null_constraints(NotNullConstraintsResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_not_null_constraints") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_not_null_constraints_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_not_null_constraints failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::update_table_column_statistics(const ColumnStatistics& stats_obj) +{ + send_update_table_column_statistics(stats_obj); + return recv_update_table_column_statistics(); +} + +void ThriftHiveMetastoreClient::send_update_table_column_statistics(const ColumnStatistics& stats_obj) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_update_table_column_statistics_pargs args; + args.stats_obj = &stats_obj; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_update_table_column_statistics() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("update_table_column_statistics") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_update_table_column_statistics_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_table_column_statistics failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::update_partition_column_statistics(const ColumnStatistics& stats_obj) +{ + send_update_partition_column_statistics(stats_obj); + return recv_update_partition_column_statistics(); +} + +void ThriftHiveMetastoreClient::send_update_partition_column_statistics(const ColumnStatistics& stats_obj) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_update_partition_column_statistics_pargs args; + args.stats_obj = &stats_obj; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_update_partition_column_statistics() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("update_partition_column_statistics") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_update_partition_column_statistics_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_partition_column_statistics failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) +{ + send_get_table_column_statistics(db_name, tbl_name, col_name); + recv_get_table_column_statistics(_return); +} + +void ThriftHiveMetastoreClient::send_get_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_column_statistics_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.col_name = &col_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_table_column_statistics(ColumnStatistics& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_column_statistics") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_table_column_statistics_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_column_statistics failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) +{ + send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name); + recv_get_partition_column_statistics(_return); +} + +void ThriftHiveMetastoreClient::send_get_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_column_statistics_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.col_name = &col_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partition_column_statistics(ColumnStatistics& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partition_column_statistics") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partition_column_statistics_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_column_statistics failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request) +{ + send_get_table_statistics_req(request); + recv_get_table_statistics_req(_return); +} + +void ThriftHiveMetastoreClient::send_get_table_statistics_req(const TableStatsRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_table_statistics_req", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_statistics_req_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_table_statistics_req(TableStatsResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_statistics_req") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_table_statistics_req_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_statistics_req failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request) +{ + send_get_partitions_statistics_req(request); + recv_get_partitions_statistics_req(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions_statistics_req(const PartitionsStatsRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partitions_statistics_req", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_statistics_req_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions_statistics_req(PartitionsStatsResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_statistics_req") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_partitions_statistics_req_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_statistics_req failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request) +{ + send_get_aggr_stats_for(request); + recv_get_aggr_stats_for(_return); +} + +void ThriftHiveMetastoreClient::send_get_aggr_stats_for(const PartitionsStatsRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_aggr_stats_for", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_aggr_stats_for_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_aggr_stats_for(AggrStats& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_aggr_stats_for") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_aggr_stats_for_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_aggr_stats_for failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::set_aggr_stats_for(const SetPartitionsStatsRequest& request) +{ + send_set_aggr_stats_for(request); + return recv_set_aggr_stats_for(); +} + +void ThriftHiveMetastoreClient::send_set_aggr_stats_for(const SetPartitionsStatsRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("set_aggr_stats_for", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_set_aggr_stats_for_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_set_aggr_stats_for() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("set_aggr_stats_for") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_set_aggr_stats_for_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "set_aggr_stats_for failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) +{ + send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); + return recv_delete_partition_column_statistics(); +} + +void ThriftHiveMetastoreClient::send_delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_delete_partition_column_statistics_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.col_name = &col_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_delete_partition_column_statistics() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("delete_partition_column_statistics") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_delete_partition_column_statistics_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_partition_column_statistics failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) +{ + send_delete_table_column_statistics(db_name, tbl_name, col_name); + return recv_delete_table_column_statistics(); +} + +void ThriftHiveMetastoreClient::send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_delete_table_column_statistics_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.col_name = &col_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_delete_table_column_statistics() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("delete_table_column_statistics") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_delete_table_column_statistics_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); +} + +void ThriftHiveMetastoreClient::create_function(const Function& func) +{ + send_create_function(func); + recv_create_function(); +} + +void ThriftHiveMetastoreClient::send_create_function(const Function& func) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_function", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_function_pargs args; + args.func = &func; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_create_function() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_function") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_create_function_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + return; +} + +void ThriftHiveMetastoreClient::drop_function(const std::string& dbName, const std::string& funcName) +{ + send_drop_function(dbName, funcName); + recv_drop_function(); +} + +void ThriftHiveMetastoreClient::send_drop_function(const std::string& dbName, const std::string& funcName) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_function", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_function_pargs args; + args.dbName = &dbName; + args.funcName = &funcName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_drop_function() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_function") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_drop_function_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) +{ + send_alter_function(dbName, funcName, newFunc); + recv_alter_function(); +} + +void ThriftHiveMetastoreClient::send_alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_function", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_function_pargs args; + args.dbName = &dbName; + args.funcName = &funcName; + args.newFunc = &newFunc; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_alter_function() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_function") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_alter_function_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) +{ + send_get_functions(dbName, pattern); + recv_get_functions(_return); +} + +void ThriftHiveMetastoreClient::send_get_functions(const std::string& dbName, const std::string& pattern) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_functions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_functions_pargs args; + args.dbName = &dbName; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_functions(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_functions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_functions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_functions failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_function(Function& _return, const std::string& dbName, const std::string& funcName) +{ + send_get_function(dbName, funcName); + recv_get_function(_return); +} + +void ThriftHiveMetastoreClient::send_get_function(const std::string& dbName, const std::string& funcName) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_function", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_function_pargs args; + args.dbName = &dbName; + args.funcName = &funcName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_function(Function& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_function") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_function_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_function failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_all_functions(GetAllFunctionsResponse& _return) +{ + send_get_all_functions(); + recv_get_all_functions(_return); +} + +void ThriftHiveMetastoreClient::send_get_all_functions() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_all_functions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_functions_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_all_functions(GetAllFunctionsResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_all_functions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_all_functions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_functions failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::create_role(const Role& role) +{ + send_create_role(role); + return recv_create_role(); +} + +void ThriftHiveMetastoreClient::send_create_role(const Role& role) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_role", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_role_pargs args; + args.role = &role; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_create_role() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_role") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_create_role_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_role failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_role(const std::string& role_name) +{ + send_drop_role(role_name); + return recv_drop_role(); +} + +void ThriftHiveMetastoreClient::send_drop_role(const std::string& role_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_role_pargs args; + args.role_name = &role_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_drop_role() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_role") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_drop_role_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_role failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_role_names(std::vector & _return) +{ + send_get_role_names(); + recv_get_role_names(_return); +} + +void ThriftHiveMetastoreClient::send_get_role_names() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_role_names", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_role_names_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_role_names(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_role_names") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_role_names_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_role_names failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::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) +{ + send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); + return recv_grant_role(); +} + +void ThriftHiveMetastoreClient::send_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) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_grant_role_pargs 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; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_grant_role() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grant_role") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_grant_role_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_role failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) +{ + send_revoke_role(role_name, principal_name, principal_type); + return recv_revoke_role(); +} + +void ThriftHiveMetastoreClient::send_revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_revoke_role_pargs args; + args.role_name = &role_name; + args.principal_name = &principal_name; + args.principal_type = &principal_type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_revoke_role() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("revoke_role") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_revoke_role_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_role failed: unknown result"); +} + +void ThriftHiveMetastoreClient::list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) +{ + send_list_roles(principal_name, principal_type); + recv_list_roles(_return); +} + +void ThriftHiveMetastoreClient::send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_list_roles_pargs args; + args.principal_name = &principal_name; + args.principal_type = &principal_type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_list_roles(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("list_roles") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_list_roles_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_roles failed: unknown result"); +} + +void ThriftHiveMetastoreClient::grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) +{ + send_grant_revoke_role(request); + recv_grant_revoke_role(_return); +} + +void ThriftHiveMetastoreClient::send_grant_revoke_role(const GrantRevokeRoleRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("grant_revoke_role", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_grant_revoke_role_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_grant_revoke_role(GrantRevokeRoleResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grant_revoke_role") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_grant_revoke_role_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_revoke_role failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) +{ + send_get_principals_in_role(request); + recv_get_principals_in_role(_return); +} + +void ThriftHiveMetastoreClient::send_get_principals_in_role(const GetPrincipalsInRoleRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_principals_in_role", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_principals_in_role_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_principals_in_role(GetPrincipalsInRoleResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_principals_in_role") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_principals_in_role_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_principals_in_role failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request) +{ + send_get_role_grants_for_principal(request); + recv_get_role_grants_for_principal(_return); +} + +void ThriftHiveMetastoreClient::send_get_role_grants_for_principal(const GetRoleGrantsForPrincipalRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_role_grants_for_principal", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_role_grants_for_principal_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_role_grants_for_principal") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_role_grants_for_principal_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_role_grants_for_principal failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) +{ + send_get_privilege_set(hiveObject, user_name, group_names); + recv_get_privilege_set(_return); +} + +void ThriftHiveMetastoreClient::send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_privilege_set_pargs args; + args.hiveObject = &hiveObject; + args.user_name = &user_name; + args.group_names = &group_names; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_privilege_set(PrincipalPrivilegeSet& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_privilege_set") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_privilege_set_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_privilege_set failed: unknown result"); +} + +void ThriftHiveMetastoreClient::list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) +{ + send_list_privileges(principal_name, principal_type, hiveObject); + recv_list_privileges(_return); +} + +void ThriftHiveMetastoreClient::send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_list_privileges_pargs args; + args.principal_name = &principal_name; + args.principal_type = &principal_type; + args.hiveObject = &hiveObject; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_list_privileges(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("list_privileges") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_list_privileges_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_privileges failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::grant_privileges(const PrivilegeBag& privileges) +{ + send_grant_privileges(privileges); + return recv_grant_privileges(); +} + +void ThriftHiveMetastoreClient::send_grant_privileges(const PrivilegeBag& privileges) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_grant_privileges_pargs args; + args.privileges = &privileges; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_grant_privileges() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grant_privileges") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_grant_privileges_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_privileges failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::revoke_privileges(const PrivilegeBag& privileges) +{ + send_revoke_privileges(privileges); + return recv_revoke_privileges(); +} + +void ThriftHiveMetastoreClient::send_revoke_privileges(const PrivilegeBag& privileges) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_revoke_privileges_pargs args; + args.privileges = &privileges; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_revoke_privileges() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("revoke_privileges") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_revoke_privileges_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_privileges failed: unknown result"); +} + +void ThriftHiveMetastoreClient::grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) +{ + send_grant_revoke_privileges(request); + recv_grant_revoke_privileges(_return); +} + +void ThriftHiveMetastoreClient::send_grant_revoke_privileges(const GrantRevokePrivilegeRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("grant_revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_grant_revoke_privileges_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_grant_revoke_privileges(GrantRevokePrivilegeResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grant_revoke_privileges") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_grant_revoke_privileges_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_revoke_privileges failed: unknown result"); +} + +void ThriftHiveMetastoreClient::set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) +{ + send_set_ugi(user_name, group_names); + recv_set_ugi(_return); +} + +void ThriftHiveMetastoreClient::send_set_ugi(const std::string& user_name, const std::vector & group_names) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("set_ugi", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_set_ugi_pargs args; + args.user_name = &user_name; + args.group_names = &group_names; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_set_ugi(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("set_ugi") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_set_ugi_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "set_ugi failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) +{ + send_get_delegation_token(token_owner, renewer_kerberos_principal_name); + recv_get_delegation_token(_return); +} + +void ThriftHiveMetastoreClient::send_get_delegation_token(const std::string& token_owner, const std::string& renewer_kerberos_principal_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_delegation_token_pargs args; + args.token_owner = &token_owner; + args.renewer_kerberos_principal_name = &renewer_kerberos_principal_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_delegation_token(std::string& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_delegation_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_delegation_token_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_delegation_token failed: unknown result"); +} + +int64_t ThriftHiveMetastoreClient::renew_delegation_token(const std::string& token_str_form) +{ + send_renew_delegation_token(token_str_form); + return recv_renew_delegation_token(); +} + +void ThriftHiveMetastoreClient::send_renew_delegation_token(const std::string& token_str_form) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_renew_delegation_token_pargs args; + args.token_str_form = &token_str_form; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +int64_t ThriftHiveMetastoreClient::recv_renew_delegation_token() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("renew_delegation_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + int64_t _return; + ThriftHiveMetastore_renew_delegation_token_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "renew_delegation_token failed: unknown result"); +} + +void ThriftHiveMetastoreClient::cancel_delegation_token(const std::string& token_str_form) +{ + send_cancel_delegation_token(token_str_form); + recv_cancel_delegation_token(); +} + +void ThriftHiveMetastoreClient::send_cancel_delegation_token(const std::string& token_str_form) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_cancel_delegation_token_pargs args; + args.token_str_form = &token_str_form; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_cancel_delegation_token() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("cancel_delegation_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_cancel_delegation_token_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + return; +} + +bool ThriftHiveMetastoreClient::add_token(const std::string& token_identifier, const std::string& delegation_token) +{ + send_add_token(token_identifier, delegation_token); + return recv_add_token(); +} + +void ThriftHiveMetastoreClient::send_add_token(const std::string& token_identifier, const std::string& delegation_token) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_token_pargs args; + args.token_identifier = &token_identifier; + args.delegation_token = &delegation_token; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_add_token() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_add_token_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_token failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::remove_token(const std::string& token_identifier) +{ + send_remove_token(token_identifier); + return recv_remove_token(); +} + +void ThriftHiveMetastoreClient::send_remove_token(const std::string& token_identifier) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("remove_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_remove_token_pargs args; + args.token_identifier = &token_identifier; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_remove_token() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("remove_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_remove_token_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "remove_token failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_token(std::string& _return, const std::string& token_identifier) +{ + send_get_token(token_identifier); + recv_get_token(_return); +} + +void ThriftHiveMetastoreClient::send_get_token(const std::string& token_identifier) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_token_pargs args; + args.token_identifier = &token_identifier; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_token(std::string& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_token_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_token failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_all_token_identifiers(std::vector & _return) +{ + send_get_all_token_identifiers(); + recv_get_all_token_identifiers(_return); +} + +void ThriftHiveMetastoreClient::send_get_all_token_identifiers() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_all_token_identifiers", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_token_identifiers_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_all_token_identifiers(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_all_token_identifiers") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_all_token_identifiers_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_token_identifiers failed: unknown result"); +} + +int32_t ThriftHiveMetastoreClient::add_master_key(const std::string& key) +{ + send_add_master_key(key); + return recv_add_master_key(); +} + +void ThriftHiveMetastoreClient::send_add_master_key(const std::string& key) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_master_key", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_master_key_pargs args; + args.key = &key; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +int32_t ThriftHiveMetastoreClient::recv_add_master_key() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_master_key") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + int32_t _return; + ThriftHiveMetastore_add_master_key_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_master_key failed: unknown result"); +} + +void ThriftHiveMetastoreClient::update_master_key(const int32_t seq_number, const std::string& key) +{ + send_update_master_key(seq_number, key); + recv_update_master_key(); +} + +void ThriftHiveMetastoreClient::send_update_master_key(const int32_t seq_number, const std::string& key) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("update_master_key", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_update_master_key_pargs args; + args.seq_number = &seq_number; + args.key = &key; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_update_master_key() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("update_master_key") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_update_master_key_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +bool ThriftHiveMetastoreClient::remove_master_key(const int32_t key_seq) +{ + send_remove_master_key(key_seq); + return recv_remove_master_key(); +} + +void ThriftHiveMetastoreClient::send_remove_master_key(const int32_t key_seq) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("remove_master_key", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_remove_master_key_pargs args; + args.key_seq = &key_seq; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_remove_master_key() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("remove_master_key") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_remove_master_key_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "remove_master_key failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_master_keys(std::vector & _return) +{ + send_get_master_keys(); + recv_get_master_keys(_return); +} + +void ThriftHiveMetastoreClient::send_get_master_keys() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_master_keys", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_master_keys_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_master_keys(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_master_keys") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_master_keys_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_master_keys failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_open_txns(GetOpenTxnsResponse& _return) +{ + send_get_open_txns(); + recv_get_open_txns(_return); +} + +void ThriftHiveMetastoreClient::send_get_open_txns() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_open_txns", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_open_txns_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_open_txns(GetOpenTxnsResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_open_txns") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_open_txns_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_open_txns failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_open_txns_info(GetOpenTxnsInfoResponse& _return) +{ + send_get_open_txns_info(); + recv_get_open_txns_info(_return); +} + +void ThriftHiveMetastoreClient::send_get_open_txns_info() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_open_txns_info", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_open_txns_info_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_open_txns_info(GetOpenTxnsInfoResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_open_txns_info") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_open_txns_info_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_open_txns_info failed: unknown result"); +} + +void ThriftHiveMetastoreClient::open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst) +{ + send_open_txns(rqst); + recv_open_txns(_return); +} + +void ThriftHiveMetastoreClient::send_open_txns(const OpenTxnRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("open_txns", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_open_txns_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_open_txns(OpenTxnsResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("open_txns") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_open_txns_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "open_txns failed: unknown result"); +} + +void ThriftHiveMetastoreClient::abort_txn(const AbortTxnRequest& rqst) +{ + send_abort_txn(rqst); + recv_abort_txn(); +} + +void ThriftHiveMetastoreClient::send_abort_txn(const AbortTxnRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("abort_txn", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_abort_txn_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_abort_txn() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("abort_txn") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_abort_txn_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + return; +} + +void ThriftHiveMetastoreClient::abort_txns(const AbortTxnsRequest& rqst) +{ + send_abort_txns(rqst); + recv_abort_txns(); +} + +void ThriftHiveMetastoreClient::send_abort_txns(const AbortTxnsRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("abort_txns", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_abort_txns_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_abort_txns() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("abort_txns") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_abort_txns_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + return; +} + +void ThriftHiveMetastoreClient::commit_txn(const CommitTxnRequest& rqst) +{ + send_commit_txn(rqst); + recv_commit_txn(); +} + +void ThriftHiveMetastoreClient::send_commit_txn(const CommitTxnRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("commit_txn", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_commit_txn_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_commit_txn() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("commit_txn") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_commit_txn_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::lock(LockResponse& _return, const LockRequest& rqst) +{ + send_lock(rqst); + recv_lock(_return); +} + +void ThriftHiveMetastoreClient::send_lock(const LockRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("lock", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_lock_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_lock(LockResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("lock") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_lock_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "lock failed: unknown result"); +} + +void ThriftHiveMetastoreClient::check_lock(LockResponse& _return, const CheckLockRequest& rqst) +{ + send_check_lock(rqst); + recv_check_lock(_return); +} + +void ThriftHiveMetastoreClient::send_check_lock(const CheckLockRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("check_lock", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_check_lock_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_check_lock(LockResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("check_lock") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_check_lock_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "check_lock failed: unknown result"); +} + +void ThriftHiveMetastoreClient::unlock(const UnlockRequest& rqst) +{ + send_unlock(rqst); + recv_unlock(); +} + +void ThriftHiveMetastoreClient::send_unlock(const UnlockRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("unlock", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_unlock_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_unlock() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("unlock") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_unlock_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst) +{ + send_show_locks(rqst); + recv_show_locks(_return); +} + +void ThriftHiveMetastoreClient::send_show_locks(const ShowLocksRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("show_locks", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_show_locks_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_show_locks(ShowLocksResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("show_locks") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_show_locks_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "show_locks failed: unknown result"); +} + +void ThriftHiveMetastoreClient::heartbeat(const HeartbeatRequest& ids) +{ + send_heartbeat(ids); + recv_heartbeat(); +} + +void ThriftHiveMetastoreClient::send_heartbeat(const HeartbeatRequest& ids) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("heartbeat", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_heartbeat_pargs args; + args.ids = &ids; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_heartbeat() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("heartbeat") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_heartbeat_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns) +{ + send_heartbeat_txn_range(txns); + recv_heartbeat_txn_range(_return); +} + +void ThriftHiveMetastoreClient::send_heartbeat_txn_range(const HeartbeatTxnRangeRequest& txns) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("heartbeat_txn_range", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_heartbeat_txn_range_pargs args; + args.txns = &txns; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_heartbeat_txn_range(HeartbeatTxnRangeResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("heartbeat_txn_range") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_heartbeat_txn_range_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "heartbeat_txn_range failed: unknown result"); +} + +void ThriftHiveMetastoreClient::compact(const CompactionRequest& rqst) +{ + send_compact(rqst); + recv_compact(); +} + +void ThriftHiveMetastoreClient::send_compact(const CompactionRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("compact", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_compact_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_compact() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("compact") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_compact_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + return; +} + +void ThriftHiveMetastoreClient::compact2(CompactionResponse& _return, const CompactionRequest& rqst) +{ + send_compact2(rqst); + recv_compact2(_return); +} + +void ThriftHiveMetastoreClient::send_compact2(const CompactionRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("compact2", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_compact2_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_compact2(CompactionResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("compact2") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_compact2_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "compact2 failed: unknown result"); +} + +void ThriftHiveMetastoreClient::show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst) +{ + send_show_compact(rqst); + recv_show_compact(_return); +} + +void ThriftHiveMetastoreClient::send_show_compact(const ShowCompactRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("show_compact", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_show_compact_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_show_compact(ShowCompactResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("show_compact") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_show_compact_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "show_compact failed: unknown result"); +} + +void ThriftHiveMetastoreClient::add_dynamic_partitions(const AddDynamicPartitions& rqst) +{ + send_add_dynamic_partitions(rqst); + recv_add_dynamic_partitions(); +} + +void ThriftHiveMetastoreClient::send_add_dynamic_partitions(const AddDynamicPartitions& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_dynamic_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_dynamic_partitions_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_add_dynamic_partitions() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_dynamic_partitions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_add_dynamic_partitions_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst) +{ + send_get_next_notification(rqst); + recv_get_next_notification(_return); +} + +void ThriftHiveMetastoreClient::send_get_next_notification(const NotificationEventRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_next_notification", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_next_notification_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_next_notification(NotificationEventResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_next_notification") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_next_notification_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_next_notification failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_current_notificationEventId(CurrentNotificationEventId& _return) +{ + send_get_current_notificationEventId(); + recv_get_current_notificationEventId(_return); +} + +void ThriftHiveMetastoreClient::send_get_current_notificationEventId() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_current_notificationEventId", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_current_notificationEventId_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_current_notificationEventId(CurrentNotificationEventId& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_current_notificationEventId") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_current_notificationEventId_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_current_notificationEventId failed: unknown result"); +} + +void ThriftHiveMetastoreClient::fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst) +{ + send_fire_listener_event(rqst); + recv_fire_listener_event(_return); +} + +void ThriftHiveMetastoreClient::send_fire_listener_event(const FireEventRequest& rqst) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("fire_listener_event", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_fire_listener_event_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_fire_listener_event(FireEventResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("fire_listener_event") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_fire_listener_event_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fire_listener_event failed: unknown result"); +} + +void ThriftHiveMetastoreClient::flushCache() +{ + send_flushCache(); + recv_flushCache(); +} + +void ThriftHiveMetastoreClient::send_flushCache() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("flushCache", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_flushCache_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_flushCache() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("flushCache") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_flushCache_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + return; +} + +void ThriftHiveMetastoreClient::cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request) +{ + send_cm_recycle(request); + recv_cm_recycle(_return); +} + +void ThriftHiveMetastoreClient::send_cm_recycle(const CmRecycleRequest& request) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("cm_recycle", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_cm_recycle_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_cm_recycle(CmRecycleResponse& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("cm_recycle") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_cm_recycle_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "cm_recycle failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req) +{ + send_get_file_metadata_by_expr(req); + recv_get_file_metadata_by_expr(_return); +} + +void ThriftHiveMetastoreClient::send_get_file_metadata_by_expr(const GetFileMetadataByExprRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_file_metadata_by_expr", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_file_metadata_by_expr_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_file_metadata_by_expr(GetFileMetadataByExprResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_file_metadata_by_expr") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_file_metadata_by_expr_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_file_metadata_by_expr failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req) +{ + send_get_file_metadata(req); + recv_get_file_metadata(_return); +} + +void ThriftHiveMetastoreClient::send_get_file_metadata(const GetFileMetadataRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_file_metadata_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_file_metadata(GetFileMetadataResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_file_metadata") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_file_metadata_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_file_metadata failed: unknown result"); +} + +void ThriftHiveMetastoreClient::put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req) +{ + send_put_file_metadata(req); + recv_put_file_metadata(_return); +} + +void ThriftHiveMetastoreClient::send_put_file_metadata(const PutFileMetadataRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("put_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_put_file_metadata_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_put_file_metadata(PutFileMetadataResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("put_file_metadata") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_put_file_metadata_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "put_file_metadata failed: unknown result"); +} + +void ThriftHiveMetastoreClient::clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req) +{ + send_clear_file_metadata(req); + recv_clear_file_metadata(_return); +} + +void ThriftHiveMetastoreClient::send_clear_file_metadata(const ClearFileMetadataRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("clear_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_clear_file_metadata_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_clear_file_metadata(ClearFileMetadataResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("clear_file_metadata") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_clear_file_metadata_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "clear_file_metadata failed: unknown result"); +} + +void ThriftHiveMetastoreClient::cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) +{ + send_cache_file_metadata(req); + recv_cache_file_metadata(_return); +} + +void ThriftHiveMetastoreClient::send_cache_file_metadata(const CacheFileMetadataRequest& req) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("cache_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_cache_file_metadata_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_cache_file_metadata(CacheFileMetadataResult& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("cache_file_metadata") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_cache_file_metadata_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "cache_file_metadata failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_metastore_db_uuid(std::string& _return) +{ + send_get_metastore_db_uuid(); + recv_get_metastore_db_uuid(_return); +} + +void ThriftHiveMetastoreClient::send_get_metastore_db_uuid() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_metastore_db_uuid", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_metastore_db_uuid_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_metastore_db_uuid(std::string& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_metastore_db_uuid") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_metastore_db_uuid_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_metastore_db_uuid failed: unknown result"); +} + +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::dispatchCall(iprot, oprot, fname, seqid, callContext); + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void ThriftHiveMetastoreProcessor::process_getMetaConf(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.getMetaConf", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.getMetaConf"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.getMetaConf"); + } + + ThriftHiveMetastore_getMetaConf_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.getMetaConf", bytes); + } + + ThriftHiveMetastore_getMetaConf_result result; + try { + iface_->getMetaConf(result.success, args.key); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.getMetaConf"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getMetaConf", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.getMetaConf"); + } + + oprot->writeMessageBegin("getMetaConf", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.getMetaConf", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_setMetaConf(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.setMetaConf", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.setMetaConf"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.setMetaConf"); + } + + ThriftHiveMetastore_setMetaConf_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.setMetaConf", bytes); + } + + ThriftHiveMetastore_setMetaConf_result result; + try { + iface_->setMetaConf(args.key, args.value); + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.setMetaConf"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("setMetaConf", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.setMetaConf"); + } + + oprot->writeMessageBegin("setMetaConf", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.setMetaConf", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_database", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_database"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_database"); + } + + ThriftHiveMetastore_create_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_database", bytes); + } + + ThriftHiveMetastore_create_database_result result; + try { + iface_->create_database(args.database); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_database"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_database"); + } + + oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_database", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_database"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_database"); + } + + ThriftHiveMetastore_get_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_database", bytes); + } + + ThriftHiveMetastore_get_database_result result; + try { + iface_->get_database(result.success, args.name); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_database"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_database"); + } + + oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_database", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_database"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_database"); + } + + ThriftHiveMetastore_drop_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_database", bytes); + } + + ThriftHiveMetastore_drop_database_result result; + try { + iface_->drop_database(args.name, args.deleteData, args.cascade); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidOperationException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_database"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_database"); + } + + oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_databases", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_databases"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_databases"); + } + + ThriftHiveMetastore_get_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_databases", bytes); + } + + ThriftHiveMetastore_get_databases_result result; + try { + iface_->get_databases(result.success, args.pattern); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_databases"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_databases"); + } + + oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_databases", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_databases"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_databases"); + } + + ThriftHiveMetastore_get_all_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_databases", bytes); + } + + ThriftHiveMetastore_get_all_databases_result result; + try { + iface_->get_all_databases(result.success); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_databases"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_databases"); + } + + oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_database", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_database"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_database"); + } + + ThriftHiveMetastore_alter_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_database", bytes); + } + + ThriftHiveMetastore_alter_database_result result; + try { + iface_->alter_database(args.dbname, args.db); + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_database"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_database"); + } + + oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_type", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type"); + } + + ThriftHiveMetastore_get_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type", bytes); + } + + ThriftHiveMetastore_get_type_result result; + try { + iface_->get_type(result.success, args.name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type"); + } + + oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_type", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_type"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_type"); + } + + ThriftHiveMetastore_create_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_type", bytes); + } + + ThriftHiveMetastore_create_type_result result; + try { + result.success = iface_->create_type(args.type); + result.__isset.success = true; + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_type"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_type"); + } + + oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_type", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_type"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_type"); + } + + ThriftHiveMetastore_drop_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_type", bytes); + } + + ThriftHiveMetastore_drop_type_result result; + try { + result.success = iface_->drop_type(args.type); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_type"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_type"); + } + + oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_type_all", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type_all"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type_all"); + } + + ThriftHiveMetastore_get_type_all_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type_all", bytes); + } + + ThriftHiveMetastore_get_type_all_result result; + try { + iface_->get_type_all(result.success, args.name); + result.__isset.success = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type_all"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type_all"); + } + + oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_fields", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_fields"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_fields"); + } + + ThriftHiveMetastore_get_fields_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_fields", bytes); + } + + ThriftHiveMetastore_get_fields_result result; + try { + iface_->get_fields(result.success, args.db_name, args.table_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (UnknownTableException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_fields"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_fields"); + } + + oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_fields", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_fields_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_fields_with_environment_context", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_fields_with_environment_context"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_fields_with_environment_context"); + } + + ThriftHiveMetastore_get_fields_with_environment_context_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_fields_with_environment_context", bytes); + } + + ThriftHiveMetastore_get_fields_with_environment_context_result result; + try { + iface_->get_fields_with_environment_context(result.success, args.db_name, args.table_name, args.environment_context); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (UnknownTableException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_fields_with_environment_context"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_fields_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_fields_with_environment_context"); + } + + oprot->writeMessageBegin("get_fields_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_fields_with_environment_context", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_schema", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_schema"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_schema"); + } + + ThriftHiveMetastore_get_schema_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_schema", bytes); + } + + ThriftHiveMetastore_get_schema_result result; + try { + iface_->get_schema(result.success, args.db_name, args.table_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (UnknownTableException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_schema"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_schema"); + } + + oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_schema", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_schema_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_schema_with_environment_context", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_schema_with_environment_context"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_schema_with_environment_context"); + } + + ThriftHiveMetastore_get_schema_with_environment_context_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_schema_with_environment_context", bytes); + } + + ThriftHiveMetastore_get_schema_with_environment_context_result result; + try { + iface_->get_schema_with_environment_context(result.success, args.db_name, args.table_name, args.environment_context); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (UnknownTableException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_schema_with_environment_context"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_schema_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_schema_with_environment_context"); + } + + oprot->writeMessageBegin("get_schema_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_schema_with_environment_context", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table"); + } + + ThriftHiveMetastore_create_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table", bytes); + } + + ThriftHiveMetastore_create_table_result result; + try { + iface_->create_table(args.tbl); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (NoSuchObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table"); + } + + oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table_with_environment_context", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); + } + + ThriftHiveMetastore_create_table_with_environment_context_result result; + try { + iface_->create_table_with_environment_context(args.tbl, args.environment_context); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (NoSuchObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_create_table_with_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_table_with_constraints", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table_with_constraints"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table_with_constraints"); + } + + ThriftHiveMetastore_create_table_with_constraints_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table_with_constraints", bytes); + } + + ThriftHiveMetastore_create_table_with_constraints_result result; + try { + iface_->create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys, args.uniqueConstraints, args.notNullConstraints); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (NoSuchObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table_with_constraints"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_table_with_constraints", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table_with_constraints"); + } + + oprot->writeMessageBegin("create_table_with_constraints", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table_with_constraints", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_drop_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_constraint", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_constraint"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_constraint"); + } + + ThriftHiveMetastore_drop_constraint_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_constraint", bytes); + } + + ThriftHiveMetastore_drop_constraint_result result; + try { + iface_->drop_constraint(args.req); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_constraint"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_constraint", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_constraint"); + } + + oprot->writeMessageBegin("drop_constraint", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_constraint", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_add_primary_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_primary_key", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_primary_key"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_primary_key"); + } + + ThriftHiveMetastore_add_primary_key_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_primary_key", bytes); + } + + ThriftHiveMetastore_add_primary_key_result result; + try { + iface_->add_primary_key(args.req); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_primary_key"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_primary_key", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_primary_key"); + } + + oprot->writeMessageBegin("add_primary_key", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_primary_key", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_add_foreign_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_foreign_key", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_foreign_key"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_foreign_key"); + } + + ThriftHiveMetastore_add_foreign_key_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_foreign_key", bytes); + } + + ThriftHiveMetastore_add_foreign_key_result result; + try { + iface_->add_foreign_key(args.req); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_foreign_key"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_foreign_key", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_foreign_key"); + } + + oprot->writeMessageBegin("add_foreign_key", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_foreign_key", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_add_unique_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_unique_constraint", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_unique_constraint"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_unique_constraint"); + } + + ThriftHiveMetastore_add_unique_constraint_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_unique_constraint", bytes); + } + + ThriftHiveMetastore_add_unique_constraint_result result; + try { + iface_->add_unique_constraint(args.req); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_unique_constraint"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_unique_constraint", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_unique_constraint"); + } + + oprot->writeMessageBegin("add_unique_constraint", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_unique_constraint", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_add_not_null_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_not_null_constraint", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_not_null_constraint"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_not_null_constraint"); + } + + ThriftHiveMetastore_add_not_null_constraint_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_not_null_constraint", bytes); + } + + ThriftHiveMetastore_add_not_null_constraint_result result; + try { + iface_->add_not_null_constraint(args.req); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_not_null_constraint"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_not_null_constraint", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_not_null_constraint"); + } + + oprot->writeMessageBegin("add_not_null_constraint", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_not_null_constraint", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_table", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table"); + } + + ThriftHiveMetastore_drop_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table", bytes); + } + + ThriftHiveMetastore_drop_table_result result; + try { + iface_->drop_table(args.dbname, args.name, args.deleteData); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table"); + } + + oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_drop_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_table_with_environment_context", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); + } + + ThriftHiveMetastore_drop_table_with_environment_context_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table_with_environment_context", bytes); + } + + ThriftHiveMetastore_drop_table_with_environment_context_result result; + try { + iface_->drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table_with_environment_context"); + } + + oprot->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table_with_environment_context", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_truncate_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.truncate_table", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.truncate_table"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.truncate_table"); + } + + ThriftHiveMetastore_truncate_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.truncate_table", bytes); + } + + ThriftHiveMetastore_truncate_table_result result; + try { + iface_->truncate_table(args.dbName, args.tableName, args.partNames); + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.truncate_table"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("truncate_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.truncate_table"); + } + + oprot->writeMessageBegin("truncate_table", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.truncate_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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_tables", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_tables"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_tables"); + } + + ThriftHiveMetastore_get_tables_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_tables", bytes); + } + + ThriftHiveMetastore_get_tables_result result; + try { + iface_->get_tables(result.success, args.db_name, args.pattern); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_tables"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_tables"); + } + + oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_tables", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_tables_by_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_tables_by_type", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_tables_by_type"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_tables_by_type"); + } + + ThriftHiveMetastore_get_tables_by_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_tables_by_type", bytes); + } + + ThriftHiveMetastore_get_tables_by_type_result result; + try { + iface_->get_tables_by_type(result.success, args.db_name, args.pattern, args.tableType); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_tables_by_type"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_tables_by_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_tables_by_type"); + } + + oprot->writeMessageBegin("get_tables_by_type", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_tables_by_type", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_table_meta(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_meta", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_meta"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_meta"); + } + + ThriftHiveMetastore_get_table_meta_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_meta", bytes); + } + + ThriftHiveMetastore_get_table_meta_result result; + try { + iface_->get_table_meta(result.success, args.db_patterns, args.tbl_patterns, args.tbl_types); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_meta"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table_meta", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_meta"); + } + + oprot->writeMessageBegin("get_table_meta", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_meta", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_tables", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_tables"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_tables"); + } + + ThriftHiveMetastore_get_all_tables_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_tables", bytes); + } + + ThriftHiveMetastore_get_all_tables_result result; + try { + iface_->get_all_tables(result.success, args.db_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_tables"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_tables"); + } + + oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table"); + } + + ThriftHiveMetastore_get_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table", bytes); + } + + ThriftHiveMetastore_get_table_result result; + try { + iface_->get_table(result.success, args.dbname, args.tbl_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table"); + } + + oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_objects_by_name", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); + } + + ThriftHiveMetastore_get_table_objects_by_name_result result; + try { + iface_->get_table_objects_by_name(result.success, args.dbname, args.tbl_names); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_table_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_req", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_req"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_req"); + } + + ThriftHiveMetastore_get_table_req_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_req", bytes); + } + + ThriftHiveMetastore_get_table_req_result result; + try { + iface_->get_table_req(result.success, args.req); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_req"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_req"); + } + + oprot->writeMessageBegin("get_table_req", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_req", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_table_objects_by_name_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_objects_by_name_req", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_objects_by_name_req"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name_req"); + } + + ThriftHiveMetastore_get_table_objects_by_name_req_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name_req", bytes); + } + + ThriftHiveMetastore_get_table_objects_by_name_req_result result; + try { + iface_->get_table_objects_by_name_req(result.success, args.req); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidOperationException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_objects_by_name_req"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table_objects_by_name_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name_req"); + } + + oprot->writeMessageBegin("get_table_objects_by_name_req", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name_req", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_names_by_filter", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); + } + + ThriftHiveMetastore_get_table_names_by_filter_result result; + try { + iface_->get_table_names_by_filter(result.success, args.dbname, args.filter, args.max_tables); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidOperationException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table"); + } + + ThriftHiveMetastore_alter_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table", bytes); + } + + ThriftHiveMetastore_alter_table_result result; + try { + iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table"); + } + + oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table_with_environment_context", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); + } + + ThriftHiveMetastore_alter_table_with_environment_context_result result; + try { + iface_->alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_alter_table_with_cascade(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_table_with_cascade", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table_with_cascade"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table_with_cascade"); + } + + ThriftHiveMetastore_alter_table_with_cascade_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table_with_cascade", bytes); + } + + ThriftHiveMetastore_alter_table_with_cascade_result result; + try { + iface_->alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table_with_cascade"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_table_with_cascade", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table_with_cascade"); + } + + oprot->writeMessageBegin("alter_table_with_cascade", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table_with_cascade", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partition", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition"); + } + + ThriftHiveMetastore_add_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition", bytes); + } + + ThriftHiveMetastore_add_partition_result result; + try { + iface_->add_partition(result.success, args.new_part); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition"); + } + + oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partition_with_environment_context", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); + } + + ThriftHiveMetastore_add_partition_with_environment_context_result result; + try { + iface_->add_partition_with_environment_context(result.success, args.new_part, args.environment_context); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partitions", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions"); + } + + ThriftHiveMetastore_add_partitions_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions", bytes); + } + + ThriftHiveMetastore_add_partitions_result result; + try { + result.success = iface_->add_partitions(args.new_parts); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions"); + } + + oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_add_partitions_pspec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partitions_pspec", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions_pspec"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions_pspec"); + } + + ThriftHiveMetastore_add_partitions_pspec_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions_pspec", bytes); + } + + ThriftHiveMetastore_add_partitions_pspec_result result; + try { + result.success = iface_->add_partitions_pspec(args.new_parts); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions_pspec"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_partitions_pspec", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions_pspec"); + } + + oprot->writeMessageBegin("add_partitions_pspec", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions_pspec", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition"); + } + + ThriftHiveMetastore_append_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition", bytes); + } + + ThriftHiveMetastore_append_partition_result result; + try { + iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition"); + } + + oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_add_partitions_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_partitions_req", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions_req"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions_req"); + } + + ThriftHiveMetastore_add_partitions_req_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions_req", bytes); + } + + ThriftHiveMetastore_add_partitions_req_result result; + try { + iface_->add_partitions_req(result.success, args.request); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions_req"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions_req"); + } + + oprot->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions_req", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_append_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_with_environment_context", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); + } + + ThriftHiveMetastore_append_partition_with_environment_context_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_with_environment_context", bytes); + } + + ThriftHiveMetastore_append_partition_with_environment_context_result result; + try { + iface_->append_partition_with_environment_context(result.success, args.db_name, args.tbl_name, args.part_vals, args.environment_context); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_with_environment_context"); + } + + oprot->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_with_environment_context", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); + } + + ThriftHiveMetastore_append_partition_by_name_result result; + try { + iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_append_partition_by_name_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name_with_environment_context", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); + } + + ThriftHiveMetastore_append_partition_by_name_with_environment_context_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context", bytes); + } + + ThriftHiveMetastore_append_partition_by_name_with_environment_context_result result; + try { + iface_->append_partition_by_name_with_environment_context(result.success, args.db_name, args.tbl_name, args.part_name, args.environment_context); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context"); + } + + oprot->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name_with_environment_context", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition"); + } + + ThriftHiveMetastore_drop_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition", bytes); + } + + ThriftHiveMetastore_drop_partition_result result; + try { + result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition"); + } + + oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_drop_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_with_environment_context", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); + } + + ThriftHiveMetastore_drop_partition_with_environment_context_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context", bytes); + } + + ThriftHiveMetastore_drop_partition_with_environment_context_result result; + try { + result.success = iface_->drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context"); + } + + oprot->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_with_environment_context", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); + } + + ThriftHiveMetastore_drop_partition_by_name_result result; + try { + result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_drop_partition_by_name_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name_with_environment_context", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); + } + + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context", bytes); + } + + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result result; + try { + result.success = iface_->drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context"); + } + + oprot->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name_with_environment_context", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_drop_partitions_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_partitions_req", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partitions_req"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partitions_req"); + } + + ThriftHiveMetastore_drop_partitions_req_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partitions_req", bytes); + } + + ThriftHiveMetastore_drop_partitions_req_result result; + try { + iface_->drop_partitions_req(result.success, args.req); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partitions_req"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_partitions_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partitions_req"); + } + + oprot->writeMessageBegin("drop_partitions_req", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partitions_req", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition"); + } + + ThriftHiveMetastore_get_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition", bytes); + } + + ThriftHiveMetastore_get_partition_result result; + try { + iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition"); + } + + oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_exchange_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.exchange_partition", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.exchange_partition"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.exchange_partition"); + } + + ThriftHiveMetastore_exchange_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.exchange_partition", bytes); + } + + ThriftHiveMetastore_exchange_partition_result result; + try { + iface_->exchange_partition(result.success, args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (InvalidObjectException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.exchange_partition"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.exchange_partition"); + } + + oprot->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.exchange_partition", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_exchange_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.exchange_partitions", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.exchange_partitions"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.exchange_partitions"); + } + + ThriftHiveMetastore_exchange_partitions_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.exchange_partitions", bytes); + } + + ThriftHiveMetastore_exchange_partitions_result result; + try { + iface_->exchange_partitions(result.success, args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (InvalidObjectException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.exchange_partitions"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("exchange_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.exchange_partitions"); + } + + oprot->writeMessageBegin("exchange_partitions", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.exchange_partitions", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_with_auth", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); + } + + ThriftHiveMetastore_get_partition_with_auth_result result; + try { + iface_->get_partition_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_by_name", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); + } + + ThriftHiveMetastore_get_partition_by_name_result result; + try { + iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_by_name"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions"); + } + + ThriftHiveMetastore_get_partitions_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions", bytes); + } + + ThriftHiveMetastore_get_partitions_result result; + try { + iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions"); + } + + oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_with_auth", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); + } + + ThriftHiveMetastore_get_partitions_with_auth_result result; + try { + iface_->get_partitions_with_auth(result.success, args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_partitions_pspec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_pspec", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_pspec"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_pspec"); + } + + ThriftHiveMetastore_get_partitions_pspec_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_pspec", bytes); + } + + ThriftHiveMetastore_get_partitions_pspec_result result; + try { + iface_->get_partitions_pspec(result.success, args.db_name, args.tbl_name, args.max_parts); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_pspec"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions_pspec", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_pspec"); + } + + oprot->writeMessageBegin("get_partitions_pspec", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_pspec", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_names", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names"); + } + + ThriftHiveMetastore_get_partition_names_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names", bytes); + } + + ThriftHiveMetastore_get_partition_names_result result; + try { + iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); + result.__isset.success = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names"); + } + + oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps"); + } + + ThriftHiveMetastore_get_partitions_ps_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); + } + + ThriftHiveMetastore_get_partitions_ps_result result; + try { + iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps"); + } + + oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps_with_auth", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); + } + + ThriftHiveMetastore_get_partitions_ps_with_auth_result result; + try { + iface_->get_partitions_ps_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_names_ps", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); + } + + ThriftHiveMetastore_get_partition_names_ps_result result; + try { + iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_filter", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); + } + + ThriftHiveMetastore_get_partitions_by_filter_result result; + try { + iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_part_specs_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_part_specs_by_filter", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_part_specs_by_filter"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_part_specs_by_filter"); + } + + ThriftHiveMetastore_get_part_specs_by_filter_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_part_specs_by_filter", bytes); + } + + ThriftHiveMetastore_get_part_specs_by_filter_result result; + try { + iface_->get_part_specs_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_part_specs_by_filter"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_part_specs_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_part_specs_by_filter"); + } + + oprot->writeMessageBegin("get_part_specs_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_part_specs_by_filter", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_partitions_by_expr(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_expr", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_expr"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_expr"); + } + + ThriftHiveMetastore_get_partitions_by_expr_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_expr", bytes); + } + + ThriftHiveMetastore_get_partitions_by_expr_result result; + try { + iface_->get_partitions_by_expr(result.success, args.req); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_expr"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_expr"); + } + + oprot->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_expr", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_num_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_num_partitions_by_filter", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_num_partitions_by_filter"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_num_partitions_by_filter"); + } + + ThriftHiveMetastore_get_num_partitions_by_filter_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_num_partitions_by_filter", bytes); + } + + ThriftHiveMetastore_get_num_partitions_by_filter_result result; + try { + result.success = iface_->get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_num_partitions_by_filter"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_num_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_num_partitions_by_filter"); + } + + oprot->writeMessageBegin("get_num_partitions_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_num_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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_names", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); + } + + ThriftHiveMetastore_get_partitions_by_names_result result; + try { + iface_->get_partitions_by_names(result.success, args.db_name, args.tbl_name, args.names); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partition", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition"); + } + + ThriftHiveMetastore_alter_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition", bytes); + } + + ThriftHiveMetastore_alter_partition_result result; + try { + iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition"); + } + + oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partitions", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partitions"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partitions"); + } + + ThriftHiveMetastore_alter_partitions_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partitions", bytes); + } + + ThriftHiveMetastore_alter_partitions_result result; + try { + iface_->alter_partitions(args.db_name, args.tbl_name, args.new_parts); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partitions"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partitions"); + } + + oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partitions", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_alter_partitions_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partitions_with_environment_context", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partitions_with_environment_context"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partitions_with_environment_context"); + } + + ThriftHiveMetastore_alter_partitions_with_environment_context_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partitions_with_environment_context", bytes); + } + + ThriftHiveMetastore_alter_partitions_with_environment_context_result result; + try { + iface_->alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partitions_with_environment_context"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_partitions_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partitions_with_environment_context"); + } + + oprot->writeMessageBegin("alter_partitions_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partitions_with_environment_context", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_partition_with_environment_context", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); + } + + ThriftHiveMetastore_alter_partition_with_environment_context_result result; + try { + iface_->alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.rename_partition", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.rename_partition"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.rename_partition"); + } + + ThriftHiveMetastore_rename_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.rename_partition", bytes); + } + + ThriftHiveMetastore_rename_partition_result result; + try { + iface_->rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.rename_partition"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.rename_partition"); + } + + oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.rename_partition", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_partition_name_has_valid_characters(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_has_valid_characters", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); + } + + ThriftHiveMetastore_partition_name_has_valid_characters_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters", bytes); + } + + ThriftHiveMetastore_partition_name_has_valid_characters_result result; + try { + result.success = iface_->partition_name_has_valid_characters(args.part_vals, args.throw_exception); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters"); + } + + oprot->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_has_valid_characters", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_config_value", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_config_value"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_config_value"); + } + + ThriftHiveMetastore_get_config_value_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_config_value", bytes); + } + + ThriftHiveMetastore_get_config_value_result result; + try { + iface_->get_config_value(result.success, args.name, args.defaultValue); + result.__isset.success = true; + } catch (ConfigValSecurityException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_config_value"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_config_value"); + } + + oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_vals", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); + } + + ThriftHiveMetastore_partition_name_to_vals_result result; + try { + iface_->partition_name_to_vals(result.success, args.part_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_spec", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); + } + + ThriftHiveMetastore_partition_name_to_spec_result result; + try { + iface_->partition_name_to_spec(result.success, args.part_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.markPartitionForEvent", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.markPartitionForEvent"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + } + + ThriftHiveMetastore_markPartitionForEvent_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); + } + + ThriftHiveMetastore_markPartitionForEvent_result result; + try { + iface_->markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (UnknownTableException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (UnknownPartitionException &o5) { + result.o5 = o5; + result.__isset.o5 = true; + } catch (InvalidPartitionException &o6) { + result.o6 = o6; + result.__isset.o6 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + } + + oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.isPartitionMarkedForEvent", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + } + + ThriftHiveMetastore_isPartitionMarkedForEvent_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); + } + + ThriftHiveMetastore_isPartitionMarkedForEvent_result result; + try { + result.success = iface_->isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (UnknownTableException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (UnknownPartitionException &o5) { + result.o5 = o5; + result.__isset.o5 = true; + } catch (InvalidPartitionException &o6) { + result.o6 = o6; + result.__isset.o6 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + } + + oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_index", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_index"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_index"); + } + + ThriftHiveMetastore_add_index_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_index", bytes); + } + + ThriftHiveMetastore_add_index_result result; + try { + iface_->add_index(result.success, args.new_index, args.index_table); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_index"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_index"); + } + + oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_index", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_index"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_index"); + } + + ThriftHiveMetastore_alter_index_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_index", bytes); + } + + ThriftHiveMetastore_alter_index_result result; + try { + iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_index"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_index"); + } + + oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_index_by_name", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); + } + + ThriftHiveMetastore_drop_index_by_name_result result; + try { + result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_index_by_name"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_index_by_name", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), 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; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); + } + + ThriftHiveMetastore_get_index_by_name_result result; + try { + iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_by_name"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + 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); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_indexes", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_indexes"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_indexes"); + } + + ThriftHiveMetastore_get_indexes_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_indexes", bytes); + } + + ThriftHiveMetastore_get_indexes_result result; + try { + iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_indexes"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_indexes"); + } + + oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_index_names", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_names"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_names"); + } + + ThriftHiveMetastore_get_index_names_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_names", bytes); + } + + ThriftHiveMetastore_get_index_names_result result; + try { + iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.__isset.success = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_names"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_names"); + } + + oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_names", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_primary_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_primary_keys", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_primary_keys"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_primary_keys"); + } + + ThriftHiveMetastore_get_primary_keys_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_primary_keys", bytes); + } + + ThriftHiveMetastore_get_primary_keys_result result; + try { + iface_->get_primary_keys(result.success, args.request); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_primary_keys"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_primary_keys", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_primary_keys"); + } + + oprot->writeMessageBegin("get_primary_keys", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_primary_keys", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_foreign_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_foreign_keys", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_foreign_keys"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_foreign_keys"); + } + + ThriftHiveMetastore_get_foreign_keys_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_foreign_keys", bytes); + } + + ThriftHiveMetastore_get_foreign_keys_result result; + try { + iface_->get_foreign_keys(result.success, args.request); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_foreign_keys"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_foreign_keys", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_foreign_keys"); + } + + oprot->writeMessageBegin("get_foreign_keys", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_foreign_keys", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_unique_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_unique_constraints", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_unique_constraints"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_unique_constraints"); + } + + ThriftHiveMetastore_get_unique_constraints_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_unique_constraints", bytes); + } + + ThriftHiveMetastore_get_unique_constraints_result result; + try { + iface_->get_unique_constraints(result.success, args.request); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_unique_constraints"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_unique_constraints", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_unique_constraints"); + } + + oprot->writeMessageBegin("get_unique_constraints", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_unique_constraints", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_not_null_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_not_null_constraints", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_not_null_constraints"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_not_null_constraints"); + } + + ThriftHiveMetastore_get_not_null_constraints_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_not_null_constraints", bytes); + } + + ThriftHiveMetastore_get_not_null_constraints_result result; + try { + iface_->get_not_null_constraints(result.success, args.request); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_not_null_constraints"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_not_null_constraints", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_not_null_constraints"); + } + + oprot->writeMessageBegin("get_not_null_constraints", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_not_null_constraints", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_update_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.update_table_column_statistics", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.update_table_column_statistics"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_table_column_statistics"); + } + + ThriftHiveMetastore_update_table_column_statistics_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); + } + + ThriftHiveMetastore_update_table_column_statistics_result result; + try { + result.success = iface_->update_table_column_statistics(args.stats_obj); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_table_column_statistics"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics"); + } + + oprot->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_update_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.update_partition_column_statistics", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.update_partition_column_statistics"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); + } + + ThriftHiveMetastore_update_partition_column_statistics_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); + } + + ThriftHiveMetastore_update_partition_column_statistics_result result; + try { + result.success = iface_->update_partition_column_statistics(args.stats_obj); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); + } + + oprot->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_column_statistics", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_column_statistics"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_column_statistics"); + } + + ThriftHiveMetastore_get_table_column_statistics_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); + } + + ThriftHiveMetastore_get_table_column_statistics_result result; + try { + iface_->get_table_column_statistics(result.success, args.db_name, args.tbl_name, args.col_name); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (InvalidInputException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_column_statistics"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics"); + } + + oprot->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partition_column_statistics", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_column_statistics"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); + } + + ThriftHiveMetastore_get_partition_column_statistics_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); + } + + ThriftHiveMetastore_get_partition_column_statistics_result result; + try { + iface_->get_partition_column_statistics(result.success, args.db_name, args.tbl_name, args.part_name, args.col_name); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (InvalidInputException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); + } + + oprot->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_table_statistics_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_table_statistics_req", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_statistics_req"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_statistics_req"); + } + + ThriftHiveMetastore_get_table_statistics_req_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_statistics_req", bytes); + } + + ThriftHiveMetastore_get_table_statistics_req_result result; + try { + iface_->get_table_statistics_req(result.success, args.request); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_statistics_req"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table_statistics_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_statistics_req"); + } + + oprot->writeMessageBegin("get_table_statistics_req", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_statistics_req", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_partitions_statistics_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_partitions_statistics_req", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_statistics_req"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_statistics_req"); + } + + ThriftHiveMetastore_get_partitions_statistics_req_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_statistics_req", bytes); + } + + ThriftHiveMetastore_get_partitions_statistics_req_result result; + try { + iface_->get_partitions_statistics_req(result.success, args.request); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_statistics_req"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions_statistics_req", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_statistics_req"); + } + + oprot->writeMessageBegin("get_partitions_statistics_req", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_statistics_req", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_aggr_stats_for(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_aggr_stats_for", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_aggr_stats_for"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_aggr_stats_for"); + } + + ThriftHiveMetastore_get_aggr_stats_for_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_aggr_stats_for", bytes); + } + + ThriftHiveMetastore_get_aggr_stats_for_result result; + try { + iface_->get_aggr_stats_for(result.success, args.request); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_aggr_stats_for"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_aggr_stats_for", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_aggr_stats_for"); + } + + oprot->writeMessageBegin("get_aggr_stats_for", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_aggr_stats_for", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_set_aggr_stats_for(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.set_aggr_stats_for", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.set_aggr_stats_for"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.set_aggr_stats_for"); + } + + ThriftHiveMetastore_set_aggr_stats_for_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.set_aggr_stats_for", bytes); + } + + ThriftHiveMetastore_set_aggr_stats_for_result result; + try { + result.success = iface_->set_aggr_stats_for(args.request); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.set_aggr_stats_for"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("set_aggr_stats_for", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.set_aggr_stats_for"); + } + + oprot->writeMessageBegin("set_aggr_stats_for", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.set_aggr_stats_for", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_delete_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.delete_partition_column_statistics", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); + } + + ThriftHiveMetastore_delete_partition_column_statistics_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); + } + + ThriftHiveMetastore_delete_partition_column_statistics_result result; + try { + result.success = iface_->delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (InvalidObjectException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); + } + + oprot->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_delete_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.delete_table_column_statistics", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_table_column_statistics"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); + } + + ThriftHiveMetastore_delete_table_column_statistics_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); + } + + ThriftHiveMetastore_delete_table_column_statistics_result result; + try { + result.success = iface_->delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (InvalidObjectException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); + } + + oprot->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_create_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_function", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_function"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_function"); + } + + ThriftHiveMetastore_create_function_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_function", bytes); + } + + ThriftHiveMetastore_create_function_result result; + try { + iface_->create_function(args.func); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (NoSuchObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_function"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_function", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_function"); + } + + oprot->writeMessageBegin("create_function", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_function", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_drop_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_function", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_function"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_function"); + } + + ThriftHiveMetastore_drop_function_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_function", bytes); + } + + ThriftHiveMetastore_drop_function_result result; + try { + iface_->drop_function(args.dbName, args.funcName); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_function"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_function", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_function"); + } + + oprot->writeMessageBegin("drop_function", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_function", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_alter_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.alter_function", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_function"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_function"); + } + + ThriftHiveMetastore_alter_function_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_function", bytes); + } + + ThriftHiveMetastore_alter_function_result result; + try { + iface_->alter_function(args.dbName, args.funcName, args.newFunc); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_function"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_function", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_function"); + } + + oprot->writeMessageBegin("alter_function", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_function", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_functions", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_functions"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_functions"); + } + + ThriftHiveMetastore_get_functions_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_functions", bytes); + } + + ThriftHiveMetastore_get_functions_result result; + try { + iface_->get_functions(result.success, args.dbName, args.pattern); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_functions"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_functions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_functions"); + } + + oprot->writeMessageBegin("get_functions", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_functions", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_function", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_function"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_function"); + } + + ThriftHiveMetastore_get_function_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_function", bytes); + } + + ThriftHiveMetastore_get_function_result result; + try { + iface_->get_function(result.success, args.dbName, args.funcName); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_function"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_function", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_function"); + } + + oprot->writeMessageBegin("get_function", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_function", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_all_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_functions", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_functions"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_functions"); + } + + ThriftHiveMetastore_get_all_functions_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_functions", bytes); + } + + ThriftHiveMetastore_get_all_functions_result result; + try { + iface_->get_all_functions(result.success); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_functions"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_all_functions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_functions"); + } + + oprot->writeMessageBegin("get_all_functions", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_functions", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.create_role", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.create_role"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_role"); + } + + ThriftHiveMetastore_create_role_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_role", bytes); + } + + ThriftHiveMetastore_create_role_result result; + try { + result.success = iface_->create_role(args.role); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_role"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_role"); + } + + oprot->writeMessageBegin("create_role", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.drop_role", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_role"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_role"); + } + + ThriftHiveMetastore_drop_role_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_role", bytes); + } + + ThriftHiveMetastore_drop_role_result result; + try { + result.success = iface_->drop_role(args.role_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_role"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_role"); + } + + oprot->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_role_names", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_role_names"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_role_names"); + } + + ThriftHiveMetastore_get_role_names_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_role_names", bytes); + } + + ThriftHiveMetastore_get_role_names_result result; + try { + iface_->get_role_names(result.success); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_role_names"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_role_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_role_names"); + } + + oprot->writeMessageBegin("get_role_names", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_role", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_role"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_role"); + } + + ThriftHiveMetastore_grant_role_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_role", bytes); + } + + ThriftHiveMetastore_grant_role_result result; + try { + result.success = iface_->grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_role"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_role"); + } + + oprot->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.revoke_role", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.revoke_role"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.revoke_role"); + } + + ThriftHiveMetastore_revoke_role_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.revoke_role", bytes); + } + + ThriftHiveMetastore_revoke_role_result result; + try { + result.success = iface_->revoke_role(args.role_name, args.principal_name, args.principal_type); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.revoke_role"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.revoke_role"); + } + + oprot->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.list_roles", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.list_roles"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.list_roles"); + } + + ThriftHiveMetastore_list_roles_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.list_roles", bytes); + } + + ThriftHiveMetastore_list_roles_result result; + try { + iface_->list_roles(result.success, args.principal_name, args.principal_type); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.list_roles"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.list_roles"); + } + + oprot->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.list_roles", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_grant_revoke_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_revoke_role", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_revoke_role"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_revoke_role"); + } + + ThriftHiveMetastore_grant_revoke_role_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_revoke_role", bytes); + } + + ThriftHiveMetastore_grant_revoke_role_result result; + try { + iface_->grant_revoke_role(result.success, args.request); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_revoke_role"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("grant_revoke_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_revoke_role"); + } + + oprot->writeMessageBegin("grant_revoke_role", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_revoke_role", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_principals_in_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_principals_in_role", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_principals_in_role"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_principals_in_role"); + } + + ThriftHiveMetastore_get_principals_in_role_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_principals_in_role", bytes); + } + + ThriftHiveMetastore_get_principals_in_role_result result; + try { + iface_->get_principals_in_role(result.success, args.request); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_principals_in_role"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_principals_in_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_principals_in_role"); + } + + oprot->writeMessageBegin("get_principals_in_role", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_principals_in_role", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_role_grants_for_principal(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_role_grants_for_principal", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_role_grants_for_principal"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_role_grants_for_principal"); + } + + ThriftHiveMetastore_get_role_grants_for_principal_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_role_grants_for_principal", bytes); + } + + ThriftHiveMetastore_get_role_grants_for_principal_result result; + try { + iface_->get_role_grants_for_principal(result.success, args.request); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_role_grants_for_principal"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_role_grants_for_principal", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_role_grants_for_principal"); + } + + oprot->writeMessageBegin("get_role_grants_for_principal", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_role_grants_for_principal", 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_privilege_set", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_privilege_set"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_privilege_set"); + } + + ThriftHiveMetastore_get_privilege_set_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_privilege_set", bytes); + } + + ThriftHiveMetastore_get_privilege_set_result result; + try { + iface_->get_privilege_set(result.success, args.hiveObject, args.user_name, args.group_names); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_privilege_set"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_privilege_set"); + } + + oprot->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.list_privileges", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.list_privileges"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.list_privileges"); + } + + ThriftHiveMetastore_list_privileges_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.list_privileges", bytes); + } + + ThriftHiveMetastore_list_privileges_result result; + try { + iface_->list_privileges(result.success, args.principal_name, args.principal_type, args.hiveObject); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.list_privileges"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.list_privileges"); + } + + oprot->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_privileges", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_privileges"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_privileges"); + } + + ThriftHiveMetastore_grant_privileges_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_privileges", bytes); + } + + ThriftHiveMetastore_grant_privileges_result result; + try { + result.success = iface_->grant_privileges(args.privileges); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_privileges"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_privileges"); + } + + oprot->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.revoke_privileges", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.revoke_privileges"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.revoke_privileges"); + } + + ThriftHiveMetastore_revoke_privileges_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.revoke_privileges", bytes); + } + + ThriftHiveMetastore_revoke_privileges_result result; + try { + result.success = iface_->revoke_privileges(args.privileges); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.revoke_privileges"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.revoke_privileges"); + } + + oprot->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.revoke_privileges", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_grant_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.grant_revoke_privileges", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.grant_revoke_privileges"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.grant_revoke_privileges"); + } + + ThriftHiveMetastore_grant_revoke_privileges_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.grant_revoke_privileges", bytes); + } + + ThriftHiveMetastore_grant_revoke_privileges_result result; + try { + iface_->grant_revoke_privileges(result.success, args.request); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.grant_revoke_privileges"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("grant_revoke_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.grant_revoke_privileges"); + } + + oprot->writeMessageBegin("grant_revoke_privileges", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.grant_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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.set_ugi", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.set_ugi"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.set_ugi"); + } + + ThriftHiveMetastore_set_ugi_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.set_ugi", bytes); + } + + ThriftHiveMetastore_set_ugi_result result; + try { + iface_->set_ugi(result.success, args.user_name, args.group_names); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.set_ugi"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("set_ugi", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.set_ugi"); + } + + oprot->writeMessageBegin("set_ugi", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_delegation_token", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_delegation_token"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_delegation_token"); + } + + ThriftHiveMetastore_get_delegation_token_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_delegation_token", bytes); + } + + ThriftHiveMetastore_get_delegation_token_result result; + try { + iface_->get_delegation_token(result.success, args.token_owner, args.renewer_kerberos_principal_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_delegation_token"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_delegation_token"); + } + + oprot->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.renew_delegation_token", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.renew_delegation_token"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.renew_delegation_token"); + } + + ThriftHiveMetastore_renew_delegation_token_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.renew_delegation_token", bytes); + } + + ThriftHiveMetastore_renew_delegation_token_result result; + try { + result.success = iface_->renew_delegation_token(args.token_str_form); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.renew_delegation_token"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.renew_delegation_token"); + } + + oprot->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + 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 (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.cancel_delegation_token", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.cancel_delegation_token"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.cancel_delegation_token"); + } + + ThriftHiveMetastore_cancel_delegation_token_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.cancel_delegation_token", bytes); + } + + ThriftHiveMetastore_cancel_delegation_token_result result; + try { + iface_->cancel_delegation_token(args.token_str_form); + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.cancel_delegation_token"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.cancel_delegation_token"); + } + + oprot->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.cancel_delegation_token", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_add_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_token", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_token"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_token"); + } + + ThriftHiveMetastore_add_token_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_token", bytes); + } + + ThriftHiveMetastore_add_token_result result; + try { + result.success = iface_->add_token(args.token_identifier, args.delegation_token); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_token"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_token", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_token"); + } + + oprot->writeMessageBegin("add_token", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_token", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_remove_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.remove_token", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.remove_token"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.remove_token"); + } + + ThriftHiveMetastore_remove_token_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.remove_token", bytes); + } + + ThriftHiveMetastore_remove_token_result result; + try { + result.success = iface_->remove_token(args.token_identifier); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.remove_token"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("remove_token", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.remove_token"); + } + + oprot->writeMessageBegin("remove_token", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.remove_token", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_token", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_token"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_token"); + } + + ThriftHiveMetastore_get_token_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_token", bytes); + } + + ThriftHiveMetastore_get_token_result result; + try { + iface_->get_token(result.success, args.token_identifier); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_token"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_token", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_token"); + } + + oprot->writeMessageBegin("get_token", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_token", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_all_token_identifiers(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_all_token_identifiers", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_token_identifiers"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_token_identifiers"); + } + + ThriftHiveMetastore_get_all_token_identifiers_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_token_identifiers", bytes); + } + + ThriftHiveMetastore_get_all_token_identifiers_result result; + try { + iface_->get_all_token_identifiers(result.success); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_token_identifiers"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_all_token_identifiers", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_token_identifiers"); + } + + oprot->writeMessageBegin("get_all_token_identifiers", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_token_identifiers", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_add_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_master_key", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_master_key"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_master_key"); + } + + ThriftHiveMetastore_add_master_key_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_master_key", bytes); + } + + ThriftHiveMetastore_add_master_key_result result; + try { + result.success = iface_->add_master_key(args.key); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_master_key"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_master_key", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_master_key"); + } + + oprot->writeMessageBegin("add_master_key", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_master_key", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_update_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.update_master_key", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.update_master_key"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_master_key"); + } + + ThriftHiveMetastore_update_master_key_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_master_key", bytes); + } + + ThriftHiveMetastore_update_master_key_result result; + try { + iface_->update_master_key(args.seq_number, args.key); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_master_key"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("update_master_key", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_master_key"); + } + + oprot->writeMessageBegin("update_master_key", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_master_key", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_remove_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.remove_master_key", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.remove_master_key"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.remove_master_key"); + } + + ThriftHiveMetastore_remove_master_key_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.remove_master_key", bytes); + } + + ThriftHiveMetastore_remove_master_key_result result; + try { + result.success = iface_->remove_master_key(args.key_seq); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.remove_master_key"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("remove_master_key", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.remove_master_key"); + } + + oprot->writeMessageBegin("remove_master_key", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.remove_master_key", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_master_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_master_keys", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_master_keys"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_master_keys"); + } + + ThriftHiveMetastore_get_master_keys_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_master_keys", bytes); + } + + ThriftHiveMetastore_get_master_keys_result result; + try { + iface_->get_master_keys(result.success); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_master_keys"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_master_keys", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_master_keys"); + } + + oprot->writeMessageBegin("get_master_keys", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_master_keys", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_open_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_open_txns", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_open_txns"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_open_txns"); + } + + ThriftHiveMetastore_get_open_txns_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_open_txns", bytes); + } + + ThriftHiveMetastore_get_open_txns_result result; + try { + iface_->get_open_txns(result.success); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_open_txns"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_open_txns", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_open_txns"); + } + + oprot->writeMessageBegin("get_open_txns", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_open_txns", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_open_txns_info(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_open_txns_info", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_open_txns_info"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_open_txns_info"); + } + + ThriftHiveMetastore_get_open_txns_info_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_open_txns_info", bytes); + } + + ThriftHiveMetastore_get_open_txns_info_result result; + try { + iface_->get_open_txns_info(result.success); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_open_txns_info"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_open_txns_info", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_open_txns_info"); + } + + oprot->writeMessageBegin("get_open_txns_info", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_open_txns_info", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_open_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.open_txns", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.open_txns"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.open_txns"); + } + + ThriftHiveMetastore_open_txns_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.open_txns", bytes); + } + + ThriftHiveMetastore_open_txns_result result; + try { + iface_->open_txns(result.success, args.rqst); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.open_txns"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("open_txns", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.open_txns"); + } + + oprot->writeMessageBegin("open_txns", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.open_txns", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_abort_txn(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.abort_txn", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.abort_txn"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.abort_txn"); + } + + ThriftHiveMetastore_abort_txn_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.abort_txn", bytes); + } + + ThriftHiveMetastore_abort_txn_result result; + try { + iface_->abort_txn(args.rqst); + } catch (NoSuchTxnException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.abort_txn"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("abort_txn", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.abort_txn"); + } + + oprot->writeMessageBegin("abort_txn", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.abort_txn", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_abort_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.abort_txns", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.abort_txns"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.abort_txns"); + } + + ThriftHiveMetastore_abort_txns_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.abort_txns", bytes); + } + + ThriftHiveMetastore_abort_txns_result result; + try { + iface_->abort_txns(args.rqst); + } catch (NoSuchTxnException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.abort_txns"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("abort_txns", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.abort_txns"); + } + + oprot->writeMessageBegin("abort_txns", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.abort_txns", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_commit_txn(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.commit_txn", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.commit_txn"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.commit_txn"); + } + + ThriftHiveMetastore_commit_txn_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.commit_txn", bytes); + } + + ThriftHiveMetastore_commit_txn_result result; + try { + iface_->commit_txn(args.rqst); + } catch (NoSuchTxnException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (TxnAbortedException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.commit_txn"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("commit_txn", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.commit_txn"); + } + + oprot->writeMessageBegin("commit_txn", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.commit_txn", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_lock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.lock", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.lock"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.lock"); + } + + ThriftHiveMetastore_lock_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.lock", bytes); + } + + ThriftHiveMetastore_lock_result result; + try { + iface_->lock(result.success, args.rqst); + result.__isset.success = true; + } catch (NoSuchTxnException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (TxnAbortedException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.lock"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("lock", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.lock"); + } + + oprot->writeMessageBegin("lock", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.lock", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_check_lock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.check_lock", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.check_lock"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.check_lock"); + } + + ThriftHiveMetastore_check_lock_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.check_lock", bytes); + } + + ThriftHiveMetastore_check_lock_result result; + try { + iface_->check_lock(result.success, args.rqst); + result.__isset.success = true; + } catch (NoSuchTxnException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (TxnAbortedException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (NoSuchLockException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.check_lock"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("check_lock", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.check_lock"); + } + + oprot->writeMessageBegin("check_lock", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.check_lock", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_unlock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.unlock", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.unlock"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.unlock"); + } + + ThriftHiveMetastore_unlock_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.unlock", bytes); + } + + ThriftHiveMetastore_unlock_result result; + try { + iface_->unlock(args.rqst); + } catch (NoSuchLockException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (TxnOpenException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.unlock"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("unlock", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.unlock"); + } + + oprot->writeMessageBegin("unlock", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.unlock", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_show_locks(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.show_locks", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.show_locks"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.show_locks"); + } + + ThriftHiveMetastore_show_locks_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.show_locks", bytes); + } + + ThriftHiveMetastore_show_locks_result result; + try { + iface_->show_locks(result.success, args.rqst); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.show_locks"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("show_locks", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.show_locks"); + } + + oprot->writeMessageBegin("show_locks", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.show_locks", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_heartbeat(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.heartbeat", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.heartbeat"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.heartbeat"); + } + + ThriftHiveMetastore_heartbeat_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.heartbeat", bytes); + } + + ThriftHiveMetastore_heartbeat_result result; + try { + iface_->heartbeat(args.ids); + } catch (NoSuchLockException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchTxnException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (TxnAbortedException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.heartbeat"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("heartbeat", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.heartbeat"); + } + + oprot->writeMessageBegin("heartbeat", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.heartbeat", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_heartbeat_txn_range(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.heartbeat_txn_range", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.heartbeat_txn_range"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.heartbeat_txn_range"); + } + + ThriftHiveMetastore_heartbeat_txn_range_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.heartbeat_txn_range", bytes); + } + + ThriftHiveMetastore_heartbeat_txn_range_result result; + try { + iface_->heartbeat_txn_range(result.success, args.txns); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.heartbeat_txn_range"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("heartbeat_txn_range", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.heartbeat_txn_range"); + } + + oprot->writeMessageBegin("heartbeat_txn_range", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.heartbeat_txn_range", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_compact(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.compact", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.compact"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.compact"); + } + + ThriftHiveMetastore_compact_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.compact", bytes); + } + + ThriftHiveMetastore_compact_result result; + try { + iface_->compact(args.rqst); + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.compact"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("compact", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.compact"); + } + + oprot->writeMessageBegin("compact", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.compact", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_compact2(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.compact2", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.compact2"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.compact2"); + } + + ThriftHiveMetastore_compact2_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.compact2", bytes); + } + + ThriftHiveMetastore_compact2_result result; + try { + iface_->compact2(result.success, args.rqst); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.compact2"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("compact2", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.compact2"); + } + + oprot->writeMessageBegin("compact2", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.compact2", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_show_compact(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.show_compact", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.show_compact"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.show_compact"); + } + + ThriftHiveMetastore_show_compact_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.show_compact", bytes); + } + + ThriftHiveMetastore_show_compact_result result; + try { + iface_->show_compact(result.success, args.rqst); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.show_compact"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("show_compact", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.show_compact"); + } + + oprot->writeMessageBegin("show_compact", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.show_compact", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_add_dynamic_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.add_dynamic_partitions", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.add_dynamic_partitions"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_dynamic_partitions"); + } + + ThriftHiveMetastore_add_dynamic_partitions_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_dynamic_partitions", bytes); + } + + ThriftHiveMetastore_add_dynamic_partitions_result result; + try { + iface_->add_dynamic_partitions(args.rqst); + } catch (NoSuchTxnException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (TxnAbortedException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_dynamic_partitions"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_dynamic_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_dynamic_partitions"); + } + + oprot->writeMessageBegin("add_dynamic_partitions", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_dynamic_partitions", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_next_notification(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_next_notification", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_next_notification"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_next_notification"); + } + + ThriftHiveMetastore_get_next_notification_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_next_notification", bytes); + } + + ThriftHiveMetastore_get_next_notification_result result; + try { + iface_->get_next_notification(result.success, args.rqst); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_next_notification"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_next_notification", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_next_notification"); + } + + oprot->writeMessageBegin("get_next_notification", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_next_notification", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_current_notificationEventId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_current_notificationEventId", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_current_notificationEventId"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_current_notificationEventId"); + } + + ThriftHiveMetastore_get_current_notificationEventId_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_current_notificationEventId", bytes); + } + + ThriftHiveMetastore_get_current_notificationEventId_result result; + try { + iface_->get_current_notificationEventId(result.success); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_current_notificationEventId"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_current_notificationEventId", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_current_notificationEventId"); + } + + oprot->writeMessageBegin("get_current_notificationEventId", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_current_notificationEventId", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_fire_listener_event(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.fire_listener_event", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.fire_listener_event"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.fire_listener_event"); + } + + ThriftHiveMetastore_fire_listener_event_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.fire_listener_event", bytes); + } + + ThriftHiveMetastore_fire_listener_event_result result; + try { + iface_->fire_listener_event(result.success, args.rqst); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.fire_listener_event"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("fire_listener_event", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.fire_listener_event"); + } + + oprot->writeMessageBegin("fire_listener_event", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.fire_listener_event", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_flushCache(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.flushCache", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.flushCache"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.flushCache"); + } + + ThriftHiveMetastore_flushCache_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.flushCache", bytes); + } + + ThriftHiveMetastore_flushCache_result result; + try { + iface_->flushCache(); + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.flushCache"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("flushCache", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.flushCache"); + } + + oprot->writeMessageBegin("flushCache", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.flushCache", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_cm_recycle(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.cm_recycle", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.cm_recycle"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.cm_recycle"); + } + + ThriftHiveMetastore_cm_recycle_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.cm_recycle", bytes); + } + + ThriftHiveMetastore_cm_recycle_result result; + try { + iface_->cm_recycle(result.success, args.request); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.cm_recycle"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("cm_recycle", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.cm_recycle"); + } + + oprot->writeMessageBegin("cm_recycle", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.cm_recycle", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_file_metadata_by_expr(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_file_metadata_by_expr", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_file_metadata_by_expr"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_file_metadata_by_expr"); + } + + ThriftHiveMetastore_get_file_metadata_by_expr_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_file_metadata_by_expr", bytes); + } + + ThriftHiveMetastore_get_file_metadata_by_expr_result result; + try { + iface_->get_file_metadata_by_expr(result.success, args.req); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_file_metadata_by_expr"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_file_metadata_by_expr", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_file_metadata_by_expr"); + } + + oprot->writeMessageBegin("get_file_metadata_by_expr", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_file_metadata_by_expr", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_file_metadata", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_file_metadata"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_file_metadata"); + } + + ThriftHiveMetastore_get_file_metadata_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_file_metadata", bytes); + } + + ThriftHiveMetastore_get_file_metadata_result result; + try { + iface_->get_file_metadata(result.success, args.req); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_file_metadata"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_file_metadata", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_file_metadata"); + } + + oprot->writeMessageBegin("get_file_metadata", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_file_metadata", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_put_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.put_file_metadata", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.put_file_metadata"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.put_file_metadata"); + } + + ThriftHiveMetastore_put_file_metadata_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.put_file_metadata", bytes); + } + + ThriftHiveMetastore_put_file_metadata_result result; + try { + iface_->put_file_metadata(result.success, args.req); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.put_file_metadata"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("put_file_metadata", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.put_file_metadata"); + } + + oprot->writeMessageBegin("put_file_metadata", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.put_file_metadata", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_clear_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.clear_file_metadata", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.clear_file_metadata"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.clear_file_metadata"); + } + + ThriftHiveMetastore_clear_file_metadata_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.clear_file_metadata", bytes); + } + + ThriftHiveMetastore_clear_file_metadata_result result; + try { + iface_->clear_file_metadata(result.success, args.req); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.clear_file_metadata"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("clear_file_metadata", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.clear_file_metadata"); + } + + oprot->writeMessageBegin("clear_file_metadata", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.clear_file_metadata", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_cache_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.cache_file_metadata", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.cache_file_metadata"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.cache_file_metadata"); + } + + ThriftHiveMetastore_cache_file_metadata_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.cache_file_metadata", bytes); + } + + ThriftHiveMetastore_cache_file_metadata_result result; + try { + iface_->cache_file_metadata(result.success, args.req); + result.__isset.success = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.cache_file_metadata"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("cache_file_metadata", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.cache_file_metadata"); + } + + oprot->writeMessageBegin("cache_file_metadata", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.cache_file_metadata", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_metastore_db_uuid(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("ThriftHiveMetastore.get_metastore_db_uuid", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ThriftHiveMetastore.get_metastore_db_uuid"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_metastore_db_uuid"); + } + + ThriftHiveMetastore_get_metastore_db_uuid_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_metastore_db_uuid", bytes); + } + + ThriftHiveMetastore_get_metastore_db_uuid_result result; + try { + iface_->get_metastore_db_uuid(result.success); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_metastore_db_uuid"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_metastore_db_uuid", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_metastore_db_uuid"); + } + + oprot->writeMessageBegin("get_metastore_db_uuid", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_metastore_db_uuid", 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; +} + +void ThriftHiveMetastoreConcurrentClient::getMetaConf(std::string& _return, const std::string& key) +{ + int32_t seqid = send_getMetaConf(key); + recv_getMetaConf(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_getMetaConf(const std::string& key) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("getMetaConf", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_getMetaConf_pargs args; + args.key = &key; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_getMetaConf(std::string& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getMetaConf") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_getMetaConf_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getMetaConf failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::setMetaConf(const std::string& key, const std::string& value) +{ + int32_t seqid = send_setMetaConf(key, value); + recv_setMetaConf(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_setMetaConf(const std::string& key, const std::string& value) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("setMetaConf", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_setMetaConf_pargs args; + args.key = &key; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_setMetaConf(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("setMetaConf") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_setMetaConf_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::create_database(const Database& database) +{ + int32_t seqid = send_create_database(database); + recv_create_database(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_create_database(const Database& database) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_database_pargs args; + args.database = &database; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_create_database(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_create_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_database(Database& _return, const std::string& name) +{ + int32_t seqid = send_get_database(name); + recv_get_database(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_database(const std::string& name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_database_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_database(Database& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_database_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::drop_database(const std::string& name, const bool deleteData, const bool cascade) +{ + int32_t seqid = send_drop_database(name, deleteData, cascade); + recv_drop_database(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_database(const std::string& name, const bool deleteData, const bool cascade) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_database_pargs args; + args.name = &name; + args.deleteData = &deleteData; + args.cascade = &cascade; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_drop_database(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_drop_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_databases(std::vector & _return, const std::string& pattern) +{ + int32_t seqid = send_get_databases(pattern); + recv_get_databases(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_databases(const std::string& pattern) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_databases_pargs args; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_databases(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_databases") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_databases_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_all_databases(std::vector & _return) +{ + int32_t seqid = send_get_all_databases(); + recv_get_all_databases(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_all_databases() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_databases_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_all_databases(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_all_databases") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_all_databases_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::alter_database(const std::string& dbname, const Database& db) +{ + int32_t seqid = send_alter_database(dbname, db); + recv_alter_database(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_alter_database(const std::string& dbname, const Database& db) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_database_pargs args; + args.dbname = &dbname; + args.db = &db; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_alter_database(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_alter_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_type(Type& _return, const std::string& name) +{ + int32_t seqid = send_get_type(name); + recv_get_type(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_type(const std::string& name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_type_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_type(Type& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::create_type(const Type& type) +{ + int32_t seqid = send_create_type(type); + return recv_create_type(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_create_type(const Type& type) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_type_pargs args; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_create_type(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_create_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::drop_type(const std::string& type) +{ + int32_t seqid = send_drop_type(type); + return recv_drop_type(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_type(const std::string& type) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_type_pargs args; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_drop_type(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_drop_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_type_all(std::map & _return, const std::string& name) +{ + int32_t seqid = send_get_type_all(name); + recv_get_type_all(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_type_all(const std::string& name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_type_all_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_type_all(std::map & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_type_all") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_type_all_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) +{ + int32_t seqid = send_get_fields(db_name, table_name); + recv_get_fields(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_fields(const std::string& db_name, const std::string& table_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_fields_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_fields(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_fields") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_fields_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) +{ + int32_t seqid = send_get_fields_with_environment_context(db_name, table_name, environment_context); + recv_get_fields_with_environment_context(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_fields_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_fields_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_fields_with_environment_context_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_fields_with_environment_context(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_fields_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_fields_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields_with_environment_context failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) +{ + int32_t seqid = send_get_schema(db_name, table_name); + recv_get_schema(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_schema(const std::string& db_name, const std::string& table_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_schema_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_schema(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_schema") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_schema_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) +{ + int32_t seqid = send_get_schema_with_environment_context(db_name, table_name, environment_context); + recv_get_schema_with_environment_context(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_schema_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_schema_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_schema_with_environment_context_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_schema_with_environment_context(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_schema_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_schema_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema_with_environment_context failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::create_table(const Table& tbl) +{ + int32_t seqid = send_create_table(tbl); + recv_create_table(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_create_table(const Table& tbl) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_table_pargs args; + args.tbl = &tbl; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_create_table(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_create_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) +{ + int32_t seqid = send_create_table_with_environment_context(tbl, environment_context); + recv_create_table_with_environment_context(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_table_with_environment_context_pargs args; + args.tbl = &tbl; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_create_table_with_environment_context(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_table_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_create_table_with_environment_context_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) +{ + int32_t seqid = send_create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints); + recv_create_table_with_constraints(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("create_table_with_constraints", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_table_with_constraints_pargs args; + args.tbl = &tbl; + args.primaryKeys = &primaryKeys; + args.foreignKeys = &foreignKeys; + args.uniqueConstraints = &uniqueConstraints; + args.notNullConstraints = ¬NullConstraints; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_create_table_with_constraints(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_table_with_constraints") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_create_table_with_constraints_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::drop_constraint(const DropConstraintRequest& req) +{ + int32_t seqid = send_drop_constraint(req); + recv_drop_constraint(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_constraint(const DropConstraintRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_constraint", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_constraint_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_drop_constraint(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_constraint") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_drop_constraint_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::add_primary_key(const AddPrimaryKeyRequest& req) +{ + int32_t seqid = send_add_primary_key(req); + recv_add_primary_key(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_primary_key(const AddPrimaryKeyRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_primary_key", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_primary_key_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_add_primary_key(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_primary_key") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_add_primary_key_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::add_foreign_key(const AddForeignKeyRequest& req) +{ + int32_t seqid = send_add_foreign_key(req); + recv_add_foreign_key(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_foreign_key(const AddForeignKeyRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_foreign_key", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_foreign_key_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_add_foreign_key(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_foreign_key") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_add_foreign_key_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::add_unique_constraint(const AddUniqueConstraintRequest& req) +{ + int32_t seqid = send_add_unique_constraint(req); + recv_add_unique_constraint(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_unique_constraint(const AddUniqueConstraintRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_unique_constraint", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_unique_constraint_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_add_unique_constraint(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_unique_constraint") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_add_unique_constraint_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::add_not_null_constraint(const AddNotNullConstraintRequest& req) +{ + int32_t seqid = send_add_not_null_constraint(req); + recv_add_not_null_constraint(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_not_null_constraint(const AddNotNullConstraintRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_not_null_constraint", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_not_null_constraint_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_add_not_null_constraint(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_not_null_constraint") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_add_not_null_constraint_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +{ + int32_t seqid = send_drop_table(dbname, name, deleteData); + recv_drop_table(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_table_pargs args; + args.dbname = &dbname; + args.name = &name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_drop_table(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_drop_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) +{ + int32_t seqid = send_drop_table_with_environment_context(dbname, name, deleteData, environment_context); + recv_drop_table_with_environment_context(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_table_with_environment_context_pargs args; + args.dbname = &dbname; + args.name = &name; + args.deleteData = &deleteData; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_drop_table_with_environment_context(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_table_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_drop_table_with_environment_context_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) +{ + int32_t seqid = send_truncate_table(dbName, tableName, partNames); + recv_truncate_table(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("truncate_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_truncate_table_pargs args; + args.dbName = &dbName; + args.tableName = &tableName; + args.partNames = &partNames; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_truncate_table(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("truncate_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_truncate_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) +{ + int32_t seqid = send_get_tables(db_name, pattern); + recv_get_tables(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_tables(const std::string& db_name, const std::string& pattern) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_tables_pargs args; + args.db_name = &db_name; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_tables(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_tables") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_tables_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType) +{ + int32_t seqid = send_get_tables_by_type(db_name, pattern, tableType); + recv_get_tables_by_type(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_tables_by_type(const std::string& db_name, const std::string& pattern, const std::string& tableType) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_tables_by_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_tables_by_type_pargs args; + args.db_name = &db_name; + args.pattern = &pattern; + args.tableType = &tableType; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_tables_by_type(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_tables_by_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_tables_by_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables_by_type failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) +{ + int32_t seqid = send_get_table_meta(db_patterns, tbl_patterns, tbl_types); + recv_get_table_meta(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_meta(const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_table_meta", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_meta_pargs args; + args.db_patterns = &db_patterns; + args.tbl_patterns = &tbl_patterns; + args.tbl_types = &tbl_types; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_table_meta(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_meta") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_table_meta_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_meta failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_all_tables(std::vector & _return, const std::string& db_name) +{ + int32_t seqid = send_get_all_tables(db_name); + recv_get_all_tables(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_all_tables(const std::string& db_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_tables_pargs args; + args.db_name = &db_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_all_tables(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_all_tables") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_all_tables_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) +{ + int32_t seqid = send_get_table(dbname, tbl_name); + recv_get_table(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_table(const std::string& dbname, const std::string& tbl_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_table(Table& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_table_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names) +{ + int32_t seqid = send_get_table_objects_by_name(dbname, tbl_names); + recv_get_table_objects_by_name(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_objects_by_name_pargs args; + args.dbname = &dbname; + args.tbl_names = &tbl_names; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_table_objects_by_name(std::vector
& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_objects_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_table_objects_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_table_req(GetTableResult& _return, const GetTableRequest& req) +{ + int32_t seqid = send_get_table_req(req); + recv_get_table_req(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_req(const GetTableRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_table_req", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_req_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_table_req(GetTableResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_req") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_table_req_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_req failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req) +{ + int32_t seqid = send_get_table_objects_by_name_req(req); + recv_get_table_objects_by_name_req(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_objects_by_name_req(const GetTablesRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_table_objects_by_name_req", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_objects_by_name_req_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_table_objects_by_name_req(GetTablesResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_objects_by_name_req") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_table_objects_by_name_req_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_objects_by_name_req failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) +{ + int32_t seqid = send_get_table_names_by_filter(dbname, filter, max_tables); + recv_get_table_names_by_filter(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_names_by_filter_pargs args; + args.dbname = &dbname; + args.filter = &filter; + args.max_tables = &max_tables; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_table_names_by_filter(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_names_by_filter") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_table_names_by_filter_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +{ + int32_t seqid = send_alter_table(dbname, tbl_name, new_tbl); + recv_alter_table(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_alter_table(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_alter_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) +{ + int32_t seqid = send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); + recv_alter_table_with_environment_context(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_table_with_environment_context_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_alter_table_with_environment_context(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_table_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_alter_table_with_environment_context_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) +{ + int32_t seqid = send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade); + recv_alter_table_with_cascade(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("alter_table_with_cascade", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_table_with_cascade_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; + args.cascade = &cascade; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_alter_table_with_cascade(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_table_with_cascade") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_alter_table_with_cascade_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::add_partition(Partition& _return, const Partition& new_part) +{ + int32_t seqid = send_add_partition(new_part); + recv_add_partition(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_partition(const Partition& new_part) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partition_pargs args; + args.new_part = &new_part; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_add_partition(Partition& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_add_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) +{ + int32_t seqid = send_add_partition_with_environment_context(new_part, environment_context); + recv_add_partition_with_environment_context(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partition_with_environment_context_pargs args; + args.new_part = &new_part; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_add_partition_with_environment_context(Partition& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_partition_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_add_partition_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition_with_environment_context failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +int32_t ThriftHiveMetastoreConcurrentClient::add_partitions(const std::vector & new_parts) +{ + int32_t seqid = send_add_partitions(new_parts); + return recv_add_partitions(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_partitions(const std::vector & new_parts) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partitions_pargs args; + args.new_parts = &new_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +int32_t ThriftHiveMetastoreConcurrentClient::recv_add_partitions(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_partitions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + int32_t _return; + ThriftHiveMetastore_add_partitions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +int32_t ThriftHiveMetastoreConcurrentClient::add_partitions_pspec(const std::vector & new_parts) +{ + int32_t seqid = send_add_partitions_pspec(new_parts); + return recv_add_partitions_pspec(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_partitions_pspec(const std::vector & new_parts) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_partitions_pspec", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partitions_pspec_pargs args; + args.new_parts = &new_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +int32_t ThriftHiveMetastoreConcurrentClient::recv_add_partitions_pspec(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_partitions_pspec") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + int32_t _return; + ThriftHiveMetastore_add_partitions_pspec_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions_pspec failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + int32_t seqid = send_append_partition(db_name, tbl_name, part_vals); + recv_append_partition(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_append_partition(Partition& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("append_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_append_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request) +{ + int32_t seqid = send_add_partitions_req(request); + recv_add_partitions_req(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_partitions_req(const AddPartitionsRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_partitions_req", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partitions_req_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_add_partitions_req(AddPartitionsResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_partitions_req") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_add_partitions_req_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions_req failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) +{ + int32_t seqid = send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context); + recv_append_partition_with_environment_context(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_append_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("append_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_append_partition_with_environment_context(Partition& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("append_partition_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_append_partition_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_with_environment_context failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + int32_t seqid = send_append_partition_by_name(db_name, tbl_name, part_name); + recv_append_partition_by_name(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_append_partition_by_name(Partition& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("append_partition_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_append_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) +{ + int32_t seqid = send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context); + recv_append_partition_by_name_with_environment_context(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_append_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("append_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_append_partition_by_name_with_environment_context(Partition& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("append_partition_by_name_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name_with_environment_context failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +{ + int32_t seqid = send_drop_partition(db_name, tbl_name, part_vals, deleteData); + return recv_drop_partition(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_drop_partition(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_drop_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) +{ + int32_t seqid = send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); + return recv_drop_partition_with_environment_context(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partition_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.deleteData = &deleteData; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_drop_partition_with_environment_context(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_partition_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_drop_partition_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_with_environment_context failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +{ + int32_t seqid = send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + return recv_drop_partition_by_name(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_drop_partition_by_name(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_partition_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_drop_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) +{ + int32_t seqid = send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); + return recv_drop_partition_by_name_with_environment_context(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_partition_by_name_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.deleteData = &deleteData; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_drop_partition_by_name_with_environment_context(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_partition_by_name_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name_with_environment_context failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req) +{ + int32_t seqid = send_drop_partitions_req(req); + recv_drop_partitions_req(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_partitions_req(const DropPartitionsRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_partitions_req", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partitions_req_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_drop_partitions_req(DropPartitionsResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_partitions_req") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_drop_partitions_req_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partitions_req failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + int32_t seqid = send_get_partition(db_name, tbl_name, part_vals); + recv_get_partition(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partition(Partition& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) +{ + int32_t seqid = send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); + recv_exchange_partition(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_exchange_partition(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("exchange_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_exchange_partition_pargs args; + args.partitionSpecs = &partitionSpecs; + args.source_db = &source_db; + args.source_table_name = &source_table_name; + args.dest_db = &dest_db; + args.dest_table_name = &dest_table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_exchange_partition(Partition& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("exchange_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_exchange_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "exchange_partition failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) +{ + int32_t seqid = send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); + recv_exchange_partitions(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_exchange_partitions(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("exchange_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_exchange_partitions_pargs args; + args.partitionSpecs = &partitionSpecs; + args.source_db = &source_db; + args.source_table_name = &source_table_name; + args.dest_db = &dest_db; + args.dest_table_name = &dest_table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_exchange_partitions(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("exchange_partitions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_exchange_partitions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "exchange_partitions failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::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) +{ + int32_t seqid = send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); + recv_get_partition_with_auth(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partition_with_auth(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) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_with_auth_pargs 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; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partition_with_auth(Partition& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partition_with_auth") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partition_with_auth_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_with_auth failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + int32_t seqid = send_get_partition_by_name(db_name, tbl_name, part_name); + recv_get_partition_by_name(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partition_by_name(Partition& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partition_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +{ + int32_t seqid = send_get_partitions(db_name, tbl_name, max_parts); + recv_get_partitions(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partitions(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partitions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::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) +{ + int32_t seqid = send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); + recv_get_partitions_with_auth(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_with_auth(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) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_with_auth_pargs 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; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_with_auth(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_with_auth") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partitions_with_auth_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) +{ + int32_t seqid = send_get_partitions_pspec(db_name, tbl_name, max_parts); + recv_get_partitions_pspec(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_pspec(const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partitions_pspec", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_pspec_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_pspec(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_pspec") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partitions_pspec_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_pspec failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +{ + int32_t seqid = send_get_partition_names(db_name, tbl_name, max_parts); + recv_get_partition_names(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_names_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partition_names(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partition_names") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partition_names_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::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) +{ + int32_t seqid = send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partitions_ps(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_ps_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_ps(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_ps") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partitions_ps_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::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) +{ + int32_t seqid = send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); + recv_get_partitions_ps_with_auth(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_ps_with_auth(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) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_ps_with_auth_pargs 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; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_ps_with_auth(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_ps_with_auth") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partitions_ps_with_auth_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::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) +{ + int32_t seqid = send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partition_names_ps(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_names_ps_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partition_names_ps(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partition_names_ps") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partition_names_ps_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::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) +{ + int32_t seqid = send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); + recv_get_partitions_by_filter(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_by_filter_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.filter = &filter; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_by_filter(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_by_filter") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partitions_by_filter_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) +{ + int32_t seqid = send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts); + recv_get_part_specs_by_filter(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_part_specs_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_part_specs_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_part_specs_by_filter_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.filter = &filter; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_part_specs_by_filter(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_part_specs_by_filter") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_part_specs_by_filter_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_part_specs_by_filter failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req) +{ + int32_t seqid = send_get_partitions_by_expr(req); + recv_get_partitions_by_expr(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_by_expr(const PartitionsByExprRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partitions_by_expr", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_by_expr_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_by_expr(PartitionsByExprResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_by_expr") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partitions_by_expr_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_expr failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +int32_t ThriftHiveMetastoreConcurrentClient::get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) +{ + int32_t seqid = send_get_num_partitions_by_filter(db_name, tbl_name, filter); + return recv_get_num_partitions_by_filter(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_num_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_num_partitions_by_filter_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.filter = &filter; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +int32_t ThriftHiveMetastoreConcurrentClient::recv_get_num_partitions_by_filter(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_num_partitions_by_filter") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + int32_t _return; + ThriftHiveMetastore_get_num_partitions_by_filter_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_num_partitions_by_filter failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) +{ + int32_t seqid = send_get_partitions_by_names(db_name, tbl_name, names); + recv_get_partitions_by_names(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_by_names(const std::string& db_name, const std::string& tbl_name, const std::vector & names) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_by_names_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.names = &names; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_by_names(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_by_names") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partitions_by_names_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_names failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +{ + int32_t seqid = send_alter_partition(db_name, tbl_name, new_part); + recv_alter_partition(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.new_part = &new_part; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_alter_partition(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_alter_partition_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) +{ + int32_t seqid = send_alter_partitions(db_name, tbl_name, new_parts); + recv_alter_partitions(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_partitions_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.new_parts = &new_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_alter_partitions(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_partitions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_alter_partitions_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) +{ + int32_t seqid = send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context); + recv_alter_partitions_with_environment_context(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("alter_partitions_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_partitions_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.new_parts = &new_parts; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_alter_partitions_with_environment_context(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_partitions_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_alter_partitions_with_environment_context_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) +{ + int32_t seqid = send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); + recv_alter_partition_with_environment_context(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_partition_with_environment_context_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.new_part = &new_part; + args.environment_context = &environment_context; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_alter_partition_with_environment_context(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_partition_with_environment_context") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_alter_partition_with_environment_context_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) +{ + int32_t seqid = send_rename_partition(db_name, tbl_name, part_vals, new_part); + recv_rename_partition(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_rename_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.new_part = &new_part; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_rename_partition(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("rename_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_rename_partition_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) +{ + int32_t seqid = send_partition_name_has_valid_characters(part_vals, throw_exception); + return recv_partition_name_has_valid_characters(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("partition_name_has_valid_characters", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_partition_name_has_valid_characters_pargs args; + args.part_vals = &part_vals; + args.throw_exception = &throw_exception; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_partition_name_has_valid_characters(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("partition_name_has_valid_characters") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_partition_name_has_valid_characters_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_has_valid_characters failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) +{ + int32_t seqid = send_get_config_value(name, defaultValue); + recv_get_config_value(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_config_value(const std::string& name, const std::string& defaultValue) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_config_value_pargs args; + args.name = &name; + args.defaultValue = &defaultValue; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_config_value(std::string& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_config_value") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_config_value_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) +{ + int32_t seqid = send_partition_name_to_vals(part_name); + recv_partition_name_to_vals(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_partition_name_to_vals(const std::string& part_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_partition_name_to_vals_pargs args; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_partition_name_to_vals(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("partition_name_to_vals") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_partition_name_to_vals_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::partition_name_to_spec(std::map & _return, const std::string& part_name) +{ + int32_t seqid = send_partition_name_to_spec(part_name); + recv_partition_name_to_spec(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_partition_name_to_spec(const std::string& part_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_partition_name_to_spec_pargs args; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_partition_name_to_spec(std::map & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("partition_name_to_spec") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_partition_name_to_spec_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +{ + int32_t seqid = send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); + recv_markPartitionForEvent(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_markPartitionForEvent_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.eventType = &eventType; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_markPartitionForEvent(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("markPartitionForEvent") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_markPartitionForEvent_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + if (result.__isset.o5) { + sentry.commit(); + throw result.o5; + } + if (result.__isset.o6) { + sentry.commit(); + throw result.o6; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +{ + int32_t seqid = send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); + return recv_isPartitionMarkedForEvent(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_isPartitionMarkedForEvent_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.eventType = &eventType; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_isPartitionMarkedForEvent(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("isPartitionMarkedForEvent") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_isPartitionMarkedForEvent_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + if (result.__isset.o5) { + sentry.commit(); + throw result.o5; + } + if (result.__isset.o6) { + sentry.commit(); + throw result.o6; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::add_index(Index& _return, const Index& new_index, const Table& index_table) +{ + int32_t seqid = send_add_index(new_index, index_table); + recv_add_index(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_index(const Index& new_index, const Table& index_table) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_index_pargs args; + args.new_index = &new_index; + args.index_table = &index_table; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_add_index(Index& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_index") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_add_index_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +{ + int32_t seqid = send_alter_index(dbname, base_tbl_name, idx_name, new_idx); + recv_alter_index(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_index_pargs args; + args.dbname = &dbname; + args.base_tbl_name = &base_tbl_name; + args.idx_name = &idx_name; + args.new_idx = &new_idx; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_alter_index(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_index") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_alter_index_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +{ + int32_t seqid = send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); + return recv_drop_index_by_name(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_index_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.index_name = &index_name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_drop_index_by_name(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_index_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_drop_index_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +{ + int32_t seqid = send_get_index_by_name(db_name, tbl_name, index_name); + recv_get_index_by_name(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_index_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.index_name = &index_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_index_by_name(Index& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_index_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_index_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_by_name failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +{ + int32_t seqid = send_get_indexes(db_name, tbl_name, max_indexes); + recv_get_indexes(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_indexes_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_indexes = &max_indexes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_indexes(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_indexes") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_indexes_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +{ + int32_t seqid = send_get_index_names(db_name, tbl_name, max_indexes); + recv_get_index_names(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_index_names_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_indexes = &max_indexes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_index_names(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_index_names") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_index_names_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request) +{ + int32_t seqid = send_get_primary_keys(request); + recv_get_primary_keys(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_primary_keys(const PrimaryKeysRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_primary_keys", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_primary_keys_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_primary_keys(PrimaryKeysResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_primary_keys") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_primary_keys_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_primary_keys failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request) +{ + int32_t seqid = send_get_foreign_keys(request); + recv_get_foreign_keys(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_foreign_keys(const ForeignKeysRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_foreign_keys", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_foreign_keys_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_foreign_keys(ForeignKeysResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_foreign_keys") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_foreign_keys_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_foreign_keys failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request) +{ + int32_t seqid = send_get_unique_constraints(request); + recv_get_unique_constraints(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_unique_constraints(const UniqueConstraintsRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_unique_constraints", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_unique_constraints_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_unique_constraints(UniqueConstraintsResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_unique_constraints") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_unique_constraints_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_unique_constraints failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request) +{ + int32_t seqid = send_get_not_null_constraints(request); + recv_get_not_null_constraints(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_not_null_constraints(const NotNullConstraintsRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_not_null_constraints", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_not_null_constraints_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_not_null_constraints(NotNullConstraintsResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_not_null_constraints") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_not_null_constraints_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_not_null_constraints failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::update_table_column_statistics(const ColumnStatistics& stats_obj) +{ + int32_t seqid = send_update_table_column_statistics(stats_obj); + return recv_update_table_column_statistics(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_update_table_column_statistics(const ColumnStatistics& stats_obj) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_update_table_column_statistics_pargs args; + args.stats_obj = &stats_obj; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_update_table_column_statistics(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("update_table_column_statistics") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_update_table_column_statistics_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_table_column_statistics failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::update_partition_column_statistics(const ColumnStatistics& stats_obj) +{ + int32_t seqid = send_update_partition_column_statistics(stats_obj); + return recv_update_partition_column_statistics(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_update_partition_column_statistics(const ColumnStatistics& stats_obj) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_update_partition_column_statistics_pargs args; + args.stats_obj = &stats_obj; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_update_partition_column_statistics(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("update_partition_column_statistics") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_update_partition_column_statistics_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_partition_column_statistics failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) +{ + int32_t seqid = send_get_table_column_statistics(db_name, tbl_name, col_name); + recv_get_table_column_statistics(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_column_statistics_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.col_name = &col_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_table_column_statistics(ColumnStatistics& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_column_statistics") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_table_column_statistics_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_column_statistics failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) +{ + int32_t seqid = send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name); + recv_get_partition_column_statistics(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_column_statistics_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.col_name = &col_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partition_column_statistics(ColumnStatistics& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partition_column_statistics") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partition_column_statistics_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_column_statistics failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request) +{ + int32_t seqid = send_get_table_statistics_req(request); + recv_get_table_statistics_req(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_table_statistics_req(const TableStatsRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_table_statistics_req", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_statistics_req_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_table_statistics_req(TableStatsResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_table_statistics_req") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_table_statistics_req_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_statistics_req failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request) +{ + int32_t seqid = send_get_partitions_statistics_req(request); + recv_get_partitions_statistics_req(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_partitions_statistics_req(const PartitionsStatsRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_partitions_statistics_req", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_statistics_req_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_partitions_statistics_req(PartitionsStatsResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_partitions_statistics_req") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_partitions_statistics_req_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_statistics_req failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request) +{ + int32_t seqid = send_get_aggr_stats_for(request); + recv_get_aggr_stats_for(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_aggr_stats_for(const PartitionsStatsRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_aggr_stats_for", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_aggr_stats_for_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_aggr_stats_for(AggrStats& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_aggr_stats_for") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_aggr_stats_for_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_aggr_stats_for failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::set_aggr_stats_for(const SetPartitionsStatsRequest& request) +{ + int32_t seqid = send_set_aggr_stats_for(request); + return recv_set_aggr_stats_for(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_set_aggr_stats_for(const SetPartitionsStatsRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("set_aggr_stats_for", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_set_aggr_stats_for_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_set_aggr_stats_for(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("set_aggr_stats_for") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_set_aggr_stats_for_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "set_aggr_stats_for failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) +{ + int32_t seqid = send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); + return recv_delete_partition_column_statistics(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_delete_partition_column_statistics_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.col_name = &col_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_delete_partition_column_statistics(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("delete_partition_column_statistics") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_delete_partition_column_statistics_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_partition_column_statistics failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) +{ + int32_t seqid = send_delete_table_column_statistics(db_name, tbl_name, col_name); + return recv_delete_table_column_statistics(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_delete_table_column_statistics_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.col_name = &col_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_delete_table_column_statistics(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("delete_table_column_statistics") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_delete_table_column_statistics_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::create_function(const Function& func) +{ + int32_t seqid = send_create_function(func); + recv_create_function(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_create_function(const Function& func) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("create_function", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_function_pargs args; + args.func = &func; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_create_function(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_function") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_create_function_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + if (result.__isset.o4) { + sentry.commit(); + throw result.o4; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::drop_function(const std::string& dbName, const std::string& funcName) +{ + int32_t seqid = send_drop_function(dbName, funcName); + recv_drop_function(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_function(const std::string& dbName, const std::string& funcName) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_function", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_function_pargs args; + args.dbName = &dbName; + args.funcName = &funcName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_drop_function(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_function") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_drop_function_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) +{ + int32_t seqid = send_alter_function(dbName, funcName, newFunc); + recv_alter_function(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("alter_function", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_function_pargs args; + args.dbName = &dbName; + args.funcName = &funcName; + args.newFunc = &newFunc; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_alter_function(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_function") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_alter_function_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) +{ + int32_t seqid = send_get_functions(dbName, pattern); + recv_get_functions(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_functions(const std::string& dbName, const std::string& pattern) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_functions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_functions_pargs args; + args.dbName = &dbName; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_functions(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_functions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_functions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_functions failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_function(Function& _return, const std::string& dbName, const std::string& funcName) +{ + int32_t seqid = send_get_function(dbName, funcName); + recv_get_function(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_function(const std::string& dbName, const std::string& funcName) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_function", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_function_pargs args; + args.dbName = &dbName; + args.funcName = &funcName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_function(Function& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_function") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_function_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_function failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_all_functions(GetAllFunctionsResponse& _return) +{ + int32_t seqid = send_get_all_functions(); + recv_get_all_functions(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_all_functions() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_all_functions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_functions_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_all_functions(GetAllFunctionsResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_all_functions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_all_functions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_functions failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::create_role(const Role& role) +{ + int32_t seqid = send_create_role(role); + return recv_create_role(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_create_role(const Role& role) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("create_role", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_role_pargs args; + args.role = &role; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_create_role(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_role") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_create_role_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_role failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::drop_role(const std::string& role_name) +{ + int32_t seqid = send_drop_role(role_name); + return recv_drop_role(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_drop_role(const std::string& role_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_role_pargs args; + args.role_name = &role_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_drop_role(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_role") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_drop_role_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_role failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_role_names(std::vector & _return) +{ + int32_t seqid = send_get_role_names(); + recv_get_role_names(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_role_names() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_role_names", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_role_names_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_role_names(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_role_names") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_role_names_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_role_names failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::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) +{ + int32_t seqid = send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); + return recv_grant_role(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_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) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_grant_role_pargs 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; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_grant_role(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grant_role") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_grant_role_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_role failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) +{ + int32_t seqid = send_revoke_role(role_name, principal_name, principal_type); + return recv_revoke_role(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_revoke_role_pargs args; + args.role_name = &role_name; + args.principal_name = &principal_name; + args.principal_type = &principal_type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_revoke_role(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("revoke_role") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_revoke_role_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_role failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) +{ + int32_t seqid = send_list_roles(principal_name, principal_type); + recv_list_roles(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_list_roles_pargs args; + args.principal_name = &principal_name; + args.principal_type = &principal_type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_list_roles(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("list_roles") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_list_roles_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_roles failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) +{ + int32_t seqid = send_grant_revoke_role(request); + recv_grant_revoke_role(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_grant_revoke_role(const GrantRevokeRoleRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("grant_revoke_role", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_grant_revoke_role_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_grant_revoke_role(GrantRevokeRoleResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grant_revoke_role") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_grant_revoke_role_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_revoke_role failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) +{ + int32_t seqid = send_get_principals_in_role(request); + recv_get_principals_in_role(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_principals_in_role(const GetPrincipalsInRoleRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_principals_in_role", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_principals_in_role_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_principals_in_role(GetPrincipalsInRoleResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_principals_in_role") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_principals_in_role_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_principals_in_role failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request) +{ + int32_t seqid = send_get_role_grants_for_principal(request); + recv_get_role_grants_for_principal(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_role_grants_for_principal(const GetRoleGrantsForPrincipalRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_role_grants_for_principal", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_role_grants_for_principal_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_role_grants_for_principal") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_role_grants_for_principal_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_role_grants_for_principal failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) +{ + int32_t seqid = send_get_privilege_set(hiveObject, user_name, group_names); + recv_get_privilege_set(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_privilege_set_pargs args; + args.hiveObject = &hiveObject; + args.user_name = &user_name; + args.group_names = &group_names; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_privilege_set(PrincipalPrivilegeSet& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_privilege_set") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_privilege_set_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_privilege_set failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) +{ + int32_t seqid = send_list_privileges(principal_name, principal_type, hiveObject); + recv_list_privileges(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_list_privileges_pargs args; + args.principal_name = &principal_name; + args.principal_type = &principal_type; + args.hiveObject = &hiveObject; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_list_privileges(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("list_privileges") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_list_privileges_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_privileges failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::grant_privileges(const PrivilegeBag& privileges) +{ + int32_t seqid = send_grant_privileges(privileges); + return recv_grant_privileges(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_grant_privileges(const PrivilegeBag& privileges) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_grant_privileges_pargs args; + args.privileges = &privileges; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_grant_privileges(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grant_privileges") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_grant_privileges_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_privileges failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::revoke_privileges(const PrivilegeBag& privileges) +{ + int32_t seqid = send_revoke_privileges(privileges); + return recv_revoke_privileges(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_revoke_privileges(const PrivilegeBag& privileges) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_revoke_privileges_pargs args; + args.privileges = &privileges; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_revoke_privileges(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("revoke_privileges") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_revoke_privileges_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_privileges failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) +{ + int32_t seqid = send_grant_revoke_privileges(request); + recv_grant_revoke_privileges(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_grant_revoke_privileges(const GrantRevokePrivilegeRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("grant_revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_grant_revoke_privileges_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("grant_revoke_privileges") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_grant_revoke_privileges_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_revoke_privileges failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) +{ + int32_t seqid = send_set_ugi(user_name, group_names); + recv_set_ugi(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_set_ugi(const std::string& user_name, const std::vector & group_names) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("set_ugi", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_set_ugi_pargs args; + args.user_name = &user_name; + args.group_names = &group_names; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_set_ugi(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("set_ugi") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_set_ugi_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "set_ugi failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) +{ + int32_t seqid = send_get_delegation_token(token_owner, renewer_kerberos_principal_name); + recv_get_delegation_token(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_delegation_token(const std::string& token_owner, const std::string& renewer_kerberos_principal_name) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_delegation_token_pargs args; + args.token_owner = &token_owner; + args.renewer_kerberos_principal_name = &renewer_kerberos_principal_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_delegation_token(std::string& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_delegation_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_delegation_token_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_delegation_token failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +int64_t ThriftHiveMetastoreConcurrentClient::renew_delegation_token(const std::string& token_str_form) +{ + int32_t seqid = send_renew_delegation_token(token_str_form); + return recv_renew_delegation_token(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_renew_delegation_token(const std::string& token_str_form) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_renew_delegation_token_pargs args; + args.token_str_form = &token_str_form; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +int64_t ThriftHiveMetastoreConcurrentClient::recv_renew_delegation_token(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("renew_delegation_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + int64_t _return; + ThriftHiveMetastore_renew_delegation_token_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "renew_delegation_token failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::cancel_delegation_token(const std::string& token_str_form) +{ + int32_t seqid = send_cancel_delegation_token(token_str_form); + recv_cancel_delegation_token(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_cancel_delegation_token(const std::string& token_str_form) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_cancel_delegation_token_pargs args; + args.token_str_form = &token_str_form; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_cancel_delegation_token(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("cancel_delegation_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_cancel_delegation_token_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::add_token(const std::string& token_identifier, const std::string& delegation_token) +{ + int32_t seqid = send_add_token(token_identifier, delegation_token); + return recv_add_token(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_token(const std::string& token_identifier, const std::string& delegation_token) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_token_pargs args; + args.token_identifier = &token_identifier; + args.delegation_token = &delegation_token; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_add_token(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_add_token_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_token failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::remove_token(const std::string& token_identifier) +{ + int32_t seqid = send_remove_token(token_identifier); + return recv_remove_token(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_remove_token(const std::string& token_identifier) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("remove_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_remove_token_pargs args; + args.token_identifier = &token_identifier; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_remove_token(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("remove_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_remove_token_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "remove_token failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_token(std::string& _return, const std::string& token_identifier) +{ + int32_t seqid = send_get_token(token_identifier); + recv_get_token(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_token(const std::string& token_identifier) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_token_pargs args; + args.token_identifier = &token_identifier; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_token(std::string& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_token_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_token failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_all_token_identifiers(std::vector & _return) +{ + int32_t seqid = send_get_all_token_identifiers(); + recv_get_all_token_identifiers(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_all_token_identifiers() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_all_token_identifiers", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_token_identifiers_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_all_token_identifiers(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_all_token_identifiers") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_all_token_identifiers_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_token_identifiers failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +int32_t ThriftHiveMetastoreConcurrentClient::add_master_key(const std::string& key) +{ + int32_t seqid = send_add_master_key(key); + return recv_add_master_key(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_master_key(const std::string& key) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_master_key", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_master_key_pargs args; + args.key = &key; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +int32_t ThriftHiveMetastoreConcurrentClient::recv_add_master_key(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_master_key") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + int32_t _return; + ThriftHiveMetastore_add_master_key_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_master_key failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::update_master_key(const int32_t seq_number, const std::string& key) +{ + int32_t seqid = send_update_master_key(seq_number, key); + recv_update_master_key(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_update_master_key(const int32_t seq_number, const std::string& key) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("update_master_key", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_update_master_key_pargs args; + args.seq_number = &seq_number; + args.key = &key; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_update_master_key(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("update_master_key") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_update_master_key_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +bool ThriftHiveMetastoreConcurrentClient::remove_master_key(const int32_t key_seq) +{ + int32_t seqid = send_remove_master_key(key_seq); + return recv_remove_master_key(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_remove_master_key(const int32_t key_seq) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("remove_master_key", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_remove_master_key_pargs args; + args.key_seq = &key_seq; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +bool ThriftHiveMetastoreConcurrentClient::recv_remove_master_key(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("remove_master_key") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + bool _return; + ThriftHiveMetastore_remove_master_key_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + sentry.commit(); + return _return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "remove_master_key failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_master_keys(std::vector & _return) +{ + int32_t seqid = send_get_master_keys(); + recv_get_master_keys(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_master_keys() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_master_keys", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_master_keys_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_master_keys(std::vector & _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_master_keys") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_master_keys_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_master_keys failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_open_txns(GetOpenTxnsResponse& _return) +{ + int32_t seqid = send_get_open_txns(); + recv_get_open_txns(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_open_txns() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_open_txns", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_open_txns_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_open_txns(GetOpenTxnsResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_open_txns") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_open_txns_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_open_txns failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_open_txns_info(GetOpenTxnsInfoResponse& _return) +{ + int32_t seqid = send_get_open_txns_info(); + recv_get_open_txns_info(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_open_txns_info() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_open_txns_info", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_open_txns_info_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_open_txns_info(GetOpenTxnsInfoResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_open_txns_info") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_open_txns_info_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_open_txns_info failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst) +{ + int32_t seqid = send_open_txns(rqst); + recv_open_txns(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_open_txns(const OpenTxnRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("open_txns", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_open_txns_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_open_txns(OpenTxnsResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("open_txns") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_open_txns_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "open_txns failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::abort_txn(const AbortTxnRequest& rqst) +{ + int32_t seqid = send_abort_txn(rqst); + recv_abort_txn(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_abort_txn(const AbortTxnRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("abort_txn", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_abort_txn_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_abort_txn(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("abort_txn") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_abort_txn_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::abort_txns(const AbortTxnsRequest& rqst) +{ + int32_t seqid = send_abort_txns(rqst); + recv_abort_txns(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_abort_txns(const AbortTxnsRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("abort_txns", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_abort_txns_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_abort_txns(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("abort_txns") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_abort_txns_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::commit_txn(const CommitTxnRequest& rqst) +{ + int32_t seqid = send_commit_txn(rqst); + recv_commit_txn(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_commit_txn(const CommitTxnRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("commit_txn", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_commit_txn_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_commit_txn(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("commit_txn") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_commit_txn_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::lock(LockResponse& _return, const LockRequest& rqst) +{ + int32_t seqid = send_lock(rqst); + recv_lock(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_lock(const LockRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("lock", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_lock_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_lock(LockResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("lock") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_lock_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "lock failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::check_lock(LockResponse& _return, const CheckLockRequest& rqst) +{ + int32_t seqid = send_check_lock(rqst); + recv_check_lock(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_check_lock(const CheckLockRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("check_lock", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_check_lock_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_check_lock(LockResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("check_lock") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_check_lock_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "check_lock failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::unlock(const UnlockRequest& rqst) +{ + int32_t seqid = send_unlock(rqst); + recv_unlock(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_unlock(const UnlockRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("unlock", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_unlock_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_unlock(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("unlock") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_unlock_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst) +{ + int32_t seqid = send_show_locks(rqst); + recv_show_locks(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_show_locks(const ShowLocksRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("show_locks", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_show_locks_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_show_locks(ShowLocksResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("show_locks") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_show_locks_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "show_locks failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::heartbeat(const HeartbeatRequest& ids) +{ + int32_t seqid = send_heartbeat(ids); + recv_heartbeat(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_heartbeat(const HeartbeatRequest& ids) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("heartbeat", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_heartbeat_pargs args; + args.ids = &ids; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_heartbeat(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("heartbeat") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_heartbeat_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + if (result.__isset.o3) { + sentry.commit(); + throw result.o3; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns) +{ + int32_t seqid = send_heartbeat_txn_range(txns); + recv_heartbeat_txn_range(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_heartbeat_txn_range(const HeartbeatTxnRangeRequest& txns) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("heartbeat_txn_range", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_heartbeat_txn_range_pargs args; + args.txns = &txns; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("heartbeat_txn_range") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_heartbeat_txn_range_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "heartbeat_txn_range failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::compact(const CompactionRequest& rqst) +{ + int32_t seqid = send_compact(rqst); + recv_compact(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_compact(const CompactionRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("compact", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_compact_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_compact(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("compact") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_compact_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::compact2(CompactionResponse& _return, const CompactionRequest& rqst) +{ + int32_t seqid = send_compact2(rqst); + recv_compact2(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_compact2(const CompactionRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("compact2", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_compact2_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_compact2(CompactionResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("compact2") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_compact2_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "compact2 failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst) +{ + int32_t seqid = send_show_compact(rqst); + recv_show_compact(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_show_compact(const ShowCompactRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("show_compact", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_show_compact_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_show_compact(ShowCompactResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("show_compact") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_show_compact_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "show_compact failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::add_dynamic_partitions(const AddDynamicPartitions& rqst) +{ + int32_t seqid = send_add_dynamic_partitions(rqst); + recv_add_dynamic_partitions(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_add_dynamic_partitions(const AddDynamicPartitions& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("add_dynamic_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_dynamic_partitions_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_add_dynamic_partitions(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("add_dynamic_partitions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_add_dynamic_partitions_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + if (result.__isset.o2) { + sentry.commit(); + throw result.o2; + } + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst) +{ + int32_t seqid = send_get_next_notification(rqst); + recv_get_next_notification(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_next_notification(const NotificationEventRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_next_notification", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_next_notification_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_next_notification(NotificationEventResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_next_notification") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_next_notification_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_next_notification failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_current_notificationEventId(CurrentNotificationEventId& _return) +{ + int32_t seqid = send_get_current_notificationEventId(); + recv_get_current_notificationEventId(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_current_notificationEventId() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_current_notificationEventId", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_current_notificationEventId_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_current_notificationEventId(CurrentNotificationEventId& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_current_notificationEventId") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_current_notificationEventId_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_current_notificationEventId failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst) +{ + int32_t seqid = send_fire_listener_event(rqst); + recv_fire_listener_event(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_fire_listener_event(const FireEventRequest& rqst) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("fire_listener_event", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_fire_listener_event_pargs args; + args.rqst = &rqst; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_fire_listener_event(FireEventResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("fire_listener_event") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_fire_listener_event_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fire_listener_event failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::flushCache() +{ + int32_t seqid = send_flushCache(); + recv_flushCache(seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_flushCache() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("flushCache", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_flushCache_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_flushCache(const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("flushCache") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_flushCache_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + sentry.commit(); + return; + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request) +{ + int32_t seqid = send_cm_recycle(request); + recv_cm_recycle(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_cm_recycle(const CmRecycleRequest& request) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("cm_recycle", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_cm_recycle_pargs args; + args.request = &request; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_cm_recycle(CmRecycleResponse& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("cm_recycle") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_cm_recycle_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "cm_recycle failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req) +{ + int32_t seqid = send_get_file_metadata_by_expr(req); + recv_get_file_metadata_by_expr(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_file_metadata_by_expr(const GetFileMetadataByExprRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_file_metadata_by_expr", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_file_metadata_by_expr_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_file_metadata_by_expr") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_file_metadata_by_expr_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_file_metadata_by_expr failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req) +{ + int32_t seqid = send_get_file_metadata(req); + recv_get_file_metadata(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_file_metadata(const GetFileMetadataRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_file_metadata_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_file_metadata(GetFileMetadataResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_file_metadata") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_file_metadata_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_file_metadata failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req) +{ + int32_t seqid = send_put_file_metadata(req); + recv_put_file_metadata(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_put_file_metadata(const PutFileMetadataRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("put_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_put_file_metadata_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_put_file_metadata(PutFileMetadataResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("put_file_metadata") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_put_file_metadata_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "put_file_metadata failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req) +{ + int32_t seqid = send_clear_file_metadata(req); + recv_clear_file_metadata(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_clear_file_metadata(const ClearFileMetadataRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("clear_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_clear_file_metadata_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_clear_file_metadata(ClearFileMetadataResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("clear_file_metadata") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_clear_file_metadata_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "clear_file_metadata failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) +{ + int32_t seqid = send_cache_file_metadata(req); + recv_cache_file_metadata(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_cache_file_metadata(const CacheFileMetadataRequest& req) +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("cache_file_metadata", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_cache_file_metadata_pargs args; + args.req = &req; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_cache_file_metadata(CacheFileMetadataResult& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("cache_file_metadata") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_cache_file_metadata_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "cache_file_metadata failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +void ThriftHiveMetastoreConcurrentClient::get_metastore_db_uuid(std::string& _return) +{ + int32_t seqid = send_get_metastore_db_uuid(); + recv_get_metastore_db_uuid(_return, seqid); +} + +int32_t ThriftHiveMetastoreConcurrentClient::send_get_metastore_db_uuid() +{ + int32_t cseqid = this->sync_.generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + oprot_->writeMessageBegin("get_metastore_db_uuid", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_metastore_db_uuid_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); + + sentry.commit(); + return cseqid; +} + +void ThriftHiveMetastoreConcurrentClient::recv_get_metastore_db_uuid(std::string& _return, const int32_t seqid) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + // the read mutex gets dropped and reacquired as part of waitForWork() + // The destructor of this sentry wakes up other clients + ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + + while(true) { + if(!this->sync_.getPending(fname, mtype, rseqid)) { + iprot_->readMessageBegin(fname, mtype, rseqid); + } + if(seqid == rseqid) { + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + sentry.commit(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_metastore_db_uuid") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + // in a bad state, don't commit + using ::apache::thrift::protocol::TProtocolException; + throw TProtocolException(TProtocolException::INVALID_DATA); + } + ThriftHiveMetastore_get_metastore_db_uuid_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + sentry.commit(); + return; + } + if (result.__isset.o1) { + sentry.commit(); + throw result.o1; + } + // in a bad state, don't commit + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_metastore_db_uuid failed: unknown result"); + } + // seqid != rseqid + this->sync_.updatePending(fname, mtype, rseqid); + + // this will temporarily unlock the readMutex, and let other clients get work done + this->sync_.waitForWork(seqid); + } // end while(true) +} + +}}} // namespace + diff --git standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h new file mode 100644 index 0000000..8406b42 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h @@ -0,0 +1,23336 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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 { + +#ifdef _WIN32 + #pragma warning( push ) + #pragma warning (disable : 4250 ) //inheriting methods via dominance +#endif + +class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookServiceIf { + public: + virtual ~ThriftHiveMetastoreIf() {} + virtual void getMetaConf(std::string& _return, const std::string& key) = 0; + virtual void setMetaConf(const std::string& key, const std::string& value) = 0; + virtual void create_database(const Database& database) = 0; + virtual void get_database(Database& _return, const std::string& name) = 0; + virtual void drop_database(const std::string& name, const bool deleteData, const bool cascade) = 0; + virtual void get_databases(std::vector & _return, const std::string& pattern) = 0; + virtual void get_all_databases(std::vector & _return) = 0; + virtual void alter_database(const std::string& dbname, const Database& db) = 0; + virtual void get_type(Type& _return, const std::string& name) = 0; + virtual bool create_type(const Type& type) = 0; + virtual bool drop_type(const std::string& type) = 0; + virtual void get_type_all(std::map & _return, const std::string& name) = 0; + virtual void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) = 0; + virtual void get_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) = 0; + virtual void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) = 0; + virtual void get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) = 0; + virtual void create_table(const Table& tbl) = 0; + virtual void create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) = 0; + virtual void create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) = 0; + virtual void drop_constraint(const DropConstraintRequest& req) = 0; + virtual void add_primary_key(const AddPrimaryKeyRequest& req) = 0; + virtual void add_foreign_key(const AddForeignKeyRequest& req) = 0; + virtual void add_unique_constraint(const AddUniqueConstraintRequest& req) = 0; + virtual void add_not_null_constraint(const AddNotNullConstraintRequest& req) = 0; + virtual void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) = 0; + virtual void drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) = 0; + virtual void truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) = 0; + virtual void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) = 0; + virtual void get_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType) = 0; + virtual void get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) = 0; + virtual void get_all_tables(std::vector & _return, const std::string& db_name) = 0; + virtual void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) = 0; + virtual void get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names) = 0; + virtual void get_table_req(GetTableResult& _return, const GetTableRequest& req) = 0; + virtual void get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req) = 0; + virtual void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) = 0; + virtual void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) = 0; + virtual void alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) = 0; + virtual void alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) = 0; + virtual void add_partition(Partition& _return, const Partition& new_part) = 0; + virtual void add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) = 0; + virtual int32_t add_partitions(const std::vector & new_parts) = 0; + virtual int32_t add_partitions_pspec(const std::vector & new_parts) = 0; + virtual void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) = 0; + virtual void add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request) = 0; + virtual void append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) = 0; + virtual void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) = 0; + virtual void append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) = 0; + virtual bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) = 0; + virtual bool drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) = 0; + virtual bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) = 0; + virtual bool drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) = 0; + virtual void drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req) = 0; + virtual void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) = 0; + virtual void exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) = 0; + virtual void exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) = 0; + virtual 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) = 0; + virtual void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) = 0; + virtual void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) = 0; + virtual 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) = 0; + virtual void get_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) = 0; + virtual void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) = 0; + virtual 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) = 0; + virtual 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) = 0; + virtual 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) = 0; + virtual 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) = 0; + virtual void get_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) = 0; + virtual void get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req) = 0; + virtual int32_t get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) = 0; + virtual void get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) = 0; + virtual void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) = 0; + virtual void alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) = 0; + virtual void alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) = 0; + virtual void alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) = 0; + virtual void rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) = 0; + virtual bool partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) = 0; + virtual void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) = 0; + virtual void partition_name_to_vals(std::vector & _return, const std::string& part_name) = 0; + virtual void partition_name_to_spec(std::map & _return, const std::string& part_name) = 0; + virtual void markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) = 0; + virtual bool isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) = 0; + virtual void add_index(Index& _return, const Index& new_index, const Table& index_table) = 0; + virtual void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) = 0; + virtual bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) = 0; + virtual void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) = 0; + virtual void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; + virtual void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; + virtual void get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request) = 0; + virtual void get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request) = 0; + virtual void get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request) = 0; + virtual void get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request) = 0; + virtual bool update_table_column_statistics(const ColumnStatistics& stats_obj) = 0; + virtual bool update_partition_column_statistics(const ColumnStatistics& stats_obj) = 0; + virtual void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) = 0; + virtual void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) = 0; + virtual void get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request) = 0; + virtual void get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request) = 0; + virtual void get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request) = 0; + virtual bool set_aggr_stats_for(const SetPartitionsStatsRequest& request) = 0; + virtual bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) = 0; + virtual bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) = 0; + virtual void create_function(const Function& func) = 0; + virtual void drop_function(const std::string& dbName, const std::string& funcName) = 0; + virtual void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) = 0; + virtual void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) = 0; + virtual void get_function(Function& _return, const std::string& dbName, const std::string& funcName) = 0; + virtual void get_all_functions(GetAllFunctionsResponse& _return) = 0; + virtual bool create_role(const Role& role) = 0; + virtual bool drop_role(const std::string& role_name) = 0; + virtual void get_role_names(std::vector & _return) = 0; + virtual 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) = 0; + virtual bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) = 0; + virtual void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) = 0; + virtual void grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) = 0; + virtual void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) = 0; + virtual void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request) = 0; + virtual void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) = 0; + virtual void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) = 0; + virtual bool grant_privileges(const PrivilegeBag& privileges) = 0; + virtual bool revoke_privileges(const PrivilegeBag& privileges) = 0; + virtual void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) = 0; + virtual void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) = 0; + virtual void get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) = 0; + virtual int64_t renew_delegation_token(const std::string& token_str_form) = 0; + virtual void cancel_delegation_token(const std::string& token_str_form) = 0; + virtual bool add_token(const std::string& token_identifier, const std::string& delegation_token) = 0; + virtual bool remove_token(const std::string& token_identifier) = 0; + virtual void get_token(std::string& _return, const std::string& token_identifier) = 0; + virtual void get_all_token_identifiers(std::vector & _return) = 0; + virtual int32_t add_master_key(const std::string& key) = 0; + virtual void update_master_key(const int32_t seq_number, const std::string& key) = 0; + virtual bool remove_master_key(const int32_t key_seq) = 0; + virtual void get_master_keys(std::vector & _return) = 0; + virtual void get_open_txns(GetOpenTxnsResponse& _return) = 0; + virtual void get_open_txns_info(GetOpenTxnsInfoResponse& _return) = 0; + virtual void open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst) = 0; + virtual void abort_txn(const AbortTxnRequest& rqst) = 0; + virtual void abort_txns(const AbortTxnsRequest& rqst) = 0; + virtual void commit_txn(const CommitTxnRequest& rqst) = 0; + virtual void lock(LockResponse& _return, const LockRequest& rqst) = 0; + virtual void check_lock(LockResponse& _return, const CheckLockRequest& rqst) = 0; + virtual void unlock(const UnlockRequest& rqst) = 0; + virtual void show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst) = 0; + virtual void heartbeat(const HeartbeatRequest& ids) = 0; + virtual void heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns) = 0; + virtual void compact(const CompactionRequest& rqst) = 0; + virtual void compact2(CompactionResponse& _return, const CompactionRequest& rqst) = 0; + virtual void show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst) = 0; + virtual void add_dynamic_partitions(const AddDynamicPartitions& rqst) = 0; + virtual void get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst) = 0; + virtual void get_current_notificationEventId(CurrentNotificationEventId& _return) = 0; + virtual void fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst) = 0; + virtual void flushCache() = 0; + virtual void cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request) = 0; + virtual void get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req) = 0; + virtual void get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req) = 0; + virtual void put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req) = 0; + virtual void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req) = 0; + virtual void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) = 0; + virtual void get_metastore_db_uuid(std::string& _return) = 0; +}; + +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 getMetaConf(std::string& /* _return */, const std::string& /* key */) { + return; + } + void setMetaConf(const std::string& /* key */, const std::string& /* value */) { + return; + } + void create_database(const Database& /* database */) { + return; + } + void get_database(Database& /* _return */, const std::string& /* name */) { + return; + } + void drop_database(const std::string& /* name */, const bool /* deleteData */, const bool /* cascade */) { + return; + } + void get_databases(std::vector & /* _return */, const std::string& /* pattern */) { + return; + } + void get_all_databases(std::vector & /* _return */) { + return; + } + void alter_database(const std::string& /* dbname */, const Database& /* db */) { + return; + } + void get_type(Type& /* _return */, const std::string& /* name */) { + return; + } + bool create_type(const Type& /* type */) { + bool _return = false; + return _return; + } + bool drop_type(const std::string& /* type */) { + bool _return = false; + return _return; + } + void get_type_all(std::map & /* _return */, const std::string& /* name */) { + return; + } + void get_fields(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* table_name */) { + return; + } + void get_fields_with_environment_context(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* table_name */, const EnvironmentContext& /* environment_context */) { + return; + } + void get_schema(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* table_name */) { + return; + } + void get_schema_with_environment_context(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* table_name */, const EnvironmentContext& /* environment_context */) { + return; + } + void create_table(const Table& /* tbl */) { + return; + } + void create_table_with_environment_context(const Table& /* tbl */, const EnvironmentContext& /* environment_context */) { + return; + } + void create_table_with_constraints(const Table& /* tbl */, const std::vector & /* primaryKeys */, const std::vector & /* foreignKeys */, const std::vector & /* uniqueConstraints */, const std::vector & /* notNullConstraints */) { + return; + } + void drop_constraint(const DropConstraintRequest& /* req */) { + return; + } + void add_primary_key(const AddPrimaryKeyRequest& /* req */) { + return; + } + void add_foreign_key(const AddForeignKeyRequest& /* req */) { + return; + } + void add_unique_constraint(const AddUniqueConstraintRequest& /* req */) { + return; + } + void add_not_null_constraint(const AddNotNullConstraintRequest& /* req */) { + return; + } + void drop_table(const std::string& /* dbname */, const std::string& /* name */, const bool /* deleteData */) { + return; + } + void drop_table_with_environment_context(const std::string& /* dbname */, const std::string& /* name */, const bool /* deleteData */, const EnvironmentContext& /* environment_context */) { + return; + } + void truncate_table(const std::string& /* dbName */, const std::string& /* tableName */, const std::vector & /* partNames */) { + return; + } + void get_tables(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* pattern */) { + return; + } + void get_tables_by_type(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* pattern */, const std::string& /* tableType */) { + return; + } + void get_table_meta(std::vector & /* _return */, const std::string& /* db_patterns */, const std::string& /* tbl_patterns */, const std::vector & /* tbl_types */) { + return; + } + void get_all_tables(std::vector & /* _return */, const std::string& /* db_name */) { + return; + } + void get_table(Table& /* _return */, const std::string& /* dbname */, const std::string& /* tbl_name */) { + return; + } + void get_table_objects_by_name(std::vector
& /* _return */, const std::string& /* dbname */, const std::vector & /* tbl_names */) { + return; + } + void get_table_req(GetTableResult& /* _return */, const GetTableRequest& /* req */) { + return; + } + void get_table_objects_by_name_req(GetTablesResult& /* _return */, const GetTablesRequest& /* req */) { + return; + } + void get_table_names_by_filter(std::vector & /* _return */, const std::string& /* dbname */, const std::string& /* filter */, const int16_t /* max_tables */) { + return; + } + void alter_table(const std::string& /* dbname */, const std::string& /* tbl_name */, const Table& /* new_tbl */) { + return; + } + void alter_table_with_environment_context(const std::string& /* dbname */, const std::string& /* tbl_name */, const Table& /* new_tbl */, const EnvironmentContext& /* environment_context */) { + return; + } + void alter_table_with_cascade(const std::string& /* dbname */, const std::string& /* tbl_name */, const Table& /* new_tbl */, const bool /* cascade */) { + return; + } + void add_partition(Partition& /* _return */, const Partition& /* new_part */) { + return; + } + void add_partition_with_environment_context(Partition& /* _return */, const Partition& /* new_part */, const EnvironmentContext& /* environment_context */) { + return; + } + int32_t add_partitions(const std::vector & /* new_parts */) { + int32_t _return = 0; + return _return; + } + int32_t add_partitions_pspec(const std::vector & /* new_parts */) { + int32_t _return = 0; + return _return; + } + void append_partition(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */) { + return; + } + void add_partitions_req(AddPartitionsResult& /* _return */, const AddPartitionsRequest& /* request */) { + return; + } + void append_partition_with_environment_context(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const EnvironmentContext& /* environment_context */) { + return; + } + void append_partition_by_name(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */) { + return; + } + void append_partition_by_name_with_environment_context(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const EnvironmentContext& /* environment_context */) { + return; + } + bool drop_partition(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const bool /* deleteData */) { + bool _return = false; + return _return; + } + bool drop_partition_with_environment_context(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const bool /* deleteData */, const EnvironmentContext& /* environment_context */) { + bool _return = false; + return _return; + } + bool drop_partition_by_name(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const bool /* deleteData */) { + bool _return = false; + return _return; + } + bool drop_partition_by_name_with_environment_context(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const bool /* deleteData */, const EnvironmentContext& /* environment_context */) { + bool _return = false; + return _return; + } + void drop_partitions_req(DropPartitionsResult& /* _return */, const DropPartitionsRequest& /* req */) { + return; + } + void get_partition(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */) { + return; + } + void exchange_partition(Partition& /* _return */, const std::map & /* partitionSpecs */, const std::string& /* source_db */, const std::string& /* source_table_name */, const std::string& /* dest_db */, const std::string& /* dest_table_name */) { + return; + } + void exchange_partitions(std::vector & /* _return */, const std::map & /* partitionSpecs */, const std::string& /* source_db */, const std::string& /* source_table_name */, const std::string& /* dest_db */, const std::string& /* dest_table_name */) { + 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 */) { + return; + } + void get_partition_by_name(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */) { + return; + } + void get_partitions(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* 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 */) { + return; + } + void get_partitions_pspec(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int32_t /* max_parts */) { + return; + } + void get_partition_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* 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 */) { + 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 */) { + 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 */) { + 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 */) { + return; + } + void get_part_specs_by_filter(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* filter */, const int32_t /* max_parts */) { + return; + } + void get_partitions_by_expr(PartitionsByExprResult& /* _return */, const PartitionsByExprRequest& /* req */) { + return; + } + int32_t get_num_partitions_by_filter(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* filter */) { + int32_t _return = 0; + return _return; + } + void get_partitions_by_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* names */) { + return; + } + void alter_partition(const std::string& /* db_name */, const std::string& /* tbl_name */, const Partition& /* new_part */) { + return; + } + void alter_partitions(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* new_parts */) { + return; + } + void alter_partitions_with_environment_context(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* new_parts */, const EnvironmentContext& /* environment_context */) { + return; + } + void alter_partition_with_environment_context(const std::string& /* db_name */, const std::string& /* tbl_name */, const Partition& /* new_part */, const EnvironmentContext& /* environment_context */) { + return; + } + void rename_partition(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const Partition& /* new_part */) { + return; + } + bool partition_name_has_valid_characters(const std::vector & /* part_vals */, const bool /* throw_exception */) { + bool _return = false; + return _return; + } + void get_config_value(std::string& /* _return */, const std::string& /* name */, const std::string& /* defaultValue */) { + return; + } + void partition_name_to_vals(std::vector & /* _return */, const std::string& /* part_name */) { + return; + } + void partition_name_to_spec(std::map & /* _return */, const std::string& /* part_name */) { + return; + } + void markPartitionForEvent(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::map & /* part_vals */, const PartitionEventType::type /* eventType */) { + return; + } + bool isPartitionMarkedForEvent(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::map & /* part_vals */, const PartitionEventType::type /* eventType */) { + bool _return = false; + return _return; + } + void add_index(Index& /* _return */, const Index& /* new_index */, const Table& /* 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 */) { + return; + } + bool drop_index_by_name(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* index_name */, const bool /* deleteData */) { + bool _return = false; + return _return; + } + void get_index_by_name(Index& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* index_name */) { + return; + } + void get_indexes(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* 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 */) { + return; + } + void get_primary_keys(PrimaryKeysResponse& /* _return */, const PrimaryKeysRequest& /* request */) { + return; + } + void get_foreign_keys(ForeignKeysResponse& /* _return */, const ForeignKeysRequest& /* request */) { + return; + } + void get_unique_constraints(UniqueConstraintsResponse& /* _return */, const UniqueConstraintsRequest& /* request */) { + return; + } + void get_not_null_constraints(NotNullConstraintsResponse& /* _return */, const NotNullConstraintsRequest& /* request */) { + return; + } + bool update_table_column_statistics(const ColumnStatistics& /* stats_obj */) { + bool _return = false; + return _return; + } + bool update_partition_column_statistics(const ColumnStatistics& /* stats_obj */) { + bool _return = false; + return _return; + } + void get_table_column_statistics(ColumnStatistics& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* col_name */) { + return; + } + void get_partition_column_statistics(ColumnStatistics& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const std::string& /* col_name */) { + return; + } + void get_table_statistics_req(TableStatsResult& /* _return */, const TableStatsRequest& /* request */) { + return; + } + void get_partitions_statistics_req(PartitionsStatsResult& /* _return */, const PartitionsStatsRequest& /* request */) { + return; + } + void get_aggr_stats_for(AggrStats& /* _return */, const PartitionsStatsRequest& /* request */) { + return; + } + bool set_aggr_stats_for(const SetPartitionsStatsRequest& /* request */) { + bool _return = false; + return _return; + } + bool delete_partition_column_statistics(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const std::string& /* col_name */) { + bool _return = false; + return _return; + } + bool delete_table_column_statistics(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* col_name */) { + bool _return = false; + return _return; + } + void create_function(const Function& /* func */) { + return; + } + void drop_function(const std::string& /* dbName */, const std::string& /* funcName */) { + return; + } + void alter_function(const std::string& /* dbName */, const std::string& /* funcName */, const Function& /* newFunc */) { + return; + } + void get_functions(std::vector & /* _return */, const std::string& /* dbName */, const std::string& /* pattern */) { + return; + } + void get_function(Function& /* _return */, const std::string& /* dbName */, const std::string& /* funcName */) { + return; + } + void get_all_functions(GetAllFunctionsResponse& /* _return */) { + return; + } + bool create_role(const Role& /* role */) { + bool _return = false; + return _return; + } + bool drop_role(const std::string& /* role_name */) { + bool _return = false; + return _return; + } + void get_role_names(std::vector & /* _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 */) { + bool _return = false; + return _return; + } + bool revoke_role(const std::string& /* role_name */, const std::string& /* principal_name */, const PrincipalType::type /* principal_type */) { + bool _return = false; + return _return; + } + void list_roles(std::vector & /* _return */, const std::string& /* principal_name */, const PrincipalType::type /* principal_type */) { + return; + } + void grant_revoke_role(GrantRevokeRoleResponse& /* _return */, const GrantRevokeRoleRequest& /* request */) { + return; + } + void get_principals_in_role(GetPrincipalsInRoleResponse& /* _return */, const GetPrincipalsInRoleRequest& /* request */) { + return; + } + void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& /* _return */, const GetRoleGrantsForPrincipalRequest& /* request */) { + return; + } + void get_privilege_set(PrincipalPrivilegeSet& /* _return */, const HiveObjectRef& /* hiveObject */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + void list_privileges(std::vector & /* _return */, const std::string& /* principal_name */, const PrincipalType::type /* principal_type */, const HiveObjectRef& /* hiveObject */) { + return; + } + bool grant_privileges(const PrivilegeBag& /* privileges */) { + bool _return = false; + return _return; + } + bool revoke_privileges(const PrivilegeBag& /* privileges */) { + bool _return = false; + return _return; + } + void grant_revoke_privileges(GrantRevokePrivilegeResponse& /* _return */, const GrantRevokePrivilegeRequest& /* request */) { + return; + } + void set_ugi(std::vector & /* _return */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + void get_delegation_token(std::string& /* _return */, const std::string& /* token_owner */, const std::string& /* renewer_kerberos_principal_name */) { + return; + } + int64_t renew_delegation_token(const std::string& /* token_str_form */) { + int64_t _return = 0; + return _return; + } + void cancel_delegation_token(const std::string& /* token_str_form */) { + return; + } + bool add_token(const std::string& /* token_identifier */, const std::string& /* delegation_token */) { + bool _return = false; + return _return; + } + bool remove_token(const std::string& /* token_identifier */) { + bool _return = false; + return _return; + } + void get_token(std::string& /* _return */, const std::string& /* token_identifier */) { + return; + } + void get_all_token_identifiers(std::vector & /* _return */) { + return; + } + int32_t add_master_key(const std::string& /* key */) { + int32_t _return = 0; + return _return; + } + void update_master_key(const int32_t /* seq_number */, const std::string& /* key */) { + return; + } + bool remove_master_key(const int32_t /* key_seq */) { + bool _return = false; + return _return; + } + void get_master_keys(std::vector & /* _return */) { + return; + } + void get_open_txns(GetOpenTxnsResponse& /* _return */) { + return; + } + void get_open_txns_info(GetOpenTxnsInfoResponse& /* _return */) { + return; + } + void open_txns(OpenTxnsResponse& /* _return */, const OpenTxnRequest& /* rqst */) { + return; + } + void abort_txn(const AbortTxnRequest& /* rqst */) { + return; + } + void abort_txns(const AbortTxnsRequest& /* rqst */) { + return; + } + void commit_txn(const CommitTxnRequest& /* rqst */) { + return; + } + void lock(LockResponse& /* _return */, const LockRequest& /* rqst */) { + return; + } + void check_lock(LockResponse& /* _return */, const CheckLockRequest& /* rqst */) { + return; + } + void unlock(const UnlockRequest& /* rqst */) { + return; + } + void show_locks(ShowLocksResponse& /* _return */, const ShowLocksRequest& /* rqst */) { + return; + } + void heartbeat(const HeartbeatRequest& /* ids */) { + return; + } + void heartbeat_txn_range(HeartbeatTxnRangeResponse& /* _return */, const HeartbeatTxnRangeRequest& /* txns */) { + return; + } + void compact(const CompactionRequest& /* rqst */) { + return; + } + void compact2(CompactionResponse& /* _return */, const CompactionRequest& /* rqst */) { + return; + } + void show_compact(ShowCompactResponse& /* _return */, const ShowCompactRequest& /* rqst */) { + return; + } + void add_dynamic_partitions(const AddDynamicPartitions& /* rqst */) { + return; + } + void get_next_notification(NotificationEventResponse& /* _return */, const NotificationEventRequest& /* rqst */) { + return; + } + void get_current_notificationEventId(CurrentNotificationEventId& /* _return */) { + return; + } + void fire_listener_event(FireEventResponse& /* _return */, const FireEventRequest& /* rqst */) { + return; + } + void flushCache() { + return; + } + void cm_recycle(CmRecycleResponse& /* _return */, const CmRecycleRequest& /* request */) { + return; + } + void get_file_metadata_by_expr(GetFileMetadataByExprResult& /* _return */, const GetFileMetadataByExprRequest& /* req */) { + return; + } + void get_file_metadata(GetFileMetadataResult& /* _return */, const GetFileMetadataRequest& /* req */) { + return; + } + void put_file_metadata(PutFileMetadataResult& /* _return */, const PutFileMetadataRequest& /* req */) { + return; + } + void clear_file_metadata(ClearFileMetadataResult& /* _return */, const ClearFileMetadataRequest& /* req */) { + return; + } + void cache_file_metadata(CacheFileMetadataResult& /* _return */, const CacheFileMetadataRequest& /* req */) { + return; + } + void get_metastore_db_uuid(std::string& /* _return */) { + return; + } +}; + +typedef struct _ThriftHiveMetastore_getMetaConf_args__isset { + _ThriftHiveMetastore_getMetaConf_args__isset() : key(false) {} + bool key :1; +} _ThriftHiveMetastore_getMetaConf_args__isset; + +class ThriftHiveMetastore_getMetaConf_args { + public: + + ThriftHiveMetastore_getMetaConf_args(const ThriftHiveMetastore_getMetaConf_args&); + ThriftHiveMetastore_getMetaConf_args& operator=(const ThriftHiveMetastore_getMetaConf_args&); + ThriftHiveMetastore_getMetaConf_args() : key() { + } + + virtual ~ThriftHiveMetastore_getMetaConf_args() throw(); + std::string key; + + _ThriftHiveMetastore_getMetaConf_args__isset __isset; + + void __set_key(const std::string& val); + + bool operator == (const ThriftHiveMetastore_getMetaConf_args & rhs) const + { + if (!(key == rhs.key)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_getMetaConf_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_getMetaConf_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_getMetaConf_pargs { + public: + + + virtual ~ThriftHiveMetastore_getMetaConf_pargs() throw(); + const std::string* key; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_getMetaConf_result__isset { + _ThriftHiveMetastore_getMetaConf_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_getMetaConf_result__isset; + +class ThriftHiveMetastore_getMetaConf_result { + public: + + ThriftHiveMetastore_getMetaConf_result(const ThriftHiveMetastore_getMetaConf_result&); + ThriftHiveMetastore_getMetaConf_result& operator=(const ThriftHiveMetastore_getMetaConf_result&); + ThriftHiveMetastore_getMetaConf_result() : success() { + } + + virtual ~ThriftHiveMetastore_getMetaConf_result() throw(); + std::string success; + MetaException o1; + + _ThriftHiveMetastore_getMetaConf_result__isset __isset; + + void __set_success(const std::string& val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_getMetaConf_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_getMetaConf_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_getMetaConf_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_getMetaConf_presult__isset { + _ThriftHiveMetastore_getMetaConf_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_getMetaConf_presult__isset; + +class ThriftHiveMetastore_getMetaConf_presult { + public: + + + virtual ~ThriftHiveMetastore_getMetaConf_presult() throw(); + std::string* success; + MetaException o1; + + _ThriftHiveMetastore_getMetaConf_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_setMetaConf_args__isset { + _ThriftHiveMetastore_setMetaConf_args__isset() : key(false), value(false) {} + bool key :1; + bool value :1; +} _ThriftHiveMetastore_setMetaConf_args__isset; + +class ThriftHiveMetastore_setMetaConf_args { + public: + + ThriftHiveMetastore_setMetaConf_args(const ThriftHiveMetastore_setMetaConf_args&); + ThriftHiveMetastore_setMetaConf_args& operator=(const ThriftHiveMetastore_setMetaConf_args&); + ThriftHiveMetastore_setMetaConf_args() : key(), value() { + } + + virtual ~ThriftHiveMetastore_setMetaConf_args() throw(); + std::string key; + std::string value; + + _ThriftHiveMetastore_setMetaConf_args__isset __isset; + + void __set_key(const std::string& val); + + void __set_value(const std::string& val); + + bool operator == (const ThriftHiveMetastore_setMetaConf_args & rhs) const + { + if (!(key == rhs.key)) + return false; + if (!(value == rhs.value)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_setMetaConf_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_setMetaConf_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_setMetaConf_pargs { + public: + + + virtual ~ThriftHiveMetastore_setMetaConf_pargs() throw(); + const std::string* key; + const std::string* value; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_setMetaConf_result__isset { + _ThriftHiveMetastore_setMetaConf_result__isset() : o1(false) {} + bool o1 :1; +} _ThriftHiveMetastore_setMetaConf_result__isset; + +class ThriftHiveMetastore_setMetaConf_result { + public: + + ThriftHiveMetastore_setMetaConf_result(const ThriftHiveMetastore_setMetaConf_result&); + ThriftHiveMetastore_setMetaConf_result& operator=(const ThriftHiveMetastore_setMetaConf_result&); + ThriftHiveMetastore_setMetaConf_result() { + } + + virtual ~ThriftHiveMetastore_setMetaConf_result() throw(); + MetaException o1; + + _ThriftHiveMetastore_setMetaConf_result__isset __isset; + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_setMetaConf_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_setMetaConf_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_setMetaConf_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_setMetaConf_presult__isset { + _ThriftHiveMetastore_setMetaConf_presult__isset() : o1(false) {} + bool o1 :1; +} _ThriftHiveMetastore_setMetaConf_presult__isset; + +class ThriftHiveMetastore_setMetaConf_presult { + public: + + + virtual ~ThriftHiveMetastore_setMetaConf_presult() throw(); + MetaException o1; + + _ThriftHiveMetastore_setMetaConf_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_create_database_args__isset { + _ThriftHiveMetastore_create_database_args__isset() : database(false) {} + bool database :1; +} _ThriftHiveMetastore_create_database_args__isset; + +class ThriftHiveMetastore_create_database_args { + public: + + ThriftHiveMetastore_create_database_args(const ThriftHiveMetastore_create_database_args&); + ThriftHiveMetastore_create_database_args& operator=(const ThriftHiveMetastore_create_database_args&); + ThriftHiveMetastore_create_database_args() { + } + + virtual ~ThriftHiveMetastore_create_database_args() throw(); + Database database; + + _ThriftHiveMetastore_create_database_args__isset __isset; + + void __set_database(const Database& val); + + bool operator == (const ThriftHiveMetastore_create_database_args & rhs) const + { + if (!(database == rhs.database)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_database_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_database_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_create_database_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_database_pargs() throw(); + const Database* database; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_database_result__isset { + _ThriftHiveMetastore_create_database_result__isset() : o1(false), o2(false), o3(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_create_database_result__isset; + +class ThriftHiveMetastore_create_database_result { + public: + + ThriftHiveMetastore_create_database_result(const ThriftHiveMetastore_create_database_result&); + ThriftHiveMetastore_create_database_result& operator=(const ThriftHiveMetastore_create_database_result&); + ThriftHiveMetastore_create_database_result() { + } + + virtual ~ThriftHiveMetastore_create_database_result() throw(); + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + + _ThriftHiveMetastore_create_database_result__isset __isset; + + void __set_o1(const AlreadyExistsException& val); + + void __set_o2(const InvalidObjectException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_create_database_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_database_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_database_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_database_presult__isset { + _ThriftHiveMetastore_create_database_presult__isset() : o1(false), o2(false), o3(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_create_database_presult__isset; + +class ThriftHiveMetastore_create_database_presult { + public: + + + virtual ~ThriftHiveMetastore_create_database_presult() throw(); + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + + _ThriftHiveMetastore_create_database_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_database_args__isset { + _ThriftHiveMetastore_get_database_args__isset() : name(false) {} + bool name :1; +} _ThriftHiveMetastore_get_database_args__isset; + +class ThriftHiveMetastore_get_database_args { + public: + + ThriftHiveMetastore_get_database_args(const ThriftHiveMetastore_get_database_args&); + ThriftHiveMetastore_get_database_args& operator=(const ThriftHiveMetastore_get_database_args&); + ThriftHiveMetastore_get_database_args() : name() { + } + + virtual ~ThriftHiveMetastore_get_database_args() throw(); + std::string name; + + _ThriftHiveMetastore_get_database_args__isset __isset; + + void __set_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_database_args & rhs) const + { + if (!(name == rhs.name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_database_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_database_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_database_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_database_pargs() throw(); + const std::string* name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_database_result__isset { + _ThriftHiveMetastore_get_database_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_database_result__isset; + +class ThriftHiveMetastore_get_database_result { + public: + + ThriftHiveMetastore_get_database_result(const ThriftHiveMetastore_get_database_result&); + ThriftHiveMetastore_get_database_result& operator=(const ThriftHiveMetastore_get_database_result&); + ThriftHiveMetastore_get_database_result() { + } + + virtual ~ThriftHiveMetastore_get_database_result() throw(); + Database success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_database_result__isset __isset; + + void __set_success(const Database& val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_database_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_database_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_database_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_database_presult__isset { + _ThriftHiveMetastore_get_database_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_database_presult__isset; + +class ThriftHiveMetastore_get_database_presult { + public: + + + virtual ~ThriftHiveMetastore_get_database_presult() throw(); + Database* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_database_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_database_args__isset { + _ThriftHiveMetastore_drop_database_args__isset() : name(false), deleteData(false), cascade(false) {} + bool name :1; + bool deleteData :1; + bool cascade :1; +} _ThriftHiveMetastore_drop_database_args__isset; + +class ThriftHiveMetastore_drop_database_args { + public: + + ThriftHiveMetastore_drop_database_args(const ThriftHiveMetastore_drop_database_args&); + ThriftHiveMetastore_drop_database_args& operator=(const ThriftHiveMetastore_drop_database_args&); + ThriftHiveMetastore_drop_database_args() : name(), deleteData(0), cascade(0) { + } + + virtual ~ThriftHiveMetastore_drop_database_args() throw(); + std::string name; + bool deleteData; + bool cascade; + + _ThriftHiveMetastore_drop_database_args__isset __isset; + + void __set_name(const std::string& val); + + void __set_deleteData(const bool val); + + void __set_cascade(const bool val); + + bool operator == (const ThriftHiveMetastore_drop_database_args & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + if (!(cascade == rhs.cascade)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_database_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_database_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_database_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_database_pargs() throw(); + const std::string* name; + const bool* deleteData; + const bool* cascade; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_database_result__isset { + _ThriftHiveMetastore_drop_database_result__isset() : o1(false), o2(false), o3(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_drop_database_result__isset; + +class ThriftHiveMetastore_drop_database_result { + public: + + ThriftHiveMetastore_drop_database_result(const ThriftHiveMetastore_drop_database_result&); + ThriftHiveMetastore_drop_database_result& operator=(const ThriftHiveMetastore_drop_database_result&); + ThriftHiveMetastore_drop_database_result() { + } + + virtual ~ThriftHiveMetastore_drop_database_result() throw(); + NoSuchObjectException o1; + InvalidOperationException o2; + MetaException o3; + + _ThriftHiveMetastore_drop_database_result__isset __isset; + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const InvalidOperationException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_drop_database_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_database_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_database_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_database_presult__isset { + _ThriftHiveMetastore_drop_database_presult__isset() : o1(false), o2(false), o3(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_drop_database_presult__isset; + +class ThriftHiveMetastore_drop_database_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_database_presult() throw(); + NoSuchObjectException o1; + InvalidOperationException o2; + MetaException o3; + + _ThriftHiveMetastore_drop_database_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_databases_args__isset { + _ThriftHiveMetastore_get_databases_args__isset() : pattern(false) {} + bool pattern :1; +} _ThriftHiveMetastore_get_databases_args__isset; + +class ThriftHiveMetastore_get_databases_args { + public: + + ThriftHiveMetastore_get_databases_args(const ThriftHiveMetastore_get_databases_args&); + ThriftHiveMetastore_get_databases_args& operator=(const ThriftHiveMetastore_get_databases_args&); + ThriftHiveMetastore_get_databases_args() : pattern() { + } + + virtual ~ThriftHiveMetastore_get_databases_args() throw(); + std::string pattern; + + _ThriftHiveMetastore_get_databases_args__isset __isset; + + void __set_pattern(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_databases_args & rhs) const + { + if (!(pattern == rhs.pattern)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_databases_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_databases_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_databases_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_databases_pargs() throw(); + const std::string* pattern; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_databases_result__isset { + _ThriftHiveMetastore_get_databases_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_databases_result__isset; + +class ThriftHiveMetastore_get_databases_result { + public: + + ThriftHiveMetastore_get_databases_result(const ThriftHiveMetastore_get_databases_result&); + ThriftHiveMetastore_get_databases_result& operator=(const ThriftHiveMetastore_get_databases_result&); + ThriftHiveMetastore_get_databases_result() { + } + + virtual ~ThriftHiveMetastore_get_databases_result() throw(); + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_databases_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_databases_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_databases_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_databases_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_databases_presult__isset { + _ThriftHiveMetastore_get_databases_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_databases_presult__isset; + +class ThriftHiveMetastore_get_databases_presult { + public: + + + virtual ~ThriftHiveMetastore_get_databases_presult() throw(); + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_databases_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_get_all_databases_args { + public: + + ThriftHiveMetastore_get_all_databases_args(const ThriftHiveMetastore_get_all_databases_args&); + ThriftHiveMetastore_get_all_databases_args& operator=(const ThriftHiveMetastore_get_all_databases_args&); + ThriftHiveMetastore_get_all_databases_args() { + } + + virtual ~ThriftHiveMetastore_get_all_databases_args() throw(); + + bool operator == (const ThriftHiveMetastore_get_all_databases_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_databases_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_all_databases_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_all_databases_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_all_databases_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_all_databases_result__isset { + _ThriftHiveMetastore_get_all_databases_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_all_databases_result__isset; + +class ThriftHiveMetastore_get_all_databases_result { + public: + + ThriftHiveMetastore_get_all_databases_result(const ThriftHiveMetastore_get_all_databases_result&); + ThriftHiveMetastore_get_all_databases_result& operator=(const ThriftHiveMetastore_get_all_databases_result&); + ThriftHiveMetastore_get_all_databases_result() { + } + + virtual ~ThriftHiveMetastore_get_all_databases_result() throw(); + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_all_databases_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_all_databases_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_databases_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_all_databases_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_all_databases_presult__isset { + _ThriftHiveMetastore_get_all_databases_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_all_databases_presult__isset; + +class ThriftHiveMetastore_get_all_databases_presult { + public: + + + virtual ~ThriftHiveMetastore_get_all_databases_presult() throw(); + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_all_databases_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_alter_database_args__isset { + _ThriftHiveMetastore_alter_database_args__isset() : dbname(false), db(false) {} + bool dbname :1; + bool db :1; +} _ThriftHiveMetastore_alter_database_args__isset; + +class ThriftHiveMetastore_alter_database_args { + public: + + ThriftHiveMetastore_alter_database_args(const ThriftHiveMetastore_alter_database_args&); + ThriftHiveMetastore_alter_database_args& operator=(const ThriftHiveMetastore_alter_database_args&); + ThriftHiveMetastore_alter_database_args() : dbname() { + } + + virtual ~ThriftHiveMetastore_alter_database_args() throw(); + std::string dbname; + Database db; + + _ThriftHiveMetastore_alter_database_args__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_db(const Database& val); + + bool operator == (const ThriftHiveMetastore_alter_database_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(db == rhs.db)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_database_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_database_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_alter_database_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_database_pargs() throw(); + const std::string* dbname; + const Database* db; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_database_result__isset { + _ThriftHiveMetastore_alter_database_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_database_result__isset; + +class ThriftHiveMetastore_alter_database_result { + public: + + ThriftHiveMetastore_alter_database_result(const ThriftHiveMetastore_alter_database_result&); + ThriftHiveMetastore_alter_database_result& operator=(const ThriftHiveMetastore_alter_database_result&); + ThriftHiveMetastore_alter_database_result() { + } + + virtual ~ThriftHiveMetastore_alter_database_result() throw(); + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_alter_database_result__isset __isset; + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_alter_database_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_database_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_database_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_database_presult__isset { + _ThriftHiveMetastore_alter_database_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_database_presult__isset; + +class ThriftHiveMetastore_alter_database_presult { + public: + + + virtual ~ThriftHiveMetastore_alter_database_presult() throw(); + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_alter_database_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_type_args__isset { + _ThriftHiveMetastore_get_type_args__isset() : name(false) {} + bool name :1; +} _ThriftHiveMetastore_get_type_args__isset; + +class ThriftHiveMetastore_get_type_args { + public: + + ThriftHiveMetastore_get_type_args(const ThriftHiveMetastore_get_type_args&); + ThriftHiveMetastore_get_type_args& operator=(const ThriftHiveMetastore_get_type_args&); + ThriftHiveMetastore_get_type_args() : name() { + } + + virtual ~ThriftHiveMetastore_get_type_args() throw(); + std::string name; + + _ThriftHiveMetastore_get_type_args__isset __isset; + + void __set_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_type_args & rhs) const + { + if (!(name == rhs.name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_type_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_type_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_type_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_type_pargs() throw(); + const std::string* name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_type_result__isset { + _ThriftHiveMetastore_get_type_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_type_result__isset; + +class ThriftHiveMetastore_get_type_result { + public: + + ThriftHiveMetastore_get_type_result(const ThriftHiveMetastore_get_type_result&); + ThriftHiveMetastore_get_type_result& operator=(const ThriftHiveMetastore_get_type_result&); + ThriftHiveMetastore_get_type_result() { + } + + virtual ~ThriftHiveMetastore_get_type_result() throw(); + Type success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_type_result__isset __isset; + + void __set_success(const Type& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_type_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_type_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_type_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_type_presult__isset { + _ThriftHiveMetastore_get_type_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_type_presult__isset; + +class ThriftHiveMetastore_get_type_presult { + public: + + + virtual ~ThriftHiveMetastore_get_type_presult() throw(); + Type* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_type_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_create_type_args__isset { + _ThriftHiveMetastore_create_type_args__isset() : type(false) {} + bool type :1; +} _ThriftHiveMetastore_create_type_args__isset; + +class ThriftHiveMetastore_create_type_args { + public: + + ThriftHiveMetastore_create_type_args(const ThriftHiveMetastore_create_type_args&); + ThriftHiveMetastore_create_type_args& operator=(const ThriftHiveMetastore_create_type_args&); + ThriftHiveMetastore_create_type_args() { + } + + virtual ~ThriftHiveMetastore_create_type_args() throw(); + Type type; + + _ThriftHiveMetastore_create_type_args__isset __isset; + + void __set_type(const Type& val); + + bool operator == (const ThriftHiveMetastore_create_type_args & rhs) const + { + if (!(type == rhs.type)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_type_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_type_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_create_type_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_type_pargs() throw(); + const Type* type; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_type_result__isset { + _ThriftHiveMetastore_create_type_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_create_type_result__isset; + +class ThriftHiveMetastore_create_type_result { + public: + + ThriftHiveMetastore_create_type_result(const ThriftHiveMetastore_create_type_result&); + ThriftHiveMetastore_create_type_result& operator=(const ThriftHiveMetastore_create_type_result&); + ThriftHiveMetastore_create_type_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_create_type_result() throw(); + bool success; + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + + _ThriftHiveMetastore_create_type_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const AlreadyExistsException& val); + + void __set_o2(const InvalidObjectException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_create_type_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_type_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_type_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_type_presult__isset { + _ThriftHiveMetastore_create_type_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_create_type_presult__isset; + +class ThriftHiveMetastore_create_type_presult { + public: + + + virtual ~ThriftHiveMetastore_create_type_presult() throw(); + bool* success; + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + + _ThriftHiveMetastore_create_type_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_type_args__isset { + _ThriftHiveMetastore_drop_type_args__isset() : type(false) {} + bool type :1; +} _ThriftHiveMetastore_drop_type_args__isset; + +class ThriftHiveMetastore_drop_type_args { + public: + + ThriftHiveMetastore_drop_type_args(const ThriftHiveMetastore_drop_type_args&); + ThriftHiveMetastore_drop_type_args& operator=(const ThriftHiveMetastore_drop_type_args&); + ThriftHiveMetastore_drop_type_args() : type() { + } + + virtual ~ThriftHiveMetastore_drop_type_args() throw(); + std::string type; + + _ThriftHiveMetastore_drop_type_args__isset __isset; + + void __set_type(const std::string& val); + + bool operator == (const ThriftHiveMetastore_drop_type_args & rhs) const + { + if (!(type == rhs.type)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_type_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_type_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_type_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_type_pargs() throw(); + const std::string* type; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_type_result__isset { + _ThriftHiveMetastore_drop_type_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_type_result__isset; + +class ThriftHiveMetastore_drop_type_result { + public: + + ThriftHiveMetastore_drop_type_result(const ThriftHiveMetastore_drop_type_result&); + ThriftHiveMetastore_drop_type_result& operator=(const ThriftHiveMetastore_drop_type_result&); + ThriftHiveMetastore_drop_type_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_type_result() throw(); + bool success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_drop_type_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_drop_type_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_type_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_type_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_type_presult__isset { + _ThriftHiveMetastore_drop_type_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_type_presult__isset; + +class ThriftHiveMetastore_drop_type_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_type_presult() throw(); + bool* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_drop_type_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_type_all_args__isset { + _ThriftHiveMetastore_get_type_all_args__isset() : name(false) {} + bool name :1; +} _ThriftHiveMetastore_get_type_all_args__isset; + +class ThriftHiveMetastore_get_type_all_args { + public: + + ThriftHiveMetastore_get_type_all_args(const ThriftHiveMetastore_get_type_all_args&); + ThriftHiveMetastore_get_type_all_args& operator=(const ThriftHiveMetastore_get_type_all_args&); + ThriftHiveMetastore_get_type_all_args() : name() { + } + + virtual ~ThriftHiveMetastore_get_type_all_args() throw(); + std::string name; + + _ThriftHiveMetastore_get_type_all_args__isset __isset; + + void __set_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_type_all_args & rhs) const + { + if (!(name == rhs.name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_type_all_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_type_all_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_type_all_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_type_all_pargs() throw(); + const std::string* name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_type_all_result__isset { + _ThriftHiveMetastore_get_type_all_result__isset() : success(false), o2(false) {} + bool success :1; + bool o2 :1; +} _ThriftHiveMetastore_get_type_all_result__isset; + +class ThriftHiveMetastore_get_type_all_result { + public: + + ThriftHiveMetastore_get_type_all_result(const ThriftHiveMetastore_get_type_all_result&); + ThriftHiveMetastore_get_type_all_result& operator=(const ThriftHiveMetastore_get_type_all_result&); + ThriftHiveMetastore_get_type_all_result() { + } + + virtual ~ThriftHiveMetastore_get_type_all_result() throw(); + std::map success; + MetaException o2; + + _ThriftHiveMetastore_get_type_all_result__isset __isset; + + void __set_success(const std::map & val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_type_all_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_type_all_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_type_all_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_type_all_presult__isset { + _ThriftHiveMetastore_get_type_all_presult__isset() : success(false), o2(false) {} + bool success :1; + bool o2 :1; +} _ThriftHiveMetastore_get_type_all_presult__isset; + +class ThriftHiveMetastore_get_type_all_presult { + public: + + + virtual ~ThriftHiveMetastore_get_type_all_presult() throw(); + std::map * success; + MetaException o2; + + _ThriftHiveMetastore_get_type_all_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_fields_args__isset { + _ThriftHiveMetastore_get_fields_args__isset() : db_name(false), table_name(false) {} + bool db_name :1; + bool table_name :1; +} _ThriftHiveMetastore_get_fields_args__isset; + +class ThriftHiveMetastore_get_fields_args { + public: + + ThriftHiveMetastore_get_fields_args(const ThriftHiveMetastore_get_fields_args&); + ThriftHiveMetastore_get_fields_args& operator=(const ThriftHiveMetastore_get_fields_args&); + ThriftHiveMetastore_get_fields_args() : db_name(), table_name() { + } + + virtual ~ThriftHiveMetastore_get_fields_args() throw(); + std::string db_name; + std::string table_name; + + _ThriftHiveMetastore_get_fields_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_table_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_fields_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_fields_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_fields_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_fields_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_fields_pargs() throw(); + const std::string* db_name; + const std::string* table_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_fields_result__isset { + _ThriftHiveMetastore_get_fields_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_get_fields_result__isset; + +class ThriftHiveMetastore_get_fields_result { + public: + + ThriftHiveMetastore_get_fields_result(const ThriftHiveMetastore_get_fields_result&); + ThriftHiveMetastore_get_fields_result& operator=(const ThriftHiveMetastore_get_fields_result&); + ThriftHiveMetastore_get_fields_result() { + } + + virtual ~ThriftHiveMetastore_get_fields_result() throw(); + std::vector success; + MetaException o1; + UnknownTableException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_fields_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + void __set_o2(const UnknownTableException& val); + + void __set_o3(const UnknownDBException& val); + + bool operator == (const ThriftHiveMetastore_get_fields_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_fields_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_fields_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_fields_presult__isset { + _ThriftHiveMetastore_get_fields_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_get_fields_presult__isset; + +class ThriftHiveMetastore_get_fields_presult { + public: + + + virtual ~ThriftHiveMetastore_get_fields_presult() throw(); + std::vector * success; + MetaException o1; + UnknownTableException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_fields_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_fields_with_environment_context_args__isset { + _ThriftHiveMetastore_get_fields_with_environment_context_args__isset() : db_name(false), table_name(false), environment_context(false) {} + bool db_name :1; + bool table_name :1; + bool environment_context :1; +} _ThriftHiveMetastore_get_fields_with_environment_context_args__isset; + +class ThriftHiveMetastore_get_fields_with_environment_context_args { + public: + + ThriftHiveMetastore_get_fields_with_environment_context_args(const ThriftHiveMetastore_get_fields_with_environment_context_args&); + ThriftHiveMetastore_get_fields_with_environment_context_args& operator=(const ThriftHiveMetastore_get_fields_with_environment_context_args&); + ThriftHiveMetastore_get_fields_with_environment_context_args() : db_name(), table_name() { + } + + virtual ~ThriftHiveMetastore_get_fields_with_environment_context_args() throw(); + std::string db_name; + std::string table_name; + EnvironmentContext environment_context; + + _ThriftHiveMetastore_get_fields_with_environment_context_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_table_name(const std::string& val); + + void __set_environment_context(const EnvironmentContext& val); + + bool operator == (const ThriftHiveMetastore_get_fields_with_environment_context_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(environment_context == rhs.environment_context)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_fields_with_environment_context_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_fields_with_environment_context_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_fields_with_environment_context_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_fields_with_environment_context_pargs() throw(); + const std::string* db_name; + const std::string* table_name; + const EnvironmentContext* environment_context; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_fields_with_environment_context_result__isset { + _ThriftHiveMetastore_get_fields_with_environment_context_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_get_fields_with_environment_context_result__isset; + +class ThriftHiveMetastore_get_fields_with_environment_context_result { + public: + + ThriftHiveMetastore_get_fields_with_environment_context_result(const ThriftHiveMetastore_get_fields_with_environment_context_result&); + ThriftHiveMetastore_get_fields_with_environment_context_result& operator=(const ThriftHiveMetastore_get_fields_with_environment_context_result&); + ThriftHiveMetastore_get_fields_with_environment_context_result() { + } + + virtual ~ThriftHiveMetastore_get_fields_with_environment_context_result() throw(); + std::vector success; + MetaException o1; + UnknownTableException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_fields_with_environment_context_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + void __set_o2(const UnknownTableException& val); + + void __set_o3(const UnknownDBException& val); + + bool operator == (const ThriftHiveMetastore_get_fields_with_environment_context_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_fields_with_environment_context_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_fields_with_environment_context_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_fields_with_environment_context_presult__isset { + _ThriftHiveMetastore_get_fields_with_environment_context_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_get_fields_with_environment_context_presult__isset; + +class ThriftHiveMetastore_get_fields_with_environment_context_presult { + public: + + + virtual ~ThriftHiveMetastore_get_fields_with_environment_context_presult() throw(); + std::vector * success; + MetaException o1; + UnknownTableException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_fields_with_environment_context_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_schema_args__isset { + _ThriftHiveMetastore_get_schema_args__isset() : db_name(false), table_name(false) {} + bool db_name :1; + bool table_name :1; +} _ThriftHiveMetastore_get_schema_args__isset; + +class ThriftHiveMetastore_get_schema_args { + public: + + ThriftHiveMetastore_get_schema_args(const ThriftHiveMetastore_get_schema_args&); + ThriftHiveMetastore_get_schema_args& operator=(const ThriftHiveMetastore_get_schema_args&); + ThriftHiveMetastore_get_schema_args() : db_name(), table_name() { + } + + virtual ~ThriftHiveMetastore_get_schema_args() throw(); + std::string db_name; + std::string table_name; + + _ThriftHiveMetastore_get_schema_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_table_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_schema_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_schema_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_schema_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_schema_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_schema_pargs() throw(); + const std::string* db_name; + const std::string* table_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_schema_result__isset { + _ThriftHiveMetastore_get_schema_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_get_schema_result__isset; + +class ThriftHiveMetastore_get_schema_result { + public: + + ThriftHiveMetastore_get_schema_result(const ThriftHiveMetastore_get_schema_result&); + ThriftHiveMetastore_get_schema_result& operator=(const ThriftHiveMetastore_get_schema_result&); + ThriftHiveMetastore_get_schema_result() { + } + + virtual ~ThriftHiveMetastore_get_schema_result() throw(); + std::vector success; + MetaException o1; + UnknownTableException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_schema_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + void __set_o2(const UnknownTableException& val); + + void __set_o3(const UnknownDBException& val); + + bool operator == (const ThriftHiveMetastore_get_schema_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_schema_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_schema_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_schema_presult__isset { + _ThriftHiveMetastore_get_schema_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_get_schema_presult__isset; + +class ThriftHiveMetastore_get_schema_presult { + public: + + + virtual ~ThriftHiveMetastore_get_schema_presult() throw(); + std::vector * success; + MetaException o1; + UnknownTableException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_schema_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_schema_with_environment_context_args__isset { + _ThriftHiveMetastore_get_schema_with_environment_context_args__isset() : db_name(false), table_name(false), environment_context(false) {} + bool db_name :1; + bool table_name :1; + bool environment_context :1; +} _ThriftHiveMetastore_get_schema_with_environment_context_args__isset; + +class ThriftHiveMetastore_get_schema_with_environment_context_args { + public: + + ThriftHiveMetastore_get_schema_with_environment_context_args(const ThriftHiveMetastore_get_schema_with_environment_context_args&); + ThriftHiveMetastore_get_schema_with_environment_context_args& operator=(const ThriftHiveMetastore_get_schema_with_environment_context_args&); + ThriftHiveMetastore_get_schema_with_environment_context_args() : db_name(), table_name() { + } + + virtual ~ThriftHiveMetastore_get_schema_with_environment_context_args() throw(); + std::string db_name; + std::string table_name; + EnvironmentContext environment_context; + + _ThriftHiveMetastore_get_schema_with_environment_context_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_table_name(const std::string& val); + + void __set_environment_context(const EnvironmentContext& val); + + bool operator == (const ThriftHiveMetastore_get_schema_with_environment_context_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(environment_context == rhs.environment_context)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_schema_with_environment_context_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_schema_with_environment_context_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_schema_with_environment_context_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_schema_with_environment_context_pargs() throw(); + const std::string* db_name; + const std::string* table_name; + const EnvironmentContext* environment_context; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_schema_with_environment_context_result__isset { + _ThriftHiveMetastore_get_schema_with_environment_context_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_get_schema_with_environment_context_result__isset; + +class ThriftHiveMetastore_get_schema_with_environment_context_result { + public: + + ThriftHiveMetastore_get_schema_with_environment_context_result(const ThriftHiveMetastore_get_schema_with_environment_context_result&); + ThriftHiveMetastore_get_schema_with_environment_context_result& operator=(const ThriftHiveMetastore_get_schema_with_environment_context_result&); + ThriftHiveMetastore_get_schema_with_environment_context_result() { + } + + virtual ~ThriftHiveMetastore_get_schema_with_environment_context_result() throw(); + std::vector success; + MetaException o1; + UnknownTableException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_schema_with_environment_context_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + void __set_o2(const UnknownTableException& val); + + void __set_o3(const UnknownDBException& val); + + bool operator == (const ThriftHiveMetastore_get_schema_with_environment_context_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_schema_with_environment_context_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_schema_with_environment_context_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_schema_with_environment_context_presult__isset { + _ThriftHiveMetastore_get_schema_with_environment_context_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_get_schema_with_environment_context_presult__isset; + +class ThriftHiveMetastore_get_schema_with_environment_context_presult { + public: + + + virtual ~ThriftHiveMetastore_get_schema_with_environment_context_presult() throw(); + std::vector * success; + MetaException o1; + UnknownTableException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_schema_with_environment_context_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_create_table_args__isset { + _ThriftHiveMetastore_create_table_args__isset() : tbl(false) {} + bool tbl :1; +} _ThriftHiveMetastore_create_table_args__isset; + +class ThriftHiveMetastore_create_table_args { + public: + + ThriftHiveMetastore_create_table_args(const ThriftHiveMetastore_create_table_args&); + ThriftHiveMetastore_create_table_args& operator=(const ThriftHiveMetastore_create_table_args&); + ThriftHiveMetastore_create_table_args() { + } + + virtual ~ThriftHiveMetastore_create_table_args() throw(); + Table tbl; + + _ThriftHiveMetastore_create_table_args__isset __isset; + + void __set_tbl(const Table& val); + + bool operator == (const ThriftHiveMetastore_create_table_args & rhs) const + { + if (!(tbl == rhs.tbl)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_table_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_table_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_create_table_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_table_pargs() throw(); + const Table* tbl; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_table_result__isset { + _ThriftHiveMetastore_create_table_result__isset() : o1(false), o2(false), o3(false), o4(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_create_table_result__isset; + +class ThriftHiveMetastore_create_table_result { + public: + + ThriftHiveMetastore_create_table_result(const ThriftHiveMetastore_create_table_result&); + ThriftHiveMetastore_create_table_result& operator=(const ThriftHiveMetastore_create_table_result&); + ThriftHiveMetastore_create_table_result() { + } + + virtual ~ThriftHiveMetastore_create_table_result() throw(); + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + NoSuchObjectException o4; + + _ThriftHiveMetastore_create_table_result__isset __isset; + + void __set_o1(const AlreadyExistsException& val); + + void __set_o2(const InvalidObjectException& val); + + void __set_o3(const MetaException& val); + + void __set_o4(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_create_table_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_table_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_table_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_table_presult__isset { + _ThriftHiveMetastore_create_table_presult__isset() : o1(false), o2(false), o3(false), o4(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_create_table_presult__isset; + +class ThriftHiveMetastore_create_table_presult { + public: + + + virtual ~ThriftHiveMetastore_create_table_presult() throw(); + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + NoSuchObjectException o4; + + _ThriftHiveMetastore_create_table_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_create_table_with_environment_context_args__isset { + _ThriftHiveMetastore_create_table_with_environment_context_args__isset() : tbl(false), environment_context(false) {} + bool tbl :1; + bool environment_context :1; +} _ThriftHiveMetastore_create_table_with_environment_context_args__isset; + +class ThriftHiveMetastore_create_table_with_environment_context_args { + public: + + ThriftHiveMetastore_create_table_with_environment_context_args(const ThriftHiveMetastore_create_table_with_environment_context_args&); + ThriftHiveMetastore_create_table_with_environment_context_args& operator=(const ThriftHiveMetastore_create_table_with_environment_context_args&); + ThriftHiveMetastore_create_table_with_environment_context_args() { + } + + virtual ~ThriftHiveMetastore_create_table_with_environment_context_args() throw(); + Table tbl; + EnvironmentContext environment_context; + + _ThriftHiveMetastore_create_table_with_environment_context_args__isset __isset; + + void __set_tbl(const Table& val); + + void __set_environment_context(const EnvironmentContext& val); + + bool operator == (const ThriftHiveMetastore_create_table_with_environment_context_args & rhs) const + { + if (!(tbl == rhs.tbl)) + return false; + if (!(environment_context == rhs.environment_context)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_table_with_environment_context_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_table_with_environment_context_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_create_table_with_environment_context_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_table_with_environment_context_pargs() throw(); + const Table* tbl; + const EnvironmentContext* environment_context; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_table_with_environment_context_result__isset { + _ThriftHiveMetastore_create_table_with_environment_context_result__isset() : o1(false), o2(false), o3(false), o4(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_create_table_with_environment_context_result__isset; + +class ThriftHiveMetastore_create_table_with_environment_context_result { + public: + + ThriftHiveMetastore_create_table_with_environment_context_result(const ThriftHiveMetastore_create_table_with_environment_context_result&); + ThriftHiveMetastore_create_table_with_environment_context_result& operator=(const ThriftHiveMetastore_create_table_with_environment_context_result&); + ThriftHiveMetastore_create_table_with_environment_context_result() { + } + + virtual ~ThriftHiveMetastore_create_table_with_environment_context_result() throw(); + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + NoSuchObjectException o4; + + _ThriftHiveMetastore_create_table_with_environment_context_result__isset __isset; + + void __set_o1(const AlreadyExistsException& val); + + void __set_o2(const InvalidObjectException& val); + + void __set_o3(const MetaException& val); + + void __set_o4(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_create_table_with_environment_context_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_table_with_environment_context_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_table_with_environment_context_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_table_with_environment_context_presult__isset { + _ThriftHiveMetastore_create_table_with_environment_context_presult__isset() : o1(false), o2(false), o3(false), o4(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_create_table_with_environment_context_presult__isset; + +class ThriftHiveMetastore_create_table_with_environment_context_presult { + public: + + + virtual ~ThriftHiveMetastore_create_table_with_environment_context_presult() throw(); + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + NoSuchObjectException o4; + + _ThriftHiveMetastore_create_table_with_environment_context_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_create_table_with_constraints_args__isset { + _ThriftHiveMetastore_create_table_with_constraints_args__isset() : tbl(false), primaryKeys(false), foreignKeys(false), uniqueConstraints(false), notNullConstraints(false) {} + bool tbl :1; + bool primaryKeys :1; + bool foreignKeys :1; + bool uniqueConstraints :1; + bool notNullConstraints :1; +} _ThriftHiveMetastore_create_table_with_constraints_args__isset; + +class ThriftHiveMetastore_create_table_with_constraints_args { + public: + + ThriftHiveMetastore_create_table_with_constraints_args(const ThriftHiveMetastore_create_table_with_constraints_args&); + ThriftHiveMetastore_create_table_with_constraints_args& operator=(const ThriftHiveMetastore_create_table_with_constraints_args&); + ThriftHiveMetastore_create_table_with_constraints_args() { + } + + virtual ~ThriftHiveMetastore_create_table_with_constraints_args() throw(); + Table tbl; + std::vector primaryKeys; + std::vector foreignKeys; + std::vector uniqueConstraints; + std::vector notNullConstraints; + + _ThriftHiveMetastore_create_table_with_constraints_args__isset __isset; + + void __set_tbl(const Table& val); + + void __set_primaryKeys(const std::vector & val); + + void __set_foreignKeys(const std::vector & val); + + void __set_uniqueConstraints(const std::vector & val); + + void __set_notNullConstraints(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_create_table_with_constraints_args & rhs) const + { + if (!(tbl == rhs.tbl)) + return false; + if (!(primaryKeys == rhs.primaryKeys)) + return false; + if (!(foreignKeys == rhs.foreignKeys)) + return false; + if (!(uniqueConstraints == rhs.uniqueConstraints)) + return false; + if (!(notNullConstraints == rhs.notNullConstraints)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_table_with_constraints_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_table_with_constraints_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_create_table_with_constraints_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_table_with_constraints_pargs() throw(); + const Table* tbl; + const std::vector * primaryKeys; + const std::vector * foreignKeys; + const std::vector * uniqueConstraints; + const std::vector * notNullConstraints; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_table_with_constraints_result__isset { + _ThriftHiveMetastore_create_table_with_constraints_result__isset() : o1(false), o2(false), o3(false), o4(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_create_table_with_constraints_result__isset; + +class ThriftHiveMetastore_create_table_with_constraints_result { + public: + + ThriftHiveMetastore_create_table_with_constraints_result(const ThriftHiveMetastore_create_table_with_constraints_result&); + ThriftHiveMetastore_create_table_with_constraints_result& operator=(const ThriftHiveMetastore_create_table_with_constraints_result&); + ThriftHiveMetastore_create_table_with_constraints_result() { + } + + virtual ~ThriftHiveMetastore_create_table_with_constraints_result() throw(); + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + NoSuchObjectException o4; + + _ThriftHiveMetastore_create_table_with_constraints_result__isset __isset; + + void __set_o1(const AlreadyExistsException& val); + + void __set_o2(const InvalidObjectException& val); + + void __set_o3(const MetaException& val); + + void __set_o4(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_create_table_with_constraints_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_table_with_constraints_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_table_with_constraints_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_table_with_constraints_presult__isset { + _ThriftHiveMetastore_create_table_with_constraints_presult__isset() : o1(false), o2(false), o3(false), o4(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_create_table_with_constraints_presult__isset; + +class ThriftHiveMetastore_create_table_with_constraints_presult { + public: + + + virtual ~ThriftHiveMetastore_create_table_with_constraints_presult() throw(); + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + NoSuchObjectException o4; + + _ThriftHiveMetastore_create_table_with_constraints_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_constraint_args__isset { + _ThriftHiveMetastore_drop_constraint_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_drop_constraint_args__isset; + +class ThriftHiveMetastore_drop_constraint_args { + public: + + ThriftHiveMetastore_drop_constraint_args(const ThriftHiveMetastore_drop_constraint_args&); + ThriftHiveMetastore_drop_constraint_args& operator=(const ThriftHiveMetastore_drop_constraint_args&); + ThriftHiveMetastore_drop_constraint_args() { + } + + virtual ~ThriftHiveMetastore_drop_constraint_args() throw(); + DropConstraintRequest req; + + _ThriftHiveMetastore_drop_constraint_args__isset __isset; + + void __set_req(const DropConstraintRequest& val); + + bool operator == (const ThriftHiveMetastore_drop_constraint_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_constraint_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_constraint_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_constraint_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_constraint_pargs() throw(); + const DropConstraintRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_constraint_result__isset { + _ThriftHiveMetastore_drop_constraint_result__isset() : o1(false), o3(false) {} + bool o1 :1; + bool o3 :1; +} _ThriftHiveMetastore_drop_constraint_result__isset; + +class ThriftHiveMetastore_drop_constraint_result { + public: + + ThriftHiveMetastore_drop_constraint_result(const ThriftHiveMetastore_drop_constraint_result&); + ThriftHiveMetastore_drop_constraint_result& operator=(const ThriftHiveMetastore_drop_constraint_result&); + ThriftHiveMetastore_drop_constraint_result() { + } + + virtual ~ThriftHiveMetastore_drop_constraint_result() throw(); + NoSuchObjectException o1; + MetaException o3; + + _ThriftHiveMetastore_drop_constraint_result__isset __isset; + + void __set_o1(const NoSuchObjectException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_drop_constraint_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_constraint_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_constraint_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_constraint_presult__isset { + _ThriftHiveMetastore_drop_constraint_presult__isset() : o1(false), o3(false) {} + bool o1 :1; + bool o3 :1; +} _ThriftHiveMetastore_drop_constraint_presult__isset; + +class ThriftHiveMetastore_drop_constraint_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_constraint_presult() throw(); + NoSuchObjectException o1; + MetaException o3; + + _ThriftHiveMetastore_drop_constraint_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_primary_key_args__isset { + _ThriftHiveMetastore_add_primary_key_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_add_primary_key_args__isset; + +class ThriftHiveMetastore_add_primary_key_args { + public: + + ThriftHiveMetastore_add_primary_key_args(const ThriftHiveMetastore_add_primary_key_args&); + ThriftHiveMetastore_add_primary_key_args& operator=(const ThriftHiveMetastore_add_primary_key_args&); + ThriftHiveMetastore_add_primary_key_args() { + } + + virtual ~ThriftHiveMetastore_add_primary_key_args() throw(); + AddPrimaryKeyRequest req; + + _ThriftHiveMetastore_add_primary_key_args__isset __isset; + + void __set_req(const AddPrimaryKeyRequest& val); + + bool operator == (const ThriftHiveMetastore_add_primary_key_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_primary_key_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_primary_key_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_primary_key_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_primary_key_pargs() throw(); + const AddPrimaryKeyRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_primary_key_result__isset { + _ThriftHiveMetastore_add_primary_key_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_add_primary_key_result__isset; + +class ThriftHiveMetastore_add_primary_key_result { + public: + + ThriftHiveMetastore_add_primary_key_result(const ThriftHiveMetastore_add_primary_key_result&); + ThriftHiveMetastore_add_primary_key_result& operator=(const ThriftHiveMetastore_add_primary_key_result&); + ThriftHiveMetastore_add_primary_key_result() { + } + + virtual ~ThriftHiveMetastore_add_primary_key_result() throw(); + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_add_primary_key_result__isset __isset; + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_add_primary_key_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_primary_key_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_primary_key_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_primary_key_presult__isset { + _ThriftHiveMetastore_add_primary_key_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_add_primary_key_presult__isset; + +class ThriftHiveMetastore_add_primary_key_presult { + public: + + + virtual ~ThriftHiveMetastore_add_primary_key_presult() throw(); + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_add_primary_key_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_foreign_key_args__isset { + _ThriftHiveMetastore_add_foreign_key_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_add_foreign_key_args__isset; + +class ThriftHiveMetastore_add_foreign_key_args { + public: + + ThriftHiveMetastore_add_foreign_key_args(const ThriftHiveMetastore_add_foreign_key_args&); + ThriftHiveMetastore_add_foreign_key_args& operator=(const ThriftHiveMetastore_add_foreign_key_args&); + ThriftHiveMetastore_add_foreign_key_args() { + } + + virtual ~ThriftHiveMetastore_add_foreign_key_args() throw(); + AddForeignKeyRequest req; + + _ThriftHiveMetastore_add_foreign_key_args__isset __isset; + + void __set_req(const AddForeignKeyRequest& val); + + bool operator == (const ThriftHiveMetastore_add_foreign_key_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_foreign_key_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_foreign_key_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_foreign_key_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_foreign_key_pargs() throw(); + const AddForeignKeyRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_foreign_key_result__isset { + _ThriftHiveMetastore_add_foreign_key_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_add_foreign_key_result__isset; + +class ThriftHiveMetastore_add_foreign_key_result { + public: + + ThriftHiveMetastore_add_foreign_key_result(const ThriftHiveMetastore_add_foreign_key_result&); + ThriftHiveMetastore_add_foreign_key_result& operator=(const ThriftHiveMetastore_add_foreign_key_result&); + ThriftHiveMetastore_add_foreign_key_result() { + } + + virtual ~ThriftHiveMetastore_add_foreign_key_result() throw(); + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_add_foreign_key_result__isset __isset; + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_add_foreign_key_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_foreign_key_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_foreign_key_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_foreign_key_presult__isset { + _ThriftHiveMetastore_add_foreign_key_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_add_foreign_key_presult__isset; + +class ThriftHiveMetastore_add_foreign_key_presult { + public: + + + virtual ~ThriftHiveMetastore_add_foreign_key_presult() throw(); + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_add_foreign_key_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_unique_constraint_args__isset { + _ThriftHiveMetastore_add_unique_constraint_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_add_unique_constraint_args__isset; + +class ThriftHiveMetastore_add_unique_constraint_args { + public: + + ThriftHiveMetastore_add_unique_constraint_args(const ThriftHiveMetastore_add_unique_constraint_args&); + ThriftHiveMetastore_add_unique_constraint_args& operator=(const ThriftHiveMetastore_add_unique_constraint_args&); + ThriftHiveMetastore_add_unique_constraint_args() { + } + + virtual ~ThriftHiveMetastore_add_unique_constraint_args() throw(); + AddUniqueConstraintRequest req; + + _ThriftHiveMetastore_add_unique_constraint_args__isset __isset; + + void __set_req(const AddUniqueConstraintRequest& val); + + bool operator == (const ThriftHiveMetastore_add_unique_constraint_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_unique_constraint_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_unique_constraint_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_unique_constraint_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_unique_constraint_pargs() throw(); + const AddUniqueConstraintRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_unique_constraint_result__isset { + _ThriftHiveMetastore_add_unique_constraint_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_add_unique_constraint_result__isset; + +class ThriftHiveMetastore_add_unique_constraint_result { + public: + + ThriftHiveMetastore_add_unique_constraint_result(const ThriftHiveMetastore_add_unique_constraint_result&); + ThriftHiveMetastore_add_unique_constraint_result& operator=(const ThriftHiveMetastore_add_unique_constraint_result&); + ThriftHiveMetastore_add_unique_constraint_result() { + } + + virtual ~ThriftHiveMetastore_add_unique_constraint_result() throw(); + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_add_unique_constraint_result__isset __isset; + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_add_unique_constraint_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_unique_constraint_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_unique_constraint_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_unique_constraint_presult__isset { + _ThriftHiveMetastore_add_unique_constraint_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_add_unique_constraint_presult__isset; + +class ThriftHiveMetastore_add_unique_constraint_presult { + public: + + + virtual ~ThriftHiveMetastore_add_unique_constraint_presult() throw(); + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_add_unique_constraint_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_not_null_constraint_args__isset { + _ThriftHiveMetastore_add_not_null_constraint_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_add_not_null_constraint_args__isset; + +class ThriftHiveMetastore_add_not_null_constraint_args { + public: + + ThriftHiveMetastore_add_not_null_constraint_args(const ThriftHiveMetastore_add_not_null_constraint_args&); + ThriftHiveMetastore_add_not_null_constraint_args& operator=(const ThriftHiveMetastore_add_not_null_constraint_args&); + ThriftHiveMetastore_add_not_null_constraint_args() { + } + + virtual ~ThriftHiveMetastore_add_not_null_constraint_args() throw(); + AddNotNullConstraintRequest req; + + _ThriftHiveMetastore_add_not_null_constraint_args__isset __isset; + + void __set_req(const AddNotNullConstraintRequest& val); + + bool operator == (const ThriftHiveMetastore_add_not_null_constraint_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_not_null_constraint_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_not_null_constraint_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_not_null_constraint_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_not_null_constraint_pargs() throw(); + const AddNotNullConstraintRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_not_null_constraint_result__isset { + _ThriftHiveMetastore_add_not_null_constraint_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_add_not_null_constraint_result__isset; + +class ThriftHiveMetastore_add_not_null_constraint_result { + public: + + ThriftHiveMetastore_add_not_null_constraint_result(const ThriftHiveMetastore_add_not_null_constraint_result&); + ThriftHiveMetastore_add_not_null_constraint_result& operator=(const ThriftHiveMetastore_add_not_null_constraint_result&); + ThriftHiveMetastore_add_not_null_constraint_result() { + } + + virtual ~ThriftHiveMetastore_add_not_null_constraint_result() throw(); + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_add_not_null_constraint_result__isset __isset; + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_add_not_null_constraint_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_not_null_constraint_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_not_null_constraint_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_not_null_constraint_presult__isset { + _ThriftHiveMetastore_add_not_null_constraint_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_add_not_null_constraint_presult__isset; + +class ThriftHiveMetastore_add_not_null_constraint_presult { + public: + + + virtual ~ThriftHiveMetastore_add_not_null_constraint_presult() throw(); + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_add_not_null_constraint_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_table_args__isset { + _ThriftHiveMetastore_drop_table_args__isset() : dbname(false), name(false), deleteData(false) {} + bool dbname :1; + bool name :1; + bool deleteData :1; +} _ThriftHiveMetastore_drop_table_args__isset; + +class ThriftHiveMetastore_drop_table_args { + public: + + ThriftHiveMetastore_drop_table_args(const ThriftHiveMetastore_drop_table_args&); + ThriftHiveMetastore_drop_table_args& operator=(const ThriftHiveMetastore_drop_table_args&); + ThriftHiveMetastore_drop_table_args() : dbname(), name(), deleteData(0) { + } + + virtual ~ThriftHiveMetastore_drop_table_args() throw(); + std::string dbname; + std::string name; + bool deleteData; + + _ThriftHiveMetastore_drop_table_args__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_name(const std::string& val); + + void __set_deleteData(const bool val); + + bool operator == (const ThriftHiveMetastore_drop_table_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(name == rhs.name)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_table_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_table_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_table_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_table_pargs() throw(); + const std::string* dbname; + const std::string* name; + const bool* deleteData; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_table_result__isset { + _ThriftHiveMetastore_drop_table_result__isset() : o1(false), o3(false) {} + bool o1 :1; + bool o3 :1; +} _ThriftHiveMetastore_drop_table_result__isset; + +class ThriftHiveMetastore_drop_table_result { + public: + + ThriftHiveMetastore_drop_table_result(const ThriftHiveMetastore_drop_table_result&); + ThriftHiveMetastore_drop_table_result& operator=(const ThriftHiveMetastore_drop_table_result&); + ThriftHiveMetastore_drop_table_result() { + } + + virtual ~ThriftHiveMetastore_drop_table_result() throw(); + NoSuchObjectException o1; + MetaException o3; + + _ThriftHiveMetastore_drop_table_result__isset __isset; + + void __set_o1(const NoSuchObjectException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_drop_table_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_table_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_table_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_table_presult__isset { + _ThriftHiveMetastore_drop_table_presult__isset() : o1(false), o3(false) {} + bool o1 :1; + bool o3 :1; +} _ThriftHiveMetastore_drop_table_presult__isset; + +class ThriftHiveMetastore_drop_table_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_table_presult() throw(); + NoSuchObjectException o1; + MetaException o3; + + _ThriftHiveMetastore_drop_table_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_table_with_environment_context_args__isset { + _ThriftHiveMetastore_drop_table_with_environment_context_args__isset() : dbname(false), name(false), deleteData(false), environment_context(false) {} + bool dbname :1; + bool name :1; + bool deleteData :1; + bool environment_context :1; +} _ThriftHiveMetastore_drop_table_with_environment_context_args__isset; + +class ThriftHiveMetastore_drop_table_with_environment_context_args { + public: + + ThriftHiveMetastore_drop_table_with_environment_context_args(const ThriftHiveMetastore_drop_table_with_environment_context_args&); + ThriftHiveMetastore_drop_table_with_environment_context_args& operator=(const ThriftHiveMetastore_drop_table_with_environment_context_args&); + ThriftHiveMetastore_drop_table_with_environment_context_args() : dbname(), name(), deleteData(0) { + } + + virtual ~ThriftHiveMetastore_drop_table_with_environment_context_args() throw(); + std::string dbname; + std::string name; + bool deleteData; + EnvironmentContext environment_context; + + _ThriftHiveMetastore_drop_table_with_environment_context_args__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_name(const std::string& val); + + void __set_deleteData(const bool val); + + void __set_environment_context(const EnvironmentContext& val); + + bool operator == (const ThriftHiveMetastore_drop_table_with_environment_context_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(name == rhs.name)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + if (!(environment_context == rhs.environment_context)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_table_with_environment_context_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_table_with_environment_context_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_table_with_environment_context_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_table_with_environment_context_pargs() throw(); + const std::string* dbname; + const std::string* name; + const bool* deleteData; + const EnvironmentContext* environment_context; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_table_with_environment_context_result__isset { + _ThriftHiveMetastore_drop_table_with_environment_context_result__isset() : o1(false), o3(false) {} + bool o1 :1; + bool o3 :1; +} _ThriftHiveMetastore_drop_table_with_environment_context_result__isset; + +class ThriftHiveMetastore_drop_table_with_environment_context_result { + public: + + ThriftHiveMetastore_drop_table_with_environment_context_result(const ThriftHiveMetastore_drop_table_with_environment_context_result&); + ThriftHiveMetastore_drop_table_with_environment_context_result& operator=(const ThriftHiveMetastore_drop_table_with_environment_context_result&); + ThriftHiveMetastore_drop_table_with_environment_context_result() { + } + + virtual ~ThriftHiveMetastore_drop_table_with_environment_context_result() throw(); + NoSuchObjectException o1; + MetaException o3; + + _ThriftHiveMetastore_drop_table_with_environment_context_result__isset __isset; + + void __set_o1(const NoSuchObjectException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_drop_table_with_environment_context_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_table_with_environment_context_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_table_with_environment_context_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_table_with_environment_context_presult__isset { + _ThriftHiveMetastore_drop_table_with_environment_context_presult__isset() : o1(false), o3(false) {} + bool o1 :1; + bool o3 :1; +} _ThriftHiveMetastore_drop_table_with_environment_context_presult__isset; + +class ThriftHiveMetastore_drop_table_with_environment_context_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_table_with_environment_context_presult() throw(); + NoSuchObjectException o1; + MetaException o3; + + _ThriftHiveMetastore_drop_table_with_environment_context_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_truncate_table_args__isset { + _ThriftHiveMetastore_truncate_table_args__isset() : dbName(false), tableName(false), partNames(false) {} + bool dbName :1; + bool tableName :1; + bool partNames :1; +} _ThriftHiveMetastore_truncate_table_args__isset; + +class ThriftHiveMetastore_truncate_table_args { + public: + + ThriftHiveMetastore_truncate_table_args(const ThriftHiveMetastore_truncate_table_args&); + ThriftHiveMetastore_truncate_table_args& operator=(const ThriftHiveMetastore_truncate_table_args&); + ThriftHiveMetastore_truncate_table_args() : dbName(), tableName() { + } + + virtual ~ThriftHiveMetastore_truncate_table_args() throw(); + std::string dbName; + std::string tableName; + std::vector partNames; + + _ThriftHiveMetastore_truncate_table_args__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_tableName(const std::string& val); + + void __set_partNames(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_truncate_table_args & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(partNames == rhs.partNames)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_truncate_table_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_truncate_table_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_truncate_table_pargs { + public: + + + virtual ~ThriftHiveMetastore_truncate_table_pargs() throw(); + const std::string* dbName; + const std::string* tableName; + const std::vector * partNames; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_truncate_table_result__isset { + _ThriftHiveMetastore_truncate_table_result__isset() : o1(false) {} + bool o1 :1; +} _ThriftHiveMetastore_truncate_table_result__isset; + +class ThriftHiveMetastore_truncate_table_result { + public: + + ThriftHiveMetastore_truncate_table_result(const ThriftHiveMetastore_truncate_table_result&); + ThriftHiveMetastore_truncate_table_result& operator=(const ThriftHiveMetastore_truncate_table_result&); + ThriftHiveMetastore_truncate_table_result() { + } + + virtual ~ThriftHiveMetastore_truncate_table_result() throw(); + MetaException o1; + + _ThriftHiveMetastore_truncate_table_result__isset __isset; + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_truncate_table_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_truncate_table_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_truncate_table_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_truncate_table_presult__isset { + _ThriftHiveMetastore_truncate_table_presult__isset() : o1(false) {} + bool o1 :1; +} _ThriftHiveMetastore_truncate_table_presult__isset; + +class ThriftHiveMetastore_truncate_table_presult { + public: + + + virtual ~ThriftHiveMetastore_truncate_table_presult() throw(); + MetaException o1; + + _ThriftHiveMetastore_truncate_table_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_tables_args__isset { + _ThriftHiveMetastore_get_tables_args__isset() : db_name(false), pattern(false) {} + bool db_name :1; + bool pattern :1; +} _ThriftHiveMetastore_get_tables_args__isset; + +class ThriftHiveMetastore_get_tables_args { + public: + + ThriftHiveMetastore_get_tables_args(const ThriftHiveMetastore_get_tables_args&); + ThriftHiveMetastore_get_tables_args& operator=(const ThriftHiveMetastore_get_tables_args&); + ThriftHiveMetastore_get_tables_args() : db_name(), pattern() { + } + + virtual ~ThriftHiveMetastore_get_tables_args() throw(); + std::string db_name; + std::string pattern; + + _ThriftHiveMetastore_get_tables_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_pattern(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_tables_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(pattern == rhs.pattern)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_tables_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_tables_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_tables_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_tables_pargs() throw(); + const std::string* db_name; + const std::string* pattern; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_tables_result__isset { + _ThriftHiveMetastore_get_tables_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_tables_result__isset; + +class ThriftHiveMetastore_get_tables_result { + public: + + ThriftHiveMetastore_get_tables_result(const ThriftHiveMetastore_get_tables_result&); + ThriftHiveMetastore_get_tables_result& operator=(const ThriftHiveMetastore_get_tables_result&); + ThriftHiveMetastore_get_tables_result() { + } + + virtual ~ThriftHiveMetastore_get_tables_result() throw(); + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_tables_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_tables_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_tables_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_tables_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_tables_presult__isset { + _ThriftHiveMetastore_get_tables_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_tables_presult__isset; + +class ThriftHiveMetastore_get_tables_presult { + public: + + + virtual ~ThriftHiveMetastore_get_tables_presult() throw(); + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_tables_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_tables_by_type_args__isset { + _ThriftHiveMetastore_get_tables_by_type_args__isset() : db_name(false), pattern(false), tableType(false) {} + bool db_name :1; + bool pattern :1; + bool tableType :1; +} _ThriftHiveMetastore_get_tables_by_type_args__isset; + +class ThriftHiveMetastore_get_tables_by_type_args { + public: + + ThriftHiveMetastore_get_tables_by_type_args(const ThriftHiveMetastore_get_tables_by_type_args&); + ThriftHiveMetastore_get_tables_by_type_args& operator=(const ThriftHiveMetastore_get_tables_by_type_args&); + ThriftHiveMetastore_get_tables_by_type_args() : db_name(), pattern(), tableType() { + } + + virtual ~ThriftHiveMetastore_get_tables_by_type_args() throw(); + std::string db_name; + std::string pattern; + std::string tableType; + + _ThriftHiveMetastore_get_tables_by_type_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_pattern(const std::string& val); + + void __set_tableType(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_tables_by_type_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(pattern == rhs.pattern)) + return false; + if (!(tableType == rhs.tableType)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_tables_by_type_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_tables_by_type_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_tables_by_type_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_tables_by_type_pargs() throw(); + const std::string* db_name; + const std::string* pattern; + const std::string* tableType; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_tables_by_type_result__isset { + _ThriftHiveMetastore_get_tables_by_type_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_tables_by_type_result__isset; + +class ThriftHiveMetastore_get_tables_by_type_result { + public: + + ThriftHiveMetastore_get_tables_by_type_result(const ThriftHiveMetastore_get_tables_by_type_result&); + ThriftHiveMetastore_get_tables_by_type_result& operator=(const ThriftHiveMetastore_get_tables_by_type_result&); + ThriftHiveMetastore_get_tables_by_type_result() { + } + + virtual ~ThriftHiveMetastore_get_tables_by_type_result() throw(); + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_tables_by_type_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_tables_by_type_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_tables_by_type_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_tables_by_type_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_tables_by_type_presult__isset { + _ThriftHiveMetastore_get_tables_by_type_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_tables_by_type_presult__isset; + +class ThriftHiveMetastore_get_tables_by_type_presult { + public: + + + virtual ~ThriftHiveMetastore_get_tables_by_type_presult() throw(); + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_tables_by_type_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_table_meta_args__isset { + _ThriftHiveMetastore_get_table_meta_args__isset() : db_patterns(false), tbl_patterns(false), tbl_types(false) {} + bool db_patterns :1; + bool tbl_patterns :1; + bool tbl_types :1; +} _ThriftHiveMetastore_get_table_meta_args__isset; + +class ThriftHiveMetastore_get_table_meta_args { + public: + + ThriftHiveMetastore_get_table_meta_args(const ThriftHiveMetastore_get_table_meta_args&); + ThriftHiveMetastore_get_table_meta_args& operator=(const ThriftHiveMetastore_get_table_meta_args&); + ThriftHiveMetastore_get_table_meta_args() : db_patterns(), tbl_patterns() { + } + + virtual ~ThriftHiveMetastore_get_table_meta_args() throw(); + std::string db_patterns; + std::string tbl_patterns; + std::vector tbl_types; + + _ThriftHiveMetastore_get_table_meta_args__isset __isset; + + void __set_db_patterns(const std::string& val); + + void __set_tbl_patterns(const std::string& val); + + void __set_tbl_types(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_get_table_meta_args & rhs) const + { + if (!(db_patterns == rhs.db_patterns)) + return false; + if (!(tbl_patterns == rhs.tbl_patterns)) + return false; + if (!(tbl_types == rhs.tbl_types)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_meta_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_meta_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_table_meta_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_meta_pargs() throw(); + const std::string* db_patterns; + const std::string* tbl_patterns; + const std::vector * tbl_types; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_meta_result__isset { + _ThriftHiveMetastore_get_table_meta_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_table_meta_result__isset; + +class ThriftHiveMetastore_get_table_meta_result { + public: + + ThriftHiveMetastore_get_table_meta_result(const ThriftHiveMetastore_get_table_meta_result&); + ThriftHiveMetastore_get_table_meta_result& operator=(const ThriftHiveMetastore_get_table_meta_result&); + ThriftHiveMetastore_get_table_meta_result() { + } + + virtual ~ThriftHiveMetastore_get_table_meta_result() throw(); + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_table_meta_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_table_meta_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_meta_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_meta_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_meta_presult__isset { + _ThriftHiveMetastore_get_table_meta_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_table_meta_presult__isset; + +class ThriftHiveMetastore_get_table_meta_presult { + public: + + + virtual ~ThriftHiveMetastore_get_table_meta_presult() throw(); + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_table_meta_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_all_tables_args__isset { + _ThriftHiveMetastore_get_all_tables_args__isset() : db_name(false) {} + bool db_name :1; +} _ThriftHiveMetastore_get_all_tables_args__isset; + +class ThriftHiveMetastore_get_all_tables_args { + public: + + ThriftHiveMetastore_get_all_tables_args(const ThriftHiveMetastore_get_all_tables_args&); + ThriftHiveMetastore_get_all_tables_args& operator=(const ThriftHiveMetastore_get_all_tables_args&); + ThriftHiveMetastore_get_all_tables_args() : db_name() { + } + + virtual ~ThriftHiveMetastore_get_all_tables_args() throw(); + std::string db_name; + + _ThriftHiveMetastore_get_all_tables_args__isset __isset; + + void __set_db_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_all_tables_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_tables_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_all_tables_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_all_tables_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_all_tables_pargs() throw(); + const std::string* db_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_all_tables_result__isset { + _ThriftHiveMetastore_get_all_tables_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_all_tables_result__isset; + +class ThriftHiveMetastore_get_all_tables_result { + public: + + ThriftHiveMetastore_get_all_tables_result(const ThriftHiveMetastore_get_all_tables_result&); + ThriftHiveMetastore_get_all_tables_result& operator=(const ThriftHiveMetastore_get_all_tables_result&); + ThriftHiveMetastore_get_all_tables_result() { + } + + virtual ~ThriftHiveMetastore_get_all_tables_result() throw(); + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_all_tables_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_all_tables_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_tables_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_all_tables_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_all_tables_presult__isset { + _ThriftHiveMetastore_get_all_tables_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_all_tables_presult__isset; + +class ThriftHiveMetastore_get_all_tables_presult { + public: + + + virtual ~ThriftHiveMetastore_get_all_tables_presult() throw(); + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_all_tables_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_table_args__isset { + _ThriftHiveMetastore_get_table_args__isset() : dbname(false), tbl_name(false) {} + bool dbname :1; + bool tbl_name :1; +} _ThriftHiveMetastore_get_table_args__isset; + +class ThriftHiveMetastore_get_table_args { + public: + + ThriftHiveMetastore_get_table_args(const ThriftHiveMetastore_get_table_args&); + ThriftHiveMetastore_get_table_args& operator=(const ThriftHiveMetastore_get_table_args&); + ThriftHiveMetastore_get_table_args() : dbname(), tbl_name() { + } + + virtual ~ThriftHiveMetastore_get_table_args() throw(); + std::string dbname; + std::string tbl_name; + + _ThriftHiveMetastore_get_table_args__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_tbl_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_table_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_table_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_pargs() throw(); + const std::string* dbname; + const std::string* tbl_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_result__isset { + _ThriftHiveMetastore_get_table_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_table_result__isset; + +class ThriftHiveMetastore_get_table_result { + public: + + ThriftHiveMetastore_get_table_result(const ThriftHiveMetastore_get_table_result&); + ThriftHiveMetastore_get_table_result& operator=(const ThriftHiveMetastore_get_table_result&); + ThriftHiveMetastore_get_table_result() { + } + + virtual ~ThriftHiveMetastore_get_table_result() throw(); + Table success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_table_result__isset __isset; + + void __set_success(const Table& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_table_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_presult__isset { + _ThriftHiveMetastore_get_table_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_table_presult__isset; + +class ThriftHiveMetastore_get_table_presult { + public: + + + virtual ~ThriftHiveMetastore_get_table_presult() throw(); + Table* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_table_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_table_objects_by_name_args__isset { + _ThriftHiveMetastore_get_table_objects_by_name_args__isset() : dbname(false), tbl_names(false) {} + bool dbname :1; + bool tbl_names :1; +} _ThriftHiveMetastore_get_table_objects_by_name_args__isset; + +class ThriftHiveMetastore_get_table_objects_by_name_args { + public: + + ThriftHiveMetastore_get_table_objects_by_name_args(const ThriftHiveMetastore_get_table_objects_by_name_args&); + ThriftHiveMetastore_get_table_objects_by_name_args& operator=(const ThriftHiveMetastore_get_table_objects_by_name_args&); + ThriftHiveMetastore_get_table_objects_by_name_args() : dbname() { + } + + virtual ~ThriftHiveMetastore_get_table_objects_by_name_args() throw(); + std::string dbname; + std::vector tbl_names; + + _ThriftHiveMetastore_get_table_objects_by_name_args__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_tbl_names(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_get_table_objects_by_name_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(tbl_names == rhs.tbl_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_objects_by_name_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_objects_by_name_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_table_objects_by_name_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_objects_by_name_pargs() throw(); + const std::string* dbname; + const std::vector * tbl_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_objects_by_name_result__isset { + _ThriftHiveMetastore_get_table_objects_by_name_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_table_objects_by_name_result__isset; + +class ThriftHiveMetastore_get_table_objects_by_name_result { + public: + + ThriftHiveMetastore_get_table_objects_by_name_result(const ThriftHiveMetastore_get_table_objects_by_name_result&); + ThriftHiveMetastore_get_table_objects_by_name_result& operator=(const ThriftHiveMetastore_get_table_objects_by_name_result&); + ThriftHiveMetastore_get_table_objects_by_name_result() { + } + + virtual ~ThriftHiveMetastore_get_table_objects_by_name_result() throw(); + std::vector
success; + + _ThriftHiveMetastore_get_table_objects_by_name_result__isset __isset; + + void __set_success(const std::vector
& val); + + bool operator == (const ThriftHiveMetastore_get_table_objects_by_name_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_objects_by_name_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_objects_by_name_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_objects_by_name_presult__isset { + _ThriftHiveMetastore_get_table_objects_by_name_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_table_objects_by_name_presult__isset; + +class ThriftHiveMetastore_get_table_objects_by_name_presult { + public: + + + virtual ~ThriftHiveMetastore_get_table_objects_by_name_presult() throw(); + std::vector
* success; + + _ThriftHiveMetastore_get_table_objects_by_name_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_table_req_args__isset { + _ThriftHiveMetastore_get_table_req_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_get_table_req_args__isset; + +class ThriftHiveMetastore_get_table_req_args { + public: + + ThriftHiveMetastore_get_table_req_args(const ThriftHiveMetastore_get_table_req_args&); + ThriftHiveMetastore_get_table_req_args& operator=(const ThriftHiveMetastore_get_table_req_args&); + ThriftHiveMetastore_get_table_req_args() { + } + + virtual ~ThriftHiveMetastore_get_table_req_args() throw(); + GetTableRequest req; + + _ThriftHiveMetastore_get_table_req_args__isset __isset; + + void __set_req(const GetTableRequest& val); + + bool operator == (const ThriftHiveMetastore_get_table_req_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_req_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_req_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_table_req_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_req_pargs() throw(); + const GetTableRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_req_result__isset { + _ThriftHiveMetastore_get_table_req_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_table_req_result__isset; + +class ThriftHiveMetastore_get_table_req_result { + public: + + ThriftHiveMetastore_get_table_req_result(const ThriftHiveMetastore_get_table_req_result&); + ThriftHiveMetastore_get_table_req_result& operator=(const ThriftHiveMetastore_get_table_req_result&); + ThriftHiveMetastore_get_table_req_result() { + } + + virtual ~ThriftHiveMetastore_get_table_req_result() throw(); + GetTableResult success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_table_req_result__isset __isset; + + void __set_success(const GetTableResult& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_table_req_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_req_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_req_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_req_presult__isset { + _ThriftHiveMetastore_get_table_req_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_table_req_presult__isset; + +class ThriftHiveMetastore_get_table_req_presult { + public: + + + virtual ~ThriftHiveMetastore_get_table_req_presult() throw(); + GetTableResult* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_table_req_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_table_objects_by_name_req_args__isset { + _ThriftHiveMetastore_get_table_objects_by_name_req_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_get_table_objects_by_name_req_args__isset; + +class ThriftHiveMetastore_get_table_objects_by_name_req_args { + public: + + ThriftHiveMetastore_get_table_objects_by_name_req_args(const ThriftHiveMetastore_get_table_objects_by_name_req_args&); + ThriftHiveMetastore_get_table_objects_by_name_req_args& operator=(const ThriftHiveMetastore_get_table_objects_by_name_req_args&); + ThriftHiveMetastore_get_table_objects_by_name_req_args() { + } + + virtual ~ThriftHiveMetastore_get_table_objects_by_name_req_args() throw(); + GetTablesRequest req; + + _ThriftHiveMetastore_get_table_objects_by_name_req_args__isset __isset; + + void __set_req(const GetTablesRequest& val); + + bool operator == (const ThriftHiveMetastore_get_table_objects_by_name_req_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_objects_by_name_req_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_objects_by_name_req_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_table_objects_by_name_req_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_objects_by_name_req_pargs() throw(); + const GetTablesRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_objects_by_name_req_result__isset { + _ThriftHiveMetastore_get_table_objects_by_name_req_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_get_table_objects_by_name_req_result__isset; + +class ThriftHiveMetastore_get_table_objects_by_name_req_result { + public: + + ThriftHiveMetastore_get_table_objects_by_name_req_result(const ThriftHiveMetastore_get_table_objects_by_name_req_result&); + ThriftHiveMetastore_get_table_objects_by_name_req_result& operator=(const ThriftHiveMetastore_get_table_objects_by_name_req_result&); + ThriftHiveMetastore_get_table_objects_by_name_req_result() { + } + + virtual ~ThriftHiveMetastore_get_table_objects_by_name_req_result() throw(); + GetTablesResult success; + MetaException o1; + InvalidOperationException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_table_objects_by_name_req_result__isset __isset; + + void __set_success(const GetTablesResult& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const InvalidOperationException& val); + + void __set_o3(const UnknownDBException& val); + + bool operator == (const ThriftHiveMetastore_get_table_objects_by_name_req_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_objects_by_name_req_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_objects_by_name_req_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_objects_by_name_req_presult__isset { + _ThriftHiveMetastore_get_table_objects_by_name_req_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_get_table_objects_by_name_req_presult__isset; + +class ThriftHiveMetastore_get_table_objects_by_name_req_presult { + public: + + + virtual ~ThriftHiveMetastore_get_table_objects_by_name_req_presult() throw(); + GetTablesResult* success; + MetaException o1; + InvalidOperationException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_table_objects_by_name_req_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_table_names_by_filter_args__isset { + _ThriftHiveMetastore_get_table_names_by_filter_args__isset() : dbname(false), filter(false), max_tables(true) {} + bool dbname :1; + bool filter :1; + bool max_tables :1; +} _ThriftHiveMetastore_get_table_names_by_filter_args__isset; + +class ThriftHiveMetastore_get_table_names_by_filter_args { + public: + + ThriftHiveMetastore_get_table_names_by_filter_args(const ThriftHiveMetastore_get_table_names_by_filter_args&); + ThriftHiveMetastore_get_table_names_by_filter_args& operator=(const ThriftHiveMetastore_get_table_names_by_filter_args&); + ThriftHiveMetastore_get_table_names_by_filter_args() : dbname(), filter(), max_tables(-1) { + } + + virtual ~ThriftHiveMetastore_get_table_names_by_filter_args() throw(); + std::string dbname; + std::string filter; + int16_t max_tables; + + _ThriftHiveMetastore_get_table_names_by_filter_args__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_filter(const std::string& val); + + void __set_max_tables(const int16_t val); + + bool operator == (const ThriftHiveMetastore_get_table_names_by_filter_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(filter == rhs.filter)) + return false; + if (!(max_tables == rhs.max_tables)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_names_by_filter_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_names_by_filter_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_table_names_by_filter_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_names_by_filter_pargs() throw(); + const std::string* dbname; + const std::string* filter; + const int16_t* max_tables; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_names_by_filter_result__isset { + _ThriftHiveMetastore_get_table_names_by_filter_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_get_table_names_by_filter_result__isset; + +class ThriftHiveMetastore_get_table_names_by_filter_result { + public: + + ThriftHiveMetastore_get_table_names_by_filter_result(const ThriftHiveMetastore_get_table_names_by_filter_result&); + ThriftHiveMetastore_get_table_names_by_filter_result& operator=(const ThriftHiveMetastore_get_table_names_by_filter_result&); + ThriftHiveMetastore_get_table_names_by_filter_result() { + } + + virtual ~ThriftHiveMetastore_get_table_names_by_filter_result() throw(); + std::vector success; + MetaException o1; + InvalidOperationException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_table_names_by_filter_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + void __set_o2(const InvalidOperationException& val); + + void __set_o3(const UnknownDBException& val); + + bool operator == (const ThriftHiveMetastore_get_table_names_by_filter_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_names_by_filter_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_names_by_filter_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_names_by_filter_presult__isset { + _ThriftHiveMetastore_get_table_names_by_filter_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_get_table_names_by_filter_presult__isset; + +class ThriftHiveMetastore_get_table_names_by_filter_presult { + public: + + + virtual ~ThriftHiveMetastore_get_table_names_by_filter_presult() throw(); + std::vector * success; + MetaException o1; + InvalidOperationException o2; + UnknownDBException o3; + + _ThriftHiveMetastore_get_table_names_by_filter_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_alter_table_args__isset { + _ThriftHiveMetastore_alter_table_args__isset() : dbname(false), tbl_name(false), new_tbl(false) {} + bool dbname :1; + bool tbl_name :1; + bool new_tbl :1; +} _ThriftHiveMetastore_alter_table_args__isset; + +class ThriftHiveMetastore_alter_table_args { + public: + + ThriftHiveMetastore_alter_table_args(const ThriftHiveMetastore_alter_table_args&); + ThriftHiveMetastore_alter_table_args& operator=(const ThriftHiveMetastore_alter_table_args&); + ThriftHiveMetastore_alter_table_args() : dbname(), tbl_name() { + } + + virtual ~ThriftHiveMetastore_alter_table_args() throw(); + std::string dbname; + std::string tbl_name; + Table new_tbl; + + _ThriftHiveMetastore_alter_table_args__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_new_tbl(const Table& val); + + bool operator == (const ThriftHiveMetastore_alter_table_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(new_tbl == rhs.new_tbl)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_table_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_table_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_alter_table_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_table_pargs() throw(); + const std::string* dbname; + const std::string* tbl_name; + const Table* new_tbl; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_table_result__isset { + _ThriftHiveMetastore_alter_table_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_table_result__isset; + +class ThriftHiveMetastore_alter_table_result { + public: + + ThriftHiveMetastore_alter_table_result(const ThriftHiveMetastore_alter_table_result&); + ThriftHiveMetastore_alter_table_result& operator=(const ThriftHiveMetastore_alter_table_result&); + ThriftHiveMetastore_alter_table_result() { + } + + virtual ~ThriftHiveMetastore_alter_table_result() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_table_result__isset __isset; + + void __set_o1(const InvalidOperationException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_alter_table_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_table_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_table_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_table_presult__isset { + _ThriftHiveMetastore_alter_table_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_table_presult__isset; + +class ThriftHiveMetastore_alter_table_presult { + public: + + + virtual ~ThriftHiveMetastore_alter_table_presult() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_table_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_alter_table_with_environment_context_args__isset { + _ThriftHiveMetastore_alter_table_with_environment_context_args__isset() : dbname(false), tbl_name(false), new_tbl(false), environment_context(false) {} + bool dbname :1; + bool tbl_name :1; + bool new_tbl :1; + bool environment_context :1; +} _ThriftHiveMetastore_alter_table_with_environment_context_args__isset; + +class ThriftHiveMetastore_alter_table_with_environment_context_args { + public: + + ThriftHiveMetastore_alter_table_with_environment_context_args(const ThriftHiveMetastore_alter_table_with_environment_context_args&); + ThriftHiveMetastore_alter_table_with_environment_context_args& operator=(const ThriftHiveMetastore_alter_table_with_environment_context_args&); + ThriftHiveMetastore_alter_table_with_environment_context_args() : dbname(), tbl_name() { + } + + virtual ~ThriftHiveMetastore_alter_table_with_environment_context_args() throw(); + std::string dbname; + std::string tbl_name; + Table new_tbl; + EnvironmentContext environment_context; + + _ThriftHiveMetastore_alter_table_with_environment_context_args__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_new_tbl(const Table& val); + + void __set_environment_context(const EnvironmentContext& val); + + bool operator == (const ThriftHiveMetastore_alter_table_with_environment_context_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(new_tbl == rhs.new_tbl)) + return false; + if (!(environment_context == rhs.environment_context)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_table_with_environment_context_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_table_with_environment_context_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_alter_table_with_environment_context_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_table_with_environment_context_pargs() throw(); + const std::string* dbname; + const std::string* tbl_name; + const Table* new_tbl; + const EnvironmentContext* environment_context; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_table_with_environment_context_result__isset { + _ThriftHiveMetastore_alter_table_with_environment_context_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_table_with_environment_context_result__isset; + +class ThriftHiveMetastore_alter_table_with_environment_context_result { + public: + + ThriftHiveMetastore_alter_table_with_environment_context_result(const ThriftHiveMetastore_alter_table_with_environment_context_result&); + ThriftHiveMetastore_alter_table_with_environment_context_result& operator=(const ThriftHiveMetastore_alter_table_with_environment_context_result&); + ThriftHiveMetastore_alter_table_with_environment_context_result() { + } + + virtual ~ThriftHiveMetastore_alter_table_with_environment_context_result() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_table_with_environment_context_result__isset __isset; + + void __set_o1(const InvalidOperationException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_alter_table_with_environment_context_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_table_with_environment_context_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_table_with_environment_context_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_table_with_environment_context_presult__isset { + _ThriftHiveMetastore_alter_table_with_environment_context_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_table_with_environment_context_presult__isset; + +class ThriftHiveMetastore_alter_table_with_environment_context_presult { + public: + + + virtual ~ThriftHiveMetastore_alter_table_with_environment_context_presult() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_table_with_environment_context_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_alter_table_with_cascade_args__isset { + _ThriftHiveMetastore_alter_table_with_cascade_args__isset() : dbname(false), tbl_name(false), new_tbl(false), cascade(false) {} + bool dbname :1; + bool tbl_name :1; + bool new_tbl :1; + bool cascade :1; +} _ThriftHiveMetastore_alter_table_with_cascade_args__isset; + +class ThriftHiveMetastore_alter_table_with_cascade_args { + public: + + ThriftHiveMetastore_alter_table_with_cascade_args(const ThriftHiveMetastore_alter_table_with_cascade_args&); + ThriftHiveMetastore_alter_table_with_cascade_args& operator=(const ThriftHiveMetastore_alter_table_with_cascade_args&); + ThriftHiveMetastore_alter_table_with_cascade_args() : dbname(), tbl_name(), cascade(0) { + } + + virtual ~ThriftHiveMetastore_alter_table_with_cascade_args() throw(); + std::string dbname; + std::string tbl_name; + Table new_tbl; + bool cascade; + + _ThriftHiveMetastore_alter_table_with_cascade_args__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_new_tbl(const Table& val); + + void __set_cascade(const bool val); + + bool operator == (const ThriftHiveMetastore_alter_table_with_cascade_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(new_tbl == rhs.new_tbl)) + return false; + if (!(cascade == rhs.cascade)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_table_with_cascade_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_table_with_cascade_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_alter_table_with_cascade_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_table_with_cascade_pargs() throw(); + const std::string* dbname; + const std::string* tbl_name; + const Table* new_tbl; + const bool* cascade; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_table_with_cascade_result__isset { + _ThriftHiveMetastore_alter_table_with_cascade_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_table_with_cascade_result__isset; + +class ThriftHiveMetastore_alter_table_with_cascade_result { + public: + + ThriftHiveMetastore_alter_table_with_cascade_result(const ThriftHiveMetastore_alter_table_with_cascade_result&); + ThriftHiveMetastore_alter_table_with_cascade_result& operator=(const ThriftHiveMetastore_alter_table_with_cascade_result&); + ThriftHiveMetastore_alter_table_with_cascade_result() { + } + + virtual ~ThriftHiveMetastore_alter_table_with_cascade_result() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_table_with_cascade_result__isset __isset; + + void __set_o1(const InvalidOperationException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_alter_table_with_cascade_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_table_with_cascade_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_table_with_cascade_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_table_with_cascade_presult__isset { + _ThriftHiveMetastore_alter_table_with_cascade_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_table_with_cascade_presult__isset; + +class ThriftHiveMetastore_alter_table_with_cascade_presult { + public: + + + virtual ~ThriftHiveMetastore_alter_table_with_cascade_presult() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_table_with_cascade_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_partition_args__isset { + _ThriftHiveMetastore_add_partition_args__isset() : new_part(false) {} + bool new_part :1; +} _ThriftHiveMetastore_add_partition_args__isset; + +class ThriftHiveMetastore_add_partition_args { + public: + + ThriftHiveMetastore_add_partition_args(const ThriftHiveMetastore_add_partition_args&); + ThriftHiveMetastore_add_partition_args& operator=(const ThriftHiveMetastore_add_partition_args&); + ThriftHiveMetastore_add_partition_args() { + } + + virtual ~ThriftHiveMetastore_add_partition_args() throw(); + Partition new_part; + + _ThriftHiveMetastore_add_partition_args__isset __isset; + + void __set_new_part(const Partition& val); + + bool operator == (const ThriftHiveMetastore_add_partition_args & rhs) const + { + if (!(new_part == rhs.new_part)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_partition_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_partition_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_partition_pargs() throw(); + const Partition* new_part; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_partition_result__isset { + _ThriftHiveMetastore_add_partition_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_add_partition_result__isset; + +class ThriftHiveMetastore_add_partition_result { + public: + + ThriftHiveMetastore_add_partition_result(const ThriftHiveMetastore_add_partition_result&); + ThriftHiveMetastore_add_partition_result& operator=(const ThriftHiveMetastore_add_partition_result&); + ThriftHiveMetastore_add_partition_result() { + } + + virtual ~ThriftHiveMetastore_add_partition_result() throw(); + Partition success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_partition_result__isset __isset; + + void __set_success(const Partition& val); + + void __set_o1(const InvalidObjectException& val); + + void __set_o2(const AlreadyExistsException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_add_partition_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_partition_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_partition_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_partition_presult__isset { + _ThriftHiveMetastore_add_partition_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_add_partition_presult__isset; + +class ThriftHiveMetastore_add_partition_presult { + public: + + + virtual ~ThriftHiveMetastore_add_partition_presult() throw(); + Partition* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_partition_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_partition_with_environment_context_args__isset { + _ThriftHiveMetastore_add_partition_with_environment_context_args__isset() : new_part(false), environment_context(false) {} + bool new_part :1; + bool environment_context :1; +} _ThriftHiveMetastore_add_partition_with_environment_context_args__isset; + +class ThriftHiveMetastore_add_partition_with_environment_context_args { + public: + + ThriftHiveMetastore_add_partition_with_environment_context_args(const ThriftHiveMetastore_add_partition_with_environment_context_args&); + ThriftHiveMetastore_add_partition_with_environment_context_args& operator=(const ThriftHiveMetastore_add_partition_with_environment_context_args&); + ThriftHiveMetastore_add_partition_with_environment_context_args() { + } + + virtual ~ThriftHiveMetastore_add_partition_with_environment_context_args() throw(); + Partition new_part; + EnvironmentContext environment_context; + + _ThriftHiveMetastore_add_partition_with_environment_context_args__isset __isset; + + void __set_new_part(const Partition& val); + + void __set_environment_context(const EnvironmentContext& val); + + bool operator == (const ThriftHiveMetastore_add_partition_with_environment_context_args & rhs) const + { + if (!(new_part == rhs.new_part)) + return false; + if (!(environment_context == rhs.environment_context)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_partition_with_environment_context_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_partition_with_environment_context_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_partition_with_environment_context_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_partition_with_environment_context_pargs() throw(); + const Partition* new_part; + const EnvironmentContext* environment_context; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_partition_with_environment_context_result__isset { + _ThriftHiveMetastore_add_partition_with_environment_context_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_add_partition_with_environment_context_result__isset; + +class ThriftHiveMetastore_add_partition_with_environment_context_result { + public: + + ThriftHiveMetastore_add_partition_with_environment_context_result(const ThriftHiveMetastore_add_partition_with_environment_context_result&); + ThriftHiveMetastore_add_partition_with_environment_context_result& operator=(const ThriftHiveMetastore_add_partition_with_environment_context_result&); + ThriftHiveMetastore_add_partition_with_environment_context_result() { + } + + virtual ~ThriftHiveMetastore_add_partition_with_environment_context_result() throw(); + Partition success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_partition_with_environment_context_result__isset __isset; + + void __set_success(const Partition& val); + + void __set_o1(const InvalidObjectException& val); + + void __set_o2(const AlreadyExistsException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_add_partition_with_environment_context_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_partition_with_environment_context_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_partition_with_environment_context_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_partition_with_environment_context_presult__isset { + _ThriftHiveMetastore_add_partition_with_environment_context_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_add_partition_with_environment_context_presult__isset; + +class ThriftHiveMetastore_add_partition_with_environment_context_presult { + public: + + + virtual ~ThriftHiveMetastore_add_partition_with_environment_context_presult() throw(); + Partition* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_partition_with_environment_context_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_partitions_args__isset { + _ThriftHiveMetastore_add_partitions_args__isset() : new_parts(false) {} + bool new_parts :1; +} _ThriftHiveMetastore_add_partitions_args__isset; + +class ThriftHiveMetastore_add_partitions_args { + public: + + ThriftHiveMetastore_add_partitions_args(const ThriftHiveMetastore_add_partitions_args&); + ThriftHiveMetastore_add_partitions_args& operator=(const ThriftHiveMetastore_add_partitions_args&); + ThriftHiveMetastore_add_partitions_args() { + } + + virtual ~ThriftHiveMetastore_add_partitions_args() throw(); + std::vector new_parts; + + _ThriftHiveMetastore_add_partitions_args__isset __isset; + + void __set_new_parts(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_add_partitions_args & rhs) const + { + if (!(new_parts == rhs.new_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_partitions_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_partitions_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_partitions_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_partitions_pargs() throw(); + const std::vector * new_parts; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_partitions_result__isset { + _ThriftHiveMetastore_add_partitions_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_add_partitions_result__isset; + +class ThriftHiveMetastore_add_partitions_result { + public: + + ThriftHiveMetastore_add_partitions_result(const ThriftHiveMetastore_add_partitions_result&); + ThriftHiveMetastore_add_partitions_result& operator=(const ThriftHiveMetastore_add_partitions_result&); + ThriftHiveMetastore_add_partitions_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_add_partitions_result() throw(); + int32_t success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_partitions_result__isset __isset; + + void __set_success(const int32_t val); + + void __set_o1(const InvalidObjectException& val); + + void __set_o2(const AlreadyExistsException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_add_partitions_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_partitions_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_partitions_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_partitions_presult__isset { + _ThriftHiveMetastore_add_partitions_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_add_partitions_presult__isset; + +class ThriftHiveMetastore_add_partitions_presult { + public: + + + virtual ~ThriftHiveMetastore_add_partitions_presult() throw(); + int32_t* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_partitions_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_partitions_pspec_args__isset { + _ThriftHiveMetastore_add_partitions_pspec_args__isset() : new_parts(false) {} + bool new_parts :1; +} _ThriftHiveMetastore_add_partitions_pspec_args__isset; + +class ThriftHiveMetastore_add_partitions_pspec_args { + public: + + ThriftHiveMetastore_add_partitions_pspec_args(const ThriftHiveMetastore_add_partitions_pspec_args&); + ThriftHiveMetastore_add_partitions_pspec_args& operator=(const ThriftHiveMetastore_add_partitions_pspec_args&); + ThriftHiveMetastore_add_partitions_pspec_args() { + } + + virtual ~ThriftHiveMetastore_add_partitions_pspec_args() throw(); + std::vector new_parts; + + _ThriftHiveMetastore_add_partitions_pspec_args__isset __isset; + + void __set_new_parts(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_add_partitions_pspec_args & rhs) const + { + if (!(new_parts == rhs.new_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_partitions_pspec_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_partitions_pspec_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_partitions_pspec_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_partitions_pspec_pargs() throw(); + const std::vector * new_parts; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_partitions_pspec_result__isset { + _ThriftHiveMetastore_add_partitions_pspec_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_add_partitions_pspec_result__isset; + +class ThriftHiveMetastore_add_partitions_pspec_result { + public: + + ThriftHiveMetastore_add_partitions_pspec_result(const ThriftHiveMetastore_add_partitions_pspec_result&); + ThriftHiveMetastore_add_partitions_pspec_result& operator=(const ThriftHiveMetastore_add_partitions_pspec_result&); + ThriftHiveMetastore_add_partitions_pspec_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_add_partitions_pspec_result() throw(); + int32_t success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_partitions_pspec_result__isset __isset; + + void __set_success(const int32_t val); + + void __set_o1(const InvalidObjectException& val); + + void __set_o2(const AlreadyExistsException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_add_partitions_pspec_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_partitions_pspec_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_partitions_pspec_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_partitions_pspec_presult__isset { + _ThriftHiveMetastore_add_partitions_pspec_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_add_partitions_pspec_presult__isset; + +class ThriftHiveMetastore_add_partitions_pspec_presult { + public: + + + virtual ~ThriftHiveMetastore_add_partitions_pspec_presult() throw(); + int32_t* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_partitions_pspec_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_append_partition_args__isset { + _ThriftHiveMetastore_append_partition_args__isset() : db_name(false), tbl_name(false), part_vals(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_vals :1; +} _ThriftHiveMetastore_append_partition_args__isset; + +class ThriftHiveMetastore_append_partition_args { + public: + + ThriftHiveMetastore_append_partition_args(const ThriftHiveMetastore_append_partition_args&); + ThriftHiveMetastore_append_partition_args& operator=(const ThriftHiveMetastore_append_partition_args&); + ThriftHiveMetastore_append_partition_args() : db_name(), tbl_name() { + } + + virtual ~ThriftHiveMetastore_append_partition_args() throw(); + std::string db_name; + std::string tbl_name; + std::vector part_vals; + + _ThriftHiveMetastore_append_partition_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_vals(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_append_partition_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_append_partition_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_append_partition_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_append_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_append_partition_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_append_partition_result__isset { + _ThriftHiveMetastore_append_partition_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_append_partition_result__isset; + +class ThriftHiveMetastore_append_partition_result { + public: + + ThriftHiveMetastore_append_partition_result(const ThriftHiveMetastore_append_partition_result&); + ThriftHiveMetastore_append_partition_result& operator=(const ThriftHiveMetastore_append_partition_result&); + ThriftHiveMetastore_append_partition_result() { + } + + virtual ~ThriftHiveMetastore_append_partition_result() throw(); + Partition success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_append_partition_result__isset __isset; + + void __set_success(const Partition& val); + + void __set_o1(const InvalidObjectException& val); + + void __set_o2(const AlreadyExistsException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_append_partition_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_append_partition_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_append_partition_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_append_partition_presult__isset { + _ThriftHiveMetastore_append_partition_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_append_partition_presult__isset; + +class ThriftHiveMetastore_append_partition_presult { + public: + + + virtual ~ThriftHiveMetastore_append_partition_presult() throw(); + Partition* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_append_partition_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_partitions_req_args__isset { + _ThriftHiveMetastore_add_partitions_req_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_add_partitions_req_args__isset; + +class ThriftHiveMetastore_add_partitions_req_args { + public: + + ThriftHiveMetastore_add_partitions_req_args(const ThriftHiveMetastore_add_partitions_req_args&); + ThriftHiveMetastore_add_partitions_req_args& operator=(const ThriftHiveMetastore_add_partitions_req_args&); + ThriftHiveMetastore_add_partitions_req_args() { + } + + virtual ~ThriftHiveMetastore_add_partitions_req_args() throw(); + AddPartitionsRequest request; + + _ThriftHiveMetastore_add_partitions_req_args__isset __isset; + + void __set_request(const AddPartitionsRequest& val); + + bool operator == (const ThriftHiveMetastore_add_partitions_req_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_partitions_req_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_partitions_req_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_partitions_req_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_partitions_req_pargs() throw(); + const AddPartitionsRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_partitions_req_result__isset { + _ThriftHiveMetastore_add_partitions_req_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_add_partitions_req_result__isset; + +class ThriftHiveMetastore_add_partitions_req_result { + public: + + ThriftHiveMetastore_add_partitions_req_result(const ThriftHiveMetastore_add_partitions_req_result&); + ThriftHiveMetastore_add_partitions_req_result& operator=(const ThriftHiveMetastore_add_partitions_req_result&); + ThriftHiveMetastore_add_partitions_req_result() { + } + + virtual ~ThriftHiveMetastore_add_partitions_req_result() throw(); + AddPartitionsResult success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_partitions_req_result__isset __isset; + + void __set_success(const AddPartitionsResult& val); + + void __set_o1(const InvalidObjectException& val); + + void __set_o2(const AlreadyExistsException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_add_partitions_req_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_partitions_req_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_partitions_req_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_partitions_req_presult__isset { + _ThriftHiveMetastore_add_partitions_req_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_add_partitions_req_presult__isset; + +class ThriftHiveMetastore_add_partitions_req_presult { + public: + + + virtual ~ThriftHiveMetastore_add_partitions_req_presult() throw(); + AddPartitionsResult* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_partitions_req_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_append_partition_with_environment_context_args__isset { + _ThriftHiveMetastore_append_partition_with_environment_context_args__isset() : db_name(false), tbl_name(false), part_vals(false), environment_context(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_vals :1; + bool environment_context :1; +} _ThriftHiveMetastore_append_partition_with_environment_context_args__isset; + +class ThriftHiveMetastore_append_partition_with_environment_context_args { + public: + + ThriftHiveMetastore_append_partition_with_environment_context_args(const ThriftHiveMetastore_append_partition_with_environment_context_args&); + ThriftHiveMetastore_append_partition_with_environment_context_args& operator=(const ThriftHiveMetastore_append_partition_with_environment_context_args&); + ThriftHiveMetastore_append_partition_with_environment_context_args() : db_name(), tbl_name() { + } + + virtual ~ThriftHiveMetastore_append_partition_with_environment_context_args() throw(); + std::string db_name; + std::string tbl_name; + std::vector part_vals; + EnvironmentContext environment_context; + + _ThriftHiveMetastore_append_partition_with_environment_context_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_vals(const std::vector & val); + + void __set_environment_context(const EnvironmentContext& val); + + bool operator == (const ThriftHiveMetastore_append_partition_with_environment_context_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(environment_context == rhs.environment_context)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_append_partition_with_environment_context_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_append_partition_with_environment_context_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_append_partition_with_environment_context_pargs { + public: + + + virtual ~ThriftHiveMetastore_append_partition_with_environment_context_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + const EnvironmentContext* environment_context; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_append_partition_with_environment_context_result__isset { + _ThriftHiveMetastore_append_partition_with_environment_context_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_append_partition_with_environment_context_result__isset; + +class ThriftHiveMetastore_append_partition_with_environment_context_result { + public: + + ThriftHiveMetastore_append_partition_with_environment_context_result(const ThriftHiveMetastore_append_partition_with_environment_context_result&); + ThriftHiveMetastore_append_partition_with_environment_context_result& operator=(const ThriftHiveMetastore_append_partition_with_environment_context_result&); + ThriftHiveMetastore_append_partition_with_environment_context_result() { + } + + virtual ~ThriftHiveMetastore_append_partition_with_environment_context_result() throw(); + Partition success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_append_partition_with_environment_context_result__isset __isset; + + void __set_success(const Partition& val); + + void __set_o1(const InvalidObjectException& val); + + void __set_o2(const AlreadyExistsException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_append_partition_with_environment_context_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_append_partition_with_environment_context_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_append_partition_with_environment_context_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_append_partition_with_environment_context_presult__isset { + _ThriftHiveMetastore_append_partition_with_environment_context_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_append_partition_with_environment_context_presult__isset; + +class ThriftHiveMetastore_append_partition_with_environment_context_presult { + public: + + + virtual ~ThriftHiveMetastore_append_partition_with_environment_context_presult() throw(); + Partition* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_append_partition_with_environment_context_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_append_partition_by_name_args__isset { + _ThriftHiveMetastore_append_partition_by_name_args__isset() : db_name(false), tbl_name(false), part_name(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_name :1; +} _ThriftHiveMetastore_append_partition_by_name_args__isset; + +class ThriftHiveMetastore_append_partition_by_name_args { + public: + + ThriftHiveMetastore_append_partition_by_name_args(const ThriftHiveMetastore_append_partition_by_name_args&); + ThriftHiveMetastore_append_partition_by_name_args& operator=(const ThriftHiveMetastore_append_partition_by_name_args&); + ThriftHiveMetastore_append_partition_by_name_args() : db_name(), tbl_name(), part_name() { + } + + virtual ~ThriftHiveMetastore_append_partition_by_name_args() throw(); + std::string db_name; + std::string tbl_name; + std::string part_name; + + _ThriftHiveMetastore_append_partition_by_name_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_append_partition_by_name_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_append_partition_by_name_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_append_partition_by_name_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_append_partition_by_name_pargs { + public: + + + virtual ~ThriftHiveMetastore_append_partition_by_name_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* part_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_append_partition_by_name_result__isset { + _ThriftHiveMetastore_append_partition_by_name_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_append_partition_by_name_result__isset; + +class ThriftHiveMetastore_append_partition_by_name_result { + public: + + ThriftHiveMetastore_append_partition_by_name_result(const ThriftHiveMetastore_append_partition_by_name_result&); + ThriftHiveMetastore_append_partition_by_name_result& operator=(const ThriftHiveMetastore_append_partition_by_name_result&); + ThriftHiveMetastore_append_partition_by_name_result() { + } + + virtual ~ThriftHiveMetastore_append_partition_by_name_result() throw(); + Partition success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_append_partition_by_name_result__isset __isset; + + void __set_success(const Partition& val); + + void __set_o1(const InvalidObjectException& val); + + void __set_o2(const AlreadyExistsException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_append_partition_by_name_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_append_partition_by_name_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_append_partition_by_name_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_append_partition_by_name_presult__isset { + _ThriftHiveMetastore_append_partition_by_name_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_append_partition_by_name_presult__isset; + +class ThriftHiveMetastore_append_partition_by_name_presult { + public: + + + virtual ~ThriftHiveMetastore_append_partition_by_name_presult() throw(); + Partition* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_append_partition_by_name_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_append_partition_by_name_with_environment_context_args__isset { + _ThriftHiveMetastore_append_partition_by_name_with_environment_context_args__isset() : db_name(false), tbl_name(false), part_name(false), environment_context(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_name :1; + bool environment_context :1; +} _ThriftHiveMetastore_append_partition_by_name_with_environment_context_args__isset; + +class ThriftHiveMetastore_append_partition_by_name_with_environment_context_args { + public: + + ThriftHiveMetastore_append_partition_by_name_with_environment_context_args(const ThriftHiveMetastore_append_partition_by_name_with_environment_context_args&); + ThriftHiveMetastore_append_partition_by_name_with_environment_context_args& operator=(const ThriftHiveMetastore_append_partition_by_name_with_environment_context_args&); + ThriftHiveMetastore_append_partition_by_name_with_environment_context_args() : db_name(), tbl_name(), part_name() { + } + + virtual ~ThriftHiveMetastore_append_partition_by_name_with_environment_context_args() throw(); + std::string db_name; + std::string tbl_name; + std::string part_name; + EnvironmentContext environment_context; + + _ThriftHiveMetastore_append_partition_by_name_with_environment_context_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_name(const std::string& val); + + void __set_environment_context(const EnvironmentContext& val); + + bool operator == (const ThriftHiveMetastore_append_partition_by_name_with_environment_context_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(environment_context == rhs.environment_context)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_append_partition_by_name_with_environment_context_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_append_partition_by_name_with_environment_context_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs { + public: + + + virtual ~ThriftHiveMetastore_append_partition_by_name_with_environment_context_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* part_name; + const EnvironmentContext* environment_context; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_append_partition_by_name_with_environment_context_result__isset { + _ThriftHiveMetastore_append_partition_by_name_with_environment_context_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_append_partition_by_name_with_environment_context_result__isset; + +class ThriftHiveMetastore_append_partition_by_name_with_environment_context_result { + public: + + ThriftHiveMetastore_append_partition_by_name_with_environment_context_result(const ThriftHiveMetastore_append_partition_by_name_with_environment_context_result&); + ThriftHiveMetastore_append_partition_by_name_with_environment_context_result& operator=(const ThriftHiveMetastore_append_partition_by_name_with_environment_context_result&); + ThriftHiveMetastore_append_partition_by_name_with_environment_context_result() { + } + + virtual ~ThriftHiveMetastore_append_partition_by_name_with_environment_context_result() throw(); + Partition success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_append_partition_by_name_with_environment_context_result__isset __isset; + + void __set_success(const Partition& val); + + void __set_o1(const InvalidObjectException& val); + + void __set_o2(const AlreadyExistsException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_append_partition_by_name_with_environment_context_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_append_partition_by_name_with_environment_context_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_append_partition_by_name_with_environment_context_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult__isset { + _ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult__isset; + +class ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult { + public: + + + virtual ~ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult() throw(); + Partition* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_append_partition_by_name_with_environment_context_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_partition_args__isset { + _ThriftHiveMetastore_drop_partition_args__isset() : db_name(false), tbl_name(false), part_vals(false), deleteData(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_vals :1; + bool deleteData :1; +} _ThriftHiveMetastore_drop_partition_args__isset; + +class ThriftHiveMetastore_drop_partition_args { + public: + + ThriftHiveMetastore_drop_partition_args(const ThriftHiveMetastore_drop_partition_args&); + ThriftHiveMetastore_drop_partition_args& operator=(const ThriftHiveMetastore_drop_partition_args&); + ThriftHiveMetastore_drop_partition_args() : db_name(), tbl_name(), deleteData(0) { + } + + virtual ~ThriftHiveMetastore_drop_partition_args() throw(); + std::string db_name; + std::string tbl_name; + std::vector part_vals; + bool deleteData; + + _ThriftHiveMetastore_drop_partition_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_vals(const std::vector & val); + + void __set_deleteData(const bool val); + + bool operator == (const ThriftHiveMetastore_drop_partition_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partition_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_partition_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_partition_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + const bool* deleteData; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_partition_result__isset { + _ThriftHiveMetastore_drop_partition_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_partition_result__isset; + +class ThriftHiveMetastore_drop_partition_result { + public: + + ThriftHiveMetastore_drop_partition_result(const ThriftHiveMetastore_drop_partition_result&); + ThriftHiveMetastore_drop_partition_result& operator=(const ThriftHiveMetastore_drop_partition_result&); + ThriftHiveMetastore_drop_partition_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_partition_result() throw(); + bool success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partition_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_drop_partition_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partition_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_partition_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_partition_presult__isset { + _ThriftHiveMetastore_drop_partition_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_partition_presult__isset; + +class ThriftHiveMetastore_drop_partition_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_partition_presult() throw(); + bool* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partition_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_partition_with_environment_context_args__isset { + _ThriftHiveMetastore_drop_partition_with_environment_context_args__isset() : db_name(false), tbl_name(false), part_vals(false), deleteData(false), environment_context(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_vals :1; + bool deleteData :1; + bool environment_context :1; +} _ThriftHiveMetastore_drop_partition_with_environment_context_args__isset; + +class ThriftHiveMetastore_drop_partition_with_environment_context_args { + public: + + ThriftHiveMetastore_drop_partition_with_environment_context_args(const ThriftHiveMetastore_drop_partition_with_environment_context_args&); + ThriftHiveMetastore_drop_partition_with_environment_context_args& operator=(const ThriftHiveMetastore_drop_partition_with_environment_context_args&); + ThriftHiveMetastore_drop_partition_with_environment_context_args() : db_name(), tbl_name(), deleteData(0) { + } + + virtual ~ThriftHiveMetastore_drop_partition_with_environment_context_args() throw(); + std::string db_name; + std::string tbl_name; + std::vector part_vals; + bool deleteData; + EnvironmentContext environment_context; + + _ThriftHiveMetastore_drop_partition_with_environment_context_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_vals(const std::vector & val); + + void __set_deleteData(const bool val); + + void __set_environment_context(const EnvironmentContext& val); + + bool operator == (const ThriftHiveMetastore_drop_partition_with_environment_context_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + if (!(environment_context == rhs.environment_context)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partition_with_environment_context_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_partition_with_environment_context_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_partition_with_environment_context_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_partition_with_environment_context_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + const bool* deleteData; + const EnvironmentContext* environment_context; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_partition_with_environment_context_result__isset { + _ThriftHiveMetastore_drop_partition_with_environment_context_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_partition_with_environment_context_result__isset; + +class ThriftHiveMetastore_drop_partition_with_environment_context_result { + public: + + ThriftHiveMetastore_drop_partition_with_environment_context_result(const ThriftHiveMetastore_drop_partition_with_environment_context_result&); + ThriftHiveMetastore_drop_partition_with_environment_context_result& operator=(const ThriftHiveMetastore_drop_partition_with_environment_context_result&); + ThriftHiveMetastore_drop_partition_with_environment_context_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_partition_with_environment_context_result() throw(); + bool success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partition_with_environment_context_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_drop_partition_with_environment_context_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partition_with_environment_context_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_partition_with_environment_context_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_partition_with_environment_context_presult__isset { + _ThriftHiveMetastore_drop_partition_with_environment_context_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_partition_with_environment_context_presult__isset; + +class ThriftHiveMetastore_drop_partition_with_environment_context_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_partition_with_environment_context_presult() throw(); + bool* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partition_with_environment_context_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_partition_by_name_args__isset { + _ThriftHiveMetastore_drop_partition_by_name_args__isset() : db_name(false), tbl_name(false), part_name(false), deleteData(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_name :1; + bool deleteData :1; +} _ThriftHiveMetastore_drop_partition_by_name_args__isset; + +class ThriftHiveMetastore_drop_partition_by_name_args { + public: + + ThriftHiveMetastore_drop_partition_by_name_args(const ThriftHiveMetastore_drop_partition_by_name_args&); + ThriftHiveMetastore_drop_partition_by_name_args& operator=(const ThriftHiveMetastore_drop_partition_by_name_args&); + ThriftHiveMetastore_drop_partition_by_name_args() : db_name(), tbl_name(), part_name(), deleteData(0) { + } + + virtual ~ThriftHiveMetastore_drop_partition_by_name_args() throw(); + std::string db_name; + std::string tbl_name; + std::string part_name; + bool deleteData; + + _ThriftHiveMetastore_drop_partition_by_name_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_name(const std::string& val); + + void __set_deleteData(const bool val); + + bool operator == (const ThriftHiveMetastore_drop_partition_by_name_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partition_by_name_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_partition_by_name_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_partition_by_name_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_partition_by_name_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* part_name; + const bool* deleteData; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_partition_by_name_result__isset { + _ThriftHiveMetastore_drop_partition_by_name_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_partition_by_name_result__isset; + +class ThriftHiveMetastore_drop_partition_by_name_result { + public: + + ThriftHiveMetastore_drop_partition_by_name_result(const ThriftHiveMetastore_drop_partition_by_name_result&); + ThriftHiveMetastore_drop_partition_by_name_result& operator=(const ThriftHiveMetastore_drop_partition_by_name_result&); + ThriftHiveMetastore_drop_partition_by_name_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_partition_by_name_result() throw(); + bool success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partition_by_name_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_drop_partition_by_name_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partition_by_name_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_partition_by_name_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_partition_by_name_presult__isset { + _ThriftHiveMetastore_drop_partition_by_name_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_partition_by_name_presult__isset; + +class ThriftHiveMetastore_drop_partition_by_name_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_partition_by_name_presult() throw(); + bool* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partition_by_name_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args__isset { + _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args__isset() : db_name(false), tbl_name(false), part_name(false), deleteData(false), environment_context(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_name :1; + bool deleteData :1; + bool environment_context :1; +} _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args__isset; + +class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args { + public: + + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args(const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args&); + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args& operator=(const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args&); + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args() : db_name(), tbl_name(), part_name(), deleteData(0) { + } + + virtual ~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args() throw(); + std::string db_name; + std::string tbl_name; + std::string part_name; + bool deleteData; + EnvironmentContext environment_context; + + _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_name(const std::string& val); + + void __set_deleteData(const bool val); + + void __set_environment_context(const EnvironmentContext& val); + + bool operator == (const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + if (!(environment_context == rhs.environment_context)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* part_name; + const bool* deleteData; + const EnvironmentContext* environment_context; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result__isset { + _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result__isset; + +class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result { + public: + + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result(const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result&); + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result& operator=(const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result&); + ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result() throw(); + bool success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult__isset { + _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult__isset; + +class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult() throw(); + bool* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partition_by_name_with_environment_context_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_partitions_req_args__isset { + _ThriftHiveMetastore_drop_partitions_req_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_drop_partitions_req_args__isset; + +class ThriftHiveMetastore_drop_partitions_req_args { + public: + + ThriftHiveMetastore_drop_partitions_req_args(const ThriftHiveMetastore_drop_partitions_req_args&); + ThriftHiveMetastore_drop_partitions_req_args& operator=(const ThriftHiveMetastore_drop_partitions_req_args&); + ThriftHiveMetastore_drop_partitions_req_args() { + } + + virtual ~ThriftHiveMetastore_drop_partitions_req_args() throw(); + DropPartitionsRequest req; + + _ThriftHiveMetastore_drop_partitions_req_args__isset __isset; + + void __set_req(const DropPartitionsRequest& val); + + bool operator == (const ThriftHiveMetastore_drop_partitions_req_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partitions_req_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_partitions_req_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_partitions_req_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_partitions_req_pargs() throw(); + const DropPartitionsRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_partitions_req_result__isset { + _ThriftHiveMetastore_drop_partitions_req_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_partitions_req_result__isset; + +class ThriftHiveMetastore_drop_partitions_req_result { + public: + + ThriftHiveMetastore_drop_partitions_req_result(const ThriftHiveMetastore_drop_partitions_req_result&); + ThriftHiveMetastore_drop_partitions_req_result& operator=(const ThriftHiveMetastore_drop_partitions_req_result&); + ThriftHiveMetastore_drop_partitions_req_result() { + } + + virtual ~ThriftHiveMetastore_drop_partitions_req_result() throw(); + DropPartitionsResult success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partitions_req_result__isset __isset; + + void __set_success(const DropPartitionsResult& val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_drop_partitions_req_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_partitions_req_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_partitions_req_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_partitions_req_presult__isset { + _ThriftHiveMetastore_drop_partitions_req_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_partitions_req_presult__isset; + +class ThriftHiveMetastore_drop_partitions_req_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_partitions_req_presult() throw(); + DropPartitionsResult* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_partitions_req_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partition_args__isset { + _ThriftHiveMetastore_get_partition_args__isset() : db_name(false), tbl_name(false), part_vals(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_vals :1; +} _ThriftHiveMetastore_get_partition_args__isset; + +class ThriftHiveMetastore_get_partition_args { + public: + + ThriftHiveMetastore_get_partition_args(const ThriftHiveMetastore_get_partition_args&); + ThriftHiveMetastore_get_partition_args& operator=(const ThriftHiveMetastore_get_partition_args&); + ThriftHiveMetastore_get_partition_args() : db_name(), tbl_name() { + } + + virtual ~ThriftHiveMetastore_get_partition_args() throw(); + std::string db_name; + std::string tbl_name; + std::vector part_vals; + + _ThriftHiveMetastore_get_partition_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_vals(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_get_partition_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_result__isset { + _ThriftHiveMetastore_get_partition_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partition_result__isset; + +class ThriftHiveMetastore_get_partition_result { + public: + + ThriftHiveMetastore_get_partition_result(const ThriftHiveMetastore_get_partition_result&); + ThriftHiveMetastore_get_partition_result& operator=(const ThriftHiveMetastore_get_partition_result&); + ThriftHiveMetastore_get_partition_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_result() throw(); + Partition success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_result__isset __isset; + + void __set_success(const Partition& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_partition_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_presult__isset { + _ThriftHiveMetastore_get_partition_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partition_presult__isset; + +class ThriftHiveMetastore_get_partition_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partition_presult() throw(); + Partition* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_exchange_partition_args__isset { + _ThriftHiveMetastore_exchange_partition_args__isset() : partitionSpecs(false), source_db(false), source_table_name(false), dest_db(false), dest_table_name(false) {} + bool partitionSpecs :1; + bool source_db :1; + bool source_table_name :1; + bool dest_db :1; + bool dest_table_name :1; +} _ThriftHiveMetastore_exchange_partition_args__isset; + +class ThriftHiveMetastore_exchange_partition_args { + public: + + ThriftHiveMetastore_exchange_partition_args(const ThriftHiveMetastore_exchange_partition_args&); + ThriftHiveMetastore_exchange_partition_args& operator=(const ThriftHiveMetastore_exchange_partition_args&); + ThriftHiveMetastore_exchange_partition_args() : source_db(), source_table_name(), dest_db(), dest_table_name() { + } + + virtual ~ThriftHiveMetastore_exchange_partition_args() throw(); + std::map partitionSpecs; + std::string source_db; + std::string source_table_name; + std::string dest_db; + std::string dest_table_name; + + _ThriftHiveMetastore_exchange_partition_args__isset __isset; + + void __set_partitionSpecs(const std::map & val); + + void __set_source_db(const std::string& val); + + void __set_source_table_name(const std::string& val); + + void __set_dest_db(const std::string& val); + + void __set_dest_table_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_exchange_partition_args & rhs) const + { + if (!(partitionSpecs == rhs.partitionSpecs)) + return false; + if (!(source_db == rhs.source_db)) + return false; + if (!(source_table_name == rhs.source_table_name)) + return false; + if (!(dest_db == rhs.dest_db)) + return false; + if (!(dest_table_name == rhs.dest_table_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_exchange_partition_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_exchange_partition_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_exchange_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_exchange_partition_pargs() throw(); + const std::map * partitionSpecs; + const std::string* source_db; + const std::string* source_table_name; + const std::string* dest_db; + const std::string* dest_table_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_exchange_partition_result__isset { + _ThriftHiveMetastore_exchange_partition_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_exchange_partition_result__isset; + +class ThriftHiveMetastore_exchange_partition_result { + public: + + ThriftHiveMetastore_exchange_partition_result(const ThriftHiveMetastore_exchange_partition_result&); + ThriftHiveMetastore_exchange_partition_result& operator=(const ThriftHiveMetastore_exchange_partition_result&); + ThriftHiveMetastore_exchange_partition_result() { + } + + virtual ~ThriftHiveMetastore_exchange_partition_result() throw(); + Partition success; + MetaException o1; + NoSuchObjectException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_exchange_partition_result__isset __isset; + + void __set_success(const Partition& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + void __set_o3(const InvalidObjectException& val); + + void __set_o4(const InvalidInputException& val); + + bool operator == (const ThriftHiveMetastore_exchange_partition_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_exchange_partition_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_exchange_partition_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_exchange_partition_presult__isset { + _ThriftHiveMetastore_exchange_partition_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_exchange_partition_presult__isset; + +class ThriftHiveMetastore_exchange_partition_presult { + public: + + + virtual ~ThriftHiveMetastore_exchange_partition_presult() throw(); + Partition* success; + MetaException o1; + NoSuchObjectException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_exchange_partition_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_exchange_partitions_args__isset { + _ThriftHiveMetastore_exchange_partitions_args__isset() : partitionSpecs(false), source_db(false), source_table_name(false), dest_db(false), dest_table_name(false) {} + bool partitionSpecs :1; + bool source_db :1; + bool source_table_name :1; + bool dest_db :1; + bool dest_table_name :1; +} _ThriftHiveMetastore_exchange_partitions_args__isset; + +class ThriftHiveMetastore_exchange_partitions_args { + public: + + ThriftHiveMetastore_exchange_partitions_args(const ThriftHiveMetastore_exchange_partitions_args&); + ThriftHiveMetastore_exchange_partitions_args& operator=(const ThriftHiveMetastore_exchange_partitions_args&); + ThriftHiveMetastore_exchange_partitions_args() : source_db(), source_table_name(), dest_db(), dest_table_name() { + } + + virtual ~ThriftHiveMetastore_exchange_partitions_args() throw(); + std::map partitionSpecs; + std::string source_db; + std::string source_table_name; + std::string dest_db; + std::string dest_table_name; + + _ThriftHiveMetastore_exchange_partitions_args__isset __isset; + + void __set_partitionSpecs(const std::map & val); + + void __set_source_db(const std::string& val); + + void __set_source_table_name(const std::string& val); + + void __set_dest_db(const std::string& val); + + void __set_dest_table_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_exchange_partitions_args & rhs) const + { + if (!(partitionSpecs == rhs.partitionSpecs)) + return false; + if (!(source_db == rhs.source_db)) + return false; + if (!(source_table_name == rhs.source_table_name)) + return false; + if (!(dest_db == rhs.dest_db)) + return false; + if (!(dest_table_name == rhs.dest_table_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_exchange_partitions_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_exchange_partitions_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_exchange_partitions_pargs { + public: + + + virtual ~ThriftHiveMetastore_exchange_partitions_pargs() throw(); + const std::map * partitionSpecs; + const std::string* source_db; + const std::string* source_table_name; + const std::string* dest_db; + const std::string* dest_table_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_exchange_partitions_result__isset { + _ThriftHiveMetastore_exchange_partitions_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_exchange_partitions_result__isset; + +class ThriftHiveMetastore_exchange_partitions_result { + public: + + ThriftHiveMetastore_exchange_partitions_result(const ThriftHiveMetastore_exchange_partitions_result&); + ThriftHiveMetastore_exchange_partitions_result& operator=(const ThriftHiveMetastore_exchange_partitions_result&); + ThriftHiveMetastore_exchange_partitions_result() { + } + + virtual ~ThriftHiveMetastore_exchange_partitions_result() throw(); + std::vector success; + MetaException o1; + NoSuchObjectException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_exchange_partitions_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + void __set_o3(const InvalidObjectException& val); + + void __set_o4(const InvalidInputException& val); + + bool operator == (const ThriftHiveMetastore_exchange_partitions_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_exchange_partitions_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_exchange_partitions_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_exchange_partitions_presult__isset { + _ThriftHiveMetastore_exchange_partitions_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_exchange_partitions_presult__isset; + +class ThriftHiveMetastore_exchange_partitions_presult { + public: + + + virtual ~ThriftHiveMetastore_exchange_partitions_presult() throw(); + std::vector * success; + MetaException o1; + NoSuchObjectException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_exchange_partitions_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partition_with_auth_args__isset { + _ThriftHiveMetastore_get_partition_with_auth_args__isset() : db_name(false), tbl_name(false), part_vals(false), user_name(false), group_names(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_vals :1; + bool user_name :1; + bool group_names :1; +} _ThriftHiveMetastore_get_partition_with_auth_args__isset; + +class ThriftHiveMetastore_get_partition_with_auth_args { + public: + + ThriftHiveMetastore_get_partition_with_auth_args(const ThriftHiveMetastore_get_partition_with_auth_args&); + ThriftHiveMetastore_get_partition_with_auth_args& operator=(const ThriftHiveMetastore_get_partition_with_auth_args&); + ThriftHiveMetastore_get_partition_with_auth_args() : db_name(), tbl_name(), user_name() { + } + + virtual ~ThriftHiveMetastore_get_partition_with_auth_args() throw(); + std::string db_name; + std::string tbl_name; + std::vector part_vals; + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_get_partition_with_auth_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_vals(const std::vector & val); + + void __set_user_name(const std::string& val); + + void __set_group_names(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_get_partition_with_auth_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_with_auth_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_with_auth_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partition_with_auth_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_with_auth_pargs() throw(); + 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; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_with_auth_result__isset { + _ThriftHiveMetastore_get_partition_with_auth_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partition_with_auth_result__isset; + +class ThriftHiveMetastore_get_partition_with_auth_result { + public: + + ThriftHiveMetastore_get_partition_with_auth_result(const ThriftHiveMetastore_get_partition_with_auth_result&); + ThriftHiveMetastore_get_partition_with_auth_result& operator=(const ThriftHiveMetastore_get_partition_with_auth_result&); + ThriftHiveMetastore_get_partition_with_auth_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_with_auth_result() throw(); + Partition success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_with_auth_result__isset __isset; + + void __set_success(const Partition& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_partition_with_auth_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_with_auth_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_with_auth_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_with_auth_presult__isset { + _ThriftHiveMetastore_get_partition_with_auth_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partition_with_auth_presult__isset; + +class ThriftHiveMetastore_get_partition_with_auth_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partition_with_auth_presult() throw(); + Partition* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_with_auth_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partition_by_name_args__isset { + _ThriftHiveMetastore_get_partition_by_name_args__isset() : db_name(false), tbl_name(false), part_name(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_name :1; +} _ThriftHiveMetastore_get_partition_by_name_args__isset; + +class ThriftHiveMetastore_get_partition_by_name_args { + public: + + ThriftHiveMetastore_get_partition_by_name_args(const ThriftHiveMetastore_get_partition_by_name_args&); + ThriftHiveMetastore_get_partition_by_name_args& operator=(const ThriftHiveMetastore_get_partition_by_name_args&); + ThriftHiveMetastore_get_partition_by_name_args() : db_name(), tbl_name(), part_name() { + } + + virtual ~ThriftHiveMetastore_get_partition_by_name_args() throw(); + std::string db_name; + std::string tbl_name; + std::string part_name; + + _ThriftHiveMetastore_get_partition_by_name_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_partition_by_name_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_by_name_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_by_name_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partition_by_name_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_by_name_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* part_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_by_name_result__isset { + _ThriftHiveMetastore_get_partition_by_name_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partition_by_name_result__isset; + +class ThriftHiveMetastore_get_partition_by_name_result { + public: + + ThriftHiveMetastore_get_partition_by_name_result(const ThriftHiveMetastore_get_partition_by_name_result&); + ThriftHiveMetastore_get_partition_by_name_result& operator=(const ThriftHiveMetastore_get_partition_by_name_result&); + ThriftHiveMetastore_get_partition_by_name_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_by_name_result() throw(); + Partition success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_by_name_result__isset __isset; + + void __set_success(const Partition& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_partition_by_name_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_by_name_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_by_name_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_by_name_presult__isset { + _ThriftHiveMetastore_get_partition_by_name_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partition_by_name_presult__isset; + +class ThriftHiveMetastore_get_partition_by_name_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partition_by_name_presult() throw(); + Partition* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_by_name_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_args__isset { + _ThriftHiveMetastore_get_partitions_args__isset() : db_name(false), tbl_name(false), max_parts(true) {} + bool db_name :1; + bool tbl_name :1; + bool max_parts :1; +} _ThriftHiveMetastore_get_partitions_args__isset; + +class ThriftHiveMetastore_get_partitions_args { + public: + + ThriftHiveMetastore_get_partitions_args(const ThriftHiveMetastore_get_partitions_args&); + ThriftHiveMetastore_get_partitions_args& operator=(const ThriftHiveMetastore_get_partitions_args&); + ThriftHiveMetastore_get_partitions_args() : db_name(), tbl_name(), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_partitions_args() throw(); + std::string db_name; + std::string tbl_name; + int16_t max_parts; + + _ThriftHiveMetastore_get_partitions_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_max_parts(const int16_t val); + + bool operator == (const ThriftHiveMetastore_get_partitions_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partitions_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const int16_t* max_parts; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_result__isset { + _ThriftHiveMetastore_get_partitions_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_result__isset; + +class ThriftHiveMetastore_get_partitions_result { + public: + + ThriftHiveMetastore_get_partitions_result(const ThriftHiveMetastore_get_partitions_result&); + ThriftHiveMetastore_get_partitions_result& operator=(const ThriftHiveMetastore_get_partitions_result&); + ThriftHiveMetastore_get_partitions_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_result() throw(); + std::vector success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_partitions_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_presult__isset { + _ThriftHiveMetastore_get_partitions_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_presult__isset; + +class ThriftHiveMetastore_get_partitions_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_presult() throw(); + std::vector * success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_with_auth_args__isset { + _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 :1; + bool tbl_name :1; + bool max_parts :1; + bool user_name :1; + bool group_names :1; +} _ThriftHiveMetastore_get_partitions_with_auth_args__isset; + +class ThriftHiveMetastore_get_partitions_with_auth_args { + public: + + ThriftHiveMetastore_get_partitions_with_auth_args(const ThriftHiveMetastore_get_partitions_with_auth_args&); + ThriftHiveMetastore_get_partitions_with_auth_args& operator=(const ThriftHiveMetastore_get_partitions_with_auth_args&); + ThriftHiveMetastore_get_partitions_with_auth_args() : db_name(), tbl_name(), max_parts(-1), user_name() { + } + + virtual ~ThriftHiveMetastore_get_partitions_with_auth_args() throw(); + std::string db_name; + std::string tbl_name; + int16_t max_parts; + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_get_partitions_with_auth_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_max_parts(const int16_t val); + + void __set_user_name(const std::string& val); + + void __set_group_names(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_get_partitions_with_auth_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_with_auth_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_with_auth_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partitions_with_auth_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_with_auth_pargs() throw(); + 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; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_with_auth_result__isset { + _ThriftHiveMetastore_get_partitions_with_auth_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_with_auth_result__isset; + +class ThriftHiveMetastore_get_partitions_with_auth_result { + public: + + ThriftHiveMetastore_get_partitions_with_auth_result(const ThriftHiveMetastore_get_partitions_with_auth_result&); + ThriftHiveMetastore_get_partitions_with_auth_result& operator=(const ThriftHiveMetastore_get_partitions_with_auth_result&); + ThriftHiveMetastore_get_partitions_with_auth_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_with_auth_result() throw(); + std::vector success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_with_auth_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_partitions_with_auth_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_with_auth_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_with_auth_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_with_auth_presult__isset { + _ThriftHiveMetastore_get_partitions_with_auth_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_with_auth_presult__isset; + +class ThriftHiveMetastore_get_partitions_with_auth_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_with_auth_presult() throw(); + std::vector * success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_with_auth_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_pspec_args__isset { + _ThriftHiveMetastore_get_partitions_pspec_args__isset() : db_name(false), tbl_name(false), max_parts(true) {} + bool db_name :1; + bool tbl_name :1; + bool max_parts :1; +} _ThriftHiveMetastore_get_partitions_pspec_args__isset; + +class ThriftHiveMetastore_get_partitions_pspec_args { + public: + + ThriftHiveMetastore_get_partitions_pspec_args(const ThriftHiveMetastore_get_partitions_pspec_args&); + ThriftHiveMetastore_get_partitions_pspec_args& operator=(const ThriftHiveMetastore_get_partitions_pspec_args&); + ThriftHiveMetastore_get_partitions_pspec_args() : db_name(), tbl_name(), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_partitions_pspec_args() throw(); + std::string db_name; + std::string tbl_name; + int32_t max_parts; + + _ThriftHiveMetastore_get_partitions_pspec_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_max_parts(const int32_t val); + + bool operator == (const ThriftHiveMetastore_get_partitions_pspec_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_pspec_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_pspec_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partitions_pspec_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_pspec_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const int32_t* max_parts; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_pspec_result__isset { + _ThriftHiveMetastore_get_partitions_pspec_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_pspec_result__isset; + +class ThriftHiveMetastore_get_partitions_pspec_result { + public: + + ThriftHiveMetastore_get_partitions_pspec_result(const ThriftHiveMetastore_get_partitions_pspec_result&); + ThriftHiveMetastore_get_partitions_pspec_result& operator=(const ThriftHiveMetastore_get_partitions_pspec_result&); + ThriftHiveMetastore_get_partitions_pspec_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_pspec_result() throw(); + std::vector success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_pspec_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_partitions_pspec_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_pspec_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_pspec_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_pspec_presult__isset { + _ThriftHiveMetastore_get_partitions_pspec_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_pspec_presult__isset; + +class ThriftHiveMetastore_get_partitions_pspec_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_pspec_presult() throw(); + std::vector * success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_pspec_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partition_names_args__isset { + _ThriftHiveMetastore_get_partition_names_args__isset() : db_name(false), tbl_name(false), max_parts(true) {} + bool db_name :1; + bool tbl_name :1; + bool max_parts :1; +} _ThriftHiveMetastore_get_partition_names_args__isset; + +class ThriftHiveMetastore_get_partition_names_args { + public: + + ThriftHiveMetastore_get_partition_names_args(const ThriftHiveMetastore_get_partition_names_args&); + ThriftHiveMetastore_get_partition_names_args& operator=(const ThriftHiveMetastore_get_partition_names_args&); + ThriftHiveMetastore_get_partition_names_args() : db_name(), tbl_name(), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_partition_names_args() throw(); + std::string db_name; + std::string tbl_name; + int16_t max_parts; + + _ThriftHiveMetastore_get_partition_names_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_max_parts(const int16_t val); + + bool operator == (const ThriftHiveMetastore_get_partition_names_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_names_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_names_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partition_names_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_names_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const int16_t* max_parts; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_names_result__isset { + _ThriftHiveMetastore_get_partition_names_result__isset() : success(false), o2(false) {} + bool success :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partition_names_result__isset; + +class ThriftHiveMetastore_get_partition_names_result { + public: + + ThriftHiveMetastore_get_partition_names_result(const ThriftHiveMetastore_get_partition_names_result&); + ThriftHiveMetastore_get_partition_names_result& operator=(const ThriftHiveMetastore_get_partition_names_result&); + ThriftHiveMetastore_get_partition_names_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_names_result() throw(); + std::vector success; + MetaException o2; + + _ThriftHiveMetastore_get_partition_names_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_partition_names_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_names_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_names_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_names_presult__isset { + _ThriftHiveMetastore_get_partition_names_presult__isset() : success(false), o2(false) {} + bool success :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partition_names_presult__isset; + +class ThriftHiveMetastore_get_partition_names_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partition_names_presult() throw(); + std::vector * success; + MetaException o2; + + _ThriftHiveMetastore_get_partition_names_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +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(true) {} + bool db_name :1; + bool tbl_name :1; + bool part_vals :1; + bool max_parts :1; +} _ThriftHiveMetastore_get_partitions_ps_args__isset; + +class ThriftHiveMetastore_get_partitions_ps_args { + public: + + ThriftHiveMetastore_get_partitions_ps_args(const ThriftHiveMetastore_get_partitions_ps_args&); + ThriftHiveMetastore_get_partitions_ps_args& operator=(const ThriftHiveMetastore_get_partitions_ps_args&); + ThriftHiveMetastore_get_partitions_ps_args() : db_name(), tbl_name(), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_partitions_ps_args() throw(); + std::string db_name; + std::string tbl_name; + std::vector part_vals; + int16_t max_parts; + + _ThriftHiveMetastore_get_partitions_ps_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_vals(const std::vector & val); + + void __set_max_parts(const int16_t val); + + bool operator == (const ThriftHiveMetastore_get_partitions_ps_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_ps_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_ps_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partitions_ps_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_ps_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + const int16_t* max_parts; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_ps_result__isset { + _ThriftHiveMetastore_get_partitions_ps_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_ps_result__isset; + +class ThriftHiveMetastore_get_partitions_ps_result { + public: + + ThriftHiveMetastore_get_partitions_ps_result(const ThriftHiveMetastore_get_partitions_ps_result&); + ThriftHiveMetastore_get_partitions_ps_result& operator=(const ThriftHiveMetastore_get_partitions_ps_result&); + ThriftHiveMetastore_get_partitions_ps_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_ps_result() throw(); + std::vector success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partitions_ps_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_partitions_ps_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_ps_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_ps_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_ps_presult__isset { + _ThriftHiveMetastore_get_partitions_ps_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_ps_presult__isset; + +class ThriftHiveMetastore_get_partitions_ps_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_ps_presult() throw(); + std::vector * success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partitions_ps_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +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(true), user_name(false), group_names(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_vals :1; + bool max_parts :1; + bool user_name :1; + bool group_names :1; +} _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset; + +class ThriftHiveMetastore_get_partitions_ps_with_auth_args { + public: + + ThriftHiveMetastore_get_partitions_ps_with_auth_args(const ThriftHiveMetastore_get_partitions_ps_with_auth_args&); + ThriftHiveMetastore_get_partitions_ps_with_auth_args& operator=(const ThriftHiveMetastore_get_partitions_ps_with_auth_args&); + 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(); + std::string db_name; + std::string tbl_name; + std::vector part_vals; + int16_t max_parts; + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_vals(const std::vector & val); + + void __set_max_parts(const int16_t val); + + void __set_user_name(const std::string& val); + + void __set_group_names(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_get_partitions_ps_with_auth_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_ps_with_auth_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_ps_with_auth_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partitions_ps_with_auth_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_pargs() throw(); + 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; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset { + _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset; + +class ThriftHiveMetastore_get_partitions_ps_with_auth_result { + public: + + ThriftHiveMetastore_get_partitions_ps_with_auth_result(const ThriftHiveMetastore_get_partitions_ps_with_auth_result&); + ThriftHiveMetastore_get_partitions_ps_with_auth_result& operator=(const ThriftHiveMetastore_get_partitions_ps_with_auth_result&); + ThriftHiveMetastore_get_partitions_ps_with_auth_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_result() throw(); + std::vector success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_partitions_ps_with_auth_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_ps_with_auth_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_ps_with_auth_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_ps_with_auth_presult__isset { + _ThriftHiveMetastore_get_partitions_ps_with_auth_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_ps_with_auth_presult__isset; + +class ThriftHiveMetastore_get_partitions_ps_with_auth_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_presult() throw(); + std::vector * success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_ps_with_auth_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +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(true) {} + bool db_name :1; + bool tbl_name :1; + bool part_vals :1; + bool max_parts :1; +} _ThriftHiveMetastore_get_partition_names_ps_args__isset; + +class ThriftHiveMetastore_get_partition_names_ps_args { + public: + + ThriftHiveMetastore_get_partition_names_ps_args(const ThriftHiveMetastore_get_partition_names_ps_args&); + ThriftHiveMetastore_get_partition_names_ps_args& operator=(const ThriftHiveMetastore_get_partition_names_ps_args&); + ThriftHiveMetastore_get_partition_names_ps_args() : db_name(), tbl_name(), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_partition_names_ps_args() throw(); + std::string db_name; + std::string tbl_name; + std::vector part_vals; + int16_t max_parts; + + _ThriftHiveMetastore_get_partition_names_ps_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_vals(const std::vector & val); + + void __set_max_parts(const int16_t val); + + bool operator == (const ThriftHiveMetastore_get_partition_names_ps_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_names_ps_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_names_ps_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partition_names_ps_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_names_ps_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + const int16_t* max_parts; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_names_ps_result__isset { + _ThriftHiveMetastore_get_partition_names_ps_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partition_names_ps_result__isset; + +class ThriftHiveMetastore_get_partition_names_ps_result { + public: + + ThriftHiveMetastore_get_partition_names_ps_result(const ThriftHiveMetastore_get_partition_names_ps_result&); + ThriftHiveMetastore_get_partition_names_ps_result& operator=(const ThriftHiveMetastore_get_partition_names_ps_result&); + ThriftHiveMetastore_get_partition_names_ps_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_names_ps_result() throw(); + std::vector success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_names_ps_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_partition_names_ps_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_names_ps_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_names_ps_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_names_ps_presult__isset { + _ThriftHiveMetastore_get_partition_names_ps_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partition_names_ps_presult__isset; + +class ThriftHiveMetastore_get_partition_names_ps_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partition_names_ps_presult() throw(); + std::vector * success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_names_ps_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +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(true) {} + bool db_name :1; + bool tbl_name :1; + bool filter :1; + bool max_parts :1; +} _ThriftHiveMetastore_get_partitions_by_filter_args__isset; + +class ThriftHiveMetastore_get_partitions_by_filter_args { + public: + + ThriftHiveMetastore_get_partitions_by_filter_args(const ThriftHiveMetastore_get_partitions_by_filter_args&); + ThriftHiveMetastore_get_partitions_by_filter_args& operator=(const ThriftHiveMetastore_get_partitions_by_filter_args&); + ThriftHiveMetastore_get_partitions_by_filter_args() : db_name(), tbl_name(), filter(), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_partitions_by_filter_args() throw(); + std::string db_name; + std::string tbl_name; + std::string filter; + int16_t max_parts; + + _ThriftHiveMetastore_get_partitions_by_filter_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_filter(const std::string& val); + + void __set_max_parts(const int16_t val); + + bool operator == (const ThriftHiveMetastore_get_partitions_by_filter_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(filter == rhs.filter)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_by_filter_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_by_filter_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partitions_by_filter_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_by_filter_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* filter; + const int16_t* max_parts; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_by_filter_result__isset { + _ThriftHiveMetastore_get_partitions_by_filter_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_by_filter_result__isset; + +class ThriftHiveMetastore_get_partitions_by_filter_result { + public: + + ThriftHiveMetastore_get_partitions_by_filter_result(const ThriftHiveMetastore_get_partitions_by_filter_result&); + ThriftHiveMetastore_get_partitions_by_filter_result& operator=(const ThriftHiveMetastore_get_partitions_by_filter_result&); + ThriftHiveMetastore_get_partitions_by_filter_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_by_filter_result() throw(); + std::vector success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partitions_by_filter_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_partitions_by_filter_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_by_filter_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_by_filter_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_by_filter_presult__isset { + _ThriftHiveMetastore_get_partitions_by_filter_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_by_filter_presult__isset; + +class ThriftHiveMetastore_get_partitions_by_filter_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_by_filter_presult() throw(); + std::vector * success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partitions_by_filter_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_part_specs_by_filter_args__isset { + _ThriftHiveMetastore_get_part_specs_by_filter_args__isset() : db_name(false), tbl_name(false), filter(false), max_parts(true) {} + bool db_name :1; + bool tbl_name :1; + bool filter :1; + bool max_parts :1; +} _ThriftHiveMetastore_get_part_specs_by_filter_args__isset; + +class ThriftHiveMetastore_get_part_specs_by_filter_args { + public: + + ThriftHiveMetastore_get_part_specs_by_filter_args(const ThriftHiveMetastore_get_part_specs_by_filter_args&); + ThriftHiveMetastore_get_part_specs_by_filter_args& operator=(const ThriftHiveMetastore_get_part_specs_by_filter_args&); + ThriftHiveMetastore_get_part_specs_by_filter_args() : db_name(), tbl_name(), filter(), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_part_specs_by_filter_args() throw(); + std::string db_name; + std::string tbl_name; + std::string filter; + int32_t max_parts; + + _ThriftHiveMetastore_get_part_specs_by_filter_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_filter(const std::string& val); + + void __set_max_parts(const int32_t val); + + bool operator == (const ThriftHiveMetastore_get_part_specs_by_filter_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(filter == rhs.filter)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_part_specs_by_filter_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_part_specs_by_filter_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_part_specs_by_filter_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_part_specs_by_filter_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* filter; + const int32_t* max_parts; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_part_specs_by_filter_result__isset { + _ThriftHiveMetastore_get_part_specs_by_filter_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_part_specs_by_filter_result__isset; + +class ThriftHiveMetastore_get_part_specs_by_filter_result { + public: + + ThriftHiveMetastore_get_part_specs_by_filter_result(const ThriftHiveMetastore_get_part_specs_by_filter_result&); + ThriftHiveMetastore_get_part_specs_by_filter_result& operator=(const ThriftHiveMetastore_get_part_specs_by_filter_result&); + ThriftHiveMetastore_get_part_specs_by_filter_result() { + } + + virtual ~ThriftHiveMetastore_get_part_specs_by_filter_result() throw(); + std::vector success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_part_specs_by_filter_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_part_specs_by_filter_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_part_specs_by_filter_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_part_specs_by_filter_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_part_specs_by_filter_presult__isset { + _ThriftHiveMetastore_get_part_specs_by_filter_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_part_specs_by_filter_presult__isset; + +class ThriftHiveMetastore_get_part_specs_by_filter_presult { + public: + + + virtual ~ThriftHiveMetastore_get_part_specs_by_filter_presult() throw(); + std::vector * success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_part_specs_by_filter_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_by_expr_args__isset { + _ThriftHiveMetastore_get_partitions_by_expr_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_get_partitions_by_expr_args__isset; + +class ThriftHiveMetastore_get_partitions_by_expr_args { + public: + + ThriftHiveMetastore_get_partitions_by_expr_args(const ThriftHiveMetastore_get_partitions_by_expr_args&); + ThriftHiveMetastore_get_partitions_by_expr_args& operator=(const ThriftHiveMetastore_get_partitions_by_expr_args&); + ThriftHiveMetastore_get_partitions_by_expr_args() { + } + + virtual ~ThriftHiveMetastore_get_partitions_by_expr_args() throw(); + PartitionsByExprRequest req; + + _ThriftHiveMetastore_get_partitions_by_expr_args__isset __isset; + + void __set_req(const PartitionsByExprRequest& val); + + bool operator == (const ThriftHiveMetastore_get_partitions_by_expr_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_by_expr_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_by_expr_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partitions_by_expr_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_by_expr_pargs() throw(); + const PartitionsByExprRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_by_expr_result__isset { + _ThriftHiveMetastore_get_partitions_by_expr_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_by_expr_result__isset; + +class ThriftHiveMetastore_get_partitions_by_expr_result { + public: + + ThriftHiveMetastore_get_partitions_by_expr_result(const ThriftHiveMetastore_get_partitions_by_expr_result&); + ThriftHiveMetastore_get_partitions_by_expr_result& operator=(const ThriftHiveMetastore_get_partitions_by_expr_result&); + ThriftHiveMetastore_get_partitions_by_expr_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_by_expr_result() throw(); + PartitionsByExprResult success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partitions_by_expr_result__isset __isset; + + void __set_success(const PartitionsByExprResult& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_partitions_by_expr_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_by_expr_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_by_expr_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_by_expr_presult__isset { + _ThriftHiveMetastore_get_partitions_by_expr_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_by_expr_presult__isset; + +class ThriftHiveMetastore_get_partitions_by_expr_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_by_expr_presult() throw(); + PartitionsByExprResult* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partitions_by_expr_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_num_partitions_by_filter_args__isset { + _ThriftHiveMetastore_get_num_partitions_by_filter_args__isset() : db_name(false), tbl_name(false), filter(false) {} + bool db_name :1; + bool tbl_name :1; + bool filter :1; +} _ThriftHiveMetastore_get_num_partitions_by_filter_args__isset; + +class ThriftHiveMetastore_get_num_partitions_by_filter_args { + public: + + ThriftHiveMetastore_get_num_partitions_by_filter_args(const ThriftHiveMetastore_get_num_partitions_by_filter_args&); + ThriftHiveMetastore_get_num_partitions_by_filter_args& operator=(const ThriftHiveMetastore_get_num_partitions_by_filter_args&); + ThriftHiveMetastore_get_num_partitions_by_filter_args() : db_name(), tbl_name(), filter() { + } + + virtual ~ThriftHiveMetastore_get_num_partitions_by_filter_args() throw(); + std::string db_name; + std::string tbl_name; + std::string filter; + + _ThriftHiveMetastore_get_num_partitions_by_filter_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_filter(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_num_partitions_by_filter_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(filter == rhs.filter)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_num_partitions_by_filter_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_num_partitions_by_filter_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_num_partitions_by_filter_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_num_partitions_by_filter_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* filter; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_num_partitions_by_filter_result__isset { + _ThriftHiveMetastore_get_num_partitions_by_filter_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_num_partitions_by_filter_result__isset; + +class ThriftHiveMetastore_get_num_partitions_by_filter_result { + public: + + ThriftHiveMetastore_get_num_partitions_by_filter_result(const ThriftHiveMetastore_get_num_partitions_by_filter_result&); + ThriftHiveMetastore_get_num_partitions_by_filter_result& operator=(const ThriftHiveMetastore_get_num_partitions_by_filter_result&); + ThriftHiveMetastore_get_num_partitions_by_filter_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_get_num_partitions_by_filter_result() throw(); + int32_t success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_num_partitions_by_filter_result__isset __isset; + + void __set_success(const int32_t val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_num_partitions_by_filter_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_num_partitions_by_filter_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_num_partitions_by_filter_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_num_partitions_by_filter_presult__isset { + _ThriftHiveMetastore_get_num_partitions_by_filter_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_num_partitions_by_filter_presult__isset; + +class ThriftHiveMetastore_get_num_partitions_by_filter_presult { + public: + + + virtual ~ThriftHiveMetastore_get_num_partitions_by_filter_presult() throw(); + int32_t* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_num_partitions_by_filter_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_by_names_args__isset { + _ThriftHiveMetastore_get_partitions_by_names_args__isset() : db_name(false), tbl_name(false), names(false) {} + bool db_name :1; + bool tbl_name :1; + bool names :1; +} _ThriftHiveMetastore_get_partitions_by_names_args__isset; + +class ThriftHiveMetastore_get_partitions_by_names_args { + public: + + ThriftHiveMetastore_get_partitions_by_names_args(const ThriftHiveMetastore_get_partitions_by_names_args&); + ThriftHiveMetastore_get_partitions_by_names_args& operator=(const ThriftHiveMetastore_get_partitions_by_names_args&); + ThriftHiveMetastore_get_partitions_by_names_args() : db_name(), tbl_name() { + } + + virtual ~ThriftHiveMetastore_get_partitions_by_names_args() throw(); + std::string db_name; + std::string tbl_name; + std::vector names; + + _ThriftHiveMetastore_get_partitions_by_names_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_names(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_get_partitions_by_names_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(names == rhs.names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_by_names_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_by_names_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partitions_by_names_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_by_names_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::vector * names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_by_names_result__isset { + _ThriftHiveMetastore_get_partitions_by_names_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_by_names_result__isset; + +class ThriftHiveMetastore_get_partitions_by_names_result { + public: + + ThriftHiveMetastore_get_partitions_by_names_result(const ThriftHiveMetastore_get_partitions_by_names_result&); + ThriftHiveMetastore_get_partitions_by_names_result& operator=(const ThriftHiveMetastore_get_partitions_by_names_result&); + ThriftHiveMetastore_get_partitions_by_names_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_by_names_result() throw(); + std::vector success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partitions_by_names_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_partitions_by_names_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_by_names_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_by_names_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_by_names_presult__isset { + _ThriftHiveMetastore_get_partitions_by_names_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_by_names_presult__isset; + +class ThriftHiveMetastore_get_partitions_by_names_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_by_names_presult() throw(); + std::vector * success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partitions_by_names_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_alter_partition_args__isset { + _ThriftHiveMetastore_alter_partition_args__isset() : db_name(false), tbl_name(false), new_part(false) {} + bool db_name :1; + bool tbl_name :1; + bool new_part :1; +} _ThriftHiveMetastore_alter_partition_args__isset; + +class ThriftHiveMetastore_alter_partition_args { + public: + + ThriftHiveMetastore_alter_partition_args(const ThriftHiveMetastore_alter_partition_args&); + ThriftHiveMetastore_alter_partition_args& operator=(const ThriftHiveMetastore_alter_partition_args&); + ThriftHiveMetastore_alter_partition_args() : db_name(), tbl_name() { + } + + virtual ~ThriftHiveMetastore_alter_partition_args() throw(); + std::string db_name; + std::string tbl_name; + Partition new_part; + + _ThriftHiveMetastore_alter_partition_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_new_part(const Partition& val); + + bool operator == (const ThriftHiveMetastore_alter_partition_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(new_part == rhs.new_part)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_partition_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_partition_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_alter_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_partition_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const Partition* new_part; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_partition_result__isset { + _ThriftHiveMetastore_alter_partition_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_partition_result__isset; + +class ThriftHiveMetastore_alter_partition_result { + public: + + ThriftHiveMetastore_alter_partition_result(const ThriftHiveMetastore_alter_partition_result&); + ThriftHiveMetastore_alter_partition_result& operator=(const ThriftHiveMetastore_alter_partition_result&); + ThriftHiveMetastore_alter_partition_result() { + } + + virtual ~ThriftHiveMetastore_alter_partition_result() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_partition_result__isset __isset; + + void __set_o1(const InvalidOperationException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_alter_partition_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_partition_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_partition_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_partition_presult__isset { + _ThriftHiveMetastore_alter_partition_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_partition_presult__isset; + +class ThriftHiveMetastore_alter_partition_presult { + public: + + + virtual ~ThriftHiveMetastore_alter_partition_presult() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_partition_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_alter_partitions_args__isset { + _ThriftHiveMetastore_alter_partitions_args__isset() : db_name(false), tbl_name(false), new_parts(false) {} + bool db_name :1; + bool tbl_name :1; + bool new_parts :1; +} _ThriftHiveMetastore_alter_partitions_args__isset; + +class ThriftHiveMetastore_alter_partitions_args { + public: + + ThriftHiveMetastore_alter_partitions_args(const ThriftHiveMetastore_alter_partitions_args&); + ThriftHiveMetastore_alter_partitions_args& operator=(const ThriftHiveMetastore_alter_partitions_args&); + ThriftHiveMetastore_alter_partitions_args() : db_name(), tbl_name() { + } + + virtual ~ThriftHiveMetastore_alter_partitions_args() throw(); + std::string db_name; + std::string tbl_name; + std::vector new_parts; + + _ThriftHiveMetastore_alter_partitions_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_new_parts(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_alter_partitions_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(new_parts == rhs.new_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_partitions_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_partitions_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_alter_partitions_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_partitions_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::vector * new_parts; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_partitions_result__isset { + _ThriftHiveMetastore_alter_partitions_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_partitions_result__isset; + +class ThriftHiveMetastore_alter_partitions_result { + public: + + ThriftHiveMetastore_alter_partitions_result(const ThriftHiveMetastore_alter_partitions_result&); + ThriftHiveMetastore_alter_partitions_result& operator=(const ThriftHiveMetastore_alter_partitions_result&); + ThriftHiveMetastore_alter_partitions_result() { + } + + virtual ~ThriftHiveMetastore_alter_partitions_result() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_partitions_result__isset __isset; + + void __set_o1(const InvalidOperationException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_alter_partitions_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_partitions_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_partitions_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_partitions_presult__isset { + _ThriftHiveMetastore_alter_partitions_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_partitions_presult__isset; + +class ThriftHiveMetastore_alter_partitions_presult { + public: + + + virtual ~ThriftHiveMetastore_alter_partitions_presult() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_partitions_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_alter_partitions_with_environment_context_args__isset { + _ThriftHiveMetastore_alter_partitions_with_environment_context_args__isset() : db_name(false), tbl_name(false), new_parts(false), environment_context(false) {} + bool db_name :1; + bool tbl_name :1; + bool new_parts :1; + bool environment_context :1; +} _ThriftHiveMetastore_alter_partitions_with_environment_context_args__isset; + +class ThriftHiveMetastore_alter_partitions_with_environment_context_args { + public: + + ThriftHiveMetastore_alter_partitions_with_environment_context_args(const ThriftHiveMetastore_alter_partitions_with_environment_context_args&); + ThriftHiveMetastore_alter_partitions_with_environment_context_args& operator=(const ThriftHiveMetastore_alter_partitions_with_environment_context_args&); + ThriftHiveMetastore_alter_partitions_with_environment_context_args() : db_name(), tbl_name() { + } + + virtual ~ThriftHiveMetastore_alter_partitions_with_environment_context_args() throw(); + std::string db_name; + std::string tbl_name; + std::vector new_parts; + EnvironmentContext environment_context; + + _ThriftHiveMetastore_alter_partitions_with_environment_context_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_new_parts(const std::vector & val); + + void __set_environment_context(const EnvironmentContext& val); + + bool operator == (const ThriftHiveMetastore_alter_partitions_with_environment_context_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(new_parts == rhs.new_parts)) + return false; + if (!(environment_context == rhs.environment_context)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_partitions_with_environment_context_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_partitions_with_environment_context_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_alter_partitions_with_environment_context_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_partitions_with_environment_context_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::vector * new_parts; + const EnvironmentContext* environment_context; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_partitions_with_environment_context_result__isset { + _ThriftHiveMetastore_alter_partitions_with_environment_context_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_partitions_with_environment_context_result__isset; + +class ThriftHiveMetastore_alter_partitions_with_environment_context_result { + public: + + ThriftHiveMetastore_alter_partitions_with_environment_context_result(const ThriftHiveMetastore_alter_partitions_with_environment_context_result&); + ThriftHiveMetastore_alter_partitions_with_environment_context_result& operator=(const ThriftHiveMetastore_alter_partitions_with_environment_context_result&); + ThriftHiveMetastore_alter_partitions_with_environment_context_result() { + } + + virtual ~ThriftHiveMetastore_alter_partitions_with_environment_context_result() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_partitions_with_environment_context_result__isset __isset; + + void __set_o1(const InvalidOperationException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_alter_partitions_with_environment_context_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_partitions_with_environment_context_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_partitions_with_environment_context_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_partitions_with_environment_context_presult__isset { + _ThriftHiveMetastore_alter_partitions_with_environment_context_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_partitions_with_environment_context_presult__isset; + +class ThriftHiveMetastore_alter_partitions_with_environment_context_presult { + public: + + + virtual ~ThriftHiveMetastore_alter_partitions_with_environment_context_presult() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_partitions_with_environment_context_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_alter_partition_with_environment_context_args__isset { + _ThriftHiveMetastore_alter_partition_with_environment_context_args__isset() : db_name(false), tbl_name(false), new_part(false), environment_context(false) {} + bool db_name :1; + bool tbl_name :1; + bool new_part :1; + bool environment_context :1; +} _ThriftHiveMetastore_alter_partition_with_environment_context_args__isset; + +class ThriftHiveMetastore_alter_partition_with_environment_context_args { + public: + + ThriftHiveMetastore_alter_partition_with_environment_context_args(const ThriftHiveMetastore_alter_partition_with_environment_context_args&); + ThriftHiveMetastore_alter_partition_with_environment_context_args& operator=(const ThriftHiveMetastore_alter_partition_with_environment_context_args&); + ThriftHiveMetastore_alter_partition_with_environment_context_args() : db_name(), tbl_name() { + } + + virtual ~ThriftHiveMetastore_alter_partition_with_environment_context_args() throw(); + std::string db_name; + std::string tbl_name; + Partition new_part; + EnvironmentContext environment_context; + + _ThriftHiveMetastore_alter_partition_with_environment_context_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_new_part(const Partition& val); + + void __set_environment_context(const EnvironmentContext& val); + + bool operator == (const ThriftHiveMetastore_alter_partition_with_environment_context_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(new_part == rhs.new_part)) + return false; + if (!(environment_context == rhs.environment_context)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_partition_with_environment_context_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_partition_with_environment_context_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_alter_partition_with_environment_context_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_partition_with_environment_context_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const Partition* new_part; + const EnvironmentContext* environment_context; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_partition_with_environment_context_result__isset { + _ThriftHiveMetastore_alter_partition_with_environment_context_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_partition_with_environment_context_result__isset; + +class ThriftHiveMetastore_alter_partition_with_environment_context_result { + public: + + ThriftHiveMetastore_alter_partition_with_environment_context_result(const ThriftHiveMetastore_alter_partition_with_environment_context_result&); + ThriftHiveMetastore_alter_partition_with_environment_context_result& operator=(const ThriftHiveMetastore_alter_partition_with_environment_context_result&); + ThriftHiveMetastore_alter_partition_with_environment_context_result() { + } + + virtual ~ThriftHiveMetastore_alter_partition_with_environment_context_result() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_partition_with_environment_context_result__isset __isset; + + void __set_o1(const InvalidOperationException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_alter_partition_with_environment_context_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_partition_with_environment_context_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_partition_with_environment_context_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_partition_with_environment_context_presult__isset { + _ThriftHiveMetastore_alter_partition_with_environment_context_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_partition_with_environment_context_presult__isset; + +class ThriftHiveMetastore_alter_partition_with_environment_context_presult { + public: + + + virtual ~ThriftHiveMetastore_alter_partition_with_environment_context_presult() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_partition_with_environment_context_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_rename_partition_args__isset { + _ThriftHiveMetastore_rename_partition_args__isset() : db_name(false), tbl_name(false), part_vals(false), new_part(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_vals :1; + bool new_part :1; +} _ThriftHiveMetastore_rename_partition_args__isset; + +class ThriftHiveMetastore_rename_partition_args { + public: + + ThriftHiveMetastore_rename_partition_args(const ThriftHiveMetastore_rename_partition_args&); + ThriftHiveMetastore_rename_partition_args& operator=(const ThriftHiveMetastore_rename_partition_args&); + ThriftHiveMetastore_rename_partition_args() : db_name(), tbl_name() { + } + + virtual ~ThriftHiveMetastore_rename_partition_args() throw(); + std::string db_name; + std::string tbl_name; + std::vector part_vals; + Partition new_part; + + _ThriftHiveMetastore_rename_partition_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_vals(const std::vector & val); + + void __set_new_part(const Partition& val); + + bool operator == (const ThriftHiveMetastore_rename_partition_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(new_part == rhs.new_part)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_rename_partition_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_rename_partition_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_rename_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_rename_partition_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + const Partition* new_part; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_rename_partition_result__isset { + _ThriftHiveMetastore_rename_partition_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_rename_partition_result__isset; + +class ThriftHiveMetastore_rename_partition_result { + public: + + ThriftHiveMetastore_rename_partition_result(const ThriftHiveMetastore_rename_partition_result&); + ThriftHiveMetastore_rename_partition_result& operator=(const ThriftHiveMetastore_rename_partition_result&); + ThriftHiveMetastore_rename_partition_result() { + } + + virtual ~ThriftHiveMetastore_rename_partition_result() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_rename_partition_result__isset __isset; + + void __set_o1(const InvalidOperationException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_rename_partition_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_rename_partition_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_rename_partition_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_rename_partition_presult__isset { + _ThriftHiveMetastore_rename_partition_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_rename_partition_presult__isset; + +class ThriftHiveMetastore_rename_partition_presult { + public: + + + virtual ~ThriftHiveMetastore_rename_partition_presult() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_rename_partition_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_partition_name_has_valid_characters_args__isset { + _ThriftHiveMetastore_partition_name_has_valid_characters_args__isset() : part_vals(false), throw_exception(false) {} + bool part_vals :1; + bool throw_exception :1; +} _ThriftHiveMetastore_partition_name_has_valid_characters_args__isset; + +class ThriftHiveMetastore_partition_name_has_valid_characters_args { + public: + + ThriftHiveMetastore_partition_name_has_valid_characters_args(const ThriftHiveMetastore_partition_name_has_valid_characters_args&); + ThriftHiveMetastore_partition_name_has_valid_characters_args& operator=(const ThriftHiveMetastore_partition_name_has_valid_characters_args&); + ThriftHiveMetastore_partition_name_has_valid_characters_args() : throw_exception(0) { + } + + virtual ~ThriftHiveMetastore_partition_name_has_valid_characters_args() throw(); + std::vector part_vals; + bool throw_exception; + + _ThriftHiveMetastore_partition_name_has_valid_characters_args__isset __isset; + + void __set_part_vals(const std::vector & val); + + void __set_throw_exception(const bool val); + + bool operator == (const ThriftHiveMetastore_partition_name_has_valid_characters_args & rhs) const + { + if (!(part_vals == rhs.part_vals)) + return false; + if (!(throw_exception == rhs.throw_exception)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_partition_name_has_valid_characters_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_partition_name_has_valid_characters_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_partition_name_has_valid_characters_pargs { + public: + + + virtual ~ThriftHiveMetastore_partition_name_has_valid_characters_pargs() throw(); + const std::vector * part_vals; + const bool* throw_exception; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_partition_name_has_valid_characters_result__isset { + _ThriftHiveMetastore_partition_name_has_valid_characters_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_partition_name_has_valid_characters_result__isset; + +class ThriftHiveMetastore_partition_name_has_valid_characters_result { + public: + + ThriftHiveMetastore_partition_name_has_valid_characters_result(const ThriftHiveMetastore_partition_name_has_valid_characters_result&); + ThriftHiveMetastore_partition_name_has_valid_characters_result& operator=(const ThriftHiveMetastore_partition_name_has_valid_characters_result&); + ThriftHiveMetastore_partition_name_has_valid_characters_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_partition_name_has_valid_characters_result() throw(); + bool success; + MetaException o1; + + _ThriftHiveMetastore_partition_name_has_valid_characters_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_partition_name_has_valid_characters_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_partition_name_has_valid_characters_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_partition_name_has_valid_characters_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_partition_name_has_valid_characters_presult__isset { + _ThriftHiveMetastore_partition_name_has_valid_characters_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_partition_name_has_valid_characters_presult__isset; + +class ThriftHiveMetastore_partition_name_has_valid_characters_presult { + public: + + + virtual ~ThriftHiveMetastore_partition_name_has_valid_characters_presult() throw(); + bool* success; + MetaException o1; + + _ThriftHiveMetastore_partition_name_has_valid_characters_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_config_value_args__isset { + _ThriftHiveMetastore_get_config_value_args__isset() : name(false), defaultValue(false) {} + bool name :1; + bool defaultValue :1; +} _ThriftHiveMetastore_get_config_value_args__isset; + +class ThriftHiveMetastore_get_config_value_args { + public: + + ThriftHiveMetastore_get_config_value_args(const ThriftHiveMetastore_get_config_value_args&); + ThriftHiveMetastore_get_config_value_args& operator=(const ThriftHiveMetastore_get_config_value_args&); + ThriftHiveMetastore_get_config_value_args() : name(), defaultValue() { + } + + virtual ~ThriftHiveMetastore_get_config_value_args() throw(); + std::string name; + std::string defaultValue; + + _ThriftHiveMetastore_get_config_value_args__isset __isset; + + void __set_name(const std::string& val); + + void __set_defaultValue(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_config_value_args & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(defaultValue == rhs.defaultValue)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_config_value_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_config_value_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_config_value_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_config_value_pargs() throw(); + const std::string* name; + const std::string* defaultValue; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_config_value_result__isset { + _ThriftHiveMetastore_get_config_value_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_config_value_result__isset; + +class ThriftHiveMetastore_get_config_value_result { + public: + + ThriftHiveMetastore_get_config_value_result(const ThriftHiveMetastore_get_config_value_result&); + ThriftHiveMetastore_get_config_value_result& operator=(const ThriftHiveMetastore_get_config_value_result&); + ThriftHiveMetastore_get_config_value_result() : success() { + } + + virtual ~ThriftHiveMetastore_get_config_value_result() throw(); + std::string success; + ConfigValSecurityException o1; + + _ThriftHiveMetastore_get_config_value_result__isset __isset; + + void __set_success(const std::string& val); + + void __set_o1(const ConfigValSecurityException& val); + + bool operator == (const ThriftHiveMetastore_get_config_value_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_config_value_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_config_value_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_config_value_presult__isset { + _ThriftHiveMetastore_get_config_value_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_config_value_presult__isset; + +class ThriftHiveMetastore_get_config_value_presult { + public: + + + virtual ~ThriftHiveMetastore_get_config_value_presult() throw(); + std::string* success; + ConfigValSecurityException o1; + + _ThriftHiveMetastore_get_config_value_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_partition_name_to_vals_args__isset { + _ThriftHiveMetastore_partition_name_to_vals_args__isset() : part_name(false) {} + bool part_name :1; +} _ThriftHiveMetastore_partition_name_to_vals_args__isset; + +class ThriftHiveMetastore_partition_name_to_vals_args { + public: + + ThriftHiveMetastore_partition_name_to_vals_args(const ThriftHiveMetastore_partition_name_to_vals_args&); + ThriftHiveMetastore_partition_name_to_vals_args& operator=(const ThriftHiveMetastore_partition_name_to_vals_args&); + ThriftHiveMetastore_partition_name_to_vals_args() : part_name() { + } + + virtual ~ThriftHiveMetastore_partition_name_to_vals_args() throw(); + std::string part_name; + + _ThriftHiveMetastore_partition_name_to_vals_args__isset __isset; + + void __set_part_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_partition_name_to_vals_args & rhs) const + { + if (!(part_name == rhs.part_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_partition_name_to_vals_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_partition_name_to_vals_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_partition_name_to_vals_pargs { + public: + + + virtual ~ThriftHiveMetastore_partition_name_to_vals_pargs() throw(); + const std::string* part_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_partition_name_to_vals_result__isset { + _ThriftHiveMetastore_partition_name_to_vals_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_partition_name_to_vals_result__isset; + +class ThriftHiveMetastore_partition_name_to_vals_result { + public: + + ThriftHiveMetastore_partition_name_to_vals_result(const ThriftHiveMetastore_partition_name_to_vals_result&); + ThriftHiveMetastore_partition_name_to_vals_result& operator=(const ThriftHiveMetastore_partition_name_to_vals_result&); + ThriftHiveMetastore_partition_name_to_vals_result() { + } + + virtual ~ThriftHiveMetastore_partition_name_to_vals_result() throw(); + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_partition_name_to_vals_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_partition_name_to_vals_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_partition_name_to_vals_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_partition_name_to_vals_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_partition_name_to_vals_presult__isset { + _ThriftHiveMetastore_partition_name_to_vals_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_partition_name_to_vals_presult__isset; + +class ThriftHiveMetastore_partition_name_to_vals_presult { + public: + + + virtual ~ThriftHiveMetastore_partition_name_to_vals_presult() throw(); + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_partition_name_to_vals_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_partition_name_to_spec_args__isset { + _ThriftHiveMetastore_partition_name_to_spec_args__isset() : part_name(false) {} + bool part_name :1; +} _ThriftHiveMetastore_partition_name_to_spec_args__isset; + +class ThriftHiveMetastore_partition_name_to_spec_args { + public: + + ThriftHiveMetastore_partition_name_to_spec_args(const ThriftHiveMetastore_partition_name_to_spec_args&); + ThriftHiveMetastore_partition_name_to_spec_args& operator=(const ThriftHiveMetastore_partition_name_to_spec_args&); + ThriftHiveMetastore_partition_name_to_spec_args() : part_name() { + } + + virtual ~ThriftHiveMetastore_partition_name_to_spec_args() throw(); + std::string part_name; + + _ThriftHiveMetastore_partition_name_to_spec_args__isset __isset; + + void __set_part_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_partition_name_to_spec_args & rhs) const + { + if (!(part_name == rhs.part_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_partition_name_to_spec_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_partition_name_to_spec_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_partition_name_to_spec_pargs { + public: + + + virtual ~ThriftHiveMetastore_partition_name_to_spec_pargs() throw(); + const std::string* part_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_partition_name_to_spec_result__isset { + _ThriftHiveMetastore_partition_name_to_spec_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_partition_name_to_spec_result__isset; + +class ThriftHiveMetastore_partition_name_to_spec_result { + public: + + ThriftHiveMetastore_partition_name_to_spec_result(const ThriftHiveMetastore_partition_name_to_spec_result&); + ThriftHiveMetastore_partition_name_to_spec_result& operator=(const ThriftHiveMetastore_partition_name_to_spec_result&); + ThriftHiveMetastore_partition_name_to_spec_result() { + } + + virtual ~ThriftHiveMetastore_partition_name_to_spec_result() throw(); + std::map success; + MetaException o1; + + _ThriftHiveMetastore_partition_name_to_spec_result__isset __isset; + + void __set_success(const std::map & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_partition_name_to_spec_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_partition_name_to_spec_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_partition_name_to_spec_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_partition_name_to_spec_presult__isset { + _ThriftHiveMetastore_partition_name_to_spec_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_partition_name_to_spec_presult__isset; + +class ThriftHiveMetastore_partition_name_to_spec_presult { + public: + + + virtual ~ThriftHiveMetastore_partition_name_to_spec_presult() throw(); + std::map * success; + MetaException o1; + + _ThriftHiveMetastore_partition_name_to_spec_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_markPartitionForEvent_args__isset { + _ThriftHiveMetastore_markPartitionForEvent_args__isset() : db_name(false), tbl_name(false), part_vals(false), eventType(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_vals :1; + bool eventType :1; +} _ThriftHiveMetastore_markPartitionForEvent_args__isset; + +class ThriftHiveMetastore_markPartitionForEvent_args { + public: + + ThriftHiveMetastore_markPartitionForEvent_args(const ThriftHiveMetastore_markPartitionForEvent_args&); + ThriftHiveMetastore_markPartitionForEvent_args& operator=(const ThriftHiveMetastore_markPartitionForEvent_args&); + ThriftHiveMetastore_markPartitionForEvent_args() : db_name(), tbl_name(), eventType((PartitionEventType::type)0) { + } + + virtual ~ThriftHiveMetastore_markPartitionForEvent_args() throw(); + std::string db_name; + std::string tbl_name; + std::map part_vals; + PartitionEventType::type eventType; + + _ThriftHiveMetastore_markPartitionForEvent_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_vals(const std::map & val); + + void __set_eventType(const PartitionEventType::type val); + + bool operator == (const ThriftHiveMetastore_markPartitionForEvent_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(eventType == rhs.eventType)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_markPartitionForEvent_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_markPartitionForEvent_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_markPartitionForEvent_pargs { + public: + + + virtual ~ThriftHiveMetastore_markPartitionForEvent_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::map * part_vals; + const PartitionEventType::type* eventType; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_markPartitionForEvent_result__isset { + _ThriftHiveMetastore_markPartitionForEvent_result__isset() : o1(false), o2(false), o3(false), o4(false), o5(false), o6(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; + bool o5 :1; + bool o6 :1; +} _ThriftHiveMetastore_markPartitionForEvent_result__isset; + +class ThriftHiveMetastore_markPartitionForEvent_result { + public: + + ThriftHiveMetastore_markPartitionForEvent_result(const ThriftHiveMetastore_markPartitionForEvent_result&); + ThriftHiveMetastore_markPartitionForEvent_result& operator=(const ThriftHiveMetastore_markPartitionForEvent_result&); + ThriftHiveMetastore_markPartitionForEvent_result() { + } + + virtual ~ThriftHiveMetastore_markPartitionForEvent_result() throw(); + MetaException o1; + NoSuchObjectException o2; + UnknownDBException o3; + UnknownTableException o4; + UnknownPartitionException o5; + InvalidPartitionException o6; + + _ThriftHiveMetastore_markPartitionForEvent_result__isset __isset; + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + void __set_o3(const UnknownDBException& val); + + void __set_o4(const UnknownTableException& val); + + void __set_o5(const UnknownPartitionException& val); + + void __set_o6(const InvalidPartitionException& val); + + bool operator == (const ThriftHiveMetastore_markPartitionForEvent_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + if (!(o5 == rhs.o5)) + return false; + if (!(o6 == rhs.o6)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_markPartitionForEvent_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_markPartitionForEvent_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_markPartitionForEvent_presult__isset { + _ThriftHiveMetastore_markPartitionForEvent_presult__isset() : o1(false), o2(false), o3(false), o4(false), o5(false), o6(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; + bool o5 :1; + bool o6 :1; +} _ThriftHiveMetastore_markPartitionForEvent_presult__isset; + +class ThriftHiveMetastore_markPartitionForEvent_presult { + public: + + + virtual ~ThriftHiveMetastore_markPartitionForEvent_presult() throw(); + MetaException o1; + NoSuchObjectException o2; + UnknownDBException o3; + UnknownTableException o4; + UnknownPartitionException o5; + InvalidPartitionException o6; + + _ThriftHiveMetastore_markPartitionForEvent_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_isPartitionMarkedForEvent_args__isset { + _ThriftHiveMetastore_isPartitionMarkedForEvent_args__isset() : db_name(false), tbl_name(false), part_vals(false), eventType(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_vals :1; + bool eventType :1; +} _ThriftHiveMetastore_isPartitionMarkedForEvent_args__isset; + +class ThriftHiveMetastore_isPartitionMarkedForEvent_args { + public: + + ThriftHiveMetastore_isPartitionMarkedForEvent_args(const ThriftHiveMetastore_isPartitionMarkedForEvent_args&); + ThriftHiveMetastore_isPartitionMarkedForEvent_args& operator=(const ThriftHiveMetastore_isPartitionMarkedForEvent_args&); + ThriftHiveMetastore_isPartitionMarkedForEvent_args() : db_name(), tbl_name(), eventType((PartitionEventType::type)0) { + } + + virtual ~ThriftHiveMetastore_isPartitionMarkedForEvent_args() throw(); + std::string db_name; + std::string tbl_name; + std::map part_vals; + PartitionEventType::type eventType; + + _ThriftHiveMetastore_isPartitionMarkedForEvent_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_vals(const std::map & val); + + void __set_eventType(const PartitionEventType::type val); + + bool operator == (const ThriftHiveMetastore_isPartitionMarkedForEvent_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(eventType == rhs.eventType)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_isPartitionMarkedForEvent_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_isPartitionMarkedForEvent_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_isPartitionMarkedForEvent_pargs { + public: + + + virtual ~ThriftHiveMetastore_isPartitionMarkedForEvent_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::map * part_vals; + const PartitionEventType::type* eventType; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_isPartitionMarkedForEvent_result__isset { + _ThriftHiveMetastore_isPartitionMarkedForEvent_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false), o5(false), o6(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; + bool o5 :1; + bool o6 :1; +} _ThriftHiveMetastore_isPartitionMarkedForEvent_result__isset; + +class ThriftHiveMetastore_isPartitionMarkedForEvent_result { + public: + + ThriftHiveMetastore_isPartitionMarkedForEvent_result(const ThriftHiveMetastore_isPartitionMarkedForEvent_result&); + ThriftHiveMetastore_isPartitionMarkedForEvent_result& operator=(const ThriftHiveMetastore_isPartitionMarkedForEvent_result&); + ThriftHiveMetastore_isPartitionMarkedForEvent_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_isPartitionMarkedForEvent_result() throw(); + bool success; + MetaException o1; + NoSuchObjectException o2; + UnknownDBException o3; + UnknownTableException o4; + UnknownPartitionException o5; + InvalidPartitionException o6; + + _ThriftHiveMetastore_isPartitionMarkedForEvent_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + void __set_o3(const UnknownDBException& val); + + void __set_o4(const UnknownTableException& val); + + void __set_o5(const UnknownPartitionException& val); + + void __set_o6(const InvalidPartitionException& val); + + bool operator == (const ThriftHiveMetastore_isPartitionMarkedForEvent_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + if (!(o5 == rhs.o5)) + return false; + if (!(o6 == rhs.o6)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_isPartitionMarkedForEvent_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_isPartitionMarkedForEvent_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_isPartitionMarkedForEvent_presult__isset { + _ThriftHiveMetastore_isPartitionMarkedForEvent_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false), o5(false), o6(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; + bool o5 :1; + bool o6 :1; +} _ThriftHiveMetastore_isPartitionMarkedForEvent_presult__isset; + +class ThriftHiveMetastore_isPartitionMarkedForEvent_presult { + public: + + + virtual ~ThriftHiveMetastore_isPartitionMarkedForEvent_presult() throw(); + bool* success; + MetaException o1; + NoSuchObjectException o2; + UnknownDBException o3; + UnknownTableException o4; + UnknownPartitionException o5; + InvalidPartitionException o6; + + _ThriftHiveMetastore_isPartitionMarkedForEvent_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_index_args__isset { + _ThriftHiveMetastore_add_index_args__isset() : new_index(false), index_table(false) {} + bool new_index :1; + bool index_table :1; +} _ThriftHiveMetastore_add_index_args__isset; + +class ThriftHiveMetastore_add_index_args { + public: + + ThriftHiveMetastore_add_index_args(const ThriftHiveMetastore_add_index_args&); + ThriftHiveMetastore_add_index_args& operator=(const ThriftHiveMetastore_add_index_args&); + ThriftHiveMetastore_add_index_args() { + } + + virtual ~ThriftHiveMetastore_add_index_args() throw(); + Index new_index; + Table index_table; + + _ThriftHiveMetastore_add_index_args__isset __isset; + + void __set_new_index(const Index& val); + + void __set_index_table(const Table& val); + + bool operator == (const ThriftHiveMetastore_add_index_args & rhs) const + { + if (!(new_index == rhs.new_index)) + return false; + if (!(index_table == rhs.index_table)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_index_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_index_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_index_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_index_pargs() throw(); + const Index* new_index; + const Table* index_table; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_index_result__isset { + _ThriftHiveMetastore_add_index_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_add_index_result__isset; + +class ThriftHiveMetastore_add_index_result { + public: + + ThriftHiveMetastore_add_index_result(const ThriftHiveMetastore_add_index_result&); + ThriftHiveMetastore_add_index_result& operator=(const ThriftHiveMetastore_add_index_result&); + ThriftHiveMetastore_add_index_result() { + } + + virtual ~ThriftHiveMetastore_add_index_result() throw(); + Index success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_index_result__isset __isset; + + void __set_success(const Index& val); + + void __set_o1(const InvalidObjectException& val); + + void __set_o2(const AlreadyExistsException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_add_index_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_index_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_index_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_index_presult__isset { + _ThriftHiveMetastore_add_index_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_add_index_presult__isset; + +class ThriftHiveMetastore_add_index_presult { + public: + + + virtual ~ThriftHiveMetastore_add_index_presult() throw(); + Index* success; + InvalidObjectException o1; + AlreadyExistsException o2; + MetaException o3; + + _ThriftHiveMetastore_add_index_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_alter_index_args__isset { + _ThriftHiveMetastore_alter_index_args__isset() : dbname(false), base_tbl_name(false), idx_name(false), new_idx(false) {} + bool dbname :1; + bool base_tbl_name :1; + bool idx_name :1; + bool new_idx :1; +} _ThriftHiveMetastore_alter_index_args__isset; + +class ThriftHiveMetastore_alter_index_args { + public: + + ThriftHiveMetastore_alter_index_args(const ThriftHiveMetastore_alter_index_args&); + ThriftHiveMetastore_alter_index_args& operator=(const ThriftHiveMetastore_alter_index_args&); + ThriftHiveMetastore_alter_index_args() : dbname(), base_tbl_name(), idx_name() { + } + + virtual ~ThriftHiveMetastore_alter_index_args() throw(); + std::string dbname; + std::string base_tbl_name; + std::string idx_name; + Index new_idx; + + _ThriftHiveMetastore_alter_index_args__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_base_tbl_name(const std::string& val); + + void __set_idx_name(const std::string& val); + + void __set_new_idx(const Index& val); + + bool operator == (const ThriftHiveMetastore_alter_index_args & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(base_tbl_name == rhs.base_tbl_name)) + return false; + if (!(idx_name == rhs.idx_name)) + return false; + if (!(new_idx == rhs.new_idx)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_index_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_index_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_alter_index_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_index_pargs() throw(); + const std::string* dbname; + const std::string* base_tbl_name; + const std::string* idx_name; + const Index* new_idx; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_index_result__isset { + _ThriftHiveMetastore_alter_index_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_index_result__isset; + +class ThriftHiveMetastore_alter_index_result { + public: + + ThriftHiveMetastore_alter_index_result(const ThriftHiveMetastore_alter_index_result&); + ThriftHiveMetastore_alter_index_result& operator=(const ThriftHiveMetastore_alter_index_result&); + ThriftHiveMetastore_alter_index_result() { + } + + virtual ~ThriftHiveMetastore_alter_index_result() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_index_result__isset __isset; + + void __set_o1(const InvalidOperationException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_alter_index_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_index_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_index_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_index_presult__isset { + _ThriftHiveMetastore_alter_index_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_index_presult__isset; + +class ThriftHiveMetastore_alter_index_presult { + public: + + + virtual ~ThriftHiveMetastore_alter_index_presult() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_index_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_index_by_name_args__isset { + _ThriftHiveMetastore_drop_index_by_name_args__isset() : db_name(false), tbl_name(false), index_name(false), deleteData(false) {} + bool db_name :1; + bool tbl_name :1; + bool index_name :1; + bool deleteData :1; +} _ThriftHiveMetastore_drop_index_by_name_args__isset; + +class ThriftHiveMetastore_drop_index_by_name_args { + public: + + ThriftHiveMetastore_drop_index_by_name_args(const ThriftHiveMetastore_drop_index_by_name_args&); + ThriftHiveMetastore_drop_index_by_name_args& operator=(const ThriftHiveMetastore_drop_index_by_name_args&); + ThriftHiveMetastore_drop_index_by_name_args() : db_name(), tbl_name(), index_name(), deleteData(0) { + } + + virtual ~ThriftHiveMetastore_drop_index_by_name_args() throw(); + std::string db_name; + std::string tbl_name; + std::string index_name; + bool deleteData; + + _ThriftHiveMetastore_drop_index_by_name_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_index_name(const std::string& val); + + void __set_deleteData(const bool val); + + bool operator == (const ThriftHiveMetastore_drop_index_by_name_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(index_name == rhs.index_name)) + return false; + if (!(deleteData == rhs.deleteData)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_index_by_name_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_index_by_name_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_index_by_name_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_index_by_name_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* index_name; + const bool* deleteData; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_index_by_name_result__isset { + _ThriftHiveMetastore_drop_index_by_name_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_index_by_name_result__isset; + +class ThriftHiveMetastore_drop_index_by_name_result { + public: + + ThriftHiveMetastore_drop_index_by_name_result(const ThriftHiveMetastore_drop_index_by_name_result&); + ThriftHiveMetastore_drop_index_by_name_result& operator=(const ThriftHiveMetastore_drop_index_by_name_result&); + ThriftHiveMetastore_drop_index_by_name_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_index_by_name_result() throw(); + bool success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_index_by_name_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_drop_index_by_name_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_index_by_name_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_index_by_name_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_index_by_name_presult__isset { + _ThriftHiveMetastore_drop_index_by_name_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_drop_index_by_name_presult__isset; + +class ThriftHiveMetastore_drop_index_by_name_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_index_by_name_presult() throw(); + bool* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_drop_index_by_name_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_index_by_name_args__isset { + _ThriftHiveMetastore_get_index_by_name_args__isset() : db_name(false), tbl_name(false), index_name(false) {} + bool db_name :1; + bool tbl_name :1; + bool index_name :1; +} _ThriftHiveMetastore_get_index_by_name_args__isset; + +class ThriftHiveMetastore_get_index_by_name_args { + public: + + ThriftHiveMetastore_get_index_by_name_args(const ThriftHiveMetastore_get_index_by_name_args&); + ThriftHiveMetastore_get_index_by_name_args& operator=(const ThriftHiveMetastore_get_index_by_name_args&); + ThriftHiveMetastore_get_index_by_name_args() : db_name(), tbl_name(), index_name() { + } + + virtual ~ThriftHiveMetastore_get_index_by_name_args() throw(); + std::string db_name; + std::string tbl_name; + std::string index_name; + + _ThriftHiveMetastore_get_index_by_name_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_index_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_index_by_name_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(index_name == rhs.index_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_index_by_name_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_index_by_name_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_index_by_name_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_index_by_name_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* index_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_index_by_name_result__isset { + _ThriftHiveMetastore_get_index_by_name_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_index_by_name_result__isset; + +class ThriftHiveMetastore_get_index_by_name_result { + public: + + ThriftHiveMetastore_get_index_by_name_result(const ThriftHiveMetastore_get_index_by_name_result&); + ThriftHiveMetastore_get_index_by_name_result& operator=(const ThriftHiveMetastore_get_index_by_name_result&); + ThriftHiveMetastore_get_index_by_name_result() { + } + + virtual ~ThriftHiveMetastore_get_index_by_name_result() throw(); + Index success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_index_by_name_result__isset __isset; + + void __set_success(const Index& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_index_by_name_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_index_by_name_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_index_by_name_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_index_by_name_presult__isset { + _ThriftHiveMetastore_get_index_by_name_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_index_by_name_presult__isset; + +class ThriftHiveMetastore_get_index_by_name_presult { + public: + + + virtual ~ThriftHiveMetastore_get_index_by_name_presult() throw(); + Index* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_index_by_name_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_indexes_args__isset { + _ThriftHiveMetastore_get_indexes_args__isset() : db_name(false), tbl_name(false), max_indexes(true) {} + bool db_name :1; + bool tbl_name :1; + bool max_indexes :1; +} _ThriftHiveMetastore_get_indexes_args__isset; + +class ThriftHiveMetastore_get_indexes_args { + public: + + ThriftHiveMetastore_get_indexes_args(const ThriftHiveMetastore_get_indexes_args&); + ThriftHiveMetastore_get_indexes_args& operator=(const ThriftHiveMetastore_get_indexes_args&); + ThriftHiveMetastore_get_indexes_args() : db_name(), tbl_name(), max_indexes(-1) { + } + + virtual ~ThriftHiveMetastore_get_indexes_args() throw(); + std::string db_name; + std::string tbl_name; + int16_t max_indexes; + + _ThriftHiveMetastore_get_indexes_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_max_indexes(const int16_t val); + + bool operator == (const ThriftHiveMetastore_get_indexes_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(max_indexes == rhs.max_indexes)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_indexes_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_indexes_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_indexes_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_indexes_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const int16_t* max_indexes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_indexes_result__isset { + _ThriftHiveMetastore_get_indexes_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_indexes_result__isset; + +class ThriftHiveMetastore_get_indexes_result { + public: + + ThriftHiveMetastore_get_indexes_result(const ThriftHiveMetastore_get_indexes_result&); + ThriftHiveMetastore_get_indexes_result& operator=(const ThriftHiveMetastore_get_indexes_result&); + ThriftHiveMetastore_get_indexes_result() { + } + + virtual ~ThriftHiveMetastore_get_indexes_result() throw(); + std::vector success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_indexes_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_indexes_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_indexes_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_indexes_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_indexes_presult__isset { + _ThriftHiveMetastore_get_indexes_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_indexes_presult__isset; + +class ThriftHiveMetastore_get_indexes_presult { + public: + + + virtual ~ThriftHiveMetastore_get_indexes_presult() throw(); + std::vector * success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_indexes_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_index_names_args__isset { + _ThriftHiveMetastore_get_index_names_args__isset() : db_name(false), tbl_name(false), max_indexes(true) {} + bool db_name :1; + bool tbl_name :1; + bool max_indexes :1; +} _ThriftHiveMetastore_get_index_names_args__isset; + +class ThriftHiveMetastore_get_index_names_args { + public: + + ThriftHiveMetastore_get_index_names_args(const ThriftHiveMetastore_get_index_names_args&); + ThriftHiveMetastore_get_index_names_args& operator=(const ThriftHiveMetastore_get_index_names_args&); + ThriftHiveMetastore_get_index_names_args() : db_name(), tbl_name(), max_indexes(-1) { + } + + virtual ~ThriftHiveMetastore_get_index_names_args() throw(); + std::string db_name; + std::string tbl_name; + int16_t max_indexes; + + _ThriftHiveMetastore_get_index_names_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_max_indexes(const int16_t val); + + bool operator == (const ThriftHiveMetastore_get_index_names_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(max_indexes == rhs.max_indexes)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_index_names_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_index_names_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_index_names_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_index_names_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const int16_t* max_indexes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_index_names_result__isset { + _ThriftHiveMetastore_get_index_names_result__isset() : success(false), o2(false) {} + bool success :1; + bool o2 :1; +} _ThriftHiveMetastore_get_index_names_result__isset; + +class ThriftHiveMetastore_get_index_names_result { + public: + + ThriftHiveMetastore_get_index_names_result(const ThriftHiveMetastore_get_index_names_result&); + ThriftHiveMetastore_get_index_names_result& operator=(const ThriftHiveMetastore_get_index_names_result&); + ThriftHiveMetastore_get_index_names_result() { + } + + virtual ~ThriftHiveMetastore_get_index_names_result() throw(); + std::vector success; + MetaException o2; + + _ThriftHiveMetastore_get_index_names_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_index_names_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_index_names_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_index_names_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_index_names_presult__isset { + _ThriftHiveMetastore_get_index_names_presult__isset() : success(false), o2(false) {} + bool success :1; + bool o2 :1; +} _ThriftHiveMetastore_get_index_names_presult__isset; + +class ThriftHiveMetastore_get_index_names_presult { + public: + + + virtual ~ThriftHiveMetastore_get_index_names_presult() throw(); + std::vector * success; + MetaException o2; + + _ThriftHiveMetastore_get_index_names_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_primary_keys_args__isset { + _ThriftHiveMetastore_get_primary_keys_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_get_primary_keys_args__isset; + +class ThriftHiveMetastore_get_primary_keys_args { + public: + + ThriftHiveMetastore_get_primary_keys_args(const ThriftHiveMetastore_get_primary_keys_args&); + ThriftHiveMetastore_get_primary_keys_args& operator=(const ThriftHiveMetastore_get_primary_keys_args&); + ThriftHiveMetastore_get_primary_keys_args() { + } + + virtual ~ThriftHiveMetastore_get_primary_keys_args() throw(); + PrimaryKeysRequest request; + + _ThriftHiveMetastore_get_primary_keys_args__isset __isset; + + void __set_request(const PrimaryKeysRequest& val); + + bool operator == (const ThriftHiveMetastore_get_primary_keys_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_primary_keys_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_primary_keys_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_primary_keys_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_primary_keys_pargs() throw(); + const PrimaryKeysRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_primary_keys_result__isset { + _ThriftHiveMetastore_get_primary_keys_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_primary_keys_result__isset; + +class ThriftHiveMetastore_get_primary_keys_result { + public: + + ThriftHiveMetastore_get_primary_keys_result(const ThriftHiveMetastore_get_primary_keys_result&); + ThriftHiveMetastore_get_primary_keys_result& operator=(const ThriftHiveMetastore_get_primary_keys_result&); + ThriftHiveMetastore_get_primary_keys_result() { + } + + virtual ~ThriftHiveMetastore_get_primary_keys_result() throw(); + PrimaryKeysResponse success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_primary_keys_result__isset __isset; + + void __set_success(const PrimaryKeysResponse& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_primary_keys_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_primary_keys_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_primary_keys_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_primary_keys_presult__isset { + _ThriftHiveMetastore_get_primary_keys_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_primary_keys_presult__isset; + +class ThriftHiveMetastore_get_primary_keys_presult { + public: + + + virtual ~ThriftHiveMetastore_get_primary_keys_presult() throw(); + PrimaryKeysResponse* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_primary_keys_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_foreign_keys_args__isset { + _ThriftHiveMetastore_get_foreign_keys_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_get_foreign_keys_args__isset; + +class ThriftHiveMetastore_get_foreign_keys_args { + public: + + ThriftHiveMetastore_get_foreign_keys_args(const ThriftHiveMetastore_get_foreign_keys_args&); + ThriftHiveMetastore_get_foreign_keys_args& operator=(const ThriftHiveMetastore_get_foreign_keys_args&); + ThriftHiveMetastore_get_foreign_keys_args() { + } + + virtual ~ThriftHiveMetastore_get_foreign_keys_args() throw(); + ForeignKeysRequest request; + + _ThriftHiveMetastore_get_foreign_keys_args__isset __isset; + + void __set_request(const ForeignKeysRequest& val); + + bool operator == (const ThriftHiveMetastore_get_foreign_keys_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_foreign_keys_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_foreign_keys_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_foreign_keys_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_foreign_keys_pargs() throw(); + const ForeignKeysRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_foreign_keys_result__isset { + _ThriftHiveMetastore_get_foreign_keys_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_foreign_keys_result__isset; + +class ThriftHiveMetastore_get_foreign_keys_result { + public: + + ThriftHiveMetastore_get_foreign_keys_result(const ThriftHiveMetastore_get_foreign_keys_result&); + ThriftHiveMetastore_get_foreign_keys_result& operator=(const ThriftHiveMetastore_get_foreign_keys_result&); + ThriftHiveMetastore_get_foreign_keys_result() { + } + + virtual ~ThriftHiveMetastore_get_foreign_keys_result() throw(); + ForeignKeysResponse success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_foreign_keys_result__isset __isset; + + void __set_success(const ForeignKeysResponse& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_foreign_keys_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_foreign_keys_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_foreign_keys_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_foreign_keys_presult__isset { + _ThriftHiveMetastore_get_foreign_keys_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_foreign_keys_presult__isset; + +class ThriftHiveMetastore_get_foreign_keys_presult { + public: + + + virtual ~ThriftHiveMetastore_get_foreign_keys_presult() throw(); + ForeignKeysResponse* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_foreign_keys_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_unique_constraints_args__isset { + _ThriftHiveMetastore_get_unique_constraints_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_get_unique_constraints_args__isset; + +class ThriftHiveMetastore_get_unique_constraints_args { + public: + + ThriftHiveMetastore_get_unique_constraints_args(const ThriftHiveMetastore_get_unique_constraints_args&); + ThriftHiveMetastore_get_unique_constraints_args& operator=(const ThriftHiveMetastore_get_unique_constraints_args&); + ThriftHiveMetastore_get_unique_constraints_args() { + } + + virtual ~ThriftHiveMetastore_get_unique_constraints_args() throw(); + UniqueConstraintsRequest request; + + _ThriftHiveMetastore_get_unique_constraints_args__isset __isset; + + void __set_request(const UniqueConstraintsRequest& val); + + bool operator == (const ThriftHiveMetastore_get_unique_constraints_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_unique_constraints_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_unique_constraints_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_unique_constraints_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_unique_constraints_pargs() throw(); + const UniqueConstraintsRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_unique_constraints_result__isset { + _ThriftHiveMetastore_get_unique_constraints_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_unique_constraints_result__isset; + +class ThriftHiveMetastore_get_unique_constraints_result { + public: + + ThriftHiveMetastore_get_unique_constraints_result(const ThriftHiveMetastore_get_unique_constraints_result&); + ThriftHiveMetastore_get_unique_constraints_result& operator=(const ThriftHiveMetastore_get_unique_constraints_result&); + ThriftHiveMetastore_get_unique_constraints_result() { + } + + virtual ~ThriftHiveMetastore_get_unique_constraints_result() throw(); + UniqueConstraintsResponse success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_unique_constraints_result__isset __isset; + + void __set_success(const UniqueConstraintsResponse& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_unique_constraints_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_unique_constraints_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_unique_constraints_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_unique_constraints_presult__isset { + _ThriftHiveMetastore_get_unique_constraints_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_unique_constraints_presult__isset; + +class ThriftHiveMetastore_get_unique_constraints_presult { + public: + + + virtual ~ThriftHiveMetastore_get_unique_constraints_presult() throw(); + UniqueConstraintsResponse* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_unique_constraints_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_not_null_constraints_args__isset { + _ThriftHiveMetastore_get_not_null_constraints_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_get_not_null_constraints_args__isset; + +class ThriftHiveMetastore_get_not_null_constraints_args { + public: + + ThriftHiveMetastore_get_not_null_constraints_args(const ThriftHiveMetastore_get_not_null_constraints_args&); + ThriftHiveMetastore_get_not_null_constraints_args& operator=(const ThriftHiveMetastore_get_not_null_constraints_args&); + ThriftHiveMetastore_get_not_null_constraints_args() { + } + + virtual ~ThriftHiveMetastore_get_not_null_constraints_args() throw(); + NotNullConstraintsRequest request; + + _ThriftHiveMetastore_get_not_null_constraints_args__isset __isset; + + void __set_request(const NotNullConstraintsRequest& val); + + bool operator == (const ThriftHiveMetastore_get_not_null_constraints_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_not_null_constraints_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_not_null_constraints_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_not_null_constraints_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_not_null_constraints_pargs() throw(); + const NotNullConstraintsRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_not_null_constraints_result__isset { + _ThriftHiveMetastore_get_not_null_constraints_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_not_null_constraints_result__isset; + +class ThriftHiveMetastore_get_not_null_constraints_result { + public: + + ThriftHiveMetastore_get_not_null_constraints_result(const ThriftHiveMetastore_get_not_null_constraints_result&); + ThriftHiveMetastore_get_not_null_constraints_result& operator=(const ThriftHiveMetastore_get_not_null_constraints_result&); + ThriftHiveMetastore_get_not_null_constraints_result() { + } + + virtual ~ThriftHiveMetastore_get_not_null_constraints_result() throw(); + NotNullConstraintsResponse success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_not_null_constraints_result__isset __isset; + + void __set_success(const NotNullConstraintsResponse& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_not_null_constraints_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_not_null_constraints_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_not_null_constraints_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_not_null_constraints_presult__isset { + _ThriftHiveMetastore_get_not_null_constraints_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_not_null_constraints_presult__isset; + +class ThriftHiveMetastore_get_not_null_constraints_presult { + public: + + + virtual ~ThriftHiveMetastore_get_not_null_constraints_presult() throw(); + NotNullConstraintsResponse* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_not_null_constraints_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_update_table_column_statistics_args__isset { + _ThriftHiveMetastore_update_table_column_statistics_args__isset() : stats_obj(false) {} + bool stats_obj :1; +} _ThriftHiveMetastore_update_table_column_statistics_args__isset; + +class ThriftHiveMetastore_update_table_column_statistics_args { + public: + + ThriftHiveMetastore_update_table_column_statistics_args(const ThriftHiveMetastore_update_table_column_statistics_args&); + ThriftHiveMetastore_update_table_column_statistics_args& operator=(const ThriftHiveMetastore_update_table_column_statistics_args&); + ThriftHiveMetastore_update_table_column_statistics_args() { + } + + virtual ~ThriftHiveMetastore_update_table_column_statistics_args() throw(); + ColumnStatistics stats_obj; + + _ThriftHiveMetastore_update_table_column_statistics_args__isset __isset; + + void __set_stats_obj(const ColumnStatistics& val); + + bool operator == (const ThriftHiveMetastore_update_table_column_statistics_args & rhs) const + { + if (!(stats_obj == rhs.stats_obj)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_update_table_column_statistics_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_update_table_column_statistics_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_update_table_column_statistics_pargs { + public: + + + virtual ~ThriftHiveMetastore_update_table_column_statistics_pargs() throw(); + const ColumnStatistics* stats_obj; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_update_table_column_statistics_result__isset { + _ThriftHiveMetastore_update_table_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_update_table_column_statistics_result__isset; + +class ThriftHiveMetastore_update_table_column_statistics_result { + public: + + ThriftHiveMetastore_update_table_column_statistics_result(const ThriftHiveMetastore_update_table_column_statistics_result&); + ThriftHiveMetastore_update_table_column_statistics_result& operator=(const ThriftHiveMetastore_update_table_column_statistics_result&); + ThriftHiveMetastore_update_table_column_statistics_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_update_table_column_statistics_result() throw(); + bool success; + NoSuchObjectException o1; + InvalidObjectException o2; + MetaException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_update_table_column_statistics_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const InvalidObjectException& val); + + void __set_o3(const MetaException& val); + + void __set_o4(const InvalidInputException& val); + + bool operator == (const ThriftHiveMetastore_update_table_column_statistics_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_update_table_column_statistics_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_update_table_column_statistics_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_update_table_column_statistics_presult__isset { + _ThriftHiveMetastore_update_table_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_update_table_column_statistics_presult__isset; + +class ThriftHiveMetastore_update_table_column_statistics_presult { + public: + + + virtual ~ThriftHiveMetastore_update_table_column_statistics_presult() throw(); + bool* success; + NoSuchObjectException o1; + InvalidObjectException o2; + MetaException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_update_table_column_statistics_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_update_partition_column_statistics_args__isset { + _ThriftHiveMetastore_update_partition_column_statistics_args__isset() : stats_obj(false) {} + bool stats_obj :1; +} _ThriftHiveMetastore_update_partition_column_statistics_args__isset; + +class ThriftHiveMetastore_update_partition_column_statistics_args { + public: + + ThriftHiveMetastore_update_partition_column_statistics_args(const ThriftHiveMetastore_update_partition_column_statistics_args&); + ThriftHiveMetastore_update_partition_column_statistics_args& operator=(const ThriftHiveMetastore_update_partition_column_statistics_args&); + ThriftHiveMetastore_update_partition_column_statistics_args() { + } + + virtual ~ThriftHiveMetastore_update_partition_column_statistics_args() throw(); + ColumnStatistics stats_obj; + + _ThriftHiveMetastore_update_partition_column_statistics_args__isset __isset; + + void __set_stats_obj(const ColumnStatistics& val); + + bool operator == (const ThriftHiveMetastore_update_partition_column_statistics_args & rhs) const + { + if (!(stats_obj == rhs.stats_obj)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_update_partition_column_statistics_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_update_partition_column_statistics_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_update_partition_column_statistics_pargs { + public: + + + virtual ~ThriftHiveMetastore_update_partition_column_statistics_pargs() throw(); + const ColumnStatistics* stats_obj; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_update_partition_column_statistics_result__isset { + _ThriftHiveMetastore_update_partition_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_update_partition_column_statistics_result__isset; + +class ThriftHiveMetastore_update_partition_column_statistics_result { + public: + + ThriftHiveMetastore_update_partition_column_statistics_result(const ThriftHiveMetastore_update_partition_column_statistics_result&); + ThriftHiveMetastore_update_partition_column_statistics_result& operator=(const ThriftHiveMetastore_update_partition_column_statistics_result&); + ThriftHiveMetastore_update_partition_column_statistics_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_update_partition_column_statistics_result() throw(); + bool success; + NoSuchObjectException o1; + InvalidObjectException o2; + MetaException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_update_partition_column_statistics_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const InvalidObjectException& val); + + void __set_o3(const MetaException& val); + + void __set_o4(const InvalidInputException& val); + + bool operator == (const ThriftHiveMetastore_update_partition_column_statistics_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_update_partition_column_statistics_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_update_partition_column_statistics_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_update_partition_column_statistics_presult__isset { + _ThriftHiveMetastore_update_partition_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_update_partition_column_statistics_presult__isset; + +class ThriftHiveMetastore_update_partition_column_statistics_presult { + public: + + + virtual ~ThriftHiveMetastore_update_partition_column_statistics_presult() throw(); + bool* success; + NoSuchObjectException o1; + InvalidObjectException o2; + MetaException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_update_partition_column_statistics_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_table_column_statistics_args__isset { + _ThriftHiveMetastore_get_table_column_statistics_args__isset() : db_name(false), tbl_name(false), col_name(false) {} + bool db_name :1; + bool tbl_name :1; + bool col_name :1; +} _ThriftHiveMetastore_get_table_column_statistics_args__isset; + +class ThriftHiveMetastore_get_table_column_statistics_args { + public: + + ThriftHiveMetastore_get_table_column_statistics_args(const ThriftHiveMetastore_get_table_column_statistics_args&); + ThriftHiveMetastore_get_table_column_statistics_args& operator=(const ThriftHiveMetastore_get_table_column_statistics_args&); + ThriftHiveMetastore_get_table_column_statistics_args() : db_name(), tbl_name(), col_name() { + } + + virtual ~ThriftHiveMetastore_get_table_column_statistics_args() throw(); + std::string db_name; + std::string tbl_name; + std::string col_name; + + _ThriftHiveMetastore_get_table_column_statistics_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_col_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_table_column_statistics_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(col_name == rhs.col_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_column_statistics_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_column_statistics_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_table_column_statistics_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_column_statistics_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* col_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_column_statistics_result__isset { + _ThriftHiveMetastore_get_table_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_get_table_column_statistics_result__isset; + +class ThriftHiveMetastore_get_table_column_statistics_result { + public: + + ThriftHiveMetastore_get_table_column_statistics_result(const ThriftHiveMetastore_get_table_column_statistics_result&); + ThriftHiveMetastore_get_table_column_statistics_result& operator=(const ThriftHiveMetastore_get_table_column_statistics_result&); + ThriftHiveMetastore_get_table_column_statistics_result() { + } + + virtual ~ThriftHiveMetastore_get_table_column_statistics_result() throw(); + ColumnStatistics success; + NoSuchObjectException o1; + MetaException o2; + InvalidInputException o3; + InvalidObjectException o4; + + _ThriftHiveMetastore_get_table_column_statistics_result__isset __isset; + + void __set_success(const ColumnStatistics& val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + void __set_o3(const InvalidInputException& val); + + void __set_o4(const InvalidObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_table_column_statistics_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_column_statistics_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_column_statistics_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_column_statistics_presult__isset { + _ThriftHiveMetastore_get_table_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_get_table_column_statistics_presult__isset; + +class ThriftHiveMetastore_get_table_column_statistics_presult { + public: + + + virtual ~ThriftHiveMetastore_get_table_column_statistics_presult() throw(); + ColumnStatistics* success; + NoSuchObjectException o1; + MetaException o2; + InvalidInputException o3; + InvalidObjectException o4; + + _ThriftHiveMetastore_get_table_column_statistics_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partition_column_statistics_args__isset { + _ThriftHiveMetastore_get_partition_column_statistics_args__isset() : db_name(false), tbl_name(false), part_name(false), col_name(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_name :1; + bool col_name :1; +} _ThriftHiveMetastore_get_partition_column_statistics_args__isset; + +class ThriftHiveMetastore_get_partition_column_statistics_args { + public: + + ThriftHiveMetastore_get_partition_column_statistics_args(const ThriftHiveMetastore_get_partition_column_statistics_args&); + ThriftHiveMetastore_get_partition_column_statistics_args& operator=(const ThriftHiveMetastore_get_partition_column_statistics_args&); + ThriftHiveMetastore_get_partition_column_statistics_args() : db_name(), tbl_name(), part_name(), col_name() { + } + + virtual ~ThriftHiveMetastore_get_partition_column_statistics_args() throw(); + std::string db_name; + std::string tbl_name; + std::string part_name; + std::string col_name; + + _ThriftHiveMetastore_get_partition_column_statistics_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_name(const std::string& val); + + void __set_col_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_partition_column_statistics_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(col_name == rhs.col_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_column_statistics_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_column_statistics_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partition_column_statistics_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_column_statistics_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* part_name; + const std::string* col_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_column_statistics_result__isset { + _ThriftHiveMetastore_get_partition_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_get_partition_column_statistics_result__isset; + +class ThriftHiveMetastore_get_partition_column_statistics_result { + public: + + ThriftHiveMetastore_get_partition_column_statistics_result(const ThriftHiveMetastore_get_partition_column_statistics_result&); + ThriftHiveMetastore_get_partition_column_statistics_result& operator=(const ThriftHiveMetastore_get_partition_column_statistics_result&); + ThriftHiveMetastore_get_partition_column_statistics_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_column_statistics_result() throw(); + ColumnStatistics success; + NoSuchObjectException o1; + MetaException o2; + InvalidInputException o3; + InvalidObjectException o4; + + _ThriftHiveMetastore_get_partition_column_statistics_result__isset __isset; + + void __set_success(const ColumnStatistics& val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + void __set_o3(const InvalidInputException& val); + + void __set_o4(const InvalidObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_partition_column_statistics_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_column_statistics_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_column_statistics_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_column_statistics_presult__isset { + _ThriftHiveMetastore_get_partition_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_get_partition_column_statistics_presult__isset; + +class ThriftHiveMetastore_get_partition_column_statistics_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partition_column_statistics_presult() throw(); + ColumnStatistics* success; + NoSuchObjectException o1; + MetaException o2; + InvalidInputException o3; + InvalidObjectException o4; + + _ThriftHiveMetastore_get_partition_column_statistics_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_table_statistics_req_args__isset { + _ThriftHiveMetastore_get_table_statistics_req_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_get_table_statistics_req_args__isset; + +class ThriftHiveMetastore_get_table_statistics_req_args { + public: + + ThriftHiveMetastore_get_table_statistics_req_args(const ThriftHiveMetastore_get_table_statistics_req_args&); + ThriftHiveMetastore_get_table_statistics_req_args& operator=(const ThriftHiveMetastore_get_table_statistics_req_args&); + ThriftHiveMetastore_get_table_statistics_req_args() { + } + + virtual ~ThriftHiveMetastore_get_table_statistics_req_args() throw(); + TableStatsRequest request; + + _ThriftHiveMetastore_get_table_statistics_req_args__isset __isset; + + void __set_request(const TableStatsRequest& val); + + bool operator == (const ThriftHiveMetastore_get_table_statistics_req_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_statistics_req_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_statistics_req_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_table_statistics_req_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_statistics_req_pargs() throw(); + const TableStatsRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_statistics_req_result__isset { + _ThriftHiveMetastore_get_table_statistics_req_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_table_statistics_req_result__isset; + +class ThriftHiveMetastore_get_table_statistics_req_result { + public: + + ThriftHiveMetastore_get_table_statistics_req_result(const ThriftHiveMetastore_get_table_statistics_req_result&); + ThriftHiveMetastore_get_table_statistics_req_result& operator=(const ThriftHiveMetastore_get_table_statistics_req_result&); + ThriftHiveMetastore_get_table_statistics_req_result() { + } + + virtual ~ThriftHiveMetastore_get_table_statistics_req_result() throw(); + TableStatsResult success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_table_statistics_req_result__isset __isset; + + void __set_success(const TableStatsResult& val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_table_statistics_req_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_statistics_req_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_statistics_req_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_statistics_req_presult__isset { + _ThriftHiveMetastore_get_table_statistics_req_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_table_statistics_req_presult__isset; + +class ThriftHiveMetastore_get_table_statistics_req_presult { + public: + + + virtual ~ThriftHiveMetastore_get_table_statistics_req_presult() throw(); + TableStatsResult* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_table_statistics_req_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_statistics_req_args__isset { + _ThriftHiveMetastore_get_partitions_statistics_req_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_get_partitions_statistics_req_args__isset; + +class ThriftHiveMetastore_get_partitions_statistics_req_args { + public: + + ThriftHiveMetastore_get_partitions_statistics_req_args(const ThriftHiveMetastore_get_partitions_statistics_req_args&); + ThriftHiveMetastore_get_partitions_statistics_req_args& operator=(const ThriftHiveMetastore_get_partitions_statistics_req_args&); + ThriftHiveMetastore_get_partitions_statistics_req_args() { + } + + virtual ~ThriftHiveMetastore_get_partitions_statistics_req_args() throw(); + PartitionsStatsRequest request; + + _ThriftHiveMetastore_get_partitions_statistics_req_args__isset __isset; + + void __set_request(const PartitionsStatsRequest& val); + + bool operator == (const ThriftHiveMetastore_get_partitions_statistics_req_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_statistics_req_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_statistics_req_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partitions_statistics_req_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_statistics_req_pargs() throw(); + const PartitionsStatsRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_statistics_req_result__isset { + _ThriftHiveMetastore_get_partitions_statistics_req_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_statistics_req_result__isset; + +class ThriftHiveMetastore_get_partitions_statistics_req_result { + public: + + ThriftHiveMetastore_get_partitions_statistics_req_result(const ThriftHiveMetastore_get_partitions_statistics_req_result&); + ThriftHiveMetastore_get_partitions_statistics_req_result& operator=(const ThriftHiveMetastore_get_partitions_statistics_req_result&); + ThriftHiveMetastore_get_partitions_statistics_req_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_statistics_req_result() throw(); + PartitionsStatsResult success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_statistics_req_result__isset __isset; + + void __set_success(const PartitionsStatsResult& val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_partitions_statistics_req_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_statistics_req_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_statistics_req_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_statistics_req_presult__isset { + _ThriftHiveMetastore_get_partitions_statistics_req_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_partitions_statistics_req_presult__isset; + +class ThriftHiveMetastore_get_partitions_statistics_req_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_statistics_req_presult() throw(); + PartitionsStatsResult* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_statistics_req_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_aggr_stats_for_args__isset { + _ThriftHiveMetastore_get_aggr_stats_for_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_get_aggr_stats_for_args__isset; + +class ThriftHiveMetastore_get_aggr_stats_for_args { + public: + + ThriftHiveMetastore_get_aggr_stats_for_args(const ThriftHiveMetastore_get_aggr_stats_for_args&); + ThriftHiveMetastore_get_aggr_stats_for_args& operator=(const ThriftHiveMetastore_get_aggr_stats_for_args&); + ThriftHiveMetastore_get_aggr_stats_for_args() { + } + + virtual ~ThriftHiveMetastore_get_aggr_stats_for_args() throw(); + PartitionsStatsRequest request; + + _ThriftHiveMetastore_get_aggr_stats_for_args__isset __isset; + + void __set_request(const PartitionsStatsRequest& val); + + bool operator == (const ThriftHiveMetastore_get_aggr_stats_for_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_aggr_stats_for_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_aggr_stats_for_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_aggr_stats_for_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_aggr_stats_for_pargs() throw(); + const PartitionsStatsRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_aggr_stats_for_result__isset { + _ThriftHiveMetastore_get_aggr_stats_for_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_aggr_stats_for_result__isset; + +class ThriftHiveMetastore_get_aggr_stats_for_result { + public: + + ThriftHiveMetastore_get_aggr_stats_for_result(const ThriftHiveMetastore_get_aggr_stats_for_result&); + ThriftHiveMetastore_get_aggr_stats_for_result& operator=(const ThriftHiveMetastore_get_aggr_stats_for_result&); + ThriftHiveMetastore_get_aggr_stats_for_result() { + } + + virtual ~ThriftHiveMetastore_get_aggr_stats_for_result() throw(); + AggrStats success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_aggr_stats_for_result__isset __isset; + + void __set_success(const AggrStats& val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_aggr_stats_for_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_aggr_stats_for_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_aggr_stats_for_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_aggr_stats_for_presult__isset { + _ThriftHiveMetastore_get_aggr_stats_for_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_aggr_stats_for_presult__isset; + +class ThriftHiveMetastore_get_aggr_stats_for_presult { + public: + + + virtual ~ThriftHiveMetastore_get_aggr_stats_for_presult() throw(); + AggrStats* success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_aggr_stats_for_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_set_aggr_stats_for_args__isset { + _ThriftHiveMetastore_set_aggr_stats_for_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_set_aggr_stats_for_args__isset; + +class ThriftHiveMetastore_set_aggr_stats_for_args { + public: + + ThriftHiveMetastore_set_aggr_stats_for_args(const ThriftHiveMetastore_set_aggr_stats_for_args&); + ThriftHiveMetastore_set_aggr_stats_for_args& operator=(const ThriftHiveMetastore_set_aggr_stats_for_args&); + ThriftHiveMetastore_set_aggr_stats_for_args() { + } + + virtual ~ThriftHiveMetastore_set_aggr_stats_for_args() throw(); + SetPartitionsStatsRequest request; + + _ThriftHiveMetastore_set_aggr_stats_for_args__isset __isset; + + void __set_request(const SetPartitionsStatsRequest& val); + + bool operator == (const ThriftHiveMetastore_set_aggr_stats_for_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_set_aggr_stats_for_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_set_aggr_stats_for_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_set_aggr_stats_for_pargs { + public: + + + virtual ~ThriftHiveMetastore_set_aggr_stats_for_pargs() throw(); + const SetPartitionsStatsRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_set_aggr_stats_for_result__isset { + _ThriftHiveMetastore_set_aggr_stats_for_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_set_aggr_stats_for_result__isset; + +class ThriftHiveMetastore_set_aggr_stats_for_result { + public: + + ThriftHiveMetastore_set_aggr_stats_for_result(const ThriftHiveMetastore_set_aggr_stats_for_result&); + ThriftHiveMetastore_set_aggr_stats_for_result& operator=(const ThriftHiveMetastore_set_aggr_stats_for_result&); + ThriftHiveMetastore_set_aggr_stats_for_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_set_aggr_stats_for_result() throw(); + bool success; + NoSuchObjectException o1; + InvalidObjectException o2; + MetaException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_set_aggr_stats_for_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const InvalidObjectException& val); + + void __set_o3(const MetaException& val); + + void __set_o4(const InvalidInputException& val); + + bool operator == (const ThriftHiveMetastore_set_aggr_stats_for_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_set_aggr_stats_for_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_set_aggr_stats_for_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_set_aggr_stats_for_presult__isset { + _ThriftHiveMetastore_set_aggr_stats_for_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_set_aggr_stats_for_presult__isset; + +class ThriftHiveMetastore_set_aggr_stats_for_presult { + public: + + + virtual ~ThriftHiveMetastore_set_aggr_stats_for_presult() throw(); + bool* success; + NoSuchObjectException o1; + InvalidObjectException o2; + MetaException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_set_aggr_stats_for_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_delete_partition_column_statistics_args__isset { + _ThriftHiveMetastore_delete_partition_column_statistics_args__isset() : db_name(false), tbl_name(false), part_name(false), col_name(false) {} + bool db_name :1; + bool tbl_name :1; + bool part_name :1; + bool col_name :1; +} _ThriftHiveMetastore_delete_partition_column_statistics_args__isset; + +class ThriftHiveMetastore_delete_partition_column_statistics_args { + public: + + ThriftHiveMetastore_delete_partition_column_statistics_args(const ThriftHiveMetastore_delete_partition_column_statistics_args&); + ThriftHiveMetastore_delete_partition_column_statistics_args& operator=(const ThriftHiveMetastore_delete_partition_column_statistics_args&); + ThriftHiveMetastore_delete_partition_column_statistics_args() : db_name(), tbl_name(), part_name(), col_name() { + } + + virtual ~ThriftHiveMetastore_delete_partition_column_statistics_args() throw(); + std::string db_name; + std::string tbl_name; + std::string part_name; + std::string col_name; + + _ThriftHiveMetastore_delete_partition_column_statistics_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_part_name(const std::string& val); + + void __set_col_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_delete_partition_column_statistics_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(col_name == rhs.col_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_delete_partition_column_statistics_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_delete_partition_column_statistics_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_delete_partition_column_statistics_pargs { + public: + + + virtual ~ThriftHiveMetastore_delete_partition_column_statistics_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* part_name; + const std::string* col_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_delete_partition_column_statistics_result__isset { + _ThriftHiveMetastore_delete_partition_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_delete_partition_column_statistics_result__isset; + +class ThriftHiveMetastore_delete_partition_column_statistics_result { + public: + + ThriftHiveMetastore_delete_partition_column_statistics_result(const ThriftHiveMetastore_delete_partition_column_statistics_result&); + ThriftHiveMetastore_delete_partition_column_statistics_result& operator=(const ThriftHiveMetastore_delete_partition_column_statistics_result&); + ThriftHiveMetastore_delete_partition_column_statistics_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_delete_partition_column_statistics_result() throw(); + bool success; + NoSuchObjectException o1; + MetaException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_delete_partition_column_statistics_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + void __set_o3(const InvalidObjectException& val); + + void __set_o4(const InvalidInputException& val); + + bool operator == (const ThriftHiveMetastore_delete_partition_column_statistics_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_delete_partition_column_statistics_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_delete_partition_column_statistics_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_delete_partition_column_statistics_presult__isset { + _ThriftHiveMetastore_delete_partition_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_delete_partition_column_statistics_presult__isset; + +class ThriftHiveMetastore_delete_partition_column_statistics_presult { + public: + + + virtual ~ThriftHiveMetastore_delete_partition_column_statistics_presult() throw(); + bool* success; + NoSuchObjectException o1; + MetaException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_delete_partition_column_statistics_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_delete_table_column_statistics_args__isset { + _ThriftHiveMetastore_delete_table_column_statistics_args__isset() : db_name(false), tbl_name(false), col_name(false) {} + bool db_name :1; + bool tbl_name :1; + bool col_name :1; +} _ThriftHiveMetastore_delete_table_column_statistics_args__isset; + +class ThriftHiveMetastore_delete_table_column_statistics_args { + public: + + ThriftHiveMetastore_delete_table_column_statistics_args(const ThriftHiveMetastore_delete_table_column_statistics_args&); + ThriftHiveMetastore_delete_table_column_statistics_args& operator=(const ThriftHiveMetastore_delete_table_column_statistics_args&); + ThriftHiveMetastore_delete_table_column_statistics_args() : db_name(), tbl_name(), col_name() { + } + + virtual ~ThriftHiveMetastore_delete_table_column_statistics_args() throw(); + std::string db_name; + std::string tbl_name; + std::string col_name; + + _ThriftHiveMetastore_delete_table_column_statistics_args__isset __isset; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + void __set_col_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_delete_table_column_statistics_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(col_name == rhs.col_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_delete_table_column_statistics_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_delete_table_column_statistics_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_delete_table_column_statistics_pargs { + public: + + + virtual ~ThriftHiveMetastore_delete_table_column_statistics_pargs() throw(); + const std::string* db_name; + const std::string* tbl_name; + const std::string* col_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_delete_table_column_statistics_result__isset { + _ThriftHiveMetastore_delete_table_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_delete_table_column_statistics_result__isset; + +class ThriftHiveMetastore_delete_table_column_statistics_result { + public: + + ThriftHiveMetastore_delete_table_column_statistics_result(const ThriftHiveMetastore_delete_table_column_statistics_result&); + ThriftHiveMetastore_delete_table_column_statistics_result& operator=(const ThriftHiveMetastore_delete_table_column_statistics_result&); + ThriftHiveMetastore_delete_table_column_statistics_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_delete_table_column_statistics_result() throw(); + bool success; + NoSuchObjectException o1; + MetaException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_delete_table_column_statistics_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + void __set_o3(const InvalidObjectException& val); + + void __set_o4(const InvalidInputException& val); + + bool operator == (const ThriftHiveMetastore_delete_table_column_statistics_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_delete_table_column_statistics_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_delete_table_column_statistics_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_delete_table_column_statistics_presult__isset { + _ThriftHiveMetastore_delete_table_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_delete_table_column_statistics_presult__isset; + +class ThriftHiveMetastore_delete_table_column_statistics_presult { + public: + + + virtual ~ThriftHiveMetastore_delete_table_column_statistics_presult() throw(); + bool* success; + NoSuchObjectException o1; + MetaException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_delete_table_column_statistics_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_create_function_args__isset { + _ThriftHiveMetastore_create_function_args__isset() : func(false) {} + bool func :1; +} _ThriftHiveMetastore_create_function_args__isset; + +class ThriftHiveMetastore_create_function_args { + public: + + ThriftHiveMetastore_create_function_args(const ThriftHiveMetastore_create_function_args&); + ThriftHiveMetastore_create_function_args& operator=(const ThriftHiveMetastore_create_function_args&); + ThriftHiveMetastore_create_function_args() { + } + + virtual ~ThriftHiveMetastore_create_function_args() throw(); + Function func; + + _ThriftHiveMetastore_create_function_args__isset __isset; + + void __set_func(const Function& val); + + bool operator == (const ThriftHiveMetastore_create_function_args & rhs) const + { + if (!(func == rhs.func)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_function_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_function_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_create_function_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_function_pargs() throw(); + const Function* func; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_function_result__isset { + _ThriftHiveMetastore_create_function_result__isset() : o1(false), o2(false), o3(false), o4(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_create_function_result__isset; + +class ThriftHiveMetastore_create_function_result { + public: + + ThriftHiveMetastore_create_function_result(const ThriftHiveMetastore_create_function_result&); + ThriftHiveMetastore_create_function_result& operator=(const ThriftHiveMetastore_create_function_result&); + ThriftHiveMetastore_create_function_result() { + } + + virtual ~ThriftHiveMetastore_create_function_result() throw(); + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + NoSuchObjectException o4; + + _ThriftHiveMetastore_create_function_result__isset __isset; + + void __set_o1(const AlreadyExistsException& val); + + void __set_o2(const InvalidObjectException& val); + + void __set_o3(const MetaException& val); + + void __set_o4(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_create_function_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_function_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_function_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_function_presult__isset { + _ThriftHiveMetastore_create_function_presult__isset() : o1(false), o2(false), o3(false), o4(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; + bool o4 :1; +} _ThriftHiveMetastore_create_function_presult__isset; + +class ThriftHiveMetastore_create_function_presult { + public: + + + virtual ~ThriftHiveMetastore_create_function_presult() throw(); + AlreadyExistsException o1; + InvalidObjectException o2; + MetaException o3; + NoSuchObjectException o4; + + _ThriftHiveMetastore_create_function_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_function_args__isset { + _ThriftHiveMetastore_drop_function_args__isset() : dbName(false), funcName(false) {} + bool dbName :1; + bool funcName :1; +} _ThriftHiveMetastore_drop_function_args__isset; + +class ThriftHiveMetastore_drop_function_args { + public: + + ThriftHiveMetastore_drop_function_args(const ThriftHiveMetastore_drop_function_args&); + ThriftHiveMetastore_drop_function_args& operator=(const ThriftHiveMetastore_drop_function_args&); + ThriftHiveMetastore_drop_function_args() : dbName(), funcName() { + } + + virtual ~ThriftHiveMetastore_drop_function_args() throw(); + std::string dbName; + std::string funcName; + + _ThriftHiveMetastore_drop_function_args__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_funcName(const std::string& val); + + bool operator == (const ThriftHiveMetastore_drop_function_args & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(funcName == rhs.funcName)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_function_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_function_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_function_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_function_pargs() throw(); + const std::string* dbName; + const std::string* funcName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_function_result__isset { + _ThriftHiveMetastore_drop_function_result__isset() : o1(false), o3(false) {} + bool o1 :1; + bool o3 :1; +} _ThriftHiveMetastore_drop_function_result__isset; + +class ThriftHiveMetastore_drop_function_result { + public: + + ThriftHiveMetastore_drop_function_result(const ThriftHiveMetastore_drop_function_result&); + ThriftHiveMetastore_drop_function_result& operator=(const ThriftHiveMetastore_drop_function_result&); + ThriftHiveMetastore_drop_function_result() { + } + + virtual ~ThriftHiveMetastore_drop_function_result() throw(); + NoSuchObjectException o1; + MetaException o3; + + _ThriftHiveMetastore_drop_function_result__isset __isset; + + void __set_o1(const NoSuchObjectException& val); + + void __set_o3(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_drop_function_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_function_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_function_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_function_presult__isset { + _ThriftHiveMetastore_drop_function_presult__isset() : o1(false), o3(false) {} + bool o1 :1; + bool o3 :1; +} _ThriftHiveMetastore_drop_function_presult__isset; + +class ThriftHiveMetastore_drop_function_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_function_presult() throw(); + NoSuchObjectException o1; + MetaException o3; + + _ThriftHiveMetastore_drop_function_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_alter_function_args__isset { + _ThriftHiveMetastore_alter_function_args__isset() : dbName(false), funcName(false), newFunc(false) {} + bool dbName :1; + bool funcName :1; + bool newFunc :1; +} _ThriftHiveMetastore_alter_function_args__isset; + +class ThriftHiveMetastore_alter_function_args { + public: + + ThriftHiveMetastore_alter_function_args(const ThriftHiveMetastore_alter_function_args&); + ThriftHiveMetastore_alter_function_args& operator=(const ThriftHiveMetastore_alter_function_args&); + ThriftHiveMetastore_alter_function_args() : dbName(), funcName() { + } + + virtual ~ThriftHiveMetastore_alter_function_args() throw(); + std::string dbName; + std::string funcName; + Function newFunc; + + _ThriftHiveMetastore_alter_function_args__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_funcName(const std::string& val); + + void __set_newFunc(const Function& val); + + bool operator == (const ThriftHiveMetastore_alter_function_args & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(funcName == rhs.funcName)) + return false; + if (!(newFunc == rhs.newFunc)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_function_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_function_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_alter_function_pargs { + public: + + + virtual ~ThriftHiveMetastore_alter_function_pargs() throw(); + const std::string* dbName; + const std::string* funcName; + const Function* newFunc; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_function_result__isset { + _ThriftHiveMetastore_alter_function_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_function_result__isset; + +class ThriftHiveMetastore_alter_function_result { + public: + + ThriftHiveMetastore_alter_function_result(const ThriftHiveMetastore_alter_function_result&); + ThriftHiveMetastore_alter_function_result& operator=(const ThriftHiveMetastore_alter_function_result&); + ThriftHiveMetastore_alter_function_result() { + } + + virtual ~ThriftHiveMetastore_alter_function_result() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_function_result__isset __isset; + + void __set_o1(const InvalidOperationException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_alter_function_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_alter_function_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_alter_function_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_alter_function_presult__isset { + _ThriftHiveMetastore_alter_function_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_alter_function_presult__isset; + +class ThriftHiveMetastore_alter_function_presult { + public: + + + virtual ~ThriftHiveMetastore_alter_function_presult() throw(); + InvalidOperationException o1; + MetaException o2; + + _ThriftHiveMetastore_alter_function_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_functions_args__isset { + _ThriftHiveMetastore_get_functions_args__isset() : dbName(false), pattern(false) {} + bool dbName :1; + bool pattern :1; +} _ThriftHiveMetastore_get_functions_args__isset; + +class ThriftHiveMetastore_get_functions_args { + public: + + ThriftHiveMetastore_get_functions_args(const ThriftHiveMetastore_get_functions_args&); + ThriftHiveMetastore_get_functions_args& operator=(const ThriftHiveMetastore_get_functions_args&); + ThriftHiveMetastore_get_functions_args() : dbName(), pattern() { + } + + virtual ~ThriftHiveMetastore_get_functions_args() throw(); + std::string dbName; + std::string pattern; + + _ThriftHiveMetastore_get_functions_args__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_pattern(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_functions_args & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(pattern == rhs.pattern)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_functions_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_functions_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_functions_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_functions_pargs() throw(); + const std::string* dbName; + const std::string* pattern; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_functions_result__isset { + _ThriftHiveMetastore_get_functions_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_functions_result__isset; + +class ThriftHiveMetastore_get_functions_result { + public: + + ThriftHiveMetastore_get_functions_result(const ThriftHiveMetastore_get_functions_result&); + ThriftHiveMetastore_get_functions_result& operator=(const ThriftHiveMetastore_get_functions_result&); + ThriftHiveMetastore_get_functions_result() { + } + + virtual ~ThriftHiveMetastore_get_functions_result() throw(); + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_functions_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_functions_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_functions_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_functions_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_functions_presult__isset { + _ThriftHiveMetastore_get_functions_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_functions_presult__isset; + +class ThriftHiveMetastore_get_functions_presult { + public: + + + virtual ~ThriftHiveMetastore_get_functions_presult() throw(); + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_functions_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_function_args__isset { + _ThriftHiveMetastore_get_function_args__isset() : dbName(false), funcName(false) {} + bool dbName :1; + bool funcName :1; +} _ThriftHiveMetastore_get_function_args__isset; + +class ThriftHiveMetastore_get_function_args { + public: + + ThriftHiveMetastore_get_function_args(const ThriftHiveMetastore_get_function_args&); + ThriftHiveMetastore_get_function_args& operator=(const ThriftHiveMetastore_get_function_args&); + ThriftHiveMetastore_get_function_args() : dbName(), funcName() { + } + + virtual ~ThriftHiveMetastore_get_function_args() throw(); + std::string dbName; + std::string funcName; + + _ThriftHiveMetastore_get_function_args__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_funcName(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_function_args & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(funcName == rhs.funcName)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_function_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_function_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_function_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_function_pargs() throw(); + const std::string* dbName; + const std::string* funcName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_function_result__isset { + _ThriftHiveMetastore_get_function_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_function_result__isset; + +class ThriftHiveMetastore_get_function_result { + public: + + ThriftHiveMetastore_get_function_result(const ThriftHiveMetastore_get_function_result&); + ThriftHiveMetastore_get_function_result& operator=(const ThriftHiveMetastore_get_function_result&); + ThriftHiveMetastore_get_function_result() { + } + + virtual ~ThriftHiveMetastore_get_function_result() throw(); + Function success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_function_result__isset __isset; + + void __set_success(const Function& val); + + void __set_o1(const MetaException& val); + + void __set_o2(const NoSuchObjectException& val); + + bool operator == (const ThriftHiveMetastore_get_function_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_function_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_function_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_function_presult__isset { + _ThriftHiveMetastore_get_function_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_get_function_presult__isset; + +class ThriftHiveMetastore_get_function_presult { + public: + + + virtual ~ThriftHiveMetastore_get_function_presult() throw(); + Function* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_function_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_get_all_functions_args { + public: + + ThriftHiveMetastore_get_all_functions_args(const ThriftHiveMetastore_get_all_functions_args&); + ThriftHiveMetastore_get_all_functions_args& operator=(const ThriftHiveMetastore_get_all_functions_args&); + ThriftHiveMetastore_get_all_functions_args() { + } + + virtual ~ThriftHiveMetastore_get_all_functions_args() throw(); + + bool operator == (const ThriftHiveMetastore_get_all_functions_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_functions_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_all_functions_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_all_functions_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_all_functions_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_all_functions_result__isset { + _ThriftHiveMetastore_get_all_functions_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_all_functions_result__isset; + +class ThriftHiveMetastore_get_all_functions_result { + public: + + ThriftHiveMetastore_get_all_functions_result(const ThriftHiveMetastore_get_all_functions_result&); + ThriftHiveMetastore_get_all_functions_result& operator=(const ThriftHiveMetastore_get_all_functions_result&); + ThriftHiveMetastore_get_all_functions_result() { + } + + virtual ~ThriftHiveMetastore_get_all_functions_result() throw(); + GetAllFunctionsResponse success; + MetaException o1; + + _ThriftHiveMetastore_get_all_functions_result__isset __isset; + + void __set_success(const GetAllFunctionsResponse& val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_all_functions_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_functions_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_all_functions_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_all_functions_presult__isset { + _ThriftHiveMetastore_get_all_functions_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_all_functions_presult__isset; + +class ThriftHiveMetastore_get_all_functions_presult { + public: + + + virtual ~ThriftHiveMetastore_get_all_functions_presult() throw(); + GetAllFunctionsResponse* success; + MetaException o1; + + _ThriftHiveMetastore_get_all_functions_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_create_role_args__isset { + _ThriftHiveMetastore_create_role_args__isset() : role(false) {} + bool role :1; +} _ThriftHiveMetastore_create_role_args__isset; + +class ThriftHiveMetastore_create_role_args { + public: + + ThriftHiveMetastore_create_role_args(const ThriftHiveMetastore_create_role_args&); + ThriftHiveMetastore_create_role_args& operator=(const ThriftHiveMetastore_create_role_args&); + ThriftHiveMetastore_create_role_args() { + } + + virtual ~ThriftHiveMetastore_create_role_args() throw(); + Role role; + + _ThriftHiveMetastore_create_role_args__isset __isset; + + void __set_role(const Role& val); + + bool operator == (const ThriftHiveMetastore_create_role_args & rhs) const + { + if (!(role == rhs.role)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_create_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_role_pargs() throw(); + const Role* role; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_role_result__isset { + _ThriftHiveMetastore_create_role_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_create_role_result__isset; + +class ThriftHiveMetastore_create_role_result { + public: + + ThriftHiveMetastore_create_role_result(const ThriftHiveMetastore_create_role_result&); + ThriftHiveMetastore_create_role_result& operator=(const ThriftHiveMetastore_create_role_result&); + ThriftHiveMetastore_create_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_create_role_result() throw(); + bool success; + MetaException o1; + + _ThriftHiveMetastore_create_role_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_create_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_role_presult__isset { + _ThriftHiveMetastore_create_role_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_create_role_presult__isset; + +class ThriftHiveMetastore_create_role_presult { + public: + + + virtual ~ThriftHiveMetastore_create_role_presult() throw(); + bool* success; + MetaException o1; + + _ThriftHiveMetastore_create_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_role_args__isset { + _ThriftHiveMetastore_drop_role_args__isset() : role_name(false) {} + bool role_name :1; +} _ThriftHiveMetastore_drop_role_args__isset; + +class ThriftHiveMetastore_drop_role_args { + public: + + ThriftHiveMetastore_drop_role_args(const ThriftHiveMetastore_drop_role_args&); + ThriftHiveMetastore_drop_role_args& operator=(const ThriftHiveMetastore_drop_role_args&); + ThriftHiveMetastore_drop_role_args() : role_name() { + } + + virtual ~ThriftHiveMetastore_drop_role_args() throw(); + std::string role_name; + + _ThriftHiveMetastore_drop_role_args__isset __isset; + + void __set_role_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_drop_role_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_role_pargs() throw(); + const std::string* role_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_role_result__isset { + _ThriftHiveMetastore_drop_role_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_drop_role_result__isset; + +class ThriftHiveMetastore_drop_role_result { + public: + + ThriftHiveMetastore_drop_role_result(const ThriftHiveMetastore_drop_role_result&); + ThriftHiveMetastore_drop_role_result& operator=(const ThriftHiveMetastore_drop_role_result&); + ThriftHiveMetastore_drop_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_role_result() throw(); + bool success; + MetaException o1; + + _ThriftHiveMetastore_drop_role_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_drop_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_role_presult__isset { + _ThriftHiveMetastore_drop_role_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_drop_role_presult__isset; + +class ThriftHiveMetastore_drop_role_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_role_presult() throw(); + bool* success; + MetaException o1; + + _ThriftHiveMetastore_drop_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_get_role_names_args { + public: + + ThriftHiveMetastore_get_role_names_args(const ThriftHiveMetastore_get_role_names_args&); + ThriftHiveMetastore_get_role_names_args& operator=(const ThriftHiveMetastore_get_role_names_args&); + ThriftHiveMetastore_get_role_names_args() { + } + + virtual ~ThriftHiveMetastore_get_role_names_args() throw(); + + bool operator == (const ThriftHiveMetastore_get_role_names_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_role_names_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_role_names_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_role_names_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_role_names_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_role_names_result__isset { + _ThriftHiveMetastore_get_role_names_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_role_names_result__isset; + +class ThriftHiveMetastore_get_role_names_result { + public: + + ThriftHiveMetastore_get_role_names_result(const ThriftHiveMetastore_get_role_names_result&); + ThriftHiveMetastore_get_role_names_result& operator=(const ThriftHiveMetastore_get_role_names_result&); + ThriftHiveMetastore_get_role_names_result() { + } + + virtual ~ThriftHiveMetastore_get_role_names_result() throw(); + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_role_names_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_role_names_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_role_names_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_role_names_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_role_names_presult__isset { + _ThriftHiveMetastore_get_role_names_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_role_names_presult__isset; + +class ThriftHiveMetastore_get_role_names_presult { + public: + + + virtual ~ThriftHiveMetastore_get_role_names_presult() throw(); + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_role_names_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_grant_role_args__isset { + _ThriftHiveMetastore_grant_role_args__isset() : role_name(false), principal_name(false), principal_type(false), grantor(false), grantorType(false), grant_option(false) {} + bool role_name :1; + bool principal_name :1; + bool principal_type :1; + bool grantor :1; + bool grantorType :1; + bool grant_option :1; +} _ThriftHiveMetastore_grant_role_args__isset; + +class ThriftHiveMetastore_grant_role_args { + public: + + ThriftHiveMetastore_grant_role_args(const ThriftHiveMetastore_grant_role_args&); + ThriftHiveMetastore_grant_role_args& operator=(const ThriftHiveMetastore_grant_role_args&); + 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(); + std::string role_name; + std::string principal_name; + PrincipalType::type principal_type; + std::string grantor; + PrincipalType::type grantorType; + bool grant_option; + + _ThriftHiveMetastore_grant_role_args__isset __isset; + + void __set_role_name(const std::string& val); + + void __set_principal_name(const std::string& val); + + void __set_principal_type(const PrincipalType::type val); + + void __set_grantor(const std::string& val); + + void __set_grantorType(const PrincipalType::type val); + + void __set_grant_option(const bool val); + + bool operator == (const ThriftHiveMetastore_grant_role_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + if (!(principal_name == rhs.principal_name)) + return false; + if (!(principal_type == rhs.principal_type)) + return false; + if (!(grantor == rhs.grantor)) + return false; + if (!(grantorType == rhs.grantorType)) + return false; + if (!(grant_option == rhs.grant_option)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_grant_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_grant_role_pargs() throw(); + 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; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_role_result__isset { + _ThriftHiveMetastore_grant_role_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_grant_role_result__isset; + +class ThriftHiveMetastore_grant_role_result { + public: + + ThriftHiveMetastore_grant_role_result(const ThriftHiveMetastore_grant_role_result&); + ThriftHiveMetastore_grant_role_result& operator=(const ThriftHiveMetastore_grant_role_result&); + ThriftHiveMetastore_grant_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_grant_role_result() throw(); + bool success; + MetaException o1; + + _ThriftHiveMetastore_grant_role_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_grant_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_role_presult__isset { + _ThriftHiveMetastore_grant_role_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_grant_role_presult__isset; + +class ThriftHiveMetastore_grant_role_presult { + public: + + + virtual ~ThriftHiveMetastore_grant_role_presult() throw(); + bool* success; + MetaException o1; + + _ThriftHiveMetastore_grant_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_revoke_role_args__isset { + _ThriftHiveMetastore_revoke_role_args__isset() : role_name(false), principal_name(false), principal_type(false) {} + bool role_name :1; + bool principal_name :1; + bool principal_type :1; +} _ThriftHiveMetastore_revoke_role_args__isset; + +class ThriftHiveMetastore_revoke_role_args { + public: + + ThriftHiveMetastore_revoke_role_args(const ThriftHiveMetastore_revoke_role_args&); + ThriftHiveMetastore_revoke_role_args& operator=(const ThriftHiveMetastore_revoke_role_args&); + ThriftHiveMetastore_revoke_role_args() : role_name(), principal_name(), principal_type((PrincipalType::type)0) { + } + + virtual ~ThriftHiveMetastore_revoke_role_args() throw(); + std::string role_name; + std::string principal_name; + PrincipalType::type principal_type; + + _ThriftHiveMetastore_revoke_role_args__isset __isset; + + void __set_role_name(const std::string& val); + + void __set_principal_name(const std::string& val); + + void __set_principal_type(const PrincipalType::type val); + + bool operator == (const ThriftHiveMetastore_revoke_role_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + if (!(principal_name == rhs.principal_name)) + return false; + if (!(principal_type == rhs.principal_type)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_revoke_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_revoke_role_pargs() throw(); + const std::string* role_name; + const std::string* principal_name; + const PrincipalType::type* principal_type; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_revoke_role_result__isset { + _ThriftHiveMetastore_revoke_role_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_revoke_role_result__isset; + +class ThriftHiveMetastore_revoke_role_result { + public: + + ThriftHiveMetastore_revoke_role_result(const ThriftHiveMetastore_revoke_role_result&); + ThriftHiveMetastore_revoke_role_result& operator=(const ThriftHiveMetastore_revoke_role_result&); + ThriftHiveMetastore_revoke_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_revoke_role_result() throw(); + bool success; + MetaException o1; + + _ThriftHiveMetastore_revoke_role_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_revoke_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_revoke_role_presult__isset { + _ThriftHiveMetastore_revoke_role_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_revoke_role_presult__isset; + +class ThriftHiveMetastore_revoke_role_presult { + public: + + + virtual ~ThriftHiveMetastore_revoke_role_presult() throw(); + bool* success; + MetaException o1; + + _ThriftHiveMetastore_revoke_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_list_roles_args__isset { + _ThriftHiveMetastore_list_roles_args__isset() : principal_name(false), principal_type(false) {} + bool principal_name :1; + bool principal_type :1; +} _ThriftHiveMetastore_list_roles_args__isset; + +class ThriftHiveMetastore_list_roles_args { + public: + + ThriftHiveMetastore_list_roles_args(const ThriftHiveMetastore_list_roles_args&); + ThriftHiveMetastore_list_roles_args& operator=(const ThriftHiveMetastore_list_roles_args&); + ThriftHiveMetastore_list_roles_args() : principal_name(), principal_type((PrincipalType::type)0) { + } + + virtual ~ThriftHiveMetastore_list_roles_args() throw(); + std::string principal_name; + PrincipalType::type principal_type; + + _ThriftHiveMetastore_list_roles_args__isset __isset; + + void __set_principal_name(const std::string& val); + + void __set_principal_type(const PrincipalType::type val); + + bool operator == (const ThriftHiveMetastore_list_roles_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(principal_type == rhs.principal_type)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_roles_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_roles_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_list_roles_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_roles_pargs() throw(); + const std::string* principal_name; + const PrincipalType::type* principal_type; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_roles_result__isset { + _ThriftHiveMetastore_list_roles_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_list_roles_result__isset; + +class ThriftHiveMetastore_list_roles_result { + public: + + ThriftHiveMetastore_list_roles_result(const ThriftHiveMetastore_list_roles_result&); + ThriftHiveMetastore_list_roles_result& operator=(const ThriftHiveMetastore_list_roles_result&); + ThriftHiveMetastore_list_roles_result() { + } + + virtual ~ThriftHiveMetastore_list_roles_result() throw(); + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_list_roles_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_list_roles_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_roles_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_roles_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_roles_presult__isset { + _ThriftHiveMetastore_list_roles_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_list_roles_presult__isset; + +class ThriftHiveMetastore_list_roles_presult { + public: + + + virtual ~ThriftHiveMetastore_list_roles_presult() throw(); + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_list_roles_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_grant_revoke_role_args__isset { + _ThriftHiveMetastore_grant_revoke_role_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_grant_revoke_role_args__isset; + +class ThriftHiveMetastore_grant_revoke_role_args { + public: + + ThriftHiveMetastore_grant_revoke_role_args(const ThriftHiveMetastore_grant_revoke_role_args&); + ThriftHiveMetastore_grant_revoke_role_args& operator=(const ThriftHiveMetastore_grant_revoke_role_args&); + ThriftHiveMetastore_grant_revoke_role_args() { + } + + virtual ~ThriftHiveMetastore_grant_revoke_role_args() throw(); + GrantRevokeRoleRequest request; + + _ThriftHiveMetastore_grant_revoke_role_args__isset __isset; + + void __set_request(const GrantRevokeRoleRequest& val); + + bool operator == (const ThriftHiveMetastore_grant_revoke_role_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_revoke_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_revoke_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_grant_revoke_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_grant_revoke_role_pargs() throw(); + const GrantRevokeRoleRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_revoke_role_result__isset { + _ThriftHiveMetastore_grant_revoke_role_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_grant_revoke_role_result__isset; + +class ThriftHiveMetastore_grant_revoke_role_result { + public: + + ThriftHiveMetastore_grant_revoke_role_result(const ThriftHiveMetastore_grant_revoke_role_result&); + ThriftHiveMetastore_grant_revoke_role_result& operator=(const ThriftHiveMetastore_grant_revoke_role_result&); + ThriftHiveMetastore_grant_revoke_role_result() { + } + + virtual ~ThriftHiveMetastore_grant_revoke_role_result() throw(); + GrantRevokeRoleResponse success; + MetaException o1; + + _ThriftHiveMetastore_grant_revoke_role_result__isset __isset; + + void __set_success(const GrantRevokeRoleResponse& val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_grant_revoke_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_revoke_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_revoke_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_revoke_role_presult__isset { + _ThriftHiveMetastore_grant_revoke_role_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_grant_revoke_role_presult__isset; + +class ThriftHiveMetastore_grant_revoke_role_presult { + public: + + + virtual ~ThriftHiveMetastore_grant_revoke_role_presult() throw(); + GrantRevokeRoleResponse* success; + MetaException o1; + + _ThriftHiveMetastore_grant_revoke_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_principals_in_role_args__isset { + _ThriftHiveMetastore_get_principals_in_role_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_get_principals_in_role_args__isset; + +class ThriftHiveMetastore_get_principals_in_role_args { + public: + + ThriftHiveMetastore_get_principals_in_role_args(const ThriftHiveMetastore_get_principals_in_role_args&); + ThriftHiveMetastore_get_principals_in_role_args& operator=(const ThriftHiveMetastore_get_principals_in_role_args&); + ThriftHiveMetastore_get_principals_in_role_args() { + } + + virtual ~ThriftHiveMetastore_get_principals_in_role_args() throw(); + GetPrincipalsInRoleRequest request; + + _ThriftHiveMetastore_get_principals_in_role_args__isset __isset; + + void __set_request(const GetPrincipalsInRoleRequest& val); + + bool operator == (const ThriftHiveMetastore_get_principals_in_role_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_principals_in_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_principals_in_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_principals_in_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_principals_in_role_pargs() throw(); + const GetPrincipalsInRoleRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_principals_in_role_result__isset { + _ThriftHiveMetastore_get_principals_in_role_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_principals_in_role_result__isset; + +class ThriftHiveMetastore_get_principals_in_role_result { + public: + + ThriftHiveMetastore_get_principals_in_role_result(const ThriftHiveMetastore_get_principals_in_role_result&); + ThriftHiveMetastore_get_principals_in_role_result& operator=(const ThriftHiveMetastore_get_principals_in_role_result&); + ThriftHiveMetastore_get_principals_in_role_result() { + } + + virtual ~ThriftHiveMetastore_get_principals_in_role_result() throw(); + GetPrincipalsInRoleResponse success; + MetaException o1; + + _ThriftHiveMetastore_get_principals_in_role_result__isset __isset; + + void __set_success(const GetPrincipalsInRoleResponse& val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_principals_in_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_principals_in_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_principals_in_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_principals_in_role_presult__isset { + _ThriftHiveMetastore_get_principals_in_role_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_principals_in_role_presult__isset; + +class ThriftHiveMetastore_get_principals_in_role_presult { + public: + + + virtual ~ThriftHiveMetastore_get_principals_in_role_presult() throw(); + GetPrincipalsInRoleResponse* success; + MetaException o1; + + _ThriftHiveMetastore_get_principals_in_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_role_grants_for_principal_args__isset { + _ThriftHiveMetastore_get_role_grants_for_principal_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_get_role_grants_for_principal_args__isset; + +class ThriftHiveMetastore_get_role_grants_for_principal_args { + public: + + ThriftHiveMetastore_get_role_grants_for_principal_args(const ThriftHiveMetastore_get_role_grants_for_principal_args&); + ThriftHiveMetastore_get_role_grants_for_principal_args& operator=(const ThriftHiveMetastore_get_role_grants_for_principal_args&); + ThriftHiveMetastore_get_role_grants_for_principal_args() { + } + + virtual ~ThriftHiveMetastore_get_role_grants_for_principal_args() throw(); + GetRoleGrantsForPrincipalRequest request; + + _ThriftHiveMetastore_get_role_grants_for_principal_args__isset __isset; + + void __set_request(const GetRoleGrantsForPrincipalRequest& val); + + bool operator == (const ThriftHiveMetastore_get_role_grants_for_principal_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_role_grants_for_principal_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_role_grants_for_principal_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_role_grants_for_principal_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_role_grants_for_principal_pargs() throw(); + const GetRoleGrantsForPrincipalRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_role_grants_for_principal_result__isset { + _ThriftHiveMetastore_get_role_grants_for_principal_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_role_grants_for_principal_result__isset; + +class ThriftHiveMetastore_get_role_grants_for_principal_result { + public: + + ThriftHiveMetastore_get_role_grants_for_principal_result(const ThriftHiveMetastore_get_role_grants_for_principal_result&); + ThriftHiveMetastore_get_role_grants_for_principal_result& operator=(const ThriftHiveMetastore_get_role_grants_for_principal_result&); + ThriftHiveMetastore_get_role_grants_for_principal_result() { + } + + virtual ~ThriftHiveMetastore_get_role_grants_for_principal_result() throw(); + GetRoleGrantsForPrincipalResponse success; + MetaException o1; + + _ThriftHiveMetastore_get_role_grants_for_principal_result__isset __isset; + + void __set_success(const GetRoleGrantsForPrincipalResponse& val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_role_grants_for_principal_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_role_grants_for_principal_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_role_grants_for_principal_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_role_grants_for_principal_presult__isset { + _ThriftHiveMetastore_get_role_grants_for_principal_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_role_grants_for_principal_presult__isset; + +class ThriftHiveMetastore_get_role_grants_for_principal_presult { + public: + + + virtual ~ThriftHiveMetastore_get_role_grants_for_principal_presult() throw(); + GetRoleGrantsForPrincipalResponse* success; + MetaException o1; + + _ThriftHiveMetastore_get_role_grants_for_principal_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_privilege_set_args__isset { + _ThriftHiveMetastore_get_privilege_set_args__isset() : hiveObject(false), user_name(false), group_names(false) {} + bool hiveObject :1; + bool user_name :1; + bool group_names :1; +} _ThriftHiveMetastore_get_privilege_set_args__isset; + +class ThriftHiveMetastore_get_privilege_set_args { + public: + + ThriftHiveMetastore_get_privilege_set_args(const ThriftHiveMetastore_get_privilege_set_args&); + ThriftHiveMetastore_get_privilege_set_args& operator=(const ThriftHiveMetastore_get_privilege_set_args&); + ThriftHiveMetastore_get_privilege_set_args() : user_name() { + } + + virtual ~ThriftHiveMetastore_get_privilege_set_args() throw(); + HiveObjectRef hiveObject; + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_get_privilege_set_args__isset __isset; + + void __set_hiveObject(const HiveObjectRef& val); + + void __set_user_name(const std::string& val); + + void __set_group_names(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_get_privilege_set_args & rhs) const + { + if (!(hiveObject == rhs.hiveObject)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_privilege_set_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_privilege_set_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_privilege_set_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_privilege_set_pargs() throw(); + const HiveObjectRef* hiveObject; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_privilege_set_result__isset { + _ThriftHiveMetastore_get_privilege_set_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_privilege_set_result__isset; + +class ThriftHiveMetastore_get_privilege_set_result { + public: + + ThriftHiveMetastore_get_privilege_set_result(const ThriftHiveMetastore_get_privilege_set_result&); + ThriftHiveMetastore_get_privilege_set_result& operator=(const ThriftHiveMetastore_get_privilege_set_result&); + ThriftHiveMetastore_get_privilege_set_result() { + } + + virtual ~ThriftHiveMetastore_get_privilege_set_result() throw(); + PrincipalPrivilegeSet success; + MetaException o1; + + _ThriftHiveMetastore_get_privilege_set_result__isset __isset; + + void __set_success(const PrincipalPrivilegeSet& val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_privilege_set_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_privilege_set_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_privilege_set_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_privilege_set_presult__isset { + _ThriftHiveMetastore_get_privilege_set_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_privilege_set_presult__isset; + +class ThriftHiveMetastore_get_privilege_set_presult { + public: + + + virtual ~ThriftHiveMetastore_get_privilege_set_presult() throw(); + PrincipalPrivilegeSet* success; + MetaException o1; + + _ThriftHiveMetastore_get_privilege_set_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_list_privileges_args__isset { + _ThriftHiveMetastore_list_privileges_args__isset() : principal_name(false), principal_type(false), hiveObject(false) {} + bool principal_name :1; + bool principal_type :1; + bool hiveObject :1; +} _ThriftHiveMetastore_list_privileges_args__isset; + +class ThriftHiveMetastore_list_privileges_args { + public: + + ThriftHiveMetastore_list_privileges_args(const ThriftHiveMetastore_list_privileges_args&); + ThriftHiveMetastore_list_privileges_args& operator=(const ThriftHiveMetastore_list_privileges_args&); + ThriftHiveMetastore_list_privileges_args() : principal_name(), principal_type((PrincipalType::type)0) { + } + + virtual ~ThriftHiveMetastore_list_privileges_args() throw(); + std::string principal_name; + PrincipalType::type principal_type; + HiveObjectRef hiveObject; + + _ThriftHiveMetastore_list_privileges_args__isset __isset; + + void __set_principal_name(const std::string& val); + + void __set_principal_type(const PrincipalType::type val); + + void __set_hiveObject(const HiveObjectRef& val); + + bool operator == (const ThriftHiveMetastore_list_privileges_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(principal_type == rhs.principal_type)) + return false; + if (!(hiveObject == rhs.hiveObject)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_privileges_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_privileges_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_list_privileges_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_privileges_pargs() throw(); + const std::string* principal_name; + const PrincipalType::type* principal_type; + const HiveObjectRef* hiveObject; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_privileges_result__isset { + _ThriftHiveMetastore_list_privileges_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_list_privileges_result__isset; + +class ThriftHiveMetastore_list_privileges_result { + public: + + ThriftHiveMetastore_list_privileges_result(const ThriftHiveMetastore_list_privileges_result&); + ThriftHiveMetastore_list_privileges_result& operator=(const ThriftHiveMetastore_list_privileges_result&); + ThriftHiveMetastore_list_privileges_result() { + } + + virtual ~ThriftHiveMetastore_list_privileges_result() throw(); + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_list_privileges_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_list_privileges_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_privileges_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_privileges_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_privileges_presult__isset { + _ThriftHiveMetastore_list_privileges_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_list_privileges_presult__isset; + +class ThriftHiveMetastore_list_privileges_presult { + public: + + + virtual ~ThriftHiveMetastore_list_privileges_presult() throw(); + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_list_privileges_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_grant_privileges_args__isset { + _ThriftHiveMetastore_grant_privileges_args__isset() : privileges(false) {} + bool privileges :1; +} _ThriftHiveMetastore_grant_privileges_args__isset; + +class ThriftHiveMetastore_grant_privileges_args { + public: + + ThriftHiveMetastore_grant_privileges_args(const ThriftHiveMetastore_grant_privileges_args&); + ThriftHiveMetastore_grant_privileges_args& operator=(const ThriftHiveMetastore_grant_privileges_args&); + ThriftHiveMetastore_grant_privileges_args() { + } + + virtual ~ThriftHiveMetastore_grant_privileges_args() throw(); + PrivilegeBag privileges; + + _ThriftHiveMetastore_grant_privileges_args__isset __isset; + + void __set_privileges(const PrivilegeBag& val); + + bool operator == (const ThriftHiveMetastore_grant_privileges_args & rhs) const + { + if (!(privileges == rhs.privileges)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_privileges_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_privileges_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_grant_privileges_pargs { + public: + + + virtual ~ThriftHiveMetastore_grant_privileges_pargs() throw(); + const PrivilegeBag* privileges; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_privileges_result__isset { + _ThriftHiveMetastore_grant_privileges_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_grant_privileges_result__isset; + +class ThriftHiveMetastore_grant_privileges_result { + public: + + ThriftHiveMetastore_grant_privileges_result(const ThriftHiveMetastore_grant_privileges_result&); + ThriftHiveMetastore_grant_privileges_result& operator=(const ThriftHiveMetastore_grant_privileges_result&); + ThriftHiveMetastore_grant_privileges_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_grant_privileges_result() throw(); + bool success; + MetaException o1; + + _ThriftHiveMetastore_grant_privileges_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_grant_privileges_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_privileges_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_privileges_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_privileges_presult__isset { + _ThriftHiveMetastore_grant_privileges_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_grant_privileges_presult__isset; + +class ThriftHiveMetastore_grant_privileges_presult { + public: + + + virtual ~ThriftHiveMetastore_grant_privileges_presult() throw(); + bool* success; + MetaException o1; + + _ThriftHiveMetastore_grant_privileges_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_revoke_privileges_args__isset { + _ThriftHiveMetastore_revoke_privileges_args__isset() : privileges(false) {} + bool privileges :1; +} _ThriftHiveMetastore_revoke_privileges_args__isset; + +class ThriftHiveMetastore_revoke_privileges_args { + public: + + ThriftHiveMetastore_revoke_privileges_args(const ThriftHiveMetastore_revoke_privileges_args&); + ThriftHiveMetastore_revoke_privileges_args& operator=(const ThriftHiveMetastore_revoke_privileges_args&); + ThriftHiveMetastore_revoke_privileges_args() { + } + + virtual ~ThriftHiveMetastore_revoke_privileges_args() throw(); + PrivilegeBag privileges; + + _ThriftHiveMetastore_revoke_privileges_args__isset __isset; + + void __set_privileges(const PrivilegeBag& val); + + bool operator == (const ThriftHiveMetastore_revoke_privileges_args & rhs) const + { + if (!(privileges == rhs.privileges)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_privileges_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_privileges_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_revoke_privileges_pargs { + public: + + + virtual ~ThriftHiveMetastore_revoke_privileges_pargs() throw(); + const PrivilegeBag* privileges; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_revoke_privileges_result__isset { + _ThriftHiveMetastore_revoke_privileges_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_revoke_privileges_result__isset; + +class ThriftHiveMetastore_revoke_privileges_result { + public: + + ThriftHiveMetastore_revoke_privileges_result(const ThriftHiveMetastore_revoke_privileges_result&); + ThriftHiveMetastore_revoke_privileges_result& operator=(const ThriftHiveMetastore_revoke_privileges_result&); + ThriftHiveMetastore_revoke_privileges_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_revoke_privileges_result() throw(); + bool success; + MetaException o1; + + _ThriftHiveMetastore_revoke_privileges_result__isset __isset; + + void __set_success(const bool val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_revoke_privileges_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_privileges_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_privileges_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_revoke_privileges_presult__isset { + _ThriftHiveMetastore_revoke_privileges_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_revoke_privileges_presult__isset; + +class ThriftHiveMetastore_revoke_privileges_presult { + public: + + + virtual ~ThriftHiveMetastore_revoke_privileges_presult() throw(); + bool* success; + MetaException o1; + + _ThriftHiveMetastore_revoke_privileges_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_grant_revoke_privileges_args__isset { + _ThriftHiveMetastore_grant_revoke_privileges_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_grant_revoke_privileges_args__isset; + +class ThriftHiveMetastore_grant_revoke_privileges_args { + public: + + ThriftHiveMetastore_grant_revoke_privileges_args(const ThriftHiveMetastore_grant_revoke_privileges_args&); + ThriftHiveMetastore_grant_revoke_privileges_args& operator=(const ThriftHiveMetastore_grant_revoke_privileges_args&); + ThriftHiveMetastore_grant_revoke_privileges_args() { + } + + virtual ~ThriftHiveMetastore_grant_revoke_privileges_args() throw(); + GrantRevokePrivilegeRequest request; + + _ThriftHiveMetastore_grant_revoke_privileges_args__isset __isset; + + void __set_request(const GrantRevokePrivilegeRequest& val); + + bool operator == (const ThriftHiveMetastore_grant_revoke_privileges_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_revoke_privileges_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_revoke_privileges_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_grant_revoke_privileges_pargs { + public: + + + virtual ~ThriftHiveMetastore_grant_revoke_privileges_pargs() throw(); + const GrantRevokePrivilegeRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_revoke_privileges_result__isset { + _ThriftHiveMetastore_grant_revoke_privileges_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_grant_revoke_privileges_result__isset; + +class ThriftHiveMetastore_grant_revoke_privileges_result { + public: + + ThriftHiveMetastore_grant_revoke_privileges_result(const ThriftHiveMetastore_grant_revoke_privileges_result&); + ThriftHiveMetastore_grant_revoke_privileges_result& operator=(const ThriftHiveMetastore_grant_revoke_privileges_result&); + ThriftHiveMetastore_grant_revoke_privileges_result() { + } + + virtual ~ThriftHiveMetastore_grant_revoke_privileges_result() throw(); + GrantRevokePrivilegeResponse success; + MetaException o1; + + _ThriftHiveMetastore_grant_revoke_privileges_result__isset __isset; + + void __set_success(const GrantRevokePrivilegeResponse& val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_grant_revoke_privileges_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_revoke_privileges_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_revoke_privileges_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_revoke_privileges_presult__isset { + _ThriftHiveMetastore_grant_revoke_privileges_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_grant_revoke_privileges_presult__isset; + +class ThriftHiveMetastore_grant_revoke_privileges_presult { + public: + + + virtual ~ThriftHiveMetastore_grant_revoke_privileges_presult() throw(); + GrantRevokePrivilegeResponse* success; + MetaException o1; + + _ThriftHiveMetastore_grant_revoke_privileges_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_set_ugi_args__isset { + _ThriftHiveMetastore_set_ugi_args__isset() : user_name(false), group_names(false) {} + bool user_name :1; + bool group_names :1; +} _ThriftHiveMetastore_set_ugi_args__isset; + +class ThriftHiveMetastore_set_ugi_args { + public: + + ThriftHiveMetastore_set_ugi_args(const ThriftHiveMetastore_set_ugi_args&); + ThriftHiveMetastore_set_ugi_args& operator=(const ThriftHiveMetastore_set_ugi_args&); + ThriftHiveMetastore_set_ugi_args() : user_name() { + } + + virtual ~ThriftHiveMetastore_set_ugi_args() throw(); + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_set_ugi_args__isset __isset; + + void __set_user_name(const std::string& val); + + void __set_group_names(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_set_ugi_args & rhs) const + { + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_set_ugi_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_set_ugi_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_set_ugi_pargs { + public: + + + virtual ~ThriftHiveMetastore_set_ugi_pargs() throw(); + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_set_ugi_result__isset { + _ThriftHiveMetastore_set_ugi_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_set_ugi_result__isset; + +class ThriftHiveMetastore_set_ugi_result { + public: + + ThriftHiveMetastore_set_ugi_result(const ThriftHiveMetastore_set_ugi_result&); + ThriftHiveMetastore_set_ugi_result& operator=(const ThriftHiveMetastore_set_ugi_result&); + ThriftHiveMetastore_set_ugi_result() { + } + + virtual ~ThriftHiveMetastore_set_ugi_result() throw(); + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_set_ugi_result__isset __isset; + + void __set_success(const std::vector & val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_set_ugi_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_set_ugi_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_set_ugi_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_set_ugi_presult__isset { + _ThriftHiveMetastore_set_ugi_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_set_ugi_presult__isset; + +class ThriftHiveMetastore_set_ugi_presult { + public: + + + virtual ~ThriftHiveMetastore_set_ugi_presult() throw(); + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_set_ugi_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_delegation_token_args__isset { + _ThriftHiveMetastore_get_delegation_token_args__isset() : token_owner(false), renewer_kerberos_principal_name(false) {} + bool token_owner :1; + bool renewer_kerberos_principal_name :1; +} _ThriftHiveMetastore_get_delegation_token_args__isset; + +class ThriftHiveMetastore_get_delegation_token_args { + public: + + ThriftHiveMetastore_get_delegation_token_args(const ThriftHiveMetastore_get_delegation_token_args&); + ThriftHiveMetastore_get_delegation_token_args& operator=(const ThriftHiveMetastore_get_delegation_token_args&); + ThriftHiveMetastore_get_delegation_token_args() : token_owner(), renewer_kerberos_principal_name() { + } + + virtual ~ThriftHiveMetastore_get_delegation_token_args() throw(); + std::string token_owner; + std::string renewer_kerberos_principal_name; + + _ThriftHiveMetastore_get_delegation_token_args__isset __isset; + + void __set_token_owner(const std::string& val); + + void __set_renewer_kerberos_principal_name(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_delegation_token_args & rhs) const + { + if (!(token_owner == rhs.token_owner)) + return false; + if (!(renewer_kerberos_principal_name == rhs.renewer_kerberos_principal_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_delegation_token_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_delegation_token_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_delegation_token_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_delegation_token_pargs() throw(); + const std::string* token_owner; + const std::string* renewer_kerberos_principal_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_delegation_token_result__isset { + _ThriftHiveMetastore_get_delegation_token_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_delegation_token_result__isset; + +class ThriftHiveMetastore_get_delegation_token_result { + public: + + ThriftHiveMetastore_get_delegation_token_result(const ThriftHiveMetastore_get_delegation_token_result&); + ThriftHiveMetastore_get_delegation_token_result& operator=(const ThriftHiveMetastore_get_delegation_token_result&); + ThriftHiveMetastore_get_delegation_token_result() : success() { + } + + virtual ~ThriftHiveMetastore_get_delegation_token_result() throw(); + std::string success; + MetaException o1; + + _ThriftHiveMetastore_get_delegation_token_result__isset __isset; + + void __set_success(const std::string& val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_delegation_token_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_delegation_token_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_delegation_token_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_delegation_token_presult__isset { + _ThriftHiveMetastore_get_delegation_token_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_delegation_token_presult__isset; + +class ThriftHiveMetastore_get_delegation_token_presult { + public: + + + virtual ~ThriftHiveMetastore_get_delegation_token_presult() throw(); + std::string* success; + MetaException o1; + + _ThriftHiveMetastore_get_delegation_token_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_renew_delegation_token_args__isset { + _ThriftHiveMetastore_renew_delegation_token_args__isset() : token_str_form(false) {} + bool token_str_form :1; +} _ThriftHiveMetastore_renew_delegation_token_args__isset; + +class ThriftHiveMetastore_renew_delegation_token_args { + public: + + ThriftHiveMetastore_renew_delegation_token_args(const ThriftHiveMetastore_renew_delegation_token_args&); + ThriftHiveMetastore_renew_delegation_token_args& operator=(const ThriftHiveMetastore_renew_delegation_token_args&); + ThriftHiveMetastore_renew_delegation_token_args() : token_str_form() { + } + + virtual ~ThriftHiveMetastore_renew_delegation_token_args() throw(); + std::string token_str_form; + + _ThriftHiveMetastore_renew_delegation_token_args__isset __isset; + + void __set_token_str_form(const std::string& val); + + bool operator == (const ThriftHiveMetastore_renew_delegation_token_args & rhs) const + { + if (!(token_str_form == rhs.token_str_form)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_renew_delegation_token_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_renew_delegation_token_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_renew_delegation_token_pargs { + public: + + + virtual ~ThriftHiveMetastore_renew_delegation_token_pargs() throw(); + const std::string* token_str_form; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_renew_delegation_token_result__isset { + _ThriftHiveMetastore_renew_delegation_token_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_renew_delegation_token_result__isset; + +class ThriftHiveMetastore_renew_delegation_token_result { + public: + + ThriftHiveMetastore_renew_delegation_token_result(const ThriftHiveMetastore_renew_delegation_token_result&); + ThriftHiveMetastore_renew_delegation_token_result& operator=(const ThriftHiveMetastore_renew_delegation_token_result&); + ThriftHiveMetastore_renew_delegation_token_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_renew_delegation_token_result() throw(); + int64_t success; + MetaException o1; + + _ThriftHiveMetastore_renew_delegation_token_result__isset __isset; + + void __set_success(const int64_t val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_renew_delegation_token_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_renew_delegation_token_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_renew_delegation_token_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_renew_delegation_token_presult__isset { + _ThriftHiveMetastore_renew_delegation_token_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_renew_delegation_token_presult__isset; + +class ThriftHiveMetastore_renew_delegation_token_presult { + public: + + + virtual ~ThriftHiveMetastore_renew_delegation_token_presult() throw(); + int64_t* success; + MetaException o1; + + _ThriftHiveMetastore_renew_delegation_token_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_cancel_delegation_token_args__isset { + _ThriftHiveMetastore_cancel_delegation_token_args__isset() : token_str_form(false) {} + bool token_str_form :1; +} _ThriftHiveMetastore_cancel_delegation_token_args__isset; + +class ThriftHiveMetastore_cancel_delegation_token_args { + public: + + ThriftHiveMetastore_cancel_delegation_token_args(const ThriftHiveMetastore_cancel_delegation_token_args&); + ThriftHiveMetastore_cancel_delegation_token_args& operator=(const ThriftHiveMetastore_cancel_delegation_token_args&); + ThriftHiveMetastore_cancel_delegation_token_args() : token_str_form() { + } + + virtual ~ThriftHiveMetastore_cancel_delegation_token_args() throw(); + std::string token_str_form; + + _ThriftHiveMetastore_cancel_delegation_token_args__isset __isset; + + void __set_token_str_form(const std::string& val); + + bool operator == (const ThriftHiveMetastore_cancel_delegation_token_args & rhs) const + { + if (!(token_str_form == rhs.token_str_form)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_cancel_delegation_token_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_cancel_delegation_token_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_cancel_delegation_token_pargs { + public: + + + virtual ~ThriftHiveMetastore_cancel_delegation_token_pargs() throw(); + const std::string* token_str_form; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_cancel_delegation_token_result__isset { + _ThriftHiveMetastore_cancel_delegation_token_result__isset() : o1(false) {} + bool o1 :1; +} _ThriftHiveMetastore_cancel_delegation_token_result__isset; + +class ThriftHiveMetastore_cancel_delegation_token_result { + public: + + ThriftHiveMetastore_cancel_delegation_token_result(const ThriftHiveMetastore_cancel_delegation_token_result&); + ThriftHiveMetastore_cancel_delegation_token_result& operator=(const ThriftHiveMetastore_cancel_delegation_token_result&); + ThriftHiveMetastore_cancel_delegation_token_result() { + } + + virtual ~ThriftHiveMetastore_cancel_delegation_token_result() throw(); + MetaException o1; + + _ThriftHiveMetastore_cancel_delegation_token_result__isset __isset; + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_cancel_delegation_token_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_cancel_delegation_token_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_cancel_delegation_token_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_cancel_delegation_token_presult__isset { + _ThriftHiveMetastore_cancel_delegation_token_presult__isset() : o1(false) {} + bool o1 :1; +} _ThriftHiveMetastore_cancel_delegation_token_presult__isset; + +class ThriftHiveMetastore_cancel_delegation_token_presult { + public: + + + virtual ~ThriftHiveMetastore_cancel_delegation_token_presult() throw(); + MetaException o1; + + _ThriftHiveMetastore_cancel_delegation_token_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_token_args__isset { + _ThriftHiveMetastore_add_token_args__isset() : token_identifier(false), delegation_token(false) {} + bool token_identifier :1; + bool delegation_token :1; +} _ThriftHiveMetastore_add_token_args__isset; + +class ThriftHiveMetastore_add_token_args { + public: + + ThriftHiveMetastore_add_token_args(const ThriftHiveMetastore_add_token_args&); + ThriftHiveMetastore_add_token_args& operator=(const ThriftHiveMetastore_add_token_args&); + ThriftHiveMetastore_add_token_args() : token_identifier(), delegation_token() { + } + + virtual ~ThriftHiveMetastore_add_token_args() throw(); + std::string token_identifier; + std::string delegation_token; + + _ThriftHiveMetastore_add_token_args__isset __isset; + + void __set_token_identifier(const std::string& val); + + void __set_delegation_token(const std::string& val); + + bool operator == (const ThriftHiveMetastore_add_token_args & rhs) const + { + if (!(token_identifier == rhs.token_identifier)) + return false; + if (!(delegation_token == rhs.delegation_token)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_token_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_token_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_token_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_token_pargs() throw(); + const std::string* token_identifier; + const std::string* delegation_token; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_token_result__isset { + _ThriftHiveMetastore_add_token_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_add_token_result__isset; + +class ThriftHiveMetastore_add_token_result { + public: + + ThriftHiveMetastore_add_token_result(const ThriftHiveMetastore_add_token_result&); + ThriftHiveMetastore_add_token_result& operator=(const ThriftHiveMetastore_add_token_result&); + ThriftHiveMetastore_add_token_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_add_token_result() throw(); + bool success; + + _ThriftHiveMetastore_add_token_result__isset __isset; + + void __set_success(const bool val); + + bool operator == (const ThriftHiveMetastore_add_token_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_token_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_token_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_token_presult__isset { + _ThriftHiveMetastore_add_token_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_add_token_presult__isset; + +class ThriftHiveMetastore_add_token_presult { + public: + + + virtual ~ThriftHiveMetastore_add_token_presult() throw(); + bool* success; + + _ThriftHiveMetastore_add_token_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_remove_token_args__isset { + _ThriftHiveMetastore_remove_token_args__isset() : token_identifier(false) {} + bool token_identifier :1; +} _ThriftHiveMetastore_remove_token_args__isset; + +class ThriftHiveMetastore_remove_token_args { + public: + + ThriftHiveMetastore_remove_token_args(const ThriftHiveMetastore_remove_token_args&); + ThriftHiveMetastore_remove_token_args& operator=(const ThriftHiveMetastore_remove_token_args&); + ThriftHiveMetastore_remove_token_args() : token_identifier() { + } + + virtual ~ThriftHiveMetastore_remove_token_args() throw(); + std::string token_identifier; + + _ThriftHiveMetastore_remove_token_args__isset __isset; + + void __set_token_identifier(const std::string& val); + + bool operator == (const ThriftHiveMetastore_remove_token_args & rhs) const + { + if (!(token_identifier == rhs.token_identifier)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_remove_token_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_remove_token_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_remove_token_pargs { + public: + + + virtual ~ThriftHiveMetastore_remove_token_pargs() throw(); + const std::string* token_identifier; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_remove_token_result__isset { + _ThriftHiveMetastore_remove_token_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_remove_token_result__isset; + +class ThriftHiveMetastore_remove_token_result { + public: + + ThriftHiveMetastore_remove_token_result(const ThriftHiveMetastore_remove_token_result&); + ThriftHiveMetastore_remove_token_result& operator=(const ThriftHiveMetastore_remove_token_result&); + ThriftHiveMetastore_remove_token_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_remove_token_result() throw(); + bool success; + + _ThriftHiveMetastore_remove_token_result__isset __isset; + + void __set_success(const bool val); + + bool operator == (const ThriftHiveMetastore_remove_token_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_remove_token_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_remove_token_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_remove_token_presult__isset { + _ThriftHiveMetastore_remove_token_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_remove_token_presult__isset; + +class ThriftHiveMetastore_remove_token_presult { + public: + + + virtual ~ThriftHiveMetastore_remove_token_presult() throw(); + bool* success; + + _ThriftHiveMetastore_remove_token_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_token_args__isset { + _ThriftHiveMetastore_get_token_args__isset() : token_identifier(false) {} + bool token_identifier :1; +} _ThriftHiveMetastore_get_token_args__isset; + +class ThriftHiveMetastore_get_token_args { + public: + + ThriftHiveMetastore_get_token_args(const ThriftHiveMetastore_get_token_args&); + ThriftHiveMetastore_get_token_args& operator=(const ThriftHiveMetastore_get_token_args&); + ThriftHiveMetastore_get_token_args() : token_identifier() { + } + + virtual ~ThriftHiveMetastore_get_token_args() throw(); + std::string token_identifier; + + _ThriftHiveMetastore_get_token_args__isset __isset; + + void __set_token_identifier(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_token_args & rhs) const + { + if (!(token_identifier == rhs.token_identifier)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_token_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_token_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_token_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_token_pargs() throw(); + const std::string* token_identifier; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_token_result__isset { + _ThriftHiveMetastore_get_token_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_token_result__isset; + +class ThriftHiveMetastore_get_token_result { + public: + + ThriftHiveMetastore_get_token_result(const ThriftHiveMetastore_get_token_result&); + ThriftHiveMetastore_get_token_result& operator=(const ThriftHiveMetastore_get_token_result&); + ThriftHiveMetastore_get_token_result() : success() { + } + + virtual ~ThriftHiveMetastore_get_token_result() throw(); + std::string success; + + _ThriftHiveMetastore_get_token_result__isset __isset; + + void __set_success(const std::string& val); + + bool operator == (const ThriftHiveMetastore_get_token_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_token_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_token_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_token_presult__isset { + _ThriftHiveMetastore_get_token_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_token_presult__isset; + +class ThriftHiveMetastore_get_token_presult { + public: + + + virtual ~ThriftHiveMetastore_get_token_presult() throw(); + std::string* success; + + _ThriftHiveMetastore_get_token_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_get_all_token_identifiers_args { + public: + + ThriftHiveMetastore_get_all_token_identifiers_args(const ThriftHiveMetastore_get_all_token_identifiers_args&); + ThriftHiveMetastore_get_all_token_identifiers_args& operator=(const ThriftHiveMetastore_get_all_token_identifiers_args&); + ThriftHiveMetastore_get_all_token_identifiers_args() { + } + + virtual ~ThriftHiveMetastore_get_all_token_identifiers_args() throw(); + + bool operator == (const ThriftHiveMetastore_get_all_token_identifiers_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_token_identifiers_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_all_token_identifiers_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_all_token_identifiers_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_all_token_identifiers_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_all_token_identifiers_result__isset { + _ThriftHiveMetastore_get_all_token_identifiers_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_all_token_identifiers_result__isset; + +class ThriftHiveMetastore_get_all_token_identifiers_result { + public: + + ThriftHiveMetastore_get_all_token_identifiers_result(const ThriftHiveMetastore_get_all_token_identifiers_result&); + ThriftHiveMetastore_get_all_token_identifiers_result& operator=(const ThriftHiveMetastore_get_all_token_identifiers_result&); + ThriftHiveMetastore_get_all_token_identifiers_result() { + } + + virtual ~ThriftHiveMetastore_get_all_token_identifiers_result() throw(); + std::vector success; + + _ThriftHiveMetastore_get_all_token_identifiers_result__isset __isset; + + void __set_success(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_get_all_token_identifiers_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_all_token_identifiers_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_all_token_identifiers_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_all_token_identifiers_presult__isset { + _ThriftHiveMetastore_get_all_token_identifiers_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_all_token_identifiers_presult__isset; + +class ThriftHiveMetastore_get_all_token_identifiers_presult { + public: + + + virtual ~ThriftHiveMetastore_get_all_token_identifiers_presult() throw(); + std::vector * success; + + _ThriftHiveMetastore_get_all_token_identifiers_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_master_key_args__isset { + _ThriftHiveMetastore_add_master_key_args__isset() : key(false) {} + bool key :1; +} _ThriftHiveMetastore_add_master_key_args__isset; + +class ThriftHiveMetastore_add_master_key_args { + public: + + ThriftHiveMetastore_add_master_key_args(const ThriftHiveMetastore_add_master_key_args&); + ThriftHiveMetastore_add_master_key_args& operator=(const ThriftHiveMetastore_add_master_key_args&); + ThriftHiveMetastore_add_master_key_args() : key() { + } + + virtual ~ThriftHiveMetastore_add_master_key_args() throw(); + std::string key; + + _ThriftHiveMetastore_add_master_key_args__isset __isset; + + void __set_key(const std::string& val); + + bool operator == (const ThriftHiveMetastore_add_master_key_args & rhs) const + { + if (!(key == rhs.key)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_master_key_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_master_key_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_master_key_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_master_key_pargs() throw(); + const std::string* key; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_master_key_result__isset { + _ThriftHiveMetastore_add_master_key_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_add_master_key_result__isset; + +class ThriftHiveMetastore_add_master_key_result { + public: + + ThriftHiveMetastore_add_master_key_result(const ThriftHiveMetastore_add_master_key_result&); + ThriftHiveMetastore_add_master_key_result& operator=(const ThriftHiveMetastore_add_master_key_result&); + ThriftHiveMetastore_add_master_key_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_add_master_key_result() throw(); + int32_t success; + MetaException o1; + + _ThriftHiveMetastore_add_master_key_result__isset __isset; + + void __set_success(const int32_t val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_add_master_key_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_master_key_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_master_key_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_master_key_presult__isset { + _ThriftHiveMetastore_add_master_key_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_add_master_key_presult__isset; + +class ThriftHiveMetastore_add_master_key_presult { + public: + + + virtual ~ThriftHiveMetastore_add_master_key_presult() throw(); + int32_t* success; + MetaException o1; + + _ThriftHiveMetastore_add_master_key_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_update_master_key_args__isset { + _ThriftHiveMetastore_update_master_key_args__isset() : seq_number(false), key(false) {} + bool seq_number :1; + bool key :1; +} _ThriftHiveMetastore_update_master_key_args__isset; + +class ThriftHiveMetastore_update_master_key_args { + public: + + ThriftHiveMetastore_update_master_key_args(const ThriftHiveMetastore_update_master_key_args&); + ThriftHiveMetastore_update_master_key_args& operator=(const ThriftHiveMetastore_update_master_key_args&); + ThriftHiveMetastore_update_master_key_args() : seq_number(0), key() { + } + + virtual ~ThriftHiveMetastore_update_master_key_args() throw(); + int32_t seq_number; + std::string key; + + _ThriftHiveMetastore_update_master_key_args__isset __isset; + + void __set_seq_number(const int32_t val); + + void __set_key(const std::string& val); + + bool operator == (const ThriftHiveMetastore_update_master_key_args & rhs) const + { + if (!(seq_number == rhs.seq_number)) + return false; + if (!(key == rhs.key)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_update_master_key_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_update_master_key_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_update_master_key_pargs { + public: + + + virtual ~ThriftHiveMetastore_update_master_key_pargs() throw(); + const int32_t* seq_number; + const std::string* key; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_update_master_key_result__isset { + _ThriftHiveMetastore_update_master_key_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_update_master_key_result__isset; + +class ThriftHiveMetastore_update_master_key_result { + public: + + ThriftHiveMetastore_update_master_key_result(const ThriftHiveMetastore_update_master_key_result&); + ThriftHiveMetastore_update_master_key_result& operator=(const ThriftHiveMetastore_update_master_key_result&); + ThriftHiveMetastore_update_master_key_result() { + } + + virtual ~ThriftHiveMetastore_update_master_key_result() throw(); + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_update_master_key_result__isset __isset; + + void __set_o1(const NoSuchObjectException& val); + + void __set_o2(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_update_master_key_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_update_master_key_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_update_master_key_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_update_master_key_presult__isset { + _ThriftHiveMetastore_update_master_key_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_update_master_key_presult__isset; + +class ThriftHiveMetastore_update_master_key_presult { + public: + + + virtual ~ThriftHiveMetastore_update_master_key_presult() throw(); + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_update_master_key_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_remove_master_key_args__isset { + _ThriftHiveMetastore_remove_master_key_args__isset() : key_seq(false) {} + bool key_seq :1; +} _ThriftHiveMetastore_remove_master_key_args__isset; + +class ThriftHiveMetastore_remove_master_key_args { + public: + + ThriftHiveMetastore_remove_master_key_args(const ThriftHiveMetastore_remove_master_key_args&); + ThriftHiveMetastore_remove_master_key_args& operator=(const ThriftHiveMetastore_remove_master_key_args&); + ThriftHiveMetastore_remove_master_key_args() : key_seq(0) { + } + + virtual ~ThriftHiveMetastore_remove_master_key_args() throw(); + int32_t key_seq; + + _ThriftHiveMetastore_remove_master_key_args__isset __isset; + + void __set_key_seq(const int32_t val); + + bool operator == (const ThriftHiveMetastore_remove_master_key_args & rhs) const + { + if (!(key_seq == rhs.key_seq)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_remove_master_key_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_remove_master_key_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_remove_master_key_pargs { + public: + + + virtual ~ThriftHiveMetastore_remove_master_key_pargs() throw(); + const int32_t* key_seq; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_remove_master_key_result__isset { + _ThriftHiveMetastore_remove_master_key_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_remove_master_key_result__isset; + +class ThriftHiveMetastore_remove_master_key_result { + public: + + ThriftHiveMetastore_remove_master_key_result(const ThriftHiveMetastore_remove_master_key_result&); + ThriftHiveMetastore_remove_master_key_result& operator=(const ThriftHiveMetastore_remove_master_key_result&); + ThriftHiveMetastore_remove_master_key_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_remove_master_key_result() throw(); + bool success; + + _ThriftHiveMetastore_remove_master_key_result__isset __isset; + + void __set_success(const bool val); + + bool operator == (const ThriftHiveMetastore_remove_master_key_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_remove_master_key_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_remove_master_key_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_remove_master_key_presult__isset { + _ThriftHiveMetastore_remove_master_key_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_remove_master_key_presult__isset; + +class ThriftHiveMetastore_remove_master_key_presult { + public: + + + virtual ~ThriftHiveMetastore_remove_master_key_presult() throw(); + bool* success; + + _ThriftHiveMetastore_remove_master_key_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_get_master_keys_args { + public: + + ThriftHiveMetastore_get_master_keys_args(const ThriftHiveMetastore_get_master_keys_args&); + ThriftHiveMetastore_get_master_keys_args& operator=(const ThriftHiveMetastore_get_master_keys_args&); + ThriftHiveMetastore_get_master_keys_args() { + } + + virtual ~ThriftHiveMetastore_get_master_keys_args() throw(); + + bool operator == (const ThriftHiveMetastore_get_master_keys_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_master_keys_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_master_keys_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_master_keys_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_master_keys_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_master_keys_result__isset { + _ThriftHiveMetastore_get_master_keys_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_master_keys_result__isset; + +class ThriftHiveMetastore_get_master_keys_result { + public: + + ThriftHiveMetastore_get_master_keys_result(const ThriftHiveMetastore_get_master_keys_result&); + ThriftHiveMetastore_get_master_keys_result& operator=(const ThriftHiveMetastore_get_master_keys_result&); + ThriftHiveMetastore_get_master_keys_result() { + } + + virtual ~ThriftHiveMetastore_get_master_keys_result() throw(); + std::vector success; + + _ThriftHiveMetastore_get_master_keys_result__isset __isset; + + void __set_success(const std::vector & val); + + bool operator == (const ThriftHiveMetastore_get_master_keys_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_master_keys_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_master_keys_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_master_keys_presult__isset { + _ThriftHiveMetastore_get_master_keys_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_master_keys_presult__isset; + +class ThriftHiveMetastore_get_master_keys_presult { + public: + + + virtual ~ThriftHiveMetastore_get_master_keys_presult() throw(); + std::vector * success; + + _ThriftHiveMetastore_get_master_keys_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_get_open_txns_args { + public: + + ThriftHiveMetastore_get_open_txns_args(const ThriftHiveMetastore_get_open_txns_args&); + ThriftHiveMetastore_get_open_txns_args& operator=(const ThriftHiveMetastore_get_open_txns_args&); + ThriftHiveMetastore_get_open_txns_args() { + } + + virtual ~ThriftHiveMetastore_get_open_txns_args() throw(); + + bool operator == (const ThriftHiveMetastore_get_open_txns_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_open_txns_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_open_txns_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_open_txns_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_open_txns_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_open_txns_result__isset { + _ThriftHiveMetastore_get_open_txns_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_open_txns_result__isset; + +class ThriftHiveMetastore_get_open_txns_result { + public: + + ThriftHiveMetastore_get_open_txns_result(const ThriftHiveMetastore_get_open_txns_result&); + ThriftHiveMetastore_get_open_txns_result& operator=(const ThriftHiveMetastore_get_open_txns_result&); + ThriftHiveMetastore_get_open_txns_result() { + } + + virtual ~ThriftHiveMetastore_get_open_txns_result() throw(); + GetOpenTxnsResponse success; + + _ThriftHiveMetastore_get_open_txns_result__isset __isset; + + void __set_success(const GetOpenTxnsResponse& val); + + bool operator == (const ThriftHiveMetastore_get_open_txns_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_open_txns_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_open_txns_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_open_txns_presult__isset { + _ThriftHiveMetastore_get_open_txns_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_open_txns_presult__isset; + +class ThriftHiveMetastore_get_open_txns_presult { + public: + + + virtual ~ThriftHiveMetastore_get_open_txns_presult() throw(); + GetOpenTxnsResponse* success; + + _ThriftHiveMetastore_get_open_txns_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_get_open_txns_info_args { + public: + + ThriftHiveMetastore_get_open_txns_info_args(const ThriftHiveMetastore_get_open_txns_info_args&); + ThriftHiveMetastore_get_open_txns_info_args& operator=(const ThriftHiveMetastore_get_open_txns_info_args&); + ThriftHiveMetastore_get_open_txns_info_args() { + } + + virtual ~ThriftHiveMetastore_get_open_txns_info_args() throw(); + + bool operator == (const ThriftHiveMetastore_get_open_txns_info_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_open_txns_info_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_open_txns_info_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_open_txns_info_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_open_txns_info_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_open_txns_info_result__isset { + _ThriftHiveMetastore_get_open_txns_info_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_open_txns_info_result__isset; + +class ThriftHiveMetastore_get_open_txns_info_result { + public: + + ThriftHiveMetastore_get_open_txns_info_result(const ThriftHiveMetastore_get_open_txns_info_result&); + ThriftHiveMetastore_get_open_txns_info_result& operator=(const ThriftHiveMetastore_get_open_txns_info_result&); + ThriftHiveMetastore_get_open_txns_info_result() { + } + + virtual ~ThriftHiveMetastore_get_open_txns_info_result() throw(); + GetOpenTxnsInfoResponse success; + + _ThriftHiveMetastore_get_open_txns_info_result__isset __isset; + + void __set_success(const GetOpenTxnsInfoResponse& val); + + bool operator == (const ThriftHiveMetastore_get_open_txns_info_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_open_txns_info_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_open_txns_info_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_open_txns_info_presult__isset { + _ThriftHiveMetastore_get_open_txns_info_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_open_txns_info_presult__isset; + +class ThriftHiveMetastore_get_open_txns_info_presult { + public: + + + virtual ~ThriftHiveMetastore_get_open_txns_info_presult() throw(); + GetOpenTxnsInfoResponse* success; + + _ThriftHiveMetastore_get_open_txns_info_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_open_txns_args__isset { + _ThriftHiveMetastore_open_txns_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_open_txns_args__isset; + +class ThriftHiveMetastore_open_txns_args { + public: + + ThriftHiveMetastore_open_txns_args(const ThriftHiveMetastore_open_txns_args&); + ThriftHiveMetastore_open_txns_args& operator=(const ThriftHiveMetastore_open_txns_args&); + ThriftHiveMetastore_open_txns_args() { + } + + virtual ~ThriftHiveMetastore_open_txns_args() throw(); + OpenTxnRequest rqst; + + _ThriftHiveMetastore_open_txns_args__isset __isset; + + void __set_rqst(const OpenTxnRequest& val); + + bool operator == (const ThriftHiveMetastore_open_txns_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_open_txns_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_open_txns_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_open_txns_pargs { + public: + + + virtual ~ThriftHiveMetastore_open_txns_pargs() throw(); + const OpenTxnRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_open_txns_result__isset { + _ThriftHiveMetastore_open_txns_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_open_txns_result__isset; + +class ThriftHiveMetastore_open_txns_result { + public: + + ThriftHiveMetastore_open_txns_result(const ThriftHiveMetastore_open_txns_result&); + ThriftHiveMetastore_open_txns_result& operator=(const ThriftHiveMetastore_open_txns_result&); + ThriftHiveMetastore_open_txns_result() { + } + + virtual ~ThriftHiveMetastore_open_txns_result() throw(); + OpenTxnsResponse success; + + _ThriftHiveMetastore_open_txns_result__isset __isset; + + void __set_success(const OpenTxnsResponse& val); + + bool operator == (const ThriftHiveMetastore_open_txns_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_open_txns_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_open_txns_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_open_txns_presult__isset { + _ThriftHiveMetastore_open_txns_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_open_txns_presult__isset; + +class ThriftHiveMetastore_open_txns_presult { + public: + + + virtual ~ThriftHiveMetastore_open_txns_presult() throw(); + OpenTxnsResponse* success; + + _ThriftHiveMetastore_open_txns_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_abort_txn_args__isset { + _ThriftHiveMetastore_abort_txn_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_abort_txn_args__isset; + +class ThriftHiveMetastore_abort_txn_args { + public: + + ThriftHiveMetastore_abort_txn_args(const ThriftHiveMetastore_abort_txn_args&); + ThriftHiveMetastore_abort_txn_args& operator=(const ThriftHiveMetastore_abort_txn_args&); + ThriftHiveMetastore_abort_txn_args() { + } + + virtual ~ThriftHiveMetastore_abort_txn_args() throw(); + AbortTxnRequest rqst; + + _ThriftHiveMetastore_abort_txn_args__isset __isset; + + void __set_rqst(const AbortTxnRequest& val); + + bool operator == (const ThriftHiveMetastore_abort_txn_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_abort_txn_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_abort_txn_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_abort_txn_pargs { + public: + + + virtual ~ThriftHiveMetastore_abort_txn_pargs() throw(); + const AbortTxnRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_abort_txn_result__isset { + _ThriftHiveMetastore_abort_txn_result__isset() : o1(false) {} + bool o1 :1; +} _ThriftHiveMetastore_abort_txn_result__isset; + +class ThriftHiveMetastore_abort_txn_result { + public: + + ThriftHiveMetastore_abort_txn_result(const ThriftHiveMetastore_abort_txn_result&); + ThriftHiveMetastore_abort_txn_result& operator=(const ThriftHiveMetastore_abort_txn_result&); + ThriftHiveMetastore_abort_txn_result() { + } + + virtual ~ThriftHiveMetastore_abort_txn_result() throw(); + NoSuchTxnException o1; + + _ThriftHiveMetastore_abort_txn_result__isset __isset; + + void __set_o1(const NoSuchTxnException& val); + + bool operator == (const ThriftHiveMetastore_abort_txn_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_abort_txn_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_abort_txn_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_abort_txn_presult__isset { + _ThriftHiveMetastore_abort_txn_presult__isset() : o1(false) {} + bool o1 :1; +} _ThriftHiveMetastore_abort_txn_presult__isset; + +class ThriftHiveMetastore_abort_txn_presult { + public: + + + virtual ~ThriftHiveMetastore_abort_txn_presult() throw(); + NoSuchTxnException o1; + + _ThriftHiveMetastore_abort_txn_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_abort_txns_args__isset { + _ThriftHiveMetastore_abort_txns_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_abort_txns_args__isset; + +class ThriftHiveMetastore_abort_txns_args { + public: + + ThriftHiveMetastore_abort_txns_args(const ThriftHiveMetastore_abort_txns_args&); + ThriftHiveMetastore_abort_txns_args& operator=(const ThriftHiveMetastore_abort_txns_args&); + ThriftHiveMetastore_abort_txns_args() { + } + + virtual ~ThriftHiveMetastore_abort_txns_args() throw(); + AbortTxnsRequest rqst; + + _ThriftHiveMetastore_abort_txns_args__isset __isset; + + void __set_rqst(const AbortTxnsRequest& val); + + bool operator == (const ThriftHiveMetastore_abort_txns_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_abort_txns_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_abort_txns_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_abort_txns_pargs { + public: + + + virtual ~ThriftHiveMetastore_abort_txns_pargs() throw(); + const AbortTxnsRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_abort_txns_result__isset { + _ThriftHiveMetastore_abort_txns_result__isset() : o1(false) {} + bool o1 :1; +} _ThriftHiveMetastore_abort_txns_result__isset; + +class ThriftHiveMetastore_abort_txns_result { + public: + + ThriftHiveMetastore_abort_txns_result(const ThriftHiveMetastore_abort_txns_result&); + ThriftHiveMetastore_abort_txns_result& operator=(const ThriftHiveMetastore_abort_txns_result&); + ThriftHiveMetastore_abort_txns_result() { + } + + virtual ~ThriftHiveMetastore_abort_txns_result() throw(); + NoSuchTxnException o1; + + _ThriftHiveMetastore_abort_txns_result__isset __isset; + + void __set_o1(const NoSuchTxnException& val); + + bool operator == (const ThriftHiveMetastore_abort_txns_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_abort_txns_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_abort_txns_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_abort_txns_presult__isset { + _ThriftHiveMetastore_abort_txns_presult__isset() : o1(false) {} + bool o1 :1; +} _ThriftHiveMetastore_abort_txns_presult__isset; + +class ThriftHiveMetastore_abort_txns_presult { + public: + + + virtual ~ThriftHiveMetastore_abort_txns_presult() throw(); + NoSuchTxnException o1; + + _ThriftHiveMetastore_abort_txns_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_commit_txn_args__isset { + _ThriftHiveMetastore_commit_txn_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_commit_txn_args__isset; + +class ThriftHiveMetastore_commit_txn_args { + public: + + ThriftHiveMetastore_commit_txn_args(const ThriftHiveMetastore_commit_txn_args&); + ThriftHiveMetastore_commit_txn_args& operator=(const ThriftHiveMetastore_commit_txn_args&); + ThriftHiveMetastore_commit_txn_args() { + } + + virtual ~ThriftHiveMetastore_commit_txn_args() throw(); + CommitTxnRequest rqst; + + _ThriftHiveMetastore_commit_txn_args__isset __isset; + + void __set_rqst(const CommitTxnRequest& val); + + bool operator == (const ThriftHiveMetastore_commit_txn_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_commit_txn_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_commit_txn_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_commit_txn_pargs { + public: + + + virtual ~ThriftHiveMetastore_commit_txn_pargs() throw(); + const CommitTxnRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_commit_txn_result__isset { + _ThriftHiveMetastore_commit_txn_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_commit_txn_result__isset; + +class ThriftHiveMetastore_commit_txn_result { + public: + + ThriftHiveMetastore_commit_txn_result(const ThriftHiveMetastore_commit_txn_result&); + ThriftHiveMetastore_commit_txn_result& operator=(const ThriftHiveMetastore_commit_txn_result&); + ThriftHiveMetastore_commit_txn_result() { + } + + virtual ~ThriftHiveMetastore_commit_txn_result() throw(); + NoSuchTxnException o1; + TxnAbortedException o2; + + _ThriftHiveMetastore_commit_txn_result__isset __isset; + + void __set_o1(const NoSuchTxnException& val); + + void __set_o2(const TxnAbortedException& val); + + bool operator == (const ThriftHiveMetastore_commit_txn_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_commit_txn_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_commit_txn_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_commit_txn_presult__isset { + _ThriftHiveMetastore_commit_txn_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_commit_txn_presult__isset; + +class ThriftHiveMetastore_commit_txn_presult { + public: + + + virtual ~ThriftHiveMetastore_commit_txn_presult() throw(); + NoSuchTxnException o1; + TxnAbortedException o2; + + _ThriftHiveMetastore_commit_txn_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_lock_args__isset { + _ThriftHiveMetastore_lock_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_lock_args__isset; + +class ThriftHiveMetastore_lock_args { + public: + + ThriftHiveMetastore_lock_args(const ThriftHiveMetastore_lock_args&); + ThriftHiveMetastore_lock_args& operator=(const ThriftHiveMetastore_lock_args&); + ThriftHiveMetastore_lock_args() { + } + + virtual ~ThriftHiveMetastore_lock_args() throw(); + LockRequest rqst; + + _ThriftHiveMetastore_lock_args__isset __isset; + + void __set_rqst(const LockRequest& val); + + bool operator == (const ThriftHiveMetastore_lock_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_lock_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_lock_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_lock_pargs { + public: + + + virtual ~ThriftHiveMetastore_lock_pargs() throw(); + const LockRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_lock_result__isset { + _ThriftHiveMetastore_lock_result__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_lock_result__isset; + +class ThriftHiveMetastore_lock_result { + public: + + ThriftHiveMetastore_lock_result(const ThriftHiveMetastore_lock_result&); + ThriftHiveMetastore_lock_result& operator=(const ThriftHiveMetastore_lock_result&); + ThriftHiveMetastore_lock_result() { + } + + virtual ~ThriftHiveMetastore_lock_result() throw(); + LockResponse success; + NoSuchTxnException o1; + TxnAbortedException o2; + + _ThriftHiveMetastore_lock_result__isset __isset; + + void __set_success(const LockResponse& val); + + void __set_o1(const NoSuchTxnException& val); + + void __set_o2(const TxnAbortedException& val); + + bool operator == (const ThriftHiveMetastore_lock_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_lock_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_lock_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_lock_presult__isset { + _ThriftHiveMetastore_lock_presult__isset() : success(false), o1(false), o2(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_lock_presult__isset; + +class ThriftHiveMetastore_lock_presult { + public: + + + virtual ~ThriftHiveMetastore_lock_presult() throw(); + LockResponse* success; + NoSuchTxnException o1; + TxnAbortedException o2; + + _ThriftHiveMetastore_lock_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_check_lock_args__isset { + _ThriftHiveMetastore_check_lock_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_check_lock_args__isset; + +class ThriftHiveMetastore_check_lock_args { + public: + + ThriftHiveMetastore_check_lock_args(const ThriftHiveMetastore_check_lock_args&); + ThriftHiveMetastore_check_lock_args& operator=(const ThriftHiveMetastore_check_lock_args&); + ThriftHiveMetastore_check_lock_args() { + } + + virtual ~ThriftHiveMetastore_check_lock_args() throw(); + CheckLockRequest rqst; + + _ThriftHiveMetastore_check_lock_args__isset __isset; + + void __set_rqst(const CheckLockRequest& val); + + bool operator == (const ThriftHiveMetastore_check_lock_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_check_lock_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_check_lock_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_check_lock_pargs { + public: + + + virtual ~ThriftHiveMetastore_check_lock_pargs() throw(); + const CheckLockRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_check_lock_result__isset { + _ThriftHiveMetastore_check_lock_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_check_lock_result__isset; + +class ThriftHiveMetastore_check_lock_result { + public: + + ThriftHiveMetastore_check_lock_result(const ThriftHiveMetastore_check_lock_result&); + ThriftHiveMetastore_check_lock_result& operator=(const ThriftHiveMetastore_check_lock_result&); + ThriftHiveMetastore_check_lock_result() { + } + + virtual ~ThriftHiveMetastore_check_lock_result() throw(); + LockResponse success; + NoSuchTxnException o1; + TxnAbortedException o2; + NoSuchLockException o3; + + _ThriftHiveMetastore_check_lock_result__isset __isset; + + void __set_success(const LockResponse& val); + + void __set_o1(const NoSuchTxnException& val); + + void __set_o2(const TxnAbortedException& val); + + void __set_o3(const NoSuchLockException& val); + + bool operator == (const ThriftHiveMetastore_check_lock_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_check_lock_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_check_lock_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_check_lock_presult__isset { + _ThriftHiveMetastore_check_lock_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success :1; + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_check_lock_presult__isset; + +class ThriftHiveMetastore_check_lock_presult { + public: + + + virtual ~ThriftHiveMetastore_check_lock_presult() throw(); + LockResponse* success; + NoSuchTxnException o1; + TxnAbortedException o2; + NoSuchLockException o3; + + _ThriftHiveMetastore_check_lock_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_unlock_args__isset { + _ThriftHiveMetastore_unlock_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_unlock_args__isset; + +class ThriftHiveMetastore_unlock_args { + public: + + ThriftHiveMetastore_unlock_args(const ThriftHiveMetastore_unlock_args&); + ThriftHiveMetastore_unlock_args& operator=(const ThriftHiveMetastore_unlock_args&); + ThriftHiveMetastore_unlock_args() { + } + + virtual ~ThriftHiveMetastore_unlock_args() throw(); + UnlockRequest rqst; + + _ThriftHiveMetastore_unlock_args__isset __isset; + + void __set_rqst(const UnlockRequest& val); + + bool operator == (const ThriftHiveMetastore_unlock_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_unlock_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_unlock_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_unlock_pargs { + public: + + + virtual ~ThriftHiveMetastore_unlock_pargs() throw(); + const UnlockRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_unlock_result__isset { + _ThriftHiveMetastore_unlock_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_unlock_result__isset; + +class ThriftHiveMetastore_unlock_result { + public: + + ThriftHiveMetastore_unlock_result(const ThriftHiveMetastore_unlock_result&); + ThriftHiveMetastore_unlock_result& operator=(const ThriftHiveMetastore_unlock_result&); + ThriftHiveMetastore_unlock_result() { + } + + virtual ~ThriftHiveMetastore_unlock_result() throw(); + NoSuchLockException o1; + TxnOpenException o2; + + _ThriftHiveMetastore_unlock_result__isset __isset; + + void __set_o1(const NoSuchLockException& val); + + void __set_o2(const TxnOpenException& val); + + bool operator == (const ThriftHiveMetastore_unlock_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_unlock_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_unlock_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_unlock_presult__isset { + _ThriftHiveMetastore_unlock_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_unlock_presult__isset; + +class ThriftHiveMetastore_unlock_presult { + public: + + + virtual ~ThriftHiveMetastore_unlock_presult() throw(); + NoSuchLockException o1; + TxnOpenException o2; + + _ThriftHiveMetastore_unlock_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_show_locks_args__isset { + _ThriftHiveMetastore_show_locks_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_show_locks_args__isset; + +class ThriftHiveMetastore_show_locks_args { + public: + + ThriftHiveMetastore_show_locks_args(const ThriftHiveMetastore_show_locks_args&); + ThriftHiveMetastore_show_locks_args& operator=(const ThriftHiveMetastore_show_locks_args&); + ThriftHiveMetastore_show_locks_args() { + } + + virtual ~ThriftHiveMetastore_show_locks_args() throw(); + ShowLocksRequest rqst; + + _ThriftHiveMetastore_show_locks_args__isset __isset; + + void __set_rqst(const ShowLocksRequest& val); + + bool operator == (const ThriftHiveMetastore_show_locks_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_show_locks_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_show_locks_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_show_locks_pargs { + public: + + + virtual ~ThriftHiveMetastore_show_locks_pargs() throw(); + const ShowLocksRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_show_locks_result__isset { + _ThriftHiveMetastore_show_locks_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_show_locks_result__isset; + +class ThriftHiveMetastore_show_locks_result { + public: + + ThriftHiveMetastore_show_locks_result(const ThriftHiveMetastore_show_locks_result&); + ThriftHiveMetastore_show_locks_result& operator=(const ThriftHiveMetastore_show_locks_result&); + ThriftHiveMetastore_show_locks_result() { + } + + virtual ~ThriftHiveMetastore_show_locks_result() throw(); + ShowLocksResponse success; + + _ThriftHiveMetastore_show_locks_result__isset __isset; + + void __set_success(const ShowLocksResponse& val); + + bool operator == (const ThriftHiveMetastore_show_locks_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_show_locks_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_show_locks_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_show_locks_presult__isset { + _ThriftHiveMetastore_show_locks_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_show_locks_presult__isset; + +class ThriftHiveMetastore_show_locks_presult { + public: + + + virtual ~ThriftHiveMetastore_show_locks_presult() throw(); + ShowLocksResponse* success; + + _ThriftHiveMetastore_show_locks_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_heartbeat_args__isset { + _ThriftHiveMetastore_heartbeat_args__isset() : ids(false) {} + bool ids :1; +} _ThriftHiveMetastore_heartbeat_args__isset; + +class ThriftHiveMetastore_heartbeat_args { + public: + + ThriftHiveMetastore_heartbeat_args(const ThriftHiveMetastore_heartbeat_args&); + ThriftHiveMetastore_heartbeat_args& operator=(const ThriftHiveMetastore_heartbeat_args&); + ThriftHiveMetastore_heartbeat_args() { + } + + virtual ~ThriftHiveMetastore_heartbeat_args() throw(); + HeartbeatRequest ids; + + _ThriftHiveMetastore_heartbeat_args__isset __isset; + + void __set_ids(const HeartbeatRequest& val); + + bool operator == (const ThriftHiveMetastore_heartbeat_args & rhs) const + { + if (!(ids == rhs.ids)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_heartbeat_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_heartbeat_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_heartbeat_pargs { + public: + + + virtual ~ThriftHiveMetastore_heartbeat_pargs() throw(); + const HeartbeatRequest* ids; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_heartbeat_result__isset { + _ThriftHiveMetastore_heartbeat_result__isset() : o1(false), o2(false), o3(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_heartbeat_result__isset; + +class ThriftHiveMetastore_heartbeat_result { + public: + + ThriftHiveMetastore_heartbeat_result(const ThriftHiveMetastore_heartbeat_result&); + ThriftHiveMetastore_heartbeat_result& operator=(const ThriftHiveMetastore_heartbeat_result&); + ThriftHiveMetastore_heartbeat_result() { + } + + virtual ~ThriftHiveMetastore_heartbeat_result() throw(); + NoSuchLockException o1; + NoSuchTxnException o2; + TxnAbortedException o3; + + _ThriftHiveMetastore_heartbeat_result__isset __isset; + + void __set_o1(const NoSuchLockException& val); + + void __set_o2(const NoSuchTxnException& val); + + void __set_o3(const TxnAbortedException& val); + + bool operator == (const ThriftHiveMetastore_heartbeat_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_heartbeat_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_heartbeat_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_heartbeat_presult__isset { + _ThriftHiveMetastore_heartbeat_presult__isset() : o1(false), o2(false), o3(false) {} + bool o1 :1; + bool o2 :1; + bool o3 :1; +} _ThriftHiveMetastore_heartbeat_presult__isset; + +class ThriftHiveMetastore_heartbeat_presult { + public: + + + virtual ~ThriftHiveMetastore_heartbeat_presult() throw(); + NoSuchLockException o1; + NoSuchTxnException o2; + TxnAbortedException o3; + + _ThriftHiveMetastore_heartbeat_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_heartbeat_txn_range_args__isset { + _ThriftHiveMetastore_heartbeat_txn_range_args__isset() : txns(false) {} + bool txns :1; +} _ThriftHiveMetastore_heartbeat_txn_range_args__isset; + +class ThriftHiveMetastore_heartbeat_txn_range_args { + public: + + ThriftHiveMetastore_heartbeat_txn_range_args(const ThriftHiveMetastore_heartbeat_txn_range_args&); + ThriftHiveMetastore_heartbeat_txn_range_args& operator=(const ThriftHiveMetastore_heartbeat_txn_range_args&); + ThriftHiveMetastore_heartbeat_txn_range_args() { + } + + virtual ~ThriftHiveMetastore_heartbeat_txn_range_args() throw(); + HeartbeatTxnRangeRequest txns; + + _ThriftHiveMetastore_heartbeat_txn_range_args__isset __isset; + + void __set_txns(const HeartbeatTxnRangeRequest& val); + + bool operator == (const ThriftHiveMetastore_heartbeat_txn_range_args & rhs) const + { + if (!(txns == rhs.txns)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_heartbeat_txn_range_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_heartbeat_txn_range_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_heartbeat_txn_range_pargs { + public: + + + virtual ~ThriftHiveMetastore_heartbeat_txn_range_pargs() throw(); + const HeartbeatTxnRangeRequest* txns; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_heartbeat_txn_range_result__isset { + _ThriftHiveMetastore_heartbeat_txn_range_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_heartbeat_txn_range_result__isset; + +class ThriftHiveMetastore_heartbeat_txn_range_result { + public: + + ThriftHiveMetastore_heartbeat_txn_range_result(const ThriftHiveMetastore_heartbeat_txn_range_result&); + ThriftHiveMetastore_heartbeat_txn_range_result& operator=(const ThriftHiveMetastore_heartbeat_txn_range_result&); + ThriftHiveMetastore_heartbeat_txn_range_result() { + } + + virtual ~ThriftHiveMetastore_heartbeat_txn_range_result() throw(); + HeartbeatTxnRangeResponse success; + + _ThriftHiveMetastore_heartbeat_txn_range_result__isset __isset; + + void __set_success(const HeartbeatTxnRangeResponse& val); + + bool operator == (const ThriftHiveMetastore_heartbeat_txn_range_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_heartbeat_txn_range_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_heartbeat_txn_range_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_heartbeat_txn_range_presult__isset { + _ThriftHiveMetastore_heartbeat_txn_range_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_heartbeat_txn_range_presult__isset; + +class ThriftHiveMetastore_heartbeat_txn_range_presult { + public: + + + virtual ~ThriftHiveMetastore_heartbeat_txn_range_presult() throw(); + HeartbeatTxnRangeResponse* success; + + _ThriftHiveMetastore_heartbeat_txn_range_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_compact_args__isset { + _ThriftHiveMetastore_compact_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_compact_args__isset; + +class ThriftHiveMetastore_compact_args { + public: + + ThriftHiveMetastore_compact_args(const ThriftHiveMetastore_compact_args&); + ThriftHiveMetastore_compact_args& operator=(const ThriftHiveMetastore_compact_args&); + ThriftHiveMetastore_compact_args() { + } + + virtual ~ThriftHiveMetastore_compact_args() throw(); + CompactionRequest rqst; + + _ThriftHiveMetastore_compact_args__isset __isset; + + void __set_rqst(const CompactionRequest& val); + + bool operator == (const ThriftHiveMetastore_compact_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_compact_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_compact_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_compact_pargs { + public: + + + virtual ~ThriftHiveMetastore_compact_pargs() throw(); + const CompactionRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_compact_result { + public: + + ThriftHiveMetastore_compact_result(const ThriftHiveMetastore_compact_result&); + ThriftHiveMetastore_compact_result& operator=(const ThriftHiveMetastore_compact_result&); + ThriftHiveMetastore_compact_result() { + } + + virtual ~ThriftHiveMetastore_compact_result() throw(); + + bool operator == (const ThriftHiveMetastore_compact_result & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_compact_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_compact_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_compact_presult { + public: + + + virtual ~ThriftHiveMetastore_compact_presult() throw(); + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_compact2_args__isset { + _ThriftHiveMetastore_compact2_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_compact2_args__isset; + +class ThriftHiveMetastore_compact2_args { + public: + + ThriftHiveMetastore_compact2_args(const ThriftHiveMetastore_compact2_args&); + ThriftHiveMetastore_compact2_args& operator=(const ThriftHiveMetastore_compact2_args&); + ThriftHiveMetastore_compact2_args() { + } + + virtual ~ThriftHiveMetastore_compact2_args() throw(); + CompactionRequest rqst; + + _ThriftHiveMetastore_compact2_args__isset __isset; + + void __set_rqst(const CompactionRequest& val); + + bool operator == (const ThriftHiveMetastore_compact2_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_compact2_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_compact2_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_compact2_pargs { + public: + + + virtual ~ThriftHiveMetastore_compact2_pargs() throw(); + const CompactionRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_compact2_result__isset { + _ThriftHiveMetastore_compact2_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_compact2_result__isset; + +class ThriftHiveMetastore_compact2_result { + public: + + ThriftHiveMetastore_compact2_result(const ThriftHiveMetastore_compact2_result&); + ThriftHiveMetastore_compact2_result& operator=(const ThriftHiveMetastore_compact2_result&); + ThriftHiveMetastore_compact2_result() { + } + + virtual ~ThriftHiveMetastore_compact2_result() throw(); + CompactionResponse success; + + _ThriftHiveMetastore_compact2_result__isset __isset; + + void __set_success(const CompactionResponse& val); + + bool operator == (const ThriftHiveMetastore_compact2_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_compact2_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_compact2_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_compact2_presult__isset { + _ThriftHiveMetastore_compact2_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_compact2_presult__isset; + +class ThriftHiveMetastore_compact2_presult { + public: + + + virtual ~ThriftHiveMetastore_compact2_presult() throw(); + CompactionResponse* success; + + _ThriftHiveMetastore_compact2_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_show_compact_args__isset { + _ThriftHiveMetastore_show_compact_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_show_compact_args__isset; + +class ThriftHiveMetastore_show_compact_args { + public: + + ThriftHiveMetastore_show_compact_args(const ThriftHiveMetastore_show_compact_args&); + ThriftHiveMetastore_show_compact_args& operator=(const ThriftHiveMetastore_show_compact_args&); + ThriftHiveMetastore_show_compact_args() { + } + + virtual ~ThriftHiveMetastore_show_compact_args() throw(); + ShowCompactRequest rqst; + + _ThriftHiveMetastore_show_compact_args__isset __isset; + + void __set_rqst(const ShowCompactRequest& val); + + bool operator == (const ThriftHiveMetastore_show_compact_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_show_compact_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_show_compact_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_show_compact_pargs { + public: + + + virtual ~ThriftHiveMetastore_show_compact_pargs() throw(); + const ShowCompactRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_show_compact_result__isset { + _ThriftHiveMetastore_show_compact_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_show_compact_result__isset; + +class ThriftHiveMetastore_show_compact_result { + public: + + ThriftHiveMetastore_show_compact_result(const ThriftHiveMetastore_show_compact_result&); + ThriftHiveMetastore_show_compact_result& operator=(const ThriftHiveMetastore_show_compact_result&); + ThriftHiveMetastore_show_compact_result() { + } + + virtual ~ThriftHiveMetastore_show_compact_result() throw(); + ShowCompactResponse success; + + _ThriftHiveMetastore_show_compact_result__isset __isset; + + void __set_success(const ShowCompactResponse& val); + + bool operator == (const ThriftHiveMetastore_show_compact_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_show_compact_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_show_compact_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_show_compact_presult__isset { + _ThriftHiveMetastore_show_compact_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_show_compact_presult__isset; + +class ThriftHiveMetastore_show_compact_presult { + public: + + + virtual ~ThriftHiveMetastore_show_compact_presult() throw(); + ShowCompactResponse* success; + + _ThriftHiveMetastore_show_compact_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_dynamic_partitions_args__isset { + _ThriftHiveMetastore_add_dynamic_partitions_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_add_dynamic_partitions_args__isset; + +class ThriftHiveMetastore_add_dynamic_partitions_args { + public: + + ThriftHiveMetastore_add_dynamic_partitions_args(const ThriftHiveMetastore_add_dynamic_partitions_args&); + ThriftHiveMetastore_add_dynamic_partitions_args& operator=(const ThriftHiveMetastore_add_dynamic_partitions_args&); + ThriftHiveMetastore_add_dynamic_partitions_args() { + } + + virtual ~ThriftHiveMetastore_add_dynamic_partitions_args() throw(); + AddDynamicPartitions rqst; + + _ThriftHiveMetastore_add_dynamic_partitions_args__isset __isset; + + void __set_rqst(const AddDynamicPartitions& val); + + bool operator == (const ThriftHiveMetastore_add_dynamic_partitions_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_dynamic_partitions_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_dynamic_partitions_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_dynamic_partitions_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_dynamic_partitions_pargs() throw(); + const AddDynamicPartitions* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_dynamic_partitions_result__isset { + _ThriftHiveMetastore_add_dynamic_partitions_result__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_add_dynamic_partitions_result__isset; + +class ThriftHiveMetastore_add_dynamic_partitions_result { + public: + + ThriftHiveMetastore_add_dynamic_partitions_result(const ThriftHiveMetastore_add_dynamic_partitions_result&); + ThriftHiveMetastore_add_dynamic_partitions_result& operator=(const ThriftHiveMetastore_add_dynamic_partitions_result&); + ThriftHiveMetastore_add_dynamic_partitions_result() { + } + + virtual ~ThriftHiveMetastore_add_dynamic_partitions_result() throw(); + NoSuchTxnException o1; + TxnAbortedException o2; + + _ThriftHiveMetastore_add_dynamic_partitions_result__isset __isset; + + void __set_o1(const NoSuchTxnException& val); + + void __set_o2(const TxnAbortedException& val); + + bool operator == (const ThriftHiveMetastore_add_dynamic_partitions_result & rhs) const + { + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_dynamic_partitions_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_dynamic_partitions_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_dynamic_partitions_presult__isset { + _ThriftHiveMetastore_add_dynamic_partitions_presult__isset() : o1(false), o2(false) {} + bool o1 :1; + bool o2 :1; +} _ThriftHiveMetastore_add_dynamic_partitions_presult__isset; + +class ThriftHiveMetastore_add_dynamic_partitions_presult { + public: + + + virtual ~ThriftHiveMetastore_add_dynamic_partitions_presult() throw(); + NoSuchTxnException o1; + TxnAbortedException o2; + + _ThriftHiveMetastore_add_dynamic_partitions_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_next_notification_args__isset { + _ThriftHiveMetastore_get_next_notification_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_get_next_notification_args__isset; + +class ThriftHiveMetastore_get_next_notification_args { + public: + + ThriftHiveMetastore_get_next_notification_args(const ThriftHiveMetastore_get_next_notification_args&); + ThriftHiveMetastore_get_next_notification_args& operator=(const ThriftHiveMetastore_get_next_notification_args&); + ThriftHiveMetastore_get_next_notification_args() { + } + + virtual ~ThriftHiveMetastore_get_next_notification_args() throw(); + NotificationEventRequest rqst; + + _ThriftHiveMetastore_get_next_notification_args__isset __isset; + + void __set_rqst(const NotificationEventRequest& val); + + bool operator == (const ThriftHiveMetastore_get_next_notification_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_next_notification_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_next_notification_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_next_notification_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_next_notification_pargs() throw(); + const NotificationEventRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_next_notification_result__isset { + _ThriftHiveMetastore_get_next_notification_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_next_notification_result__isset; + +class ThriftHiveMetastore_get_next_notification_result { + public: + + ThriftHiveMetastore_get_next_notification_result(const ThriftHiveMetastore_get_next_notification_result&); + ThriftHiveMetastore_get_next_notification_result& operator=(const ThriftHiveMetastore_get_next_notification_result&); + ThriftHiveMetastore_get_next_notification_result() { + } + + virtual ~ThriftHiveMetastore_get_next_notification_result() throw(); + NotificationEventResponse success; + + _ThriftHiveMetastore_get_next_notification_result__isset __isset; + + void __set_success(const NotificationEventResponse& val); + + bool operator == (const ThriftHiveMetastore_get_next_notification_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_next_notification_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_next_notification_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_next_notification_presult__isset { + _ThriftHiveMetastore_get_next_notification_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_next_notification_presult__isset; + +class ThriftHiveMetastore_get_next_notification_presult { + public: + + + virtual ~ThriftHiveMetastore_get_next_notification_presult() throw(); + NotificationEventResponse* success; + + _ThriftHiveMetastore_get_next_notification_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_get_current_notificationEventId_args { + public: + + ThriftHiveMetastore_get_current_notificationEventId_args(const ThriftHiveMetastore_get_current_notificationEventId_args&); + ThriftHiveMetastore_get_current_notificationEventId_args& operator=(const ThriftHiveMetastore_get_current_notificationEventId_args&); + ThriftHiveMetastore_get_current_notificationEventId_args() { + } + + virtual ~ThriftHiveMetastore_get_current_notificationEventId_args() throw(); + + bool operator == (const ThriftHiveMetastore_get_current_notificationEventId_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_current_notificationEventId_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_current_notificationEventId_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_current_notificationEventId_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_current_notificationEventId_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_current_notificationEventId_result__isset { + _ThriftHiveMetastore_get_current_notificationEventId_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_current_notificationEventId_result__isset; + +class ThriftHiveMetastore_get_current_notificationEventId_result { + public: + + ThriftHiveMetastore_get_current_notificationEventId_result(const ThriftHiveMetastore_get_current_notificationEventId_result&); + ThriftHiveMetastore_get_current_notificationEventId_result& operator=(const ThriftHiveMetastore_get_current_notificationEventId_result&); + ThriftHiveMetastore_get_current_notificationEventId_result() { + } + + virtual ~ThriftHiveMetastore_get_current_notificationEventId_result() throw(); + CurrentNotificationEventId success; + + _ThriftHiveMetastore_get_current_notificationEventId_result__isset __isset; + + void __set_success(const CurrentNotificationEventId& val); + + bool operator == (const ThriftHiveMetastore_get_current_notificationEventId_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_current_notificationEventId_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_current_notificationEventId_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_current_notificationEventId_presult__isset { + _ThriftHiveMetastore_get_current_notificationEventId_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_current_notificationEventId_presult__isset; + +class ThriftHiveMetastore_get_current_notificationEventId_presult { + public: + + + virtual ~ThriftHiveMetastore_get_current_notificationEventId_presult() throw(); + CurrentNotificationEventId* success; + + _ThriftHiveMetastore_get_current_notificationEventId_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_fire_listener_event_args__isset { + _ThriftHiveMetastore_fire_listener_event_args__isset() : rqst(false) {} + bool rqst :1; +} _ThriftHiveMetastore_fire_listener_event_args__isset; + +class ThriftHiveMetastore_fire_listener_event_args { + public: + + ThriftHiveMetastore_fire_listener_event_args(const ThriftHiveMetastore_fire_listener_event_args&); + ThriftHiveMetastore_fire_listener_event_args& operator=(const ThriftHiveMetastore_fire_listener_event_args&); + ThriftHiveMetastore_fire_listener_event_args() { + } + + virtual ~ThriftHiveMetastore_fire_listener_event_args() throw(); + FireEventRequest rqst; + + _ThriftHiveMetastore_fire_listener_event_args__isset __isset; + + void __set_rqst(const FireEventRequest& val); + + bool operator == (const ThriftHiveMetastore_fire_listener_event_args & rhs) const + { + if (!(rqst == rhs.rqst)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_fire_listener_event_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_fire_listener_event_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_fire_listener_event_pargs { + public: + + + virtual ~ThriftHiveMetastore_fire_listener_event_pargs() throw(); + const FireEventRequest* rqst; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_fire_listener_event_result__isset { + _ThriftHiveMetastore_fire_listener_event_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_fire_listener_event_result__isset; + +class ThriftHiveMetastore_fire_listener_event_result { + public: + + ThriftHiveMetastore_fire_listener_event_result(const ThriftHiveMetastore_fire_listener_event_result&); + ThriftHiveMetastore_fire_listener_event_result& operator=(const ThriftHiveMetastore_fire_listener_event_result&); + ThriftHiveMetastore_fire_listener_event_result() { + } + + virtual ~ThriftHiveMetastore_fire_listener_event_result() throw(); + FireEventResponse success; + + _ThriftHiveMetastore_fire_listener_event_result__isset __isset; + + void __set_success(const FireEventResponse& val); + + bool operator == (const ThriftHiveMetastore_fire_listener_event_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_fire_listener_event_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_fire_listener_event_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_fire_listener_event_presult__isset { + _ThriftHiveMetastore_fire_listener_event_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_fire_listener_event_presult__isset; + +class ThriftHiveMetastore_fire_listener_event_presult { + public: + + + virtual ~ThriftHiveMetastore_fire_listener_event_presult() throw(); + FireEventResponse* success; + + _ThriftHiveMetastore_fire_listener_event_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_flushCache_args { + public: + + ThriftHiveMetastore_flushCache_args(const ThriftHiveMetastore_flushCache_args&); + ThriftHiveMetastore_flushCache_args& operator=(const ThriftHiveMetastore_flushCache_args&); + ThriftHiveMetastore_flushCache_args() { + } + + virtual ~ThriftHiveMetastore_flushCache_args() throw(); + + bool operator == (const ThriftHiveMetastore_flushCache_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_flushCache_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_flushCache_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_flushCache_pargs { + public: + + + virtual ~ThriftHiveMetastore_flushCache_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_flushCache_result { + public: + + ThriftHiveMetastore_flushCache_result(const ThriftHiveMetastore_flushCache_result&); + ThriftHiveMetastore_flushCache_result& operator=(const ThriftHiveMetastore_flushCache_result&); + ThriftHiveMetastore_flushCache_result() { + } + + virtual ~ThriftHiveMetastore_flushCache_result() throw(); + + bool operator == (const ThriftHiveMetastore_flushCache_result & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_flushCache_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_flushCache_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_flushCache_presult { + public: + + + virtual ~ThriftHiveMetastore_flushCache_presult() throw(); + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_cm_recycle_args__isset { + _ThriftHiveMetastore_cm_recycle_args__isset() : request(false) {} + bool request :1; +} _ThriftHiveMetastore_cm_recycle_args__isset; + +class ThriftHiveMetastore_cm_recycle_args { + public: + + ThriftHiveMetastore_cm_recycle_args(const ThriftHiveMetastore_cm_recycle_args&); + ThriftHiveMetastore_cm_recycle_args& operator=(const ThriftHiveMetastore_cm_recycle_args&); + ThriftHiveMetastore_cm_recycle_args() { + } + + virtual ~ThriftHiveMetastore_cm_recycle_args() throw(); + CmRecycleRequest request; + + _ThriftHiveMetastore_cm_recycle_args__isset __isset; + + void __set_request(const CmRecycleRequest& val); + + bool operator == (const ThriftHiveMetastore_cm_recycle_args & rhs) const + { + if (!(request == rhs.request)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_cm_recycle_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_cm_recycle_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_cm_recycle_pargs { + public: + + + virtual ~ThriftHiveMetastore_cm_recycle_pargs() throw(); + const CmRecycleRequest* request; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_cm_recycle_result__isset { + _ThriftHiveMetastore_cm_recycle_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_cm_recycle_result__isset; + +class ThriftHiveMetastore_cm_recycle_result { + public: + + ThriftHiveMetastore_cm_recycle_result(const ThriftHiveMetastore_cm_recycle_result&); + ThriftHiveMetastore_cm_recycle_result& operator=(const ThriftHiveMetastore_cm_recycle_result&); + ThriftHiveMetastore_cm_recycle_result() { + } + + virtual ~ThriftHiveMetastore_cm_recycle_result() throw(); + CmRecycleResponse success; + MetaException o1; + + _ThriftHiveMetastore_cm_recycle_result__isset __isset; + + void __set_success(const CmRecycleResponse& val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_cm_recycle_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_cm_recycle_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_cm_recycle_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_cm_recycle_presult__isset { + _ThriftHiveMetastore_cm_recycle_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_cm_recycle_presult__isset; + +class ThriftHiveMetastore_cm_recycle_presult { + public: + + + virtual ~ThriftHiveMetastore_cm_recycle_presult() throw(); + CmRecycleResponse* success; + MetaException o1; + + _ThriftHiveMetastore_cm_recycle_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_file_metadata_by_expr_args__isset { + _ThriftHiveMetastore_get_file_metadata_by_expr_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_get_file_metadata_by_expr_args__isset; + +class ThriftHiveMetastore_get_file_metadata_by_expr_args { + public: + + ThriftHiveMetastore_get_file_metadata_by_expr_args(const ThriftHiveMetastore_get_file_metadata_by_expr_args&); + ThriftHiveMetastore_get_file_metadata_by_expr_args& operator=(const ThriftHiveMetastore_get_file_metadata_by_expr_args&); + ThriftHiveMetastore_get_file_metadata_by_expr_args() { + } + + virtual ~ThriftHiveMetastore_get_file_metadata_by_expr_args() throw(); + GetFileMetadataByExprRequest req; + + _ThriftHiveMetastore_get_file_metadata_by_expr_args__isset __isset; + + void __set_req(const GetFileMetadataByExprRequest& val); + + bool operator == (const ThriftHiveMetastore_get_file_metadata_by_expr_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_file_metadata_by_expr_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_file_metadata_by_expr_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_file_metadata_by_expr_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_file_metadata_by_expr_pargs() throw(); + const GetFileMetadataByExprRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_file_metadata_by_expr_result__isset { + _ThriftHiveMetastore_get_file_metadata_by_expr_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_file_metadata_by_expr_result__isset; + +class ThriftHiveMetastore_get_file_metadata_by_expr_result { + public: + + ThriftHiveMetastore_get_file_metadata_by_expr_result(const ThriftHiveMetastore_get_file_metadata_by_expr_result&); + ThriftHiveMetastore_get_file_metadata_by_expr_result& operator=(const ThriftHiveMetastore_get_file_metadata_by_expr_result&); + ThriftHiveMetastore_get_file_metadata_by_expr_result() { + } + + virtual ~ThriftHiveMetastore_get_file_metadata_by_expr_result() throw(); + GetFileMetadataByExprResult success; + + _ThriftHiveMetastore_get_file_metadata_by_expr_result__isset __isset; + + void __set_success(const GetFileMetadataByExprResult& val); + + bool operator == (const ThriftHiveMetastore_get_file_metadata_by_expr_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_file_metadata_by_expr_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_file_metadata_by_expr_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_file_metadata_by_expr_presult__isset { + _ThriftHiveMetastore_get_file_metadata_by_expr_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_file_metadata_by_expr_presult__isset; + +class ThriftHiveMetastore_get_file_metadata_by_expr_presult { + public: + + + virtual ~ThriftHiveMetastore_get_file_metadata_by_expr_presult() throw(); + GetFileMetadataByExprResult* success; + + _ThriftHiveMetastore_get_file_metadata_by_expr_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_file_metadata_args__isset { + _ThriftHiveMetastore_get_file_metadata_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_get_file_metadata_args__isset; + +class ThriftHiveMetastore_get_file_metadata_args { + public: + + ThriftHiveMetastore_get_file_metadata_args(const ThriftHiveMetastore_get_file_metadata_args&); + ThriftHiveMetastore_get_file_metadata_args& operator=(const ThriftHiveMetastore_get_file_metadata_args&); + ThriftHiveMetastore_get_file_metadata_args() { + } + + virtual ~ThriftHiveMetastore_get_file_metadata_args() throw(); + GetFileMetadataRequest req; + + _ThriftHiveMetastore_get_file_metadata_args__isset __isset; + + void __set_req(const GetFileMetadataRequest& val); + + bool operator == (const ThriftHiveMetastore_get_file_metadata_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_file_metadata_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_file_metadata_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_file_metadata_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_file_metadata_pargs() throw(); + const GetFileMetadataRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_file_metadata_result__isset { + _ThriftHiveMetastore_get_file_metadata_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_file_metadata_result__isset; + +class ThriftHiveMetastore_get_file_metadata_result { + public: + + ThriftHiveMetastore_get_file_metadata_result(const ThriftHiveMetastore_get_file_metadata_result&); + ThriftHiveMetastore_get_file_metadata_result& operator=(const ThriftHiveMetastore_get_file_metadata_result&); + ThriftHiveMetastore_get_file_metadata_result() { + } + + virtual ~ThriftHiveMetastore_get_file_metadata_result() throw(); + GetFileMetadataResult success; + + _ThriftHiveMetastore_get_file_metadata_result__isset __isset; + + void __set_success(const GetFileMetadataResult& val); + + bool operator == (const ThriftHiveMetastore_get_file_metadata_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_file_metadata_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_file_metadata_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_file_metadata_presult__isset { + _ThriftHiveMetastore_get_file_metadata_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_get_file_metadata_presult__isset; + +class ThriftHiveMetastore_get_file_metadata_presult { + public: + + + virtual ~ThriftHiveMetastore_get_file_metadata_presult() throw(); + GetFileMetadataResult* success; + + _ThriftHiveMetastore_get_file_metadata_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_put_file_metadata_args__isset { + _ThriftHiveMetastore_put_file_metadata_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_put_file_metadata_args__isset; + +class ThriftHiveMetastore_put_file_metadata_args { + public: + + ThriftHiveMetastore_put_file_metadata_args(const ThriftHiveMetastore_put_file_metadata_args&); + ThriftHiveMetastore_put_file_metadata_args& operator=(const ThriftHiveMetastore_put_file_metadata_args&); + ThriftHiveMetastore_put_file_metadata_args() { + } + + virtual ~ThriftHiveMetastore_put_file_metadata_args() throw(); + PutFileMetadataRequest req; + + _ThriftHiveMetastore_put_file_metadata_args__isset __isset; + + void __set_req(const PutFileMetadataRequest& val); + + bool operator == (const ThriftHiveMetastore_put_file_metadata_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_put_file_metadata_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_put_file_metadata_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_put_file_metadata_pargs { + public: + + + virtual ~ThriftHiveMetastore_put_file_metadata_pargs() throw(); + const PutFileMetadataRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_put_file_metadata_result__isset { + _ThriftHiveMetastore_put_file_metadata_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_put_file_metadata_result__isset; + +class ThriftHiveMetastore_put_file_metadata_result { + public: + + ThriftHiveMetastore_put_file_metadata_result(const ThriftHiveMetastore_put_file_metadata_result&); + ThriftHiveMetastore_put_file_metadata_result& operator=(const ThriftHiveMetastore_put_file_metadata_result&); + ThriftHiveMetastore_put_file_metadata_result() { + } + + virtual ~ThriftHiveMetastore_put_file_metadata_result() throw(); + PutFileMetadataResult success; + + _ThriftHiveMetastore_put_file_metadata_result__isset __isset; + + void __set_success(const PutFileMetadataResult& val); + + bool operator == (const ThriftHiveMetastore_put_file_metadata_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_put_file_metadata_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_put_file_metadata_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_put_file_metadata_presult__isset { + _ThriftHiveMetastore_put_file_metadata_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_put_file_metadata_presult__isset; + +class ThriftHiveMetastore_put_file_metadata_presult { + public: + + + virtual ~ThriftHiveMetastore_put_file_metadata_presult() throw(); + PutFileMetadataResult* success; + + _ThriftHiveMetastore_put_file_metadata_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_clear_file_metadata_args__isset { + _ThriftHiveMetastore_clear_file_metadata_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_clear_file_metadata_args__isset; + +class ThriftHiveMetastore_clear_file_metadata_args { + public: + + ThriftHiveMetastore_clear_file_metadata_args(const ThriftHiveMetastore_clear_file_metadata_args&); + ThriftHiveMetastore_clear_file_metadata_args& operator=(const ThriftHiveMetastore_clear_file_metadata_args&); + ThriftHiveMetastore_clear_file_metadata_args() { + } + + virtual ~ThriftHiveMetastore_clear_file_metadata_args() throw(); + ClearFileMetadataRequest req; + + _ThriftHiveMetastore_clear_file_metadata_args__isset __isset; + + void __set_req(const ClearFileMetadataRequest& val); + + bool operator == (const ThriftHiveMetastore_clear_file_metadata_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_clear_file_metadata_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_clear_file_metadata_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_clear_file_metadata_pargs { + public: + + + virtual ~ThriftHiveMetastore_clear_file_metadata_pargs() throw(); + const ClearFileMetadataRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_clear_file_metadata_result__isset { + _ThriftHiveMetastore_clear_file_metadata_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_clear_file_metadata_result__isset; + +class ThriftHiveMetastore_clear_file_metadata_result { + public: + + ThriftHiveMetastore_clear_file_metadata_result(const ThriftHiveMetastore_clear_file_metadata_result&); + ThriftHiveMetastore_clear_file_metadata_result& operator=(const ThriftHiveMetastore_clear_file_metadata_result&); + ThriftHiveMetastore_clear_file_metadata_result() { + } + + virtual ~ThriftHiveMetastore_clear_file_metadata_result() throw(); + ClearFileMetadataResult success; + + _ThriftHiveMetastore_clear_file_metadata_result__isset __isset; + + void __set_success(const ClearFileMetadataResult& val); + + bool operator == (const ThriftHiveMetastore_clear_file_metadata_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_clear_file_metadata_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_clear_file_metadata_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_clear_file_metadata_presult__isset { + _ThriftHiveMetastore_clear_file_metadata_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_clear_file_metadata_presult__isset; + +class ThriftHiveMetastore_clear_file_metadata_presult { + public: + + + virtual ~ThriftHiveMetastore_clear_file_metadata_presult() throw(); + ClearFileMetadataResult* success; + + _ThriftHiveMetastore_clear_file_metadata_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_cache_file_metadata_args__isset { + _ThriftHiveMetastore_cache_file_metadata_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_cache_file_metadata_args__isset; + +class ThriftHiveMetastore_cache_file_metadata_args { + public: + + ThriftHiveMetastore_cache_file_metadata_args(const ThriftHiveMetastore_cache_file_metadata_args&); + ThriftHiveMetastore_cache_file_metadata_args& operator=(const ThriftHiveMetastore_cache_file_metadata_args&); + ThriftHiveMetastore_cache_file_metadata_args() { + } + + virtual ~ThriftHiveMetastore_cache_file_metadata_args() throw(); + CacheFileMetadataRequest req; + + _ThriftHiveMetastore_cache_file_metadata_args__isset __isset; + + void __set_req(const CacheFileMetadataRequest& val); + + bool operator == (const ThriftHiveMetastore_cache_file_metadata_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_cache_file_metadata_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_cache_file_metadata_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_cache_file_metadata_pargs { + public: + + + virtual ~ThriftHiveMetastore_cache_file_metadata_pargs() throw(); + const CacheFileMetadataRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_cache_file_metadata_result__isset { + _ThriftHiveMetastore_cache_file_metadata_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_cache_file_metadata_result__isset; + +class ThriftHiveMetastore_cache_file_metadata_result { + public: + + ThriftHiveMetastore_cache_file_metadata_result(const ThriftHiveMetastore_cache_file_metadata_result&); + ThriftHiveMetastore_cache_file_metadata_result& operator=(const ThriftHiveMetastore_cache_file_metadata_result&); + ThriftHiveMetastore_cache_file_metadata_result() { + } + + virtual ~ThriftHiveMetastore_cache_file_metadata_result() throw(); + CacheFileMetadataResult success; + + _ThriftHiveMetastore_cache_file_metadata_result__isset __isset; + + void __set_success(const CacheFileMetadataResult& val); + + bool operator == (const ThriftHiveMetastore_cache_file_metadata_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_cache_file_metadata_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_cache_file_metadata_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_cache_file_metadata_presult__isset { + _ThriftHiveMetastore_cache_file_metadata_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_cache_file_metadata_presult__isset; + +class ThriftHiveMetastore_cache_file_metadata_presult { + public: + + + virtual ~ThriftHiveMetastore_cache_file_metadata_presult() throw(); + CacheFileMetadataResult* success; + + _ThriftHiveMetastore_cache_file_metadata_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_get_metastore_db_uuid_args { + public: + + ThriftHiveMetastore_get_metastore_db_uuid_args(const ThriftHiveMetastore_get_metastore_db_uuid_args&); + ThriftHiveMetastore_get_metastore_db_uuid_args& operator=(const ThriftHiveMetastore_get_metastore_db_uuid_args&); + ThriftHiveMetastore_get_metastore_db_uuid_args() { + } + + virtual ~ThriftHiveMetastore_get_metastore_db_uuid_args() throw(); + + bool operator == (const ThriftHiveMetastore_get_metastore_db_uuid_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_metastore_db_uuid_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_metastore_db_uuid_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_metastore_db_uuid_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_metastore_db_uuid_pargs() throw(); + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_metastore_db_uuid_result__isset { + _ThriftHiveMetastore_get_metastore_db_uuid_result__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_metastore_db_uuid_result__isset; + +class ThriftHiveMetastore_get_metastore_db_uuid_result { + public: + + ThriftHiveMetastore_get_metastore_db_uuid_result(const ThriftHiveMetastore_get_metastore_db_uuid_result&); + ThriftHiveMetastore_get_metastore_db_uuid_result& operator=(const ThriftHiveMetastore_get_metastore_db_uuid_result&); + ThriftHiveMetastore_get_metastore_db_uuid_result() : success() { + } + + virtual ~ThriftHiveMetastore_get_metastore_db_uuid_result() throw(); + std::string success; + MetaException o1; + + _ThriftHiveMetastore_get_metastore_db_uuid_result__isset __isset; + + void __set_success(const std::string& val); + + void __set_o1(const MetaException& val); + + bool operator == (const ThriftHiveMetastore_get_metastore_db_uuid_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_metastore_db_uuid_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_metastore_db_uuid_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_metastore_db_uuid_presult__isset { + _ThriftHiveMetastore_get_metastore_db_uuid_presult__isset() : success(false), o1(false) {} + bool success :1; + bool o1 :1; +} _ThriftHiveMetastore_get_metastore_db_uuid_presult__isset; + +class ThriftHiveMetastore_get_metastore_db_uuid_presult { + public: + + + virtual ~ThriftHiveMetastore_get_metastore_db_uuid_presult() throw(); + std::string* success; + MetaException o1; + + _ThriftHiveMetastore_get_metastore_db_uuid_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public ::facebook::fb303::FacebookServiceClient { + public: + ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> 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) {} + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void getMetaConf(std::string& _return, const std::string& key); + void send_getMetaConf(const std::string& key); + void recv_getMetaConf(std::string& _return); + void setMetaConf(const std::string& key, const std::string& value); + void send_setMetaConf(const std::string& key, const std::string& value); + void recv_setMetaConf(); + void create_database(const Database& database); + void send_create_database(const Database& database); + void recv_create_database(); + void get_database(Database& _return, const std::string& name); + void send_get_database(const std::string& name); + void recv_get_database(Database& _return); + void drop_database(const std::string& name, const bool deleteData, const bool cascade); + void send_drop_database(const std::string& name, const bool deleteData, const bool cascade); + void recv_drop_database(); + void get_databases(std::vector & _return, const std::string& pattern); + void send_get_databases(const std::string& pattern); + void recv_get_databases(std::vector & _return); + void get_all_databases(std::vector & _return); + void send_get_all_databases(); + void recv_get_all_databases(std::vector & _return); + void alter_database(const std::string& dbname, const Database& db); + void send_alter_database(const std::string& dbname, const Database& db); + void recv_alter_database(); + void get_type(Type& _return, const std::string& name); + void send_get_type(const std::string& name); + void recv_get_type(Type& _return); + bool create_type(const Type& type); + void send_create_type(const Type& type); + bool recv_create_type(); + bool drop_type(const std::string& type); + void send_drop_type(const std::string& type); + bool recv_drop_type(); + void get_type_all(std::map & _return, const std::string& name); + void send_get_type_all(const std::string& name); + void recv_get_type_all(std::map & _return); + void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name); + void send_get_fields(const std::string& db_name, const std::string& table_name); + void recv_get_fields(std::vector & _return); + void get_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); + void send_get_fields_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); + void recv_get_fields_with_environment_context(std::vector & _return); + void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name); + void send_get_schema(const std::string& db_name, const std::string& table_name); + void recv_get_schema(std::vector & _return); + void get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); + void send_get_schema_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); + void recv_get_schema_with_environment_context(std::vector & _return); + void create_table(const Table& tbl); + void send_create_table(const Table& tbl); + void recv_create_table(); + void create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context); + void send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context); + void recv_create_table_with_environment_context(); + void create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints); + void send_create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints); + void recv_create_table_with_constraints(); + void drop_constraint(const DropConstraintRequest& req); + void send_drop_constraint(const DropConstraintRequest& req); + void recv_drop_constraint(); + void add_primary_key(const AddPrimaryKeyRequest& req); + void send_add_primary_key(const AddPrimaryKeyRequest& req); + void recv_add_primary_key(); + void add_foreign_key(const AddForeignKeyRequest& req); + void send_add_foreign_key(const AddForeignKeyRequest& req); + void recv_add_foreign_key(); + void add_unique_constraint(const AddUniqueConstraintRequest& req); + void send_add_unique_constraint(const AddUniqueConstraintRequest& req); + void recv_add_unique_constraint(); + void add_not_null_constraint(const AddNotNullConstraintRequest& req); + void send_add_not_null_constraint(const AddNotNullConstraintRequest& req); + void recv_add_not_null_constraint(); + void drop_table(const std::string& dbname, const std::string& name, const bool deleteData); + void send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData); + void recv_drop_table(); + void drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context); + void send_drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context); + void recv_drop_table_with_environment_context(); + void truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames); + void send_truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames); + void recv_truncate_table(); + void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern); + void send_get_tables(const std::string& db_name, const std::string& pattern); + void recv_get_tables(std::vector & _return); + void get_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType); + void send_get_tables_by_type(const std::string& db_name, const std::string& pattern, const std::string& tableType); + void recv_get_tables_by_type(std::vector & _return); + void get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types); + void send_get_table_meta(const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types); + void recv_get_table_meta(std::vector & _return); + void get_all_tables(std::vector & _return, const std::string& db_name); + void send_get_all_tables(const std::string& db_name); + void recv_get_all_tables(std::vector & _return); + void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name); + void send_get_table(const std::string& dbname, const std::string& tbl_name); + void recv_get_table(Table& _return); + void get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names); + void send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names); + void recv_get_table_objects_by_name(std::vector
& _return); + void get_table_req(GetTableResult& _return, const GetTableRequest& req); + void send_get_table_req(const GetTableRequest& req); + void recv_get_table_req(GetTableResult& _return); + void get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req); + void send_get_table_objects_by_name_req(const GetTablesRequest& req); + void recv_get_table_objects_by_name_req(GetTablesResult& _return); + void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables); + void send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables); + void recv_get_table_names_by_filter(std::vector & _return); + void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); + void send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); + void recv_alter_table(); + void alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context); + void send_alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context); + void recv_alter_table_with_environment_context(); + void alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade); + void send_alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade); + void recv_alter_table_with_cascade(); + void add_partition(Partition& _return, const Partition& new_part); + void send_add_partition(const Partition& new_part); + void recv_add_partition(Partition& _return); + void add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context); + void send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context); + void recv_add_partition_with_environment_context(Partition& _return); + int32_t add_partitions(const std::vector & new_parts); + void send_add_partitions(const std::vector & new_parts); + int32_t recv_add_partitions(); + int32_t add_partitions_pspec(const std::vector & new_parts); + void send_add_partitions_pspec(const std::vector & new_parts); + int32_t recv_add_partitions_pspec(); + void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void recv_append_partition(Partition& _return); + void add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request); + void send_add_partitions_req(const AddPartitionsRequest& request); + void recv_add_partitions_req(AddPartitionsResult& _return); + void append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context); + void send_append_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context); + void recv_append_partition_with_environment_context(Partition& _return); + void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void recv_append_partition_by_name(Partition& _return); + void append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context); + void send_append_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context); + void recv_append_partition_by_name_with_environment_context(Partition& _return); + bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); + void send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); + bool recv_drop_partition(); + bool drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context); + void send_drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context); + bool recv_drop_partition_with_environment_context(); + bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); + void send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); + bool recv_drop_partition_by_name(); + bool drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context); + void send_drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context); + bool recv_drop_partition_by_name_with_environment_context(); + void drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req); + void send_drop_partitions_req(const DropPartitionsRequest& req); + void recv_drop_partitions_req(DropPartitionsResult& _return); + void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void recv_get_partition(Partition& _return); + void exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); + void send_exchange_partition(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); + void recv_exchange_partition(Partition& _return); + void exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); + void send_exchange_partitions(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); + void recv_exchange_partitions(std::vector & _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); + void send_get_partition_with_auth(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); + void recv_get_partition_with_auth(Partition& _return); + void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void recv_get_partition_by_name(Partition& _return); + void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void recv_get_partitions(std::vector & _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); + void send_get_partitions_with_auth(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); + void recv_get_partitions_with_auth(std::vector & _return); + void get_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts); + void send_get_partitions_pspec(const std::string& db_name, const std::string& tbl_name, const int32_t max_parts); + void recv_get_partitions_pspec(std::vector & _return); + void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void recv_get_partition_names(std::vector & _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); + void send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void recv_get_partitions_ps(std::vector & _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); + void send_get_partitions_ps_with_auth(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); + void recv_get_partitions_ps_with_auth(std::vector & _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); + void send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void recv_get_partition_names_ps(std::vector & _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); + void send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); + void recv_get_partitions_by_filter(std::vector & _return); + void get_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts); + void send_get_part_specs_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts); + void recv_get_part_specs_by_filter(std::vector & _return); + void get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req); + void send_get_partitions_by_expr(const PartitionsByExprRequest& req); + void recv_get_partitions_by_expr(PartitionsByExprResult& _return); + int32_t get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter); + void send_get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter); + int32_t recv_get_num_partitions_by_filter(); + void get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names); + void send_get_partitions_by_names(const std::string& db_name, const std::string& tbl_name, const std::vector & names); + void recv_get_partitions_by_names(std::vector & _return); + void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); + void send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); + void recv_alter_partition(); + void alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts); + void send_alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts); + void recv_alter_partitions(); + void alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context); + void send_alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context); + void recv_alter_partitions_with_environment_context(); + void alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context); + void send_alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context); + void recv_alter_partition_with_environment_context(); + void rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part); + void send_rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part); + void recv_rename_partition(); + bool partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception); + void send_partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception); + bool recv_partition_name_has_valid_characters(); + void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue); + void send_get_config_value(const std::string& name, const std::string& defaultValue); + void recv_get_config_value(std::string& _return); + void partition_name_to_vals(std::vector & _return, const std::string& part_name); + void send_partition_name_to_vals(const std::string& part_name); + void recv_partition_name_to_vals(std::vector & _return); + void partition_name_to_spec(std::map & _return, const std::string& part_name); + void send_partition_name_to_spec(const std::string& part_name); + void recv_partition_name_to_spec(std::map & _return); + void markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); + void send_markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); + void recv_markPartitionForEvent(); + bool isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); + void send_isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); + bool recv_isPartitionMarkedForEvent(); + void add_index(Index& _return, const Index& new_index, const Table& index_table); + void send_add_index(const Index& new_index, const Table& index_table); + void recv_add_index(Index& _return); + void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); + void send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); + void recv_alter_index(); + bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); + void send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); + bool recv_drop_index_by_name(); + void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name); + void send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name); + void recv_get_index_by_name(Index& _return); + void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void recv_get_indexes(std::vector & _return); + void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void recv_get_index_names(std::vector & _return); + void get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request); + void send_get_primary_keys(const PrimaryKeysRequest& request); + void recv_get_primary_keys(PrimaryKeysResponse& _return); + void get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request); + void send_get_foreign_keys(const ForeignKeysRequest& request); + void recv_get_foreign_keys(ForeignKeysResponse& _return); + void get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request); + void send_get_unique_constraints(const UniqueConstraintsRequest& request); + void recv_get_unique_constraints(UniqueConstraintsResponse& _return); + void get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request); + void send_get_not_null_constraints(const NotNullConstraintsRequest& request); + void recv_get_not_null_constraints(NotNullConstraintsResponse& _return); + bool update_table_column_statistics(const ColumnStatistics& stats_obj); + void send_update_table_column_statistics(const ColumnStatistics& stats_obj); + bool recv_update_table_column_statistics(); + bool update_partition_column_statistics(const ColumnStatistics& stats_obj); + void send_update_partition_column_statistics(const ColumnStatistics& stats_obj); + bool recv_update_partition_column_statistics(); + void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + void send_get_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + void recv_get_table_column_statistics(ColumnStatistics& _return); + void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + void send_get_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + void recv_get_partition_column_statistics(ColumnStatistics& _return); + void get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request); + void send_get_table_statistics_req(const TableStatsRequest& request); + void recv_get_table_statistics_req(TableStatsResult& _return); + void get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request); + void send_get_partitions_statistics_req(const PartitionsStatsRequest& request); + void recv_get_partitions_statistics_req(PartitionsStatsResult& _return); + void get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request); + void send_get_aggr_stats_for(const PartitionsStatsRequest& request); + void recv_get_aggr_stats_for(AggrStats& _return); + bool set_aggr_stats_for(const SetPartitionsStatsRequest& request); + void send_set_aggr_stats_for(const SetPartitionsStatsRequest& request); + bool recv_set_aggr_stats_for(); + bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + void send_delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + bool recv_delete_partition_column_statistics(); + bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + void send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + bool recv_delete_table_column_statistics(); + void create_function(const Function& func); + void send_create_function(const Function& func); + void recv_create_function(); + void drop_function(const std::string& dbName, const std::string& funcName); + void send_drop_function(const std::string& dbName, const std::string& funcName); + void recv_drop_function(); + void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc); + void send_alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc); + void recv_alter_function(); + void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern); + void send_get_functions(const std::string& dbName, const std::string& pattern); + void recv_get_functions(std::vector & _return); + void get_function(Function& _return, const std::string& dbName, const std::string& funcName); + void send_get_function(const std::string& dbName, const std::string& funcName); + void recv_get_function(Function& _return); + void get_all_functions(GetAllFunctionsResponse& _return); + void send_get_all_functions(); + void recv_get_all_functions(GetAllFunctionsResponse& _return); + bool create_role(const Role& role); + void send_create_role(const Role& role); + bool recv_create_role(); + bool drop_role(const std::string& role_name); + void send_drop_role(const std::string& role_name); + bool recv_drop_role(); + void get_role_names(std::vector & _return); + void send_get_role_names(); + void recv_get_role_names(std::vector & _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); + void send_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); + bool recv_grant_role(); + bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type); + void send_revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type); + bool recv_revoke_role(); + void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type); + void send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type); + void recv_list_roles(std::vector & _return); + void grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request); + void send_grant_revoke_role(const GrantRevokeRoleRequest& request); + void recv_grant_revoke_role(GrantRevokeRoleResponse& _return); + void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request); + void send_get_principals_in_role(const GetPrincipalsInRoleRequest& request); + void recv_get_principals_in_role(GetPrincipalsInRoleResponse& _return); + void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request); + void send_get_role_grants_for_principal(const GetRoleGrantsForPrincipalRequest& request); + void recv_get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return); + void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names); + void send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names); + void recv_get_privilege_set(PrincipalPrivilegeSet& _return); + void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject); + void send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject); + void recv_list_privileges(std::vector & _return); + bool grant_privileges(const PrivilegeBag& privileges); + void send_grant_privileges(const PrivilegeBag& privileges); + bool recv_grant_privileges(); + bool revoke_privileges(const PrivilegeBag& privileges); + void send_revoke_privileges(const PrivilegeBag& privileges); + bool recv_revoke_privileges(); + void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request); + void send_grant_revoke_privileges(const GrantRevokePrivilegeRequest& request); + void recv_grant_revoke_privileges(GrantRevokePrivilegeResponse& _return); + void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names); + void send_set_ugi(const std::string& user_name, const std::vector & group_names); + void recv_set_ugi(std::vector & _return); + void get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name); + void send_get_delegation_token(const std::string& token_owner, const std::string& renewer_kerberos_principal_name); + void recv_get_delegation_token(std::string& _return); + int64_t renew_delegation_token(const std::string& token_str_form); + void send_renew_delegation_token(const std::string& token_str_form); + int64_t recv_renew_delegation_token(); + void cancel_delegation_token(const std::string& token_str_form); + void send_cancel_delegation_token(const std::string& token_str_form); + void recv_cancel_delegation_token(); + bool add_token(const std::string& token_identifier, const std::string& delegation_token); + void send_add_token(const std::string& token_identifier, const std::string& delegation_token); + bool recv_add_token(); + bool remove_token(const std::string& token_identifier); + void send_remove_token(const std::string& token_identifier); + bool recv_remove_token(); + void get_token(std::string& _return, const std::string& token_identifier); + void send_get_token(const std::string& token_identifier); + void recv_get_token(std::string& _return); + void get_all_token_identifiers(std::vector & _return); + void send_get_all_token_identifiers(); + void recv_get_all_token_identifiers(std::vector & _return); + int32_t add_master_key(const std::string& key); + void send_add_master_key(const std::string& key); + int32_t recv_add_master_key(); + void update_master_key(const int32_t seq_number, const std::string& key); + void send_update_master_key(const int32_t seq_number, const std::string& key); + void recv_update_master_key(); + bool remove_master_key(const int32_t key_seq); + void send_remove_master_key(const int32_t key_seq); + bool recv_remove_master_key(); + void get_master_keys(std::vector & _return); + void send_get_master_keys(); + void recv_get_master_keys(std::vector & _return); + void get_open_txns(GetOpenTxnsResponse& _return); + void send_get_open_txns(); + void recv_get_open_txns(GetOpenTxnsResponse& _return); + void get_open_txns_info(GetOpenTxnsInfoResponse& _return); + void send_get_open_txns_info(); + void recv_get_open_txns_info(GetOpenTxnsInfoResponse& _return); + void open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst); + void send_open_txns(const OpenTxnRequest& rqst); + void recv_open_txns(OpenTxnsResponse& _return); + void abort_txn(const AbortTxnRequest& rqst); + void send_abort_txn(const AbortTxnRequest& rqst); + void recv_abort_txn(); + void abort_txns(const AbortTxnsRequest& rqst); + void send_abort_txns(const AbortTxnsRequest& rqst); + void recv_abort_txns(); + void commit_txn(const CommitTxnRequest& rqst); + void send_commit_txn(const CommitTxnRequest& rqst); + void recv_commit_txn(); + void lock(LockResponse& _return, const LockRequest& rqst); + void send_lock(const LockRequest& rqst); + void recv_lock(LockResponse& _return); + void check_lock(LockResponse& _return, const CheckLockRequest& rqst); + void send_check_lock(const CheckLockRequest& rqst); + void recv_check_lock(LockResponse& _return); + void unlock(const UnlockRequest& rqst); + void send_unlock(const UnlockRequest& rqst); + void recv_unlock(); + void show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst); + void send_show_locks(const ShowLocksRequest& rqst); + void recv_show_locks(ShowLocksResponse& _return); + void heartbeat(const HeartbeatRequest& ids); + void send_heartbeat(const HeartbeatRequest& ids); + void recv_heartbeat(); + void heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns); + void send_heartbeat_txn_range(const HeartbeatTxnRangeRequest& txns); + void recv_heartbeat_txn_range(HeartbeatTxnRangeResponse& _return); + void compact(const CompactionRequest& rqst); + void send_compact(const CompactionRequest& rqst); + void recv_compact(); + void compact2(CompactionResponse& _return, const CompactionRequest& rqst); + void send_compact2(const CompactionRequest& rqst); + void recv_compact2(CompactionResponse& _return); + void show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst); + void send_show_compact(const ShowCompactRequest& rqst); + void recv_show_compact(ShowCompactResponse& _return); + void add_dynamic_partitions(const AddDynamicPartitions& rqst); + void send_add_dynamic_partitions(const AddDynamicPartitions& rqst); + void recv_add_dynamic_partitions(); + void get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst); + void send_get_next_notification(const NotificationEventRequest& rqst); + void recv_get_next_notification(NotificationEventResponse& _return); + void get_current_notificationEventId(CurrentNotificationEventId& _return); + void send_get_current_notificationEventId(); + void recv_get_current_notificationEventId(CurrentNotificationEventId& _return); + void fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst); + void send_fire_listener_event(const FireEventRequest& rqst); + void recv_fire_listener_event(FireEventResponse& _return); + void flushCache(); + void send_flushCache(); + void recv_flushCache(); + void cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request); + void send_cm_recycle(const CmRecycleRequest& request); + void recv_cm_recycle(CmRecycleResponse& _return); + void get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req); + void send_get_file_metadata_by_expr(const GetFileMetadataByExprRequest& req); + void recv_get_file_metadata_by_expr(GetFileMetadataByExprResult& _return); + void get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req); + void send_get_file_metadata(const GetFileMetadataRequest& req); + void recv_get_file_metadata(GetFileMetadataResult& _return); + void put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req); + void send_put_file_metadata(const PutFileMetadataRequest& req); + void recv_put_file_metadata(PutFileMetadataResult& _return); + void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req); + void send_clear_file_metadata(const ClearFileMetadataRequest& req); + void recv_clear_file_metadata(ClearFileMetadataResult& _return); + void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req); + void send_cache_file_metadata(const CacheFileMetadataRequest& req); + void recv_cache_file_metadata(CacheFileMetadataResult& _return); + void get_metastore_db_uuid(std::string& _return); + void send_get_metastore_db_uuid(); + void recv_get_metastore_db_uuid(std::string& _return); +}; + +class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceProcessor { + protected: + boost::shared_ptr iface_; + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); + private: + typedef void (ThriftHiveMetastoreProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); + typedef std::map ProcessMap; + ProcessMap processMap_; + void process_getMetaConf(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_setMetaConf(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + 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); + void process_get_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_all_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_alter_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_create_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_type_all(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_fields(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_fields_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_schema_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_create_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_create_table_with_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_primary_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_foreign_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_unique_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_not_null_constraint(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_truncate_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_tables_by_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_table_meta(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_table_objects_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_table_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_table_objects_by_name_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_table_names_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_alter_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_alter_table_with_cascade(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_partitions_pspec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_partitions_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_append_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_append_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_append_partition_by_name_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_partition_by_name_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_partitions_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_exchange_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_exchange_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partition_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partitions_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partitions_pspec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partition_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partitions_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partitions_ps_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partition_names_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_part_specs_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partitions_by_expr(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_num_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partitions_by_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_alter_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_alter_partitions_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_alter_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_rename_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_partition_name_has_valid_characters(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_config_value(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_partition_name_to_vals(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_partition_name_to_spec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_markPartitionForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_isPartitionMarkedForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_alter_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_primary_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_foreign_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_unique_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_not_null_constraints(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_update_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_update_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_table_statistics_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partitions_statistics_req(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_aggr_stats_for(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_set_aggr_stats_for(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_delete_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_delete_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_create_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_alter_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_function(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_all_functions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_create_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_drop_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_role_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_grant_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_revoke_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_list_roles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_grant_revoke_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_principals_in_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_role_grants_for_principal(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_list_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_grant_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_grant_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_set_ugi(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_renew_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_cancel_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_remove_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_all_token_identifiers(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_update_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_remove_master_key(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_master_keys(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_open_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_open_txns_info(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_open_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_abort_txn(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_abort_txns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_commit_txn(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_lock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_check_lock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_unlock(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_show_locks(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_heartbeat(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_heartbeat_txn_range(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_compact(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_compact2(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_show_compact(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_add_dynamic_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_next_notification(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_current_notificationEventId(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_fire_listener_event(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_flushCache(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_cm_recycle(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_file_metadata_by_expr(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_put_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_clear_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_cache_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_metastore_db_uuid(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), + iface_(iface) { + processMap_["getMetaConf"] = &ThriftHiveMetastoreProcessor::process_getMetaConf; + processMap_["setMetaConf"] = &ThriftHiveMetastoreProcessor::process_setMetaConf; + processMap_["create_database"] = &ThriftHiveMetastoreProcessor::process_create_database; + processMap_["get_database"] = &ThriftHiveMetastoreProcessor::process_get_database; + processMap_["drop_database"] = &ThriftHiveMetastoreProcessor::process_drop_database; + processMap_["get_databases"] = &ThriftHiveMetastoreProcessor::process_get_databases; + processMap_["get_all_databases"] = &ThriftHiveMetastoreProcessor::process_get_all_databases; + processMap_["alter_database"] = &ThriftHiveMetastoreProcessor::process_alter_database; + processMap_["get_type"] = &ThriftHiveMetastoreProcessor::process_get_type; + processMap_["create_type"] = &ThriftHiveMetastoreProcessor::process_create_type; + processMap_["drop_type"] = &ThriftHiveMetastoreProcessor::process_drop_type; + processMap_["get_type_all"] = &ThriftHiveMetastoreProcessor::process_get_type_all; + processMap_["get_fields"] = &ThriftHiveMetastoreProcessor::process_get_fields; + processMap_["get_fields_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_get_fields_with_environment_context; + processMap_["get_schema"] = &ThriftHiveMetastoreProcessor::process_get_schema; + processMap_["get_schema_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_get_schema_with_environment_context; + processMap_["create_table"] = &ThriftHiveMetastoreProcessor::process_create_table; + processMap_["create_table_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_create_table_with_environment_context; + processMap_["create_table_with_constraints"] = &ThriftHiveMetastoreProcessor::process_create_table_with_constraints; + processMap_["drop_constraint"] = &ThriftHiveMetastoreProcessor::process_drop_constraint; + processMap_["add_primary_key"] = &ThriftHiveMetastoreProcessor::process_add_primary_key; + processMap_["add_foreign_key"] = &ThriftHiveMetastoreProcessor::process_add_foreign_key; + processMap_["add_unique_constraint"] = &ThriftHiveMetastoreProcessor::process_add_unique_constraint; + processMap_["add_not_null_constraint"] = &ThriftHiveMetastoreProcessor::process_add_not_null_constraint; + processMap_["drop_table"] = &ThriftHiveMetastoreProcessor::process_drop_table; + processMap_["drop_table_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_drop_table_with_environment_context; + processMap_["truncate_table"] = &ThriftHiveMetastoreProcessor::process_truncate_table; + processMap_["get_tables"] = &ThriftHiveMetastoreProcessor::process_get_tables; + processMap_["get_tables_by_type"] = &ThriftHiveMetastoreProcessor::process_get_tables_by_type; + processMap_["get_table_meta"] = &ThriftHiveMetastoreProcessor::process_get_table_meta; + processMap_["get_all_tables"] = &ThriftHiveMetastoreProcessor::process_get_all_tables; + processMap_["get_table"] = &ThriftHiveMetastoreProcessor::process_get_table; + processMap_["get_table_objects_by_name"] = &ThriftHiveMetastoreProcessor::process_get_table_objects_by_name; + processMap_["get_table_req"] = &ThriftHiveMetastoreProcessor::process_get_table_req; + processMap_["get_table_objects_by_name_req"] = &ThriftHiveMetastoreProcessor::process_get_table_objects_by_name_req; + processMap_["get_table_names_by_filter"] = &ThriftHiveMetastoreProcessor::process_get_table_names_by_filter; + processMap_["alter_table"] = &ThriftHiveMetastoreProcessor::process_alter_table; + processMap_["alter_table_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_alter_table_with_environment_context; + processMap_["alter_table_with_cascade"] = &ThriftHiveMetastoreProcessor::process_alter_table_with_cascade; + processMap_["add_partition"] = &ThriftHiveMetastoreProcessor::process_add_partition; + processMap_["add_partition_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_add_partition_with_environment_context; + processMap_["add_partitions"] = &ThriftHiveMetastoreProcessor::process_add_partitions; + processMap_["add_partitions_pspec"] = &ThriftHiveMetastoreProcessor::process_add_partitions_pspec; + processMap_["append_partition"] = &ThriftHiveMetastoreProcessor::process_append_partition; + processMap_["add_partitions_req"] = &ThriftHiveMetastoreProcessor::process_add_partitions_req; + processMap_["append_partition_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_append_partition_with_environment_context; + processMap_["append_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_append_partition_by_name; + processMap_["append_partition_by_name_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_append_partition_by_name_with_environment_context; + processMap_["drop_partition"] = &ThriftHiveMetastoreProcessor::process_drop_partition; + processMap_["drop_partition_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_drop_partition_with_environment_context; + processMap_["drop_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_drop_partition_by_name; + processMap_["drop_partition_by_name_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_drop_partition_by_name_with_environment_context; + processMap_["drop_partitions_req"] = &ThriftHiveMetastoreProcessor::process_drop_partitions_req; + processMap_["get_partition"] = &ThriftHiveMetastoreProcessor::process_get_partition; + processMap_["exchange_partition"] = &ThriftHiveMetastoreProcessor::process_exchange_partition; + processMap_["exchange_partitions"] = &ThriftHiveMetastoreProcessor::process_exchange_partitions; + processMap_["get_partition_with_auth"] = &ThriftHiveMetastoreProcessor::process_get_partition_with_auth; + processMap_["get_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_get_partition_by_name; + processMap_["get_partitions"] = &ThriftHiveMetastoreProcessor::process_get_partitions; + processMap_["get_partitions_with_auth"] = &ThriftHiveMetastoreProcessor::process_get_partitions_with_auth; + processMap_["get_partitions_pspec"] = &ThriftHiveMetastoreProcessor::process_get_partitions_pspec; + processMap_["get_partition_names"] = &ThriftHiveMetastoreProcessor::process_get_partition_names; + processMap_["get_partitions_ps"] = &ThriftHiveMetastoreProcessor::process_get_partitions_ps; + processMap_["get_partitions_ps_with_auth"] = &ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth; + processMap_["get_partition_names_ps"] = &ThriftHiveMetastoreProcessor::process_get_partition_names_ps; + processMap_["get_partitions_by_filter"] = &ThriftHiveMetastoreProcessor::process_get_partitions_by_filter; + processMap_["get_part_specs_by_filter"] = &ThriftHiveMetastoreProcessor::process_get_part_specs_by_filter; + processMap_["get_partitions_by_expr"] = &ThriftHiveMetastoreProcessor::process_get_partitions_by_expr; + processMap_["get_num_partitions_by_filter"] = &ThriftHiveMetastoreProcessor::process_get_num_partitions_by_filter; + processMap_["get_partitions_by_names"] = &ThriftHiveMetastoreProcessor::process_get_partitions_by_names; + processMap_["alter_partition"] = &ThriftHiveMetastoreProcessor::process_alter_partition; + processMap_["alter_partitions"] = &ThriftHiveMetastoreProcessor::process_alter_partitions; + processMap_["alter_partitions_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_alter_partitions_with_environment_context; + processMap_["alter_partition_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_alter_partition_with_environment_context; + processMap_["rename_partition"] = &ThriftHiveMetastoreProcessor::process_rename_partition; + processMap_["partition_name_has_valid_characters"] = &ThriftHiveMetastoreProcessor::process_partition_name_has_valid_characters; + processMap_["get_config_value"] = &ThriftHiveMetastoreProcessor::process_get_config_value; + processMap_["partition_name_to_vals"] = &ThriftHiveMetastoreProcessor::process_partition_name_to_vals; + processMap_["partition_name_to_spec"] = &ThriftHiveMetastoreProcessor::process_partition_name_to_spec; + processMap_["markPartitionForEvent"] = &ThriftHiveMetastoreProcessor::process_markPartitionForEvent; + processMap_["isPartitionMarkedForEvent"] = &ThriftHiveMetastoreProcessor::process_isPartitionMarkedForEvent; + processMap_["add_index"] = &ThriftHiveMetastoreProcessor::process_add_index; + processMap_["alter_index"] = &ThriftHiveMetastoreProcessor::process_alter_index; + processMap_["drop_index_by_name"] = &ThriftHiveMetastoreProcessor::process_drop_index_by_name; + processMap_["get_index_by_name"] = &ThriftHiveMetastoreProcessor::process_get_index_by_name; + processMap_["get_indexes"] = &ThriftHiveMetastoreProcessor::process_get_indexes; + processMap_["get_index_names"] = &ThriftHiveMetastoreProcessor::process_get_index_names; + processMap_["get_primary_keys"] = &ThriftHiveMetastoreProcessor::process_get_primary_keys; + processMap_["get_foreign_keys"] = &ThriftHiveMetastoreProcessor::process_get_foreign_keys; + processMap_["get_unique_constraints"] = &ThriftHiveMetastoreProcessor::process_get_unique_constraints; + processMap_["get_not_null_constraints"] = &ThriftHiveMetastoreProcessor::process_get_not_null_constraints; + processMap_["update_table_column_statistics"] = &ThriftHiveMetastoreProcessor::process_update_table_column_statistics; + processMap_["update_partition_column_statistics"] = &ThriftHiveMetastoreProcessor::process_update_partition_column_statistics; + processMap_["get_table_column_statistics"] = &ThriftHiveMetastoreProcessor::process_get_table_column_statistics; + processMap_["get_partition_column_statistics"] = &ThriftHiveMetastoreProcessor::process_get_partition_column_statistics; + processMap_["get_table_statistics_req"] = &ThriftHiveMetastoreProcessor::process_get_table_statistics_req; + processMap_["get_partitions_statistics_req"] = &ThriftHiveMetastoreProcessor::process_get_partitions_statistics_req; + processMap_["get_aggr_stats_for"] = &ThriftHiveMetastoreProcessor::process_get_aggr_stats_for; + processMap_["set_aggr_stats_for"] = &ThriftHiveMetastoreProcessor::process_set_aggr_stats_for; + processMap_["delete_partition_column_statistics"] = &ThriftHiveMetastoreProcessor::process_delete_partition_column_statistics; + processMap_["delete_table_column_statistics"] = &ThriftHiveMetastoreProcessor::process_delete_table_column_statistics; + processMap_["create_function"] = &ThriftHiveMetastoreProcessor::process_create_function; + processMap_["drop_function"] = &ThriftHiveMetastoreProcessor::process_drop_function; + processMap_["alter_function"] = &ThriftHiveMetastoreProcessor::process_alter_function; + processMap_["get_functions"] = &ThriftHiveMetastoreProcessor::process_get_functions; + processMap_["get_function"] = &ThriftHiveMetastoreProcessor::process_get_function; + processMap_["get_all_functions"] = &ThriftHiveMetastoreProcessor::process_get_all_functions; + processMap_["create_role"] = &ThriftHiveMetastoreProcessor::process_create_role; + processMap_["drop_role"] = &ThriftHiveMetastoreProcessor::process_drop_role; + processMap_["get_role_names"] = &ThriftHiveMetastoreProcessor::process_get_role_names; + processMap_["grant_role"] = &ThriftHiveMetastoreProcessor::process_grant_role; + processMap_["revoke_role"] = &ThriftHiveMetastoreProcessor::process_revoke_role; + processMap_["list_roles"] = &ThriftHiveMetastoreProcessor::process_list_roles; + processMap_["grant_revoke_role"] = &ThriftHiveMetastoreProcessor::process_grant_revoke_role; + processMap_["get_principals_in_role"] = &ThriftHiveMetastoreProcessor::process_get_principals_in_role; + processMap_["get_role_grants_for_principal"] = &ThriftHiveMetastoreProcessor::process_get_role_grants_for_principal; + processMap_["get_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_privilege_set; + processMap_["list_privileges"] = &ThriftHiveMetastoreProcessor::process_list_privileges; + processMap_["grant_privileges"] = &ThriftHiveMetastoreProcessor::process_grant_privileges; + processMap_["revoke_privileges"] = &ThriftHiveMetastoreProcessor::process_revoke_privileges; + processMap_["grant_revoke_privileges"] = &ThriftHiveMetastoreProcessor::process_grant_revoke_privileges; + processMap_["set_ugi"] = &ThriftHiveMetastoreProcessor::process_set_ugi; + processMap_["get_delegation_token"] = &ThriftHiveMetastoreProcessor::process_get_delegation_token; + processMap_["renew_delegation_token"] = &ThriftHiveMetastoreProcessor::process_renew_delegation_token; + processMap_["cancel_delegation_token"] = &ThriftHiveMetastoreProcessor::process_cancel_delegation_token; + processMap_["add_token"] = &ThriftHiveMetastoreProcessor::process_add_token; + processMap_["remove_token"] = &ThriftHiveMetastoreProcessor::process_remove_token; + processMap_["get_token"] = &ThriftHiveMetastoreProcessor::process_get_token; + processMap_["get_all_token_identifiers"] = &ThriftHiveMetastoreProcessor::process_get_all_token_identifiers; + processMap_["add_master_key"] = &ThriftHiveMetastoreProcessor::process_add_master_key; + processMap_["update_master_key"] = &ThriftHiveMetastoreProcessor::process_update_master_key; + processMap_["remove_master_key"] = &ThriftHiveMetastoreProcessor::process_remove_master_key; + processMap_["get_master_keys"] = &ThriftHiveMetastoreProcessor::process_get_master_keys; + processMap_["get_open_txns"] = &ThriftHiveMetastoreProcessor::process_get_open_txns; + processMap_["get_open_txns_info"] = &ThriftHiveMetastoreProcessor::process_get_open_txns_info; + processMap_["open_txns"] = &ThriftHiveMetastoreProcessor::process_open_txns; + processMap_["abort_txn"] = &ThriftHiveMetastoreProcessor::process_abort_txn; + processMap_["abort_txns"] = &ThriftHiveMetastoreProcessor::process_abort_txns; + processMap_["commit_txn"] = &ThriftHiveMetastoreProcessor::process_commit_txn; + processMap_["lock"] = &ThriftHiveMetastoreProcessor::process_lock; + processMap_["check_lock"] = &ThriftHiveMetastoreProcessor::process_check_lock; + processMap_["unlock"] = &ThriftHiveMetastoreProcessor::process_unlock; + processMap_["show_locks"] = &ThriftHiveMetastoreProcessor::process_show_locks; + processMap_["heartbeat"] = &ThriftHiveMetastoreProcessor::process_heartbeat; + processMap_["heartbeat_txn_range"] = &ThriftHiveMetastoreProcessor::process_heartbeat_txn_range; + processMap_["compact"] = &ThriftHiveMetastoreProcessor::process_compact; + processMap_["compact2"] = &ThriftHiveMetastoreProcessor::process_compact2; + processMap_["show_compact"] = &ThriftHiveMetastoreProcessor::process_show_compact; + processMap_["add_dynamic_partitions"] = &ThriftHiveMetastoreProcessor::process_add_dynamic_partitions; + processMap_["get_next_notification"] = &ThriftHiveMetastoreProcessor::process_get_next_notification; + processMap_["get_current_notificationEventId"] = &ThriftHiveMetastoreProcessor::process_get_current_notificationEventId; + processMap_["fire_listener_event"] = &ThriftHiveMetastoreProcessor::process_fire_listener_event; + processMap_["flushCache"] = &ThriftHiveMetastoreProcessor::process_flushCache; + processMap_["cm_recycle"] = &ThriftHiveMetastoreProcessor::process_cm_recycle; + processMap_["get_file_metadata_by_expr"] = &ThriftHiveMetastoreProcessor::process_get_file_metadata_by_expr; + processMap_["get_file_metadata"] = &ThriftHiveMetastoreProcessor::process_get_file_metadata; + processMap_["put_file_metadata"] = &ThriftHiveMetastoreProcessor::process_put_file_metadata; + processMap_["clear_file_metadata"] = &ThriftHiveMetastoreProcessor::process_clear_file_metadata; + processMap_["cache_file_metadata"] = &ThriftHiveMetastoreProcessor::process_cache_file_metadata; + processMap_["get_metastore_db_uuid"] = &ThriftHiveMetastoreProcessor::process_get_metastore_db_uuid; + } + + virtual ~ThriftHiveMetastoreProcessor() {} +}; + +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); + } + } + virtual ~ThriftHiveMetastoreMultiface() {} + protected: + std::vector > ifaces_; + ThriftHiveMetastoreMultiface() {} + void add(boost::shared_ptr iface) { + ::facebook::fb303::FacebookServiceMultiface::add(iface); + ifaces_.push_back(iface); + } + public: + void getMetaConf(std::string& _return, const std::string& key) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->getMetaConf(_return, key); + } + ifaces_[i]->getMetaConf(_return, key); + return; + } + + void setMetaConf(const std::string& key, const std::string& value) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->setMetaConf(key, value); + } + ifaces_[i]->setMetaConf(key, value); + } + + void create_database(const Database& database) { + size_t sz = ifaces_.size(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_fields_with_environment_context(_return, db_name, table_name, environment_context); + } + ifaces_[i]->get_fields_with_environment_context(_return, db_name, table_name, environment_context); + return; + } + + void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { + size_t sz = ifaces_.size(); + 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 get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_schema_with_environment_context(_return, db_name, table_name, environment_context); + } + ifaces_[i]->get_schema_with_environment_context(_return, db_name, table_name, environment_context); + return; + } + + void create_table(const Table& tbl) { + size_t sz = ifaces_.size(); + 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(); + 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 create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints); + } + ifaces_[i]->create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints); + } + + void drop_constraint(const DropConstraintRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_constraint(req); + } + ifaces_[i]->drop_constraint(req); + } + + void add_primary_key(const AddPrimaryKeyRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_primary_key(req); + } + ifaces_[i]->add_primary_key(req); + } + + void add_foreign_key(const AddForeignKeyRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_foreign_key(req); + } + ifaces_[i]->add_foreign_key(req); + } + + void add_unique_constraint(const AddUniqueConstraintRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_unique_constraint(req); + } + ifaces_[i]->add_unique_constraint(req); + } + + void add_not_null_constraint(const AddNotNullConstraintRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_not_null_constraint(req); + } + ifaces_[i]->add_not_null_constraint(req); + } + + void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_table(dbname, name, deleteData); + } + ifaces_[i]->drop_table(dbname, name, deleteData); + } + + void drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_table_with_environment_context(dbname, name, deleteData, environment_context); + } + ifaces_[i]->drop_table_with_environment_context(dbname, name, deleteData, environment_context); + } + + void truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->truncate_table(dbName, tableName, partNames); + } + ifaces_[i]->truncate_table(dbName, tableName, partNames); + } + + void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { + size_t sz = ifaces_.size(); + 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_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_tables_by_type(_return, db_name, pattern, tableType); + } + ifaces_[i]->get_tables_by_type(_return, db_name, pattern, tableType); + return; + } + + void get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_table_meta(_return, db_patterns, tbl_patterns, tbl_types); + } + ifaces_[i]->get_table_meta(_return, db_patterns, tbl_patterns, tbl_types); + return; + } + + void get_all_tables(std::vector & _return, const std::string& db_name) { + size_t sz = ifaces_.size(); + 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(); + 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(); + 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_req(GetTableResult& _return, const GetTableRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_table_req(_return, req); + } + ifaces_[i]->get_table_req(_return, req); + return; + } + + void get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_table_objects_by_name_req(_return, req); + } + ifaces_[i]->get_table_objects_by_name_req(_return, req); + 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(); + 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(); + 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(); + 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 alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade); + } + ifaces_[i]->alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade); + } + + void add_partition(Partition& _return, const Partition& new_part) { + size_t sz = ifaces_.size(); + 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(); + 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(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_partitions(new_parts); + } + return ifaces_[i]->add_partitions(new_parts); + } + + int32_t add_partitions_pspec(const std::vector & new_parts) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_partitions_pspec(new_parts); + } + return ifaces_[i]->add_partitions_pspec(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(); + 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 add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_partitions_req(_return, request); + } + ifaces_[i]->add_partitions_req(_return, request); + return; + } + + void append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->append_partition_with_environment_context(_return, db_name, tbl_name, part_vals, environment_context); + } + ifaces_[i]->append_partition_with_environment_context(_return, db_name, tbl_name, part_vals, environment_context); + 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(); + 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; + } + + void append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->append_partition_by_name_with_environment_context(_return, db_name, tbl_name, part_name, environment_context); + } + ifaces_[i]->append_partition_by_name_with_environment_context(_return, db_name, tbl_name, part_name, environment_context); + 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(); + 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_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); + } + return ifaces_[i]->drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); + } + + 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(); + 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); + } + + bool drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); + } + return ifaces_[i]->drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); + } + + void drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_partitions_req(_return, req); + } + ifaces_[i]->drop_partitions_req(_return, req); + return; + } + + 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(); + 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 exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->exchange_partition(_return, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); + } + ifaces_[i]->exchange_partition(_return, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); + return; + } + + void exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->exchange_partitions(_return, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); + } + ifaces_[i]->exchange_partitions(_return, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); + 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(); + 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(); + 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(); + 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(); + 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_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_pspec(_return, db_name, tbl_name, max_parts); + } + ifaces_[i]->get_partitions_pspec(_return, db_name, tbl_name, max_parts); + 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(); + 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(); + 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(); + 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(); + 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(); + 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_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_part_specs_by_filter(_return, db_name, tbl_name, filter, max_parts); + } + ifaces_[i]->get_part_specs_by_filter(_return, db_name, tbl_name, filter, max_parts); + return; + } + + void get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_by_expr(_return, req); + } + ifaces_[i]->get_partitions_by_expr(_return, req); + return; + } + + int32_t get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_num_partitions_by_filter(db_name, tbl_name, filter); + } + return ifaces_[i]->get_num_partitions_by_filter(db_name, tbl_name, filter); + } + + 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(); + 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(); + 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(); + 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_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context); + } + ifaces_[i]->alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context); + } + + 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(); + 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(); + 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); + } + + bool partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->partition_name_has_valid_characters(part_vals, throw_exception); + } + return ifaces_[i]->partition_name_has_valid_characters(part_vals, throw_exception); + } + + void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { + size_t sz = ifaces_.size(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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; + } + + void get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_primary_keys(_return, request); + } + ifaces_[i]->get_primary_keys(_return, request); + return; + } + + void get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_foreign_keys(_return, request); + } + ifaces_[i]->get_foreign_keys(_return, request); + return; + } + + void get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_unique_constraints(_return, request); + } + ifaces_[i]->get_unique_constraints(_return, request); + return; + } + + void get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_not_null_constraints(_return, request); + } + ifaces_[i]->get_not_null_constraints(_return, request); + return; + } + + bool update_table_column_statistics(const ColumnStatistics& stats_obj) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->update_table_column_statistics(stats_obj); + } + return ifaces_[i]->update_table_column_statistics(stats_obj); + } + + bool update_partition_column_statistics(const ColumnStatistics& stats_obj) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->update_partition_column_statistics(stats_obj); + } + return ifaces_[i]->update_partition_column_statistics(stats_obj); + } + + void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_table_column_statistics(_return, db_name, tbl_name, col_name); + } + ifaces_[i]->get_table_column_statistics(_return, db_name, tbl_name, col_name); + return; + } + + void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partition_column_statistics(_return, db_name, tbl_name, part_name, col_name); + } + ifaces_[i]->get_partition_column_statistics(_return, db_name, tbl_name, part_name, col_name); + return; + } + + void get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_table_statistics_req(_return, request); + } + ifaces_[i]->get_table_statistics_req(_return, request); + return; + } + + void get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_partitions_statistics_req(_return, request); + } + ifaces_[i]->get_partitions_statistics_req(_return, request); + return; + } + + void get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_aggr_stats_for(_return, request); + } + ifaces_[i]->get_aggr_stats_for(_return, request); + return; + } + + bool set_aggr_stats_for(const SetPartitionsStatsRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->set_aggr_stats_for(request); + } + return ifaces_[i]->set_aggr_stats_for(request); + } + + bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); + } + return ifaces_[i]->delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); + } + + bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->delete_table_column_statistics(db_name, tbl_name, col_name); + } + return ifaces_[i]->delete_table_column_statistics(db_name, tbl_name, col_name); + } + + void create_function(const Function& func) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->create_function(func); + } + ifaces_[i]->create_function(func); + } + + void drop_function(const std::string& dbName, const std::string& funcName) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->drop_function(dbName, funcName); + } + ifaces_[i]->drop_function(dbName, funcName); + } + + void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->alter_function(dbName, funcName, newFunc); + } + ifaces_[i]->alter_function(dbName, funcName, newFunc); + } + + void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_functions(_return, dbName, pattern); + } + ifaces_[i]->get_functions(_return, dbName, pattern); + return; + } + + void get_function(Function& _return, const std::string& dbName, const std::string& funcName) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_function(_return, dbName, funcName); + } + ifaces_[i]->get_function(_return, dbName, funcName); + return; + } + + void get_all_functions(GetAllFunctionsResponse& _return) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_all_functions(_return); + } + ifaces_[i]->get_all_functions(_return); + return; + } + + bool create_role(const Role& role) { + size_t sz = ifaces_.size(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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 grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->grant_revoke_role(_return, request); + } + ifaces_[i]->grant_revoke_role(_return, request); + return; + } + + void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_principals_in_role(_return, request); + } + ifaces_[i]->get_principals_in_role(_return, request); + return; + } + + void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_role_grants_for_principal(_return, request); + } + ifaces_[i]->get_role_grants_for_principal(_return, request); + 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(); + 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(); + 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(); + 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(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->revoke_privileges(privileges); + } + return ifaces_[i]->revoke_privileges(privileges); + } + + void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->grant_revoke_privileges(_return, request); + } + ifaces_[i]->grant_revoke_privileges(_return, request); + return; + } + + void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) { + size_t sz = ifaces_.size(); + 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(); + 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(); + 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(); + 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); + } + + bool add_token(const std::string& token_identifier, const std::string& delegation_token) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_token(token_identifier, delegation_token); + } + return ifaces_[i]->add_token(token_identifier, delegation_token); + } + + bool remove_token(const std::string& token_identifier) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->remove_token(token_identifier); + } + return ifaces_[i]->remove_token(token_identifier); + } + + void get_token(std::string& _return, const std::string& token_identifier) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_token(_return, token_identifier); + } + ifaces_[i]->get_token(_return, token_identifier); + return; + } + + void get_all_token_identifiers(std::vector & _return) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_all_token_identifiers(_return); + } + ifaces_[i]->get_all_token_identifiers(_return); + return; + } + + int32_t add_master_key(const std::string& key) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_master_key(key); + } + return ifaces_[i]->add_master_key(key); + } + + void update_master_key(const int32_t seq_number, const std::string& key) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->update_master_key(seq_number, key); + } + ifaces_[i]->update_master_key(seq_number, key); + } + + bool remove_master_key(const int32_t key_seq) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->remove_master_key(key_seq); + } + return ifaces_[i]->remove_master_key(key_seq); + } + + void get_master_keys(std::vector & _return) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_master_keys(_return); + } + ifaces_[i]->get_master_keys(_return); + return; + } + + void get_open_txns(GetOpenTxnsResponse& _return) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_open_txns(_return); + } + ifaces_[i]->get_open_txns(_return); + return; + } + + void get_open_txns_info(GetOpenTxnsInfoResponse& _return) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_open_txns_info(_return); + } + ifaces_[i]->get_open_txns_info(_return); + return; + } + + void open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->open_txns(_return, rqst); + } + ifaces_[i]->open_txns(_return, rqst); + return; + } + + void abort_txn(const AbortTxnRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->abort_txn(rqst); + } + ifaces_[i]->abort_txn(rqst); + } + + void abort_txns(const AbortTxnsRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->abort_txns(rqst); + } + ifaces_[i]->abort_txns(rqst); + } + + void commit_txn(const CommitTxnRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->commit_txn(rqst); + } + ifaces_[i]->commit_txn(rqst); + } + + void lock(LockResponse& _return, const LockRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->lock(_return, rqst); + } + ifaces_[i]->lock(_return, rqst); + return; + } + + void check_lock(LockResponse& _return, const CheckLockRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->check_lock(_return, rqst); + } + ifaces_[i]->check_lock(_return, rqst); + return; + } + + void unlock(const UnlockRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->unlock(rqst); + } + ifaces_[i]->unlock(rqst); + } + + void show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->show_locks(_return, rqst); + } + ifaces_[i]->show_locks(_return, rqst); + return; + } + + void heartbeat(const HeartbeatRequest& ids) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->heartbeat(ids); + } + ifaces_[i]->heartbeat(ids); + } + + void heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->heartbeat_txn_range(_return, txns); + } + ifaces_[i]->heartbeat_txn_range(_return, txns); + return; + } + + void compact(const CompactionRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->compact(rqst); + } + ifaces_[i]->compact(rqst); + } + + void compact2(CompactionResponse& _return, const CompactionRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->compact2(_return, rqst); + } + ifaces_[i]->compact2(_return, rqst); + return; + } + + void show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->show_compact(_return, rqst); + } + ifaces_[i]->show_compact(_return, rqst); + return; + } + + void add_dynamic_partitions(const AddDynamicPartitions& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->add_dynamic_partitions(rqst); + } + ifaces_[i]->add_dynamic_partitions(rqst); + } + + void get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_next_notification(_return, rqst); + } + ifaces_[i]->get_next_notification(_return, rqst); + return; + } + + void get_current_notificationEventId(CurrentNotificationEventId& _return) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_current_notificationEventId(_return); + } + ifaces_[i]->get_current_notificationEventId(_return); + return; + } + + void fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->fire_listener_event(_return, rqst); + } + ifaces_[i]->fire_listener_event(_return, rqst); + return; + } + + void flushCache() { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->flushCache(); + } + ifaces_[i]->flushCache(); + } + + void cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->cm_recycle(_return, request); + } + ifaces_[i]->cm_recycle(_return, request); + return; + } + + void get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_file_metadata_by_expr(_return, req); + } + ifaces_[i]->get_file_metadata_by_expr(_return, req); + return; + } + + void get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_file_metadata(_return, req); + } + ifaces_[i]->get_file_metadata(_return, req); + return; + } + + void put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->put_file_metadata(_return, req); + } + ifaces_[i]->put_file_metadata(_return, req); + return; + } + + void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->clear_file_metadata(_return, req); + } + ifaces_[i]->clear_file_metadata(_return, req); + return; + } + + void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->cache_file_metadata(_return, req); + } + ifaces_[i]->cache_file_metadata(_return, req); + return; + } + + void get_metastore_db_uuid(std::string& _return) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->get_metastore_db_uuid(_return); + } + ifaces_[i]->get_metastore_db_uuid(_return); + return; + } + +}; + +// The 'concurrent' client is a thread safe client that correctly handles +// out of order responses. It is slower than the regular client, so should +// only be used when you need to share a connection among multiple threads +class ThriftHiveMetastoreConcurrentClient : virtual public ThriftHiveMetastoreIf, public ::facebook::fb303::FacebookServiceConcurrentClient { + public: + ThriftHiveMetastoreConcurrentClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : + ::facebook::fb303::FacebookServiceConcurrentClient(prot, prot) {} + ThriftHiveMetastoreConcurrentClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : ::facebook::fb303::FacebookServiceConcurrentClient(iprot, oprot) {} + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void getMetaConf(std::string& _return, const std::string& key); + int32_t send_getMetaConf(const std::string& key); + void recv_getMetaConf(std::string& _return, const int32_t seqid); + void setMetaConf(const std::string& key, const std::string& value); + int32_t send_setMetaConf(const std::string& key, const std::string& value); + void recv_setMetaConf(const int32_t seqid); + void create_database(const Database& database); + int32_t send_create_database(const Database& database); + void recv_create_database(const int32_t seqid); + void get_database(Database& _return, const std::string& name); + int32_t send_get_database(const std::string& name); + void recv_get_database(Database& _return, const int32_t seqid); + void drop_database(const std::string& name, const bool deleteData, const bool cascade); + int32_t send_drop_database(const std::string& name, const bool deleteData, const bool cascade); + void recv_drop_database(const int32_t seqid); + void get_databases(std::vector & _return, const std::string& pattern); + int32_t send_get_databases(const std::string& pattern); + void recv_get_databases(std::vector & _return, const int32_t seqid); + void get_all_databases(std::vector & _return); + int32_t send_get_all_databases(); + void recv_get_all_databases(std::vector & _return, const int32_t seqid); + void alter_database(const std::string& dbname, const Database& db); + int32_t send_alter_database(const std::string& dbname, const Database& db); + void recv_alter_database(const int32_t seqid); + void get_type(Type& _return, const std::string& name); + int32_t send_get_type(const std::string& name); + void recv_get_type(Type& _return, const int32_t seqid); + bool create_type(const Type& type); + int32_t send_create_type(const Type& type); + bool recv_create_type(const int32_t seqid); + bool drop_type(const std::string& type); + int32_t send_drop_type(const std::string& type); + bool recv_drop_type(const int32_t seqid); + void get_type_all(std::map & _return, const std::string& name); + int32_t send_get_type_all(const std::string& name); + void recv_get_type_all(std::map & _return, const int32_t seqid); + void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name); + int32_t send_get_fields(const std::string& db_name, const std::string& table_name); + void recv_get_fields(std::vector & _return, const int32_t seqid); + void get_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); + int32_t send_get_fields_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); + void recv_get_fields_with_environment_context(std::vector & _return, const int32_t seqid); + void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name); + int32_t send_get_schema(const std::string& db_name, const std::string& table_name); + void recv_get_schema(std::vector & _return, const int32_t seqid); + void get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); + int32_t send_get_schema_with_environment_context(const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context); + void recv_get_schema_with_environment_context(std::vector & _return, const int32_t seqid); + void create_table(const Table& tbl); + int32_t send_create_table(const Table& tbl); + void recv_create_table(const int32_t seqid); + void create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context); + int32_t send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context); + void recv_create_table_with_environment_context(const int32_t seqid); + void create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints); + int32_t send_create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints); + void recv_create_table_with_constraints(const int32_t seqid); + void drop_constraint(const DropConstraintRequest& req); + int32_t send_drop_constraint(const DropConstraintRequest& req); + void recv_drop_constraint(const int32_t seqid); + void add_primary_key(const AddPrimaryKeyRequest& req); + int32_t send_add_primary_key(const AddPrimaryKeyRequest& req); + void recv_add_primary_key(const int32_t seqid); + void add_foreign_key(const AddForeignKeyRequest& req); + int32_t send_add_foreign_key(const AddForeignKeyRequest& req); + void recv_add_foreign_key(const int32_t seqid); + void add_unique_constraint(const AddUniqueConstraintRequest& req); + int32_t send_add_unique_constraint(const AddUniqueConstraintRequest& req); + void recv_add_unique_constraint(const int32_t seqid); + void add_not_null_constraint(const AddNotNullConstraintRequest& req); + int32_t send_add_not_null_constraint(const AddNotNullConstraintRequest& req); + void recv_add_not_null_constraint(const int32_t seqid); + void drop_table(const std::string& dbname, const std::string& name, const bool deleteData); + int32_t send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData); + void recv_drop_table(const int32_t seqid); + void drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context); + int32_t send_drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context); + void recv_drop_table_with_environment_context(const int32_t seqid); + void truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames); + int32_t send_truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames); + void recv_truncate_table(const int32_t seqid); + void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern); + int32_t send_get_tables(const std::string& db_name, const std::string& pattern); + void recv_get_tables(std::vector & _return, const int32_t seqid); + void get_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType); + int32_t send_get_tables_by_type(const std::string& db_name, const std::string& pattern, const std::string& tableType); + void recv_get_tables_by_type(std::vector & _return, const int32_t seqid); + void get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types); + int32_t send_get_table_meta(const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types); + void recv_get_table_meta(std::vector & _return, const int32_t seqid); + void get_all_tables(std::vector & _return, const std::string& db_name); + int32_t send_get_all_tables(const std::string& db_name); + void recv_get_all_tables(std::vector & _return, const int32_t seqid); + void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name); + int32_t send_get_table(const std::string& dbname, const std::string& tbl_name); + void recv_get_table(Table& _return, const int32_t seqid); + void get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names); + int32_t send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names); + void recv_get_table_objects_by_name(std::vector
& _return, const int32_t seqid); + void get_table_req(GetTableResult& _return, const GetTableRequest& req); + int32_t send_get_table_req(const GetTableRequest& req); + void recv_get_table_req(GetTableResult& _return, const int32_t seqid); + void get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req); + int32_t send_get_table_objects_by_name_req(const GetTablesRequest& req); + void recv_get_table_objects_by_name_req(GetTablesResult& _return, const int32_t seqid); + void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables); + int32_t send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables); + void recv_get_table_names_by_filter(std::vector & _return, const int32_t seqid); + void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); + int32_t send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); + void recv_alter_table(const int32_t seqid); + void alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context); + int32_t send_alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context); + void recv_alter_table_with_environment_context(const int32_t seqid); + void alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade); + int32_t send_alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade); + void recv_alter_table_with_cascade(const int32_t seqid); + void add_partition(Partition& _return, const Partition& new_part); + int32_t send_add_partition(const Partition& new_part); + void recv_add_partition(Partition& _return, const int32_t seqid); + void add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context); + int32_t send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context); + void recv_add_partition_with_environment_context(Partition& _return, const int32_t seqid); + int32_t add_partitions(const std::vector & new_parts); + int32_t send_add_partitions(const std::vector & new_parts); + int32_t recv_add_partitions(const int32_t seqid); + int32_t add_partitions_pspec(const std::vector & new_parts); + int32_t send_add_partitions_pspec(const std::vector & new_parts); + int32_t recv_add_partitions_pspec(const int32_t seqid); + void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + int32_t send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void recv_append_partition(Partition& _return, const int32_t seqid); + void add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request); + int32_t send_add_partitions_req(const AddPartitionsRequest& request); + void recv_add_partitions_req(AddPartitionsResult& _return, const int32_t seqid); + void append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context); + int32_t send_append_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context); + void recv_append_partition_with_environment_context(Partition& _return, const int32_t seqid); + void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + int32_t send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void recv_append_partition_by_name(Partition& _return, const int32_t seqid); + void append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context); + int32_t send_append_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context); + void recv_append_partition_by_name_with_environment_context(Partition& _return, const int32_t seqid); + bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); + int32_t send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); + bool recv_drop_partition(const int32_t seqid); + bool drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context); + int32_t send_drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context); + bool recv_drop_partition_with_environment_context(const int32_t seqid); + bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); + int32_t send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); + bool recv_drop_partition_by_name(const int32_t seqid); + bool drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context); + int32_t send_drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context); + bool recv_drop_partition_by_name_with_environment_context(const int32_t seqid); + void drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req); + int32_t send_drop_partitions_req(const DropPartitionsRequest& req); + void recv_drop_partitions_req(DropPartitionsResult& _return, const int32_t seqid); + void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + int32_t send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void recv_get_partition(Partition& _return, const int32_t seqid); + void exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); + int32_t send_exchange_partition(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); + void recv_exchange_partition(Partition& _return, const int32_t seqid); + void exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); + int32_t send_exchange_partitions(const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name); + void recv_exchange_partitions(std::vector & _return, const int32_t seqid); + 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); + int32_t send_get_partition_with_auth(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); + void recv_get_partition_with_auth(Partition& _return, const int32_t seqid); + void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + int32_t send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void recv_get_partition_by_name(Partition& _return, const int32_t seqid); + void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + int32_t send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void recv_get_partitions(std::vector & _return, const int32_t seqid); + 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); + int32_t send_get_partitions_with_auth(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); + void recv_get_partitions_with_auth(std::vector & _return, const int32_t seqid); + void get_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts); + int32_t send_get_partitions_pspec(const std::string& db_name, const std::string& tbl_name, const int32_t max_parts); + void recv_get_partitions_pspec(std::vector & _return, const int32_t seqid); + void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + int32_t send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void recv_get_partition_names(std::vector & _return, const int32_t seqid); + 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); + int32_t send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void recv_get_partitions_ps(std::vector & _return, const int32_t seqid); + 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); + int32_t send_get_partitions_ps_with_auth(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); + void recv_get_partitions_ps_with_auth(std::vector & _return, const int32_t seqid); + 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); + int32_t send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void recv_get_partition_names_ps(std::vector & _return, const int32_t seqid); + 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); + int32_t send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); + void recv_get_partitions_by_filter(std::vector & _return, const int32_t seqid); + void get_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts); + int32_t send_get_part_specs_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts); + void recv_get_part_specs_by_filter(std::vector & _return, const int32_t seqid); + void get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req); + int32_t send_get_partitions_by_expr(const PartitionsByExprRequest& req); + void recv_get_partitions_by_expr(PartitionsByExprResult& _return, const int32_t seqid); + int32_t get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter); + int32_t send_get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter); + int32_t recv_get_num_partitions_by_filter(const int32_t seqid); + void get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names); + int32_t send_get_partitions_by_names(const std::string& db_name, const std::string& tbl_name, const std::vector & names); + void recv_get_partitions_by_names(std::vector & _return, const int32_t seqid); + void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); + int32_t send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); + void recv_alter_partition(const int32_t seqid); + void alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts); + int32_t send_alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts); + void recv_alter_partitions(const int32_t seqid); + void alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context); + int32_t send_alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context); + void recv_alter_partitions_with_environment_context(const int32_t seqid); + void alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context); + int32_t send_alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context); + void recv_alter_partition_with_environment_context(const int32_t seqid); + void rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part); + int32_t send_rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part); + void recv_rename_partition(const int32_t seqid); + bool partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception); + int32_t send_partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception); + bool recv_partition_name_has_valid_characters(const int32_t seqid); + void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue); + int32_t send_get_config_value(const std::string& name, const std::string& defaultValue); + void recv_get_config_value(std::string& _return, const int32_t seqid); + void partition_name_to_vals(std::vector & _return, const std::string& part_name); + int32_t send_partition_name_to_vals(const std::string& part_name); + void recv_partition_name_to_vals(std::vector & _return, const int32_t seqid); + void partition_name_to_spec(std::map & _return, const std::string& part_name); + int32_t send_partition_name_to_spec(const std::string& part_name); + void recv_partition_name_to_spec(std::map & _return, const int32_t seqid); + void markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); + int32_t send_markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); + void recv_markPartitionForEvent(const int32_t seqid); + bool isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); + int32_t send_isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType); + bool recv_isPartitionMarkedForEvent(const int32_t seqid); + void add_index(Index& _return, const Index& new_index, const Table& index_table); + int32_t send_add_index(const Index& new_index, const Table& index_table); + void recv_add_index(Index& _return, const int32_t seqid); + void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); + int32_t send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); + void recv_alter_index(const int32_t seqid); + bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); + int32_t send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); + bool recv_drop_index_by_name(const int32_t seqid); + void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name); + int32_t send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name); + void recv_get_index_by_name(Index& _return, const int32_t seqid); + void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + int32_t send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void recv_get_indexes(std::vector & _return, const int32_t seqid); + void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + int32_t send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void recv_get_index_names(std::vector & _return, const int32_t seqid); + void get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request); + int32_t send_get_primary_keys(const PrimaryKeysRequest& request); + void recv_get_primary_keys(PrimaryKeysResponse& _return, const int32_t seqid); + void get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request); + int32_t send_get_foreign_keys(const ForeignKeysRequest& request); + void recv_get_foreign_keys(ForeignKeysResponse& _return, const int32_t seqid); + void get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request); + int32_t send_get_unique_constraints(const UniqueConstraintsRequest& request); + void recv_get_unique_constraints(UniqueConstraintsResponse& _return, const int32_t seqid); + void get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request); + int32_t send_get_not_null_constraints(const NotNullConstraintsRequest& request); + void recv_get_not_null_constraints(NotNullConstraintsResponse& _return, const int32_t seqid); + bool update_table_column_statistics(const ColumnStatistics& stats_obj); + int32_t send_update_table_column_statistics(const ColumnStatistics& stats_obj); + bool recv_update_table_column_statistics(const int32_t seqid); + bool update_partition_column_statistics(const ColumnStatistics& stats_obj); + int32_t send_update_partition_column_statistics(const ColumnStatistics& stats_obj); + bool recv_update_partition_column_statistics(const int32_t seqid); + void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + int32_t send_get_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + void recv_get_table_column_statistics(ColumnStatistics& _return, const int32_t seqid); + void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + int32_t send_get_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + void recv_get_partition_column_statistics(ColumnStatistics& _return, const int32_t seqid); + void get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request); + int32_t send_get_table_statistics_req(const TableStatsRequest& request); + void recv_get_table_statistics_req(TableStatsResult& _return, const int32_t seqid); + void get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request); + int32_t send_get_partitions_statistics_req(const PartitionsStatsRequest& request); + void recv_get_partitions_statistics_req(PartitionsStatsResult& _return, const int32_t seqid); + void get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request); + int32_t send_get_aggr_stats_for(const PartitionsStatsRequest& request); + void recv_get_aggr_stats_for(AggrStats& _return, const int32_t seqid); + bool set_aggr_stats_for(const SetPartitionsStatsRequest& request); + int32_t send_set_aggr_stats_for(const SetPartitionsStatsRequest& request); + bool recv_set_aggr_stats_for(const int32_t seqid); + bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + int32_t send_delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + bool recv_delete_partition_column_statistics(const int32_t seqid); + bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + int32_t send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + bool recv_delete_table_column_statistics(const int32_t seqid); + void create_function(const Function& func); + int32_t send_create_function(const Function& func); + void recv_create_function(const int32_t seqid); + void drop_function(const std::string& dbName, const std::string& funcName); + int32_t send_drop_function(const std::string& dbName, const std::string& funcName); + void recv_drop_function(const int32_t seqid); + void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc); + int32_t send_alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc); + void recv_alter_function(const int32_t seqid); + void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern); + int32_t send_get_functions(const std::string& dbName, const std::string& pattern); + void recv_get_functions(std::vector & _return, const int32_t seqid); + void get_function(Function& _return, const std::string& dbName, const std::string& funcName); + int32_t send_get_function(const std::string& dbName, const std::string& funcName); + void recv_get_function(Function& _return, const int32_t seqid); + void get_all_functions(GetAllFunctionsResponse& _return); + int32_t send_get_all_functions(); + void recv_get_all_functions(GetAllFunctionsResponse& _return, const int32_t seqid); + bool create_role(const Role& role); + int32_t send_create_role(const Role& role); + bool recv_create_role(const int32_t seqid); + bool drop_role(const std::string& role_name); + int32_t send_drop_role(const std::string& role_name); + bool recv_drop_role(const int32_t seqid); + void get_role_names(std::vector & _return); + int32_t send_get_role_names(); + void recv_get_role_names(std::vector & _return, const int32_t seqid); + 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); + int32_t send_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); + bool recv_grant_role(const int32_t seqid); + bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type); + int32_t send_revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type); + bool recv_revoke_role(const int32_t seqid); + void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type); + int32_t send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type); + void recv_list_roles(std::vector & _return, const int32_t seqid); + void grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request); + int32_t send_grant_revoke_role(const GrantRevokeRoleRequest& request); + void recv_grant_revoke_role(GrantRevokeRoleResponse& _return, const int32_t seqid); + void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request); + int32_t send_get_principals_in_role(const GetPrincipalsInRoleRequest& request); + void recv_get_principals_in_role(GetPrincipalsInRoleResponse& _return, const int32_t seqid); + void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request); + int32_t send_get_role_grants_for_principal(const GetRoleGrantsForPrincipalRequest& request); + void recv_get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const int32_t seqid); + void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names); + int32_t send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names); + void recv_get_privilege_set(PrincipalPrivilegeSet& _return, const int32_t seqid); + void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject); + int32_t send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject); + void recv_list_privileges(std::vector & _return, const int32_t seqid); + bool grant_privileges(const PrivilegeBag& privileges); + int32_t send_grant_privileges(const PrivilegeBag& privileges); + bool recv_grant_privileges(const int32_t seqid); + bool revoke_privileges(const PrivilegeBag& privileges); + int32_t send_revoke_privileges(const PrivilegeBag& privileges); + bool recv_revoke_privileges(const int32_t seqid); + void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request); + int32_t send_grant_revoke_privileges(const GrantRevokePrivilegeRequest& request); + void recv_grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const int32_t seqid); + void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names); + int32_t send_set_ugi(const std::string& user_name, const std::vector & group_names); + void recv_set_ugi(std::vector & _return, const int32_t seqid); + void get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name); + int32_t send_get_delegation_token(const std::string& token_owner, const std::string& renewer_kerberos_principal_name); + void recv_get_delegation_token(std::string& _return, const int32_t seqid); + int64_t renew_delegation_token(const std::string& token_str_form); + int32_t send_renew_delegation_token(const std::string& token_str_form); + int64_t recv_renew_delegation_token(const int32_t seqid); + void cancel_delegation_token(const std::string& token_str_form); + int32_t send_cancel_delegation_token(const std::string& token_str_form); + void recv_cancel_delegation_token(const int32_t seqid); + bool add_token(const std::string& token_identifier, const std::string& delegation_token); + int32_t send_add_token(const std::string& token_identifier, const std::string& delegation_token); + bool recv_add_token(const int32_t seqid); + bool remove_token(const std::string& token_identifier); + int32_t send_remove_token(const std::string& token_identifier); + bool recv_remove_token(const int32_t seqid); + void get_token(std::string& _return, const std::string& token_identifier); + int32_t send_get_token(const std::string& token_identifier); + void recv_get_token(std::string& _return, const int32_t seqid); + void get_all_token_identifiers(std::vector & _return); + int32_t send_get_all_token_identifiers(); + void recv_get_all_token_identifiers(std::vector & _return, const int32_t seqid); + int32_t add_master_key(const std::string& key); + int32_t send_add_master_key(const std::string& key); + int32_t recv_add_master_key(const int32_t seqid); + void update_master_key(const int32_t seq_number, const std::string& key); + int32_t send_update_master_key(const int32_t seq_number, const std::string& key); + void recv_update_master_key(const int32_t seqid); + bool remove_master_key(const int32_t key_seq); + int32_t send_remove_master_key(const int32_t key_seq); + bool recv_remove_master_key(const int32_t seqid); + void get_master_keys(std::vector & _return); + int32_t send_get_master_keys(); + void recv_get_master_keys(std::vector & _return, const int32_t seqid); + void get_open_txns(GetOpenTxnsResponse& _return); + int32_t send_get_open_txns(); + void recv_get_open_txns(GetOpenTxnsResponse& _return, const int32_t seqid); + void get_open_txns_info(GetOpenTxnsInfoResponse& _return); + int32_t send_get_open_txns_info(); + void recv_get_open_txns_info(GetOpenTxnsInfoResponse& _return, const int32_t seqid); + void open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst); + int32_t send_open_txns(const OpenTxnRequest& rqst); + void recv_open_txns(OpenTxnsResponse& _return, const int32_t seqid); + void abort_txn(const AbortTxnRequest& rqst); + int32_t send_abort_txn(const AbortTxnRequest& rqst); + void recv_abort_txn(const int32_t seqid); + void abort_txns(const AbortTxnsRequest& rqst); + int32_t send_abort_txns(const AbortTxnsRequest& rqst); + void recv_abort_txns(const int32_t seqid); + void commit_txn(const CommitTxnRequest& rqst); + int32_t send_commit_txn(const CommitTxnRequest& rqst); + void recv_commit_txn(const int32_t seqid); + void lock(LockResponse& _return, const LockRequest& rqst); + int32_t send_lock(const LockRequest& rqst); + void recv_lock(LockResponse& _return, const int32_t seqid); + void check_lock(LockResponse& _return, const CheckLockRequest& rqst); + int32_t send_check_lock(const CheckLockRequest& rqst); + void recv_check_lock(LockResponse& _return, const int32_t seqid); + void unlock(const UnlockRequest& rqst); + int32_t send_unlock(const UnlockRequest& rqst); + void recv_unlock(const int32_t seqid); + void show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst); + int32_t send_show_locks(const ShowLocksRequest& rqst); + void recv_show_locks(ShowLocksResponse& _return, const int32_t seqid); + void heartbeat(const HeartbeatRequest& ids); + int32_t send_heartbeat(const HeartbeatRequest& ids); + void recv_heartbeat(const int32_t seqid); + void heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns); + int32_t send_heartbeat_txn_range(const HeartbeatTxnRangeRequest& txns); + void recv_heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const int32_t seqid); + void compact(const CompactionRequest& rqst); + int32_t send_compact(const CompactionRequest& rqst); + void recv_compact(const int32_t seqid); + void compact2(CompactionResponse& _return, const CompactionRequest& rqst); + int32_t send_compact2(const CompactionRequest& rqst); + void recv_compact2(CompactionResponse& _return, const int32_t seqid); + void show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst); + int32_t send_show_compact(const ShowCompactRequest& rqst); + void recv_show_compact(ShowCompactResponse& _return, const int32_t seqid); + void add_dynamic_partitions(const AddDynamicPartitions& rqst); + int32_t send_add_dynamic_partitions(const AddDynamicPartitions& rqst); + void recv_add_dynamic_partitions(const int32_t seqid); + void get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst); + int32_t send_get_next_notification(const NotificationEventRequest& rqst); + void recv_get_next_notification(NotificationEventResponse& _return, const int32_t seqid); + void get_current_notificationEventId(CurrentNotificationEventId& _return); + int32_t send_get_current_notificationEventId(); + void recv_get_current_notificationEventId(CurrentNotificationEventId& _return, const int32_t seqid); + void fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst); + int32_t send_fire_listener_event(const FireEventRequest& rqst); + void recv_fire_listener_event(FireEventResponse& _return, const int32_t seqid); + void flushCache(); + int32_t send_flushCache(); + void recv_flushCache(const int32_t seqid); + void cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request); + int32_t send_cm_recycle(const CmRecycleRequest& request); + void recv_cm_recycle(CmRecycleResponse& _return, const int32_t seqid); + void get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req); + int32_t send_get_file_metadata_by_expr(const GetFileMetadataByExprRequest& req); + void recv_get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const int32_t seqid); + void get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req); + int32_t send_get_file_metadata(const GetFileMetadataRequest& req); + void recv_get_file_metadata(GetFileMetadataResult& _return, const int32_t seqid); + void put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req); + int32_t send_put_file_metadata(const PutFileMetadataRequest& req); + void recv_put_file_metadata(PutFileMetadataResult& _return, const int32_t seqid); + void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req); + int32_t send_clear_file_metadata(const ClearFileMetadataRequest& req); + void recv_clear_file_metadata(ClearFileMetadataResult& _return, const int32_t seqid); + void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req); + int32_t send_cache_file_metadata(const CacheFileMetadataRequest& req); + void recv_cache_file_metadata(CacheFileMetadataResult& _return, const int32_t seqid); + void get_metastore_db_uuid(std::string& _return); + int32_t send_get_metastore_db_uuid(); + void recv_get_metastore_db_uuid(std::string& _return, const int32_t seqid); +}; + +#ifdef _WIN32 + #pragma warning( pop ) +#endif + +}}} // namespace + +#endif diff --git standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp new file mode 100644 index 0000000..ec2071a --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp @@ -0,0 +1,839 @@ +// This autogenerated skeleton file illustrates how to build a server. +// You should copy it to another filename to avoid overwriting it. + +#include "ThriftHiveMetastore.h" +#include +#include +#include +#include + +using namespace ::apache::thrift; +using namespace ::apache::thrift::protocol; +using namespace ::apache::thrift::transport; +using namespace ::apache::thrift::server; + +using boost::shared_ptr; + +using namespace ::Apache::Hadoop::Hive; + +class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { + public: + ThriftHiveMetastoreHandler() { + // Your initialization goes here + } + + void getMetaConf(std::string& _return, const std::string& key) { + // Your implementation goes here + printf("getMetaConf\n"); + } + + void setMetaConf(const std::string& key, const std::string& value) { + // Your implementation goes here + printf("setMetaConf\n"); + } + + void create_database(const Database& database) { + // Your implementation goes here + printf("create_database\n"); + } + + void get_database(Database& _return, const std::string& name) { + // Your implementation goes here + printf("get_database\n"); + } + + void drop_database(const std::string& name, const bool deleteData, const bool cascade) { + // Your implementation goes here + printf("drop_database\n"); + } + + void get_databases(std::vector & _return, const std::string& pattern) { + // Your implementation goes here + printf("get_databases\n"); + } + + void get_all_databases(std::vector & _return) { + // Your implementation goes here + printf("get_all_databases\n"); + } + + void alter_database(const std::string& dbname, const Database& db) { + // Your implementation goes here + printf("alter_database\n"); + } + + void get_type(Type& _return, const std::string& name) { + // Your implementation goes here + printf("get_type\n"); + } + + bool create_type(const Type& type) { + // Your implementation goes here + printf("create_type\n"); + } + + bool drop_type(const std::string& type) { + // Your implementation goes here + printf("drop_type\n"); + } + + void get_type_all(std::map & _return, const std::string& name) { + // Your implementation goes here + printf("get_type_all\n"); + } + + void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) { + // Your implementation goes here + printf("get_fields\n"); + } + + void get_fields_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) { + // Your implementation goes here + printf("get_fields_with_environment_context\n"); + } + + void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { + // Your implementation goes here + printf("get_schema\n"); + } + + void get_schema_with_environment_context(std::vector & _return, const std::string& db_name, const std::string& table_name, const EnvironmentContext& environment_context) { + // Your implementation goes here + printf("get_schema_with_environment_context\n"); + } + + void create_table(const Table& tbl) { + // Your implementation goes here + printf("create_table\n"); + } + + void create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) { + // Your implementation goes here + printf("create_table_with_environment_context\n"); + } + + void create_table_with_constraints(const Table& tbl, const std::vector & primaryKeys, const std::vector & foreignKeys, const std::vector & uniqueConstraints, const std::vector & notNullConstraints) { + // Your implementation goes here + printf("create_table_with_constraints\n"); + } + + void drop_constraint(const DropConstraintRequest& req) { + // Your implementation goes here + printf("drop_constraint\n"); + } + + void add_primary_key(const AddPrimaryKeyRequest& req) { + // Your implementation goes here + printf("add_primary_key\n"); + } + + void add_foreign_key(const AddForeignKeyRequest& req) { + // Your implementation goes here + printf("add_foreign_key\n"); + } + + void add_unique_constraint(const AddUniqueConstraintRequest& req) { + // Your implementation goes here + printf("add_unique_constraint\n"); + } + + void add_not_null_constraint(const AddNotNullConstraintRequest& req) { + // Your implementation goes here + printf("add_not_null_constraint\n"); + } + + void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { + // Your implementation goes here + printf("drop_table\n"); + } + + void drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) { + // Your implementation goes here + printf("drop_table_with_environment_context\n"); + } + + void truncate_table(const std::string& dbName, const std::string& tableName, const std::vector & partNames) { + // Your implementation goes here + printf("truncate_table\n"); + } + + void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { + // Your implementation goes here + printf("get_tables\n"); + } + + void get_tables_by_type(std::vector & _return, const std::string& db_name, const std::string& pattern, const std::string& tableType) { + // Your implementation goes here + printf("get_tables_by_type\n"); + } + + void get_table_meta(std::vector & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector & tbl_types) { + // Your implementation goes here + printf("get_table_meta\n"); + } + + void get_all_tables(std::vector & _return, const std::string& db_name) { + // Your implementation goes here + printf("get_all_tables\n"); + } + + void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { + // Your implementation goes here + printf("get_table\n"); + } + + void get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names) { + // Your implementation goes here + printf("get_table_objects_by_name\n"); + } + + void get_table_req(GetTableResult& _return, const GetTableRequest& req) { + // Your implementation goes here + printf("get_table_req\n"); + } + + void get_table_objects_by_name_req(GetTablesResult& _return, const GetTablesRequest& req) { + // Your implementation goes here + printf("get_table_objects_by_name_req\n"); + } + + void get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) { + // Your implementation goes here + printf("get_table_names_by_filter\n"); + } + + void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { + // Your implementation goes here + printf("alter_table\n"); + } + + void alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) { + // Your implementation goes here + printf("alter_table_with_environment_context\n"); + } + + void alter_table_with_cascade(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const bool cascade) { + // Your implementation goes here + printf("alter_table_with_cascade\n"); + } + + void add_partition(Partition& _return, const Partition& new_part) { + // Your implementation goes here + printf("add_partition\n"); + } + + void add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) { + // Your implementation goes here + printf("add_partition_with_environment_context\n"); + } + + int32_t add_partitions(const std::vector & new_parts) { + // Your implementation goes here + printf("add_partitions\n"); + } + + int32_t add_partitions_pspec(const std::vector & new_parts) { + // Your implementation goes here + printf("add_partitions_pspec\n"); + } + + void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { + // Your implementation goes here + printf("append_partition\n"); + } + + void add_partitions_req(AddPartitionsResult& _return, const AddPartitionsRequest& request) { + // Your implementation goes here + printf("add_partitions_req\n"); + } + + void append_partition_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const EnvironmentContext& environment_context) { + // Your implementation goes here + printf("append_partition_with_environment_context\n"); + } + + void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { + // Your implementation goes here + printf("append_partition_by_name\n"); + } + + void append_partition_by_name_with_environment_context(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const EnvironmentContext& environment_context) { + // Your implementation goes here + printf("append_partition_by_name_with_environment_context\n"); + } + + bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { + // Your implementation goes here + printf("drop_partition\n"); + } + + bool drop_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData, const EnvironmentContext& environment_context) { + // Your implementation goes here + printf("drop_partition_with_environment_context\n"); + } + + bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) { + // Your implementation goes here + printf("drop_partition_by_name\n"); + } + + bool drop_partition_by_name_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData, const EnvironmentContext& environment_context) { + // Your implementation goes here + printf("drop_partition_by_name_with_environment_context\n"); + } + + void drop_partitions_req(DropPartitionsResult& _return, const DropPartitionsRequest& req) { + // Your implementation goes here + printf("drop_partitions_req\n"); + } + + void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { + // Your implementation goes here + printf("get_partition\n"); + } + + void exchange_partition(Partition& _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) { + // Your implementation goes here + printf("exchange_partition\n"); + } + + void exchange_partitions(std::vector & _return, const std::map & partitionSpecs, const std::string& source_db, const std::string& source_table_name, const std::string& dest_db, const std::string& dest_table_name) { + // Your implementation goes here + printf("exchange_partitions\n"); + } + + 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) { + // Your implementation goes here + printf("get_partition_with_auth\n"); + } + + void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { + // Your implementation goes here + printf("get_partition_by_name\n"); + } + + void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { + // Your implementation goes here + printf("get_partitions\n"); + } + + 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) { + // Your implementation goes here + printf("get_partitions_with_auth\n"); + } + + void get_partitions_pspec(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int32_t max_parts) { + // Your implementation goes here + printf("get_partitions_pspec\n"); + } + + void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { + // Your implementation goes here + printf("get_partition_names\n"); + } + + 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) { + // Your implementation goes here + printf("get_partitions_ps\n"); + } + + 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) { + // Your implementation goes here + printf("get_partitions_ps_with_auth\n"); + } + + 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) { + // Your implementation goes here + printf("get_partition_names_ps\n"); + } + + 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) { + // Your implementation goes here + printf("get_partitions_by_filter\n"); + } + + void get_part_specs_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int32_t max_parts) { + // Your implementation goes here + printf("get_part_specs_by_filter\n"); + } + + void get_partitions_by_expr(PartitionsByExprResult& _return, const PartitionsByExprRequest& req) { + // Your implementation goes here + printf("get_partitions_by_expr\n"); + } + + int32_t get_num_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter) { + // Your implementation goes here + printf("get_num_partitions_by_filter\n"); + } + + void get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) { + // Your implementation goes here + printf("get_partitions_by_names\n"); + } + + void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { + // Your implementation goes here + printf("alter_partition\n"); + } + + void alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) { + // Your implementation goes here + printf("alter_partitions\n"); + } + + void alter_partitions_with_environment_context(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts, const EnvironmentContext& environment_context) { + // Your implementation goes here + printf("alter_partitions_with_environment_context\n"); + } + + void alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) { + // Your implementation goes here + printf("alter_partition_with_environment_context\n"); + } + + void rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) { + // Your implementation goes here + printf("rename_partition\n"); + } + + bool partition_name_has_valid_characters(const std::vector & part_vals, const bool throw_exception) { + // Your implementation goes here + printf("partition_name_has_valid_characters\n"); + } + + void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { + // Your implementation goes here + printf("get_config_value\n"); + } + + void partition_name_to_vals(std::vector & _return, const std::string& part_name) { + // Your implementation goes here + printf("partition_name_to_vals\n"); + } + + void partition_name_to_spec(std::map & _return, const std::string& part_name) { + // Your implementation goes here + printf("partition_name_to_spec\n"); + } + + void markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { + // Your implementation goes here + printf("markPartitionForEvent\n"); + } + + bool isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { + // Your implementation goes here + printf("isPartitionMarkedForEvent\n"); + } + + void add_index(Index& _return, const Index& new_index, const Table& index_table) { + // Your implementation goes here + printf("add_index\n"); + } + + void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { + // Your implementation goes here + printf("alter_index\n"); + } + + bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { + // Your implementation goes here + printf("drop_index_by_name\n"); + } + + void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { + // Your implementation goes here + printf("get_index_by_name\n"); + } + + void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { + // Your implementation goes here + printf("get_indexes\n"); + } + + void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { + // Your implementation goes here + printf("get_index_names\n"); + } + + void get_primary_keys(PrimaryKeysResponse& _return, const PrimaryKeysRequest& request) { + // Your implementation goes here + printf("get_primary_keys\n"); + } + + void get_foreign_keys(ForeignKeysResponse& _return, const ForeignKeysRequest& request) { + // Your implementation goes here + printf("get_foreign_keys\n"); + } + + void get_unique_constraints(UniqueConstraintsResponse& _return, const UniqueConstraintsRequest& request) { + // Your implementation goes here + printf("get_unique_constraints\n"); + } + + void get_not_null_constraints(NotNullConstraintsResponse& _return, const NotNullConstraintsRequest& request) { + // Your implementation goes here + printf("get_not_null_constraints\n"); + } + + bool update_table_column_statistics(const ColumnStatistics& stats_obj) { + // Your implementation goes here + printf("update_table_column_statistics\n"); + } + + bool update_partition_column_statistics(const ColumnStatistics& stats_obj) { + // Your implementation goes here + printf("update_partition_column_statistics\n"); + } + + void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { + // Your implementation goes here + printf("get_table_column_statistics\n"); + } + + void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { + // Your implementation goes here + printf("get_partition_column_statistics\n"); + } + + void get_table_statistics_req(TableStatsResult& _return, const TableStatsRequest& request) { + // Your implementation goes here + printf("get_table_statistics_req\n"); + } + + void get_partitions_statistics_req(PartitionsStatsResult& _return, const PartitionsStatsRequest& request) { + // Your implementation goes here + printf("get_partitions_statistics_req\n"); + } + + void get_aggr_stats_for(AggrStats& _return, const PartitionsStatsRequest& request) { + // Your implementation goes here + printf("get_aggr_stats_for\n"); + } + + bool set_aggr_stats_for(const SetPartitionsStatsRequest& request) { + // Your implementation goes here + printf("set_aggr_stats_for\n"); + } + + bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { + // Your implementation goes here + printf("delete_partition_column_statistics\n"); + } + + bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { + // Your implementation goes here + printf("delete_table_column_statistics\n"); + } + + void create_function(const Function& func) { + // Your implementation goes here + printf("create_function\n"); + } + + void drop_function(const std::string& dbName, const std::string& funcName) { + // Your implementation goes here + printf("drop_function\n"); + } + + void alter_function(const std::string& dbName, const std::string& funcName, const Function& newFunc) { + // Your implementation goes here + printf("alter_function\n"); + } + + void get_functions(std::vector & _return, const std::string& dbName, const std::string& pattern) { + // Your implementation goes here + printf("get_functions\n"); + } + + void get_function(Function& _return, const std::string& dbName, const std::string& funcName) { + // Your implementation goes here + printf("get_function\n"); + } + + void get_all_functions(GetAllFunctionsResponse& _return) { + // Your implementation goes here + printf("get_all_functions\n"); + } + + bool create_role(const Role& role) { + // Your implementation goes here + printf("create_role\n"); + } + + bool drop_role(const std::string& role_name) { + // Your implementation goes here + printf("drop_role\n"); + } + + void get_role_names(std::vector & _return) { + // Your implementation goes here + printf("get_role_names\n"); + } + + 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) { + // Your implementation goes here + printf("grant_role\n"); + } + + bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) { + // Your implementation goes here + printf("revoke_role\n"); + } + + void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) { + // Your implementation goes here + printf("list_roles\n"); + } + + void grant_revoke_role(GrantRevokeRoleResponse& _return, const GrantRevokeRoleRequest& request) { + // Your implementation goes here + printf("grant_revoke_role\n"); + } + + void get_principals_in_role(GetPrincipalsInRoleResponse& _return, const GetPrincipalsInRoleRequest& request) { + // Your implementation goes here + printf("get_principals_in_role\n"); + } + + void get_role_grants_for_principal(GetRoleGrantsForPrincipalResponse& _return, const GetRoleGrantsForPrincipalRequest& request) { + // Your implementation goes here + printf("get_role_grants_for_principal\n"); + } + + void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_privilege_set\n"); + } + + void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) { + // Your implementation goes here + printf("list_privileges\n"); + } + + bool grant_privileges(const PrivilegeBag& privileges) { + // Your implementation goes here + printf("grant_privileges\n"); + } + + bool revoke_privileges(const PrivilegeBag& privileges) { + // Your implementation goes here + printf("revoke_privileges\n"); + } + + void grant_revoke_privileges(GrantRevokePrivilegeResponse& _return, const GrantRevokePrivilegeRequest& request) { + // Your implementation goes here + printf("grant_revoke_privileges\n"); + } + + void set_ugi(std::vector & _return, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("set_ugi\n"); + } + + void get_delegation_token(std::string& _return, const std::string& token_owner, const std::string& renewer_kerberos_principal_name) { + // Your implementation goes here + printf("get_delegation_token\n"); + } + + int64_t renew_delegation_token(const std::string& token_str_form) { + // Your implementation goes here + printf("renew_delegation_token\n"); + } + + void cancel_delegation_token(const std::string& token_str_form) { + // Your implementation goes here + printf("cancel_delegation_token\n"); + } + + bool add_token(const std::string& token_identifier, const std::string& delegation_token) { + // Your implementation goes here + printf("add_token\n"); + } + + bool remove_token(const std::string& token_identifier) { + // Your implementation goes here + printf("remove_token\n"); + } + + void get_token(std::string& _return, const std::string& token_identifier) { + // Your implementation goes here + printf("get_token\n"); + } + + void get_all_token_identifiers(std::vector & _return) { + // Your implementation goes here + printf("get_all_token_identifiers\n"); + } + + int32_t add_master_key(const std::string& key) { + // Your implementation goes here + printf("add_master_key\n"); + } + + void update_master_key(const int32_t seq_number, const std::string& key) { + // Your implementation goes here + printf("update_master_key\n"); + } + + bool remove_master_key(const int32_t key_seq) { + // Your implementation goes here + printf("remove_master_key\n"); + } + + void get_master_keys(std::vector & _return) { + // Your implementation goes here + printf("get_master_keys\n"); + } + + void get_open_txns(GetOpenTxnsResponse& _return) { + // Your implementation goes here + printf("get_open_txns\n"); + } + + void get_open_txns_info(GetOpenTxnsInfoResponse& _return) { + // Your implementation goes here + printf("get_open_txns_info\n"); + } + + void open_txns(OpenTxnsResponse& _return, const OpenTxnRequest& rqst) { + // Your implementation goes here + printf("open_txns\n"); + } + + void abort_txn(const AbortTxnRequest& rqst) { + // Your implementation goes here + printf("abort_txn\n"); + } + + void abort_txns(const AbortTxnsRequest& rqst) { + // Your implementation goes here + printf("abort_txns\n"); + } + + void commit_txn(const CommitTxnRequest& rqst) { + // Your implementation goes here + printf("commit_txn\n"); + } + + void lock(LockResponse& _return, const LockRequest& rqst) { + // Your implementation goes here + printf("lock\n"); + } + + void check_lock(LockResponse& _return, const CheckLockRequest& rqst) { + // Your implementation goes here + printf("check_lock\n"); + } + + void unlock(const UnlockRequest& rqst) { + // Your implementation goes here + printf("unlock\n"); + } + + void show_locks(ShowLocksResponse& _return, const ShowLocksRequest& rqst) { + // Your implementation goes here + printf("show_locks\n"); + } + + void heartbeat(const HeartbeatRequest& ids) { + // Your implementation goes here + printf("heartbeat\n"); + } + + void heartbeat_txn_range(HeartbeatTxnRangeResponse& _return, const HeartbeatTxnRangeRequest& txns) { + // Your implementation goes here + printf("heartbeat_txn_range\n"); + } + + void compact(const CompactionRequest& rqst) { + // Your implementation goes here + printf("compact\n"); + } + + void compact2(CompactionResponse& _return, const CompactionRequest& rqst) { + // Your implementation goes here + printf("compact2\n"); + } + + void show_compact(ShowCompactResponse& _return, const ShowCompactRequest& rqst) { + // Your implementation goes here + printf("show_compact\n"); + } + + void add_dynamic_partitions(const AddDynamicPartitions& rqst) { + // Your implementation goes here + printf("add_dynamic_partitions\n"); + } + + void get_next_notification(NotificationEventResponse& _return, const NotificationEventRequest& rqst) { + // Your implementation goes here + printf("get_next_notification\n"); + } + + void get_current_notificationEventId(CurrentNotificationEventId& _return) { + // Your implementation goes here + printf("get_current_notificationEventId\n"); + } + + void fire_listener_event(FireEventResponse& _return, const FireEventRequest& rqst) { + // Your implementation goes here + printf("fire_listener_event\n"); + } + + void flushCache() { + // Your implementation goes here + printf("flushCache\n"); + } + + void cm_recycle(CmRecycleResponse& _return, const CmRecycleRequest& request) { + // Your implementation goes here + printf("cm_recycle\n"); + } + + void get_file_metadata_by_expr(GetFileMetadataByExprResult& _return, const GetFileMetadataByExprRequest& req) { + // Your implementation goes here + printf("get_file_metadata_by_expr\n"); + } + + void get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req) { + // Your implementation goes here + printf("get_file_metadata\n"); + } + + void put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req) { + // Your implementation goes here + printf("put_file_metadata\n"); + } + + void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req) { + // Your implementation goes here + printf("clear_file_metadata\n"); + } + + void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) { + // Your implementation goes here + printf("cache_file_metadata\n"); + } + + void get_metastore_db_uuid(std::string& _return) { + // Your implementation goes here + printf("get_metastore_db_uuid\n"); + } + +}; + +int main(int argc, char **argv) { + int port = 9090; + shared_ptr handler(new ThriftHiveMetastoreHandler()); + shared_ptr processor(new ThriftHiveMetastoreProcessor(handler)); + shared_ptr serverTransport(new TServerSocket(port)); + shared_ptr transportFactory(new TBufferedTransportFactory()); + shared_ptr protocolFactory(new TBinaryProtocolFactory()); + + TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory); + server.serve(); + return 0; +} + diff --git standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp new file mode 100644 index 0000000..1cbd176 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.cpp @@ -0,0 +1,65 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "hive_metastore_constants.h" + +namespace Apache { namespace Hadoop { namespace Hive { + +const hive_metastoreConstants g_hive_metastore_constants; + +hive_metastoreConstants::hive_metastoreConstants() { + DDL_TIME = "transient_lastDdlTime"; + + HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__"; + + HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__"; + + HIVE_FILTER_FIELD_LAST_ACCESS = "hive_filter_field_last_access__"; + + IS_ARCHIVED = "is_archived"; + + ORIGINAL_LOCATION = "original_location"; + + IS_IMMUTABLE = "immutable"; + + META_TABLE_COLUMNS = "columns"; + + META_TABLE_COLUMN_TYPES = "columns.types"; + + BUCKET_FIELD_NAME = "bucket_field_name"; + + BUCKET_COUNT = "bucket_count"; + + FIELD_TO_DIMENSION = "field_to_dimension"; + + META_TABLE_NAME = "name"; + + META_TABLE_DB = "db"; + + META_TABLE_LOCATION = "location"; + + META_TABLE_SERDE = "serde"; + + META_TABLE_PARTITION_COLUMNS = "partition_columns"; + + META_TABLE_PARTITION_COLUMN_TYPES = "partition_columns.types"; + + FILE_INPUT_FORMAT = "file.inputformat"; + + FILE_OUTPUT_FORMAT = "file.outputformat"; + + META_TABLE_STORAGE = "storage_handler"; + + TABLE_IS_TRANSACTIONAL = "transactional"; + + TABLE_NO_AUTO_COMPACT = "no_auto_compaction"; + + TABLE_TRANSACTIONAL_PROPERTIES = "transactional_properties"; + +} + +}}} // namespace + diff --git standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h new file mode 100644 index 0000000..3d068c3 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_constants.h @@ -0,0 +1,48 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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 + +#include "hive_metastore_types.h" + +namespace Apache { namespace Hadoop { namespace Hive { + +class hive_metastoreConstants { + public: + hive_metastoreConstants(); + + std::string DDL_TIME; + std::string HIVE_FILTER_FIELD_OWNER; + std::string HIVE_FILTER_FIELD_PARAMS; + std::string HIVE_FILTER_FIELD_LAST_ACCESS; + std::string IS_ARCHIVED; + std::string ORIGINAL_LOCATION; + std::string IS_IMMUTABLE; + std::string META_TABLE_COLUMNS; + std::string META_TABLE_COLUMN_TYPES; + std::string BUCKET_FIELD_NAME; + std::string BUCKET_COUNT; + std::string FIELD_TO_DIMENSION; + std::string META_TABLE_NAME; + std::string META_TABLE_DB; + std::string META_TABLE_LOCATION; + std::string META_TABLE_SERDE; + std::string META_TABLE_PARTITION_COLUMNS; + std::string META_TABLE_PARTITION_COLUMN_TYPES; + std::string FILE_INPUT_FORMAT; + std::string FILE_OUTPUT_FORMAT; + std::string META_TABLE_STORAGE; + std::string TABLE_IS_TRANSACTIONAL; + std::string TABLE_NO_AUTO_COMPACT; + std::string TABLE_TRANSACTIONAL_PROPERTIES; +}; + +extern const hive_metastoreConstants g_hive_metastore_constants; + +}}} // namespace + +#endif diff --git standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp new file mode 100644 index 0000000..d178f10 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -0,0 +1,21622 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "hive_metastore_types.h" + +#include +#include + +#include + +namespace Apache { namespace Hadoop { namespace Hive { + +int _kHiveObjectTypeValues[] = { + HiveObjectType::GLOBAL, + HiveObjectType::DATABASE, + HiveObjectType::TABLE, + HiveObjectType::PARTITION, + HiveObjectType::COLUMN +}; +const char* _kHiveObjectTypeNames[] = { + "GLOBAL", + "DATABASE", + "TABLE", + "PARTITION", + "COLUMN" +}; +const std::map _HiveObjectType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kHiveObjectTypeValues, _kHiveObjectTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kPrincipalTypeValues[] = { + PrincipalType::USER, + PrincipalType::ROLE, + PrincipalType::GROUP +}; +const char* _kPrincipalTypeNames[] = { + "USER", + "ROLE", + "GROUP" +}; +const std::map _PrincipalType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kPrincipalTypeValues, _kPrincipalTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kPartitionEventTypeValues[] = { + PartitionEventType::LOAD_DONE +}; +const char* _kPartitionEventTypeNames[] = { + "LOAD_DONE" +}; +const std::map _PartitionEventType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kPartitionEventTypeValues, _kPartitionEventTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kTxnStateValues[] = { + TxnState::COMMITTED, + TxnState::ABORTED, + TxnState::OPEN +}; +const char* _kTxnStateNames[] = { + "COMMITTED", + "ABORTED", + "OPEN" +}; +const std::map _TxnState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kTxnStateValues, _kTxnStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kLockLevelValues[] = { + LockLevel::DB, + LockLevel::TABLE, + LockLevel::PARTITION +}; +const char* _kLockLevelNames[] = { + "DB", + "TABLE", + "PARTITION" +}; +const std::map _LockLevel_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kLockLevelValues, _kLockLevelNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kLockStateValues[] = { + LockState::ACQUIRED, + LockState::WAITING, + LockState::ABORT, + LockState::NOT_ACQUIRED +}; +const char* _kLockStateNames[] = { + "ACQUIRED", + "WAITING", + "ABORT", + "NOT_ACQUIRED" +}; +const std::map _LockState_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kLockStateValues, _kLockStateNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kLockTypeValues[] = { + LockType::SHARED_READ, + LockType::SHARED_WRITE, + LockType::EXCLUSIVE +}; +const char* _kLockTypeNames[] = { + "SHARED_READ", + "SHARED_WRITE", + "EXCLUSIVE" +}; +const std::map _LockType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kLockTypeValues, _kLockTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kCompactionTypeValues[] = { + CompactionType::MINOR, + CompactionType::MAJOR +}; +const char* _kCompactionTypeNames[] = { + "MINOR", + "MAJOR" +}; +const std::map _CompactionType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kCompactionTypeValues, _kCompactionTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kGrantRevokeTypeValues[] = { + GrantRevokeType::GRANT, + GrantRevokeType::REVOKE +}; +const char* _kGrantRevokeTypeNames[] = { + "GRANT", + "REVOKE" +}; +const std::map _GrantRevokeType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kGrantRevokeTypeValues, _kGrantRevokeTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kDataOperationTypeValues[] = { + DataOperationType::SELECT, + DataOperationType::INSERT, + DataOperationType::UPDATE, + DataOperationType::DELETE, + DataOperationType::UNSET, + DataOperationType::NO_TXN +}; +const char* _kDataOperationTypeNames[] = { + "SELECT", + "INSERT", + "UPDATE", + "DELETE", + "UNSET", + "NO_TXN" +}; +const std::map _DataOperationType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kDataOperationTypeValues, _kDataOperationTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kEventRequestTypeValues[] = { + EventRequestType::INSERT, + EventRequestType::UPDATE, + EventRequestType::DELETE +}; +const char* _kEventRequestTypeNames[] = { + "INSERT", + "UPDATE", + "DELETE" +}; +const std::map _EventRequestType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kEventRequestTypeValues, _kEventRequestTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kFunctionTypeValues[] = { + FunctionType::JAVA +}; +const char* _kFunctionTypeNames[] = { + "JAVA" +}; +const std::map _FunctionType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kFunctionTypeValues, _kFunctionTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kResourceTypeValues[] = { + ResourceType::JAR, + ResourceType::FILE, + ResourceType::ARCHIVE +}; +const char* _kResourceTypeNames[] = { + "JAR", + "FILE", + "ARCHIVE" +}; +const std::map _ResourceType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kResourceTypeValues, _kResourceTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kFileMetadataExprTypeValues[] = { + FileMetadataExprType::ORC_SARG +}; +const char* _kFileMetadataExprTypeNames[] = { + "ORC_SARG" +}; +const std::map _FileMetadataExprType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kFileMetadataExprTypeValues, _kFileMetadataExprTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kClientCapabilityValues[] = { + ClientCapability::TEST_CAPABILITY +}; +const char* _kClientCapabilityNames[] = { + "TEST_CAPABILITY" +}; +const std::map _ClientCapability_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(1, _kClientCapabilityValues, _kClientCapabilityNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + + +Version::~Version() throw() { +} + + +void Version::__set_version(const std::string& val) { + this->version = val; +} + +void Version::__set_comments(const std::string& val) { + this->comments = val; +} + +uint32_t Version::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->version); + this->__isset.version = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->comments); + this->__isset.comments = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Version::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +Version::Version(const Version& other0) { + version = other0.version; + comments = other0.comments; + __isset = other0.__isset; +} +Version& Version::operator=(const Version& other1) { + version = other1.version; + comments = other1.comments; + __isset = other1.__isset; + return *this; +} +void Version::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Version("; + out << "version=" << to_string(version); + out << ", " << "comments=" << to_string(comments); + out << ")"; +} + + +FieldSchema::~FieldSchema() throw() { +} + + +void FieldSchema::__set_name(const std::string& val) { + this->name = val; +} + +void FieldSchema::__set_type(const std::string& val) { + this->type = val; +} + +void FieldSchema::__set_comment(const std::string& val) { + this->comment = val; +} + +uint32_t FieldSchema::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->type); + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->comment); + this->__isset.comment = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FieldSchema::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +FieldSchema::FieldSchema(const FieldSchema& other2) { + name = other2.name; + type = other2.type; + comment = other2.comment; + __isset = other2.__isset; +} +FieldSchema& FieldSchema::operator=(const FieldSchema& other3) { + name = other3.name; + type = other3.type; + comment = other3.comment; + __isset = other3.__isset; + return *this; +} +void FieldSchema::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "FieldSchema("; + out << "name=" << to_string(name); + out << ", " << "type=" << to_string(type); + out << ", " << "comment=" << to_string(comment); + out << ")"; +} + + +SQLPrimaryKey::~SQLPrimaryKey() throw() { +} + + +void SQLPrimaryKey::__set_table_db(const std::string& val) { + this->table_db = val; +} + +void SQLPrimaryKey::__set_table_name(const std::string& val) { + this->table_name = val; +} + +void SQLPrimaryKey::__set_column_name(const std::string& val) { + this->column_name = val; +} + +void SQLPrimaryKey::__set_key_seq(const int32_t val) { + this->key_seq = val; +} + +void SQLPrimaryKey::__set_pk_name(const std::string& val) { + this->pk_name = val; +} + +void SQLPrimaryKey::__set_enable_cstr(const bool val) { + this->enable_cstr = val; +} + +void SQLPrimaryKey::__set_validate_cstr(const bool val) { + this->validate_cstr = val; +} + +void SQLPrimaryKey::__set_rely_cstr(const bool val) { + this->rely_cstr = val; +} + +uint32_t SQLPrimaryKey::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_db); + this->__isset.table_db = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->column_name); + this->__isset.column_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->key_seq); + this->__isset.key_seq = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->pk_name); + this->__isset.pk_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->enable_cstr); + this->__isset.enable_cstr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->validate_cstr); + this->__isset.validate_cstr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->rely_cstr); + this->__isset.rely_cstr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SQLPrimaryKey::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("SQLPrimaryKey"); + + xfer += oprot->writeFieldBegin("table_db", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->table_db); + 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->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->column_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32(this->key_seq); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("pk_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->pk_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("enable_cstr", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->enable_cstr); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("validate_cstr", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->validate_cstr); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("rely_cstr", ::apache::thrift::protocol::T_BOOL, 8); + xfer += oprot->writeBool(this->rely_cstr); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(SQLPrimaryKey &a, SQLPrimaryKey &b) { + using ::std::swap; + swap(a.table_db, b.table_db); + swap(a.table_name, b.table_name); + swap(a.column_name, b.column_name); + swap(a.key_seq, b.key_seq); + swap(a.pk_name, b.pk_name); + swap(a.enable_cstr, b.enable_cstr); + swap(a.validate_cstr, b.validate_cstr); + swap(a.rely_cstr, b.rely_cstr); + swap(a.__isset, b.__isset); +} + +SQLPrimaryKey::SQLPrimaryKey(const SQLPrimaryKey& other4) { + table_db = other4.table_db; + table_name = other4.table_name; + column_name = other4.column_name; + key_seq = other4.key_seq; + pk_name = other4.pk_name; + enable_cstr = other4.enable_cstr; + validate_cstr = other4.validate_cstr; + rely_cstr = other4.rely_cstr; + __isset = other4.__isset; +} +SQLPrimaryKey& SQLPrimaryKey::operator=(const SQLPrimaryKey& other5) { + table_db = other5.table_db; + table_name = other5.table_name; + column_name = other5.column_name; + key_seq = other5.key_seq; + pk_name = other5.pk_name; + enable_cstr = other5.enable_cstr; + validate_cstr = other5.validate_cstr; + rely_cstr = other5.rely_cstr; + __isset = other5.__isset; + return *this; +} +void SQLPrimaryKey::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "SQLPrimaryKey("; + out << "table_db=" << to_string(table_db); + out << ", " << "table_name=" << to_string(table_name); + out << ", " << "column_name=" << to_string(column_name); + out << ", " << "key_seq=" << to_string(key_seq); + out << ", " << "pk_name=" << to_string(pk_name); + out << ", " << "enable_cstr=" << to_string(enable_cstr); + out << ", " << "validate_cstr=" << to_string(validate_cstr); + out << ", " << "rely_cstr=" << to_string(rely_cstr); + out << ")"; +} + + +SQLForeignKey::~SQLForeignKey() throw() { +} + + +void SQLForeignKey::__set_pktable_db(const std::string& val) { + this->pktable_db = val; +} + +void SQLForeignKey::__set_pktable_name(const std::string& val) { + this->pktable_name = val; +} + +void SQLForeignKey::__set_pkcolumn_name(const std::string& val) { + this->pkcolumn_name = val; +} + +void SQLForeignKey::__set_fktable_db(const std::string& val) { + this->fktable_db = val; +} + +void SQLForeignKey::__set_fktable_name(const std::string& val) { + this->fktable_name = val; +} + +void SQLForeignKey::__set_fkcolumn_name(const std::string& val) { + this->fkcolumn_name = val; +} + +void SQLForeignKey::__set_key_seq(const int32_t val) { + this->key_seq = val; +} + +void SQLForeignKey::__set_update_rule(const int32_t val) { + this->update_rule = val; +} + +void SQLForeignKey::__set_delete_rule(const int32_t val) { + this->delete_rule = val; +} + +void SQLForeignKey::__set_fk_name(const std::string& val) { + this->fk_name = val; +} + +void SQLForeignKey::__set_pk_name(const std::string& val) { + this->pk_name = val; +} + +void SQLForeignKey::__set_enable_cstr(const bool val) { + this->enable_cstr = val; +} + +void SQLForeignKey::__set_validate_cstr(const bool val) { + this->validate_cstr = val; +} + +void SQLForeignKey::__set_rely_cstr(const bool val) { + this->rely_cstr = val; +} + +uint32_t SQLForeignKey::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->pktable_db); + this->__isset.pktable_db = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->pktable_name); + this->__isset.pktable_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->pkcolumn_name); + this->__isset.pkcolumn_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->fktable_db); + this->__isset.fktable_db = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->fktable_name); + this->__isset.fktable_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->fkcolumn_name); + this->__isset.fkcolumn_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->key_seq); + this->__isset.key_seq = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->update_rule); + this->__isset.update_rule = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->delete_rule); + this->__isset.delete_rule = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->fk_name); + this->__isset.fk_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->pk_name); + this->__isset.pk_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->enable_cstr); + this->__isset.enable_cstr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 13: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->validate_cstr); + this->__isset.validate_cstr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 14: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->rely_cstr); + this->__isset.rely_cstr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SQLForeignKey::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("SQLForeignKey"); + + xfer += oprot->writeFieldBegin("pktable_db", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->pktable_db); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("pktable_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->pktable_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("pkcolumn_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->pkcolumn_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("fktable_db", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->fktable_db); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("fktable_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->fktable_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("fkcolumn_name", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->fkcolumn_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 7); + xfer += oprot->writeI32(this->key_seq); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("update_rule", ::apache::thrift::protocol::T_I32, 8); + xfer += oprot->writeI32(this->update_rule); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("delete_rule", ::apache::thrift::protocol::T_I32, 9); + xfer += oprot->writeI32(this->delete_rule); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("fk_name", ::apache::thrift::protocol::T_STRING, 10); + xfer += oprot->writeString(this->fk_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("pk_name", ::apache::thrift::protocol::T_STRING, 11); + xfer += oprot->writeString(this->pk_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("enable_cstr", ::apache::thrift::protocol::T_BOOL, 12); + xfer += oprot->writeBool(this->enable_cstr); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("validate_cstr", ::apache::thrift::protocol::T_BOOL, 13); + xfer += oprot->writeBool(this->validate_cstr); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("rely_cstr", ::apache::thrift::protocol::T_BOOL, 14); + xfer += oprot->writeBool(this->rely_cstr); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(SQLForeignKey &a, SQLForeignKey &b) { + using ::std::swap; + swap(a.pktable_db, b.pktable_db); + swap(a.pktable_name, b.pktable_name); + swap(a.pkcolumn_name, b.pkcolumn_name); + swap(a.fktable_db, b.fktable_db); + swap(a.fktable_name, b.fktable_name); + swap(a.fkcolumn_name, b.fkcolumn_name); + swap(a.key_seq, b.key_seq); + swap(a.update_rule, b.update_rule); + swap(a.delete_rule, b.delete_rule); + swap(a.fk_name, b.fk_name); + swap(a.pk_name, b.pk_name); + swap(a.enable_cstr, b.enable_cstr); + swap(a.validate_cstr, b.validate_cstr); + swap(a.rely_cstr, b.rely_cstr); + swap(a.__isset, b.__isset); +} + +SQLForeignKey::SQLForeignKey(const SQLForeignKey& other6) { + pktable_db = other6.pktable_db; + pktable_name = other6.pktable_name; + pkcolumn_name = other6.pkcolumn_name; + fktable_db = other6.fktable_db; + fktable_name = other6.fktable_name; + fkcolumn_name = other6.fkcolumn_name; + key_seq = other6.key_seq; + update_rule = other6.update_rule; + delete_rule = other6.delete_rule; + fk_name = other6.fk_name; + pk_name = other6.pk_name; + enable_cstr = other6.enable_cstr; + validate_cstr = other6.validate_cstr; + rely_cstr = other6.rely_cstr; + __isset = other6.__isset; +} +SQLForeignKey& SQLForeignKey::operator=(const SQLForeignKey& other7) { + pktable_db = other7.pktable_db; + pktable_name = other7.pktable_name; + pkcolumn_name = other7.pkcolumn_name; + fktable_db = other7.fktable_db; + fktable_name = other7.fktable_name; + fkcolumn_name = other7.fkcolumn_name; + key_seq = other7.key_seq; + update_rule = other7.update_rule; + delete_rule = other7.delete_rule; + fk_name = other7.fk_name; + pk_name = other7.pk_name; + enable_cstr = other7.enable_cstr; + validate_cstr = other7.validate_cstr; + rely_cstr = other7.rely_cstr; + __isset = other7.__isset; + return *this; +} +void SQLForeignKey::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "SQLForeignKey("; + out << "pktable_db=" << to_string(pktable_db); + out << ", " << "pktable_name=" << to_string(pktable_name); + out << ", " << "pkcolumn_name=" << to_string(pkcolumn_name); + out << ", " << "fktable_db=" << to_string(fktable_db); + out << ", " << "fktable_name=" << to_string(fktable_name); + out << ", " << "fkcolumn_name=" << to_string(fkcolumn_name); + out << ", " << "key_seq=" << to_string(key_seq); + out << ", " << "update_rule=" << to_string(update_rule); + out << ", " << "delete_rule=" << to_string(delete_rule); + out << ", " << "fk_name=" << to_string(fk_name); + out << ", " << "pk_name=" << to_string(pk_name); + out << ", " << "enable_cstr=" << to_string(enable_cstr); + out << ", " << "validate_cstr=" << to_string(validate_cstr); + out << ", " << "rely_cstr=" << to_string(rely_cstr); + out << ")"; +} + + +SQLUniqueConstraint::~SQLUniqueConstraint() throw() { +} + + +void SQLUniqueConstraint::__set_table_db(const std::string& val) { + this->table_db = val; +} + +void SQLUniqueConstraint::__set_table_name(const std::string& val) { + this->table_name = val; +} + +void SQLUniqueConstraint::__set_column_name(const std::string& val) { + this->column_name = val; +} + +void SQLUniqueConstraint::__set_key_seq(const int32_t val) { + this->key_seq = val; +} + +void SQLUniqueConstraint::__set_uk_name(const std::string& val) { + this->uk_name = val; +} + +void SQLUniqueConstraint::__set_enable_cstr(const bool val) { + this->enable_cstr = val; +} + +void SQLUniqueConstraint::__set_validate_cstr(const bool val) { + this->validate_cstr = val; +} + +void SQLUniqueConstraint::__set_rely_cstr(const bool val) { + this->rely_cstr = val; +} + +uint32_t SQLUniqueConstraint::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_db); + this->__isset.table_db = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->column_name); + this->__isset.column_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->key_seq); + this->__isset.key_seq = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->uk_name); + this->__isset.uk_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->enable_cstr); + this->__isset.enable_cstr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->validate_cstr); + this->__isset.validate_cstr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->rely_cstr); + this->__isset.rely_cstr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SQLUniqueConstraint::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("SQLUniqueConstraint"); + + xfer += oprot->writeFieldBegin("table_db", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->table_db); + 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->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->column_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32(this->key_seq); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("uk_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->uk_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("enable_cstr", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->enable_cstr); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("validate_cstr", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->validate_cstr); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("rely_cstr", ::apache::thrift::protocol::T_BOOL, 8); + xfer += oprot->writeBool(this->rely_cstr); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(SQLUniqueConstraint &a, SQLUniqueConstraint &b) { + using ::std::swap; + swap(a.table_db, b.table_db); + swap(a.table_name, b.table_name); + swap(a.column_name, b.column_name); + swap(a.key_seq, b.key_seq); + swap(a.uk_name, b.uk_name); + swap(a.enable_cstr, b.enable_cstr); + swap(a.validate_cstr, b.validate_cstr); + swap(a.rely_cstr, b.rely_cstr); + swap(a.__isset, b.__isset); +} + +SQLUniqueConstraint::SQLUniqueConstraint(const SQLUniqueConstraint& other8) { + table_db = other8.table_db; + table_name = other8.table_name; + column_name = other8.column_name; + key_seq = other8.key_seq; + uk_name = other8.uk_name; + enable_cstr = other8.enable_cstr; + validate_cstr = other8.validate_cstr; + rely_cstr = other8.rely_cstr; + __isset = other8.__isset; +} +SQLUniqueConstraint& SQLUniqueConstraint::operator=(const SQLUniqueConstraint& other9) { + table_db = other9.table_db; + table_name = other9.table_name; + column_name = other9.column_name; + key_seq = other9.key_seq; + uk_name = other9.uk_name; + enable_cstr = other9.enable_cstr; + validate_cstr = other9.validate_cstr; + rely_cstr = other9.rely_cstr; + __isset = other9.__isset; + return *this; +} +void SQLUniqueConstraint::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "SQLUniqueConstraint("; + out << "table_db=" << to_string(table_db); + out << ", " << "table_name=" << to_string(table_name); + out << ", " << "column_name=" << to_string(column_name); + out << ", " << "key_seq=" << to_string(key_seq); + out << ", " << "uk_name=" << to_string(uk_name); + out << ", " << "enable_cstr=" << to_string(enable_cstr); + out << ", " << "validate_cstr=" << to_string(validate_cstr); + out << ", " << "rely_cstr=" << to_string(rely_cstr); + out << ")"; +} + + +SQLNotNullConstraint::~SQLNotNullConstraint() throw() { +} + + +void SQLNotNullConstraint::__set_table_db(const std::string& val) { + this->table_db = val; +} + +void SQLNotNullConstraint::__set_table_name(const std::string& val) { + this->table_name = val; +} + +void SQLNotNullConstraint::__set_column_name(const std::string& val) { + this->column_name = val; +} + +void SQLNotNullConstraint::__set_nn_name(const std::string& val) { + this->nn_name = val; +} + +void SQLNotNullConstraint::__set_enable_cstr(const bool val) { + this->enable_cstr = val; +} + +void SQLNotNullConstraint::__set_validate_cstr(const bool val) { + this->validate_cstr = val; +} + +void SQLNotNullConstraint::__set_rely_cstr(const bool val) { + this->rely_cstr = val; +} + +uint32_t SQLNotNullConstraint::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_db); + this->__isset.table_db = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->column_name); + this->__isset.column_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->nn_name); + this->__isset.nn_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->enable_cstr); + this->__isset.enable_cstr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->validate_cstr); + this->__isset.validate_cstr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->rely_cstr); + this->__isset.rely_cstr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SQLNotNullConstraint::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("SQLNotNullConstraint"); + + xfer += oprot->writeFieldBegin("table_db", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->table_db); + 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->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->column_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("nn_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->nn_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("enable_cstr", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->enable_cstr); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("validate_cstr", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->validate_cstr); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("rely_cstr", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->rely_cstr); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(SQLNotNullConstraint &a, SQLNotNullConstraint &b) { + using ::std::swap; + swap(a.table_db, b.table_db); + swap(a.table_name, b.table_name); + swap(a.column_name, b.column_name); + swap(a.nn_name, b.nn_name); + swap(a.enable_cstr, b.enable_cstr); + swap(a.validate_cstr, b.validate_cstr); + swap(a.rely_cstr, b.rely_cstr); + swap(a.__isset, b.__isset); +} + +SQLNotNullConstraint::SQLNotNullConstraint(const SQLNotNullConstraint& other10) { + table_db = other10.table_db; + table_name = other10.table_name; + column_name = other10.column_name; + nn_name = other10.nn_name; + enable_cstr = other10.enable_cstr; + validate_cstr = other10.validate_cstr; + rely_cstr = other10.rely_cstr; + __isset = other10.__isset; +} +SQLNotNullConstraint& SQLNotNullConstraint::operator=(const SQLNotNullConstraint& other11) { + table_db = other11.table_db; + table_name = other11.table_name; + column_name = other11.column_name; + nn_name = other11.nn_name; + enable_cstr = other11.enable_cstr; + validate_cstr = other11.validate_cstr; + rely_cstr = other11.rely_cstr; + __isset = other11.__isset; + return *this; +} +void SQLNotNullConstraint::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "SQLNotNullConstraint("; + out << "table_db=" << to_string(table_db); + out << ", " << "table_name=" << to_string(table_name); + out << ", " << "column_name=" << to_string(column_name); + out << ", " << "nn_name=" << to_string(nn_name); + out << ", " << "enable_cstr=" << to_string(enable_cstr); + out << ", " << "validate_cstr=" << to_string(validate_cstr); + out << ", " << "rely_cstr=" << to_string(rely_cstr); + out << ")"; +} + + +Type::~Type() throw() { +} + + +void Type::__set_name(const std::string& val) { + this->name = val; +} + +void Type::__set_type1(const std::string& val) { + this->type1 = val; +__isset.type1 = true; +} + +void Type::__set_type2(const std::string& val) { + this->type2 = val; +__isset.type2 = true; +} + +void Type::__set_fields(const std::vector & val) { + this->fields = val; +__isset.fields = true; +} + +uint32_t Type::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->type1); + this->__isset.type1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->type2); + this->__isset.type2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->fields.clear(); + uint32_t _size12; + ::apache::thrift::protocol::TType _etype15; + xfer += iprot->readListBegin(_etype15, _size12); + this->fields.resize(_size12); + uint32_t _i16; + for (_i16 = 0; _i16 < _size12; ++_i16) + { + xfer += this->fields[_i16].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.fields = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Type::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.type2) { + xfer += oprot->writeFieldBegin("type2", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->type2); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.fields) { + xfer += oprot->writeFieldBegin("fields", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->fields.size())); + std::vector ::const_iterator _iter17; + for (_iter17 = this->fields.begin(); _iter17 != this->fields.end(); ++_iter17) + { + xfer += (*_iter17).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + 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); +} + +Type::Type(const Type& other18) { + name = other18.name; + type1 = other18.type1; + type2 = other18.type2; + fields = other18.fields; + __isset = other18.__isset; +} +Type& Type::operator=(const Type& other19) { + name = other19.name; + type1 = other19.type1; + type2 = other19.type2; + fields = other19.fields; + __isset = other19.__isset; + return *this; +} +void Type::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Type("; + out << "name=" << to_string(name); + out << ", " << "type1="; (__isset.type1 ? (out << to_string(type1)) : (out << "")); + out << ", " << "type2="; (__isset.type2 ? (out << to_string(type2)) : (out << "")); + out << ", " << "fields="; (__isset.fields ? (out << to_string(fields)) : (out << "")); + out << ")"; +} + + +HiveObjectRef::~HiveObjectRef() throw() { +} + + +void HiveObjectRef::__set_objectType(const HiveObjectType::type val) { + this->objectType = val; +} + +void HiveObjectRef::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void HiveObjectRef::__set_objectName(const std::string& val) { + this->objectName = val; +} + +void HiveObjectRef::__set_partValues(const std::vector & val) { + this->partValues = val; +} + +void HiveObjectRef::__set_columnName(const std::string& val) { + this->columnName = val; +} + +uint32_t HiveObjectRef::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast20; + xfer += iprot->readI32(ecast20); + this->objectType = (HiveObjectType::type)ecast20; + this->__isset.objectType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->objectName); + this->__isset.objectName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partValues.clear(); + uint32_t _size21; + ::apache::thrift::protocol::TType _etype24; + xfer += iprot->readListBegin(_etype24, _size21); + this->partValues.resize(_size21); + uint32_t _i25; + for (_i25 = 0; _i25 < _size21; ++_i25) + { + xfer += iprot->readString(this->partValues[_i25]); + } + xfer += iprot->readListEnd(); + } + this->__isset.partValues = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->columnName); + this->__isset.columnName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t HiveObjectRef::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter26; + for (_iter26 = this->partValues.begin(); _iter26 != this->partValues.end(); ++_iter26) + { + xfer += oprot->writeString((*_iter26)); + } + 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); +} + +HiveObjectRef::HiveObjectRef(const HiveObjectRef& other27) { + objectType = other27.objectType; + dbName = other27.dbName; + objectName = other27.objectName; + partValues = other27.partValues; + columnName = other27.columnName; + __isset = other27.__isset; +} +HiveObjectRef& HiveObjectRef::operator=(const HiveObjectRef& other28) { + objectType = other28.objectType; + dbName = other28.dbName; + objectName = other28.objectName; + partValues = other28.partValues; + columnName = other28.columnName; + __isset = other28.__isset; + return *this; +} +void HiveObjectRef::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "HiveObjectRef("; + out << "objectType=" << to_string(objectType); + out << ", " << "dbName=" << to_string(dbName); + out << ", " << "objectName=" << to_string(objectName); + out << ", " << "partValues=" << to_string(partValues); + out << ", " << "columnName=" << to_string(columnName); + out << ")"; +} + + +PrivilegeGrantInfo::~PrivilegeGrantInfo() throw() { +} + + +void PrivilegeGrantInfo::__set_privilege(const std::string& val) { + this->privilege = val; +} + +void PrivilegeGrantInfo::__set_createTime(const int32_t val) { + this->createTime = val; +} + +void PrivilegeGrantInfo::__set_grantor(const std::string& val) { + this->grantor = val; +} + +void PrivilegeGrantInfo::__set_grantorType(const PrincipalType::type val) { + this->grantorType = val; +} + +void PrivilegeGrantInfo::__set_grantOption(const bool val) { + this->grantOption = val; +} + +uint32_t PrivilegeGrantInfo::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->privilege); + this->__isset.privilege = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast29; + xfer += iprot->readI32(ecast29); + this->grantorType = (PrincipalType::type)ecast29; + this->__isset.grantorType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->grantOption); + this->__isset.grantOption = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PrivilegeGrantInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +PrivilegeGrantInfo::PrivilegeGrantInfo(const PrivilegeGrantInfo& other30) { + privilege = other30.privilege; + createTime = other30.createTime; + grantor = other30.grantor; + grantorType = other30.grantorType; + grantOption = other30.grantOption; + __isset = other30.__isset; +} +PrivilegeGrantInfo& PrivilegeGrantInfo::operator=(const PrivilegeGrantInfo& other31) { + privilege = other31.privilege; + createTime = other31.createTime; + grantor = other31.grantor; + grantorType = other31.grantorType; + grantOption = other31.grantOption; + __isset = other31.__isset; + return *this; +} +void PrivilegeGrantInfo::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PrivilegeGrantInfo("; + out << "privilege=" << to_string(privilege); + out << ", " << "createTime=" << to_string(createTime); + out << ", " << "grantor=" << to_string(grantor); + out << ", " << "grantorType=" << to_string(grantorType); + out << ", " << "grantOption=" << to_string(grantOption); + out << ")"; +} + + +HiveObjectPrivilege::~HiveObjectPrivilege() throw() { +} + + +void HiveObjectPrivilege::__set_hiveObject(const HiveObjectRef& val) { + this->hiveObject = val; +} + +void HiveObjectPrivilege::__set_principalName(const std::string& val) { + this->principalName = val; +} + +void HiveObjectPrivilege::__set_principalType(const PrincipalType::type val) { + this->principalType = val; +} + +void HiveObjectPrivilege::__set_grantInfo(const PrivilegeGrantInfo& val) { + this->grantInfo = val; +} + +uint32_t HiveObjectPrivilege::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->hiveObject.read(iprot); + this->__isset.hiveObject = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principalName); + this->__isset.principalName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast32; + xfer += iprot->readI32(ecast32); + this->principalType = (PrincipalType::type)ecast32; + this->__isset.principalType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->grantInfo.read(iprot); + this->__isset.grantInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t HiveObjectPrivilege::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +HiveObjectPrivilege::HiveObjectPrivilege(const HiveObjectPrivilege& other33) { + hiveObject = other33.hiveObject; + principalName = other33.principalName; + principalType = other33.principalType; + grantInfo = other33.grantInfo; + __isset = other33.__isset; +} +HiveObjectPrivilege& HiveObjectPrivilege::operator=(const HiveObjectPrivilege& other34) { + hiveObject = other34.hiveObject; + principalName = other34.principalName; + principalType = other34.principalType; + grantInfo = other34.grantInfo; + __isset = other34.__isset; + return *this; +} +void HiveObjectPrivilege::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "HiveObjectPrivilege("; + out << "hiveObject=" << to_string(hiveObject); + out << ", " << "principalName=" << to_string(principalName); + out << ", " << "principalType=" << to_string(principalType); + out << ", " << "grantInfo=" << to_string(grantInfo); + out << ")"; +} + + +PrivilegeBag::~PrivilegeBag() throw() { +} + + +void PrivilegeBag::__set_privileges(const std::vector & val) { + this->privileges = val; +} + +uint32_t PrivilegeBag::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->privileges.clear(); + uint32_t _size35; + ::apache::thrift::protocol::TType _etype38; + xfer += iprot->readListBegin(_etype38, _size35); + this->privileges.resize(_size35); + uint32_t _i39; + for (_i39 = 0; _i39 < _size35; ++_i39) + { + xfer += this->privileges[_i39].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PrivilegeBag::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter40; + for (_iter40 = this->privileges.begin(); _iter40 != this->privileges.end(); ++_iter40) + { + xfer += (*_iter40).write(oprot); + } + 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); +} + +PrivilegeBag::PrivilegeBag(const PrivilegeBag& other41) { + privileges = other41.privileges; + __isset = other41.__isset; +} +PrivilegeBag& PrivilegeBag::operator=(const PrivilegeBag& other42) { + privileges = other42.privileges; + __isset = other42.__isset; + return *this; +} +void PrivilegeBag::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PrivilegeBag("; + out << "privileges=" << to_string(privileges); + out << ")"; +} + + +PrincipalPrivilegeSet::~PrincipalPrivilegeSet() throw() { +} + + +void PrincipalPrivilegeSet::__set_userPrivileges(const std::map > & val) { + this->userPrivileges = val; +} + +void PrincipalPrivilegeSet::__set_groupPrivileges(const std::map > & val) { + this->groupPrivileges = val; +} + +void PrincipalPrivilegeSet::__set_rolePrivileges(const std::map > & val) { + this->rolePrivileges = val; +} + +uint32_t PrincipalPrivilegeSet::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->userPrivileges.clear(); + uint32_t _size43; + ::apache::thrift::protocol::TType _ktype44; + ::apache::thrift::protocol::TType _vtype45; + xfer += iprot->readMapBegin(_ktype44, _vtype45, _size43); + uint32_t _i47; + for (_i47 = 0; _i47 < _size43; ++_i47) + { + std::string _key48; + xfer += iprot->readString(_key48); + std::vector & _val49 = this->userPrivileges[_key48]; + { + _val49.clear(); + uint32_t _size50; + ::apache::thrift::protocol::TType _etype53; + xfer += iprot->readListBegin(_etype53, _size50); + _val49.resize(_size50); + uint32_t _i54; + for (_i54 = 0; _i54 < _size50; ++_i54) + { + xfer += _val49[_i54].read(iprot); + } + xfer += iprot->readListEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.userPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->groupPrivileges.clear(); + uint32_t _size55; + ::apache::thrift::protocol::TType _ktype56; + ::apache::thrift::protocol::TType _vtype57; + xfer += iprot->readMapBegin(_ktype56, _vtype57, _size55); + uint32_t _i59; + for (_i59 = 0; _i59 < _size55; ++_i59) + { + std::string _key60; + xfer += iprot->readString(_key60); + std::vector & _val61 = this->groupPrivileges[_key60]; + { + _val61.clear(); + uint32_t _size62; + ::apache::thrift::protocol::TType _etype65; + xfer += iprot->readListBegin(_etype65, _size62); + _val61.resize(_size62); + uint32_t _i66; + for (_i66 = 0; _i66 < _size62; ++_i66) + { + xfer += _val61[_i66].read(iprot); + } + xfer += iprot->readListEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.groupPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->rolePrivileges.clear(); + uint32_t _size67; + ::apache::thrift::protocol::TType _ktype68; + ::apache::thrift::protocol::TType _vtype69; + xfer += iprot->readMapBegin(_ktype68, _vtype69, _size67); + uint32_t _i71; + for (_i71 = 0; _i71 < _size67; ++_i71) + { + std::string _key72; + xfer += iprot->readString(_key72); + std::vector & _val73 = this->rolePrivileges[_key72]; + { + _val73.clear(); + uint32_t _size74; + ::apache::thrift::protocol::TType _etype77; + xfer += iprot->readListBegin(_etype77, _size74); + _val73.resize(_size74); + uint32_t _i78; + for (_i78 = 0; _i78 < _size74; ++_i78) + { + xfer += _val73[_i78].read(iprot); + } + xfer += iprot->readListEnd(); + } + } + xfer += iprot->readMapEnd(); + } + this->__isset.rolePrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PrincipalPrivilegeSet::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::map > ::const_iterator _iter79; + for (_iter79 = this->userPrivileges.begin(); _iter79 != this->userPrivileges.end(); ++_iter79) + { + xfer += oprot->writeString(_iter79->first); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter79->second.size())); + std::vector ::const_iterator _iter80; + for (_iter80 = _iter79->second.begin(); _iter80 != _iter79->second.end(); ++_iter80) + { + xfer += (*_iter80).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + 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())); + std::map > ::const_iterator _iter81; + for (_iter81 = this->groupPrivileges.begin(); _iter81 != this->groupPrivileges.end(); ++_iter81) + { + xfer += oprot->writeString(_iter81->first); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter81->second.size())); + std::vector ::const_iterator _iter82; + for (_iter82 = _iter81->second.begin(); _iter82 != _iter81->second.end(); ++_iter82) + { + xfer += (*_iter82).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + 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())); + std::map > ::const_iterator _iter83; + for (_iter83 = this->rolePrivileges.begin(); _iter83 != this->rolePrivileges.end(); ++_iter83) + { + xfer += oprot->writeString(_iter83->first); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter83->second.size())); + std::vector ::const_iterator _iter84; + for (_iter84 = _iter83->second.begin(); _iter84 != _iter83->second.end(); ++_iter84) + { + xfer += (*_iter84).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + 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); +} + +PrincipalPrivilegeSet::PrincipalPrivilegeSet(const PrincipalPrivilegeSet& other85) { + userPrivileges = other85.userPrivileges; + groupPrivileges = other85.groupPrivileges; + rolePrivileges = other85.rolePrivileges; + __isset = other85.__isset; +} +PrincipalPrivilegeSet& PrincipalPrivilegeSet::operator=(const PrincipalPrivilegeSet& other86) { + userPrivileges = other86.userPrivileges; + groupPrivileges = other86.groupPrivileges; + rolePrivileges = other86.rolePrivileges; + __isset = other86.__isset; + return *this; +} +void PrincipalPrivilegeSet::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PrincipalPrivilegeSet("; + out << "userPrivileges=" << to_string(userPrivileges); + out << ", " << "groupPrivileges=" << to_string(groupPrivileges); + out << ", " << "rolePrivileges=" << to_string(rolePrivileges); + out << ")"; +} + + +GrantRevokePrivilegeRequest::~GrantRevokePrivilegeRequest() throw() { +} + + +void GrantRevokePrivilegeRequest::__set_requestType(const GrantRevokeType::type val) { + this->requestType = val; +} + +void GrantRevokePrivilegeRequest::__set_privileges(const PrivilegeBag& val) { + this->privileges = val; +} + +void GrantRevokePrivilegeRequest::__set_revokeGrantOption(const bool val) { + this->revokeGrantOption = val; +__isset.revokeGrantOption = true; +} + +uint32_t GrantRevokePrivilegeRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast87; + xfer += iprot->readI32(ecast87); + this->requestType = (GrantRevokeType::type)ecast87; + this->__isset.requestType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->revokeGrantOption); + this->__isset.revokeGrantOption = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t GrantRevokePrivilegeRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GrantRevokePrivilegeRequest"); + + xfer += oprot->writeFieldBegin("requestType", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->requestType); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.revokeGrantOption) { + xfer += oprot->writeFieldBegin("revokeGrantOption", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->revokeGrantOption); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GrantRevokePrivilegeRequest &a, GrantRevokePrivilegeRequest &b) { + using ::std::swap; + swap(a.requestType, b.requestType); + swap(a.privileges, b.privileges); + swap(a.revokeGrantOption, b.revokeGrantOption); + swap(a.__isset, b.__isset); +} + +GrantRevokePrivilegeRequest::GrantRevokePrivilegeRequest(const GrantRevokePrivilegeRequest& other88) { + requestType = other88.requestType; + privileges = other88.privileges; + revokeGrantOption = other88.revokeGrantOption; + __isset = other88.__isset; +} +GrantRevokePrivilegeRequest& GrantRevokePrivilegeRequest::operator=(const GrantRevokePrivilegeRequest& other89) { + requestType = other89.requestType; + privileges = other89.privileges; + revokeGrantOption = other89.revokeGrantOption; + __isset = other89.__isset; + return *this; +} +void GrantRevokePrivilegeRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GrantRevokePrivilegeRequest("; + out << "requestType=" << to_string(requestType); + out << ", " << "privileges=" << to_string(privileges); + out << ", " << "revokeGrantOption="; (__isset.revokeGrantOption ? (out << to_string(revokeGrantOption)) : (out << "")); + out << ")"; +} + + +GrantRevokePrivilegeResponse::~GrantRevokePrivilegeResponse() throw() { +} + + +void GrantRevokePrivilegeResponse::__set_success(const bool val) { + this->success = val; +__isset.success = true; +} + +uint32_t GrantRevokePrivilegeResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t GrantRevokePrivilegeResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GrantRevokePrivilegeResponse"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GrantRevokePrivilegeResponse &a, GrantRevokePrivilegeResponse &b) { + using ::std::swap; + swap(a.success, b.success); + swap(a.__isset, b.__isset); +} + +GrantRevokePrivilegeResponse::GrantRevokePrivilegeResponse(const GrantRevokePrivilegeResponse& other90) { + success = other90.success; + __isset = other90.__isset; +} +GrantRevokePrivilegeResponse& GrantRevokePrivilegeResponse::operator=(const GrantRevokePrivilegeResponse& other91) { + success = other91.success; + __isset = other91.__isset; + return *this; +} +void GrantRevokePrivilegeResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GrantRevokePrivilegeResponse("; + out << "success="; (__isset.success ? (out << to_string(success)) : (out << "")); + out << ")"; +} + + +Role::~Role() throw() { +} + + +void Role::__set_roleName(const std::string& val) { + this->roleName = val; +} + +void Role::__set_createTime(const int32_t val) { + this->createTime = val; +} + +void Role::__set_ownerName(const std::string& val) { + this->ownerName = val; +} + +uint32_t Role::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->roleName); + this->__isset.roleName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ownerName); + this->__isset.ownerName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Role::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +Role::Role(const Role& other92) { + roleName = other92.roleName; + createTime = other92.createTime; + ownerName = other92.ownerName; + __isset = other92.__isset; +} +Role& Role::operator=(const Role& other93) { + roleName = other93.roleName; + createTime = other93.createTime; + ownerName = other93.ownerName; + __isset = other93.__isset; + return *this; +} +void Role::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Role("; + out << "roleName=" << to_string(roleName); + out << ", " << "createTime=" << to_string(createTime); + out << ", " << "ownerName=" << to_string(ownerName); + out << ")"; +} + + +RolePrincipalGrant::~RolePrincipalGrant() throw() { +} + + +void RolePrincipalGrant::__set_roleName(const std::string& val) { + this->roleName = val; +} + +void RolePrincipalGrant::__set_principalName(const std::string& val) { + this->principalName = val; +} + +void RolePrincipalGrant::__set_principalType(const PrincipalType::type val) { + this->principalType = val; +} + +void RolePrincipalGrant::__set_grantOption(const bool val) { + this->grantOption = val; +} + +void RolePrincipalGrant::__set_grantTime(const int32_t val) { + this->grantTime = val; +} + +void RolePrincipalGrant::__set_grantorName(const std::string& val) { + this->grantorName = val; +} + +void RolePrincipalGrant::__set_grantorPrincipalType(const PrincipalType::type val) { + this->grantorPrincipalType = val; +} + +uint32_t RolePrincipalGrant::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->roleName); + this->__isset.roleName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principalName); + this->__isset.principalName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast94; + xfer += iprot->readI32(ecast94); + this->principalType = (PrincipalType::type)ecast94; + this->__isset.principalType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->grantOption); + this->__isset.grantOption = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->grantTime); + this->__isset.grantTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantorName); + this->__isset.grantorName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast95; + xfer += iprot->readI32(ecast95); + this->grantorPrincipalType = (PrincipalType::type)ecast95; + this->__isset.grantorPrincipalType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t RolePrincipalGrant::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("RolePrincipalGrant"); + + xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->roleName); + 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("grantOption", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->grantOption); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("grantTime", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->grantTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("grantorName", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->grantorName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("grantorPrincipalType", ::apache::thrift::protocol::T_I32, 7); + xfer += oprot->writeI32((int32_t)this->grantorPrincipalType); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(RolePrincipalGrant &a, RolePrincipalGrant &b) { + using ::std::swap; + swap(a.roleName, b.roleName); + swap(a.principalName, b.principalName); + swap(a.principalType, b.principalType); + swap(a.grantOption, b.grantOption); + swap(a.grantTime, b.grantTime); + swap(a.grantorName, b.grantorName); + swap(a.grantorPrincipalType, b.grantorPrincipalType); + swap(a.__isset, b.__isset); +} + +RolePrincipalGrant::RolePrincipalGrant(const RolePrincipalGrant& other96) { + roleName = other96.roleName; + principalName = other96.principalName; + principalType = other96.principalType; + grantOption = other96.grantOption; + grantTime = other96.grantTime; + grantorName = other96.grantorName; + grantorPrincipalType = other96.grantorPrincipalType; + __isset = other96.__isset; +} +RolePrincipalGrant& RolePrincipalGrant::operator=(const RolePrincipalGrant& other97) { + roleName = other97.roleName; + principalName = other97.principalName; + principalType = other97.principalType; + grantOption = other97.grantOption; + grantTime = other97.grantTime; + grantorName = other97.grantorName; + grantorPrincipalType = other97.grantorPrincipalType; + __isset = other97.__isset; + return *this; +} +void RolePrincipalGrant::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "RolePrincipalGrant("; + out << "roleName=" << to_string(roleName); + out << ", " << "principalName=" << to_string(principalName); + out << ", " << "principalType=" << to_string(principalType); + out << ", " << "grantOption=" << to_string(grantOption); + out << ", " << "grantTime=" << to_string(grantTime); + out << ", " << "grantorName=" << to_string(grantorName); + out << ", " << "grantorPrincipalType=" << to_string(grantorPrincipalType); + out << ")"; +} + + +GetRoleGrantsForPrincipalRequest::~GetRoleGrantsForPrincipalRequest() throw() { +} + + +void GetRoleGrantsForPrincipalRequest::__set_principal_name(const std::string& val) { + this->principal_name = val; +} + +void GetRoleGrantsForPrincipalRequest::__set_principal_type(const PrincipalType::type val) { + this->principal_type = val; +} + +uint32_t GetRoleGrantsForPrincipalRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_principal_name = false; + bool isset_principal_type = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + isset_principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast98; + xfer += iprot->readI32(ecast98); + this->principal_type = (PrincipalType::type)ecast98; + isset_principal_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_principal_name) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_principal_type) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetRoleGrantsForPrincipalRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetRoleGrantsForPrincipalRequest"); + + 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; +} + +void swap(GetRoleGrantsForPrincipalRequest &a, GetRoleGrantsForPrincipalRequest &b) { + using ::std::swap; + swap(a.principal_name, b.principal_name); + swap(a.principal_type, b.principal_type); +} + +GetRoleGrantsForPrincipalRequest::GetRoleGrantsForPrincipalRequest(const GetRoleGrantsForPrincipalRequest& other99) { + principal_name = other99.principal_name; + principal_type = other99.principal_type; +} +GetRoleGrantsForPrincipalRequest& GetRoleGrantsForPrincipalRequest::operator=(const GetRoleGrantsForPrincipalRequest& other100) { + principal_name = other100.principal_name; + principal_type = other100.principal_type; + return *this; +} +void GetRoleGrantsForPrincipalRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetRoleGrantsForPrincipalRequest("; + out << "principal_name=" << to_string(principal_name); + out << ", " << "principal_type=" << to_string(principal_type); + out << ")"; +} + + +GetRoleGrantsForPrincipalResponse::~GetRoleGrantsForPrincipalResponse() throw() { +} + + +void GetRoleGrantsForPrincipalResponse::__set_principalGrants(const std::vector & val) { + this->principalGrants = val; +} + +uint32_t GetRoleGrantsForPrincipalResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_principalGrants = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->principalGrants.clear(); + uint32_t _size101; + ::apache::thrift::protocol::TType _etype104; + xfer += iprot->readListBegin(_etype104, _size101); + this->principalGrants.resize(_size101); + uint32_t _i105; + for (_i105 = 0; _i105 < _size101; ++_i105) + { + xfer += this->principalGrants[_i105].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_principalGrants = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_principalGrants) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetRoleGrantsForPrincipalResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetRoleGrantsForPrincipalResponse"); + + xfer += oprot->writeFieldBegin("principalGrants", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->principalGrants.size())); + std::vector ::const_iterator _iter106; + for (_iter106 = this->principalGrants.begin(); _iter106 != this->principalGrants.end(); ++_iter106) + { + xfer += (*_iter106).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetRoleGrantsForPrincipalResponse &a, GetRoleGrantsForPrincipalResponse &b) { + using ::std::swap; + swap(a.principalGrants, b.principalGrants); +} + +GetRoleGrantsForPrincipalResponse::GetRoleGrantsForPrincipalResponse(const GetRoleGrantsForPrincipalResponse& other107) { + principalGrants = other107.principalGrants; +} +GetRoleGrantsForPrincipalResponse& GetRoleGrantsForPrincipalResponse::operator=(const GetRoleGrantsForPrincipalResponse& other108) { + principalGrants = other108.principalGrants; + return *this; +} +void GetRoleGrantsForPrincipalResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetRoleGrantsForPrincipalResponse("; + out << "principalGrants=" << to_string(principalGrants); + out << ")"; +} + + +GetPrincipalsInRoleRequest::~GetPrincipalsInRoleRequest() throw() { +} + + +void GetPrincipalsInRoleRequest::__set_roleName(const std::string& val) { + this->roleName = val; +} + +uint32_t GetPrincipalsInRoleRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_roleName = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->roleName); + isset_roleName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_roleName) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetPrincipalsInRoleRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetPrincipalsInRoleRequest"); + + xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->roleName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetPrincipalsInRoleRequest &a, GetPrincipalsInRoleRequest &b) { + using ::std::swap; + swap(a.roleName, b.roleName); +} + +GetPrincipalsInRoleRequest::GetPrincipalsInRoleRequest(const GetPrincipalsInRoleRequest& other109) { + roleName = other109.roleName; +} +GetPrincipalsInRoleRequest& GetPrincipalsInRoleRequest::operator=(const GetPrincipalsInRoleRequest& other110) { + roleName = other110.roleName; + return *this; +} +void GetPrincipalsInRoleRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetPrincipalsInRoleRequest("; + out << "roleName=" << to_string(roleName); + out << ")"; +} + + +GetPrincipalsInRoleResponse::~GetPrincipalsInRoleResponse() throw() { +} + + +void GetPrincipalsInRoleResponse::__set_principalGrants(const std::vector & val) { + this->principalGrants = val; +} + +uint32_t GetPrincipalsInRoleResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_principalGrants = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->principalGrants.clear(); + uint32_t _size111; + ::apache::thrift::protocol::TType _etype114; + xfer += iprot->readListBegin(_etype114, _size111); + this->principalGrants.resize(_size111); + uint32_t _i115; + for (_i115 = 0; _i115 < _size111; ++_i115) + { + xfer += this->principalGrants[_i115].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_principalGrants = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_principalGrants) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetPrincipalsInRoleResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetPrincipalsInRoleResponse"); + + xfer += oprot->writeFieldBegin("principalGrants", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->principalGrants.size())); + std::vector ::const_iterator _iter116; + for (_iter116 = this->principalGrants.begin(); _iter116 != this->principalGrants.end(); ++_iter116) + { + xfer += (*_iter116).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetPrincipalsInRoleResponse &a, GetPrincipalsInRoleResponse &b) { + using ::std::swap; + swap(a.principalGrants, b.principalGrants); +} + +GetPrincipalsInRoleResponse::GetPrincipalsInRoleResponse(const GetPrincipalsInRoleResponse& other117) { + principalGrants = other117.principalGrants; +} +GetPrincipalsInRoleResponse& GetPrincipalsInRoleResponse::operator=(const GetPrincipalsInRoleResponse& other118) { + principalGrants = other118.principalGrants; + return *this; +} +void GetPrincipalsInRoleResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetPrincipalsInRoleResponse("; + out << "principalGrants=" << to_string(principalGrants); + out << ")"; +} + + +GrantRevokeRoleRequest::~GrantRevokeRoleRequest() throw() { +} + + +void GrantRevokeRoleRequest::__set_requestType(const GrantRevokeType::type val) { + this->requestType = val; +} + +void GrantRevokeRoleRequest::__set_roleName(const std::string& val) { + this->roleName = val; +} + +void GrantRevokeRoleRequest::__set_principalName(const std::string& val) { + this->principalName = val; +} + +void GrantRevokeRoleRequest::__set_principalType(const PrincipalType::type val) { + this->principalType = val; +} + +void GrantRevokeRoleRequest::__set_grantor(const std::string& val) { + this->grantor = val; +__isset.grantor = true; +} + +void GrantRevokeRoleRequest::__set_grantorType(const PrincipalType::type val) { + this->grantorType = val; +__isset.grantorType = true; +} + +void GrantRevokeRoleRequest::__set_grantOption(const bool val) { + this->grantOption = val; +__isset.grantOption = true; +} + +uint32_t GrantRevokeRoleRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast119; + xfer += iprot->readI32(ecast119); + this->requestType = (GrantRevokeType::type)ecast119; + this->__isset.requestType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->roleName); + this->__isset.roleName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principalName); + this->__isset.principalName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast120; + xfer += iprot->readI32(ecast120); + this->principalType = (PrincipalType::type)ecast120; + this->__isset.principalType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast121; + xfer += iprot->readI32(ecast121); + this->grantorType = (PrincipalType::type)ecast121; + this->__isset.grantorType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->grantOption); + this->__isset.grantOption = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t GrantRevokeRoleRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GrantRevokeRoleRequest"); + + xfer += oprot->writeFieldBegin("requestType", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->requestType); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->roleName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->principalName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((int32_t)this->principalType); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.grantor) { + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.grantorType) { + xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeI32((int32_t)this->grantorType); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.grantOption) { + xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->grantOption); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GrantRevokeRoleRequest &a, GrantRevokeRoleRequest &b) { + using ::std::swap; + swap(a.requestType, b.requestType); + swap(a.roleName, b.roleName); + swap(a.principalName, b.principalName); + swap(a.principalType, b.principalType); + swap(a.grantor, b.grantor); + swap(a.grantorType, b.grantorType); + swap(a.grantOption, b.grantOption); + swap(a.__isset, b.__isset); +} + +GrantRevokeRoleRequest::GrantRevokeRoleRequest(const GrantRevokeRoleRequest& other122) { + requestType = other122.requestType; + roleName = other122.roleName; + principalName = other122.principalName; + principalType = other122.principalType; + grantor = other122.grantor; + grantorType = other122.grantorType; + grantOption = other122.grantOption; + __isset = other122.__isset; +} +GrantRevokeRoleRequest& GrantRevokeRoleRequest::operator=(const GrantRevokeRoleRequest& other123) { + requestType = other123.requestType; + roleName = other123.roleName; + principalName = other123.principalName; + principalType = other123.principalType; + grantor = other123.grantor; + grantorType = other123.grantorType; + grantOption = other123.grantOption; + __isset = other123.__isset; + return *this; +} +void GrantRevokeRoleRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GrantRevokeRoleRequest("; + out << "requestType=" << to_string(requestType); + out << ", " << "roleName=" << to_string(roleName); + out << ", " << "principalName=" << to_string(principalName); + out << ", " << "principalType=" << to_string(principalType); + out << ", " << "grantor="; (__isset.grantor ? (out << to_string(grantor)) : (out << "")); + out << ", " << "grantorType="; (__isset.grantorType ? (out << to_string(grantorType)) : (out << "")); + out << ", " << "grantOption="; (__isset.grantOption ? (out << to_string(grantOption)) : (out << "")); + out << ")"; +} + + +GrantRevokeRoleResponse::~GrantRevokeRoleResponse() throw() { +} + + +void GrantRevokeRoleResponse::__set_success(const bool val) { + this->success = val; +__isset.success = true; +} + +uint32_t GrantRevokeRoleResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t GrantRevokeRoleResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GrantRevokeRoleResponse"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GrantRevokeRoleResponse &a, GrantRevokeRoleResponse &b) { + using ::std::swap; + swap(a.success, b.success); + swap(a.__isset, b.__isset); +} + +GrantRevokeRoleResponse::GrantRevokeRoleResponse(const GrantRevokeRoleResponse& other124) { + success = other124.success; + __isset = other124.__isset; +} +GrantRevokeRoleResponse& GrantRevokeRoleResponse::operator=(const GrantRevokeRoleResponse& other125) { + success = other125.success; + __isset = other125.__isset; + return *this; +} +void GrantRevokeRoleResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GrantRevokeRoleResponse("; + out << "success="; (__isset.success ? (out << to_string(success)) : (out << "")); + out << ")"; +} + + +Database::~Database() throw() { +} + + +void Database::__set_name(const std::string& val) { + this->name = val; +} + +void Database::__set_description(const std::string& val) { + this->description = val; +} + +void Database::__set_locationUri(const std::string& val) { + this->locationUri = val; +} + +void Database::__set_parameters(const std::map & val) { + this->parameters = val; +} + +void Database::__set_privileges(const PrincipalPrivilegeSet& val) { + this->privileges = val; +__isset.privileges = true; +} + +void Database::__set_ownerName(const std::string& val) { + this->ownerName = val; +__isset.ownerName = true; +} + +void Database::__set_ownerType(const PrincipalType::type val) { + this->ownerType = val; +__isset.ownerType = true; +} + +uint32_t Database::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->description); + this->__isset.description = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->locationUri); + this->__isset.locationUri = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size126; + ::apache::thrift::protocol::TType _ktype127; + ::apache::thrift::protocol::TType _vtype128; + xfer += iprot->readMapBegin(_ktype127, _vtype128, _size126); + uint32_t _i130; + for (_i130 = 0; _i130 < _size126; ++_i130) + { + std::string _key131; + xfer += iprot->readString(_key131); + std::string& _val132 = this->parameters[_key131]; + xfer += iprot->readString(_val132); + } + xfer += iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ownerName); + this->__isset.ownerName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast133; + xfer += iprot->readI32(ecast133); + this->ownerType = (PrincipalType::type)ecast133; + this->__isset.ownerType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Database::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::map ::const_iterator _iter134; + for (_iter134 = this->parameters.begin(); _iter134 != this->parameters.end(); ++_iter134) + { + xfer += oprot->writeString(_iter134->first); + xfer += oprot->writeString(_iter134->second); + } + 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); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.ownerName) { + xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->ownerName); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.ownerType) { + xfer += oprot->writeFieldBegin("ownerType", ::apache::thrift::protocol::T_I32, 7); + xfer += oprot->writeI32((int32_t)this->ownerType); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + 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.ownerName, b.ownerName); + swap(a.ownerType, b.ownerType); + swap(a.__isset, b.__isset); +} + +Database::Database(const Database& other135) { + name = other135.name; + description = other135.description; + locationUri = other135.locationUri; + parameters = other135.parameters; + privileges = other135.privileges; + ownerName = other135.ownerName; + ownerType = other135.ownerType; + __isset = other135.__isset; +} +Database& Database::operator=(const Database& other136) { + name = other136.name; + description = other136.description; + locationUri = other136.locationUri; + parameters = other136.parameters; + privileges = other136.privileges; + ownerName = other136.ownerName; + ownerType = other136.ownerType; + __isset = other136.__isset; + return *this; +} +void Database::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Database("; + out << "name=" << to_string(name); + out << ", " << "description=" << to_string(description); + out << ", " << "locationUri=" << to_string(locationUri); + out << ", " << "parameters=" << to_string(parameters); + out << ", " << "privileges="; (__isset.privileges ? (out << to_string(privileges)) : (out << "")); + out << ", " << "ownerName="; (__isset.ownerName ? (out << to_string(ownerName)) : (out << "")); + out << ", " << "ownerType="; (__isset.ownerType ? (out << to_string(ownerType)) : (out << "")); + out << ")"; +} + + +SerDeInfo::~SerDeInfo() throw() { +} + + +void SerDeInfo::__set_name(const std::string& val) { + this->name = val; +} + +void SerDeInfo::__set_serializationLib(const std::string& val) { + this->serializationLib = val; +} + +void SerDeInfo::__set_parameters(const std::map & val) { + this->parameters = val; +} + +uint32_t SerDeInfo::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->serializationLib); + this->__isset.serializationLib = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size137; + ::apache::thrift::protocol::TType _ktype138; + ::apache::thrift::protocol::TType _vtype139; + xfer += iprot->readMapBegin(_ktype138, _vtype139, _size137); + uint32_t _i141; + for (_i141 = 0; _i141 < _size137; ++_i141) + { + std::string _key142; + xfer += iprot->readString(_key142); + std::string& _val143 = this->parameters[_key142]; + xfer += iprot->readString(_val143); + } + xfer += iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SerDeInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::map ::const_iterator _iter144; + for (_iter144 = this->parameters.begin(); _iter144 != this->parameters.end(); ++_iter144) + { + xfer += oprot->writeString(_iter144->first); + xfer += oprot->writeString(_iter144->second); + } + 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); +} + +SerDeInfo::SerDeInfo(const SerDeInfo& other145) { + name = other145.name; + serializationLib = other145.serializationLib; + parameters = other145.parameters; + __isset = other145.__isset; +} +SerDeInfo& SerDeInfo::operator=(const SerDeInfo& other146) { + name = other146.name; + serializationLib = other146.serializationLib; + parameters = other146.parameters; + __isset = other146.__isset; + return *this; +} +void SerDeInfo::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "SerDeInfo("; + out << "name=" << to_string(name); + out << ", " << "serializationLib=" << to_string(serializationLib); + out << ", " << "parameters=" << to_string(parameters); + out << ")"; +} + + +Order::~Order() throw() { +} + + +void Order::__set_col(const std::string& val) { + this->col = val; +} + +void Order::__set_order(const int32_t val) { + this->order = val; +} + +uint32_t Order::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->col); + this->__isset.col = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->order); + this->__isset.order = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Order::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +Order::Order(const Order& other147) { + col = other147.col; + order = other147.order; + __isset = other147.__isset; +} +Order& Order::operator=(const Order& other148) { + col = other148.col; + order = other148.order; + __isset = other148.__isset; + return *this; +} +void Order::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Order("; + out << "col=" << to_string(col); + out << ", " << "order=" << to_string(order); + out << ")"; +} + + +SkewedInfo::~SkewedInfo() throw() { +} + + +void SkewedInfo::__set_skewedColNames(const std::vector & val) { + this->skewedColNames = val; +} + +void SkewedInfo::__set_skewedColValues(const std::vector > & val) { + this->skewedColValues = val; +} + +void SkewedInfo::__set_skewedColValueLocationMaps(const std::map , std::string> & val) { + this->skewedColValueLocationMaps = val; +} + +uint32_t SkewedInfo::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->skewedColNames.clear(); + uint32_t _size149; + ::apache::thrift::protocol::TType _etype152; + xfer += iprot->readListBegin(_etype152, _size149); + this->skewedColNames.resize(_size149); + uint32_t _i153; + for (_i153 = 0; _i153 < _size149; ++_i153) + { + xfer += iprot->readString(this->skewedColNames[_i153]); + } + xfer += iprot->readListEnd(); + } + this->__isset.skewedColNames = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->skewedColValues.clear(); + uint32_t _size154; + ::apache::thrift::protocol::TType _etype157; + xfer += iprot->readListBegin(_etype157, _size154); + this->skewedColValues.resize(_size154); + uint32_t _i158; + for (_i158 = 0; _i158 < _size154; ++_i158) + { + { + this->skewedColValues[_i158].clear(); + uint32_t _size159; + ::apache::thrift::protocol::TType _etype162; + xfer += iprot->readListBegin(_etype162, _size159); + this->skewedColValues[_i158].resize(_size159); + uint32_t _i163; + for (_i163 = 0; _i163 < _size159; ++_i163) + { + xfer += iprot->readString(this->skewedColValues[_i158][_i163]); + } + xfer += iprot->readListEnd(); + } + } + xfer += iprot->readListEnd(); + } + this->__isset.skewedColValues = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->skewedColValueLocationMaps.clear(); + uint32_t _size164; + ::apache::thrift::protocol::TType _ktype165; + ::apache::thrift::protocol::TType _vtype166; + xfer += iprot->readMapBegin(_ktype165, _vtype166, _size164); + uint32_t _i168; + for (_i168 = 0; _i168 < _size164; ++_i168) + { + std::vector _key169; + { + _key169.clear(); + uint32_t _size171; + ::apache::thrift::protocol::TType _etype174; + xfer += iprot->readListBegin(_etype174, _size171); + _key169.resize(_size171); + uint32_t _i175; + for (_i175 = 0; _i175 < _size171; ++_i175) + { + xfer += iprot->readString(_key169[_i175]); + } + xfer += iprot->readListEnd(); + } + std::string& _val170 = this->skewedColValueLocationMaps[_key169]; + xfer += iprot->readString(_val170); + } + xfer += iprot->readMapEnd(); + } + this->__isset.skewedColValueLocationMaps = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SkewedInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter176; + for (_iter176 = this->skewedColNames.begin(); _iter176 != this->skewedColNames.end(); ++_iter176) + { + xfer += oprot->writeString((*_iter176)); + } + 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())); + std::vector > ::const_iterator _iter177; + for (_iter177 = this->skewedColValues.begin(); _iter177 != this->skewedColValues.end(); ++_iter177) + { + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*_iter177).size())); + std::vector ::const_iterator _iter178; + for (_iter178 = (*_iter177).begin(); _iter178 != (*_iter177).end(); ++_iter178) + { + xfer += oprot->writeString((*_iter178)); + } + xfer += oprot->writeListEnd(); + } + } + 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())); + std::map , std::string> ::const_iterator _iter179; + for (_iter179 = this->skewedColValueLocationMaps.begin(); _iter179 != this->skewedColValueLocationMaps.end(); ++_iter179) + { + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(_iter179->first.size())); + std::vector ::const_iterator _iter180; + for (_iter180 = _iter179->first.begin(); _iter180 != _iter179->first.end(); ++_iter180) + { + xfer += oprot->writeString((*_iter180)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeString(_iter179->second); + } + 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); +} + +SkewedInfo::SkewedInfo(const SkewedInfo& other181) { + skewedColNames = other181.skewedColNames; + skewedColValues = other181.skewedColValues; + skewedColValueLocationMaps = other181.skewedColValueLocationMaps; + __isset = other181.__isset; +} +SkewedInfo& SkewedInfo::operator=(const SkewedInfo& other182) { + skewedColNames = other182.skewedColNames; + skewedColValues = other182.skewedColValues; + skewedColValueLocationMaps = other182.skewedColValueLocationMaps; + __isset = other182.__isset; + return *this; +} +void SkewedInfo::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "SkewedInfo("; + out << "skewedColNames=" << to_string(skewedColNames); + out << ", " << "skewedColValues=" << to_string(skewedColValues); + out << ", " << "skewedColValueLocationMaps=" << to_string(skewedColValueLocationMaps); + out << ")"; +} + + +StorageDescriptor::~StorageDescriptor() throw() { +} + + +void StorageDescriptor::__set_cols(const std::vector & val) { + this->cols = val; +} + +void StorageDescriptor::__set_location(const std::string& val) { + this->location = val; +} + +void StorageDescriptor::__set_inputFormat(const std::string& val) { + this->inputFormat = val; +} + +void StorageDescriptor::__set_outputFormat(const std::string& val) { + this->outputFormat = val; +} + +void StorageDescriptor::__set_compressed(const bool val) { + this->compressed = val; +} + +void StorageDescriptor::__set_numBuckets(const int32_t val) { + this->numBuckets = val; +} + +void StorageDescriptor::__set_serdeInfo(const SerDeInfo& val) { + this->serdeInfo = val; +} + +void StorageDescriptor::__set_bucketCols(const std::vector & val) { + this->bucketCols = val; +} + +void StorageDescriptor::__set_sortCols(const std::vector & val) { + this->sortCols = val; +} + +void StorageDescriptor::__set_parameters(const std::map & val) { + this->parameters = val; +} + +void StorageDescriptor::__set_skewedInfo(const SkewedInfo& val) { + this->skewedInfo = val; +__isset.skewedInfo = true; +} + +void StorageDescriptor::__set_storedAsSubDirectories(const bool val) { + this->storedAsSubDirectories = val; +__isset.storedAsSubDirectories = true; +} + +uint32_t StorageDescriptor::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->cols.clear(); + uint32_t _size183; + ::apache::thrift::protocol::TType _etype186; + xfer += iprot->readListBegin(_etype186, _size183); + this->cols.resize(_size183); + uint32_t _i187; + for (_i187 = 0; _i187 < _size183; ++_i187) + { + xfer += this->cols[_i187].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.cols = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->location); + this->__isset.location = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->inputFormat); + this->__isset.inputFormat = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->outputFormat); + this->__isset.outputFormat = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->compressed); + this->__isset.compressed = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->numBuckets); + this->__isset.numBuckets = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->serdeInfo.read(iprot); + this->__isset.serdeInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->bucketCols.clear(); + uint32_t _size188; + ::apache::thrift::protocol::TType _etype191; + xfer += iprot->readListBegin(_etype191, _size188); + this->bucketCols.resize(_size188); + uint32_t _i192; + for (_i192 = 0; _i192 < _size188; ++_i192) + { + xfer += iprot->readString(this->bucketCols[_i192]); + } + xfer += iprot->readListEnd(); + } + this->__isset.bucketCols = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->sortCols.clear(); + uint32_t _size193; + ::apache::thrift::protocol::TType _etype196; + xfer += iprot->readListBegin(_etype196, _size193); + this->sortCols.resize(_size193); + uint32_t _i197; + for (_i197 = 0; _i197 < _size193; ++_i197) + { + xfer += this->sortCols[_i197].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.sortCols = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size198; + ::apache::thrift::protocol::TType _ktype199; + ::apache::thrift::protocol::TType _vtype200; + xfer += iprot->readMapBegin(_ktype199, _vtype200, _size198); + uint32_t _i202; + for (_i202 = 0; _i202 < _size198; ++_i202) + { + std::string _key203; + xfer += iprot->readString(_key203); + std::string& _val204 = this->parameters[_key203]; + xfer += iprot->readString(_val204); + } + xfer += iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->skewedInfo.read(iprot); + this->__isset.skewedInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->storedAsSubDirectories); + this->__isset.storedAsSubDirectories = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t StorageDescriptor::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter205; + for (_iter205 = this->cols.begin(); _iter205 != this->cols.end(); ++_iter205) + { + xfer += (*_iter205).write(oprot); + } + 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())); + std::vector ::const_iterator _iter206; + for (_iter206 = this->bucketCols.begin(); _iter206 != this->bucketCols.end(); ++_iter206) + { + xfer += oprot->writeString((*_iter206)); + } + 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())); + std::vector ::const_iterator _iter207; + for (_iter207 = this->sortCols.begin(); _iter207 != this->sortCols.end(); ++_iter207) + { + xfer += (*_iter207).write(oprot); + } + 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())); + std::map ::const_iterator _iter208; + for (_iter208 = this->parameters.begin(); _iter208 != this->parameters.end(); ++_iter208) + { + xfer += oprot->writeString(_iter208->first); + xfer += oprot->writeString(_iter208->second); + } + 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); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.storedAsSubDirectories) { + xfer += oprot->writeFieldBegin("storedAsSubDirectories", ::apache::thrift::protocol::T_BOOL, 12); + xfer += oprot->writeBool(this->storedAsSubDirectories); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + 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.storedAsSubDirectories, b.storedAsSubDirectories); + swap(a.__isset, b.__isset); +} + +StorageDescriptor::StorageDescriptor(const StorageDescriptor& other209) { + cols = other209.cols; + location = other209.location; + inputFormat = other209.inputFormat; + outputFormat = other209.outputFormat; + compressed = other209.compressed; + numBuckets = other209.numBuckets; + serdeInfo = other209.serdeInfo; + bucketCols = other209.bucketCols; + sortCols = other209.sortCols; + parameters = other209.parameters; + skewedInfo = other209.skewedInfo; + storedAsSubDirectories = other209.storedAsSubDirectories; + __isset = other209.__isset; +} +StorageDescriptor& StorageDescriptor::operator=(const StorageDescriptor& other210) { + cols = other210.cols; + location = other210.location; + inputFormat = other210.inputFormat; + outputFormat = other210.outputFormat; + compressed = other210.compressed; + numBuckets = other210.numBuckets; + serdeInfo = other210.serdeInfo; + bucketCols = other210.bucketCols; + sortCols = other210.sortCols; + parameters = other210.parameters; + skewedInfo = other210.skewedInfo; + storedAsSubDirectories = other210.storedAsSubDirectories; + __isset = other210.__isset; + return *this; +} +void StorageDescriptor::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "StorageDescriptor("; + out << "cols=" << to_string(cols); + out << ", " << "location=" << to_string(location); + out << ", " << "inputFormat=" << to_string(inputFormat); + out << ", " << "outputFormat=" << to_string(outputFormat); + out << ", " << "compressed=" << to_string(compressed); + out << ", " << "numBuckets=" << to_string(numBuckets); + out << ", " << "serdeInfo=" << to_string(serdeInfo); + out << ", " << "bucketCols=" << to_string(bucketCols); + out << ", " << "sortCols=" << to_string(sortCols); + out << ", " << "parameters=" << to_string(parameters); + out << ", " << "skewedInfo="; (__isset.skewedInfo ? (out << to_string(skewedInfo)) : (out << "")); + out << ", " << "storedAsSubDirectories="; (__isset.storedAsSubDirectories ? (out << to_string(storedAsSubDirectories)) : (out << "")); + out << ")"; +} + + +Table::~Table() throw() { +} + + +void Table::__set_tableName(const std::string& val) { + this->tableName = val; +} + +void Table::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void Table::__set_owner(const std::string& val) { + this->owner = val; +} + +void Table::__set_createTime(const int32_t val) { + this->createTime = val; +} + +void Table::__set_lastAccessTime(const int32_t val) { + this->lastAccessTime = val; +} + +void Table::__set_retention(const int32_t val) { + this->retention = val; +} + +void Table::__set_sd(const StorageDescriptor& val) { + this->sd = val; +} + +void Table::__set_partitionKeys(const std::vector & val) { + this->partitionKeys = val; +} + +void Table::__set_parameters(const std::map & val) { + this->parameters = val; +} + +void Table::__set_viewOriginalText(const std::string& val) { + this->viewOriginalText = val; +} + +void Table::__set_viewExpandedText(const std::string& val) { + this->viewExpandedText = val; +} + +void Table::__set_tableType(const std::string& val) { + this->tableType = val; +} + +void Table::__set_privileges(const PrincipalPrivilegeSet& val) { + this->privileges = val; +__isset.privileges = true; +} + +void Table::__set_temporary(const bool val) { + this->temporary = val; +__isset.temporary = true; +} + +void Table::__set_rewriteEnabled(const bool val) { + this->rewriteEnabled = val; +__isset.rewriteEnabled = true; +} + +uint32_t Table::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->owner); + this->__isset.owner = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->lastAccessTime); + this->__isset.lastAccessTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->retention); + this->__isset.retention = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sd.read(iprot); + this->__isset.sd = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitionKeys.clear(); + uint32_t _size211; + ::apache::thrift::protocol::TType _etype214; + xfer += iprot->readListBegin(_etype214, _size211); + this->partitionKeys.resize(_size211); + uint32_t _i215; + for (_i215 = 0; _i215 < _size211; ++_i215) + { + xfer += this->partitionKeys[_i215].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.partitionKeys = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size216; + ::apache::thrift::protocol::TType _ktype217; + ::apache::thrift::protocol::TType _vtype218; + xfer += iprot->readMapBegin(_ktype217, _vtype218, _size216); + uint32_t _i220; + for (_i220 = 0; _i220 < _size216; ++_i220) + { + std::string _key221; + xfer += iprot->readString(_key221); + std::string& _val222 = this->parameters[_key221]; + xfer += iprot->readString(_val222); + } + xfer += iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->viewOriginalText); + this->__isset.viewOriginalText = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->viewExpandedText); + this->__isset.viewExpandedText = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableType); + this->__isset.tableType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 13: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 14: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->temporary); + this->__isset.temporary = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 15: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->rewriteEnabled); + this->__isset.rewriteEnabled = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Table::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter223; + for (_iter223 = this->partitionKeys.begin(); _iter223 != this->partitionKeys.end(); ++_iter223) + { + xfer += (*_iter223).write(oprot); + } + 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())); + std::map ::const_iterator _iter224; + for (_iter224 = this->parameters.begin(); _iter224 != this->parameters.end(); ++_iter224) + { + xfer += oprot->writeString(_iter224->first); + xfer += oprot->writeString(_iter224->second); + } + 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); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.temporary) { + xfer += oprot->writeFieldBegin("temporary", ::apache::thrift::protocol::T_BOOL, 14); + xfer += oprot->writeBool(this->temporary); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.rewriteEnabled) { + xfer += oprot->writeFieldBegin("rewriteEnabled", ::apache::thrift::protocol::T_BOOL, 15); + xfer += oprot->writeBool(this->rewriteEnabled); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + 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.temporary, b.temporary); + swap(a.rewriteEnabled, b.rewriteEnabled); + swap(a.__isset, b.__isset); +} + +Table::Table(const Table& other225) { + tableName = other225.tableName; + dbName = other225.dbName; + owner = other225.owner; + createTime = other225.createTime; + lastAccessTime = other225.lastAccessTime; + retention = other225.retention; + sd = other225.sd; + partitionKeys = other225.partitionKeys; + parameters = other225.parameters; + viewOriginalText = other225.viewOriginalText; + viewExpandedText = other225.viewExpandedText; + tableType = other225.tableType; + privileges = other225.privileges; + temporary = other225.temporary; + rewriteEnabled = other225.rewriteEnabled; + __isset = other225.__isset; +} +Table& Table::operator=(const Table& other226) { + tableName = other226.tableName; + dbName = other226.dbName; + owner = other226.owner; + createTime = other226.createTime; + lastAccessTime = other226.lastAccessTime; + retention = other226.retention; + sd = other226.sd; + partitionKeys = other226.partitionKeys; + parameters = other226.parameters; + viewOriginalText = other226.viewOriginalText; + viewExpandedText = other226.viewExpandedText; + tableType = other226.tableType; + privileges = other226.privileges; + temporary = other226.temporary; + rewriteEnabled = other226.rewriteEnabled; + __isset = other226.__isset; + return *this; +} +void Table::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Table("; + out << "tableName=" << to_string(tableName); + out << ", " << "dbName=" << to_string(dbName); + out << ", " << "owner=" << to_string(owner); + out << ", " << "createTime=" << to_string(createTime); + out << ", " << "lastAccessTime=" << to_string(lastAccessTime); + out << ", " << "retention=" << to_string(retention); + out << ", " << "sd=" << to_string(sd); + out << ", " << "partitionKeys=" << to_string(partitionKeys); + out << ", " << "parameters=" << to_string(parameters); + out << ", " << "viewOriginalText=" << to_string(viewOriginalText); + out << ", " << "viewExpandedText=" << to_string(viewExpandedText); + out << ", " << "tableType=" << to_string(tableType); + out << ", " << "privileges="; (__isset.privileges ? (out << to_string(privileges)) : (out << "")); + out << ", " << "temporary="; (__isset.temporary ? (out << to_string(temporary)) : (out << "")); + out << ", " << "rewriteEnabled="; (__isset.rewriteEnabled ? (out << to_string(rewriteEnabled)) : (out << "")); + out << ")"; +} + + +Partition::~Partition() throw() { +} + + +void Partition::__set_values(const std::vector & val) { + this->values = val; +} + +void Partition::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void Partition::__set_tableName(const std::string& val) { + this->tableName = val; +} + +void Partition::__set_createTime(const int32_t val) { + this->createTime = val; +} + +void Partition::__set_lastAccessTime(const int32_t val) { + this->lastAccessTime = val; +} + +void Partition::__set_sd(const StorageDescriptor& val) { + this->sd = val; +} + +void Partition::__set_parameters(const std::map & val) { + this->parameters = val; +} + +void Partition::__set_privileges(const PrincipalPrivilegeSet& val) { + this->privileges = val; +__isset.privileges = true; +} + +uint32_t Partition::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->values.clear(); + uint32_t _size227; + ::apache::thrift::protocol::TType _etype230; + xfer += iprot->readListBegin(_etype230, _size227); + this->values.resize(_size227); + uint32_t _i231; + for (_i231 = 0; _i231 < _size227; ++_i231) + { + xfer += iprot->readString(this->values[_i231]); + } + xfer += iprot->readListEnd(); + } + this->__isset.values = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->lastAccessTime); + this->__isset.lastAccessTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sd.read(iprot); + this->__isset.sd = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size232; + ::apache::thrift::protocol::TType _ktype233; + ::apache::thrift::protocol::TType _vtype234; + xfer += iprot->readMapBegin(_ktype233, _vtype234, _size232); + uint32_t _i236; + for (_i236 = 0; _i236 < _size232; ++_i236) + { + std::string _key237; + xfer += iprot->readString(_key237); + std::string& _val238 = this->parameters[_key237]; + xfer += iprot->readString(_val238); + } + xfer += iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Partition::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter239; + for (_iter239 = this->values.begin(); _iter239 != this->values.end(); ++_iter239) + { + xfer += oprot->writeString((*_iter239)); + } + 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())); + std::map ::const_iterator _iter240; + for (_iter240 = this->parameters.begin(); _iter240 != this->parameters.end(); ++_iter240) + { + xfer += oprot->writeString(_iter240->first); + xfer += oprot->writeString(_iter240->second); + } + 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); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + 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); +} + +Partition::Partition(const Partition& other241) { + values = other241.values; + dbName = other241.dbName; + tableName = other241.tableName; + createTime = other241.createTime; + lastAccessTime = other241.lastAccessTime; + sd = other241.sd; + parameters = other241.parameters; + privileges = other241.privileges; + __isset = other241.__isset; +} +Partition& Partition::operator=(const Partition& other242) { + values = other242.values; + dbName = other242.dbName; + tableName = other242.tableName; + createTime = other242.createTime; + lastAccessTime = other242.lastAccessTime; + sd = other242.sd; + parameters = other242.parameters; + privileges = other242.privileges; + __isset = other242.__isset; + return *this; +} +void Partition::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Partition("; + out << "values=" << to_string(values); + out << ", " << "dbName=" << to_string(dbName); + out << ", " << "tableName=" << to_string(tableName); + out << ", " << "createTime=" << to_string(createTime); + out << ", " << "lastAccessTime=" << to_string(lastAccessTime); + out << ", " << "sd=" << to_string(sd); + out << ", " << "parameters=" << to_string(parameters); + out << ", " << "privileges="; (__isset.privileges ? (out << to_string(privileges)) : (out << "")); + out << ")"; +} + + +PartitionWithoutSD::~PartitionWithoutSD() throw() { +} + + +void PartitionWithoutSD::__set_values(const std::vector & val) { + this->values = val; +} + +void PartitionWithoutSD::__set_createTime(const int32_t val) { + this->createTime = val; +} + +void PartitionWithoutSD::__set_lastAccessTime(const int32_t val) { + this->lastAccessTime = val; +} + +void PartitionWithoutSD::__set_relativePath(const std::string& val) { + this->relativePath = val; +} + +void PartitionWithoutSD::__set_parameters(const std::map & val) { + this->parameters = val; +} + +void PartitionWithoutSD::__set_privileges(const PrincipalPrivilegeSet& val) { + this->privileges = val; +__isset.privileges = true; +} + +uint32_t PartitionWithoutSD::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->values.clear(); + uint32_t _size243; + ::apache::thrift::protocol::TType _etype246; + xfer += iprot->readListBegin(_etype246, _size243); + this->values.resize(_size243); + uint32_t _i247; + for (_i247 = 0; _i247 < _size243; ++_i247) + { + xfer += iprot->readString(this->values[_i247]); + } + xfer += iprot->readListEnd(); + } + this->__isset.values = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->lastAccessTime); + this->__isset.lastAccessTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->relativePath); + this->__isset.relativePath = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size248; + ::apache::thrift::protocol::TType _ktype249; + ::apache::thrift::protocol::TType _vtype250; + xfer += iprot->readMapBegin(_ktype249, _vtype250, _size248); + uint32_t _i252; + for (_i252 = 0; _i252 < _size248; ++_i252) + { + std::string _key253; + xfer += iprot->readString(_key253); + std::string& _val254 = this->parameters[_key253]; + xfer += iprot->readString(_val254); + } + xfer += iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PartitionWithoutSD::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PartitionWithoutSD"); + + xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->values.size())); + std::vector ::const_iterator _iter255; + for (_iter255 = this->values.begin(); _iter255 != this->values.end(); ++_iter255) + { + xfer += oprot->writeString((*_iter255)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->lastAccessTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("relativePath", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->relativePath); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->parameters.size())); + std::map ::const_iterator _iter256; + for (_iter256 = this->parameters.begin(); _iter256 != this->parameters.end(); ++_iter256) + { + xfer += oprot->writeString(_iter256->first); + xfer += oprot->writeString(_iter256->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.privileges) { + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PartitionWithoutSD &a, PartitionWithoutSD &b) { + using ::std::swap; + swap(a.values, b.values); + swap(a.createTime, b.createTime); + swap(a.lastAccessTime, b.lastAccessTime); + swap(a.relativePath, b.relativePath); + swap(a.parameters, b.parameters); + swap(a.privileges, b.privileges); + swap(a.__isset, b.__isset); +} + +PartitionWithoutSD::PartitionWithoutSD(const PartitionWithoutSD& other257) { + values = other257.values; + createTime = other257.createTime; + lastAccessTime = other257.lastAccessTime; + relativePath = other257.relativePath; + parameters = other257.parameters; + privileges = other257.privileges; + __isset = other257.__isset; +} +PartitionWithoutSD& PartitionWithoutSD::operator=(const PartitionWithoutSD& other258) { + values = other258.values; + createTime = other258.createTime; + lastAccessTime = other258.lastAccessTime; + relativePath = other258.relativePath; + parameters = other258.parameters; + privileges = other258.privileges; + __isset = other258.__isset; + return *this; +} +void PartitionWithoutSD::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PartitionWithoutSD("; + out << "values=" << to_string(values); + out << ", " << "createTime=" << to_string(createTime); + out << ", " << "lastAccessTime=" << to_string(lastAccessTime); + out << ", " << "relativePath=" << to_string(relativePath); + out << ", " << "parameters=" << to_string(parameters); + out << ", " << "privileges="; (__isset.privileges ? (out << to_string(privileges)) : (out << "")); + out << ")"; +} + + +PartitionSpecWithSharedSD::~PartitionSpecWithSharedSD() throw() { +} + + +void PartitionSpecWithSharedSD::__set_partitions(const std::vector & val) { + this->partitions = val; +} + +void PartitionSpecWithSharedSD::__set_sd(const StorageDescriptor& val) { + this->sd = val; +} + +uint32_t PartitionSpecWithSharedSD::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitions.clear(); + uint32_t _size259; + ::apache::thrift::protocol::TType _etype262; + xfer += iprot->readListBegin(_etype262, _size259); + this->partitions.resize(_size259); + uint32_t _i263; + for (_i263 = 0; _i263 < _size259; ++_i263) + { + xfer += this->partitions[_i263].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.partitions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sd.read(iprot); + this->__isset.sd = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PartitionSpecWithSharedSD::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PartitionSpecWithSharedSD"); + + xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); + std::vector ::const_iterator _iter264; + for (_iter264 = this->partitions.begin(); _iter264 != this->partitions.end(); ++_iter264) + { + xfer += (*_iter264).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->sd.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PartitionSpecWithSharedSD &a, PartitionSpecWithSharedSD &b) { + using ::std::swap; + swap(a.partitions, b.partitions); + swap(a.sd, b.sd); + swap(a.__isset, b.__isset); +} + +PartitionSpecWithSharedSD::PartitionSpecWithSharedSD(const PartitionSpecWithSharedSD& other265) { + partitions = other265.partitions; + sd = other265.sd; + __isset = other265.__isset; +} +PartitionSpecWithSharedSD& PartitionSpecWithSharedSD::operator=(const PartitionSpecWithSharedSD& other266) { + partitions = other266.partitions; + sd = other266.sd; + __isset = other266.__isset; + return *this; +} +void PartitionSpecWithSharedSD::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PartitionSpecWithSharedSD("; + out << "partitions=" << to_string(partitions); + out << ", " << "sd=" << to_string(sd); + out << ")"; +} + + +PartitionListComposingSpec::~PartitionListComposingSpec() throw() { +} + + +void PartitionListComposingSpec::__set_partitions(const std::vector & val) { + this->partitions = val; +} + +uint32_t PartitionListComposingSpec::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitions.clear(); + uint32_t _size267; + ::apache::thrift::protocol::TType _etype270; + xfer += iprot->readListBegin(_etype270, _size267); + this->partitions.resize(_size267); + uint32_t _i271; + for (_i271 = 0; _i271 < _size267; ++_i271) + { + xfer += this->partitions[_i271].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.partitions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PartitionListComposingSpec::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PartitionListComposingSpec"); + + xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); + std::vector ::const_iterator _iter272; + for (_iter272 = this->partitions.begin(); _iter272 != this->partitions.end(); ++_iter272) + { + xfer += (*_iter272).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PartitionListComposingSpec &a, PartitionListComposingSpec &b) { + using ::std::swap; + swap(a.partitions, b.partitions); + swap(a.__isset, b.__isset); +} + +PartitionListComposingSpec::PartitionListComposingSpec(const PartitionListComposingSpec& other273) { + partitions = other273.partitions; + __isset = other273.__isset; +} +PartitionListComposingSpec& PartitionListComposingSpec::operator=(const PartitionListComposingSpec& other274) { + partitions = other274.partitions; + __isset = other274.__isset; + return *this; +} +void PartitionListComposingSpec::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PartitionListComposingSpec("; + out << "partitions=" << to_string(partitions); + out << ")"; +} + + +PartitionSpec::~PartitionSpec() throw() { +} + + +void PartitionSpec::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void PartitionSpec::__set_tableName(const std::string& val) { + this->tableName = val; +} + +void PartitionSpec::__set_rootPath(const std::string& val) { + this->rootPath = val; +} + +void PartitionSpec::__set_sharedSDPartitionSpec(const PartitionSpecWithSharedSD& val) { + this->sharedSDPartitionSpec = val; +__isset.sharedSDPartitionSpec = true; +} + +void PartitionSpec::__set_partitionList(const PartitionListComposingSpec& val) { + this->partitionList = val; +__isset.partitionList = true; +} + +uint32_t PartitionSpec::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->rootPath); + this->__isset.rootPath = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sharedSDPartitionSpec.read(iprot); + this->__isset.sharedSDPartitionSpec = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->partitionList.read(iprot); + this->__isset.partitionList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PartitionSpec::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PartitionSpec"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("rootPath", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->rootPath); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.sharedSDPartitionSpec) { + xfer += oprot->writeFieldBegin("sharedSDPartitionSpec", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->sharedSDPartitionSpec.write(oprot); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.partitionList) { + xfer += oprot->writeFieldBegin("partitionList", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->partitionList.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PartitionSpec &a, PartitionSpec &b) { + using ::std::swap; + swap(a.dbName, b.dbName); + swap(a.tableName, b.tableName); + swap(a.rootPath, b.rootPath); + swap(a.sharedSDPartitionSpec, b.sharedSDPartitionSpec); + swap(a.partitionList, b.partitionList); + swap(a.__isset, b.__isset); +} + +PartitionSpec::PartitionSpec(const PartitionSpec& other275) { + dbName = other275.dbName; + tableName = other275.tableName; + rootPath = other275.rootPath; + sharedSDPartitionSpec = other275.sharedSDPartitionSpec; + partitionList = other275.partitionList; + __isset = other275.__isset; +} +PartitionSpec& PartitionSpec::operator=(const PartitionSpec& other276) { + dbName = other276.dbName; + tableName = other276.tableName; + rootPath = other276.rootPath; + sharedSDPartitionSpec = other276.sharedSDPartitionSpec; + partitionList = other276.partitionList; + __isset = other276.__isset; + return *this; +} +void PartitionSpec::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PartitionSpec("; + out << "dbName=" << to_string(dbName); + out << ", " << "tableName=" << to_string(tableName); + out << ", " << "rootPath=" << to_string(rootPath); + out << ", " << "sharedSDPartitionSpec="; (__isset.sharedSDPartitionSpec ? (out << to_string(sharedSDPartitionSpec)) : (out << "")); + out << ", " << "partitionList="; (__isset.partitionList ? (out << to_string(partitionList)) : (out << "")); + out << ")"; +} + + +Index::~Index() throw() { +} + + +void Index::__set_indexName(const std::string& val) { + this->indexName = val; +} + +void Index::__set_indexHandlerClass(const std::string& val) { + this->indexHandlerClass = val; +} + +void Index::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void Index::__set_origTableName(const std::string& val) { + this->origTableName = val; +} + +void Index::__set_createTime(const int32_t val) { + this->createTime = val; +} + +void Index::__set_lastAccessTime(const int32_t val) { + this->lastAccessTime = val; +} + +void Index::__set_indexTableName(const std::string& val) { + this->indexTableName = val; +} + +void Index::__set_sd(const StorageDescriptor& val) { + this->sd = val; +} + +void Index::__set_parameters(const std::map & val) { + this->parameters = val; +} + +void Index::__set_deferredRebuild(const bool val) { + this->deferredRebuild = val; +} + +uint32_t Index::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->indexName); + this->__isset.indexName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->indexHandlerClass); + this->__isset.indexHandlerClass = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->origTableName); + this->__isset.origTableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->lastAccessTime); + this->__isset.lastAccessTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->indexTableName); + this->__isset.indexTableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->sd.read(iprot); + this->__isset.sd = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size277; + ::apache::thrift::protocol::TType _ktype278; + ::apache::thrift::protocol::TType _vtype279; + xfer += iprot->readMapBegin(_ktype278, _vtype279, _size277); + uint32_t _i281; + for (_i281 = 0; _i281 < _size277; ++_i281) + { + std::string _key282; + xfer += iprot->readString(_key282); + std::string& _val283 = this->parameters[_key282]; + xfer += iprot->readString(_val283); + } + xfer += iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deferredRebuild); + this->__isset.deferredRebuild = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Index::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::map ::const_iterator _iter284; + for (_iter284 = this->parameters.begin(); _iter284 != this->parameters.end(); ++_iter284) + { + xfer += oprot->writeString(_iter284->first); + xfer += oprot->writeString(_iter284->second); + } + 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); +} + +Index::Index(const Index& other285) { + indexName = other285.indexName; + indexHandlerClass = other285.indexHandlerClass; + dbName = other285.dbName; + origTableName = other285.origTableName; + createTime = other285.createTime; + lastAccessTime = other285.lastAccessTime; + indexTableName = other285.indexTableName; + sd = other285.sd; + parameters = other285.parameters; + deferredRebuild = other285.deferredRebuild; + __isset = other285.__isset; +} +Index& Index::operator=(const Index& other286) { + indexName = other286.indexName; + indexHandlerClass = other286.indexHandlerClass; + dbName = other286.dbName; + origTableName = other286.origTableName; + createTime = other286.createTime; + lastAccessTime = other286.lastAccessTime; + indexTableName = other286.indexTableName; + sd = other286.sd; + parameters = other286.parameters; + deferredRebuild = other286.deferredRebuild; + __isset = other286.__isset; + return *this; +} +void Index::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Index("; + out << "indexName=" << to_string(indexName); + out << ", " << "indexHandlerClass=" << to_string(indexHandlerClass); + out << ", " << "dbName=" << to_string(dbName); + out << ", " << "origTableName=" << to_string(origTableName); + out << ", " << "createTime=" << to_string(createTime); + out << ", " << "lastAccessTime=" << to_string(lastAccessTime); + out << ", " << "indexTableName=" << to_string(indexTableName); + out << ", " << "sd=" << to_string(sd); + out << ", " << "parameters=" << to_string(parameters); + out << ", " << "deferredRebuild=" << to_string(deferredRebuild); + out << ")"; +} + + +BooleanColumnStatsData::~BooleanColumnStatsData() throw() { +} + + +void BooleanColumnStatsData::__set_numTrues(const int64_t val) { + this->numTrues = val; +} + +void BooleanColumnStatsData::__set_numFalses(const int64_t val) { + this->numFalses = val; +} + +void BooleanColumnStatsData::__set_numNulls(const int64_t val) { + this->numNulls = val; +} + +void BooleanColumnStatsData::__set_bitVectors(const std::string& val) { + this->bitVectors = val; +__isset.bitVectors = true; +} + +uint32_t BooleanColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_numTrues = false; + bool isset_numFalses = false; + bool isset_numNulls = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numTrues); + isset_numTrues = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numFalses); + isset_numFalses = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + isset_numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->bitVectors); + this->__isset.bitVectors = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_numTrues) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numFalses) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numNulls) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t BooleanColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("BooleanColumnStatsData"); + + xfer += oprot->writeFieldBegin("numTrues", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->numTrues); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("numFalses", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->numFalses); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.bitVectors) { + xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->bitVectors); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(BooleanColumnStatsData &a, BooleanColumnStatsData &b) { + using ::std::swap; + swap(a.numTrues, b.numTrues); + swap(a.numFalses, b.numFalses); + swap(a.numNulls, b.numNulls); + swap(a.bitVectors, b.bitVectors); + swap(a.__isset, b.__isset); +} + +BooleanColumnStatsData::BooleanColumnStatsData(const BooleanColumnStatsData& other287) { + numTrues = other287.numTrues; + numFalses = other287.numFalses; + numNulls = other287.numNulls; + bitVectors = other287.bitVectors; + __isset = other287.__isset; +} +BooleanColumnStatsData& BooleanColumnStatsData::operator=(const BooleanColumnStatsData& other288) { + numTrues = other288.numTrues; + numFalses = other288.numFalses; + numNulls = other288.numNulls; + bitVectors = other288.bitVectors; + __isset = other288.__isset; + return *this; +} +void BooleanColumnStatsData::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "BooleanColumnStatsData("; + out << "numTrues=" << to_string(numTrues); + out << ", " << "numFalses=" << to_string(numFalses); + out << ", " << "numNulls=" << to_string(numNulls); + out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); + out << ")"; +} + + +DoubleColumnStatsData::~DoubleColumnStatsData() throw() { +} + + +void DoubleColumnStatsData::__set_lowValue(const double val) { + this->lowValue = val; +__isset.lowValue = true; +} + +void DoubleColumnStatsData::__set_highValue(const double val) { + this->highValue = val; +__isset.highValue = true; +} + +void DoubleColumnStatsData::__set_numNulls(const int64_t val) { + this->numNulls = val; +} + +void DoubleColumnStatsData::__set_numDVs(const int64_t val) { + this->numDVs = val; +} + +void DoubleColumnStatsData::__set_bitVectors(const std::string& val) { + this->bitVectors = val; +__isset.bitVectors = true; +} + +uint32_t DoubleColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_numNulls = false; + bool isset_numDVs = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->lowValue); + this->__isset.lowValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->highValue); + this->__isset.highValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + isset_numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numDVs); + isset_numDVs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->bitVectors); + this->__isset.bitVectors = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_numNulls) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numDVs) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t DoubleColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("DoubleColumnStatsData"); + + if (this->__isset.lowValue) { + xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_DOUBLE, 1); + xfer += oprot->writeDouble(this->lowValue); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.highValue) { + xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble(this->highValue); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->numDVs); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.bitVectors) { + xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->bitVectors); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(DoubleColumnStatsData &a, DoubleColumnStatsData &b) { + using ::std::swap; + swap(a.lowValue, b.lowValue); + swap(a.highValue, b.highValue); + swap(a.numNulls, b.numNulls); + swap(a.numDVs, b.numDVs); + swap(a.bitVectors, b.bitVectors); + swap(a.__isset, b.__isset); +} + +DoubleColumnStatsData::DoubleColumnStatsData(const DoubleColumnStatsData& other289) { + lowValue = other289.lowValue; + highValue = other289.highValue; + numNulls = other289.numNulls; + numDVs = other289.numDVs; + bitVectors = other289.bitVectors; + __isset = other289.__isset; +} +DoubleColumnStatsData& DoubleColumnStatsData::operator=(const DoubleColumnStatsData& other290) { + lowValue = other290.lowValue; + highValue = other290.highValue; + numNulls = other290.numNulls; + numDVs = other290.numDVs; + bitVectors = other290.bitVectors; + __isset = other290.__isset; + return *this; +} +void DoubleColumnStatsData::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DoubleColumnStatsData("; + out << "lowValue="; (__isset.lowValue ? (out << to_string(lowValue)) : (out << "")); + out << ", " << "highValue="; (__isset.highValue ? (out << to_string(highValue)) : (out << "")); + out << ", " << "numNulls=" << to_string(numNulls); + out << ", " << "numDVs=" << to_string(numDVs); + out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); + out << ")"; +} + + +LongColumnStatsData::~LongColumnStatsData() throw() { +} + + +void LongColumnStatsData::__set_lowValue(const int64_t val) { + this->lowValue = val; +__isset.lowValue = true; +} + +void LongColumnStatsData::__set_highValue(const int64_t val) { + this->highValue = val; +__isset.highValue = true; +} + +void LongColumnStatsData::__set_numNulls(const int64_t val) { + this->numNulls = val; +} + +void LongColumnStatsData::__set_numDVs(const int64_t val) { + this->numDVs = val; +} + +void LongColumnStatsData::__set_bitVectors(const std::string& val) { + this->bitVectors = val; +__isset.bitVectors = true; +} + +uint32_t LongColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_numNulls = false; + bool isset_numDVs = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lowValue); + this->__isset.lowValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->highValue); + this->__isset.highValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + isset_numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numDVs); + isset_numDVs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->bitVectors); + this->__isset.bitVectors = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_numNulls) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numDVs) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t LongColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("LongColumnStatsData"); + + if (this->__isset.lowValue) { + xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->lowValue); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.highValue) { + xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->highValue); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->numDVs); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.bitVectors) { + xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->bitVectors); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(LongColumnStatsData &a, LongColumnStatsData &b) { + using ::std::swap; + swap(a.lowValue, b.lowValue); + swap(a.highValue, b.highValue); + swap(a.numNulls, b.numNulls); + swap(a.numDVs, b.numDVs); + swap(a.bitVectors, b.bitVectors); + swap(a.__isset, b.__isset); +} + +LongColumnStatsData::LongColumnStatsData(const LongColumnStatsData& other291) { + lowValue = other291.lowValue; + highValue = other291.highValue; + numNulls = other291.numNulls; + numDVs = other291.numDVs; + bitVectors = other291.bitVectors; + __isset = other291.__isset; +} +LongColumnStatsData& LongColumnStatsData::operator=(const LongColumnStatsData& other292) { + lowValue = other292.lowValue; + highValue = other292.highValue; + numNulls = other292.numNulls; + numDVs = other292.numDVs; + bitVectors = other292.bitVectors; + __isset = other292.__isset; + return *this; +} +void LongColumnStatsData::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "LongColumnStatsData("; + out << "lowValue="; (__isset.lowValue ? (out << to_string(lowValue)) : (out << "")); + out << ", " << "highValue="; (__isset.highValue ? (out << to_string(highValue)) : (out << "")); + out << ", " << "numNulls=" << to_string(numNulls); + out << ", " << "numDVs=" << to_string(numDVs); + out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); + out << ")"; +} + + +StringColumnStatsData::~StringColumnStatsData() throw() { +} + + +void StringColumnStatsData::__set_maxColLen(const int64_t val) { + this->maxColLen = val; +} + +void StringColumnStatsData::__set_avgColLen(const double val) { + this->avgColLen = val; +} + +void StringColumnStatsData::__set_numNulls(const int64_t val) { + this->numNulls = val; +} + +void StringColumnStatsData::__set_numDVs(const int64_t val) { + this->numDVs = val; +} + +void StringColumnStatsData::__set_bitVectors(const std::string& val) { + this->bitVectors = val; +__isset.bitVectors = true; +} + +uint32_t StringColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_maxColLen = false; + bool isset_avgColLen = false; + bool isset_numNulls = false; + bool isset_numDVs = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->maxColLen); + isset_maxColLen = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->avgColLen); + isset_avgColLen = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + isset_numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numDVs); + isset_numDVs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->bitVectors); + this->__isset.bitVectors = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_maxColLen) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_avgColLen) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numNulls) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numDVs) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t StringColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("StringColumnStatsData"); + + xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->maxColLen); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble(this->avgColLen); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->numDVs); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.bitVectors) { + xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->bitVectors); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(StringColumnStatsData &a, StringColumnStatsData &b) { + using ::std::swap; + swap(a.maxColLen, b.maxColLen); + swap(a.avgColLen, b.avgColLen); + swap(a.numNulls, b.numNulls); + swap(a.numDVs, b.numDVs); + swap(a.bitVectors, b.bitVectors); + swap(a.__isset, b.__isset); +} + +StringColumnStatsData::StringColumnStatsData(const StringColumnStatsData& other293) { + maxColLen = other293.maxColLen; + avgColLen = other293.avgColLen; + numNulls = other293.numNulls; + numDVs = other293.numDVs; + bitVectors = other293.bitVectors; + __isset = other293.__isset; +} +StringColumnStatsData& StringColumnStatsData::operator=(const StringColumnStatsData& other294) { + maxColLen = other294.maxColLen; + avgColLen = other294.avgColLen; + numNulls = other294.numNulls; + numDVs = other294.numDVs; + bitVectors = other294.bitVectors; + __isset = other294.__isset; + return *this; +} +void StringColumnStatsData::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "StringColumnStatsData("; + out << "maxColLen=" << to_string(maxColLen); + out << ", " << "avgColLen=" << to_string(avgColLen); + out << ", " << "numNulls=" << to_string(numNulls); + out << ", " << "numDVs=" << to_string(numDVs); + out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); + out << ")"; +} + + +BinaryColumnStatsData::~BinaryColumnStatsData() throw() { +} + + +void BinaryColumnStatsData::__set_maxColLen(const int64_t val) { + this->maxColLen = val; +} + +void BinaryColumnStatsData::__set_avgColLen(const double val) { + this->avgColLen = val; +} + +void BinaryColumnStatsData::__set_numNulls(const int64_t val) { + this->numNulls = val; +} + +void BinaryColumnStatsData::__set_bitVectors(const std::string& val) { + this->bitVectors = val; +__isset.bitVectors = true; +} + +uint32_t BinaryColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_maxColLen = false; + bool isset_avgColLen = false; + bool isset_numNulls = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->maxColLen); + isset_maxColLen = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->avgColLen); + isset_avgColLen = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + isset_numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->bitVectors); + this->__isset.bitVectors = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_maxColLen) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_avgColLen) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numNulls) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t BinaryColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("BinaryColumnStatsData"); + + xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->maxColLen); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble(this->avgColLen); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.bitVectors) { + xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->bitVectors); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(BinaryColumnStatsData &a, BinaryColumnStatsData &b) { + using ::std::swap; + swap(a.maxColLen, b.maxColLen); + swap(a.avgColLen, b.avgColLen); + swap(a.numNulls, b.numNulls); + swap(a.bitVectors, b.bitVectors); + swap(a.__isset, b.__isset); +} + +BinaryColumnStatsData::BinaryColumnStatsData(const BinaryColumnStatsData& other295) { + maxColLen = other295.maxColLen; + avgColLen = other295.avgColLen; + numNulls = other295.numNulls; + bitVectors = other295.bitVectors; + __isset = other295.__isset; +} +BinaryColumnStatsData& BinaryColumnStatsData::operator=(const BinaryColumnStatsData& other296) { + maxColLen = other296.maxColLen; + avgColLen = other296.avgColLen; + numNulls = other296.numNulls; + bitVectors = other296.bitVectors; + __isset = other296.__isset; + return *this; +} +void BinaryColumnStatsData::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "BinaryColumnStatsData("; + out << "maxColLen=" << to_string(maxColLen); + out << ", " << "avgColLen=" << to_string(avgColLen); + out << ", " << "numNulls=" << to_string(numNulls); + out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); + out << ")"; +} + + +Decimal::~Decimal() throw() { +} + + +void Decimal::__set_unscaled(const std::string& val) { + this->unscaled = val; +} + +void Decimal::__set_scale(const int16_t val) { + this->scale = val; +} + +uint32_t Decimal::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_unscaled = false; + bool isset_scale = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->unscaled); + isset_unscaled = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->scale); + isset_scale = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_unscaled) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_scale) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t Decimal::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("Decimal"); + + xfer += oprot->writeFieldBegin("unscaled", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->unscaled); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("scale", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16(this->scale); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(Decimal &a, Decimal &b) { + using ::std::swap; + swap(a.unscaled, b.unscaled); + swap(a.scale, b.scale); +} + +Decimal::Decimal(const Decimal& other297) { + unscaled = other297.unscaled; + scale = other297.scale; +} +Decimal& Decimal::operator=(const Decimal& other298) { + unscaled = other298.unscaled; + scale = other298.scale; + return *this; +} +void Decimal::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Decimal("; + out << "unscaled=" << to_string(unscaled); + out << ", " << "scale=" << to_string(scale); + out << ")"; +} + + +DecimalColumnStatsData::~DecimalColumnStatsData() throw() { +} + + +void DecimalColumnStatsData::__set_lowValue(const Decimal& val) { + this->lowValue = val; +__isset.lowValue = true; +} + +void DecimalColumnStatsData::__set_highValue(const Decimal& val) { + this->highValue = val; +__isset.highValue = true; +} + +void DecimalColumnStatsData::__set_numNulls(const int64_t val) { + this->numNulls = val; +} + +void DecimalColumnStatsData::__set_numDVs(const int64_t val) { + this->numDVs = val; +} + +void DecimalColumnStatsData::__set_bitVectors(const std::string& val) { + this->bitVectors = val; +__isset.bitVectors = true; +} + +uint32_t DecimalColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_numNulls = false; + bool isset_numDVs = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->lowValue.read(iprot); + this->__isset.lowValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->highValue.read(iprot); + this->__isset.highValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + isset_numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numDVs); + isset_numDVs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->bitVectors); + this->__isset.bitVectors = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_numNulls) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numDVs) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t DecimalColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("DecimalColumnStatsData"); + + if (this->__isset.lowValue) { + xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->lowValue.write(oprot); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.highValue) { + xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->highValue.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->numDVs); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.bitVectors) { + xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->bitVectors); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(DecimalColumnStatsData &a, DecimalColumnStatsData &b) { + using ::std::swap; + swap(a.lowValue, b.lowValue); + swap(a.highValue, b.highValue); + swap(a.numNulls, b.numNulls); + swap(a.numDVs, b.numDVs); + swap(a.bitVectors, b.bitVectors); + swap(a.__isset, b.__isset); +} + +DecimalColumnStatsData::DecimalColumnStatsData(const DecimalColumnStatsData& other299) { + lowValue = other299.lowValue; + highValue = other299.highValue; + numNulls = other299.numNulls; + numDVs = other299.numDVs; + bitVectors = other299.bitVectors; + __isset = other299.__isset; +} +DecimalColumnStatsData& DecimalColumnStatsData::operator=(const DecimalColumnStatsData& other300) { + lowValue = other300.lowValue; + highValue = other300.highValue; + numNulls = other300.numNulls; + numDVs = other300.numDVs; + bitVectors = other300.bitVectors; + __isset = other300.__isset; + return *this; +} +void DecimalColumnStatsData::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DecimalColumnStatsData("; + out << "lowValue="; (__isset.lowValue ? (out << to_string(lowValue)) : (out << "")); + out << ", " << "highValue="; (__isset.highValue ? (out << to_string(highValue)) : (out << "")); + out << ", " << "numNulls=" << to_string(numNulls); + out << ", " << "numDVs=" << to_string(numDVs); + out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); + out << ")"; +} + + +Date::~Date() throw() { +} + + +void Date::__set_daysSinceEpoch(const int64_t val) { + this->daysSinceEpoch = val; +} + +uint32_t Date::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_daysSinceEpoch = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->daysSinceEpoch); + isset_daysSinceEpoch = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_daysSinceEpoch) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t Date::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("Date"); + + xfer += oprot->writeFieldBegin("daysSinceEpoch", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->daysSinceEpoch); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(Date &a, Date &b) { + using ::std::swap; + swap(a.daysSinceEpoch, b.daysSinceEpoch); +} + +Date::Date(const Date& other301) { + daysSinceEpoch = other301.daysSinceEpoch; +} +Date& Date::operator=(const Date& other302) { + daysSinceEpoch = other302.daysSinceEpoch; + return *this; +} +void Date::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Date("; + out << "daysSinceEpoch=" << to_string(daysSinceEpoch); + out << ")"; +} + + +DateColumnStatsData::~DateColumnStatsData() throw() { +} + + +void DateColumnStatsData::__set_lowValue(const Date& val) { + this->lowValue = val; +__isset.lowValue = true; +} + +void DateColumnStatsData::__set_highValue(const Date& val) { + this->highValue = val; +__isset.highValue = true; +} + +void DateColumnStatsData::__set_numNulls(const int64_t val) { + this->numNulls = val; +} + +void DateColumnStatsData::__set_numDVs(const int64_t val) { + this->numDVs = val; +} + +void DateColumnStatsData::__set_bitVectors(const std::string& val) { + this->bitVectors = val; +__isset.bitVectors = true; +} + +uint32_t DateColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_numNulls = false; + bool isset_numDVs = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->lowValue.read(iprot); + this->__isset.lowValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->highValue.read(iprot); + this->__isset.highValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + isset_numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numDVs); + isset_numDVs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->bitVectors); + this->__isset.bitVectors = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_numNulls) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numDVs) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t DateColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("DateColumnStatsData"); + + if (this->__isset.lowValue) { + xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->lowValue.write(oprot); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.highValue) { + xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->highValue.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->numDVs); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.bitVectors) { + xfer += oprot->writeFieldBegin("bitVectors", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->bitVectors); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(DateColumnStatsData &a, DateColumnStatsData &b) { + using ::std::swap; + swap(a.lowValue, b.lowValue); + swap(a.highValue, b.highValue); + swap(a.numNulls, b.numNulls); + swap(a.numDVs, b.numDVs); + swap(a.bitVectors, b.bitVectors); + swap(a.__isset, b.__isset); +} + +DateColumnStatsData::DateColumnStatsData(const DateColumnStatsData& other303) { + lowValue = other303.lowValue; + highValue = other303.highValue; + numNulls = other303.numNulls; + numDVs = other303.numDVs; + bitVectors = other303.bitVectors; + __isset = other303.__isset; +} +DateColumnStatsData& DateColumnStatsData::operator=(const DateColumnStatsData& other304) { + lowValue = other304.lowValue; + highValue = other304.highValue; + numNulls = other304.numNulls; + numDVs = other304.numDVs; + bitVectors = other304.bitVectors; + __isset = other304.__isset; + return *this; +} +void DateColumnStatsData::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DateColumnStatsData("; + out << "lowValue="; (__isset.lowValue ? (out << to_string(lowValue)) : (out << "")); + out << ", " << "highValue="; (__isset.highValue ? (out << to_string(highValue)) : (out << "")); + out << ", " << "numNulls=" << to_string(numNulls); + out << ", " << "numDVs=" << to_string(numDVs); + out << ", " << "bitVectors="; (__isset.bitVectors ? (out << to_string(bitVectors)) : (out << "")); + out << ")"; +} + + +ColumnStatisticsData::~ColumnStatisticsData() throw() { +} + + +void ColumnStatisticsData::__set_booleanStats(const BooleanColumnStatsData& val) { + this->booleanStats = val; +} + +void ColumnStatisticsData::__set_longStats(const LongColumnStatsData& val) { + this->longStats = val; +} + +void ColumnStatisticsData::__set_doubleStats(const DoubleColumnStatsData& val) { + this->doubleStats = val; +} + +void ColumnStatisticsData::__set_stringStats(const StringColumnStatsData& val) { + this->stringStats = val; +} + +void ColumnStatisticsData::__set_binaryStats(const BinaryColumnStatsData& val) { + this->binaryStats = val; +} + +void ColumnStatisticsData::__set_decimalStats(const DecimalColumnStatsData& val) { + this->decimalStats = val; +} + +void ColumnStatisticsData::__set_dateStats(const DateColumnStatsData& val) { + this->dateStats = val; +} + +uint32_t ColumnStatisticsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->booleanStats.read(iprot); + this->__isset.booleanStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->longStats.read(iprot); + this->__isset.longStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->doubleStats.read(iprot); + this->__isset.doubleStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->stringStats.read(iprot); + this->__isset.stringStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->binaryStats.read(iprot); + this->__isset.binaryStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->decimalStats.read(iprot); + this->__isset.decimalStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->dateStats.read(iprot); + this->__isset.dateStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ColumnStatisticsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ColumnStatisticsData"); + + xfer += oprot->writeFieldBegin("booleanStats", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->booleanStats.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("longStats", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->longStats.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("doubleStats", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->doubleStats.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("stringStats", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->stringStats.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("binaryStats", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->binaryStats.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("decimalStats", ::apache::thrift::protocol::T_STRUCT, 6); + xfer += this->decimalStats.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dateStats", ::apache::thrift::protocol::T_STRUCT, 7); + xfer += this->dateStats.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ColumnStatisticsData &a, ColumnStatisticsData &b) { + using ::std::swap; + swap(a.booleanStats, b.booleanStats); + swap(a.longStats, b.longStats); + swap(a.doubleStats, b.doubleStats); + swap(a.stringStats, b.stringStats); + swap(a.binaryStats, b.binaryStats); + swap(a.decimalStats, b.decimalStats); + swap(a.dateStats, b.dateStats); + swap(a.__isset, b.__isset); +} + +ColumnStatisticsData::ColumnStatisticsData(const ColumnStatisticsData& other305) { + booleanStats = other305.booleanStats; + longStats = other305.longStats; + doubleStats = other305.doubleStats; + stringStats = other305.stringStats; + binaryStats = other305.binaryStats; + decimalStats = other305.decimalStats; + dateStats = other305.dateStats; + __isset = other305.__isset; +} +ColumnStatisticsData& ColumnStatisticsData::operator=(const ColumnStatisticsData& other306) { + booleanStats = other306.booleanStats; + longStats = other306.longStats; + doubleStats = other306.doubleStats; + stringStats = other306.stringStats; + binaryStats = other306.binaryStats; + decimalStats = other306.decimalStats; + dateStats = other306.dateStats; + __isset = other306.__isset; + return *this; +} +void ColumnStatisticsData::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ColumnStatisticsData("; + out << "booleanStats=" << to_string(booleanStats); + out << ", " << "longStats=" << to_string(longStats); + out << ", " << "doubleStats=" << to_string(doubleStats); + out << ", " << "stringStats=" << to_string(stringStats); + out << ", " << "binaryStats=" << to_string(binaryStats); + out << ", " << "decimalStats=" << to_string(decimalStats); + out << ", " << "dateStats=" << to_string(dateStats); + out << ")"; +} + + +ColumnStatisticsObj::~ColumnStatisticsObj() throw() { +} + + +void ColumnStatisticsObj::__set_colName(const std::string& val) { + this->colName = val; +} + +void ColumnStatisticsObj::__set_colType(const std::string& val) { + this->colType = val; +} + +void ColumnStatisticsObj::__set_statsData(const ColumnStatisticsData& val) { + this->statsData = val; +} + +uint32_t ColumnStatisticsObj::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_colName = false; + bool isset_colType = false; + bool isset_statsData = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->colName); + isset_colName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->colType); + isset_colType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->statsData.read(iprot); + isset_statsData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_colName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_colType) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_statsData) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t ColumnStatisticsObj::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ColumnStatisticsObj"); + + xfer += oprot->writeFieldBegin("colName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->colName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("colType", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->colType); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("statsData", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->statsData.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ColumnStatisticsObj &a, ColumnStatisticsObj &b) { + using ::std::swap; + swap(a.colName, b.colName); + swap(a.colType, b.colType); + swap(a.statsData, b.statsData); +} + +ColumnStatisticsObj::ColumnStatisticsObj(const ColumnStatisticsObj& other307) { + colName = other307.colName; + colType = other307.colType; + statsData = other307.statsData; +} +ColumnStatisticsObj& ColumnStatisticsObj::operator=(const ColumnStatisticsObj& other308) { + colName = other308.colName; + colType = other308.colType; + statsData = other308.statsData; + return *this; +} +void ColumnStatisticsObj::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ColumnStatisticsObj("; + out << "colName=" << to_string(colName); + out << ", " << "colType=" << to_string(colType); + out << ", " << "statsData=" << to_string(statsData); + out << ")"; +} + + +ColumnStatisticsDesc::~ColumnStatisticsDesc() throw() { +} + + +void ColumnStatisticsDesc::__set_isTblLevel(const bool val) { + this->isTblLevel = val; +} + +void ColumnStatisticsDesc::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void ColumnStatisticsDesc::__set_tableName(const std::string& val) { + this->tableName = val; +} + +void ColumnStatisticsDesc::__set_partName(const std::string& val) { + this->partName = val; +__isset.partName = true; +} + +void ColumnStatisticsDesc::__set_lastAnalyzed(const int64_t val) { + this->lastAnalyzed = val; +__isset.lastAnalyzed = true; +} + +uint32_t ColumnStatisticsDesc::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_isTblLevel = false; + bool isset_dbName = false; + bool isset_tableName = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isTblLevel); + isset_isTblLevel = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + isset_dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + isset_tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->partName); + this->__isset.partName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lastAnalyzed); + this->__isset.lastAnalyzed = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_isTblLevel) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_dbName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tableName) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t ColumnStatisticsDesc::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ColumnStatisticsDesc"); + + xfer += oprot->writeFieldBegin("isTblLevel", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->isTblLevel); + 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(); + + if (this->__isset.partName) { + xfer += oprot->writeFieldBegin("partName", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->partName); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.lastAnalyzed) { + xfer += oprot->writeFieldBegin("lastAnalyzed", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->lastAnalyzed); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ColumnStatisticsDesc &a, ColumnStatisticsDesc &b) { + using ::std::swap; + swap(a.isTblLevel, b.isTblLevel); + swap(a.dbName, b.dbName); + swap(a.tableName, b.tableName); + swap(a.partName, b.partName); + swap(a.lastAnalyzed, b.lastAnalyzed); + swap(a.__isset, b.__isset); +} + +ColumnStatisticsDesc::ColumnStatisticsDesc(const ColumnStatisticsDesc& other309) { + isTblLevel = other309.isTblLevel; + dbName = other309.dbName; + tableName = other309.tableName; + partName = other309.partName; + lastAnalyzed = other309.lastAnalyzed; + __isset = other309.__isset; +} +ColumnStatisticsDesc& ColumnStatisticsDesc::operator=(const ColumnStatisticsDesc& other310) { + isTblLevel = other310.isTblLevel; + dbName = other310.dbName; + tableName = other310.tableName; + partName = other310.partName; + lastAnalyzed = other310.lastAnalyzed; + __isset = other310.__isset; + return *this; +} +void ColumnStatisticsDesc::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ColumnStatisticsDesc("; + out << "isTblLevel=" << to_string(isTblLevel); + out << ", " << "dbName=" << to_string(dbName); + out << ", " << "tableName=" << to_string(tableName); + out << ", " << "partName="; (__isset.partName ? (out << to_string(partName)) : (out << "")); + out << ", " << "lastAnalyzed="; (__isset.lastAnalyzed ? (out << to_string(lastAnalyzed)) : (out << "")); + out << ")"; +} + + +ColumnStatistics::~ColumnStatistics() throw() { +} + + +void ColumnStatistics::__set_statsDesc(const ColumnStatisticsDesc& val) { + this->statsDesc = val; +} + +void ColumnStatistics::__set_statsObj(const std::vector & val) { + this->statsObj = val; +} + +uint32_t ColumnStatistics::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_statsDesc = false; + bool isset_statsObj = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->statsDesc.read(iprot); + isset_statsDesc = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->statsObj.clear(); + uint32_t _size311; + ::apache::thrift::protocol::TType _etype314; + xfer += iprot->readListBegin(_etype314, _size311); + this->statsObj.resize(_size311); + uint32_t _i315; + for (_i315 = 0; _i315 < _size311; ++_i315) + { + xfer += this->statsObj[_i315].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_statsObj = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_statsDesc) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_statsObj) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t ColumnStatistics::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ColumnStatistics"); + + xfer += oprot->writeFieldBegin("statsDesc", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->statsDesc.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("statsObj", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->statsObj.size())); + std::vector ::const_iterator _iter316; + for (_iter316 = this->statsObj.begin(); _iter316 != this->statsObj.end(); ++_iter316) + { + xfer += (*_iter316).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ColumnStatistics &a, ColumnStatistics &b) { + using ::std::swap; + swap(a.statsDesc, b.statsDesc); + swap(a.statsObj, b.statsObj); +} + +ColumnStatistics::ColumnStatistics(const ColumnStatistics& other317) { + statsDesc = other317.statsDesc; + statsObj = other317.statsObj; +} +ColumnStatistics& ColumnStatistics::operator=(const ColumnStatistics& other318) { + statsDesc = other318.statsDesc; + statsObj = other318.statsObj; + return *this; +} +void ColumnStatistics::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ColumnStatistics("; + out << "statsDesc=" << to_string(statsDesc); + out << ", " << "statsObj=" << to_string(statsObj); + out << ")"; +} + + +AggrStats::~AggrStats() throw() { +} + + +void AggrStats::__set_colStats(const std::vector & val) { + this->colStats = val; +} + +void AggrStats::__set_partsFound(const int64_t val) { + this->partsFound = val; +} + +uint32_t AggrStats::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_colStats = false; + bool isset_partsFound = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->colStats.clear(); + uint32_t _size319; + ::apache::thrift::protocol::TType _etype322; + xfer += iprot->readListBegin(_etype322, _size319); + this->colStats.resize(_size319); + uint32_t _i323; + for (_i323 = 0; _i323 < _size319; ++_i323) + { + xfer += this->colStats[_i323].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_colStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->partsFound); + isset_partsFound = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_colStats) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_partsFound) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t AggrStats::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("AggrStats"); + + xfer += oprot->writeFieldBegin("colStats", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->colStats.size())); + std::vector ::const_iterator _iter324; + for (_iter324 = this->colStats.begin(); _iter324 != this->colStats.end(); ++_iter324) + { + xfer += (*_iter324).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("partsFound", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->partsFound); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(AggrStats &a, AggrStats &b) { + using ::std::swap; + swap(a.colStats, b.colStats); + swap(a.partsFound, b.partsFound); +} + +AggrStats::AggrStats(const AggrStats& other325) { + colStats = other325.colStats; + partsFound = other325.partsFound; +} +AggrStats& AggrStats::operator=(const AggrStats& other326) { + colStats = other326.colStats; + partsFound = other326.partsFound; + return *this; +} +void AggrStats::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "AggrStats("; + out << "colStats=" << to_string(colStats); + out << ", " << "partsFound=" << to_string(partsFound); + out << ")"; +} + + +SetPartitionsStatsRequest::~SetPartitionsStatsRequest() throw() { +} + + +void SetPartitionsStatsRequest::__set_colStats(const std::vector & val) { + this->colStats = val; +} + +void SetPartitionsStatsRequest::__set_needMerge(const bool val) { + this->needMerge = val; +__isset.needMerge = true; +} + +uint32_t SetPartitionsStatsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_colStats = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->colStats.clear(); + uint32_t _size327; + ::apache::thrift::protocol::TType _etype330; + xfer += iprot->readListBegin(_etype330, _size327); + this->colStats.resize(_size327); + uint32_t _i331; + for (_i331 = 0; _i331 < _size327; ++_i331) + { + xfer += this->colStats[_i331].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_colStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->needMerge); + this->__isset.needMerge = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_colStats) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t SetPartitionsStatsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("SetPartitionsStatsRequest"); + + xfer += oprot->writeFieldBegin("colStats", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->colStats.size())); + std::vector ::const_iterator _iter332; + for (_iter332 = this->colStats.begin(); _iter332 != this->colStats.end(); ++_iter332) + { + xfer += (*_iter332).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.needMerge) { + xfer += oprot->writeFieldBegin("needMerge", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->needMerge); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(SetPartitionsStatsRequest &a, SetPartitionsStatsRequest &b) { + using ::std::swap; + swap(a.colStats, b.colStats); + swap(a.needMerge, b.needMerge); + swap(a.__isset, b.__isset); +} + +SetPartitionsStatsRequest::SetPartitionsStatsRequest(const SetPartitionsStatsRequest& other333) { + colStats = other333.colStats; + needMerge = other333.needMerge; + __isset = other333.__isset; +} +SetPartitionsStatsRequest& SetPartitionsStatsRequest::operator=(const SetPartitionsStatsRequest& other334) { + colStats = other334.colStats; + needMerge = other334.needMerge; + __isset = other334.__isset; + return *this; +} +void SetPartitionsStatsRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "SetPartitionsStatsRequest("; + out << "colStats=" << to_string(colStats); + out << ", " << "needMerge="; (__isset.needMerge ? (out << to_string(needMerge)) : (out << "")); + out << ")"; +} + + +Schema::~Schema() throw() { +} + + +void Schema::__set_fieldSchemas(const std::vector & val) { + this->fieldSchemas = val; +} + +void Schema::__set_properties(const std::map & val) { + this->properties = val; +} + +uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->fieldSchemas.clear(); + uint32_t _size335; + ::apache::thrift::protocol::TType _etype338; + xfer += iprot->readListBegin(_etype338, _size335); + this->fieldSchemas.resize(_size335); + uint32_t _i339; + for (_i339 = 0; _i339 < _size335; ++_i339) + { + xfer += this->fieldSchemas[_i339].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.fieldSchemas = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->properties.clear(); + uint32_t _size340; + ::apache::thrift::protocol::TType _ktype341; + ::apache::thrift::protocol::TType _vtype342; + xfer += iprot->readMapBegin(_ktype341, _vtype342, _size340); + uint32_t _i344; + for (_i344 = 0; _i344 < _size340; ++_i344) + { + std::string _key345; + xfer += iprot->readString(_key345); + std::string& _val346 = this->properties[_key345]; + xfer += iprot->readString(_val346); + } + xfer += iprot->readMapEnd(); + } + this->__isset.properties = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Schema::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::vector ::const_iterator _iter347; + for (_iter347 = this->fieldSchemas.begin(); _iter347 != this->fieldSchemas.end(); ++_iter347) + { + xfer += (*_iter347).write(oprot); + } + 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())); + std::map ::const_iterator _iter348; + for (_iter348 = this->properties.begin(); _iter348 != this->properties.end(); ++_iter348) + { + xfer += oprot->writeString(_iter348->first); + xfer += oprot->writeString(_iter348->second); + } + 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); +} + +Schema::Schema(const Schema& other349) { + fieldSchemas = other349.fieldSchemas; + properties = other349.properties; + __isset = other349.__isset; +} +Schema& Schema::operator=(const Schema& other350) { + fieldSchemas = other350.fieldSchemas; + properties = other350.properties; + __isset = other350.__isset; + return *this; +} +void Schema::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Schema("; + out << "fieldSchemas=" << to_string(fieldSchemas); + out << ", " << "properties=" << to_string(properties); + out << ")"; +} + + +EnvironmentContext::~EnvironmentContext() throw() { +} + + +void EnvironmentContext::__set_properties(const std::map & val) { + this->properties = val; +} + +uint32_t EnvironmentContext::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->properties.clear(); + uint32_t _size351; + ::apache::thrift::protocol::TType _ktype352; + ::apache::thrift::protocol::TType _vtype353; + xfer += iprot->readMapBegin(_ktype352, _vtype353, _size351); + uint32_t _i355; + for (_i355 = 0; _i355 < _size351; ++_i355) + { + std::string _key356; + xfer += iprot->readString(_key356); + std::string& _val357 = this->properties[_key356]; + xfer += iprot->readString(_val357); + } + xfer += iprot->readMapEnd(); + } + this->__isset.properties = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t EnvironmentContext::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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())); + std::map ::const_iterator _iter358; + for (_iter358 = this->properties.begin(); _iter358 != this->properties.end(); ++_iter358) + { + xfer += oprot->writeString(_iter358->first); + xfer += oprot->writeString(_iter358->second); + } + 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); +} + +EnvironmentContext::EnvironmentContext(const EnvironmentContext& other359) { + properties = other359.properties; + __isset = other359.__isset; +} +EnvironmentContext& EnvironmentContext::operator=(const EnvironmentContext& other360) { + properties = other360.properties; + __isset = other360.__isset; + return *this; +} +void EnvironmentContext::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "EnvironmentContext("; + out << "properties=" << to_string(properties); + out << ")"; +} + + +PrimaryKeysRequest::~PrimaryKeysRequest() throw() { +} + + +void PrimaryKeysRequest::__set_db_name(const std::string& val) { + this->db_name = val; +} + +void PrimaryKeysRequest::__set_tbl_name(const std::string& val) { + this->tbl_name = val; +} + +uint32_t PrimaryKeysRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_db_name = false; + bool isset_tbl_name = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + isset_db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + isset_tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_db_name) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tbl_name) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t PrimaryKeysRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PrimaryKeysRequest"); + + 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->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PrimaryKeysRequest &a, PrimaryKeysRequest &b) { + using ::std::swap; + swap(a.db_name, b.db_name); + swap(a.tbl_name, b.tbl_name); +} + +PrimaryKeysRequest::PrimaryKeysRequest(const PrimaryKeysRequest& other361) { + db_name = other361.db_name; + tbl_name = other361.tbl_name; +} +PrimaryKeysRequest& PrimaryKeysRequest::operator=(const PrimaryKeysRequest& other362) { + db_name = other362.db_name; + tbl_name = other362.tbl_name; + return *this; +} +void PrimaryKeysRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PrimaryKeysRequest("; + out << "db_name=" << to_string(db_name); + out << ", " << "tbl_name=" << to_string(tbl_name); + out << ")"; +} + + +PrimaryKeysResponse::~PrimaryKeysResponse() throw() { +} + + +void PrimaryKeysResponse::__set_primaryKeys(const std::vector & val) { + this->primaryKeys = val; +} + +uint32_t PrimaryKeysResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_primaryKeys = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->primaryKeys.clear(); + uint32_t _size363; + ::apache::thrift::protocol::TType _etype366; + xfer += iprot->readListBegin(_etype366, _size363); + this->primaryKeys.resize(_size363); + uint32_t _i367; + for (_i367 = 0; _i367 < _size363; ++_i367) + { + xfer += this->primaryKeys[_i367].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_primaryKeys = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_primaryKeys) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t PrimaryKeysResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PrimaryKeysResponse"); + + xfer += oprot->writeFieldBegin("primaryKeys", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->primaryKeys.size())); + std::vector ::const_iterator _iter368; + for (_iter368 = this->primaryKeys.begin(); _iter368 != this->primaryKeys.end(); ++_iter368) + { + xfer += (*_iter368).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PrimaryKeysResponse &a, PrimaryKeysResponse &b) { + using ::std::swap; + swap(a.primaryKeys, b.primaryKeys); +} + +PrimaryKeysResponse::PrimaryKeysResponse(const PrimaryKeysResponse& other369) { + primaryKeys = other369.primaryKeys; +} +PrimaryKeysResponse& PrimaryKeysResponse::operator=(const PrimaryKeysResponse& other370) { + primaryKeys = other370.primaryKeys; + return *this; +} +void PrimaryKeysResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PrimaryKeysResponse("; + out << "primaryKeys=" << to_string(primaryKeys); + out << ")"; +} + + +ForeignKeysRequest::~ForeignKeysRequest() throw() { +} + + +void ForeignKeysRequest::__set_parent_db_name(const std::string& val) { + this->parent_db_name = val; +} + +void ForeignKeysRequest::__set_parent_tbl_name(const std::string& val) { + this->parent_tbl_name = val; +} + +void ForeignKeysRequest::__set_foreign_db_name(const std::string& val) { + this->foreign_db_name = val; +} + +void ForeignKeysRequest::__set_foreign_tbl_name(const std::string& val) { + this->foreign_tbl_name = val; +} + +uint32_t ForeignKeysRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->parent_db_name); + this->__isset.parent_db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->parent_tbl_name); + this->__isset.parent_tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->foreign_db_name); + this->__isset.foreign_db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->foreign_tbl_name); + this->__isset.foreign_tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ForeignKeysRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ForeignKeysRequest"); + + xfer += oprot->writeFieldBegin("parent_db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->parent_db_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("parent_tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->parent_tbl_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("foreign_db_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->foreign_db_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("foreign_tbl_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->foreign_tbl_name); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ForeignKeysRequest &a, ForeignKeysRequest &b) { + using ::std::swap; + swap(a.parent_db_name, b.parent_db_name); + swap(a.parent_tbl_name, b.parent_tbl_name); + swap(a.foreign_db_name, b.foreign_db_name); + swap(a.foreign_tbl_name, b.foreign_tbl_name); + swap(a.__isset, b.__isset); +} + +ForeignKeysRequest::ForeignKeysRequest(const ForeignKeysRequest& other371) { + parent_db_name = other371.parent_db_name; + parent_tbl_name = other371.parent_tbl_name; + foreign_db_name = other371.foreign_db_name; + foreign_tbl_name = other371.foreign_tbl_name; + __isset = other371.__isset; +} +ForeignKeysRequest& ForeignKeysRequest::operator=(const ForeignKeysRequest& other372) { + parent_db_name = other372.parent_db_name; + parent_tbl_name = other372.parent_tbl_name; + foreign_db_name = other372.foreign_db_name; + foreign_tbl_name = other372.foreign_tbl_name; + __isset = other372.__isset; + return *this; +} +void ForeignKeysRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ForeignKeysRequest("; + out << "parent_db_name=" << to_string(parent_db_name); + out << ", " << "parent_tbl_name=" << to_string(parent_tbl_name); + out << ", " << "foreign_db_name=" << to_string(foreign_db_name); + out << ", " << "foreign_tbl_name=" << to_string(foreign_tbl_name); + out << ")"; +} + + +ForeignKeysResponse::~ForeignKeysResponse() throw() { +} + + +void ForeignKeysResponse::__set_foreignKeys(const std::vector & val) { + this->foreignKeys = val; +} + +uint32_t ForeignKeysResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_foreignKeys = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->foreignKeys.clear(); + uint32_t _size373; + ::apache::thrift::protocol::TType _etype376; + xfer += iprot->readListBegin(_etype376, _size373); + this->foreignKeys.resize(_size373); + uint32_t _i377; + for (_i377 = 0; _i377 < _size373; ++_i377) + { + xfer += this->foreignKeys[_i377].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_foreignKeys = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_foreignKeys) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t ForeignKeysResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ForeignKeysResponse"); + + xfer += oprot->writeFieldBegin("foreignKeys", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->foreignKeys.size())); + std::vector ::const_iterator _iter378; + for (_iter378 = this->foreignKeys.begin(); _iter378 != this->foreignKeys.end(); ++_iter378) + { + xfer += (*_iter378).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ForeignKeysResponse &a, ForeignKeysResponse &b) { + using ::std::swap; + swap(a.foreignKeys, b.foreignKeys); +} + +ForeignKeysResponse::ForeignKeysResponse(const ForeignKeysResponse& other379) { + foreignKeys = other379.foreignKeys; +} +ForeignKeysResponse& ForeignKeysResponse::operator=(const ForeignKeysResponse& other380) { + foreignKeys = other380.foreignKeys; + return *this; +} +void ForeignKeysResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ForeignKeysResponse("; + out << "foreignKeys=" << to_string(foreignKeys); + out << ")"; +} + + +UniqueConstraintsRequest::~UniqueConstraintsRequest() throw() { +} + + +void UniqueConstraintsRequest::__set_db_name(const std::string& val) { + this->db_name = val; +} + +void UniqueConstraintsRequest::__set_tbl_name(const std::string& val) { + this->tbl_name = val; +} + +uint32_t UniqueConstraintsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_db_name = false; + bool isset_tbl_name = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + isset_db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + isset_tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_db_name) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tbl_name) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t UniqueConstraintsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("UniqueConstraintsRequest"); + + 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->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(UniqueConstraintsRequest &a, UniqueConstraintsRequest &b) { + using ::std::swap; + swap(a.db_name, b.db_name); + swap(a.tbl_name, b.tbl_name); +} + +UniqueConstraintsRequest::UniqueConstraintsRequest(const UniqueConstraintsRequest& other381) { + db_name = other381.db_name; + tbl_name = other381.tbl_name; +} +UniqueConstraintsRequest& UniqueConstraintsRequest::operator=(const UniqueConstraintsRequest& other382) { + db_name = other382.db_name; + tbl_name = other382.tbl_name; + return *this; +} +void UniqueConstraintsRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "UniqueConstraintsRequest("; + out << "db_name=" << to_string(db_name); + out << ", " << "tbl_name=" << to_string(tbl_name); + out << ")"; +} + + +UniqueConstraintsResponse::~UniqueConstraintsResponse() throw() { +} + + +void UniqueConstraintsResponse::__set_uniqueConstraints(const std::vector & val) { + this->uniqueConstraints = val; +} + +uint32_t UniqueConstraintsResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_uniqueConstraints = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->uniqueConstraints.clear(); + uint32_t _size383; + ::apache::thrift::protocol::TType _etype386; + xfer += iprot->readListBegin(_etype386, _size383); + this->uniqueConstraints.resize(_size383); + uint32_t _i387; + for (_i387 = 0; _i387 < _size383; ++_i387) + { + xfer += this->uniqueConstraints[_i387].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_uniqueConstraints = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_uniqueConstraints) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t UniqueConstraintsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("UniqueConstraintsResponse"); + + xfer += oprot->writeFieldBegin("uniqueConstraints", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->uniqueConstraints.size())); + std::vector ::const_iterator _iter388; + for (_iter388 = this->uniqueConstraints.begin(); _iter388 != this->uniqueConstraints.end(); ++_iter388) + { + xfer += (*_iter388).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(UniqueConstraintsResponse &a, UniqueConstraintsResponse &b) { + using ::std::swap; + swap(a.uniqueConstraints, b.uniqueConstraints); +} + +UniqueConstraintsResponse::UniqueConstraintsResponse(const UniqueConstraintsResponse& other389) { + uniqueConstraints = other389.uniqueConstraints; +} +UniqueConstraintsResponse& UniqueConstraintsResponse::operator=(const UniqueConstraintsResponse& other390) { + uniqueConstraints = other390.uniqueConstraints; + return *this; +} +void UniqueConstraintsResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "UniqueConstraintsResponse("; + out << "uniqueConstraints=" << to_string(uniqueConstraints); + out << ")"; +} + + +NotNullConstraintsRequest::~NotNullConstraintsRequest() throw() { +} + + +void NotNullConstraintsRequest::__set_db_name(const std::string& val) { + this->db_name = val; +} + +void NotNullConstraintsRequest::__set_tbl_name(const std::string& val) { + this->tbl_name = val; +} + +uint32_t NotNullConstraintsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_db_name = false; + bool isset_tbl_name = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + isset_db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + isset_tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_db_name) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tbl_name) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t NotNullConstraintsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("NotNullConstraintsRequest"); + + 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->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(NotNullConstraintsRequest &a, NotNullConstraintsRequest &b) { + using ::std::swap; + swap(a.db_name, b.db_name); + swap(a.tbl_name, b.tbl_name); +} + +NotNullConstraintsRequest::NotNullConstraintsRequest(const NotNullConstraintsRequest& other391) { + db_name = other391.db_name; + tbl_name = other391.tbl_name; +} +NotNullConstraintsRequest& NotNullConstraintsRequest::operator=(const NotNullConstraintsRequest& other392) { + db_name = other392.db_name; + tbl_name = other392.tbl_name; + return *this; +} +void NotNullConstraintsRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NotNullConstraintsRequest("; + out << "db_name=" << to_string(db_name); + out << ", " << "tbl_name=" << to_string(tbl_name); + out << ")"; +} + + +NotNullConstraintsResponse::~NotNullConstraintsResponse() throw() { +} + + +void NotNullConstraintsResponse::__set_notNullConstraints(const std::vector & val) { + this->notNullConstraints = val; +} + +uint32_t NotNullConstraintsResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_notNullConstraints = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->notNullConstraints.clear(); + uint32_t _size393; + ::apache::thrift::protocol::TType _etype396; + xfer += iprot->readListBegin(_etype396, _size393); + this->notNullConstraints.resize(_size393); + uint32_t _i397; + for (_i397 = 0; _i397 < _size393; ++_i397) + { + xfer += this->notNullConstraints[_i397].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_notNullConstraints = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_notNullConstraints) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t NotNullConstraintsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("NotNullConstraintsResponse"); + + xfer += oprot->writeFieldBegin("notNullConstraints", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->notNullConstraints.size())); + std::vector ::const_iterator _iter398; + for (_iter398 = this->notNullConstraints.begin(); _iter398 != this->notNullConstraints.end(); ++_iter398) + { + xfer += (*_iter398).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(NotNullConstraintsResponse &a, NotNullConstraintsResponse &b) { + using ::std::swap; + swap(a.notNullConstraints, b.notNullConstraints); +} + +NotNullConstraintsResponse::NotNullConstraintsResponse(const NotNullConstraintsResponse& other399) { + notNullConstraints = other399.notNullConstraints; +} +NotNullConstraintsResponse& NotNullConstraintsResponse::operator=(const NotNullConstraintsResponse& other400) { + notNullConstraints = other400.notNullConstraints; + return *this; +} +void NotNullConstraintsResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NotNullConstraintsResponse("; + out << "notNullConstraints=" << to_string(notNullConstraints); + out << ")"; +} + + +DropConstraintRequest::~DropConstraintRequest() throw() { +} + + +void DropConstraintRequest::__set_dbname(const std::string& val) { + this->dbname = val; +} + +void DropConstraintRequest::__set_tablename(const std::string& val) { + this->tablename = val; +} + +void DropConstraintRequest::__set_constraintname(const std::string& val) { + this->constraintname = val; +} + +uint32_t DropConstraintRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dbname = false; + bool isset_tablename = false; + bool isset_constraintname = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + isset_dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tablename); + isset_tablename = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->constraintname); + isset_constraintname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbname) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tablename) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_constraintname) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t DropConstraintRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("DropConstraintRequest"); + + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbname); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tablename); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("constraintname", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->constraintname); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(DropConstraintRequest &a, DropConstraintRequest &b) { + using ::std::swap; + swap(a.dbname, b.dbname); + swap(a.tablename, b.tablename); + swap(a.constraintname, b.constraintname); +} + +DropConstraintRequest::DropConstraintRequest(const DropConstraintRequest& other401) { + dbname = other401.dbname; + tablename = other401.tablename; + constraintname = other401.constraintname; +} +DropConstraintRequest& DropConstraintRequest::operator=(const DropConstraintRequest& other402) { + dbname = other402.dbname; + tablename = other402.tablename; + constraintname = other402.constraintname; + return *this; +} +void DropConstraintRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DropConstraintRequest("; + out << "dbname=" << to_string(dbname); + out << ", " << "tablename=" << to_string(tablename); + out << ", " << "constraintname=" << to_string(constraintname); + out << ")"; +} + + +AddPrimaryKeyRequest::~AddPrimaryKeyRequest() throw() { +} + + +void AddPrimaryKeyRequest::__set_primaryKeyCols(const std::vector & val) { + this->primaryKeyCols = val; +} + +uint32_t AddPrimaryKeyRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_primaryKeyCols = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->primaryKeyCols.clear(); + uint32_t _size403; + ::apache::thrift::protocol::TType _etype406; + xfer += iprot->readListBegin(_etype406, _size403); + this->primaryKeyCols.resize(_size403); + uint32_t _i407; + for (_i407 = 0; _i407 < _size403; ++_i407) + { + xfer += this->primaryKeyCols[_i407].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_primaryKeyCols = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_primaryKeyCols) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t AddPrimaryKeyRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("AddPrimaryKeyRequest"); + + xfer += oprot->writeFieldBegin("primaryKeyCols", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->primaryKeyCols.size())); + std::vector ::const_iterator _iter408; + for (_iter408 = this->primaryKeyCols.begin(); _iter408 != this->primaryKeyCols.end(); ++_iter408) + { + xfer += (*_iter408).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(AddPrimaryKeyRequest &a, AddPrimaryKeyRequest &b) { + using ::std::swap; + swap(a.primaryKeyCols, b.primaryKeyCols); +} + +AddPrimaryKeyRequest::AddPrimaryKeyRequest(const AddPrimaryKeyRequest& other409) { + primaryKeyCols = other409.primaryKeyCols; +} +AddPrimaryKeyRequest& AddPrimaryKeyRequest::operator=(const AddPrimaryKeyRequest& other410) { + primaryKeyCols = other410.primaryKeyCols; + return *this; +} +void AddPrimaryKeyRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "AddPrimaryKeyRequest("; + out << "primaryKeyCols=" << to_string(primaryKeyCols); + out << ")"; +} + + +AddForeignKeyRequest::~AddForeignKeyRequest() throw() { +} + + +void AddForeignKeyRequest::__set_foreignKeyCols(const std::vector & val) { + this->foreignKeyCols = val; +} + +uint32_t AddForeignKeyRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_foreignKeyCols = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->foreignKeyCols.clear(); + uint32_t _size411; + ::apache::thrift::protocol::TType _etype414; + xfer += iprot->readListBegin(_etype414, _size411); + this->foreignKeyCols.resize(_size411); + uint32_t _i415; + for (_i415 = 0; _i415 < _size411; ++_i415) + { + xfer += this->foreignKeyCols[_i415].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_foreignKeyCols = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_foreignKeyCols) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t AddForeignKeyRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("AddForeignKeyRequest"); + + xfer += oprot->writeFieldBegin("foreignKeyCols", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->foreignKeyCols.size())); + std::vector ::const_iterator _iter416; + for (_iter416 = this->foreignKeyCols.begin(); _iter416 != this->foreignKeyCols.end(); ++_iter416) + { + xfer += (*_iter416).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(AddForeignKeyRequest &a, AddForeignKeyRequest &b) { + using ::std::swap; + swap(a.foreignKeyCols, b.foreignKeyCols); +} + +AddForeignKeyRequest::AddForeignKeyRequest(const AddForeignKeyRequest& other417) { + foreignKeyCols = other417.foreignKeyCols; +} +AddForeignKeyRequest& AddForeignKeyRequest::operator=(const AddForeignKeyRequest& other418) { + foreignKeyCols = other418.foreignKeyCols; + return *this; +} +void AddForeignKeyRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "AddForeignKeyRequest("; + out << "foreignKeyCols=" << to_string(foreignKeyCols); + out << ")"; +} + + +AddUniqueConstraintRequest::~AddUniqueConstraintRequest() throw() { +} + + +void AddUniqueConstraintRequest::__set_uniqueConstraintCols(const std::vector & val) { + this->uniqueConstraintCols = val; +} + +uint32_t AddUniqueConstraintRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_uniqueConstraintCols = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->uniqueConstraintCols.clear(); + uint32_t _size419; + ::apache::thrift::protocol::TType _etype422; + xfer += iprot->readListBegin(_etype422, _size419); + this->uniqueConstraintCols.resize(_size419); + uint32_t _i423; + for (_i423 = 0; _i423 < _size419; ++_i423) + { + xfer += this->uniqueConstraintCols[_i423].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_uniqueConstraintCols = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_uniqueConstraintCols) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t AddUniqueConstraintRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("AddUniqueConstraintRequest"); + + xfer += oprot->writeFieldBegin("uniqueConstraintCols", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->uniqueConstraintCols.size())); + std::vector ::const_iterator _iter424; + for (_iter424 = this->uniqueConstraintCols.begin(); _iter424 != this->uniqueConstraintCols.end(); ++_iter424) + { + xfer += (*_iter424).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(AddUniqueConstraintRequest &a, AddUniqueConstraintRequest &b) { + using ::std::swap; + swap(a.uniqueConstraintCols, b.uniqueConstraintCols); +} + +AddUniqueConstraintRequest::AddUniqueConstraintRequest(const AddUniqueConstraintRequest& other425) { + uniqueConstraintCols = other425.uniqueConstraintCols; +} +AddUniqueConstraintRequest& AddUniqueConstraintRequest::operator=(const AddUniqueConstraintRequest& other426) { + uniqueConstraintCols = other426.uniqueConstraintCols; + return *this; +} +void AddUniqueConstraintRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "AddUniqueConstraintRequest("; + out << "uniqueConstraintCols=" << to_string(uniqueConstraintCols); + out << ")"; +} + + +AddNotNullConstraintRequest::~AddNotNullConstraintRequest() throw() { +} + + +void AddNotNullConstraintRequest::__set_notNullConstraintCols(const std::vector & val) { + this->notNullConstraintCols = val; +} + +uint32_t AddNotNullConstraintRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_notNullConstraintCols = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->notNullConstraintCols.clear(); + uint32_t _size427; + ::apache::thrift::protocol::TType _etype430; + xfer += iprot->readListBegin(_etype430, _size427); + this->notNullConstraintCols.resize(_size427); + uint32_t _i431; + for (_i431 = 0; _i431 < _size427; ++_i431) + { + xfer += this->notNullConstraintCols[_i431].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_notNullConstraintCols = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_notNullConstraintCols) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t AddNotNullConstraintRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("AddNotNullConstraintRequest"); + + xfer += oprot->writeFieldBegin("notNullConstraintCols", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->notNullConstraintCols.size())); + std::vector ::const_iterator _iter432; + for (_iter432 = this->notNullConstraintCols.begin(); _iter432 != this->notNullConstraintCols.end(); ++_iter432) + { + xfer += (*_iter432).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(AddNotNullConstraintRequest &a, AddNotNullConstraintRequest &b) { + using ::std::swap; + swap(a.notNullConstraintCols, b.notNullConstraintCols); +} + +AddNotNullConstraintRequest::AddNotNullConstraintRequest(const AddNotNullConstraintRequest& other433) { + notNullConstraintCols = other433.notNullConstraintCols; +} +AddNotNullConstraintRequest& AddNotNullConstraintRequest::operator=(const AddNotNullConstraintRequest& other434) { + notNullConstraintCols = other434.notNullConstraintCols; + return *this; +} +void AddNotNullConstraintRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "AddNotNullConstraintRequest("; + out << "notNullConstraintCols=" << to_string(notNullConstraintCols); + out << ")"; +} + + +PartitionsByExprResult::~PartitionsByExprResult() throw() { +} + + +void PartitionsByExprResult::__set_partitions(const std::vector & val) { + this->partitions = val; +} + +void PartitionsByExprResult::__set_hasUnknownPartitions(const bool val) { + this->hasUnknownPartitions = val; +} + +uint32_t PartitionsByExprResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_partitions = false; + bool isset_hasUnknownPartitions = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitions.clear(); + uint32_t _size435; + ::apache::thrift::protocol::TType _etype438; + xfer += iprot->readListBegin(_etype438, _size435); + this->partitions.resize(_size435); + uint32_t _i439; + for (_i439 = 0; _i439 < _size435; ++_i439) + { + xfer += this->partitions[_i439].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_partitions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->hasUnknownPartitions); + isset_hasUnknownPartitions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_partitions) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_hasUnknownPartitions) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t PartitionsByExprResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PartitionsByExprResult"); + + xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); + std::vector ::const_iterator _iter440; + for (_iter440 = this->partitions.begin(); _iter440 != this->partitions.end(); ++_iter440) + { + xfer += (*_iter440).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("hasUnknownPartitions", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->hasUnknownPartitions); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PartitionsByExprResult &a, PartitionsByExprResult &b) { + using ::std::swap; + swap(a.partitions, b.partitions); + swap(a.hasUnknownPartitions, b.hasUnknownPartitions); +} + +PartitionsByExprResult::PartitionsByExprResult(const PartitionsByExprResult& other441) { + partitions = other441.partitions; + hasUnknownPartitions = other441.hasUnknownPartitions; +} +PartitionsByExprResult& PartitionsByExprResult::operator=(const PartitionsByExprResult& other442) { + partitions = other442.partitions; + hasUnknownPartitions = other442.hasUnknownPartitions; + return *this; +} +void PartitionsByExprResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PartitionsByExprResult("; + out << "partitions=" << to_string(partitions); + out << ", " << "hasUnknownPartitions=" << to_string(hasUnknownPartitions); + out << ")"; +} + + +PartitionsByExprRequest::~PartitionsByExprRequest() throw() { +} + + +void PartitionsByExprRequest::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void PartitionsByExprRequest::__set_tblName(const std::string& val) { + this->tblName = val; +} + +void PartitionsByExprRequest::__set_expr(const std::string& val) { + this->expr = val; +} + +void PartitionsByExprRequest::__set_defaultPartitionName(const std::string& val) { + this->defaultPartitionName = val; +__isset.defaultPartitionName = true; +} + +void PartitionsByExprRequest::__set_maxParts(const int16_t val) { + this->maxParts = val; +__isset.maxParts = true; +} + +uint32_t PartitionsByExprRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dbName = false; + bool isset_tblName = false; + bool isset_expr = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + isset_dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tblName); + isset_tblName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->expr); + isset_expr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->defaultPartitionName); + this->__isset.defaultPartitionName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->maxParts); + this->__isset.maxParts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tblName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_expr) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t PartitionsByExprRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PartitionsByExprRequest"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tblName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("expr", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->expr); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.defaultPartitionName) { + xfer += oprot->writeFieldBegin("defaultPartitionName", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->defaultPartitionName); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.maxParts) { + xfer += oprot->writeFieldBegin("maxParts", ::apache::thrift::protocol::T_I16, 5); + xfer += oprot->writeI16(this->maxParts); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PartitionsByExprRequest &a, PartitionsByExprRequest &b) { + using ::std::swap; + swap(a.dbName, b.dbName); + swap(a.tblName, b.tblName); + swap(a.expr, b.expr); + swap(a.defaultPartitionName, b.defaultPartitionName); + swap(a.maxParts, b.maxParts); + swap(a.__isset, b.__isset); +} + +PartitionsByExprRequest::PartitionsByExprRequest(const PartitionsByExprRequest& other443) { + dbName = other443.dbName; + tblName = other443.tblName; + expr = other443.expr; + defaultPartitionName = other443.defaultPartitionName; + maxParts = other443.maxParts; + __isset = other443.__isset; +} +PartitionsByExprRequest& PartitionsByExprRequest::operator=(const PartitionsByExprRequest& other444) { + dbName = other444.dbName; + tblName = other444.tblName; + expr = other444.expr; + defaultPartitionName = other444.defaultPartitionName; + maxParts = other444.maxParts; + __isset = other444.__isset; + return *this; +} +void PartitionsByExprRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PartitionsByExprRequest("; + out << "dbName=" << to_string(dbName); + out << ", " << "tblName=" << to_string(tblName); + out << ", " << "expr=" << to_string(expr); + out << ", " << "defaultPartitionName="; (__isset.defaultPartitionName ? (out << to_string(defaultPartitionName)) : (out << "")); + out << ", " << "maxParts="; (__isset.maxParts ? (out << to_string(maxParts)) : (out << "")); + out << ")"; +} + + +TableStatsResult::~TableStatsResult() throw() { +} + + +void TableStatsResult::__set_tableStats(const std::vector & val) { + this->tableStats = val; +} + +uint32_t TableStatsResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_tableStats = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->tableStats.clear(); + uint32_t _size445; + ::apache::thrift::protocol::TType _etype448; + xfer += iprot->readListBegin(_etype448, _size445); + this->tableStats.resize(_size445); + uint32_t _i449; + for (_i449 = 0; _i449 < _size445; ++_i449) + { + xfer += this->tableStats[_i449].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_tableStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_tableStats) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t TableStatsResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TableStatsResult"); + + xfer += oprot->writeFieldBegin("tableStats", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->tableStats.size())); + std::vector ::const_iterator _iter450; + for (_iter450 = this->tableStats.begin(); _iter450 != this->tableStats.end(); ++_iter450) + { + xfer += (*_iter450).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TableStatsResult &a, TableStatsResult &b) { + using ::std::swap; + swap(a.tableStats, b.tableStats); +} + +TableStatsResult::TableStatsResult(const TableStatsResult& other451) { + tableStats = other451.tableStats; +} +TableStatsResult& TableStatsResult::operator=(const TableStatsResult& other452) { + tableStats = other452.tableStats; + return *this; +} +void TableStatsResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TableStatsResult("; + out << "tableStats=" << to_string(tableStats); + out << ")"; +} + + +PartitionsStatsResult::~PartitionsStatsResult() throw() { +} + + +void PartitionsStatsResult::__set_partStats(const std::map > & val) { + this->partStats = val; +} + +uint32_t PartitionsStatsResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_partStats = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->partStats.clear(); + uint32_t _size453; + ::apache::thrift::protocol::TType _ktype454; + ::apache::thrift::protocol::TType _vtype455; + xfer += iprot->readMapBegin(_ktype454, _vtype455, _size453); + uint32_t _i457; + for (_i457 = 0; _i457 < _size453; ++_i457) + { + std::string _key458; + xfer += iprot->readString(_key458); + std::vector & _val459 = this->partStats[_key458]; + { + _val459.clear(); + uint32_t _size460; + ::apache::thrift::protocol::TType _etype463; + xfer += iprot->readListBegin(_etype463, _size460); + _val459.resize(_size460); + uint32_t _i464; + for (_i464 = 0; _i464 < _size460; ++_i464) + { + xfer += _val459[_i464].read(iprot); + } + xfer += iprot->readListEnd(); + } + } + xfer += iprot->readMapEnd(); + } + isset_partStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_partStats) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t PartitionsStatsResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PartitionsStatsResult"); + + xfer += oprot->writeFieldBegin("partStats", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast(this->partStats.size())); + std::map > ::const_iterator _iter465; + for (_iter465 = this->partStats.begin(); _iter465 != this->partStats.end(); ++_iter465) + { + xfer += oprot->writeString(_iter465->first); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(_iter465->second.size())); + std::vector ::const_iterator _iter466; + for (_iter466 = _iter465->second.begin(); _iter466 != _iter465->second.end(); ++_iter466) + { + xfer += (*_iter466).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PartitionsStatsResult &a, PartitionsStatsResult &b) { + using ::std::swap; + swap(a.partStats, b.partStats); +} + +PartitionsStatsResult::PartitionsStatsResult(const PartitionsStatsResult& other467) { + partStats = other467.partStats; +} +PartitionsStatsResult& PartitionsStatsResult::operator=(const PartitionsStatsResult& other468) { + partStats = other468.partStats; + return *this; +} +void PartitionsStatsResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PartitionsStatsResult("; + out << "partStats=" << to_string(partStats); + out << ")"; +} + + +TableStatsRequest::~TableStatsRequest() throw() { +} + + +void TableStatsRequest::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void TableStatsRequest::__set_tblName(const std::string& val) { + this->tblName = val; +} + +void TableStatsRequest::__set_colNames(const std::vector & val) { + this->colNames = val; +} + +uint32_t TableStatsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dbName = false; + bool isset_tblName = false; + bool isset_colNames = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + isset_dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tblName); + isset_tblName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->colNames.clear(); + uint32_t _size469; + ::apache::thrift::protocol::TType _etype472; + xfer += iprot->readListBegin(_etype472, _size469); + this->colNames.resize(_size469); + uint32_t _i473; + for (_i473 = 0; _i473 < _size469; ++_i473) + { + xfer += iprot->readString(this->colNames[_i473]); + } + xfer += iprot->readListEnd(); + } + isset_colNames = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tblName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_colNames) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t TableStatsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TableStatsRequest"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tblName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("colNames", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->colNames.size())); + std::vector ::const_iterator _iter474; + for (_iter474 = this->colNames.begin(); _iter474 != this->colNames.end(); ++_iter474) + { + xfer += oprot->writeString((*_iter474)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TableStatsRequest &a, TableStatsRequest &b) { + using ::std::swap; + swap(a.dbName, b.dbName); + swap(a.tblName, b.tblName); + swap(a.colNames, b.colNames); +} + +TableStatsRequest::TableStatsRequest(const TableStatsRequest& other475) { + dbName = other475.dbName; + tblName = other475.tblName; + colNames = other475.colNames; +} +TableStatsRequest& TableStatsRequest::operator=(const TableStatsRequest& other476) { + dbName = other476.dbName; + tblName = other476.tblName; + colNames = other476.colNames; + return *this; +} +void TableStatsRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TableStatsRequest("; + out << "dbName=" << to_string(dbName); + out << ", " << "tblName=" << to_string(tblName); + out << ", " << "colNames=" << to_string(colNames); + out << ")"; +} + + +PartitionsStatsRequest::~PartitionsStatsRequest() throw() { +} + + +void PartitionsStatsRequest::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void PartitionsStatsRequest::__set_tblName(const std::string& val) { + this->tblName = val; +} + +void PartitionsStatsRequest::__set_colNames(const std::vector & val) { + this->colNames = val; +} + +void PartitionsStatsRequest::__set_partNames(const std::vector & val) { + this->partNames = val; +} + +uint32_t PartitionsStatsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dbName = false; + bool isset_tblName = false; + bool isset_colNames = false; + bool isset_partNames = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + isset_dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tblName); + isset_tblName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->colNames.clear(); + uint32_t _size477; + ::apache::thrift::protocol::TType _etype480; + xfer += iprot->readListBegin(_etype480, _size477); + this->colNames.resize(_size477); + uint32_t _i481; + for (_i481 = 0; _i481 < _size477; ++_i481) + { + xfer += iprot->readString(this->colNames[_i481]); + } + xfer += iprot->readListEnd(); + } + isset_colNames = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partNames.clear(); + uint32_t _size482; + ::apache::thrift::protocol::TType _etype485; + xfer += iprot->readListBegin(_etype485, _size482); + this->partNames.resize(_size482); + uint32_t _i486; + for (_i486 = 0; _i486 < _size482; ++_i486) + { + xfer += iprot->readString(this->partNames[_i486]); + } + xfer += iprot->readListEnd(); + } + isset_partNames = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tblName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_colNames) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_partNames) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t PartitionsStatsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PartitionsStatsRequest"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tblName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("colNames", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->colNames.size())); + std::vector ::const_iterator _iter487; + for (_iter487 = this->colNames.begin(); _iter487 != this->colNames.end(); ++_iter487) + { + xfer += oprot->writeString((*_iter487)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("partNames", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->partNames.size())); + std::vector ::const_iterator _iter488; + for (_iter488 = this->partNames.begin(); _iter488 != this->partNames.end(); ++_iter488) + { + xfer += oprot->writeString((*_iter488)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PartitionsStatsRequest &a, PartitionsStatsRequest &b) { + using ::std::swap; + swap(a.dbName, b.dbName); + swap(a.tblName, b.tblName); + swap(a.colNames, b.colNames); + swap(a.partNames, b.partNames); +} + +PartitionsStatsRequest::PartitionsStatsRequest(const PartitionsStatsRequest& other489) { + dbName = other489.dbName; + tblName = other489.tblName; + colNames = other489.colNames; + partNames = other489.partNames; +} +PartitionsStatsRequest& PartitionsStatsRequest::operator=(const PartitionsStatsRequest& other490) { + dbName = other490.dbName; + tblName = other490.tblName; + colNames = other490.colNames; + partNames = other490.partNames; + return *this; +} +void PartitionsStatsRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PartitionsStatsRequest("; + out << "dbName=" << to_string(dbName); + out << ", " << "tblName=" << to_string(tblName); + out << ", " << "colNames=" << to_string(colNames); + out << ", " << "partNames=" << to_string(partNames); + out << ")"; +} + + +AddPartitionsResult::~AddPartitionsResult() throw() { +} + + +void AddPartitionsResult::__set_partitions(const std::vector & val) { + this->partitions = val; +__isset.partitions = true; +} + +uint32_t AddPartitionsResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitions.clear(); + uint32_t _size491; + ::apache::thrift::protocol::TType _etype494; + xfer += iprot->readListBegin(_etype494, _size491); + this->partitions.resize(_size491); + uint32_t _i495; + for (_i495 = 0; _i495 < _size491; ++_i495) + { + xfer += this->partitions[_i495].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.partitions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t AddPartitionsResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("AddPartitionsResult"); + + if (this->__isset.partitions) { + xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); + std::vector ::const_iterator _iter496; + for (_iter496 = this->partitions.begin(); _iter496 != this->partitions.end(); ++_iter496) + { + xfer += (*_iter496).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(AddPartitionsResult &a, AddPartitionsResult &b) { + using ::std::swap; + swap(a.partitions, b.partitions); + swap(a.__isset, b.__isset); +} + +AddPartitionsResult::AddPartitionsResult(const AddPartitionsResult& other497) { + partitions = other497.partitions; + __isset = other497.__isset; +} +AddPartitionsResult& AddPartitionsResult::operator=(const AddPartitionsResult& other498) { + partitions = other498.partitions; + __isset = other498.__isset; + return *this; +} +void AddPartitionsResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "AddPartitionsResult("; + out << "partitions="; (__isset.partitions ? (out << to_string(partitions)) : (out << "")); + out << ")"; +} + + +AddPartitionsRequest::~AddPartitionsRequest() throw() { +} + + +void AddPartitionsRequest::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void AddPartitionsRequest::__set_tblName(const std::string& val) { + this->tblName = val; +} + +void AddPartitionsRequest::__set_parts(const std::vector & val) { + this->parts = val; +} + +void AddPartitionsRequest::__set_ifNotExists(const bool val) { + this->ifNotExists = val; +} + +void AddPartitionsRequest::__set_needResult(const bool val) { + this->needResult = val; +__isset.needResult = true; +} + +uint32_t AddPartitionsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dbName = false; + bool isset_tblName = false; + bool isset_parts = false; + bool isset_ifNotExists = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + isset_dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tblName); + isset_tblName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->parts.clear(); + uint32_t _size499; + ::apache::thrift::protocol::TType _etype502; + xfer += iprot->readListBegin(_etype502, _size499); + this->parts.resize(_size499); + uint32_t _i503; + for (_i503 = 0; _i503 < _size499; ++_i503) + { + xfer += this->parts[_i503].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->ifNotExists); + isset_ifNotExists = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->needResult); + this->__isset.needResult = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tblName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_parts) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_ifNotExists) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t AddPartitionsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("AddPartitionsRequest"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tblName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("parts", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->parts.size())); + std::vector ::const_iterator _iter504; + for (_iter504 = this->parts.begin(); _iter504 != this->parts.end(); ++_iter504) + { + xfer += (*_iter504).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ifNotExists", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->ifNotExists); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.needResult) { + xfer += oprot->writeFieldBegin("needResult", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->needResult); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(AddPartitionsRequest &a, AddPartitionsRequest &b) { + using ::std::swap; + swap(a.dbName, b.dbName); + swap(a.tblName, b.tblName); + swap(a.parts, b.parts); + swap(a.ifNotExists, b.ifNotExists); + swap(a.needResult, b.needResult); + swap(a.__isset, b.__isset); +} + +AddPartitionsRequest::AddPartitionsRequest(const AddPartitionsRequest& other505) { + dbName = other505.dbName; + tblName = other505.tblName; + parts = other505.parts; + ifNotExists = other505.ifNotExists; + needResult = other505.needResult; + __isset = other505.__isset; +} +AddPartitionsRequest& AddPartitionsRequest::operator=(const AddPartitionsRequest& other506) { + dbName = other506.dbName; + tblName = other506.tblName; + parts = other506.parts; + ifNotExists = other506.ifNotExists; + needResult = other506.needResult; + __isset = other506.__isset; + return *this; +} +void AddPartitionsRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "AddPartitionsRequest("; + out << "dbName=" << to_string(dbName); + out << ", " << "tblName=" << to_string(tblName); + out << ", " << "parts=" << to_string(parts); + out << ", " << "ifNotExists=" << to_string(ifNotExists); + out << ", " << "needResult="; (__isset.needResult ? (out << to_string(needResult)) : (out << "")); + out << ")"; +} + + +DropPartitionsResult::~DropPartitionsResult() throw() { +} + + +void DropPartitionsResult::__set_partitions(const std::vector & val) { + this->partitions = val; +__isset.partitions = true; +} + +uint32_t DropPartitionsResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitions.clear(); + uint32_t _size507; + ::apache::thrift::protocol::TType _etype510; + xfer += iprot->readListBegin(_etype510, _size507); + this->partitions.resize(_size507); + uint32_t _i511; + for (_i511 = 0; _i511 < _size507; ++_i511) + { + xfer += this->partitions[_i511].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.partitions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t DropPartitionsResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("DropPartitionsResult"); + + if (this->__isset.partitions) { + xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); + std::vector ::const_iterator _iter512; + for (_iter512 = this->partitions.begin(); _iter512 != this->partitions.end(); ++_iter512) + { + xfer += (*_iter512).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(DropPartitionsResult &a, DropPartitionsResult &b) { + using ::std::swap; + swap(a.partitions, b.partitions); + swap(a.__isset, b.__isset); +} + +DropPartitionsResult::DropPartitionsResult(const DropPartitionsResult& other513) { + partitions = other513.partitions; + __isset = other513.__isset; +} +DropPartitionsResult& DropPartitionsResult::operator=(const DropPartitionsResult& other514) { + partitions = other514.partitions; + __isset = other514.__isset; + return *this; +} +void DropPartitionsResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DropPartitionsResult("; + out << "partitions="; (__isset.partitions ? (out << to_string(partitions)) : (out << "")); + out << ")"; +} + + +DropPartitionsExpr::~DropPartitionsExpr() throw() { +} + + +void DropPartitionsExpr::__set_expr(const std::string& val) { + this->expr = val; +} + +void DropPartitionsExpr::__set_partArchiveLevel(const int32_t val) { + this->partArchiveLevel = val; +__isset.partArchiveLevel = true; +} + +uint32_t DropPartitionsExpr::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_expr = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->expr); + isset_expr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partArchiveLevel); + this->__isset.partArchiveLevel = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_expr) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t DropPartitionsExpr::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("DropPartitionsExpr"); + + xfer += oprot->writeFieldBegin("expr", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->expr); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.partArchiveLevel) { + xfer += oprot->writeFieldBegin("partArchiveLevel", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->partArchiveLevel); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(DropPartitionsExpr &a, DropPartitionsExpr &b) { + using ::std::swap; + swap(a.expr, b.expr); + swap(a.partArchiveLevel, b.partArchiveLevel); + swap(a.__isset, b.__isset); +} + +DropPartitionsExpr::DropPartitionsExpr(const DropPartitionsExpr& other515) { + expr = other515.expr; + partArchiveLevel = other515.partArchiveLevel; + __isset = other515.__isset; +} +DropPartitionsExpr& DropPartitionsExpr::operator=(const DropPartitionsExpr& other516) { + expr = other516.expr; + partArchiveLevel = other516.partArchiveLevel; + __isset = other516.__isset; + return *this; +} +void DropPartitionsExpr::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DropPartitionsExpr("; + out << "expr=" << to_string(expr); + out << ", " << "partArchiveLevel="; (__isset.partArchiveLevel ? (out << to_string(partArchiveLevel)) : (out << "")); + out << ")"; +} + + +RequestPartsSpec::~RequestPartsSpec() throw() { +} + + +void RequestPartsSpec::__set_names(const std::vector & val) { + this->names = val; +} + +void RequestPartsSpec::__set_exprs(const std::vector & val) { + this->exprs = val; +} + +uint32_t RequestPartsSpec::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->names.clear(); + uint32_t _size517; + ::apache::thrift::protocol::TType _etype520; + xfer += iprot->readListBegin(_etype520, _size517); + this->names.resize(_size517); + uint32_t _i521; + for (_i521 = 0; _i521 < _size517; ++_i521) + { + xfer += iprot->readString(this->names[_i521]); + } + xfer += iprot->readListEnd(); + } + this->__isset.names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->exprs.clear(); + uint32_t _size522; + ::apache::thrift::protocol::TType _etype525; + xfer += iprot->readListBegin(_etype525, _size522); + this->exprs.resize(_size522); + uint32_t _i526; + for (_i526 = 0; _i526 < _size522; ++_i526) + { + xfer += this->exprs[_i526].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.exprs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t RequestPartsSpec::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("RequestPartsSpec"); + + xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->names.size())); + std::vector ::const_iterator _iter527; + for (_iter527 = this->names.begin(); _iter527 != this->names.end(); ++_iter527) + { + xfer += oprot->writeString((*_iter527)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("exprs", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->exprs.size())); + std::vector ::const_iterator _iter528; + for (_iter528 = this->exprs.begin(); _iter528 != this->exprs.end(); ++_iter528) + { + xfer += (*_iter528).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(RequestPartsSpec &a, RequestPartsSpec &b) { + using ::std::swap; + swap(a.names, b.names); + swap(a.exprs, b.exprs); + swap(a.__isset, b.__isset); +} + +RequestPartsSpec::RequestPartsSpec(const RequestPartsSpec& other529) { + names = other529.names; + exprs = other529.exprs; + __isset = other529.__isset; +} +RequestPartsSpec& RequestPartsSpec::operator=(const RequestPartsSpec& other530) { + names = other530.names; + exprs = other530.exprs; + __isset = other530.__isset; + return *this; +} +void RequestPartsSpec::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "RequestPartsSpec("; + out << "names=" << to_string(names); + out << ", " << "exprs=" << to_string(exprs); + out << ")"; +} + + +DropPartitionsRequest::~DropPartitionsRequest() throw() { +} + + +void DropPartitionsRequest::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void DropPartitionsRequest::__set_tblName(const std::string& val) { + this->tblName = val; +} + +void DropPartitionsRequest::__set_parts(const RequestPartsSpec& val) { + this->parts = val; +} + +void DropPartitionsRequest::__set_deleteData(const bool val) { + this->deleteData = val; +__isset.deleteData = true; +} + +void DropPartitionsRequest::__set_ifExists(const bool val) { + this->ifExists = val; +__isset.ifExists = true; +} + +void DropPartitionsRequest::__set_ignoreProtection(const bool val) { + this->ignoreProtection = val; +__isset.ignoreProtection = true; +} + +void DropPartitionsRequest::__set_environmentContext(const EnvironmentContext& val) { + this->environmentContext = val; +__isset.environmentContext = true; +} + +void DropPartitionsRequest::__set_needResult(const bool val) { + this->needResult = val; +__isset.needResult = true; +} + +uint32_t DropPartitionsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dbName = false; + bool isset_tblName = false; + bool isset_parts = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + isset_dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tblName); + isset_tblName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->parts.read(iprot); + isset_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->ifExists); + this->__isset.ifExists = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->ignoreProtection); + this->__isset.ignoreProtection = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->environmentContext.read(iprot); + this->__isset.environmentContext = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->needResult); + this->__isset.needResult = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tblName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_parts) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t DropPartitionsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("DropPartitionsRequest"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tblName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("parts", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->parts.write(oprot); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.deleteData) { + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->deleteData); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.ifExists) { + xfer += oprot->writeFieldBegin("ifExists", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->ifExists); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.ignoreProtection) { + xfer += oprot->writeFieldBegin("ignoreProtection", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->ignoreProtection); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.environmentContext) { + xfer += oprot->writeFieldBegin("environmentContext", ::apache::thrift::protocol::T_STRUCT, 7); + xfer += this->environmentContext.write(oprot); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.needResult) { + xfer += oprot->writeFieldBegin("needResult", ::apache::thrift::protocol::T_BOOL, 8); + xfer += oprot->writeBool(this->needResult); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(DropPartitionsRequest &a, DropPartitionsRequest &b) { + using ::std::swap; + swap(a.dbName, b.dbName); + swap(a.tblName, b.tblName); + swap(a.parts, b.parts); + swap(a.deleteData, b.deleteData); + swap(a.ifExists, b.ifExists); + swap(a.ignoreProtection, b.ignoreProtection); + swap(a.environmentContext, b.environmentContext); + swap(a.needResult, b.needResult); + swap(a.__isset, b.__isset); +} + +DropPartitionsRequest::DropPartitionsRequest(const DropPartitionsRequest& other531) { + dbName = other531.dbName; + tblName = other531.tblName; + parts = other531.parts; + deleteData = other531.deleteData; + ifExists = other531.ifExists; + ignoreProtection = other531.ignoreProtection; + environmentContext = other531.environmentContext; + needResult = other531.needResult; + __isset = other531.__isset; +} +DropPartitionsRequest& DropPartitionsRequest::operator=(const DropPartitionsRequest& other532) { + dbName = other532.dbName; + tblName = other532.tblName; + parts = other532.parts; + deleteData = other532.deleteData; + ifExists = other532.ifExists; + ignoreProtection = other532.ignoreProtection; + environmentContext = other532.environmentContext; + needResult = other532.needResult; + __isset = other532.__isset; + return *this; +} +void DropPartitionsRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DropPartitionsRequest("; + out << "dbName=" << to_string(dbName); + out << ", " << "tblName=" << to_string(tblName); + out << ", " << "parts=" << to_string(parts); + out << ", " << "deleteData="; (__isset.deleteData ? (out << to_string(deleteData)) : (out << "")); + out << ", " << "ifExists="; (__isset.ifExists ? (out << to_string(ifExists)) : (out << "")); + out << ", " << "ignoreProtection="; (__isset.ignoreProtection ? (out << to_string(ignoreProtection)) : (out << "")); + out << ", " << "environmentContext="; (__isset.environmentContext ? (out << to_string(environmentContext)) : (out << "")); + out << ", " << "needResult="; (__isset.needResult ? (out << to_string(needResult)) : (out << "")); + out << ")"; +} + + +ResourceUri::~ResourceUri() throw() { +} + + +void ResourceUri::__set_resourceType(const ResourceType::type val) { + this->resourceType = val; +} + +void ResourceUri::__set_uri(const std::string& val) { + this->uri = val; +} + +uint32_t ResourceUri::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast533; + xfer += iprot->readI32(ecast533); + this->resourceType = (ResourceType::type)ecast533; + this->__isset.resourceType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->uri); + this->__isset.uri = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ResourceUri::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ResourceUri"); + + xfer += oprot->writeFieldBegin("resourceType", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->resourceType); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("uri", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->uri); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ResourceUri &a, ResourceUri &b) { + using ::std::swap; + swap(a.resourceType, b.resourceType); + swap(a.uri, b.uri); + swap(a.__isset, b.__isset); +} + +ResourceUri::ResourceUri(const ResourceUri& other534) { + resourceType = other534.resourceType; + uri = other534.uri; + __isset = other534.__isset; +} +ResourceUri& ResourceUri::operator=(const ResourceUri& other535) { + resourceType = other535.resourceType; + uri = other535.uri; + __isset = other535.__isset; + return *this; +} +void ResourceUri::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ResourceUri("; + out << "resourceType=" << to_string(resourceType); + out << ", " << "uri=" << to_string(uri); + out << ")"; +} + + +Function::~Function() throw() { +} + + +void Function::__set_functionName(const std::string& val) { + this->functionName = val; +} + +void Function::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void Function::__set_className(const std::string& val) { + this->className = val; +} + +void Function::__set_ownerName(const std::string& val) { + this->ownerName = val; +} + +void Function::__set_ownerType(const PrincipalType::type val) { + this->ownerType = val; +} + +void Function::__set_createTime(const int32_t val) { + this->createTime = val; +} + +void Function::__set_functionType(const FunctionType::type val) { + this->functionType = val; +} + +void Function::__set_resourceUris(const std::vector & val) { + this->resourceUris = val; +} + +uint32_t Function::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->functionName); + this->__isset.functionName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->className); + this->__isset.className = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ownerName); + this->__isset.ownerName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast536; + xfer += iprot->readI32(ecast536); + this->ownerType = (PrincipalType::type)ecast536; + this->__isset.ownerType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast537; + xfer += iprot->readI32(ecast537); + this->functionType = (FunctionType::type)ecast537; + this->__isset.functionType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->resourceUris.clear(); + uint32_t _size538; + ::apache::thrift::protocol::TType _etype541; + xfer += iprot->readListBegin(_etype541, _size538); + this->resourceUris.resize(_size538); + uint32_t _i542; + for (_i542 = 0; _i542 < _size538; ++_i542) + { + xfer += this->resourceUris[_i542].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.resourceUris = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Function::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("Function"); + + xfer += oprot->writeFieldBegin("functionName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->functionName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("className", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->className); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->ownerName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("ownerType", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)this->ownerType); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("functionType", ::apache::thrift::protocol::T_I32, 7); + xfer += oprot->writeI32((int32_t)this->functionType); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("resourceUris", ::apache::thrift::protocol::T_LIST, 8); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->resourceUris.size())); + std::vector ::const_iterator _iter543; + for (_iter543 = this->resourceUris.begin(); _iter543 != this->resourceUris.end(); ++_iter543) + { + xfer += (*_iter543).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(Function &a, Function &b) { + using ::std::swap; + swap(a.functionName, b.functionName); + swap(a.dbName, b.dbName); + swap(a.className, b.className); + swap(a.ownerName, b.ownerName); + swap(a.ownerType, b.ownerType); + swap(a.createTime, b.createTime); + swap(a.functionType, b.functionType); + swap(a.resourceUris, b.resourceUris); + swap(a.__isset, b.__isset); +} + +Function::Function(const Function& other544) { + functionName = other544.functionName; + dbName = other544.dbName; + className = other544.className; + ownerName = other544.ownerName; + ownerType = other544.ownerType; + createTime = other544.createTime; + functionType = other544.functionType; + resourceUris = other544.resourceUris; + __isset = other544.__isset; +} +Function& Function::operator=(const Function& other545) { + functionName = other545.functionName; + dbName = other545.dbName; + className = other545.className; + ownerName = other545.ownerName; + ownerType = other545.ownerType; + createTime = other545.createTime; + functionType = other545.functionType; + resourceUris = other545.resourceUris; + __isset = other545.__isset; + return *this; +} +void Function::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Function("; + out << "functionName=" << to_string(functionName); + out << ", " << "dbName=" << to_string(dbName); + out << ", " << "className=" << to_string(className); + out << ", " << "ownerName=" << to_string(ownerName); + out << ", " << "ownerType=" << to_string(ownerType); + out << ", " << "createTime=" << to_string(createTime); + out << ", " << "functionType=" << to_string(functionType); + out << ", " << "resourceUris=" << to_string(resourceUris); + out << ")"; +} + + +TxnInfo::~TxnInfo() throw() { +} + + +void TxnInfo::__set_id(const int64_t val) { + this->id = val; +} + +void TxnInfo::__set_state(const TxnState::type val) { + this->state = val; +} + +void TxnInfo::__set_user(const std::string& val) { + this->user = val; +} + +void TxnInfo::__set_hostname(const std::string& val) { + this->hostname = val; +} + +void TxnInfo::__set_agentInfo(const std::string& val) { + this->agentInfo = val; +__isset.agentInfo = true; +} + +void TxnInfo::__set_heartbeatCount(const int32_t val) { + this->heartbeatCount = val; +__isset.heartbeatCount = true; +} + +void TxnInfo::__set_metaInfo(const std::string& val) { + this->metaInfo = val; +__isset.metaInfo = true; +} + +void TxnInfo::__set_startedTime(const int64_t val) { + this->startedTime = val; +__isset.startedTime = true; +} + +void TxnInfo::__set_lastHeartbeatTime(const int64_t val) { + this->lastHeartbeatTime = val; +__isset.lastHeartbeatTime = true; +} + +uint32_t TxnInfo::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_id = false; + bool isset_state = false; + bool isset_user = false; + bool isset_hostname = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->id); + isset_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast546; + xfer += iprot->readI32(ecast546); + this->state = (TxnState::type)ecast546; + isset_state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user); + isset_user = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hostname); + isset_hostname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->agentInfo); + this->__isset.agentInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->heartbeatCount); + this->__isset.heartbeatCount = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->metaInfo); + this->__isset.metaInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->startedTime); + this->__isset.startedTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lastHeartbeatTime); + this->__isset.lastHeartbeatTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_id) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_state) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_user) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_hostname) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t TxnInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TxnInfo"); + + xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->id); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->state); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->user); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->hostname); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.agentInfo) { + xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->agentInfo); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.heartbeatCount) { + xfer += oprot->writeFieldBegin("heartbeatCount", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeI32(this->heartbeatCount); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.metaInfo) { + xfer += oprot->writeFieldBegin("metaInfo", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->metaInfo); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.startedTime) { + xfer += oprot->writeFieldBegin("startedTime", ::apache::thrift::protocol::T_I64, 8); + xfer += oprot->writeI64(this->startedTime); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.lastHeartbeatTime) { + xfer += oprot->writeFieldBegin("lastHeartbeatTime", ::apache::thrift::protocol::T_I64, 9); + xfer += oprot->writeI64(this->lastHeartbeatTime); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TxnInfo &a, TxnInfo &b) { + using ::std::swap; + swap(a.id, b.id); + swap(a.state, b.state); + swap(a.user, b.user); + swap(a.hostname, b.hostname); + swap(a.agentInfo, b.agentInfo); + swap(a.heartbeatCount, b.heartbeatCount); + swap(a.metaInfo, b.metaInfo); + swap(a.startedTime, b.startedTime); + swap(a.lastHeartbeatTime, b.lastHeartbeatTime); + swap(a.__isset, b.__isset); +} + +TxnInfo::TxnInfo(const TxnInfo& other547) { + id = other547.id; + state = other547.state; + user = other547.user; + hostname = other547.hostname; + agentInfo = other547.agentInfo; + heartbeatCount = other547.heartbeatCount; + metaInfo = other547.metaInfo; + startedTime = other547.startedTime; + lastHeartbeatTime = other547.lastHeartbeatTime; + __isset = other547.__isset; +} +TxnInfo& TxnInfo::operator=(const TxnInfo& other548) { + id = other548.id; + state = other548.state; + user = other548.user; + hostname = other548.hostname; + agentInfo = other548.agentInfo; + heartbeatCount = other548.heartbeatCount; + metaInfo = other548.metaInfo; + startedTime = other548.startedTime; + lastHeartbeatTime = other548.lastHeartbeatTime; + __isset = other548.__isset; + return *this; +} +void TxnInfo::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TxnInfo("; + out << "id=" << to_string(id); + out << ", " << "state=" << to_string(state); + out << ", " << "user=" << to_string(user); + out << ", " << "hostname=" << to_string(hostname); + out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "")); + out << ", " << "heartbeatCount="; (__isset.heartbeatCount ? (out << to_string(heartbeatCount)) : (out << "")); + out << ", " << "metaInfo="; (__isset.metaInfo ? (out << to_string(metaInfo)) : (out << "")); + out << ", " << "startedTime="; (__isset.startedTime ? (out << to_string(startedTime)) : (out << "")); + out << ", " << "lastHeartbeatTime="; (__isset.lastHeartbeatTime ? (out << to_string(lastHeartbeatTime)) : (out << "")); + out << ")"; +} + + +GetOpenTxnsInfoResponse::~GetOpenTxnsInfoResponse() throw() { +} + + +void GetOpenTxnsInfoResponse::__set_txn_high_water_mark(const int64_t val) { + this->txn_high_water_mark = val; +} + +void GetOpenTxnsInfoResponse::__set_open_txns(const std::vector & val) { + this->open_txns = val; +} + +uint32_t GetOpenTxnsInfoResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_txn_high_water_mark = false; + bool isset_open_txns = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->txn_high_water_mark); + isset_txn_high_water_mark = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->open_txns.clear(); + uint32_t _size549; + ::apache::thrift::protocol::TType _etype552; + xfer += iprot->readListBegin(_etype552, _size549); + this->open_txns.resize(_size549); + uint32_t _i553; + for (_i553 = 0; _i553 < _size549; ++_i553) + { + xfer += this->open_txns[_i553].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_open_txns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_txn_high_water_mark) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_open_txns) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetOpenTxnsInfoResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetOpenTxnsInfoResponse"); + + xfer += oprot->writeFieldBegin("txn_high_water_mark", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->txn_high_water_mark); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("open_txns", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->open_txns.size())); + std::vector ::const_iterator _iter554; + for (_iter554 = this->open_txns.begin(); _iter554 != this->open_txns.end(); ++_iter554) + { + xfer += (*_iter554).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetOpenTxnsInfoResponse &a, GetOpenTxnsInfoResponse &b) { + using ::std::swap; + swap(a.txn_high_water_mark, b.txn_high_water_mark); + swap(a.open_txns, b.open_txns); +} + +GetOpenTxnsInfoResponse::GetOpenTxnsInfoResponse(const GetOpenTxnsInfoResponse& other555) { + txn_high_water_mark = other555.txn_high_water_mark; + open_txns = other555.open_txns; +} +GetOpenTxnsInfoResponse& GetOpenTxnsInfoResponse::operator=(const GetOpenTxnsInfoResponse& other556) { + txn_high_water_mark = other556.txn_high_water_mark; + open_txns = other556.open_txns; + return *this; +} +void GetOpenTxnsInfoResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetOpenTxnsInfoResponse("; + out << "txn_high_water_mark=" << to_string(txn_high_water_mark); + out << ", " << "open_txns=" << to_string(open_txns); + out << ")"; +} + + +GetOpenTxnsResponse::~GetOpenTxnsResponse() throw() { +} + + +void GetOpenTxnsResponse::__set_txn_high_water_mark(const int64_t val) { + this->txn_high_water_mark = val; +} + +void GetOpenTxnsResponse::__set_open_txns(const std::vector & val) { + this->open_txns = val; +} + +void GetOpenTxnsResponse::__set_min_open_txn(const int64_t val) { + this->min_open_txn = val; +__isset.min_open_txn = true; +} + +void GetOpenTxnsResponse::__set_abortedBits(const std::string& val) { + this->abortedBits = val; +} + +uint32_t GetOpenTxnsResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_txn_high_water_mark = false; + bool isset_open_txns = false; + bool isset_abortedBits = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->txn_high_water_mark); + isset_txn_high_water_mark = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->open_txns.clear(); + uint32_t _size557; + ::apache::thrift::protocol::TType _etype560; + xfer += iprot->readListBegin(_etype560, _size557); + this->open_txns.resize(_size557); + uint32_t _i561; + for (_i561 = 0; _i561 < _size557; ++_i561) + { + xfer += iprot->readI64(this->open_txns[_i561]); + } + xfer += iprot->readListEnd(); + } + isset_open_txns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->min_open_txn); + this->__isset.min_open_txn = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->abortedBits); + isset_abortedBits = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_txn_high_water_mark) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_open_txns) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_abortedBits) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetOpenTxnsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetOpenTxnsResponse"); + + xfer += oprot->writeFieldBegin("txn_high_water_mark", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->txn_high_water_mark); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("open_txns", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->open_txns.size())); + std::vector ::const_iterator _iter562; + for (_iter562 = this->open_txns.begin(); _iter562 != this->open_txns.end(); ++_iter562) + { + xfer += oprot->writeI64((*_iter562)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.min_open_txn) { + xfer += oprot->writeFieldBegin("min_open_txn", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->min_open_txn); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("abortedBits", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeBinary(this->abortedBits); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetOpenTxnsResponse &a, GetOpenTxnsResponse &b) { + using ::std::swap; + swap(a.txn_high_water_mark, b.txn_high_water_mark); + swap(a.open_txns, b.open_txns); + swap(a.min_open_txn, b.min_open_txn); + swap(a.abortedBits, b.abortedBits); + swap(a.__isset, b.__isset); +} + +GetOpenTxnsResponse::GetOpenTxnsResponse(const GetOpenTxnsResponse& other563) { + txn_high_water_mark = other563.txn_high_water_mark; + open_txns = other563.open_txns; + min_open_txn = other563.min_open_txn; + abortedBits = other563.abortedBits; + __isset = other563.__isset; +} +GetOpenTxnsResponse& GetOpenTxnsResponse::operator=(const GetOpenTxnsResponse& other564) { + txn_high_water_mark = other564.txn_high_water_mark; + open_txns = other564.open_txns; + min_open_txn = other564.min_open_txn; + abortedBits = other564.abortedBits; + __isset = other564.__isset; + return *this; +} +void GetOpenTxnsResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetOpenTxnsResponse("; + out << "txn_high_water_mark=" << to_string(txn_high_water_mark); + out << ", " << "open_txns=" << to_string(open_txns); + out << ", " << "min_open_txn="; (__isset.min_open_txn ? (out << to_string(min_open_txn)) : (out << "")); + out << ", " << "abortedBits=" << to_string(abortedBits); + out << ")"; +} + + +OpenTxnRequest::~OpenTxnRequest() throw() { +} + + +void OpenTxnRequest::__set_num_txns(const int32_t val) { + this->num_txns = val; +} + +void OpenTxnRequest::__set_user(const std::string& val) { + this->user = val; +} + +void OpenTxnRequest::__set_hostname(const std::string& val) { + this->hostname = val; +} + +void OpenTxnRequest::__set_agentInfo(const std::string& val) { + this->agentInfo = val; +__isset.agentInfo = true; +} + +uint32_t OpenTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_num_txns = false; + bool isset_user = false; + bool isset_hostname = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->num_txns); + isset_num_txns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user); + isset_user = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hostname); + isset_hostname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->agentInfo); + this->__isset.agentInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_num_txns) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_user) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_hostname) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t OpenTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("OpenTxnRequest"); + + xfer += oprot->writeFieldBegin("num_txns", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->num_txns); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->user); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->hostname); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.agentInfo) { + xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->agentInfo); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(OpenTxnRequest &a, OpenTxnRequest &b) { + using ::std::swap; + swap(a.num_txns, b.num_txns); + swap(a.user, b.user); + swap(a.hostname, b.hostname); + swap(a.agentInfo, b.agentInfo); + swap(a.__isset, b.__isset); +} + +OpenTxnRequest::OpenTxnRequest(const OpenTxnRequest& other565) { + num_txns = other565.num_txns; + user = other565.user; + hostname = other565.hostname; + agentInfo = other565.agentInfo; + __isset = other565.__isset; +} +OpenTxnRequest& OpenTxnRequest::operator=(const OpenTxnRequest& other566) { + num_txns = other566.num_txns; + user = other566.user; + hostname = other566.hostname; + agentInfo = other566.agentInfo; + __isset = other566.__isset; + return *this; +} +void OpenTxnRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "OpenTxnRequest("; + out << "num_txns=" << to_string(num_txns); + out << ", " << "user=" << to_string(user); + out << ", " << "hostname=" << to_string(hostname); + out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "")); + out << ")"; +} + + +OpenTxnsResponse::~OpenTxnsResponse() throw() { +} + + +void OpenTxnsResponse::__set_txn_ids(const std::vector & val) { + this->txn_ids = val; +} + +uint32_t OpenTxnsResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_txn_ids = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->txn_ids.clear(); + uint32_t _size567; + ::apache::thrift::protocol::TType _etype570; + xfer += iprot->readListBegin(_etype570, _size567); + this->txn_ids.resize(_size567); + uint32_t _i571; + for (_i571 = 0; _i571 < _size567; ++_i571) + { + xfer += iprot->readI64(this->txn_ids[_i571]); + } + xfer += iprot->readListEnd(); + } + isset_txn_ids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_txn_ids) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t OpenTxnsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("OpenTxnsResponse"); + + xfer += oprot->writeFieldBegin("txn_ids", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->txn_ids.size())); + std::vector ::const_iterator _iter572; + for (_iter572 = this->txn_ids.begin(); _iter572 != this->txn_ids.end(); ++_iter572) + { + xfer += oprot->writeI64((*_iter572)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(OpenTxnsResponse &a, OpenTxnsResponse &b) { + using ::std::swap; + swap(a.txn_ids, b.txn_ids); +} + +OpenTxnsResponse::OpenTxnsResponse(const OpenTxnsResponse& other573) { + txn_ids = other573.txn_ids; +} +OpenTxnsResponse& OpenTxnsResponse::operator=(const OpenTxnsResponse& other574) { + txn_ids = other574.txn_ids; + return *this; +} +void OpenTxnsResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "OpenTxnsResponse("; + out << "txn_ids=" << to_string(txn_ids); + out << ")"; +} + + +AbortTxnRequest::~AbortTxnRequest() throw() { +} + + +void AbortTxnRequest::__set_txnid(const int64_t val) { + this->txnid = val; +} + +uint32_t AbortTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_txnid = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->txnid); + isset_txnid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_txnid) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t AbortTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("AbortTxnRequest"); + + xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->txnid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(AbortTxnRequest &a, AbortTxnRequest &b) { + using ::std::swap; + swap(a.txnid, b.txnid); +} + +AbortTxnRequest::AbortTxnRequest(const AbortTxnRequest& other575) { + txnid = other575.txnid; +} +AbortTxnRequest& AbortTxnRequest::operator=(const AbortTxnRequest& other576) { + txnid = other576.txnid; + return *this; +} +void AbortTxnRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "AbortTxnRequest("; + out << "txnid=" << to_string(txnid); + out << ")"; +} + + +AbortTxnsRequest::~AbortTxnsRequest() throw() { +} + + +void AbortTxnsRequest::__set_txn_ids(const std::vector & val) { + this->txn_ids = val; +} + +uint32_t AbortTxnsRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_txn_ids = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->txn_ids.clear(); + uint32_t _size577; + ::apache::thrift::protocol::TType _etype580; + xfer += iprot->readListBegin(_etype580, _size577); + this->txn_ids.resize(_size577); + uint32_t _i581; + for (_i581 = 0; _i581 < _size577; ++_i581) + { + xfer += iprot->readI64(this->txn_ids[_i581]); + } + xfer += iprot->readListEnd(); + } + isset_txn_ids = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_txn_ids) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t AbortTxnsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("AbortTxnsRequest"); + + xfer += oprot->writeFieldBegin("txn_ids", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->txn_ids.size())); + std::vector ::const_iterator _iter582; + for (_iter582 = this->txn_ids.begin(); _iter582 != this->txn_ids.end(); ++_iter582) + { + xfer += oprot->writeI64((*_iter582)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(AbortTxnsRequest &a, AbortTxnsRequest &b) { + using ::std::swap; + swap(a.txn_ids, b.txn_ids); +} + +AbortTxnsRequest::AbortTxnsRequest(const AbortTxnsRequest& other583) { + txn_ids = other583.txn_ids; +} +AbortTxnsRequest& AbortTxnsRequest::operator=(const AbortTxnsRequest& other584) { + txn_ids = other584.txn_ids; + return *this; +} +void AbortTxnsRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "AbortTxnsRequest("; + out << "txn_ids=" << to_string(txn_ids); + out << ")"; +} + + +CommitTxnRequest::~CommitTxnRequest() throw() { +} + + +void CommitTxnRequest::__set_txnid(const int64_t val) { + this->txnid = val; +} + +uint32_t CommitTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_txnid = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->txnid); + isset_txnid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_txnid) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t CommitTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CommitTxnRequest"); + + xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->txnid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CommitTxnRequest &a, CommitTxnRequest &b) { + using ::std::swap; + swap(a.txnid, b.txnid); +} + +CommitTxnRequest::CommitTxnRequest(const CommitTxnRequest& other585) { + txnid = other585.txnid; +} +CommitTxnRequest& CommitTxnRequest::operator=(const CommitTxnRequest& other586) { + txnid = other586.txnid; + return *this; +} +void CommitTxnRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CommitTxnRequest("; + out << "txnid=" << to_string(txnid); + out << ")"; +} + + +LockComponent::~LockComponent() throw() { +} + + +void LockComponent::__set_type(const LockType::type val) { + this->type = val; +} + +void LockComponent::__set_level(const LockLevel::type val) { + this->level = val; +} + +void LockComponent::__set_dbname(const std::string& val) { + this->dbname = val; +} + +void LockComponent::__set_tablename(const std::string& val) { + this->tablename = val; +__isset.tablename = true; +} + +void LockComponent::__set_partitionname(const std::string& val) { + this->partitionname = val; +__isset.partitionname = true; +} + +void LockComponent::__set_operationType(const DataOperationType::type val) { + this->operationType = val; +__isset.operationType = true; +} + +void LockComponent::__set_isAcid(const bool val) { + this->isAcid = val; +__isset.isAcid = true; +} + +void LockComponent::__set_isDynamicPartitionWrite(const bool val) { + this->isDynamicPartitionWrite = val; +__isset.isDynamicPartitionWrite = true; +} + +uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_type = false; + bool isset_level = false; + bool isset_dbname = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast587; + xfer += iprot->readI32(ecast587); + this->type = (LockType::type)ecast587; + isset_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast588; + xfer += iprot->readI32(ecast588); + this->level = (LockLevel::type)ecast588; + isset_level = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + isset_dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tablename); + this->__isset.tablename = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->partitionname); + this->__isset.partitionname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast589; + xfer += iprot->readI32(ecast589); + this->operationType = (DataOperationType::type)ecast589; + this->__isset.operationType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isAcid); + this->__isset.isAcid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isDynamicPartitionWrite); + this->__isset.isDynamicPartitionWrite = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_type) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_level) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_dbname) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t LockComponent::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("LockComponent"); + + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("level", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->level); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->dbname); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.tablename) { + xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->tablename); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.partitionname) { + xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->partitionname); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.operationType) { + xfer += oprot->writeFieldBegin("operationType", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeI32((int32_t)this->operationType); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.isAcid) { + xfer += oprot->writeFieldBegin("isAcid", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->isAcid); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.isDynamicPartitionWrite) { + xfer += oprot->writeFieldBegin("isDynamicPartitionWrite", ::apache::thrift::protocol::T_BOOL, 8); + xfer += oprot->writeBool(this->isDynamicPartitionWrite); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(LockComponent &a, LockComponent &b) { + using ::std::swap; + swap(a.type, b.type); + swap(a.level, b.level); + swap(a.dbname, b.dbname); + swap(a.tablename, b.tablename); + swap(a.partitionname, b.partitionname); + swap(a.operationType, b.operationType); + swap(a.isAcid, b.isAcid); + swap(a.isDynamicPartitionWrite, b.isDynamicPartitionWrite); + swap(a.__isset, b.__isset); +} + +LockComponent::LockComponent(const LockComponent& other590) { + type = other590.type; + level = other590.level; + dbname = other590.dbname; + tablename = other590.tablename; + partitionname = other590.partitionname; + operationType = other590.operationType; + isAcid = other590.isAcid; + isDynamicPartitionWrite = other590.isDynamicPartitionWrite; + __isset = other590.__isset; +} +LockComponent& LockComponent::operator=(const LockComponent& other591) { + type = other591.type; + level = other591.level; + dbname = other591.dbname; + tablename = other591.tablename; + partitionname = other591.partitionname; + operationType = other591.operationType; + isAcid = other591.isAcid; + isDynamicPartitionWrite = other591.isDynamicPartitionWrite; + __isset = other591.__isset; + return *this; +} +void LockComponent::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "LockComponent("; + out << "type=" << to_string(type); + out << ", " << "level=" << to_string(level); + out << ", " << "dbname=" << to_string(dbname); + out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "")); + out << ", " << "partitionname="; (__isset.partitionname ? (out << to_string(partitionname)) : (out << "")); + out << ", " << "operationType="; (__isset.operationType ? (out << to_string(operationType)) : (out << "")); + out << ", " << "isAcid="; (__isset.isAcid ? (out << to_string(isAcid)) : (out << "")); + out << ", " << "isDynamicPartitionWrite="; (__isset.isDynamicPartitionWrite ? (out << to_string(isDynamicPartitionWrite)) : (out << "")); + out << ")"; +} + + +LockRequest::~LockRequest() throw() { +} + + +void LockRequest::__set_component(const std::vector & val) { + this->component = val; +} + +void LockRequest::__set_txnid(const int64_t val) { + this->txnid = val; +__isset.txnid = true; +} + +void LockRequest::__set_user(const std::string& val) { + this->user = val; +} + +void LockRequest::__set_hostname(const std::string& val) { + this->hostname = val; +} + +void LockRequest::__set_agentInfo(const std::string& val) { + this->agentInfo = val; +__isset.agentInfo = true; +} + +uint32_t LockRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_component = false; + bool isset_user = false; + bool isset_hostname = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->component.clear(); + uint32_t _size592; + ::apache::thrift::protocol::TType _etype595; + xfer += iprot->readListBegin(_etype595, _size592); + this->component.resize(_size592); + uint32_t _i596; + for (_i596 = 0; _i596 < _size592; ++_i596) + { + xfer += this->component[_i596].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_component = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->txnid); + this->__isset.txnid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user); + isset_user = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hostname); + isset_hostname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->agentInfo); + this->__isset.agentInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_component) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_user) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_hostname) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t LockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("LockRequest"); + + xfer += oprot->writeFieldBegin("component", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->component.size())); + std::vector ::const_iterator _iter597; + for (_iter597 = this->component.begin(); _iter597 != this->component.end(); ++_iter597) + { + xfer += (*_iter597).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.txnid) { + xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->txnid); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->user); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->hostname); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.agentInfo) { + xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->agentInfo); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(LockRequest &a, LockRequest &b) { + using ::std::swap; + swap(a.component, b.component); + swap(a.txnid, b.txnid); + swap(a.user, b.user); + swap(a.hostname, b.hostname); + swap(a.agentInfo, b.agentInfo); + swap(a.__isset, b.__isset); +} + +LockRequest::LockRequest(const LockRequest& other598) { + component = other598.component; + txnid = other598.txnid; + user = other598.user; + hostname = other598.hostname; + agentInfo = other598.agentInfo; + __isset = other598.__isset; +} +LockRequest& LockRequest::operator=(const LockRequest& other599) { + component = other599.component; + txnid = other599.txnid; + user = other599.user; + hostname = other599.hostname; + agentInfo = other599.agentInfo; + __isset = other599.__isset; + return *this; +} +void LockRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "LockRequest("; + out << "component=" << to_string(component); + out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "")); + out << ", " << "user=" << to_string(user); + out << ", " << "hostname=" << to_string(hostname); + out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "")); + out << ")"; +} + + +LockResponse::~LockResponse() throw() { +} + + +void LockResponse::__set_lockid(const int64_t val) { + this->lockid = val; +} + +void LockResponse::__set_state(const LockState::type val) { + this->state = val; +} + +uint32_t LockResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_lockid = false; + bool isset_state = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lockid); + isset_lockid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast600; + xfer += iprot->readI32(ecast600); + this->state = (LockState::type)ecast600; + isset_state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_lockid) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_state) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t LockResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("LockResponse"); + + xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->lockid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->state); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(LockResponse &a, LockResponse &b) { + using ::std::swap; + swap(a.lockid, b.lockid); + swap(a.state, b.state); +} + +LockResponse::LockResponse(const LockResponse& other601) { + lockid = other601.lockid; + state = other601.state; +} +LockResponse& LockResponse::operator=(const LockResponse& other602) { + lockid = other602.lockid; + state = other602.state; + return *this; +} +void LockResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "LockResponse("; + out << "lockid=" << to_string(lockid); + out << ", " << "state=" << to_string(state); + out << ")"; +} + + +CheckLockRequest::~CheckLockRequest() throw() { +} + + +void CheckLockRequest::__set_lockid(const int64_t val) { + this->lockid = val; +} + +void CheckLockRequest::__set_txnid(const int64_t val) { + this->txnid = val; +__isset.txnid = true; +} + +void CheckLockRequest::__set_elapsed_ms(const int64_t val) { + this->elapsed_ms = val; +__isset.elapsed_ms = true; +} + +uint32_t CheckLockRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_lockid = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lockid); + isset_lockid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->txnid); + this->__isset.txnid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->elapsed_ms); + this->__isset.elapsed_ms = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_lockid) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t CheckLockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CheckLockRequest"); + + xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->lockid); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.txnid) { + xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->txnid); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.elapsed_ms) { + xfer += oprot->writeFieldBegin("elapsed_ms", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->elapsed_ms); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CheckLockRequest &a, CheckLockRequest &b) { + using ::std::swap; + swap(a.lockid, b.lockid); + swap(a.txnid, b.txnid); + swap(a.elapsed_ms, b.elapsed_ms); + swap(a.__isset, b.__isset); +} + +CheckLockRequest::CheckLockRequest(const CheckLockRequest& other603) { + lockid = other603.lockid; + txnid = other603.txnid; + elapsed_ms = other603.elapsed_ms; + __isset = other603.__isset; +} +CheckLockRequest& CheckLockRequest::operator=(const CheckLockRequest& other604) { + lockid = other604.lockid; + txnid = other604.txnid; + elapsed_ms = other604.elapsed_ms; + __isset = other604.__isset; + return *this; +} +void CheckLockRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CheckLockRequest("; + out << "lockid=" << to_string(lockid); + out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "")); + out << ", " << "elapsed_ms="; (__isset.elapsed_ms ? (out << to_string(elapsed_ms)) : (out << "")); + out << ")"; +} + + +UnlockRequest::~UnlockRequest() throw() { +} + + +void UnlockRequest::__set_lockid(const int64_t val) { + this->lockid = val; +} + +uint32_t UnlockRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_lockid = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lockid); + isset_lockid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_lockid) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t UnlockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("UnlockRequest"); + + xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->lockid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(UnlockRequest &a, UnlockRequest &b) { + using ::std::swap; + swap(a.lockid, b.lockid); +} + +UnlockRequest::UnlockRequest(const UnlockRequest& other605) { + lockid = other605.lockid; +} +UnlockRequest& UnlockRequest::operator=(const UnlockRequest& other606) { + lockid = other606.lockid; + return *this; +} +void UnlockRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "UnlockRequest("; + out << "lockid=" << to_string(lockid); + out << ")"; +} + + +ShowLocksRequest::~ShowLocksRequest() throw() { +} + + +void ShowLocksRequest::__set_dbname(const std::string& val) { + this->dbname = val; +__isset.dbname = true; +} + +void ShowLocksRequest::__set_tablename(const std::string& val) { + this->tablename = val; +__isset.tablename = true; +} + +void ShowLocksRequest::__set_partname(const std::string& val) { + this->partname = val; +__isset.partname = true; +} + +void ShowLocksRequest::__set_isExtended(const bool val) { + this->isExtended = val; +__isset.isExtended = true; +} + +uint32_t ShowLocksRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tablename); + this->__isset.tablename = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->partname); + this->__isset.partname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isExtended); + this->__isset.isExtended = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ShowLocksRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ShowLocksRequest"); + + if (this->__isset.dbname) { + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbname); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.tablename) { + xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tablename); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.partname) { + xfer += oprot->writeFieldBegin("partname", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->partname); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.isExtended) { + xfer += oprot->writeFieldBegin("isExtended", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->isExtended); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ShowLocksRequest &a, ShowLocksRequest &b) { + using ::std::swap; + swap(a.dbname, b.dbname); + swap(a.tablename, b.tablename); + swap(a.partname, b.partname); + swap(a.isExtended, b.isExtended); + swap(a.__isset, b.__isset); +} + +ShowLocksRequest::ShowLocksRequest(const ShowLocksRequest& other607) { + dbname = other607.dbname; + tablename = other607.tablename; + partname = other607.partname; + isExtended = other607.isExtended; + __isset = other607.__isset; +} +ShowLocksRequest& ShowLocksRequest::operator=(const ShowLocksRequest& other608) { + dbname = other608.dbname; + tablename = other608.tablename; + partname = other608.partname; + isExtended = other608.isExtended; + __isset = other608.__isset; + return *this; +} +void ShowLocksRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ShowLocksRequest("; + out << "dbname="; (__isset.dbname ? (out << to_string(dbname)) : (out << "")); + out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "")); + out << ", " << "partname="; (__isset.partname ? (out << to_string(partname)) : (out << "")); + out << ", " << "isExtended="; (__isset.isExtended ? (out << to_string(isExtended)) : (out << "")); + out << ")"; +} + + +ShowLocksResponseElement::~ShowLocksResponseElement() throw() { +} + + +void ShowLocksResponseElement::__set_lockid(const int64_t val) { + this->lockid = val; +} + +void ShowLocksResponseElement::__set_dbname(const std::string& val) { + this->dbname = val; +} + +void ShowLocksResponseElement::__set_tablename(const std::string& val) { + this->tablename = val; +__isset.tablename = true; +} + +void ShowLocksResponseElement::__set_partname(const std::string& val) { + this->partname = val; +__isset.partname = true; +} + +void ShowLocksResponseElement::__set_state(const LockState::type val) { + this->state = val; +} + +void ShowLocksResponseElement::__set_type(const LockType::type val) { + this->type = val; +} + +void ShowLocksResponseElement::__set_txnid(const int64_t val) { + this->txnid = val; +__isset.txnid = true; +} + +void ShowLocksResponseElement::__set_lastheartbeat(const int64_t val) { + this->lastheartbeat = val; +} + +void ShowLocksResponseElement::__set_acquiredat(const int64_t val) { + this->acquiredat = val; +__isset.acquiredat = true; +} + +void ShowLocksResponseElement::__set_user(const std::string& val) { + this->user = val; +} + +void ShowLocksResponseElement::__set_hostname(const std::string& val) { + this->hostname = val; +} + +void ShowLocksResponseElement::__set_heartbeatCount(const int32_t val) { + this->heartbeatCount = val; +__isset.heartbeatCount = true; +} + +void ShowLocksResponseElement::__set_agentInfo(const std::string& val) { + this->agentInfo = val; +__isset.agentInfo = true; +} + +void ShowLocksResponseElement::__set_blockedByExtId(const int64_t val) { + this->blockedByExtId = val; +__isset.blockedByExtId = true; +} + +void ShowLocksResponseElement::__set_blockedByIntId(const int64_t val) { + this->blockedByIntId = val; +__isset.blockedByIntId = true; +} + +void ShowLocksResponseElement::__set_lockIdInternal(const int64_t val) { + this->lockIdInternal = val; +__isset.lockIdInternal = true; +} + +uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_lockid = false; + bool isset_dbname = false; + bool isset_state = false; + bool isset_type = false; + bool isset_lastheartbeat = false; + bool isset_user = false; + bool isset_hostname = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lockid); + isset_lockid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + isset_dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tablename); + this->__isset.tablename = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->partname); + this->__isset.partname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast609; + xfer += iprot->readI32(ecast609); + this->state = (LockState::type)ecast609; + isset_state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast610; + xfer += iprot->readI32(ecast610); + this->type = (LockType::type)ecast610; + isset_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->txnid); + this->__isset.txnid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lastheartbeat); + isset_lastheartbeat = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->acquiredat); + this->__isset.acquiredat = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user); + isset_user = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hostname); + isset_hostname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->heartbeatCount); + this->__isset.heartbeatCount = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 13: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->agentInfo); + this->__isset.agentInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 14: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->blockedByExtId); + this->__isset.blockedByExtId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 15: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->blockedByIntId); + this->__isset.blockedByIntId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 16: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lockIdInternal); + this->__isset.lockIdInternal = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_lockid) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_dbname) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_state) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_type) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_lastheartbeat) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_user) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_hostname) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t ShowLocksResponseElement::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ShowLocksResponseElement"); + + xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->lockid); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->dbname); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.tablename) { + xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->tablename); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.partname) { + xfer += oprot->writeFieldBegin("partname", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->partname); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)this->state); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.txnid) { + xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64(this->txnid); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("lastheartbeat", ::apache::thrift::protocol::T_I64, 8); + xfer += oprot->writeI64(this->lastheartbeat); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.acquiredat) { + xfer += oprot->writeFieldBegin("acquiredat", ::apache::thrift::protocol::T_I64, 9); + xfer += oprot->writeI64(this->acquiredat); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("user", ::apache::thrift::protocol::T_STRING, 10); + xfer += oprot->writeString(this->user); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("hostname", ::apache::thrift::protocol::T_STRING, 11); + xfer += oprot->writeString(this->hostname); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.heartbeatCount) { + xfer += oprot->writeFieldBegin("heartbeatCount", ::apache::thrift::protocol::T_I32, 12); + xfer += oprot->writeI32(this->heartbeatCount); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.agentInfo) { + xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 13); + xfer += oprot->writeString(this->agentInfo); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.blockedByExtId) { + xfer += oprot->writeFieldBegin("blockedByExtId", ::apache::thrift::protocol::T_I64, 14); + xfer += oprot->writeI64(this->blockedByExtId); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.blockedByIntId) { + xfer += oprot->writeFieldBegin("blockedByIntId", ::apache::thrift::protocol::T_I64, 15); + xfer += oprot->writeI64(this->blockedByIntId); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.lockIdInternal) { + xfer += oprot->writeFieldBegin("lockIdInternal", ::apache::thrift::protocol::T_I64, 16); + xfer += oprot->writeI64(this->lockIdInternal); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ShowLocksResponseElement &a, ShowLocksResponseElement &b) { + using ::std::swap; + swap(a.lockid, b.lockid); + swap(a.dbname, b.dbname); + swap(a.tablename, b.tablename); + swap(a.partname, b.partname); + swap(a.state, b.state); + swap(a.type, b.type); + swap(a.txnid, b.txnid); + swap(a.lastheartbeat, b.lastheartbeat); + swap(a.acquiredat, b.acquiredat); + swap(a.user, b.user); + swap(a.hostname, b.hostname); + swap(a.heartbeatCount, b.heartbeatCount); + swap(a.agentInfo, b.agentInfo); + swap(a.blockedByExtId, b.blockedByExtId); + swap(a.blockedByIntId, b.blockedByIntId); + swap(a.lockIdInternal, b.lockIdInternal); + swap(a.__isset, b.__isset); +} + +ShowLocksResponseElement::ShowLocksResponseElement(const ShowLocksResponseElement& other611) { + lockid = other611.lockid; + dbname = other611.dbname; + tablename = other611.tablename; + partname = other611.partname; + state = other611.state; + type = other611.type; + txnid = other611.txnid; + lastheartbeat = other611.lastheartbeat; + acquiredat = other611.acquiredat; + user = other611.user; + hostname = other611.hostname; + heartbeatCount = other611.heartbeatCount; + agentInfo = other611.agentInfo; + blockedByExtId = other611.blockedByExtId; + blockedByIntId = other611.blockedByIntId; + lockIdInternal = other611.lockIdInternal; + __isset = other611.__isset; +} +ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksResponseElement& other612) { + lockid = other612.lockid; + dbname = other612.dbname; + tablename = other612.tablename; + partname = other612.partname; + state = other612.state; + type = other612.type; + txnid = other612.txnid; + lastheartbeat = other612.lastheartbeat; + acquiredat = other612.acquiredat; + user = other612.user; + hostname = other612.hostname; + heartbeatCount = other612.heartbeatCount; + agentInfo = other612.agentInfo; + blockedByExtId = other612.blockedByExtId; + blockedByIntId = other612.blockedByIntId; + lockIdInternal = other612.lockIdInternal; + __isset = other612.__isset; + return *this; +} +void ShowLocksResponseElement::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ShowLocksResponseElement("; + out << "lockid=" << to_string(lockid); + out << ", " << "dbname=" << to_string(dbname); + out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "")); + out << ", " << "partname="; (__isset.partname ? (out << to_string(partname)) : (out << "")); + out << ", " << "state=" << to_string(state); + out << ", " << "type=" << to_string(type); + out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "")); + out << ", " << "lastheartbeat=" << to_string(lastheartbeat); + out << ", " << "acquiredat="; (__isset.acquiredat ? (out << to_string(acquiredat)) : (out << "")); + out << ", " << "user=" << to_string(user); + out << ", " << "hostname=" << to_string(hostname); + out << ", " << "heartbeatCount="; (__isset.heartbeatCount ? (out << to_string(heartbeatCount)) : (out << "")); + out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "")); + out << ", " << "blockedByExtId="; (__isset.blockedByExtId ? (out << to_string(blockedByExtId)) : (out << "")); + out << ", " << "blockedByIntId="; (__isset.blockedByIntId ? (out << to_string(blockedByIntId)) : (out << "")); + out << ", " << "lockIdInternal="; (__isset.lockIdInternal ? (out << to_string(lockIdInternal)) : (out << "")); + out << ")"; +} + + +ShowLocksResponse::~ShowLocksResponse() throw() { +} + + +void ShowLocksResponse::__set_locks(const std::vector & val) { + this->locks = val; +} + +uint32_t ShowLocksResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->locks.clear(); + uint32_t _size613; + ::apache::thrift::protocol::TType _etype616; + xfer += iprot->readListBegin(_etype616, _size613); + this->locks.resize(_size613); + uint32_t _i617; + for (_i617 = 0; _i617 < _size613; ++_i617) + { + xfer += this->locks[_i617].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.locks = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ShowLocksResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ShowLocksResponse"); + + xfer += oprot->writeFieldBegin("locks", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->locks.size())); + std::vector ::const_iterator _iter618; + for (_iter618 = this->locks.begin(); _iter618 != this->locks.end(); ++_iter618) + { + xfer += (*_iter618).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ShowLocksResponse &a, ShowLocksResponse &b) { + using ::std::swap; + swap(a.locks, b.locks); + swap(a.__isset, b.__isset); +} + +ShowLocksResponse::ShowLocksResponse(const ShowLocksResponse& other619) { + locks = other619.locks; + __isset = other619.__isset; +} +ShowLocksResponse& ShowLocksResponse::operator=(const ShowLocksResponse& other620) { + locks = other620.locks; + __isset = other620.__isset; + return *this; +} +void ShowLocksResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ShowLocksResponse("; + out << "locks=" << to_string(locks); + out << ")"; +} + + +HeartbeatRequest::~HeartbeatRequest() throw() { +} + + +void HeartbeatRequest::__set_lockid(const int64_t val) { + this->lockid = val; +__isset.lockid = true; +} + +void HeartbeatRequest::__set_txnid(const int64_t val) { + this->txnid = val; +__isset.txnid = true; +} + +uint32_t HeartbeatRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lockid); + this->__isset.lockid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->txnid); + this->__isset.txnid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t HeartbeatRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("HeartbeatRequest"); + + if (this->__isset.lockid) { + xfer += oprot->writeFieldBegin("lockid", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->lockid); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.txnid) { + xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->txnid); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(HeartbeatRequest &a, HeartbeatRequest &b) { + using ::std::swap; + swap(a.lockid, b.lockid); + swap(a.txnid, b.txnid); + swap(a.__isset, b.__isset); +} + +HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& other621) { + lockid = other621.lockid; + txnid = other621.txnid; + __isset = other621.__isset; +} +HeartbeatRequest& HeartbeatRequest::operator=(const HeartbeatRequest& other622) { + lockid = other622.lockid; + txnid = other622.txnid; + __isset = other622.__isset; + return *this; +} +void HeartbeatRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "HeartbeatRequest("; + out << "lockid="; (__isset.lockid ? (out << to_string(lockid)) : (out << "")); + out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "")); + out << ")"; +} + + +HeartbeatTxnRangeRequest::~HeartbeatTxnRangeRequest() throw() { +} + + +void HeartbeatTxnRangeRequest::__set_min(const int64_t val) { + this->min = val; +} + +void HeartbeatTxnRangeRequest::__set_max(const int64_t val) { + this->max = val; +} + +uint32_t HeartbeatTxnRangeRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_min = false; + bool isset_max = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->min); + isset_min = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->max); + isset_max = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_min) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_max) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t HeartbeatTxnRangeRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("HeartbeatTxnRangeRequest"); + + xfer += oprot->writeFieldBegin("min", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->min); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("max", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->max); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(HeartbeatTxnRangeRequest &a, HeartbeatTxnRangeRequest &b) { + using ::std::swap; + swap(a.min, b.min); + swap(a.max, b.max); +} + +HeartbeatTxnRangeRequest::HeartbeatTxnRangeRequest(const HeartbeatTxnRangeRequest& other623) { + min = other623.min; + max = other623.max; +} +HeartbeatTxnRangeRequest& HeartbeatTxnRangeRequest::operator=(const HeartbeatTxnRangeRequest& other624) { + min = other624.min; + max = other624.max; + return *this; +} +void HeartbeatTxnRangeRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "HeartbeatTxnRangeRequest("; + out << "min=" << to_string(min); + out << ", " << "max=" << to_string(max); + out << ")"; +} + + +HeartbeatTxnRangeResponse::~HeartbeatTxnRangeResponse() throw() { +} + + +void HeartbeatTxnRangeResponse::__set_aborted(const std::set & val) { + this->aborted = val; +} + +void HeartbeatTxnRangeResponse::__set_nosuch(const std::set & val) { + this->nosuch = val; +} + +uint32_t HeartbeatTxnRangeResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_aborted = false; + bool isset_nosuch = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_SET) { + { + this->aborted.clear(); + uint32_t _size625; + ::apache::thrift::protocol::TType _etype628; + xfer += iprot->readSetBegin(_etype628, _size625); + uint32_t _i629; + for (_i629 = 0; _i629 < _size625; ++_i629) + { + int64_t _elem630; + xfer += iprot->readI64(_elem630); + this->aborted.insert(_elem630); + } + xfer += iprot->readSetEnd(); + } + isset_aborted = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_SET) { + { + this->nosuch.clear(); + uint32_t _size631; + ::apache::thrift::protocol::TType _etype634; + xfer += iprot->readSetBegin(_etype634, _size631); + uint32_t _i635; + for (_i635 = 0; _i635 < _size631; ++_i635) + { + int64_t _elem636; + xfer += iprot->readI64(_elem636); + this->nosuch.insert(_elem636); + } + xfer += iprot->readSetEnd(); + } + isset_nosuch = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_aborted) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_nosuch) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t HeartbeatTxnRangeResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("HeartbeatTxnRangeResponse"); + + xfer += oprot->writeFieldBegin("aborted", ::apache::thrift::protocol::T_SET, 1); + { + xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast(this->aborted.size())); + std::set ::const_iterator _iter637; + for (_iter637 = this->aborted.begin(); _iter637 != this->aborted.end(); ++_iter637) + { + xfer += oprot->writeI64((*_iter637)); + } + xfer += oprot->writeSetEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("nosuch", ::apache::thrift::protocol::T_SET, 2); + { + xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast(this->nosuch.size())); + std::set ::const_iterator _iter638; + for (_iter638 = this->nosuch.begin(); _iter638 != this->nosuch.end(); ++_iter638) + { + xfer += oprot->writeI64((*_iter638)); + } + xfer += oprot->writeSetEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(HeartbeatTxnRangeResponse &a, HeartbeatTxnRangeResponse &b) { + using ::std::swap; + swap(a.aborted, b.aborted); + swap(a.nosuch, b.nosuch); +} + +HeartbeatTxnRangeResponse::HeartbeatTxnRangeResponse(const HeartbeatTxnRangeResponse& other639) { + aborted = other639.aborted; + nosuch = other639.nosuch; +} +HeartbeatTxnRangeResponse& HeartbeatTxnRangeResponse::operator=(const HeartbeatTxnRangeResponse& other640) { + aborted = other640.aborted; + nosuch = other640.nosuch; + return *this; +} +void HeartbeatTxnRangeResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "HeartbeatTxnRangeResponse("; + out << "aborted=" << to_string(aborted); + out << ", " << "nosuch=" << to_string(nosuch); + out << ")"; +} + + +CompactionRequest::~CompactionRequest() throw() { +} + + +void CompactionRequest::__set_dbname(const std::string& val) { + this->dbname = val; +} + +void CompactionRequest::__set_tablename(const std::string& val) { + this->tablename = val; +} + +void CompactionRequest::__set_partitionname(const std::string& val) { + this->partitionname = val; +__isset.partitionname = true; +} + +void CompactionRequest::__set_type(const CompactionType::type val) { + this->type = val; +} + +void CompactionRequest::__set_runas(const std::string& val) { + this->runas = val; +__isset.runas = true; +} + +void CompactionRequest::__set_properties(const std::map & val) { + this->properties = val; +__isset.properties = true; +} + +uint32_t CompactionRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dbname = false; + bool isset_tablename = false; + bool isset_type = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + isset_dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tablename); + isset_tablename = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->partitionname); + this->__isset.partitionname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast641; + xfer += iprot->readI32(ecast641); + this->type = (CompactionType::type)ecast641; + isset_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->runas); + this->__isset.runas = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->properties.clear(); + uint32_t _size642; + ::apache::thrift::protocol::TType _ktype643; + ::apache::thrift::protocol::TType _vtype644; + xfer += iprot->readMapBegin(_ktype643, _vtype644, _size642); + uint32_t _i646; + for (_i646 = 0; _i646 < _size642; ++_i646) + { + std::string _key647; + xfer += iprot->readString(_key647); + std::string& _val648 = this->properties[_key647]; + xfer += iprot->readString(_val648); + } + xfer += iprot->readMapEnd(); + } + this->__isset.properties = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbname) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tablename) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_type) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t CompactionRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CompactionRequest"); + + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbname); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tablename); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.partitionname) { + xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->partitionname); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.runas) { + xfer += oprot->writeFieldBegin("runas", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->runas); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.properties) { + xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 6); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->properties.size())); + std::map ::const_iterator _iter649; + for (_iter649 = this->properties.begin(); _iter649 != this->properties.end(); ++_iter649) + { + xfer += oprot->writeString(_iter649->first); + xfer += oprot->writeString(_iter649->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CompactionRequest &a, CompactionRequest &b) { + using ::std::swap; + swap(a.dbname, b.dbname); + swap(a.tablename, b.tablename); + swap(a.partitionname, b.partitionname); + swap(a.type, b.type); + swap(a.runas, b.runas); + swap(a.properties, b.properties); + swap(a.__isset, b.__isset); +} + +CompactionRequest::CompactionRequest(const CompactionRequest& other650) { + dbname = other650.dbname; + tablename = other650.tablename; + partitionname = other650.partitionname; + type = other650.type; + runas = other650.runas; + properties = other650.properties; + __isset = other650.__isset; +} +CompactionRequest& CompactionRequest::operator=(const CompactionRequest& other651) { + dbname = other651.dbname; + tablename = other651.tablename; + partitionname = other651.partitionname; + type = other651.type; + runas = other651.runas; + properties = other651.properties; + __isset = other651.__isset; + return *this; +} +void CompactionRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CompactionRequest("; + out << "dbname=" << to_string(dbname); + out << ", " << "tablename=" << to_string(tablename); + out << ", " << "partitionname="; (__isset.partitionname ? (out << to_string(partitionname)) : (out << "")); + out << ", " << "type=" << to_string(type); + out << ", " << "runas="; (__isset.runas ? (out << to_string(runas)) : (out << "")); + out << ", " << "properties="; (__isset.properties ? (out << to_string(properties)) : (out << "")); + out << ")"; +} + + +CompactionResponse::~CompactionResponse() throw() { +} + + +void CompactionResponse::__set_id(const int64_t val) { + this->id = val; +} + +void CompactionResponse::__set_state(const std::string& val) { + this->state = val; +} + +void CompactionResponse::__set_accepted(const bool val) { + this->accepted = val; +} + +uint32_t CompactionResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_id = false; + bool isset_state = false; + bool isset_accepted = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->id); + isset_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->state); + isset_state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->accepted); + isset_accepted = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_id) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_state) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_accepted) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t CompactionResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CompactionResponse"); + + xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->id); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->state); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("accepted", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->accepted); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CompactionResponse &a, CompactionResponse &b) { + using ::std::swap; + swap(a.id, b.id); + swap(a.state, b.state); + swap(a.accepted, b.accepted); +} + +CompactionResponse::CompactionResponse(const CompactionResponse& other652) { + id = other652.id; + state = other652.state; + accepted = other652.accepted; +} +CompactionResponse& CompactionResponse::operator=(const CompactionResponse& other653) { + id = other653.id; + state = other653.state; + accepted = other653.accepted; + return *this; +} +void CompactionResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CompactionResponse("; + out << "id=" << to_string(id); + out << ", " << "state=" << to_string(state); + out << ", " << "accepted=" << to_string(accepted); + out << ")"; +} + + +ShowCompactRequest::~ShowCompactRequest() throw() { +} + + +uint32_t ShowCompactRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ShowCompactRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ShowCompactRequest"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ShowCompactRequest &a, ShowCompactRequest &b) { + using ::std::swap; + (void) a; + (void) b; +} + +ShowCompactRequest::ShowCompactRequest(const ShowCompactRequest& other654) { + (void) other654; +} +ShowCompactRequest& ShowCompactRequest::operator=(const ShowCompactRequest& other655) { + (void) other655; + return *this; +} +void ShowCompactRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ShowCompactRequest("; + out << ")"; +} + + +ShowCompactResponseElement::~ShowCompactResponseElement() throw() { +} + + +void ShowCompactResponseElement::__set_dbname(const std::string& val) { + this->dbname = val; +} + +void ShowCompactResponseElement::__set_tablename(const std::string& val) { + this->tablename = val; +} + +void ShowCompactResponseElement::__set_partitionname(const std::string& val) { + this->partitionname = val; +__isset.partitionname = true; +} + +void ShowCompactResponseElement::__set_type(const CompactionType::type val) { + this->type = val; +} + +void ShowCompactResponseElement::__set_state(const std::string& val) { + this->state = val; +} + +void ShowCompactResponseElement::__set_workerid(const std::string& val) { + this->workerid = val; +__isset.workerid = true; +} + +void ShowCompactResponseElement::__set_start(const int64_t val) { + this->start = val; +__isset.start = true; +} + +void ShowCompactResponseElement::__set_runAs(const std::string& val) { + this->runAs = val; +__isset.runAs = true; +} + +void ShowCompactResponseElement::__set_hightestTxnId(const int64_t val) { + this->hightestTxnId = val; +__isset.hightestTxnId = true; +} + +void ShowCompactResponseElement::__set_metaInfo(const std::string& val) { + this->metaInfo = val; +__isset.metaInfo = true; +} + +void ShowCompactResponseElement::__set_endTime(const int64_t val) { + this->endTime = val; +__isset.endTime = true; +} + +void ShowCompactResponseElement::__set_hadoopJobId(const std::string& val) { + this->hadoopJobId = val; +__isset.hadoopJobId = true; +} + +void ShowCompactResponseElement::__set_id(const int64_t val) { + this->id = val; +__isset.id = true; +} + +uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dbname = false; + bool isset_tablename = false; + bool isset_type = false; + bool isset_state = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + isset_dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tablename); + isset_tablename = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->partitionname); + this->__isset.partitionname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast656; + xfer += iprot->readI32(ecast656); + this->type = (CompactionType::type)ecast656; + isset_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->state); + isset_state = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->workerid); + this->__isset.workerid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->start); + this->__isset.start = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->runAs); + this->__isset.runAs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->hightestTxnId); + this->__isset.hightestTxnId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->metaInfo); + this->__isset.metaInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->endTime); + this->__isset.endTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hadoopJobId); + this->__isset.hadoopJobId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 13: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->id); + this->__isset.id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbname) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tablename) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_type) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_state) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t ShowCompactResponseElement::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ShowCompactResponseElement"); + + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbname); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tablename); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.partitionname) { + xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->partitionname); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->state); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.workerid) { + xfer += oprot->writeFieldBegin("workerid", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->workerid); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.start) { + xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64(this->start); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.runAs) { + xfer += oprot->writeFieldBegin("runAs", ::apache::thrift::protocol::T_STRING, 8); + xfer += oprot->writeString(this->runAs); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.hightestTxnId) { + xfer += oprot->writeFieldBegin("hightestTxnId", ::apache::thrift::protocol::T_I64, 9); + xfer += oprot->writeI64(this->hightestTxnId); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.metaInfo) { + xfer += oprot->writeFieldBegin("metaInfo", ::apache::thrift::protocol::T_STRING, 10); + xfer += oprot->writeString(this->metaInfo); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.endTime) { + xfer += oprot->writeFieldBegin("endTime", ::apache::thrift::protocol::T_I64, 11); + xfer += oprot->writeI64(this->endTime); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.hadoopJobId) { + xfer += oprot->writeFieldBegin("hadoopJobId", ::apache::thrift::protocol::T_STRING, 12); + xfer += oprot->writeString(this->hadoopJobId); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.id) { + xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I64, 13); + xfer += oprot->writeI64(this->id); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ShowCompactResponseElement &a, ShowCompactResponseElement &b) { + using ::std::swap; + swap(a.dbname, b.dbname); + swap(a.tablename, b.tablename); + swap(a.partitionname, b.partitionname); + swap(a.type, b.type); + swap(a.state, b.state); + swap(a.workerid, b.workerid); + swap(a.start, b.start); + swap(a.runAs, b.runAs); + swap(a.hightestTxnId, b.hightestTxnId); + swap(a.metaInfo, b.metaInfo); + swap(a.endTime, b.endTime); + swap(a.hadoopJobId, b.hadoopJobId); + swap(a.id, b.id); + swap(a.__isset, b.__isset); +} + +ShowCompactResponseElement::ShowCompactResponseElement(const ShowCompactResponseElement& other657) { + dbname = other657.dbname; + tablename = other657.tablename; + partitionname = other657.partitionname; + type = other657.type; + state = other657.state; + workerid = other657.workerid; + start = other657.start; + runAs = other657.runAs; + hightestTxnId = other657.hightestTxnId; + metaInfo = other657.metaInfo; + endTime = other657.endTime; + hadoopJobId = other657.hadoopJobId; + id = other657.id; + __isset = other657.__isset; +} +ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowCompactResponseElement& other658) { + dbname = other658.dbname; + tablename = other658.tablename; + partitionname = other658.partitionname; + type = other658.type; + state = other658.state; + workerid = other658.workerid; + start = other658.start; + runAs = other658.runAs; + hightestTxnId = other658.hightestTxnId; + metaInfo = other658.metaInfo; + endTime = other658.endTime; + hadoopJobId = other658.hadoopJobId; + id = other658.id; + __isset = other658.__isset; + return *this; +} +void ShowCompactResponseElement::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ShowCompactResponseElement("; + out << "dbname=" << to_string(dbname); + out << ", " << "tablename=" << to_string(tablename); + out << ", " << "partitionname="; (__isset.partitionname ? (out << to_string(partitionname)) : (out << "")); + out << ", " << "type=" << to_string(type); + out << ", " << "state=" << to_string(state); + out << ", " << "workerid="; (__isset.workerid ? (out << to_string(workerid)) : (out << "")); + out << ", " << "start="; (__isset.start ? (out << to_string(start)) : (out << "")); + out << ", " << "runAs="; (__isset.runAs ? (out << to_string(runAs)) : (out << "")); + out << ", " << "hightestTxnId="; (__isset.hightestTxnId ? (out << to_string(hightestTxnId)) : (out << "")); + out << ", " << "metaInfo="; (__isset.metaInfo ? (out << to_string(metaInfo)) : (out << "")); + out << ", " << "endTime="; (__isset.endTime ? (out << to_string(endTime)) : (out << "")); + out << ", " << "hadoopJobId="; (__isset.hadoopJobId ? (out << to_string(hadoopJobId)) : (out << "")); + out << ", " << "id="; (__isset.id ? (out << to_string(id)) : (out << "")); + out << ")"; +} + + +ShowCompactResponse::~ShowCompactResponse() throw() { +} + + +void ShowCompactResponse::__set_compacts(const std::vector & val) { + this->compacts = val; +} + +uint32_t ShowCompactResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_compacts = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->compacts.clear(); + uint32_t _size659; + ::apache::thrift::protocol::TType _etype662; + xfer += iprot->readListBegin(_etype662, _size659); + this->compacts.resize(_size659); + uint32_t _i663; + for (_i663 = 0; _i663 < _size659; ++_i663) + { + xfer += this->compacts[_i663].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_compacts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_compacts) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t ShowCompactResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ShowCompactResponse"); + + xfer += oprot->writeFieldBegin("compacts", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->compacts.size())); + std::vector ::const_iterator _iter664; + for (_iter664 = this->compacts.begin(); _iter664 != this->compacts.end(); ++_iter664) + { + xfer += (*_iter664).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ShowCompactResponse &a, ShowCompactResponse &b) { + using ::std::swap; + swap(a.compacts, b.compacts); +} + +ShowCompactResponse::ShowCompactResponse(const ShowCompactResponse& other665) { + compacts = other665.compacts; +} +ShowCompactResponse& ShowCompactResponse::operator=(const ShowCompactResponse& other666) { + compacts = other666.compacts; + return *this; +} +void ShowCompactResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ShowCompactResponse("; + out << "compacts=" << to_string(compacts); + out << ")"; +} + + +AddDynamicPartitions::~AddDynamicPartitions() throw() { +} + + +void AddDynamicPartitions::__set_txnid(const int64_t val) { + this->txnid = val; +} + +void AddDynamicPartitions::__set_dbname(const std::string& val) { + this->dbname = val; +} + +void AddDynamicPartitions::__set_tablename(const std::string& val) { + this->tablename = val; +} + +void AddDynamicPartitions::__set_partitionnames(const std::vector & val) { + this->partitionnames = val; +} + +void AddDynamicPartitions::__set_operationType(const DataOperationType::type val) { + this->operationType = val; +__isset.operationType = true; +} + +uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_txnid = false; + bool isset_dbname = false; + bool isset_tablename = false; + bool isset_partitionnames = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->txnid); + isset_txnid = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbname); + isset_dbname = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tablename); + isset_tablename = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitionnames.clear(); + uint32_t _size667; + ::apache::thrift::protocol::TType _etype670; + xfer += iprot->readListBegin(_etype670, _size667); + this->partitionnames.resize(_size667); + uint32_t _i671; + for (_i671 = 0; _i671 < _size667; ++_i671) + { + xfer += iprot->readString(this->partitionnames[_i671]); + } + xfer += iprot->readListEnd(); + } + isset_partitionnames = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast672; + xfer += iprot->readI32(ecast672); + this->operationType = (DataOperationType::type)ecast672; + this->__isset.operationType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_txnid) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_dbname) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tablename) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_partitionnames) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t AddDynamicPartitions::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("AddDynamicPartitions"); + + xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->txnid); + 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("partitionnames", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->partitionnames.size())); + std::vector ::const_iterator _iter673; + for (_iter673 = this->partitionnames.begin(); _iter673 != this->partitionnames.end(); ++_iter673) + { + xfer += oprot->writeString((*_iter673)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.operationType) { + xfer += oprot->writeFieldBegin("operationType", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)this->operationType); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(AddDynamicPartitions &a, AddDynamicPartitions &b) { + using ::std::swap; + swap(a.txnid, b.txnid); + swap(a.dbname, b.dbname); + swap(a.tablename, b.tablename); + swap(a.partitionnames, b.partitionnames); + swap(a.operationType, b.operationType); + swap(a.__isset, b.__isset); +} + +AddDynamicPartitions::AddDynamicPartitions(const AddDynamicPartitions& other674) { + txnid = other674.txnid; + dbname = other674.dbname; + tablename = other674.tablename; + partitionnames = other674.partitionnames; + operationType = other674.operationType; + __isset = other674.__isset; +} +AddDynamicPartitions& AddDynamicPartitions::operator=(const AddDynamicPartitions& other675) { + txnid = other675.txnid; + dbname = other675.dbname; + tablename = other675.tablename; + partitionnames = other675.partitionnames; + operationType = other675.operationType; + __isset = other675.__isset; + return *this; +} +void AddDynamicPartitions::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "AddDynamicPartitions("; + out << "txnid=" << to_string(txnid); + out << ", " << "dbname=" << to_string(dbname); + out << ", " << "tablename=" << to_string(tablename); + out << ", " << "partitionnames=" << to_string(partitionnames); + out << ", " << "operationType="; (__isset.operationType ? (out << to_string(operationType)) : (out << "")); + out << ")"; +} + + +NotificationEventRequest::~NotificationEventRequest() throw() { +} + + +void NotificationEventRequest::__set_lastEvent(const int64_t val) { + this->lastEvent = val; +} + +void NotificationEventRequest::__set_maxEvents(const int32_t val) { + this->maxEvents = val; +__isset.maxEvents = true; +} + +uint32_t NotificationEventRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_lastEvent = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lastEvent); + isset_lastEvent = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->maxEvents); + this->__isset.maxEvents = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_lastEvent) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t NotificationEventRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("NotificationEventRequest"); + + xfer += oprot->writeFieldBegin("lastEvent", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->lastEvent); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.maxEvents) { + xfer += oprot->writeFieldBegin("maxEvents", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->maxEvents); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(NotificationEventRequest &a, NotificationEventRequest &b) { + using ::std::swap; + swap(a.lastEvent, b.lastEvent); + swap(a.maxEvents, b.maxEvents); + swap(a.__isset, b.__isset); +} + +NotificationEventRequest::NotificationEventRequest(const NotificationEventRequest& other676) { + lastEvent = other676.lastEvent; + maxEvents = other676.maxEvents; + __isset = other676.__isset; +} +NotificationEventRequest& NotificationEventRequest::operator=(const NotificationEventRequest& other677) { + lastEvent = other677.lastEvent; + maxEvents = other677.maxEvents; + __isset = other677.__isset; + return *this; +} +void NotificationEventRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NotificationEventRequest("; + out << "lastEvent=" << to_string(lastEvent); + out << ", " << "maxEvents="; (__isset.maxEvents ? (out << to_string(maxEvents)) : (out << "")); + out << ")"; +} + + +NotificationEvent::~NotificationEvent() throw() { +} + + +void NotificationEvent::__set_eventId(const int64_t val) { + this->eventId = val; +} + +void NotificationEvent::__set_eventTime(const int32_t val) { + this->eventTime = val; +} + +void NotificationEvent::__set_eventType(const std::string& val) { + this->eventType = val; +} + +void NotificationEvent::__set_dbName(const std::string& val) { + this->dbName = val; +__isset.dbName = true; +} + +void NotificationEvent::__set_tableName(const std::string& val) { + this->tableName = val; +__isset.tableName = true; +} + +void NotificationEvent::__set_message(const std::string& val) { + this->message = val; +} + +void NotificationEvent::__set_messageFormat(const std::string& val) { + this->messageFormat = val; +__isset.messageFormat = true; +} + +uint32_t NotificationEvent::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_eventId = false; + bool isset_eventTime = false; + bool isset_eventType = false; + bool isset_message = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->eventId); + isset_eventId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->eventTime); + isset_eventTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->eventType); + isset_eventType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + isset_message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->messageFormat); + this->__isset.messageFormat = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_eventId) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_eventTime) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_eventType) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_message) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t NotificationEvent::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("NotificationEvent"); + + xfer += oprot->writeFieldBegin("eventId", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->eventId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("eventTime", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->eventTime); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("eventType", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->eventType); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.dbName) { + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.tableName) { + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->message); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.messageFormat) { + xfer += oprot->writeFieldBegin("messageFormat", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->messageFormat); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(NotificationEvent &a, NotificationEvent &b) { + using ::std::swap; + swap(a.eventId, b.eventId); + swap(a.eventTime, b.eventTime); + swap(a.eventType, b.eventType); + swap(a.dbName, b.dbName); + swap(a.tableName, b.tableName); + swap(a.message, b.message); + swap(a.messageFormat, b.messageFormat); + swap(a.__isset, b.__isset); +} + +NotificationEvent::NotificationEvent(const NotificationEvent& other678) { + eventId = other678.eventId; + eventTime = other678.eventTime; + eventType = other678.eventType; + dbName = other678.dbName; + tableName = other678.tableName; + message = other678.message; + messageFormat = other678.messageFormat; + __isset = other678.__isset; +} +NotificationEvent& NotificationEvent::operator=(const NotificationEvent& other679) { + eventId = other679.eventId; + eventTime = other679.eventTime; + eventType = other679.eventType; + dbName = other679.dbName; + tableName = other679.tableName; + message = other679.message; + messageFormat = other679.messageFormat; + __isset = other679.__isset; + return *this; +} +void NotificationEvent::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NotificationEvent("; + out << "eventId=" << to_string(eventId); + out << ", " << "eventTime=" << to_string(eventTime); + out << ", " << "eventType=" << to_string(eventType); + out << ", " << "dbName="; (__isset.dbName ? (out << to_string(dbName)) : (out << "")); + out << ", " << "tableName="; (__isset.tableName ? (out << to_string(tableName)) : (out << "")); + out << ", " << "message=" << to_string(message); + out << ", " << "messageFormat="; (__isset.messageFormat ? (out << to_string(messageFormat)) : (out << "")); + out << ")"; +} + + +NotificationEventResponse::~NotificationEventResponse() throw() { +} + + +void NotificationEventResponse::__set_events(const std::vector & val) { + this->events = val; +} + +uint32_t NotificationEventResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_events = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->events.clear(); + uint32_t _size680; + ::apache::thrift::protocol::TType _etype683; + xfer += iprot->readListBegin(_etype683, _size680); + this->events.resize(_size680); + uint32_t _i684; + for (_i684 = 0; _i684 < _size680; ++_i684) + { + xfer += this->events[_i684].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_events = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_events) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t NotificationEventResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("NotificationEventResponse"); + + xfer += oprot->writeFieldBegin("events", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->events.size())); + std::vector ::const_iterator _iter685; + for (_iter685 = this->events.begin(); _iter685 != this->events.end(); ++_iter685) + { + xfer += (*_iter685).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(NotificationEventResponse &a, NotificationEventResponse &b) { + using ::std::swap; + swap(a.events, b.events); +} + +NotificationEventResponse::NotificationEventResponse(const NotificationEventResponse& other686) { + events = other686.events; +} +NotificationEventResponse& NotificationEventResponse::operator=(const NotificationEventResponse& other687) { + events = other687.events; + return *this; +} +void NotificationEventResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NotificationEventResponse("; + out << "events=" << to_string(events); + out << ")"; +} + + +CurrentNotificationEventId::~CurrentNotificationEventId() throw() { +} + + +void CurrentNotificationEventId::__set_eventId(const int64_t val) { + this->eventId = val; +} + +uint32_t CurrentNotificationEventId::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_eventId = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->eventId); + isset_eventId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_eventId) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t CurrentNotificationEventId::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CurrentNotificationEventId"); + + xfer += oprot->writeFieldBegin("eventId", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->eventId); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CurrentNotificationEventId &a, CurrentNotificationEventId &b) { + using ::std::swap; + swap(a.eventId, b.eventId); +} + +CurrentNotificationEventId::CurrentNotificationEventId(const CurrentNotificationEventId& other688) { + eventId = other688.eventId; +} +CurrentNotificationEventId& CurrentNotificationEventId::operator=(const CurrentNotificationEventId& other689) { + eventId = other689.eventId; + return *this; +} +void CurrentNotificationEventId::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CurrentNotificationEventId("; + out << "eventId=" << to_string(eventId); + out << ")"; +} + + +InsertEventRequestData::~InsertEventRequestData() throw() { +} + + +void InsertEventRequestData::__set_replace(const bool val) { + this->replace = val; +__isset.replace = true; +} + +void InsertEventRequestData::__set_filesAdded(const std::vector & val) { + this->filesAdded = val; +} + +void InsertEventRequestData::__set_filesAddedChecksum(const std::vector & val) { + this->filesAddedChecksum = val; +__isset.filesAddedChecksum = true; +} + +uint32_t InsertEventRequestData::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_filesAdded = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->replace); + this->__isset.replace = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->filesAdded.clear(); + uint32_t _size690; + ::apache::thrift::protocol::TType _etype693; + xfer += iprot->readListBegin(_etype693, _size690); + this->filesAdded.resize(_size690); + uint32_t _i694; + for (_i694 = 0; _i694 < _size690; ++_i694) + { + xfer += iprot->readString(this->filesAdded[_i694]); + } + xfer += iprot->readListEnd(); + } + isset_filesAdded = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->filesAddedChecksum.clear(); + uint32_t _size695; + ::apache::thrift::protocol::TType _etype698; + xfer += iprot->readListBegin(_etype698, _size695); + this->filesAddedChecksum.resize(_size695); + uint32_t _i699; + for (_i699 = 0; _i699 < _size695; ++_i699) + { + xfer += iprot->readString(this->filesAddedChecksum[_i699]); + } + xfer += iprot->readListEnd(); + } + this->__isset.filesAddedChecksum = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_filesAdded) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t InsertEventRequestData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("InsertEventRequestData"); + + if (this->__isset.replace) { + xfer += oprot->writeFieldBegin("replace", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->replace); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("filesAdded", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->filesAdded.size())); + std::vector ::const_iterator _iter700; + for (_iter700 = this->filesAdded.begin(); _iter700 != this->filesAdded.end(); ++_iter700) + { + xfer += oprot->writeString((*_iter700)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.filesAddedChecksum) { + xfer += oprot->writeFieldBegin("filesAddedChecksum", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->filesAddedChecksum.size())); + std::vector ::const_iterator _iter701; + for (_iter701 = this->filesAddedChecksum.begin(); _iter701 != this->filesAddedChecksum.end(); ++_iter701) + { + xfer += oprot->writeString((*_iter701)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(InsertEventRequestData &a, InsertEventRequestData &b) { + using ::std::swap; + swap(a.replace, b.replace); + swap(a.filesAdded, b.filesAdded); + swap(a.filesAddedChecksum, b.filesAddedChecksum); + swap(a.__isset, b.__isset); +} + +InsertEventRequestData::InsertEventRequestData(const InsertEventRequestData& other702) { + replace = other702.replace; + filesAdded = other702.filesAdded; + filesAddedChecksum = other702.filesAddedChecksum; + __isset = other702.__isset; +} +InsertEventRequestData& InsertEventRequestData::operator=(const InsertEventRequestData& other703) { + replace = other703.replace; + filesAdded = other703.filesAdded; + filesAddedChecksum = other703.filesAddedChecksum; + __isset = other703.__isset; + return *this; +} +void InsertEventRequestData::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "InsertEventRequestData("; + out << "replace="; (__isset.replace ? (out << to_string(replace)) : (out << "")); + out << ", " << "filesAdded=" << to_string(filesAdded); + out << ", " << "filesAddedChecksum="; (__isset.filesAddedChecksum ? (out << to_string(filesAddedChecksum)) : (out << "")); + out << ")"; +} + + +FireEventRequestData::~FireEventRequestData() throw() { +} + + +void FireEventRequestData::__set_insertData(const InsertEventRequestData& val) { + this->insertData = val; +} + +uint32_t FireEventRequestData::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->insertData.read(iprot); + this->__isset.insertData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FireEventRequestData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FireEventRequestData"); + + xfer += oprot->writeFieldBegin("insertData", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->insertData.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(FireEventRequestData &a, FireEventRequestData &b) { + using ::std::swap; + swap(a.insertData, b.insertData); + swap(a.__isset, b.__isset); +} + +FireEventRequestData::FireEventRequestData(const FireEventRequestData& other704) { + insertData = other704.insertData; + __isset = other704.__isset; +} +FireEventRequestData& FireEventRequestData::operator=(const FireEventRequestData& other705) { + insertData = other705.insertData; + __isset = other705.__isset; + return *this; +} +void FireEventRequestData::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "FireEventRequestData("; + out << "insertData=" << to_string(insertData); + out << ")"; +} + + +FireEventRequest::~FireEventRequest() throw() { +} + + +void FireEventRequest::__set_successful(const bool val) { + this->successful = val; +} + +void FireEventRequest::__set_data(const FireEventRequestData& val) { + this->data = val; +} + +void FireEventRequest::__set_dbName(const std::string& val) { + this->dbName = val; +__isset.dbName = true; +} + +void FireEventRequest::__set_tableName(const std::string& val) { + this->tableName = val; +__isset.tableName = true; +} + +void FireEventRequest::__set_partitionVals(const std::vector & val) { + this->partitionVals = val; +__isset.partitionVals = true; +} + +uint32_t FireEventRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_successful = false; + bool isset_data = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->successful); + isset_successful = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->data.read(iprot); + isset_data = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitionVals.clear(); + uint32_t _size706; + ::apache::thrift::protocol::TType _etype709; + xfer += iprot->readListBegin(_etype709, _size706); + this->partitionVals.resize(_size706); + uint32_t _i710; + for (_i710 = 0; _i710 < _size706; ++_i710) + { + xfer += iprot->readString(this->partitionVals[_i710]); + } + xfer += iprot->readListEnd(); + } + this->__isset.partitionVals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_successful) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_data) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t FireEventRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FireEventRequest"); + + xfer += oprot->writeFieldBegin("successful", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->successful); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->data.write(oprot); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.dbName) { + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.tableName) { + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.partitionVals) { + xfer += oprot->writeFieldBegin("partitionVals", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->partitionVals.size())); + std::vector ::const_iterator _iter711; + for (_iter711 = this->partitionVals.begin(); _iter711 != this->partitionVals.end(); ++_iter711) + { + xfer += oprot->writeString((*_iter711)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(FireEventRequest &a, FireEventRequest &b) { + using ::std::swap; + swap(a.successful, b.successful); + swap(a.data, b.data); + swap(a.dbName, b.dbName); + swap(a.tableName, b.tableName); + swap(a.partitionVals, b.partitionVals); + swap(a.__isset, b.__isset); +} + +FireEventRequest::FireEventRequest(const FireEventRequest& other712) { + successful = other712.successful; + data = other712.data; + dbName = other712.dbName; + tableName = other712.tableName; + partitionVals = other712.partitionVals; + __isset = other712.__isset; +} +FireEventRequest& FireEventRequest::operator=(const FireEventRequest& other713) { + successful = other713.successful; + data = other713.data; + dbName = other713.dbName; + tableName = other713.tableName; + partitionVals = other713.partitionVals; + __isset = other713.__isset; + return *this; +} +void FireEventRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "FireEventRequest("; + out << "successful=" << to_string(successful); + out << ", " << "data=" << to_string(data); + out << ", " << "dbName="; (__isset.dbName ? (out << to_string(dbName)) : (out << "")); + out << ", " << "tableName="; (__isset.tableName ? (out << to_string(tableName)) : (out << "")); + out << ", " << "partitionVals="; (__isset.partitionVals ? (out << to_string(partitionVals)) : (out << "")); + out << ")"; +} + + +FireEventResponse::~FireEventResponse() throw() { +} + + +uint32_t FireEventResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t FireEventResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("FireEventResponse"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(FireEventResponse &a, FireEventResponse &b) { + using ::std::swap; + (void) a; + (void) b; +} + +FireEventResponse::FireEventResponse(const FireEventResponse& other714) { + (void) other714; +} +FireEventResponse& FireEventResponse::operator=(const FireEventResponse& other715) { + (void) other715; + return *this; +} +void FireEventResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "FireEventResponse("; + out << ")"; +} + + +MetadataPpdResult::~MetadataPpdResult() throw() { +} + + +void MetadataPpdResult::__set_metadata(const std::string& val) { + this->metadata = val; +__isset.metadata = true; +} + +void MetadataPpdResult::__set_includeBitset(const std::string& val) { + this->includeBitset = val; +__isset.includeBitset = true; +} + +uint32_t MetadataPpdResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->metadata); + this->__isset.metadata = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->includeBitset); + this->__isset.includeBitset = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MetadataPpdResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("MetadataPpdResult"); + + if (this->__isset.metadata) { + xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->metadata); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.includeBitset) { + xfer += oprot->writeFieldBegin("includeBitset", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->includeBitset); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(MetadataPpdResult &a, MetadataPpdResult &b) { + using ::std::swap; + swap(a.metadata, b.metadata); + swap(a.includeBitset, b.includeBitset); + swap(a.__isset, b.__isset); +} + +MetadataPpdResult::MetadataPpdResult(const MetadataPpdResult& other716) { + metadata = other716.metadata; + includeBitset = other716.includeBitset; + __isset = other716.__isset; +} +MetadataPpdResult& MetadataPpdResult::operator=(const MetadataPpdResult& other717) { + metadata = other717.metadata; + includeBitset = other717.includeBitset; + __isset = other717.__isset; + return *this; +} +void MetadataPpdResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "MetadataPpdResult("; + out << "metadata="; (__isset.metadata ? (out << to_string(metadata)) : (out << "")); + out << ", " << "includeBitset="; (__isset.includeBitset ? (out << to_string(includeBitset)) : (out << "")); + out << ")"; +} + + +GetFileMetadataByExprResult::~GetFileMetadataByExprResult() throw() { +} + + +void GetFileMetadataByExprResult::__set_metadata(const std::map & val) { + this->metadata = val; +} + +void GetFileMetadataByExprResult::__set_isSupported(const bool val) { + this->isSupported = val; +} + +uint32_t GetFileMetadataByExprResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_metadata = false; + bool isset_isSupported = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->metadata.clear(); + uint32_t _size718; + ::apache::thrift::protocol::TType _ktype719; + ::apache::thrift::protocol::TType _vtype720; + xfer += iprot->readMapBegin(_ktype719, _vtype720, _size718); + uint32_t _i722; + for (_i722 = 0; _i722 < _size718; ++_i722) + { + int64_t _key723; + xfer += iprot->readI64(_key723); + MetadataPpdResult& _val724 = this->metadata[_key723]; + xfer += _val724.read(iprot); + } + xfer += iprot->readMapEnd(); + } + isset_metadata = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isSupported); + isset_isSupported = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_metadata) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_isSupported) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetFileMetadataByExprResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetFileMetadataByExprResult"); + + xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I64, ::apache::thrift::protocol::T_STRUCT, static_cast(this->metadata.size())); + std::map ::const_iterator _iter725; + for (_iter725 = this->metadata.begin(); _iter725 != this->metadata.end(); ++_iter725) + { + xfer += oprot->writeI64(_iter725->first); + xfer += _iter725->second.write(oprot); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("isSupported", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->isSupported); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetFileMetadataByExprResult &a, GetFileMetadataByExprResult &b) { + using ::std::swap; + swap(a.metadata, b.metadata); + swap(a.isSupported, b.isSupported); +} + +GetFileMetadataByExprResult::GetFileMetadataByExprResult(const GetFileMetadataByExprResult& other726) { + metadata = other726.metadata; + isSupported = other726.isSupported; +} +GetFileMetadataByExprResult& GetFileMetadataByExprResult::operator=(const GetFileMetadataByExprResult& other727) { + metadata = other727.metadata; + isSupported = other727.isSupported; + return *this; +} +void GetFileMetadataByExprResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetFileMetadataByExprResult("; + out << "metadata=" << to_string(metadata); + out << ", " << "isSupported=" << to_string(isSupported); + out << ")"; +} + + +GetFileMetadataByExprRequest::~GetFileMetadataByExprRequest() throw() { +} + + +void GetFileMetadataByExprRequest::__set_fileIds(const std::vector & val) { + this->fileIds = val; +} + +void GetFileMetadataByExprRequest::__set_expr(const std::string& val) { + this->expr = val; +} + +void GetFileMetadataByExprRequest::__set_doGetFooters(const bool val) { + this->doGetFooters = val; +__isset.doGetFooters = true; +} + +void GetFileMetadataByExprRequest::__set_type(const FileMetadataExprType::type val) { + this->type = val; +__isset.type = true; +} + +uint32_t GetFileMetadataByExprRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_fileIds = false; + bool isset_expr = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->fileIds.clear(); + uint32_t _size728; + ::apache::thrift::protocol::TType _etype731; + xfer += iprot->readListBegin(_etype731, _size728); + this->fileIds.resize(_size728); + uint32_t _i732; + for (_i732 = 0; _i732 < _size728; ++_i732) + { + xfer += iprot->readI64(this->fileIds[_i732]); + } + xfer += iprot->readListEnd(); + } + isset_fileIds = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->expr); + isset_expr = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->doGetFooters); + this->__isset.doGetFooters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast733; + xfer += iprot->readI32(ecast733); + this->type = (FileMetadataExprType::type)ecast733; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_fileIds) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_expr) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetFileMetadataByExprRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetFileMetadataByExprRequest"); + + xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->fileIds.size())); + std::vector ::const_iterator _iter734; + for (_iter734 = this->fileIds.begin(); _iter734 != this->fileIds.end(); ++_iter734) + { + xfer += oprot->writeI64((*_iter734)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("expr", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->expr); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.doGetFooters) { + xfer += oprot->writeFieldBegin("doGetFooters", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->doGetFooters); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.type) { + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetFileMetadataByExprRequest &a, GetFileMetadataByExprRequest &b) { + using ::std::swap; + swap(a.fileIds, b.fileIds); + swap(a.expr, b.expr); + swap(a.doGetFooters, b.doGetFooters); + swap(a.type, b.type); + swap(a.__isset, b.__isset); +} + +GetFileMetadataByExprRequest::GetFileMetadataByExprRequest(const GetFileMetadataByExprRequest& other735) { + fileIds = other735.fileIds; + expr = other735.expr; + doGetFooters = other735.doGetFooters; + type = other735.type; + __isset = other735.__isset; +} +GetFileMetadataByExprRequest& GetFileMetadataByExprRequest::operator=(const GetFileMetadataByExprRequest& other736) { + fileIds = other736.fileIds; + expr = other736.expr; + doGetFooters = other736.doGetFooters; + type = other736.type; + __isset = other736.__isset; + return *this; +} +void GetFileMetadataByExprRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetFileMetadataByExprRequest("; + out << "fileIds=" << to_string(fileIds); + out << ", " << "expr=" << to_string(expr); + out << ", " << "doGetFooters="; (__isset.doGetFooters ? (out << to_string(doGetFooters)) : (out << "")); + out << ", " << "type="; (__isset.type ? (out << to_string(type)) : (out << "")); + out << ")"; +} + + +GetFileMetadataResult::~GetFileMetadataResult() throw() { +} + + +void GetFileMetadataResult::__set_metadata(const std::map & val) { + this->metadata = val; +} + +void GetFileMetadataResult::__set_isSupported(const bool val) { + this->isSupported = val; +} + +uint32_t GetFileMetadataResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_metadata = false; + bool isset_isSupported = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->metadata.clear(); + uint32_t _size737; + ::apache::thrift::protocol::TType _ktype738; + ::apache::thrift::protocol::TType _vtype739; + xfer += iprot->readMapBegin(_ktype738, _vtype739, _size737); + uint32_t _i741; + for (_i741 = 0; _i741 < _size737; ++_i741) + { + int64_t _key742; + xfer += iprot->readI64(_key742); + std::string& _val743 = this->metadata[_key742]; + xfer += iprot->readBinary(_val743); + } + xfer += iprot->readMapEnd(); + } + isset_metadata = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isSupported); + isset_isSupported = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_metadata) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_isSupported) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetFileMetadataResult"); + + xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I64, ::apache::thrift::protocol::T_STRING, static_cast(this->metadata.size())); + std::map ::const_iterator _iter744; + for (_iter744 = this->metadata.begin(); _iter744 != this->metadata.end(); ++_iter744) + { + xfer += oprot->writeI64(_iter744->first); + xfer += oprot->writeBinary(_iter744->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("isSupported", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->isSupported); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetFileMetadataResult &a, GetFileMetadataResult &b) { + using ::std::swap; + swap(a.metadata, b.metadata); + swap(a.isSupported, b.isSupported); +} + +GetFileMetadataResult::GetFileMetadataResult(const GetFileMetadataResult& other745) { + metadata = other745.metadata; + isSupported = other745.isSupported; +} +GetFileMetadataResult& GetFileMetadataResult::operator=(const GetFileMetadataResult& other746) { + metadata = other746.metadata; + isSupported = other746.isSupported; + return *this; +} +void GetFileMetadataResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetFileMetadataResult("; + out << "metadata=" << to_string(metadata); + out << ", " << "isSupported=" << to_string(isSupported); + out << ")"; +} + + +GetFileMetadataRequest::~GetFileMetadataRequest() throw() { +} + + +void GetFileMetadataRequest::__set_fileIds(const std::vector & val) { + this->fileIds = val; +} + +uint32_t GetFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_fileIds = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->fileIds.clear(); + uint32_t _size747; + ::apache::thrift::protocol::TType _etype750; + xfer += iprot->readListBegin(_etype750, _size747); + this->fileIds.resize(_size747); + uint32_t _i751; + for (_i751 = 0; _i751 < _size747; ++_i751) + { + xfer += iprot->readI64(this->fileIds[_i751]); + } + xfer += iprot->readListEnd(); + } + isset_fileIds = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_fileIds) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetFileMetadataRequest"); + + xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->fileIds.size())); + std::vector ::const_iterator _iter752; + for (_iter752 = this->fileIds.begin(); _iter752 != this->fileIds.end(); ++_iter752) + { + xfer += oprot->writeI64((*_iter752)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetFileMetadataRequest &a, GetFileMetadataRequest &b) { + using ::std::swap; + swap(a.fileIds, b.fileIds); +} + +GetFileMetadataRequest::GetFileMetadataRequest(const GetFileMetadataRequest& other753) { + fileIds = other753.fileIds; +} +GetFileMetadataRequest& GetFileMetadataRequest::operator=(const GetFileMetadataRequest& other754) { + fileIds = other754.fileIds; + return *this; +} +void GetFileMetadataRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetFileMetadataRequest("; + out << "fileIds=" << to_string(fileIds); + out << ")"; +} + + +PutFileMetadataResult::~PutFileMetadataResult() throw() { +} + + +uint32_t PutFileMetadataResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PutFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PutFileMetadataResult"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PutFileMetadataResult &a, PutFileMetadataResult &b) { + using ::std::swap; + (void) a; + (void) b; +} + +PutFileMetadataResult::PutFileMetadataResult(const PutFileMetadataResult& other755) { + (void) other755; +} +PutFileMetadataResult& PutFileMetadataResult::operator=(const PutFileMetadataResult& other756) { + (void) other756; + return *this; +} +void PutFileMetadataResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PutFileMetadataResult("; + out << ")"; +} + + +PutFileMetadataRequest::~PutFileMetadataRequest() throw() { +} + + +void PutFileMetadataRequest::__set_fileIds(const std::vector & val) { + this->fileIds = val; +} + +void PutFileMetadataRequest::__set_metadata(const std::vector & val) { + this->metadata = val; +} + +void PutFileMetadataRequest::__set_type(const FileMetadataExprType::type val) { + this->type = val; +__isset.type = true; +} + +uint32_t PutFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_fileIds = false; + bool isset_metadata = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->fileIds.clear(); + uint32_t _size757; + ::apache::thrift::protocol::TType _etype760; + xfer += iprot->readListBegin(_etype760, _size757); + this->fileIds.resize(_size757); + uint32_t _i761; + for (_i761 = 0; _i761 < _size757; ++_i761) + { + xfer += iprot->readI64(this->fileIds[_i761]); + } + xfer += iprot->readListEnd(); + } + isset_fileIds = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->metadata.clear(); + uint32_t _size762; + ::apache::thrift::protocol::TType _etype765; + xfer += iprot->readListBegin(_etype765, _size762); + this->metadata.resize(_size762); + uint32_t _i766; + for (_i766 = 0; _i766 < _size762; ++_i766) + { + xfer += iprot->readBinary(this->metadata[_i766]); + } + xfer += iprot->readListEnd(); + } + isset_metadata = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast767; + xfer += iprot->readI32(ecast767); + this->type = (FileMetadataExprType::type)ecast767; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_fileIds) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_metadata) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t PutFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PutFileMetadataRequest"); + + xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->fileIds.size())); + std::vector ::const_iterator _iter768; + for (_iter768 = this->fileIds.begin(); _iter768 != this->fileIds.end(); ++_iter768) + { + xfer += oprot->writeI64((*_iter768)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->metadata.size())); + std::vector ::const_iterator _iter769; + for (_iter769 = this->metadata.begin(); _iter769 != this->metadata.end(); ++_iter769) + { + xfer += oprot->writeBinary((*_iter769)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + if (this->__isset.type) { + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PutFileMetadataRequest &a, PutFileMetadataRequest &b) { + using ::std::swap; + swap(a.fileIds, b.fileIds); + swap(a.metadata, b.metadata); + swap(a.type, b.type); + swap(a.__isset, b.__isset); +} + +PutFileMetadataRequest::PutFileMetadataRequest(const PutFileMetadataRequest& other770) { + fileIds = other770.fileIds; + metadata = other770.metadata; + type = other770.type; + __isset = other770.__isset; +} +PutFileMetadataRequest& PutFileMetadataRequest::operator=(const PutFileMetadataRequest& other771) { + fileIds = other771.fileIds; + metadata = other771.metadata; + type = other771.type; + __isset = other771.__isset; + return *this; +} +void PutFileMetadataRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PutFileMetadataRequest("; + out << "fileIds=" << to_string(fileIds); + out << ", " << "metadata=" << to_string(metadata); + out << ", " << "type="; (__isset.type ? (out << to_string(type)) : (out << "")); + out << ")"; +} + + +ClearFileMetadataResult::~ClearFileMetadataResult() throw() { +} + + +uint32_t ClearFileMetadataResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ClearFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClearFileMetadataResult"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ClearFileMetadataResult &a, ClearFileMetadataResult &b) { + using ::std::swap; + (void) a; + (void) b; +} + +ClearFileMetadataResult::ClearFileMetadataResult(const ClearFileMetadataResult& other772) { + (void) other772; +} +ClearFileMetadataResult& ClearFileMetadataResult::operator=(const ClearFileMetadataResult& other773) { + (void) other773; + return *this; +} +void ClearFileMetadataResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ClearFileMetadataResult("; + out << ")"; +} + + +ClearFileMetadataRequest::~ClearFileMetadataRequest() throw() { +} + + +void ClearFileMetadataRequest::__set_fileIds(const std::vector & val) { + this->fileIds = val; +} + +uint32_t ClearFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_fileIds = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->fileIds.clear(); + uint32_t _size774; + ::apache::thrift::protocol::TType _etype777; + xfer += iprot->readListBegin(_etype777, _size774); + this->fileIds.resize(_size774); + uint32_t _i778; + for (_i778 = 0; _i778 < _size774; ++_i778) + { + xfer += iprot->readI64(this->fileIds[_i778]); + } + xfer += iprot->readListEnd(); + } + isset_fileIds = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_fileIds) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t ClearFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClearFileMetadataRequest"); + + xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast(this->fileIds.size())); + std::vector ::const_iterator _iter779; + for (_iter779 = this->fileIds.begin(); _iter779 != this->fileIds.end(); ++_iter779) + { + xfer += oprot->writeI64((*_iter779)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ClearFileMetadataRequest &a, ClearFileMetadataRequest &b) { + using ::std::swap; + swap(a.fileIds, b.fileIds); +} + +ClearFileMetadataRequest::ClearFileMetadataRequest(const ClearFileMetadataRequest& other780) { + fileIds = other780.fileIds; +} +ClearFileMetadataRequest& ClearFileMetadataRequest::operator=(const ClearFileMetadataRequest& other781) { + fileIds = other781.fileIds; + return *this; +} +void ClearFileMetadataRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ClearFileMetadataRequest("; + out << "fileIds=" << to_string(fileIds); + out << ")"; +} + + +CacheFileMetadataResult::~CacheFileMetadataResult() throw() { +} + + +void CacheFileMetadataResult::__set_isSupported(const bool val) { + this->isSupported = val; +} + +uint32_t CacheFileMetadataResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_isSupported = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isSupported); + isset_isSupported = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_isSupported) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t CacheFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CacheFileMetadataResult"); + + xfer += oprot->writeFieldBegin("isSupported", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->isSupported); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CacheFileMetadataResult &a, CacheFileMetadataResult &b) { + using ::std::swap; + swap(a.isSupported, b.isSupported); +} + +CacheFileMetadataResult::CacheFileMetadataResult(const CacheFileMetadataResult& other782) { + isSupported = other782.isSupported; +} +CacheFileMetadataResult& CacheFileMetadataResult::operator=(const CacheFileMetadataResult& other783) { + isSupported = other783.isSupported; + return *this; +} +void CacheFileMetadataResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CacheFileMetadataResult("; + out << "isSupported=" << to_string(isSupported); + out << ")"; +} + + +CacheFileMetadataRequest::~CacheFileMetadataRequest() throw() { +} + + +void CacheFileMetadataRequest::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void CacheFileMetadataRequest::__set_tblName(const std::string& val) { + this->tblName = val; +} + +void CacheFileMetadataRequest::__set_partName(const std::string& val) { + this->partName = val; +__isset.partName = true; +} + +void CacheFileMetadataRequest::__set_isAllParts(const bool val) { + this->isAllParts = val; +__isset.isAllParts = true; +} + +uint32_t CacheFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dbName = false; + bool isset_tblName = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + isset_dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tblName); + isset_tblName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->partName); + this->__isset.partName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isAllParts); + this->__isset.isAllParts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tblName) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t CacheFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CacheFileMetadataRequest"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tblName); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.partName) { + xfer += oprot->writeFieldBegin("partName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->partName); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.isAllParts) { + xfer += oprot->writeFieldBegin("isAllParts", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->isAllParts); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CacheFileMetadataRequest &a, CacheFileMetadataRequest &b) { + using ::std::swap; + swap(a.dbName, b.dbName); + swap(a.tblName, b.tblName); + swap(a.partName, b.partName); + swap(a.isAllParts, b.isAllParts); + swap(a.__isset, b.__isset); +} + +CacheFileMetadataRequest::CacheFileMetadataRequest(const CacheFileMetadataRequest& other784) { + dbName = other784.dbName; + tblName = other784.tblName; + partName = other784.partName; + isAllParts = other784.isAllParts; + __isset = other784.__isset; +} +CacheFileMetadataRequest& CacheFileMetadataRequest::operator=(const CacheFileMetadataRequest& other785) { + dbName = other785.dbName; + tblName = other785.tblName; + partName = other785.partName; + isAllParts = other785.isAllParts; + __isset = other785.__isset; + return *this; +} +void CacheFileMetadataRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CacheFileMetadataRequest("; + out << "dbName=" << to_string(dbName); + out << ", " << "tblName=" << to_string(tblName); + out << ", " << "partName="; (__isset.partName ? (out << to_string(partName)) : (out << "")); + out << ", " << "isAllParts="; (__isset.isAllParts ? (out << to_string(isAllParts)) : (out << "")); + out << ")"; +} + + +GetAllFunctionsResponse::~GetAllFunctionsResponse() throw() { +} + + +void GetAllFunctionsResponse::__set_functions(const std::vector & val) { + this->functions = val; +__isset.functions = true; +} + +uint32_t GetAllFunctionsResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->functions.clear(); + uint32_t _size786; + ::apache::thrift::protocol::TType _etype789; + xfer += iprot->readListBegin(_etype789, _size786); + this->functions.resize(_size786); + uint32_t _i790; + for (_i790 = 0; _i790 < _size786; ++_i790) + { + xfer += this->functions[_i790].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.functions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t GetAllFunctionsResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetAllFunctionsResponse"); + + if (this->__isset.functions) { + xfer += oprot->writeFieldBegin("functions", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->functions.size())); + std::vector ::const_iterator _iter791; + for (_iter791 = this->functions.begin(); _iter791 != this->functions.end(); ++_iter791) + { + xfer += (*_iter791).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetAllFunctionsResponse &a, GetAllFunctionsResponse &b) { + using ::std::swap; + swap(a.functions, b.functions); + swap(a.__isset, b.__isset); +} + +GetAllFunctionsResponse::GetAllFunctionsResponse(const GetAllFunctionsResponse& other792) { + functions = other792.functions; + __isset = other792.__isset; +} +GetAllFunctionsResponse& GetAllFunctionsResponse::operator=(const GetAllFunctionsResponse& other793) { + functions = other793.functions; + __isset = other793.__isset; + return *this; +} +void GetAllFunctionsResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetAllFunctionsResponse("; + out << "functions="; (__isset.functions ? (out << to_string(functions)) : (out << "")); + out << ")"; +} + + +ClientCapabilities::~ClientCapabilities() throw() { +} + + +void ClientCapabilities::__set_values(const std::vector & val) { + this->values = val; +} + +uint32_t ClientCapabilities::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_values = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->values.clear(); + uint32_t _size794; + ::apache::thrift::protocol::TType _etype797; + xfer += iprot->readListBegin(_etype797, _size794); + this->values.resize(_size794); + uint32_t _i798; + for (_i798 = 0; _i798 < _size794; ++_i798) + { + int32_t ecast799; + xfer += iprot->readI32(ecast799); + this->values[_i798] = (ClientCapability::type)ecast799; + } + xfer += iprot->readListEnd(); + } + isset_values = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_values) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t ClientCapabilities::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("ClientCapabilities"); + + xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->values.size())); + std::vector ::const_iterator _iter800; + for (_iter800 = this->values.begin(); _iter800 != this->values.end(); ++_iter800) + { + xfer += oprot->writeI32((int32_t)(*_iter800)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(ClientCapabilities &a, ClientCapabilities &b) { + using ::std::swap; + swap(a.values, b.values); +} + +ClientCapabilities::ClientCapabilities(const ClientCapabilities& other801) { + values = other801.values; +} +ClientCapabilities& ClientCapabilities::operator=(const ClientCapabilities& other802) { + values = other802.values; + return *this; +} +void ClientCapabilities::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ClientCapabilities("; + out << "values=" << to_string(values); + out << ")"; +} + + +GetTableRequest::~GetTableRequest() throw() { +} + + +void GetTableRequest::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void GetTableRequest::__set_tblName(const std::string& val) { + this->tblName = val; +} + +void GetTableRequest::__set_capabilities(const ClientCapabilities& val) { + this->capabilities = val; +__isset.capabilities = true; +} + +uint32_t GetTableRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dbName = false; + bool isset_tblName = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + isset_dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tblName); + isset_tblName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->capabilities.read(iprot); + this->__isset.capabilities = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tblName) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetTableRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetTableRequest"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tblName); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.capabilities) { + xfer += oprot->writeFieldBegin("capabilities", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->capabilities.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetTableRequest &a, GetTableRequest &b) { + using ::std::swap; + swap(a.dbName, b.dbName); + swap(a.tblName, b.tblName); + swap(a.capabilities, b.capabilities); + swap(a.__isset, b.__isset); +} + +GetTableRequest::GetTableRequest(const GetTableRequest& other803) { + dbName = other803.dbName; + tblName = other803.tblName; + capabilities = other803.capabilities; + __isset = other803.__isset; +} +GetTableRequest& GetTableRequest::operator=(const GetTableRequest& other804) { + dbName = other804.dbName; + tblName = other804.tblName; + capabilities = other804.capabilities; + __isset = other804.__isset; + return *this; +} +void GetTableRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetTableRequest("; + out << "dbName=" << to_string(dbName); + out << ", " << "tblName=" << to_string(tblName); + out << ", " << "capabilities="; (__isset.capabilities ? (out << to_string(capabilities)) : (out << "")); + out << ")"; +} + + +GetTableResult::~GetTableResult() throw() { +} + + +void GetTableResult::__set_table(const Table& val) { + this->table = val; +} + +uint32_t GetTableResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_table = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->table.read(iprot); + isset_table = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_table) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetTableResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetTableResult"); + + xfer += oprot->writeFieldBegin("table", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->table.write(oprot); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetTableResult &a, GetTableResult &b) { + using ::std::swap; + swap(a.table, b.table); +} + +GetTableResult::GetTableResult(const GetTableResult& other805) { + table = other805.table; +} +GetTableResult& GetTableResult::operator=(const GetTableResult& other806) { + table = other806.table; + return *this; +} +void GetTableResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetTableResult("; + out << "table=" << to_string(table); + out << ")"; +} + + +GetTablesRequest::~GetTablesRequest() throw() { +} + + +void GetTablesRequest::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void GetTablesRequest::__set_tblNames(const std::vector & val) { + this->tblNames = val; +__isset.tblNames = true; +} + +void GetTablesRequest::__set_capabilities(const ClientCapabilities& val) { + this->capabilities = val; +__isset.capabilities = true; +} + +uint32_t GetTablesRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dbName = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + isset_dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->tblNames.clear(); + uint32_t _size807; + ::apache::thrift::protocol::TType _etype810; + xfer += iprot->readListBegin(_etype810, _size807); + this->tblNames.resize(_size807); + uint32_t _i811; + for (_i811 = 0; _i811 < _size807; ++_i811) + { + xfer += iprot->readString(this->tblNames[_i811]); + } + xfer += iprot->readListEnd(); + } + this->__isset.tblNames = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->capabilities.read(iprot); + this->__isset.capabilities = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbName) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetTablesRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetTablesRequest"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.tblNames) { + xfer += oprot->writeFieldBegin("tblNames", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->tblNames.size())); + std::vector ::const_iterator _iter812; + for (_iter812 = this->tblNames.begin(); _iter812 != this->tblNames.end(); ++_iter812) + { + xfer += oprot->writeString((*_iter812)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.capabilities) { + xfer += oprot->writeFieldBegin("capabilities", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->capabilities.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetTablesRequest &a, GetTablesRequest &b) { + using ::std::swap; + swap(a.dbName, b.dbName); + swap(a.tblNames, b.tblNames); + swap(a.capabilities, b.capabilities); + swap(a.__isset, b.__isset); +} + +GetTablesRequest::GetTablesRequest(const GetTablesRequest& other813) { + dbName = other813.dbName; + tblNames = other813.tblNames; + capabilities = other813.capabilities; + __isset = other813.__isset; +} +GetTablesRequest& GetTablesRequest::operator=(const GetTablesRequest& other814) { + dbName = other814.dbName; + tblNames = other814.tblNames; + capabilities = other814.capabilities; + __isset = other814.__isset; + return *this; +} +void GetTablesRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetTablesRequest("; + out << "dbName=" << to_string(dbName); + out << ", " << "tblNames="; (__isset.tblNames ? (out << to_string(tblNames)) : (out << "")); + out << ", " << "capabilities="; (__isset.capabilities ? (out << to_string(capabilities)) : (out << "")); + out << ")"; +} + + +GetTablesResult::~GetTablesResult() throw() { +} + + +void GetTablesResult::__set_tables(const std::vector
& val) { + this->tables = val; +} + +uint32_t GetTablesResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_tables = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->tables.clear(); + uint32_t _size815; + ::apache::thrift::protocol::TType _etype818; + xfer += iprot->readListBegin(_etype818, _size815); + this->tables.resize(_size815); + uint32_t _i819; + for (_i819 = 0; _i819 < _size815; ++_i819) + { + xfer += this->tables[_i819].read(iprot); + } + xfer += iprot->readListEnd(); + } + isset_tables = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_tables) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t GetTablesResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("GetTablesResult"); + + xfer += oprot->writeFieldBegin("tables", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->tables.size())); + std::vector
::const_iterator _iter820; + for (_iter820 = this->tables.begin(); _iter820 != this->tables.end(); ++_iter820) + { + xfer += (*_iter820).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(GetTablesResult &a, GetTablesResult &b) { + using ::std::swap; + swap(a.tables, b.tables); +} + +GetTablesResult::GetTablesResult(const GetTablesResult& other821) { + tables = other821.tables; +} +GetTablesResult& GetTablesResult::operator=(const GetTablesResult& other822) { + tables = other822.tables; + return *this; +} +void GetTablesResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "GetTablesResult("; + out << "tables=" << to_string(tables); + out << ")"; +} + + +CmRecycleRequest::~CmRecycleRequest() throw() { +} + + +void CmRecycleRequest::__set_dataPath(const std::string& val) { + this->dataPath = val; +} + +void CmRecycleRequest::__set_purge(const bool val) { + this->purge = val; +} + +uint32_t CmRecycleRequest::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dataPath = false; + bool isset_purge = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dataPath); + isset_dataPath = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->purge); + isset_purge = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dataPath) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_purge) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t CmRecycleRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CmRecycleRequest"); + + xfer += oprot->writeFieldBegin("dataPath", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dataPath); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("purge", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->purge); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CmRecycleRequest &a, CmRecycleRequest &b) { + using ::std::swap; + swap(a.dataPath, b.dataPath); + swap(a.purge, b.purge); +} + +CmRecycleRequest::CmRecycleRequest(const CmRecycleRequest& other823) { + dataPath = other823.dataPath; + purge = other823.purge; +} +CmRecycleRequest& CmRecycleRequest::operator=(const CmRecycleRequest& other824) { + dataPath = other824.dataPath; + purge = other824.purge; + return *this; +} +void CmRecycleRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CmRecycleRequest("; + out << "dataPath=" << to_string(dataPath); + out << ", " << "purge=" << to_string(purge); + out << ")"; +} + + +CmRecycleResponse::~CmRecycleResponse() throw() { +} + + +uint32_t CmRecycleResponse::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + xfer += iprot->skip(ftype); + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t CmRecycleResponse::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CmRecycleResponse"); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CmRecycleResponse &a, CmRecycleResponse &b) { + using ::std::swap; + (void) a; + (void) b; +} + +CmRecycleResponse::CmRecycleResponse(const CmRecycleResponse& other825) { + (void) other825; +} +CmRecycleResponse& CmRecycleResponse::operator=(const CmRecycleResponse& other826) { + (void) other826; + return *this; +} +void CmRecycleResponse::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CmRecycleResponse("; + out << ")"; +} + + +TableMeta::~TableMeta() throw() { +} + + +void TableMeta::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void TableMeta::__set_tableName(const std::string& val) { + this->tableName = val; +} + +void TableMeta::__set_tableType(const std::string& val) { + this->tableType = val; +} + +void TableMeta::__set_comments(const std::string& val) { + this->comments = val; +__isset.comments = true; +} + +uint32_t TableMeta::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_dbName = false; + bool isset_tableName = false; + bool isset_tableType = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + isset_dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + isset_tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableType); + isset_tableType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->comments); + this->__isset.comments = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tableName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tableType) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t TableMeta::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TableMeta"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->tableType); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.comments) { + xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->comments); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(TableMeta &a, TableMeta &b) { + using ::std::swap; + swap(a.dbName, b.dbName); + swap(a.tableName, b.tableName); + swap(a.tableType, b.tableType); + swap(a.comments, b.comments); + swap(a.__isset, b.__isset); +} + +TableMeta::TableMeta(const TableMeta& other827) { + dbName = other827.dbName; + tableName = other827.tableName; + tableType = other827.tableType; + comments = other827.comments; + __isset = other827.__isset; +} +TableMeta& TableMeta::operator=(const TableMeta& other828) { + dbName = other828.dbName; + tableName = other828.tableName; + tableType = other828.tableType; + comments = other828.comments; + __isset = other828.__isset; + return *this; +} +void TableMeta::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TableMeta("; + out << "dbName=" << to_string(dbName); + out << ", " << "tableName=" << to_string(tableName); + out << ", " << "tableType=" << to_string(tableType); + out << ", " << "comments="; (__isset.comments ? (out << to_string(comments)) : (out << "")); + out << ")"; +} + + +MetaException::~MetaException() throw() { +} + + +void MetaException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t MetaException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MetaException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +MetaException::MetaException(const MetaException& other829) : TException() { + message = other829.message; + __isset = other829.__isset; +} +MetaException& MetaException::operator=(const MetaException& other830) { + message = other830.message; + __isset = other830.__isset; + return *this; +} +void MetaException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "MetaException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* MetaException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: MetaException"; + } +} + + +UnknownTableException::~UnknownTableException() throw() { +} + + +void UnknownTableException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t UnknownTableException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t UnknownTableException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +UnknownTableException::UnknownTableException(const UnknownTableException& other831) : TException() { + message = other831.message; + __isset = other831.__isset; +} +UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other832) { + message = other832.message; + __isset = other832.__isset; + return *this; +} +void UnknownTableException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "UnknownTableException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* UnknownTableException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: UnknownTableException"; + } +} + + +UnknownDBException::~UnknownDBException() throw() { +} + + +void UnknownDBException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t UnknownDBException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t UnknownDBException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +UnknownDBException::UnknownDBException(const UnknownDBException& other833) : TException() { + message = other833.message; + __isset = other833.__isset; +} +UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other834) { + message = other834.message; + __isset = other834.__isset; + return *this; +} +void UnknownDBException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "UnknownDBException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* UnknownDBException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: UnknownDBException"; + } +} + + +AlreadyExistsException::~AlreadyExistsException() throw() { +} + + +void AlreadyExistsException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t AlreadyExistsException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t AlreadyExistsException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other835) : TException() { + message = other835.message; + __isset = other835.__isset; +} +AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other836) { + message = other836.message; + __isset = other836.__isset; + return *this; +} +void AlreadyExistsException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "AlreadyExistsException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* AlreadyExistsException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: AlreadyExistsException"; + } +} + + +InvalidPartitionException::~InvalidPartitionException() throw() { +} + + +void InvalidPartitionException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t InvalidPartitionException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t InvalidPartitionException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other837) : TException() { + message = other837.message; + __isset = other837.__isset; +} +InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other838) { + message = other838.message; + __isset = other838.__isset; + return *this; +} +void InvalidPartitionException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "InvalidPartitionException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* InvalidPartitionException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: InvalidPartitionException"; + } +} + + +UnknownPartitionException::~UnknownPartitionException() throw() { +} + + +void UnknownPartitionException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t UnknownPartitionException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t UnknownPartitionException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other839) : TException() { + message = other839.message; + __isset = other839.__isset; +} +UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other840) { + message = other840.message; + __isset = other840.__isset; + return *this; +} +void UnknownPartitionException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "UnknownPartitionException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* UnknownPartitionException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: UnknownPartitionException"; + } +} + + +InvalidObjectException::~InvalidObjectException() throw() { +} + + +void InvalidObjectException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t InvalidObjectException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t InvalidObjectException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +InvalidObjectException::InvalidObjectException(const InvalidObjectException& other841) : TException() { + message = other841.message; + __isset = other841.__isset; +} +InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other842) { + message = other842.message; + __isset = other842.__isset; + return *this; +} +void InvalidObjectException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "InvalidObjectException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* InvalidObjectException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: InvalidObjectException"; + } +} + + +NoSuchObjectException::~NoSuchObjectException() throw() { +} + + +void NoSuchObjectException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t NoSuchObjectException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t NoSuchObjectException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other843) : TException() { + message = other843.message; + __isset = other843.__isset; +} +NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other844) { + message = other844.message; + __isset = other844.__isset; + return *this; +} +void NoSuchObjectException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NoSuchObjectException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* NoSuchObjectException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: NoSuchObjectException"; + } +} + + +IndexAlreadyExistsException::~IndexAlreadyExistsException() throw() { +} + + +void IndexAlreadyExistsException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t IndexAlreadyExistsException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t IndexAlreadyExistsException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +IndexAlreadyExistsException::IndexAlreadyExistsException(const IndexAlreadyExistsException& other845) : TException() { + message = other845.message; + __isset = other845.__isset; +} +IndexAlreadyExistsException& IndexAlreadyExistsException::operator=(const IndexAlreadyExistsException& other846) { + message = other846.message; + __isset = other846.__isset; + return *this; +} +void IndexAlreadyExistsException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "IndexAlreadyExistsException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* IndexAlreadyExistsException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: IndexAlreadyExistsException"; + } +} + + +InvalidOperationException::~InvalidOperationException() throw() { +} + + +void InvalidOperationException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t InvalidOperationException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t InvalidOperationException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +InvalidOperationException::InvalidOperationException(const InvalidOperationException& other847) : TException() { + message = other847.message; + __isset = other847.__isset; +} +InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other848) { + message = other848.message; + __isset = other848.__isset; + return *this; +} +void InvalidOperationException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "InvalidOperationException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* InvalidOperationException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: InvalidOperationException"; + } +} + + +ConfigValSecurityException::~ConfigValSecurityException() throw() { +} + + +void ConfigValSecurityException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t ConfigValSecurityException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ConfigValSecurityException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + 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); +} + +ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other849) : TException() { + message = other849.message; + __isset = other849.__isset; +} +ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other850) { + message = other850.message; + __isset = other850.__isset; + return *this; +} +void ConfigValSecurityException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ConfigValSecurityException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* ConfigValSecurityException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: ConfigValSecurityException"; + } +} + + +InvalidInputException::~InvalidInputException() throw() { +} + + +void InvalidInputException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t InvalidInputException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t InvalidInputException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("InvalidInputException"); + + 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(InvalidInputException &a, InvalidInputException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + +InvalidInputException::InvalidInputException(const InvalidInputException& other851) : TException() { + message = other851.message; + __isset = other851.__isset; +} +InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other852) { + message = other852.message; + __isset = other852.__isset; + return *this; +} +void InvalidInputException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "InvalidInputException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* InvalidInputException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: InvalidInputException"; + } +} + + +NoSuchTxnException::~NoSuchTxnException() throw() { +} + + +void NoSuchTxnException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t NoSuchTxnException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t NoSuchTxnException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("NoSuchTxnException"); + + 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(NoSuchTxnException &a, NoSuchTxnException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + +NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other853) : TException() { + message = other853.message; + __isset = other853.__isset; +} +NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other854) { + message = other854.message; + __isset = other854.__isset; + return *this; +} +void NoSuchTxnException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NoSuchTxnException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* NoSuchTxnException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: NoSuchTxnException"; + } +} + + +TxnAbortedException::~TxnAbortedException() throw() { +} + + +void TxnAbortedException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t TxnAbortedException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TxnAbortedException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TxnAbortedException"); + + 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(TxnAbortedException &a, TxnAbortedException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + +TxnAbortedException::TxnAbortedException(const TxnAbortedException& other855) : TException() { + message = other855.message; + __isset = other855.__isset; +} +TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other856) { + message = other856.message; + __isset = other856.__isset; + return *this; +} +void TxnAbortedException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TxnAbortedException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* TxnAbortedException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: TxnAbortedException"; + } +} + + +TxnOpenException::~TxnOpenException() throw() { +} + + +void TxnOpenException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t TxnOpenException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TxnOpenException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("TxnOpenException"); + + 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(TxnOpenException &a, TxnOpenException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + +TxnOpenException::TxnOpenException(const TxnOpenException& other857) : TException() { + message = other857.message; + __isset = other857.__isset; +} +TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other858) { + message = other858.message; + __isset = other858.__isset; + return *this; +} +void TxnOpenException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "TxnOpenException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* TxnOpenException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: TxnOpenException"; + } +} + + +NoSuchLockException::~NoSuchLockException() throw() { +} + + +void NoSuchLockException::__set_message(const std::string& val) { + this->message = val; +} + +uint32_t NoSuchLockException::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t NoSuchLockException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("NoSuchLockException"); + + 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(NoSuchLockException &a, NoSuchLockException &b) { + using ::std::swap; + swap(a.message, b.message); + swap(a.__isset, b.__isset); +} + +NoSuchLockException::NoSuchLockException(const NoSuchLockException& other859) : TException() { + message = other859.message; + __isset = other859.__isset; +} +NoSuchLockException& NoSuchLockException::operator=(const NoSuchLockException& other860) { + message = other860.message; + __isset = other860.__isset; + return *this; +} +void NoSuchLockException::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "NoSuchLockException("; + out << "message=" << to_string(message); + out << ")"; +} + +const char* NoSuchLockException::what() const throw() { + try { + std::stringstream ss; + ss << "TException - service has thrown: " << *this; + this->thriftTExceptionMessageHolder_ = ss.str(); + return this->thriftTExceptionMessageHolder_.c_str(); + } catch (const std::exception&) { + return "TException - service has thrown: NoSuchLockException"; + } +} + +}}} // namespace diff --git standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h new file mode 100644 index 0000000..2bba534 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -0,0 +1,8944 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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 "fb303_types.h" + + +namespace Apache { namespace Hadoop { namespace Hive { + +struct HiveObjectType { + enum type { + GLOBAL = 1, + DATABASE = 2, + TABLE = 3, + PARTITION = 4, + COLUMN = 5 + }; +}; + +extern const std::map _HiveObjectType_VALUES_TO_NAMES; + +struct PrincipalType { + enum type { + USER = 1, + ROLE = 2, + GROUP = 3 + }; +}; + +extern const std::map _PrincipalType_VALUES_TO_NAMES; + +struct PartitionEventType { + enum type { + LOAD_DONE = 1 + }; +}; + +extern const std::map _PartitionEventType_VALUES_TO_NAMES; + +struct TxnState { + enum type { + COMMITTED = 1, + ABORTED = 2, + OPEN = 3 + }; +}; + +extern const std::map _TxnState_VALUES_TO_NAMES; + +struct LockLevel { + enum type { + DB = 1, + TABLE = 2, + PARTITION = 3 + }; +}; + +extern const std::map _LockLevel_VALUES_TO_NAMES; + +struct LockState { + enum type { + ACQUIRED = 1, + WAITING = 2, + ABORT = 3, + NOT_ACQUIRED = 4 + }; +}; + +extern const std::map _LockState_VALUES_TO_NAMES; + +struct LockType { + enum type { + SHARED_READ = 1, + SHARED_WRITE = 2, + EXCLUSIVE = 3 + }; +}; + +extern const std::map _LockType_VALUES_TO_NAMES; + +struct CompactionType { + enum type { + MINOR = 1, + MAJOR = 2 + }; +}; + +extern const std::map _CompactionType_VALUES_TO_NAMES; + +struct GrantRevokeType { + enum type { + GRANT = 1, + REVOKE = 2 + }; +}; + +extern const std::map _GrantRevokeType_VALUES_TO_NAMES; + +struct DataOperationType { + enum type { + SELECT = 1, + INSERT = 2, + UPDATE = 3, + DELETE = 4, + UNSET = 5, + NO_TXN = 6 + }; +}; + +extern const std::map _DataOperationType_VALUES_TO_NAMES; + +struct EventRequestType { + enum type { + INSERT = 1, + UPDATE = 2, + DELETE = 3 + }; +}; + +extern const std::map _EventRequestType_VALUES_TO_NAMES; + +struct FunctionType { + enum type { + JAVA = 1 + }; +}; + +extern const std::map _FunctionType_VALUES_TO_NAMES; + +struct ResourceType { + enum type { + JAR = 1, + FILE = 2, + ARCHIVE = 3 + }; +}; + +extern const std::map _ResourceType_VALUES_TO_NAMES; + +struct FileMetadataExprType { + enum type { + ORC_SARG = 1 + }; +}; + +extern const std::map _FileMetadataExprType_VALUES_TO_NAMES; + +struct ClientCapability { + enum type { + TEST_CAPABILITY = 1 + }; +}; + +extern const std::map _ClientCapability_VALUES_TO_NAMES; + +class Version; + +class FieldSchema; + +class SQLPrimaryKey; + +class SQLForeignKey; + +class SQLUniqueConstraint; + +class SQLNotNullConstraint; + +class Type; + +class HiveObjectRef; + +class PrivilegeGrantInfo; + +class HiveObjectPrivilege; + +class PrivilegeBag; + +class PrincipalPrivilegeSet; + +class GrantRevokePrivilegeRequest; + +class GrantRevokePrivilegeResponse; + +class Role; + +class RolePrincipalGrant; + +class GetRoleGrantsForPrincipalRequest; + +class GetRoleGrantsForPrincipalResponse; + +class GetPrincipalsInRoleRequest; + +class GetPrincipalsInRoleResponse; + +class GrantRevokeRoleRequest; + +class GrantRevokeRoleResponse; + +class Database; + +class SerDeInfo; + +class Order; + +class SkewedInfo; + +class StorageDescriptor; + +class Table; + +class Partition; + +class PartitionWithoutSD; + +class PartitionSpecWithSharedSD; + +class PartitionListComposingSpec; + +class PartitionSpec; + +class Index; + +class BooleanColumnStatsData; + +class DoubleColumnStatsData; + +class LongColumnStatsData; + +class StringColumnStatsData; + +class BinaryColumnStatsData; + +class Decimal; + +class DecimalColumnStatsData; + +class Date; + +class DateColumnStatsData; + +class ColumnStatisticsData; + +class ColumnStatisticsObj; + +class ColumnStatisticsDesc; + +class ColumnStatistics; + +class AggrStats; + +class SetPartitionsStatsRequest; + +class Schema; + +class EnvironmentContext; + +class PrimaryKeysRequest; + +class PrimaryKeysResponse; + +class ForeignKeysRequest; + +class ForeignKeysResponse; + +class UniqueConstraintsRequest; + +class UniqueConstraintsResponse; + +class NotNullConstraintsRequest; + +class NotNullConstraintsResponse; + +class DropConstraintRequest; + +class AddPrimaryKeyRequest; + +class AddForeignKeyRequest; + +class AddUniqueConstraintRequest; + +class AddNotNullConstraintRequest; + +class PartitionsByExprResult; + +class PartitionsByExprRequest; + +class TableStatsResult; + +class PartitionsStatsResult; + +class TableStatsRequest; + +class PartitionsStatsRequest; + +class AddPartitionsResult; + +class AddPartitionsRequest; + +class DropPartitionsResult; + +class DropPartitionsExpr; + +class RequestPartsSpec; + +class DropPartitionsRequest; + +class ResourceUri; + +class Function; + +class TxnInfo; + +class GetOpenTxnsInfoResponse; + +class GetOpenTxnsResponse; + +class OpenTxnRequest; + +class OpenTxnsResponse; + +class AbortTxnRequest; + +class AbortTxnsRequest; + +class CommitTxnRequest; + +class LockComponent; + +class LockRequest; + +class LockResponse; + +class CheckLockRequest; + +class UnlockRequest; + +class ShowLocksRequest; + +class ShowLocksResponseElement; + +class ShowLocksResponse; + +class HeartbeatRequest; + +class HeartbeatTxnRangeRequest; + +class HeartbeatTxnRangeResponse; + +class CompactionRequest; + +class CompactionResponse; + +class ShowCompactRequest; + +class ShowCompactResponseElement; + +class ShowCompactResponse; + +class AddDynamicPartitions; + +class NotificationEventRequest; + +class NotificationEvent; + +class NotificationEventResponse; + +class CurrentNotificationEventId; + +class InsertEventRequestData; + +class FireEventRequestData; + +class FireEventRequest; + +class FireEventResponse; + +class MetadataPpdResult; + +class GetFileMetadataByExprResult; + +class GetFileMetadataByExprRequest; + +class GetFileMetadataResult; + +class GetFileMetadataRequest; + +class PutFileMetadataResult; + +class PutFileMetadataRequest; + +class ClearFileMetadataResult; + +class ClearFileMetadataRequest; + +class CacheFileMetadataResult; + +class CacheFileMetadataRequest; + +class GetAllFunctionsResponse; + +class ClientCapabilities; + +class GetTableRequest; + +class GetTableResult; + +class GetTablesRequest; + +class GetTablesResult; + +class CmRecycleRequest; + +class CmRecycleResponse; + +class TableMeta; + +class MetaException; + +class UnknownTableException; + +class UnknownDBException; + +class AlreadyExistsException; + +class InvalidPartitionException; + +class UnknownPartitionException; + +class InvalidObjectException; + +class NoSuchObjectException; + +class IndexAlreadyExistsException; + +class InvalidOperationException; + +class ConfigValSecurityException; + +class InvalidInputException; + +class NoSuchTxnException; + +class TxnAbortedException; + +class TxnOpenException; + +class NoSuchLockException; + +typedef struct _Version__isset { + _Version__isset() : version(false), comments(false) {} + bool version :1; + bool comments :1; +} _Version__isset; + +class Version { + public: + + Version(const Version&); + Version& operator=(const Version&); + Version() : version(), comments() { + } + + virtual ~Version() throw(); + std::string version; + std::string comments; + + _Version__isset __isset; + + void __set_version(const std::string& val); + + void __set_comments(const std::string& val); + + bool operator == (const Version & rhs) const + { + if (!(version == rhs.version)) + return false; + if (!(comments == rhs.comments)) + return false; + return true; + } + bool operator != (const Version &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Version & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Version &a, Version &b); + +inline std::ostream& operator<<(std::ostream& out, const Version& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _FieldSchema__isset { + _FieldSchema__isset() : name(false), type(false), comment(false) {} + bool name :1; + bool type :1; + bool comment :1; +} _FieldSchema__isset; + +class FieldSchema { + public: + + FieldSchema(const FieldSchema&); + FieldSchema& operator=(const FieldSchema&); + FieldSchema() : name(), type(), comment() { + } + + virtual ~FieldSchema() throw(); + std::string name; + std::string type; + std::string comment; + + _FieldSchema__isset __isset; + + void __set_name(const std::string& val); + + void __set_type(const std::string& val); + + void __set_comment(const std::string& val); + + bool operator == (const FieldSchema & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(type == rhs.type)) + return false; + if (!(comment == rhs.comment)) + return false; + return true; + } + bool operator != (const FieldSchema &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FieldSchema & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(FieldSchema &a, FieldSchema &b); + +inline std::ostream& operator<<(std::ostream& out, const FieldSchema& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _SQLPrimaryKey__isset { + _SQLPrimaryKey__isset() : table_db(false), table_name(false), column_name(false), key_seq(false), pk_name(false), enable_cstr(false), validate_cstr(false), rely_cstr(false) {} + bool table_db :1; + bool table_name :1; + bool column_name :1; + bool key_seq :1; + bool pk_name :1; + bool enable_cstr :1; + bool validate_cstr :1; + bool rely_cstr :1; +} _SQLPrimaryKey__isset; + +class SQLPrimaryKey { + public: + + SQLPrimaryKey(const SQLPrimaryKey&); + SQLPrimaryKey& operator=(const SQLPrimaryKey&); + SQLPrimaryKey() : table_db(), table_name(), column_name(), key_seq(0), pk_name(), enable_cstr(0), validate_cstr(0), rely_cstr(0) { + } + + virtual ~SQLPrimaryKey() throw(); + std::string table_db; + std::string table_name; + std::string column_name; + int32_t key_seq; + std::string pk_name; + bool enable_cstr; + bool validate_cstr; + bool rely_cstr; + + _SQLPrimaryKey__isset __isset; + + void __set_table_db(const std::string& val); + + void __set_table_name(const std::string& val); + + void __set_column_name(const std::string& val); + + void __set_key_seq(const int32_t val); + + void __set_pk_name(const std::string& val); + + void __set_enable_cstr(const bool val); + + void __set_validate_cstr(const bool val); + + void __set_rely_cstr(const bool val); + + bool operator == (const SQLPrimaryKey & rhs) const + { + if (!(table_db == rhs.table_db)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(column_name == rhs.column_name)) + return false; + if (!(key_seq == rhs.key_seq)) + return false; + if (!(pk_name == rhs.pk_name)) + return false; + if (!(enable_cstr == rhs.enable_cstr)) + return false; + if (!(validate_cstr == rhs.validate_cstr)) + return false; + if (!(rely_cstr == rhs.rely_cstr)) + return false; + return true; + } + bool operator != (const SQLPrimaryKey &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SQLPrimaryKey & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(SQLPrimaryKey &a, SQLPrimaryKey &b); + +inline std::ostream& operator<<(std::ostream& out, const SQLPrimaryKey& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _SQLForeignKey__isset { + _SQLForeignKey__isset() : pktable_db(false), pktable_name(false), pkcolumn_name(false), fktable_db(false), fktable_name(false), fkcolumn_name(false), key_seq(false), update_rule(false), delete_rule(false), fk_name(false), pk_name(false), enable_cstr(false), validate_cstr(false), rely_cstr(false) {} + bool pktable_db :1; + bool pktable_name :1; + bool pkcolumn_name :1; + bool fktable_db :1; + bool fktable_name :1; + bool fkcolumn_name :1; + bool key_seq :1; + bool update_rule :1; + bool delete_rule :1; + bool fk_name :1; + bool pk_name :1; + bool enable_cstr :1; + bool validate_cstr :1; + bool rely_cstr :1; +} _SQLForeignKey__isset; + +class SQLForeignKey { + public: + + SQLForeignKey(const SQLForeignKey&); + SQLForeignKey& operator=(const SQLForeignKey&); + SQLForeignKey() : pktable_db(), pktable_name(), pkcolumn_name(), fktable_db(), fktable_name(), fkcolumn_name(), key_seq(0), update_rule(0), delete_rule(0), fk_name(), pk_name(), enable_cstr(0), validate_cstr(0), rely_cstr(0) { + } + + virtual ~SQLForeignKey() throw(); + std::string pktable_db; + std::string pktable_name; + std::string pkcolumn_name; + std::string fktable_db; + std::string fktable_name; + std::string fkcolumn_name; + int32_t key_seq; + int32_t update_rule; + int32_t delete_rule; + std::string fk_name; + std::string pk_name; + bool enable_cstr; + bool validate_cstr; + bool rely_cstr; + + _SQLForeignKey__isset __isset; + + void __set_pktable_db(const std::string& val); + + void __set_pktable_name(const std::string& val); + + void __set_pkcolumn_name(const std::string& val); + + void __set_fktable_db(const std::string& val); + + void __set_fktable_name(const std::string& val); + + void __set_fkcolumn_name(const std::string& val); + + void __set_key_seq(const int32_t val); + + void __set_update_rule(const int32_t val); + + void __set_delete_rule(const int32_t val); + + void __set_fk_name(const std::string& val); + + void __set_pk_name(const std::string& val); + + void __set_enable_cstr(const bool val); + + void __set_validate_cstr(const bool val); + + void __set_rely_cstr(const bool val); + + bool operator == (const SQLForeignKey & rhs) const + { + if (!(pktable_db == rhs.pktable_db)) + return false; + if (!(pktable_name == rhs.pktable_name)) + return false; + if (!(pkcolumn_name == rhs.pkcolumn_name)) + return false; + if (!(fktable_db == rhs.fktable_db)) + return false; + if (!(fktable_name == rhs.fktable_name)) + return false; + if (!(fkcolumn_name == rhs.fkcolumn_name)) + return false; + if (!(key_seq == rhs.key_seq)) + return false; + if (!(update_rule == rhs.update_rule)) + return false; + if (!(delete_rule == rhs.delete_rule)) + return false; + if (!(fk_name == rhs.fk_name)) + return false; + if (!(pk_name == rhs.pk_name)) + return false; + if (!(enable_cstr == rhs.enable_cstr)) + return false; + if (!(validate_cstr == rhs.validate_cstr)) + return false; + if (!(rely_cstr == rhs.rely_cstr)) + return false; + return true; + } + bool operator != (const SQLForeignKey &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SQLForeignKey & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(SQLForeignKey &a, SQLForeignKey &b); + +inline std::ostream& operator<<(std::ostream& out, const SQLForeignKey& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _SQLUniqueConstraint__isset { + _SQLUniqueConstraint__isset() : table_db(false), table_name(false), column_name(false), key_seq(false), uk_name(false), enable_cstr(false), validate_cstr(false), rely_cstr(false) {} + bool table_db :1; + bool table_name :1; + bool column_name :1; + bool key_seq :1; + bool uk_name :1; + bool enable_cstr :1; + bool validate_cstr :1; + bool rely_cstr :1; +} _SQLUniqueConstraint__isset; + +class SQLUniqueConstraint { + public: + + SQLUniqueConstraint(const SQLUniqueConstraint&); + SQLUniqueConstraint& operator=(const SQLUniqueConstraint&); + SQLUniqueConstraint() : table_db(), table_name(), column_name(), key_seq(0), uk_name(), enable_cstr(0), validate_cstr(0), rely_cstr(0) { + } + + virtual ~SQLUniqueConstraint() throw(); + std::string table_db; + std::string table_name; + std::string column_name; + int32_t key_seq; + std::string uk_name; + bool enable_cstr; + bool validate_cstr; + bool rely_cstr; + + _SQLUniqueConstraint__isset __isset; + + void __set_table_db(const std::string& val); + + void __set_table_name(const std::string& val); + + void __set_column_name(const std::string& val); + + void __set_key_seq(const int32_t val); + + void __set_uk_name(const std::string& val); + + void __set_enable_cstr(const bool val); + + void __set_validate_cstr(const bool val); + + void __set_rely_cstr(const bool val); + + bool operator == (const SQLUniqueConstraint & rhs) const + { + if (!(table_db == rhs.table_db)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(column_name == rhs.column_name)) + return false; + if (!(key_seq == rhs.key_seq)) + return false; + if (!(uk_name == rhs.uk_name)) + return false; + if (!(enable_cstr == rhs.enable_cstr)) + return false; + if (!(validate_cstr == rhs.validate_cstr)) + return false; + if (!(rely_cstr == rhs.rely_cstr)) + return false; + return true; + } + bool operator != (const SQLUniqueConstraint &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SQLUniqueConstraint & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(SQLUniqueConstraint &a, SQLUniqueConstraint &b); + +inline std::ostream& operator<<(std::ostream& out, const SQLUniqueConstraint& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _SQLNotNullConstraint__isset { + _SQLNotNullConstraint__isset() : table_db(false), table_name(false), column_name(false), nn_name(false), enable_cstr(false), validate_cstr(false), rely_cstr(false) {} + bool table_db :1; + bool table_name :1; + bool column_name :1; + bool nn_name :1; + bool enable_cstr :1; + bool validate_cstr :1; + bool rely_cstr :1; +} _SQLNotNullConstraint__isset; + +class SQLNotNullConstraint { + public: + + SQLNotNullConstraint(const SQLNotNullConstraint&); + SQLNotNullConstraint& operator=(const SQLNotNullConstraint&); + SQLNotNullConstraint() : table_db(), table_name(), column_name(), nn_name(), enable_cstr(0), validate_cstr(0), rely_cstr(0) { + } + + virtual ~SQLNotNullConstraint() throw(); + std::string table_db; + std::string table_name; + std::string column_name; + std::string nn_name; + bool enable_cstr; + bool validate_cstr; + bool rely_cstr; + + _SQLNotNullConstraint__isset __isset; + + void __set_table_db(const std::string& val); + + void __set_table_name(const std::string& val); + + void __set_column_name(const std::string& val); + + void __set_nn_name(const std::string& val); + + void __set_enable_cstr(const bool val); + + void __set_validate_cstr(const bool val); + + void __set_rely_cstr(const bool val); + + bool operator == (const SQLNotNullConstraint & rhs) const + { + if (!(table_db == rhs.table_db)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(column_name == rhs.column_name)) + return false; + if (!(nn_name == rhs.nn_name)) + return false; + if (!(enable_cstr == rhs.enable_cstr)) + return false; + if (!(validate_cstr == rhs.validate_cstr)) + return false; + if (!(rely_cstr == rhs.rely_cstr)) + return false; + return true; + } + bool operator != (const SQLNotNullConstraint &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SQLNotNullConstraint & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(SQLNotNullConstraint &a, SQLNotNullConstraint &b); + +inline std::ostream& operator<<(std::ostream& out, const SQLNotNullConstraint& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _Type__isset { + _Type__isset() : name(false), type1(false), type2(false), fields(false) {} + bool name :1; + bool type1 :1; + bool type2 :1; + bool fields :1; +} _Type__isset; + +class Type { + public: + + Type(const Type&); + Type& operator=(const Type&); + Type() : name(), type1(), type2() { + } + + virtual ~Type() throw(); + std::string name; + std::string type1; + std::string type2; + std::vector fields; + + _Type__isset __isset; + + void __set_name(const std::string& val); + + void __set_type1(const std::string& val); + + void __set_type2(const std::string& val); + + void __set_fields(const std::vector & val); + + bool operator == (const Type & rhs) const + { + if (!(name == rhs.name)) + return false; + if (__isset.type1 != rhs.__isset.type1) + return false; + else if (__isset.type1 && !(type1 == rhs.type1)) + return false; + if (__isset.type2 != rhs.__isset.type2) + return false; + else if (__isset.type2 && !(type2 == rhs.type2)) + return false; + if (__isset.fields != rhs.__isset.fields) + return false; + else if (__isset.fields && !(fields == rhs.fields)) + return false; + return true; + } + bool operator != (const Type &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Type & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Type &a, Type &b); + +inline std::ostream& operator<<(std::ostream& out, const Type& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _HiveObjectRef__isset { + _HiveObjectRef__isset() : objectType(false), dbName(false), objectName(false), partValues(false), columnName(false) {} + bool objectType :1; + bool dbName :1; + bool objectName :1; + bool partValues :1; + bool columnName :1; +} _HiveObjectRef__isset; + +class HiveObjectRef { + public: + + HiveObjectRef(const HiveObjectRef&); + HiveObjectRef& operator=(const HiveObjectRef&); + HiveObjectRef() : objectType((HiveObjectType::type)0), dbName(), objectName(), columnName() { + } + + virtual ~HiveObjectRef() throw(); + HiveObjectType::type objectType; + std::string dbName; + std::string objectName; + std::vector partValues; + std::string columnName; + + _HiveObjectRef__isset __isset; + + void __set_objectType(const HiveObjectType::type val); + + void __set_dbName(const std::string& val); + + void __set_objectName(const std::string& val); + + void __set_partValues(const std::vector & val); + + void __set_columnName(const std::string& val); + + bool operator == (const HiveObjectRef & rhs) const + { + if (!(objectType == rhs.objectType)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(objectName == rhs.objectName)) + return false; + if (!(partValues == rhs.partValues)) + return false; + if (!(columnName == rhs.columnName)) + return false; + return true; + } + bool operator != (const HiveObjectRef &rhs) const { + return !(*this == rhs); + } + + bool operator < (const HiveObjectRef & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(HiveObjectRef &a, HiveObjectRef &b); + +inline std::ostream& operator<<(std::ostream& out, const HiveObjectRef& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _PrivilegeGrantInfo__isset { + _PrivilegeGrantInfo__isset() : privilege(false), createTime(false), grantor(false), grantorType(false), grantOption(false) {} + bool privilege :1; + bool createTime :1; + bool grantor :1; + bool grantorType :1; + bool grantOption :1; +} _PrivilegeGrantInfo__isset; + +class PrivilegeGrantInfo { + public: + + PrivilegeGrantInfo(const PrivilegeGrantInfo&); + PrivilegeGrantInfo& operator=(const PrivilegeGrantInfo&); + PrivilegeGrantInfo() : privilege(), createTime(0), grantor(), grantorType((PrincipalType::type)0), grantOption(0) { + } + + virtual ~PrivilegeGrantInfo() throw(); + std::string privilege; + int32_t createTime; + std::string grantor; + PrincipalType::type grantorType; + bool grantOption; + + _PrivilegeGrantInfo__isset __isset; + + void __set_privilege(const std::string& val); + + void __set_createTime(const int32_t val); + + void __set_grantor(const std::string& val); + + void __set_grantorType(const PrincipalType::type val); + + void __set_grantOption(const bool val); + + bool operator == (const PrivilegeGrantInfo & rhs) const + { + if (!(privilege == rhs.privilege)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(grantor == rhs.grantor)) + return false; + if (!(grantorType == rhs.grantorType)) + return false; + if (!(grantOption == rhs.grantOption)) + return false; + return true; + } + bool operator != (const PrivilegeGrantInfo &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PrivilegeGrantInfo & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PrivilegeGrantInfo &a, PrivilegeGrantInfo &b); + +inline std::ostream& operator<<(std::ostream& out, const PrivilegeGrantInfo& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _HiveObjectPrivilege__isset { + _HiveObjectPrivilege__isset() : hiveObject(false), principalName(false), principalType(false), grantInfo(false) {} + bool hiveObject :1; + bool principalName :1; + bool principalType :1; + bool grantInfo :1; +} _HiveObjectPrivilege__isset; + +class HiveObjectPrivilege { + public: + + HiveObjectPrivilege(const HiveObjectPrivilege&); + HiveObjectPrivilege& operator=(const HiveObjectPrivilege&); + HiveObjectPrivilege() : principalName(), principalType((PrincipalType::type)0) { + } + + virtual ~HiveObjectPrivilege() throw(); + HiveObjectRef hiveObject; + std::string principalName; + PrincipalType::type principalType; + PrivilegeGrantInfo grantInfo; + + _HiveObjectPrivilege__isset __isset; + + void __set_hiveObject(const HiveObjectRef& val); + + void __set_principalName(const std::string& val); + + void __set_principalType(const PrincipalType::type val); + + void __set_grantInfo(const PrivilegeGrantInfo& val); + + bool operator == (const HiveObjectPrivilege & rhs) const + { + if (!(hiveObject == rhs.hiveObject)) + return false; + if (!(principalName == rhs.principalName)) + return false; + if (!(principalType == rhs.principalType)) + return false; + if (!(grantInfo == rhs.grantInfo)) + return false; + return true; + } + bool operator != (const HiveObjectPrivilege &rhs) const { + return !(*this == rhs); + } + + bool operator < (const HiveObjectPrivilege & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(HiveObjectPrivilege &a, HiveObjectPrivilege &b); + +inline std::ostream& operator<<(std::ostream& out, const HiveObjectPrivilege& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _PrivilegeBag__isset { + _PrivilegeBag__isset() : privileges(false) {} + bool privileges :1; +} _PrivilegeBag__isset; + +class PrivilegeBag { + public: + + PrivilegeBag(const PrivilegeBag&); + PrivilegeBag& operator=(const PrivilegeBag&); + PrivilegeBag() { + } + + virtual ~PrivilegeBag() throw(); + std::vector privileges; + + _PrivilegeBag__isset __isset; + + void __set_privileges(const std::vector & val); + + bool operator == (const PrivilegeBag & rhs) const + { + if (!(privileges == rhs.privileges)) + return false; + return true; + } + bool operator != (const PrivilegeBag &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PrivilegeBag & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PrivilegeBag &a, PrivilegeBag &b); + +inline std::ostream& operator<<(std::ostream& out, const PrivilegeBag& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _PrincipalPrivilegeSet__isset { + _PrincipalPrivilegeSet__isset() : userPrivileges(false), groupPrivileges(false), rolePrivileges(false) {} + bool userPrivileges :1; + bool groupPrivileges :1; + bool rolePrivileges :1; +} _PrincipalPrivilegeSet__isset; + +class PrincipalPrivilegeSet { + public: + + PrincipalPrivilegeSet(const PrincipalPrivilegeSet&); + PrincipalPrivilegeSet& operator=(const PrincipalPrivilegeSet&); + PrincipalPrivilegeSet() { + } + + virtual ~PrincipalPrivilegeSet() throw(); + std::map > userPrivileges; + std::map > groupPrivileges; + std::map > rolePrivileges; + + _PrincipalPrivilegeSet__isset __isset; + + void __set_userPrivileges(const std::map > & val); + + void __set_groupPrivileges(const std::map > & val); + + void __set_rolePrivileges(const std::map > & val); + + bool operator == (const PrincipalPrivilegeSet & rhs) const + { + if (!(userPrivileges == rhs.userPrivileges)) + return false; + if (!(groupPrivileges == rhs.groupPrivileges)) + return false; + if (!(rolePrivileges == rhs.rolePrivileges)) + return false; + return true; + } + bool operator != (const PrincipalPrivilegeSet &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PrincipalPrivilegeSet & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PrincipalPrivilegeSet &a, PrincipalPrivilegeSet &b); + +inline std::ostream& operator<<(std::ostream& out, const PrincipalPrivilegeSet& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _GrantRevokePrivilegeRequest__isset { + _GrantRevokePrivilegeRequest__isset() : requestType(false), privileges(false), revokeGrantOption(false) {} + bool requestType :1; + bool privileges :1; + bool revokeGrantOption :1; +} _GrantRevokePrivilegeRequest__isset; + +class GrantRevokePrivilegeRequest { + public: + + GrantRevokePrivilegeRequest(const GrantRevokePrivilegeRequest&); + GrantRevokePrivilegeRequest& operator=(const GrantRevokePrivilegeRequest&); + GrantRevokePrivilegeRequest() : requestType((GrantRevokeType::type)0), revokeGrantOption(0) { + } + + virtual ~GrantRevokePrivilegeRequest() throw(); + GrantRevokeType::type requestType; + PrivilegeBag privileges; + bool revokeGrantOption; + + _GrantRevokePrivilegeRequest__isset __isset; + + void __set_requestType(const GrantRevokeType::type val); + + void __set_privileges(const PrivilegeBag& val); + + void __set_revokeGrantOption(const bool val); + + bool operator == (const GrantRevokePrivilegeRequest & rhs) const + { + if (!(requestType == rhs.requestType)) + return false; + if (!(privileges == rhs.privileges)) + return false; + if (__isset.revokeGrantOption != rhs.__isset.revokeGrantOption) + return false; + else if (__isset.revokeGrantOption && !(revokeGrantOption == rhs.revokeGrantOption)) + return false; + return true; + } + bool operator != (const GrantRevokePrivilegeRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GrantRevokePrivilegeRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GrantRevokePrivilegeRequest &a, GrantRevokePrivilegeRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const GrantRevokePrivilegeRequest& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _GrantRevokePrivilegeResponse__isset { + _GrantRevokePrivilegeResponse__isset() : success(false) {} + bool success :1; +} _GrantRevokePrivilegeResponse__isset; + +class GrantRevokePrivilegeResponse { + public: + + GrantRevokePrivilegeResponse(const GrantRevokePrivilegeResponse&); + GrantRevokePrivilegeResponse& operator=(const GrantRevokePrivilegeResponse&); + GrantRevokePrivilegeResponse() : success(0) { + } + + virtual ~GrantRevokePrivilegeResponse() throw(); + bool success; + + _GrantRevokePrivilegeResponse__isset __isset; + + void __set_success(const bool val); + + bool operator == (const GrantRevokePrivilegeResponse & rhs) const + { + if (__isset.success != rhs.__isset.success) + return false; + else if (__isset.success && !(success == rhs.success)) + return false; + return true; + } + bool operator != (const GrantRevokePrivilegeResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GrantRevokePrivilegeResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GrantRevokePrivilegeResponse &a, GrantRevokePrivilegeResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const GrantRevokePrivilegeResponse& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _Role__isset { + _Role__isset() : roleName(false), createTime(false), ownerName(false) {} + bool roleName :1; + bool createTime :1; + bool ownerName :1; +} _Role__isset; + +class Role { + public: + + Role(const Role&); + Role& operator=(const Role&); + Role() : roleName(), createTime(0), ownerName() { + } + + virtual ~Role() throw(); + std::string roleName; + int32_t createTime; + std::string ownerName; + + _Role__isset __isset; + + void __set_roleName(const std::string& val); + + void __set_createTime(const int32_t val); + + void __set_ownerName(const std::string& val); + + bool operator == (const Role & rhs) const + { + if (!(roleName == rhs.roleName)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(ownerName == rhs.ownerName)) + return false; + return true; + } + bool operator != (const Role &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Role & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Role &a, Role &b); + +inline std::ostream& operator<<(std::ostream& out, const Role& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _RolePrincipalGrant__isset { + _RolePrincipalGrant__isset() : roleName(false), principalName(false), principalType(false), grantOption(false), grantTime(false), grantorName(false), grantorPrincipalType(false) {} + bool roleName :1; + bool principalName :1; + bool principalType :1; + bool grantOption :1; + bool grantTime :1; + bool grantorName :1; + bool grantorPrincipalType :1; +} _RolePrincipalGrant__isset; + +class RolePrincipalGrant { + public: + + RolePrincipalGrant(const RolePrincipalGrant&); + RolePrincipalGrant& operator=(const RolePrincipalGrant&); + RolePrincipalGrant() : roleName(), principalName(), principalType((PrincipalType::type)0), grantOption(0), grantTime(0), grantorName(), grantorPrincipalType((PrincipalType::type)0) { + } + + virtual ~RolePrincipalGrant() throw(); + std::string roleName; + std::string principalName; + PrincipalType::type principalType; + bool grantOption; + int32_t grantTime; + std::string grantorName; + PrincipalType::type grantorPrincipalType; + + _RolePrincipalGrant__isset __isset; + + void __set_roleName(const std::string& val); + + void __set_principalName(const std::string& val); + + void __set_principalType(const PrincipalType::type val); + + void __set_grantOption(const bool val); + + void __set_grantTime(const int32_t val); + + void __set_grantorName(const std::string& val); + + void __set_grantorPrincipalType(const PrincipalType::type val); + + bool operator == (const RolePrincipalGrant & rhs) const + { + if (!(roleName == rhs.roleName)) + return false; + if (!(principalName == rhs.principalName)) + return false; + if (!(principalType == rhs.principalType)) + return false; + if (!(grantOption == rhs.grantOption)) + return false; + if (!(grantTime == rhs.grantTime)) + return false; + if (!(grantorName == rhs.grantorName)) + return false; + if (!(grantorPrincipalType == rhs.grantorPrincipalType)) + return false; + return true; + } + bool operator != (const RolePrincipalGrant &rhs) const { + return !(*this == rhs); + } + + bool operator < (const RolePrincipalGrant & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(RolePrincipalGrant &a, RolePrincipalGrant &b); + +inline std::ostream& operator<<(std::ostream& out, const RolePrincipalGrant& obj) +{ + obj.printTo(out); + return out; +} + + +class GetRoleGrantsForPrincipalRequest { + public: + + GetRoleGrantsForPrincipalRequest(const GetRoleGrantsForPrincipalRequest&); + GetRoleGrantsForPrincipalRequest& operator=(const GetRoleGrantsForPrincipalRequest&); + GetRoleGrantsForPrincipalRequest() : principal_name(), principal_type((PrincipalType::type)0) { + } + + virtual ~GetRoleGrantsForPrincipalRequest() throw(); + std::string principal_name; + PrincipalType::type principal_type; + + void __set_principal_name(const std::string& val); + + void __set_principal_type(const PrincipalType::type val); + + bool operator == (const GetRoleGrantsForPrincipalRequest & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(principal_type == rhs.principal_type)) + return false; + return true; + } + bool operator != (const GetRoleGrantsForPrincipalRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetRoleGrantsForPrincipalRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetRoleGrantsForPrincipalRequest &a, GetRoleGrantsForPrincipalRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const GetRoleGrantsForPrincipalRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class GetRoleGrantsForPrincipalResponse { + public: + + GetRoleGrantsForPrincipalResponse(const GetRoleGrantsForPrincipalResponse&); + GetRoleGrantsForPrincipalResponse& operator=(const GetRoleGrantsForPrincipalResponse&); + GetRoleGrantsForPrincipalResponse() { + } + + virtual ~GetRoleGrantsForPrincipalResponse() throw(); + std::vector principalGrants; + + void __set_principalGrants(const std::vector & val); + + bool operator == (const GetRoleGrantsForPrincipalResponse & rhs) const + { + if (!(principalGrants == rhs.principalGrants)) + return false; + return true; + } + bool operator != (const GetRoleGrantsForPrincipalResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetRoleGrantsForPrincipalResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetRoleGrantsForPrincipalResponse &a, GetRoleGrantsForPrincipalResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const GetRoleGrantsForPrincipalResponse& obj) +{ + obj.printTo(out); + return out; +} + + +class GetPrincipalsInRoleRequest { + public: + + GetPrincipalsInRoleRequest(const GetPrincipalsInRoleRequest&); + GetPrincipalsInRoleRequest& operator=(const GetPrincipalsInRoleRequest&); + GetPrincipalsInRoleRequest() : roleName() { + } + + virtual ~GetPrincipalsInRoleRequest() throw(); + std::string roleName; + + void __set_roleName(const std::string& val); + + bool operator == (const GetPrincipalsInRoleRequest & rhs) const + { + if (!(roleName == rhs.roleName)) + return false; + return true; + } + bool operator != (const GetPrincipalsInRoleRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetPrincipalsInRoleRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetPrincipalsInRoleRequest &a, GetPrincipalsInRoleRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const GetPrincipalsInRoleRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class GetPrincipalsInRoleResponse { + public: + + GetPrincipalsInRoleResponse(const GetPrincipalsInRoleResponse&); + GetPrincipalsInRoleResponse& operator=(const GetPrincipalsInRoleResponse&); + GetPrincipalsInRoleResponse() { + } + + virtual ~GetPrincipalsInRoleResponse() throw(); + std::vector principalGrants; + + void __set_principalGrants(const std::vector & val); + + bool operator == (const GetPrincipalsInRoleResponse & rhs) const + { + if (!(principalGrants == rhs.principalGrants)) + return false; + return true; + } + bool operator != (const GetPrincipalsInRoleResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetPrincipalsInRoleResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetPrincipalsInRoleResponse &a, GetPrincipalsInRoleResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const GetPrincipalsInRoleResponse& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _GrantRevokeRoleRequest__isset { + _GrantRevokeRoleRequest__isset() : requestType(false), roleName(false), principalName(false), principalType(false), grantor(false), grantorType(false), grantOption(false) {} + bool requestType :1; + bool roleName :1; + bool principalName :1; + bool principalType :1; + bool grantor :1; + bool grantorType :1; + bool grantOption :1; +} _GrantRevokeRoleRequest__isset; + +class GrantRevokeRoleRequest { + public: + + GrantRevokeRoleRequest(const GrantRevokeRoleRequest&); + GrantRevokeRoleRequest& operator=(const GrantRevokeRoleRequest&); + GrantRevokeRoleRequest() : requestType((GrantRevokeType::type)0), roleName(), principalName(), principalType((PrincipalType::type)0), grantor(), grantorType((PrincipalType::type)0), grantOption(0) { + } + + virtual ~GrantRevokeRoleRequest() throw(); + GrantRevokeType::type requestType; + std::string roleName; + std::string principalName; + PrincipalType::type principalType; + std::string grantor; + PrincipalType::type grantorType; + bool grantOption; + + _GrantRevokeRoleRequest__isset __isset; + + void __set_requestType(const GrantRevokeType::type val); + + void __set_roleName(const std::string& val); + + void __set_principalName(const std::string& val); + + void __set_principalType(const PrincipalType::type val); + + void __set_grantor(const std::string& val); + + void __set_grantorType(const PrincipalType::type val); + + void __set_grantOption(const bool val); + + bool operator == (const GrantRevokeRoleRequest & rhs) const + { + if (!(requestType == rhs.requestType)) + return false; + if (!(roleName == rhs.roleName)) + return false; + if (!(principalName == rhs.principalName)) + return false; + if (!(principalType == rhs.principalType)) + return false; + if (__isset.grantor != rhs.__isset.grantor) + return false; + else if (__isset.grantor && !(grantor == rhs.grantor)) + return false; + if (__isset.grantorType != rhs.__isset.grantorType) + return false; + else if (__isset.grantorType && !(grantorType == rhs.grantorType)) + return false; + if (__isset.grantOption != rhs.__isset.grantOption) + return false; + else if (__isset.grantOption && !(grantOption == rhs.grantOption)) + return false; + return true; + } + bool operator != (const GrantRevokeRoleRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GrantRevokeRoleRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GrantRevokeRoleRequest &a, GrantRevokeRoleRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const GrantRevokeRoleRequest& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _GrantRevokeRoleResponse__isset { + _GrantRevokeRoleResponse__isset() : success(false) {} + bool success :1; +} _GrantRevokeRoleResponse__isset; + +class GrantRevokeRoleResponse { + public: + + GrantRevokeRoleResponse(const GrantRevokeRoleResponse&); + GrantRevokeRoleResponse& operator=(const GrantRevokeRoleResponse&); + GrantRevokeRoleResponse() : success(0) { + } + + virtual ~GrantRevokeRoleResponse() throw(); + bool success; + + _GrantRevokeRoleResponse__isset __isset; + + void __set_success(const bool val); + + bool operator == (const GrantRevokeRoleResponse & rhs) const + { + if (__isset.success != rhs.__isset.success) + return false; + else if (__isset.success && !(success == rhs.success)) + return false; + return true; + } + bool operator != (const GrantRevokeRoleResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GrantRevokeRoleResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GrantRevokeRoleResponse &a, GrantRevokeRoleResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const GrantRevokeRoleResponse& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _Database__isset { + _Database__isset() : name(false), description(false), locationUri(false), parameters(false), privileges(false), ownerName(false), ownerType(false) {} + bool name :1; + bool description :1; + bool locationUri :1; + bool parameters :1; + bool privileges :1; + bool ownerName :1; + bool ownerType :1; +} _Database__isset; + +class Database { + public: + + Database(const Database&); + Database& operator=(const Database&); + Database() : name(), description(), locationUri(), ownerName(), ownerType((PrincipalType::type)0) { + } + + virtual ~Database() throw(); + std::string name; + std::string description; + std::string locationUri; + std::map parameters; + PrincipalPrivilegeSet privileges; + std::string ownerName; + PrincipalType::type ownerType; + + _Database__isset __isset; + + void __set_name(const std::string& val); + + void __set_description(const std::string& val); + + void __set_locationUri(const std::string& val); + + void __set_parameters(const std::map & val); + + void __set_privileges(const PrincipalPrivilegeSet& val); + + void __set_ownerName(const std::string& val); + + void __set_ownerType(const PrincipalType::type val); + + bool operator == (const Database & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(description == rhs.description)) + return false; + if (!(locationUri == rhs.locationUri)) + return false; + if (!(parameters == rhs.parameters)) + return false; + if (__isset.privileges != rhs.__isset.privileges) + return false; + else if (__isset.privileges && !(privileges == rhs.privileges)) + return false; + if (__isset.ownerName != rhs.__isset.ownerName) + return false; + else if (__isset.ownerName && !(ownerName == rhs.ownerName)) + return false; + if (__isset.ownerType != rhs.__isset.ownerType) + return false; + else if (__isset.ownerType && !(ownerType == rhs.ownerType)) + return false; + return true; + } + bool operator != (const Database &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Database & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Database &a, Database &b); + +inline std::ostream& operator<<(std::ostream& out, const Database& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _SerDeInfo__isset { + _SerDeInfo__isset() : name(false), serializationLib(false), parameters(false) {} + bool name :1; + bool serializationLib :1; + bool parameters :1; +} _SerDeInfo__isset; + +class SerDeInfo { + public: + + SerDeInfo(const SerDeInfo&); + SerDeInfo& operator=(const SerDeInfo&); + SerDeInfo() : name(), serializationLib() { + } + + virtual ~SerDeInfo() throw(); + std::string name; + std::string serializationLib; + std::map parameters; + + _SerDeInfo__isset __isset; + + void __set_name(const std::string& val); + + void __set_serializationLib(const std::string& val); + + void __set_parameters(const std::map & val); + + bool operator == (const SerDeInfo & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(serializationLib == rhs.serializationLib)) + return false; + if (!(parameters == rhs.parameters)) + return false; + return true; + } + bool operator != (const SerDeInfo &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SerDeInfo & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(SerDeInfo &a, SerDeInfo &b); + +inline std::ostream& operator<<(std::ostream& out, const SerDeInfo& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _Order__isset { + _Order__isset() : col(false), order(false) {} + bool col :1; + bool order :1; +} _Order__isset; + +class Order { + public: + + Order(const Order&); + Order& operator=(const Order&); + Order() : col(), order(0) { + } + + virtual ~Order() throw(); + std::string col; + int32_t order; + + _Order__isset __isset; + + void __set_col(const std::string& val); + + void __set_order(const int32_t val); + + bool operator == (const Order & rhs) const + { + if (!(col == rhs.col)) + return false; + if (!(order == rhs.order)) + return false; + return true; + } + bool operator != (const Order &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Order & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Order &a, Order &b); + +inline std::ostream& operator<<(std::ostream& out, const Order& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _SkewedInfo__isset { + _SkewedInfo__isset() : skewedColNames(false), skewedColValues(false), skewedColValueLocationMaps(false) {} + bool skewedColNames :1; + bool skewedColValues :1; + bool skewedColValueLocationMaps :1; +} _SkewedInfo__isset; + +class SkewedInfo { + public: + + SkewedInfo(const SkewedInfo&); + SkewedInfo& operator=(const SkewedInfo&); + SkewedInfo() { + } + + virtual ~SkewedInfo() throw(); + std::vector skewedColNames; + std::vector > skewedColValues; + std::map , std::string> skewedColValueLocationMaps; + + _SkewedInfo__isset __isset; + + void __set_skewedColNames(const std::vector & val); + + void __set_skewedColValues(const std::vector > & val); + + void __set_skewedColValueLocationMaps(const std::map , std::string> & val); + + bool operator == (const SkewedInfo & rhs) const + { + if (!(skewedColNames == rhs.skewedColNames)) + return false; + if (!(skewedColValues == rhs.skewedColValues)) + return false; + if (!(skewedColValueLocationMaps == rhs.skewedColValueLocationMaps)) + return false; + return true; + } + bool operator != (const SkewedInfo &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SkewedInfo & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(SkewedInfo &a, SkewedInfo &b); + +inline std::ostream& operator<<(std::ostream& out, const SkewedInfo& obj) +{ + obj.printTo(out); + return out; +} + +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), storedAsSubDirectories(false) {} + bool cols :1; + bool location :1; + bool inputFormat :1; + bool outputFormat :1; + bool compressed :1; + bool numBuckets :1; + bool serdeInfo :1; + bool bucketCols :1; + bool sortCols :1; + bool parameters :1; + bool skewedInfo :1; + bool storedAsSubDirectories :1; +} _StorageDescriptor__isset; + +class StorageDescriptor { + public: + + StorageDescriptor(const StorageDescriptor&); + StorageDescriptor& operator=(const StorageDescriptor&); + StorageDescriptor() : location(), inputFormat(), outputFormat(), compressed(0), numBuckets(0), storedAsSubDirectories(0) { + } + + virtual ~StorageDescriptor() throw(); + std::vector cols; + std::string location; + std::string inputFormat; + std::string outputFormat; + bool compressed; + int32_t numBuckets; + SerDeInfo serdeInfo; + std::vector bucketCols; + std::vector sortCols; + std::map parameters; + SkewedInfo skewedInfo; + bool storedAsSubDirectories; + + _StorageDescriptor__isset __isset; + + void __set_cols(const std::vector & val); + + void __set_location(const std::string& val); + + void __set_inputFormat(const std::string& val); + + void __set_outputFormat(const std::string& val); + + void __set_compressed(const bool val); + + void __set_numBuckets(const int32_t val); + + void __set_serdeInfo(const SerDeInfo& val); + + void __set_bucketCols(const std::vector & val); + + void __set_sortCols(const std::vector & val); + + void __set_parameters(const std::map & val); + + void __set_skewedInfo(const SkewedInfo& val); + + void __set_storedAsSubDirectories(const bool val); + + bool operator == (const StorageDescriptor & rhs) const + { + if (!(cols == rhs.cols)) + return false; + if (!(location == rhs.location)) + return false; + if (!(inputFormat == rhs.inputFormat)) + return false; + if (!(outputFormat == rhs.outputFormat)) + return false; + if (!(compressed == rhs.compressed)) + return false; + if (!(numBuckets == rhs.numBuckets)) + return false; + if (!(serdeInfo == rhs.serdeInfo)) + return false; + if (!(bucketCols == rhs.bucketCols)) + return false; + if (!(sortCols == rhs.sortCols)) + return false; + if (!(parameters == rhs.parameters)) + return false; + if (__isset.skewedInfo != rhs.__isset.skewedInfo) + return false; + else if (__isset.skewedInfo && !(skewedInfo == rhs.skewedInfo)) + return false; + if (__isset.storedAsSubDirectories != rhs.__isset.storedAsSubDirectories) + return false; + else if (__isset.storedAsSubDirectories && !(storedAsSubDirectories == rhs.storedAsSubDirectories)) + return false; + return true; + } + bool operator != (const StorageDescriptor &rhs) const { + return !(*this == rhs); + } + + bool operator < (const StorageDescriptor & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(StorageDescriptor &a, StorageDescriptor &b); + +inline std::ostream& operator<<(std::ostream& out, const StorageDescriptor& obj) +{ + obj.printTo(out); + return out; +} + +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), temporary(true), rewriteEnabled(false) {} + bool tableName :1; + bool dbName :1; + bool owner :1; + bool createTime :1; + bool lastAccessTime :1; + bool retention :1; + bool sd :1; + bool partitionKeys :1; + bool parameters :1; + bool viewOriginalText :1; + bool viewExpandedText :1; + bool tableType :1; + bool privileges :1; + bool temporary :1; + bool rewriteEnabled :1; +} _Table__isset; + +class Table { + public: + + Table(const Table&); + Table& operator=(const Table&); + Table() : tableName(), dbName(), owner(), createTime(0), lastAccessTime(0), retention(0), viewOriginalText(), viewExpandedText(), tableType(), temporary(false), rewriteEnabled(0) { + } + + virtual ~Table() throw(); + std::string tableName; + std::string dbName; + std::string owner; + int32_t createTime; + int32_t lastAccessTime; + int32_t retention; + StorageDescriptor sd; + std::vector partitionKeys; + std::map parameters; + std::string viewOriginalText; + std::string viewExpandedText; + std::string tableType; + PrincipalPrivilegeSet privileges; + bool temporary; + bool rewriteEnabled; + + _Table__isset __isset; + + void __set_tableName(const std::string& val); + + void __set_dbName(const std::string& val); + + void __set_owner(const std::string& val); + + void __set_createTime(const int32_t val); + + void __set_lastAccessTime(const int32_t val); + + void __set_retention(const int32_t val); + + void __set_sd(const StorageDescriptor& val); + + void __set_partitionKeys(const std::vector & val); + + void __set_parameters(const std::map & val); + + void __set_viewOriginalText(const std::string& val); + + void __set_viewExpandedText(const std::string& val); + + void __set_tableType(const std::string& val); + + void __set_privileges(const PrincipalPrivilegeSet& val); + + void __set_temporary(const bool val); + + void __set_rewriteEnabled(const bool val); + + bool operator == (const Table & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(owner == rhs.owner)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(lastAccessTime == rhs.lastAccessTime)) + return false; + if (!(retention == rhs.retention)) + return false; + if (!(sd == rhs.sd)) + return false; + if (!(partitionKeys == rhs.partitionKeys)) + return false; + if (!(parameters == rhs.parameters)) + return false; + if (!(viewOriginalText == rhs.viewOriginalText)) + return false; + if (!(viewExpandedText == rhs.viewExpandedText)) + return false; + if (!(tableType == rhs.tableType)) + return false; + if (__isset.privileges != rhs.__isset.privileges) + return false; + else if (__isset.privileges && !(privileges == rhs.privileges)) + return false; + if (__isset.temporary != rhs.__isset.temporary) + return false; + else if (__isset.temporary && !(temporary == rhs.temporary)) + return false; + if (__isset.rewriteEnabled != rhs.__isset.rewriteEnabled) + return false; + else if (__isset.rewriteEnabled && !(rewriteEnabled == rhs.rewriteEnabled)) + return false; + return true; + } + bool operator != (const Table &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Table & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Table &a, Table &b); + +inline std::ostream& operator<<(std::ostream& out, const Table& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _Partition__isset { + _Partition__isset() : values(false), dbName(false), tableName(false), createTime(false), lastAccessTime(false), sd(false), parameters(false), privileges(false) {} + bool values :1; + bool dbName :1; + bool tableName :1; + bool createTime :1; + bool lastAccessTime :1; + bool sd :1; + bool parameters :1; + bool privileges :1; +} _Partition__isset; + +class Partition { + public: + + Partition(const Partition&); + Partition& operator=(const Partition&); + Partition() : dbName(), tableName(), createTime(0), lastAccessTime(0) { + } + + virtual ~Partition() throw(); + std::vector values; + std::string dbName; + std::string tableName; + int32_t createTime; + int32_t lastAccessTime; + StorageDescriptor sd; + std::map parameters; + PrincipalPrivilegeSet privileges; + + _Partition__isset __isset; + + void __set_values(const std::vector & val); + + void __set_dbName(const std::string& val); + + void __set_tableName(const std::string& val); + + void __set_createTime(const int32_t val); + + void __set_lastAccessTime(const int32_t val); + + void __set_sd(const StorageDescriptor& val); + + void __set_parameters(const std::map & val); + + void __set_privileges(const PrincipalPrivilegeSet& val); + + bool operator == (const Partition & rhs) const + { + if (!(values == rhs.values)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(lastAccessTime == rhs.lastAccessTime)) + return false; + if (!(sd == rhs.sd)) + return false; + if (!(parameters == rhs.parameters)) + return false; + if (__isset.privileges != rhs.__isset.privileges) + return false; + else if (__isset.privileges && !(privileges == rhs.privileges)) + return false; + return true; + } + bool operator != (const Partition &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Partition & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Partition &a, Partition &b); + +inline std::ostream& operator<<(std::ostream& out, const Partition& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _PartitionWithoutSD__isset { + _PartitionWithoutSD__isset() : values(false), createTime(false), lastAccessTime(false), relativePath(false), parameters(false), privileges(false) {} + bool values :1; + bool createTime :1; + bool lastAccessTime :1; + bool relativePath :1; + bool parameters :1; + bool privileges :1; +} _PartitionWithoutSD__isset; + +class PartitionWithoutSD { + public: + + PartitionWithoutSD(const PartitionWithoutSD&); + PartitionWithoutSD& operator=(const PartitionWithoutSD&); + PartitionWithoutSD() : createTime(0), lastAccessTime(0), relativePath() { + } + + virtual ~PartitionWithoutSD() throw(); + std::vector values; + int32_t createTime; + int32_t lastAccessTime; + std::string relativePath; + std::map parameters; + PrincipalPrivilegeSet privileges; + + _PartitionWithoutSD__isset __isset; + + void __set_values(const std::vector & val); + + void __set_createTime(const int32_t val); + + void __set_lastAccessTime(const int32_t val); + + void __set_relativePath(const std::string& val); + + void __set_parameters(const std::map & val); + + void __set_privileges(const PrincipalPrivilegeSet& val); + + bool operator == (const PartitionWithoutSD & rhs) const + { + if (!(values == rhs.values)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(lastAccessTime == rhs.lastAccessTime)) + return false; + if (!(relativePath == rhs.relativePath)) + return false; + if (!(parameters == rhs.parameters)) + return false; + if (__isset.privileges != rhs.__isset.privileges) + return false; + else if (__isset.privileges && !(privileges == rhs.privileges)) + return false; + return true; + } + bool operator != (const PartitionWithoutSD &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PartitionWithoutSD & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PartitionWithoutSD &a, PartitionWithoutSD &b); + +inline std::ostream& operator<<(std::ostream& out, const PartitionWithoutSD& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _PartitionSpecWithSharedSD__isset { + _PartitionSpecWithSharedSD__isset() : partitions(false), sd(false) {} + bool partitions :1; + bool sd :1; +} _PartitionSpecWithSharedSD__isset; + +class PartitionSpecWithSharedSD { + public: + + PartitionSpecWithSharedSD(const PartitionSpecWithSharedSD&); + PartitionSpecWithSharedSD& operator=(const PartitionSpecWithSharedSD&); + PartitionSpecWithSharedSD() { + } + + virtual ~PartitionSpecWithSharedSD() throw(); + std::vector partitions; + StorageDescriptor sd; + + _PartitionSpecWithSharedSD__isset __isset; + + void __set_partitions(const std::vector & val); + + void __set_sd(const StorageDescriptor& val); + + bool operator == (const PartitionSpecWithSharedSD & rhs) const + { + if (!(partitions == rhs.partitions)) + return false; + if (!(sd == rhs.sd)) + return false; + return true; + } + bool operator != (const PartitionSpecWithSharedSD &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PartitionSpecWithSharedSD & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PartitionSpecWithSharedSD &a, PartitionSpecWithSharedSD &b); + +inline std::ostream& operator<<(std::ostream& out, const PartitionSpecWithSharedSD& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _PartitionListComposingSpec__isset { + _PartitionListComposingSpec__isset() : partitions(false) {} + bool partitions :1; +} _PartitionListComposingSpec__isset; + +class PartitionListComposingSpec { + public: + + PartitionListComposingSpec(const PartitionListComposingSpec&); + PartitionListComposingSpec& operator=(const PartitionListComposingSpec&); + PartitionListComposingSpec() { + } + + virtual ~PartitionListComposingSpec() throw(); + std::vector partitions; + + _PartitionListComposingSpec__isset __isset; + + void __set_partitions(const std::vector & val); + + bool operator == (const PartitionListComposingSpec & rhs) const + { + if (!(partitions == rhs.partitions)) + return false; + return true; + } + bool operator != (const PartitionListComposingSpec &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PartitionListComposingSpec & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PartitionListComposingSpec &a, PartitionListComposingSpec &b); + +inline std::ostream& operator<<(std::ostream& out, const PartitionListComposingSpec& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _PartitionSpec__isset { + _PartitionSpec__isset() : dbName(false), tableName(false), rootPath(false), sharedSDPartitionSpec(false), partitionList(false) {} + bool dbName :1; + bool tableName :1; + bool rootPath :1; + bool sharedSDPartitionSpec :1; + bool partitionList :1; +} _PartitionSpec__isset; + +class PartitionSpec { + public: + + PartitionSpec(const PartitionSpec&); + PartitionSpec& operator=(const PartitionSpec&); + PartitionSpec() : dbName(), tableName(), rootPath() { + } + + virtual ~PartitionSpec() throw(); + std::string dbName; + std::string tableName; + std::string rootPath; + PartitionSpecWithSharedSD sharedSDPartitionSpec; + PartitionListComposingSpec partitionList; + + _PartitionSpec__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_tableName(const std::string& val); + + void __set_rootPath(const std::string& val); + + void __set_sharedSDPartitionSpec(const PartitionSpecWithSharedSD& val); + + void __set_partitionList(const PartitionListComposingSpec& val); + + bool operator == (const PartitionSpec & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(rootPath == rhs.rootPath)) + return false; + if (__isset.sharedSDPartitionSpec != rhs.__isset.sharedSDPartitionSpec) + return false; + else if (__isset.sharedSDPartitionSpec && !(sharedSDPartitionSpec == rhs.sharedSDPartitionSpec)) + return false; + if (__isset.partitionList != rhs.__isset.partitionList) + return false; + else if (__isset.partitionList && !(partitionList == rhs.partitionList)) + return false; + return true; + } + bool operator != (const PartitionSpec &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PartitionSpec & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PartitionSpec &a, PartitionSpec &b); + +inline std::ostream& operator<<(std::ostream& out, const PartitionSpec& obj) +{ + obj.printTo(out); + return out; +} + +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 :1; + bool indexHandlerClass :1; + bool dbName :1; + bool origTableName :1; + bool createTime :1; + bool lastAccessTime :1; + bool indexTableName :1; + bool sd :1; + bool parameters :1; + bool deferredRebuild :1; +} _Index__isset; + +class Index { + public: + + Index(const Index&); + Index& operator=(const Index&); + Index() : indexName(), indexHandlerClass(), dbName(), origTableName(), createTime(0), lastAccessTime(0), indexTableName(), deferredRebuild(0) { + } + + virtual ~Index() throw(); + std::string indexName; + std::string indexHandlerClass; + std::string dbName; + std::string origTableName; + int32_t createTime; + int32_t lastAccessTime; + std::string indexTableName; + StorageDescriptor sd; + std::map parameters; + bool deferredRebuild; + + _Index__isset __isset; + + void __set_indexName(const std::string& val); + + void __set_indexHandlerClass(const std::string& val); + + void __set_dbName(const std::string& val); + + void __set_origTableName(const std::string& val); + + void __set_createTime(const int32_t val); + + void __set_lastAccessTime(const int32_t val); + + void __set_indexTableName(const std::string& val); + + void __set_sd(const StorageDescriptor& val); + + void __set_parameters(const std::map & val); + + void __set_deferredRebuild(const bool val); + + bool operator == (const Index & rhs) const + { + if (!(indexName == rhs.indexName)) + return false; + if (!(indexHandlerClass == rhs.indexHandlerClass)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(origTableName == rhs.origTableName)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(lastAccessTime == rhs.lastAccessTime)) + return false; + if (!(indexTableName == rhs.indexTableName)) + return false; + if (!(sd == rhs.sd)) + return false; + if (!(parameters == rhs.parameters)) + return false; + if (!(deferredRebuild == rhs.deferredRebuild)) + return false; + return true; + } + bool operator != (const Index &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Index & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Index &a, Index &b); + +inline std::ostream& operator<<(std::ostream& out, const Index& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _BooleanColumnStatsData__isset { + _BooleanColumnStatsData__isset() : bitVectors(false) {} + bool bitVectors :1; +} _BooleanColumnStatsData__isset; + +class BooleanColumnStatsData { + public: + + BooleanColumnStatsData(const BooleanColumnStatsData&); + BooleanColumnStatsData& operator=(const BooleanColumnStatsData&); + BooleanColumnStatsData() : numTrues(0), numFalses(0), numNulls(0), bitVectors() { + } + + virtual ~BooleanColumnStatsData() throw(); + int64_t numTrues; + int64_t numFalses; + int64_t numNulls; + std::string bitVectors; + + _BooleanColumnStatsData__isset __isset; + + void __set_numTrues(const int64_t val); + + void __set_numFalses(const int64_t val); + + void __set_numNulls(const int64_t val); + + void __set_bitVectors(const std::string& val); + + bool operator == (const BooleanColumnStatsData & rhs) const + { + if (!(numTrues == rhs.numTrues)) + return false; + if (!(numFalses == rhs.numFalses)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + if (__isset.bitVectors != rhs.__isset.bitVectors) + return false; + else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) + return false; + return true; + } + bool operator != (const BooleanColumnStatsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const BooleanColumnStatsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(BooleanColumnStatsData &a, BooleanColumnStatsData &b); + +inline std::ostream& operator<<(std::ostream& out, const BooleanColumnStatsData& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _DoubleColumnStatsData__isset { + _DoubleColumnStatsData__isset() : lowValue(false), highValue(false), bitVectors(false) {} + bool lowValue :1; + bool highValue :1; + bool bitVectors :1; +} _DoubleColumnStatsData__isset; + +class DoubleColumnStatsData { + public: + + DoubleColumnStatsData(const DoubleColumnStatsData&); + DoubleColumnStatsData& operator=(const DoubleColumnStatsData&); + DoubleColumnStatsData() : lowValue(0), highValue(0), numNulls(0), numDVs(0), bitVectors() { + } + + virtual ~DoubleColumnStatsData() throw(); + double lowValue; + double highValue; + int64_t numNulls; + int64_t numDVs; + std::string bitVectors; + + _DoubleColumnStatsData__isset __isset; + + void __set_lowValue(const double val); + + void __set_highValue(const double val); + + void __set_numNulls(const int64_t val); + + void __set_numDVs(const int64_t val); + + void __set_bitVectors(const std::string& val); + + bool operator == (const DoubleColumnStatsData & rhs) const + { + if (__isset.lowValue != rhs.__isset.lowValue) + return false; + else if (__isset.lowValue && !(lowValue == rhs.lowValue)) + return false; + if (__isset.highValue != rhs.__isset.highValue) + return false; + else if (__isset.highValue && !(highValue == rhs.highValue)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + if (!(numDVs == rhs.numDVs)) + return false; + if (__isset.bitVectors != rhs.__isset.bitVectors) + return false; + else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) + return false; + return true; + } + bool operator != (const DoubleColumnStatsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const DoubleColumnStatsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(DoubleColumnStatsData &a, DoubleColumnStatsData &b); + +inline std::ostream& operator<<(std::ostream& out, const DoubleColumnStatsData& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _LongColumnStatsData__isset { + _LongColumnStatsData__isset() : lowValue(false), highValue(false), bitVectors(false) {} + bool lowValue :1; + bool highValue :1; + bool bitVectors :1; +} _LongColumnStatsData__isset; + +class LongColumnStatsData { + public: + + LongColumnStatsData(const LongColumnStatsData&); + LongColumnStatsData& operator=(const LongColumnStatsData&); + LongColumnStatsData() : lowValue(0), highValue(0), numNulls(0), numDVs(0), bitVectors() { + } + + virtual ~LongColumnStatsData() throw(); + int64_t lowValue; + int64_t highValue; + int64_t numNulls; + int64_t numDVs; + std::string bitVectors; + + _LongColumnStatsData__isset __isset; + + void __set_lowValue(const int64_t val); + + void __set_highValue(const int64_t val); + + void __set_numNulls(const int64_t val); + + void __set_numDVs(const int64_t val); + + void __set_bitVectors(const std::string& val); + + bool operator == (const LongColumnStatsData & rhs) const + { + if (__isset.lowValue != rhs.__isset.lowValue) + return false; + else if (__isset.lowValue && !(lowValue == rhs.lowValue)) + return false; + if (__isset.highValue != rhs.__isset.highValue) + return false; + else if (__isset.highValue && !(highValue == rhs.highValue)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + if (!(numDVs == rhs.numDVs)) + return false; + if (__isset.bitVectors != rhs.__isset.bitVectors) + return false; + else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) + return false; + return true; + } + bool operator != (const LongColumnStatsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const LongColumnStatsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(LongColumnStatsData &a, LongColumnStatsData &b); + +inline std::ostream& operator<<(std::ostream& out, const LongColumnStatsData& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _StringColumnStatsData__isset { + _StringColumnStatsData__isset() : bitVectors(false) {} + bool bitVectors :1; +} _StringColumnStatsData__isset; + +class StringColumnStatsData { + public: + + StringColumnStatsData(const StringColumnStatsData&); + StringColumnStatsData& operator=(const StringColumnStatsData&); + StringColumnStatsData() : maxColLen(0), avgColLen(0), numNulls(0), numDVs(0), bitVectors() { + } + + virtual ~StringColumnStatsData() throw(); + int64_t maxColLen; + double avgColLen; + int64_t numNulls; + int64_t numDVs; + std::string bitVectors; + + _StringColumnStatsData__isset __isset; + + void __set_maxColLen(const int64_t val); + + void __set_avgColLen(const double val); + + void __set_numNulls(const int64_t val); + + void __set_numDVs(const int64_t val); + + void __set_bitVectors(const std::string& val); + + bool operator == (const StringColumnStatsData & rhs) const + { + if (!(maxColLen == rhs.maxColLen)) + return false; + if (!(avgColLen == rhs.avgColLen)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + if (!(numDVs == rhs.numDVs)) + return false; + if (__isset.bitVectors != rhs.__isset.bitVectors) + return false; + else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) + return false; + return true; + } + bool operator != (const StringColumnStatsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const StringColumnStatsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(StringColumnStatsData &a, StringColumnStatsData &b); + +inline std::ostream& operator<<(std::ostream& out, const StringColumnStatsData& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _BinaryColumnStatsData__isset { + _BinaryColumnStatsData__isset() : bitVectors(false) {} + bool bitVectors :1; +} _BinaryColumnStatsData__isset; + +class BinaryColumnStatsData { + public: + + BinaryColumnStatsData(const BinaryColumnStatsData&); + BinaryColumnStatsData& operator=(const BinaryColumnStatsData&); + BinaryColumnStatsData() : maxColLen(0), avgColLen(0), numNulls(0), bitVectors() { + } + + virtual ~BinaryColumnStatsData() throw(); + int64_t maxColLen; + double avgColLen; + int64_t numNulls; + std::string bitVectors; + + _BinaryColumnStatsData__isset __isset; + + void __set_maxColLen(const int64_t val); + + void __set_avgColLen(const double val); + + void __set_numNulls(const int64_t val); + + void __set_bitVectors(const std::string& val); + + bool operator == (const BinaryColumnStatsData & rhs) const + { + if (!(maxColLen == rhs.maxColLen)) + return false; + if (!(avgColLen == rhs.avgColLen)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + if (__isset.bitVectors != rhs.__isset.bitVectors) + return false; + else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) + return false; + return true; + } + bool operator != (const BinaryColumnStatsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const BinaryColumnStatsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(BinaryColumnStatsData &a, BinaryColumnStatsData &b); + +inline std::ostream& operator<<(std::ostream& out, const BinaryColumnStatsData& obj) +{ + obj.printTo(out); + return out; +} + + +class Decimal { + public: + + Decimal(const Decimal&); + Decimal& operator=(const Decimal&); + Decimal() : unscaled(), scale(0) { + } + + virtual ~Decimal() throw(); + std::string unscaled; + int16_t scale; + + void __set_unscaled(const std::string& val); + + void __set_scale(const int16_t val); + + bool operator == (const Decimal & rhs) const + { + if (!(unscaled == rhs.unscaled)) + return false; + if (!(scale == rhs.scale)) + return false; + return true; + } + bool operator != (const Decimal &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Decimal & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Decimal &a, Decimal &b); + +inline std::ostream& operator<<(std::ostream& out, const Decimal& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _DecimalColumnStatsData__isset { + _DecimalColumnStatsData__isset() : lowValue(false), highValue(false), bitVectors(false) {} + bool lowValue :1; + bool highValue :1; + bool bitVectors :1; +} _DecimalColumnStatsData__isset; + +class DecimalColumnStatsData { + public: + + DecimalColumnStatsData(const DecimalColumnStatsData&); + DecimalColumnStatsData& operator=(const DecimalColumnStatsData&); + DecimalColumnStatsData() : numNulls(0), numDVs(0), bitVectors() { + } + + virtual ~DecimalColumnStatsData() throw(); + Decimal lowValue; + Decimal highValue; + int64_t numNulls; + int64_t numDVs; + std::string bitVectors; + + _DecimalColumnStatsData__isset __isset; + + void __set_lowValue(const Decimal& val); + + void __set_highValue(const Decimal& val); + + void __set_numNulls(const int64_t val); + + void __set_numDVs(const int64_t val); + + void __set_bitVectors(const std::string& val); + + bool operator == (const DecimalColumnStatsData & rhs) const + { + if (__isset.lowValue != rhs.__isset.lowValue) + return false; + else if (__isset.lowValue && !(lowValue == rhs.lowValue)) + return false; + if (__isset.highValue != rhs.__isset.highValue) + return false; + else if (__isset.highValue && !(highValue == rhs.highValue)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + if (!(numDVs == rhs.numDVs)) + return false; + if (__isset.bitVectors != rhs.__isset.bitVectors) + return false; + else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) + return false; + return true; + } + bool operator != (const DecimalColumnStatsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const DecimalColumnStatsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(DecimalColumnStatsData &a, DecimalColumnStatsData &b); + +inline std::ostream& operator<<(std::ostream& out, const DecimalColumnStatsData& obj) +{ + obj.printTo(out); + return out; +} + + +class Date { + public: + + Date(const Date&); + Date& operator=(const Date&); + Date() : daysSinceEpoch(0) { + } + + virtual ~Date() throw(); + int64_t daysSinceEpoch; + + void __set_daysSinceEpoch(const int64_t val); + + bool operator == (const Date & rhs) const + { + if (!(daysSinceEpoch == rhs.daysSinceEpoch)) + return false; + return true; + } + bool operator != (const Date &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Date & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Date &a, Date &b); + +inline std::ostream& operator<<(std::ostream& out, const Date& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _DateColumnStatsData__isset { + _DateColumnStatsData__isset() : lowValue(false), highValue(false), bitVectors(false) {} + bool lowValue :1; + bool highValue :1; + bool bitVectors :1; +} _DateColumnStatsData__isset; + +class DateColumnStatsData { + public: + + DateColumnStatsData(const DateColumnStatsData&); + DateColumnStatsData& operator=(const DateColumnStatsData&); + DateColumnStatsData() : numNulls(0), numDVs(0), bitVectors() { + } + + virtual ~DateColumnStatsData() throw(); + Date lowValue; + Date highValue; + int64_t numNulls; + int64_t numDVs; + std::string bitVectors; + + _DateColumnStatsData__isset __isset; + + void __set_lowValue(const Date& val); + + void __set_highValue(const Date& val); + + void __set_numNulls(const int64_t val); + + void __set_numDVs(const int64_t val); + + void __set_bitVectors(const std::string& val); + + bool operator == (const DateColumnStatsData & rhs) const + { + if (__isset.lowValue != rhs.__isset.lowValue) + return false; + else if (__isset.lowValue && !(lowValue == rhs.lowValue)) + return false; + if (__isset.highValue != rhs.__isset.highValue) + return false; + else if (__isset.highValue && !(highValue == rhs.highValue)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + if (!(numDVs == rhs.numDVs)) + return false; + if (__isset.bitVectors != rhs.__isset.bitVectors) + return false; + else if (__isset.bitVectors && !(bitVectors == rhs.bitVectors)) + return false; + return true; + } + bool operator != (const DateColumnStatsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const DateColumnStatsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(DateColumnStatsData &a, DateColumnStatsData &b); + +inline std::ostream& operator<<(std::ostream& out, const DateColumnStatsData& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _ColumnStatisticsData__isset { + _ColumnStatisticsData__isset() : booleanStats(false), longStats(false), doubleStats(false), stringStats(false), binaryStats(false), decimalStats(false), dateStats(false) {} + bool booleanStats :1; + bool longStats :1; + bool doubleStats :1; + bool stringStats :1; + bool binaryStats :1; + bool decimalStats :1; + bool dateStats :1; +} _ColumnStatisticsData__isset; + +class ColumnStatisticsData { + public: + + ColumnStatisticsData(const ColumnStatisticsData&); + ColumnStatisticsData& operator=(const ColumnStatisticsData&); + ColumnStatisticsData() { + } + + virtual ~ColumnStatisticsData() throw(); + BooleanColumnStatsData booleanStats; + LongColumnStatsData longStats; + DoubleColumnStatsData doubleStats; + StringColumnStatsData stringStats; + BinaryColumnStatsData binaryStats; + DecimalColumnStatsData decimalStats; + DateColumnStatsData dateStats; + + _ColumnStatisticsData__isset __isset; + + void __set_booleanStats(const BooleanColumnStatsData& val); + + void __set_longStats(const LongColumnStatsData& val); + + void __set_doubleStats(const DoubleColumnStatsData& val); + + void __set_stringStats(const StringColumnStatsData& val); + + void __set_binaryStats(const BinaryColumnStatsData& val); + + void __set_decimalStats(const DecimalColumnStatsData& val); + + void __set_dateStats(const DateColumnStatsData& val); + + bool operator == (const ColumnStatisticsData & rhs) const + { + if (!(booleanStats == rhs.booleanStats)) + return false; + if (!(longStats == rhs.longStats)) + return false; + if (!(doubleStats == rhs.doubleStats)) + return false; + if (!(stringStats == rhs.stringStats)) + return false; + if (!(binaryStats == rhs.binaryStats)) + return false; + if (!(decimalStats == rhs.decimalStats)) + return false; + if (!(dateStats == rhs.dateStats)) + return false; + return true; + } + bool operator != (const ColumnStatisticsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ColumnStatisticsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ColumnStatisticsData &a, ColumnStatisticsData &b); + +inline std::ostream& operator<<(std::ostream& out, const ColumnStatisticsData& obj) +{ + obj.printTo(out); + return out; +} + + +class ColumnStatisticsObj { + public: + + ColumnStatisticsObj(const ColumnStatisticsObj&); + ColumnStatisticsObj& operator=(const ColumnStatisticsObj&); + ColumnStatisticsObj() : colName(), colType() { + } + + virtual ~ColumnStatisticsObj() throw(); + std::string colName; + std::string colType; + ColumnStatisticsData statsData; + + void __set_colName(const std::string& val); + + void __set_colType(const std::string& val); + + void __set_statsData(const ColumnStatisticsData& val); + + bool operator == (const ColumnStatisticsObj & rhs) const + { + if (!(colName == rhs.colName)) + return false; + if (!(colType == rhs.colType)) + return false; + if (!(statsData == rhs.statsData)) + return false; + return true; + } + bool operator != (const ColumnStatisticsObj &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ColumnStatisticsObj & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ColumnStatisticsObj &a, ColumnStatisticsObj &b); + +inline std::ostream& operator<<(std::ostream& out, const ColumnStatisticsObj& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _ColumnStatisticsDesc__isset { + _ColumnStatisticsDesc__isset() : partName(false), lastAnalyzed(false) {} + bool partName :1; + bool lastAnalyzed :1; +} _ColumnStatisticsDesc__isset; + +class ColumnStatisticsDesc { + public: + + ColumnStatisticsDesc(const ColumnStatisticsDesc&); + ColumnStatisticsDesc& operator=(const ColumnStatisticsDesc&); + ColumnStatisticsDesc() : isTblLevel(0), dbName(), tableName(), partName(), lastAnalyzed(0) { + } + + virtual ~ColumnStatisticsDesc() throw(); + bool isTblLevel; + std::string dbName; + std::string tableName; + std::string partName; + int64_t lastAnalyzed; + + _ColumnStatisticsDesc__isset __isset; + + void __set_isTblLevel(const bool val); + + void __set_dbName(const std::string& val); + + void __set_tableName(const std::string& val); + + void __set_partName(const std::string& val); + + void __set_lastAnalyzed(const int64_t val); + + bool operator == (const ColumnStatisticsDesc & rhs) const + { + if (!(isTblLevel == rhs.isTblLevel)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (__isset.partName != rhs.__isset.partName) + return false; + else if (__isset.partName && !(partName == rhs.partName)) + return false; + if (__isset.lastAnalyzed != rhs.__isset.lastAnalyzed) + return false; + else if (__isset.lastAnalyzed && !(lastAnalyzed == rhs.lastAnalyzed)) + return false; + return true; + } + bool operator != (const ColumnStatisticsDesc &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ColumnStatisticsDesc & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ColumnStatisticsDesc &a, ColumnStatisticsDesc &b); + +inline std::ostream& operator<<(std::ostream& out, const ColumnStatisticsDesc& obj) +{ + obj.printTo(out); + return out; +} + + +class ColumnStatistics { + public: + + ColumnStatistics(const ColumnStatistics&); + ColumnStatistics& operator=(const ColumnStatistics&); + ColumnStatistics() { + } + + virtual ~ColumnStatistics() throw(); + ColumnStatisticsDesc statsDesc; + std::vector statsObj; + + void __set_statsDesc(const ColumnStatisticsDesc& val); + + void __set_statsObj(const std::vector & val); + + bool operator == (const ColumnStatistics & rhs) const + { + if (!(statsDesc == rhs.statsDesc)) + return false; + if (!(statsObj == rhs.statsObj)) + return false; + return true; + } + bool operator != (const ColumnStatistics &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ColumnStatistics & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ColumnStatistics &a, ColumnStatistics &b); + +inline std::ostream& operator<<(std::ostream& out, const ColumnStatistics& obj) +{ + obj.printTo(out); + return out; +} + + +class AggrStats { + public: + + AggrStats(const AggrStats&); + AggrStats& operator=(const AggrStats&); + AggrStats() : partsFound(0) { + } + + virtual ~AggrStats() throw(); + std::vector colStats; + int64_t partsFound; + + void __set_colStats(const std::vector & val); + + void __set_partsFound(const int64_t val); + + bool operator == (const AggrStats & rhs) const + { + if (!(colStats == rhs.colStats)) + return false; + if (!(partsFound == rhs.partsFound)) + return false; + return true; + } + bool operator != (const AggrStats &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AggrStats & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(AggrStats &a, AggrStats &b); + +inline std::ostream& operator<<(std::ostream& out, const AggrStats& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _SetPartitionsStatsRequest__isset { + _SetPartitionsStatsRequest__isset() : needMerge(false) {} + bool needMerge :1; +} _SetPartitionsStatsRequest__isset; + +class SetPartitionsStatsRequest { + public: + + SetPartitionsStatsRequest(const SetPartitionsStatsRequest&); + SetPartitionsStatsRequest& operator=(const SetPartitionsStatsRequest&); + SetPartitionsStatsRequest() : needMerge(0) { + } + + virtual ~SetPartitionsStatsRequest() throw(); + std::vector colStats; + bool needMerge; + + _SetPartitionsStatsRequest__isset __isset; + + void __set_colStats(const std::vector & val); + + void __set_needMerge(const bool val); + + bool operator == (const SetPartitionsStatsRequest & rhs) const + { + if (!(colStats == rhs.colStats)) + return false; + if (__isset.needMerge != rhs.__isset.needMerge) + return false; + else if (__isset.needMerge && !(needMerge == rhs.needMerge)) + return false; + return true; + } + bool operator != (const SetPartitionsStatsRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SetPartitionsStatsRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(SetPartitionsStatsRequest &a, SetPartitionsStatsRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const SetPartitionsStatsRequest& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _Schema__isset { + _Schema__isset() : fieldSchemas(false), properties(false) {} + bool fieldSchemas :1; + bool properties :1; +} _Schema__isset; + +class Schema { + public: + + Schema(const Schema&); + Schema& operator=(const Schema&); + Schema() { + } + + virtual ~Schema() throw(); + std::vector fieldSchemas; + std::map properties; + + _Schema__isset __isset; + + void __set_fieldSchemas(const std::vector & val); + + void __set_properties(const std::map & val); + + bool operator == (const Schema & rhs) const + { + if (!(fieldSchemas == rhs.fieldSchemas)) + return false; + if (!(properties == rhs.properties)) + return false; + return true; + } + bool operator != (const Schema &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Schema & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Schema &a, Schema &b); + +inline std::ostream& operator<<(std::ostream& out, const Schema& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _EnvironmentContext__isset { + _EnvironmentContext__isset() : properties(false) {} + bool properties :1; +} _EnvironmentContext__isset; + +class EnvironmentContext { + public: + + EnvironmentContext(const EnvironmentContext&); + EnvironmentContext& operator=(const EnvironmentContext&); + EnvironmentContext() { + } + + virtual ~EnvironmentContext() throw(); + std::map properties; + + _EnvironmentContext__isset __isset; + + void __set_properties(const std::map & val); + + bool operator == (const EnvironmentContext & rhs) const + { + if (!(properties == rhs.properties)) + return false; + return true; + } + bool operator != (const EnvironmentContext &rhs) const { + return !(*this == rhs); + } + + bool operator < (const EnvironmentContext & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(EnvironmentContext &a, EnvironmentContext &b); + +inline std::ostream& operator<<(std::ostream& out, const EnvironmentContext& obj) +{ + obj.printTo(out); + return out; +} + + +class PrimaryKeysRequest { + public: + + PrimaryKeysRequest(const PrimaryKeysRequest&); + PrimaryKeysRequest& operator=(const PrimaryKeysRequest&); + PrimaryKeysRequest() : db_name(), tbl_name() { + } + + virtual ~PrimaryKeysRequest() throw(); + std::string db_name; + std::string tbl_name; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + bool operator == (const PrimaryKeysRequest & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + return true; + } + bool operator != (const PrimaryKeysRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PrimaryKeysRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PrimaryKeysRequest &a, PrimaryKeysRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const PrimaryKeysRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class PrimaryKeysResponse { + public: + + PrimaryKeysResponse(const PrimaryKeysResponse&); + PrimaryKeysResponse& operator=(const PrimaryKeysResponse&); + PrimaryKeysResponse() { + } + + virtual ~PrimaryKeysResponse() throw(); + std::vector primaryKeys; + + void __set_primaryKeys(const std::vector & val); + + bool operator == (const PrimaryKeysResponse & rhs) const + { + if (!(primaryKeys == rhs.primaryKeys)) + return false; + return true; + } + bool operator != (const PrimaryKeysResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PrimaryKeysResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PrimaryKeysResponse &a, PrimaryKeysResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const PrimaryKeysResponse& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _ForeignKeysRequest__isset { + _ForeignKeysRequest__isset() : parent_db_name(false), parent_tbl_name(false), foreign_db_name(false), foreign_tbl_name(false) {} + bool parent_db_name :1; + bool parent_tbl_name :1; + bool foreign_db_name :1; + bool foreign_tbl_name :1; +} _ForeignKeysRequest__isset; + +class ForeignKeysRequest { + public: + + ForeignKeysRequest(const ForeignKeysRequest&); + ForeignKeysRequest& operator=(const ForeignKeysRequest&); + ForeignKeysRequest() : parent_db_name(), parent_tbl_name(), foreign_db_name(), foreign_tbl_name() { + } + + virtual ~ForeignKeysRequest() throw(); + std::string parent_db_name; + std::string parent_tbl_name; + std::string foreign_db_name; + std::string foreign_tbl_name; + + _ForeignKeysRequest__isset __isset; + + void __set_parent_db_name(const std::string& val); + + void __set_parent_tbl_name(const std::string& val); + + void __set_foreign_db_name(const std::string& val); + + void __set_foreign_tbl_name(const std::string& val); + + bool operator == (const ForeignKeysRequest & rhs) const + { + if (!(parent_db_name == rhs.parent_db_name)) + return false; + if (!(parent_tbl_name == rhs.parent_tbl_name)) + return false; + if (!(foreign_db_name == rhs.foreign_db_name)) + return false; + if (!(foreign_tbl_name == rhs.foreign_tbl_name)) + return false; + return true; + } + bool operator != (const ForeignKeysRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ForeignKeysRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ForeignKeysRequest &a, ForeignKeysRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const ForeignKeysRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class ForeignKeysResponse { + public: + + ForeignKeysResponse(const ForeignKeysResponse&); + ForeignKeysResponse& operator=(const ForeignKeysResponse&); + ForeignKeysResponse() { + } + + virtual ~ForeignKeysResponse() throw(); + std::vector foreignKeys; + + void __set_foreignKeys(const std::vector & val); + + bool operator == (const ForeignKeysResponse & rhs) const + { + if (!(foreignKeys == rhs.foreignKeys)) + return false; + return true; + } + bool operator != (const ForeignKeysResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ForeignKeysResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ForeignKeysResponse &a, ForeignKeysResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const ForeignKeysResponse& obj) +{ + obj.printTo(out); + return out; +} + + +class UniqueConstraintsRequest { + public: + + UniqueConstraintsRequest(const UniqueConstraintsRequest&); + UniqueConstraintsRequest& operator=(const UniqueConstraintsRequest&); + UniqueConstraintsRequest() : db_name(), tbl_name() { + } + + virtual ~UniqueConstraintsRequest() throw(); + std::string db_name; + std::string tbl_name; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + bool operator == (const UniqueConstraintsRequest & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + return true; + } + bool operator != (const UniqueConstraintsRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const UniqueConstraintsRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(UniqueConstraintsRequest &a, UniqueConstraintsRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const UniqueConstraintsRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class UniqueConstraintsResponse { + public: + + UniqueConstraintsResponse(const UniqueConstraintsResponse&); + UniqueConstraintsResponse& operator=(const UniqueConstraintsResponse&); + UniqueConstraintsResponse() { + } + + virtual ~UniqueConstraintsResponse() throw(); + std::vector uniqueConstraints; + + void __set_uniqueConstraints(const std::vector & val); + + bool operator == (const UniqueConstraintsResponse & rhs) const + { + if (!(uniqueConstraints == rhs.uniqueConstraints)) + return false; + return true; + } + bool operator != (const UniqueConstraintsResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const UniqueConstraintsResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(UniqueConstraintsResponse &a, UniqueConstraintsResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const UniqueConstraintsResponse& obj) +{ + obj.printTo(out); + return out; +} + + +class NotNullConstraintsRequest { + public: + + NotNullConstraintsRequest(const NotNullConstraintsRequest&); + NotNullConstraintsRequest& operator=(const NotNullConstraintsRequest&); + NotNullConstraintsRequest() : db_name(), tbl_name() { + } + + virtual ~NotNullConstraintsRequest() throw(); + std::string db_name; + std::string tbl_name; + + void __set_db_name(const std::string& val); + + void __set_tbl_name(const std::string& val); + + bool operator == (const NotNullConstraintsRequest & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + return true; + } + bool operator != (const NotNullConstraintsRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NotNullConstraintsRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(NotNullConstraintsRequest &a, NotNullConstraintsRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const NotNullConstraintsRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class NotNullConstraintsResponse { + public: + + NotNullConstraintsResponse(const NotNullConstraintsResponse&); + NotNullConstraintsResponse& operator=(const NotNullConstraintsResponse&); + NotNullConstraintsResponse() { + } + + virtual ~NotNullConstraintsResponse() throw(); + std::vector notNullConstraints; + + void __set_notNullConstraints(const std::vector & val); + + bool operator == (const NotNullConstraintsResponse & rhs) const + { + if (!(notNullConstraints == rhs.notNullConstraints)) + return false; + return true; + } + bool operator != (const NotNullConstraintsResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NotNullConstraintsResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(NotNullConstraintsResponse &a, NotNullConstraintsResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const NotNullConstraintsResponse& obj) +{ + obj.printTo(out); + return out; +} + + +class DropConstraintRequest { + public: + + DropConstraintRequest(const DropConstraintRequest&); + DropConstraintRequest& operator=(const DropConstraintRequest&); + DropConstraintRequest() : dbname(), tablename(), constraintname() { + } + + virtual ~DropConstraintRequest() throw(); + std::string dbname; + std::string tablename; + std::string constraintname; + + void __set_dbname(const std::string& val); + + void __set_tablename(const std::string& val); + + void __set_constraintname(const std::string& val); + + bool operator == (const DropConstraintRequest & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(tablename == rhs.tablename)) + return false; + if (!(constraintname == rhs.constraintname)) + return false; + return true; + } + bool operator != (const DropConstraintRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const DropConstraintRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(DropConstraintRequest &a, DropConstraintRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const DropConstraintRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class AddPrimaryKeyRequest { + public: + + AddPrimaryKeyRequest(const AddPrimaryKeyRequest&); + AddPrimaryKeyRequest& operator=(const AddPrimaryKeyRequest&); + AddPrimaryKeyRequest() { + } + + virtual ~AddPrimaryKeyRequest() throw(); + std::vector primaryKeyCols; + + void __set_primaryKeyCols(const std::vector & val); + + bool operator == (const AddPrimaryKeyRequest & rhs) const + { + if (!(primaryKeyCols == rhs.primaryKeyCols)) + return false; + return true; + } + bool operator != (const AddPrimaryKeyRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AddPrimaryKeyRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(AddPrimaryKeyRequest &a, AddPrimaryKeyRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const AddPrimaryKeyRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class AddForeignKeyRequest { + public: + + AddForeignKeyRequest(const AddForeignKeyRequest&); + AddForeignKeyRequest& operator=(const AddForeignKeyRequest&); + AddForeignKeyRequest() { + } + + virtual ~AddForeignKeyRequest() throw(); + std::vector foreignKeyCols; + + void __set_foreignKeyCols(const std::vector & val); + + bool operator == (const AddForeignKeyRequest & rhs) const + { + if (!(foreignKeyCols == rhs.foreignKeyCols)) + return false; + return true; + } + bool operator != (const AddForeignKeyRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AddForeignKeyRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(AddForeignKeyRequest &a, AddForeignKeyRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const AddForeignKeyRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class AddUniqueConstraintRequest { + public: + + AddUniqueConstraintRequest(const AddUniqueConstraintRequest&); + AddUniqueConstraintRequest& operator=(const AddUniqueConstraintRequest&); + AddUniqueConstraintRequest() { + } + + virtual ~AddUniqueConstraintRequest() throw(); + std::vector uniqueConstraintCols; + + void __set_uniqueConstraintCols(const std::vector & val); + + bool operator == (const AddUniqueConstraintRequest & rhs) const + { + if (!(uniqueConstraintCols == rhs.uniqueConstraintCols)) + return false; + return true; + } + bool operator != (const AddUniqueConstraintRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AddUniqueConstraintRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(AddUniqueConstraintRequest &a, AddUniqueConstraintRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const AddUniqueConstraintRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class AddNotNullConstraintRequest { + public: + + AddNotNullConstraintRequest(const AddNotNullConstraintRequest&); + AddNotNullConstraintRequest& operator=(const AddNotNullConstraintRequest&); + AddNotNullConstraintRequest() { + } + + virtual ~AddNotNullConstraintRequest() throw(); + std::vector notNullConstraintCols; + + void __set_notNullConstraintCols(const std::vector & val); + + bool operator == (const AddNotNullConstraintRequest & rhs) const + { + if (!(notNullConstraintCols == rhs.notNullConstraintCols)) + return false; + return true; + } + bool operator != (const AddNotNullConstraintRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AddNotNullConstraintRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(AddNotNullConstraintRequest &a, AddNotNullConstraintRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const AddNotNullConstraintRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class PartitionsByExprResult { + public: + + PartitionsByExprResult(const PartitionsByExprResult&); + PartitionsByExprResult& operator=(const PartitionsByExprResult&); + PartitionsByExprResult() : hasUnknownPartitions(0) { + } + + virtual ~PartitionsByExprResult() throw(); + std::vector partitions; + bool hasUnknownPartitions; + + void __set_partitions(const std::vector & val); + + void __set_hasUnknownPartitions(const bool val); + + bool operator == (const PartitionsByExprResult & rhs) const + { + if (!(partitions == rhs.partitions)) + return false; + if (!(hasUnknownPartitions == rhs.hasUnknownPartitions)) + return false; + return true; + } + bool operator != (const PartitionsByExprResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PartitionsByExprResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PartitionsByExprResult &a, PartitionsByExprResult &b); + +inline std::ostream& operator<<(std::ostream& out, const PartitionsByExprResult& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _PartitionsByExprRequest__isset { + _PartitionsByExprRequest__isset() : defaultPartitionName(false), maxParts(true) {} + bool defaultPartitionName :1; + bool maxParts :1; +} _PartitionsByExprRequest__isset; + +class PartitionsByExprRequest { + public: + + PartitionsByExprRequest(const PartitionsByExprRequest&); + PartitionsByExprRequest& operator=(const PartitionsByExprRequest&); + PartitionsByExprRequest() : dbName(), tblName(), expr(), defaultPartitionName(), maxParts(-1) { + } + + virtual ~PartitionsByExprRequest() throw(); + std::string dbName; + std::string tblName; + std::string expr; + std::string defaultPartitionName; + int16_t maxParts; + + _PartitionsByExprRequest__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_tblName(const std::string& val); + + void __set_expr(const std::string& val); + + void __set_defaultPartitionName(const std::string& val); + + void __set_maxParts(const int16_t val); + + bool operator == (const PartitionsByExprRequest & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tblName == rhs.tblName)) + return false; + if (!(expr == rhs.expr)) + return false; + if (__isset.defaultPartitionName != rhs.__isset.defaultPartitionName) + return false; + else if (__isset.defaultPartitionName && !(defaultPartitionName == rhs.defaultPartitionName)) + return false; + if (__isset.maxParts != rhs.__isset.maxParts) + return false; + else if (__isset.maxParts && !(maxParts == rhs.maxParts)) + return false; + return true; + } + bool operator != (const PartitionsByExprRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PartitionsByExprRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PartitionsByExprRequest &a, PartitionsByExprRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const PartitionsByExprRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class TableStatsResult { + public: + + TableStatsResult(const TableStatsResult&); + TableStatsResult& operator=(const TableStatsResult&); + TableStatsResult() { + } + + virtual ~TableStatsResult() throw(); + std::vector tableStats; + + void __set_tableStats(const std::vector & val); + + bool operator == (const TableStatsResult & rhs) const + { + if (!(tableStats == rhs.tableStats)) + return false; + return true; + } + bool operator != (const TableStatsResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TableStatsResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TableStatsResult &a, TableStatsResult &b); + +inline std::ostream& operator<<(std::ostream& out, const TableStatsResult& obj) +{ + obj.printTo(out); + return out; +} + + +class PartitionsStatsResult { + public: + + PartitionsStatsResult(const PartitionsStatsResult&); + PartitionsStatsResult& operator=(const PartitionsStatsResult&); + PartitionsStatsResult() { + } + + virtual ~PartitionsStatsResult() throw(); + std::map > partStats; + + void __set_partStats(const std::map > & val); + + bool operator == (const PartitionsStatsResult & rhs) const + { + if (!(partStats == rhs.partStats)) + return false; + return true; + } + bool operator != (const PartitionsStatsResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PartitionsStatsResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PartitionsStatsResult &a, PartitionsStatsResult &b); + +inline std::ostream& operator<<(std::ostream& out, const PartitionsStatsResult& obj) +{ + obj.printTo(out); + return out; +} + + +class TableStatsRequest { + public: + + TableStatsRequest(const TableStatsRequest&); + TableStatsRequest& operator=(const TableStatsRequest&); + TableStatsRequest() : dbName(), tblName() { + } + + virtual ~TableStatsRequest() throw(); + std::string dbName; + std::string tblName; + std::vector colNames; + + void __set_dbName(const std::string& val); + + void __set_tblName(const std::string& val); + + void __set_colNames(const std::vector & val); + + bool operator == (const TableStatsRequest & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tblName == rhs.tblName)) + return false; + if (!(colNames == rhs.colNames)) + return false; + return true; + } + bool operator != (const TableStatsRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TableStatsRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TableStatsRequest &a, TableStatsRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const TableStatsRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class PartitionsStatsRequest { + public: + + PartitionsStatsRequest(const PartitionsStatsRequest&); + PartitionsStatsRequest& operator=(const PartitionsStatsRequest&); + PartitionsStatsRequest() : dbName(), tblName() { + } + + virtual ~PartitionsStatsRequest() throw(); + std::string dbName; + std::string tblName; + std::vector colNames; + std::vector partNames; + + void __set_dbName(const std::string& val); + + void __set_tblName(const std::string& val); + + void __set_colNames(const std::vector & val); + + void __set_partNames(const std::vector & val); + + bool operator == (const PartitionsStatsRequest & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tblName == rhs.tblName)) + return false; + if (!(colNames == rhs.colNames)) + return false; + if (!(partNames == rhs.partNames)) + return false; + return true; + } + bool operator != (const PartitionsStatsRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PartitionsStatsRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PartitionsStatsRequest &a, PartitionsStatsRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const PartitionsStatsRequest& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _AddPartitionsResult__isset { + _AddPartitionsResult__isset() : partitions(false) {} + bool partitions :1; +} _AddPartitionsResult__isset; + +class AddPartitionsResult { + public: + + AddPartitionsResult(const AddPartitionsResult&); + AddPartitionsResult& operator=(const AddPartitionsResult&); + AddPartitionsResult() { + } + + virtual ~AddPartitionsResult() throw(); + std::vector partitions; + + _AddPartitionsResult__isset __isset; + + void __set_partitions(const std::vector & val); + + bool operator == (const AddPartitionsResult & rhs) const + { + if (__isset.partitions != rhs.__isset.partitions) + return false; + else if (__isset.partitions && !(partitions == rhs.partitions)) + return false; + return true; + } + bool operator != (const AddPartitionsResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AddPartitionsResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(AddPartitionsResult &a, AddPartitionsResult &b); + +inline std::ostream& operator<<(std::ostream& out, const AddPartitionsResult& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _AddPartitionsRequest__isset { + _AddPartitionsRequest__isset() : needResult(true) {} + bool needResult :1; +} _AddPartitionsRequest__isset; + +class AddPartitionsRequest { + public: + + AddPartitionsRequest(const AddPartitionsRequest&); + AddPartitionsRequest& operator=(const AddPartitionsRequest&); + AddPartitionsRequest() : dbName(), tblName(), ifNotExists(0), needResult(true) { + } + + virtual ~AddPartitionsRequest() throw(); + std::string dbName; + std::string tblName; + std::vector parts; + bool ifNotExists; + bool needResult; + + _AddPartitionsRequest__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_tblName(const std::string& val); + + void __set_parts(const std::vector & val); + + void __set_ifNotExists(const bool val); + + void __set_needResult(const bool val); + + bool operator == (const AddPartitionsRequest & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tblName == rhs.tblName)) + return false; + if (!(parts == rhs.parts)) + return false; + if (!(ifNotExists == rhs.ifNotExists)) + return false; + if (__isset.needResult != rhs.__isset.needResult) + return false; + else if (__isset.needResult && !(needResult == rhs.needResult)) + return false; + return true; + } + bool operator != (const AddPartitionsRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AddPartitionsRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(AddPartitionsRequest &a, AddPartitionsRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const AddPartitionsRequest& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _DropPartitionsResult__isset { + _DropPartitionsResult__isset() : partitions(false) {} + bool partitions :1; +} _DropPartitionsResult__isset; + +class DropPartitionsResult { + public: + + DropPartitionsResult(const DropPartitionsResult&); + DropPartitionsResult& operator=(const DropPartitionsResult&); + DropPartitionsResult() { + } + + virtual ~DropPartitionsResult() throw(); + std::vector partitions; + + _DropPartitionsResult__isset __isset; + + void __set_partitions(const std::vector & val); + + bool operator == (const DropPartitionsResult & rhs) const + { + if (__isset.partitions != rhs.__isset.partitions) + return false; + else if (__isset.partitions && !(partitions == rhs.partitions)) + return false; + return true; + } + bool operator != (const DropPartitionsResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const DropPartitionsResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(DropPartitionsResult &a, DropPartitionsResult &b); + +inline std::ostream& operator<<(std::ostream& out, const DropPartitionsResult& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _DropPartitionsExpr__isset { + _DropPartitionsExpr__isset() : partArchiveLevel(false) {} + bool partArchiveLevel :1; +} _DropPartitionsExpr__isset; + +class DropPartitionsExpr { + public: + + DropPartitionsExpr(const DropPartitionsExpr&); + DropPartitionsExpr& operator=(const DropPartitionsExpr&); + DropPartitionsExpr() : expr(), partArchiveLevel(0) { + } + + virtual ~DropPartitionsExpr() throw(); + std::string expr; + int32_t partArchiveLevel; + + _DropPartitionsExpr__isset __isset; + + void __set_expr(const std::string& val); + + void __set_partArchiveLevel(const int32_t val); + + bool operator == (const DropPartitionsExpr & rhs) const + { + if (!(expr == rhs.expr)) + return false; + if (__isset.partArchiveLevel != rhs.__isset.partArchiveLevel) + return false; + else if (__isset.partArchiveLevel && !(partArchiveLevel == rhs.partArchiveLevel)) + return false; + return true; + } + bool operator != (const DropPartitionsExpr &rhs) const { + return !(*this == rhs); + } + + bool operator < (const DropPartitionsExpr & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(DropPartitionsExpr &a, DropPartitionsExpr &b); + +inline std::ostream& operator<<(std::ostream& out, const DropPartitionsExpr& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _RequestPartsSpec__isset { + _RequestPartsSpec__isset() : names(false), exprs(false) {} + bool names :1; + bool exprs :1; +} _RequestPartsSpec__isset; + +class RequestPartsSpec { + public: + + RequestPartsSpec(const RequestPartsSpec&); + RequestPartsSpec& operator=(const RequestPartsSpec&); + RequestPartsSpec() { + } + + virtual ~RequestPartsSpec() throw(); + std::vector names; + std::vector exprs; + + _RequestPartsSpec__isset __isset; + + void __set_names(const std::vector & val); + + void __set_exprs(const std::vector & val); + + bool operator == (const RequestPartsSpec & rhs) const + { + if (!(names == rhs.names)) + return false; + if (!(exprs == rhs.exprs)) + return false; + return true; + } + bool operator != (const RequestPartsSpec &rhs) const { + return !(*this == rhs); + } + + bool operator < (const RequestPartsSpec & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(RequestPartsSpec &a, RequestPartsSpec &b); + +inline std::ostream& operator<<(std::ostream& out, const RequestPartsSpec& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _DropPartitionsRequest__isset { + _DropPartitionsRequest__isset() : deleteData(false), ifExists(true), ignoreProtection(false), environmentContext(false), needResult(true) {} + bool deleteData :1; + bool ifExists :1; + bool ignoreProtection :1; + bool environmentContext :1; + bool needResult :1; +} _DropPartitionsRequest__isset; + +class DropPartitionsRequest { + public: + + DropPartitionsRequest(const DropPartitionsRequest&); + DropPartitionsRequest& operator=(const DropPartitionsRequest&); + DropPartitionsRequest() : dbName(), tblName(), deleteData(0), ifExists(true), ignoreProtection(0), needResult(true) { + } + + virtual ~DropPartitionsRequest() throw(); + std::string dbName; + std::string tblName; + RequestPartsSpec parts; + bool deleteData; + bool ifExists; + bool ignoreProtection; + EnvironmentContext environmentContext; + bool needResult; + + _DropPartitionsRequest__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_tblName(const std::string& val); + + void __set_parts(const RequestPartsSpec& val); + + void __set_deleteData(const bool val); + + void __set_ifExists(const bool val); + + void __set_ignoreProtection(const bool val); + + void __set_environmentContext(const EnvironmentContext& val); + + void __set_needResult(const bool val); + + bool operator == (const DropPartitionsRequest & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tblName == rhs.tblName)) + return false; + if (!(parts == rhs.parts)) + return false; + if (__isset.deleteData != rhs.__isset.deleteData) + return false; + else if (__isset.deleteData && !(deleteData == rhs.deleteData)) + return false; + if (__isset.ifExists != rhs.__isset.ifExists) + return false; + else if (__isset.ifExists && !(ifExists == rhs.ifExists)) + return false; + if (__isset.ignoreProtection != rhs.__isset.ignoreProtection) + return false; + else if (__isset.ignoreProtection && !(ignoreProtection == rhs.ignoreProtection)) + return false; + if (__isset.environmentContext != rhs.__isset.environmentContext) + return false; + else if (__isset.environmentContext && !(environmentContext == rhs.environmentContext)) + return false; + if (__isset.needResult != rhs.__isset.needResult) + return false; + else if (__isset.needResult && !(needResult == rhs.needResult)) + return false; + return true; + } + bool operator != (const DropPartitionsRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const DropPartitionsRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(DropPartitionsRequest &a, DropPartitionsRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const DropPartitionsRequest& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _ResourceUri__isset { + _ResourceUri__isset() : resourceType(false), uri(false) {} + bool resourceType :1; + bool uri :1; +} _ResourceUri__isset; + +class ResourceUri { + public: + + ResourceUri(const ResourceUri&); + ResourceUri& operator=(const ResourceUri&); + ResourceUri() : resourceType((ResourceType::type)0), uri() { + } + + virtual ~ResourceUri() throw(); + ResourceType::type resourceType; + std::string uri; + + _ResourceUri__isset __isset; + + void __set_resourceType(const ResourceType::type val); + + void __set_uri(const std::string& val); + + bool operator == (const ResourceUri & rhs) const + { + if (!(resourceType == rhs.resourceType)) + return false; + if (!(uri == rhs.uri)) + return false; + return true; + } + bool operator != (const ResourceUri &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ResourceUri & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ResourceUri &a, ResourceUri &b); + +inline std::ostream& operator<<(std::ostream& out, const ResourceUri& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _Function__isset { + _Function__isset() : functionName(false), dbName(false), className(false), ownerName(false), ownerType(false), createTime(false), functionType(false), resourceUris(false) {} + bool functionName :1; + bool dbName :1; + bool className :1; + bool ownerName :1; + bool ownerType :1; + bool createTime :1; + bool functionType :1; + bool resourceUris :1; +} _Function__isset; + +class Function { + public: + + Function(const Function&); + Function& operator=(const Function&); + Function() : functionName(), dbName(), className(), ownerName(), ownerType((PrincipalType::type)0), createTime(0), functionType((FunctionType::type)0) { + } + + virtual ~Function() throw(); + std::string functionName; + std::string dbName; + std::string className; + std::string ownerName; + PrincipalType::type ownerType; + int32_t createTime; + FunctionType::type functionType; + std::vector resourceUris; + + _Function__isset __isset; + + void __set_functionName(const std::string& val); + + void __set_dbName(const std::string& val); + + void __set_className(const std::string& val); + + void __set_ownerName(const std::string& val); + + void __set_ownerType(const PrincipalType::type val); + + void __set_createTime(const int32_t val); + + void __set_functionType(const FunctionType::type val); + + void __set_resourceUris(const std::vector & val); + + bool operator == (const Function & rhs) const + { + if (!(functionName == rhs.functionName)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(className == rhs.className)) + return false; + if (!(ownerName == rhs.ownerName)) + return false; + if (!(ownerType == rhs.ownerType)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(functionType == rhs.functionType)) + return false; + if (!(resourceUris == rhs.resourceUris)) + return false; + return true; + } + bool operator != (const Function &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Function & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(Function &a, Function &b); + +inline std::ostream& operator<<(std::ostream& out, const Function& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _TxnInfo__isset { + _TxnInfo__isset() : agentInfo(true), heartbeatCount(true), metaInfo(false), startedTime(false), lastHeartbeatTime(false) {} + bool agentInfo :1; + bool heartbeatCount :1; + bool metaInfo :1; + bool startedTime :1; + bool lastHeartbeatTime :1; +} _TxnInfo__isset; + +class TxnInfo { + public: + + TxnInfo(const TxnInfo&); + TxnInfo& operator=(const TxnInfo&); + TxnInfo() : id(0), state((TxnState::type)0), user(), hostname(), agentInfo("Unknown"), heartbeatCount(0), metaInfo(), startedTime(0), lastHeartbeatTime(0) { + } + + virtual ~TxnInfo() throw(); + int64_t id; + TxnState::type state; + std::string user; + std::string hostname; + std::string agentInfo; + int32_t heartbeatCount; + std::string metaInfo; + int64_t startedTime; + int64_t lastHeartbeatTime; + + _TxnInfo__isset __isset; + + void __set_id(const int64_t val); + + void __set_state(const TxnState::type val); + + void __set_user(const std::string& val); + + void __set_hostname(const std::string& val); + + void __set_agentInfo(const std::string& val); + + void __set_heartbeatCount(const int32_t val); + + void __set_metaInfo(const std::string& val); + + void __set_startedTime(const int64_t val); + + void __set_lastHeartbeatTime(const int64_t val); + + bool operator == (const TxnInfo & rhs) const + { + if (!(id == rhs.id)) + return false; + if (!(state == rhs.state)) + return false; + if (!(user == rhs.user)) + return false; + if (!(hostname == rhs.hostname)) + return false; + if (__isset.agentInfo != rhs.__isset.agentInfo) + return false; + else if (__isset.agentInfo && !(agentInfo == rhs.agentInfo)) + return false; + if (__isset.heartbeatCount != rhs.__isset.heartbeatCount) + return false; + else if (__isset.heartbeatCount && !(heartbeatCount == rhs.heartbeatCount)) + return false; + if (__isset.metaInfo != rhs.__isset.metaInfo) + return false; + else if (__isset.metaInfo && !(metaInfo == rhs.metaInfo)) + return false; + if (__isset.startedTime != rhs.__isset.startedTime) + return false; + else if (__isset.startedTime && !(startedTime == rhs.startedTime)) + return false; + if (__isset.lastHeartbeatTime != rhs.__isset.lastHeartbeatTime) + return false; + else if (__isset.lastHeartbeatTime && !(lastHeartbeatTime == rhs.lastHeartbeatTime)) + return false; + return true; + } + bool operator != (const TxnInfo &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TxnInfo & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TxnInfo &a, TxnInfo &b); + +inline std::ostream& operator<<(std::ostream& out, const TxnInfo& obj) +{ + obj.printTo(out); + return out; +} + + +class GetOpenTxnsInfoResponse { + public: + + GetOpenTxnsInfoResponse(const GetOpenTxnsInfoResponse&); + GetOpenTxnsInfoResponse& operator=(const GetOpenTxnsInfoResponse&); + GetOpenTxnsInfoResponse() : txn_high_water_mark(0) { + } + + virtual ~GetOpenTxnsInfoResponse() throw(); + int64_t txn_high_water_mark; + std::vector open_txns; + + void __set_txn_high_water_mark(const int64_t val); + + void __set_open_txns(const std::vector & val); + + bool operator == (const GetOpenTxnsInfoResponse & rhs) const + { + if (!(txn_high_water_mark == rhs.txn_high_water_mark)) + return false; + if (!(open_txns == rhs.open_txns)) + return false; + return true; + } + bool operator != (const GetOpenTxnsInfoResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetOpenTxnsInfoResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetOpenTxnsInfoResponse &a, GetOpenTxnsInfoResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const GetOpenTxnsInfoResponse& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _GetOpenTxnsResponse__isset { + _GetOpenTxnsResponse__isset() : min_open_txn(false) {} + bool min_open_txn :1; +} _GetOpenTxnsResponse__isset; + +class GetOpenTxnsResponse { + public: + + GetOpenTxnsResponse(const GetOpenTxnsResponse&); + GetOpenTxnsResponse& operator=(const GetOpenTxnsResponse&); + GetOpenTxnsResponse() : txn_high_water_mark(0), min_open_txn(0), abortedBits() { + } + + virtual ~GetOpenTxnsResponse() throw(); + int64_t txn_high_water_mark; + std::vector open_txns; + int64_t min_open_txn; + std::string abortedBits; + + _GetOpenTxnsResponse__isset __isset; + + void __set_txn_high_water_mark(const int64_t val); + + void __set_open_txns(const std::vector & val); + + void __set_min_open_txn(const int64_t val); + + void __set_abortedBits(const std::string& val); + + bool operator == (const GetOpenTxnsResponse & rhs) const + { + if (!(txn_high_water_mark == rhs.txn_high_water_mark)) + return false; + if (!(open_txns == rhs.open_txns)) + return false; + if (__isset.min_open_txn != rhs.__isset.min_open_txn) + return false; + else if (__isset.min_open_txn && !(min_open_txn == rhs.min_open_txn)) + return false; + if (!(abortedBits == rhs.abortedBits)) + return false; + return true; + } + bool operator != (const GetOpenTxnsResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetOpenTxnsResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetOpenTxnsResponse &a, GetOpenTxnsResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const GetOpenTxnsResponse& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _OpenTxnRequest__isset { + _OpenTxnRequest__isset() : agentInfo(true) {} + bool agentInfo :1; +} _OpenTxnRequest__isset; + +class OpenTxnRequest { + public: + + OpenTxnRequest(const OpenTxnRequest&); + OpenTxnRequest& operator=(const OpenTxnRequest&); + OpenTxnRequest() : num_txns(0), user(), hostname(), agentInfo("Unknown") { + } + + virtual ~OpenTxnRequest() throw(); + int32_t num_txns; + std::string user; + std::string hostname; + std::string agentInfo; + + _OpenTxnRequest__isset __isset; + + void __set_num_txns(const int32_t val); + + void __set_user(const std::string& val); + + void __set_hostname(const std::string& val); + + void __set_agentInfo(const std::string& val); + + bool operator == (const OpenTxnRequest & rhs) const + { + if (!(num_txns == rhs.num_txns)) + return false; + if (!(user == rhs.user)) + return false; + if (!(hostname == rhs.hostname)) + return false; + if (__isset.agentInfo != rhs.__isset.agentInfo) + return false; + else if (__isset.agentInfo && !(agentInfo == rhs.agentInfo)) + return false; + return true; + } + bool operator != (const OpenTxnRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const OpenTxnRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(OpenTxnRequest &a, OpenTxnRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const OpenTxnRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class OpenTxnsResponse { + public: + + OpenTxnsResponse(const OpenTxnsResponse&); + OpenTxnsResponse& operator=(const OpenTxnsResponse&); + OpenTxnsResponse() { + } + + virtual ~OpenTxnsResponse() throw(); + std::vector txn_ids; + + void __set_txn_ids(const std::vector & val); + + bool operator == (const OpenTxnsResponse & rhs) const + { + if (!(txn_ids == rhs.txn_ids)) + return false; + return true; + } + bool operator != (const OpenTxnsResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const OpenTxnsResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(OpenTxnsResponse &a, OpenTxnsResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const OpenTxnsResponse& obj) +{ + obj.printTo(out); + return out; +} + + +class AbortTxnRequest { + public: + + AbortTxnRequest(const AbortTxnRequest&); + AbortTxnRequest& operator=(const AbortTxnRequest&); + AbortTxnRequest() : txnid(0) { + } + + virtual ~AbortTxnRequest() throw(); + int64_t txnid; + + void __set_txnid(const int64_t val); + + bool operator == (const AbortTxnRequest & rhs) const + { + if (!(txnid == rhs.txnid)) + return false; + return true; + } + bool operator != (const AbortTxnRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AbortTxnRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(AbortTxnRequest &a, AbortTxnRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const AbortTxnRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class AbortTxnsRequest { + public: + + AbortTxnsRequest(const AbortTxnsRequest&); + AbortTxnsRequest& operator=(const AbortTxnsRequest&); + AbortTxnsRequest() { + } + + virtual ~AbortTxnsRequest() throw(); + std::vector txn_ids; + + void __set_txn_ids(const std::vector & val); + + bool operator == (const AbortTxnsRequest & rhs) const + { + if (!(txn_ids == rhs.txn_ids)) + return false; + return true; + } + bool operator != (const AbortTxnsRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AbortTxnsRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(AbortTxnsRequest &a, AbortTxnsRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const AbortTxnsRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class CommitTxnRequest { + public: + + CommitTxnRequest(const CommitTxnRequest&); + CommitTxnRequest& operator=(const CommitTxnRequest&); + CommitTxnRequest() : txnid(0) { + } + + virtual ~CommitTxnRequest() throw(); + int64_t txnid; + + void __set_txnid(const int64_t val); + + bool operator == (const CommitTxnRequest & rhs) const + { + if (!(txnid == rhs.txnid)) + return false; + return true; + } + bool operator != (const CommitTxnRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CommitTxnRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(CommitTxnRequest &a, CommitTxnRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const CommitTxnRequest& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _LockComponent__isset { + _LockComponent__isset() : tablename(false), partitionname(false), operationType(true), isAcid(true), isDynamicPartitionWrite(true) {} + bool tablename :1; + bool partitionname :1; + bool operationType :1; + bool isAcid :1; + bool isDynamicPartitionWrite :1; +} _LockComponent__isset; + +class LockComponent { + public: + + LockComponent(const LockComponent&); + LockComponent& operator=(const LockComponent&); + LockComponent() : type((LockType::type)0), level((LockLevel::type)0), dbname(), tablename(), partitionname(), operationType((DataOperationType::type)5), isAcid(false), isDynamicPartitionWrite(false) { + operationType = (DataOperationType::type)5; + + } + + virtual ~LockComponent() throw(); + LockType::type type; + LockLevel::type level; + std::string dbname; + std::string tablename; + std::string partitionname; + DataOperationType::type operationType; + bool isAcid; + bool isDynamicPartitionWrite; + + _LockComponent__isset __isset; + + void __set_type(const LockType::type val); + + void __set_level(const LockLevel::type val); + + void __set_dbname(const std::string& val); + + void __set_tablename(const std::string& val); + + void __set_partitionname(const std::string& val); + + void __set_operationType(const DataOperationType::type val); + + void __set_isAcid(const bool val); + + void __set_isDynamicPartitionWrite(const bool val); + + bool operator == (const LockComponent & rhs) const + { + if (!(type == rhs.type)) + return false; + if (!(level == rhs.level)) + return false; + if (!(dbname == rhs.dbname)) + return false; + if (__isset.tablename != rhs.__isset.tablename) + return false; + else if (__isset.tablename && !(tablename == rhs.tablename)) + return false; + if (__isset.partitionname != rhs.__isset.partitionname) + return false; + else if (__isset.partitionname && !(partitionname == rhs.partitionname)) + return false; + if (__isset.operationType != rhs.__isset.operationType) + return false; + else if (__isset.operationType && !(operationType == rhs.operationType)) + return false; + if (__isset.isAcid != rhs.__isset.isAcid) + return false; + else if (__isset.isAcid && !(isAcid == rhs.isAcid)) + return false; + if (__isset.isDynamicPartitionWrite != rhs.__isset.isDynamicPartitionWrite) + return false; + else if (__isset.isDynamicPartitionWrite && !(isDynamicPartitionWrite == rhs.isDynamicPartitionWrite)) + return false; + return true; + } + bool operator != (const LockComponent &rhs) const { + return !(*this == rhs); + } + + bool operator < (const LockComponent & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(LockComponent &a, LockComponent &b); + +inline std::ostream& operator<<(std::ostream& out, const LockComponent& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _LockRequest__isset { + _LockRequest__isset() : txnid(false), agentInfo(true) {} + bool txnid :1; + bool agentInfo :1; +} _LockRequest__isset; + +class LockRequest { + public: + + LockRequest(const LockRequest&); + LockRequest& operator=(const LockRequest&); + LockRequest() : txnid(0), user(), hostname(), agentInfo("Unknown") { + } + + virtual ~LockRequest() throw(); + std::vector component; + int64_t txnid; + std::string user; + std::string hostname; + std::string agentInfo; + + _LockRequest__isset __isset; + + void __set_component(const std::vector & val); + + void __set_txnid(const int64_t val); + + void __set_user(const std::string& val); + + void __set_hostname(const std::string& val); + + void __set_agentInfo(const std::string& val); + + bool operator == (const LockRequest & rhs) const + { + if (!(component == rhs.component)) + return false; + if (__isset.txnid != rhs.__isset.txnid) + return false; + else if (__isset.txnid && !(txnid == rhs.txnid)) + return false; + if (!(user == rhs.user)) + return false; + if (!(hostname == rhs.hostname)) + return false; + if (__isset.agentInfo != rhs.__isset.agentInfo) + return false; + else if (__isset.agentInfo && !(agentInfo == rhs.agentInfo)) + return false; + return true; + } + bool operator != (const LockRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const LockRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(LockRequest &a, LockRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const LockRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class LockResponse { + public: + + LockResponse(const LockResponse&); + LockResponse& operator=(const LockResponse&); + LockResponse() : lockid(0), state((LockState::type)0) { + } + + virtual ~LockResponse() throw(); + int64_t lockid; + LockState::type state; + + void __set_lockid(const int64_t val); + + void __set_state(const LockState::type val); + + bool operator == (const LockResponse & rhs) const + { + if (!(lockid == rhs.lockid)) + return false; + if (!(state == rhs.state)) + return false; + return true; + } + bool operator != (const LockResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const LockResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(LockResponse &a, LockResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const LockResponse& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _CheckLockRequest__isset { + _CheckLockRequest__isset() : txnid(false), elapsed_ms(false) {} + bool txnid :1; + bool elapsed_ms :1; +} _CheckLockRequest__isset; + +class CheckLockRequest { + public: + + CheckLockRequest(const CheckLockRequest&); + CheckLockRequest& operator=(const CheckLockRequest&); + CheckLockRequest() : lockid(0), txnid(0), elapsed_ms(0) { + } + + virtual ~CheckLockRequest() throw(); + int64_t lockid; + int64_t txnid; + int64_t elapsed_ms; + + _CheckLockRequest__isset __isset; + + void __set_lockid(const int64_t val); + + void __set_txnid(const int64_t val); + + void __set_elapsed_ms(const int64_t val); + + bool operator == (const CheckLockRequest & rhs) const + { + if (!(lockid == rhs.lockid)) + return false; + if (__isset.txnid != rhs.__isset.txnid) + return false; + else if (__isset.txnid && !(txnid == rhs.txnid)) + return false; + if (__isset.elapsed_ms != rhs.__isset.elapsed_ms) + return false; + else if (__isset.elapsed_ms && !(elapsed_ms == rhs.elapsed_ms)) + return false; + return true; + } + bool operator != (const CheckLockRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CheckLockRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(CheckLockRequest &a, CheckLockRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const CheckLockRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class UnlockRequest { + public: + + UnlockRequest(const UnlockRequest&); + UnlockRequest& operator=(const UnlockRequest&); + UnlockRequest() : lockid(0) { + } + + virtual ~UnlockRequest() throw(); + int64_t lockid; + + void __set_lockid(const int64_t val); + + bool operator == (const UnlockRequest & rhs) const + { + if (!(lockid == rhs.lockid)) + return false; + return true; + } + bool operator != (const UnlockRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const UnlockRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(UnlockRequest &a, UnlockRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const UnlockRequest& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _ShowLocksRequest__isset { + _ShowLocksRequest__isset() : dbname(false), tablename(false), partname(false), isExtended(true) {} + bool dbname :1; + bool tablename :1; + bool partname :1; + bool isExtended :1; +} _ShowLocksRequest__isset; + +class ShowLocksRequest { + public: + + ShowLocksRequest(const ShowLocksRequest&); + ShowLocksRequest& operator=(const ShowLocksRequest&); + ShowLocksRequest() : dbname(), tablename(), partname(), isExtended(false) { + } + + virtual ~ShowLocksRequest() throw(); + std::string dbname; + std::string tablename; + std::string partname; + bool isExtended; + + _ShowLocksRequest__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_tablename(const std::string& val); + + void __set_partname(const std::string& val); + + void __set_isExtended(const bool val); + + bool operator == (const ShowLocksRequest & rhs) const + { + if (__isset.dbname != rhs.__isset.dbname) + return false; + else if (__isset.dbname && !(dbname == rhs.dbname)) + return false; + if (__isset.tablename != rhs.__isset.tablename) + return false; + else if (__isset.tablename && !(tablename == rhs.tablename)) + return false; + if (__isset.partname != rhs.__isset.partname) + return false; + else if (__isset.partname && !(partname == rhs.partname)) + return false; + if (__isset.isExtended != rhs.__isset.isExtended) + return false; + else if (__isset.isExtended && !(isExtended == rhs.isExtended)) + return false; + return true; + } + bool operator != (const ShowLocksRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ShowLocksRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ShowLocksRequest &a, ShowLocksRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const ShowLocksRequest& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _ShowLocksResponseElement__isset { + _ShowLocksResponseElement__isset() : tablename(false), partname(false), txnid(false), acquiredat(false), heartbeatCount(true), agentInfo(false), blockedByExtId(false), blockedByIntId(false), lockIdInternal(false) {} + bool tablename :1; + bool partname :1; + bool txnid :1; + bool acquiredat :1; + bool heartbeatCount :1; + bool agentInfo :1; + bool blockedByExtId :1; + bool blockedByIntId :1; + bool lockIdInternal :1; +} _ShowLocksResponseElement__isset; + +class ShowLocksResponseElement { + public: + + ShowLocksResponseElement(const ShowLocksResponseElement&); + ShowLocksResponseElement& operator=(const ShowLocksResponseElement&); + ShowLocksResponseElement() : lockid(0), dbname(), tablename(), partname(), state((LockState::type)0), type((LockType::type)0), txnid(0), lastheartbeat(0), acquiredat(0), user(), hostname(), heartbeatCount(0), agentInfo(), blockedByExtId(0), blockedByIntId(0), lockIdInternal(0) { + } + + virtual ~ShowLocksResponseElement() throw(); + int64_t lockid; + std::string dbname; + std::string tablename; + std::string partname; + LockState::type state; + LockType::type type; + int64_t txnid; + int64_t lastheartbeat; + int64_t acquiredat; + std::string user; + std::string hostname; + int32_t heartbeatCount; + std::string agentInfo; + int64_t blockedByExtId; + int64_t blockedByIntId; + int64_t lockIdInternal; + + _ShowLocksResponseElement__isset __isset; + + void __set_lockid(const int64_t val); + + void __set_dbname(const std::string& val); + + void __set_tablename(const std::string& val); + + void __set_partname(const std::string& val); + + void __set_state(const LockState::type val); + + void __set_type(const LockType::type val); + + void __set_txnid(const int64_t val); + + void __set_lastheartbeat(const int64_t val); + + void __set_acquiredat(const int64_t val); + + void __set_user(const std::string& val); + + void __set_hostname(const std::string& val); + + void __set_heartbeatCount(const int32_t val); + + void __set_agentInfo(const std::string& val); + + void __set_blockedByExtId(const int64_t val); + + void __set_blockedByIntId(const int64_t val); + + void __set_lockIdInternal(const int64_t val); + + bool operator == (const ShowLocksResponseElement & rhs) const + { + if (!(lockid == rhs.lockid)) + return false; + if (!(dbname == rhs.dbname)) + return false; + if (__isset.tablename != rhs.__isset.tablename) + return false; + else if (__isset.tablename && !(tablename == rhs.tablename)) + return false; + if (__isset.partname != rhs.__isset.partname) + return false; + else if (__isset.partname && !(partname == rhs.partname)) + return false; + if (!(state == rhs.state)) + return false; + if (!(type == rhs.type)) + return false; + if (__isset.txnid != rhs.__isset.txnid) + return false; + else if (__isset.txnid && !(txnid == rhs.txnid)) + return false; + if (!(lastheartbeat == rhs.lastheartbeat)) + return false; + if (__isset.acquiredat != rhs.__isset.acquiredat) + return false; + else if (__isset.acquiredat && !(acquiredat == rhs.acquiredat)) + return false; + if (!(user == rhs.user)) + return false; + if (!(hostname == rhs.hostname)) + return false; + if (__isset.heartbeatCount != rhs.__isset.heartbeatCount) + return false; + else if (__isset.heartbeatCount && !(heartbeatCount == rhs.heartbeatCount)) + return false; + if (__isset.agentInfo != rhs.__isset.agentInfo) + return false; + else if (__isset.agentInfo && !(agentInfo == rhs.agentInfo)) + return false; + if (__isset.blockedByExtId != rhs.__isset.blockedByExtId) + return false; + else if (__isset.blockedByExtId && !(blockedByExtId == rhs.blockedByExtId)) + return false; + if (__isset.blockedByIntId != rhs.__isset.blockedByIntId) + return false; + else if (__isset.blockedByIntId && !(blockedByIntId == rhs.blockedByIntId)) + return false; + if (__isset.lockIdInternal != rhs.__isset.lockIdInternal) + return false; + else if (__isset.lockIdInternal && !(lockIdInternal == rhs.lockIdInternal)) + return false; + return true; + } + bool operator != (const ShowLocksResponseElement &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ShowLocksResponseElement & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ShowLocksResponseElement &a, ShowLocksResponseElement &b); + +inline std::ostream& operator<<(std::ostream& out, const ShowLocksResponseElement& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _ShowLocksResponse__isset { + _ShowLocksResponse__isset() : locks(false) {} + bool locks :1; +} _ShowLocksResponse__isset; + +class ShowLocksResponse { + public: + + ShowLocksResponse(const ShowLocksResponse&); + ShowLocksResponse& operator=(const ShowLocksResponse&); + ShowLocksResponse() { + } + + virtual ~ShowLocksResponse() throw(); + std::vector locks; + + _ShowLocksResponse__isset __isset; + + void __set_locks(const std::vector & val); + + bool operator == (const ShowLocksResponse & rhs) const + { + if (!(locks == rhs.locks)) + return false; + return true; + } + bool operator != (const ShowLocksResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ShowLocksResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ShowLocksResponse &a, ShowLocksResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const ShowLocksResponse& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _HeartbeatRequest__isset { + _HeartbeatRequest__isset() : lockid(false), txnid(false) {} + bool lockid :1; + bool txnid :1; +} _HeartbeatRequest__isset; + +class HeartbeatRequest { + public: + + HeartbeatRequest(const HeartbeatRequest&); + HeartbeatRequest& operator=(const HeartbeatRequest&); + HeartbeatRequest() : lockid(0), txnid(0) { + } + + virtual ~HeartbeatRequest() throw(); + int64_t lockid; + int64_t txnid; + + _HeartbeatRequest__isset __isset; + + void __set_lockid(const int64_t val); + + void __set_txnid(const int64_t val); + + bool operator == (const HeartbeatRequest & rhs) const + { + if (__isset.lockid != rhs.__isset.lockid) + return false; + else if (__isset.lockid && !(lockid == rhs.lockid)) + return false; + if (__isset.txnid != rhs.__isset.txnid) + return false; + else if (__isset.txnid && !(txnid == rhs.txnid)) + return false; + return true; + } + bool operator != (const HeartbeatRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const HeartbeatRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(HeartbeatRequest &a, HeartbeatRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const HeartbeatRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class HeartbeatTxnRangeRequest { + public: + + HeartbeatTxnRangeRequest(const HeartbeatTxnRangeRequest&); + HeartbeatTxnRangeRequest& operator=(const HeartbeatTxnRangeRequest&); + HeartbeatTxnRangeRequest() : min(0), max(0) { + } + + virtual ~HeartbeatTxnRangeRequest() throw(); + int64_t min; + int64_t max; + + void __set_min(const int64_t val); + + void __set_max(const int64_t val); + + bool operator == (const HeartbeatTxnRangeRequest & rhs) const + { + if (!(min == rhs.min)) + return false; + if (!(max == rhs.max)) + return false; + return true; + } + bool operator != (const HeartbeatTxnRangeRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const HeartbeatTxnRangeRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(HeartbeatTxnRangeRequest &a, HeartbeatTxnRangeRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const HeartbeatTxnRangeRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class HeartbeatTxnRangeResponse { + public: + + HeartbeatTxnRangeResponse(const HeartbeatTxnRangeResponse&); + HeartbeatTxnRangeResponse& operator=(const HeartbeatTxnRangeResponse&); + HeartbeatTxnRangeResponse() { + } + + virtual ~HeartbeatTxnRangeResponse() throw(); + std::set aborted; + std::set nosuch; + + void __set_aborted(const std::set & val); + + void __set_nosuch(const std::set & val); + + bool operator == (const HeartbeatTxnRangeResponse & rhs) const + { + if (!(aborted == rhs.aborted)) + return false; + if (!(nosuch == rhs.nosuch)) + return false; + return true; + } + bool operator != (const HeartbeatTxnRangeResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const HeartbeatTxnRangeResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(HeartbeatTxnRangeResponse &a, HeartbeatTxnRangeResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const HeartbeatTxnRangeResponse& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _CompactionRequest__isset { + _CompactionRequest__isset() : partitionname(false), runas(false), properties(false) {} + bool partitionname :1; + bool runas :1; + bool properties :1; +} _CompactionRequest__isset; + +class CompactionRequest { + public: + + CompactionRequest(const CompactionRequest&); + CompactionRequest& operator=(const CompactionRequest&); + CompactionRequest() : dbname(), tablename(), partitionname(), type((CompactionType::type)0), runas() { + } + + virtual ~CompactionRequest() throw(); + std::string dbname; + std::string tablename; + std::string partitionname; + CompactionType::type type; + std::string runas; + std::map properties; + + _CompactionRequest__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_tablename(const std::string& val); + + void __set_partitionname(const std::string& val); + + void __set_type(const CompactionType::type val); + + void __set_runas(const std::string& val); + + void __set_properties(const std::map & val); + + bool operator == (const CompactionRequest & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(tablename == rhs.tablename)) + return false; + if (__isset.partitionname != rhs.__isset.partitionname) + return false; + else if (__isset.partitionname && !(partitionname == rhs.partitionname)) + return false; + if (!(type == rhs.type)) + return false; + if (__isset.runas != rhs.__isset.runas) + return false; + else if (__isset.runas && !(runas == rhs.runas)) + return false; + if (__isset.properties != rhs.__isset.properties) + return false; + else if (__isset.properties && !(properties == rhs.properties)) + return false; + return true; + } + bool operator != (const CompactionRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CompactionRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(CompactionRequest &a, CompactionRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const CompactionRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class CompactionResponse { + public: + + CompactionResponse(const CompactionResponse&); + CompactionResponse& operator=(const CompactionResponse&); + CompactionResponse() : id(0), state(), accepted(0) { + } + + virtual ~CompactionResponse() throw(); + int64_t id; + std::string state; + bool accepted; + + void __set_id(const int64_t val); + + void __set_state(const std::string& val); + + void __set_accepted(const bool val); + + bool operator == (const CompactionResponse & rhs) const + { + if (!(id == rhs.id)) + return false; + if (!(state == rhs.state)) + return false; + if (!(accepted == rhs.accepted)) + return false; + return true; + } + bool operator != (const CompactionResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CompactionResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(CompactionResponse &a, CompactionResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const CompactionResponse& obj) +{ + obj.printTo(out); + return out; +} + + +class ShowCompactRequest { + public: + + ShowCompactRequest(const ShowCompactRequest&); + ShowCompactRequest& operator=(const ShowCompactRequest&); + ShowCompactRequest() { + } + + virtual ~ShowCompactRequest() throw(); + + bool operator == (const ShowCompactRequest & /* rhs */) const + { + return true; + } + bool operator != (const ShowCompactRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ShowCompactRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ShowCompactRequest &a, ShowCompactRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const ShowCompactRequest& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _ShowCompactResponseElement__isset { + _ShowCompactResponseElement__isset() : partitionname(false), workerid(false), start(false), runAs(false), hightestTxnId(false), metaInfo(false), endTime(false), hadoopJobId(true), id(false) {} + bool partitionname :1; + bool workerid :1; + bool start :1; + bool runAs :1; + bool hightestTxnId :1; + bool metaInfo :1; + bool endTime :1; + bool hadoopJobId :1; + bool id :1; +} _ShowCompactResponseElement__isset; + +class ShowCompactResponseElement { + public: + + ShowCompactResponseElement(const ShowCompactResponseElement&); + ShowCompactResponseElement& operator=(const ShowCompactResponseElement&); + ShowCompactResponseElement() : dbname(), tablename(), partitionname(), type((CompactionType::type)0), state(), workerid(), start(0), runAs(), hightestTxnId(0), metaInfo(), endTime(0), hadoopJobId("None"), id(0) { + } + + virtual ~ShowCompactResponseElement() throw(); + std::string dbname; + std::string tablename; + std::string partitionname; + CompactionType::type type; + std::string state; + std::string workerid; + int64_t start; + std::string runAs; + int64_t hightestTxnId; + std::string metaInfo; + int64_t endTime; + std::string hadoopJobId; + int64_t id; + + _ShowCompactResponseElement__isset __isset; + + void __set_dbname(const std::string& val); + + void __set_tablename(const std::string& val); + + void __set_partitionname(const std::string& val); + + void __set_type(const CompactionType::type val); + + void __set_state(const std::string& val); + + void __set_workerid(const std::string& val); + + void __set_start(const int64_t val); + + void __set_runAs(const std::string& val); + + void __set_hightestTxnId(const int64_t val); + + void __set_metaInfo(const std::string& val); + + void __set_endTime(const int64_t val); + + void __set_hadoopJobId(const std::string& val); + + void __set_id(const int64_t val); + + bool operator == (const ShowCompactResponseElement & rhs) const + { + if (!(dbname == rhs.dbname)) + return false; + if (!(tablename == rhs.tablename)) + return false; + if (__isset.partitionname != rhs.__isset.partitionname) + return false; + else if (__isset.partitionname && !(partitionname == rhs.partitionname)) + return false; + if (!(type == rhs.type)) + return false; + if (!(state == rhs.state)) + return false; + if (__isset.workerid != rhs.__isset.workerid) + return false; + else if (__isset.workerid && !(workerid == rhs.workerid)) + return false; + if (__isset.start != rhs.__isset.start) + return false; + else if (__isset.start && !(start == rhs.start)) + return false; + if (__isset.runAs != rhs.__isset.runAs) + return false; + else if (__isset.runAs && !(runAs == rhs.runAs)) + return false; + if (__isset.hightestTxnId != rhs.__isset.hightestTxnId) + return false; + else if (__isset.hightestTxnId && !(hightestTxnId == rhs.hightestTxnId)) + return false; + if (__isset.metaInfo != rhs.__isset.metaInfo) + return false; + else if (__isset.metaInfo && !(metaInfo == rhs.metaInfo)) + return false; + if (__isset.endTime != rhs.__isset.endTime) + return false; + else if (__isset.endTime && !(endTime == rhs.endTime)) + return false; + if (__isset.hadoopJobId != rhs.__isset.hadoopJobId) + return false; + else if (__isset.hadoopJobId && !(hadoopJobId == rhs.hadoopJobId)) + return false; + if (__isset.id != rhs.__isset.id) + return false; + else if (__isset.id && !(id == rhs.id)) + return false; + return true; + } + bool operator != (const ShowCompactResponseElement &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ShowCompactResponseElement & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ShowCompactResponseElement &a, ShowCompactResponseElement &b); + +inline std::ostream& operator<<(std::ostream& out, const ShowCompactResponseElement& obj) +{ + obj.printTo(out); + return out; +} + + +class ShowCompactResponse { + public: + + ShowCompactResponse(const ShowCompactResponse&); + ShowCompactResponse& operator=(const ShowCompactResponse&); + ShowCompactResponse() { + } + + virtual ~ShowCompactResponse() throw(); + std::vector compacts; + + void __set_compacts(const std::vector & val); + + bool operator == (const ShowCompactResponse & rhs) const + { + if (!(compacts == rhs.compacts)) + return false; + return true; + } + bool operator != (const ShowCompactResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ShowCompactResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ShowCompactResponse &a, ShowCompactResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const ShowCompactResponse& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _AddDynamicPartitions__isset { + _AddDynamicPartitions__isset() : operationType(true) {} + bool operationType :1; +} _AddDynamicPartitions__isset; + +class AddDynamicPartitions { + public: + + AddDynamicPartitions(const AddDynamicPartitions&); + AddDynamicPartitions& operator=(const AddDynamicPartitions&); + AddDynamicPartitions() : txnid(0), dbname(), tablename(), operationType((DataOperationType::type)5) { + operationType = (DataOperationType::type)5; + + } + + virtual ~AddDynamicPartitions() throw(); + int64_t txnid; + std::string dbname; + std::string tablename; + std::vector partitionnames; + DataOperationType::type operationType; + + _AddDynamicPartitions__isset __isset; + + void __set_txnid(const int64_t val); + + void __set_dbname(const std::string& val); + + void __set_tablename(const std::string& val); + + void __set_partitionnames(const std::vector & val); + + void __set_operationType(const DataOperationType::type val); + + bool operator == (const AddDynamicPartitions & rhs) const + { + if (!(txnid == rhs.txnid)) + return false; + if (!(dbname == rhs.dbname)) + return false; + if (!(tablename == rhs.tablename)) + return false; + if (!(partitionnames == rhs.partitionnames)) + return false; + if (__isset.operationType != rhs.__isset.operationType) + return false; + else if (__isset.operationType && !(operationType == rhs.operationType)) + return false; + return true; + } + bool operator != (const AddDynamicPartitions &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AddDynamicPartitions & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(AddDynamicPartitions &a, AddDynamicPartitions &b); + +inline std::ostream& operator<<(std::ostream& out, const AddDynamicPartitions& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _NotificationEventRequest__isset { + _NotificationEventRequest__isset() : maxEvents(false) {} + bool maxEvents :1; +} _NotificationEventRequest__isset; + +class NotificationEventRequest { + public: + + NotificationEventRequest(const NotificationEventRequest&); + NotificationEventRequest& operator=(const NotificationEventRequest&); + NotificationEventRequest() : lastEvent(0), maxEvents(0) { + } + + virtual ~NotificationEventRequest() throw(); + int64_t lastEvent; + int32_t maxEvents; + + _NotificationEventRequest__isset __isset; + + void __set_lastEvent(const int64_t val); + + void __set_maxEvents(const int32_t val); + + bool operator == (const NotificationEventRequest & rhs) const + { + if (!(lastEvent == rhs.lastEvent)) + return false; + if (__isset.maxEvents != rhs.__isset.maxEvents) + return false; + else if (__isset.maxEvents && !(maxEvents == rhs.maxEvents)) + return false; + return true; + } + bool operator != (const NotificationEventRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NotificationEventRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(NotificationEventRequest &a, NotificationEventRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const NotificationEventRequest& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _NotificationEvent__isset { + _NotificationEvent__isset() : dbName(false), tableName(false), messageFormat(false) {} + bool dbName :1; + bool tableName :1; + bool messageFormat :1; +} _NotificationEvent__isset; + +class NotificationEvent { + public: + + NotificationEvent(const NotificationEvent&); + NotificationEvent& operator=(const NotificationEvent&); + NotificationEvent() : eventId(0), eventTime(0), eventType(), dbName(), tableName(), message(), messageFormat() { + } + + virtual ~NotificationEvent() throw(); + int64_t eventId; + int32_t eventTime; + std::string eventType; + std::string dbName; + std::string tableName; + std::string message; + std::string messageFormat; + + _NotificationEvent__isset __isset; + + void __set_eventId(const int64_t val); + + void __set_eventTime(const int32_t val); + + void __set_eventType(const std::string& val); + + void __set_dbName(const std::string& val); + + void __set_tableName(const std::string& val); + + void __set_message(const std::string& val); + + void __set_messageFormat(const std::string& val); + + bool operator == (const NotificationEvent & rhs) const + { + if (!(eventId == rhs.eventId)) + return false; + if (!(eventTime == rhs.eventTime)) + return false; + if (!(eventType == rhs.eventType)) + return false; + if (__isset.dbName != rhs.__isset.dbName) + return false; + else if (__isset.dbName && !(dbName == rhs.dbName)) + return false; + if (__isset.tableName != rhs.__isset.tableName) + return false; + else if (__isset.tableName && !(tableName == rhs.tableName)) + return false; + if (!(message == rhs.message)) + return false; + if (__isset.messageFormat != rhs.__isset.messageFormat) + return false; + else if (__isset.messageFormat && !(messageFormat == rhs.messageFormat)) + return false; + return true; + } + bool operator != (const NotificationEvent &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NotificationEvent & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(NotificationEvent &a, NotificationEvent &b); + +inline std::ostream& operator<<(std::ostream& out, const NotificationEvent& obj) +{ + obj.printTo(out); + return out; +} + + +class NotificationEventResponse { + public: + + NotificationEventResponse(const NotificationEventResponse&); + NotificationEventResponse& operator=(const NotificationEventResponse&); + NotificationEventResponse() { + } + + virtual ~NotificationEventResponse() throw(); + std::vector events; + + void __set_events(const std::vector & val); + + bool operator == (const NotificationEventResponse & rhs) const + { + if (!(events == rhs.events)) + return false; + return true; + } + bool operator != (const NotificationEventResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NotificationEventResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(NotificationEventResponse &a, NotificationEventResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const NotificationEventResponse& obj) +{ + obj.printTo(out); + return out; +} + + +class CurrentNotificationEventId { + public: + + CurrentNotificationEventId(const CurrentNotificationEventId&); + CurrentNotificationEventId& operator=(const CurrentNotificationEventId&); + CurrentNotificationEventId() : eventId(0) { + } + + virtual ~CurrentNotificationEventId() throw(); + int64_t eventId; + + void __set_eventId(const int64_t val); + + bool operator == (const CurrentNotificationEventId & rhs) const + { + if (!(eventId == rhs.eventId)) + return false; + return true; + } + bool operator != (const CurrentNotificationEventId &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CurrentNotificationEventId & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(CurrentNotificationEventId &a, CurrentNotificationEventId &b); + +inline std::ostream& operator<<(std::ostream& out, const CurrentNotificationEventId& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _InsertEventRequestData__isset { + _InsertEventRequestData__isset() : replace(false), filesAddedChecksum(false) {} + bool replace :1; + bool filesAddedChecksum :1; +} _InsertEventRequestData__isset; + +class InsertEventRequestData { + public: + + InsertEventRequestData(const InsertEventRequestData&); + InsertEventRequestData& operator=(const InsertEventRequestData&); + InsertEventRequestData() : replace(0) { + } + + virtual ~InsertEventRequestData() throw(); + bool replace; + std::vector filesAdded; + std::vector filesAddedChecksum; + + _InsertEventRequestData__isset __isset; + + void __set_replace(const bool val); + + void __set_filesAdded(const std::vector & val); + + void __set_filesAddedChecksum(const std::vector & val); + + bool operator == (const InsertEventRequestData & rhs) const + { + if (__isset.replace != rhs.__isset.replace) + return false; + else if (__isset.replace && !(replace == rhs.replace)) + return false; + if (!(filesAdded == rhs.filesAdded)) + return false; + if (__isset.filesAddedChecksum != rhs.__isset.filesAddedChecksum) + return false; + else if (__isset.filesAddedChecksum && !(filesAddedChecksum == rhs.filesAddedChecksum)) + return false; + return true; + } + bool operator != (const InsertEventRequestData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const InsertEventRequestData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(InsertEventRequestData &a, InsertEventRequestData &b); + +inline std::ostream& operator<<(std::ostream& out, const InsertEventRequestData& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _FireEventRequestData__isset { + _FireEventRequestData__isset() : insertData(false) {} + bool insertData :1; +} _FireEventRequestData__isset; + +class FireEventRequestData { + public: + + FireEventRequestData(const FireEventRequestData&); + FireEventRequestData& operator=(const FireEventRequestData&); + FireEventRequestData() { + } + + virtual ~FireEventRequestData() throw(); + InsertEventRequestData insertData; + + _FireEventRequestData__isset __isset; + + void __set_insertData(const InsertEventRequestData& val); + + bool operator == (const FireEventRequestData & rhs) const + { + if (!(insertData == rhs.insertData)) + return false; + return true; + } + bool operator != (const FireEventRequestData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FireEventRequestData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(FireEventRequestData &a, FireEventRequestData &b); + +inline std::ostream& operator<<(std::ostream& out, const FireEventRequestData& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _FireEventRequest__isset { + _FireEventRequest__isset() : dbName(false), tableName(false), partitionVals(false) {} + bool dbName :1; + bool tableName :1; + bool partitionVals :1; +} _FireEventRequest__isset; + +class FireEventRequest { + public: + + FireEventRequest(const FireEventRequest&); + FireEventRequest& operator=(const FireEventRequest&); + FireEventRequest() : successful(0), dbName(), tableName() { + } + + virtual ~FireEventRequest() throw(); + bool successful; + FireEventRequestData data; + std::string dbName; + std::string tableName; + std::vector partitionVals; + + _FireEventRequest__isset __isset; + + void __set_successful(const bool val); + + void __set_data(const FireEventRequestData& val); + + void __set_dbName(const std::string& val); + + void __set_tableName(const std::string& val); + + void __set_partitionVals(const std::vector & val); + + bool operator == (const FireEventRequest & rhs) const + { + if (!(successful == rhs.successful)) + return false; + if (!(data == rhs.data)) + return false; + if (__isset.dbName != rhs.__isset.dbName) + return false; + else if (__isset.dbName && !(dbName == rhs.dbName)) + return false; + if (__isset.tableName != rhs.__isset.tableName) + return false; + else if (__isset.tableName && !(tableName == rhs.tableName)) + return false; + if (__isset.partitionVals != rhs.__isset.partitionVals) + return false; + else if (__isset.partitionVals && !(partitionVals == rhs.partitionVals)) + return false; + return true; + } + bool operator != (const FireEventRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FireEventRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(FireEventRequest &a, FireEventRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const FireEventRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class FireEventResponse { + public: + + FireEventResponse(const FireEventResponse&); + FireEventResponse& operator=(const FireEventResponse&); + FireEventResponse() { + } + + virtual ~FireEventResponse() throw(); + + bool operator == (const FireEventResponse & /* rhs */) const + { + return true; + } + bool operator != (const FireEventResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const FireEventResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(FireEventResponse &a, FireEventResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const FireEventResponse& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _MetadataPpdResult__isset { + _MetadataPpdResult__isset() : metadata(false), includeBitset(false) {} + bool metadata :1; + bool includeBitset :1; +} _MetadataPpdResult__isset; + +class MetadataPpdResult { + public: + + MetadataPpdResult(const MetadataPpdResult&); + MetadataPpdResult& operator=(const MetadataPpdResult&); + MetadataPpdResult() : metadata(), includeBitset() { + } + + virtual ~MetadataPpdResult() throw(); + std::string metadata; + std::string includeBitset; + + _MetadataPpdResult__isset __isset; + + void __set_metadata(const std::string& val); + + void __set_includeBitset(const std::string& val); + + bool operator == (const MetadataPpdResult & rhs) const + { + if (__isset.metadata != rhs.__isset.metadata) + return false; + else if (__isset.metadata && !(metadata == rhs.metadata)) + return false; + if (__isset.includeBitset != rhs.__isset.includeBitset) + return false; + else if (__isset.includeBitset && !(includeBitset == rhs.includeBitset)) + return false; + return true; + } + bool operator != (const MetadataPpdResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MetadataPpdResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(MetadataPpdResult &a, MetadataPpdResult &b); + +inline std::ostream& operator<<(std::ostream& out, const MetadataPpdResult& obj) +{ + obj.printTo(out); + return out; +} + + +class GetFileMetadataByExprResult { + public: + + GetFileMetadataByExprResult(const GetFileMetadataByExprResult&); + GetFileMetadataByExprResult& operator=(const GetFileMetadataByExprResult&); + GetFileMetadataByExprResult() : isSupported(0) { + } + + virtual ~GetFileMetadataByExprResult() throw(); + std::map metadata; + bool isSupported; + + void __set_metadata(const std::map & val); + + void __set_isSupported(const bool val); + + bool operator == (const GetFileMetadataByExprResult & rhs) const + { + if (!(metadata == rhs.metadata)) + return false; + if (!(isSupported == rhs.isSupported)) + return false; + return true; + } + bool operator != (const GetFileMetadataByExprResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetFileMetadataByExprResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetFileMetadataByExprResult &a, GetFileMetadataByExprResult &b); + +inline std::ostream& operator<<(std::ostream& out, const GetFileMetadataByExprResult& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _GetFileMetadataByExprRequest__isset { + _GetFileMetadataByExprRequest__isset() : doGetFooters(false), type(false) {} + bool doGetFooters :1; + bool type :1; +} _GetFileMetadataByExprRequest__isset; + +class GetFileMetadataByExprRequest { + public: + + GetFileMetadataByExprRequest(const GetFileMetadataByExprRequest&); + GetFileMetadataByExprRequest& operator=(const GetFileMetadataByExprRequest&); + GetFileMetadataByExprRequest() : expr(), doGetFooters(0), type((FileMetadataExprType::type)0) { + } + + virtual ~GetFileMetadataByExprRequest() throw(); + std::vector fileIds; + std::string expr; + bool doGetFooters; + FileMetadataExprType::type type; + + _GetFileMetadataByExprRequest__isset __isset; + + void __set_fileIds(const std::vector & val); + + void __set_expr(const std::string& val); + + void __set_doGetFooters(const bool val); + + void __set_type(const FileMetadataExprType::type val); + + bool operator == (const GetFileMetadataByExprRequest & rhs) const + { + if (!(fileIds == rhs.fileIds)) + return false; + if (!(expr == rhs.expr)) + return false; + if (__isset.doGetFooters != rhs.__isset.doGetFooters) + return false; + else if (__isset.doGetFooters && !(doGetFooters == rhs.doGetFooters)) + return false; + if (__isset.type != rhs.__isset.type) + return false; + else if (__isset.type && !(type == rhs.type)) + return false; + return true; + } + bool operator != (const GetFileMetadataByExprRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetFileMetadataByExprRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetFileMetadataByExprRequest &a, GetFileMetadataByExprRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const GetFileMetadataByExprRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class GetFileMetadataResult { + public: + + GetFileMetadataResult(const GetFileMetadataResult&); + GetFileMetadataResult& operator=(const GetFileMetadataResult&); + GetFileMetadataResult() : isSupported(0) { + } + + virtual ~GetFileMetadataResult() throw(); + std::map metadata; + bool isSupported; + + void __set_metadata(const std::map & val); + + void __set_isSupported(const bool val); + + bool operator == (const GetFileMetadataResult & rhs) const + { + if (!(metadata == rhs.metadata)) + return false; + if (!(isSupported == rhs.isSupported)) + return false; + return true; + } + bool operator != (const GetFileMetadataResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetFileMetadataResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetFileMetadataResult &a, GetFileMetadataResult &b); + +inline std::ostream& operator<<(std::ostream& out, const GetFileMetadataResult& obj) +{ + obj.printTo(out); + return out; +} + + +class GetFileMetadataRequest { + public: + + GetFileMetadataRequest(const GetFileMetadataRequest&); + GetFileMetadataRequest& operator=(const GetFileMetadataRequest&); + GetFileMetadataRequest() { + } + + virtual ~GetFileMetadataRequest() throw(); + std::vector fileIds; + + void __set_fileIds(const std::vector & val); + + bool operator == (const GetFileMetadataRequest & rhs) const + { + if (!(fileIds == rhs.fileIds)) + return false; + return true; + } + bool operator != (const GetFileMetadataRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetFileMetadataRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetFileMetadataRequest &a, GetFileMetadataRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const GetFileMetadataRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class PutFileMetadataResult { + public: + + PutFileMetadataResult(const PutFileMetadataResult&); + PutFileMetadataResult& operator=(const PutFileMetadataResult&); + PutFileMetadataResult() { + } + + virtual ~PutFileMetadataResult() throw(); + + bool operator == (const PutFileMetadataResult & /* rhs */) const + { + return true; + } + bool operator != (const PutFileMetadataResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PutFileMetadataResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PutFileMetadataResult &a, PutFileMetadataResult &b); + +inline std::ostream& operator<<(std::ostream& out, const PutFileMetadataResult& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _PutFileMetadataRequest__isset { + _PutFileMetadataRequest__isset() : type(false) {} + bool type :1; +} _PutFileMetadataRequest__isset; + +class PutFileMetadataRequest { + public: + + PutFileMetadataRequest(const PutFileMetadataRequest&); + PutFileMetadataRequest& operator=(const PutFileMetadataRequest&); + PutFileMetadataRequest() : type((FileMetadataExprType::type)0) { + } + + virtual ~PutFileMetadataRequest() throw(); + std::vector fileIds; + std::vector metadata; + FileMetadataExprType::type type; + + _PutFileMetadataRequest__isset __isset; + + void __set_fileIds(const std::vector & val); + + void __set_metadata(const std::vector & val); + + void __set_type(const FileMetadataExprType::type val); + + bool operator == (const PutFileMetadataRequest & rhs) const + { + if (!(fileIds == rhs.fileIds)) + return false; + if (!(metadata == rhs.metadata)) + return false; + if (__isset.type != rhs.__isset.type) + return false; + else if (__isset.type && !(type == rhs.type)) + return false; + return true; + } + bool operator != (const PutFileMetadataRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PutFileMetadataRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(PutFileMetadataRequest &a, PutFileMetadataRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const PutFileMetadataRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class ClearFileMetadataResult { + public: + + ClearFileMetadataResult(const ClearFileMetadataResult&); + ClearFileMetadataResult& operator=(const ClearFileMetadataResult&); + ClearFileMetadataResult() { + } + + virtual ~ClearFileMetadataResult() throw(); + + bool operator == (const ClearFileMetadataResult & /* rhs */) const + { + return true; + } + bool operator != (const ClearFileMetadataResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClearFileMetadataResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ClearFileMetadataResult &a, ClearFileMetadataResult &b); + +inline std::ostream& operator<<(std::ostream& out, const ClearFileMetadataResult& obj) +{ + obj.printTo(out); + return out; +} + + +class ClearFileMetadataRequest { + public: + + ClearFileMetadataRequest(const ClearFileMetadataRequest&); + ClearFileMetadataRequest& operator=(const ClearFileMetadataRequest&); + ClearFileMetadataRequest() { + } + + virtual ~ClearFileMetadataRequest() throw(); + std::vector fileIds; + + void __set_fileIds(const std::vector & val); + + bool operator == (const ClearFileMetadataRequest & rhs) const + { + if (!(fileIds == rhs.fileIds)) + return false; + return true; + } + bool operator != (const ClearFileMetadataRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClearFileMetadataRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ClearFileMetadataRequest &a, ClearFileMetadataRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const ClearFileMetadataRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class CacheFileMetadataResult { + public: + + CacheFileMetadataResult(const CacheFileMetadataResult&); + CacheFileMetadataResult& operator=(const CacheFileMetadataResult&); + CacheFileMetadataResult() : isSupported(0) { + } + + virtual ~CacheFileMetadataResult() throw(); + bool isSupported; + + void __set_isSupported(const bool val); + + bool operator == (const CacheFileMetadataResult & rhs) const + { + if (!(isSupported == rhs.isSupported)) + return false; + return true; + } + bool operator != (const CacheFileMetadataResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CacheFileMetadataResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(CacheFileMetadataResult &a, CacheFileMetadataResult &b); + +inline std::ostream& operator<<(std::ostream& out, const CacheFileMetadataResult& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _CacheFileMetadataRequest__isset { + _CacheFileMetadataRequest__isset() : partName(false), isAllParts(false) {} + bool partName :1; + bool isAllParts :1; +} _CacheFileMetadataRequest__isset; + +class CacheFileMetadataRequest { + public: + + CacheFileMetadataRequest(const CacheFileMetadataRequest&); + CacheFileMetadataRequest& operator=(const CacheFileMetadataRequest&); + CacheFileMetadataRequest() : dbName(), tblName(), partName(), isAllParts(0) { + } + + virtual ~CacheFileMetadataRequest() throw(); + std::string dbName; + std::string tblName; + std::string partName; + bool isAllParts; + + _CacheFileMetadataRequest__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_tblName(const std::string& val); + + void __set_partName(const std::string& val); + + void __set_isAllParts(const bool val); + + bool operator == (const CacheFileMetadataRequest & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tblName == rhs.tblName)) + return false; + if (__isset.partName != rhs.__isset.partName) + return false; + else if (__isset.partName && !(partName == rhs.partName)) + return false; + if (__isset.isAllParts != rhs.__isset.isAllParts) + return false; + else if (__isset.isAllParts && !(isAllParts == rhs.isAllParts)) + return false; + return true; + } + bool operator != (const CacheFileMetadataRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CacheFileMetadataRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(CacheFileMetadataRequest &a, CacheFileMetadataRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const CacheFileMetadataRequest& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _GetAllFunctionsResponse__isset { + _GetAllFunctionsResponse__isset() : functions(false) {} + bool functions :1; +} _GetAllFunctionsResponse__isset; + +class GetAllFunctionsResponse { + public: + + GetAllFunctionsResponse(const GetAllFunctionsResponse&); + GetAllFunctionsResponse& operator=(const GetAllFunctionsResponse&); + GetAllFunctionsResponse() { + } + + virtual ~GetAllFunctionsResponse() throw(); + std::vector functions; + + _GetAllFunctionsResponse__isset __isset; + + void __set_functions(const std::vector & val); + + bool operator == (const GetAllFunctionsResponse & rhs) const + { + if (__isset.functions != rhs.__isset.functions) + return false; + else if (__isset.functions && !(functions == rhs.functions)) + return false; + return true; + } + bool operator != (const GetAllFunctionsResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetAllFunctionsResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetAllFunctionsResponse &a, GetAllFunctionsResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const GetAllFunctionsResponse& obj) +{ + obj.printTo(out); + return out; +} + + +class ClientCapabilities { + public: + + ClientCapabilities(const ClientCapabilities&); + ClientCapabilities& operator=(const ClientCapabilities&); + ClientCapabilities() { + } + + virtual ~ClientCapabilities() throw(); + std::vector values; + + void __set_values(const std::vector & val); + + bool operator == (const ClientCapabilities & rhs) const + { + if (!(values == rhs.values)) + return false; + return true; + } + bool operator != (const ClientCapabilities &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ClientCapabilities & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(ClientCapabilities &a, ClientCapabilities &b); + +inline std::ostream& operator<<(std::ostream& out, const ClientCapabilities& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _GetTableRequest__isset { + _GetTableRequest__isset() : capabilities(false) {} + bool capabilities :1; +} _GetTableRequest__isset; + +class GetTableRequest { + public: + + GetTableRequest(const GetTableRequest&); + GetTableRequest& operator=(const GetTableRequest&); + GetTableRequest() : dbName(), tblName() { + } + + virtual ~GetTableRequest() throw(); + std::string dbName; + std::string tblName; + ClientCapabilities capabilities; + + _GetTableRequest__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_tblName(const std::string& val); + + void __set_capabilities(const ClientCapabilities& val); + + bool operator == (const GetTableRequest & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tblName == rhs.tblName)) + return false; + if (__isset.capabilities != rhs.__isset.capabilities) + return false; + else if (__isset.capabilities && !(capabilities == rhs.capabilities)) + return false; + return true; + } + bool operator != (const GetTableRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetTableRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetTableRequest &a, GetTableRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const GetTableRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class GetTableResult { + public: + + GetTableResult(const GetTableResult&); + GetTableResult& operator=(const GetTableResult&); + GetTableResult() { + } + + virtual ~GetTableResult() throw(); + Table table; + + void __set_table(const Table& val); + + bool operator == (const GetTableResult & rhs) const + { + if (!(table == rhs.table)) + return false; + return true; + } + bool operator != (const GetTableResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetTableResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetTableResult &a, GetTableResult &b); + +inline std::ostream& operator<<(std::ostream& out, const GetTableResult& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _GetTablesRequest__isset { + _GetTablesRequest__isset() : tblNames(false), capabilities(false) {} + bool tblNames :1; + bool capabilities :1; +} _GetTablesRequest__isset; + +class GetTablesRequest { + public: + + GetTablesRequest(const GetTablesRequest&); + GetTablesRequest& operator=(const GetTablesRequest&); + GetTablesRequest() : dbName() { + } + + virtual ~GetTablesRequest() throw(); + std::string dbName; + std::vector tblNames; + ClientCapabilities capabilities; + + _GetTablesRequest__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_tblNames(const std::vector & val); + + void __set_capabilities(const ClientCapabilities& val); + + bool operator == (const GetTablesRequest & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (__isset.tblNames != rhs.__isset.tblNames) + return false; + else if (__isset.tblNames && !(tblNames == rhs.tblNames)) + return false; + if (__isset.capabilities != rhs.__isset.capabilities) + return false; + else if (__isset.capabilities && !(capabilities == rhs.capabilities)) + return false; + return true; + } + bool operator != (const GetTablesRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetTablesRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetTablesRequest &a, GetTablesRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const GetTablesRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class GetTablesResult { + public: + + GetTablesResult(const GetTablesResult&); + GetTablesResult& operator=(const GetTablesResult&); + GetTablesResult() { + } + + virtual ~GetTablesResult() throw(); + std::vector
tables; + + void __set_tables(const std::vector
& val); + + bool operator == (const GetTablesResult & rhs) const + { + if (!(tables == rhs.tables)) + return false; + return true; + } + bool operator != (const GetTablesResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const GetTablesResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(GetTablesResult &a, GetTablesResult &b); + +inline std::ostream& operator<<(std::ostream& out, const GetTablesResult& obj) +{ + obj.printTo(out); + return out; +} + + +class CmRecycleRequest { + public: + + CmRecycleRequest(const CmRecycleRequest&); + CmRecycleRequest& operator=(const CmRecycleRequest&); + CmRecycleRequest() : dataPath(), purge(0) { + } + + virtual ~CmRecycleRequest() throw(); + std::string dataPath; + bool purge; + + void __set_dataPath(const std::string& val); + + void __set_purge(const bool val); + + bool operator == (const CmRecycleRequest & rhs) const + { + if (!(dataPath == rhs.dataPath)) + return false; + if (!(purge == rhs.purge)) + return false; + return true; + } + bool operator != (const CmRecycleRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CmRecycleRequest & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(CmRecycleRequest &a, CmRecycleRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const CmRecycleRequest& obj) +{ + obj.printTo(out); + return out; +} + + +class CmRecycleResponse { + public: + + CmRecycleResponse(const CmRecycleResponse&); + CmRecycleResponse& operator=(const CmRecycleResponse&); + CmRecycleResponse() { + } + + virtual ~CmRecycleResponse() throw(); + + bool operator == (const CmRecycleResponse & /* rhs */) const + { + return true; + } + bool operator != (const CmRecycleResponse &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CmRecycleResponse & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(CmRecycleResponse &a, CmRecycleResponse &b); + +inline std::ostream& operator<<(std::ostream& out, const CmRecycleResponse& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _TableMeta__isset { + _TableMeta__isset() : comments(false) {} + bool comments :1; +} _TableMeta__isset; + +class TableMeta { + public: + + TableMeta(const TableMeta&); + TableMeta& operator=(const TableMeta&); + TableMeta() : dbName(), tableName(), tableType(), comments() { + } + + virtual ~TableMeta() throw(); + std::string dbName; + std::string tableName; + std::string tableType; + std::string comments; + + _TableMeta__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_tableName(const std::string& val); + + void __set_tableType(const std::string& val); + + void __set_comments(const std::string& val); + + bool operator == (const TableMeta & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(tableType == rhs.tableType)) + return false; + if (__isset.comments != rhs.__isset.comments) + return false; + else if (__isset.comments && !(comments == rhs.comments)) + return false; + return true; + } + bool operator != (const TableMeta &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TableMeta & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(TableMeta &a, TableMeta &b); + +inline std::ostream& operator<<(std::ostream& out, const TableMeta& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _MetaException__isset { + _MetaException__isset() : message(false) {} + bool message :1; +} _MetaException__isset; + +class MetaException : public ::apache::thrift::TException { + public: + + MetaException(const MetaException&); + MetaException& operator=(const MetaException&); + MetaException() : message() { + } + + virtual ~MetaException() throw(); + std::string message; + + _MetaException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const MetaException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const MetaException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const MetaException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(MetaException &a, MetaException &b); + +inline std::ostream& operator<<(std::ostream& out, const MetaException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _UnknownTableException__isset { + _UnknownTableException__isset() : message(false) {} + bool message :1; +} _UnknownTableException__isset; + +class UnknownTableException : public ::apache::thrift::TException { + public: + + UnknownTableException(const UnknownTableException&); + UnknownTableException& operator=(const UnknownTableException&); + UnknownTableException() : message() { + } + + virtual ~UnknownTableException() throw(); + std::string message; + + _UnknownTableException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const UnknownTableException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const UnknownTableException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const UnknownTableException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(UnknownTableException &a, UnknownTableException &b); + +inline std::ostream& operator<<(std::ostream& out, const UnknownTableException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _UnknownDBException__isset { + _UnknownDBException__isset() : message(false) {} + bool message :1; +} _UnknownDBException__isset; + +class UnknownDBException : public ::apache::thrift::TException { + public: + + UnknownDBException(const UnknownDBException&); + UnknownDBException& operator=(const UnknownDBException&); + UnknownDBException() : message() { + } + + virtual ~UnknownDBException() throw(); + std::string message; + + _UnknownDBException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const UnknownDBException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const UnknownDBException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const UnknownDBException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(UnknownDBException &a, UnknownDBException &b); + +inline std::ostream& operator<<(std::ostream& out, const UnknownDBException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _AlreadyExistsException__isset { + _AlreadyExistsException__isset() : message(false) {} + bool message :1; +} _AlreadyExistsException__isset; + +class AlreadyExistsException : public ::apache::thrift::TException { + public: + + AlreadyExistsException(const AlreadyExistsException&); + AlreadyExistsException& operator=(const AlreadyExistsException&); + AlreadyExistsException() : message() { + } + + virtual ~AlreadyExistsException() throw(); + std::string message; + + _AlreadyExistsException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const AlreadyExistsException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const AlreadyExistsException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AlreadyExistsException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(AlreadyExistsException &a, AlreadyExistsException &b); + +inline std::ostream& operator<<(std::ostream& out, const AlreadyExistsException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _InvalidPartitionException__isset { + _InvalidPartitionException__isset() : message(false) {} + bool message :1; +} _InvalidPartitionException__isset; + +class InvalidPartitionException : public ::apache::thrift::TException { + public: + + InvalidPartitionException(const InvalidPartitionException&); + InvalidPartitionException& operator=(const InvalidPartitionException&); + InvalidPartitionException() : message() { + } + + virtual ~InvalidPartitionException() throw(); + std::string message; + + _InvalidPartitionException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const InvalidPartitionException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const InvalidPartitionException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const InvalidPartitionException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(InvalidPartitionException &a, InvalidPartitionException &b); + +inline std::ostream& operator<<(std::ostream& out, const InvalidPartitionException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _UnknownPartitionException__isset { + _UnknownPartitionException__isset() : message(false) {} + bool message :1; +} _UnknownPartitionException__isset; + +class UnknownPartitionException : public ::apache::thrift::TException { + public: + + UnknownPartitionException(const UnknownPartitionException&); + UnknownPartitionException& operator=(const UnknownPartitionException&); + UnknownPartitionException() : message() { + } + + virtual ~UnknownPartitionException() throw(); + std::string message; + + _UnknownPartitionException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const UnknownPartitionException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const UnknownPartitionException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const UnknownPartitionException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(UnknownPartitionException &a, UnknownPartitionException &b); + +inline std::ostream& operator<<(std::ostream& out, const UnknownPartitionException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _InvalidObjectException__isset { + _InvalidObjectException__isset() : message(false) {} + bool message :1; +} _InvalidObjectException__isset; + +class InvalidObjectException : public ::apache::thrift::TException { + public: + + InvalidObjectException(const InvalidObjectException&); + InvalidObjectException& operator=(const InvalidObjectException&); + InvalidObjectException() : message() { + } + + virtual ~InvalidObjectException() throw(); + std::string message; + + _InvalidObjectException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const InvalidObjectException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const InvalidObjectException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const InvalidObjectException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(InvalidObjectException &a, InvalidObjectException &b); + +inline std::ostream& operator<<(std::ostream& out, const InvalidObjectException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _NoSuchObjectException__isset { + _NoSuchObjectException__isset() : message(false) {} + bool message :1; +} _NoSuchObjectException__isset; + +class NoSuchObjectException : public ::apache::thrift::TException { + public: + + NoSuchObjectException(const NoSuchObjectException&); + NoSuchObjectException& operator=(const NoSuchObjectException&); + NoSuchObjectException() : message() { + } + + virtual ~NoSuchObjectException() throw(); + std::string message; + + _NoSuchObjectException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const NoSuchObjectException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const NoSuchObjectException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NoSuchObjectException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(NoSuchObjectException &a, NoSuchObjectException &b); + +inline std::ostream& operator<<(std::ostream& out, const NoSuchObjectException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _IndexAlreadyExistsException__isset { + _IndexAlreadyExistsException__isset() : message(false) {} + bool message :1; +} _IndexAlreadyExistsException__isset; + +class IndexAlreadyExistsException : public ::apache::thrift::TException { + public: + + IndexAlreadyExistsException(const IndexAlreadyExistsException&); + IndexAlreadyExistsException& operator=(const IndexAlreadyExistsException&); + IndexAlreadyExistsException() : message() { + } + + virtual ~IndexAlreadyExistsException() throw(); + std::string message; + + _IndexAlreadyExistsException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const IndexAlreadyExistsException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const IndexAlreadyExistsException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const IndexAlreadyExistsException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(IndexAlreadyExistsException &a, IndexAlreadyExistsException &b); + +inline std::ostream& operator<<(std::ostream& out, const IndexAlreadyExistsException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _InvalidOperationException__isset { + _InvalidOperationException__isset() : message(false) {} + bool message :1; +} _InvalidOperationException__isset; + +class InvalidOperationException : public ::apache::thrift::TException { + public: + + InvalidOperationException(const InvalidOperationException&); + InvalidOperationException& operator=(const InvalidOperationException&); + InvalidOperationException() : message() { + } + + virtual ~InvalidOperationException() throw(); + std::string message; + + _InvalidOperationException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const InvalidOperationException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const InvalidOperationException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const InvalidOperationException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(InvalidOperationException &a, InvalidOperationException &b); + +inline std::ostream& operator<<(std::ostream& out, const InvalidOperationException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _ConfigValSecurityException__isset { + _ConfigValSecurityException__isset() : message(false) {} + bool message :1; +} _ConfigValSecurityException__isset; + +class ConfigValSecurityException : public ::apache::thrift::TException { + public: + + ConfigValSecurityException(const ConfigValSecurityException&); + ConfigValSecurityException& operator=(const ConfigValSecurityException&); + ConfigValSecurityException() : message() { + } + + virtual ~ConfigValSecurityException() throw(); + std::string message; + + _ConfigValSecurityException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const ConfigValSecurityException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const ConfigValSecurityException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ConfigValSecurityException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(ConfigValSecurityException &a, ConfigValSecurityException &b); + +inline std::ostream& operator<<(std::ostream& out, const ConfigValSecurityException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _InvalidInputException__isset { + _InvalidInputException__isset() : message(false) {} + bool message :1; +} _InvalidInputException__isset; + +class InvalidInputException : public ::apache::thrift::TException { + public: + + InvalidInputException(const InvalidInputException&); + InvalidInputException& operator=(const InvalidInputException&); + InvalidInputException() : message() { + } + + virtual ~InvalidInputException() throw(); + std::string message; + + _InvalidInputException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const InvalidInputException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const InvalidInputException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const InvalidInputException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(InvalidInputException &a, InvalidInputException &b); + +inline std::ostream& operator<<(std::ostream& out, const InvalidInputException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _NoSuchTxnException__isset { + _NoSuchTxnException__isset() : message(false) {} + bool message :1; +} _NoSuchTxnException__isset; + +class NoSuchTxnException : public ::apache::thrift::TException { + public: + + NoSuchTxnException(const NoSuchTxnException&); + NoSuchTxnException& operator=(const NoSuchTxnException&); + NoSuchTxnException() : message() { + } + + virtual ~NoSuchTxnException() throw(); + std::string message; + + _NoSuchTxnException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const NoSuchTxnException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const NoSuchTxnException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NoSuchTxnException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(NoSuchTxnException &a, NoSuchTxnException &b); + +inline std::ostream& operator<<(std::ostream& out, const NoSuchTxnException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _TxnAbortedException__isset { + _TxnAbortedException__isset() : message(false) {} + bool message :1; +} _TxnAbortedException__isset; + +class TxnAbortedException : public ::apache::thrift::TException { + public: + + TxnAbortedException(const TxnAbortedException&); + TxnAbortedException& operator=(const TxnAbortedException&); + TxnAbortedException() : message() { + } + + virtual ~TxnAbortedException() throw(); + std::string message; + + _TxnAbortedException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const TxnAbortedException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const TxnAbortedException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TxnAbortedException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(TxnAbortedException &a, TxnAbortedException &b); + +inline std::ostream& operator<<(std::ostream& out, const TxnAbortedException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _TxnOpenException__isset { + _TxnOpenException__isset() : message(false) {} + bool message :1; +} _TxnOpenException__isset; + +class TxnOpenException : public ::apache::thrift::TException { + public: + + TxnOpenException(const TxnOpenException&); + TxnOpenException& operator=(const TxnOpenException&); + TxnOpenException() : message() { + } + + virtual ~TxnOpenException() throw(); + std::string message; + + _TxnOpenException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const TxnOpenException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const TxnOpenException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TxnOpenException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(TxnOpenException &a, TxnOpenException &b); + +inline std::ostream& operator<<(std::ostream& out, const TxnOpenException& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _NoSuchLockException__isset { + _NoSuchLockException__isset() : message(false) {} + bool message :1; +} _NoSuchLockException__isset; + +class NoSuchLockException : public ::apache::thrift::TException { + public: + + NoSuchLockException(const NoSuchLockException&); + NoSuchLockException& operator=(const NoSuchLockException&); + NoSuchLockException() : message() { + } + + virtual ~NoSuchLockException() throw(); + std::string message; + + _NoSuchLockException__isset __isset; + + void __set_message(const std::string& val); + + bool operator == (const NoSuchLockException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const NoSuchLockException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const NoSuchLockException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; + mutable std::string thriftTExceptionMessageHolder_; + const char* what() const throw(); +}; + +void swap(NoSuchLockException &a, NoSuchLockException &b); + +inline std::ostream& operator<<(std::ostream& out, const NoSuchLockException& obj) +{ + obj.printTo(out); + return out; +} + +}}} // namespace + +#endif diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnRequest.java new file mode 100644 index 0000000..8e3a0ae --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnRequest.java @@ -0,0 +1,387 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class AbortTxnRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AbortTxnRequest"); + + private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AbortTxnRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AbortTxnRequestTupleSchemeFactory()); + } + + private long txnid; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TXNID((short)1, "txnid"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TXNID + return TXNID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TXNID_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AbortTxnRequest.class, metaDataMap); + } + + public AbortTxnRequest() { + } + + public AbortTxnRequest( + long txnid) + { + this(); + this.txnid = txnid; + setTxnidIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public AbortTxnRequest(AbortTxnRequest other) { + __isset_bitfield = other.__isset_bitfield; + this.txnid = other.txnid; + } + + public AbortTxnRequest deepCopy() { + return new AbortTxnRequest(this); + } + + @Override + public void clear() { + setTxnidIsSet(false); + this.txnid = 0; + } + + public long getTxnid() { + return this.txnid; + } + + public void setTxnid(long txnid) { + this.txnid = txnid; + setTxnidIsSet(true); + } + + public void unsetTxnid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ + public boolean isSetTxnid() { + return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + public void setTxnidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TXNID: + if (value == null) { + unsetTxnid(); + } else { + setTxnid((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TXNID: + return getTxnid(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TXNID: + return isSetTxnid(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AbortTxnRequest) + return this.equals((AbortTxnRequest)that); + return false; + } + + public boolean equals(AbortTxnRequest that) { + if (that == null) + return false; + + boolean this_present_txnid = true; + boolean that_present_txnid = true; + if (this_present_txnid || that_present_txnid) { + if (!(this_present_txnid && that_present_txnid)) + return false; + if (this.txnid != that.txnid) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_txnid = true; + list.add(present_txnid); + if (present_txnid) + list.add(txnid); + + return list.hashCode(); + } + + @Override + public int compareTo(AbortTxnRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxnid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("AbortTxnRequest("); + boolean first = true; + + sb.append("txnid:"); + sb.append(this.txnid); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetTxnid()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnid' is unset! Struct:" + toString()); + } + + // 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 { + // 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 AbortTxnRequestStandardSchemeFactory implements SchemeFactory { + public AbortTxnRequestStandardScheme getScheme() { + return new AbortTxnRequestStandardScheme(); + } + } + + private static class AbortTxnRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AbortTxnRequest 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: // TXNID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(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, AbortTxnRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(TXNID_FIELD_DESC); + oprot.writeI64(struct.txnid); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AbortTxnRequestTupleSchemeFactory implements SchemeFactory { + public AbortTxnRequestTupleScheme getScheme() { + return new AbortTxnRequestTupleScheme(); + } + } + + private static class AbortTxnRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AbortTxnRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.txnid); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AbortTxnRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnsRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnsRequest.java new file mode 100644 index 0000000..eee1e64 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnsRequest.java @@ -0,0 +1,438 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class AbortTxnsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AbortTxnsRequest"); + + private static final org.apache.thrift.protocol.TField TXN_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("txn_ids", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AbortTxnsRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AbortTxnsRequestTupleSchemeFactory()); + } + + private List txn_ids; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TXN_IDS((short)1, "txn_ids"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TXN_IDS + return TXN_IDS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TXN_IDS, new org.apache.thrift.meta_data.FieldMetaData("txn_ids", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AbortTxnsRequest.class, metaDataMap); + } + + public AbortTxnsRequest() { + } + + public AbortTxnsRequest( + List txn_ids) + { + this(); + this.txn_ids = txn_ids; + } + + /** + * Performs a deep copy on other. + */ + public AbortTxnsRequest(AbortTxnsRequest other) { + if (other.isSetTxn_ids()) { + List __this__txn_ids = new ArrayList(other.txn_ids); + this.txn_ids = __this__txn_ids; + } + } + + public AbortTxnsRequest deepCopy() { + return new AbortTxnsRequest(this); + } + + @Override + public void clear() { + this.txn_ids = null; + } + + public int getTxn_idsSize() { + return (this.txn_ids == null) ? 0 : this.txn_ids.size(); + } + + public java.util.Iterator getTxn_idsIterator() { + return (this.txn_ids == null) ? null : this.txn_ids.iterator(); + } + + public void addToTxn_ids(long elem) { + if (this.txn_ids == null) { + this.txn_ids = new ArrayList(); + } + this.txn_ids.add(elem); + } + + public List getTxn_ids() { + return this.txn_ids; + } + + public void setTxn_ids(List txn_ids) { + this.txn_ids = txn_ids; + } + + public void unsetTxn_ids() { + this.txn_ids = null; + } + + /** Returns true if field txn_ids is set (has been assigned a value) and false otherwise */ + public boolean isSetTxn_ids() { + return this.txn_ids != null; + } + + public void setTxn_idsIsSet(boolean value) { + if (!value) { + this.txn_ids = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TXN_IDS: + if (value == null) { + unsetTxn_ids(); + } else { + setTxn_ids((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TXN_IDS: + return getTxn_ids(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TXN_IDS: + return isSetTxn_ids(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AbortTxnsRequest) + return this.equals((AbortTxnsRequest)that); + return false; + } + + public boolean equals(AbortTxnsRequest that) { + if (that == null) + return false; + + boolean this_present_txn_ids = true && this.isSetTxn_ids(); + boolean that_present_txn_ids = true && that.isSetTxn_ids(); + if (this_present_txn_ids || that_present_txn_ids) { + if (!(this_present_txn_ids && that_present_txn_ids)) + return false; + if (!this.txn_ids.equals(that.txn_ids)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_txn_ids = true && (isSetTxn_ids()); + list.add(present_txn_ids); + if (present_txn_ids) + list.add(txn_ids); + + return list.hashCode(); + } + + @Override + public int compareTo(AbortTxnsRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTxn_ids()).compareTo(other.isSetTxn_ids()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxn_ids()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txn_ids, other.txn_ids); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("AbortTxnsRequest("); + boolean first = true; + + sb.append("txn_ids:"); + if (this.txn_ids == null) { + sb.append("null"); + } else { + sb.append(this.txn_ids); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetTxn_ids()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'txn_ids' is unset! Struct:" + toString()); + } + + // 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 AbortTxnsRequestStandardSchemeFactory implements SchemeFactory { + public AbortTxnsRequestStandardScheme getScheme() { + return new AbortTxnsRequestStandardScheme(); + } + } + + private static class AbortTxnsRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AbortTxnsRequest 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: // TXN_IDS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list516 = iprot.readListBegin(); + struct.txn_ids = new ArrayList(_list516.size); + long _elem517; + for (int _i518 = 0; _i518 < _list516.size; ++_i518) + { + _elem517 = iprot.readI64(); + struct.txn_ids.add(_elem517); + } + iprot.readListEnd(); + } + struct.setTxn_idsIsSet(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, AbortTxnsRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.txn_ids != null) { + oprot.writeFieldBegin(TXN_IDS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.txn_ids.size())); + for (long _iter519 : struct.txn_ids) + { + oprot.writeI64(_iter519); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AbortTxnsRequestTupleSchemeFactory implements SchemeFactory { + public AbortTxnsRequestTupleScheme getScheme() { + return new AbortTxnsRequestTupleScheme(); + } + } + + private static class AbortTxnsRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AbortTxnsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.txn_ids.size()); + for (long _iter520 : struct.txn_ids) + { + oprot.writeI64(_iter520); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AbortTxnsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list521 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.txn_ids = new ArrayList(_list521.size); + long _elem522; + for (int _i523 = 0; _i523 < _list521.size; ++_i523) + { + _elem522 = iprot.readI64(); + struct.txn_ids.add(_elem522); + } + } + struct.setTxn_idsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java new file mode 100644 index 0000000..054cf1b --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java @@ -0,0 +1,864 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class AddDynamicPartitions implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddDynamicPartitions"); + + private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)1); + 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)2); + private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PARTITIONNAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionnames", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.I32, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AddDynamicPartitionsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AddDynamicPartitionsTupleSchemeFactory()); + } + + private long txnid; // required + private String dbname; // required + private String tablename; // required + private List partitionnames; // required + private DataOperationType operationType; // 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 { + TXNID((short)1, "txnid"), + DBNAME((short)2, "dbname"), + TABLENAME((short)3, "tablename"), + PARTITIONNAMES((short)4, "partitionnames"), + /** + * + * @see DataOperationType + */ + OPERATION_TYPE((short)5, "operationType"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TXNID + return TXNID; + case 2: // DBNAME + return DBNAME; + case 3: // TABLENAME + return TABLENAME; + case 4: // PARTITIONNAMES + return PARTITIONNAMES; + case 5: // OPERATION_TYPE + return OPERATION_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TXNID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.OPERATION_TYPE}; + 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); + tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARTITIONNAMES, new org.apache.thrift.meta_data.FieldMetaData("partitionnames", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.OPERATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("operationType", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DataOperationType.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddDynamicPartitions.class, metaDataMap); + } + + public AddDynamicPartitions() { + this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET; + + } + + public AddDynamicPartitions( + long txnid, + String dbname, + String tablename, + List partitionnames) + { + this(); + this.txnid = txnid; + setTxnidIsSet(true); + this.dbname = dbname; + this.tablename = tablename; + this.partitionnames = partitionnames; + } + + /** + * Performs a deep copy on other. + */ + public AddDynamicPartitions(AddDynamicPartitions other) { + __isset_bitfield = other.__isset_bitfield; + this.txnid = other.txnid; + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTablename()) { + this.tablename = other.tablename; + } + if (other.isSetPartitionnames()) { + List __this__partitionnames = new ArrayList(other.partitionnames); + this.partitionnames = __this__partitionnames; + } + if (other.isSetOperationType()) { + this.operationType = other.operationType; + } + } + + public AddDynamicPartitions deepCopy() { + return new AddDynamicPartitions(this); + } + + @Override + public void clear() { + setTxnidIsSet(false); + this.txnid = 0; + this.dbname = null; + this.tablename = null; + this.partitionnames = null; + this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET; + + } + + public long getTxnid() { + return this.txnid; + } + + public void setTxnid(long txnid) { + this.txnid = txnid; + setTxnidIsSet(true); + } + + public void unsetTxnid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ + public boolean isSetTxnid() { + return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + public void setTxnidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTablename() { + return this.tablename; + } + + public void setTablename(String tablename) { + this.tablename = tablename; + } + + public void unsetTablename() { + this.tablename = null; + } + + /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ + public boolean isSetTablename() { + return this.tablename != null; + } + + public void setTablenameIsSet(boolean value) { + if (!value) { + this.tablename = null; + } + } + + public int getPartitionnamesSize() { + return (this.partitionnames == null) ? 0 : this.partitionnames.size(); + } + + public java.util.Iterator getPartitionnamesIterator() { + return (this.partitionnames == null) ? null : this.partitionnames.iterator(); + } + + public void addToPartitionnames(String elem) { + if (this.partitionnames == null) { + this.partitionnames = new ArrayList(); + } + this.partitionnames.add(elem); + } + + public List getPartitionnames() { + return this.partitionnames; + } + + public void setPartitionnames(List partitionnames) { + this.partitionnames = partitionnames; + } + + public void unsetPartitionnames() { + this.partitionnames = null; + } + + /** Returns true if field partitionnames is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitionnames() { + return this.partitionnames != null; + } + + public void setPartitionnamesIsSet(boolean value) { + if (!value) { + this.partitionnames = null; + } + } + + /** + * + * @see DataOperationType + */ + public DataOperationType getOperationType() { + return this.operationType; + } + + /** + * + * @see DataOperationType + */ + public void setOperationType(DataOperationType operationType) { + this.operationType = operationType; + } + + public void unsetOperationType() { + this.operationType = null; + } + + /** Returns true if field operationType is set (has been assigned a value) and false otherwise */ + public boolean isSetOperationType() { + return this.operationType != null; + } + + public void setOperationTypeIsSet(boolean value) { + if (!value) { + this.operationType = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TXNID: + if (value == null) { + unsetTxnid(); + } else { + setTxnid((Long)value); + } + break; + + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TABLENAME: + if (value == null) { + unsetTablename(); + } else { + setTablename((String)value); + } + break; + + case PARTITIONNAMES: + if (value == null) { + unsetPartitionnames(); + } else { + setPartitionnames((List)value); + } + break; + + case OPERATION_TYPE: + if (value == null) { + unsetOperationType(); + } else { + setOperationType((DataOperationType)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TXNID: + return getTxnid(); + + case DBNAME: + return getDbname(); + + case TABLENAME: + return getTablename(); + + case PARTITIONNAMES: + return getPartitionnames(); + + case OPERATION_TYPE: + return getOperationType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TXNID: + return isSetTxnid(); + case DBNAME: + return isSetDbname(); + case TABLENAME: + return isSetTablename(); + case PARTITIONNAMES: + return isSetPartitionnames(); + case OPERATION_TYPE: + return isSetOperationType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AddDynamicPartitions) + return this.equals((AddDynamicPartitions)that); + return false; + } + + public boolean equals(AddDynamicPartitions that) { + if (that == null) + return false; + + boolean this_present_txnid = true; + boolean that_present_txnid = true; + if (this_present_txnid || that_present_txnid) { + if (!(this_present_txnid && that_present_txnid)) + return false; + if (this.txnid != that.txnid) + return false; + } + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tablename = true && this.isSetTablename(); + boolean that_present_tablename = true && that.isSetTablename(); + if (this_present_tablename || that_present_tablename) { + if (!(this_present_tablename && that_present_tablename)) + return false; + if (!this.tablename.equals(that.tablename)) + return false; + } + + boolean this_present_partitionnames = true && this.isSetPartitionnames(); + boolean that_present_partitionnames = true && that.isSetPartitionnames(); + if (this_present_partitionnames || that_present_partitionnames) { + if (!(this_present_partitionnames && that_present_partitionnames)) + return false; + if (!this.partitionnames.equals(that.partitionnames)) + return false; + } + + boolean this_present_operationType = true && this.isSetOperationType(); + boolean that_present_operationType = true && that.isSetOperationType(); + if (this_present_operationType || that_present_operationType) { + if (!(this_present_operationType && that_present_operationType)) + return false; + if (!this.operationType.equals(that.operationType)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_txnid = true; + list.add(present_txnid); + if (present_txnid) + list.add(txnid); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tablename = true && (isSetTablename()); + list.add(present_tablename); + if (present_tablename) + list.add(tablename); + + boolean present_partitionnames = true && (isSetPartitionnames()); + list.add(present_partitionnames); + if (present_partitionnames) + list.add(partitionnames); + + boolean present_operationType = true && (isSetOperationType()); + list.add(present_operationType); + if (present_operationType) + list.add(operationType.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(AddDynamicPartitions other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxnid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTablename()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartitionnames()).compareTo(other.isSetPartitionnames()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionnames()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionnames, other.partitionnames); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(other.isSetOperationType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperationType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("AddDynamicPartitions("); + boolean first = true; + + sb.append("txnid:"); + sb.append(this.txnid); + first = false; + if (!first) sb.append(", "); + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tablename:"); + if (this.tablename == null) { + sb.append("null"); + } else { + sb.append(this.tablename); + } + first = false; + if (!first) sb.append(", "); + sb.append("partitionnames:"); + if (this.partitionnames == null) { + sb.append("null"); + } else { + sb.append(this.partitionnames); + } + first = false; + if (isSetOperationType()) { + if (!first) sb.append(", "); + sb.append("operationType:"); + if (this.operationType == null) { + sb.append("null"); + } else { + sb.append(this.operationType); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetTxnid()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnid' is unset! Struct:" + toString()); + } + + if (!isSetDbname()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); + } + + if (!isSetTablename()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString()); + } + + if (!isSetPartitionnames()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'partitionnames' is unset! Struct:" + toString()); + } + + // 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 { + // 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 AddDynamicPartitionsStandardSchemeFactory implements SchemeFactory { + public AddDynamicPartitionsStandardScheme getScheme() { + return new AddDynamicPartitionsStandardScheme(); + } + } + + private static class AddDynamicPartitionsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AddDynamicPartitions 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: // TXNID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // 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 3: // TABLENAME + 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: // PARTITIONNAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list574 = iprot.readListBegin(); + struct.partitionnames = new ArrayList(_list574.size); + String _elem575; + for (int _i576 = 0; _i576 < _list574.size; ++_i576) + { + _elem575 = iprot.readString(); + struct.partitionnames.add(_elem575); + } + iprot.readListEnd(); + } + struct.setPartitionnamesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // OPERATION_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32()); + struct.setOperationTypeIsSet(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, AddDynamicPartitions struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(TXNID_FIELD_DESC); + oprot.writeI64(struct.txnid); + oprot.writeFieldEnd(); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.tablename != null) { + oprot.writeFieldBegin(TABLENAME_FIELD_DESC); + oprot.writeString(struct.tablename); + oprot.writeFieldEnd(); + } + if (struct.partitionnames != null) { + oprot.writeFieldBegin(PARTITIONNAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partitionnames.size())); + for (String _iter577 : struct.partitionnames) + { + oprot.writeString(_iter577); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.operationType != null) { + if (struct.isSetOperationType()) { + oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC); + oprot.writeI32(struct.operationType.getValue()); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AddDynamicPartitionsTupleSchemeFactory implements SchemeFactory { + public AddDynamicPartitionsTupleScheme getScheme() { + return new AddDynamicPartitionsTupleScheme(); + } + } + + private static class AddDynamicPartitionsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AddDynamicPartitions struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.txnid); + oprot.writeString(struct.dbname); + oprot.writeString(struct.tablename); + { + oprot.writeI32(struct.partitionnames.size()); + for (String _iter578 : struct.partitionnames) + { + oprot.writeString(_iter578); + } + } + BitSet optionals = new BitSet(); + if (struct.isSetOperationType()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetOperationType()) { + oprot.writeI32(struct.operationType.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AddDynamicPartitions struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(true); + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + struct.tablename = iprot.readString(); + struct.setTablenameIsSet(true); + { + org.apache.thrift.protocol.TList _list579 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.partitionnames = new ArrayList(_list579.size); + String _elem580; + for (int _i581 = 0; _i581 < _list579.size; ++_i581) + { + _elem580 = iprot.readString(); + struct.partitionnames.add(_elem580); + } + } + struct.setPartitionnamesIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32()); + struct.setOperationTypeIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddForeignKeyRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddForeignKeyRequest.java new file mode 100644 index 0000000..3123787 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddForeignKeyRequest.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class AddForeignKeyRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddForeignKeyRequest"); + + private static final org.apache.thrift.protocol.TField FOREIGN_KEY_COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignKeyCols", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AddForeignKeyRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AddForeignKeyRequestTupleSchemeFactory()); + } + + private List foreignKeyCols; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + FOREIGN_KEY_COLS((short)1, "foreignKeyCols"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FOREIGN_KEY_COLS + return FOREIGN_KEY_COLS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.FOREIGN_KEY_COLS, new org.apache.thrift.meta_data.FieldMetaData("foreignKeyCols", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLForeignKey.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddForeignKeyRequest.class, metaDataMap); + } + + public AddForeignKeyRequest() { + } + + public AddForeignKeyRequest( + List foreignKeyCols) + { + this(); + this.foreignKeyCols = foreignKeyCols; + } + + /** + * Performs a deep copy on other. + */ + public AddForeignKeyRequest(AddForeignKeyRequest other) { + if (other.isSetForeignKeyCols()) { + List __this__foreignKeyCols = new ArrayList(other.foreignKeyCols.size()); + for (SQLForeignKey other_element : other.foreignKeyCols) { + __this__foreignKeyCols.add(new SQLForeignKey(other_element)); + } + this.foreignKeyCols = __this__foreignKeyCols; + } + } + + public AddForeignKeyRequest deepCopy() { + return new AddForeignKeyRequest(this); + } + + @Override + public void clear() { + this.foreignKeyCols = null; + } + + public int getForeignKeyColsSize() { + return (this.foreignKeyCols == null) ? 0 : this.foreignKeyCols.size(); + } + + public java.util.Iterator getForeignKeyColsIterator() { + return (this.foreignKeyCols == null) ? null : this.foreignKeyCols.iterator(); + } + + public void addToForeignKeyCols(SQLForeignKey elem) { + if (this.foreignKeyCols == null) { + this.foreignKeyCols = new ArrayList(); + } + this.foreignKeyCols.add(elem); + } + + public List getForeignKeyCols() { + return this.foreignKeyCols; + } + + public void setForeignKeyCols(List foreignKeyCols) { + this.foreignKeyCols = foreignKeyCols; + } + + public void unsetForeignKeyCols() { + this.foreignKeyCols = null; + } + + /** Returns true if field foreignKeyCols is set (has been assigned a value) and false otherwise */ + public boolean isSetForeignKeyCols() { + return this.foreignKeyCols != null; + } + + public void setForeignKeyColsIsSet(boolean value) { + if (!value) { + this.foreignKeyCols = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FOREIGN_KEY_COLS: + if (value == null) { + unsetForeignKeyCols(); + } else { + setForeignKeyCols((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FOREIGN_KEY_COLS: + return getForeignKeyCols(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FOREIGN_KEY_COLS: + return isSetForeignKeyCols(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AddForeignKeyRequest) + return this.equals((AddForeignKeyRequest)that); + return false; + } + + public boolean equals(AddForeignKeyRequest that) { + if (that == null) + return false; + + boolean this_present_foreignKeyCols = true && this.isSetForeignKeyCols(); + boolean that_present_foreignKeyCols = true && that.isSetForeignKeyCols(); + if (this_present_foreignKeyCols || that_present_foreignKeyCols) { + if (!(this_present_foreignKeyCols && that_present_foreignKeyCols)) + return false; + if (!this.foreignKeyCols.equals(that.foreignKeyCols)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_foreignKeyCols = true && (isSetForeignKeyCols()); + list.add(present_foreignKeyCols); + if (present_foreignKeyCols) + list.add(foreignKeyCols); + + return list.hashCode(); + } + + @Override + public int compareTo(AddForeignKeyRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetForeignKeyCols()).compareTo(other.isSetForeignKeyCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetForeignKeyCols()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignKeyCols, other.foreignKeyCols); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("AddForeignKeyRequest("); + boolean first = true; + + sb.append("foreignKeyCols:"); + if (this.foreignKeyCols == null) { + sb.append("null"); + } else { + sb.append(this.foreignKeyCols); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetForeignKeyCols()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'foreignKeyCols' is unset! Struct:" + toString()); + } + + // 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 AddForeignKeyRequestStandardSchemeFactory implements SchemeFactory { + public AddForeignKeyRequestStandardScheme getScheme() { + return new AddForeignKeyRequestStandardScheme(); + } + } + + private static class AddForeignKeyRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AddForeignKeyRequest 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: // FOREIGN_KEY_COLS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list362 = iprot.readListBegin(); + struct.foreignKeyCols = new ArrayList(_list362.size); + SQLForeignKey _elem363; + for (int _i364 = 0; _i364 < _list362.size; ++_i364) + { + _elem363 = new SQLForeignKey(); + _elem363.read(iprot); + struct.foreignKeyCols.add(_elem363); + } + iprot.readListEnd(); + } + struct.setForeignKeyColsIsSet(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, AddForeignKeyRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.foreignKeyCols != null) { + oprot.writeFieldBegin(FOREIGN_KEY_COLS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeyCols.size())); + for (SQLForeignKey _iter365 : struct.foreignKeyCols) + { + _iter365.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AddForeignKeyRequestTupleSchemeFactory implements SchemeFactory { + public AddForeignKeyRequestTupleScheme getScheme() { + return new AddForeignKeyRequestTupleScheme(); + } + } + + private static class AddForeignKeyRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AddForeignKeyRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.foreignKeyCols.size()); + for (SQLForeignKey _iter366 : struct.foreignKeyCols) + { + _iter366.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AddForeignKeyRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list367 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.foreignKeyCols = new ArrayList(_list367.size); + SQLForeignKey _elem368; + for (int _i369 = 0; _i369 < _list367.size; ++_i369) + { + _elem368 = new SQLForeignKey(); + _elem368.read(iprot); + struct.foreignKeyCols.add(_elem368); + } + } + struct.setForeignKeyColsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddNotNullConstraintRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddNotNullConstraintRequest.java new file mode 100644 index 0000000..3b79e98 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddNotNullConstraintRequest.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class AddNotNullConstraintRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddNotNullConstraintRequest"); + + private static final org.apache.thrift.protocol.TField NOT_NULL_CONSTRAINT_COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("notNullConstraintCols", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AddNotNullConstraintRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AddNotNullConstraintRequestTupleSchemeFactory()); + } + + private List notNullConstraintCols; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NOT_NULL_CONSTRAINT_COLS((short)1, "notNullConstraintCols"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NOT_NULL_CONSTRAINT_COLS + return NOT_NULL_CONSTRAINT_COLS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NOT_NULL_CONSTRAINT_COLS, new org.apache.thrift.meta_data.FieldMetaData("notNullConstraintCols", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLNotNullConstraint.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddNotNullConstraintRequest.class, metaDataMap); + } + + public AddNotNullConstraintRequest() { + } + + public AddNotNullConstraintRequest( + List notNullConstraintCols) + { + this(); + this.notNullConstraintCols = notNullConstraintCols; + } + + /** + * Performs a deep copy on other. + */ + public AddNotNullConstraintRequest(AddNotNullConstraintRequest other) { + if (other.isSetNotNullConstraintCols()) { + List __this__notNullConstraintCols = new ArrayList(other.notNullConstraintCols.size()); + for (SQLNotNullConstraint other_element : other.notNullConstraintCols) { + __this__notNullConstraintCols.add(new SQLNotNullConstraint(other_element)); + } + this.notNullConstraintCols = __this__notNullConstraintCols; + } + } + + public AddNotNullConstraintRequest deepCopy() { + return new AddNotNullConstraintRequest(this); + } + + @Override + public void clear() { + this.notNullConstraintCols = null; + } + + public int getNotNullConstraintColsSize() { + return (this.notNullConstraintCols == null) ? 0 : this.notNullConstraintCols.size(); + } + + public java.util.Iterator getNotNullConstraintColsIterator() { + return (this.notNullConstraintCols == null) ? null : this.notNullConstraintCols.iterator(); + } + + public void addToNotNullConstraintCols(SQLNotNullConstraint elem) { + if (this.notNullConstraintCols == null) { + this.notNullConstraintCols = new ArrayList(); + } + this.notNullConstraintCols.add(elem); + } + + public List getNotNullConstraintCols() { + return this.notNullConstraintCols; + } + + public void setNotNullConstraintCols(List notNullConstraintCols) { + this.notNullConstraintCols = notNullConstraintCols; + } + + public void unsetNotNullConstraintCols() { + this.notNullConstraintCols = null; + } + + /** Returns true if field notNullConstraintCols is set (has been assigned a value) and false otherwise */ + public boolean isSetNotNullConstraintCols() { + return this.notNullConstraintCols != null; + } + + public void setNotNullConstraintColsIsSet(boolean value) { + if (!value) { + this.notNullConstraintCols = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NOT_NULL_CONSTRAINT_COLS: + if (value == null) { + unsetNotNullConstraintCols(); + } else { + setNotNullConstraintCols((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NOT_NULL_CONSTRAINT_COLS: + return getNotNullConstraintCols(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NOT_NULL_CONSTRAINT_COLS: + return isSetNotNullConstraintCols(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AddNotNullConstraintRequest) + return this.equals((AddNotNullConstraintRequest)that); + return false; + } + + public boolean equals(AddNotNullConstraintRequest that) { + if (that == null) + return false; + + boolean this_present_notNullConstraintCols = true && this.isSetNotNullConstraintCols(); + boolean that_present_notNullConstraintCols = true && that.isSetNotNullConstraintCols(); + if (this_present_notNullConstraintCols || that_present_notNullConstraintCols) { + if (!(this_present_notNullConstraintCols && that_present_notNullConstraintCols)) + return false; + if (!this.notNullConstraintCols.equals(that.notNullConstraintCols)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_notNullConstraintCols = true && (isSetNotNullConstraintCols()); + list.add(present_notNullConstraintCols); + if (present_notNullConstraintCols) + list.add(notNullConstraintCols); + + return list.hashCode(); + } + + @Override + public int compareTo(AddNotNullConstraintRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNotNullConstraintCols()).compareTo(other.isSetNotNullConstraintCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNotNullConstraintCols()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notNullConstraintCols, other.notNullConstraintCols); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("AddNotNullConstraintRequest("); + boolean first = true; + + sb.append("notNullConstraintCols:"); + if (this.notNullConstraintCols == null) { + sb.append("null"); + } else { + sb.append(this.notNullConstraintCols); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetNotNullConstraintCols()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'notNullConstraintCols' is unset! Struct:" + toString()); + } + + // 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 AddNotNullConstraintRequestStandardSchemeFactory implements SchemeFactory { + public AddNotNullConstraintRequestStandardScheme getScheme() { + return new AddNotNullConstraintRequestStandardScheme(); + } + } + + private static class AddNotNullConstraintRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AddNotNullConstraintRequest 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: // NOT_NULL_CONSTRAINT_COLS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list378 = iprot.readListBegin(); + struct.notNullConstraintCols = new ArrayList(_list378.size); + SQLNotNullConstraint _elem379; + for (int _i380 = 0; _i380 < _list378.size; ++_i380) + { + _elem379 = new SQLNotNullConstraint(); + _elem379.read(iprot); + struct.notNullConstraintCols.add(_elem379); + } + iprot.readListEnd(); + } + struct.setNotNullConstraintColsIsSet(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, AddNotNullConstraintRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.notNullConstraintCols != null) { + oprot.writeFieldBegin(NOT_NULL_CONSTRAINT_COLS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.notNullConstraintCols.size())); + for (SQLNotNullConstraint _iter381 : struct.notNullConstraintCols) + { + _iter381.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AddNotNullConstraintRequestTupleSchemeFactory implements SchemeFactory { + public AddNotNullConstraintRequestTupleScheme getScheme() { + return new AddNotNullConstraintRequestTupleScheme(); + } + } + + private static class AddNotNullConstraintRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AddNotNullConstraintRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.notNullConstraintCols.size()); + for (SQLNotNullConstraint _iter382 : struct.notNullConstraintCols) + { + _iter382.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AddNotNullConstraintRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list383 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.notNullConstraintCols = new ArrayList(_list383.size); + SQLNotNullConstraint _elem384; + for (int _i385 = 0; _i385 < _list383.size; ++_i385) + { + _elem384 = new SQLNotNullConstraint(); + _elem384.read(iprot); + struct.notNullConstraintCols.add(_elem384); + } + } + struct.setNotNullConstraintColsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java new file mode 100644 index 0000000..6e9ac48 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java @@ -0,0 +1,849 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class AddPartitionsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddPartitionsRequest"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("parts", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField IF_NOT_EXISTS_FIELD_DESC = new org.apache.thrift.protocol.TField("ifNotExists", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final org.apache.thrift.protocol.TField NEED_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("needResult", org.apache.thrift.protocol.TType.BOOL, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AddPartitionsRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AddPartitionsRequestTupleSchemeFactory()); + } + + private String dbName; // required + private String tblName; // required + private List parts; // required + private boolean ifNotExists; // required + private boolean needResult; // 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 { + DB_NAME((short)1, "dbName"), + TBL_NAME((short)2, "tblName"), + PARTS((short)3, "parts"), + IF_NOT_EXISTS((short)4, "ifNotExists"), + NEED_RESULT((short)5, "needResult"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PARTS + return PARTS; + case 4: // IF_NOT_EXISTS + return IF_NOT_EXISTS; + case 5: // NEED_RESULT + return NEED_RESULT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __IFNOTEXISTS_ISSET_ID = 0; + private static final int __NEEDRESULT_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.NEED_RESULT}; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARTS, new org.apache.thrift.meta_data.FieldMetaData("parts", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.IF_NOT_EXISTS, new org.apache.thrift.meta_data.FieldMetaData("ifNotExists", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.NEED_RESULT, new org.apache.thrift.meta_data.FieldMetaData("needResult", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddPartitionsRequest.class, metaDataMap); + } + + public AddPartitionsRequest() { + this.needResult = true; + + } + + public AddPartitionsRequest( + String dbName, + String tblName, + List parts, + boolean ifNotExists) + { + this(); + this.dbName = dbName; + this.tblName = tblName; + this.parts = parts; + this.ifNotExists = ifNotExists; + setIfNotExistsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public AddPartitionsRequest(AddPartitionsRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTblName()) { + this.tblName = other.tblName; + } + if (other.isSetParts()) { + List __this__parts = new ArrayList(other.parts.size()); + for (Partition other_element : other.parts) { + __this__parts.add(new Partition(other_element)); + } + this.parts = __this__parts; + } + this.ifNotExists = other.ifNotExists; + this.needResult = other.needResult; + } + + public AddPartitionsRequest deepCopy() { + return new AddPartitionsRequest(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tblName = null; + this.parts = null; + setIfNotExistsIsSet(false); + this.ifNotExists = false; + this.needResult = true; + + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTblName() { + return this.tblName; + } + + public void setTblName(String tblName) { + this.tblName = tblName; + } + + public void unsetTblName() { + this.tblName = null; + } + + /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ + public boolean isSetTblName() { + return this.tblName != null; + } + + public void setTblNameIsSet(boolean value) { + if (!value) { + this.tblName = null; + } + } + + public int getPartsSize() { + return (this.parts == null) ? 0 : this.parts.size(); + } + + public java.util.Iterator getPartsIterator() { + return (this.parts == null) ? null : this.parts.iterator(); + } + + public void addToParts(Partition elem) { + if (this.parts == null) { + this.parts = new ArrayList(); + } + this.parts.add(elem); + } + + public List getParts() { + return this.parts; + } + + public void setParts(List parts) { + this.parts = parts; + } + + public void unsetParts() { + this.parts = null; + } + + /** Returns true if field parts is set (has been assigned a value) and false otherwise */ + public boolean isSetParts() { + return this.parts != null; + } + + public void setPartsIsSet(boolean value) { + if (!value) { + this.parts = null; + } + } + + public boolean isIfNotExists() { + return this.ifNotExists; + } + + public void setIfNotExists(boolean ifNotExists) { + this.ifNotExists = ifNotExists; + setIfNotExistsIsSet(true); + } + + public void unsetIfNotExists() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IFNOTEXISTS_ISSET_ID); + } + + /** Returns true if field ifNotExists is set (has been assigned a value) and false otherwise */ + public boolean isSetIfNotExists() { + return EncodingUtils.testBit(__isset_bitfield, __IFNOTEXISTS_ISSET_ID); + } + + public void setIfNotExistsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IFNOTEXISTS_ISSET_ID, value); + } + + public boolean isNeedResult() { + return this.needResult; + } + + public void setNeedResult(boolean needResult) { + this.needResult = needResult; + setNeedResultIsSet(true); + } + + public void unsetNeedResult() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NEEDRESULT_ISSET_ID); + } + + /** Returns true if field needResult is set (has been assigned a value) and false otherwise */ + public boolean isSetNeedResult() { + return EncodingUtils.testBit(__isset_bitfield, __NEEDRESULT_ISSET_ID); + } + + public void setNeedResultIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NEEDRESULT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTblName(); + } else { + setTblName((String)value); + } + break; + + case PARTS: + if (value == null) { + unsetParts(); + } else { + setParts((List)value); + } + break; + + case IF_NOT_EXISTS: + if (value == null) { + unsetIfNotExists(); + } else { + setIfNotExists((Boolean)value); + } + break; + + case NEED_RESULT: + if (value == null) { + unsetNeedResult(); + } else { + setNeedResult((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TBL_NAME: + return getTblName(); + + case PARTS: + return getParts(); + + case IF_NOT_EXISTS: + return isIfNotExists(); + + case NEED_RESULT: + return isNeedResult(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case TBL_NAME: + return isSetTblName(); + case PARTS: + return isSetParts(); + case IF_NOT_EXISTS: + return isSetIfNotExists(); + case NEED_RESULT: + return isSetNeedResult(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AddPartitionsRequest) + return this.equals((AddPartitionsRequest)that); + return false; + } + + public boolean equals(AddPartitionsRequest that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tblName = true && this.isSetTblName(); + boolean that_present_tblName = true && that.isSetTblName(); + if (this_present_tblName || that_present_tblName) { + if (!(this_present_tblName && that_present_tblName)) + return false; + if (!this.tblName.equals(that.tblName)) + return false; + } + + boolean this_present_parts = true && this.isSetParts(); + boolean that_present_parts = true && that.isSetParts(); + if (this_present_parts || that_present_parts) { + if (!(this_present_parts && that_present_parts)) + return false; + if (!this.parts.equals(that.parts)) + return false; + } + + boolean this_present_ifNotExists = true; + boolean that_present_ifNotExists = true; + if (this_present_ifNotExists || that_present_ifNotExists) { + if (!(this_present_ifNotExists && that_present_ifNotExists)) + return false; + if (this.ifNotExists != that.ifNotExists) + return false; + } + + boolean this_present_needResult = true && this.isSetNeedResult(); + boolean that_present_needResult = true && that.isSetNeedResult(); + if (this_present_needResult || that_present_needResult) { + if (!(this_present_needResult && that_present_needResult)) + return false; + if (this.needResult != that.needResult) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tblName = true && (isSetTblName()); + list.add(present_tblName); + if (present_tblName) + list.add(tblName); + + boolean present_parts = true && (isSetParts()); + list.add(present_parts); + if (present_parts) + list.add(parts); + + boolean present_ifNotExists = true; + list.add(present_ifNotExists); + if (present_ifNotExists) + list.add(ifNotExists); + + boolean present_needResult = true && (isSetNeedResult()); + list.add(present_needResult); + if (present_needResult) + list.add(needResult); + + return list.hashCode(); + } + + @Override + public int compareTo(AddPartitionsRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTblName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParts()).compareTo(other.isSetParts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parts, other.parts); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIfNotExists()).compareTo(other.isSetIfNotExists()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIfNotExists()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ifNotExists, other.ifNotExists); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNeedResult()).compareTo(other.isSetNeedResult()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNeedResult()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.needResult, other.needResult); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("AddPartitionsRequest("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tblName:"); + if (this.tblName == null) { + sb.append("null"); + } else { + sb.append(this.tblName); + } + first = false; + if (!first) sb.append(", "); + sb.append("parts:"); + if (this.parts == null) { + sb.append("null"); + } else { + sb.append(this.parts); + } + first = false; + if (!first) sb.append(", "); + sb.append("ifNotExists:"); + sb.append(this.ifNotExists); + first = false; + if (isSetNeedResult()) { + if (!first) sb.append(", "); + sb.append("needResult:"); + sb.append(this.needResult); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + if (!isSetTblName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); + } + + if (!isSetParts()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'parts' is unset! Struct:" + toString()); + } + + if (!isSetIfNotExists()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'ifNotExists' is unset! Struct:" + toString()); + } + + // 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 { + // 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 AddPartitionsRequestStandardSchemeFactory implements SchemeFactory { + public AddPartitionsRequestStandardScheme getScheme() { + return new AddPartitionsRequestStandardScheme(); + } + } + + private static class AddPartitionsRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AddPartitionsRequest 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.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.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list452 = iprot.readListBegin(); + struct.parts = new ArrayList(_list452.size); + Partition _elem453; + for (int _i454 = 0; _i454 < _list452.size; ++_i454) + { + _elem453 = new Partition(); + _elem453.read(iprot); + struct.parts.add(_elem453); + } + iprot.readListEnd(); + } + struct.setPartsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // IF_NOT_EXISTS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.ifNotExists = iprot.readBool(); + struct.setIfNotExistsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // NEED_RESULT + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.needResult = iprot.readBool(); + struct.setNeedResultIsSet(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, AddPartitionsRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.tblName != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tblName); + oprot.writeFieldEnd(); + } + if (struct.parts != null) { + oprot.writeFieldBegin(PARTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.parts.size())); + for (Partition _iter455 : struct.parts) + { + _iter455.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IF_NOT_EXISTS_FIELD_DESC); + oprot.writeBool(struct.ifNotExists); + oprot.writeFieldEnd(); + if (struct.isSetNeedResult()) { + oprot.writeFieldBegin(NEED_RESULT_FIELD_DESC); + oprot.writeBool(struct.needResult); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AddPartitionsRequestTupleSchemeFactory implements SchemeFactory { + public AddPartitionsRequestTupleScheme getScheme() { + return new AddPartitionsRequestTupleScheme(); + } + } + + private static class AddPartitionsRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AddPartitionsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbName); + oprot.writeString(struct.tblName); + { + oprot.writeI32(struct.parts.size()); + for (Partition _iter456 : struct.parts) + { + _iter456.write(oprot); + } + } + oprot.writeBool(struct.ifNotExists); + BitSet optionals = new BitSet(); + if (struct.isSetNeedResult()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetNeedResult()) { + oprot.writeBool(struct.needResult); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AddPartitionsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + struct.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + { + org.apache.thrift.protocol.TList _list457 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.parts = new ArrayList(_list457.size); + Partition _elem458; + for (int _i459 = 0; _i459 < _list457.size; ++_i459) + { + _elem458 = new Partition(); + _elem458.read(iprot); + struct.parts.add(_elem458); + } + } + struct.setPartsIsSet(true); + struct.ifNotExists = iprot.readBool(); + struct.setIfNotExistsIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.needResult = iprot.readBool(); + struct.setNeedResultIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java new file mode 100644 index 0000000..0dfed78 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java @@ -0,0 +1,447 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class AddPartitionsResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddPartitionsResult"); + + private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AddPartitionsResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AddPartitionsResultTupleSchemeFactory()); + } + + private List partitions; // 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 { + PARTITIONS((short)1, "partitions"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PARTITIONS + return PARTITIONS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.PARTITIONS}; + 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); + tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddPartitionsResult.class, metaDataMap); + } + + public AddPartitionsResult() { + } + + /** + * Performs a deep copy on other. + */ + public AddPartitionsResult(AddPartitionsResult other) { + if (other.isSetPartitions()) { + List __this__partitions = new ArrayList(other.partitions.size()); + for (Partition other_element : other.partitions) { + __this__partitions.add(new Partition(other_element)); + } + this.partitions = __this__partitions; + } + } + + public AddPartitionsResult deepCopy() { + return new AddPartitionsResult(this); + } + + @Override + public void clear() { + this.partitions = null; + } + + public int getPartitionsSize() { + return (this.partitions == null) ? 0 : this.partitions.size(); + } + + public java.util.Iterator getPartitionsIterator() { + return (this.partitions == null) ? null : this.partitions.iterator(); + } + + public void addToPartitions(Partition elem) { + if (this.partitions == null) { + this.partitions = new ArrayList(); + } + this.partitions.add(elem); + } + + public List getPartitions() { + return this.partitions; + } + + public void setPartitions(List partitions) { + this.partitions = partitions; + } + + public void unsetPartitions() { + this.partitions = null; + } + + /** Returns true if field partitions is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitions() { + return this.partitions != null; + } + + public void setPartitionsIsSet(boolean value) { + if (!value) { + this.partitions = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PARTITIONS: + if (value == null) { + unsetPartitions(); + } else { + setPartitions((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PARTITIONS: + return getPartitions(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PARTITIONS: + return isSetPartitions(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AddPartitionsResult) + return this.equals((AddPartitionsResult)that); + return false; + } + + public boolean equals(AddPartitionsResult that) { + if (that == null) + return false; + + boolean this_present_partitions = true && this.isSetPartitions(); + boolean that_present_partitions = true && that.isSetPartitions(); + if (this_present_partitions || that_present_partitions) { + if (!(this_present_partitions && that_present_partitions)) + return false; + if (!this.partitions.equals(that.partitions)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_partitions = true && (isSetPartitions()); + list.add(present_partitions); + if (present_partitions) + list.add(partitions); + + return list.hashCode(); + } + + @Override + public int compareTo(AddPartitionsResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPartitions()).compareTo(other.isSetPartitions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("AddPartitionsResult("); + boolean first = true; + + if (isSetPartitions()) { + sb.append("partitions:"); + if (this.partitions == null) { + sb.append("null"); + } else { + sb.append(this.partitions); + } + 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 AddPartitionsResultStandardSchemeFactory implements SchemeFactory { + public AddPartitionsResultStandardScheme getScheme() { + return new AddPartitionsResultStandardScheme(); + } + } + + private static class AddPartitionsResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AddPartitionsResult 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: // PARTITIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list444 = iprot.readListBegin(); + struct.partitions = new ArrayList(_list444.size); + Partition _elem445; + for (int _i446 = 0; _i446 < _list444.size; ++_i446) + { + _elem445 = new Partition(); + _elem445.read(iprot); + struct.partitions.add(_elem445); + } + iprot.readListEnd(); + } + struct.setPartitionsIsSet(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, AddPartitionsResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.partitions != null) { + if (struct.isSetPartitions()) { + oprot.writeFieldBegin(PARTITIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size())); + for (Partition _iter447 : struct.partitions) + { + _iter447.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AddPartitionsResultTupleSchemeFactory implements SchemeFactory { + public AddPartitionsResultTupleScheme getScheme() { + return new AddPartitionsResultTupleScheme(); + } + } + + private static class AddPartitionsResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AddPartitionsResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPartitions()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPartitions()) { + { + oprot.writeI32(struct.partitions.size()); + for (Partition _iter448 : struct.partitions) + { + _iter448.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AddPartitionsResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list449 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.partitions = new ArrayList(_list449.size); + Partition _elem450; + for (int _i451 = 0; _i451 < _list449.size; ++_i451) + { + _elem450 = new Partition(); + _elem450.read(iprot); + struct.partitions.add(_elem450); + } + } + struct.setPartitionsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPrimaryKeyRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPrimaryKeyRequest.java new file mode 100644 index 0000000..55e606d --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPrimaryKeyRequest.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class AddPrimaryKeyRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddPrimaryKeyRequest"); + + private static final org.apache.thrift.protocol.TField PRIMARY_KEY_COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("primaryKeyCols", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AddPrimaryKeyRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AddPrimaryKeyRequestTupleSchemeFactory()); + } + + private List primaryKeyCols; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PRIMARY_KEY_COLS((short)1, "primaryKeyCols"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PRIMARY_KEY_COLS + return PRIMARY_KEY_COLS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PRIMARY_KEY_COLS, new org.apache.thrift.meta_data.FieldMetaData("primaryKeyCols", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLPrimaryKey.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddPrimaryKeyRequest.class, metaDataMap); + } + + public AddPrimaryKeyRequest() { + } + + public AddPrimaryKeyRequest( + List primaryKeyCols) + { + this(); + this.primaryKeyCols = primaryKeyCols; + } + + /** + * Performs a deep copy on other. + */ + public AddPrimaryKeyRequest(AddPrimaryKeyRequest other) { + if (other.isSetPrimaryKeyCols()) { + List __this__primaryKeyCols = new ArrayList(other.primaryKeyCols.size()); + for (SQLPrimaryKey other_element : other.primaryKeyCols) { + __this__primaryKeyCols.add(new SQLPrimaryKey(other_element)); + } + this.primaryKeyCols = __this__primaryKeyCols; + } + } + + public AddPrimaryKeyRequest deepCopy() { + return new AddPrimaryKeyRequest(this); + } + + @Override + public void clear() { + this.primaryKeyCols = null; + } + + public int getPrimaryKeyColsSize() { + return (this.primaryKeyCols == null) ? 0 : this.primaryKeyCols.size(); + } + + public java.util.Iterator getPrimaryKeyColsIterator() { + return (this.primaryKeyCols == null) ? null : this.primaryKeyCols.iterator(); + } + + public void addToPrimaryKeyCols(SQLPrimaryKey elem) { + if (this.primaryKeyCols == null) { + this.primaryKeyCols = new ArrayList(); + } + this.primaryKeyCols.add(elem); + } + + public List getPrimaryKeyCols() { + return this.primaryKeyCols; + } + + public void setPrimaryKeyCols(List primaryKeyCols) { + this.primaryKeyCols = primaryKeyCols; + } + + public void unsetPrimaryKeyCols() { + this.primaryKeyCols = null; + } + + /** Returns true if field primaryKeyCols is set (has been assigned a value) and false otherwise */ + public boolean isSetPrimaryKeyCols() { + return this.primaryKeyCols != null; + } + + public void setPrimaryKeyColsIsSet(boolean value) { + if (!value) { + this.primaryKeyCols = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRIMARY_KEY_COLS: + if (value == null) { + unsetPrimaryKeyCols(); + } else { + setPrimaryKeyCols((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRIMARY_KEY_COLS: + return getPrimaryKeyCols(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRIMARY_KEY_COLS: + return isSetPrimaryKeyCols(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AddPrimaryKeyRequest) + return this.equals((AddPrimaryKeyRequest)that); + return false; + } + + public boolean equals(AddPrimaryKeyRequest that) { + if (that == null) + return false; + + boolean this_present_primaryKeyCols = true && this.isSetPrimaryKeyCols(); + boolean that_present_primaryKeyCols = true && that.isSetPrimaryKeyCols(); + if (this_present_primaryKeyCols || that_present_primaryKeyCols) { + if (!(this_present_primaryKeyCols && that_present_primaryKeyCols)) + return false; + if (!this.primaryKeyCols.equals(that.primaryKeyCols)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_primaryKeyCols = true && (isSetPrimaryKeyCols()); + list.add(present_primaryKeyCols); + if (present_primaryKeyCols) + list.add(primaryKeyCols); + + return list.hashCode(); + } + + @Override + public int compareTo(AddPrimaryKeyRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPrimaryKeyCols()).compareTo(other.isSetPrimaryKeyCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrimaryKeyCols()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.primaryKeyCols, other.primaryKeyCols); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("AddPrimaryKeyRequest("); + boolean first = true; + + sb.append("primaryKeyCols:"); + if (this.primaryKeyCols == null) { + sb.append("null"); + } else { + sb.append(this.primaryKeyCols); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetPrimaryKeyCols()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'primaryKeyCols' is unset! Struct:" + toString()); + } + + // 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 AddPrimaryKeyRequestStandardSchemeFactory implements SchemeFactory { + public AddPrimaryKeyRequestStandardScheme getScheme() { + return new AddPrimaryKeyRequestStandardScheme(); + } + } + + private static class AddPrimaryKeyRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AddPrimaryKeyRequest 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: // PRIMARY_KEY_COLS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list354 = iprot.readListBegin(); + struct.primaryKeyCols = new ArrayList(_list354.size); + SQLPrimaryKey _elem355; + for (int _i356 = 0; _i356 < _list354.size; ++_i356) + { + _elem355 = new SQLPrimaryKey(); + _elem355.read(iprot); + struct.primaryKeyCols.add(_elem355); + } + iprot.readListEnd(); + } + struct.setPrimaryKeyColsIsSet(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, AddPrimaryKeyRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.primaryKeyCols != null) { + oprot.writeFieldBegin(PRIMARY_KEY_COLS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.primaryKeyCols.size())); + for (SQLPrimaryKey _iter357 : struct.primaryKeyCols) + { + _iter357.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AddPrimaryKeyRequestTupleSchemeFactory implements SchemeFactory { + public AddPrimaryKeyRequestTupleScheme getScheme() { + return new AddPrimaryKeyRequestTupleScheme(); + } + } + + private static class AddPrimaryKeyRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AddPrimaryKeyRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.primaryKeyCols.size()); + for (SQLPrimaryKey _iter358 : struct.primaryKeyCols) + { + _iter358.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AddPrimaryKeyRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list359 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.primaryKeyCols = new ArrayList(_list359.size); + SQLPrimaryKey _elem360; + for (int _i361 = 0; _i361 < _list359.size; ++_i361) + { + _elem360 = new SQLPrimaryKey(); + _elem360.read(iprot); + struct.primaryKeyCols.add(_elem360); + } + } + struct.setPrimaryKeyColsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddUniqueConstraintRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddUniqueConstraintRequest.java new file mode 100644 index 0000000..71d1451 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddUniqueConstraintRequest.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class AddUniqueConstraintRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AddUniqueConstraintRequest"); + + private static final org.apache.thrift.protocol.TField UNIQUE_CONSTRAINT_COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("uniqueConstraintCols", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AddUniqueConstraintRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AddUniqueConstraintRequestTupleSchemeFactory()); + } + + private List uniqueConstraintCols; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UNIQUE_CONSTRAINT_COLS((short)1, "uniqueConstraintCols"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UNIQUE_CONSTRAINT_COLS + return UNIQUE_CONSTRAINT_COLS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.UNIQUE_CONSTRAINT_COLS, new org.apache.thrift.meta_data.FieldMetaData("uniqueConstraintCols", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLUniqueConstraint.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddUniqueConstraintRequest.class, metaDataMap); + } + + public AddUniqueConstraintRequest() { + } + + public AddUniqueConstraintRequest( + List uniqueConstraintCols) + { + this(); + this.uniqueConstraintCols = uniqueConstraintCols; + } + + /** + * Performs a deep copy on other. + */ + public AddUniqueConstraintRequest(AddUniqueConstraintRequest other) { + if (other.isSetUniqueConstraintCols()) { + List __this__uniqueConstraintCols = new ArrayList(other.uniqueConstraintCols.size()); + for (SQLUniqueConstraint other_element : other.uniqueConstraintCols) { + __this__uniqueConstraintCols.add(new SQLUniqueConstraint(other_element)); + } + this.uniqueConstraintCols = __this__uniqueConstraintCols; + } + } + + public AddUniqueConstraintRequest deepCopy() { + return new AddUniqueConstraintRequest(this); + } + + @Override + public void clear() { + this.uniqueConstraintCols = null; + } + + public int getUniqueConstraintColsSize() { + return (this.uniqueConstraintCols == null) ? 0 : this.uniqueConstraintCols.size(); + } + + public java.util.Iterator getUniqueConstraintColsIterator() { + return (this.uniqueConstraintCols == null) ? null : this.uniqueConstraintCols.iterator(); + } + + public void addToUniqueConstraintCols(SQLUniqueConstraint elem) { + if (this.uniqueConstraintCols == null) { + this.uniqueConstraintCols = new ArrayList(); + } + this.uniqueConstraintCols.add(elem); + } + + public List getUniqueConstraintCols() { + return this.uniqueConstraintCols; + } + + public void setUniqueConstraintCols(List uniqueConstraintCols) { + this.uniqueConstraintCols = uniqueConstraintCols; + } + + public void unsetUniqueConstraintCols() { + this.uniqueConstraintCols = null; + } + + /** Returns true if field uniqueConstraintCols is set (has been assigned a value) and false otherwise */ + public boolean isSetUniqueConstraintCols() { + return this.uniqueConstraintCols != null; + } + + public void setUniqueConstraintColsIsSet(boolean value) { + if (!value) { + this.uniqueConstraintCols = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UNIQUE_CONSTRAINT_COLS: + if (value == null) { + unsetUniqueConstraintCols(); + } else { + setUniqueConstraintCols((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UNIQUE_CONSTRAINT_COLS: + return getUniqueConstraintCols(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UNIQUE_CONSTRAINT_COLS: + return isSetUniqueConstraintCols(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AddUniqueConstraintRequest) + return this.equals((AddUniqueConstraintRequest)that); + return false; + } + + public boolean equals(AddUniqueConstraintRequest that) { + if (that == null) + return false; + + boolean this_present_uniqueConstraintCols = true && this.isSetUniqueConstraintCols(); + boolean that_present_uniqueConstraintCols = true && that.isSetUniqueConstraintCols(); + if (this_present_uniqueConstraintCols || that_present_uniqueConstraintCols) { + if (!(this_present_uniqueConstraintCols && that_present_uniqueConstraintCols)) + return false; + if (!this.uniqueConstraintCols.equals(that.uniqueConstraintCols)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uniqueConstraintCols = true && (isSetUniqueConstraintCols()); + list.add(present_uniqueConstraintCols); + if (present_uniqueConstraintCols) + list.add(uniqueConstraintCols); + + return list.hashCode(); + } + + @Override + public int compareTo(AddUniqueConstraintRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUniqueConstraintCols()).compareTo(other.isSetUniqueConstraintCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUniqueConstraintCols()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uniqueConstraintCols, other.uniqueConstraintCols); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("AddUniqueConstraintRequest("); + boolean first = true; + + sb.append("uniqueConstraintCols:"); + if (this.uniqueConstraintCols == null) { + sb.append("null"); + } else { + sb.append(this.uniqueConstraintCols); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetUniqueConstraintCols()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'uniqueConstraintCols' is unset! Struct:" + toString()); + } + + // 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 AddUniqueConstraintRequestStandardSchemeFactory implements SchemeFactory { + public AddUniqueConstraintRequestStandardScheme getScheme() { + return new AddUniqueConstraintRequestStandardScheme(); + } + } + + private static class AddUniqueConstraintRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AddUniqueConstraintRequest 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: // UNIQUE_CONSTRAINT_COLS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list370 = iprot.readListBegin(); + struct.uniqueConstraintCols = new ArrayList(_list370.size); + SQLUniqueConstraint _elem371; + for (int _i372 = 0; _i372 < _list370.size; ++_i372) + { + _elem371 = new SQLUniqueConstraint(); + _elem371.read(iprot); + struct.uniqueConstraintCols.add(_elem371); + } + iprot.readListEnd(); + } + struct.setUniqueConstraintColsIsSet(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, AddUniqueConstraintRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.uniqueConstraintCols != null) { + oprot.writeFieldBegin(UNIQUE_CONSTRAINT_COLS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.uniqueConstraintCols.size())); + for (SQLUniqueConstraint _iter373 : struct.uniqueConstraintCols) + { + _iter373.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AddUniqueConstraintRequestTupleSchemeFactory implements SchemeFactory { + public AddUniqueConstraintRequestTupleScheme getScheme() { + return new AddUniqueConstraintRequestTupleScheme(); + } + } + + private static class AddUniqueConstraintRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AddUniqueConstraintRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.uniqueConstraintCols.size()); + for (SQLUniqueConstraint _iter374 : struct.uniqueConstraintCols) + { + _iter374.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AddUniqueConstraintRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list375 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.uniqueConstraintCols = new ArrayList(_list375.size); + SQLUniqueConstraint _elem376; + for (int _i377 = 0; _i377 < _list375.size; ++_i377) + { + _elem376 = new SQLUniqueConstraint(); + _elem376.read(iprot); + struct.uniqueConstraintCols.add(_elem376); + } + } + struct.setUniqueConstraintColsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AggrStats.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AggrStats.java new file mode 100644 index 0000000..bfd1206 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AggrStats.java @@ -0,0 +1,542 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class AggrStats implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AggrStats"); + + private static final org.apache.thrift.protocol.TField COL_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("colStats", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField PARTS_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("partsFound", org.apache.thrift.protocol.TType.I64, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AggrStatsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AggrStatsTupleSchemeFactory()); + } + + private List colStats; // required + private long partsFound; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + COL_STATS((short)1, "colStats"), + PARTS_FOUND((short)2, "partsFound"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // COL_STATS + return COL_STATS; + case 2: // PARTS_FOUND + return PARTS_FOUND; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __PARTSFOUND_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.COL_STATS, new org.apache.thrift.meta_data.FieldMetaData("colStats", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsObj.class)))); + tmpMap.put(_Fields.PARTS_FOUND, new org.apache.thrift.meta_data.FieldMetaData("partsFound", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AggrStats.class, metaDataMap); + } + + public AggrStats() { + } + + public AggrStats( + List colStats, + long partsFound) + { + this(); + this.colStats = colStats; + this.partsFound = partsFound; + setPartsFoundIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public AggrStats(AggrStats other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetColStats()) { + List __this__colStats = new ArrayList(other.colStats.size()); + for (ColumnStatisticsObj other_element : other.colStats) { + __this__colStats.add(new ColumnStatisticsObj(other_element)); + } + this.colStats = __this__colStats; + } + this.partsFound = other.partsFound; + } + + public AggrStats deepCopy() { + return new AggrStats(this); + } + + @Override + public void clear() { + this.colStats = null; + setPartsFoundIsSet(false); + this.partsFound = 0; + } + + public int getColStatsSize() { + return (this.colStats == null) ? 0 : this.colStats.size(); + } + + public java.util.Iterator getColStatsIterator() { + return (this.colStats == null) ? null : this.colStats.iterator(); + } + + public void addToColStats(ColumnStatisticsObj elem) { + if (this.colStats == null) { + this.colStats = new ArrayList(); + } + this.colStats.add(elem); + } + + public List getColStats() { + return this.colStats; + } + + public void setColStats(List colStats) { + this.colStats = colStats; + } + + public void unsetColStats() { + this.colStats = null; + } + + /** Returns true if field colStats is set (has been assigned a value) and false otherwise */ + public boolean isSetColStats() { + return this.colStats != null; + } + + public void setColStatsIsSet(boolean value) { + if (!value) { + this.colStats = null; + } + } + + public long getPartsFound() { + return this.partsFound; + } + + public void setPartsFound(long partsFound) { + this.partsFound = partsFound; + setPartsFoundIsSet(true); + } + + public void unsetPartsFound() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARTSFOUND_ISSET_ID); + } + + /** Returns true if field partsFound is set (has been assigned a value) and false otherwise */ + public boolean isSetPartsFound() { + return EncodingUtils.testBit(__isset_bitfield, __PARTSFOUND_ISSET_ID); + } + + public void setPartsFoundIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARTSFOUND_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case COL_STATS: + if (value == null) { + unsetColStats(); + } else { + setColStats((List)value); + } + break; + + case PARTS_FOUND: + if (value == null) { + unsetPartsFound(); + } else { + setPartsFound((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case COL_STATS: + return getColStats(); + + case PARTS_FOUND: + return getPartsFound(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case COL_STATS: + return isSetColStats(); + case PARTS_FOUND: + return isSetPartsFound(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AggrStats) + return this.equals((AggrStats)that); + return false; + } + + public boolean equals(AggrStats that) { + if (that == null) + return false; + + boolean this_present_colStats = true && this.isSetColStats(); + boolean that_present_colStats = true && that.isSetColStats(); + if (this_present_colStats || that_present_colStats) { + if (!(this_present_colStats && that_present_colStats)) + return false; + if (!this.colStats.equals(that.colStats)) + return false; + } + + boolean this_present_partsFound = true; + boolean that_present_partsFound = true; + if (this_present_partsFound || that_present_partsFound) { + if (!(this_present_partsFound && that_present_partsFound)) + return false; + if (this.partsFound != that.partsFound) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_colStats = true && (isSetColStats()); + list.add(present_colStats); + if (present_colStats) + list.add(colStats); + + boolean present_partsFound = true; + list.add(present_partsFound); + if (present_partsFound) + list.add(partsFound); + + return list.hashCode(); + } + + @Override + public int compareTo(AggrStats other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetColStats()).compareTo(other.isSetColStats()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColStats()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colStats, other.colStats); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartsFound()).compareTo(other.isSetPartsFound()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartsFound()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partsFound, other.partsFound); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("AggrStats("); + boolean first = true; + + sb.append("colStats:"); + if (this.colStats == null) { + sb.append("null"); + } else { + sb.append(this.colStats); + } + first = false; + if (!first) sb.append(", "); + sb.append("partsFound:"); + sb.append(this.partsFound); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetColStats()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'colStats' is unset! Struct:" + toString()); + } + + if (!isSetPartsFound()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'partsFound' is unset! Struct:" + toString()); + } + + // 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 { + // 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 AggrStatsStandardSchemeFactory implements SchemeFactory { + public AggrStatsStandardScheme getScheme() { + return new AggrStatsStandardScheme(); + } + } + + private static class AggrStatsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AggrStats 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_STATS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list278 = iprot.readListBegin(); + struct.colStats = new ArrayList(_list278.size); + ColumnStatisticsObj _elem279; + for (int _i280 = 0; _i280 < _list278.size; ++_i280) + { + _elem279 = new ColumnStatisticsObj(); + _elem279.read(iprot); + struct.colStats.add(_elem279); + } + iprot.readListEnd(); + } + struct.setColStatsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PARTS_FOUND + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.partsFound = iprot.readI64(); + struct.setPartsFoundIsSet(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, AggrStats struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.colStats != null) { + oprot.writeFieldBegin(COL_STATS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.colStats.size())); + for (ColumnStatisticsObj _iter281 : struct.colStats) + { + _iter281.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(PARTS_FOUND_FIELD_DESC); + oprot.writeI64(struct.partsFound); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AggrStatsTupleSchemeFactory implements SchemeFactory { + public AggrStatsTupleScheme getScheme() { + return new AggrStatsTupleScheme(); + } + } + + private static class AggrStatsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AggrStats struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.colStats.size()); + for (ColumnStatisticsObj _iter282 : struct.colStats) + { + _iter282.write(oprot); + } + } + oprot.writeI64(struct.partsFound); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AggrStats struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list283 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.colStats = new ArrayList(_list283.size); + ColumnStatisticsObj _elem284; + for (int _i285 = 0; _i285 < _list283.size; ++_i285) + { + _elem284 = new ColumnStatisticsObj(); + _elem284.read(iprot); + struct.colStats.add(_elem284); + } + } + struct.setColStatsIsSet(true); + struct.partsFound = iprot.readI64(); + struct.setPartsFoundIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java new file mode 100644 index 0000000..4032f19 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class AlreadyExistsException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AlreadyExistsException.class, metaDataMap); + } + + public AlreadyExistsException() { + } + + public AlreadyExistsException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public AlreadyExistsException(AlreadyExistsException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public AlreadyExistsException deepCopy() { + return new AlreadyExistsException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AlreadyExistsException) + return this.equals((AlreadyExistsException)that); + return false; + } + + public boolean equals(AlreadyExistsException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(AlreadyExistsException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("AlreadyExistsException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java new file mode 100644 index 0000000..eeb5105 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java @@ -0,0 +1,687 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class BinaryColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BinaryColumnStatsData"); + + private static final org.apache.thrift.protocol.TField MAX_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("maxColLen", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField AVG_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("avgColLen", org.apache.thrift.protocol.TType.DOUBLE, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new BinaryColumnStatsDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new BinaryColumnStatsDataTupleSchemeFactory()); + } + + private long maxColLen; // required + private double avgColLen; // required + private long numNulls; // required + private String bitVectors; // 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 { + MAX_COL_LEN((short)1, "maxColLen"), + AVG_COL_LEN((short)2, "avgColLen"), + NUM_NULLS((short)3, "numNulls"), + BIT_VECTORS((short)4, "bitVectors"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MAX_COL_LEN + return MAX_COL_LEN; + case 2: // AVG_COL_LEN + return AVG_COL_LEN; + case 3: // NUM_NULLS + return NUM_NULLS; + case 4: // BIT_VECTORS + return BIT_VECTORS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAXCOLLEN_ISSET_ID = 0; + private static final int __AVGCOLLEN_ISSET_ID = 1; + private static final int __NUMNULLS_ISSET_ID = 2; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.BIT_VECTORS}; + 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); + tmpMap.put(_Fields.MAX_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("maxColLen", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.AVG_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("avgColLen", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BinaryColumnStatsData.class, metaDataMap); + } + + public BinaryColumnStatsData() { + } + + public BinaryColumnStatsData( + long maxColLen, + double avgColLen, + long numNulls) + { + this(); + this.maxColLen = maxColLen; + setMaxColLenIsSet(true); + this.avgColLen = avgColLen; + setAvgColLenIsSet(true); + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public BinaryColumnStatsData(BinaryColumnStatsData other) { + __isset_bitfield = other.__isset_bitfield; + this.maxColLen = other.maxColLen; + this.avgColLen = other.avgColLen; + this.numNulls = other.numNulls; + if (other.isSetBitVectors()) { + this.bitVectors = other.bitVectors; + } + } + + public BinaryColumnStatsData deepCopy() { + return new BinaryColumnStatsData(this); + } + + @Override + public void clear() { + setMaxColLenIsSet(false); + this.maxColLen = 0; + setAvgColLenIsSet(false); + this.avgColLen = 0.0; + setNumNullsIsSet(false); + this.numNulls = 0; + this.bitVectors = null; + } + + public long getMaxColLen() { + return this.maxColLen; + } + + public void setMaxColLen(long maxColLen) { + this.maxColLen = maxColLen; + setMaxColLenIsSet(true); + } + + public void unsetMaxColLen() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID); + } + + /** Returns true if field maxColLen is set (has been assigned a value) and false otherwise */ + public boolean isSetMaxColLen() { + return EncodingUtils.testBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID); + } + + public void setMaxColLenIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID, value); + } + + public double getAvgColLen() { + return this.avgColLen; + } + + public void setAvgColLen(double avgColLen) { + this.avgColLen = avgColLen; + setAvgColLenIsSet(true); + } + + public void unsetAvgColLen() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID); + } + + /** Returns true if field avgColLen is set (has been assigned a value) and false otherwise */ + public boolean isSetAvgColLen() { + return EncodingUtils.testBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID); + } + + public void setAvgColLenIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID, value); + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); + } + + public String getBitVectors() { + return this.bitVectors; + } + + public void setBitVectors(String bitVectors) { + this.bitVectors = bitVectors; + } + + public void unsetBitVectors() { + this.bitVectors = null; + } + + /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ + public boolean isSetBitVectors() { + return this.bitVectors != null; + } + + public void setBitVectorsIsSet(boolean value) { + if (!value) { + this.bitVectors = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MAX_COL_LEN: + if (value == null) { + unsetMaxColLen(); + } else { + setMaxColLen((Long)value); + } + break; + + case AVG_COL_LEN: + if (value == null) { + unsetAvgColLen(); + } else { + setAvgColLen((Double)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + case BIT_VECTORS: + if (value == null) { + unsetBitVectors(); + } else { + setBitVectors((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MAX_COL_LEN: + return getMaxColLen(); + + case AVG_COL_LEN: + return getAvgColLen(); + + case NUM_NULLS: + return getNumNulls(); + + case BIT_VECTORS: + return getBitVectors(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MAX_COL_LEN: + return isSetMaxColLen(); + case AVG_COL_LEN: + return isSetAvgColLen(); + case NUM_NULLS: + return isSetNumNulls(); + case BIT_VECTORS: + return isSetBitVectors(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof BinaryColumnStatsData) + return this.equals((BinaryColumnStatsData)that); + return false; + } + + public boolean equals(BinaryColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_maxColLen = true; + boolean that_present_maxColLen = true; + if (this_present_maxColLen || that_present_maxColLen) { + if (!(this_present_maxColLen && that_present_maxColLen)) + return false; + if (this.maxColLen != that.maxColLen) + return false; + } + + boolean this_present_avgColLen = true; + boolean that_present_avgColLen = true; + if (this_present_avgColLen || that_present_avgColLen) { + if (!(this_present_avgColLen && that_present_avgColLen)) + return false; + if (this.avgColLen != that.avgColLen) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + boolean this_present_bitVectors = true && this.isSetBitVectors(); + boolean that_present_bitVectors = true && that.isSetBitVectors(); + if (this_present_bitVectors || that_present_bitVectors) { + if (!(this_present_bitVectors && that_present_bitVectors)) + return false; + if (!this.bitVectors.equals(that.bitVectors)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_maxColLen = true; + list.add(present_maxColLen); + if (present_maxColLen) + list.add(maxColLen); + + boolean present_avgColLen = true; + list.add(present_avgColLen); + if (present_avgColLen) + list.add(avgColLen); + + boolean present_numNulls = true; + list.add(present_numNulls); + if (present_numNulls) + list.add(numNulls); + + boolean present_bitVectors = true && (isSetBitVectors()); + list.add(present_bitVectors); + if (present_bitVectors) + list.add(bitVectors); + + return list.hashCode(); + } + + @Override + public int compareTo(BinaryColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMaxColLen()).compareTo(other.isSetMaxColLen()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxColLen()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxColLen, other.maxColLen); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAvgColLen()).compareTo(other.isSetAvgColLen()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAvgColLen()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.avgColLen, other.avgColLen); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBitVectors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("BinaryColumnStatsData("); + boolean first = true; + + sb.append("maxColLen:"); + sb.append(this.maxColLen); + first = false; + if (!first) sb.append(", "); + sb.append("avgColLen:"); + sb.append(this.avgColLen); + first = false; + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + if (isSetBitVectors()) { + if (!first) sb.append(", "); + sb.append("bitVectors:"); + if (this.bitVectors == null) { + sb.append("null"); + } else { + sb.append(this.bitVectors); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetMaxColLen()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxColLen' is unset! Struct:" + toString()); + } + + if (!isSetAvgColLen()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'avgColLen' is unset! Struct:" + toString()); + } + + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + // 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 { + // 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 BinaryColumnStatsDataStandardSchemeFactory implements SchemeFactory { + public BinaryColumnStatsDataStandardScheme getScheme() { + return new BinaryColumnStatsDataStandardScheme(); + } + } + + private static class BinaryColumnStatsDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, BinaryColumnStatsData 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: // MAX_COL_LEN + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.maxColLen = iprot.readI64(); + struct.setMaxColLenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // AVG_COL_LEN + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.avgColLen = iprot.readDouble(); + struct.setAvgColLenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_NULLS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // BIT_VECTORS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(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, BinaryColumnStatsData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(MAX_COL_LEN_FIELD_DESC); + oprot.writeI64(struct.maxColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(AVG_COL_LEN_FIELD_DESC); + oprot.writeDouble(struct.avgColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(struct.numNulls); + oprot.writeFieldEnd(); + if (struct.bitVectors != null) { + if (struct.isSetBitVectors()) { + oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); + oprot.writeString(struct.bitVectors); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class BinaryColumnStatsDataTupleSchemeFactory implements SchemeFactory { + public BinaryColumnStatsDataTupleScheme getScheme() { + return new BinaryColumnStatsDataTupleScheme(); + } + } + + private static class BinaryColumnStatsDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, BinaryColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.maxColLen); + oprot.writeDouble(struct.avgColLen); + oprot.writeI64(struct.numNulls); + BitSet optionals = new BitSet(); + if (struct.isSetBitVectors()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetBitVectors()) { + oprot.writeString(struct.bitVectors); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, BinaryColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.maxColLen = iprot.readI64(); + struct.setMaxColLenIsSet(true); + struct.avgColLen = iprot.readDouble(); + struct.setAvgColLenIsSet(true); + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java new file mode 100644 index 0000000..de39d21 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java @@ -0,0 +1,687 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class BooleanColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BooleanColumnStatsData"); + + private static final org.apache.thrift.protocol.TField NUM_TRUES_FIELD_DESC = new org.apache.thrift.protocol.TField("numTrues", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField NUM_FALSES_FIELD_DESC = new org.apache.thrift.protocol.TField("numFalses", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new BooleanColumnStatsDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new BooleanColumnStatsDataTupleSchemeFactory()); + } + + private long numTrues; // required + private long numFalses; // required + private long numNulls; // required + private String bitVectors; // 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 { + NUM_TRUES((short)1, "numTrues"), + NUM_FALSES((short)2, "numFalses"), + NUM_NULLS((short)3, "numNulls"), + BIT_VECTORS((short)4, "bitVectors"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NUM_TRUES + return NUM_TRUES; + case 2: // NUM_FALSES + return NUM_FALSES; + case 3: // NUM_NULLS + return NUM_NULLS; + case 4: // BIT_VECTORS + return BIT_VECTORS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __NUMTRUES_ISSET_ID = 0; + private static final int __NUMFALSES_ISSET_ID = 1; + private static final int __NUMNULLS_ISSET_ID = 2; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.BIT_VECTORS}; + 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); + tmpMap.put(_Fields.NUM_TRUES, new org.apache.thrift.meta_data.FieldMetaData("numTrues", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_FALSES, new org.apache.thrift.meta_data.FieldMetaData("numFalses", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BooleanColumnStatsData.class, metaDataMap); + } + + public BooleanColumnStatsData() { + } + + public BooleanColumnStatsData( + long numTrues, + long numFalses, + long numNulls) + { + this(); + this.numTrues = numTrues; + setNumTruesIsSet(true); + this.numFalses = numFalses; + setNumFalsesIsSet(true); + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public BooleanColumnStatsData(BooleanColumnStatsData other) { + __isset_bitfield = other.__isset_bitfield; + this.numTrues = other.numTrues; + this.numFalses = other.numFalses; + this.numNulls = other.numNulls; + if (other.isSetBitVectors()) { + this.bitVectors = other.bitVectors; + } + } + + public BooleanColumnStatsData deepCopy() { + return new BooleanColumnStatsData(this); + } + + @Override + public void clear() { + setNumTruesIsSet(false); + this.numTrues = 0; + setNumFalsesIsSet(false); + this.numFalses = 0; + setNumNullsIsSet(false); + this.numNulls = 0; + this.bitVectors = null; + } + + public long getNumTrues() { + return this.numTrues; + } + + public void setNumTrues(long numTrues) { + this.numTrues = numTrues; + setNumTruesIsSet(true); + } + + public void unsetNumTrues() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMTRUES_ISSET_ID); + } + + /** Returns true if field numTrues is set (has been assigned a value) and false otherwise */ + public boolean isSetNumTrues() { + return EncodingUtils.testBit(__isset_bitfield, __NUMTRUES_ISSET_ID); + } + + public void setNumTruesIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMTRUES_ISSET_ID, value); + } + + public long getNumFalses() { + return this.numFalses; + } + + public void setNumFalses(long numFalses) { + this.numFalses = numFalses; + setNumFalsesIsSet(true); + } + + public void unsetNumFalses() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMFALSES_ISSET_ID); + } + + /** Returns true if field numFalses is set (has been assigned a value) and false otherwise */ + public boolean isSetNumFalses() { + return EncodingUtils.testBit(__isset_bitfield, __NUMFALSES_ISSET_ID); + } + + public void setNumFalsesIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMFALSES_ISSET_ID, value); + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); + } + + public String getBitVectors() { + return this.bitVectors; + } + + public void setBitVectors(String bitVectors) { + this.bitVectors = bitVectors; + } + + public void unsetBitVectors() { + this.bitVectors = null; + } + + /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ + public boolean isSetBitVectors() { + return this.bitVectors != null; + } + + public void setBitVectorsIsSet(boolean value) { + if (!value) { + this.bitVectors = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NUM_TRUES: + if (value == null) { + unsetNumTrues(); + } else { + setNumTrues((Long)value); + } + break; + + case NUM_FALSES: + if (value == null) { + unsetNumFalses(); + } else { + setNumFalses((Long)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + case BIT_VECTORS: + if (value == null) { + unsetBitVectors(); + } else { + setBitVectors((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NUM_TRUES: + return getNumTrues(); + + case NUM_FALSES: + return getNumFalses(); + + case NUM_NULLS: + return getNumNulls(); + + case BIT_VECTORS: + return getBitVectors(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NUM_TRUES: + return isSetNumTrues(); + case NUM_FALSES: + return isSetNumFalses(); + case NUM_NULLS: + return isSetNumNulls(); + case BIT_VECTORS: + return isSetBitVectors(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof BooleanColumnStatsData) + return this.equals((BooleanColumnStatsData)that); + return false; + } + + public boolean equals(BooleanColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_numTrues = true; + boolean that_present_numTrues = true; + if (this_present_numTrues || that_present_numTrues) { + if (!(this_present_numTrues && that_present_numTrues)) + return false; + if (this.numTrues != that.numTrues) + return false; + } + + boolean this_present_numFalses = true; + boolean that_present_numFalses = true; + if (this_present_numFalses || that_present_numFalses) { + if (!(this_present_numFalses && that_present_numFalses)) + return false; + if (this.numFalses != that.numFalses) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + boolean this_present_bitVectors = true && this.isSetBitVectors(); + boolean that_present_bitVectors = true && that.isSetBitVectors(); + if (this_present_bitVectors || that_present_bitVectors) { + if (!(this_present_bitVectors && that_present_bitVectors)) + return false; + if (!this.bitVectors.equals(that.bitVectors)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_numTrues = true; + list.add(present_numTrues); + if (present_numTrues) + list.add(numTrues); + + boolean present_numFalses = true; + list.add(present_numFalses); + if (present_numFalses) + list.add(numFalses); + + boolean present_numNulls = true; + list.add(present_numNulls); + if (present_numNulls) + list.add(numNulls); + + boolean present_bitVectors = true && (isSetBitVectors()); + list.add(present_bitVectors); + if (present_bitVectors) + list.add(bitVectors); + + return list.hashCode(); + } + + @Override + public int compareTo(BooleanColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNumTrues()).compareTo(other.isSetNumTrues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumTrues()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numTrues, other.numTrues); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumFalses()).compareTo(other.isSetNumFalses()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumFalses()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numFalses, other.numFalses); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBitVectors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("BooleanColumnStatsData("); + boolean first = true; + + sb.append("numTrues:"); + sb.append(this.numTrues); + first = false; + if (!first) sb.append(", "); + sb.append("numFalses:"); + sb.append(this.numFalses); + first = false; + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + if (isSetBitVectors()) { + if (!first) sb.append(", "); + sb.append("bitVectors:"); + if (this.bitVectors == null) { + sb.append("null"); + } else { + sb.append(this.bitVectors); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetNumTrues()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numTrues' is unset! Struct:" + toString()); + } + + if (!isSetNumFalses()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numFalses' is unset! Struct:" + toString()); + } + + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + // 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 { + // 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 BooleanColumnStatsDataStandardSchemeFactory implements SchemeFactory { + public BooleanColumnStatsDataStandardScheme getScheme() { + return new BooleanColumnStatsDataStandardScheme(); + } + } + + private static class BooleanColumnStatsDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, BooleanColumnStatsData 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_TRUES + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numTrues = iprot.readI64(); + struct.setNumTruesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NUM_FALSES + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numFalses = iprot.readI64(); + struct.setNumFalsesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_NULLS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // BIT_VECTORS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(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, BooleanColumnStatsData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(NUM_TRUES_FIELD_DESC); + oprot.writeI64(struct.numTrues); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_FALSES_FIELD_DESC); + oprot.writeI64(struct.numFalses); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(struct.numNulls); + oprot.writeFieldEnd(); + if (struct.bitVectors != null) { + if (struct.isSetBitVectors()) { + oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); + oprot.writeString(struct.bitVectors); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class BooleanColumnStatsDataTupleSchemeFactory implements SchemeFactory { + public BooleanColumnStatsDataTupleScheme getScheme() { + return new BooleanColumnStatsDataTupleScheme(); + } + } + + private static class BooleanColumnStatsDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, BooleanColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.numTrues); + oprot.writeI64(struct.numFalses); + oprot.writeI64(struct.numNulls); + BitSet optionals = new BitSet(); + if (struct.isSetBitVectors()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetBitVectors()) { + oprot.writeString(struct.bitVectors); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, BooleanColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.numTrues = iprot.readI64(); + struct.setNumTruesIsSet(true); + struct.numFalses = iprot.readI64(); + struct.setNumFalsesIsSet(true); + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataRequest.java new file mode 100644 index 0000000..a008acc --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataRequest.java @@ -0,0 +1,703 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class CacheFileMetadataRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CacheFileMetadataRequest"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", 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("partName", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField IS_ALL_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("isAllParts", org.apache.thrift.protocol.TType.BOOL, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CacheFileMetadataRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CacheFileMetadataRequestTupleSchemeFactory()); + } + + private String dbName; // required + private String tblName; // required + private String partName; // optional + private boolean isAllParts; // 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 { + DB_NAME((short)1, "dbName"), + TBL_NAME((short)2, "tblName"), + PART_NAME((short)3, "partName"), + IS_ALL_PARTS((short)4, "isAllParts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; + case 4: // IS_ALL_PARTS + return IS_ALL_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ISALLPARTS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.PART_NAME,_Fields.IS_ALL_PARTS}; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("partName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IS_ALL_PARTS, new org.apache.thrift.meta_data.FieldMetaData("isAllParts", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CacheFileMetadataRequest.class, metaDataMap); + } + + public CacheFileMetadataRequest() { + } + + public CacheFileMetadataRequest( + String dbName, + String tblName) + { + this(); + this.dbName = dbName; + this.tblName = tblName; + } + + /** + * Performs a deep copy on other. + */ + public CacheFileMetadataRequest(CacheFileMetadataRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTblName()) { + this.tblName = other.tblName; + } + if (other.isSetPartName()) { + this.partName = other.partName; + } + this.isAllParts = other.isAllParts; + } + + public CacheFileMetadataRequest deepCopy() { + return new CacheFileMetadataRequest(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tblName = null; + this.partName = null; + setIsAllPartsIsSet(false); + this.isAllParts = false; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTblName() { + return this.tblName; + } + + public void setTblName(String tblName) { + this.tblName = tblName; + } + + public void unsetTblName() { + this.tblName = null; + } + + /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ + public boolean isSetTblName() { + return this.tblName != null; + } + + public void setTblNameIsSet(boolean value) { + if (!value) { + this.tblName = null; + } + } + + public String getPartName() { + return this.partName; + } + + public void setPartName(String partName) { + this.partName = partName; + } + + public void unsetPartName() { + this.partName = null; + } + + /** Returns true if field partName is set (has been assigned a value) and false otherwise */ + public boolean isSetPartName() { + return this.partName != null; + } + + public void setPartNameIsSet(boolean value) { + if (!value) { + this.partName = null; + } + } + + public boolean isIsAllParts() { + return this.isAllParts; + } + + public void setIsAllParts(boolean isAllParts) { + this.isAllParts = isAllParts; + setIsAllPartsIsSet(true); + } + + public void unsetIsAllParts() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISALLPARTS_ISSET_ID); + } + + /** Returns true if field isAllParts is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAllParts() { + return EncodingUtils.testBit(__isset_bitfield, __ISALLPARTS_ISSET_ID); + } + + public void setIsAllPartsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISALLPARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTblName(); + } else { + setTblName((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPartName(); + } else { + setPartName((String)value); + } + break; + + case IS_ALL_PARTS: + if (value == null) { + unsetIsAllParts(); + } else { + setIsAllParts((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TBL_NAME: + return getTblName(); + + case PART_NAME: + return getPartName(); + + case IS_ALL_PARTS: + return isIsAllParts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case TBL_NAME: + return isSetTblName(); + case PART_NAME: + return isSetPartName(); + case IS_ALL_PARTS: + return isSetIsAllParts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CacheFileMetadataRequest) + return this.equals((CacheFileMetadataRequest)that); + return false; + } + + public boolean equals(CacheFileMetadataRequest that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tblName = true && this.isSetTblName(); + boolean that_present_tblName = true && that.isSetTblName(); + if (this_present_tblName || that_present_tblName) { + if (!(this_present_tblName && that_present_tblName)) + return false; + if (!this.tblName.equals(that.tblName)) + return false; + } + + boolean this_present_partName = true && this.isSetPartName(); + boolean that_present_partName = true && that.isSetPartName(); + if (this_present_partName || that_present_partName) { + if (!(this_present_partName && that_present_partName)) + return false; + if (!this.partName.equals(that.partName)) + return false; + } + + boolean this_present_isAllParts = true && this.isSetIsAllParts(); + boolean that_present_isAllParts = true && that.isSetIsAllParts(); + if (this_present_isAllParts || that_present_isAllParts) { + if (!(this_present_isAllParts && that_present_isAllParts)) + return false; + if (this.isAllParts != that.isAllParts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tblName = true && (isSetTblName()); + list.add(present_tblName); + if (present_tblName) + list.add(tblName); + + boolean present_partName = true && (isSetPartName()); + list.add(present_partName); + if (present_partName) + list.add(partName); + + boolean present_isAllParts = true && (isSetIsAllParts()); + list.add(present_isAllParts); + if (present_isAllParts) + list.add(isAllParts); + + return list.hashCode(); + } + + @Override + public int compareTo(CacheFileMetadataRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTblName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartName()).compareTo(other.isSetPartName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partName, other.partName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsAllParts()).compareTo(other.isSetIsAllParts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAllParts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAllParts, other.isAllParts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("CacheFileMetadataRequest("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tblName:"); + if (this.tblName == null) { + sb.append("null"); + } else { + sb.append(this.tblName); + } + first = false; + if (isSetPartName()) { + if (!first) sb.append(", "); + sb.append("partName:"); + if (this.partName == null) { + sb.append("null"); + } else { + sb.append(this.partName); + } + first = false; + } + if (isSetIsAllParts()) { + if (!first) sb.append(", "); + sb.append("isAllParts:"); + sb.append(this.isAllParts); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + if (!isSetTblName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); + } + + // 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 { + // 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 CacheFileMetadataRequestStandardSchemeFactory implements SchemeFactory { + public CacheFileMetadataRequestStandardScheme getScheme() { + return new CacheFileMetadataRequestStandardScheme(); + } + } + + private static class CacheFileMetadataRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CacheFileMetadataRequest 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.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.tblName = iprot.readString(); + struct.setTblNameIsSet(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.partName = iprot.readString(); + struct.setPartNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // IS_ALL_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAllParts = iprot.readBool(); + struct.setIsAllPartsIsSet(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, CacheFileMetadataRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.tblName != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tblName); + oprot.writeFieldEnd(); + } + if (struct.partName != null) { + if (struct.isSetPartName()) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.partName); + oprot.writeFieldEnd(); + } + } + if (struct.isSetIsAllParts()) { + oprot.writeFieldBegin(IS_ALL_PARTS_FIELD_DESC); + oprot.writeBool(struct.isAllParts); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CacheFileMetadataRequestTupleSchemeFactory implements SchemeFactory { + public CacheFileMetadataRequestTupleScheme getScheme() { + return new CacheFileMetadataRequestTupleScheme(); + } + } + + private static class CacheFileMetadataRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbName); + oprot.writeString(struct.tblName); + BitSet optionals = new BitSet(); + if (struct.isSetPartName()) { + optionals.set(0); + } + if (struct.isSetIsAllParts()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetPartName()) { + oprot.writeString(struct.partName); + } + if (struct.isSetIsAllParts()) { + oprot.writeBool(struct.isAllParts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + struct.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.partName = iprot.readString(); + struct.setPartNameIsSet(true); + } + if (incoming.get(1)) { + struct.isAllParts = iprot.readBool(); + struct.setIsAllPartsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataResult.java new file mode 100644 index 0000000..a1466ae --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataResult.java @@ -0,0 +1,387 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class CacheFileMetadataResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CacheFileMetadataResult"); + + private static final org.apache.thrift.protocol.TField IS_SUPPORTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isSupported", org.apache.thrift.protocol.TType.BOOL, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CacheFileMetadataResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CacheFileMetadataResultTupleSchemeFactory()); + } + + private boolean isSupported; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IS_SUPPORTED((short)1, "isSupported"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IS_SUPPORTED + return IS_SUPPORTED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ISSUPPORTED_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.IS_SUPPORTED, new org.apache.thrift.meta_data.FieldMetaData("isSupported", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CacheFileMetadataResult.class, metaDataMap); + } + + public CacheFileMetadataResult() { + } + + public CacheFileMetadataResult( + boolean isSupported) + { + this(); + this.isSupported = isSupported; + setIsSupportedIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public CacheFileMetadataResult(CacheFileMetadataResult other) { + __isset_bitfield = other.__isset_bitfield; + this.isSupported = other.isSupported; + } + + public CacheFileMetadataResult deepCopy() { + return new CacheFileMetadataResult(this); + } + + @Override + public void clear() { + setIsSupportedIsSet(false); + this.isSupported = false; + } + + public boolean isIsSupported() { + return this.isSupported; + } + + public void setIsSupported(boolean isSupported) { + this.isSupported = isSupported; + setIsSupportedIsSet(true); + } + + public void unsetIsSupported() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); + } + + /** Returns true if field isSupported is set (has been assigned a value) and false otherwise */ + public boolean isSetIsSupported() { + return EncodingUtils.testBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); + } + + public void setIsSupportedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IS_SUPPORTED: + if (value == null) { + unsetIsSupported(); + } else { + setIsSupported((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IS_SUPPORTED: + return isIsSupported(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IS_SUPPORTED: + return isSetIsSupported(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CacheFileMetadataResult) + return this.equals((CacheFileMetadataResult)that); + return false; + } + + public boolean equals(CacheFileMetadataResult that) { + if (that == null) + return false; + + boolean this_present_isSupported = true; + boolean that_present_isSupported = true; + if (this_present_isSupported || that_present_isSupported) { + if (!(this_present_isSupported && that_present_isSupported)) + return false; + if (this.isSupported != that.isSupported) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_isSupported = true; + list.add(present_isSupported); + if (present_isSupported) + list.add(isSupported); + + return list.hashCode(); + } + + @Override + public int compareTo(CacheFileMetadataResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetIsSupported()).compareTo(other.isSetIsSupported()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsSupported()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isSupported, other.isSupported); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("CacheFileMetadataResult("); + boolean first = true; + + sb.append("isSupported:"); + sb.append(this.isSupported); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetIsSupported()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'isSupported' is unset! Struct:" + toString()); + } + + // 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 { + // 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 CacheFileMetadataResultStandardSchemeFactory implements SchemeFactory { + public CacheFileMetadataResultStandardScheme getScheme() { + return new CacheFileMetadataResultStandardScheme(); + } + } + + private static class CacheFileMetadataResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CacheFileMetadataResult 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: // IS_SUPPORTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isSupported = iprot.readBool(); + struct.setIsSupportedIsSet(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, CacheFileMetadataResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(IS_SUPPORTED_FIELD_DESC); + oprot.writeBool(struct.isSupported); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CacheFileMetadataResultTupleSchemeFactory implements SchemeFactory { + public CacheFileMetadataResultTupleScheme getScheme() { + return new CacheFileMetadataResultTupleScheme(); + } + } + + private static class CacheFileMetadataResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBool(struct.isSupported); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.isSupported = iprot.readBool(); + struct.setIsSupportedIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckLockRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckLockRequest.java new file mode 100644 index 0000000..bcef2ff --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckLockRequest.java @@ -0,0 +1,589 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class CheckLockRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CheckLockRequest"); + + private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField ELAPSED_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("elapsed_ms", org.apache.thrift.protocol.TType.I64, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CheckLockRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CheckLockRequestTupleSchemeFactory()); + } + + private long lockid; // required + private long txnid; // optional + private long elapsed_ms; // 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 { + LOCKID((short)1, "lockid"), + TXNID((short)2, "txnid"), + ELAPSED_MS((short)3, "elapsed_ms"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOCKID + return LOCKID; + case 2: // TXNID + return TXNID; + case 3: // ELAPSED_MS + return ELAPSED_MS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LOCKID_ISSET_ID = 0; + private static final int __TXNID_ISSET_ID = 1; + private static final int __ELAPSED_MS_ISSET_ID = 2; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.TXNID,_Fields.ELAPSED_MS}; + 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); + tmpMap.put(_Fields.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ELAPSED_MS, new org.apache.thrift.meta_data.FieldMetaData("elapsed_ms", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CheckLockRequest.class, metaDataMap); + } + + public CheckLockRequest() { + } + + public CheckLockRequest( + long lockid) + { + this(); + this.lockid = lockid; + setLockidIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public CheckLockRequest(CheckLockRequest other) { + __isset_bitfield = other.__isset_bitfield; + this.lockid = other.lockid; + this.txnid = other.txnid; + this.elapsed_ms = other.elapsed_ms; + } + + public CheckLockRequest deepCopy() { + return new CheckLockRequest(this); + } + + @Override + public void clear() { + setLockidIsSet(false); + this.lockid = 0; + setTxnidIsSet(false); + this.txnid = 0; + setElapsed_msIsSet(false); + this.elapsed_ms = 0; + } + + public long getLockid() { + return this.lockid; + } + + public void setLockid(long lockid) { + this.lockid = lockid; + setLockidIsSet(true); + } + + public void unsetLockid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKID_ISSET_ID); + } + + /** Returns true if field lockid is set (has been assigned a value) and false otherwise */ + public boolean isSetLockid() { + return EncodingUtils.testBit(__isset_bitfield, __LOCKID_ISSET_ID); + } + + public void setLockidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value); + } + + public long getTxnid() { + return this.txnid; + } + + public void setTxnid(long txnid) { + this.txnid = txnid; + setTxnidIsSet(true); + } + + public void unsetTxnid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ + public boolean isSetTxnid() { + return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + public void setTxnidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); + } + + public long getElapsed_ms() { + return this.elapsed_ms; + } + + public void setElapsed_ms(long elapsed_ms) { + this.elapsed_ms = elapsed_ms; + setElapsed_msIsSet(true); + } + + public void unsetElapsed_ms() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ELAPSED_MS_ISSET_ID); + } + + /** Returns true if field elapsed_ms is set (has been assigned a value) and false otherwise */ + public boolean isSetElapsed_ms() { + return EncodingUtils.testBit(__isset_bitfield, __ELAPSED_MS_ISSET_ID); + } + + public void setElapsed_msIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ELAPSED_MS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOCKID: + if (value == null) { + unsetLockid(); + } else { + setLockid((Long)value); + } + break; + + case TXNID: + if (value == null) { + unsetTxnid(); + } else { + setTxnid((Long)value); + } + break; + + case ELAPSED_MS: + if (value == null) { + unsetElapsed_ms(); + } else { + setElapsed_ms((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOCKID: + return getLockid(); + + case TXNID: + return getTxnid(); + + case ELAPSED_MS: + return getElapsed_ms(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOCKID: + return isSetLockid(); + case TXNID: + return isSetTxnid(); + case ELAPSED_MS: + return isSetElapsed_ms(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CheckLockRequest) + return this.equals((CheckLockRequest)that); + return false; + } + + public boolean equals(CheckLockRequest that) { + if (that == null) + return false; + + boolean this_present_lockid = true; + boolean that_present_lockid = true; + if (this_present_lockid || that_present_lockid) { + if (!(this_present_lockid && that_present_lockid)) + return false; + if (this.lockid != that.lockid) + return false; + } + + boolean this_present_txnid = true && this.isSetTxnid(); + boolean that_present_txnid = true && that.isSetTxnid(); + if (this_present_txnid || that_present_txnid) { + if (!(this_present_txnid && that_present_txnid)) + return false; + if (this.txnid != that.txnid) + return false; + } + + boolean this_present_elapsed_ms = true && this.isSetElapsed_ms(); + boolean that_present_elapsed_ms = true && that.isSetElapsed_ms(); + if (this_present_elapsed_ms || that_present_elapsed_ms) { + if (!(this_present_elapsed_ms && that_present_elapsed_ms)) + return false; + if (this.elapsed_ms != that.elapsed_ms) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_lockid = true; + list.add(present_lockid); + if (present_lockid) + list.add(lockid); + + boolean present_txnid = true && (isSetTxnid()); + list.add(present_txnid); + if (present_txnid) + list.add(txnid); + + boolean present_elapsed_ms = true && (isSetElapsed_ms()); + list.add(present_elapsed_ms); + if (present_elapsed_ms) + list.add(elapsed_ms); + + return list.hashCode(); + } + + @Override + public int compareTo(CheckLockRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLockid()).compareTo(other.isSetLockid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLockid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, other.lockid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxnid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetElapsed_ms()).compareTo(other.isSetElapsed_ms()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetElapsed_ms()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.elapsed_ms, other.elapsed_ms); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("CheckLockRequest("); + boolean first = true; + + sb.append("lockid:"); + sb.append(this.lockid); + first = false; + if (isSetTxnid()) { + if (!first) sb.append(", "); + sb.append("txnid:"); + sb.append(this.txnid); + first = false; + } + if (isSetElapsed_ms()) { + if (!first) sb.append(", "); + sb.append("elapsed_ms:"); + sb.append(this.elapsed_ms); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetLockid()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'lockid' is unset! Struct:" + toString()); + } + + // 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 { + // 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 CheckLockRequestStandardSchemeFactory implements SchemeFactory { + public CheckLockRequestStandardScheme getScheme() { + return new CheckLockRequestStandardScheme(); + } + } + + private static class CheckLockRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CheckLockRequest 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: // LOCKID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lockid = iprot.readI64(); + struct.setLockidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TXNID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ELAPSED_MS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.elapsed_ms = iprot.readI64(); + struct.setElapsed_msIsSet(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, CheckLockRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(LOCKID_FIELD_DESC); + oprot.writeI64(struct.lockid); + oprot.writeFieldEnd(); + if (struct.isSetTxnid()) { + oprot.writeFieldBegin(TXNID_FIELD_DESC); + oprot.writeI64(struct.txnid); + oprot.writeFieldEnd(); + } + if (struct.isSetElapsed_ms()) { + oprot.writeFieldBegin(ELAPSED_MS_FIELD_DESC); + oprot.writeI64(struct.elapsed_ms); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CheckLockRequestTupleSchemeFactory implements SchemeFactory { + public CheckLockRequestTupleScheme getScheme() { + return new CheckLockRequestTupleScheme(); + } + } + + private static class CheckLockRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CheckLockRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.lockid); + BitSet optionals = new BitSet(); + if (struct.isSetTxnid()) { + optionals.set(0); + } + if (struct.isSetElapsed_ms()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetTxnid()) { + oprot.writeI64(struct.txnid); + } + if (struct.isSetElapsed_ms()) { + oprot.writeI64(struct.elapsed_ms); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CheckLockRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.lockid = iprot.readI64(); + struct.setLockidIsSet(true); + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(true); + } + if (incoming.get(1)) { + struct.elapsed_ms = iprot.readI64(); + struct.setElapsed_msIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java new file mode 100644 index 0000000..0b6574d --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java @@ -0,0 +1,438 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ClearFileMetadataRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClearFileMetadataRequest"); + + private static final org.apache.thrift.protocol.TField FILE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fileIds", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ClearFileMetadataRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ClearFileMetadataRequestTupleSchemeFactory()); + } + + private List fileIds; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + FILE_IDS((short)1, "fileIds"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FILE_IDS + return FILE_IDS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.FILE_IDS, new org.apache.thrift.meta_data.FieldMetaData("fileIds", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClearFileMetadataRequest.class, metaDataMap); + } + + public ClearFileMetadataRequest() { + } + + public ClearFileMetadataRequest( + List fileIds) + { + this(); + this.fileIds = fileIds; + } + + /** + * Performs a deep copy on other. + */ + public ClearFileMetadataRequest(ClearFileMetadataRequest other) { + if (other.isSetFileIds()) { + List __this__fileIds = new ArrayList(other.fileIds); + this.fileIds = __this__fileIds; + } + } + + public ClearFileMetadataRequest deepCopy() { + return new ClearFileMetadataRequest(this); + } + + @Override + public void clear() { + this.fileIds = null; + } + + public int getFileIdsSize() { + return (this.fileIds == null) ? 0 : this.fileIds.size(); + } + + public java.util.Iterator getFileIdsIterator() { + return (this.fileIds == null) ? null : this.fileIds.iterator(); + } + + public void addToFileIds(long elem) { + if (this.fileIds == null) { + this.fileIds = new ArrayList(); + } + this.fileIds.add(elem); + } + + public List getFileIds() { + return this.fileIds; + } + + public void setFileIds(List fileIds) { + this.fileIds = fileIds; + } + + public void unsetFileIds() { + this.fileIds = null; + } + + /** Returns true if field fileIds is set (has been assigned a value) and false otherwise */ + public boolean isSetFileIds() { + return this.fileIds != null; + } + + public void setFileIdsIsSet(boolean value) { + if (!value) { + this.fileIds = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FILE_IDS: + if (value == null) { + unsetFileIds(); + } else { + setFileIds((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FILE_IDS: + return getFileIds(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FILE_IDS: + return isSetFileIds(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ClearFileMetadataRequest) + return this.equals((ClearFileMetadataRequest)that); + return false; + } + + public boolean equals(ClearFileMetadataRequest that) { + if (that == null) + return false; + + boolean this_present_fileIds = true && this.isSetFileIds(); + boolean that_present_fileIds = true && that.isSetFileIds(); + if (this_present_fileIds || that_present_fileIds) { + if (!(this_present_fileIds && that_present_fileIds)) + return false; + if (!this.fileIds.equals(that.fileIds)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_fileIds = true && (isSetFileIds()); + list.add(present_fileIds); + if (present_fileIds) + list.add(fileIds); + + return list.hashCode(); + } + + @Override + public int compareTo(ClearFileMetadataRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetFileIds()).compareTo(other.isSetFileIds()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFileIds()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileIds, other.fileIds); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ClearFileMetadataRequest("); + boolean first = true; + + sb.append("fileIds:"); + if (this.fileIds == null) { + sb.append("null"); + } else { + sb.append(this.fileIds); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetFileIds()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'fileIds' is unset! Struct:" + toString()); + } + + // 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 ClearFileMetadataRequestStandardSchemeFactory implements SchemeFactory { + public ClearFileMetadataRequestStandardScheme getScheme() { + return new ClearFileMetadataRequestStandardScheme(); + } + } + + private static class ClearFileMetadataRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ClearFileMetadataRequest 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: // FILE_IDS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list666 = iprot.readListBegin(); + struct.fileIds = new ArrayList(_list666.size); + long _elem667; + for (int _i668 = 0; _i668 < _list666.size; ++_i668) + { + _elem667 = iprot.readI64(); + struct.fileIds.add(_elem667); + } + iprot.readListEnd(); + } + struct.setFileIdsIsSet(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, ClearFileMetadataRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.fileIds != null) { + oprot.writeFieldBegin(FILE_IDS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size())); + for (long _iter669 : struct.fileIds) + { + oprot.writeI64(_iter669); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ClearFileMetadataRequestTupleSchemeFactory implements SchemeFactory { + public ClearFileMetadataRequestTupleScheme getScheme() { + return new ClearFileMetadataRequestTupleScheme(); + } + } + + private static class ClearFileMetadataRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ClearFileMetadataRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.fileIds.size()); + for (long _iter670 : struct.fileIds) + { + oprot.writeI64(_iter670); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ClearFileMetadataRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list671 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.fileIds = new ArrayList(_list671.size); + long _elem672; + for (int _i673 = 0; _i673 < _list671.size; ++_i673) + { + _elem672 = iprot.readI64(); + struct.fileIds.add(_elem672); + } + } + struct.setFileIdsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataResult.java new file mode 100644 index 0000000..8e46d83 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataResult.java @@ -0,0 +1,283 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ClearFileMetadataResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClearFileMetadataResult"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ClearFileMetadataResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ClearFileMetadataResultTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClearFileMetadataResult.class, metaDataMap); + } + + public ClearFileMetadataResult() { + } + + /** + * Performs a deep copy on other. + */ + public ClearFileMetadataResult(ClearFileMetadataResult other) { + } + + public ClearFileMetadataResult deepCopy() { + return new ClearFileMetadataResult(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ClearFileMetadataResult) + return this.equals((ClearFileMetadataResult)that); + return false; + } + + public boolean equals(ClearFileMetadataResult that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(ClearFileMetadataResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ClearFileMetadataResult("); + boolean first = true; + + 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 ClearFileMetadataResultStandardSchemeFactory implements SchemeFactory { + public ClearFileMetadataResultStandardScheme getScheme() { + return new ClearFileMetadataResultStandardScheme(); + } + } + + private static class ClearFileMetadataResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ClearFileMetadataResult 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, ClearFileMetadataResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ClearFileMetadataResultTupleSchemeFactory implements SchemeFactory { + public ClearFileMetadataResultTupleScheme getScheme() { + return new ClearFileMetadataResultTupleScheme(); + } + } + + private static class ClearFileMetadataResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ClearFileMetadataResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ClearFileMetadataResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java new file mode 100644 index 0000000..19e671b --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java @@ -0,0 +1,441 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ClientCapabilities implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClientCapabilities"); + + private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ClientCapabilitiesStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ClientCapabilitiesTupleSchemeFactory()); + } + + private List values; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + VALUES((short)1, "values"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // VALUES + return VALUES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ClientCapability.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClientCapabilities.class, metaDataMap); + } + + public ClientCapabilities() { + } + + public ClientCapabilities( + List values) + { + this(); + this.values = values; + } + + /** + * Performs a deep copy on other. + */ + public ClientCapabilities(ClientCapabilities other) { + if (other.isSetValues()) { + List __this__values = new ArrayList(other.values.size()); + for (ClientCapability other_element : other.values) { + __this__values.add(other_element); + } + this.values = __this__values; + } + } + + public ClientCapabilities deepCopy() { + return new ClientCapabilities(this); + } + + @Override + public void clear() { + this.values = null; + } + + public int getValuesSize() { + return (this.values == null) ? 0 : this.values.size(); + } + + public java.util.Iterator getValuesIterator() { + return (this.values == null) ? null : this.values.iterator(); + } + + public void addToValues(ClientCapability elem) { + if (this.values == null) { + this.values = new ArrayList(); + } + this.values.add(elem); + } + + public List getValues() { + return this.values; + } + + public void setValues(List values) { + this.values = values; + } + + public void unsetValues() { + this.values = null; + } + + /** Returns true if field values is set (has been assigned a value) and false otherwise */ + public boolean isSetValues() { + return this.values != null; + } + + public void setValuesIsSet(boolean value) { + if (!value) { + this.values = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case VALUES: + if (value == null) { + unsetValues(); + } else { + setValues((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case VALUES: + return getValues(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case VALUES: + return isSetValues(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ClientCapabilities) + return this.equals((ClientCapabilities)that); + return false; + } + + public boolean equals(ClientCapabilities that) { + if (that == null) + return false; + + boolean this_present_values = true && this.isSetValues(); + boolean that_present_values = true && that.isSetValues(); + if (this_present_values || that_present_values) { + if (!(this_present_values && that_present_values)) + return false; + if (!this.values.equals(that.values)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_values = true && (isSetValues()); + list.add(present_values); + if (present_values) + list.add(values); + + return list.hashCode(); + } + + @Override + public int compareTo(ClientCapabilities other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValues()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ClientCapabilities("); + boolean first = true; + + sb.append("values:"); + if (this.values == null) { + sb.append("null"); + } else { + sb.append(this.values); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetValues()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' is unset! Struct:" + toString()); + } + + // 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 ClientCapabilitiesStandardSchemeFactory implements SchemeFactory { + public ClientCapabilitiesStandardScheme getScheme() { + return new ClientCapabilitiesStandardScheme(); + } + } + + private static class ClientCapabilitiesStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ClientCapabilities 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 _list682 = iprot.readListBegin(); + struct.values = new ArrayList(_list682.size); + ClientCapability _elem683; + for (int _i684 = 0; _i684 < _list682.size; ++_i684) + { + _elem683 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32()); + struct.values.add(_elem683); + } + iprot.readListEnd(); + } + struct.setValuesIsSet(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, ClientCapabilities 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.I32, struct.values.size())); + for (ClientCapability _iter685 : struct.values) + { + oprot.writeI32(_iter685.getValue()); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ClientCapabilitiesTupleSchemeFactory implements SchemeFactory { + public ClientCapabilitiesTupleScheme getScheme() { + return new ClientCapabilitiesTupleScheme(); + } + } + + private static class ClientCapabilitiesTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ClientCapabilities struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.values.size()); + for (ClientCapability _iter686 : struct.values) + { + oprot.writeI32(_iter686.getValue()); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ClientCapabilities struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list687 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.values = new ArrayList(_list687.size); + ClientCapability _elem688; + for (int _i689 = 0; _i689 < _list687.size; ++_i689) + { + _elem688 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32()); + struct.values.add(_elem688); + } + } + struct.setValuesIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapability.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapability.java new file mode 100644 index 0000000..f53bd82 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapability.java @@ -0,0 +1,42 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum ClientCapability implements org.apache.thrift.TEnum { + TEST_CAPABILITY(1); + + private final int value; + + private ClientCapability(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static ClientCapability findByValue(int value) { + switch (value) { + case 1: + return TEST_CAPABILITY; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleRequest.java new file mode 100644 index 0000000..d84f236 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleRequest.java @@ -0,0 +1,488 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class CmRecycleRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CmRecycleRequest"); + + private static final org.apache.thrift.protocol.TField DATA_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("dataPath", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PURGE_FIELD_DESC = new org.apache.thrift.protocol.TField("purge", org.apache.thrift.protocol.TType.BOOL, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CmRecycleRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CmRecycleRequestTupleSchemeFactory()); + } + + private String dataPath; // required + private boolean purge; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DATA_PATH((short)1, "dataPath"), + PURGE((short)2, "purge"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DATA_PATH + return DATA_PATH; + case 2: // PURGE + return PURGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __PURGE_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DATA_PATH, new org.apache.thrift.meta_data.FieldMetaData("dataPath", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PURGE, new org.apache.thrift.meta_data.FieldMetaData("purge", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CmRecycleRequest.class, metaDataMap); + } + + public CmRecycleRequest() { + } + + public CmRecycleRequest( + String dataPath, + boolean purge) + { + this(); + this.dataPath = dataPath; + this.purge = purge; + setPurgeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public CmRecycleRequest(CmRecycleRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDataPath()) { + this.dataPath = other.dataPath; + } + this.purge = other.purge; + } + + public CmRecycleRequest deepCopy() { + return new CmRecycleRequest(this); + } + + @Override + public void clear() { + this.dataPath = null; + setPurgeIsSet(false); + this.purge = false; + } + + public String getDataPath() { + return this.dataPath; + } + + public void setDataPath(String dataPath) { + this.dataPath = dataPath; + } + + public void unsetDataPath() { + this.dataPath = null; + } + + /** Returns true if field dataPath is set (has been assigned a value) and false otherwise */ + public boolean isSetDataPath() { + return this.dataPath != null; + } + + public void setDataPathIsSet(boolean value) { + if (!value) { + this.dataPath = null; + } + } + + public boolean isPurge() { + return this.purge; + } + + public void setPurge(boolean purge) { + this.purge = purge; + setPurgeIsSet(true); + } + + public void unsetPurge() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PURGE_ISSET_ID); + } + + /** Returns true if field purge is set (has been assigned a value) and false otherwise */ + public boolean isSetPurge() { + return EncodingUtils.testBit(__isset_bitfield, __PURGE_ISSET_ID); + } + + public void setPurgeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PURGE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DATA_PATH: + if (value == null) { + unsetDataPath(); + } else { + setDataPath((String)value); + } + break; + + case PURGE: + if (value == null) { + unsetPurge(); + } else { + setPurge((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DATA_PATH: + return getDataPath(); + + case PURGE: + return isPurge(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DATA_PATH: + return isSetDataPath(); + case PURGE: + return isSetPurge(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CmRecycleRequest) + return this.equals((CmRecycleRequest)that); + return false; + } + + public boolean equals(CmRecycleRequest that) { + if (that == null) + return false; + + boolean this_present_dataPath = true && this.isSetDataPath(); + boolean that_present_dataPath = true && that.isSetDataPath(); + if (this_present_dataPath || that_present_dataPath) { + if (!(this_present_dataPath && that_present_dataPath)) + return false; + if (!this.dataPath.equals(that.dataPath)) + return false; + } + + boolean this_present_purge = true; + boolean that_present_purge = true; + if (this_present_purge || that_present_purge) { + if (!(this_present_purge && that_present_purge)) + return false; + if (this.purge != that.purge) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dataPath = true && (isSetDataPath()); + list.add(present_dataPath); + if (present_dataPath) + list.add(dataPath); + + boolean present_purge = true; + list.add(present_purge); + if (present_purge) + list.add(purge); + + return list.hashCode(); + } + + @Override + public int compareTo(CmRecycleRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDataPath()).compareTo(other.isSetDataPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataPath, other.dataPath); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPurge()).compareTo(other.isSetPurge()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPurge()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purge, other.purge); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("CmRecycleRequest("); + boolean first = true; + + sb.append("dataPath:"); + if (this.dataPath == null) { + sb.append("null"); + } else { + sb.append(this.dataPath); + } + first = false; + if (!first) sb.append(", "); + sb.append("purge:"); + sb.append(this.purge); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDataPath()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataPath' is unset! Struct:" + toString()); + } + + if (!isSetPurge()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'purge' is unset! Struct:" + toString()); + } + + // 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 { + // 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 CmRecycleRequestStandardSchemeFactory implements SchemeFactory { + public CmRecycleRequestStandardScheme getScheme() { + return new CmRecycleRequestStandardScheme(); + } + } + + private static class CmRecycleRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CmRecycleRequest 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: // DATA_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dataPath = iprot.readString(); + struct.setDataPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PURGE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.purge = iprot.readBool(); + struct.setPurgeIsSet(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, CmRecycleRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dataPath != null) { + oprot.writeFieldBegin(DATA_PATH_FIELD_DESC); + oprot.writeString(struct.dataPath); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(PURGE_FIELD_DESC); + oprot.writeBool(struct.purge); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CmRecycleRequestTupleSchemeFactory implements SchemeFactory { + public CmRecycleRequestTupleScheme getScheme() { + return new CmRecycleRequestTupleScheme(); + } + } + + private static class CmRecycleRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CmRecycleRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dataPath); + oprot.writeBool(struct.purge); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CmRecycleRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dataPath = iprot.readString(); + struct.setDataPathIsSet(true); + struct.purge = iprot.readBool(); + struct.setPurgeIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleResponse.java new file mode 100644 index 0000000..313559a --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleResponse.java @@ -0,0 +1,283 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class CmRecycleResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CmRecycleResponse"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CmRecycleResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CmRecycleResponseTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CmRecycleResponse.class, metaDataMap); + } + + public CmRecycleResponse() { + } + + /** + * Performs a deep copy on other. + */ + public CmRecycleResponse(CmRecycleResponse other) { + } + + public CmRecycleResponse deepCopy() { + return new CmRecycleResponse(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CmRecycleResponse) + return this.equals((CmRecycleResponse)that); + return false; + } + + public boolean equals(CmRecycleResponse that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(CmRecycleResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("CmRecycleResponse("); + boolean first = true; + + 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 CmRecycleResponseStandardSchemeFactory implements SchemeFactory { + public CmRecycleResponseStandardScheme getScheme() { + return new CmRecycleResponseStandardScheme(); + } + } + + private static class CmRecycleResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CmRecycleResponse 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, CmRecycleResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CmRecycleResponseTupleSchemeFactory implements SchemeFactory { + public CmRecycleResponseTupleScheme getScheme() { + return new CmRecycleResponseTupleScheme(); + } + } + + private static class CmRecycleResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CmRecycleResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CmRecycleResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java new file mode 100644 index 0000000..ba059fe --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java @@ -0,0 +1,549 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ColumnStatistics implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatistics"); + + private static final org.apache.thrift.protocol.TField STATS_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("statsDesc", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("statsObj", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ColumnStatisticsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ColumnStatisticsTupleSchemeFactory()); + } + + private ColumnStatisticsDesc statsDesc; // required + private List statsObj; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATS_DESC((short)1, "statsDesc"), + STATS_OBJ((short)2, "statsObj"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATS_DESC + return STATS_DESC; + case 2: // STATS_OBJ + return STATS_OBJ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.STATS_DESC, new org.apache.thrift.meta_data.FieldMetaData("statsDesc", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsDesc.class))); + tmpMap.put(_Fields.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("statsObj", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsObj.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatistics.class, metaDataMap); + } + + public ColumnStatistics() { + } + + public ColumnStatistics( + ColumnStatisticsDesc statsDesc, + List statsObj) + { + this(); + this.statsDesc = statsDesc; + this.statsObj = statsObj; + } + + /** + * Performs a deep copy on other. + */ + public ColumnStatistics(ColumnStatistics other) { + if (other.isSetStatsDesc()) { + this.statsDesc = new ColumnStatisticsDesc(other.statsDesc); + } + if (other.isSetStatsObj()) { + List __this__statsObj = new ArrayList(other.statsObj.size()); + for (ColumnStatisticsObj other_element : other.statsObj) { + __this__statsObj.add(new ColumnStatisticsObj(other_element)); + } + this.statsObj = __this__statsObj; + } + } + + public ColumnStatistics deepCopy() { + return new ColumnStatistics(this); + } + + @Override + public void clear() { + this.statsDesc = null; + this.statsObj = null; + } + + public ColumnStatisticsDesc getStatsDesc() { + return this.statsDesc; + } + + public void setStatsDesc(ColumnStatisticsDesc statsDesc) { + this.statsDesc = statsDesc; + } + + public void unsetStatsDesc() { + this.statsDesc = null; + } + + /** Returns true if field statsDesc is set (has been assigned a value) and false otherwise */ + public boolean isSetStatsDesc() { + return this.statsDesc != null; + } + + public void setStatsDescIsSet(boolean value) { + if (!value) { + this.statsDesc = null; + } + } + + public int getStatsObjSize() { + return (this.statsObj == null) ? 0 : this.statsObj.size(); + } + + public java.util.Iterator getStatsObjIterator() { + return (this.statsObj == null) ? null : this.statsObj.iterator(); + } + + public void addToStatsObj(ColumnStatisticsObj elem) { + if (this.statsObj == null) { + this.statsObj = new ArrayList(); + } + this.statsObj.add(elem); + } + + public List getStatsObj() { + return this.statsObj; + } + + public void setStatsObj(List statsObj) { + this.statsObj = statsObj; + } + + public void unsetStatsObj() { + this.statsObj = null; + } + + /** Returns true if field statsObj is set (has been assigned a value) and false otherwise */ + public boolean isSetStatsObj() { + return this.statsObj != null; + } + + public void setStatsObjIsSet(boolean value) { + if (!value) { + this.statsObj = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STATS_DESC: + if (value == null) { + unsetStatsDesc(); + } else { + setStatsDesc((ColumnStatisticsDesc)value); + } + break; + + case STATS_OBJ: + if (value == null) { + unsetStatsObj(); + } else { + setStatsObj((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case STATS_DESC: + return getStatsDesc(); + + case STATS_OBJ: + return getStatsObj(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case STATS_DESC: + return isSetStatsDesc(); + case STATS_OBJ: + return isSetStatsObj(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ColumnStatistics) + return this.equals((ColumnStatistics)that); + return false; + } + + public boolean equals(ColumnStatistics that) { + if (that == null) + return false; + + boolean this_present_statsDesc = true && this.isSetStatsDesc(); + boolean that_present_statsDesc = true && that.isSetStatsDesc(); + if (this_present_statsDesc || that_present_statsDesc) { + if (!(this_present_statsDesc && that_present_statsDesc)) + return false; + if (!this.statsDesc.equals(that.statsDesc)) + return false; + } + + boolean this_present_statsObj = true && this.isSetStatsObj(); + boolean that_present_statsObj = true && that.isSetStatsObj(); + if (this_present_statsObj || that_present_statsObj) { + if (!(this_present_statsObj && that_present_statsObj)) + return false; + if (!this.statsObj.equals(that.statsObj)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_statsDesc = true && (isSetStatsDesc()); + list.add(present_statsDesc); + if (present_statsDesc) + list.add(statsDesc); + + boolean present_statsObj = true && (isSetStatsObj()); + list.add(present_statsObj); + if (present_statsObj) + list.add(statsObj); + + return list.hashCode(); + } + + @Override + public int compareTo(ColumnStatistics other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetStatsDesc()).compareTo(other.isSetStatsDesc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatsDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statsDesc, other.statsDesc); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStatsObj()).compareTo(other.isSetStatsObj()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatsObj()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statsObj, other.statsObj); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ColumnStatistics("); + boolean first = true; + + sb.append("statsDesc:"); + if (this.statsDesc == null) { + sb.append("null"); + } else { + sb.append(this.statsDesc); + } + first = false; + if (!first) sb.append(", "); + sb.append("statsObj:"); + if (this.statsObj == null) { + sb.append("null"); + } else { + sb.append(this.statsObj); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetStatsDesc()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsDesc' is unset! Struct:" + toString()); + } + + if (!isSetStatsObj()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsObj' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (statsDesc != null) { + statsDesc.validate(); + } + } + + 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 ColumnStatisticsStandardSchemeFactory implements SchemeFactory { + public ColumnStatisticsStandardScheme getScheme() { + return new ColumnStatisticsStandardScheme(); + } + } + + private static class ColumnStatisticsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatistics 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: // STATS_DESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.statsDesc = new ColumnStatisticsDesc(); + struct.statsDesc.read(iprot); + struct.setStatsDescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STATS_OBJ + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list270 = iprot.readListBegin(); + struct.statsObj = new ArrayList(_list270.size); + ColumnStatisticsObj _elem271; + for (int _i272 = 0; _i272 < _list270.size; ++_i272) + { + _elem271 = new ColumnStatisticsObj(); + _elem271.read(iprot); + struct.statsObj.add(_elem271); + } + iprot.readListEnd(); + } + struct.setStatsObjIsSet(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, ColumnStatistics struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.statsDesc != null) { + oprot.writeFieldBegin(STATS_DESC_FIELD_DESC); + struct.statsDesc.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.statsObj != null) { + oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.statsObj.size())); + for (ColumnStatisticsObj _iter273 : struct.statsObj) + { + _iter273.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ColumnStatisticsTupleSchemeFactory implements SchemeFactory { + public ColumnStatisticsTupleScheme getScheme() { + return new ColumnStatisticsTupleScheme(); + } + } + + private static class ColumnStatisticsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatistics struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.statsDesc.write(oprot); + { + oprot.writeI32(struct.statsObj.size()); + for (ColumnStatisticsObj _iter274 : struct.statsObj) + { + _iter274.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatistics struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.statsDesc = new ColumnStatisticsDesc(); + struct.statsDesc.read(iprot); + struct.setStatsDescIsSet(true); + { + org.apache.thrift.protocol.TList _list275 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.statsObj = new ArrayList(_list275.size); + ColumnStatisticsObj _elem276; + for (int _i277 = 0; _i277 < _list275.size; ++_i277) + { + _elem276 = new ColumnStatisticsObj(); + _elem276.read(iprot); + struct.statsObj.add(_elem276); + } + } + struct.setStatsObjIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java new file mode 100644 index 0000000..036d438 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java @@ -0,0 +1,675 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +public class ColumnStatisticsData extends org.apache.thrift.TUnion { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatisticsData"); + private static final org.apache.thrift.protocol.TField BOOLEAN_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("booleanStats", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField LONG_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("longStats", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField DOUBLE_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("doubleStats", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final org.apache.thrift.protocol.TField STRING_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("stringStats", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final org.apache.thrift.protocol.TField BINARY_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("binaryStats", org.apache.thrift.protocol.TType.STRUCT, (short)5); + private static final org.apache.thrift.protocol.TField DECIMAL_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("decimalStats", org.apache.thrift.protocol.TType.STRUCT, (short)6); + private static final org.apache.thrift.protocol.TField DATE_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("dateStats", org.apache.thrift.protocol.TType.STRUCT, (short)7); + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + BOOLEAN_STATS((short)1, "booleanStats"), + LONG_STATS((short)2, "longStats"), + DOUBLE_STATS((short)3, "doubleStats"), + STRING_STATS((short)4, "stringStats"), + BINARY_STATS((short)5, "binaryStats"), + DECIMAL_STATS((short)6, "decimalStats"), + DATE_STATS((short)7, "dateStats"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // BOOLEAN_STATS + return BOOLEAN_STATS; + case 2: // LONG_STATS + return LONG_STATS; + case 3: // DOUBLE_STATS + return DOUBLE_STATS; + case 4: // STRING_STATS + return STRING_STATS; + case 5: // BINARY_STATS + return BINARY_STATS; + case 6: // DECIMAL_STATS + return DECIMAL_STATS; + case 7: // DATE_STATS + return DATE_STATS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + 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); + tmpMap.put(_Fields.BOOLEAN_STATS, new org.apache.thrift.meta_data.FieldMetaData("booleanStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BooleanColumnStatsData.class))); + tmpMap.put(_Fields.LONG_STATS, new org.apache.thrift.meta_data.FieldMetaData("longStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LongColumnStatsData.class))); + tmpMap.put(_Fields.DOUBLE_STATS, new org.apache.thrift.meta_data.FieldMetaData("doubleStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DoubleColumnStatsData.class))); + tmpMap.put(_Fields.STRING_STATS, new org.apache.thrift.meta_data.FieldMetaData("stringStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StringColumnStatsData.class))); + tmpMap.put(_Fields.BINARY_STATS, new org.apache.thrift.meta_data.FieldMetaData("binaryStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BinaryColumnStatsData.class))); + tmpMap.put(_Fields.DECIMAL_STATS, new org.apache.thrift.meta_data.FieldMetaData("decimalStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DecimalColumnStatsData.class))); + tmpMap.put(_Fields.DATE_STATS, new org.apache.thrift.meta_data.FieldMetaData("dateStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DateColumnStatsData.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatisticsData.class, metaDataMap); + } + + public ColumnStatisticsData() { + super(); + } + + public ColumnStatisticsData(_Fields setField, Object value) { + super(setField, value); + } + + public ColumnStatisticsData(ColumnStatisticsData other) { + super(other); + } + public ColumnStatisticsData deepCopy() { + return new ColumnStatisticsData(this); + } + + public static ColumnStatisticsData booleanStats(BooleanColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setBooleanStats(value); + return x; + } + + public static ColumnStatisticsData longStats(LongColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setLongStats(value); + return x; + } + + public static ColumnStatisticsData doubleStats(DoubleColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setDoubleStats(value); + return x; + } + + public static ColumnStatisticsData stringStats(StringColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setStringStats(value); + return x; + } + + public static ColumnStatisticsData binaryStats(BinaryColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setBinaryStats(value); + return x; + } + + public static ColumnStatisticsData decimalStats(DecimalColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setDecimalStats(value); + return x; + } + + public static ColumnStatisticsData dateStats(DateColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setDateStats(value); + return x; + } + + + @Override + protected void checkType(_Fields setField, Object value) throws ClassCastException { + switch (setField) { + case BOOLEAN_STATS: + if (value instanceof BooleanColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type BooleanColumnStatsData for field 'booleanStats', but got " + value.getClass().getSimpleName()); + case LONG_STATS: + if (value instanceof LongColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type LongColumnStatsData for field 'longStats', but got " + value.getClass().getSimpleName()); + case DOUBLE_STATS: + if (value instanceof DoubleColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type DoubleColumnStatsData for field 'doubleStats', but got " + value.getClass().getSimpleName()); + case STRING_STATS: + if (value instanceof StringColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type StringColumnStatsData for field 'stringStats', but got " + value.getClass().getSimpleName()); + case BINARY_STATS: + if (value instanceof BinaryColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type BinaryColumnStatsData for field 'binaryStats', but got " + value.getClass().getSimpleName()); + case DECIMAL_STATS: + if (value instanceof DecimalColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type DecimalColumnStatsData for field 'decimalStats', but got " + value.getClass().getSimpleName()); + case DATE_STATS: + if (value instanceof DateColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type DateColumnStatsData for field 'dateStats', but got " + value.getClass().getSimpleName()); + default: + throw new IllegalArgumentException("Unknown field id " + setField); + } + } + + @Override + protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { + _Fields setField = _Fields.findByThriftId(field.id); + if (setField != null) { + switch (setField) { + case BOOLEAN_STATS: + if (field.type == BOOLEAN_STATS_FIELD_DESC.type) { + BooleanColumnStatsData booleanStats; + booleanStats = new BooleanColumnStatsData(); + booleanStats.read(iprot); + return booleanStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case LONG_STATS: + if (field.type == LONG_STATS_FIELD_DESC.type) { + LongColumnStatsData longStats; + longStats = new LongColumnStatsData(); + longStats.read(iprot); + return longStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case DOUBLE_STATS: + if (field.type == DOUBLE_STATS_FIELD_DESC.type) { + DoubleColumnStatsData doubleStats; + doubleStats = new DoubleColumnStatsData(); + doubleStats.read(iprot); + return doubleStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case STRING_STATS: + if (field.type == STRING_STATS_FIELD_DESC.type) { + StringColumnStatsData stringStats; + stringStats = new StringColumnStatsData(); + stringStats.read(iprot); + return stringStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case BINARY_STATS: + if (field.type == BINARY_STATS_FIELD_DESC.type) { + BinaryColumnStatsData binaryStats; + binaryStats = new BinaryColumnStatsData(); + binaryStats.read(iprot); + return binaryStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case DECIMAL_STATS: + if (field.type == DECIMAL_STATS_FIELD_DESC.type) { + DecimalColumnStatsData decimalStats; + decimalStats = new DecimalColumnStatsData(); + decimalStats.read(iprot); + return decimalStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case DATE_STATS: + if (field.type == DATE_STATS_FIELD_DESC.type) { + DateColumnStatsData dateStats; + dateStats = new DateColumnStatsData(); + dateStats.read(iprot); + return dateStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + default: + throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + } + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + } + + @Override + protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + switch (setField_) { + case BOOLEAN_STATS: + BooleanColumnStatsData booleanStats = (BooleanColumnStatsData)value_; + booleanStats.write(oprot); + return; + case LONG_STATS: + LongColumnStatsData longStats = (LongColumnStatsData)value_; + longStats.write(oprot); + return; + case DOUBLE_STATS: + DoubleColumnStatsData doubleStats = (DoubleColumnStatsData)value_; + doubleStats.write(oprot); + return; + case STRING_STATS: + StringColumnStatsData stringStats = (StringColumnStatsData)value_; + stringStats.write(oprot); + return; + case BINARY_STATS: + BinaryColumnStatsData binaryStats = (BinaryColumnStatsData)value_; + binaryStats.write(oprot); + return; + case DECIMAL_STATS: + DecimalColumnStatsData decimalStats = (DecimalColumnStatsData)value_; + decimalStats.write(oprot); + return; + case DATE_STATS: + DateColumnStatsData dateStats = (DateColumnStatsData)value_; + dateStats.write(oprot); + return; + default: + throw new IllegalStateException("Cannot write union with unknown field " + setField_); + } + } + + @Override + protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { + _Fields setField = _Fields.findByThriftId(fieldID); + if (setField != null) { + switch (setField) { + case BOOLEAN_STATS: + BooleanColumnStatsData booleanStats; + booleanStats = new BooleanColumnStatsData(); + booleanStats.read(iprot); + return booleanStats; + case LONG_STATS: + LongColumnStatsData longStats; + longStats = new LongColumnStatsData(); + longStats.read(iprot); + return longStats; + case DOUBLE_STATS: + DoubleColumnStatsData doubleStats; + doubleStats = new DoubleColumnStatsData(); + doubleStats.read(iprot); + return doubleStats; + case STRING_STATS: + StringColumnStatsData stringStats; + stringStats = new StringColumnStatsData(); + stringStats.read(iprot); + return stringStats; + case BINARY_STATS: + BinaryColumnStatsData binaryStats; + binaryStats = new BinaryColumnStatsData(); + binaryStats.read(iprot); + return binaryStats; + case DECIMAL_STATS: + DecimalColumnStatsData decimalStats; + decimalStats = new DecimalColumnStatsData(); + decimalStats.read(iprot); + return decimalStats; + case DATE_STATS: + DateColumnStatsData dateStats; + dateStats = new DateColumnStatsData(); + dateStats.read(iprot); + return dateStats; + default: + throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + } + } else { + throw new TProtocolException("Couldn't find a field with field id " + fieldID); + } + } + + @Override + protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + switch (setField_) { + case BOOLEAN_STATS: + BooleanColumnStatsData booleanStats = (BooleanColumnStatsData)value_; + booleanStats.write(oprot); + return; + case LONG_STATS: + LongColumnStatsData longStats = (LongColumnStatsData)value_; + longStats.write(oprot); + return; + case DOUBLE_STATS: + DoubleColumnStatsData doubleStats = (DoubleColumnStatsData)value_; + doubleStats.write(oprot); + return; + case STRING_STATS: + StringColumnStatsData stringStats = (StringColumnStatsData)value_; + stringStats.write(oprot); + return; + case BINARY_STATS: + BinaryColumnStatsData binaryStats = (BinaryColumnStatsData)value_; + binaryStats.write(oprot); + return; + case DECIMAL_STATS: + DecimalColumnStatsData decimalStats = (DecimalColumnStatsData)value_; + decimalStats.write(oprot); + return; + case DATE_STATS: + DateColumnStatsData dateStats = (DateColumnStatsData)value_; + dateStats.write(oprot); + return; + default: + throw new IllegalStateException("Cannot write union with unknown field " + setField_); + } + } + + @Override + protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { + switch (setField) { + case BOOLEAN_STATS: + return BOOLEAN_STATS_FIELD_DESC; + case LONG_STATS: + return LONG_STATS_FIELD_DESC; + case DOUBLE_STATS: + return DOUBLE_STATS_FIELD_DESC; + case STRING_STATS: + return STRING_STATS_FIELD_DESC; + case BINARY_STATS: + return BINARY_STATS_FIELD_DESC; + case DECIMAL_STATS: + return DECIMAL_STATS_FIELD_DESC; + case DATE_STATS: + return DATE_STATS_FIELD_DESC; + default: + throw new IllegalArgumentException("Unknown field id " + setField); + } + } + + @Override + protected org.apache.thrift.protocol.TStruct getStructDesc() { + return STRUCT_DESC; + } + + @Override + protected _Fields enumForId(short id) { + return _Fields.findByThriftIdOrThrow(id); + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + + public BooleanColumnStatsData getBooleanStats() { + if (getSetField() == _Fields.BOOLEAN_STATS) { + return (BooleanColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'booleanStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setBooleanStats(BooleanColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.BOOLEAN_STATS; + value_ = value; + } + + public LongColumnStatsData getLongStats() { + if (getSetField() == _Fields.LONG_STATS) { + return (LongColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'longStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setLongStats(LongColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.LONG_STATS; + value_ = value; + } + + public DoubleColumnStatsData getDoubleStats() { + if (getSetField() == _Fields.DOUBLE_STATS) { + return (DoubleColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'doubleStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setDoubleStats(DoubleColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.DOUBLE_STATS; + value_ = value; + } + + public StringColumnStatsData getStringStats() { + if (getSetField() == _Fields.STRING_STATS) { + return (StringColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'stringStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setStringStats(StringColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.STRING_STATS; + value_ = value; + } + + public BinaryColumnStatsData getBinaryStats() { + if (getSetField() == _Fields.BINARY_STATS) { + return (BinaryColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'binaryStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setBinaryStats(BinaryColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.BINARY_STATS; + value_ = value; + } + + public DecimalColumnStatsData getDecimalStats() { + if (getSetField() == _Fields.DECIMAL_STATS) { + return (DecimalColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'decimalStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setDecimalStats(DecimalColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.DECIMAL_STATS; + value_ = value; + } + + public DateColumnStatsData getDateStats() { + if (getSetField() == _Fields.DATE_STATS) { + return (DateColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'dateStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setDateStats(DateColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.DATE_STATS; + value_ = value; + } + + public boolean isSetBooleanStats() { + return setField_ == _Fields.BOOLEAN_STATS; + } + + + public boolean isSetLongStats() { + return setField_ == _Fields.LONG_STATS; + } + + + public boolean isSetDoubleStats() { + return setField_ == _Fields.DOUBLE_STATS; + } + + + public boolean isSetStringStats() { + return setField_ == _Fields.STRING_STATS; + } + + + public boolean isSetBinaryStats() { + return setField_ == _Fields.BINARY_STATS; + } + + + public boolean isSetDecimalStats() { + return setField_ == _Fields.DECIMAL_STATS; + } + + + public boolean isSetDateStats() { + return setField_ == _Fields.DATE_STATS; + } + + + public boolean equals(Object other) { + if (other instanceof ColumnStatisticsData) { + return equals((ColumnStatisticsData)other); + } else { + return false; + } + } + + public boolean equals(ColumnStatisticsData other) { + return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); + } + + @Override + public int compareTo(ColumnStatisticsData other) { + int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); + if (lastComparison == 0) { + return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); + } + return lastComparison; + } + + + @Override + public int hashCode() { + List list = new ArrayList(); + list.add(this.getClass().getName()); + org.apache.thrift.TFieldIdEnum setField = getSetField(); + if (setField != null) { + list.add(setField.getThriftFieldId()); + Object value = getFieldValue(); + if (value instanceof org.apache.thrift.TEnum) { + list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); + } else { + list.add(value); + } + } + return list.hashCode(); + } + 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); + } + } + + +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java new file mode 100644 index 0000000..daf3d10 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java @@ -0,0 +1,798 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ColumnStatisticsDesc implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatisticsDesc"); + + private static final org.apache.thrift.protocol.TField IS_TBL_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("isTblLevel", org.apache.thrift.protocol.TType.BOOL, (short)1); + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partName", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField LAST_ANALYZED_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAnalyzed", org.apache.thrift.protocol.TType.I64, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ColumnStatisticsDescStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ColumnStatisticsDescTupleSchemeFactory()); + } + + private boolean isTblLevel; // required + private String dbName; // required + private String tableName; // required + private String partName; // optional + private long lastAnalyzed; // 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 { + IS_TBL_LEVEL((short)1, "isTblLevel"), + DB_NAME((short)2, "dbName"), + TABLE_NAME((short)3, "tableName"), + PART_NAME((short)4, "partName"), + LAST_ANALYZED((short)5, "lastAnalyzed"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IS_TBL_LEVEL + return IS_TBL_LEVEL; + case 2: // DB_NAME + return DB_NAME; + case 3: // TABLE_NAME + return TABLE_NAME; + case 4: // PART_NAME + return PART_NAME; + case 5: // LAST_ANALYZED + return LAST_ANALYZED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ISTBLLEVEL_ISSET_ID = 0; + private static final int __LASTANALYZED_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.PART_NAME,_Fields.LAST_ANALYZED}; + 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); + tmpMap.put(_Fields.IS_TBL_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("isTblLevel", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("partName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LAST_ANALYZED, new org.apache.thrift.meta_data.FieldMetaData("lastAnalyzed", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatisticsDesc.class, metaDataMap); + } + + public ColumnStatisticsDesc() { + } + + public ColumnStatisticsDesc( + boolean isTblLevel, + String dbName, + String tableName) + { + this(); + this.isTblLevel = isTblLevel; + setIsTblLevelIsSet(true); + this.dbName = dbName; + this.tableName = tableName; + } + + /** + * Performs a deep copy on other. + */ + public ColumnStatisticsDesc(ColumnStatisticsDesc other) { + __isset_bitfield = other.__isset_bitfield; + this.isTblLevel = other.isTblLevel; + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetPartName()) { + this.partName = other.partName; + } + this.lastAnalyzed = other.lastAnalyzed; + } + + public ColumnStatisticsDesc deepCopy() { + return new ColumnStatisticsDesc(this); + } + + @Override + public void clear() { + setIsTblLevelIsSet(false); + this.isTblLevel = false; + this.dbName = null; + this.tableName = null; + this.partName = null; + setLastAnalyzedIsSet(false); + this.lastAnalyzed = 0; + } + + public boolean isIsTblLevel() { + return this.isTblLevel; + } + + public void setIsTblLevel(boolean isTblLevel) { + this.isTblLevel = isTblLevel; + setIsTblLevelIsSet(true); + } + + public void unsetIsTblLevel() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTBLLEVEL_ISSET_ID); + } + + /** Returns true if field isTblLevel is set (has been assigned a value) and false otherwise */ + public boolean isSetIsTblLevel() { + return EncodingUtils.testBit(__isset_bitfield, __ISTBLLEVEL_ISSET_ID); + } + + public void setIsTblLevelIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTBLLEVEL_ISSET_ID, value); + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTableName() { + return this.tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public String getPartName() { + return this.partName; + } + + public void setPartName(String partName) { + this.partName = partName; + } + + public void unsetPartName() { + this.partName = null; + } + + /** Returns true if field partName is set (has been assigned a value) and false otherwise */ + public boolean isSetPartName() { + return this.partName != null; + } + + public void setPartNameIsSet(boolean value) { + if (!value) { + this.partName = null; + } + } + + public long getLastAnalyzed() { + return this.lastAnalyzed; + } + + public void setLastAnalyzed(long lastAnalyzed) { + this.lastAnalyzed = lastAnalyzed; + setLastAnalyzedIsSet(true); + } + + public void unsetLastAnalyzed() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTANALYZED_ISSET_ID); + } + + /** Returns true if field lastAnalyzed is set (has been assigned a value) and false otherwise */ + public boolean isSetLastAnalyzed() { + return EncodingUtils.testBit(__isset_bitfield, __LASTANALYZED_ISSET_ID); + } + + public void setLastAnalyzedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTANALYZED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IS_TBL_LEVEL: + if (value == null) { + unsetIsTblLevel(); + } else { + setIsTblLevel((Boolean)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPartName(); + } else { + setPartName((String)value); + } + break; + + case LAST_ANALYZED: + if (value == null) { + unsetLastAnalyzed(); + } else { + setLastAnalyzed((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IS_TBL_LEVEL: + return isIsTblLevel(); + + case DB_NAME: + return getDbName(); + + case TABLE_NAME: + return getTableName(); + + case PART_NAME: + return getPartName(); + + case LAST_ANALYZED: + return getLastAnalyzed(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IS_TBL_LEVEL: + return isSetIsTblLevel(); + case DB_NAME: + return isSetDbName(); + case TABLE_NAME: + return isSetTableName(); + case PART_NAME: + return isSetPartName(); + case LAST_ANALYZED: + return isSetLastAnalyzed(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ColumnStatisticsDesc) + return this.equals((ColumnStatisticsDesc)that); + return false; + } + + public boolean equals(ColumnStatisticsDesc that) { + if (that == null) + return false; + + boolean this_present_isTblLevel = true; + boolean that_present_isTblLevel = true; + if (this_present_isTblLevel || that_present_isTblLevel) { + if (!(this_present_isTblLevel && that_present_isTblLevel)) + return false; + if (this.isTblLevel != that.isTblLevel) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_partName = true && this.isSetPartName(); + boolean that_present_partName = true && that.isSetPartName(); + if (this_present_partName || that_present_partName) { + if (!(this_present_partName && that_present_partName)) + return false; + if (!this.partName.equals(that.partName)) + return false; + } + + boolean this_present_lastAnalyzed = true && this.isSetLastAnalyzed(); + boolean that_present_lastAnalyzed = true && that.isSetLastAnalyzed(); + if (this_present_lastAnalyzed || that_present_lastAnalyzed) { + if (!(this_present_lastAnalyzed && that_present_lastAnalyzed)) + return false; + if (this.lastAnalyzed != that.lastAnalyzed) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_isTblLevel = true; + list.add(present_isTblLevel); + if (present_isTblLevel) + list.add(isTblLevel); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); + + boolean present_partName = true && (isSetPartName()); + list.add(present_partName); + if (present_partName) + list.add(partName); + + boolean present_lastAnalyzed = true && (isSetLastAnalyzed()); + list.add(present_lastAnalyzed); + if (present_lastAnalyzed) + list.add(lastAnalyzed); + + return list.hashCode(); + } + + @Override + public int compareTo(ColumnStatisticsDesc other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetIsTblLevel()).compareTo(other.isSetIsTblLevel()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsTblLevel()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTblLevel, other.isTblLevel); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartName()).compareTo(other.isSetPartName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partName, other.partName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastAnalyzed()).compareTo(other.isSetLastAnalyzed()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastAnalyzed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastAnalyzed, other.lastAnalyzed); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ColumnStatisticsDesc("); + boolean first = true; + + sb.append("isTblLevel:"); + sb.append(this.isTblLevel); + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (isSetPartName()) { + if (!first) sb.append(", "); + sb.append("partName:"); + if (this.partName == null) { + sb.append("null"); + } else { + sb.append(this.partName); + } + first = false; + } + if (isSetLastAnalyzed()) { + if (!first) sb.append(", "); + sb.append("lastAnalyzed:"); + sb.append(this.lastAnalyzed); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetIsTblLevel()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'isTblLevel' is unset! Struct:" + toString()); + } + + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + if (!isSetTableName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' is unset! Struct:" + toString()); + } + + // 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 { + // 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 ColumnStatisticsDescStandardSchemeFactory implements SchemeFactory { + public ColumnStatisticsDescStandardScheme getScheme() { + return new ColumnStatisticsDescStandardScheme(); + } + } + + private static class ColumnStatisticsDescStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatisticsDesc 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: // IS_TBL_LEVEL + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isTblLevel = iprot.readBool(); + struct.setIsTblLevelIsSet(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: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.partName = iprot.readString(); + struct.setPartNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // LAST_ANALYZED + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lastAnalyzed = iprot.readI64(); + struct.setLastAnalyzedIsSet(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, ColumnStatisticsDesc struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(IS_TBL_LEVEL_FIELD_DESC); + oprot.writeBool(struct.isTblLevel); + 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(); + } + if (struct.partName != null) { + if (struct.isSetPartName()) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.partName); + oprot.writeFieldEnd(); + } + } + if (struct.isSetLastAnalyzed()) { + oprot.writeFieldBegin(LAST_ANALYZED_FIELD_DESC); + oprot.writeI64(struct.lastAnalyzed); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ColumnStatisticsDescTupleSchemeFactory implements SchemeFactory { + public ColumnStatisticsDescTupleScheme getScheme() { + return new ColumnStatisticsDescTupleScheme(); + } + } + + private static class ColumnStatisticsDescTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsDesc struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBool(struct.isTblLevel); + oprot.writeString(struct.dbName); + oprot.writeString(struct.tableName); + BitSet optionals = new BitSet(); + if (struct.isSetPartName()) { + optionals.set(0); + } + if (struct.isSetLastAnalyzed()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetPartName()) { + oprot.writeString(struct.partName); + } + if (struct.isSetLastAnalyzed()) { + oprot.writeI64(struct.lastAnalyzed); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsDesc struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.isTblLevel = iprot.readBool(); + struct.setIsTblLevelIsSet(true); + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.partName = iprot.readString(); + struct.setPartNameIsSet(true); + } + if (incoming.get(1)) { + struct.lastAnalyzed = iprot.readI64(); + struct.setLastAnalyzedIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java new file mode 100644 index 0000000..4191beb --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java @@ -0,0 +1,593 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ColumnStatisticsObj implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatisticsObj"); + + private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("colName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField COL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("colType", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField STATS_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("statsData", org.apache.thrift.protocol.TType.STRUCT, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ColumnStatisticsObjStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ColumnStatisticsObjTupleSchemeFactory()); + } + + private String colName; // required + private String colType; // required + private ColumnStatisticsData statsData; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + COL_NAME((short)1, "colName"), + COL_TYPE((short)2, "colType"), + STATS_DATA((short)3, "statsData"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // COL_NAME + return COL_NAME; + case 2: // COL_TYPE + return COL_TYPE; + case 3: // STATS_DATA + return STATS_DATA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("colName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("colType", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.STATS_DATA, new org.apache.thrift.meta_data.FieldMetaData("statsData", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsData.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatisticsObj.class, metaDataMap); + } + + public ColumnStatisticsObj() { + } + + public ColumnStatisticsObj( + String colName, + String colType, + ColumnStatisticsData statsData) + { + this(); + this.colName = colName; + this.colType = colType; + this.statsData = statsData; + } + + /** + * Performs a deep copy on other. + */ + public ColumnStatisticsObj(ColumnStatisticsObj other) { + if (other.isSetColName()) { + this.colName = other.colName; + } + if (other.isSetColType()) { + this.colType = other.colType; + } + if (other.isSetStatsData()) { + this.statsData = new ColumnStatisticsData(other.statsData); + } + } + + public ColumnStatisticsObj deepCopy() { + return new ColumnStatisticsObj(this); + } + + @Override + public void clear() { + this.colName = null; + this.colType = null; + this.statsData = null; + } + + public String getColName() { + return this.colName; + } + + public void setColName(String colName) { + this.colName = colName; + } + + public void unsetColName() { + this.colName = null; + } + + /** Returns true if field colName is set (has been assigned a value) and false otherwise */ + public boolean isSetColName() { + return this.colName != null; + } + + public void setColNameIsSet(boolean value) { + if (!value) { + this.colName = null; + } + } + + public String getColType() { + return this.colType; + } + + public void setColType(String colType) { + this.colType = colType; + } + + public void unsetColType() { + this.colType = null; + } + + /** Returns true if field colType is set (has been assigned a value) and false otherwise */ + public boolean isSetColType() { + return this.colType != null; + } + + public void setColTypeIsSet(boolean value) { + if (!value) { + this.colType = null; + } + } + + public ColumnStatisticsData getStatsData() { + return this.statsData; + } + + public void setStatsData(ColumnStatisticsData statsData) { + this.statsData = statsData; + } + + public void unsetStatsData() { + this.statsData = null; + } + + /** Returns true if field statsData is set (has been assigned a value) and false otherwise */ + public boolean isSetStatsData() { + return this.statsData != null; + } + + public void setStatsDataIsSet(boolean value) { + if (!value) { + this.statsData = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case COL_NAME: + if (value == null) { + unsetColName(); + } else { + setColName((String)value); + } + break; + + case COL_TYPE: + if (value == null) { + unsetColType(); + } else { + setColType((String)value); + } + break; + + case STATS_DATA: + if (value == null) { + unsetStatsData(); + } else { + setStatsData((ColumnStatisticsData)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case COL_NAME: + return getColName(); + + case COL_TYPE: + return getColType(); + + case STATS_DATA: + return getStatsData(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case COL_NAME: + return isSetColName(); + case COL_TYPE: + return isSetColType(); + case STATS_DATA: + return isSetStatsData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ColumnStatisticsObj) + return this.equals((ColumnStatisticsObj)that); + return false; + } + + public boolean equals(ColumnStatisticsObj that) { + if (that == null) + return false; + + boolean this_present_colName = true && this.isSetColName(); + boolean that_present_colName = true && that.isSetColName(); + if (this_present_colName || that_present_colName) { + if (!(this_present_colName && that_present_colName)) + return false; + if (!this.colName.equals(that.colName)) + return false; + } + + boolean this_present_colType = true && this.isSetColType(); + boolean that_present_colType = true && that.isSetColType(); + if (this_present_colType || that_present_colType) { + if (!(this_present_colType && that_present_colType)) + return false; + if (!this.colType.equals(that.colType)) + return false; + } + + boolean this_present_statsData = true && this.isSetStatsData(); + boolean that_present_statsData = true && that.isSetStatsData(); + if (this_present_statsData || that_present_statsData) { + if (!(this_present_statsData && that_present_statsData)) + return false; + if (!this.statsData.equals(that.statsData)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_colName = true && (isSetColName()); + list.add(present_colName); + if (present_colName) + list.add(colName); + + boolean present_colType = true && (isSetColType()); + list.add(present_colType); + if (present_colType) + list.add(colType); + + boolean present_statsData = true && (isSetStatsData()); + list.add(present_statsData); + if (present_statsData) + list.add(statsData); + + return list.hashCode(); + } + + @Override + public int compareTo(ColumnStatisticsObj other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetColName()).compareTo(other.isSetColName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colName, other.colName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColType()).compareTo(other.isSetColType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colType, other.colType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStatsData()).compareTo(other.isSetStatsData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatsData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statsData, other.statsData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ColumnStatisticsObj("); + boolean first = true; + + sb.append("colName:"); + if (this.colName == null) { + sb.append("null"); + } else { + sb.append(this.colName); + } + first = false; + if (!first) sb.append(", "); + sb.append("colType:"); + if (this.colType == null) { + sb.append("null"); + } else { + sb.append(this.colType); + } + first = false; + if (!first) sb.append(", "); + sb.append("statsData:"); + if (this.statsData == null) { + sb.append("null"); + } else { + sb.append(this.statsData); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetColName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'colName' is unset! Struct:" + toString()); + } + + if (!isSetColType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'colType' is unset! Struct:" + toString()); + } + + if (!isSetStatsData()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsData' is unset! Struct:" + toString()); + } + + // 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 ColumnStatisticsObjStandardSchemeFactory implements SchemeFactory { + public ColumnStatisticsObjStandardScheme getScheme() { + return new ColumnStatisticsObjStandardScheme(); + } + } + + private static class ColumnStatisticsObjStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatisticsObj 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_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.colName = iprot.readString(); + struct.setColNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // COL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.colType = iprot.readString(); + struct.setColTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // STATS_DATA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.statsData = new ColumnStatisticsData(); + struct.statsData.read(iprot); + struct.setStatsDataIsSet(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, ColumnStatisticsObj struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.colName != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(struct.colName); + oprot.writeFieldEnd(); + } + if (struct.colType != null) { + oprot.writeFieldBegin(COL_TYPE_FIELD_DESC); + oprot.writeString(struct.colType); + oprot.writeFieldEnd(); + } + if (struct.statsData != null) { + oprot.writeFieldBegin(STATS_DATA_FIELD_DESC); + struct.statsData.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ColumnStatisticsObjTupleSchemeFactory implements SchemeFactory { + public ColumnStatisticsObjTupleScheme getScheme() { + return new ColumnStatisticsObjTupleScheme(); + } + } + + private static class ColumnStatisticsObjTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsObj struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.colName); + oprot.writeString(struct.colType); + struct.statsData.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsObj struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.colName = iprot.readString(); + struct.setColNameIsSet(true); + struct.colType = iprot.readString(); + struct.setColTypeIsSet(true); + struct.statsData = new ColumnStatisticsData(); + struct.statsData.read(iprot); + struct.setStatsDataIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java new file mode 100644 index 0000000..77554b7 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java @@ -0,0 +1,387 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class CommitTxnRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CommitTxnRequest"); + + private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CommitTxnRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CommitTxnRequestTupleSchemeFactory()); + } + + private long txnid; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TXNID((short)1, "txnid"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TXNID + return TXNID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TXNID_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CommitTxnRequest.class, metaDataMap); + } + + public CommitTxnRequest() { + } + + public CommitTxnRequest( + long txnid) + { + this(); + this.txnid = txnid; + setTxnidIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public CommitTxnRequest(CommitTxnRequest other) { + __isset_bitfield = other.__isset_bitfield; + this.txnid = other.txnid; + } + + public CommitTxnRequest deepCopy() { + return new CommitTxnRequest(this); + } + + @Override + public void clear() { + setTxnidIsSet(false); + this.txnid = 0; + } + + public long getTxnid() { + return this.txnid; + } + + public void setTxnid(long txnid) { + this.txnid = txnid; + setTxnidIsSet(true); + } + + public void unsetTxnid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ + public boolean isSetTxnid() { + return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + public void setTxnidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TXNID: + if (value == null) { + unsetTxnid(); + } else { + setTxnid((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TXNID: + return getTxnid(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TXNID: + return isSetTxnid(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CommitTxnRequest) + return this.equals((CommitTxnRequest)that); + return false; + } + + public boolean equals(CommitTxnRequest that) { + if (that == null) + return false; + + boolean this_present_txnid = true; + boolean that_present_txnid = true; + if (this_present_txnid || that_present_txnid) { + if (!(this_present_txnid && that_present_txnid)) + return false; + if (this.txnid != that.txnid) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_txnid = true; + list.add(present_txnid); + if (present_txnid) + list.add(txnid); + + return list.hashCode(); + } + + @Override + public int compareTo(CommitTxnRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxnid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("CommitTxnRequest("); + boolean first = true; + + sb.append("txnid:"); + sb.append(this.txnid); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetTxnid()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnid' is unset! Struct:" + toString()); + } + + // 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 { + // 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 CommitTxnRequestStandardSchemeFactory implements SchemeFactory { + public CommitTxnRequestStandardScheme getScheme() { + return new CommitTxnRequestStandardScheme(); + } + } + + private static class CommitTxnRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CommitTxnRequest 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: // TXNID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(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, CommitTxnRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(TXNID_FIELD_DESC); + oprot.writeI64(struct.txnid); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CommitTxnRequestTupleSchemeFactory implements SchemeFactory { + public CommitTxnRequestTupleScheme getScheme() { + return new CommitTxnRequestTupleScheme(); + } + } + + private static class CommitTxnRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CommitTxnRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.txnid); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CommitTxnRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java new file mode 100644 index 0000000..3acb203 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java @@ -0,0 +1,977 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class CompactionRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CompactionRequest"); + + 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 TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PARTITIONNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionname", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField RUNAS_FIELD_DESC = new org.apache.thrift.protocol.TField("runas", org.apache.thrift.protocol.TType.STRING, (short)5); + 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)6); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CompactionRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CompactionRequestTupleSchemeFactory()); + } + + private String dbname; // required + private String tablename; // required + private String partitionname; // optional + private CompactionType type; // required + private String runas; // optional + private Map properties; // 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 { + DBNAME((short)1, "dbname"), + TABLENAME((short)2, "tablename"), + PARTITIONNAME((short)3, "partitionname"), + /** + * + * @see CompactionType + */ + TYPE((short)4, "type"), + RUNAS((short)5, "runas"), + PROPERTIES((short)6, "properties"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // TABLENAME + return TABLENAME; + case 3: // PARTITIONNAME + return PARTITIONNAME; + case 4: // TYPE + return TYPE; + case 5: // RUNAS + return RUNAS; + case 6: // PROPERTIES + return PROPERTIES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.PARTITIONNAME,_Fields.RUNAS,_Fields.PROPERTIES}; + 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CompactionType.class))); + tmpMap.put(_Fields.RUNAS, new org.apache.thrift.meta_data.FieldMetaData("runas", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("properties", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CompactionRequest.class, metaDataMap); + } + + public CompactionRequest() { + } + + public CompactionRequest( + String dbname, + String tablename, + CompactionType type) + { + this(); + this.dbname = dbname; + this.tablename = tablename; + this.type = type; + } + + /** + * Performs a deep copy on other. + */ + public CompactionRequest(CompactionRequest other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTablename()) { + this.tablename = other.tablename; + } + if (other.isSetPartitionname()) { + this.partitionname = other.partitionname; + } + if (other.isSetType()) { + this.type = other.type; + } + if (other.isSetRunas()) { + this.runas = other.runas; + } + if (other.isSetProperties()) { + Map __this__properties = new HashMap(other.properties); + this.properties = __this__properties; + } + } + + public CompactionRequest deepCopy() { + return new CompactionRequest(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tablename = null; + this.partitionname = null; + this.type = null; + this.runas = null; + this.properties = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTablename() { + return this.tablename; + } + + public void setTablename(String tablename) { + this.tablename = tablename; + } + + public void unsetTablename() { + this.tablename = null; + } + + /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ + public boolean isSetTablename() { + return this.tablename != null; + } + + public void setTablenameIsSet(boolean value) { + if (!value) { + this.tablename = null; + } + } + + public String getPartitionname() { + return this.partitionname; + } + + public void setPartitionname(String partitionname) { + this.partitionname = partitionname; + } + + public void unsetPartitionname() { + this.partitionname = null; + } + + /** Returns true if field partitionname is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitionname() { + return this.partitionname != null; + } + + public void setPartitionnameIsSet(boolean value) { + if (!value) { + this.partitionname = null; + } + } + + /** + * + * @see CompactionType + */ + public CompactionType getType() { + return this.type; + } + + /** + * + * @see CompactionType + */ + public void setType(CompactionType type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public String getRunas() { + return this.runas; + } + + public void setRunas(String runas) { + this.runas = runas; + } + + public void unsetRunas() { + this.runas = null; + } + + /** Returns true if field runas is set (has been assigned a value) and false otherwise */ + public boolean isSetRunas() { + return this.runas != null; + } + + public void setRunasIsSet(boolean value) { + if (!value) { + this.runas = null; + } + } + + public int getPropertiesSize() { + return (this.properties == null) ? 0 : this.properties.size(); + } + + public void putToProperties(String key, String val) { + if (this.properties == null) { + this.properties = new HashMap(); + } + this.properties.put(key, val); + } + + public Map getProperties() { + return this.properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + + public void unsetProperties() { + this.properties = null; + } + + /** Returns true if field properties is set (has been assigned a value) and false otherwise */ + public boolean isSetProperties() { + return this.properties != null; + } + + public void setPropertiesIsSet(boolean value) { + if (!value) { + this.properties = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TABLENAME: + if (value == null) { + unsetTablename(); + } else { + setTablename((String)value); + } + break; + + case PARTITIONNAME: + if (value == null) { + unsetPartitionname(); + } else { + setPartitionname((String)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((CompactionType)value); + } + break; + + case RUNAS: + if (value == null) { + unsetRunas(); + } else { + setRunas((String)value); + } + break; + + case PROPERTIES: + if (value == null) { + unsetProperties(); + } else { + setProperties((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TABLENAME: + return getTablename(); + + case PARTITIONNAME: + return getPartitionname(); + + case TYPE: + return getType(); + + case RUNAS: + return getRunas(); + + case PROPERTIES: + return getProperties(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TABLENAME: + return isSetTablename(); + case PARTITIONNAME: + return isSetPartitionname(); + case TYPE: + return isSetType(); + case RUNAS: + return isSetRunas(); + case PROPERTIES: + return isSetProperties(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CompactionRequest) + return this.equals((CompactionRequest)that); + return false; + } + + public boolean equals(CompactionRequest that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tablename = true && this.isSetTablename(); + boolean that_present_tablename = true && that.isSetTablename(); + if (this_present_tablename || that_present_tablename) { + if (!(this_present_tablename && that_present_tablename)) + return false; + if (!this.tablename.equals(that.tablename)) + return false; + } + + boolean this_present_partitionname = true && this.isSetPartitionname(); + boolean that_present_partitionname = true && that.isSetPartitionname(); + if (this_present_partitionname || that_present_partitionname) { + if (!(this_present_partitionname && that_present_partitionname)) + return false; + if (!this.partitionname.equals(that.partitionname)) + return false; + } + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + boolean this_present_runas = true && this.isSetRunas(); + boolean that_present_runas = true && that.isSetRunas(); + if (this_present_runas || that_present_runas) { + if (!(this_present_runas && that_present_runas)) + return false; + if (!this.runas.equals(that.runas)) + return false; + } + + boolean this_present_properties = true && this.isSetProperties(); + boolean that_present_properties = true && that.isSetProperties(); + if (this_present_properties || that_present_properties) { + if (!(this_present_properties && that_present_properties)) + return false; + if (!this.properties.equals(that.properties)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tablename = true && (isSetTablename()); + list.add(present_tablename); + if (present_tablename) + list.add(tablename); + + boolean present_partitionname = true && (isSetPartitionname()); + list.add(present_partitionname); + if (present_partitionname) + list.add(partitionname); + + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + + boolean present_runas = true && (isSetRunas()); + list.add(present_runas); + if (present_runas) + list.add(runas); + + boolean present_properties = true && (isSetProperties()); + list.add(present_properties); + if (present_properties) + list.add(properties); + + return list.hashCode(); + } + + @Override + public int compareTo(CompactionRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTablename()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartitionname()).compareTo(other.isSetPartitionname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionname, other.partitionname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRunas()).compareTo(other.isSetRunas()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRunas()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runas, other.runas); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetProperties()).compareTo(other.isSetProperties()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetProperties()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.properties, other.properties); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("CompactionRequest("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tablename:"); + if (this.tablename == null) { + sb.append("null"); + } else { + sb.append(this.tablename); + } + first = false; + if (isSetPartitionname()) { + if (!first) sb.append(", "); + sb.append("partitionname:"); + if (this.partitionname == null) { + sb.append("null"); + } else { + sb.append(this.partitionname); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (isSetRunas()) { + if (!first) sb.append(", "); + sb.append("runas:"); + if (this.runas == null) { + sb.append("null"); + } else { + sb.append(this.runas); + } + first = false; + } + if (isSetProperties()) { + if (!first) sb.append(", "); + sb.append("properties:"); + if (this.properties == null) { + sb.append("null"); + } else { + sb.append(this.properties); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbname()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); + } + + if (!isSetTablename()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString()); + } + + if (!isSetType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); + } + + // 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 CompactionRequestStandardSchemeFactory implements SchemeFactory { + public CompactionRequestStandardScheme getScheme() { + return new CompactionRequestStandardScheme(); + } + } + + private static class CompactionRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CompactionRequest 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: // TABLENAME + 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 3: // PARTITIONNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.partitionname = iprot.readString(); + struct.setPartitionnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // RUNAS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.runas = iprot.readString(); + struct.setRunasIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // PROPERTIES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map556 = iprot.readMapBegin(); + struct.properties = new HashMap(2*_map556.size); + String _key557; + String _val558; + for (int _i559 = 0; _i559 < _map556.size; ++_i559) + { + _key557 = iprot.readString(); + _val558 = iprot.readString(); + struct.properties.put(_key557, _val558); + } + 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, CompactionRequest 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.tablename != null) { + oprot.writeFieldBegin(TABLENAME_FIELD_DESC); + oprot.writeString(struct.tablename); + oprot.writeFieldEnd(); + } + if (struct.partitionname != null) { + if (struct.isSetPartitionname()) { + oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC); + oprot.writeString(struct.partitionname); + oprot.writeFieldEnd(); + } + } + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } + if (struct.runas != null) { + if (struct.isSetRunas()) { + oprot.writeFieldBegin(RUNAS_FIELD_DESC); + oprot.writeString(struct.runas); + oprot.writeFieldEnd(); + } + } + if (struct.properties != null) { + if (struct.isSetProperties()) { + 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 _iter560 : struct.properties.entrySet()) + { + oprot.writeString(_iter560.getKey()); + oprot.writeString(_iter560.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CompactionRequestTupleSchemeFactory implements SchemeFactory { + public CompactionRequestTupleScheme getScheme() { + return new CompactionRequestTupleScheme(); + } + } + + private static class CompactionRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CompactionRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbname); + oprot.writeString(struct.tablename); + oprot.writeI32(struct.type.getValue()); + BitSet optionals = new BitSet(); + if (struct.isSetPartitionname()) { + optionals.set(0); + } + if (struct.isSetRunas()) { + optionals.set(1); + } + if (struct.isSetProperties()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetPartitionname()) { + oprot.writeString(struct.partitionname); + } + if (struct.isSetRunas()) { + oprot.writeString(struct.runas); + } + if (struct.isSetProperties()) { + { + oprot.writeI32(struct.properties.size()); + for (Map.Entry _iter561 : struct.properties.entrySet()) + { + oprot.writeString(_iter561.getKey()); + oprot.writeString(_iter561.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CompactionRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + struct.tablename = iprot.readString(); + struct.setTablenameIsSet(true); + struct.type = org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.partitionname = iprot.readString(); + struct.setPartitionnameIsSet(true); + } + if (incoming.get(1)) { + struct.runas = iprot.readString(); + struct.setRunasIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map562 = 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*_map562.size); + String _key563; + String _val564; + for (int _i565 = 0; _i565 < _map562.size; ++_i565) + { + _key563 = iprot.readString(); + _val564 = iprot.readString(); + struct.properties.put(_key563, _val564); + } + } + struct.setPropertiesIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionResponse.java new file mode 100644 index 0000000..157ff53 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionResponse.java @@ -0,0 +1,583 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class CompactionResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CompactionResponse"); + + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField ACCEPTED_FIELD_DESC = new org.apache.thrift.protocol.TField("accepted", org.apache.thrift.protocol.TType.BOOL, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CompactionResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CompactionResponseTupleSchemeFactory()); + } + + private long id; // required + private String state; // required + private boolean accepted; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ID((short)1, "id"), + STATE((short)2, "state"), + ACCEPTED((short)3, "accepted"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ID + return ID; + case 2: // STATE + return STATE; + case 3: // ACCEPTED + return ACCEPTED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ID_ISSET_ID = 0; + private static final int __ACCEPTED_ISSET_ID = 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); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ACCEPTED, new org.apache.thrift.meta_data.FieldMetaData("accepted", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CompactionResponse.class, metaDataMap); + } + + public CompactionResponse() { + } + + public CompactionResponse( + long id, + String state, + boolean accepted) + { + this(); + this.id = id; + setIdIsSet(true); + this.state = state; + this.accepted = accepted; + setAcceptedIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public CompactionResponse(CompactionResponse other) { + __isset_bitfield = other.__isset_bitfield; + this.id = other.id; + if (other.isSetState()) { + this.state = other.state; + } + this.accepted = other.accepted; + } + + public CompactionResponse deepCopy() { + return new CompactionResponse(this); + } + + @Override + public void clear() { + setIdIsSet(false); + this.id = 0; + this.state = null; + setAcceptedIsSet(false); + this.accepted = false; + } + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + setIdIsSet(true); + } + + public void unsetId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); + } + + public void setIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); + } + + public String getState() { + return this.state; + } + + public void setState(String state) { + this.state = state; + } + + public void unsetState() { + this.state = null; + } + + /** Returns true if field state is set (has been assigned a value) and false otherwise */ + public boolean isSetState() { + return this.state != null; + } + + public void setStateIsSet(boolean value) { + if (!value) { + this.state = null; + } + } + + public boolean isAccepted() { + return this.accepted; + } + + public void setAccepted(boolean accepted) { + this.accepted = accepted; + setAcceptedIsSet(true); + } + + public void unsetAccepted() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ACCEPTED_ISSET_ID); + } + + /** Returns true if field accepted is set (has been assigned a value) and false otherwise */ + public boolean isSetAccepted() { + return EncodingUtils.testBit(__isset_bitfield, __ACCEPTED_ISSET_ID); + } + + public void setAcceptedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ACCEPTED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ID: + if (value == null) { + unsetId(); + } else { + setId((Long)value); + } + break; + + case STATE: + if (value == null) { + unsetState(); + } else { + setState((String)value); + } + break; + + case ACCEPTED: + if (value == null) { + unsetAccepted(); + } else { + setAccepted((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ID: + return getId(); + + case STATE: + return getState(); + + case ACCEPTED: + return isAccepted(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ID: + return isSetId(); + case STATE: + return isSetState(); + case ACCEPTED: + return isSetAccepted(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CompactionResponse) + return this.equals((CompactionResponse)that); + return false; + } + + public boolean equals(CompactionResponse that) { + if (that == null) + return false; + + boolean this_present_id = true; + boolean that_present_id = true; + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (this.id != that.id) + return false; + } + + boolean this_present_state = true && this.isSetState(); + boolean that_present_state = true && that.isSetState(); + if (this_present_state || that_present_state) { + if (!(this_present_state && that_present_state)) + return false; + if (!this.state.equals(that.state)) + return false; + } + + boolean this_present_accepted = true; + boolean that_present_accepted = true; + if (this_present_accepted || that_present_accepted) { + if (!(this_present_accepted && that_present_accepted)) + return false; + if (this.accepted != that.accepted) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_id = true; + list.add(present_id); + if (present_id) + list.add(id); + + boolean present_state = true && (isSetState()); + list.add(present_state); + if (present_state) + list.add(state); + + boolean present_accepted = true; + list.add(present_accepted); + if (present_accepted) + list.add(accepted); + + return list.hashCode(); + } + + @Override + public int compareTo(CompactionResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetState()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAccepted()).compareTo(other.isSetAccepted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAccepted()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.accepted, other.accepted); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("CompactionResponse("); + boolean first = true; + + sb.append("id:"); + sb.append(this.id); + first = false; + if (!first) sb.append(", "); + sb.append("state:"); + if (this.state == null) { + sb.append("null"); + } else { + sb.append(this.state); + } + first = false; + if (!first) sb.append(", "); + sb.append("accepted:"); + sb.append(this.accepted); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString()); + } + + if (!isSetState()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); + } + + if (!isSetAccepted()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'accepted' is unset! Struct:" + toString()); + } + + // 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 { + // 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 CompactionResponseStandardSchemeFactory implements SchemeFactory { + public CompactionResponseStandardScheme getScheme() { + return new CompactionResponseStandardScheme(); + } + } + + private static class CompactionResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CompactionResponse 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: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.id = iprot.readI64(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.state = iprot.readString(); + struct.setStateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ACCEPTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.accepted = iprot.readBool(); + struct.setAcceptedIsSet(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, CompactionResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeI64(struct.id); + oprot.writeFieldEnd(); + if (struct.state != null) { + oprot.writeFieldBegin(STATE_FIELD_DESC); + oprot.writeString(struct.state); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ACCEPTED_FIELD_DESC); + oprot.writeBool(struct.accepted); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CompactionResponseTupleSchemeFactory implements SchemeFactory { + public CompactionResponseTupleScheme getScheme() { + return new CompactionResponseTupleScheme(); + } + } + + private static class CompactionResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CompactionResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.id); + oprot.writeString(struct.state); + oprot.writeBool(struct.accepted); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CompactionResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.id = iprot.readI64(); + struct.setIdIsSet(true); + struct.state = iprot.readString(); + struct.setStateIsSet(true); + struct.accepted = iprot.readBool(); + struct.setAcceptedIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionType.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionType.java new file mode 100644 index 0000000..7450b27 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionType.java @@ -0,0 +1,45 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum CompactionType implements org.apache.thrift.TEnum { + MINOR(1), + MAJOR(2); + + private final int value; + + private CompactionType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static CompactionType findByValue(int value) { + switch (value) { + case 1: + return MINOR; + case 2: + return MAJOR; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java new file mode 100644 index 0000000..d454a96 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ConfigValSecurityException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ConfigValSecurityException.class, metaDataMap); + } + + public ConfigValSecurityException() { + } + + public ConfigValSecurityException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public ConfigValSecurityException(ConfigValSecurityException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public ConfigValSecurityException deepCopy() { + return new ConfigValSecurityException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ConfigValSecurityException) + return this.equals((ConfigValSecurityException)that); + return false; + } + + public boolean equals(ConfigValSecurityException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(ConfigValSecurityException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ConfigValSecurityException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CurrentNotificationEventId.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CurrentNotificationEventId.java new file mode 100644 index 0000000..2565a08 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CurrentNotificationEventId.java @@ -0,0 +1,387 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class CurrentNotificationEventId implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CurrentNotificationEventId"); + + private static final org.apache.thrift.protocol.TField EVENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("eventId", org.apache.thrift.protocol.TType.I64, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CurrentNotificationEventIdStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CurrentNotificationEventIdTupleSchemeFactory()); + } + + private long eventId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + EVENT_ID((short)1, "eventId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // EVENT_ID + return EVENT_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __EVENTID_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.EVENT_ID, new org.apache.thrift.meta_data.FieldMetaData("eventId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CurrentNotificationEventId.class, metaDataMap); + } + + public CurrentNotificationEventId() { + } + + public CurrentNotificationEventId( + long eventId) + { + this(); + this.eventId = eventId; + setEventIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public CurrentNotificationEventId(CurrentNotificationEventId other) { + __isset_bitfield = other.__isset_bitfield; + this.eventId = other.eventId; + } + + public CurrentNotificationEventId deepCopy() { + return new CurrentNotificationEventId(this); + } + + @Override + public void clear() { + setEventIdIsSet(false); + this.eventId = 0; + } + + public long getEventId() { + return this.eventId; + } + + public void setEventId(long eventId) { + this.eventId = eventId; + setEventIdIsSet(true); + } + + public void unsetEventId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EVENTID_ISSET_ID); + } + + /** Returns true if field eventId is set (has been assigned a value) and false otherwise */ + public boolean isSetEventId() { + return EncodingUtils.testBit(__isset_bitfield, __EVENTID_ISSET_ID); + } + + public void setEventIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EVENTID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case EVENT_ID: + if (value == null) { + unsetEventId(); + } else { + setEventId((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case EVENT_ID: + return getEventId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case EVENT_ID: + return isSetEventId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CurrentNotificationEventId) + return this.equals((CurrentNotificationEventId)that); + return false; + } + + public boolean equals(CurrentNotificationEventId that) { + if (that == null) + return false; + + boolean this_present_eventId = true; + boolean that_present_eventId = true; + if (this_present_eventId || that_present_eventId) { + if (!(this_present_eventId && that_present_eventId)) + return false; + if (this.eventId != that.eventId) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_eventId = true; + list.add(present_eventId); + if (present_eventId) + list.add(eventId); + + return list.hashCode(); + } + + @Override + public int compareTo(CurrentNotificationEventId other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetEventId()).compareTo(other.isSetEventId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEventId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventId, other.eventId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("CurrentNotificationEventId("); + boolean first = true; + + sb.append("eventId:"); + sb.append(this.eventId); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetEventId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'eventId' is unset! Struct:" + toString()); + } + + // 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 { + // 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 CurrentNotificationEventIdStandardSchemeFactory implements SchemeFactory { + public CurrentNotificationEventIdStandardScheme getScheme() { + return new CurrentNotificationEventIdStandardScheme(); + } + } + + private static class CurrentNotificationEventIdStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CurrentNotificationEventId 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: // EVENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.eventId = iprot.readI64(); + struct.setEventIdIsSet(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, CurrentNotificationEventId struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(EVENT_ID_FIELD_DESC); + oprot.writeI64(struct.eventId); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CurrentNotificationEventIdTupleSchemeFactory implements SchemeFactory { + public CurrentNotificationEventIdTupleScheme getScheme() { + return new CurrentNotificationEventIdTupleScheme(); + } + } + + private static class CurrentNotificationEventIdTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CurrentNotificationEventId struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.eventId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CurrentNotificationEventId struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.eventId = iprot.readI64(); + struct.setEventIdIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java new file mode 100644 index 0000000..15a6e9a --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java @@ -0,0 +1,57 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum DataOperationType implements org.apache.thrift.TEnum { + SELECT(1), + INSERT(2), + UPDATE(3), + DELETE(4), + UNSET(5), + NO_TXN(6); + + private final int value; + + private DataOperationType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static DataOperationType findByValue(int value) { + switch (value) { + case 1: + return SELECT; + case 2: + return INSERT; + case 3: + return UPDATE; + case 4: + return DELETE; + case 5: + return UNSET; + case 6: + return NO_TXN; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java new file mode 100644 index 0000000..2769845 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java @@ -0,0 +1,1095 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class Database implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Database"); + + 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 DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField LOCATION_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("locationUri", org.apache.thrift.protocol.TType.STRING, (short)3); + 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 org.apache.thrift.protocol.TField OWNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerName", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField OWNER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerType", org.apache.thrift.protocol.TType.I32, (short)7); + + 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; // optional + private String ownerName; // optional + private PrincipalType ownerType; // 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 { + NAME((short)1, "name"), + DESCRIPTION((short)2, "description"), + LOCATION_URI((short)3, "locationUri"), + PARAMETERS((short)4, "parameters"), + PRIVILEGES((short)5, "privileges"), + OWNER_NAME((short)6, "ownerName"), + /** + * + * @see PrincipalType + */ + OWNER_TYPE((short)7, "ownerType"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + case 2: // DESCRIPTION + return DESCRIPTION; + case 3: // LOCATION_URI + return LOCATION_URI; + case 4: // PARAMETERS + return PARAMETERS; + case 5: // PRIVILEGES + return PRIVILEGES; + case 6: // OWNER_NAME + return OWNER_NAME; + case 7: // OWNER_TYPE + return OWNER_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.PRIVILEGES,_Fields.OWNER_NAME,_Fields.OWNER_TYPE}; + 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); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LOCATION_URI, new org.apache.thrift.meta_data.FieldMetaData("locationUri", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrincipalPrivilegeSet.class))); + tmpMap.put(_Fields.OWNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("ownerName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OWNER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("ownerType", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Database.class, metaDataMap); + } + + public Database() { + } + + public Database( + String name, + String description, + String locationUri, + Map parameters) + { + this(); + this.name = name; + this.description = description; + this.locationUri = locationUri; + this.parameters = parameters; + } + + /** + * Performs a deep copy on other. + */ + public Database(Database other) { + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetDescription()) { + this.description = other.description; + } + if (other.isSetLocationUri()) { + this.locationUri = other.locationUri; + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(other.parameters); + this.parameters = __this__parameters; + } + if (other.isSetPrivileges()) { + this.privileges = new PrincipalPrivilegeSet(other.privileges); + } + if (other.isSetOwnerName()) { + this.ownerName = other.ownerName; + } + if (other.isSetOwnerType()) { + this.ownerType = other.ownerType; + } + } + + public Database deepCopy() { + return new Database(this); + } + + @Override + public void clear() { + this.name = null; + this.description = null; + this.locationUri = null; + this.parameters = null; + this.privileges = null; + this.ownerName = null; + this.ownerType = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + + public void unsetDescription() { + this.description = null; + } + + /** Returns true if field description is set (has been assigned a value) and false otherwise */ + public boolean isSetDescription() { + return this.description != null; + } + + public void setDescriptionIsSet(boolean value) { + if (!value) { + this.description = null; + } + } + + public String getLocationUri() { + return this.locationUri; + } + + public void setLocationUri(String locationUri) { + this.locationUri = locationUri; + } + + public void unsetLocationUri() { + this.locationUri = null; + } + + /** Returns true if field locationUri is set (has been assigned a value) and false otherwise */ + public boolean isSetLocationUri() { + return this.locationUri != null; + } + + public void setLocationUriIsSet(boolean value) { + if (!value) { + this.locationUri = null; + } + } + + public int getParametersSize() { + return (this.parameters == null) ? 0 : this.parameters.size(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = parameters; + } + + public void unsetParameters() { + this.parameters = null; + } + + /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ + public boolean isSetParameters() { + return this.parameters != null; + } + + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + + public PrincipalPrivilegeSet getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrincipalPrivilegeSet privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public String getOwnerName() { + return this.ownerName; + } + + public void setOwnerName(String ownerName) { + this.ownerName = ownerName; + } + + public void unsetOwnerName() { + this.ownerName = null; + } + + /** Returns true if field ownerName is set (has been assigned a value) and false otherwise */ + public boolean isSetOwnerName() { + return this.ownerName != null; + } + + public void setOwnerNameIsSet(boolean value) { + if (!value) { + this.ownerName = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getOwnerType() { + return this.ownerType; + } + + /** + * + * @see PrincipalType + */ + public void setOwnerType(PrincipalType ownerType) { + this.ownerType = ownerType; + } + + public void unsetOwnerType() { + this.ownerType = null; + } + + /** Returns true if field ownerType is set (has been assigned a value) and false otherwise */ + public boolean isSetOwnerType() { + return this.ownerType != null; + } + + public void setOwnerTypeIsSet(boolean value) { + if (!value) { + this.ownerType = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case DESCRIPTION: + if (value == null) { + unsetDescription(); + } else { + setDescription((String)value); + } + break; + + case LOCATION_URI: + if (value == null) { + unsetLocationUri(); + } else { + setLocationUri((String)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrincipalPrivilegeSet)value); + } + break; + + case OWNER_NAME: + if (value == null) { + unsetOwnerName(); + } else { + setOwnerName((String)value); + } + break; + + case OWNER_TYPE: + if (value == null) { + unsetOwnerType(); + } else { + setOwnerType((PrincipalType)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case DESCRIPTION: + return getDescription(); + + case LOCATION_URI: + return getLocationUri(); + + case PARAMETERS: + return getParameters(); + + case PRIVILEGES: + return getPrivileges(); + + case OWNER_NAME: + return getOwnerName(); + + case OWNER_TYPE: + return getOwnerType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case DESCRIPTION: + return isSetDescription(); + case LOCATION_URI: + return isSetLocationUri(); + case PARAMETERS: + return isSetParameters(); + case PRIVILEGES: + return isSetPrivileges(); + case OWNER_NAME: + return isSetOwnerName(); + case OWNER_TYPE: + return isSetOwnerType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Database) + return this.equals((Database)that); + return false; + } + + public boolean equals(Database that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_description = true && this.isSetDescription(); + boolean that_present_description = true && that.isSetDescription(); + if (this_present_description || that_present_description) { + if (!(this_present_description && that_present_description)) + return false; + if (!this.description.equals(that.description)) + return false; + } + + boolean this_present_locationUri = true && this.isSetLocationUri(); + boolean that_present_locationUri = true && that.isSetLocationUri(); + if (this_present_locationUri || that_present_locationUri) { + if (!(this_present_locationUri && that_present_locationUri)) + return false; + if (!this.locationUri.equals(that.locationUri)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + boolean this_present_ownerName = true && this.isSetOwnerName(); + boolean that_present_ownerName = true && that.isSetOwnerName(); + if (this_present_ownerName || that_present_ownerName) { + if (!(this_present_ownerName && that_present_ownerName)) + return false; + if (!this.ownerName.equals(that.ownerName)) + return false; + } + + boolean this_present_ownerType = true && this.isSetOwnerType(); + boolean that_present_ownerType = true && that.isSetOwnerType(); + if (this_present_ownerType || that_present_ownerType) { + if (!(this_present_ownerType && that_present_ownerType)) + return false; + if (!this.ownerType.equals(that.ownerType)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + boolean present_description = true && (isSetDescription()); + list.add(present_description); + if (present_description) + list.add(description); + + boolean present_locationUri = true && (isSetLocationUri()); + list.add(present_locationUri); + if (present_locationUri) + list.add(locationUri); + + boolean present_parameters = true && (isSetParameters()); + list.add(present_parameters); + if (present_parameters) + list.add(parameters); + + boolean present_privileges = true && (isSetPrivileges()); + list.add(present_privileges); + if (present_privileges) + list.add(privileges); + + boolean present_ownerName = true && (isSetOwnerName()); + list.add(present_ownerName); + if (present_ownerName) + list.add(ownerName); + + boolean present_ownerType = true && (isSetOwnerType()); + list.add(present_ownerType); + if (present_ownerType) + list.add(ownerType.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(Database other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDescription()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLocationUri()).compareTo(other.isSetLocationUri()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLocationUri()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.locationUri, other.locationUri); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwnerName()).compareTo(other.isSetOwnerName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwnerName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerName, other.ownerName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwnerType()).compareTo(other.isSetOwnerType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwnerType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerType, other.ownerType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Database("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("description:"); + if (this.description == null) { + sb.append("null"); + } else { + sb.append(this.description); + } + first = false; + if (!first) sb.append(", "); + sb.append("locationUri:"); + if (this.locationUri == null) { + sb.append("null"); + } else { + sb.append(this.locationUri); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + first = false; + if (isSetPrivileges()) { + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + } + if (isSetOwnerName()) { + if (!first) sb.append(", "); + sb.append("ownerName:"); + if (this.ownerName == null) { + sb.append("null"); + } else { + sb.append(this.ownerName); + } + first = false; + } + if (isSetOwnerType()) { + if (!first) sb.append(", "); + sb.append("ownerType:"); + if (this.ownerType == null) { + sb.append("null"); + } else { + sb.append(this.ownerType); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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 _map94 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map94.size); + String _key95; + String _val96; + for (int _i97 = 0; _i97 < _map94.size; ++_i97) + { + _key95 = iprot.readString(); + _val96 = iprot.readString(); + struct.parameters.put(_key95, _val96); + } + 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; + case 6: // 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; + case 7: // OWNER_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.ownerType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setOwnerTypeIsSet(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 _iter98 : struct.parameters.entrySet()) + { + oprot.writeString(_iter98.getKey()); + oprot.writeString(_iter98.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.privileges != null) { + if (struct.isSetPrivileges()) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.ownerName != null) { + if (struct.isSetOwnerName()) { + oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); + oprot.writeString(struct.ownerName); + oprot.writeFieldEnd(); + } + } + if (struct.ownerType != null) { + if (struct.isSetOwnerType()) { + oprot.writeFieldBegin(OWNER_TYPE_FIELD_DESC); + oprot.writeI32(struct.ownerType.getValue()); + 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); + } + if (struct.isSetOwnerName()) { + optionals.set(5); + } + if (struct.isSetOwnerType()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + 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 _iter99 : struct.parameters.entrySet()) + { + oprot.writeString(_iter99.getKey()); + oprot.writeString(_iter99.getValue()); + } + } + } + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + if (struct.isSetOwnerName()) { + oprot.writeString(struct.ownerName); + } + if (struct.isSetOwnerType()) { + oprot.writeI32(struct.ownerType.getValue()); + } + } + + @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(7); + 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 _map100 = 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*_map100.size); + String _key101; + String _val102; + for (int _i103 = 0; _i103 < _map100.size; ++_i103) + { + _key101 = iprot.readString(); + _val102 = iprot.readString(); + struct.parameters.put(_key101, _val102); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(4)) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + if (incoming.get(5)) { + struct.ownerName = iprot.readString(); + struct.setOwnerNameIsSet(true); + } + if (incoming.get(6)) { + struct.ownerType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setOwnerTypeIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Date.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Date.java new file mode 100644 index 0000000..bf064e5 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Date.java @@ -0,0 +1,387 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class Date implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Date"); + + private static final org.apache.thrift.protocol.TField DAYS_SINCE_EPOCH_FIELD_DESC = new org.apache.thrift.protocol.TField("daysSinceEpoch", org.apache.thrift.protocol.TType.I64, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new DateStandardSchemeFactory()); + schemes.put(TupleScheme.class, new DateTupleSchemeFactory()); + } + + private long daysSinceEpoch; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DAYS_SINCE_EPOCH((short)1, "daysSinceEpoch"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DAYS_SINCE_EPOCH + return DAYS_SINCE_EPOCH; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DAYSSINCEEPOCH_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DAYS_SINCE_EPOCH, new org.apache.thrift.meta_data.FieldMetaData("daysSinceEpoch", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Date.class, metaDataMap); + } + + public Date() { + } + + public Date( + long daysSinceEpoch) + { + this(); + this.daysSinceEpoch = daysSinceEpoch; + setDaysSinceEpochIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public Date(Date other) { + __isset_bitfield = other.__isset_bitfield; + this.daysSinceEpoch = other.daysSinceEpoch; + } + + public Date deepCopy() { + return new Date(this); + } + + @Override + public void clear() { + setDaysSinceEpochIsSet(false); + this.daysSinceEpoch = 0; + } + + public long getDaysSinceEpoch() { + return this.daysSinceEpoch; + } + + public void setDaysSinceEpoch(long daysSinceEpoch) { + this.daysSinceEpoch = daysSinceEpoch; + setDaysSinceEpochIsSet(true); + } + + public void unsetDaysSinceEpoch() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DAYSSINCEEPOCH_ISSET_ID); + } + + /** Returns true if field daysSinceEpoch is set (has been assigned a value) and false otherwise */ + public boolean isSetDaysSinceEpoch() { + return EncodingUtils.testBit(__isset_bitfield, __DAYSSINCEEPOCH_ISSET_ID); + } + + public void setDaysSinceEpochIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DAYSSINCEEPOCH_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DAYS_SINCE_EPOCH: + if (value == null) { + unsetDaysSinceEpoch(); + } else { + setDaysSinceEpoch((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DAYS_SINCE_EPOCH: + return getDaysSinceEpoch(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DAYS_SINCE_EPOCH: + return isSetDaysSinceEpoch(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Date) + return this.equals((Date)that); + return false; + } + + public boolean equals(Date that) { + if (that == null) + return false; + + boolean this_present_daysSinceEpoch = true; + boolean that_present_daysSinceEpoch = true; + if (this_present_daysSinceEpoch || that_present_daysSinceEpoch) { + if (!(this_present_daysSinceEpoch && that_present_daysSinceEpoch)) + return false; + if (this.daysSinceEpoch != that.daysSinceEpoch) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_daysSinceEpoch = true; + list.add(present_daysSinceEpoch); + if (present_daysSinceEpoch) + list.add(daysSinceEpoch); + + return list.hashCode(); + } + + @Override + public int compareTo(Date other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDaysSinceEpoch()).compareTo(other.isSetDaysSinceEpoch()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDaysSinceEpoch()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.daysSinceEpoch, other.daysSinceEpoch); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Date("); + boolean first = true; + + sb.append("daysSinceEpoch:"); + sb.append(this.daysSinceEpoch); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDaysSinceEpoch()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'daysSinceEpoch' is unset! Struct:" + toString()); + } + + // 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 { + // 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 DateStandardSchemeFactory implements SchemeFactory { + public DateStandardScheme getScheme() { + return new DateStandardScheme(); + } + } + + private static class DateStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Date 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: // DAYS_SINCE_EPOCH + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.daysSinceEpoch = iprot.readI64(); + struct.setDaysSinceEpochIsSet(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, Date struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(DAYS_SINCE_EPOCH_FIELD_DESC); + oprot.writeI64(struct.daysSinceEpoch); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DateTupleSchemeFactory implements SchemeFactory { + public DateTupleScheme getScheme() { + return new DateTupleScheme(); + } + } + + private static class DateTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Date struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.daysSinceEpoch); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Date struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.daysSinceEpoch = iprot.readI64(); + struct.setDaysSinceEpochIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DateColumnStatsData.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DateColumnStatsData.java new file mode 100644 index 0000000..edc87a1 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DateColumnStatsData.java @@ -0,0 +1,814 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class DateColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DateColumnStatsData"); + + private static final org.apache.thrift.protocol.TField LOW_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("lowValue", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField HIGH_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("highValue", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new DateColumnStatsDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new DateColumnStatsDataTupleSchemeFactory()); + } + + private Date lowValue; // optional + private Date highValue; // optional + private long numNulls; // required + private long numDVs; // required + private String bitVectors; // 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 { + LOW_VALUE((short)1, "lowValue"), + HIGH_VALUE((short)2, "highValue"), + NUM_NULLS((short)3, "numNulls"), + NUM_DVS((short)4, "numDVs"), + BIT_VECTORS((short)5, "bitVectors"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOW_VALUE + return LOW_VALUE; + case 2: // HIGH_VALUE + return HIGH_VALUE; + case 3: // NUM_NULLS + return NUM_NULLS; + case 4: // NUM_DVS + return NUM_DVS; + case 5: // BIT_VECTORS + return BIT_VECTORS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __NUMNULLS_ISSET_ID = 0; + private static final int __NUMDVS_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.LOW_VALUE,_Fields.HIGH_VALUE,_Fields.BIT_VECTORS}; + 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); + tmpMap.put(_Fields.LOW_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lowValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Date.class))); + tmpMap.put(_Fields.HIGH_VALUE, new org.apache.thrift.meta_data.FieldMetaData("highValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Date.class))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DateColumnStatsData.class, metaDataMap); + } + + public DateColumnStatsData() { + } + + public DateColumnStatsData( + long numNulls, + long numDVs) + { + this(); + this.numNulls = numNulls; + setNumNullsIsSet(true); + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public DateColumnStatsData(DateColumnStatsData other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetLowValue()) { + this.lowValue = new Date(other.lowValue); + } + if (other.isSetHighValue()) { + this.highValue = new Date(other.highValue); + } + this.numNulls = other.numNulls; + this.numDVs = other.numDVs; + if (other.isSetBitVectors()) { + this.bitVectors = other.bitVectors; + } + } + + public DateColumnStatsData deepCopy() { + return new DateColumnStatsData(this); + } + + @Override + public void clear() { + this.lowValue = null; + this.highValue = null; + setNumNullsIsSet(false); + this.numNulls = 0; + setNumDVsIsSet(false); + this.numDVs = 0; + this.bitVectors = null; + } + + public Date getLowValue() { + return this.lowValue; + } + + public void setLowValue(Date lowValue) { + this.lowValue = lowValue; + } + + public void unsetLowValue() { + this.lowValue = null; + } + + /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ + public boolean isSetLowValue() { + return this.lowValue != null; + } + + public void setLowValueIsSet(boolean value) { + if (!value) { + this.lowValue = null; + } + } + + public Date getHighValue() { + return this.highValue; + } + + public void setHighValue(Date highValue) { + this.highValue = highValue; + } + + public void unsetHighValue() { + this.highValue = null; + } + + /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ + public boolean isSetHighValue() { + return this.highValue != null; + } + + public void setHighValueIsSet(boolean value) { + if (!value) { + this.highValue = null; + } + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); + } + + public long getNumDVs() { + return this.numDVs; + } + + public void setNumDVs(long numDVs) { + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + public void unsetNumDVs() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); + } + + /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ + public boolean isSetNumDVs() { + return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); + } + + public void setNumDVsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); + } + + public String getBitVectors() { + return this.bitVectors; + } + + public void setBitVectors(String bitVectors) { + this.bitVectors = bitVectors; + } + + public void unsetBitVectors() { + this.bitVectors = null; + } + + /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ + public boolean isSetBitVectors() { + return this.bitVectors != null; + } + + public void setBitVectorsIsSet(boolean value) { + if (!value) { + this.bitVectors = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOW_VALUE: + if (value == null) { + unsetLowValue(); + } else { + setLowValue((Date)value); + } + break; + + case HIGH_VALUE: + if (value == null) { + unsetHighValue(); + } else { + setHighValue((Date)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + case NUM_DVS: + if (value == null) { + unsetNumDVs(); + } else { + setNumDVs((Long)value); + } + break; + + case BIT_VECTORS: + if (value == null) { + unsetBitVectors(); + } else { + setBitVectors((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOW_VALUE: + return getLowValue(); + + case HIGH_VALUE: + return getHighValue(); + + case NUM_NULLS: + return getNumNulls(); + + case NUM_DVS: + return getNumDVs(); + + case BIT_VECTORS: + return getBitVectors(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOW_VALUE: + return isSetLowValue(); + case HIGH_VALUE: + return isSetHighValue(); + case NUM_NULLS: + return isSetNumNulls(); + case NUM_DVS: + return isSetNumDVs(); + case BIT_VECTORS: + return isSetBitVectors(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof DateColumnStatsData) + return this.equals((DateColumnStatsData)that); + return false; + } + + public boolean equals(DateColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_lowValue = true && this.isSetLowValue(); + boolean that_present_lowValue = true && that.isSetLowValue(); + if (this_present_lowValue || that_present_lowValue) { + if (!(this_present_lowValue && that_present_lowValue)) + return false; + if (!this.lowValue.equals(that.lowValue)) + return false; + } + + boolean this_present_highValue = true && this.isSetHighValue(); + boolean that_present_highValue = true && that.isSetHighValue(); + if (this_present_highValue || that_present_highValue) { + if (!(this_present_highValue && that_present_highValue)) + return false; + if (!this.highValue.equals(that.highValue)) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + boolean this_present_numDVs = true; + boolean that_present_numDVs = true; + if (this_present_numDVs || that_present_numDVs) { + if (!(this_present_numDVs && that_present_numDVs)) + return false; + if (this.numDVs != that.numDVs) + return false; + } + + boolean this_present_bitVectors = true && this.isSetBitVectors(); + boolean that_present_bitVectors = true && that.isSetBitVectors(); + if (this_present_bitVectors || that_present_bitVectors) { + if (!(this_present_bitVectors && that_present_bitVectors)) + return false; + if (!this.bitVectors.equals(that.bitVectors)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_lowValue = true && (isSetLowValue()); + list.add(present_lowValue); + if (present_lowValue) + list.add(lowValue); + + boolean present_highValue = true && (isSetHighValue()); + list.add(present_highValue); + if (present_highValue) + list.add(highValue); + + boolean present_numNulls = true; + list.add(present_numNulls); + if (present_numNulls) + list.add(numNulls); + + boolean present_numDVs = true; + list.add(present_numDVs); + if (present_numDVs) + list.add(numDVs); + + boolean present_bitVectors = true && (isSetBitVectors()); + list.add(present_bitVectors); + if (present_bitVectors) + list.add(bitVectors); + + return list.hashCode(); + } + + @Override + public int compareTo(DateColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLowValue()).compareTo(other.isSetLowValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLowValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lowValue, other.lowValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHighValue()).compareTo(other.isSetHighValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHighValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.highValue, other.highValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(other.isSetNumDVs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumDVs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, other.numDVs); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBitVectors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("DateColumnStatsData("); + boolean first = true; + + if (isSetLowValue()) { + sb.append("lowValue:"); + if (this.lowValue == null) { + sb.append("null"); + } else { + sb.append(this.lowValue); + } + first = false; + } + if (isSetHighValue()) { + if (!first) sb.append(", "); + sb.append("highValue:"); + if (this.highValue == null) { + sb.append("null"); + } else { + sb.append(this.highValue); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + if (!first) sb.append(", "); + sb.append("numDVs:"); + sb.append(this.numDVs); + first = false; + if (isSetBitVectors()) { + if (!first) sb.append(", "); + sb.append("bitVectors:"); + if (this.bitVectors == null) { + sb.append("null"); + } else { + sb.append(this.bitVectors); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + if (!isSetNumDVs()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (lowValue != null) { + lowValue.validate(); + } + if (highValue != null) { + highValue.validate(); + } + } + + 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 { + // 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 DateColumnStatsDataStandardSchemeFactory implements SchemeFactory { + public DateColumnStatsDataStandardScheme getScheme() { + return new DateColumnStatsDataStandardScheme(); + } + } + + private static class DateColumnStatsDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, DateColumnStatsData 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: // LOW_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.lowValue = new Date(); + struct.lowValue.read(iprot); + struct.setLowValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // HIGH_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.highValue = new Date(); + struct.highValue.read(iprot); + struct.setHighValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_NULLS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NUM_DVS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // BIT_VECTORS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(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, DateColumnStatsData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.lowValue != null) { + if (struct.isSetLowValue()) { + oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); + struct.lowValue.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.highValue != null) { + if (struct.isSetHighValue()) { + oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); + struct.highValue.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(struct.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); + oprot.writeI64(struct.numDVs); + oprot.writeFieldEnd(); + if (struct.bitVectors != null) { + if (struct.isSetBitVectors()) { + oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); + oprot.writeString(struct.bitVectors); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DateColumnStatsDataTupleSchemeFactory implements SchemeFactory { + public DateColumnStatsDataTupleScheme getScheme() { + return new DateColumnStatsDataTupleScheme(); + } + } + + private static class DateColumnStatsDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, DateColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.numNulls); + oprot.writeI64(struct.numDVs); + BitSet optionals = new BitSet(); + if (struct.isSetLowValue()) { + optionals.set(0); + } + if (struct.isSetHighValue()) { + optionals.set(1); + } + if (struct.isSetBitVectors()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetLowValue()) { + struct.lowValue.write(oprot); + } + if (struct.isSetHighValue()) { + struct.highValue.write(oprot); + } + if (struct.isSetBitVectors()) { + oprot.writeString(struct.bitVectors); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, DateColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.lowValue = new Date(); + struct.lowValue.read(iprot); + struct.setLowValueIsSet(true); + } + if (incoming.get(1)) { + struct.highValue = new Date(); + struct.highValue.read(iprot); + struct.setHighValueIsSet(true); + } + if (incoming.get(2)) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Decimal.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Decimal.java new file mode 100644 index 0000000..5b23dba --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Decimal.java @@ -0,0 +1,497 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class Decimal implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Decimal"); + + private static final org.apache.thrift.protocol.TField UNSCALED_FIELD_DESC = new org.apache.thrift.protocol.TField("unscaled", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField SCALE_FIELD_DESC = new org.apache.thrift.protocol.TField("scale", org.apache.thrift.protocol.TType.I16, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new DecimalStandardSchemeFactory()); + schemes.put(TupleScheme.class, new DecimalTupleSchemeFactory()); + } + + private ByteBuffer unscaled; // required + private short scale; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UNSCALED((short)1, "unscaled"), + SCALE((short)3, "scale"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UNSCALED + return UNSCALED; + case 3: // SCALE + return SCALE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SCALE_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.UNSCALED, new org.apache.thrift.meta_data.FieldMetaData("unscaled", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.SCALE, new org.apache.thrift.meta_data.FieldMetaData("scale", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Decimal.class, metaDataMap); + } + + public Decimal() { + } + + public Decimal( + ByteBuffer unscaled, + short scale) + { + this(); + this.unscaled = org.apache.thrift.TBaseHelper.copyBinary(unscaled); + this.scale = scale; + setScaleIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public Decimal(Decimal other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetUnscaled()) { + this.unscaled = org.apache.thrift.TBaseHelper.copyBinary(other.unscaled); + } + this.scale = other.scale; + } + + public Decimal deepCopy() { + return new Decimal(this); + } + + @Override + public void clear() { + this.unscaled = null; + setScaleIsSet(false); + this.scale = 0; + } + + public byte[] getUnscaled() { + setUnscaled(org.apache.thrift.TBaseHelper.rightSize(unscaled)); + return unscaled == null ? null : unscaled.array(); + } + + public ByteBuffer bufferForUnscaled() { + return org.apache.thrift.TBaseHelper.copyBinary(unscaled); + } + + public void setUnscaled(byte[] unscaled) { + this.unscaled = unscaled == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(unscaled, unscaled.length)); + } + + public void setUnscaled(ByteBuffer unscaled) { + this.unscaled = org.apache.thrift.TBaseHelper.copyBinary(unscaled); + } + + public void unsetUnscaled() { + this.unscaled = null; + } + + /** Returns true if field unscaled is set (has been assigned a value) and false otherwise */ + public boolean isSetUnscaled() { + return this.unscaled != null; + } + + public void setUnscaledIsSet(boolean value) { + if (!value) { + this.unscaled = null; + } + } + + public short getScale() { + return this.scale; + } + + public void setScale(short scale) { + this.scale = scale; + setScaleIsSet(true); + } + + public void unsetScale() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCALE_ISSET_ID); + } + + /** Returns true if field scale is set (has been assigned a value) and false otherwise */ + public boolean isSetScale() { + return EncodingUtils.testBit(__isset_bitfield, __SCALE_ISSET_ID); + } + + public void setScaleIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCALE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UNSCALED: + if (value == null) { + unsetUnscaled(); + } else { + setUnscaled((ByteBuffer)value); + } + break; + + case SCALE: + if (value == null) { + unsetScale(); + } else { + setScale((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UNSCALED: + return getUnscaled(); + + case SCALE: + return getScale(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UNSCALED: + return isSetUnscaled(); + case SCALE: + return isSetScale(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Decimal) + return this.equals((Decimal)that); + return false; + } + + public boolean equals(Decimal that) { + if (that == null) + return false; + + boolean this_present_unscaled = true && this.isSetUnscaled(); + boolean that_present_unscaled = true && that.isSetUnscaled(); + if (this_present_unscaled || that_present_unscaled) { + if (!(this_present_unscaled && that_present_unscaled)) + return false; + if (!this.unscaled.equals(that.unscaled)) + return false; + } + + boolean this_present_scale = true; + boolean that_present_scale = true; + if (this_present_scale || that_present_scale) { + if (!(this_present_scale && that_present_scale)) + return false; + if (this.scale != that.scale) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_unscaled = true && (isSetUnscaled()); + list.add(present_unscaled); + if (present_unscaled) + list.add(unscaled); + + boolean present_scale = true; + list.add(present_scale); + if (present_scale) + list.add(scale); + + return list.hashCode(); + } + + @Override + public int compareTo(Decimal other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUnscaled()).compareTo(other.isSetUnscaled()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUnscaled()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unscaled, other.unscaled); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetScale()).compareTo(other.isSetScale()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetScale()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scale, other.scale); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Decimal("); + boolean first = true; + + sb.append("unscaled:"); + if (this.unscaled == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.unscaled, sb); + } + first = false; + if (!first) sb.append(", "); + sb.append("scale:"); + sb.append(this.scale); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetUnscaled()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'unscaled' is unset! Struct:" + toString()); + } + + if (!isSetScale()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'scale' is unset! Struct:" + toString()); + } + + // 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 { + // 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 DecimalStandardSchemeFactory implements SchemeFactory { + public DecimalStandardScheme getScheme() { + return new DecimalStandardScheme(); + } + } + + private static class DecimalStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Decimal 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: // UNSCALED + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.unscaled = iprot.readBinary(); + struct.setUnscaledIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SCALE + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.scale = iprot.readI16(); + struct.setScaleIsSet(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, Decimal struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.unscaled != null) { + oprot.writeFieldBegin(UNSCALED_FIELD_DESC); + oprot.writeBinary(struct.unscaled); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(SCALE_FIELD_DESC); + oprot.writeI16(struct.scale); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DecimalTupleSchemeFactory implements SchemeFactory { + public DecimalTupleScheme getScheme() { + return new DecimalTupleScheme(); + } + } + + private static class DecimalTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Decimal struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.unscaled); + oprot.writeI16(struct.scale); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Decimal struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.unscaled = iprot.readBinary(); + struct.setUnscaledIsSet(true); + struct.scale = iprot.readI16(); + struct.setScaleIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DecimalColumnStatsData.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DecimalColumnStatsData.java new file mode 100644 index 0000000..ec363dc --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DecimalColumnStatsData.java @@ -0,0 +1,814 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class DecimalColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DecimalColumnStatsData"); + + private static final org.apache.thrift.protocol.TField LOW_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("lowValue", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField HIGH_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("highValue", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new DecimalColumnStatsDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new DecimalColumnStatsDataTupleSchemeFactory()); + } + + private Decimal lowValue; // optional + private Decimal highValue; // optional + private long numNulls; // required + private long numDVs; // required + private String bitVectors; // 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 { + LOW_VALUE((short)1, "lowValue"), + HIGH_VALUE((short)2, "highValue"), + NUM_NULLS((short)3, "numNulls"), + NUM_DVS((short)4, "numDVs"), + BIT_VECTORS((short)5, "bitVectors"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOW_VALUE + return LOW_VALUE; + case 2: // HIGH_VALUE + return HIGH_VALUE; + case 3: // NUM_NULLS + return NUM_NULLS; + case 4: // NUM_DVS + return NUM_DVS; + case 5: // BIT_VECTORS + return BIT_VECTORS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __NUMNULLS_ISSET_ID = 0; + private static final int __NUMDVS_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.LOW_VALUE,_Fields.HIGH_VALUE,_Fields.BIT_VECTORS}; + 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); + tmpMap.put(_Fields.LOW_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lowValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Decimal.class))); + tmpMap.put(_Fields.HIGH_VALUE, new org.apache.thrift.meta_data.FieldMetaData("highValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Decimal.class))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DecimalColumnStatsData.class, metaDataMap); + } + + public DecimalColumnStatsData() { + } + + public DecimalColumnStatsData( + long numNulls, + long numDVs) + { + this(); + this.numNulls = numNulls; + setNumNullsIsSet(true); + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public DecimalColumnStatsData(DecimalColumnStatsData other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetLowValue()) { + this.lowValue = new Decimal(other.lowValue); + } + if (other.isSetHighValue()) { + this.highValue = new Decimal(other.highValue); + } + this.numNulls = other.numNulls; + this.numDVs = other.numDVs; + if (other.isSetBitVectors()) { + this.bitVectors = other.bitVectors; + } + } + + public DecimalColumnStatsData deepCopy() { + return new DecimalColumnStatsData(this); + } + + @Override + public void clear() { + this.lowValue = null; + this.highValue = null; + setNumNullsIsSet(false); + this.numNulls = 0; + setNumDVsIsSet(false); + this.numDVs = 0; + this.bitVectors = null; + } + + public Decimal getLowValue() { + return this.lowValue; + } + + public void setLowValue(Decimal lowValue) { + this.lowValue = lowValue; + } + + public void unsetLowValue() { + this.lowValue = null; + } + + /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ + public boolean isSetLowValue() { + return this.lowValue != null; + } + + public void setLowValueIsSet(boolean value) { + if (!value) { + this.lowValue = null; + } + } + + public Decimal getHighValue() { + return this.highValue; + } + + public void setHighValue(Decimal highValue) { + this.highValue = highValue; + } + + public void unsetHighValue() { + this.highValue = null; + } + + /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ + public boolean isSetHighValue() { + return this.highValue != null; + } + + public void setHighValueIsSet(boolean value) { + if (!value) { + this.highValue = null; + } + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); + } + + public long getNumDVs() { + return this.numDVs; + } + + public void setNumDVs(long numDVs) { + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + public void unsetNumDVs() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); + } + + /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ + public boolean isSetNumDVs() { + return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); + } + + public void setNumDVsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); + } + + public String getBitVectors() { + return this.bitVectors; + } + + public void setBitVectors(String bitVectors) { + this.bitVectors = bitVectors; + } + + public void unsetBitVectors() { + this.bitVectors = null; + } + + /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ + public boolean isSetBitVectors() { + return this.bitVectors != null; + } + + public void setBitVectorsIsSet(boolean value) { + if (!value) { + this.bitVectors = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOW_VALUE: + if (value == null) { + unsetLowValue(); + } else { + setLowValue((Decimal)value); + } + break; + + case HIGH_VALUE: + if (value == null) { + unsetHighValue(); + } else { + setHighValue((Decimal)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + case NUM_DVS: + if (value == null) { + unsetNumDVs(); + } else { + setNumDVs((Long)value); + } + break; + + case BIT_VECTORS: + if (value == null) { + unsetBitVectors(); + } else { + setBitVectors((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOW_VALUE: + return getLowValue(); + + case HIGH_VALUE: + return getHighValue(); + + case NUM_NULLS: + return getNumNulls(); + + case NUM_DVS: + return getNumDVs(); + + case BIT_VECTORS: + return getBitVectors(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOW_VALUE: + return isSetLowValue(); + case HIGH_VALUE: + return isSetHighValue(); + case NUM_NULLS: + return isSetNumNulls(); + case NUM_DVS: + return isSetNumDVs(); + case BIT_VECTORS: + return isSetBitVectors(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof DecimalColumnStatsData) + return this.equals((DecimalColumnStatsData)that); + return false; + } + + public boolean equals(DecimalColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_lowValue = true && this.isSetLowValue(); + boolean that_present_lowValue = true && that.isSetLowValue(); + if (this_present_lowValue || that_present_lowValue) { + if (!(this_present_lowValue && that_present_lowValue)) + return false; + if (!this.lowValue.equals(that.lowValue)) + return false; + } + + boolean this_present_highValue = true && this.isSetHighValue(); + boolean that_present_highValue = true && that.isSetHighValue(); + if (this_present_highValue || that_present_highValue) { + if (!(this_present_highValue && that_present_highValue)) + return false; + if (!this.highValue.equals(that.highValue)) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + boolean this_present_numDVs = true; + boolean that_present_numDVs = true; + if (this_present_numDVs || that_present_numDVs) { + if (!(this_present_numDVs && that_present_numDVs)) + return false; + if (this.numDVs != that.numDVs) + return false; + } + + boolean this_present_bitVectors = true && this.isSetBitVectors(); + boolean that_present_bitVectors = true && that.isSetBitVectors(); + if (this_present_bitVectors || that_present_bitVectors) { + if (!(this_present_bitVectors && that_present_bitVectors)) + return false; + if (!this.bitVectors.equals(that.bitVectors)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_lowValue = true && (isSetLowValue()); + list.add(present_lowValue); + if (present_lowValue) + list.add(lowValue); + + boolean present_highValue = true && (isSetHighValue()); + list.add(present_highValue); + if (present_highValue) + list.add(highValue); + + boolean present_numNulls = true; + list.add(present_numNulls); + if (present_numNulls) + list.add(numNulls); + + boolean present_numDVs = true; + list.add(present_numDVs); + if (present_numDVs) + list.add(numDVs); + + boolean present_bitVectors = true && (isSetBitVectors()); + list.add(present_bitVectors); + if (present_bitVectors) + list.add(bitVectors); + + return list.hashCode(); + } + + @Override + public int compareTo(DecimalColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLowValue()).compareTo(other.isSetLowValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLowValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lowValue, other.lowValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHighValue()).compareTo(other.isSetHighValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHighValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.highValue, other.highValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(other.isSetNumDVs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumDVs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, other.numDVs); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBitVectors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("DecimalColumnStatsData("); + boolean first = true; + + if (isSetLowValue()) { + sb.append("lowValue:"); + if (this.lowValue == null) { + sb.append("null"); + } else { + sb.append(this.lowValue); + } + first = false; + } + if (isSetHighValue()) { + if (!first) sb.append(", "); + sb.append("highValue:"); + if (this.highValue == null) { + sb.append("null"); + } else { + sb.append(this.highValue); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + if (!first) sb.append(", "); + sb.append("numDVs:"); + sb.append(this.numDVs); + first = false; + if (isSetBitVectors()) { + if (!first) sb.append(", "); + sb.append("bitVectors:"); + if (this.bitVectors == null) { + sb.append("null"); + } else { + sb.append(this.bitVectors); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + if (!isSetNumDVs()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (lowValue != null) { + lowValue.validate(); + } + if (highValue != null) { + highValue.validate(); + } + } + + 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 { + // 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 DecimalColumnStatsDataStandardSchemeFactory implements SchemeFactory { + public DecimalColumnStatsDataStandardScheme getScheme() { + return new DecimalColumnStatsDataStandardScheme(); + } + } + + private static class DecimalColumnStatsDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, DecimalColumnStatsData 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: // LOW_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.lowValue = new Decimal(); + struct.lowValue.read(iprot); + struct.setLowValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // HIGH_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.highValue = new Decimal(); + struct.highValue.read(iprot); + struct.setHighValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_NULLS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NUM_DVS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // BIT_VECTORS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(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, DecimalColumnStatsData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.lowValue != null) { + if (struct.isSetLowValue()) { + oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); + struct.lowValue.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.highValue != null) { + if (struct.isSetHighValue()) { + oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); + struct.highValue.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(struct.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); + oprot.writeI64(struct.numDVs); + oprot.writeFieldEnd(); + if (struct.bitVectors != null) { + if (struct.isSetBitVectors()) { + oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); + oprot.writeString(struct.bitVectors); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DecimalColumnStatsDataTupleSchemeFactory implements SchemeFactory { + public DecimalColumnStatsDataTupleScheme getScheme() { + return new DecimalColumnStatsDataTupleScheme(); + } + } + + private static class DecimalColumnStatsDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, DecimalColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.numNulls); + oprot.writeI64(struct.numDVs); + BitSet optionals = new BitSet(); + if (struct.isSetLowValue()) { + optionals.set(0); + } + if (struct.isSetHighValue()) { + optionals.set(1); + } + if (struct.isSetBitVectors()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetLowValue()) { + struct.lowValue.write(oprot); + } + if (struct.isSetHighValue()) { + struct.highValue.write(oprot); + } + if (struct.isSetBitVectors()) { + oprot.writeString(struct.bitVectors); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, DecimalColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.lowValue = new Decimal(); + struct.lowValue.read(iprot); + struct.setLowValueIsSet(true); + } + if (incoming.get(1)) { + struct.highValue = new Decimal(); + struct.highValue.read(iprot); + struct.setHighValueIsSet(true); + } + if (incoming.get(2)) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java new file mode 100644 index 0000000..e3340e4 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java @@ -0,0 +1,790 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class DoubleColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DoubleColumnStatsData"); + + private static final org.apache.thrift.protocol.TField LOW_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("lowValue", org.apache.thrift.protocol.TType.DOUBLE, (short)1); + private static final org.apache.thrift.protocol.TField HIGH_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("highValue", org.apache.thrift.protocol.TType.DOUBLE, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new DoubleColumnStatsDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new DoubleColumnStatsDataTupleSchemeFactory()); + } + + private double lowValue; // optional + private double highValue; // optional + private long numNulls; // required + private long numDVs; // required + private String bitVectors; // 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 { + LOW_VALUE((short)1, "lowValue"), + HIGH_VALUE((short)2, "highValue"), + NUM_NULLS((short)3, "numNulls"), + NUM_DVS((short)4, "numDVs"), + BIT_VECTORS((short)5, "bitVectors"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOW_VALUE + return LOW_VALUE; + case 2: // HIGH_VALUE + return HIGH_VALUE; + case 3: // NUM_NULLS + return NUM_NULLS; + case 4: // NUM_DVS + return NUM_DVS; + case 5: // BIT_VECTORS + return BIT_VECTORS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LOWVALUE_ISSET_ID = 0; + private static final int __HIGHVALUE_ISSET_ID = 1; + private static final int __NUMNULLS_ISSET_ID = 2; + private static final int __NUMDVS_ISSET_ID = 3; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.LOW_VALUE,_Fields.HIGH_VALUE,_Fields.BIT_VECTORS}; + 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); + tmpMap.put(_Fields.LOW_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lowValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.HIGH_VALUE, new org.apache.thrift.meta_data.FieldMetaData("highValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DoubleColumnStatsData.class, metaDataMap); + } + + public DoubleColumnStatsData() { + } + + public DoubleColumnStatsData( + long numNulls, + long numDVs) + { + this(); + this.numNulls = numNulls; + setNumNullsIsSet(true); + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public DoubleColumnStatsData(DoubleColumnStatsData other) { + __isset_bitfield = other.__isset_bitfield; + this.lowValue = other.lowValue; + this.highValue = other.highValue; + this.numNulls = other.numNulls; + this.numDVs = other.numDVs; + if (other.isSetBitVectors()) { + this.bitVectors = other.bitVectors; + } + } + + public DoubleColumnStatsData deepCopy() { + return new DoubleColumnStatsData(this); + } + + @Override + public void clear() { + setLowValueIsSet(false); + this.lowValue = 0.0; + setHighValueIsSet(false); + this.highValue = 0.0; + setNumNullsIsSet(false); + this.numNulls = 0; + setNumDVsIsSet(false); + this.numDVs = 0; + this.bitVectors = null; + } + + public double getLowValue() { + return this.lowValue; + } + + public void setLowValue(double lowValue) { + this.lowValue = lowValue; + setLowValueIsSet(true); + } + + public void unsetLowValue() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOWVALUE_ISSET_ID); + } + + /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ + public boolean isSetLowValue() { + return EncodingUtils.testBit(__isset_bitfield, __LOWVALUE_ISSET_ID); + } + + public void setLowValueIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOWVALUE_ISSET_ID, value); + } + + public double getHighValue() { + return this.highValue; + } + + public void setHighValue(double highValue) { + this.highValue = highValue; + setHighValueIsSet(true); + } + + public void unsetHighValue() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HIGHVALUE_ISSET_ID); + } + + /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ + public boolean isSetHighValue() { + return EncodingUtils.testBit(__isset_bitfield, __HIGHVALUE_ISSET_ID); + } + + public void setHighValueIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HIGHVALUE_ISSET_ID, value); + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); + } + + public long getNumDVs() { + return this.numDVs; + } + + public void setNumDVs(long numDVs) { + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + public void unsetNumDVs() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); + } + + /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ + public boolean isSetNumDVs() { + return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); + } + + public void setNumDVsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); + } + + public String getBitVectors() { + return this.bitVectors; + } + + public void setBitVectors(String bitVectors) { + this.bitVectors = bitVectors; + } + + public void unsetBitVectors() { + this.bitVectors = null; + } + + /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ + public boolean isSetBitVectors() { + return this.bitVectors != null; + } + + public void setBitVectorsIsSet(boolean value) { + if (!value) { + this.bitVectors = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOW_VALUE: + if (value == null) { + unsetLowValue(); + } else { + setLowValue((Double)value); + } + break; + + case HIGH_VALUE: + if (value == null) { + unsetHighValue(); + } else { + setHighValue((Double)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + case NUM_DVS: + if (value == null) { + unsetNumDVs(); + } else { + setNumDVs((Long)value); + } + break; + + case BIT_VECTORS: + if (value == null) { + unsetBitVectors(); + } else { + setBitVectors((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOW_VALUE: + return getLowValue(); + + case HIGH_VALUE: + return getHighValue(); + + case NUM_NULLS: + return getNumNulls(); + + case NUM_DVS: + return getNumDVs(); + + case BIT_VECTORS: + return getBitVectors(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOW_VALUE: + return isSetLowValue(); + case HIGH_VALUE: + return isSetHighValue(); + case NUM_NULLS: + return isSetNumNulls(); + case NUM_DVS: + return isSetNumDVs(); + case BIT_VECTORS: + return isSetBitVectors(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof DoubleColumnStatsData) + return this.equals((DoubleColumnStatsData)that); + return false; + } + + public boolean equals(DoubleColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_lowValue = true && this.isSetLowValue(); + boolean that_present_lowValue = true && that.isSetLowValue(); + if (this_present_lowValue || that_present_lowValue) { + if (!(this_present_lowValue && that_present_lowValue)) + return false; + if (this.lowValue != that.lowValue) + return false; + } + + boolean this_present_highValue = true && this.isSetHighValue(); + boolean that_present_highValue = true && that.isSetHighValue(); + if (this_present_highValue || that_present_highValue) { + if (!(this_present_highValue && that_present_highValue)) + return false; + if (this.highValue != that.highValue) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + boolean this_present_numDVs = true; + boolean that_present_numDVs = true; + if (this_present_numDVs || that_present_numDVs) { + if (!(this_present_numDVs && that_present_numDVs)) + return false; + if (this.numDVs != that.numDVs) + return false; + } + + boolean this_present_bitVectors = true && this.isSetBitVectors(); + boolean that_present_bitVectors = true && that.isSetBitVectors(); + if (this_present_bitVectors || that_present_bitVectors) { + if (!(this_present_bitVectors && that_present_bitVectors)) + return false; + if (!this.bitVectors.equals(that.bitVectors)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_lowValue = true && (isSetLowValue()); + list.add(present_lowValue); + if (present_lowValue) + list.add(lowValue); + + boolean present_highValue = true && (isSetHighValue()); + list.add(present_highValue); + if (present_highValue) + list.add(highValue); + + boolean present_numNulls = true; + list.add(present_numNulls); + if (present_numNulls) + list.add(numNulls); + + boolean present_numDVs = true; + list.add(present_numDVs); + if (present_numDVs) + list.add(numDVs); + + boolean present_bitVectors = true && (isSetBitVectors()); + list.add(present_bitVectors); + if (present_bitVectors) + list.add(bitVectors); + + return list.hashCode(); + } + + @Override + public int compareTo(DoubleColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLowValue()).compareTo(other.isSetLowValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLowValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lowValue, other.lowValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHighValue()).compareTo(other.isSetHighValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHighValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.highValue, other.highValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(other.isSetNumDVs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumDVs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, other.numDVs); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBitVectors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("DoubleColumnStatsData("); + boolean first = true; + + if (isSetLowValue()) { + sb.append("lowValue:"); + sb.append(this.lowValue); + first = false; + } + if (isSetHighValue()) { + if (!first) sb.append(", "); + sb.append("highValue:"); + sb.append(this.highValue); + first = false; + } + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + if (!first) sb.append(", "); + sb.append("numDVs:"); + sb.append(this.numDVs); + first = false; + if (isSetBitVectors()) { + if (!first) sb.append(", "); + sb.append("bitVectors:"); + if (this.bitVectors == null) { + sb.append("null"); + } else { + sb.append(this.bitVectors); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + if (!isSetNumDVs()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); + } + + // 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 { + // 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 DoubleColumnStatsDataStandardSchemeFactory implements SchemeFactory { + public DoubleColumnStatsDataStandardScheme getScheme() { + return new DoubleColumnStatsDataStandardScheme(); + } + } + + private static class DoubleColumnStatsDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, DoubleColumnStatsData 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: // LOW_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.lowValue = iprot.readDouble(); + struct.setLowValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // HIGH_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.highValue = iprot.readDouble(); + struct.setHighValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_NULLS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NUM_DVS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // BIT_VECTORS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(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, DoubleColumnStatsData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetLowValue()) { + oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); + oprot.writeDouble(struct.lowValue); + oprot.writeFieldEnd(); + } + if (struct.isSetHighValue()) { + oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); + oprot.writeDouble(struct.highValue); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(struct.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); + oprot.writeI64(struct.numDVs); + oprot.writeFieldEnd(); + if (struct.bitVectors != null) { + if (struct.isSetBitVectors()) { + oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); + oprot.writeString(struct.bitVectors); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DoubleColumnStatsDataTupleSchemeFactory implements SchemeFactory { + public DoubleColumnStatsDataTupleScheme getScheme() { + return new DoubleColumnStatsDataTupleScheme(); + } + } + + private static class DoubleColumnStatsDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, DoubleColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.numNulls); + oprot.writeI64(struct.numDVs); + BitSet optionals = new BitSet(); + if (struct.isSetLowValue()) { + optionals.set(0); + } + if (struct.isSetHighValue()) { + optionals.set(1); + } + if (struct.isSetBitVectors()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetLowValue()) { + oprot.writeDouble(struct.lowValue); + } + if (struct.isSetHighValue()) { + oprot.writeDouble(struct.highValue); + } + if (struct.isSetBitVectors()) { + oprot.writeString(struct.bitVectors); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, DoubleColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.lowValue = iprot.readDouble(); + struct.setLowValueIsSet(true); + } + if (incoming.get(1)) { + struct.highValue = iprot.readDouble(); + struct.setHighValueIsSet(true); + } + if (incoming.get(2)) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropConstraintRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropConstraintRequest.java new file mode 100644 index 0000000..4519dac --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropConstraintRequest.java @@ -0,0 +1,591 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class DropConstraintRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DropConstraintRequest"); + + 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 TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField CONSTRAINTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("constraintname", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new DropConstraintRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new DropConstraintRequestTupleSchemeFactory()); + } + + private String dbname; // required + private String tablename; // required + private String constraintname; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DBNAME((short)1, "dbname"), + TABLENAME((short)2, "tablename"), + CONSTRAINTNAME((short)3, "constraintname"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // TABLENAME + return TABLENAME; + case 3: // CONSTRAINTNAME + return CONSTRAINTNAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CONSTRAINTNAME, new org.apache.thrift.meta_data.FieldMetaData("constraintname", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DropConstraintRequest.class, metaDataMap); + } + + public DropConstraintRequest() { + } + + public DropConstraintRequest( + String dbname, + String tablename, + String constraintname) + { + this(); + this.dbname = dbname; + this.tablename = tablename; + this.constraintname = constraintname; + } + + /** + * Performs a deep copy on other. + */ + public DropConstraintRequest(DropConstraintRequest other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTablename()) { + this.tablename = other.tablename; + } + if (other.isSetConstraintname()) { + this.constraintname = other.constraintname; + } + } + + public DropConstraintRequest deepCopy() { + return new DropConstraintRequest(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tablename = null; + this.constraintname = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTablename() { + return this.tablename; + } + + public void setTablename(String tablename) { + this.tablename = tablename; + } + + public void unsetTablename() { + this.tablename = null; + } + + /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ + public boolean isSetTablename() { + return this.tablename != null; + } + + public void setTablenameIsSet(boolean value) { + if (!value) { + this.tablename = null; + } + } + + public String getConstraintname() { + return this.constraintname; + } + + public void setConstraintname(String constraintname) { + this.constraintname = constraintname; + } + + public void unsetConstraintname() { + this.constraintname = null; + } + + /** Returns true if field constraintname is set (has been assigned a value) and false otherwise */ + public boolean isSetConstraintname() { + return this.constraintname != null; + } + + public void setConstraintnameIsSet(boolean value) { + if (!value) { + this.constraintname = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TABLENAME: + if (value == null) { + unsetTablename(); + } else { + setTablename((String)value); + } + break; + + case CONSTRAINTNAME: + if (value == null) { + unsetConstraintname(); + } else { + setConstraintname((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TABLENAME: + return getTablename(); + + case CONSTRAINTNAME: + return getConstraintname(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TABLENAME: + return isSetTablename(); + case CONSTRAINTNAME: + return isSetConstraintname(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof DropConstraintRequest) + return this.equals((DropConstraintRequest)that); + return false; + } + + public boolean equals(DropConstraintRequest that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tablename = true && this.isSetTablename(); + boolean that_present_tablename = true && that.isSetTablename(); + if (this_present_tablename || that_present_tablename) { + if (!(this_present_tablename && that_present_tablename)) + return false; + if (!this.tablename.equals(that.tablename)) + return false; + } + + boolean this_present_constraintname = true && this.isSetConstraintname(); + boolean that_present_constraintname = true && that.isSetConstraintname(); + if (this_present_constraintname || that_present_constraintname) { + if (!(this_present_constraintname && that_present_constraintname)) + return false; + if (!this.constraintname.equals(that.constraintname)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tablename = true && (isSetTablename()); + list.add(present_tablename); + if (present_tablename) + list.add(tablename); + + boolean present_constraintname = true && (isSetConstraintname()); + list.add(present_constraintname); + if (present_constraintname) + list.add(constraintname); + + return list.hashCode(); + } + + @Override + public int compareTo(DropConstraintRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTablename()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetConstraintname()).compareTo(other.isSetConstraintname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetConstraintname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.constraintname, other.constraintname); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("DropConstraintRequest("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tablename:"); + if (this.tablename == null) { + sb.append("null"); + } else { + sb.append(this.tablename); + } + first = false; + if (!first) sb.append(", "); + sb.append("constraintname:"); + if (this.constraintname == null) { + sb.append("null"); + } else { + sb.append(this.constraintname); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbname()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); + } + + if (!isSetTablename()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString()); + } + + if (!isSetConstraintname()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'constraintname' is unset! Struct:" + toString()); + } + + // 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 DropConstraintRequestStandardSchemeFactory implements SchemeFactory { + public DropConstraintRequestStandardScheme getScheme() { + return new DropConstraintRequestStandardScheme(); + } + } + + private static class DropConstraintRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, DropConstraintRequest 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: // TABLENAME + 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 3: // CONSTRAINTNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.constraintname = iprot.readString(); + struct.setConstraintnameIsSet(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, DropConstraintRequest 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.tablename != null) { + oprot.writeFieldBegin(TABLENAME_FIELD_DESC); + oprot.writeString(struct.tablename); + oprot.writeFieldEnd(); + } + if (struct.constraintname != null) { + oprot.writeFieldBegin(CONSTRAINTNAME_FIELD_DESC); + oprot.writeString(struct.constraintname); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DropConstraintRequestTupleSchemeFactory implements SchemeFactory { + public DropConstraintRequestTupleScheme getScheme() { + return new DropConstraintRequestTupleScheme(); + } + } + + private static class DropConstraintRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, DropConstraintRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbname); + oprot.writeString(struct.tablename); + oprot.writeString(struct.constraintname); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, DropConstraintRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + struct.tablename = iprot.readString(); + struct.setTablenameIsSet(true); + struct.constraintname = iprot.readString(); + struct.setConstraintnameIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsExpr.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsExpr.java new file mode 100644 index 0000000..ac97aa3 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsExpr.java @@ -0,0 +1,505 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class DropPartitionsExpr implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DropPartitionsExpr"); + + private static final org.apache.thrift.protocol.TField EXPR_FIELD_DESC = new org.apache.thrift.protocol.TField("expr", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PART_ARCHIVE_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("partArchiveLevel", org.apache.thrift.protocol.TType.I32, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new DropPartitionsExprStandardSchemeFactory()); + schemes.put(TupleScheme.class, new DropPartitionsExprTupleSchemeFactory()); + } + + private ByteBuffer expr; // required + private int partArchiveLevel; // 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 { + EXPR((short)1, "expr"), + PART_ARCHIVE_LEVEL((short)2, "partArchiveLevel"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // EXPR + return EXPR; + case 2: // PART_ARCHIVE_LEVEL + return PART_ARCHIVE_LEVEL; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __PARTARCHIVELEVEL_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.PART_ARCHIVE_LEVEL}; + 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); + tmpMap.put(_Fields.EXPR, new org.apache.thrift.meta_data.FieldMetaData("expr", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.PART_ARCHIVE_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("partArchiveLevel", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DropPartitionsExpr.class, metaDataMap); + } + + public DropPartitionsExpr() { + } + + public DropPartitionsExpr( + ByteBuffer expr) + { + this(); + this.expr = org.apache.thrift.TBaseHelper.copyBinary(expr); + } + + /** + * Performs a deep copy on other. + */ + public DropPartitionsExpr(DropPartitionsExpr other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetExpr()) { + this.expr = org.apache.thrift.TBaseHelper.copyBinary(other.expr); + } + this.partArchiveLevel = other.partArchiveLevel; + } + + public DropPartitionsExpr deepCopy() { + return new DropPartitionsExpr(this); + } + + @Override + public void clear() { + this.expr = null; + setPartArchiveLevelIsSet(false); + this.partArchiveLevel = 0; + } + + public byte[] getExpr() { + setExpr(org.apache.thrift.TBaseHelper.rightSize(expr)); + return expr == null ? null : expr.array(); + } + + public ByteBuffer bufferForExpr() { + return org.apache.thrift.TBaseHelper.copyBinary(expr); + } + + public void setExpr(byte[] expr) { + this.expr = expr == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(expr, expr.length)); + } + + public void setExpr(ByteBuffer expr) { + this.expr = org.apache.thrift.TBaseHelper.copyBinary(expr); + } + + public void unsetExpr() { + this.expr = null; + } + + /** Returns true if field expr is set (has been assigned a value) and false otherwise */ + public boolean isSetExpr() { + return this.expr != null; + } + + public void setExprIsSet(boolean value) { + if (!value) { + this.expr = null; + } + } + + public int getPartArchiveLevel() { + return this.partArchiveLevel; + } + + public void setPartArchiveLevel(int partArchiveLevel) { + this.partArchiveLevel = partArchiveLevel; + setPartArchiveLevelIsSet(true); + } + + public void unsetPartArchiveLevel() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARTARCHIVELEVEL_ISSET_ID); + } + + /** Returns true if field partArchiveLevel is set (has been assigned a value) and false otherwise */ + public boolean isSetPartArchiveLevel() { + return EncodingUtils.testBit(__isset_bitfield, __PARTARCHIVELEVEL_ISSET_ID); + } + + public void setPartArchiveLevelIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARTARCHIVELEVEL_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case EXPR: + if (value == null) { + unsetExpr(); + } else { + setExpr((ByteBuffer)value); + } + break; + + case PART_ARCHIVE_LEVEL: + if (value == null) { + unsetPartArchiveLevel(); + } else { + setPartArchiveLevel((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case EXPR: + return getExpr(); + + case PART_ARCHIVE_LEVEL: + return getPartArchiveLevel(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case EXPR: + return isSetExpr(); + case PART_ARCHIVE_LEVEL: + return isSetPartArchiveLevel(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof DropPartitionsExpr) + return this.equals((DropPartitionsExpr)that); + return false; + } + + public boolean equals(DropPartitionsExpr that) { + if (that == null) + return false; + + boolean this_present_expr = true && this.isSetExpr(); + boolean that_present_expr = true && that.isSetExpr(); + if (this_present_expr || that_present_expr) { + if (!(this_present_expr && that_present_expr)) + return false; + if (!this.expr.equals(that.expr)) + return false; + } + + boolean this_present_partArchiveLevel = true && this.isSetPartArchiveLevel(); + boolean that_present_partArchiveLevel = true && that.isSetPartArchiveLevel(); + if (this_present_partArchiveLevel || that_present_partArchiveLevel) { + if (!(this_present_partArchiveLevel && that_present_partArchiveLevel)) + return false; + if (this.partArchiveLevel != that.partArchiveLevel) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_expr = true && (isSetExpr()); + list.add(present_expr); + if (present_expr) + list.add(expr); + + boolean present_partArchiveLevel = true && (isSetPartArchiveLevel()); + list.add(present_partArchiveLevel); + if (present_partArchiveLevel) + list.add(partArchiveLevel); + + return list.hashCode(); + } + + @Override + public int compareTo(DropPartitionsExpr other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetExpr()).compareTo(other.isSetExpr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExpr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expr, other.expr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartArchiveLevel()).compareTo(other.isSetPartArchiveLevel()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartArchiveLevel()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partArchiveLevel, other.partArchiveLevel); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("DropPartitionsExpr("); + boolean first = true; + + sb.append("expr:"); + if (this.expr == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.expr, sb); + } + first = false; + if (isSetPartArchiveLevel()) { + if (!first) sb.append(", "); + sb.append("partArchiveLevel:"); + sb.append(this.partArchiveLevel); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetExpr()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'expr' is unset! Struct:" + toString()); + } + + // 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 { + // 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 DropPartitionsExprStandardSchemeFactory implements SchemeFactory { + public DropPartitionsExprStandardScheme getScheme() { + return new DropPartitionsExprStandardScheme(); + } + } + + private static class DropPartitionsExprStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, DropPartitionsExpr 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: // EXPR + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.expr = iprot.readBinary(); + struct.setExprIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PART_ARCHIVE_LEVEL + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.partArchiveLevel = iprot.readI32(); + struct.setPartArchiveLevelIsSet(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, DropPartitionsExpr struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.expr != null) { + oprot.writeFieldBegin(EXPR_FIELD_DESC); + oprot.writeBinary(struct.expr); + oprot.writeFieldEnd(); + } + if (struct.isSetPartArchiveLevel()) { + oprot.writeFieldBegin(PART_ARCHIVE_LEVEL_FIELD_DESC); + oprot.writeI32(struct.partArchiveLevel); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DropPartitionsExprTupleSchemeFactory implements SchemeFactory { + public DropPartitionsExprTupleScheme getScheme() { + return new DropPartitionsExprTupleScheme(); + } + } + + private static class DropPartitionsExprTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, DropPartitionsExpr struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBinary(struct.expr); + BitSet optionals = new BitSet(); + if (struct.isSetPartArchiveLevel()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPartArchiveLevel()) { + oprot.writeI32(struct.partArchiveLevel); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, DropPartitionsExpr struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.expr = iprot.readBinary(); + struct.setExprIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.partArchiveLevel = iprot.readI32(); + struct.setPartArchiveLevelIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsRequest.java new file mode 100644 index 0000000..2dbde0c --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsRequest.java @@ -0,0 +1,1112 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class DropPartitionsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DropPartitionsRequest"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("parts", org.apache.thrift.protocol.TType.STRUCT, (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 org.apache.thrift.protocol.TField IF_EXISTS_FIELD_DESC = new org.apache.thrift.protocol.TField("ifExists", org.apache.thrift.protocol.TType.BOOL, (short)5); + private static final org.apache.thrift.protocol.TField IGNORE_PROTECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("ignoreProtection", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environmentContext", org.apache.thrift.protocol.TType.STRUCT, (short)7); + private static final org.apache.thrift.protocol.TField NEED_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("needResult", org.apache.thrift.protocol.TType.BOOL, (short)8); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new DropPartitionsRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new DropPartitionsRequestTupleSchemeFactory()); + } + + private String dbName; // required + private String tblName; // required + private RequestPartsSpec parts; // required + private boolean deleteData; // optional + private boolean ifExists; // optional + private boolean ignoreProtection; // optional + private EnvironmentContext environmentContext; // optional + private boolean needResult; // 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 { + DB_NAME((short)1, "dbName"), + TBL_NAME((short)2, "tblName"), + PARTS((short)3, "parts"), + DELETE_DATA((short)4, "deleteData"), + IF_EXISTS((short)5, "ifExists"), + IGNORE_PROTECTION((short)6, "ignoreProtection"), + ENVIRONMENT_CONTEXT((short)7, "environmentContext"), + NEED_RESULT((short)8, "needResult"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PARTS + return PARTS; + case 4: // DELETE_DATA + return DELETE_DATA; + case 5: // IF_EXISTS + return IF_EXISTS; + case 6: // IGNORE_PROTECTION + return IGNORE_PROTECTION; + case 7: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + case 8: // NEED_RESULT + return NEED_RESULT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + private static final int __IFEXISTS_ISSET_ID = 1; + private static final int __IGNOREPROTECTION_ISSET_ID = 2; + private static final int __NEEDRESULT_ISSET_ID = 3; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.DELETE_DATA,_Fields.IF_EXISTS,_Fields.IGNORE_PROTECTION,_Fields.ENVIRONMENT_CONTEXT,_Fields.NEED_RESULT}; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARTS, new org.apache.thrift.meta_data.FieldMetaData("parts", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RequestPartsSpec.class))); + tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IF_EXISTS, new org.apache.thrift.meta_data.FieldMetaData("ifExists", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IGNORE_PROTECTION, new org.apache.thrift.meta_data.FieldMetaData("ignoreProtection", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environmentContext", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + tmpMap.put(_Fields.NEED_RESULT, new org.apache.thrift.meta_data.FieldMetaData("needResult", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DropPartitionsRequest.class, metaDataMap); + } + + public DropPartitionsRequest() { + this.ifExists = true; + + this.needResult = true; + + } + + public DropPartitionsRequest( + String dbName, + String tblName, + RequestPartsSpec parts) + { + this(); + this.dbName = dbName; + this.tblName = tblName; + this.parts = parts; + } + + /** + * Performs a deep copy on other. + */ + public DropPartitionsRequest(DropPartitionsRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTblName()) { + this.tblName = other.tblName; + } + if (other.isSetParts()) { + this.parts = new RequestPartsSpec(other.parts); + } + this.deleteData = other.deleteData; + this.ifExists = other.ifExists; + this.ignoreProtection = other.ignoreProtection; + if (other.isSetEnvironmentContext()) { + this.environmentContext = new EnvironmentContext(other.environmentContext); + } + this.needResult = other.needResult; + } + + public DropPartitionsRequest deepCopy() { + return new DropPartitionsRequest(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tblName = null; + this.parts = null; + setDeleteDataIsSet(false); + this.deleteData = false; + this.ifExists = true; + + setIgnoreProtectionIsSet(false); + this.ignoreProtection = false; + this.environmentContext = null; + this.needResult = true; + + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTblName() { + return this.tblName; + } + + public void setTblName(String tblName) { + this.tblName = tblName; + } + + public void unsetTblName() { + this.tblName = null; + } + + /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ + public boolean isSetTblName() { + return this.tblName != null; + } + + public void setTblNameIsSet(boolean value) { + if (!value) { + this.tblName = null; + } + } + + public RequestPartsSpec getParts() { + return this.parts; + } + + public void setParts(RequestPartsSpec parts) { + this.parts = parts; + } + + public void unsetParts() { + this.parts = null; + } + + /** Returns true if field parts is set (has been assigned a value) and false otherwise */ + public boolean isSetParts() { + return this.parts != null; + } + + public void setPartsIsSet(boolean value) { + if (!value) { + this.parts = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); + } + + public boolean isIfExists() { + return this.ifExists; + } + + public void setIfExists(boolean ifExists) { + this.ifExists = ifExists; + setIfExistsIsSet(true); + } + + public void unsetIfExists() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IFEXISTS_ISSET_ID); + } + + /** Returns true if field ifExists is set (has been assigned a value) and false otherwise */ + public boolean isSetIfExists() { + return EncodingUtils.testBit(__isset_bitfield, __IFEXISTS_ISSET_ID); + } + + public void setIfExistsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IFEXISTS_ISSET_ID, value); + } + + public boolean isIgnoreProtection() { + return this.ignoreProtection; + } + + public void setIgnoreProtection(boolean ignoreProtection) { + this.ignoreProtection = ignoreProtection; + setIgnoreProtectionIsSet(true); + } + + public void unsetIgnoreProtection() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IGNOREPROTECTION_ISSET_ID); + } + + /** Returns true if field ignoreProtection is set (has been assigned a value) and false otherwise */ + public boolean isSetIgnoreProtection() { + return EncodingUtils.testBit(__isset_bitfield, __IGNOREPROTECTION_ISSET_ID); + } + + public void setIgnoreProtectionIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IGNOREPROTECTION_ISSET_ID, value); + } + + public EnvironmentContext getEnvironmentContext() { + return this.environmentContext; + } + + public void setEnvironmentContext(EnvironmentContext environmentContext) { + this.environmentContext = environmentContext; + } + + public void unsetEnvironmentContext() { + this.environmentContext = null; + } + + /** Returns true if field environmentContext is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironmentContext() { + return this.environmentContext != null; + } + + public void setEnvironmentContextIsSet(boolean value) { + if (!value) { + this.environmentContext = null; + } + } + + public boolean isNeedResult() { + return this.needResult; + } + + public void setNeedResult(boolean needResult) { + this.needResult = needResult; + setNeedResultIsSet(true); + } + + public void unsetNeedResult() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NEEDRESULT_ISSET_ID); + } + + /** Returns true if field needResult is set (has been assigned a value) and false otherwise */ + public boolean isSetNeedResult() { + return EncodingUtils.testBit(__isset_bitfield, __NEEDRESULT_ISSET_ID); + } + + public void setNeedResultIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NEEDRESULT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTblName(); + } else { + setTblName((String)value); + } + break; + + case PARTS: + if (value == null) { + unsetParts(); + } else { + setParts((RequestPartsSpec)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + case IF_EXISTS: + if (value == null) { + unsetIfExists(); + } else { + setIfExists((Boolean)value); + } + break; + + case IGNORE_PROTECTION: + if (value == null) { + unsetIgnoreProtection(); + } else { + setIgnoreProtection((Boolean)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironmentContext(); + } else { + setEnvironmentContext((EnvironmentContext)value); + } + break; + + case NEED_RESULT: + if (value == null) { + unsetNeedResult(); + } else { + setNeedResult((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TBL_NAME: + return getTblName(); + + case PARTS: + return getParts(); + + case DELETE_DATA: + return isDeleteData(); + + case IF_EXISTS: + return isIfExists(); + + case IGNORE_PROTECTION: + return isIgnoreProtection(); + + case ENVIRONMENT_CONTEXT: + return getEnvironmentContext(); + + case NEED_RESULT: + return isNeedResult(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case TBL_NAME: + return isSetTblName(); + case PARTS: + return isSetParts(); + case DELETE_DATA: + return isSetDeleteData(); + case IF_EXISTS: + return isSetIfExists(); + case IGNORE_PROTECTION: + return isSetIgnoreProtection(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironmentContext(); + case NEED_RESULT: + return isSetNeedResult(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof DropPartitionsRequest) + return this.equals((DropPartitionsRequest)that); + return false; + } + + public boolean equals(DropPartitionsRequest that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tblName = true && this.isSetTblName(); + boolean that_present_tblName = true && that.isSetTblName(); + if (this_present_tblName || that_present_tblName) { + if (!(this_present_tblName && that_present_tblName)) + return false; + if (!this.tblName.equals(that.tblName)) + return false; + } + + boolean this_present_parts = true && this.isSetParts(); + boolean that_present_parts = true && that.isSetParts(); + if (this_present_parts || that_present_parts) { + if (!(this_present_parts && that_present_parts)) + return false; + if (!this.parts.equals(that.parts)) + return false; + } + + boolean this_present_deleteData = true && this.isSetDeleteData(); + boolean that_present_deleteData = true && that.isSetDeleteData(); + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + boolean this_present_ifExists = true && this.isSetIfExists(); + boolean that_present_ifExists = true && that.isSetIfExists(); + if (this_present_ifExists || that_present_ifExists) { + if (!(this_present_ifExists && that_present_ifExists)) + return false; + if (this.ifExists != that.ifExists) + return false; + } + + boolean this_present_ignoreProtection = true && this.isSetIgnoreProtection(); + boolean that_present_ignoreProtection = true && that.isSetIgnoreProtection(); + if (this_present_ignoreProtection || that_present_ignoreProtection) { + if (!(this_present_ignoreProtection && that_present_ignoreProtection)) + return false; + if (this.ignoreProtection != that.ignoreProtection) + return false; + } + + boolean this_present_environmentContext = true && this.isSetEnvironmentContext(); + boolean that_present_environmentContext = true && that.isSetEnvironmentContext(); + if (this_present_environmentContext || that_present_environmentContext) { + if (!(this_present_environmentContext && that_present_environmentContext)) + return false; + if (!this.environmentContext.equals(that.environmentContext)) + return false; + } + + boolean this_present_needResult = true && this.isSetNeedResult(); + boolean that_present_needResult = true && that.isSetNeedResult(); + if (this_present_needResult || that_present_needResult) { + if (!(this_present_needResult && that_present_needResult)) + return false; + if (this.needResult != that.needResult) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tblName = true && (isSetTblName()); + list.add(present_tblName); + if (present_tblName) + list.add(tblName); + + boolean present_parts = true && (isSetParts()); + list.add(present_parts); + if (present_parts) + list.add(parts); + + boolean present_deleteData = true && (isSetDeleteData()); + list.add(present_deleteData); + if (present_deleteData) + list.add(deleteData); + + boolean present_ifExists = true && (isSetIfExists()); + list.add(present_ifExists); + if (present_ifExists) + list.add(ifExists); + + boolean present_ignoreProtection = true && (isSetIgnoreProtection()); + list.add(present_ignoreProtection); + if (present_ignoreProtection) + list.add(ignoreProtection); + + boolean present_environmentContext = true && (isSetEnvironmentContext()); + list.add(present_environmentContext); + if (present_environmentContext) + list.add(environmentContext); + + boolean present_needResult = true && (isSetNeedResult()); + list.add(present_needResult); + if (present_needResult) + list.add(needResult); + + return list.hashCode(); + } + + @Override + public int compareTo(DropPartitionsRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTblName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParts()).compareTo(other.isSetParts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parts, other.parts); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIfExists()).compareTo(other.isSetIfExists()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIfExists()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ifExists, other.ifExists); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIgnoreProtection()).compareTo(other.isSetIgnoreProtection()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIgnoreProtection()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ignoreProtection, other.ignoreProtection); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironmentContext()).compareTo(other.isSetEnvironmentContext()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironmentContext()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environmentContext, other.environmentContext); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNeedResult()).compareTo(other.isSetNeedResult()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNeedResult()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.needResult, other.needResult); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("DropPartitionsRequest("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tblName:"); + if (this.tblName == null) { + sb.append("null"); + } else { + sb.append(this.tblName); + } + first = false; + if (!first) sb.append(", "); + sb.append("parts:"); + if (this.parts == null) { + sb.append("null"); + } else { + sb.append(this.parts); + } + first = false; + if (isSetDeleteData()) { + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + } + if (isSetIfExists()) { + if (!first) sb.append(", "); + sb.append("ifExists:"); + sb.append(this.ifExists); + first = false; + } + if (isSetIgnoreProtection()) { + if (!first) sb.append(", "); + sb.append("ignoreProtection:"); + sb.append(this.ignoreProtection); + first = false; + } + if (isSetEnvironmentContext()) { + if (!first) sb.append(", "); + sb.append("environmentContext:"); + if (this.environmentContext == null) { + sb.append("null"); + } else { + sb.append(this.environmentContext); + } + first = false; + } + if (isSetNeedResult()) { + if (!first) sb.append(", "); + sb.append("needResult:"); + sb.append(this.needResult); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + if (!isSetTblName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); + } + + if (!isSetParts()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'parts' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (environmentContext != null) { + environmentContext.validate(); + } + } + + 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 { + // 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 DropPartitionsRequestStandardSchemeFactory implements SchemeFactory { + public DropPartitionsRequestStandardScheme getScheme() { + return new DropPartitionsRequestStandardScheme(); + } + } + + private static class DropPartitionsRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, DropPartitionsRequest 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.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.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.parts = new RequestPartsSpec(); + struct.parts.read(iprot); + struct.setPartsIsSet(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; + case 5: // IF_EXISTS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.ifExists = iprot.readBool(); + struct.setIfExistsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // IGNORE_PROTECTION + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.ignoreProtection = iprot.readBool(); + struct.setIgnoreProtectionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // ENVIRONMENT_CONTEXT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.environmentContext = new EnvironmentContext(); + struct.environmentContext.read(iprot); + struct.setEnvironmentContextIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // NEED_RESULT + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.needResult = iprot.readBool(); + struct.setNeedResultIsSet(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, DropPartitionsRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.tblName != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tblName); + oprot.writeFieldEnd(); + } + if (struct.parts != null) { + oprot.writeFieldBegin(PARTS_FIELD_DESC); + struct.parts.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.isSetDeleteData()) { + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(struct.deleteData); + oprot.writeFieldEnd(); + } + if (struct.isSetIfExists()) { + oprot.writeFieldBegin(IF_EXISTS_FIELD_DESC); + oprot.writeBool(struct.ifExists); + oprot.writeFieldEnd(); + } + if (struct.isSetIgnoreProtection()) { + oprot.writeFieldBegin(IGNORE_PROTECTION_FIELD_DESC); + oprot.writeBool(struct.ignoreProtection); + oprot.writeFieldEnd(); + } + if (struct.environmentContext != null) { + if (struct.isSetEnvironmentContext()) { + oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC); + struct.environmentContext.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.isSetNeedResult()) { + oprot.writeFieldBegin(NEED_RESULT_FIELD_DESC); + oprot.writeBool(struct.needResult); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DropPartitionsRequestTupleSchemeFactory implements SchemeFactory { + public DropPartitionsRequestTupleScheme getScheme() { + return new DropPartitionsRequestTupleScheme(); + } + } + + private static class DropPartitionsRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, DropPartitionsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbName); + oprot.writeString(struct.tblName); + struct.parts.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetDeleteData()) { + optionals.set(0); + } + if (struct.isSetIfExists()) { + optionals.set(1); + } + if (struct.isSetIgnoreProtection()) { + optionals.set(2); + } + if (struct.isSetEnvironmentContext()) { + optionals.set(3); + } + if (struct.isSetNeedResult()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + if (struct.isSetIfExists()) { + oprot.writeBool(struct.ifExists); + } + if (struct.isSetIgnoreProtection()) { + oprot.writeBool(struct.ignoreProtection); + } + if (struct.isSetEnvironmentContext()) { + struct.environmentContext.write(oprot); + } + if (struct.isSetNeedResult()) { + oprot.writeBool(struct.needResult); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, DropPartitionsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + struct.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + struct.parts = new RequestPartsSpec(); + struct.parts.read(iprot); + struct.setPartsIsSet(true); + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + if (incoming.get(1)) { + struct.ifExists = iprot.readBool(); + struct.setIfExistsIsSet(true); + } + if (incoming.get(2)) { + struct.ignoreProtection = iprot.readBool(); + struct.setIgnoreProtectionIsSet(true); + } + if (incoming.get(3)) { + struct.environmentContext = new EnvironmentContext(); + struct.environmentContext.read(iprot); + struct.setEnvironmentContextIsSet(true); + } + if (incoming.get(4)) { + struct.needResult = iprot.readBool(); + struct.setNeedResultIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java new file mode 100644 index 0000000..21290ee --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java @@ -0,0 +1,447 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class DropPartitionsResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DropPartitionsResult"); + + private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new DropPartitionsResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new DropPartitionsResultTupleSchemeFactory()); + } + + private List partitions; // 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 { + PARTITIONS((short)1, "partitions"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PARTITIONS + return PARTITIONS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.PARTITIONS}; + 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); + tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DropPartitionsResult.class, metaDataMap); + } + + public DropPartitionsResult() { + } + + /** + * Performs a deep copy on other. + */ + public DropPartitionsResult(DropPartitionsResult other) { + if (other.isSetPartitions()) { + List __this__partitions = new ArrayList(other.partitions.size()); + for (Partition other_element : other.partitions) { + __this__partitions.add(new Partition(other_element)); + } + this.partitions = __this__partitions; + } + } + + public DropPartitionsResult deepCopy() { + return new DropPartitionsResult(this); + } + + @Override + public void clear() { + this.partitions = null; + } + + public int getPartitionsSize() { + return (this.partitions == null) ? 0 : this.partitions.size(); + } + + public java.util.Iterator getPartitionsIterator() { + return (this.partitions == null) ? null : this.partitions.iterator(); + } + + public void addToPartitions(Partition elem) { + if (this.partitions == null) { + this.partitions = new ArrayList(); + } + this.partitions.add(elem); + } + + public List getPartitions() { + return this.partitions; + } + + public void setPartitions(List partitions) { + this.partitions = partitions; + } + + public void unsetPartitions() { + this.partitions = null; + } + + /** Returns true if field partitions is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitions() { + return this.partitions != null; + } + + public void setPartitionsIsSet(boolean value) { + if (!value) { + this.partitions = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PARTITIONS: + if (value == null) { + unsetPartitions(); + } else { + setPartitions((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PARTITIONS: + return getPartitions(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PARTITIONS: + return isSetPartitions(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof DropPartitionsResult) + return this.equals((DropPartitionsResult)that); + return false; + } + + public boolean equals(DropPartitionsResult that) { + if (that == null) + return false; + + boolean this_present_partitions = true && this.isSetPartitions(); + boolean that_present_partitions = true && that.isSetPartitions(); + if (this_present_partitions || that_present_partitions) { + if (!(this_present_partitions && that_present_partitions)) + return false; + if (!this.partitions.equals(that.partitions)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_partitions = true && (isSetPartitions()); + list.add(present_partitions); + if (present_partitions) + list.add(partitions); + + return list.hashCode(); + } + + @Override + public int compareTo(DropPartitionsResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPartitions()).compareTo(other.isSetPartitions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("DropPartitionsResult("); + boolean first = true; + + if (isSetPartitions()) { + sb.append("partitions:"); + if (this.partitions == null) { + sb.append("null"); + } else { + sb.append(this.partitions); + } + 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 DropPartitionsResultStandardSchemeFactory implements SchemeFactory { + public DropPartitionsResultStandardScheme getScheme() { + return new DropPartitionsResultStandardScheme(); + } + } + + private static class DropPartitionsResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, DropPartitionsResult 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: // PARTITIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list460 = iprot.readListBegin(); + struct.partitions = new ArrayList(_list460.size); + Partition _elem461; + for (int _i462 = 0; _i462 < _list460.size; ++_i462) + { + _elem461 = new Partition(); + _elem461.read(iprot); + struct.partitions.add(_elem461); + } + iprot.readListEnd(); + } + struct.setPartitionsIsSet(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, DropPartitionsResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.partitions != null) { + if (struct.isSetPartitions()) { + oprot.writeFieldBegin(PARTITIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size())); + for (Partition _iter463 : struct.partitions) + { + _iter463.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DropPartitionsResultTupleSchemeFactory implements SchemeFactory { + public DropPartitionsResultTupleScheme getScheme() { + return new DropPartitionsResultTupleScheme(); + } + } + + private static class DropPartitionsResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, DropPartitionsResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPartitions()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPartitions()) { + { + oprot.writeI32(struct.partitions.size()); + for (Partition _iter464 : struct.partitions) + { + _iter464.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, DropPartitionsResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list465 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.partitions = new ArrayList(_list465.size); + Partition _elem466; + for (int _i467 = 0; _i467 < _list465.size; ++_i467) + { + _elem466 = new Partition(); + _elem466.read(iprot); + struct.partitions.add(_elem466); + } + } + struct.setPartitionsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java new file mode 100644 index 0000000..de588e2 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java @@ -0,0 +1,447 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class EnvironmentContext implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EnvironmentContext"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PROPERTIES((short)1, "properties"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PROPERTIES + return PROPERTIES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("properties", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EnvironmentContext.class, metaDataMap); + } + + public EnvironmentContext() { + } + + public EnvironmentContext( + Map properties) + { + this(); + this.properties = properties; + } + + /** + * Performs a deep copy on other. + */ + public EnvironmentContext(EnvironmentContext other) { + if (other.isSetProperties()) { + Map __this__properties = new HashMap(other.properties); + this.properties = __this__properties; + } + } + + public EnvironmentContext deepCopy() { + return new EnvironmentContext(this); + } + + @Override + public void clear() { + this.properties = null; + } + + public int getPropertiesSize() { + return (this.properties == null) ? 0 : this.properties.size(); + } + + public void putToProperties(String key, String val) { + if (this.properties == null) { + this.properties = new HashMap(); + } + this.properties.put(key, val); + } + + public Map getProperties() { + return this.properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + + public void unsetProperties() { + this.properties = null; + } + + /** Returns true if field properties is set (has been assigned a value) and false otherwise */ + public boolean isSetProperties() { + return this.properties != null; + } + + public void setPropertiesIsSet(boolean value) { + if (!value) { + this.properties = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PROPERTIES: + if (value == null) { + unsetProperties(); + } else { + setProperties((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PROPERTIES: + return getProperties(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PROPERTIES: + return isSetProperties(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof EnvironmentContext) + return this.equals((EnvironmentContext)that); + return false; + } + + public boolean equals(EnvironmentContext that) { + if (that == null) + return false; + + boolean this_present_properties = true && this.isSetProperties(); + boolean that_present_properties = true && that.isSetProperties(); + if (this_present_properties || that_present_properties) { + if (!(this_present_properties && that_present_properties)) + return false; + if (!this.properties.equals(that.properties)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_properties = true && (isSetProperties()); + list.add(present_properties); + if (present_properties) + list.add(properties); + + return list.hashCode(); + } + + @Override + public int compareTo(EnvironmentContext other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetProperties()).compareTo(other.isSetProperties()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetProperties()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.properties, other.properties); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("EnvironmentContext("); + boolean first = true; + + sb.append("properties:"); + if (this.properties == null) { + sb.append("null"); + } else { + sb.append(this.properties); + } + 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 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 _map312 = iprot.readMapBegin(); + struct.properties = new HashMap(2*_map312.size); + String _key313; + String _val314; + for (int _i315 = 0; _i315 < _map312.size; ++_i315) + { + _key313 = iprot.readString(); + _val314 = iprot.readString(); + struct.properties.put(_key313, _val314); + } + 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 _iter316 : struct.properties.entrySet()) + { + oprot.writeString(_iter316.getKey()); + oprot.writeString(_iter316.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 _iter317 : struct.properties.entrySet()) + { + oprot.writeString(_iter317.getKey()); + oprot.writeString(_iter317.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 _map318 = 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*_map318.size); + String _key319; + String _val320; + for (int _i321 = 0; _i321 < _map318.size; ++_i321) + { + _key319 = iprot.readString(); + _val320 = iprot.readString(); + struct.properties.put(_key319, _val320); + } + } + struct.setPropertiesIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EventRequestType.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EventRequestType.java new file mode 100644 index 0000000..4295046 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EventRequestType.java @@ -0,0 +1,48 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum EventRequestType implements org.apache.thrift.TEnum { + INSERT(1), + UPDATE(2), + DELETE(3); + + private final int value; + + private EventRequestType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static EventRequestType findByValue(int value) { + switch (value) { + case 1: + return INSERT; + case 2: + return UPDATE; + case 3: + return DELETE; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java new file mode 100644 index 0000000..1b5fed9 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java @@ -0,0 +1,603 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class FieldSchema implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FieldSchema"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"), + TYPE((short)2, "type"), + COMMENT((short)3, "comment"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + case 2: // TYPE + return TYPE; + case 3: // COMMENT + return COMMENT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COMMENT, new org.apache.thrift.meta_data.FieldMetaData("comment", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FieldSchema.class, metaDataMap); + } + + public FieldSchema() { + } + + public FieldSchema( + String name, + String type, + String comment) + { + this(); + this.name = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(name); + this.type = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(type); + this.comment = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(comment); + } + + /** + * Performs a deep copy on other. + */ + public FieldSchema(FieldSchema other) { + if (other.isSetName()) { + this.name = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.name); + } + if (other.isSetType()) { + this.type = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.type); + } + if (other.isSetComment()) { + this.comment = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.comment); + } + } + + public FieldSchema deepCopy() { + return new FieldSchema(this); + } + + @Override + public void clear() { + this.name = null; + this.type = null; + this.comment = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(name); + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(type); + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public String getComment() { + return this.comment; + } + + public void setComment(String comment) { + this.comment = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(comment); + } + + public void unsetComment() { + this.comment = null; + } + + /** Returns true if field comment is set (has been assigned a value) and false otherwise */ + public boolean isSetComment() { + return this.comment != null; + } + + public void setCommentIsSet(boolean value) { + if (!value) { + this.comment = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((String)value); + } + break; + + case COMMENT: + if (value == null) { + unsetComment(); + } else { + setComment((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case TYPE: + return getType(); + + case COMMENT: + return getComment(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case TYPE: + return isSetType(); + case COMMENT: + return isSetComment(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof FieldSchema) + return this.equals((FieldSchema)that); + return false; + } + + public boolean equals(FieldSchema that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + boolean this_present_comment = true && this.isSetComment(); + boolean that_present_comment = true && that.isSetComment(); + if (this_present_comment || that_present_comment) { + if (!(this_present_comment && that_present_comment)) + return false; + if (!this.comment.equals(that.comment)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type); + + boolean present_comment = true && (isSetComment()); + list.add(present_comment); + if (present_comment) + list.add(comment); + + return list.hashCode(); + } + + @Override + public int compareTo(FieldSchema other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetComment()).compareTo(other.isSetComment()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetComment()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, other.comment); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("FieldSchema("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (!first) sb.append(", "); + sb.append("comment:"); + if (this.comment == null) { + sb.append("null"); + } else { + sb.append(this.comment); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FileMetadataExprType.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FileMetadataExprType.java new file mode 100644 index 0000000..4e393e2 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FileMetadataExprType.java @@ -0,0 +1,42 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum FileMetadataExprType implements org.apache.thrift.TEnum { + ORC_SARG(1); + + private final int value; + + private FileMetadataExprType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static FileMetadataExprType findByValue(int value) { + switch (value) { + case 1: + return ORC_SARG; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java new file mode 100644 index 0000000..cc336c5 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java @@ -0,0 +1,861 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class FireEventRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FireEventRequest"); + + private static final org.apache.thrift.protocol.TField SUCCESSFUL_FIELD_DESC = new org.apache.thrift.protocol.TField("successful", org.apache.thrift.protocol.TType.BOOL, (short)1); + private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField PARTITION_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionVals", org.apache.thrift.protocol.TType.LIST, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new FireEventRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new FireEventRequestTupleSchemeFactory()); + } + + private boolean successful; // required + private FireEventRequestData data; // required + private String dbName; // optional + private String tableName; // optional + private List partitionVals; // 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 { + SUCCESSFUL((short)1, "successful"), + DATA((short)2, "data"), + DB_NAME((short)3, "dbName"), + TABLE_NAME((short)4, "tableName"), + PARTITION_VALS((short)5, "partitionVals"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SUCCESSFUL + return SUCCESSFUL; + case 2: // DATA + return DATA; + case 3: // DB_NAME + return DB_NAME; + case 4: // TABLE_NAME + return TABLE_NAME; + case 5: // PARTITION_VALS + return PARTITION_VALS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESSFUL_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.DB_NAME,_Fields.TABLE_NAME,_Fields.PARTITION_VALS}; + 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); + tmpMap.put(_Fields.SUCCESSFUL, new org.apache.thrift.meta_data.FieldMetaData("successful", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FireEventRequestData.class))); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARTITION_VALS, new org.apache.thrift.meta_data.FieldMetaData("partitionVals", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FireEventRequest.class, metaDataMap); + } + + public FireEventRequest() { + } + + public FireEventRequest( + boolean successful, + FireEventRequestData data) + { + this(); + this.successful = successful; + setSuccessfulIsSet(true); + this.data = data; + } + + /** + * Performs a deep copy on other. + */ + public FireEventRequest(FireEventRequest other) { + __isset_bitfield = other.__isset_bitfield; + this.successful = other.successful; + if (other.isSetData()) { + this.data = new FireEventRequestData(other.data); + } + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetPartitionVals()) { + List __this__partitionVals = new ArrayList(other.partitionVals); + this.partitionVals = __this__partitionVals; + } + } + + public FireEventRequest deepCopy() { + return new FireEventRequest(this); + } + + @Override + public void clear() { + setSuccessfulIsSet(false); + this.successful = false; + this.data = null; + this.dbName = null; + this.tableName = null; + this.partitionVals = null; + } + + public boolean isSuccessful() { + return this.successful; + } + + public void setSuccessful(boolean successful) { + this.successful = successful; + setSuccessfulIsSet(true); + } + + public void unsetSuccessful() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESSFUL_ISSET_ID); + } + + /** Returns true if field successful is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccessful() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESSFUL_ISSET_ID); + } + + public void setSuccessfulIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESSFUL_ISSET_ID, value); + } + + public FireEventRequestData getData() { + return this.data; + } + + public void setData(FireEventRequestData data) { + this.data = data; + } + + public void unsetData() { + this.data = null; + } + + /** Returns true if field data is set (has been assigned a value) and false otherwise */ + public boolean isSetData() { + return this.data != null; + } + + public void setDataIsSet(boolean value) { + if (!value) { + this.data = null; + } + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTableName() { + return this.tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getPartitionValsSize() { + return (this.partitionVals == null) ? 0 : this.partitionVals.size(); + } + + public java.util.Iterator getPartitionValsIterator() { + return (this.partitionVals == null) ? null : this.partitionVals.iterator(); + } + + public void addToPartitionVals(String elem) { + if (this.partitionVals == null) { + this.partitionVals = new ArrayList(); + } + this.partitionVals.add(elem); + } + + public List getPartitionVals() { + return this.partitionVals; + } + + public void setPartitionVals(List partitionVals) { + this.partitionVals = partitionVals; + } + + public void unsetPartitionVals() { + this.partitionVals = null; + } + + /** Returns true if field partitionVals is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitionVals() { + return this.partitionVals != null; + } + + public void setPartitionValsIsSet(boolean value) { + if (!value) { + this.partitionVals = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESSFUL: + if (value == null) { + unsetSuccessful(); + } else { + setSuccessful((Boolean)value); + } + break; + + case DATA: + if (value == null) { + unsetData(); + } else { + setData((FireEventRequestData)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + case PARTITION_VALS: + if (value == null) { + unsetPartitionVals(); + } else { + setPartitionVals((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESSFUL: + return isSuccessful(); + + case DATA: + return getData(); + + case DB_NAME: + return getDbName(); + + case TABLE_NAME: + return getTableName(); + + case PARTITION_VALS: + return getPartitionVals(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESSFUL: + return isSetSuccessful(); + case DATA: + return isSetData(); + case DB_NAME: + return isSetDbName(); + case TABLE_NAME: + return isSetTableName(); + case PARTITION_VALS: + return isSetPartitionVals(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof FireEventRequest) + return this.equals((FireEventRequest)that); + return false; + } + + public boolean equals(FireEventRequest that) { + if (that == null) + return false; + + boolean this_present_successful = true; + boolean that_present_successful = true; + if (this_present_successful || that_present_successful) { + if (!(this_present_successful && that_present_successful)) + return false; + if (this.successful != that.successful) + return false; + } + + boolean this_present_data = true && this.isSetData(); + boolean that_present_data = true && that.isSetData(); + if (this_present_data || that_present_data) { + if (!(this_present_data && that_present_data)) + return false; + if (!this.data.equals(that.data)) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_partitionVals = true && this.isSetPartitionVals(); + boolean that_present_partitionVals = true && that.isSetPartitionVals(); + if (this_present_partitionVals || that_present_partitionVals) { + if (!(this_present_partitionVals && that_present_partitionVals)) + return false; + if (!this.partitionVals.equals(that.partitionVals)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_successful = true; + list.add(present_successful); + if (present_successful) + list.add(successful); + + boolean present_data = true && (isSetData()); + list.add(present_data); + if (present_data) + list.add(data); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); + + boolean present_partitionVals = true && (isSetPartitionVals()); + list.add(present_partitionVals); + if (present_partitionVals) + list.add(partitionVals); + + return list.hashCode(); + } + + @Override + public int compareTo(FireEventRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccessful()).compareTo(other.isSetSuccessful()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccessful()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.successful, other.successful); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartitionVals()).compareTo(other.isSetPartitionVals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionVals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionVals, other.partitionVals); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("FireEventRequest("); + boolean first = true; + + sb.append("successful:"); + sb.append(this.successful); + first = false; + if (!first) sb.append(", "); + sb.append("data:"); + if (this.data == null) { + sb.append("null"); + } else { + sb.append(this.data); + } + first = false; + if (isSetDbName()) { + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + } + if (isSetTableName()) { + if (!first) sb.append(", "); + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + } + if (isSetPartitionVals()) { + if (!first) sb.append(", "); + sb.append("partitionVals:"); + if (this.partitionVals == null) { + sb.append("null"); + } else { + sb.append(this.partitionVals); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetSuccessful()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'successful' is unset! Struct:" + toString()); + } + + if (!isSetData()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'data' is unset! Struct:" + toString()); + } + + // 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 { + // 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 FireEventRequestStandardSchemeFactory implements SchemeFactory { + public FireEventRequestStandardScheme getScheme() { + return new FireEventRequestStandardScheme(); + } + } + + private static class FireEventRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, FireEventRequest 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: // SUCCESSFUL + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.successful = iprot.readBool(); + struct.setSuccessfulIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DATA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.data = new FireEventRequestData(); + struct.data.read(iprot); + struct.setDataIsSet(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: // 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 5: // PARTITION_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list606 = iprot.readListBegin(); + struct.partitionVals = new ArrayList(_list606.size); + String _elem607; + for (int _i608 = 0; _i608 < _list606.size; ++_i608) + { + _elem607 = iprot.readString(); + struct.partitionVals.add(_elem607); + } + iprot.readListEnd(); + } + struct.setPartitionValsIsSet(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, FireEventRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SUCCESSFUL_FIELD_DESC); + oprot.writeBool(struct.successful); + oprot.writeFieldEnd(); + if (struct.data != null) { + oprot.writeFieldBegin(DATA_FIELD_DESC); + struct.data.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.dbName != null) { + if (struct.isSetDbName()) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + } + if (struct.tableName != null) { + if (struct.isSetTableName()) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.tableName); + oprot.writeFieldEnd(); + } + } + if (struct.partitionVals != null) { + if (struct.isSetPartitionVals()) { + oprot.writeFieldBegin(PARTITION_VALS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partitionVals.size())); + for (String _iter609 : struct.partitionVals) + { + oprot.writeString(_iter609); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class FireEventRequestTupleSchemeFactory implements SchemeFactory { + public FireEventRequestTupleScheme getScheme() { + return new FireEventRequestTupleScheme(); + } + } + + private static class FireEventRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, FireEventRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBool(struct.successful); + struct.data.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + if (struct.isSetTableName()) { + optionals.set(1); + } + if (struct.isSetPartitionVals()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetTableName()) { + oprot.writeString(struct.tableName); + } + if (struct.isSetPartitionVals()) { + { + oprot.writeI32(struct.partitionVals.size()); + for (String _iter610 : struct.partitionVals) + { + oprot.writeString(_iter610); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, FireEventRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.successful = iprot.readBool(); + struct.setSuccessfulIsSet(true); + struct.data = new FireEventRequestData(); + struct.data.read(iprot); + struct.setDataIsSet(true); + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(1)) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list611 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.partitionVals = new ArrayList(_list611.size); + String _elem612; + for (int _i613 = 0; _i613 < _list611.size; ++_i613) + { + _elem612 = iprot.readString(); + struct.partitionVals.add(_elem612); + } + } + struct.setPartitionValsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequestData.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequestData.java new file mode 100644 index 0000000..db8dc8b --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequestData.java @@ -0,0 +1,309 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +public class FireEventRequestData extends org.apache.thrift.TUnion { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FireEventRequestData"); + private static final org.apache.thrift.protocol.TField INSERT_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("insertData", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + INSERT_DATA((short)1, "insertData"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // INSERT_DATA + return INSERT_DATA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + 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); + tmpMap.put(_Fields.INSERT_DATA, new org.apache.thrift.meta_data.FieldMetaData("insertData", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InsertEventRequestData.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FireEventRequestData.class, metaDataMap); + } + + public FireEventRequestData() { + super(); + } + + public FireEventRequestData(_Fields setField, Object value) { + super(setField, value); + } + + public FireEventRequestData(FireEventRequestData other) { + super(other); + } + public FireEventRequestData deepCopy() { + return new FireEventRequestData(this); + } + + public static FireEventRequestData insertData(InsertEventRequestData value) { + FireEventRequestData x = new FireEventRequestData(); + x.setInsertData(value); + return x; + } + + + @Override + protected void checkType(_Fields setField, Object value) throws ClassCastException { + switch (setField) { + case INSERT_DATA: + if (value instanceof InsertEventRequestData) { + break; + } + throw new ClassCastException("Was expecting value of type InsertEventRequestData for field 'insertData', but got " + value.getClass().getSimpleName()); + default: + throw new IllegalArgumentException("Unknown field id " + setField); + } + } + + @Override + protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { + _Fields setField = _Fields.findByThriftId(field.id); + if (setField != null) { + switch (setField) { + case INSERT_DATA: + if (field.type == INSERT_DATA_FIELD_DESC.type) { + InsertEventRequestData insertData; + insertData = new InsertEventRequestData(); + insertData.read(iprot); + return insertData; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + default: + throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + } + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + } + + @Override + protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + switch (setField_) { + case INSERT_DATA: + InsertEventRequestData insertData = (InsertEventRequestData)value_; + insertData.write(oprot); + return; + default: + throw new IllegalStateException("Cannot write union with unknown field " + setField_); + } + } + + @Override + protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { + _Fields setField = _Fields.findByThriftId(fieldID); + if (setField != null) { + switch (setField) { + case INSERT_DATA: + InsertEventRequestData insertData; + insertData = new InsertEventRequestData(); + insertData.read(iprot); + return insertData; + default: + throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + } + } else { + throw new TProtocolException("Couldn't find a field with field id " + fieldID); + } + } + + @Override + protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + switch (setField_) { + case INSERT_DATA: + InsertEventRequestData insertData = (InsertEventRequestData)value_; + insertData.write(oprot); + return; + default: + throw new IllegalStateException("Cannot write union with unknown field " + setField_); + } + } + + @Override + protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { + switch (setField) { + case INSERT_DATA: + return INSERT_DATA_FIELD_DESC; + default: + throw new IllegalArgumentException("Unknown field id " + setField); + } + } + + @Override + protected org.apache.thrift.protocol.TStruct getStructDesc() { + return STRUCT_DESC; + } + + @Override + protected _Fields enumForId(short id) { + return _Fields.findByThriftIdOrThrow(id); + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + + public InsertEventRequestData getInsertData() { + if (getSetField() == _Fields.INSERT_DATA) { + return (InsertEventRequestData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'insertData' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setInsertData(InsertEventRequestData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.INSERT_DATA; + value_ = value; + } + + public boolean isSetInsertData() { + return setField_ == _Fields.INSERT_DATA; + } + + + public boolean equals(Object other) { + if (other instanceof FireEventRequestData) { + return equals((FireEventRequestData)other); + } else { + return false; + } + } + + public boolean equals(FireEventRequestData other) { + return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); + } + + @Override + public int compareTo(FireEventRequestData other) { + int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); + if (lastComparison == 0) { + return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); + } + return lastComparison; + } + + + @Override + public int hashCode() { + List list = new ArrayList(); + list.add(this.getClass().getName()); + org.apache.thrift.TFieldIdEnum setField = getSetField(); + if (setField != null) { + list.add(setField.getThriftFieldId()); + Object value = getFieldValue(); + if (value instanceof org.apache.thrift.TEnum) { + list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); + } else { + list.add(value); + } + } + return list.hashCode(); + } + 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); + } + } + + +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventResponse.java new file mode 100644 index 0000000..9a86ed5 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventResponse.java @@ -0,0 +1,283 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class FireEventResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FireEventResponse"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new FireEventResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new FireEventResponseTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FireEventResponse.class, metaDataMap); + } + + public FireEventResponse() { + } + + /** + * Performs a deep copy on other. + */ + public FireEventResponse(FireEventResponse other) { + } + + public FireEventResponse deepCopy() { + return new FireEventResponse(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof FireEventResponse) + return this.equals((FireEventResponse)that); + return false; + } + + public boolean equals(FireEventResponse that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(FireEventResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("FireEventResponse("); + boolean first = true; + + 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 FireEventResponseStandardSchemeFactory implements SchemeFactory { + public FireEventResponseStandardScheme getScheme() { + return new FireEventResponseStandardScheme(); + } + } + + private static class FireEventResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, FireEventResponse 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, FireEventResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class FireEventResponseTupleSchemeFactory implements SchemeFactory { + public FireEventResponseTupleScheme getScheme() { + return new FireEventResponseTupleScheme(); + } + } + + private static class FireEventResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, FireEventResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, FireEventResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java new file mode 100644 index 0000000..d6b1cff --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java @@ -0,0 +1,707 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ForeignKeysRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ForeignKeysRequest"); + + private static final org.apache.thrift.protocol.TField PARENT_DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_db_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PARENT_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField FOREIGN_DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreign_db_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField FOREIGN_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreign_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ForeignKeysRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ForeignKeysRequestTupleSchemeFactory()); + } + + private String parent_db_name; // required + private String parent_tbl_name; // required + private String foreign_db_name; // required + private String foreign_tbl_name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PARENT_DB_NAME((short)1, "parent_db_name"), + PARENT_TBL_NAME((short)2, "parent_tbl_name"), + FOREIGN_DB_NAME((short)3, "foreign_db_name"), + FOREIGN_TBL_NAME((short)4, "foreign_tbl_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PARENT_DB_NAME + return PARENT_DB_NAME; + case 2: // PARENT_TBL_NAME + return PARENT_TBL_NAME; + case 3: // FOREIGN_DB_NAME + return FOREIGN_DB_NAME; + case 4: // FOREIGN_TBL_NAME + return FOREIGN_TBL_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PARENT_DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("parent_db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARENT_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("parent_tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FOREIGN_DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreign_db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FOREIGN_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreign_tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ForeignKeysRequest.class, metaDataMap); + } + + public ForeignKeysRequest() { + } + + public ForeignKeysRequest( + String parent_db_name, + String parent_tbl_name, + String foreign_db_name, + String foreign_tbl_name) + { + this(); + this.parent_db_name = parent_db_name; + this.parent_tbl_name = parent_tbl_name; + this.foreign_db_name = foreign_db_name; + this.foreign_tbl_name = foreign_tbl_name; + } + + /** + * Performs a deep copy on other. + */ + public ForeignKeysRequest(ForeignKeysRequest other) { + if (other.isSetParent_db_name()) { + this.parent_db_name = other.parent_db_name; + } + if (other.isSetParent_tbl_name()) { + this.parent_tbl_name = other.parent_tbl_name; + } + if (other.isSetForeign_db_name()) { + this.foreign_db_name = other.foreign_db_name; + } + if (other.isSetForeign_tbl_name()) { + this.foreign_tbl_name = other.foreign_tbl_name; + } + } + + public ForeignKeysRequest deepCopy() { + return new ForeignKeysRequest(this); + } + + @Override + public void clear() { + this.parent_db_name = null; + this.parent_tbl_name = null; + this.foreign_db_name = null; + this.foreign_tbl_name = null; + } + + public String getParent_db_name() { + return this.parent_db_name; + } + + public void setParent_db_name(String parent_db_name) { + this.parent_db_name = parent_db_name; + } + + public void unsetParent_db_name() { + this.parent_db_name = null; + } + + /** Returns true if field parent_db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetParent_db_name() { + return this.parent_db_name != null; + } + + public void setParent_db_nameIsSet(boolean value) { + if (!value) { + this.parent_db_name = null; + } + } + + public String getParent_tbl_name() { + return this.parent_tbl_name; + } + + public void setParent_tbl_name(String parent_tbl_name) { + this.parent_tbl_name = parent_tbl_name; + } + + public void unsetParent_tbl_name() { + this.parent_tbl_name = null; + } + + /** Returns true if field parent_tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetParent_tbl_name() { + return this.parent_tbl_name != null; + } + + public void setParent_tbl_nameIsSet(boolean value) { + if (!value) { + this.parent_tbl_name = null; + } + } + + public String getForeign_db_name() { + return this.foreign_db_name; + } + + public void setForeign_db_name(String foreign_db_name) { + this.foreign_db_name = foreign_db_name; + } + + public void unsetForeign_db_name() { + this.foreign_db_name = null; + } + + /** Returns true if field foreign_db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetForeign_db_name() { + return this.foreign_db_name != null; + } + + public void setForeign_db_nameIsSet(boolean value) { + if (!value) { + this.foreign_db_name = null; + } + } + + public String getForeign_tbl_name() { + return this.foreign_tbl_name; + } + + public void setForeign_tbl_name(String foreign_tbl_name) { + this.foreign_tbl_name = foreign_tbl_name; + } + + public void unsetForeign_tbl_name() { + this.foreign_tbl_name = null; + } + + /** Returns true if field foreign_tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetForeign_tbl_name() { + return this.foreign_tbl_name != null; + } + + public void setForeign_tbl_nameIsSet(boolean value) { + if (!value) { + this.foreign_tbl_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PARENT_DB_NAME: + if (value == null) { + unsetParent_db_name(); + } else { + setParent_db_name((String)value); + } + break; + + case PARENT_TBL_NAME: + if (value == null) { + unsetParent_tbl_name(); + } else { + setParent_tbl_name((String)value); + } + break; + + case FOREIGN_DB_NAME: + if (value == null) { + unsetForeign_db_name(); + } else { + setForeign_db_name((String)value); + } + break; + + case FOREIGN_TBL_NAME: + if (value == null) { + unsetForeign_tbl_name(); + } else { + setForeign_tbl_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PARENT_DB_NAME: + return getParent_db_name(); + + case PARENT_TBL_NAME: + return getParent_tbl_name(); + + case FOREIGN_DB_NAME: + return getForeign_db_name(); + + case FOREIGN_TBL_NAME: + return getForeign_tbl_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PARENT_DB_NAME: + return isSetParent_db_name(); + case PARENT_TBL_NAME: + return isSetParent_tbl_name(); + case FOREIGN_DB_NAME: + return isSetForeign_db_name(); + case FOREIGN_TBL_NAME: + return isSetForeign_tbl_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ForeignKeysRequest) + return this.equals((ForeignKeysRequest)that); + return false; + } + + public boolean equals(ForeignKeysRequest that) { + if (that == null) + return false; + + boolean this_present_parent_db_name = true && this.isSetParent_db_name(); + boolean that_present_parent_db_name = true && that.isSetParent_db_name(); + if (this_present_parent_db_name || that_present_parent_db_name) { + if (!(this_present_parent_db_name && that_present_parent_db_name)) + return false; + if (!this.parent_db_name.equals(that.parent_db_name)) + return false; + } + + boolean this_present_parent_tbl_name = true && this.isSetParent_tbl_name(); + boolean that_present_parent_tbl_name = true && that.isSetParent_tbl_name(); + if (this_present_parent_tbl_name || that_present_parent_tbl_name) { + if (!(this_present_parent_tbl_name && that_present_parent_tbl_name)) + return false; + if (!this.parent_tbl_name.equals(that.parent_tbl_name)) + return false; + } + + boolean this_present_foreign_db_name = true && this.isSetForeign_db_name(); + boolean that_present_foreign_db_name = true && that.isSetForeign_db_name(); + if (this_present_foreign_db_name || that_present_foreign_db_name) { + if (!(this_present_foreign_db_name && that_present_foreign_db_name)) + return false; + if (!this.foreign_db_name.equals(that.foreign_db_name)) + return false; + } + + boolean this_present_foreign_tbl_name = true && this.isSetForeign_tbl_name(); + boolean that_present_foreign_tbl_name = true && that.isSetForeign_tbl_name(); + if (this_present_foreign_tbl_name || that_present_foreign_tbl_name) { + if (!(this_present_foreign_tbl_name && that_present_foreign_tbl_name)) + return false; + if (!this.foreign_tbl_name.equals(that.foreign_tbl_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_parent_db_name = true && (isSetParent_db_name()); + list.add(present_parent_db_name); + if (present_parent_db_name) + list.add(parent_db_name); + + boolean present_parent_tbl_name = true && (isSetParent_tbl_name()); + list.add(present_parent_tbl_name); + if (present_parent_tbl_name) + list.add(parent_tbl_name); + + boolean present_foreign_db_name = true && (isSetForeign_db_name()); + list.add(present_foreign_db_name); + if (present_foreign_db_name) + list.add(foreign_db_name); + + boolean present_foreign_tbl_name = true && (isSetForeign_tbl_name()); + list.add(present_foreign_tbl_name); + if (present_foreign_tbl_name) + list.add(foreign_tbl_name); + + return list.hashCode(); + } + + @Override + public int compareTo(ForeignKeysRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetParent_db_name()).compareTo(other.isSetParent_db_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParent_db_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_db_name, other.parent_db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParent_tbl_name()).compareTo(other.isSetParent_tbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParent_tbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_tbl_name, other.parent_tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetForeign_db_name()).compareTo(other.isSetForeign_db_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetForeign_db_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreign_db_name, other.foreign_db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetForeign_tbl_name()).compareTo(other.isSetForeign_tbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetForeign_tbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreign_tbl_name, other.foreign_tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ForeignKeysRequest("); + boolean first = true; + + sb.append("parent_db_name:"); + if (this.parent_db_name == null) { + sb.append("null"); + } else { + sb.append(this.parent_db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("parent_tbl_name:"); + if (this.parent_tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.parent_tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("foreign_db_name:"); + if (this.foreign_db_name == null) { + sb.append("null"); + } else { + sb.append(this.foreign_db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("foreign_tbl_name:"); + if (this.foreign_tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.foreign_tbl_name); + } + 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 ForeignKeysRequestStandardSchemeFactory implements SchemeFactory { + public ForeignKeysRequestStandardScheme getScheme() { + return new ForeignKeysRequestStandardScheme(); + } + } + + private static class ForeignKeysRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ForeignKeysRequest 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: // PARENT_DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.parent_db_name = iprot.readString(); + struct.setParent_db_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PARENT_TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.parent_tbl_name = iprot.readString(); + struct.setParent_tbl_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FOREIGN_DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.foreign_db_name = iprot.readString(); + struct.setForeign_db_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // FOREIGN_TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.foreign_tbl_name = iprot.readString(); + struct.setForeign_tbl_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, ForeignKeysRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.parent_db_name != null) { + oprot.writeFieldBegin(PARENT_DB_NAME_FIELD_DESC); + oprot.writeString(struct.parent_db_name); + oprot.writeFieldEnd(); + } + if (struct.parent_tbl_name != null) { + oprot.writeFieldBegin(PARENT_TBL_NAME_FIELD_DESC); + oprot.writeString(struct.parent_tbl_name); + oprot.writeFieldEnd(); + } + if (struct.foreign_db_name != null) { + oprot.writeFieldBegin(FOREIGN_DB_NAME_FIELD_DESC); + oprot.writeString(struct.foreign_db_name); + oprot.writeFieldEnd(); + } + if (struct.foreign_tbl_name != null) { + oprot.writeFieldBegin(FOREIGN_TBL_NAME_FIELD_DESC); + oprot.writeString(struct.foreign_tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ForeignKeysRequestTupleSchemeFactory implements SchemeFactory { + public ForeignKeysRequestTupleScheme getScheme() { + return new ForeignKeysRequestTupleScheme(); + } + } + + private static class ForeignKeysRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ForeignKeysRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetParent_db_name()) { + optionals.set(0); + } + if (struct.isSetParent_tbl_name()) { + optionals.set(1); + } + if (struct.isSetForeign_db_name()) { + optionals.set(2); + } + if (struct.isSetForeign_tbl_name()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetParent_db_name()) { + oprot.writeString(struct.parent_db_name); + } + if (struct.isSetParent_tbl_name()) { + oprot.writeString(struct.parent_tbl_name); + } + if (struct.isSetForeign_db_name()) { + oprot.writeString(struct.foreign_db_name); + } + if (struct.isSetForeign_tbl_name()) { + oprot.writeString(struct.foreign_tbl_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ForeignKeysRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.parent_db_name = iprot.readString(); + struct.setParent_db_nameIsSet(true); + } + if (incoming.get(1)) { + struct.parent_tbl_name = iprot.readString(); + struct.setParent_tbl_nameIsSet(true); + } + if (incoming.get(2)) { + struct.foreign_db_name = iprot.readString(); + struct.setForeign_db_nameIsSet(true); + } + if (incoming.get(3)) { + struct.foreign_tbl_name = iprot.readString(); + struct.setForeign_tbl_nameIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java new file mode 100644 index 0000000..7135a65 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ForeignKeysResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ForeignKeysResponse"); + + private static final org.apache.thrift.protocol.TField FOREIGN_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignKeys", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ForeignKeysResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ForeignKeysResponseTupleSchemeFactory()); + } + + private List foreignKeys; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + FOREIGN_KEYS((short)1, "foreignKeys"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FOREIGN_KEYS + return FOREIGN_KEYS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.FOREIGN_KEYS, new org.apache.thrift.meta_data.FieldMetaData("foreignKeys", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLForeignKey.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ForeignKeysResponse.class, metaDataMap); + } + + public ForeignKeysResponse() { + } + + public ForeignKeysResponse( + List foreignKeys) + { + this(); + this.foreignKeys = foreignKeys; + } + + /** + * Performs a deep copy on other. + */ + public ForeignKeysResponse(ForeignKeysResponse other) { + if (other.isSetForeignKeys()) { + List __this__foreignKeys = new ArrayList(other.foreignKeys.size()); + for (SQLForeignKey other_element : other.foreignKeys) { + __this__foreignKeys.add(new SQLForeignKey(other_element)); + } + this.foreignKeys = __this__foreignKeys; + } + } + + public ForeignKeysResponse deepCopy() { + return new ForeignKeysResponse(this); + } + + @Override + public void clear() { + this.foreignKeys = null; + } + + public int getForeignKeysSize() { + return (this.foreignKeys == null) ? 0 : this.foreignKeys.size(); + } + + public java.util.Iterator getForeignKeysIterator() { + return (this.foreignKeys == null) ? null : this.foreignKeys.iterator(); + } + + public void addToForeignKeys(SQLForeignKey elem) { + if (this.foreignKeys == null) { + this.foreignKeys = new ArrayList(); + } + this.foreignKeys.add(elem); + } + + public List getForeignKeys() { + return this.foreignKeys; + } + + public void setForeignKeys(List foreignKeys) { + this.foreignKeys = foreignKeys; + } + + public void unsetForeignKeys() { + this.foreignKeys = null; + } + + /** Returns true if field foreignKeys is set (has been assigned a value) and false otherwise */ + public boolean isSetForeignKeys() { + return this.foreignKeys != null; + } + + public void setForeignKeysIsSet(boolean value) { + if (!value) { + this.foreignKeys = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FOREIGN_KEYS: + if (value == null) { + unsetForeignKeys(); + } else { + setForeignKeys((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FOREIGN_KEYS: + return getForeignKeys(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FOREIGN_KEYS: + return isSetForeignKeys(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ForeignKeysResponse) + return this.equals((ForeignKeysResponse)that); + return false; + } + + public boolean equals(ForeignKeysResponse that) { + if (that == null) + return false; + + boolean this_present_foreignKeys = true && this.isSetForeignKeys(); + boolean that_present_foreignKeys = true && that.isSetForeignKeys(); + if (this_present_foreignKeys || that_present_foreignKeys) { + if (!(this_present_foreignKeys && that_present_foreignKeys)) + return false; + if (!this.foreignKeys.equals(that.foreignKeys)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_foreignKeys = true && (isSetForeignKeys()); + list.add(present_foreignKeys); + if (present_foreignKeys) + list.add(foreignKeys); + + return list.hashCode(); + } + + @Override + public int compareTo(ForeignKeysResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetForeignKeys()).compareTo(other.isSetForeignKeys()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetForeignKeys()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignKeys, other.foreignKeys); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ForeignKeysResponse("); + boolean first = true; + + sb.append("foreignKeys:"); + if (this.foreignKeys == null) { + sb.append("null"); + } else { + sb.append(this.foreignKeys); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetForeignKeys()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'foreignKeys' is unset! Struct:" + toString()); + } + + // 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 ForeignKeysResponseStandardSchemeFactory implements SchemeFactory { + public ForeignKeysResponseStandardScheme getScheme() { + return new ForeignKeysResponseStandardScheme(); + } + } + + private static class ForeignKeysResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ForeignKeysResponse 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: // FOREIGN_KEYS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list330 = iprot.readListBegin(); + struct.foreignKeys = new ArrayList(_list330.size); + SQLForeignKey _elem331; + for (int _i332 = 0; _i332 < _list330.size; ++_i332) + { + _elem331 = new SQLForeignKey(); + _elem331.read(iprot); + struct.foreignKeys.add(_elem331); + } + iprot.readListEnd(); + } + struct.setForeignKeysIsSet(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, ForeignKeysResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.foreignKeys != null) { + oprot.writeFieldBegin(FOREIGN_KEYS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeys.size())); + for (SQLForeignKey _iter333 : struct.foreignKeys) + { + _iter333.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ForeignKeysResponseTupleSchemeFactory implements SchemeFactory { + public ForeignKeysResponseTupleScheme getScheme() { + return new ForeignKeysResponseTupleScheme(); + } + } + + private static class ForeignKeysResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ForeignKeysResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.foreignKeys.size()); + for (SQLForeignKey _iter334 : struct.foreignKeys) + { + _iter334.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ForeignKeysResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.foreignKeys = new ArrayList(_list335.size); + SQLForeignKey _elem336; + for (int _i337 = 0; _i337 < _list335.size; ++_i337) + { + _elem336 = new SQLForeignKey(); + _elem336.read(iprot); + struct.foreignKeys.add(_elem336); + } + } + struct.setForeignKeysIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java new file mode 100644 index 0000000..ad12ab1 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java @@ -0,0 +1,1199 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class Function implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Function"); + + private static final org.apache.thrift.protocol.TField FUNCTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("functionName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("className", org.apache.thrift.protocol.TType.STRING, (short)3); + 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)4); + private static final org.apache.thrift.protocol.TField OWNER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerType", org.apache.thrift.protocol.TType.I32, (short)5); + 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)6); + private static final org.apache.thrift.protocol.TField FUNCTION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("functionType", org.apache.thrift.protocol.TType.I32, (short)7); + private static final org.apache.thrift.protocol.TField RESOURCE_URIS_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceUris", org.apache.thrift.protocol.TType.LIST, (short)8); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new FunctionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new FunctionTupleSchemeFactory()); + } + + private String functionName; // required + private String dbName; // required + private String className; // required + private String ownerName; // required + private PrincipalType ownerType; // required + private int createTime; // required + private FunctionType functionType; // required + private List resourceUris; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + FUNCTION_NAME((short)1, "functionName"), + DB_NAME((short)2, "dbName"), + CLASS_NAME((short)3, "className"), + OWNER_NAME((short)4, "ownerName"), + /** + * + * @see PrincipalType + */ + OWNER_TYPE((short)5, "ownerType"), + CREATE_TIME((short)6, "createTime"), + /** + * + * @see FunctionType + */ + FUNCTION_TYPE((short)7, "functionType"), + RESOURCE_URIS((short)8, "resourceUris"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FUNCTION_NAME + return FUNCTION_NAME; + case 2: // DB_NAME + return DB_NAME; + case 3: // CLASS_NAME + return CLASS_NAME; + case 4: // OWNER_NAME + return OWNER_NAME; + case 5: // OWNER_TYPE + return OWNER_TYPE; + case 6: // CREATE_TIME + return CREATE_TIME; + case 7: // FUNCTION_TYPE + return FUNCTION_TYPE; + case 8: // RESOURCE_URIS + return RESOURCE_URIS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __CREATETIME_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.FUNCTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("functionName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CLASS_NAME, new org.apache.thrift.meta_data.FieldMetaData("className", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OWNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("ownerName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OWNER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("ownerType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.FUNCTION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("functionType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FunctionType.class))); + tmpMap.put(_Fields.RESOURCE_URIS, new org.apache.thrift.meta_data.FieldMetaData("resourceUris", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ResourceUri.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Function.class, metaDataMap); + } + + public Function() { + } + + public Function( + String functionName, + String dbName, + String className, + String ownerName, + PrincipalType ownerType, + int createTime, + FunctionType functionType, + List resourceUris) + { + this(); + this.functionName = functionName; + this.dbName = dbName; + this.className = className; + this.ownerName = ownerName; + this.ownerType = ownerType; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.functionType = functionType; + this.resourceUris = resourceUris; + } + + /** + * Performs a deep copy on other. + */ + public Function(Function other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetFunctionName()) { + this.functionName = other.functionName; + } + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetClassName()) { + this.className = other.className; + } + if (other.isSetOwnerName()) { + this.ownerName = other.ownerName; + } + if (other.isSetOwnerType()) { + this.ownerType = other.ownerType; + } + this.createTime = other.createTime; + if (other.isSetFunctionType()) { + this.functionType = other.functionType; + } + if (other.isSetResourceUris()) { + List __this__resourceUris = new ArrayList(other.resourceUris.size()); + for (ResourceUri other_element : other.resourceUris) { + __this__resourceUris.add(new ResourceUri(other_element)); + } + this.resourceUris = __this__resourceUris; + } + } + + public Function deepCopy() { + return new Function(this); + } + + @Override + public void clear() { + this.functionName = null; + this.dbName = null; + this.className = null; + this.ownerName = null; + this.ownerType = null; + setCreateTimeIsSet(false); + this.createTime = 0; + this.functionType = null; + this.resourceUris = null; + } + + public String getFunctionName() { + return this.functionName; + } + + public void setFunctionName(String functionName) { + this.functionName = functionName; + } + + public void unsetFunctionName() { + this.functionName = null; + } + + /** Returns true if field functionName is set (has been assigned a value) and false otherwise */ + public boolean isSetFunctionName() { + return this.functionName != null; + } + + public void setFunctionNameIsSet(boolean value) { + if (!value) { + this.functionName = null; + } + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getClassName() { + return this.className; + } + + public void setClassName(String className) { + this.className = className; + } + + public void unsetClassName() { + this.className = null; + } + + /** Returns true if field className is set (has been assigned a value) and false otherwise */ + public boolean isSetClassName() { + return this.className != null; + } + + public void setClassNameIsSet(boolean value) { + if (!value) { + this.className = null; + } + } + + public String getOwnerName() { + return this.ownerName; + } + + public void setOwnerName(String ownerName) { + this.ownerName = ownerName; + } + + public void unsetOwnerName() { + this.ownerName = null; + } + + /** Returns true if field ownerName is set (has been assigned a value) and false otherwise */ + public boolean isSetOwnerName() { + return this.ownerName != null; + } + + public void setOwnerNameIsSet(boolean value) { + if (!value) { + this.ownerName = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getOwnerType() { + return this.ownerType; + } + + /** + * + * @see PrincipalType + */ + public void setOwnerType(PrincipalType ownerType) { + this.ownerType = ownerType; + } + + public void unsetOwnerType() { + this.ownerType = null; + } + + /** Returns true if field ownerType is set (has been assigned a value) and false otherwise */ + public boolean isSetOwnerType() { + return this.ownerType != null; + } + + public void setOwnerTypeIsSet(boolean value) { + if (!value) { + this.ownerType = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + /** + * + * @see FunctionType + */ + public FunctionType getFunctionType() { + return this.functionType; + } + + /** + * + * @see FunctionType + */ + public void setFunctionType(FunctionType functionType) { + this.functionType = functionType; + } + + public void unsetFunctionType() { + this.functionType = null; + } + + /** Returns true if field functionType is set (has been assigned a value) and false otherwise */ + public boolean isSetFunctionType() { + return this.functionType != null; + } + + public void setFunctionTypeIsSet(boolean value) { + if (!value) { + this.functionType = null; + } + } + + public int getResourceUrisSize() { + return (this.resourceUris == null) ? 0 : this.resourceUris.size(); + } + + public java.util.Iterator getResourceUrisIterator() { + return (this.resourceUris == null) ? null : this.resourceUris.iterator(); + } + + public void addToResourceUris(ResourceUri elem) { + if (this.resourceUris == null) { + this.resourceUris = new ArrayList(); + } + this.resourceUris.add(elem); + } + + public List getResourceUris() { + return this.resourceUris; + } + + public void setResourceUris(List resourceUris) { + this.resourceUris = resourceUris; + } + + public void unsetResourceUris() { + this.resourceUris = null; + } + + /** Returns true if field resourceUris is set (has been assigned a value) and false otherwise */ + public boolean isSetResourceUris() { + return this.resourceUris != null; + } + + public void setResourceUrisIsSet(boolean value) { + if (!value) { + this.resourceUris = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FUNCTION_NAME: + if (value == null) { + unsetFunctionName(); + } else { + setFunctionName((String)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case CLASS_NAME: + if (value == null) { + unsetClassName(); + } else { + setClassName((String)value); + } + break; + + case OWNER_NAME: + if (value == null) { + unsetOwnerName(); + } else { + setOwnerName((String)value); + } + break; + + case OWNER_TYPE: + if (value == null) { + unsetOwnerType(); + } else { + setOwnerType((PrincipalType)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case FUNCTION_TYPE: + if (value == null) { + unsetFunctionType(); + } else { + setFunctionType((FunctionType)value); + } + break; + + case RESOURCE_URIS: + if (value == null) { + unsetResourceUris(); + } else { + setResourceUris((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FUNCTION_NAME: + return getFunctionName(); + + case DB_NAME: + return getDbName(); + + case CLASS_NAME: + return getClassName(); + + case OWNER_NAME: + return getOwnerName(); + + case OWNER_TYPE: + return getOwnerType(); + + case CREATE_TIME: + return getCreateTime(); + + case FUNCTION_TYPE: + return getFunctionType(); + + case RESOURCE_URIS: + return getResourceUris(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FUNCTION_NAME: + return isSetFunctionName(); + case DB_NAME: + return isSetDbName(); + case CLASS_NAME: + return isSetClassName(); + case OWNER_NAME: + return isSetOwnerName(); + case OWNER_TYPE: + return isSetOwnerType(); + case CREATE_TIME: + return isSetCreateTime(); + case FUNCTION_TYPE: + return isSetFunctionType(); + case RESOURCE_URIS: + return isSetResourceUris(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Function) + return this.equals((Function)that); + return false; + } + + public boolean equals(Function that) { + if (that == null) + return false; + + boolean this_present_functionName = true && this.isSetFunctionName(); + boolean that_present_functionName = true && that.isSetFunctionName(); + if (this_present_functionName || that_present_functionName) { + if (!(this_present_functionName && that_present_functionName)) + return false; + if (!this.functionName.equals(that.functionName)) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_className = true && this.isSetClassName(); + boolean that_present_className = true && that.isSetClassName(); + if (this_present_className || that_present_className) { + if (!(this_present_className && that_present_className)) + return false; + if (!this.className.equals(that.className)) + return false; + } + + boolean this_present_ownerName = true && this.isSetOwnerName(); + boolean that_present_ownerName = true && that.isSetOwnerName(); + if (this_present_ownerName || that_present_ownerName) { + if (!(this_present_ownerName && that_present_ownerName)) + return false; + if (!this.ownerName.equals(that.ownerName)) + return false; + } + + boolean this_present_ownerType = true && this.isSetOwnerType(); + boolean that_present_ownerType = true && that.isSetOwnerType(); + if (this_present_ownerType || that_present_ownerType) { + if (!(this_present_ownerType && that_present_ownerType)) + return false; + if (!this.ownerType.equals(that.ownerType)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_functionType = true && this.isSetFunctionType(); + boolean that_present_functionType = true && that.isSetFunctionType(); + if (this_present_functionType || that_present_functionType) { + if (!(this_present_functionType && that_present_functionType)) + return false; + if (!this.functionType.equals(that.functionType)) + return false; + } + + boolean this_present_resourceUris = true && this.isSetResourceUris(); + boolean that_present_resourceUris = true && that.isSetResourceUris(); + if (this_present_resourceUris || that_present_resourceUris) { + if (!(this_present_resourceUris && that_present_resourceUris)) + return false; + if (!this.resourceUris.equals(that.resourceUris)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_functionName = true && (isSetFunctionName()); + list.add(present_functionName); + if (present_functionName) + list.add(functionName); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_className = true && (isSetClassName()); + list.add(present_className); + if (present_className) + list.add(className); + + boolean present_ownerName = true && (isSetOwnerName()); + list.add(present_ownerName); + if (present_ownerName) + list.add(ownerName); + + boolean present_ownerType = true && (isSetOwnerType()); + list.add(present_ownerType); + if (present_ownerType) + list.add(ownerType.getValue()); + + boolean present_createTime = true; + list.add(present_createTime); + if (present_createTime) + list.add(createTime); + + boolean present_functionType = true && (isSetFunctionType()); + list.add(present_functionType); + if (present_functionType) + list.add(functionType.getValue()); + + boolean present_resourceUris = true && (isSetResourceUris()); + list.add(present_resourceUris); + if (present_resourceUris) + list.add(resourceUris); + + return list.hashCode(); + } + + @Override + public int compareTo(Function other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetFunctionName()).compareTo(other.isSetFunctionName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFunctionName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionName, other.functionName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetClassName()).compareTo(other.isSetClassName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetClassName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.className, other.className); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwnerName()).compareTo(other.isSetOwnerName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwnerName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerName, other.ownerName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwnerType()).compareTo(other.isSetOwnerType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwnerType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerType, other.ownerType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFunctionType()).compareTo(other.isSetFunctionType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFunctionType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionType, other.functionType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetResourceUris()).compareTo(other.isSetResourceUris()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetResourceUris()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceUris, other.resourceUris); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Function("); + boolean first = true; + + sb.append("functionName:"); + if (this.functionName == null) { + sb.append("null"); + } else { + sb.append(this.functionName); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("className:"); + if (this.className == null) { + sb.append("null"); + } else { + sb.append(this.className); + } + first = false; + if (!first) sb.append(", "); + sb.append("ownerName:"); + if (this.ownerName == null) { + sb.append("null"); + } else { + sb.append(this.ownerName); + } + first = false; + if (!first) sb.append(", "); + sb.append("ownerType:"); + if (this.ownerType == null) { + sb.append("null"); + } else { + sb.append(this.ownerType); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("functionType:"); + if (this.functionType == null) { + sb.append("null"); + } else { + sb.append(this.functionType); + } + first = false; + if (!first) sb.append(", "); + sb.append("resourceUris:"); + if (this.resourceUris == null) { + sb.append("null"); + } else { + sb.append(this.resourceUris); + } + 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 { + // 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 FunctionStandardSchemeFactory implements SchemeFactory { + public FunctionStandardScheme getScheme() { + return new FunctionStandardScheme(); + } + } + + private static class FunctionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Function 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: // FUNCTION_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.functionName = iprot.readString(); + struct.setFunctionNameIsSet(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: // CLASS_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.className = iprot.readString(); + struct.setClassNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // 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; + case 5: // OWNER_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.ownerType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setOwnerTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // 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 7: // FUNCTION_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.functionType = org.apache.hadoop.hive.metastore.api.FunctionType.findByValue(iprot.readI32()); + struct.setFunctionTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // RESOURCE_URIS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list484 = iprot.readListBegin(); + struct.resourceUris = new ArrayList(_list484.size); + ResourceUri _elem485; + for (int _i486 = 0; _i486 < _list484.size; ++_i486) + { + _elem485 = new ResourceUri(); + _elem485.read(iprot); + struct.resourceUris.add(_elem485); + } + iprot.readListEnd(); + } + struct.setResourceUrisIsSet(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, Function struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.functionName != null) { + oprot.writeFieldBegin(FUNCTION_NAME_FIELD_DESC); + oprot.writeString(struct.functionName); + oprot.writeFieldEnd(); + } + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.className != null) { + oprot.writeFieldBegin(CLASS_NAME_FIELD_DESC); + oprot.writeString(struct.className); + oprot.writeFieldEnd(); + } + if (struct.ownerName != null) { + oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); + oprot.writeString(struct.ownerName); + oprot.writeFieldEnd(); + } + if (struct.ownerType != null) { + oprot.writeFieldBegin(OWNER_TYPE_FIELD_DESC); + oprot.writeI32(struct.ownerType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(struct.createTime); + oprot.writeFieldEnd(); + if (struct.functionType != null) { + oprot.writeFieldBegin(FUNCTION_TYPE_FIELD_DESC); + oprot.writeI32(struct.functionType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.resourceUris != null) { + oprot.writeFieldBegin(RESOURCE_URIS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.resourceUris.size())); + for (ResourceUri _iter487 : struct.resourceUris) + { + _iter487.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class FunctionTupleSchemeFactory implements SchemeFactory { + public FunctionTupleScheme getScheme() { + return new FunctionTupleScheme(); + } + } + + private static class FunctionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Function struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetFunctionName()) { + optionals.set(0); + } + if (struct.isSetDbName()) { + optionals.set(1); + } + if (struct.isSetClassName()) { + optionals.set(2); + } + if (struct.isSetOwnerName()) { + optionals.set(3); + } + if (struct.isSetOwnerType()) { + optionals.set(4); + } + if (struct.isSetCreateTime()) { + optionals.set(5); + } + if (struct.isSetFunctionType()) { + optionals.set(6); + } + if (struct.isSetResourceUris()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); + if (struct.isSetFunctionName()) { + oprot.writeString(struct.functionName); + } + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetClassName()) { + oprot.writeString(struct.className); + } + if (struct.isSetOwnerName()) { + oprot.writeString(struct.ownerName); + } + if (struct.isSetOwnerType()) { + oprot.writeI32(struct.ownerType.getValue()); + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetFunctionType()) { + oprot.writeI32(struct.functionType.getValue()); + } + if (struct.isSetResourceUris()) { + { + oprot.writeI32(struct.resourceUris.size()); + for (ResourceUri _iter488 : struct.resourceUris) + { + _iter488.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Function struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(8); + if (incoming.get(0)) { + struct.functionName = iprot.readString(); + struct.setFunctionNameIsSet(true); + } + if (incoming.get(1)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(2)) { + struct.className = iprot.readString(); + struct.setClassNameIsSet(true); + } + if (incoming.get(3)) { + struct.ownerName = iprot.readString(); + struct.setOwnerNameIsSet(true); + } + if (incoming.get(4)) { + struct.ownerType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setOwnerTypeIsSet(true); + } + if (incoming.get(5)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(6)) { + struct.functionType = org.apache.hadoop.hive.metastore.api.FunctionType.findByValue(iprot.readI32()); + struct.setFunctionTypeIsSet(true); + } + if (incoming.get(7)) { + { + org.apache.thrift.protocol.TList _list489 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.resourceUris = new ArrayList(_list489.size); + ResourceUri _elem490; + for (int _i491 = 0; _i491 < _list489.size; ++_i491) + { + _elem490 = new ResourceUri(); + _elem490.read(iprot); + struct.resourceUris.add(_elem490); + } + } + struct.setResourceUrisIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FunctionType.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FunctionType.java new file mode 100644 index 0000000..1116f88 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FunctionType.java @@ -0,0 +1,42 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum FunctionType implements org.apache.thrift.TEnum { + JAVA(1); + + private final int value; + + private FunctionType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static FunctionType findByValue(int value) { + switch (value) { + case 1: + return JAVA; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java new file mode 100644 index 0000000..bb11fe3 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java @@ -0,0 +1,447 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetAllFunctionsResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetAllFunctionsResponse"); + + private static final org.apache.thrift.protocol.TField FUNCTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("functions", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetAllFunctionsResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetAllFunctionsResponseTupleSchemeFactory()); + } + + private List functions; // 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 { + FUNCTIONS((short)1, "functions"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FUNCTIONS + return FUNCTIONS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.FUNCTIONS}; + 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); + tmpMap.put(_Fields.FUNCTIONS, new org.apache.thrift.meta_data.FieldMetaData("functions", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetAllFunctionsResponse.class, metaDataMap); + } + + public GetAllFunctionsResponse() { + } + + /** + * Performs a deep copy on other. + */ + public GetAllFunctionsResponse(GetAllFunctionsResponse other) { + if (other.isSetFunctions()) { + List __this__functions = new ArrayList(other.functions.size()); + for (Function other_element : other.functions) { + __this__functions.add(new Function(other_element)); + } + this.functions = __this__functions; + } + } + + public GetAllFunctionsResponse deepCopy() { + return new GetAllFunctionsResponse(this); + } + + @Override + public void clear() { + this.functions = null; + } + + public int getFunctionsSize() { + return (this.functions == null) ? 0 : this.functions.size(); + } + + public java.util.Iterator getFunctionsIterator() { + return (this.functions == null) ? null : this.functions.iterator(); + } + + public void addToFunctions(Function elem) { + if (this.functions == null) { + this.functions = new ArrayList(); + } + this.functions.add(elem); + } + + public List getFunctions() { + return this.functions; + } + + public void setFunctions(List functions) { + this.functions = functions; + } + + public void unsetFunctions() { + this.functions = null; + } + + /** Returns true if field functions is set (has been assigned a value) and false otherwise */ + public boolean isSetFunctions() { + return this.functions != null; + } + + public void setFunctionsIsSet(boolean value) { + if (!value) { + this.functions = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FUNCTIONS: + if (value == null) { + unsetFunctions(); + } else { + setFunctions((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FUNCTIONS: + return getFunctions(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FUNCTIONS: + return isSetFunctions(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetAllFunctionsResponse) + return this.equals((GetAllFunctionsResponse)that); + return false; + } + + public boolean equals(GetAllFunctionsResponse that) { + if (that == null) + return false; + + boolean this_present_functions = true && this.isSetFunctions(); + boolean that_present_functions = true && that.isSetFunctions(); + if (this_present_functions || that_present_functions) { + if (!(this_present_functions && that_present_functions)) + return false; + if (!this.functions.equals(that.functions)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_functions = true && (isSetFunctions()); + list.add(present_functions); + if (present_functions) + list.add(functions); + + return list.hashCode(); + } + + @Override + public int compareTo(GetAllFunctionsResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetFunctions()).compareTo(other.isSetFunctions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFunctions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functions, other.functions); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetAllFunctionsResponse("); + boolean first = true; + + if (isSetFunctions()) { + sb.append("functions:"); + if (this.functions == null) { + sb.append("null"); + } else { + sb.append(this.functions); + } + 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 GetAllFunctionsResponseStandardSchemeFactory implements SchemeFactory { + public GetAllFunctionsResponseStandardScheme getScheme() { + return new GetAllFunctionsResponseStandardScheme(); + } + } + + private static class GetAllFunctionsResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetAllFunctionsResponse 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: // FUNCTIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list674 = iprot.readListBegin(); + struct.functions = new ArrayList(_list674.size); + Function _elem675; + for (int _i676 = 0; _i676 < _list674.size; ++_i676) + { + _elem675 = new Function(); + _elem675.read(iprot); + struct.functions.add(_elem675); + } + iprot.readListEnd(); + } + struct.setFunctionsIsSet(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, GetAllFunctionsResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.functions != null) { + if (struct.isSetFunctions()) { + oprot.writeFieldBegin(FUNCTIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.functions.size())); + for (Function _iter677 : struct.functions) + { + _iter677.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetAllFunctionsResponseTupleSchemeFactory implements SchemeFactory { + public GetAllFunctionsResponseTupleScheme getScheme() { + return new GetAllFunctionsResponseTupleScheme(); + } + } + + private static class GetAllFunctionsResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetAllFunctionsResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetFunctions()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetFunctions()) { + { + oprot.writeI32(struct.functions.size()); + for (Function _iter678 : struct.functions) + { + _iter678.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetAllFunctionsResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list679 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.functions = new ArrayList(_list679.size); + Function _elem680; + for (int _i681 = 0; _i681 < _list679.size; ++_i681) + { + _elem680 = new Function(); + _elem680.read(iprot); + struct.functions.add(_elem680); + } + } + struct.setFunctionsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java new file mode 100644 index 0000000..ef758cd --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java @@ -0,0 +1,773 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetFileMetadataByExprRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFileMetadataByExprRequest"); + + private static final org.apache.thrift.protocol.TField FILE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fileIds", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField EXPR_FIELD_DESC = new org.apache.thrift.protocol.TField("expr", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField DO_GET_FOOTERS_FIELD_DESC = new org.apache.thrift.protocol.TField("doGetFooters", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetFileMetadataByExprRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetFileMetadataByExprRequestTupleSchemeFactory()); + } + + private List fileIds; // required + private ByteBuffer expr; // required + private boolean doGetFooters; // optional + private FileMetadataExprType type; // 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 { + FILE_IDS((short)1, "fileIds"), + EXPR((short)2, "expr"), + DO_GET_FOOTERS((short)3, "doGetFooters"), + /** + * + * @see FileMetadataExprType + */ + TYPE((short)4, "type"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FILE_IDS + return FILE_IDS; + case 2: // EXPR + return EXPR; + case 3: // DO_GET_FOOTERS + return DO_GET_FOOTERS; + case 4: // TYPE + return TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DOGETFOOTERS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.DO_GET_FOOTERS,_Fields.TYPE}; + 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); + tmpMap.put(_Fields.FILE_IDS, new org.apache.thrift.meta_data.FieldMetaData("fileIds", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + tmpMap.put(_Fields.EXPR, new org.apache.thrift.meta_data.FieldMetaData("expr", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.DO_GET_FOOTERS, new org.apache.thrift.meta_data.FieldMetaData("doGetFooters", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FileMetadataExprType.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetFileMetadataByExprRequest.class, metaDataMap); + } + + public GetFileMetadataByExprRequest() { + } + + public GetFileMetadataByExprRequest( + List fileIds, + ByteBuffer expr) + { + this(); + this.fileIds = fileIds; + this.expr = org.apache.thrift.TBaseHelper.copyBinary(expr); + } + + /** + * Performs a deep copy on other. + */ + public GetFileMetadataByExprRequest(GetFileMetadataByExprRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetFileIds()) { + List __this__fileIds = new ArrayList(other.fileIds); + this.fileIds = __this__fileIds; + } + if (other.isSetExpr()) { + this.expr = org.apache.thrift.TBaseHelper.copyBinary(other.expr); + } + this.doGetFooters = other.doGetFooters; + if (other.isSetType()) { + this.type = other.type; + } + } + + public GetFileMetadataByExprRequest deepCopy() { + return new GetFileMetadataByExprRequest(this); + } + + @Override + public void clear() { + this.fileIds = null; + this.expr = null; + setDoGetFootersIsSet(false); + this.doGetFooters = false; + this.type = null; + } + + public int getFileIdsSize() { + return (this.fileIds == null) ? 0 : this.fileIds.size(); + } + + public java.util.Iterator getFileIdsIterator() { + return (this.fileIds == null) ? null : this.fileIds.iterator(); + } + + public void addToFileIds(long elem) { + if (this.fileIds == null) { + this.fileIds = new ArrayList(); + } + this.fileIds.add(elem); + } + + public List getFileIds() { + return this.fileIds; + } + + public void setFileIds(List fileIds) { + this.fileIds = fileIds; + } + + public void unsetFileIds() { + this.fileIds = null; + } + + /** Returns true if field fileIds is set (has been assigned a value) and false otherwise */ + public boolean isSetFileIds() { + return this.fileIds != null; + } + + public void setFileIdsIsSet(boolean value) { + if (!value) { + this.fileIds = null; + } + } + + public byte[] getExpr() { + setExpr(org.apache.thrift.TBaseHelper.rightSize(expr)); + return expr == null ? null : expr.array(); + } + + public ByteBuffer bufferForExpr() { + return org.apache.thrift.TBaseHelper.copyBinary(expr); + } + + public void setExpr(byte[] expr) { + this.expr = expr == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(expr, expr.length)); + } + + public void setExpr(ByteBuffer expr) { + this.expr = org.apache.thrift.TBaseHelper.copyBinary(expr); + } + + public void unsetExpr() { + this.expr = null; + } + + /** Returns true if field expr is set (has been assigned a value) and false otherwise */ + public boolean isSetExpr() { + return this.expr != null; + } + + public void setExprIsSet(boolean value) { + if (!value) { + this.expr = null; + } + } + + public boolean isDoGetFooters() { + return this.doGetFooters; + } + + public void setDoGetFooters(boolean doGetFooters) { + this.doGetFooters = doGetFooters; + setDoGetFootersIsSet(true); + } + + public void unsetDoGetFooters() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DOGETFOOTERS_ISSET_ID); + } + + /** Returns true if field doGetFooters is set (has been assigned a value) and false otherwise */ + public boolean isSetDoGetFooters() { + return EncodingUtils.testBit(__isset_bitfield, __DOGETFOOTERS_ISSET_ID); + } + + public void setDoGetFootersIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DOGETFOOTERS_ISSET_ID, value); + } + + /** + * + * @see FileMetadataExprType + */ + public FileMetadataExprType getType() { + return this.type; + } + + /** + * + * @see FileMetadataExprType + */ + public void setType(FileMetadataExprType type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FILE_IDS: + if (value == null) { + unsetFileIds(); + } else { + setFileIds((List)value); + } + break; + + case EXPR: + if (value == null) { + unsetExpr(); + } else { + setExpr((ByteBuffer)value); + } + break; + + case DO_GET_FOOTERS: + if (value == null) { + unsetDoGetFooters(); + } else { + setDoGetFooters((Boolean)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((FileMetadataExprType)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FILE_IDS: + return getFileIds(); + + case EXPR: + return getExpr(); + + case DO_GET_FOOTERS: + return isDoGetFooters(); + + case TYPE: + return getType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FILE_IDS: + return isSetFileIds(); + case EXPR: + return isSetExpr(); + case DO_GET_FOOTERS: + return isSetDoGetFooters(); + case TYPE: + return isSetType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetFileMetadataByExprRequest) + return this.equals((GetFileMetadataByExprRequest)that); + return false; + } + + public boolean equals(GetFileMetadataByExprRequest that) { + if (that == null) + return false; + + boolean this_present_fileIds = true && this.isSetFileIds(); + boolean that_present_fileIds = true && that.isSetFileIds(); + if (this_present_fileIds || that_present_fileIds) { + if (!(this_present_fileIds && that_present_fileIds)) + return false; + if (!this.fileIds.equals(that.fileIds)) + return false; + } + + boolean this_present_expr = true && this.isSetExpr(); + boolean that_present_expr = true && that.isSetExpr(); + if (this_present_expr || that_present_expr) { + if (!(this_present_expr && that_present_expr)) + return false; + if (!this.expr.equals(that.expr)) + return false; + } + + boolean this_present_doGetFooters = true && this.isSetDoGetFooters(); + boolean that_present_doGetFooters = true && that.isSetDoGetFooters(); + if (this_present_doGetFooters || that_present_doGetFooters) { + if (!(this_present_doGetFooters && that_present_doGetFooters)) + return false; + if (this.doGetFooters != that.doGetFooters) + return false; + } + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_fileIds = true && (isSetFileIds()); + list.add(present_fileIds); + if (present_fileIds) + list.add(fileIds); + + boolean present_expr = true && (isSetExpr()); + list.add(present_expr); + if (present_expr) + list.add(expr); + + boolean present_doGetFooters = true && (isSetDoGetFooters()); + list.add(present_doGetFooters); + if (present_doGetFooters) + list.add(doGetFooters); + + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(GetFileMetadataByExprRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetFileIds()).compareTo(other.isSetFileIds()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFileIds()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileIds, other.fileIds); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExpr()).compareTo(other.isSetExpr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExpr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expr, other.expr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDoGetFooters()).compareTo(other.isSetDoGetFooters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDoGetFooters()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.doGetFooters, other.doGetFooters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetFileMetadataByExprRequest("); + boolean first = true; + + sb.append("fileIds:"); + if (this.fileIds == null) { + sb.append("null"); + } else { + sb.append(this.fileIds); + } + first = false; + if (!first) sb.append(", "); + sb.append("expr:"); + if (this.expr == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.expr, sb); + } + first = false; + if (isSetDoGetFooters()) { + if (!first) sb.append(", "); + sb.append("doGetFooters:"); + sb.append(this.doGetFooters); + first = false; + } + if (isSetType()) { + if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetFileIds()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'fileIds' is unset! Struct:" + toString()); + } + + if (!isSetExpr()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'expr' is unset! Struct:" + toString()); + } + + // 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 { + // 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 GetFileMetadataByExprRequestStandardSchemeFactory implements SchemeFactory { + public GetFileMetadataByExprRequestStandardScheme getScheme() { + return new GetFileMetadataByExprRequestStandardScheme(); + } + } + + private static class GetFileMetadataByExprRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetFileMetadataByExprRequest 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: // FILE_IDS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list624 = iprot.readListBegin(); + struct.fileIds = new ArrayList(_list624.size); + long _elem625; + for (int _i626 = 0; _i626 < _list624.size; ++_i626) + { + _elem625 = iprot.readI64(); + struct.fileIds.add(_elem625); + } + iprot.readListEnd(); + } + struct.setFileIdsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // EXPR + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.expr = iprot.readBinary(); + struct.setExprIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // DO_GET_FOOTERS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.doGetFooters = iprot.readBool(); + struct.setDoGetFootersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.hadoop.hive.metastore.api.FileMetadataExprType.findByValue(iprot.readI32()); + 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, GetFileMetadataByExprRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.fileIds != null) { + oprot.writeFieldBegin(FILE_IDS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size())); + for (long _iter627 : struct.fileIds) + { + oprot.writeI64(_iter627); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.expr != null) { + oprot.writeFieldBegin(EXPR_FIELD_DESC); + oprot.writeBinary(struct.expr); + oprot.writeFieldEnd(); + } + if (struct.isSetDoGetFooters()) { + oprot.writeFieldBegin(DO_GET_FOOTERS_FIELD_DESC); + oprot.writeBool(struct.doGetFooters); + oprot.writeFieldEnd(); + } + if (struct.type != null) { + if (struct.isSetType()) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetFileMetadataByExprRequestTupleSchemeFactory implements SchemeFactory { + public GetFileMetadataByExprRequestTupleScheme getScheme() { + return new GetFileMetadataByExprRequestTupleScheme(); + } + } + + private static class GetFileMetadataByExprRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.fileIds.size()); + for (long _iter628 : struct.fileIds) + { + oprot.writeI64(_iter628); + } + } + oprot.writeBinary(struct.expr); + BitSet optionals = new BitSet(); + if (struct.isSetDoGetFooters()) { + optionals.set(0); + } + if (struct.isSetType()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDoGetFooters()) { + oprot.writeBool(struct.doGetFooters); + } + if (struct.isSetType()) { + oprot.writeI32(struct.type.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list629 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.fileIds = new ArrayList(_list629.size); + long _elem630; + for (int _i631 = 0; _i631 < _list629.size; ++_i631) + { + _elem630 = iprot.readI64(); + struct.fileIds.add(_elem630); + } + } + struct.setFileIdsIsSet(true); + struct.expr = iprot.readBinary(); + struct.setExprIsSet(true); + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.doGetFooters = iprot.readBool(); + struct.setDoGetFootersIsSet(true); + } + if (incoming.get(1)) { + struct.type = org.apache.hadoop.hive.metastore.api.FileMetadataExprType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java new file mode 100644 index 0000000..ee94380 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java @@ -0,0 +1,553 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetFileMetadataByExprResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFileMetadataByExprResult"); + + private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final org.apache.thrift.protocol.TField IS_SUPPORTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isSupported", org.apache.thrift.protocol.TType.BOOL, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetFileMetadataByExprResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetFileMetadataByExprResultTupleSchemeFactory()); + } + + private Map metadata; // required + private boolean isSupported; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + METADATA((short)1, "metadata"), + IS_SUPPORTED((short)2, "isSupported"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // METADATA + return METADATA; + case 2: // IS_SUPPORTED + return IS_SUPPORTED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ISSUPPORTED_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetadataPpdResult.class)))); + tmpMap.put(_Fields.IS_SUPPORTED, new org.apache.thrift.meta_data.FieldMetaData("isSupported", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetFileMetadataByExprResult.class, metaDataMap); + } + + public GetFileMetadataByExprResult() { + } + + public GetFileMetadataByExprResult( + Map metadata, + boolean isSupported) + { + this(); + this.metadata = metadata; + this.isSupported = isSupported; + setIsSupportedIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public GetFileMetadataByExprResult(GetFileMetadataByExprResult other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetMetadata()) { + Map __this__metadata = new HashMap(other.metadata.size()); + for (Map.Entry other_element : other.metadata.entrySet()) { + + Long other_element_key = other_element.getKey(); + MetadataPpdResult other_element_value = other_element.getValue(); + + Long __this__metadata_copy_key = other_element_key; + + MetadataPpdResult __this__metadata_copy_value = new MetadataPpdResult(other_element_value); + + __this__metadata.put(__this__metadata_copy_key, __this__metadata_copy_value); + } + this.metadata = __this__metadata; + } + this.isSupported = other.isSupported; + } + + public GetFileMetadataByExprResult deepCopy() { + return new GetFileMetadataByExprResult(this); + } + + @Override + public void clear() { + this.metadata = null; + setIsSupportedIsSet(false); + this.isSupported = false; + } + + public int getMetadataSize() { + return (this.metadata == null) ? 0 : this.metadata.size(); + } + + public void putToMetadata(long key, MetadataPpdResult val) { + if (this.metadata == null) { + this.metadata = new HashMap(); + } + this.metadata.put(key, val); + } + + public Map getMetadata() { + return this.metadata; + } + + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + public void unsetMetadata() { + this.metadata = null; + } + + /** Returns true if field metadata is set (has been assigned a value) and false otherwise */ + public boolean isSetMetadata() { + return this.metadata != null; + } + + public void setMetadataIsSet(boolean value) { + if (!value) { + this.metadata = null; + } + } + + public boolean isIsSupported() { + return this.isSupported; + } + + public void setIsSupported(boolean isSupported) { + this.isSupported = isSupported; + setIsSupportedIsSet(true); + } + + public void unsetIsSupported() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); + } + + /** Returns true if field isSupported is set (has been assigned a value) and false otherwise */ + public boolean isSetIsSupported() { + return EncodingUtils.testBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); + } + + public void setIsSupportedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case METADATA: + if (value == null) { + unsetMetadata(); + } else { + setMetadata((Map)value); + } + break; + + case IS_SUPPORTED: + if (value == null) { + unsetIsSupported(); + } else { + setIsSupported((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case METADATA: + return getMetadata(); + + case IS_SUPPORTED: + return isIsSupported(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case METADATA: + return isSetMetadata(); + case IS_SUPPORTED: + return isSetIsSupported(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetFileMetadataByExprResult) + return this.equals((GetFileMetadataByExprResult)that); + return false; + } + + public boolean equals(GetFileMetadataByExprResult that) { + if (that == null) + return false; + + boolean this_present_metadata = true && this.isSetMetadata(); + boolean that_present_metadata = true && that.isSetMetadata(); + if (this_present_metadata || that_present_metadata) { + if (!(this_present_metadata && that_present_metadata)) + return false; + if (!this.metadata.equals(that.metadata)) + return false; + } + + boolean this_present_isSupported = true; + boolean that_present_isSupported = true; + if (this_present_isSupported || that_present_isSupported) { + if (!(this_present_isSupported && that_present_isSupported)) + return false; + if (this.isSupported != that.isSupported) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_metadata = true && (isSetMetadata()); + list.add(present_metadata); + if (present_metadata) + list.add(metadata); + + boolean present_isSupported = true; + list.add(present_isSupported); + if (present_isSupported) + list.add(isSupported); + + return list.hashCode(); + } + + @Override + public int compareTo(GetFileMetadataByExprResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMetadata()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsSupported()).compareTo(other.isSetIsSupported()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsSupported()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isSupported, other.isSupported); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetFileMetadataByExprResult("); + boolean first = true; + + sb.append("metadata:"); + if (this.metadata == null) { + sb.append("null"); + } else { + sb.append(this.metadata); + } + first = false; + if (!first) sb.append(", "); + sb.append("isSupported:"); + sb.append(this.isSupported); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetMetadata()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'metadata' is unset! Struct:" + toString()); + } + + if (!isSetIsSupported()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'isSupported' is unset! Struct:" + toString()); + } + + // 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 { + // 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 GetFileMetadataByExprResultStandardSchemeFactory implements SchemeFactory { + public GetFileMetadataByExprResultStandardScheme getScheme() { + return new GetFileMetadataByExprResultStandardScheme(); + } + } + + private static class GetFileMetadataByExprResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetFileMetadataByExprResult 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: // METADATA + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map614 = iprot.readMapBegin(); + struct.metadata = new HashMap(2*_map614.size); + long _key615; + MetadataPpdResult _val616; + for (int _i617 = 0; _i617 < _map614.size; ++_i617) + { + _key615 = iprot.readI64(); + _val616 = new MetadataPpdResult(); + _val616.read(iprot); + struct.metadata.put(_key615, _val616); + } + iprot.readMapEnd(); + } + struct.setMetadataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IS_SUPPORTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isSupported = iprot.readBool(); + struct.setIsSupportedIsSet(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, GetFileMetadataByExprResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.metadata != null) { + oprot.writeFieldBegin(METADATA_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, struct.metadata.size())); + for (Map.Entry _iter618 : struct.metadata.entrySet()) + { + oprot.writeI64(_iter618.getKey()); + _iter618.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_SUPPORTED_FIELD_DESC); + oprot.writeBool(struct.isSupported); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetFileMetadataByExprResultTupleSchemeFactory implements SchemeFactory { + public GetFileMetadataByExprResultTupleScheme getScheme() { + return new GetFileMetadataByExprResultTupleScheme(); + } + } + + private static class GetFileMetadataByExprResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.metadata.size()); + for (Map.Entry _iter619 : struct.metadata.entrySet()) + { + oprot.writeI64(_iter619.getKey()); + _iter619.getValue().write(oprot); + } + } + oprot.writeBool(struct.isSupported); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TMap _map620 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.metadata = new HashMap(2*_map620.size); + long _key621; + MetadataPpdResult _val622; + for (int _i623 = 0; _i623 < _map620.size; ++_i623) + { + _key621 = iprot.readI64(); + _val622 = new MetadataPpdResult(); + _val622.read(iprot); + struct.metadata.put(_key621, _val622); + } + } + struct.setMetadataIsSet(true); + struct.isSupported = iprot.readBool(); + struct.setIsSupportedIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java new file mode 100644 index 0000000..f8c8258 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java @@ -0,0 +1,438 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetFileMetadataRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFileMetadataRequest"); + + private static final org.apache.thrift.protocol.TField FILE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fileIds", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetFileMetadataRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetFileMetadataRequestTupleSchemeFactory()); + } + + private List fileIds; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + FILE_IDS((short)1, "fileIds"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FILE_IDS + return FILE_IDS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.FILE_IDS, new org.apache.thrift.meta_data.FieldMetaData("fileIds", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetFileMetadataRequest.class, metaDataMap); + } + + public GetFileMetadataRequest() { + } + + public GetFileMetadataRequest( + List fileIds) + { + this(); + this.fileIds = fileIds; + } + + /** + * Performs a deep copy on other. + */ + public GetFileMetadataRequest(GetFileMetadataRequest other) { + if (other.isSetFileIds()) { + List __this__fileIds = new ArrayList(other.fileIds); + this.fileIds = __this__fileIds; + } + } + + public GetFileMetadataRequest deepCopy() { + return new GetFileMetadataRequest(this); + } + + @Override + public void clear() { + this.fileIds = null; + } + + public int getFileIdsSize() { + return (this.fileIds == null) ? 0 : this.fileIds.size(); + } + + public java.util.Iterator getFileIdsIterator() { + return (this.fileIds == null) ? null : this.fileIds.iterator(); + } + + public void addToFileIds(long elem) { + if (this.fileIds == null) { + this.fileIds = new ArrayList(); + } + this.fileIds.add(elem); + } + + public List getFileIds() { + return this.fileIds; + } + + public void setFileIds(List fileIds) { + this.fileIds = fileIds; + } + + public void unsetFileIds() { + this.fileIds = null; + } + + /** Returns true if field fileIds is set (has been assigned a value) and false otherwise */ + public boolean isSetFileIds() { + return this.fileIds != null; + } + + public void setFileIdsIsSet(boolean value) { + if (!value) { + this.fileIds = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FILE_IDS: + if (value == null) { + unsetFileIds(); + } else { + setFileIds((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FILE_IDS: + return getFileIds(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FILE_IDS: + return isSetFileIds(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetFileMetadataRequest) + return this.equals((GetFileMetadataRequest)that); + return false; + } + + public boolean equals(GetFileMetadataRequest that) { + if (that == null) + return false; + + boolean this_present_fileIds = true && this.isSetFileIds(); + boolean that_present_fileIds = true && that.isSetFileIds(); + if (this_present_fileIds || that_present_fileIds) { + if (!(this_present_fileIds && that_present_fileIds)) + return false; + if (!this.fileIds.equals(that.fileIds)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_fileIds = true && (isSetFileIds()); + list.add(present_fileIds); + if (present_fileIds) + list.add(fileIds); + + return list.hashCode(); + } + + @Override + public int compareTo(GetFileMetadataRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetFileIds()).compareTo(other.isSetFileIds()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFileIds()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileIds, other.fileIds); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetFileMetadataRequest("); + boolean first = true; + + sb.append("fileIds:"); + if (this.fileIds == null) { + sb.append("null"); + } else { + sb.append(this.fileIds); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetFileIds()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'fileIds' is unset! Struct:" + toString()); + } + + // 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 GetFileMetadataRequestStandardSchemeFactory implements SchemeFactory { + public GetFileMetadataRequestStandardScheme getScheme() { + return new GetFileMetadataRequestStandardScheme(); + } + } + + private static class GetFileMetadataRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetFileMetadataRequest 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: // FILE_IDS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list642 = iprot.readListBegin(); + struct.fileIds = new ArrayList(_list642.size); + long _elem643; + for (int _i644 = 0; _i644 < _list642.size; ++_i644) + { + _elem643 = iprot.readI64(); + struct.fileIds.add(_elem643); + } + iprot.readListEnd(); + } + struct.setFileIdsIsSet(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, GetFileMetadataRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.fileIds != null) { + oprot.writeFieldBegin(FILE_IDS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size())); + for (long _iter645 : struct.fileIds) + { + oprot.writeI64(_iter645); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetFileMetadataRequestTupleSchemeFactory implements SchemeFactory { + public GetFileMetadataRequestTupleScheme getScheme() { + return new GetFileMetadataRequestTupleScheme(); + } + } + + private static class GetFileMetadataRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.fileIds.size()); + for (long _iter646 : struct.fileIds) + { + oprot.writeI64(_iter646); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list647 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.fileIds = new ArrayList(_list647.size); + long _elem648; + for (int _i649 = 0; _i649 < _list647.size; ++_i649) + { + _elem648 = iprot.readI64(); + struct.fileIds.add(_elem648); + } + } + struct.setFileIdsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java new file mode 100644 index 0000000..73888e9 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java @@ -0,0 +1,540 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetFileMetadataResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFileMetadataResult"); + + private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final org.apache.thrift.protocol.TField IS_SUPPORTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isSupported", org.apache.thrift.protocol.TType.BOOL, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetFileMetadataResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetFileMetadataResultTupleSchemeFactory()); + } + + private Map metadata; // required + private boolean isSupported; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + METADATA((short)1, "metadata"), + IS_SUPPORTED((short)2, "isSupported"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // METADATA + return METADATA; + case 2: // IS_SUPPORTED + return IS_SUPPORTED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ISSUPPORTED_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.IS_SUPPORTED, new org.apache.thrift.meta_data.FieldMetaData("isSupported", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetFileMetadataResult.class, metaDataMap); + } + + public GetFileMetadataResult() { + } + + public GetFileMetadataResult( + Map metadata, + boolean isSupported) + { + this(); + this.metadata = metadata; + this.isSupported = isSupported; + setIsSupportedIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public GetFileMetadataResult(GetFileMetadataResult other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetMetadata()) { + Map __this__metadata = new HashMap(other.metadata); + this.metadata = __this__metadata; + } + this.isSupported = other.isSupported; + } + + public GetFileMetadataResult deepCopy() { + return new GetFileMetadataResult(this); + } + + @Override + public void clear() { + this.metadata = null; + setIsSupportedIsSet(false); + this.isSupported = false; + } + + public int getMetadataSize() { + return (this.metadata == null) ? 0 : this.metadata.size(); + } + + public void putToMetadata(long key, ByteBuffer val) { + if (this.metadata == null) { + this.metadata = new HashMap(); + } + this.metadata.put(key, val); + } + + public Map getMetadata() { + return this.metadata; + } + + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + public void unsetMetadata() { + this.metadata = null; + } + + /** Returns true if field metadata is set (has been assigned a value) and false otherwise */ + public boolean isSetMetadata() { + return this.metadata != null; + } + + public void setMetadataIsSet(boolean value) { + if (!value) { + this.metadata = null; + } + } + + public boolean isIsSupported() { + return this.isSupported; + } + + public void setIsSupported(boolean isSupported) { + this.isSupported = isSupported; + setIsSupportedIsSet(true); + } + + public void unsetIsSupported() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); + } + + /** Returns true if field isSupported is set (has been assigned a value) and false otherwise */ + public boolean isSetIsSupported() { + return EncodingUtils.testBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); + } + + public void setIsSupportedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case METADATA: + if (value == null) { + unsetMetadata(); + } else { + setMetadata((Map)value); + } + break; + + case IS_SUPPORTED: + if (value == null) { + unsetIsSupported(); + } else { + setIsSupported((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case METADATA: + return getMetadata(); + + case IS_SUPPORTED: + return isIsSupported(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case METADATA: + return isSetMetadata(); + case IS_SUPPORTED: + return isSetIsSupported(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetFileMetadataResult) + return this.equals((GetFileMetadataResult)that); + return false; + } + + public boolean equals(GetFileMetadataResult that) { + if (that == null) + return false; + + boolean this_present_metadata = true && this.isSetMetadata(); + boolean that_present_metadata = true && that.isSetMetadata(); + if (this_present_metadata || that_present_metadata) { + if (!(this_present_metadata && that_present_metadata)) + return false; + if (!this.metadata.equals(that.metadata)) + return false; + } + + boolean this_present_isSupported = true; + boolean that_present_isSupported = true; + if (this_present_isSupported || that_present_isSupported) { + if (!(this_present_isSupported && that_present_isSupported)) + return false; + if (this.isSupported != that.isSupported) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_metadata = true && (isSetMetadata()); + list.add(present_metadata); + if (present_metadata) + list.add(metadata); + + boolean present_isSupported = true; + list.add(present_isSupported); + if (present_isSupported) + list.add(isSupported); + + return list.hashCode(); + } + + @Override + public int compareTo(GetFileMetadataResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMetadata()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsSupported()).compareTo(other.isSetIsSupported()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsSupported()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isSupported, other.isSupported); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetFileMetadataResult("); + boolean first = true; + + sb.append("metadata:"); + if (this.metadata == null) { + sb.append("null"); + } else { + sb.append(this.metadata); + } + first = false; + if (!first) sb.append(", "); + sb.append("isSupported:"); + sb.append(this.isSupported); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetMetadata()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'metadata' is unset! Struct:" + toString()); + } + + if (!isSetIsSupported()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'isSupported' is unset! Struct:" + toString()); + } + + // 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 { + // 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 GetFileMetadataResultStandardSchemeFactory implements SchemeFactory { + public GetFileMetadataResultStandardScheme getScheme() { + return new GetFileMetadataResultStandardScheme(); + } + } + + private static class GetFileMetadataResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetFileMetadataResult 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: // METADATA + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map632 = iprot.readMapBegin(); + struct.metadata = new HashMap(2*_map632.size); + long _key633; + ByteBuffer _val634; + for (int _i635 = 0; _i635 < _map632.size; ++_i635) + { + _key633 = iprot.readI64(); + _val634 = iprot.readBinary(); + struct.metadata.put(_key633, _val634); + } + iprot.readMapEnd(); + } + struct.setMetadataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IS_SUPPORTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isSupported = iprot.readBool(); + struct.setIsSupportedIsSet(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, GetFileMetadataResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.metadata != null) { + oprot.writeFieldBegin(METADATA_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, struct.metadata.size())); + for (Map.Entry _iter636 : struct.metadata.entrySet()) + { + oprot.writeI64(_iter636.getKey()); + oprot.writeBinary(_iter636.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_SUPPORTED_FIELD_DESC); + oprot.writeBool(struct.isSupported); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetFileMetadataResultTupleSchemeFactory implements SchemeFactory { + public GetFileMetadataResultTupleScheme getScheme() { + return new GetFileMetadataResultTupleScheme(); + } + } + + private static class GetFileMetadataResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.metadata.size()); + for (Map.Entry _iter637 : struct.metadata.entrySet()) + { + oprot.writeI64(_iter637.getKey()); + oprot.writeBinary(_iter637.getValue()); + } + } + oprot.writeBool(struct.isSupported); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TMap _map638 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.metadata = new HashMap(2*_map638.size); + long _key639; + ByteBuffer _val640; + for (int _i641 = 0; _i641 < _map638.size; ++_i641) + { + _key639 = iprot.readI64(); + _val640 = iprot.readBinary(); + struct.metadata.put(_key639, _val640); + } + } + struct.setMetadataIsSet(true); + struct.isSupported = iprot.readBool(); + struct.setIsSupportedIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java new file mode 100644 index 0000000..18a8e62 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java @@ -0,0 +1,542 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetOpenTxnsInfoResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetOpenTxnsInfoResponse"); + + private static final org.apache.thrift.protocol.TField TXN_HIGH_WATER_MARK_FIELD_DESC = new org.apache.thrift.protocol.TField("txn_high_water_mark", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField OPEN_TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("open_txns", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetOpenTxnsInfoResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetOpenTxnsInfoResponseTupleSchemeFactory()); + } + + private long txn_high_water_mark; // required + private List open_txns; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TXN_HIGH_WATER_MARK((short)1, "txn_high_water_mark"), + OPEN_TXNS((short)2, "open_txns"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TXN_HIGH_WATER_MARK + return TXN_HIGH_WATER_MARK; + case 2: // OPEN_TXNS + return OPEN_TXNS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TXN_HIGH_WATER_MARK_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.TXN_HIGH_WATER_MARK, new org.apache.thrift.meta_data.FieldMetaData("txn_high_water_mark", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.OPEN_TXNS, new org.apache.thrift.meta_data.FieldMetaData("open_txns", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TxnInfo.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetOpenTxnsInfoResponse.class, metaDataMap); + } + + public GetOpenTxnsInfoResponse() { + } + + public GetOpenTxnsInfoResponse( + long txn_high_water_mark, + List open_txns) + { + this(); + this.txn_high_water_mark = txn_high_water_mark; + setTxn_high_water_markIsSet(true); + this.open_txns = open_txns; + } + + /** + * Performs a deep copy on other. + */ + public GetOpenTxnsInfoResponse(GetOpenTxnsInfoResponse other) { + __isset_bitfield = other.__isset_bitfield; + this.txn_high_water_mark = other.txn_high_water_mark; + if (other.isSetOpen_txns()) { + List __this__open_txns = new ArrayList(other.open_txns.size()); + for (TxnInfo other_element : other.open_txns) { + __this__open_txns.add(new TxnInfo(other_element)); + } + this.open_txns = __this__open_txns; + } + } + + public GetOpenTxnsInfoResponse deepCopy() { + return new GetOpenTxnsInfoResponse(this); + } + + @Override + public void clear() { + setTxn_high_water_markIsSet(false); + this.txn_high_water_mark = 0; + this.open_txns = null; + } + + public long getTxn_high_water_mark() { + return this.txn_high_water_mark; + } + + public void setTxn_high_water_mark(long txn_high_water_mark) { + this.txn_high_water_mark = txn_high_water_mark; + setTxn_high_water_markIsSet(true); + } + + public void unsetTxn_high_water_mark() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID); + } + + /** Returns true if field txn_high_water_mark is set (has been assigned a value) and false otherwise */ + public boolean isSetTxn_high_water_mark() { + return EncodingUtils.testBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID); + } + + public void setTxn_high_water_markIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID, value); + } + + public int getOpen_txnsSize() { + return (this.open_txns == null) ? 0 : this.open_txns.size(); + } + + public java.util.Iterator getOpen_txnsIterator() { + return (this.open_txns == null) ? null : this.open_txns.iterator(); + } + + public void addToOpen_txns(TxnInfo elem) { + if (this.open_txns == null) { + this.open_txns = new ArrayList(); + } + this.open_txns.add(elem); + } + + public List getOpen_txns() { + return this.open_txns; + } + + public void setOpen_txns(List open_txns) { + this.open_txns = open_txns; + } + + public void unsetOpen_txns() { + this.open_txns = null; + } + + /** Returns true if field open_txns is set (has been assigned a value) and false otherwise */ + public boolean isSetOpen_txns() { + return this.open_txns != null; + } + + public void setOpen_txnsIsSet(boolean value) { + if (!value) { + this.open_txns = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TXN_HIGH_WATER_MARK: + if (value == null) { + unsetTxn_high_water_mark(); + } else { + setTxn_high_water_mark((Long)value); + } + break; + + case OPEN_TXNS: + if (value == null) { + unsetOpen_txns(); + } else { + setOpen_txns((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TXN_HIGH_WATER_MARK: + return getTxn_high_water_mark(); + + case OPEN_TXNS: + return getOpen_txns(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TXN_HIGH_WATER_MARK: + return isSetTxn_high_water_mark(); + case OPEN_TXNS: + return isSetOpen_txns(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetOpenTxnsInfoResponse) + return this.equals((GetOpenTxnsInfoResponse)that); + return false; + } + + public boolean equals(GetOpenTxnsInfoResponse that) { + if (that == null) + return false; + + boolean this_present_txn_high_water_mark = true; + boolean that_present_txn_high_water_mark = true; + if (this_present_txn_high_water_mark || that_present_txn_high_water_mark) { + if (!(this_present_txn_high_water_mark && that_present_txn_high_water_mark)) + return false; + if (this.txn_high_water_mark != that.txn_high_water_mark) + return false; + } + + boolean this_present_open_txns = true && this.isSetOpen_txns(); + boolean that_present_open_txns = true && that.isSetOpen_txns(); + if (this_present_open_txns || that_present_open_txns) { + if (!(this_present_open_txns && that_present_open_txns)) + return false; + if (!this.open_txns.equals(that.open_txns)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_txn_high_water_mark = true; + list.add(present_txn_high_water_mark); + if (present_txn_high_water_mark) + list.add(txn_high_water_mark); + + boolean present_open_txns = true && (isSetOpen_txns()); + list.add(present_open_txns); + if (present_open_txns) + list.add(open_txns); + + return list.hashCode(); + } + + @Override + public int compareTo(GetOpenTxnsInfoResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTxn_high_water_mark()).compareTo(other.isSetTxn_high_water_mark()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxn_high_water_mark()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txn_high_water_mark, other.txn_high_water_mark); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOpen_txns()).compareTo(other.isSetOpen_txns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOpen_txns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open_txns, other.open_txns); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetOpenTxnsInfoResponse("); + boolean first = true; + + sb.append("txn_high_water_mark:"); + sb.append(this.txn_high_water_mark); + first = false; + if (!first) sb.append(", "); + sb.append("open_txns:"); + if (this.open_txns == null) { + sb.append("null"); + } else { + sb.append(this.open_txns); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetTxn_high_water_mark()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'txn_high_water_mark' is unset! Struct:" + toString()); + } + + if (!isSetOpen_txns()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'open_txns' is unset! Struct:" + toString()); + } + + // 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 { + // 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 GetOpenTxnsInfoResponseStandardSchemeFactory implements SchemeFactory { + public GetOpenTxnsInfoResponseStandardScheme getScheme() { + return new GetOpenTxnsInfoResponseStandardScheme(); + } + } + + private static class GetOpenTxnsInfoResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetOpenTxnsInfoResponse 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: // TXN_HIGH_WATER_MARK + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.txn_high_water_mark = iprot.readI64(); + struct.setTxn_high_water_markIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // OPEN_TXNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list492 = iprot.readListBegin(); + struct.open_txns = new ArrayList(_list492.size); + TxnInfo _elem493; + for (int _i494 = 0; _i494 < _list492.size; ++_i494) + { + _elem493 = new TxnInfo(); + _elem493.read(iprot); + struct.open_txns.add(_elem493); + } + iprot.readListEnd(); + } + struct.setOpen_txnsIsSet(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, GetOpenTxnsInfoResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(TXN_HIGH_WATER_MARK_FIELD_DESC); + oprot.writeI64(struct.txn_high_water_mark); + oprot.writeFieldEnd(); + if (struct.open_txns != null) { + oprot.writeFieldBegin(OPEN_TXNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.open_txns.size())); + for (TxnInfo _iter495 : struct.open_txns) + { + _iter495.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetOpenTxnsInfoResponseTupleSchemeFactory implements SchemeFactory { + public GetOpenTxnsInfoResponseTupleScheme getScheme() { + return new GetOpenTxnsInfoResponseTupleScheme(); + } + } + + private static class GetOpenTxnsInfoResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsInfoResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.txn_high_water_mark); + { + oprot.writeI32(struct.open_txns.size()); + for (TxnInfo _iter496 : struct.open_txns) + { + _iter496.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsInfoResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.txn_high_water_mark = iprot.readI64(); + struct.setTxn_high_water_markIsSet(true); + { + org.apache.thrift.protocol.TList _list497 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.open_txns = new ArrayList(_list497.size); + TxnInfo _elem498; + for (int _i499 = 0; _i499 < _list497.size; ++_i499) + { + _elem498 = new TxnInfo(); + _elem498.read(iprot); + struct.open_txns.add(_elem498); + } + } + struct.setOpen_txnsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java new file mode 100644 index 0000000..386c105 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java @@ -0,0 +1,750 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetOpenTxnsResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetOpenTxnsResponse"); + + private static final org.apache.thrift.protocol.TField TXN_HIGH_WATER_MARK_FIELD_DESC = new org.apache.thrift.protocol.TField("txn_high_water_mark", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField OPEN_TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("open_txns", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField MIN_OPEN_TXN_FIELD_DESC = new org.apache.thrift.protocol.TField("min_open_txn", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField ABORTED_BITS_FIELD_DESC = new org.apache.thrift.protocol.TField("abortedBits", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetOpenTxnsResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetOpenTxnsResponseTupleSchemeFactory()); + } + + private long txn_high_water_mark; // required + private List open_txns; // required + private long min_open_txn; // optional + private ByteBuffer abortedBits; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TXN_HIGH_WATER_MARK((short)1, "txn_high_water_mark"), + OPEN_TXNS((short)2, "open_txns"), + MIN_OPEN_TXN((short)3, "min_open_txn"), + ABORTED_BITS((short)4, "abortedBits"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TXN_HIGH_WATER_MARK + return TXN_HIGH_WATER_MARK; + case 2: // OPEN_TXNS + return OPEN_TXNS; + case 3: // MIN_OPEN_TXN + return MIN_OPEN_TXN; + case 4: // ABORTED_BITS + return ABORTED_BITS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TXN_HIGH_WATER_MARK_ISSET_ID = 0; + private static final int __MIN_OPEN_TXN_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.MIN_OPEN_TXN}; + 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); + tmpMap.put(_Fields.TXN_HIGH_WATER_MARK, new org.apache.thrift.meta_data.FieldMetaData("txn_high_water_mark", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.OPEN_TXNS, new org.apache.thrift.meta_data.FieldMetaData("open_txns", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + tmpMap.put(_Fields.MIN_OPEN_TXN, new org.apache.thrift.meta_data.FieldMetaData("min_open_txn", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ABORTED_BITS, new org.apache.thrift.meta_data.FieldMetaData("abortedBits", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetOpenTxnsResponse.class, metaDataMap); + } + + public GetOpenTxnsResponse() { + } + + public GetOpenTxnsResponse( + long txn_high_water_mark, + List open_txns, + ByteBuffer abortedBits) + { + this(); + this.txn_high_water_mark = txn_high_water_mark; + setTxn_high_water_markIsSet(true); + this.open_txns = open_txns; + this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(abortedBits); + } + + /** + * Performs a deep copy on other. + */ + public GetOpenTxnsResponse(GetOpenTxnsResponse other) { + __isset_bitfield = other.__isset_bitfield; + this.txn_high_water_mark = other.txn_high_water_mark; + if (other.isSetOpen_txns()) { + List __this__open_txns = new ArrayList(other.open_txns); + this.open_txns = __this__open_txns; + } + this.min_open_txn = other.min_open_txn; + if (other.isSetAbortedBits()) { + this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(other.abortedBits); + } + } + + public GetOpenTxnsResponse deepCopy() { + return new GetOpenTxnsResponse(this); + } + + @Override + public void clear() { + setTxn_high_water_markIsSet(false); + this.txn_high_water_mark = 0; + this.open_txns = null; + setMin_open_txnIsSet(false); + this.min_open_txn = 0; + this.abortedBits = null; + } + + public long getTxn_high_water_mark() { + return this.txn_high_water_mark; + } + + public void setTxn_high_water_mark(long txn_high_water_mark) { + this.txn_high_water_mark = txn_high_water_mark; + setTxn_high_water_markIsSet(true); + } + + public void unsetTxn_high_water_mark() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID); + } + + /** Returns true if field txn_high_water_mark is set (has been assigned a value) and false otherwise */ + public boolean isSetTxn_high_water_mark() { + return EncodingUtils.testBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID); + } + + public void setTxn_high_water_markIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID, value); + } + + public int getOpen_txnsSize() { + return (this.open_txns == null) ? 0 : this.open_txns.size(); + } + + public java.util.Iterator getOpen_txnsIterator() { + return (this.open_txns == null) ? null : this.open_txns.iterator(); + } + + public void addToOpen_txns(long elem) { + if (this.open_txns == null) { + this.open_txns = new ArrayList(); + } + this.open_txns.add(elem); + } + + public List getOpen_txns() { + return this.open_txns; + } + + public void setOpen_txns(List open_txns) { + this.open_txns = open_txns; + } + + public void unsetOpen_txns() { + this.open_txns = null; + } + + /** Returns true if field open_txns is set (has been assigned a value) and false otherwise */ + public boolean isSetOpen_txns() { + return this.open_txns != null; + } + + public void setOpen_txnsIsSet(boolean value) { + if (!value) { + this.open_txns = null; + } + } + + public long getMin_open_txn() { + return this.min_open_txn; + } + + public void setMin_open_txn(long min_open_txn) { + this.min_open_txn = min_open_txn; + setMin_open_txnIsSet(true); + } + + public void unsetMin_open_txn() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MIN_OPEN_TXN_ISSET_ID); + } + + /** Returns true if field min_open_txn is set (has been assigned a value) and false otherwise */ + public boolean isSetMin_open_txn() { + return EncodingUtils.testBit(__isset_bitfield, __MIN_OPEN_TXN_ISSET_ID); + } + + public void setMin_open_txnIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MIN_OPEN_TXN_ISSET_ID, value); + } + + public byte[] getAbortedBits() { + setAbortedBits(org.apache.thrift.TBaseHelper.rightSize(abortedBits)); + return abortedBits == null ? null : abortedBits.array(); + } + + public ByteBuffer bufferForAbortedBits() { + return org.apache.thrift.TBaseHelper.copyBinary(abortedBits); + } + + public void setAbortedBits(byte[] abortedBits) { + this.abortedBits = abortedBits == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(abortedBits, abortedBits.length)); + } + + public void setAbortedBits(ByteBuffer abortedBits) { + this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(abortedBits); + } + + public void unsetAbortedBits() { + this.abortedBits = null; + } + + /** Returns true if field abortedBits is set (has been assigned a value) and false otherwise */ + public boolean isSetAbortedBits() { + return this.abortedBits != null; + } + + public void setAbortedBitsIsSet(boolean value) { + if (!value) { + this.abortedBits = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TXN_HIGH_WATER_MARK: + if (value == null) { + unsetTxn_high_water_mark(); + } else { + setTxn_high_water_mark((Long)value); + } + break; + + case OPEN_TXNS: + if (value == null) { + unsetOpen_txns(); + } else { + setOpen_txns((List)value); + } + break; + + case MIN_OPEN_TXN: + if (value == null) { + unsetMin_open_txn(); + } else { + setMin_open_txn((Long)value); + } + break; + + case ABORTED_BITS: + if (value == null) { + unsetAbortedBits(); + } else { + setAbortedBits((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TXN_HIGH_WATER_MARK: + return getTxn_high_water_mark(); + + case OPEN_TXNS: + return getOpen_txns(); + + case MIN_OPEN_TXN: + return getMin_open_txn(); + + case ABORTED_BITS: + return getAbortedBits(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TXN_HIGH_WATER_MARK: + return isSetTxn_high_water_mark(); + case OPEN_TXNS: + return isSetOpen_txns(); + case MIN_OPEN_TXN: + return isSetMin_open_txn(); + case ABORTED_BITS: + return isSetAbortedBits(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetOpenTxnsResponse) + return this.equals((GetOpenTxnsResponse)that); + return false; + } + + public boolean equals(GetOpenTxnsResponse that) { + if (that == null) + return false; + + boolean this_present_txn_high_water_mark = true; + boolean that_present_txn_high_water_mark = true; + if (this_present_txn_high_water_mark || that_present_txn_high_water_mark) { + if (!(this_present_txn_high_water_mark && that_present_txn_high_water_mark)) + return false; + if (this.txn_high_water_mark != that.txn_high_water_mark) + return false; + } + + boolean this_present_open_txns = true && this.isSetOpen_txns(); + boolean that_present_open_txns = true && that.isSetOpen_txns(); + if (this_present_open_txns || that_present_open_txns) { + if (!(this_present_open_txns && that_present_open_txns)) + return false; + if (!this.open_txns.equals(that.open_txns)) + return false; + } + + boolean this_present_min_open_txn = true && this.isSetMin_open_txn(); + boolean that_present_min_open_txn = true && that.isSetMin_open_txn(); + if (this_present_min_open_txn || that_present_min_open_txn) { + if (!(this_present_min_open_txn && that_present_min_open_txn)) + return false; + if (this.min_open_txn != that.min_open_txn) + return false; + } + + boolean this_present_abortedBits = true && this.isSetAbortedBits(); + boolean that_present_abortedBits = true && that.isSetAbortedBits(); + if (this_present_abortedBits || that_present_abortedBits) { + if (!(this_present_abortedBits && that_present_abortedBits)) + return false; + if (!this.abortedBits.equals(that.abortedBits)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_txn_high_water_mark = true; + list.add(present_txn_high_water_mark); + if (present_txn_high_water_mark) + list.add(txn_high_water_mark); + + boolean present_open_txns = true && (isSetOpen_txns()); + list.add(present_open_txns); + if (present_open_txns) + list.add(open_txns); + + boolean present_min_open_txn = true && (isSetMin_open_txn()); + list.add(present_min_open_txn); + if (present_min_open_txn) + list.add(min_open_txn); + + boolean present_abortedBits = true && (isSetAbortedBits()); + list.add(present_abortedBits); + if (present_abortedBits) + list.add(abortedBits); + + return list.hashCode(); + } + + @Override + public int compareTo(GetOpenTxnsResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTxn_high_water_mark()).compareTo(other.isSetTxn_high_water_mark()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxn_high_water_mark()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txn_high_water_mark, other.txn_high_water_mark); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOpen_txns()).compareTo(other.isSetOpen_txns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOpen_txns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open_txns, other.open_txns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMin_open_txn()).compareTo(other.isSetMin_open_txn()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMin_open_txn()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.min_open_txn, other.min_open_txn); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAbortedBits()).compareTo(other.isSetAbortedBits()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAbortedBits()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.abortedBits, other.abortedBits); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetOpenTxnsResponse("); + boolean first = true; + + sb.append("txn_high_water_mark:"); + sb.append(this.txn_high_water_mark); + first = false; + if (!first) sb.append(", "); + sb.append("open_txns:"); + if (this.open_txns == null) { + sb.append("null"); + } else { + sb.append(this.open_txns); + } + first = false; + if (isSetMin_open_txn()) { + if (!first) sb.append(", "); + sb.append("min_open_txn:"); + sb.append(this.min_open_txn); + first = false; + } + if (!first) sb.append(", "); + sb.append("abortedBits:"); + if (this.abortedBits == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.abortedBits, sb); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetTxn_high_water_mark()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'txn_high_water_mark' is unset! Struct:" + toString()); + } + + if (!isSetOpen_txns()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'open_txns' is unset! Struct:" + toString()); + } + + if (!isSetAbortedBits()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'abortedBits' is unset! Struct:" + toString()); + } + + // 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 { + // 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 GetOpenTxnsResponseStandardSchemeFactory implements SchemeFactory { + public GetOpenTxnsResponseStandardScheme getScheme() { + return new GetOpenTxnsResponseStandardScheme(); + } + } + + private static class GetOpenTxnsResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetOpenTxnsResponse 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: // TXN_HIGH_WATER_MARK + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.txn_high_water_mark = iprot.readI64(); + struct.setTxn_high_water_markIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // OPEN_TXNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list500 = iprot.readListBegin(); + struct.open_txns = new ArrayList(_list500.size); + long _elem501; + for (int _i502 = 0; _i502 < _list500.size; ++_i502) + { + _elem501 = iprot.readI64(); + struct.open_txns.add(_elem501); + } + iprot.readListEnd(); + } + struct.setOpen_txnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MIN_OPEN_TXN + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.min_open_txn = iprot.readI64(); + struct.setMin_open_txnIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ABORTED_BITS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.abortedBits = iprot.readBinary(); + struct.setAbortedBitsIsSet(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, GetOpenTxnsResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(TXN_HIGH_WATER_MARK_FIELD_DESC); + oprot.writeI64(struct.txn_high_water_mark); + oprot.writeFieldEnd(); + if (struct.open_txns != null) { + oprot.writeFieldBegin(OPEN_TXNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.open_txns.size())); + for (long _iter503 : struct.open_txns) + { + oprot.writeI64(_iter503); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetMin_open_txn()) { + oprot.writeFieldBegin(MIN_OPEN_TXN_FIELD_DESC); + oprot.writeI64(struct.min_open_txn); + oprot.writeFieldEnd(); + } + if (struct.abortedBits != null) { + oprot.writeFieldBegin(ABORTED_BITS_FIELD_DESC); + oprot.writeBinary(struct.abortedBits); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetOpenTxnsResponseTupleSchemeFactory implements SchemeFactory { + public GetOpenTxnsResponseTupleScheme getScheme() { + return new GetOpenTxnsResponseTupleScheme(); + } + } + + private static class GetOpenTxnsResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.txn_high_water_mark); + { + oprot.writeI32(struct.open_txns.size()); + for (long _iter504 : struct.open_txns) + { + oprot.writeI64(_iter504); + } + } + oprot.writeBinary(struct.abortedBits); + BitSet optionals = new BitSet(); + if (struct.isSetMin_open_txn()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMin_open_txn()) { + oprot.writeI64(struct.min_open_txn); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.txn_high_water_mark = iprot.readI64(); + struct.setTxn_high_water_markIsSet(true); + { + org.apache.thrift.protocol.TList _list505 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.open_txns = new ArrayList(_list505.size); + long _elem506; + for (int _i507 = 0; _i507 < _list505.size; ++_i507) + { + _elem506 = iprot.readI64(); + struct.open_txns.add(_elem506); + } + } + struct.setOpen_txnsIsSet(true); + struct.abortedBits = iprot.readBinary(); + struct.setAbortedBitsIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.min_open_txn = iprot.readI64(); + struct.setMin_open_txnIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java new file mode 100644 index 0000000..342b268 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java @@ -0,0 +1,389 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetPrincipalsInRoleRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPrincipalsInRoleRequest"); + + private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetPrincipalsInRoleRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetPrincipalsInRoleRequestTupleSchemeFactory()); + } + + private String roleName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ROLE_NAME((short)1, "roleName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ROLE_NAME + return ROLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetPrincipalsInRoleRequest.class, metaDataMap); + } + + public GetPrincipalsInRoleRequest() { + } + + public GetPrincipalsInRoleRequest( + String roleName) + { + this(); + this.roleName = roleName; + } + + /** + * Performs a deep copy on other. + */ + public GetPrincipalsInRoleRequest(GetPrincipalsInRoleRequest other) { + if (other.isSetRoleName()) { + this.roleName = other.roleName; + } + } + + public GetPrincipalsInRoleRequest deepCopy() { + return new GetPrincipalsInRoleRequest(this); + } + + @Override + public void clear() { + this.roleName = null; + } + + public String getRoleName() { + return this.roleName; + } + + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + public void unsetRoleName() { + this.roleName = null; + } + + /** Returns true if field roleName is set (has been assigned a value) and false otherwise */ + public boolean isSetRoleName() { + return this.roleName != null; + } + + public void setRoleNameIsSet(boolean value) { + if (!value) { + this.roleName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROLE_NAME: + if (value == null) { + unsetRoleName(); + } else { + setRoleName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROLE_NAME: + return getRoleName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ROLE_NAME: + return isSetRoleName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetPrincipalsInRoleRequest) + return this.equals((GetPrincipalsInRoleRequest)that); + return false; + } + + public boolean equals(GetPrincipalsInRoleRequest that) { + if (that == null) + return false; + + boolean this_present_roleName = true && this.isSetRoleName(); + boolean that_present_roleName = true && that.isSetRoleName(); + if (this_present_roleName || that_present_roleName) { + if (!(this_present_roleName && that_present_roleName)) + return false; + if (!this.roleName.equals(that.roleName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_roleName = true && (isSetRoleName()); + list.add(present_roleName); + if (present_roleName) + list.add(roleName); + + return list.hashCode(); + } + + @Override + public int compareTo(GetPrincipalsInRoleRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRoleName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetPrincipalsInRoleRequest("); + boolean first = true; + + sb.append("roleName:"); + if (this.roleName == null) { + sb.append("null"); + } else { + sb.append(this.roleName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetRoleName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString()); + } + + // 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 GetPrincipalsInRoleRequestStandardSchemeFactory implements SchemeFactory { + public GetPrincipalsInRoleRequestStandardScheme getScheme() { + return new GetPrincipalsInRoleRequestStandardScheme(); + } + } + + private static class GetPrincipalsInRoleRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrincipalsInRoleRequest 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; + 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, GetPrincipalsInRoleRequest 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.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetPrincipalsInRoleRequestTupleSchemeFactory implements SchemeFactory { + public GetPrincipalsInRoleRequestTupleScheme getScheme() { + return new GetPrincipalsInRoleRequestTupleScheme(); + } + } + + private static class GetPrincipalsInRoleRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.roleName); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.roleName = iprot.readString(); + struct.setRoleNameIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java new file mode 100644 index 0000000..02c652a --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetPrincipalsInRoleResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPrincipalsInRoleResponse"); + + private static final org.apache.thrift.protocol.TField PRINCIPAL_GRANTS_FIELD_DESC = new org.apache.thrift.protocol.TField("principalGrants", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetPrincipalsInRoleResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetPrincipalsInRoleResponseTupleSchemeFactory()); + } + + private List principalGrants; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PRINCIPAL_GRANTS((short)1, "principalGrants"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PRINCIPAL_GRANTS + return PRINCIPAL_GRANTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PRINCIPAL_GRANTS, new org.apache.thrift.meta_data.FieldMetaData("principalGrants", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RolePrincipalGrant.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetPrincipalsInRoleResponse.class, metaDataMap); + } + + public GetPrincipalsInRoleResponse() { + } + + public GetPrincipalsInRoleResponse( + List principalGrants) + { + this(); + this.principalGrants = principalGrants; + } + + /** + * Performs a deep copy on other. + */ + public GetPrincipalsInRoleResponse(GetPrincipalsInRoleResponse other) { + if (other.isSetPrincipalGrants()) { + List __this__principalGrants = new ArrayList(other.principalGrants.size()); + for (RolePrincipalGrant other_element : other.principalGrants) { + __this__principalGrants.add(new RolePrincipalGrant(other_element)); + } + this.principalGrants = __this__principalGrants; + } + } + + public GetPrincipalsInRoleResponse deepCopy() { + return new GetPrincipalsInRoleResponse(this); + } + + @Override + public void clear() { + this.principalGrants = null; + } + + public int getPrincipalGrantsSize() { + return (this.principalGrants == null) ? 0 : this.principalGrants.size(); + } + + public java.util.Iterator getPrincipalGrantsIterator() { + return (this.principalGrants == null) ? null : this.principalGrants.iterator(); + } + + public void addToPrincipalGrants(RolePrincipalGrant elem) { + if (this.principalGrants == null) { + this.principalGrants = new ArrayList(); + } + this.principalGrants.add(elem); + } + + public List getPrincipalGrants() { + return this.principalGrants; + } + + public void setPrincipalGrants(List principalGrants) { + this.principalGrants = principalGrants; + } + + public void unsetPrincipalGrants() { + this.principalGrants = null; + } + + /** Returns true if field principalGrants is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipalGrants() { + return this.principalGrants != null; + } + + public void setPrincipalGrantsIsSet(boolean value) { + if (!value) { + this.principalGrants = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRINCIPAL_GRANTS: + if (value == null) { + unsetPrincipalGrants(); + } else { + setPrincipalGrants((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRINCIPAL_GRANTS: + return getPrincipalGrants(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRINCIPAL_GRANTS: + return isSetPrincipalGrants(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetPrincipalsInRoleResponse) + return this.equals((GetPrincipalsInRoleResponse)that); + return false; + } + + public boolean equals(GetPrincipalsInRoleResponse that) { + if (that == null) + return false; + + boolean this_present_principalGrants = true && this.isSetPrincipalGrants(); + boolean that_present_principalGrants = true && that.isSetPrincipalGrants(); + if (this_present_principalGrants || that_present_principalGrants) { + if (!(this_present_principalGrants && that_present_principalGrants)) + return false; + if (!this.principalGrants.equals(that.principalGrants)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_principalGrants = true && (isSetPrincipalGrants()); + list.add(present_principalGrants); + if (present_principalGrants) + list.add(principalGrants); + + return list.hashCode(); + } + + @Override + public int compareTo(GetPrincipalsInRoleResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPrincipalGrants()).compareTo(other.isSetPrincipalGrants()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalGrants()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalGrants, other.principalGrants); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetPrincipalsInRoleResponse("); + boolean first = true; + + sb.append("principalGrants:"); + if (this.principalGrants == null) { + sb.append("null"); + } else { + sb.append(this.principalGrants); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetPrincipalGrants()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'principalGrants' is unset! Struct:" + toString()); + } + + // 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 GetPrincipalsInRoleResponseStandardSchemeFactory implements SchemeFactory { + public GetPrincipalsInRoleResponseStandardScheme getScheme() { + return new GetPrincipalsInRoleResponseStandardScheme(); + } + } + + private static class GetPrincipalsInRoleResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrincipalsInRoleResponse 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_GRANTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list86 = iprot.readListBegin(); + struct.principalGrants = new ArrayList(_list86.size); + RolePrincipalGrant _elem87; + for (int _i88 = 0; _i88 < _list86.size; ++_i88) + { + _elem87 = new RolePrincipalGrant(); + _elem87.read(iprot); + struct.principalGrants.add(_elem87); + } + iprot.readListEnd(); + } + struct.setPrincipalGrantsIsSet(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, GetPrincipalsInRoleResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.principalGrants != null) { + oprot.writeFieldBegin(PRINCIPAL_GRANTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.principalGrants.size())); + for (RolePrincipalGrant _iter89 : struct.principalGrants) + { + _iter89.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetPrincipalsInRoleResponseTupleSchemeFactory implements SchemeFactory { + public GetPrincipalsInRoleResponseTupleScheme getScheme() { + return new GetPrincipalsInRoleResponseTupleScheme(); + } + } + + private static class GetPrincipalsInRoleResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.principalGrants.size()); + for (RolePrincipalGrant _iter90 : struct.principalGrants) + { + _iter90.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.principalGrants = new ArrayList(_list91.size); + RolePrincipalGrant _elem92; + for (int _i93 = 0; _i93 < _list91.size; ++_i93) + { + _elem92 = new RolePrincipalGrant(); + _elem92.read(iprot); + struct.principalGrants.add(_elem92); + } + } + struct.setPrincipalGrantsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java new file mode 100644 index 0000000..ea667d3 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java @@ -0,0 +1,502 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetRoleGrantsForPrincipalRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetRoleGrantsForPrincipalRequest"); + + 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 GetRoleGrantsForPrincipalRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetRoleGrantsForPrincipalRequestTupleSchemeFactory()); + } + + private String principal_name; // required + private PrincipalType principal_type; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PRINCIPAL_NAME((short)1, "principal_name"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)2, "principal_type"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetRoleGrantsForPrincipalRequest.class, metaDataMap); + } + + public GetRoleGrantsForPrincipalRequest() { + } + + public GetRoleGrantsForPrincipalRequest( + String principal_name, + PrincipalType principal_type) + { + this(); + this.principal_name = principal_name; + this.principal_type = principal_type; + } + + /** + * Performs a deep copy on other. + */ + public GetRoleGrantsForPrincipalRequest(GetRoleGrantsForPrincipalRequest other) { + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + if (other.isSetPrincipal_type()) { + this.principal_type = other.principal_type; + } + } + + public GetRoleGrantsForPrincipalRequest deepCopy() { + return new GetRoleGrantsForPrincipalRequest(this); + } + + @Override + public void clear() { + this.principal_name = null; + this.principal_type = null; + } + + public String getPrincipal_name() { + return this.principal_name; + } + + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; + } + + public void unsetPrincipal_name() { + this.principal_name = null; + } + + /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipal_name() { + return this.principal_name != null; + } + + public void setPrincipal_nameIsSet(boolean value) { + if (!value) { + this.principal_name = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipal_type() { + return this.principal_type; + } + + /** + * + * @see PrincipalType + */ + public void setPrincipal_type(PrincipalType principal_type) { + this.principal_type = principal_type; + } + + public void unsetPrincipal_type() { + this.principal_type = null; + } + + /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipal_type() { + return this.principal_type != null; + } + + public void setPrincipal_typeIsSet(boolean value) { + if (!value) { + this.principal_type = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipal_name(); + } else { + setPrincipal_name((String)value); + } + break; + + case PRINCIPAL_TYPE: + if (value == null) { + unsetPrincipal_type(); + } else { + setPrincipal_type((PrincipalType)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRINCIPAL_NAME: + return getPrincipal_name(); + + case PRINCIPAL_TYPE: + return getPrincipal_type(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case PRINCIPAL_TYPE: + return isSetPrincipal_type(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetRoleGrantsForPrincipalRequest) + return this.equals((GetRoleGrantsForPrincipalRequest)that); + return false; + } + + public boolean equals(GetRoleGrantsForPrincipalRequest that) { + if (that == null) + return false; + + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) + return false; + if (!this.principal_name.equals(that.principal_name)) + return false; + } + + boolean this_present_principal_type = true && this.isSetPrincipal_type(); + boolean that_present_principal_type = true && that.isSetPrincipal_type(); + if (this_present_principal_type || that_present_principal_type) { + if (!(this_present_principal_type && that_present_principal_type)) + return false; + if (!this.principal_type.equals(that.principal_type)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_principal_name = true && (isSetPrincipal_name()); + list.add(present_principal_name); + if (present_principal_name) + list.add(principal_name); + + boolean present_principal_type = true && (isSetPrincipal_type()); + list.add(present_principal_type); + if (present_principal_type) + list.add(principal_type.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(GetRoleGrantsForPrincipalRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_type()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetRoleGrantsForPrincipalRequest("); + boolean first = true; + + sb.append("principal_name:"); + if (this.principal_name == null) { + sb.append("null"); + } else { + sb.append(this.principal_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("principal_type:"); + if (this.principal_type == null) { + sb.append("null"); + } else { + sb.append(this.principal_type); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetPrincipal_name()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'principal_name' is unset! Struct:" + toString()); + } + + if (!isSetPrincipal_type()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'principal_type' is unset! Struct:" + toString()); + } + + // 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 GetRoleGrantsForPrincipalRequestStandardSchemeFactory implements SchemeFactory { + public GetRoleGrantsForPrincipalRequestStandardScheme getScheme() { + return new GetRoleGrantsForPrincipalRequestStandardScheme(); + } + } + + private static class GetRoleGrantsForPrincipalRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetRoleGrantsForPrincipalRequest 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 = org.apache.hadoop.hive.metastore.api.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, GetRoleGrantsForPrincipalRequest 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 GetRoleGrantsForPrincipalRequestTupleSchemeFactory implements SchemeFactory { + public GetRoleGrantsForPrincipalRequestTupleScheme getScheme() { + return new GetRoleGrantsForPrincipalRequestTupleScheme(); + } + } + + private static class GetRoleGrantsForPrincipalRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.principal_name); + oprot.writeI32(struct.principal_type.getValue()); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.principal_name = iprot.readString(); + struct.setPrincipal_nameIsSet(true); + struct.principal_type = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java new file mode 100644 index 0000000..c013e0e --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetRoleGrantsForPrincipalResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetRoleGrantsForPrincipalResponse"); + + private static final org.apache.thrift.protocol.TField PRINCIPAL_GRANTS_FIELD_DESC = new org.apache.thrift.protocol.TField("principalGrants", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetRoleGrantsForPrincipalResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetRoleGrantsForPrincipalResponseTupleSchemeFactory()); + } + + private List principalGrants; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PRINCIPAL_GRANTS((short)1, "principalGrants"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PRINCIPAL_GRANTS + return PRINCIPAL_GRANTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PRINCIPAL_GRANTS, new org.apache.thrift.meta_data.FieldMetaData("principalGrants", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RolePrincipalGrant.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetRoleGrantsForPrincipalResponse.class, metaDataMap); + } + + public GetRoleGrantsForPrincipalResponse() { + } + + public GetRoleGrantsForPrincipalResponse( + List principalGrants) + { + this(); + this.principalGrants = principalGrants; + } + + /** + * Performs a deep copy on other. + */ + public GetRoleGrantsForPrincipalResponse(GetRoleGrantsForPrincipalResponse other) { + if (other.isSetPrincipalGrants()) { + List __this__principalGrants = new ArrayList(other.principalGrants.size()); + for (RolePrincipalGrant other_element : other.principalGrants) { + __this__principalGrants.add(new RolePrincipalGrant(other_element)); + } + this.principalGrants = __this__principalGrants; + } + } + + public GetRoleGrantsForPrincipalResponse deepCopy() { + return new GetRoleGrantsForPrincipalResponse(this); + } + + @Override + public void clear() { + this.principalGrants = null; + } + + public int getPrincipalGrantsSize() { + return (this.principalGrants == null) ? 0 : this.principalGrants.size(); + } + + public java.util.Iterator getPrincipalGrantsIterator() { + return (this.principalGrants == null) ? null : this.principalGrants.iterator(); + } + + public void addToPrincipalGrants(RolePrincipalGrant elem) { + if (this.principalGrants == null) { + this.principalGrants = new ArrayList(); + } + this.principalGrants.add(elem); + } + + public List getPrincipalGrants() { + return this.principalGrants; + } + + public void setPrincipalGrants(List principalGrants) { + this.principalGrants = principalGrants; + } + + public void unsetPrincipalGrants() { + this.principalGrants = null; + } + + /** Returns true if field principalGrants is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipalGrants() { + return this.principalGrants != null; + } + + public void setPrincipalGrantsIsSet(boolean value) { + if (!value) { + this.principalGrants = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRINCIPAL_GRANTS: + if (value == null) { + unsetPrincipalGrants(); + } else { + setPrincipalGrants((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRINCIPAL_GRANTS: + return getPrincipalGrants(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRINCIPAL_GRANTS: + return isSetPrincipalGrants(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetRoleGrantsForPrincipalResponse) + return this.equals((GetRoleGrantsForPrincipalResponse)that); + return false; + } + + public boolean equals(GetRoleGrantsForPrincipalResponse that) { + if (that == null) + return false; + + boolean this_present_principalGrants = true && this.isSetPrincipalGrants(); + boolean that_present_principalGrants = true && that.isSetPrincipalGrants(); + if (this_present_principalGrants || that_present_principalGrants) { + if (!(this_present_principalGrants && that_present_principalGrants)) + return false; + if (!this.principalGrants.equals(that.principalGrants)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_principalGrants = true && (isSetPrincipalGrants()); + list.add(present_principalGrants); + if (present_principalGrants) + list.add(principalGrants); + + return list.hashCode(); + } + + @Override + public int compareTo(GetRoleGrantsForPrincipalResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPrincipalGrants()).compareTo(other.isSetPrincipalGrants()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalGrants()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalGrants, other.principalGrants); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetRoleGrantsForPrincipalResponse("); + boolean first = true; + + sb.append("principalGrants:"); + if (this.principalGrants == null) { + sb.append("null"); + } else { + sb.append(this.principalGrants); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetPrincipalGrants()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'principalGrants' is unset! Struct:" + toString()); + } + + // 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 GetRoleGrantsForPrincipalResponseStandardSchemeFactory implements SchemeFactory { + public GetRoleGrantsForPrincipalResponseStandardScheme getScheme() { + return new GetRoleGrantsForPrincipalResponseStandardScheme(); + } + } + + private static class GetRoleGrantsForPrincipalResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetRoleGrantsForPrincipalResponse 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_GRANTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list78 = iprot.readListBegin(); + struct.principalGrants = new ArrayList(_list78.size); + RolePrincipalGrant _elem79; + for (int _i80 = 0; _i80 < _list78.size; ++_i80) + { + _elem79 = new RolePrincipalGrant(); + _elem79.read(iprot); + struct.principalGrants.add(_elem79); + } + iprot.readListEnd(); + } + struct.setPrincipalGrantsIsSet(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, GetRoleGrantsForPrincipalResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.principalGrants != null) { + oprot.writeFieldBegin(PRINCIPAL_GRANTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.principalGrants.size())); + for (RolePrincipalGrant _iter81 : struct.principalGrants) + { + _iter81.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetRoleGrantsForPrincipalResponseTupleSchemeFactory implements SchemeFactory { + public GetRoleGrantsForPrincipalResponseTupleScheme getScheme() { + return new GetRoleGrantsForPrincipalResponseTupleScheme(); + } + } + + private static class GetRoleGrantsForPrincipalResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.principalGrants.size()); + for (RolePrincipalGrant _iter82 : struct.principalGrants) + { + _iter82.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list83 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.principalGrants = new ArrayList(_list83.size); + RolePrincipalGrant _elem84; + for (int _i85 = 0; _i85 < _list83.size; ++_i85) + { + _elem84 = new RolePrincipalGrant(); + _elem84.read(iprot); + struct.principalGrants.add(_elem84); + } + } + struct.setPrincipalGrantsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTableRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTableRequest.java new file mode 100644 index 0000000..5f12975 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTableRequest.java @@ -0,0 +1,605 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetTableRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTableRequest"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField CAPABILITIES_FIELD_DESC = new org.apache.thrift.protocol.TField("capabilities", org.apache.thrift.protocol.TType.STRUCT, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetTableRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetTableRequestTupleSchemeFactory()); + } + + private String dbName; // required + private String tblName; // required + private ClientCapabilities capabilities; // 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 { + DB_NAME((short)1, "dbName"), + TBL_NAME((short)2, "tblName"), + CAPABILITIES((short)3, "capabilities"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // CAPABILITIES + return CAPABILITIES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.CAPABILITIES}; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CAPABILITIES, new org.apache.thrift.meta_data.FieldMetaData("capabilities", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClientCapabilities.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTableRequest.class, metaDataMap); + } + + public GetTableRequest() { + } + + public GetTableRequest( + String dbName, + String tblName) + { + this(); + this.dbName = dbName; + this.tblName = tblName; + } + + /** + * Performs a deep copy on other. + */ + public GetTableRequest(GetTableRequest other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTblName()) { + this.tblName = other.tblName; + } + if (other.isSetCapabilities()) { + this.capabilities = new ClientCapabilities(other.capabilities); + } + } + + public GetTableRequest deepCopy() { + return new GetTableRequest(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tblName = null; + this.capabilities = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTblName() { + return this.tblName; + } + + public void setTblName(String tblName) { + this.tblName = tblName; + } + + public void unsetTblName() { + this.tblName = null; + } + + /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ + public boolean isSetTblName() { + return this.tblName != null; + } + + public void setTblNameIsSet(boolean value) { + if (!value) { + this.tblName = null; + } + } + + public ClientCapabilities getCapabilities() { + return this.capabilities; + } + + public void setCapabilities(ClientCapabilities capabilities) { + this.capabilities = capabilities; + } + + public void unsetCapabilities() { + this.capabilities = null; + } + + /** Returns true if field capabilities is set (has been assigned a value) and false otherwise */ + public boolean isSetCapabilities() { + return this.capabilities != null; + } + + public void setCapabilitiesIsSet(boolean value) { + if (!value) { + this.capabilities = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTblName(); + } else { + setTblName((String)value); + } + break; + + case CAPABILITIES: + if (value == null) { + unsetCapabilities(); + } else { + setCapabilities((ClientCapabilities)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TBL_NAME: + return getTblName(); + + case CAPABILITIES: + return getCapabilities(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case TBL_NAME: + return isSetTblName(); + case CAPABILITIES: + return isSetCapabilities(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetTableRequest) + return this.equals((GetTableRequest)that); + return false; + } + + public boolean equals(GetTableRequest that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tblName = true && this.isSetTblName(); + boolean that_present_tblName = true && that.isSetTblName(); + if (this_present_tblName || that_present_tblName) { + if (!(this_present_tblName && that_present_tblName)) + return false; + if (!this.tblName.equals(that.tblName)) + return false; + } + + boolean this_present_capabilities = true && this.isSetCapabilities(); + boolean that_present_capabilities = true && that.isSetCapabilities(); + if (this_present_capabilities || that_present_capabilities) { + if (!(this_present_capabilities && that_present_capabilities)) + return false; + if (!this.capabilities.equals(that.capabilities)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tblName = true && (isSetTblName()); + list.add(present_tblName); + if (present_tblName) + list.add(tblName); + + boolean present_capabilities = true && (isSetCapabilities()); + list.add(present_capabilities); + if (present_capabilities) + list.add(capabilities); + + return list.hashCode(); + } + + @Override + public int compareTo(GetTableRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTblName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCapabilities()).compareTo(other.isSetCapabilities()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCapabilities()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.capabilities, other.capabilities); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetTableRequest("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tblName:"); + if (this.tblName == null) { + sb.append("null"); + } else { + sb.append(this.tblName); + } + first = false; + if (isSetCapabilities()) { + if (!first) sb.append(", "); + sb.append("capabilities:"); + if (this.capabilities == null) { + sb.append("null"); + } else { + sb.append(this.capabilities); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + if (!isSetTblName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (capabilities != null) { + capabilities.validate(); + } + } + + 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 GetTableRequestStandardSchemeFactory implements SchemeFactory { + public GetTableRequestStandardScheme getScheme() { + return new GetTableRequestStandardScheme(); + } + } + + private static class GetTableRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableRequest 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.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.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // CAPABILITIES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.capabilities = new ClientCapabilities(); + struct.capabilities.read(iprot); + struct.setCapabilitiesIsSet(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, GetTableRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.tblName != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tblName); + oprot.writeFieldEnd(); + } + if (struct.capabilities != null) { + if (struct.isSetCapabilities()) { + oprot.writeFieldBegin(CAPABILITIES_FIELD_DESC); + struct.capabilities.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetTableRequestTupleSchemeFactory implements SchemeFactory { + public GetTableRequestTupleScheme getScheme() { + return new GetTableRequestTupleScheme(); + } + } + + private static class GetTableRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetTableRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbName); + oprot.writeString(struct.tblName); + BitSet optionals = new BitSet(); + if (struct.isSetCapabilities()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetCapabilities()) { + struct.capabilities.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetTableRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + struct.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.capabilities = new ClientCapabilities(); + struct.capabilities.read(iprot); + struct.setCapabilitiesIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTableResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTableResult.java new file mode 100644 index 0000000..d5533fd --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTableResult.java @@ -0,0 +1,394 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetTableResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTableResult"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetTableResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetTableResultTupleSchemeFactory()); + } + + private Table table; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE((short)1, "table"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTableResult.class, metaDataMap); + } + + public GetTableResult() { + } + + public GetTableResult( + Table table) + { + this(); + this.table = table; + } + + /** + * Performs a deep copy on other. + */ + public GetTableResult(GetTableResult other) { + if (other.isSetTable()) { + this.table = new Table(other.table); + } + } + + public GetTableResult deepCopy() { + return new GetTableResult(this); + } + + @Override + public void clear() { + this.table = null; + } + + public Table getTable() { + return this.table; + } + + public void setTable(Table table) { + this.table = table; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((Table)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetTableResult) + return this.equals((GetTableResult)that); + return false; + } + + public boolean equals(GetTableResult that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table = true && (isSetTable()); + list.add(present_table); + if (present_table) + list.add(table); + + return list.hashCode(); + } + + @Override + public int compareTo(GetTableResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetTableResult("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + sb.append(this.table); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetTable()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (table != null) { + table.validate(); + } + } + + 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 GetTableResultStandardSchemeFactory implements SchemeFactory { + public GetTableResultStandardScheme getScheme() { + return new GetTableResultStandardScheme(); + } + } + + private static class GetTableResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableResult 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 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.table = new Table(); + struct.table.read(iprot); + struct.setTableIsSet(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, GetTableResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + struct.table.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetTableResultTupleSchemeFactory implements SchemeFactory { + public GetTableResultTupleScheme getScheme() { + return new GetTableResultTupleScheme(); + } + } + + private static class GetTableResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetTableResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.table.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetTableResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.table = new Table(); + struct.table.read(iprot); + struct.setTableIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java new file mode 100644 index 0000000..5195427 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java @@ -0,0 +1,659 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetTablesRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTablesRequest"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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("tblNames", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField CAPABILITIES_FIELD_DESC = new org.apache.thrift.protocol.TField("capabilities", org.apache.thrift.protocol.TType.STRUCT, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetTablesRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetTablesRequestTupleSchemeFactory()); + } + + private String dbName; // required + private List tblNames; // optional + private ClientCapabilities capabilities; // 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 { + DB_NAME((short)1, "dbName"), + TBL_NAMES((short)2, "tblNames"), + CAPABILITIES((short)3, "capabilities"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAMES + return TBL_NAMES; + case 3: // CAPABILITIES + return CAPABILITIES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.TBL_NAMES,_Fields.CAPABILITIES}; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("tblNames", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.CAPABILITIES, new org.apache.thrift.meta_data.FieldMetaData("capabilities", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClientCapabilities.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTablesRequest.class, metaDataMap); + } + + public GetTablesRequest() { + } + + public GetTablesRequest( + String dbName) + { + this(); + this.dbName = dbName; + } + + /** + * Performs a deep copy on other. + */ + public GetTablesRequest(GetTablesRequest other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTblNames()) { + List __this__tblNames = new ArrayList(other.tblNames); + this.tblNames = __this__tblNames; + } + if (other.isSetCapabilities()) { + this.capabilities = new ClientCapabilities(other.capabilities); + } + } + + public GetTablesRequest deepCopy() { + return new GetTablesRequest(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tblNames = null; + this.capabilities = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public int getTblNamesSize() { + return (this.tblNames == null) ? 0 : this.tblNames.size(); + } + + public java.util.Iterator getTblNamesIterator() { + return (this.tblNames == null) ? null : this.tblNames.iterator(); + } + + public void addToTblNames(String elem) { + if (this.tblNames == null) { + this.tblNames = new ArrayList(); + } + this.tblNames.add(elem); + } + + public List getTblNames() { + return this.tblNames; + } + + public void setTblNames(List tblNames) { + this.tblNames = tblNames; + } + + public void unsetTblNames() { + this.tblNames = null; + } + + /** Returns true if field tblNames is set (has been assigned a value) and false otherwise */ + public boolean isSetTblNames() { + return this.tblNames != null; + } + + public void setTblNamesIsSet(boolean value) { + if (!value) { + this.tblNames = null; + } + } + + public ClientCapabilities getCapabilities() { + return this.capabilities; + } + + public void setCapabilities(ClientCapabilities capabilities) { + this.capabilities = capabilities; + } + + public void unsetCapabilities() { + this.capabilities = null; + } + + /** Returns true if field capabilities is set (has been assigned a value) and false otherwise */ + public boolean isSetCapabilities() { + return this.capabilities != null; + } + + public void setCapabilitiesIsSet(boolean value) { + if (!value) { + this.capabilities = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TBL_NAMES: + if (value == null) { + unsetTblNames(); + } else { + setTblNames((List)value); + } + break; + + case CAPABILITIES: + if (value == null) { + unsetCapabilities(); + } else { + setCapabilities((ClientCapabilities)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TBL_NAMES: + return getTblNames(); + + case CAPABILITIES: + return getCapabilities(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case TBL_NAMES: + return isSetTblNames(); + case CAPABILITIES: + return isSetCapabilities(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetTablesRequest) + return this.equals((GetTablesRequest)that); + return false; + } + + public boolean equals(GetTablesRequest that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tblNames = true && this.isSetTblNames(); + boolean that_present_tblNames = true && that.isSetTblNames(); + if (this_present_tblNames || that_present_tblNames) { + if (!(this_present_tblNames && that_present_tblNames)) + return false; + if (!this.tblNames.equals(that.tblNames)) + return false; + } + + boolean this_present_capabilities = true && this.isSetCapabilities(); + boolean that_present_capabilities = true && that.isSetCapabilities(); + if (this_present_capabilities || that_present_capabilities) { + if (!(this_present_capabilities && that_present_capabilities)) + return false; + if (!this.capabilities.equals(that.capabilities)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tblNames = true && (isSetTblNames()); + list.add(present_tblNames); + if (present_tblNames) + list.add(tblNames); + + boolean present_capabilities = true && (isSetCapabilities()); + list.add(present_capabilities); + if (present_capabilities) + list.add(capabilities); + + return list.hashCode(); + } + + @Override + public int compareTo(GetTablesRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTblNames()).compareTo(other.isSetTblNames()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTblNames()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblNames, other.tblNames); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCapabilities()).compareTo(other.isSetCapabilities()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCapabilities()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.capabilities, other.capabilities); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetTablesRequest("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (isSetTblNames()) { + if (!first) sb.append(", "); + sb.append("tblNames:"); + if (this.tblNames == null) { + sb.append("null"); + } else { + sb.append(this.tblNames); + } + first = false; + } + if (isSetCapabilities()) { + if (!first) sb.append(", "); + sb.append("capabilities:"); + if (this.capabilities == null) { + sb.append("null"); + } else { + sb.append(this.capabilities); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (capabilities != null) { + capabilities.validate(); + } + } + + 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 GetTablesRequestStandardSchemeFactory implements SchemeFactory { + public GetTablesRequestStandardScheme getScheme() { + return new GetTablesRequestStandardScheme(); + } + } + + private static class GetTablesRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetTablesRequest 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.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 _list690 = iprot.readListBegin(); + struct.tblNames = new ArrayList(_list690.size); + String _elem691; + for (int _i692 = 0; _i692 < _list690.size; ++_i692) + { + _elem691 = iprot.readString(); + struct.tblNames.add(_elem691); + } + iprot.readListEnd(); + } + struct.setTblNamesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // CAPABILITIES + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.capabilities = new ClientCapabilities(); + struct.capabilities.read(iprot); + struct.setCapabilitiesIsSet(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, GetTablesRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.tblNames != null) { + if (struct.isSetTblNames()) { + oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tblNames.size())); + for (String _iter693 : struct.tblNames) + { + oprot.writeString(_iter693); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.capabilities != null) { + if (struct.isSetCapabilities()) { + oprot.writeFieldBegin(CAPABILITIES_FIELD_DESC); + struct.capabilities.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetTablesRequestTupleSchemeFactory implements SchemeFactory { + public GetTablesRequestTupleScheme getScheme() { + return new GetTablesRequestTupleScheme(); + } + } + + private static class GetTablesRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetTablesRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbName); + BitSet optionals = new BitSet(); + if (struct.isSetTblNames()) { + optionals.set(0); + } + if (struct.isSetCapabilities()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetTblNames()) { + { + oprot.writeI32(struct.tblNames.size()); + for (String _iter694 : struct.tblNames) + { + oprot.writeString(_iter694); + } + } + } + if (struct.isSetCapabilities()) { + struct.capabilities.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetTablesRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list695 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.tblNames = new ArrayList(_list695.size); + String _elem696; + for (int _i697 = 0; _i697 < _list695.size; ++_i697) + { + _elem696 = iprot.readString(); + struct.tblNames.add(_elem696); + } + } + struct.setTblNamesIsSet(true); + } + if (incoming.get(1)) { + struct.capabilities = new ClientCapabilities(); + struct.capabilities.read(iprot); + struct.setCapabilitiesIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java new file mode 100644 index 0000000..1ade2f5 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GetTablesResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTablesResult"); + + private static final org.apache.thrift.protocol.TField TABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("tables", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetTablesResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetTablesResultTupleSchemeFactory()); + } + + private List
tables; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLES((short)1, "tables"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLES + return TABLES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TABLES, new org.apache.thrift.meta_data.FieldMetaData("tables", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTablesResult.class, metaDataMap); + } + + public GetTablesResult() { + } + + public GetTablesResult( + List
tables) + { + this(); + this.tables = tables; + } + + /** + * Performs a deep copy on other. + */ + public GetTablesResult(GetTablesResult other) { + if (other.isSetTables()) { + List
__this__tables = new ArrayList
(other.tables.size()); + for (Table other_element : other.tables) { + __this__tables.add(new Table(other_element)); + } + this.tables = __this__tables; + } + } + + public GetTablesResult deepCopy() { + return new GetTablesResult(this); + } + + @Override + public void clear() { + this.tables = null; + } + + public int getTablesSize() { + return (this.tables == null) ? 0 : this.tables.size(); + } + + public java.util.Iterator
getTablesIterator() { + return (this.tables == null) ? null : this.tables.iterator(); + } + + public void addToTables(Table elem) { + if (this.tables == null) { + this.tables = new ArrayList
(); + } + this.tables.add(elem); + } + + public List
getTables() { + return this.tables; + } + + public void setTables(List
tables) { + this.tables = tables; + } + + public void unsetTables() { + this.tables = null; + } + + /** Returns true if field tables is set (has been assigned a value) and false otherwise */ + public boolean isSetTables() { + return this.tables != null; + } + + public void setTablesIsSet(boolean value) { + if (!value) { + this.tables = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLES: + if (value == null) { + unsetTables(); + } else { + setTables((List
)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLES: + return getTables(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLES: + return isSetTables(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetTablesResult) + return this.equals((GetTablesResult)that); + return false; + } + + public boolean equals(GetTablesResult that) { + if (that == null) + return false; + + boolean this_present_tables = true && this.isSetTables(); + boolean that_present_tables = true && that.isSetTables(); + if (this_present_tables || that_present_tables) { + if (!(this_present_tables && that_present_tables)) + return false; + if (!this.tables.equals(that.tables)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_tables = true && (isSetTables()); + list.add(present_tables); + if (present_tables) + list.add(tables); + + return list.hashCode(); + } + + @Override + public int compareTo(GetTablesResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTables()).compareTo(other.isSetTables()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTables()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tables, other.tables); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GetTablesResult("); + boolean first = true; + + sb.append("tables:"); + if (this.tables == null) { + sb.append("null"); + } else { + sb.append(this.tables); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetTables()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tables' is unset! Struct:" + toString()); + } + + // 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 GetTablesResultStandardSchemeFactory implements SchemeFactory { + public GetTablesResultStandardScheme getScheme() { + return new GetTablesResultStandardScheme(); + } + } + + private static class GetTablesResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetTablesResult 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: // TABLES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list698 = iprot.readListBegin(); + struct.tables = new ArrayList
(_list698.size); + Table _elem699; + for (int _i700 = 0; _i700 < _list698.size; ++_i700) + { + _elem699 = new Table(); + _elem699.read(iprot); + struct.tables.add(_elem699); + } + iprot.readListEnd(); + } + struct.setTablesIsSet(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, GetTablesResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tables != null) { + oprot.writeFieldBegin(TABLES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tables.size())); + for (Table _iter701 : struct.tables) + { + _iter701.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetTablesResultTupleSchemeFactory implements SchemeFactory { + public GetTablesResultTupleScheme getScheme() { + return new GetTablesResultTupleScheme(); + } + } + + private static class GetTablesResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetTablesResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.tables.size()); + for (Table _iter702 : struct.tables) + { + _iter702.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetTablesResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list703 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.tables = new ArrayList
(_list703.size); + Table _elem704; + for (int _i705 = 0; _i705 < _list703.size; ++_i705) + { + _elem704 = new Table(); + _elem704.read(iprot); + struct.tables.add(_elem704); + } + } + struct.setTablesIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeRequest.java new file mode 100644 index 0000000..014c857 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeRequest.java @@ -0,0 +1,620 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GrantRevokePrivilegeRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GrantRevokePrivilegeRequest"); + + private static final org.apache.thrift.protocol.TField REQUEST_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("requestType", org.apache.thrift.protocol.TType.I32, (short)1); + 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)2); + private static final org.apache.thrift.protocol.TField REVOKE_GRANT_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("revokeGrantOption", org.apache.thrift.protocol.TType.BOOL, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GrantRevokePrivilegeRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GrantRevokePrivilegeRequestTupleSchemeFactory()); + } + + private GrantRevokeType requestType; // required + private PrivilegeBag privileges; // required + private boolean revokeGrantOption; // 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 { + /** + * + * @see GrantRevokeType + */ + REQUEST_TYPE((short)1, "requestType"), + PRIVILEGES((short)2, "privileges"), + REVOKE_GRANT_OPTION((short)3, "revokeGrantOption"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST_TYPE + return REQUEST_TYPE; + case 2: // PRIVILEGES + return PRIVILEGES; + case 3: // REVOKE_GRANT_OPTION + return REVOKE_GRANT_OPTION; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __REVOKEGRANTOPTION_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.REVOKE_GRANT_OPTION}; + 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); + tmpMap.put(_Fields.REQUEST_TYPE, new org.apache.thrift.meta_data.FieldMetaData("requestType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GrantRevokeType.class))); + tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeBag.class))); + tmpMap.put(_Fields.REVOKE_GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("revokeGrantOption", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GrantRevokePrivilegeRequest.class, metaDataMap); + } + + public GrantRevokePrivilegeRequest() { + } + + public GrantRevokePrivilegeRequest( + GrantRevokeType requestType, + PrivilegeBag privileges) + { + this(); + this.requestType = requestType; + this.privileges = privileges; + } + + /** + * Performs a deep copy on other. + */ + public GrantRevokePrivilegeRequest(GrantRevokePrivilegeRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetRequestType()) { + this.requestType = other.requestType; + } + if (other.isSetPrivileges()) { + this.privileges = new PrivilegeBag(other.privileges); + } + this.revokeGrantOption = other.revokeGrantOption; + } + + public GrantRevokePrivilegeRequest deepCopy() { + return new GrantRevokePrivilegeRequest(this); + } + + @Override + public void clear() { + this.requestType = null; + this.privileges = null; + setRevokeGrantOptionIsSet(false); + this.revokeGrantOption = false; + } + + /** + * + * @see GrantRevokeType + */ + public GrantRevokeType getRequestType() { + return this.requestType; + } + + /** + * + * @see GrantRevokeType + */ + public void setRequestType(GrantRevokeType requestType) { + this.requestType = requestType; + } + + public void unsetRequestType() { + this.requestType = null; + } + + /** Returns true if field requestType is set (has been assigned a value) and false otherwise */ + public boolean isSetRequestType() { + return this.requestType != null; + } + + public void setRequestTypeIsSet(boolean value) { + if (!value) { + this.requestType = null; + } + } + + public PrivilegeBag getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrivilegeBag privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public boolean isRevokeGrantOption() { + return this.revokeGrantOption; + } + + public void setRevokeGrantOption(boolean revokeGrantOption) { + this.revokeGrantOption = revokeGrantOption; + setRevokeGrantOptionIsSet(true); + } + + public void unsetRevokeGrantOption() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REVOKEGRANTOPTION_ISSET_ID); + } + + /** Returns true if field revokeGrantOption is set (has been assigned a value) and false otherwise */ + public boolean isSetRevokeGrantOption() { + return EncodingUtils.testBit(__isset_bitfield, __REVOKEGRANTOPTION_ISSET_ID); + } + + public void setRevokeGrantOptionIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REVOKEGRANTOPTION_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST_TYPE: + if (value == null) { + unsetRequestType(); + } else { + setRequestType((GrantRevokeType)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrivilegeBag)value); + } + break; + + case REVOKE_GRANT_OPTION: + if (value == null) { + unsetRevokeGrantOption(); + } else { + setRevokeGrantOption((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST_TYPE: + return getRequestType(); + + case PRIVILEGES: + return getPrivileges(); + + case REVOKE_GRANT_OPTION: + return isRevokeGrantOption(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST_TYPE: + return isSetRequestType(); + case PRIVILEGES: + return isSetPrivileges(); + case REVOKE_GRANT_OPTION: + return isSetRevokeGrantOption(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GrantRevokePrivilegeRequest) + return this.equals((GrantRevokePrivilegeRequest)that); + return false; + } + + public boolean equals(GrantRevokePrivilegeRequest that) { + if (that == null) + return false; + + boolean this_present_requestType = true && this.isSetRequestType(); + boolean that_present_requestType = true && that.isSetRequestType(); + if (this_present_requestType || that_present_requestType) { + if (!(this_present_requestType && that_present_requestType)) + return false; + if (!this.requestType.equals(that.requestType)) + return false; + } + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + boolean this_present_revokeGrantOption = true && this.isSetRevokeGrantOption(); + boolean that_present_revokeGrantOption = true && that.isSetRevokeGrantOption(); + if (this_present_revokeGrantOption || that_present_revokeGrantOption) { + if (!(this_present_revokeGrantOption && that_present_revokeGrantOption)) + return false; + if (this.revokeGrantOption != that.revokeGrantOption) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_requestType = true && (isSetRequestType()); + list.add(present_requestType); + if (present_requestType) + list.add(requestType.getValue()); + + boolean present_privileges = true && (isSetPrivileges()); + list.add(present_privileges); + if (present_privileges) + list.add(privileges); + + boolean present_revokeGrantOption = true && (isSetRevokeGrantOption()); + list.add(present_revokeGrantOption); + if (present_revokeGrantOption) + list.add(revokeGrantOption); + + return list.hashCode(); + } + + @Override + public int compareTo(GrantRevokePrivilegeRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequestType()).compareTo(other.isSetRequestType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequestType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestType, other.requestType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRevokeGrantOption()).compareTo(other.isSetRevokeGrantOption()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRevokeGrantOption()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.revokeGrantOption, other.revokeGrantOption); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GrantRevokePrivilegeRequest("); + boolean first = true; + + sb.append("requestType:"); + if (this.requestType == null) { + sb.append("null"); + } else { + sb.append(this.requestType); + } + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + if (isSetRevokeGrantOption()) { + if (!first) sb.append(", "); + sb.append("revokeGrantOption:"); + sb.append(this.revokeGrantOption); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 { + // 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 GrantRevokePrivilegeRequestStandardSchemeFactory implements SchemeFactory { + public GrantRevokePrivilegeRequestStandardScheme getScheme() { + return new GrantRevokePrivilegeRequestStandardScheme(); + } + } + + private static class GrantRevokePrivilegeRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GrantRevokePrivilegeRequest 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: // REQUEST_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.requestType = org.apache.hadoop.hive.metastore.api.GrantRevokeType.findByValue(iprot.readI32()); + struct.setRequestTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // 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; + case 3: // REVOKE_GRANT_OPTION + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.revokeGrantOption = iprot.readBool(); + struct.setRevokeGrantOptionIsSet(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, GrantRevokePrivilegeRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.requestType != null) { + oprot.writeFieldBegin(REQUEST_TYPE_FIELD_DESC); + oprot.writeI32(struct.requestType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + struct.privileges.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.isSetRevokeGrantOption()) { + oprot.writeFieldBegin(REVOKE_GRANT_OPTION_FIELD_DESC); + oprot.writeBool(struct.revokeGrantOption); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GrantRevokePrivilegeRequestTupleSchemeFactory implements SchemeFactory { + public GrantRevokePrivilegeRequestTupleScheme getScheme() { + return new GrantRevokePrivilegeRequestTupleScheme(); + } + } + + private static class GrantRevokePrivilegeRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GrantRevokePrivilegeRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequestType()) { + optionals.set(0); + } + if (struct.isSetPrivileges()) { + optionals.set(1); + } + if (struct.isSetRevokeGrantOption()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetRequestType()) { + oprot.writeI32(struct.requestType.getValue()); + } + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + if (struct.isSetRevokeGrantOption()) { + oprot.writeBool(struct.revokeGrantOption); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GrantRevokePrivilegeRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.requestType = org.apache.hadoop.hive.metastore.api.GrantRevokeType.findByValue(iprot.readI32()); + struct.setRequestTypeIsSet(true); + } + if (incoming.get(1)) { + struct.privileges = new PrivilegeBag(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + if (incoming.get(2)) { + struct.revokeGrantOption = iprot.readBool(); + struct.setRevokeGrantOptionIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeResponse.java new file mode 100644 index 0000000..ddbc4c3 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokePrivilegeResponse.java @@ -0,0 +1,390 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GrantRevokePrivilegeResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GrantRevokePrivilegeResponse"); + + 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)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GrantRevokePrivilegeResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GrantRevokePrivilegeResponseTupleSchemeFactory()); + } + + private boolean success; // 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 { + SUCCESS((short)1, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.SUCCESS}; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GrantRevokePrivilegeResponse.class, metaDataMap); + } + + public GrantRevokePrivilegeResponse() { + } + + /** + * Performs a deep copy on other. + */ + public GrantRevokePrivilegeResponse(GrantRevokePrivilegeResponse other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public GrantRevokePrivilegeResponse deepCopy() { + return new GrantRevokePrivilegeResponse(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GrantRevokePrivilegeResponse) + return this.equals((GrantRevokePrivilegeResponse)that); + return false; + } + + public boolean equals(GrantRevokePrivilegeResponse that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(GrantRevokePrivilegeResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GrantRevokePrivilegeResponse("); + boolean first = true; + + if (isSetSuccess()) { + sb.append("success:"); + sb.append(this.success); + 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 { + // 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 GrantRevokePrivilegeResponseStandardSchemeFactory implements SchemeFactory { + public GrantRevokePrivilegeResponseStandardScheme getScheme() { + return new GrantRevokePrivilegeResponseStandardScheme(); + } + } + + private static class GrantRevokePrivilegeResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GrantRevokePrivilegeResponse 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: // 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; + 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, GrantRevokePrivilegeResponse 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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GrantRevokePrivilegeResponseTupleSchemeFactory implements SchemeFactory { + public GrantRevokePrivilegeResponseTupleScheme getScheme() { + return new GrantRevokePrivilegeResponseTupleScheme(); + } + } + + private static class GrantRevokePrivilegeResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GrantRevokePrivilegeResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GrantRevokePrivilegeResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeRoleRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeRoleRequest.java new file mode 100644 index 0000000..adbd345 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeRoleRequest.java @@ -0,0 +1,1059 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GrantRevokeRoleRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GrantRevokeRoleRequest"); + + private static final org.apache.thrift.protocol.TField REQUEST_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("requestType", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principalName", org.apache.thrift.protocol.TType.STRING, (short)3); + 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)4); + private static final org.apache.thrift.protocol.TField GRANTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("grantor", org.apache.thrift.protocol.TType.STRING, (short)5); + 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)6); + 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)7); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GrantRevokeRoleRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GrantRevokeRoleRequestTupleSchemeFactory()); + } + + private GrantRevokeType requestType; // required + private String roleName; // required + private String principalName; // required + private PrincipalType principalType; // required + private String grantor; // optional + private PrincipalType grantorType; // optional + private boolean grantOption; // 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 { + /** + * + * @see GrantRevokeType + */ + REQUEST_TYPE((short)1, "requestType"), + ROLE_NAME((short)2, "roleName"), + PRINCIPAL_NAME((short)3, "principalName"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)4, "principalType"), + GRANTOR((short)5, "grantor"), + /** + * + * @see PrincipalType + */ + GRANTOR_TYPE((short)6, "grantorType"), + GRANT_OPTION((short)7, "grantOption"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST_TYPE + return REQUEST_TYPE; + case 2: // ROLE_NAME + return ROLE_NAME; + case 3: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 4: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; + case 5: // GRANTOR + return GRANTOR; + case 6: // GRANTOR_TYPE + return GRANTOR_TYPE; + case 7: // GRANT_OPTION + return GRANT_OPTION; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __GRANTOPTION_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.GRANTOR,_Fields.GRANTOR_TYPE,_Fields.GRANT_OPTION}; + 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); + tmpMap.put(_Fields.REQUEST_TYPE, new org.apache.thrift.meta_data.FieldMetaData("requestType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, GrantRevokeType.class))); + tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principalName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principalType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.GRANTOR, new org.apache.thrift.meta_data.FieldMetaData("grantor", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GRANTOR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("grantorType", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("grantOption", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GrantRevokeRoleRequest.class, metaDataMap); + } + + public GrantRevokeRoleRequest() { + } + + public GrantRevokeRoleRequest( + GrantRevokeType requestType, + String roleName, + String principalName, + PrincipalType principalType) + { + this(); + this.requestType = requestType; + this.roleName = roleName; + this.principalName = principalName; + this.principalType = principalType; + } + + /** + * Performs a deep copy on other. + */ + public GrantRevokeRoleRequest(GrantRevokeRoleRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetRequestType()) { + this.requestType = other.requestType; + } + if (other.isSetRoleName()) { + this.roleName = other.roleName; + } + if (other.isSetPrincipalName()) { + this.principalName = other.principalName; + } + if (other.isSetPrincipalType()) { + this.principalType = other.principalType; + } + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + if (other.isSetGrantorType()) { + this.grantorType = other.grantorType; + } + this.grantOption = other.grantOption; + } + + public GrantRevokeRoleRequest deepCopy() { + return new GrantRevokeRoleRequest(this); + } + + @Override + public void clear() { + this.requestType = null; + this.roleName = null; + this.principalName = null; + this.principalType = null; + this.grantor = null; + this.grantorType = null; + setGrantOptionIsSet(false); + this.grantOption = false; + } + + /** + * + * @see GrantRevokeType + */ + public GrantRevokeType getRequestType() { + return this.requestType; + } + + /** + * + * @see GrantRevokeType + */ + public void setRequestType(GrantRevokeType requestType) { + this.requestType = requestType; + } + + public void unsetRequestType() { + this.requestType = null; + } + + /** Returns true if field requestType is set (has been assigned a value) and false otherwise */ + public boolean isSetRequestType() { + return this.requestType != null; + } + + public void setRequestTypeIsSet(boolean value) { + if (!value) { + this.requestType = null; + } + } + + public String getRoleName() { + return this.roleName; + } + + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + public void unsetRoleName() { + this.roleName = null; + } + + /** Returns true if field roleName is set (has been assigned a value) and false otherwise */ + public boolean isSetRoleName() { + return this.roleName != null; + } + + public void setRoleNameIsSet(boolean value) { + if (!value) { + this.roleName = null; + } + } + + public String getPrincipalName() { + return this.principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public void unsetPrincipalName() { + this.principalName = null; + } + + /** Returns true if field principalName is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipalName() { + return this.principalName != null; + } + + public void setPrincipalNameIsSet(boolean value) { + if (!value) { + this.principalName = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipalType() { + return this.principalType; + } + + /** + * + * @see PrincipalType + */ + public void setPrincipalType(PrincipalType principalType) { + this.principalType = principalType; + } + + public void unsetPrincipalType() { + this.principalType = null; + } + + /** Returns true if field principalType is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipalType() { + return this.principalType != null; + } + + public void setPrincipalTypeIsSet(boolean value) { + if (!value) { + this.principalType = null; + } + } + + public String getGrantor() { + return this.grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public void unsetGrantor() { + this.grantor = null; + } + + /** Returns true if field grantor is set (has been assigned a value) and false otherwise */ + public boolean isSetGrantor() { + return this.grantor != null; + } + + public void setGrantorIsSet(boolean value) { + if (!value) { + this.grantor = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getGrantorType() { + return this.grantorType; + } + + /** + * + * @see PrincipalType + */ + public void setGrantorType(PrincipalType grantorType) { + this.grantorType = grantorType; + } + + public void unsetGrantorType() { + this.grantorType = null; + } + + /** Returns true if field grantorType is set (has been assigned a value) and false otherwise */ + public boolean isSetGrantorType() { + return this.grantorType != null; + } + + public void setGrantorTypeIsSet(boolean value) { + if (!value) { + this.grantorType = null; + } + } + + public boolean isGrantOption() { + return this.grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + setGrantOptionIsSet(true); + } + + public void unsetGrantOption() { + __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 EncodingUtils.testBit(__isset_bitfield, __GRANTOPTION_ISSET_ID); + } + + public void setGrantOptionIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANTOPTION_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST_TYPE: + if (value == null) { + unsetRequestType(); + } else { + setRequestType((GrantRevokeType)value); + } + break; + + case ROLE_NAME: + if (value == null) { + unsetRoleName(); + } else { + setRoleName((String)value); + } + break; + + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipalName(); + } else { + setPrincipalName((String)value); + } + break; + + case PRINCIPAL_TYPE: + if (value == null) { + unsetPrincipalType(); + } else { + setPrincipalType((PrincipalType)value); + } + break; + + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); + } + break; + + case GRANTOR_TYPE: + if (value == null) { + unsetGrantorType(); + } else { + setGrantorType((PrincipalType)value); + } + break; + + case GRANT_OPTION: + if (value == null) { + unsetGrantOption(); + } else { + setGrantOption((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST_TYPE: + return getRequestType(); + + case ROLE_NAME: + return getRoleName(); + + case PRINCIPAL_NAME: + return getPrincipalName(); + + case PRINCIPAL_TYPE: + return getPrincipalType(); + + case GRANTOR: + return getGrantor(); + + case GRANTOR_TYPE: + return getGrantorType(); + + case GRANT_OPTION: + return isGrantOption(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST_TYPE: + return isSetRequestType(); + case ROLE_NAME: + return isSetRoleName(); + case PRINCIPAL_NAME: + return isSetPrincipalName(); + case PRINCIPAL_TYPE: + return isSetPrincipalType(); + case GRANTOR: + return isSetGrantor(); + case GRANTOR_TYPE: + return isSetGrantorType(); + case GRANT_OPTION: + return isSetGrantOption(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GrantRevokeRoleRequest) + return this.equals((GrantRevokeRoleRequest)that); + return false; + } + + public boolean equals(GrantRevokeRoleRequest that) { + if (that == null) + return false; + + boolean this_present_requestType = true && this.isSetRequestType(); + boolean that_present_requestType = true && that.isSetRequestType(); + if (this_present_requestType || that_present_requestType) { + if (!(this_present_requestType && that_present_requestType)) + return false; + if (!this.requestType.equals(that.requestType)) + return false; + } + + boolean this_present_roleName = true && this.isSetRoleName(); + boolean that_present_roleName = true && that.isSetRoleName(); + if (this_present_roleName || that_present_roleName) { + if (!(this_present_roleName && that_present_roleName)) + return false; + if (!this.roleName.equals(that.roleName)) + return false; + } + + boolean this_present_principalName = true && this.isSetPrincipalName(); + boolean that_present_principalName = true && that.isSetPrincipalName(); + if (this_present_principalName || that_present_principalName) { + if (!(this_present_principalName && that_present_principalName)) + return false; + if (!this.principalName.equals(that.principalName)) + return false; + } + + boolean this_present_principalType = true && this.isSetPrincipalType(); + boolean that_present_principalType = true && that.isSetPrincipalType(); + if (this_present_principalType || that_present_principalType) { + if (!(this_present_principalType && that_present_principalType)) + return false; + if (!this.principalType.equals(that.principalType)) + return false; + } + + boolean this_present_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) + return false; + } + + boolean this_present_grantorType = true && this.isSetGrantorType(); + boolean that_present_grantorType = true && that.isSetGrantorType(); + if (this_present_grantorType || that_present_grantorType) { + if (!(this_present_grantorType && that_present_grantorType)) + return false; + if (!this.grantorType.equals(that.grantorType)) + return false; + } + + boolean this_present_grantOption = true && this.isSetGrantOption(); + boolean that_present_grantOption = true && that.isSetGrantOption(); + if (this_present_grantOption || that_present_grantOption) { + if (!(this_present_grantOption && that_present_grantOption)) + return false; + if (this.grantOption != that.grantOption) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_requestType = true && (isSetRequestType()); + list.add(present_requestType); + if (present_requestType) + list.add(requestType.getValue()); + + boolean present_roleName = true && (isSetRoleName()); + list.add(present_roleName); + if (present_roleName) + list.add(roleName); + + boolean present_principalName = true && (isSetPrincipalName()); + list.add(present_principalName); + if (present_principalName) + list.add(principalName); + + boolean present_principalType = true && (isSetPrincipalType()); + list.add(present_principalType); + if (present_principalType) + list.add(principalType.getValue()); + + boolean present_grantor = true && (isSetGrantor()); + list.add(present_grantor); + if (present_grantor) + list.add(grantor); + + boolean present_grantorType = true && (isSetGrantorType()); + list.add(present_grantorType); + if (present_grantorType) + list.add(grantorType.getValue()); + + boolean present_grantOption = true && (isSetGrantOption()); + list.add(present_grantOption); + if (present_grantOption) + list.add(grantOption); + + return list.hashCode(); + } + + @Override + public int compareTo(GrantRevokeRoleRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequestType()).compareTo(other.isSetRequestType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequestType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestType, other.requestType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRoleName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipalName()).compareTo(other.isSetPrincipalName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalName, other.principalName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipalType()).compareTo(other.isSetPrincipalType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalType, other.principalType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(other.isSetGrantor()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantor()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantor, other.grantor); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantorType()).compareTo(other.isSetGrantorType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantorType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorType, other.grantorType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantOption()).compareTo(other.isSetGrantOption()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantOption()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantOption, other.grantOption); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GrantRevokeRoleRequest("); + boolean first = true; + + sb.append("requestType:"); + if (this.requestType == null) { + sb.append("null"); + } else { + sb.append(this.requestType); + } + first = false; + if (!first) sb.append(", "); + sb.append("roleName:"); + if (this.roleName == null) { + sb.append("null"); + } else { + sb.append(this.roleName); + } + first = false; + if (!first) sb.append(", "); + sb.append("principalName:"); + if (this.principalName == null) { + sb.append("null"); + } else { + sb.append(this.principalName); + } + first = false; + if (!first) sb.append(", "); + sb.append("principalType:"); + if (this.principalType == null) { + sb.append("null"); + } else { + sb.append(this.principalType); + } + first = false; + if (isSetGrantor()) { + if (!first) sb.append(", "); + sb.append("grantor:"); + if (this.grantor == null) { + sb.append("null"); + } else { + sb.append(this.grantor); + } + first = false; + } + if (isSetGrantorType()) { + if (!first) sb.append(", "); + sb.append("grantorType:"); + if (this.grantorType == null) { + sb.append("null"); + } else { + sb.append(this.grantorType); + } + first = false; + } + if (isSetGrantOption()) { + if (!first) sb.append(", "); + sb.append("grantOption:"); + sb.append(this.grantOption); + 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 { + // 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 GrantRevokeRoleRequestStandardSchemeFactory implements SchemeFactory { + public GrantRevokeRoleRequestStandardScheme getScheme() { + return new GrantRevokeRoleRequestStandardScheme(); + } + } + + private static class GrantRevokeRoleRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GrantRevokeRoleRequest 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: // REQUEST_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.requestType = org.apache.hadoop.hive.metastore.api.GrantRevokeType.findByValue(iprot.readI32()); + struct.setRequestTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // 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 3: // 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 4: // PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.principalType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipalTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // 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 6: // GRANTOR_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.grantorType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // 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, GrantRevokeRoleRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.requestType != null) { + oprot.writeFieldBegin(REQUEST_TYPE_FIELD_DESC); + oprot.writeI32(struct.requestType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.roleName != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(struct.roleName); + 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.grantor != null) { + if (struct.isSetGrantor()) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(struct.grantor); + oprot.writeFieldEnd(); + } + } + if (struct.grantorType != null) { + if (struct.isSetGrantorType()) { + oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); + oprot.writeI32(struct.grantorType.getValue()); + oprot.writeFieldEnd(); + } + } + if (struct.isSetGrantOption()) { + oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); + oprot.writeBool(struct.grantOption); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GrantRevokeRoleRequestTupleSchemeFactory implements SchemeFactory { + public GrantRevokeRoleRequestTupleScheme getScheme() { + return new GrantRevokeRoleRequestTupleScheme(); + } + } + + private static class GrantRevokeRoleRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GrantRevokeRoleRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequestType()) { + optionals.set(0); + } + if (struct.isSetRoleName()) { + optionals.set(1); + } + if (struct.isSetPrincipalName()) { + optionals.set(2); + } + if (struct.isSetPrincipalType()) { + optionals.set(3); + } + if (struct.isSetGrantor()) { + optionals.set(4); + } + if (struct.isSetGrantorType()) { + optionals.set(5); + } + if (struct.isSetGrantOption()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetRequestType()) { + oprot.writeI32(struct.requestType.getValue()); + } + if (struct.isSetRoleName()) { + oprot.writeString(struct.roleName); + } + if (struct.isSetPrincipalName()) { + oprot.writeString(struct.principalName); + } + if (struct.isSetPrincipalType()) { + oprot.writeI32(struct.principalType.getValue()); + } + 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, GrantRevokeRoleRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.requestType = org.apache.hadoop.hive.metastore.api.GrantRevokeType.findByValue(iprot.readI32()); + struct.setRequestTypeIsSet(true); + } + if (incoming.get(1)) { + struct.roleName = iprot.readString(); + struct.setRoleNameIsSet(true); + } + if (incoming.get(2)) { + struct.principalName = iprot.readString(); + struct.setPrincipalNameIsSet(true); + } + if (incoming.get(3)) { + struct.principalType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipalTypeIsSet(true); + } + if (incoming.get(4)) { + struct.grantor = iprot.readString(); + struct.setGrantorIsSet(true); + } + if (incoming.get(5)) { + struct.grantorType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorTypeIsSet(true); + } + if (incoming.get(6)) { + struct.grantOption = iprot.readBool(); + struct.setGrantOptionIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeRoleResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeRoleResponse.java new file mode 100644 index 0000000..541ac21 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeRoleResponse.java @@ -0,0 +1,390 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class GrantRevokeRoleResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GrantRevokeRoleResponse"); + + 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)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GrantRevokeRoleResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GrantRevokeRoleResponseTupleSchemeFactory()); + } + + private boolean success; // 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 { + SUCCESS((short)1, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.SUCCESS}; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GrantRevokeRoleResponse.class, metaDataMap); + } + + public GrantRevokeRoleResponse() { + } + + /** + * Performs a deep copy on other. + */ + public GrantRevokeRoleResponse(GrantRevokeRoleResponse other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public GrantRevokeRoleResponse deepCopy() { + return new GrantRevokeRoleResponse(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GrantRevokeRoleResponse) + return this.equals((GrantRevokeRoleResponse)that); + return false; + } + + public boolean equals(GrantRevokeRoleResponse that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(GrantRevokeRoleResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("GrantRevokeRoleResponse("); + boolean first = true; + + if (isSetSuccess()) { + sb.append("success:"); + sb.append(this.success); + 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 { + // 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 GrantRevokeRoleResponseStandardSchemeFactory implements SchemeFactory { + public GrantRevokeRoleResponseStandardScheme getScheme() { + return new GrantRevokeRoleResponseStandardScheme(); + } + } + + private static class GrantRevokeRoleResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GrantRevokeRoleResponse 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: // 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; + 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, GrantRevokeRoleResponse 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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GrantRevokeRoleResponseTupleSchemeFactory implements SchemeFactory { + public GrantRevokeRoleResponseTupleScheme getScheme() { + return new GrantRevokeRoleResponseTupleScheme(); + } + } + + private static class GrantRevokeRoleResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GrantRevokeRoleResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GrantRevokeRoleResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeType.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeType.java new file mode 100644 index 0000000..ac65ec7 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GrantRevokeType.java @@ -0,0 +1,45 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum GrantRevokeType implements org.apache.thrift.TEnum { + GRANT(1), + REVOKE(2); + + private final int value; + + private GrantRevokeType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static GrantRevokeType findByValue(int value) { + switch (value) { + case 1: + return GRANT; + case 2: + return REVOKE; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatRequest.java new file mode 100644 index 0000000..0d36f22 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatRequest.java @@ -0,0 +1,489 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class HeartbeatRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HeartbeatRequest"); + + private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new HeartbeatRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new HeartbeatRequestTupleSchemeFactory()); + } + + private long lockid; // optional + private long txnid; // 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 { + LOCKID((short)1, "lockid"), + TXNID((short)2, "txnid"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOCKID + return LOCKID; + case 2: // TXNID + return TXNID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LOCKID_ISSET_ID = 0; + private static final int __TXNID_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.LOCKID,_Fields.TXNID}; + 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); + tmpMap.put(_Fields.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HeartbeatRequest.class, metaDataMap); + } + + public HeartbeatRequest() { + } + + /** + * Performs a deep copy on other. + */ + public HeartbeatRequest(HeartbeatRequest other) { + __isset_bitfield = other.__isset_bitfield; + this.lockid = other.lockid; + this.txnid = other.txnid; + } + + public HeartbeatRequest deepCopy() { + return new HeartbeatRequest(this); + } + + @Override + public void clear() { + setLockidIsSet(false); + this.lockid = 0; + setTxnidIsSet(false); + this.txnid = 0; + } + + public long getLockid() { + return this.lockid; + } + + public void setLockid(long lockid) { + this.lockid = lockid; + setLockidIsSet(true); + } + + public void unsetLockid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKID_ISSET_ID); + } + + /** Returns true if field lockid is set (has been assigned a value) and false otherwise */ + public boolean isSetLockid() { + return EncodingUtils.testBit(__isset_bitfield, __LOCKID_ISSET_ID); + } + + public void setLockidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value); + } + + public long getTxnid() { + return this.txnid; + } + + public void setTxnid(long txnid) { + this.txnid = txnid; + setTxnidIsSet(true); + } + + public void unsetTxnid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ + public boolean isSetTxnid() { + return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + public void setTxnidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOCKID: + if (value == null) { + unsetLockid(); + } else { + setLockid((Long)value); + } + break; + + case TXNID: + if (value == null) { + unsetTxnid(); + } else { + setTxnid((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOCKID: + return getLockid(); + + case TXNID: + return getTxnid(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOCKID: + return isSetLockid(); + case TXNID: + return isSetTxnid(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof HeartbeatRequest) + return this.equals((HeartbeatRequest)that); + return false; + } + + public boolean equals(HeartbeatRequest that) { + if (that == null) + return false; + + boolean this_present_lockid = true && this.isSetLockid(); + boolean that_present_lockid = true && that.isSetLockid(); + if (this_present_lockid || that_present_lockid) { + if (!(this_present_lockid && that_present_lockid)) + return false; + if (this.lockid != that.lockid) + return false; + } + + boolean this_present_txnid = true && this.isSetTxnid(); + boolean that_present_txnid = true && that.isSetTxnid(); + if (this_present_txnid || that_present_txnid) { + if (!(this_present_txnid && that_present_txnid)) + return false; + if (this.txnid != that.txnid) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_lockid = true && (isSetLockid()); + list.add(present_lockid); + if (present_lockid) + list.add(lockid); + + boolean present_txnid = true && (isSetTxnid()); + list.add(present_txnid); + if (present_txnid) + list.add(txnid); + + return list.hashCode(); + } + + @Override + public int compareTo(HeartbeatRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLockid()).compareTo(other.isSetLockid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLockid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, other.lockid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxnid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("HeartbeatRequest("); + boolean first = true; + + if (isSetLockid()) { + sb.append("lockid:"); + sb.append(this.lockid); + first = false; + } + if (isSetTxnid()) { + if (!first) sb.append(", "); + sb.append("txnid:"); + sb.append(this.txnid); + 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 { + // 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 HeartbeatRequestStandardSchemeFactory implements SchemeFactory { + public HeartbeatRequestStandardScheme getScheme() { + return new HeartbeatRequestStandardScheme(); + } + } + + private static class HeartbeatRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, HeartbeatRequest 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: // LOCKID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lockid = iprot.readI64(); + struct.setLockidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TXNID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(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, HeartbeatRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetLockid()) { + oprot.writeFieldBegin(LOCKID_FIELD_DESC); + oprot.writeI64(struct.lockid); + oprot.writeFieldEnd(); + } + if (struct.isSetTxnid()) { + oprot.writeFieldBegin(TXNID_FIELD_DESC); + oprot.writeI64(struct.txnid); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class HeartbeatRequestTupleSchemeFactory implements SchemeFactory { + public HeartbeatRequestTupleScheme getScheme() { + return new HeartbeatRequestTupleScheme(); + } + } + + private static class HeartbeatRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, HeartbeatRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetLockid()) { + optionals.set(0); + } + if (struct.isSetTxnid()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetLockid()) { + oprot.writeI64(struct.lockid); + } + if (struct.isSetTxnid()) { + oprot.writeI64(struct.txnid); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.lockid = iprot.readI64(); + struct.setLockidIsSet(true); + } + if (incoming.get(1)) { + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeRequest.java new file mode 100644 index 0000000..f15d7a9 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeRequest.java @@ -0,0 +1,482 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class HeartbeatTxnRangeRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HeartbeatTxnRangeRequest"); + + private static final org.apache.thrift.protocol.TField MIN_FIELD_DESC = new org.apache.thrift.protocol.TField("min", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField MAX_FIELD_DESC = new org.apache.thrift.protocol.TField("max", org.apache.thrift.protocol.TType.I64, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new HeartbeatTxnRangeRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new HeartbeatTxnRangeRequestTupleSchemeFactory()); + } + + private long min; // required + private long max; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MIN((short)1, "min"), + MAX((short)2, "max"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MIN + return MIN; + case 2: // MAX + return MAX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MIN_ISSET_ID = 0; + private static final int __MAX_ISSET_ID = 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); + tmpMap.put(_Fields.MIN, new org.apache.thrift.meta_data.FieldMetaData("min", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.MAX, new org.apache.thrift.meta_data.FieldMetaData("max", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HeartbeatTxnRangeRequest.class, metaDataMap); + } + + public HeartbeatTxnRangeRequest() { + } + + public HeartbeatTxnRangeRequest( + long min, + long max) + { + this(); + this.min = min; + setMinIsSet(true); + this.max = max; + setMaxIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public HeartbeatTxnRangeRequest(HeartbeatTxnRangeRequest other) { + __isset_bitfield = other.__isset_bitfield; + this.min = other.min; + this.max = other.max; + } + + public HeartbeatTxnRangeRequest deepCopy() { + return new HeartbeatTxnRangeRequest(this); + } + + @Override + public void clear() { + setMinIsSet(false); + this.min = 0; + setMaxIsSet(false); + this.max = 0; + } + + public long getMin() { + return this.min; + } + + public void setMin(long min) { + this.min = min; + setMinIsSet(true); + } + + public void unsetMin() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MIN_ISSET_ID); + } + + /** Returns true if field min is set (has been assigned a value) and false otherwise */ + public boolean isSetMin() { + return EncodingUtils.testBit(__isset_bitfield, __MIN_ISSET_ID); + } + + public void setMinIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MIN_ISSET_ID, value); + } + + public long getMax() { + return this.max; + } + + public void setMax(long max) { + this.max = max; + setMaxIsSet(true); + } + + public void unsetMax() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAX_ISSET_ID); + } + + /** Returns true if field max is set (has been assigned a value) and false otherwise */ + public boolean isSetMax() { + return EncodingUtils.testBit(__isset_bitfield, __MAX_ISSET_ID); + } + + public void setMaxIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MIN: + if (value == null) { + unsetMin(); + } else { + setMin((Long)value); + } + break; + + case MAX: + if (value == null) { + unsetMax(); + } else { + setMax((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MIN: + return getMin(); + + case MAX: + return getMax(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MIN: + return isSetMin(); + case MAX: + return isSetMax(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof HeartbeatTxnRangeRequest) + return this.equals((HeartbeatTxnRangeRequest)that); + return false; + } + + public boolean equals(HeartbeatTxnRangeRequest that) { + if (that == null) + return false; + + boolean this_present_min = true; + boolean that_present_min = true; + if (this_present_min || that_present_min) { + if (!(this_present_min && that_present_min)) + return false; + if (this.min != that.min) + return false; + } + + boolean this_present_max = true; + boolean that_present_max = true; + if (this_present_max || that_present_max) { + if (!(this_present_max && that_present_max)) + return false; + if (this.max != that.max) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_min = true; + list.add(present_min); + if (present_min) + list.add(min); + + boolean present_max = true; + list.add(present_max); + if (present_max) + list.add(max); + + return list.hashCode(); + } + + @Override + public int compareTo(HeartbeatTxnRangeRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMin()).compareTo(other.isSetMin()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMin()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.min, other.min); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax()).compareTo(other.isSetMax()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max, other.max); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("HeartbeatTxnRangeRequest("); + boolean first = true; + + sb.append("min:"); + sb.append(this.min); + first = false; + if (!first) sb.append(", "); + sb.append("max:"); + sb.append(this.max); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetMin()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'min' is unset! Struct:" + toString()); + } + + if (!isSetMax()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'max' is unset! Struct:" + toString()); + } + + // 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 { + // 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 HeartbeatTxnRangeRequestStandardSchemeFactory implements SchemeFactory { + public HeartbeatTxnRangeRequestStandardScheme getScheme() { + return new HeartbeatTxnRangeRequestStandardScheme(); + } + } + + private static class HeartbeatTxnRangeRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, HeartbeatTxnRangeRequest 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: // MIN + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.min = iprot.readI64(); + struct.setMinIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MAX + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.max = iprot.readI64(); + struct.setMaxIsSet(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, HeartbeatTxnRangeRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(MIN_FIELD_DESC); + oprot.writeI64(struct.min); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MAX_FIELD_DESC); + oprot.writeI64(struct.max); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class HeartbeatTxnRangeRequestTupleSchemeFactory implements SchemeFactory { + public HeartbeatTxnRangeRequestTupleScheme getScheme() { + return new HeartbeatTxnRangeRequestTupleScheme(); + } + } + + private static class HeartbeatTxnRangeRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.min); + oprot.writeI64(struct.max); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.min = iprot.readI64(); + struct.setMinIsSet(true); + struct.max = iprot.readI64(); + struct.setMaxIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java new file mode 100644 index 0000000..a33210d --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java @@ -0,0 +1,588 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class HeartbeatTxnRangeResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HeartbeatTxnRangeResponse"); + + private static final org.apache.thrift.protocol.TField ABORTED_FIELD_DESC = new org.apache.thrift.protocol.TField("aborted", org.apache.thrift.protocol.TType.SET, (short)1); + private static final org.apache.thrift.protocol.TField NOSUCH_FIELD_DESC = new org.apache.thrift.protocol.TField("nosuch", org.apache.thrift.protocol.TType.SET, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new HeartbeatTxnRangeResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new HeartbeatTxnRangeResponseTupleSchemeFactory()); + } + + private Set aborted; // required + private Set nosuch; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ABORTED((short)1, "aborted"), + NOSUCH((short)2, "nosuch"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ABORTED + return ABORTED; + case 2: // NOSUCH + return NOSUCH; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.ABORTED, new org.apache.thrift.meta_data.FieldMetaData("aborted", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + tmpMap.put(_Fields.NOSUCH, new org.apache.thrift.meta_data.FieldMetaData("nosuch", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HeartbeatTxnRangeResponse.class, metaDataMap); + } + + public HeartbeatTxnRangeResponse() { + } + + public HeartbeatTxnRangeResponse( + Set aborted, + Set nosuch) + { + this(); + this.aborted = aborted; + this.nosuch = nosuch; + } + + /** + * Performs a deep copy on other. + */ + public HeartbeatTxnRangeResponse(HeartbeatTxnRangeResponse other) { + if (other.isSetAborted()) { + Set __this__aborted = new HashSet(other.aborted); + this.aborted = __this__aborted; + } + if (other.isSetNosuch()) { + Set __this__nosuch = new HashSet(other.nosuch); + this.nosuch = __this__nosuch; + } + } + + public HeartbeatTxnRangeResponse deepCopy() { + return new HeartbeatTxnRangeResponse(this); + } + + @Override + public void clear() { + this.aborted = null; + this.nosuch = null; + } + + public int getAbortedSize() { + return (this.aborted == null) ? 0 : this.aborted.size(); + } + + public java.util.Iterator getAbortedIterator() { + return (this.aborted == null) ? null : this.aborted.iterator(); + } + + public void addToAborted(long elem) { + if (this.aborted == null) { + this.aborted = new HashSet(); + } + this.aborted.add(elem); + } + + public Set getAborted() { + return this.aborted; + } + + public void setAborted(Set aborted) { + this.aborted = aborted; + } + + public void unsetAborted() { + this.aborted = null; + } + + /** Returns true if field aborted is set (has been assigned a value) and false otherwise */ + public boolean isSetAborted() { + return this.aborted != null; + } + + public void setAbortedIsSet(boolean value) { + if (!value) { + this.aborted = null; + } + } + + public int getNosuchSize() { + return (this.nosuch == null) ? 0 : this.nosuch.size(); + } + + public java.util.Iterator getNosuchIterator() { + return (this.nosuch == null) ? null : this.nosuch.iterator(); + } + + public void addToNosuch(long elem) { + if (this.nosuch == null) { + this.nosuch = new HashSet(); + } + this.nosuch.add(elem); + } + + public Set getNosuch() { + return this.nosuch; + } + + public void setNosuch(Set nosuch) { + this.nosuch = nosuch; + } + + public void unsetNosuch() { + this.nosuch = null; + } + + /** Returns true if field nosuch is set (has been assigned a value) and false otherwise */ + public boolean isSetNosuch() { + return this.nosuch != null; + } + + public void setNosuchIsSet(boolean value) { + if (!value) { + this.nosuch = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ABORTED: + if (value == null) { + unsetAborted(); + } else { + setAborted((Set)value); + } + break; + + case NOSUCH: + if (value == null) { + unsetNosuch(); + } else { + setNosuch((Set)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ABORTED: + return getAborted(); + + case NOSUCH: + return getNosuch(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ABORTED: + return isSetAborted(); + case NOSUCH: + return isSetNosuch(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof HeartbeatTxnRangeResponse) + return this.equals((HeartbeatTxnRangeResponse)that); + return false; + } + + public boolean equals(HeartbeatTxnRangeResponse that) { + if (that == null) + return false; + + boolean this_present_aborted = true && this.isSetAborted(); + boolean that_present_aborted = true && that.isSetAborted(); + if (this_present_aborted || that_present_aborted) { + if (!(this_present_aborted && that_present_aborted)) + return false; + if (!this.aborted.equals(that.aborted)) + return false; + } + + boolean this_present_nosuch = true && this.isSetNosuch(); + boolean that_present_nosuch = true && that.isSetNosuch(); + if (this_present_nosuch || that_present_nosuch) { + if (!(this_present_nosuch && that_present_nosuch)) + return false; + if (!this.nosuch.equals(that.nosuch)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_aborted = true && (isSetAborted()); + list.add(present_aborted); + if (present_aborted) + list.add(aborted); + + boolean present_nosuch = true && (isSetNosuch()); + list.add(present_nosuch); + if (present_nosuch) + list.add(nosuch); + + return list.hashCode(); + } + + @Override + public int compareTo(HeartbeatTxnRangeResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetAborted()).compareTo(other.isSetAborted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAborted()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aborted, other.aborted); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNosuch()).compareTo(other.isSetNosuch()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNosuch()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nosuch, other.nosuch); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("HeartbeatTxnRangeResponse("); + boolean first = true; + + sb.append("aborted:"); + if (this.aborted == null) { + sb.append("null"); + } else { + sb.append(this.aborted); + } + first = false; + if (!first) sb.append(", "); + sb.append("nosuch:"); + if (this.nosuch == null) { + sb.append("null"); + } else { + sb.append(this.nosuch); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetAborted()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'aborted' is unset! Struct:" + toString()); + } + + if (!isSetNosuch()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nosuch' is unset! Struct:" + toString()); + } + + // 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 HeartbeatTxnRangeResponseStandardSchemeFactory implements SchemeFactory { + public HeartbeatTxnRangeResponseStandardScheme getScheme() { + return new HeartbeatTxnRangeResponseStandardScheme(); + } + } + + private static class HeartbeatTxnRangeResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, HeartbeatTxnRangeResponse 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: // ABORTED + if (schemeField.type == org.apache.thrift.protocol.TType.SET) { + { + org.apache.thrift.protocol.TSet _set540 = iprot.readSetBegin(); + struct.aborted = new HashSet(2*_set540.size); + long _elem541; + for (int _i542 = 0; _i542 < _set540.size; ++_i542) + { + _elem541 = iprot.readI64(); + struct.aborted.add(_elem541); + } + iprot.readSetEnd(); + } + struct.setAbortedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NOSUCH + if (schemeField.type == org.apache.thrift.protocol.TType.SET) { + { + org.apache.thrift.protocol.TSet _set543 = iprot.readSetBegin(); + struct.nosuch = new HashSet(2*_set543.size); + long _elem544; + for (int _i545 = 0; _i545 < _set543.size; ++_i545) + { + _elem544 = iprot.readI64(); + struct.nosuch.add(_elem544); + } + iprot.readSetEnd(); + } + struct.setNosuchIsSet(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, HeartbeatTxnRangeResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.aborted != null) { + oprot.writeFieldBegin(ABORTED_FIELD_DESC); + { + oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.aborted.size())); + for (long _iter546 : struct.aborted) + { + oprot.writeI64(_iter546); + } + oprot.writeSetEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.nosuch != null) { + oprot.writeFieldBegin(NOSUCH_FIELD_DESC); + { + oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.nosuch.size())); + for (long _iter547 : struct.nosuch) + { + oprot.writeI64(_iter547); + } + oprot.writeSetEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class HeartbeatTxnRangeResponseTupleSchemeFactory implements SchemeFactory { + public HeartbeatTxnRangeResponseTupleScheme getScheme() { + return new HeartbeatTxnRangeResponseTupleScheme(); + } + } + + private static class HeartbeatTxnRangeResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.aborted.size()); + for (long _iter548 : struct.aborted) + { + oprot.writeI64(_iter548); + } + } + { + oprot.writeI32(struct.nosuch.size()); + for (long _iter549 : struct.nosuch) + { + oprot.writeI64(_iter549); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TSet _set550 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.aborted = new HashSet(2*_set550.size); + long _elem551; + for (int _i552 = 0; _i552 < _set550.size; ++_i552) + { + _elem551 = iprot.readI64(); + struct.aborted.add(_elem551); + } + } + struct.setAbortedIsSet(true); + { + org.apache.thrift.protocol.TSet _set553 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.nosuch = new HashSet(2*_set553.size); + long _elem554; + for (int _i555 = 0; _i555 < _set553.size; ++_i555) + { + _elem554 = iprot.readI64(); + struct.nosuch.add(_elem554); + } + } + struct.setNosuchIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectPrivilege.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectPrivilege.java new file mode 100644 index 0000000..3b818ab --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectPrivilege.java @@ -0,0 +1,729 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class HiveObjectPrivilege implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HiveObjectPrivilege"); + + 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)1); + private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principalName", 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("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 + private PrivilegeGrantInfo grantInfo; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + HIVE_OBJECT((short)1, "hiveObject"), + PRINCIPAL_NAME((short)2, "principalName"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)3, "principalType"), + GRANT_INFO((short)4, "grantInfo"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // HIVE_OBJECT + return HIVE_OBJECT; + case 2: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 3: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; + case 4: // GRANT_INFO + return GRANT_INFO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.HIVE_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("hiveObject", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectRef.class))); + tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principalName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principalType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.GRANT_INFO, new org.apache.thrift.meta_data.FieldMetaData("grantInfo", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeGrantInfo.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HiveObjectPrivilege.class, metaDataMap); + } + + public HiveObjectPrivilege() { + } + + public HiveObjectPrivilege( + HiveObjectRef hiveObject, + String principalName, + PrincipalType principalType, + PrivilegeGrantInfo grantInfo) + { + this(); + this.hiveObject = hiveObject; + this.principalName = principalName; + this.principalType = principalType; + this.grantInfo = grantInfo; + } + + /** + * Performs a deep copy on other. + */ + public HiveObjectPrivilege(HiveObjectPrivilege other) { + if (other.isSetHiveObject()) { + this.hiveObject = new HiveObjectRef(other.hiveObject); + } + if (other.isSetPrincipalName()) { + this.principalName = other.principalName; + } + if (other.isSetPrincipalType()) { + this.principalType = other.principalType; + } + if (other.isSetGrantInfo()) { + this.grantInfo = new PrivilegeGrantInfo(other.grantInfo); + } + } + + public HiveObjectPrivilege deepCopy() { + return new HiveObjectPrivilege(this); + } + + @Override + public void clear() { + this.hiveObject = null; + this.principalName = null; + this.principalType = null; + this.grantInfo = null; + } + + public HiveObjectRef getHiveObject() { + return this.hiveObject; + } + + public void setHiveObject(HiveObjectRef hiveObject) { + this.hiveObject = hiveObject; + } + + public void unsetHiveObject() { + this.hiveObject = null; + } + + /** Returns true if field hiveObject is set (has been assigned a value) and false otherwise */ + public boolean isSetHiveObject() { + return this.hiveObject != null; + } + + public void setHiveObjectIsSet(boolean value) { + if (!value) { + this.hiveObject = null; + } + } + + public String getPrincipalName() { + return this.principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public void unsetPrincipalName() { + this.principalName = null; + } + + /** Returns true if field principalName is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipalName() { + return this.principalName != null; + } + + public void setPrincipalNameIsSet(boolean value) { + if (!value) { + this.principalName = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipalType() { + return this.principalType; + } + + /** + * + * @see PrincipalType + */ + public void setPrincipalType(PrincipalType principalType) { + this.principalType = principalType; + } + + public void unsetPrincipalType() { + this.principalType = null; + } + + /** Returns true if field principalType is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipalType() { + return this.principalType != null; + } + + public void setPrincipalTypeIsSet(boolean value) { + if (!value) { + this.principalType = null; + } + } + + public PrivilegeGrantInfo getGrantInfo() { + return this.grantInfo; + } + + public void setGrantInfo(PrivilegeGrantInfo grantInfo) { + this.grantInfo = grantInfo; + } + + public void unsetGrantInfo() { + this.grantInfo = null; + } + + /** Returns true if field grantInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetGrantInfo() { + return this.grantInfo != null; + } + + public void setGrantInfoIsSet(boolean value) { + if (!value) { + this.grantInfo = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case HIVE_OBJECT: + if (value == null) { + unsetHiveObject(); + } else { + setHiveObject((HiveObjectRef)value); + } + break; + + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipalName(); + } else { + setPrincipalName((String)value); + } + break; + + case PRINCIPAL_TYPE: + if (value == null) { + unsetPrincipalType(); + } else { + setPrincipalType((PrincipalType)value); + } + break; + + case GRANT_INFO: + if (value == null) { + unsetGrantInfo(); + } else { + setGrantInfo((PrivilegeGrantInfo)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case HIVE_OBJECT: + return getHiveObject(); + + case PRINCIPAL_NAME: + return getPrincipalName(); + + case PRINCIPAL_TYPE: + return getPrincipalType(); + + case GRANT_INFO: + return getGrantInfo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case HIVE_OBJECT: + return isSetHiveObject(); + case PRINCIPAL_NAME: + return isSetPrincipalName(); + case PRINCIPAL_TYPE: + return isSetPrincipalType(); + case GRANT_INFO: + return isSetGrantInfo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof HiveObjectPrivilege) + return this.equals((HiveObjectPrivilege)that); + return false; + } + + public boolean equals(HiveObjectPrivilege that) { + if (that == null) + return false; + + boolean this_present_hiveObject = true && this.isSetHiveObject(); + boolean that_present_hiveObject = true && that.isSetHiveObject(); + if (this_present_hiveObject || that_present_hiveObject) { + if (!(this_present_hiveObject && that_present_hiveObject)) + return false; + if (!this.hiveObject.equals(that.hiveObject)) + return false; + } + + boolean this_present_principalName = true && this.isSetPrincipalName(); + boolean that_present_principalName = true && that.isSetPrincipalName(); + if (this_present_principalName || that_present_principalName) { + if (!(this_present_principalName && that_present_principalName)) + return false; + if (!this.principalName.equals(that.principalName)) + return false; + } + + boolean this_present_principalType = true && this.isSetPrincipalType(); + boolean that_present_principalType = true && that.isSetPrincipalType(); + if (this_present_principalType || that_present_principalType) { + if (!(this_present_principalType && that_present_principalType)) + return false; + if (!this.principalType.equals(that.principalType)) + return false; + } + + boolean this_present_grantInfo = true && this.isSetGrantInfo(); + boolean that_present_grantInfo = true && that.isSetGrantInfo(); + if (this_present_grantInfo || that_present_grantInfo) { + if (!(this_present_grantInfo && that_present_grantInfo)) + return false; + if (!this.grantInfo.equals(that.grantInfo)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_hiveObject = true && (isSetHiveObject()); + list.add(present_hiveObject); + if (present_hiveObject) + list.add(hiveObject); + + boolean present_principalName = true && (isSetPrincipalName()); + list.add(present_principalName); + if (present_principalName) + list.add(principalName); + + boolean present_principalType = true && (isSetPrincipalType()); + list.add(present_principalType); + if (present_principalType) + list.add(principalType.getValue()); + + boolean present_grantInfo = true && (isSetGrantInfo()); + list.add(present_grantInfo); + if (present_grantInfo) + list.add(grantInfo); + + return list.hashCode(); + } + + @Override + public int compareTo(HiveObjectPrivilege other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(other.isSetHiveObject()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHiveObject()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hiveObject, other.hiveObject); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipalName()).compareTo(other.isSetPrincipalName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalName, other.principalName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipalType()).compareTo(other.isSetPrincipalType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalType, other.principalType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantInfo()).compareTo(other.isSetGrantInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantInfo, other.grantInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("HiveObjectPrivilege("); + boolean first = true; + + sb.append("hiveObject:"); + if (this.hiveObject == null) { + sb.append("null"); + } else { + sb.append(this.hiveObject); + } + first = false; + if (!first) sb.append(", "); + sb.append("principalName:"); + if (this.principalName == null) { + sb.append("null"); + } else { + sb.append(this.principalName); + } + first = false; + if (!first) sb.append(", "); + sb.append("principalType:"); + if (this.principalType == null) { + sb.append("null"); + } else { + sb.append(this.principalType); + } + first = false; + if (!first) sb.append(", "); + sb.append("grantInfo:"); + if (this.grantInfo == null) { + sb.append("null"); + } else { + sb.append(this.grantInfo); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipalTypeIsSet(true); + } + if (incoming.get(3)) { + struct.grantInfo = new PrivilegeGrantInfo(); + struct.grantInfo.read(iprot); + struct.setGrantInfoIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java new file mode 100644 index 0000000..d7dd8ec --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java @@ -0,0 +1,872 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class HiveObjectRef implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HiveObjectRef"); + + private static final org.apache.thrift.protocol.TField OBJECT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("objectType", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField OBJECT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("objectName", org.apache.thrift.protocol.TType.STRING, (short)3); + 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 + private List partValues; // required + private String columnName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * + * @see HiveObjectType + */ + OBJECT_TYPE((short)1, "objectType"), + DB_NAME((short)2, "dbName"), + OBJECT_NAME((short)3, "objectName"), + PART_VALUES((short)4, "partValues"), + COLUMN_NAME((short)5, "columnName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // OBJECT_TYPE + return OBJECT_TYPE; + case 2: // DB_NAME + return DB_NAME; + case 3: // OBJECT_NAME + return OBJECT_NAME; + case 4: // PART_VALUES + return PART_VALUES; + case 5: // COLUMN_NAME + return COLUMN_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.OBJECT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("objectType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, HiveObjectType.class))); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OBJECT_NAME, new org.apache.thrift.meta_data.FieldMetaData("objectName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALUES, new org.apache.thrift.meta_data.FieldMetaData("partValues", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("columnName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HiveObjectRef.class, metaDataMap); + } + + public HiveObjectRef() { + } + + public HiveObjectRef( + HiveObjectType objectType, + String dbName, + String objectName, + List partValues, + String columnName) + { + this(); + this.objectType = objectType; + this.dbName = dbName; + this.objectName = objectName; + this.partValues = partValues; + this.columnName = columnName; + } + + /** + * Performs a deep copy on other. + */ + public HiveObjectRef(HiveObjectRef other) { + if (other.isSetObjectType()) { + this.objectType = other.objectType; + } + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetObjectName()) { + this.objectName = other.objectName; + } + if (other.isSetPartValues()) { + List __this__partValues = new ArrayList(other.partValues); + this.partValues = __this__partValues; + } + if (other.isSetColumnName()) { + this.columnName = other.columnName; + } + } + + public HiveObjectRef deepCopy() { + return new HiveObjectRef(this); + } + + @Override + public void clear() { + this.objectType = null; + this.dbName = null; + this.objectName = null; + this.partValues = null; + this.columnName = null; + } + + /** + * + * @see HiveObjectType + */ + public HiveObjectType getObjectType() { + return this.objectType; + } + + /** + * + * @see HiveObjectType + */ + public void setObjectType(HiveObjectType objectType) { + this.objectType = objectType; + } + + public void unsetObjectType() { + this.objectType = null; + } + + /** Returns true if field objectType is set (has been assigned a value) and false otherwise */ + public boolean isSetObjectType() { + return this.objectType != null; + } + + public void setObjectTypeIsSet(boolean value) { + if (!value) { + this.objectType = null; + } + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getObjectName() { + return this.objectName; + } + + public void setObjectName(String objectName) { + this.objectName = objectName; + } + + public void unsetObjectName() { + this.objectName = null; + } + + /** Returns true if field objectName is set (has been assigned a value) and false otherwise */ + public boolean isSetObjectName() { + return this.objectName != null; + } + + public void setObjectNameIsSet(boolean value) { + if (!value) { + this.objectName = null; + } + } + + public int getPartValuesSize() { + return (this.partValues == null) ? 0 : this.partValues.size(); + } + + public java.util.Iterator getPartValuesIterator() { + return (this.partValues == null) ? null : this.partValues.iterator(); + } + + public void addToPartValues(String elem) { + if (this.partValues == null) { + this.partValues = new ArrayList(); + } + this.partValues.add(elem); + } + + public List getPartValues() { + return this.partValues; + } + + public void setPartValues(List partValues) { + this.partValues = partValues; + } + + public void unsetPartValues() { + this.partValues = null; + } + + /** Returns true if field partValues is set (has been assigned a value) and false otherwise */ + public boolean isSetPartValues() { + return this.partValues != null; + } + + public void setPartValuesIsSet(boolean value) { + if (!value) { + this.partValues = null; + } + } + + public String getColumnName() { + return this.columnName; + } + + public void setColumnName(String columnName) { + this.columnName = columnName; + } + + public void unsetColumnName() { + this.columnName = null; + } + + /** Returns true if field columnName is set (has been assigned a value) and false otherwise */ + public boolean isSetColumnName() { + return this.columnName != null; + } + + public void setColumnNameIsSet(boolean value) { + if (!value) { + this.columnName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case OBJECT_TYPE: + if (value == null) { + unsetObjectType(); + } else { + setObjectType((HiveObjectType)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case OBJECT_NAME: + if (value == null) { + unsetObjectName(); + } else { + setObjectName((String)value); + } + break; + + case PART_VALUES: + if (value == null) { + unsetPartValues(); + } else { + setPartValues((List)value); + } + break; + + case COLUMN_NAME: + if (value == null) { + unsetColumnName(); + } else { + setColumnName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case OBJECT_TYPE: + return getObjectType(); + + case DB_NAME: + return getDbName(); + + case OBJECT_NAME: + return getObjectName(); + + case PART_VALUES: + return getPartValues(); + + case COLUMN_NAME: + return getColumnName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case OBJECT_TYPE: + return isSetObjectType(); + case DB_NAME: + return isSetDbName(); + case OBJECT_NAME: + return isSetObjectName(); + case PART_VALUES: + return isSetPartValues(); + case COLUMN_NAME: + return isSetColumnName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof HiveObjectRef) + return this.equals((HiveObjectRef)that); + return false; + } + + public boolean equals(HiveObjectRef that) { + if (that == null) + return false; + + boolean this_present_objectType = true && this.isSetObjectType(); + boolean that_present_objectType = true && that.isSetObjectType(); + if (this_present_objectType || that_present_objectType) { + if (!(this_present_objectType && that_present_objectType)) + return false; + if (!this.objectType.equals(that.objectType)) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_objectName = true && this.isSetObjectName(); + boolean that_present_objectName = true && that.isSetObjectName(); + if (this_present_objectName || that_present_objectName) { + if (!(this_present_objectName && that_present_objectName)) + return false; + if (!this.objectName.equals(that.objectName)) + return false; + } + + boolean this_present_partValues = true && this.isSetPartValues(); + boolean that_present_partValues = true && that.isSetPartValues(); + if (this_present_partValues || that_present_partValues) { + if (!(this_present_partValues && that_present_partValues)) + return false; + if (!this.partValues.equals(that.partValues)) + return false; + } + + boolean this_present_columnName = true && this.isSetColumnName(); + boolean that_present_columnName = true && that.isSetColumnName(); + if (this_present_columnName || that_present_columnName) { + if (!(this_present_columnName && that_present_columnName)) + return false; + if (!this.columnName.equals(that.columnName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_objectType = true && (isSetObjectType()); + list.add(present_objectType); + if (present_objectType) + list.add(objectType.getValue()); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_objectName = true && (isSetObjectName()); + list.add(present_objectName); + if (present_objectName) + list.add(objectName); + + boolean present_partValues = true && (isSetPartValues()); + list.add(present_partValues); + if (present_partValues) + list.add(partValues); + + boolean present_columnName = true && (isSetColumnName()); + list.add(present_columnName); + if (present_columnName) + list.add(columnName); + + return list.hashCode(); + } + + @Override + public int compareTo(HiveObjectRef other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetObjectType()).compareTo(other.isSetObjectType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetObjectType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objectType, other.objectType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetObjectName()).compareTo(other.isSetObjectName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetObjectName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objectName, other.objectName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartValues()).compareTo(other.isSetPartValues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartValues()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partValues, other.partValues); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(other.isSetColumnName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumnName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, other.columnName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("HiveObjectRef("); + boolean first = true; + + sb.append("objectType:"); + if (this.objectType == null) { + sb.append("null"); + } else { + sb.append(this.objectType); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("objectName:"); + if (this.objectName == null) { + sb.append("null"); + } else { + sb.append(this.objectName); + } + first = false; + if (!first) sb.append(", "); + sb.append("partValues:"); + if (this.partValues == null) { + sb.append("null"); + } else { + sb.append(this.partValues); + } + first = false; + if (!first) sb.append(", "); + sb.append("columnName:"); + if (this.columnName == null) { + sb.append("null"); + } else { + sb.append(this.columnName); + } + 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 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 = org.apache.hadoop.hive.metastore.api.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); + String _elem9; + for (int _i10 = 0; _i10 < _list8.size; ++_i10) + { + _elem9 = iprot.readString(); + struct.partValues.add(_elem9); + } + 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 = org.apache.hadoop.hive.metastore.api.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); + String _elem14; + for (int _i15 = 0; _i15 < _list13.size; ++_i15) + { + _elem14 = iprot.readString(); + struct.partValues.add(_elem14); + } + } + struct.setPartValuesIsSet(true); + } + if (incoming.get(4)) { + struct.columnName = iprot.readString(); + struct.setColumnNameIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java new file mode 100644 index 0000000..f5b1d0e --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java @@ -0,0 +1,54 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum HiveObjectType implements org.apache.thrift.TEnum { + GLOBAL(1), + DATABASE(2), + TABLE(3), + PARTITION(4), + COLUMN(5); + + private final int value; + + private HiveObjectType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static HiveObjectType findByValue(int value) { + switch (value) { + case 1: + return GLOBAL; + case 2: + return DATABASE; + case 3: + return TABLE; + case 4: + return PARTITION; + case 5: + return COLUMN; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java new file mode 100644 index 0000000..44d99c7 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java @@ -0,0 +1,1374 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class Index implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Index"); + + private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("indexName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField INDEX_HANDLER_CLASS_FIELD_DESC = new org.apache.thrift.protocol.TField("indexHandlerClass", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField ORIG_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("origTableName", org.apache.thrift.protocol.TType.STRING, (short)4); + 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)5); + private static final org.apache.thrift.protocol.TField LAST_ACCESS_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAccessTime", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField INDEX_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("indexTableName", org.apache.thrift.protocol.TType.STRING, (short)7); + private static final org.apache.thrift.protocol.TField SD_FIELD_DESC = new org.apache.thrift.protocol.TField("sd", org.apache.thrift.protocol.TType.STRUCT, (short)8); + 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 + private String origTableName; // required + private int createTime; // required + private int lastAccessTime; // required + private String indexTableName; // required + private StorageDescriptor sd; // required + private Map parameters; // required + private boolean deferredRebuild; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + INDEX_NAME((short)1, "indexName"), + INDEX_HANDLER_CLASS((short)2, "indexHandlerClass"), + DB_NAME((short)3, "dbName"), + ORIG_TABLE_NAME((short)4, "origTableName"), + CREATE_TIME((short)5, "createTime"), + LAST_ACCESS_TIME((short)6, "lastAccessTime"), + INDEX_TABLE_NAME((short)7, "indexTableName"), + SD((short)8, "sd"), + PARAMETERS((short)9, "parameters"), + DEFERRED_REBUILD((short)10, "deferredRebuild"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // INDEX_NAME + return INDEX_NAME; + case 2: // INDEX_HANDLER_CLASS + return INDEX_HANDLER_CLASS; + case 3: // DB_NAME + return DB_NAME; + case 4: // ORIG_TABLE_NAME + return ORIG_TABLE_NAME; + case 5: // CREATE_TIME + return CREATE_TIME; + case 6: // LAST_ACCESS_TIME + return LAST_ACCESS_TIME; + case 7: // INDEX_TABLE_NAME + return INDEX_TABLE_NAME; + case 8: // SD + return SD; + case 9: // PARAMETERS + return PARAMETERS; + case 10: // DEFERRED_REBUILD + return DEFERRED_REBUILD; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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 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); + tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("indexName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.INDEX_HANDLER_CLASS, new org.apache.thrift.meta_data.FieldMetaData("indexHandlerClass", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ORIG_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("origTableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.LAST_ACCESS_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastAccessTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.INDEX_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("indexTableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SD, new org.apache.thrift.meta_data.FieldMetaData("sd", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StorageDescriptor.class))); + tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.DEFERRED_REBUILD, new org.apache.thrift.meta_data.FieldMetaData("deferredRebuild", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Index.class, metaDataMap); + } + + public Index() { + } + + public Index( + String indexName, + String indexHandlerClass, + String dbName, + String origTableName, + int createTime, + int lastAccessTime, + String indexTableName, + StorageDescriptor sd, + Map parameters, + boolean deferredRebuild) + { + this(); + this.indexName = indexName; + this.indexHandlerClass = indexHandlerClass; + this.dbName = dbName; + this.origTableName = origTableName; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + this.indexTableName = indexTableName; + this.sd = sd; + this.parameters = parameters; + this.deferredRebuild = deferredRebuild; + setDeferredRebuildIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public Index(Index other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetIndexName()) { + this.indexName = other.indexName; + } + if (other.isSetIndexHandlerClass()) { + this.indexHandlerClass = other.indexHandlerClass; + } + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetOrigTableName()) { + this.origTableName = other.origTableName; + } + this.createTime = other.createTime; + this.lastAccessTime = other.lastAccessTime; + if (other.isSetIndexTableName()) { + this.indexTableName = other.indexTableName; + } + if (other.isSetSd()) { + this.sd = new StorageDescriptor(other.sd); + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(other.parameters); + this.parameters = __this__parameters; + } + this.deferredRebuild = other.deferredRebuild; + } + + public Index deepCopy() { + return new Index(this); + } + + @Override + public void clear() { + this.indexName = null; + this.indexHandlerClass = null; + this.dbName = null; + this.origTableName = null; + setCreateTimeIsSet(false); + this.createTime = 0; + setLastAccessTimeIsSet(false); + this.lastAccessTime = 0; + this.indexTableName = null; + this.sd = null; + this.parameters = null; + setDeferredRebuildIsSet(false); + this.deferredRebuild = false; + } + + public String getIndexName() { + return this.indexName; + } + + public void setIndexName(String indexName) { + this.indexName = indexName; + } + + public void unsetIndexName() { + this.indexName = null; + } + + /** Returns true if field indexName is set (has been assigned a value) and false otherwise */ + public boolean isSetIndexName() { + return this.indexName != null; + } + + public void setIndexNameIsSet(boolean value) { + if (!value) { + this.indexName = null; + } + } + + public String getIndexHandlerClass() { + return this.indexHandlerClass; + } + + public void setIndexHandlerClass(String indexHandlerClass) { + this.indexHandlerClass = indexHandlerClass; + } + + public void unsetIndexHandlerClass() { + this.indexHandlerClass = null; + } + + /** Returns true if field indexHandlerClass is set (has been assigned a value) and false otherwise */ + public boolean isSetIndexHandlerClass() { + return this.indexHandlerClass != null; + } + + public void setIndexHandlerClassIsSet(boolean value) { + if (!value) { + this.indexHandlerClass = null; + } + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getOrigTableName() { + return this.origTableName; + } + + public void setOrigTableName(String origTableName) { + this.origTableName = origTableName; + } + + public void unsetOrigTableName() { + this.origTableName = null; + } + + /** Returns true if field origTableName is set (has been assigned a value) and false otherwise */ + public boolean isSetOrigTableName() { + return this.origTableName != null; + } + + public void setOrigTableNameIsSet(boolean value) { + if (!value) { + this.origTableName = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + public int getLastAccessTime() { + return this.lastAccessTime; + } + + public void setLastAccessTime(int lastAccessTime) { + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + } + + public void unsetLastAccessTime() { + __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 EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); + } + + public void setLastAccessTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); + } + + public String getIndexTableName() { + return this.indexTableName; + } + + public void setIndexTableName(String indexTableName) { + this.indexTableName = indexTableName; + } + + public void unsetIndexTableName() { + this.indexTableName = null; + } + + /** Returns true if field indexTableName is set (has been assigned a value) and false otherwise */ + public boolean isSetIndexTableName() { + return this.indexTableName != null; + } + + public void setIndexTableNameIsSet(boolean value) { + if (!value) { + this.indexTableName = null; + } + } + + public StorageDescriptor getSd() { + return this.sd; + } + + public void setSd(StorageDescriptor sd) { + this.sd = sd; + } + + public void unsetSd() { + this.sd = null; + } + + /** Returns true if field sd is set (has been assigned a value) and false otherwise */ + public boolean isSetSd() { + return this.sd != null; + } + + public void setSdIsSet(boolean value) { + if (!value) { + this.sd = null; + } + } + + public int getParametersSize() { + return (this.parameters == null) ? 0 : this.parameters.size(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = parameters; + } + + public void unsetParameters() { + this.parameters = null; + } + + /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ + public boolean isSetParameters() { + return this.parameters != null; + } + + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + + public boolean isDeferredRebuild() { + return this.deferredRebuild; + } + + public void setDeferredRebuild(boolean deferredRebuild) { + this.deferredRebuild = deferredRebuild; + setDeferredRebuildIsSet(true); + } + + public void unsetDeferredRebuild() { + __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 EncodingUtils.testBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID); + } + + public void setDeferredRebuildIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case INDEX_NAME: + if (value == null) { + unsetIndexName(); + } else { + setIndexName((String)value); + } + break; + + case INDEX_HANDLER_CLASS: + if (value == null) { + unsetIndexHandlerClass(); + } else { + setIndexHandlerClass((String)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case ORIG_TABLE_NAME: + if (value == null) { + unsetOrigTableName(); + } else { + setOrigTableName((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case LAST_ACCESS_TIME: + if (value == null) { + unsetLastAccessTime(); + } else { + setLastAccessTime((Integer)value); + } + break; + + case INDEX_TABLE_NAME: + if (value == null) { + unsetIndexTableName(); + } else { + setIndexTableName((String)value); + } + break; + + case SD: + if (value == null) { + unsetSd(); + } else { + setSd((StorageDescriptor)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + case DEFERRED_REBUILD: + if (value == null) { + unsetDeferredRebuild(); + } else { + setDeferredRebuild((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case INDEX_NAME: + return getIndexName(); + + case INDEX_HANDLER_CLASS: + return getIndexHandlerClass(); + + case DB_NAME: + return getDbName(); + + case ORIG_TABLE_NAME: + return getOrigTableName(); + + case CREATE_TIME: + return getCreateTime(); + + case LAST_ACCESS_TIME: + return getLastAccessTime(); + + case INDEX_TABLE_NAME: + return getIndexTableName(); + + case SD: + return getSd(); + + case PARAMETERS: + return getParameters(); + + case DEFERRED_REBUILD: + return isDeferredRebuild(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case INDEX_NAME: + return isSetIndexName(); + case INDEX_HANDLER_CLASS: + return isSetIndexHandlerClass(); + case DB_NAME: + return isSetDbName(); + case ORIG_TABLE_NAME: + return isSetOrigTableName(); + case CREATE_TIME: + return isSetCreateTime(); + case LAST_ACCESS_TIME: + return isSetLastAccessTime(); + case INDEX_TABLE_NAME: + return isSetIndexTableName(); + case SD: + return isSetSd(); + case PARAMETERS: + return isSetParameters(); + case DEFERRED_REBUILD: + return isSetDeferredRebuild(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Index) + return this.equals((Index)that); + return false; + } + + public boolean equals(Index that) { + if (that == null) + return false; + + boolean this_present_indexName = true && this.isSetIndexName(); + boolean that_present_indexName = true && that.isSetIndexName(); + if (this_present_indexName || that_present_indexName) { + if (!(this_present_indexName && that_present_indexName)) + return false; + if (!this.indexName.equals(that.indexName)) + return false; + } + + boolean this_present_indexHandlerClass = true && this.isSetIndexHandlerClass(); + boolean that_present_indexHandlerClass = true && that.isSetIndexHandlerClass(); + if (this_present_indexHandlerClass || that_present_indexHandlerClass) { + if (!(this_present_indexHandlerClass && that_present_indexHandlerClass)) + return false; + if (!this.indexHandlerClass.equals(that.indexHandlerClass)) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_origTableName = true && this.isSetOrigTableName(); + boolean that_present_origTableName = true && that.isSetOrigTableName(); + if (this_present_origTableName || that_present_origTableName) { + if (!(this_present_origTableName && that_present_origTableName)) + return false; + if (!this.origTableName.equals(that.origTableName)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_lastAccessTime = true; + boolean that_present_lastAccessTime = true; + if (this_present_lastAccessTime || that_present_lastAccessTime) { + if (!(this_present_lastAccessTime && that_present_lastAccessTime)) + return false; + if (this.lastAccessTime != that.lastAccessTime) + return false; + } + + boolean this_present_indexTableName = true && this.isSetIndexTableName(); + boolean that_present_indexTableName = true && that.isSetIndexTableName(); + if (this_present_indexTableName || that_present_indexTableName) { + if (!(this_present_indexTableName && that_present_indexTableName)) + return false; + if (!this.indexTableName.equals(that.indexTableName)) + return false; + } + + boolean this_present_sd = true && this.isSetSd(); + boolean that_present_sd = true && that.isSetSd(); + if (this_present_sd || that_present_sd) { + if (!(this_present_sd && that_present_sd)) + return false; + if (!this.sd.equals(that.sd)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + boolean this_present_deferredRebuild = true; + boolean that_present_deferredRebuild = true; + if (this_present_deferredRebuild || that_present_deferredRebuild) { + if (!(this_present_deferredRebuild && that_present_deferredRebuild)) + return false; + if (this.deferredRebuild != that.deferredRebuild) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_indexName = true && (isSetIndexName()); + list.add(present_indexName); + if (present_indexName) + list.add(indexName); + + boolean present_indexHandlerClass = true && (isSetIndexHandlerClass()); + list.add(present_indexHandlerClass); + if (present_indexHandlerClass) + list.add(indexHandlerClass); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_origTableName = true && (isSetOrigTableName()); + list.add(present_origTableName); + if (present_origTableName) + list.add(origTableName); + + boolean present_createTime = true; + list.add(present_createTime); + if (present_createTime) + list.add(createTime); + + boolean present_lastAccessTime = true; + list.add(present_lastAccessTime); + if (present_lastAccessTime) + list.add(lastAccessTime); + + boolean present_indexTableName = true && (isSetIndexTableName()); + list.add(present_indexTableName); + if (present_indexTableName) + list.add(indexTableName); + + boolean present_sd = true && (isSetSd()); + list.add(present_sd); + if (present_sd) + list.add(sd); + + boolean present_parameters = true && (isSetParameters()); + list.add(present_parameters); + if (present_parameters) + list.add(parameters); + + boolean present_deferredRebuild = true; + list.add(present_deferredRebuild); + if (present_deferredRebuild) + list.add(deferredRebuild); + + return list.hashCode(); + } + + @Override + public int compareTo(Index other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetIndexName()).compareTo(other.isSetIndexName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndexName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.indexName, other.indexName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndexHandlerClass()).compareTo(other.isSetIndexHandlerClass()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndexHandlerClass()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.indexHandlerClass, other.indexHandlerClass); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrigTableName()).compareTo(other.isSetOrigTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrigTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.origTableName, other.origTableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(other.isSetLastAccessTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastAccessTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastAccessTime, other.lastAccessTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndexTableName()).compareTo(other.isSetIndexTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndexTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.indexTableName, other.indexTableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSd()).compareTo(other.isSetSd()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSd()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sd, other.sd); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeferredRebuild()).compareTo(other.isSetDeferredRebuild()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeferredRebuild()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deferredRebuild, other.deferredRebuild); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Index("); + boolean first = true; + + sb.append("indexName:"); + if (this.indexName == null) { + sb.append("null"); + } else { + sb.append(this.indexName); + } + first = false; + if (!first) sb.append(", "); + sb.append("indexHandlerClass:"); + if (this.indexHandlerClass == null) { + sb.append("null"); + } else { + sb.append(this.indexHandlerClass); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("origTableName:"); + if (this.origTableName == null) { + sb.append("null"); + } else { + sb.append(this.origTableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("lastAccessTime:"); + sb.append(this.lastAccessTime); + first = false; + if (!first) sb.append(", "); + sb.append("indexTableName:"); + if (this.indexTableName == null) { + sb.append("null"); + } else { + sb.append(this.indexTableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("sd:"); + if (this.sd == null) { + sb.append("null"); + } else { + sb.append(this.sd); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + first = false; + if (!first) sb.append(", "); + sb.append("deferredRebuild:"); + sb.append(this.deferredRebuild); + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 { + // 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 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 _map260 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map260.size); + String _key261; + String _val262; + for (int _i263 = 0; _i263 < _map260.size; ++_i263) + { + _key261 = iprot.readString(); + _val262 = iprot.readString(); + struct.parameters.put(_key261, _val262); + } + 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 _iter264 : struct.parameters.entrySet()) + { + oprot.writeString(_iter264.getKey()); + oprot.writeString(_iter264.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 _iter265 : struct.parameters.entrySet()) + { + oprot.writeString(_iter265.getKey()); + oprot.writeString(_iter265.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 _map266 = 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*_map266.size); + String _key267; + String _val268; + for (int _i269 = 0; _i269 < _map266.size; ++_i269) + { + _key267 = iprot.readString(); + _val268 = iprot.readString(); + struct.parameters.put(_key267, _val268); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(9)) { + struct.deferredRebuild = iprot.readBool(); + struct.setDeferredRebuildIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java new file mode 100644 index 0000000..2588524 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class IndexAlreadyExistsException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IndexAlreadyExistsException.class, metaDataMap); + } + + public IndexAlreadyExistsException() { + } + + public IndexAlreadyExistsException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public IndexAlreadyExistsException(IndexAlreadyExistsException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public IndexAlreadyExistsException deepCopy() { + return new IndexAlreadyExistsException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof IndexAlreadyExistsException) + return this.equals((IndexAlreadyExistsException)that); + return false; + } + + public boolean equals(IndexAlreadyExistsException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(IndexAlreadyExistsException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("IndexAlreadyExistsException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java new file mode 100644 index 0000000..84f1df1 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java @@ -0,0 +1,700 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class InsertEventRequestData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InsertEventRequestData"); + + private static final org.apache.thrift.protocol.TField REPLACE_FIELD_DESC = new org.apache.thrift.protocol.TField("replace", org.apache.thrift.protocol.TType.BOOL, (short)1); + private static final org.apache.thrift.protocol.TField FILES_ADDED_FIELD_DESC = new org.apache.thrift.protocol.TField("filesAdded", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField FILES_ADDED_CHECKSUM_FIELD_DESC = new org.apache.thrift.protocol.TField("filesAddedChecksum", org.apache.thrift.protocol.TType.LIST, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new InsertEventRequestDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InsertEventRequestDataTupleSchemeFactory()); + } + + private boolean replace; // optional + private List filesAdded; // required + private List filesAddedChecksum; // 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 { + REPLACE((short)1, "replace"), + FILES_ADDED((short)2, "filesAdded"), + FILES_ADDED_CHECKSUM((short)3, "filesAddedChecksum"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REPLACE + return REPLACE; + case 2: // FILES_ADDED + return FILES_ADDED; + case 3: // FILES_ADDED_CHECKSUM + return FILES_ADDED_CHECKSUM; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __REPLACE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.REPLACE,_Fields.FILES_ADDED_CHECKSUM}; + 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); + tmpMap.put(_Fields.REPLACE, new org.apache.thrift.meta_data.FieldMetaData("replace", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.FILES_ADDED, new org.apache.thrift.meta_data.FieldMetaData("filesAdded", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.FILES_ADDED_CHECKSUM, new org.apache.thrift.meta_data.FieldMetaData("filesAddedChecksum", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InsertEventRequestData.class, metaDataMap); + } + + public InsertEventRequestData() { + } + + public InsertEventRequestData( + List filesAdded) + { + this(); + this.filesAdded = filesAdded; + } + + /** + * Performs a deep copy on other. + */ + public InsertEventRequestData(InsertEventRequestData other) { + __isset_bitfield = other.__isset_bitfield; + this.replace = other.replace; + if (other.isSetFilesAdded()) { + List __this__filesAdded = new ArrayList(other.filesAdded); + this.filesAdded = __this__filesAdded; + } + if (other.isSetFilesAddedChecksum()) { + List __this__filesAddedChecksum = new ArrayList(other.filesAddedChecksum); + this.filesAddedChecksum = __this__filesAddedChecksum; + } + } + + public InsertEventRequestData deepCopy() { + return new InsertEventRequestData(this); + } + + @Override + public void clear() { + setReplaceIsSet(false); + this.replace = false; + this.filesAdded = null; + this.filesAddedChecksum = null; + } + + public boolean isReplace() { + return this.replace; + } + + public void setReplace(boolean replace) { + this.replace = replace; + setReplaceIsSet(true); + } + + public void unsetReplace() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REPLACE_ISSET_ID); + } + + /** Returns true if field replace is set (has been assigned a value) and false otherwise */ + public boolean isSetReplace() { + return EncodingUtils.testBit(__isset_bitfield, __REPLACE_ISSET_ID); + } + + public void setReplaceIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REPLACE_ISSET_ID, value); + } + + public int getFilesAddedSize() { + return (this.filesAdded == null) ? 0 : this.filesAdded.size(); + } + + public java.util.Iterator getFilesAddedIterator() { + return (this.filesAdded == null) ? null : this.filesAdded.iterator(); + } + + public void addToFilesAdded(String elem) { + if (this.filesAdded == null) { + this.filesAdded = new ArrayList(); + } + this.filesAdded.add(elem); + } + + public List getFilesAdded() { + return this.filesAdded; + } + + public void setFilesAdded(List filesAdded) { + this.filesAdded = filesAdded; + } + + public void unsetFilesAdded() { + this.filesAdded = null; + } + + /** Returns true if field filesAdded is set (has been assigned a value) and false otherwise */ + public boolean isSetFilesAdded() { + return this.filesAdded != null; + } + + public void setFilesAddedIsSet(boolean value) { + if (!value) { + this.filesAdded = null; + } + } + + public int getFilesAddedChecksumSize() { + return (this.filesAddedChecksum == null) ? 0 : this.filesAddedChecksum.size(); + } + + public java.util.Iterator getFilesAddedChecksumIterator() { + return (this.filesAddedChecksum == null) ? null : this.filesAddedChecksum.iterator(); + } + + public void addToFilesAddedChecksum(String elem) { + if (this.filesAddedChecksum == null) { + this.filesAddedChecksum = new ArrayList(); + } + this.filesAddedChecksum.add(elem); + } + + public List getFilesAddedChecksum() { + return this.filesAddedChecksum; + } + + public void setFilesAddedChecksum(List filesAddedChecksum) { + this.filesAddedChecksum = filesAddedChecksum; + } + + public void unsetFilesAddedChecksum() { + this.filesAddedChecksum = null; + } + + /** Returns true if field filesAddedChecksum is set (has been assigned a value) and false otherwise */ + public boolean isSetFilesAddedChecksum() { + return this.filesAddedChecksum != null; + } + + public void setFilesAddedChecksumIsSet(boolean value) { + if (!value) { + this.filesAddedChecksum = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REPLACE: + if (value == null) { + unsetReplace(); + } else { + setReplace((Boolean)value); + } + break; + + case FILES_ADDED: + if (value == null) { + unsetFilesAdded(); + } else { + setFilesAdded((List)value); + } + break; + + case FILES_ADDED_CHECKSUM: + if (value == null) { + unsetFilesAddedChecksum(); + } else { + setFilesAddedChecksum((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REPLACE: + return isReplace(); + + case FILES_ADDED: + return getFilesAdded(); + + case FILES_ADDED_CHECKSUM: + return getFilesAddedChecksum(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REPLACE: + return isSetReplace(); + case FILES_ADDED: + return isSetFilesAdded(); + case FILES_ADDED_CHECKSUM: + return isSetFilesAddedChecksum(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InsertEventRequestData) + return this.equals((InsertEventRequestData)that); + return false; + } + + public boolean equals(InsertEventRequestData that) { + if (that == null) + return false; + + boolean this_present_replace = true && this.isSetReplace(); + boolean that_present_replace = true && that.isSetReplace(); + if (this_present_replace || that_present_replace) { + if (!(this_present_replace && that_present_replace)) + return false; + if (this.replace != that.replace) + return false; + } + + boolean this_present_filesAdded = true && this.isSetFilesAdded(); + boolean that_present_filesAdded = true && that.isSetFilesAdded(); + if (this_present_filesAdded || that_present_filesAdded) { + if (!(this_present_filesAdded && that_present_filesAdded)) + return false; + if (!this.filesAdded.equals(that.filesAdded)) + return false; + } + + boolean this_present_filesAddedChecksum = true && this.isSetFilesAddedChecksum(); + boolean that_present_filesAddedChecksum = true && that.isSetFilesAddedChecksum(); + if (this_present_filesAddedChecksum || that_present_filesAddedChecksum) { + if (!(this_present_filesAddedChecksum && that_present_filesAddedChecksum)) + return false; + if (!this.filesAddedChecksum.equals(that.filesAddedChecksum)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_replace = true && (isSetReplace()); + list.add(present_replace); + if (present_replace) + list.add(replace); + + boolean present_filesAdded = true && (isSetFilesAdded()); + list.add(present_filesAdded); + if (present_filesAdded) + list.add(filesAdded); + + boolean present_filesAddedChecksum = true && (isSetFilesAddedChecksum()); + list.add(present_filesAddedChecksum); + if (present_filesAddedChecksum) + list.add(filesAddedChecksum); + + return list.hashCode(); + } + + @Override + public int compareTo(InsertEventRequestData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReplace()).compareTo(other.isSetReplace()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReplace()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replace, other.replace); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFilesAdded()).compareTo(other.isSetFilesAdded()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilesAdded()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filesAdded, other.filesAdded); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFilesAddedChecksum()).compareTo(other.isSetFilesAddedChecksum()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilesAddedChecksum()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filesAddedChecksum, other.filesAddedChecksum); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("InsertEventRequestData("); + boolean first = true; + + if (isSetReplace()) { + sb.append("replace:"); + sb.append(this.replace); + first = false; + } + if (!first) sb.append(", "); + sb.append("filesAdded:"); + if (this.filesAdded == null) { + sb.append("null"); + } else { + sb.append(this.filesAdded); + } + first = false; + if (isSetFilesAddedChecksum()) { + if (!first) sb.append(", "); + sb.append("filesAddedChecksum:"); + if (this.filesAddedChecksum == null) { + sb.append("null"); + } else { + sb.append(this.filesAddedChecksum); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetFilesAdded()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'filesAdded' is unset! Struct:" + toString()); + } + + // 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 { + // 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 InsertEventRequestDataStandardSchemeFactory implements SchemeFactory { + public InsertEventRequestDataStandardScheme getScheme() { + return new InsertEventRequestDataStandardScheme(); + } + } + + private static class InsertEventRequestDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InsertEventRequestData 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: // REPLACE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.replace = iprot.readBool(); + struct.setReplaceIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FILES_ADDED + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list590 = iprot.readListBegin(); + struct.filesAdded = new ArrayList(_list590.size); + String _elem591; + for (int _i592 = 0; _i592 < _list590.size; ++_i592) + { + _elem591 = iprot.readString(); + struct.filesAdded.add(_elem591); + } + iprot.readListEnd(); + } + struct.setFilesAddedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FILES_ADDED_CHECKSUM + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list593 = iprot.readListBegin(); + struct.filesAddedChecksum = new ArrayList(_list593.size); + String _elem594; + for (int _i595 = 0; _i595 < _list593.size; ++_i595) + { + _elem594 = iprot.readString(); + struct.filesAddedChecksum.add(_elem594); + } + iprot.readListEnd(); + } + struct.setFilesAddedChecksumIsSet(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, InsertEventRequestData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetReplace()) { + oprot.writeFieldBegin(REPLACE_FIELD_DESC); + oprot.writeBool(struct.replace); + oprot.writeFieldEnd(); + } + if (struct.filesAdded != null) { + oprot.writeFieldBegin(FILES_ADDED_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.filesAdded.size())); + for (String _iter596 : struct.filesAdded) + { + oprot.writeString(_iter596); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.filesAddedChecksum != null) { + if (struct.isSetFilesAddedChecksum()) { + oprot.writeFieldBegin(FILES_ADDED_CHECKSUM_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.filesAddedChecksum.size())); + for (String _iter597 : struct.filesAddedChecksum) + { + oprot.writeString(_iter597); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class InsertEventRequestDataTupleSchemeFactory implements SchemeFactory { + public InsertEventRequestDataTupleScheme getScheme() { + return new InsertEventRequestDataTupleScheme(); + } + } + + private static class InsertEventRequestDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InsertEventRequestData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.filesAdded.size()); + for (String _iter598 : struct.filesAdded) + { + oprot.writeString(_iter598); + } + } + BitSet optionals = new BitSet(); + if (struct.isSetReplace()) { + optionals.set(0); + } + if (struct.isSetFilesAddedChecksum()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetReplace()) { + oprot.writeBool(struct.replace); + } + if (struct.isSetFilesAddedChecksum()) { + { + oprot.writeI32(struct.filesAddedChecksum.size()); + for (String _iter599 : struct.filesAddedChecksum) + { + oprot.writeString(_iter599); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, InsertEventRequestData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list600 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.filesAdded = new ArrayList(_list600.size); + String _elem601; + for (int _i602 = 0; _i602 < _list600.size; ++_i602) + { + _elem601 = iprot.readString(); + struct.filesAdded.add(_elem601); + } + } + struct.setFilesAddedIsSet(true); + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.replace = iprot.readBool(); + struct.setReplaceIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list603 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.filesAddedChecksum = new ArrayList(_list603.size); + String _elem604; + for (int _i605 = 0; _i605 < _list603.size; ++_i605) + { + _elem604 = iprot.readString(); + struct.filesAddedChecksum.add(_elem604); + } + } + struct.setFilesAddedChecksumIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java new file mode 100644 index 0000000..7c7e000 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class InvalidInputException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidInputException"); + + 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 InvalidInputExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new InvalidInputExceptionTupleSchemeFactory()); + } + + private String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidInputException.class, metaDataMap); + } + + public InvalidInputException() { + } + + public InvalidInputException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public InvalidInputException(InvalidInputException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public InvalidInputException deepCopy() { + return new InvalidInputException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InvalidInputException) + return this.equals((InvalidInputException)that); + return false; + } + + public boolean equals(InvalidInputException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(InvalidInputException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("InvalidInputException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 InvalidInputExceptionStandardSchemeFactory implements SchemeFactory { + public InvalidInputExceptionStandardScheme getScheme() { + return new InvalidInputExceptionStandardScheme(); + } + } + + private static class InvalidInputExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidInputException 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, InvalidInputException 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 InvalidInputExceptionTupleSchemeFactory implements SchemeFactory { + public InvalidInputExceptionTupleScheme getScheme() { + return new InvalidInputExceptionTupleScheme(); + } + } + + private static class InvalidInputExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, InvalidInputException 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, InvalidInputException 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java new file mode 100644 index 0000000..957aca0 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class InvalidObjectException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidObjectException.class, metaDataMap); + } + + public InvalidObjectException() { + } + + public InvalidObjectException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public InvalidObjectException(InvalidObjectException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public InvalidObjectException deepCopy() { + return new InvalidObjectException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InvalidObjectException) + return this.equals((InvalidObjectException)that); + return false; + } + + public boolean equals(InvalidObjectException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(InvalidObjectException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("InvalidObjectException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java new file mode 100644 index 0000000..6217bb8 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class InvalidOperationException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidOperationException.class, metaDataMap); + } + + public InvalidOperationException() { + } + + public InvalidOperationException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public InvalidOperationException(InvalidOperationException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public InvalidOperationException deepCopy() { + return new InvalidOperationException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InvalidOperationException) + return this.equals((InvalidOperationException)that); + return false; + } + + public boolean equals(InvalidOperationException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(InvalidOperationException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("InvalidOperationException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java new file mode 100644 index 0000000..ef71511 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class InvalidPartitionException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidPartitionException.class, metaDataMap); + } + + public InvalidPartitionException() { + } + + public InvalidPartitionException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public InvalidPartitionException(InvalidPartitionException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public InvalidPartitionException deepCopy() { + return new InvalidPartitionException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InvalidPartitionException) + return this.equals((InvalidPartitionException)that); + return false; + } + + public boolean equals(InvalidPartitionException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(InvalidPartitionException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("InvalidPartitionException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java new file mode 100644 index 0000000..d349508 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java @@ -0,0 +1,1158 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class LockComponent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LockComponent"); + + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("level", org.apache.thrift.protocol.TType.I32, (short)2); + 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)3); + private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField PARTITIONNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionname", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField IS_ACID_FIELD_DESC = new org.apache.thrift.protocol.TField("isAcid", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final org.apache.thrift.protocol.TField IS_DYNAMIC_PARTITION_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("isDynamicPartitionWrite", org.apache.thrift.protocol.TType.BOOL, (short)8); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new LockComponentStandardSchemeFactory()); + schemes.put(TupleScheme.class, new LockComponentTupleSchemeFactory()); + } + + private LockType type; // required + private LockLevel level; // required + private String dbname; // required + private String tablename; // optional + private String partitionname; // optional + private DataOperationType operationType; // optional + private boolean isAcid; // optional + private boolean isDynamicPartitionWrite; // 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 { + /** + * + * @see LockType + */ + TYPE((short)1, "type"), + /** + * + * @see LockLevel + */ + LEVEL((short)2, "level"), + DBNAME((short)3, "dbname"), + TABLENAME((short)4, "tablename"), + PARTITIONNAME((short)5, "partitionname"), + /** + * + * @see DataOperationType + */ + OPERATION_TYPE((short)6, "operationType"), + IS_ACID((short)7, "isAcid"), + IS_DYNAMIC_PARTITION_WRITE((short)8, "isDynamicPartitionWrite"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TYPE + return TYPE; + case 2: // LEVEL + return LEVEL; + case 3: // DBNAME + return DBNAME; + case 4: // TABLENAME + return TABLENAME; + case 5: // PARTITIONNAME + return PARTITIONNAME; + case 6: // OPERATION_TYPE + return OPERATION_TYPE; + case 7: // IS_ACID + return IS_ACID; + case 8: // IS_DYNAMIC_PARTITION_WRITE + return IS_DYNAMIC_PARTITION_WRITE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ISACID_ISSET_ID = 0; + private static final int __ISDYNAMICPARTITIONWRITE_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.TABLENAME,_Fields.PARTITIONNAME,_Fields.OPERATION_TYPE,_Fields.IS_ACID,_Fields.IS_DYNAMIC_PARTITION_WRITE}; + 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); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockType.class))); + tmpMap.put(_Fields.LEVEL, new org.apache.thrift.meta_data.FieldMetaData("level", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockLevel.class))); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OPERATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("operationType", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DataOperationType.class))); + tmpMap.put(_Fields.IS_ACID, new org.apache.thrift.meta_data.FieldMetaData("isAcid", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IS_DYNAMIC_PARTITION_WRITE, new org.apache.thrift.meta_data.FieldMetaData("isDynamicPartitionWrite", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LockComponent.class, metaDataMap); + } + + public LockComponent() { + this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET; + + this.isAcid = false; + + this.isDynamicPartitionWrite = false; + + } + + public LockComponent( + LockType type, + LockLevel level, + String dbname) + { + this(); + this.type = type; + this.level = level; + this.dbname = dbname; + } + + /** + * Performs a deep copy on other. + */ + public LockComponent(LockComponent other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetType()) { + this.type = other.type; + } + if (other.isSetLevel()) { + this.level = other.level; + } + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTablename()) { + this.tablename = other.tablename; + } + if (other.isSetPartitionname()) { + this.partitionname = other.partitionname; + } + if (other.isSetOperationType()) { + this.operationType = other.operationType; + } + this.isAcid = other.isAcid; + this.isDynamicPartitionWrite = other.isDynamicPartitionWrite; + } + + public LockComponent deepCopy() { + return new LockComponent(this); + } + + @Override + public void clear() { + this.type = null; + this.level = null; + this.dbname = null; + this.tablename = null; + this.partitionname = null; + this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET; + + this.isAcid = false; + + this.isDynamicPartitionWrite = false; + + } + + /** + * + * @see LockType + */ + public LockType getType() { + return this.type; + } + + /** + * + * @see LockType + */ + public void setType(LockType type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + /** + * + * @see LockLevel + */ + public LockLevel getLevel() { + return this.level; + } + + /** + * + * @see LockLevel + */ + public void setLevel(LockLevel level) { + this.level = level; + } + + public void unsetLevel() { + this.level = null; + } + + /** Returns true if field level is set (has been assigned a value) and false otherwise */ + public boolean isSetLevel() { + return this.level != null; + } + + public void setLevelIsSet(boolean value) { + if (!value) { + this.level = null; + } + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTablename() { + return this.tablename; + } + + public void setTablename(String tablename) { + this.tablename = tablename; + } + + public void unsetTablename() { + this.tablename = null; + } + + /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ + public boolean isSetTablename() { + return this.tablename != null; + } + + public void setTablenameIsSet(boolean value) { + if (!value) { + this.tablename = null; + } + } + + public String getPartitionname() { + return this.partitionname; + } + + public void setPartitionname(String partitionname) { + this.partitionname = partitionname; + } + + public void unsetPartitionname() { + this.partitionname = null; + } + + /** Returns true if field partitionname is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitionname() { + return this.partitionname != null; + } + + public void setPartitionnameIsSet(boolean value) { + if (!value) { + this.partitionname = null; + } + } + + /** + * + * @see DataOperationType + */ + public DataOperationType getOperationType() { + return this.operationType; + } + + /** + * + * @see DataOperationType + */ + public void setOperationType(DataOperationType operationType) { + this.operationType = operationType; + } + + public void unsetOperationType() { + this.operationType = null; + } + + /** Returns true if field operationType is set (has been assigned a value) and false otherwise */ + public boolean isSetOperationType() { + return this.operationType != null; + } + + public void setOperationTypeIsSet(boolean value) { + if (!value) { + this.operationType = null; + } + } + + public boolean isIsAcid() { + return this.isAcid; + } + + public void setIsAcid(boolean isAcid) { + this.isAcid = isAcid; + setIsAcidIsSet(true); + } + + public void unsetIsAcid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISACID_ISSET_ID); + } + + /** Returns true if field isAcid is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAcid() { + return EncodingUtils.testBit(__isset_bitfield, __ISACID_ISSET_ID); + } + + public void setIsAcidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISACID_ISSET_ID, value); + } + + public boolean isIsDynamicPartitionWrite() { + return this.isDynamicPartitionWrite; + } + + public void setIsDynamicPartitionWrite(boolean isDynamicPartitionWrite) { + this.isDynamicPartitionWrite = isDynamicPartitionWrite; + setIsDynamicPartitionWriteIsSet(true); + } + + public void unsetIsDynamicPartitionWrite() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISDYNAMICPARTITIONWRITE_ISSET_ID); + } + + /** Returns true if field isDynamicPartitionWrite is set (has been assigned a value) and false otherwise */ + public boolean isSetIsDynamicPartitionWrite() { + return EncodingUtils.testBit(__isset_bitfield, __ISDYNAMICPARTITIONWRITE_ISSET_ID); + } + + public void setIsDynamicPartitionWriteIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISDYNAMICPARTITIONWRITE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((LockType)value); + } + break; + + case LEVEL: + if (value == null) { + unsetLevel(); + } else { + setLevel((LockLevel)value); + } + break; + + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TABLENAME: + if (value == null) { + unsetTablename(); + } else { + setTablename((String)value); + } + break; + + case PARTITIONNAME: + if (value == null) { + unsetPartitionname(); + } else { + setPartitionname((String)value); + } + break; + + case OPERATION_TYPE: + if (value == null) { + unsetOperationType(); + } else { + setOperationType((DataOperationType)value); + } + break; + + case IS_ACID: + if (value == null) { + unsetIsAcid(); + } else { + setIsAcid((Boolean)value); + } + break; + + case IS_DYNAMIC_PARTITION_WRITE: + if (value == null) { + unsetIsDynamicPartitionWrite(); + } else { + setIsDynamicPartitionWrite((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TYPE: + return getType(); + + case LEVEL: + return getLevel(); + + case DBNAME: + return getDbname(); + + case TABLENAME: + return getTablename(); + + case PARTITIONNAME: + return getPartitionname(); + + case OPERATION_TYPE: + return getOperationType(); + + case IS_ACID: + return isIsAcid(); + + case IS_DYNAMIC_PARTITION_WRITE: + return isIsDynamicPartitionWrite(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TYPE: + return isSetType(); + case LEVEL: + return isSetLevel(); + case DBNAME: + return isSetDbname(); + case TABLENAME: + return isSetTablename(); + case PARTITIONNAME: + return isSetPartitionname(); + case OPERATION_TYPE: + return isSetOperationType(); + case IS_ACID: + return isSetIsAcid(); + case IS_DYNAMIC_PARTITION_WRITE: + return isSetIsDynamicPartitionWrite(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof LockComponent) + return this.equals((LockComponent)that); + return false; + } + + public boolean equals(LockComponent that) { + if (that == null) + return false; + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + boolean this_present_level = true && this.isSetLevel(); + boolean that_present_level = true && that.isSetLevel(); + if (this_present_level || that_present_level) { + if (!(this_present_level && that_present_level)) + return false; + if (!this.level.equals(that.level)) + return false; + } + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tablename = true && this.isSetTablename(); + boolean that_present_tablename = true && that.isSetTablename(); + if (this_present_tablename || that_present_tablename) { + if (!(this_present_tablename && that_present_tablename)) + return false; + if (!this.tablename.equals(that.tablename)) + return false; + } + + boolean this_present_partitionname = true && this.isSetPartitionname(); + boolean that_present_partitionname = true && that.isSetPartitionname(); + if (this_present_partitionname || that_present_partitionname) { + if (!(this_present_partitionname && that_present_partitionname)) + return false; + if (!this.partitionname.equals(that.partitionname)) + return false; + } + + boolean this_present_operationType = true && this.isSetOperationType(); + boolean that_present_operationType = true && that.isSetOperationType(); + if (this_present_operationType || that_present_operationType) { + if (!(this_present_operationType && that_present_operationType)) + return false; + if (!this.operationType.equals(that.operationType)) + return false; + } + + boolean this_present_isAcid = true && this.isSetIsAcid(); + boolean that_present_isAcid = true && that.isSetIsAcid(); + if (this_present_isAcid || that_present_isAcid) { + if (!(this_present_isAcid && that_present_isAcid)) + return false; + if (this.isAcid != that.isAcid) + return false; + } + + boolean this_present_isDynamicPartitionWrite = true && this.isSetIsDynamicPartitionWrite(); + boolean that_present_isDynamicPartitionWrite = true && that.isSetIsDynamicPartitionWrite(); + if (this_present_isDynamicPartitionWrite || that_present_isDynamicPartitionWrite) { + if (!(this_present_isDynamicPartitionWrite && that_present_isDynamicPartitionWrite)) + return false; + if (this.isDynamicPartitionWrite != that.isDynamicPartitionWrite) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + + boolean present_level = true && (isSetLevel()); + list.add(present_level); + if (present_level) + list.add(level.getValue()); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tablename = true && (isSetTablename()); + list.add(present_tablename); + if (present_tablename) + list.add(tablename); + + boolean present_partitionname = true && (isSetPartitionname()); + list.add(present_partitionname); + if (present_partitionname) + list.add(partitionname); + + boolean present_operationType = true && (isSetOperationType()); + list.add(present_operationType); + if (present_operationType) + list.add(operationType.getValue()); + + boolean present_isAcid = true && (isSetIsAcid()); + list.add(present_isAcid); + if (present_isAcid) + list.add(isAcid); + + boolean present_isDynamicPartitionWrite = true && (isSetIsDynamicPartitionWrite()); + list.add(present_isDynamicPartitionWrite); + if (present_isDynamicPartitionWrite) + list.add(isDynamicPartitionWrite); + + return list.hashCode(); + } + + @Override + public int compareTo(LockComponent other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLevel()).compareTo(other.isSetLevel()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLevel()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.level, other.level); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTablename()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartitionname()).compareTo(other.isSetPartitionname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionname, other.partitionname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(other.isSetOperationType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperationType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsAcid()).compareTo(other.isSetIsAcid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAcid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAcid, other.isAcid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsDynamicPartitionWrite()).compareTo(other.isSetIsDynamicPartitionWrite()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsDynamicPartitionWrite()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDynamicPartitionWrite, other.isDynamicPartitionWrite); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("LockComponent("); + boolean first = true; + + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (!first) sb.append(", "); + sb.append("level:"); + if (this.level == null) { + sb.append("null"); + } else { + sb.append(this.level); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (isSetTablename()) { + if (!first) sb.append(", "); + sb.append("tablename:"); + if (this.tablename == null) { + sb.append("null"); + } else { + sb.append(this.tablename); + } + first = false; + } + if (isSetPartitionname()) { + if (!first) sb.append(", "); + sb.append("partitionname:"); + if (this.partitionname == null) { + sb.append("null"); + } else { + sb.append(this.partitionname); + } + first = false; + } + if (isSetOperationType()) { + if (!first) sb.append(", "); + sb.append("operationType:"); + if (this.operationType == null) { + sb.append("null"); + } else { + sb.append(this.operationType); + } + first = false; + } + if (isSetIsAcid()) { + if (!first) sb.append(", "); + sb.append("isAcid:"); + sb.append(this.isAcid); + first = false; + } + if (isSetIsDynamicPartitionWrite()) { + if (!first) sb.append(", "); + sb.append("isDynamicPartitionWrite:"); + sb.append(this.isDynamicPartitionWrite); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); + } + + if (!isSetLevel()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'level' is unset! Struct:" + toString()); + } + + if (!isSetDbname()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); + } + + // 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 { + // 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 LockComponentStandardSchemeFactory implements SchemeFactory { + public LockComponentStandardScheme getScheme() { + return new LockComponentStandardScheme(); + } + } + + private static class LockComponentStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, LockComponent 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.I32) { + struct.type = org.apache.hadoop.hive.metastore.api.LockType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // LEVEL + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.level = org.apache.hadoop.hive.metastore.api.LockLevel.findByValue(iprot.readI32()); + struct.setLevelIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // 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 4: // TABLENAME + 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 5: // PARTITIONNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.partitionname = iprot.readString(); + struct.setPartitionnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // OPERATION_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32()); + struct.setOperationTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // IS_ACID + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAcid = iprot.readBool(); + struct.setIsAcidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // IS_DYNAMIC_PARTITION_WRITE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isDynamicPartitionWrite = iprot.readBool(); + struct.setIsDynamicPartitionWriteIsSet(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, LockComponent struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } + if (struct.level != null) { + oprot.writeFieldBegin(LEVEL_FIELD_DESC); + oprot.writeI32(struct.level.getValue()); + oprot.writeFieldEnd(); + } + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.tablename != null) { + if (struct.isSetTablename()) { + oprot.writeFieldBegin(TABLENAME_FIELD_DESC); + oprot.writeString(struct.tablename); + oprot.writeFieldEnd(); + } + } + if (struct.partitionname != null) { + if (struct.isSetPartitionname()) { + oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC); + oprot.writeString(struct.partitionname); + oprot.writeFieldEnd(); + } + } + if (struct.operationType != null) { + if (struct.isSetOperationType()) { + oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC); + oprot.writeI32(struct.operationType.getValue()); + oprot.writeFieldEnd(); + } + } + if (struct.isSetIsAcid()) { + oprot.writeFieldBegin(IS_ACID_FIELD_DESC); + oprot.writeBool(struct.isAcid); + oprot.writeFieldEnd(); + } + if (struct.isSetIsDynamicPartitionWrite()) { + oprot.writeFieldBegin(IS_DYNAMIC_PARTITION_WRITE_FIELD_DESC); + oprot.writeBool(struct.isDynamicPartitionWrite); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class LockComponentTupleSchemeFactory implements SchemeFactory { + public LockComponentTupleScheme getScheme() { + return new LockComponentTupleScheme(); + } + } + + private static class LockComponentTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, LockComponent struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI32(struct.type.getValue()); + oprot.writeI32(struct.level.getValue()); + oprot.writeString(struct.dbname); + BitSet optionals = new BitSet(); + if (struct.isSetTablename()) { + optionals.set(0); + } + if (struct.isSetPartitionname()) { + optionals.set(1); + } + if (struct.isSetOperationType()) { + optionals.set(2); + } + if (struct.isSetIsAcid()) { + optionals.set(3); + } + if (struct.isSetIsDynamicPartitionWrite()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetTablename()) { + oprot.writeString(struct.tablename); + } + if (struct.isSetPartitionname()) { + oprot.writeString(struct.partitionname); + } + if (struct.isSetOperationType()) { + oprot.writeI32(struct.operationType.getValue()); + } + if (struct.isSetIsAcid()) { + oprot.writeBool(struct.isAcid); + } + if (struct.isSetIsDynamicPartitionWrite()) { + oprot.writeBool(struct.isDynamicPartitionWrite); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, LockComponent struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.type = org.apache.hadoop.hive.metastore.api.LockType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + struct.level = org.apache.hadoop.hive.metastore.api.LockLevel.findByValue(iprot.readI32()); + struct.setLevelIsSet(true); + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.tablename = iprot.readString(); + struct.setTablenameIsSet(true); + } + if (incoming.get(1)) { + struct.partitionname = iprot.readString(); + struct.setPartitionnameIsSet(true); + } + if (incoming.get(2)) { + struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32()); + struct.setOperationTypeIsSet(true); + } + if (incoming.get(3)) { + struct.isAcid = iprot.readBool(); + struct.setIsAcidIsSet(true); + } + if (incoming.get(4)) { + struct.isDynamicPartitionWrite = iprot.readBool(); + struct.setIsDynamicPartitionWriteIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockLevel.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockLevel.java new file mode 100644 index 0000000..e58ea46 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockLevel.java @@ -0,0 +1,48 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum LockLevel implements org.apache.thrift.TEnum { + DB(1), + TABLE(2), + PARTITION(3); + + private final int value; + + private LockLevel(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static LockLevel findByValue(int value) { + switch (value) { + case 1: + return DB; + case 2: + return TABLE; + case 3: + return PARTITION; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java new file mode 100644 index 0000000..833adbb --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java @@ -0,0 +1,861 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class LockRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LockRequest"); + + private static final org.apache.thrift.protocol.TField COMPONENT_FIELD_DESC = new org.apache.thrift.protocol.TField("component", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField AGENT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("agentInfo", org.apache.thrift.protocol.TType.STRING, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new LockRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new LockRequestTupleSchemeFactory()); + } + + private List component; // required + private long txnid; // optional + private String user; // required + private String hostname; // required + private String agentInfo; // 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 { + COMPONENT((short)1, "component"), + TXNID((short)2, "txnid"), + USER((short)3, "user"), + HOSTNAME((short)4, "hostname"), + AGENT_INFO((short)5, "agentInfo"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // COMPONENT + return COMPONENT; + case 2: // TXNID + return TXNID; + case 3: // USER + return USER; + case 4: // HOSTNAME + return HOSTNAME; + case 5: // AGENT_INFO + return AGENT_INFO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TXNID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.TXNID,_Fields.AGENT_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); + tmpMap.put(_Fields.COMPONENT, new org.apache.thrift.meta_data.FieldMetaData("component", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LockComponent.class)))); + tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AGENT_INFO, new org.apache.thrift.meta_data.FieldMetaData("agentInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LockRequest.class, metaDataMap); + } + + public LockRequest() { + this.agentInfo = "Unknown"; + + } + + public LockRequest( + List component, + String user, + String hostname) + { + this(); + this.component = component; + this.user = user; + this.hostname = hostname; + } + + /** + * Performs a deep copy on other. + */ + public LockRequest(LockRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetComponent()) { + List __this__component = new ArrayList(other.component.size()); + for (LockComponent other_element : other.component) { + __this__component.add(new LockComponent(other_element)); + } + this.component = __this__component; + } + this.txnid = other.txnid; + if (other.isSetUser()) { + this.user = other.user; + } + if (other.isSetHostname()) { + this.hostname = other.hostname; + } + if (other.isSetAgentInfo()) { + this.agentInfo = other.agentInfo; + } + } + + public LockRequest deepCopy() { + return new LockRequest(this); + } + + @Override + public void clear() { + this.component = null; + setTxnidIsSet(false); + this.txnid = 0; + this.user = null; + this.hostname = null; + this.agentInfo = "Unknown"; + + } + + public int getComponentSize() { + return (this.component == null) ? 0 : this.component.size(); + } + + public java.util.Iterator getComponentIterator() { + return (this.component == null) ? null : this.component.iterator(); + } + + public void addToComponent(LockComponent elem) { + if (this.component == null) { + this.component = new ArrayList(); + } + this.component.add(elem); + } + + public List getComponent() { + return this.component; + } + + public void setComponent(List component) { + this.component = component; + } + + public void unsetComponent() { + this.component = null; + } + + /** Returns true if field component is set (has been assigned a value) and false otherwise */ + public boolean isSetComponent() { + return this.component != null; + } + + public void setComponentIsSet(boolean value) { + if (!value) { + this.component = null; + } + } + + public long getTxnid() { + return this.txnid; + } + + public void setTxnid(long txnid) { + this.txnid = txnid; + setTxnidIsSet(true); + } + + public void unsetTxnid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ + public boolean isSetTxnid() { + return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + public void setTxnidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); + } + + public String getUser() { + return this.user; + } + + public void setUser(String user) { + this.user = user; + } + + public void unsetUser() { + this.user = null; + } + + /** Returns true if field user is set (has been assigned a value) and false otherwise */ + public boolean isSetUser() { + return this.user != null; + } + + public void setUserIsSet(boolean value) { + if (!value) { + this.user = null; + } + } + + public String getHostname() { + return this.hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public void unsetHostname() { + this.hostname = null; + } + + /** Returns true if field hostname is set (has been assigned a value) and false otherwise */ + public boolean isSetHostname() { + return this.hostname != null; + } + + public void setHostnameIsSet(boolean value) { + if (!value) { + this.hostname = null; + } + } + + public String getAgentInfo() { + return this.agentInfo; + } + + public void setAgentInfo(String agentInfo) { + this.agentInfo = agentInfo; + } + + public void unsetAgentInfo() { + this.agentInfo = null; + } + + /** Returns true if field agentInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetAgentInfo() { + return this.agentInfo != null; + } + + public void setAgentInfoIsSet(boolean value) { + if (!value) { + this.agentInfo = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case COMPONENT: + if (value == null) { + unsetComponent(); + } else { + setComponent((List)value); + } + break; + + case TXNID: + if (value == null) { + unsetTxnid(); + } else { + setTxnid((Long)value); + } + break; + + case USER: + if (value == null) { + unsetUser(); + } else { + setUser((String)value); + } + break; + + case HOSTNAME: + if (value == null) { + unsetHostname(); + } else { + setHostname((String)value); + } + break; + + case AGENT_INFO: + if (value == null) { + unsetAgentInfo(); + } else { + setAgentInfo((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case COMPONENT: + return getComponent(); + + case TXNID: + return getTxnid(); + + case USER: + return getUser(); + + case HOSTNAME: + return getHostname(); + + case AGENT_INFO: + return getAgentInfo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case COMPONENT: + return isSetComponent(); + case TXNID: + return isSetTxnid(); + case USER: + return isSetUser(); + case HOSTNAME: + return isSetHostname(); + case AGENT_INFO: + return isSetAgentInfo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof LockRequest) + return this.equals((LockRequest)that); + return false; + } + + public boolean equals(LockRequest that) { + if (that == null) + return false; + + boolean this_present_component = true && this.isSetComponent(); + boolean that_present_component = true && that.isSetComponent(); + if (this_present_component || that_present_component) { + if (!(this_present_component && that_present_component)) + return false; + if (!this.component.equals(that.component)) + return false; + } + + boolean this_present_txnid = true && this.isSetTxnid(); + boolean that_present_txnid = true && that.isSetTxnid(); + if (this_present_txnid || that_present_txnid) { + if (!(this_present_txnid && that_present_txnid)) + return false; + if (this.txnid != that.txnid) + return false; + } + + boolean this_present_user = true && this.isSetUser(); + boolean that_present_user = true && that.isSetUser(); + if (this_present_user || that_present_user) { + if (!(this_present_user && that_present_user)) + return false; + if (!this.user.equals(that.user)) + return false; + } + + boolean this_present_hostname = true && this.isSetHostname(); + boolean that_present_hostname = true && that.isSetHostname(); + if (this_present_hostname || that_present_hostname) { + if (!(this_present_hostname && that_present_hostname)) + return false; + if (!this.hostname.equals(that.hostname)) + return false; + } + + boolean this_present_agentInfo = true && this.isSetAgentInfo(); + boolean that_present_agentInfo = true && that.isSetAgentInfo(); + if (this_present_agentInfo || that_present_agentInfo) { + if (!(this_present_agentInfo && that_present_agentInfo)) + return false; + if (!this.agentInfo.equals(that.agentInfo)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_component = true && (isSetComponent()); + list.add(present_component); + if (present_component) + list.add(component); + + boolean present_txnid = true && (isSetTxnid()); + list.add(present_txnid); + if (present_txnid) + list.add(txnid); + + boolean present_user = true && (isSetUser()); + list.add(present_user); + if (present_user) + list.add(user); + + boolean present_hostname = true && (isSetHostname()); + list.add(present_hostname); + if (present_hostname) + list.add(hostname); + + boolean present_agentInfo = true && (isSetAgentInfo()); + list.add(present_agentInfo); + if (present_agentInfo) + list.add(agentInfo); + + return list.hashCode(); + } + + @Override + public int compareTo(LockRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetComponent()).compareTo(other.isSetComponent()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetComponent()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.component, other.component); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxnid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHostname()).compareTo(other.isSetHostname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHostname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, other.hostname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAgentInfo()).compareTo(other.isSetAgentInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentInfo, other.agentInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("LockRequest("); + boolean first = true; + + sb.append("component:"); + if (this.component == null) { + sb.append("null"); + } else { + sb.append(this.component); + } + first = false; + if (isSetTxnid()) { + if (!first) sb.append(", "); + sb.append("txnid:"); + sb.append(this.txnid); + first = false; + } + if (!first) sb.append(", "); + sb.append("user:"); + if (this.user == null) { + sb.append("null"); + } else { + sb.append(this.user); + } + first = false; + if (!first) sb.append(", "); + sb.append("hostname:"); + if (this.hostname == null) { + sb.append("null"); + } else { + sb.append(this.hostname); + } + first = false; + if (isSetAgentInfo()) { + if (!first) sb.append(", "); + sb.append("agentInfo:"); + if (this.agentInfo == null) { + sb.append("null"); + } else { + sb.append(this.agentInfo); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetComponent()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'component' is unset! Struct:" + toString()); + } + + if (!isSetUser()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'user' is unset! Struct:" + toString()); + } + + if (!isSetHostname()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'hostname' is unset! Struct:" + toString()); + } + + // 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 { + // 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 LockRequestStandardSchemeFactory implements SchemeFactory { + public LockRequestStandardScheme getScheme() { + return new LockRequestStandardScheme(); + } + } + + private static class LockRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, LockRequest 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: // COMPONENT + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list524 = iprot.readListBegin(); + struct.component = new ArrayList(_list524.size); + LockComponent _elem525; + for (int _i526 = 0; _i526 < _list524.size; ++_i526) + { + _elem525 = new LockComponent(); + _elem525.read(iprot); + struct.component.add(_elem525); + } + iprot.readListEnd(); + } + struct.setComponentIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TXNID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // USER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user = iprot.readString(); + struct.setUserIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // HOSTNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.hostname = iprot.readString(); + struct.setHostnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // AGENT_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.agentInfo = iprot.readString(); + struct.setAgentInfoIsSet(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, LockRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.component != null) { + oprot.writeFieldBegin(COMPONENT_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.component.size())); + for (LockComponent _iter527 : struct.component) + { + _iter527.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetTxnid()) { + oprot.writeFieldBegin(TXNID_FIELD_DESC); + oprot.writeI64(struct.txnid); + oprot.writeFieldEnd(); + } + if (struct.user != null) { + oprot.writeFieldBegin(USER_FIELD_DESC); + oprot.writeString(struct.user); + oprot.writeFieldEnd(); + } + if (struct.hostname != null) { + oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); + oprot.writeString(struct.hostname); + oprot.writeFieldEnd(); + } + if (struct.agentInfo != null) { + if (struct.isSetAgentInfo()) { + oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC); + oprot.writeString(struct.agentInfo); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class LockRequestTupleSchemeFactory implements SchemeFactory { + public LockRequestTupleScheme getScheme() { + return new LockRequestTupleScheme(); + } + } + + private static class LockRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, LockRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.component.size()); + for (LockComponent _iter528 : struct.component) + { + _iter528.write(oprot); + } + } + oprot.writeString(struct.user); + oprot.writeString(struct.hostname); + BitSet optionals = new BitSet(); + if (struct.isSetTxnid()) { + optionals.set(0); + } + if (struct.isSetAgentInfo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetTxnid()) { + oprot.writeI64(struct.txnid); + } + if (struct.isSetAgentInfo()) { + oprot.writeString(struct.agentInfo); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, LockRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list529 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.component = new ArrayList(_list529.size); + LockComponent _elem530; + for (int _i531 = 0; _i531 < _list529.size; ++_i531) + { + _elem530 = new LockComponent(); + _elem530.read(iprot); + struct.component.add(_elem530); + } + } + struct.setComponentIsSet(true); + struct.user = iprot.readString(); + struct.setUserIsSet(true); + struct.hostname = iprot.readString(); + struct.setHostnameIsSet(true); + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(true); + } + if (incoming.get(1)) { + struct.agentInfo = iprot.readString(); + struct.setAgentInfoIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockResponse.java new file mode 100644 index 0000000..862c67f --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockResponse.java @@ -0,0 +1,500 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class LockResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LockResponse"); + + private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1); + 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)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new LockResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new LockResponseTupleSchemeFactory()); + } + + private long lockid; // required + private LockState state; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + LOCKID((short)1, "lockid"), + /** + * + * @see LockState + */ + STATE((short)2, "state"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOCKID + return LOCKID; + case 2: // STATE + return STATE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LOCKID_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockState.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LockResponse.class, metaDataMap); + } + + public LockResponse() { + } + + public LockResponse( + long lockid, + LockState state) + { + this(); + this.lockid = lockid; + setLockidIsSet(true); + this.state = state; + } + + /** + * Performs a deep copy on other. + */ + public LockResponse(LockResponse other) { + __isset_bitfield = other.__isset_bitfield; + this.lockid = other.lockid; + if (other.isSetState()) { + this.state = other.state; + } + } + + public LockResponse deepCopy() { + return new LockResponse(this); + } + + @Override + public void clear() { + setLockidIsSet(false); + this.lockid = 0; + this.state = null; + } + + public long getLockid() { + return this.lockid; + } + + public void setLockid(long lockid) { + this.lockid = lockid; + setLockidIsSet(true); + } + + public void unsetLockid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKID_ISSET_ID); + } + + /** Returns true if field lockid is set (has been assigned a value) and false otherwise */ + public boolean isSetLockid() { + return EncodingUtils.testBit(__isset_bitfield, __LOCKID_ISSET_ID); + } + + public void setLockidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value); + } + + /** + * + * @see LockState + */ + public LockState getState() { + return this.state; + } + + /** + * + * @see LockState + */ + public void setState(LockState state) { + this.state = state; + } + + public void unsetState() { + this.state = null; + } + + /** Returns true if field state is set (has been assigned a value) and false otherwise */ + public boolean isSetState() { + return this.state != null; + } + + public void setStateIsSet(boolean value) { + if (!value) { + this.state = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOCKID: + if (value == null) { + unsetLockid(); + } else { + setLockid((Long)value); + } + break; + + case STATE: + if (value == null) { + unsetState(); + } else { + setState((LockState)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOCKID: + return getLockid(); + + case STATE: + return getState(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOCKID: + return isSetLockid(); + case STATE: + return isSetState(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof LockResponse) + return this.equals((LockResponse)that); + return false; + } + + public boolean equals(LockResponse that) { + if (that == null) + return false; + + boolean this_present_lockid = true; + boolean that_present_lockid = true; + if (this_present_lockid || that_present_lockid) { + if (!(this_present_lockid && that_present_lockid)) + return false; + if (this.lockid != that.lockid) + return false; + } + + boolean this_present_state = true && this.isSetState(); + boolean that_present_state = true && that.isSetState(); + if (this_present_state || that_present_state) { + if (!(this_present_state && that_present_state)) + return false; + if (!this.state.equals(that.state)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_lockid = true; + list.add(present_lockid); + if (present_lockid) + list.add(lockid); + + boolean present_state = true && (isSetState()); + list.add(present_state); + if (present_state) + list.add(state.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(LockResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLockid()).compareTo(other.isSetLockid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLockid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, other.lockid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetState()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("LockResponse("); + boolean first = true; + + sb.append("lockid:"); + sb.append(this.lockid); + first = false; + if (!first) sb.append(", "); + sb.append("state:"); + if (this.state == null) { + sb.append("null"); + } else { + sb.append(this.state); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetLockid()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'lockid' is unset! Struct:" + toString()); + } + + if (!isSetState()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); + } + + // 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 { + // 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 LockResponseStandardSchemeFactory implements SchemeFactory { + public LockResponseStandardScheme getScheme() { + return new LockResponseStandardScheme(); + } + } + + private static class LockResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, LockResponse 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: // LOCKID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lockid = iprot.readI64(); + struct.setLockidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STATE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.state = org.apache.hadoop.hive.metastore.api.LockState.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, LockResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(LOCKID_FIELD_DESC); + oprot.writeI64(struct.lockid); + 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 LockResponseTupleSchemeFactory implements SchemeFactory { + public LockResponseTupleScheme getScheme() { + return new LockResponseTupleScheme(); + } + } + + private static class LockResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, LockResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.lockid); + oprot.writeI32(struct.state.getValue()); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, LockResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.lockid = iprot.readI64(); + struct.setLockidIsSet(true); + struct.state = org.apache.hadoop.hive.metastore.api.LockState.findByValue(iprot.readI32()); + struct.setStateIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockState.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockState.java new file mode 100644 index 0000000..48a0bbd --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockState.java @@ -0,0 +1,51 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum LockState implements org.apache.thrift.TEnum { + ACQUIRED(1), + WAITING(2), + ABORT(3), + NOT_ACQUIRED(4); + + private final int value; + + private LockState(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static LockState findByValue(int value) { + switch (value) { + case 1: + return ACQUIRED; + case 2: + return WAITING; + case 3: + return ABORT; + case 4: + return NOT_ACQUIRED; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockType.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockType.java new file mode 100644 index 0000000..8ae4351 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockType.java @@ -0,0 +1,48 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum LockType implements org.apache.thrift.TEnum { + SHARED_READ(1), + SHARED_WRITE(2), + EXCLUSIVE(3); + + private final int value; + + private LockType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static LockType findByValue(int value) { + switch (value) { + case 1: + return SHARED_READ; + case 2: + return SHARED_WRITE; + case 3: + return EXCLUSIVE; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java new file mode 100644 index 0000000..4404706 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java @@ -0,0 +1,790 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class LongColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LongColumnStatsData"); + + private static final org.apache.thrift.protocol.TField LOW_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("lowValue", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField HIGH_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("highValue", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new LongColumnStatsDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new LongColumnStatsDataTupleSchemeFactory()); + } + + private long lowValue; // optional + private long highValue; // optional + private long numNulls; // required + private long numDVs; // required + private String bitVectors; // 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 { + LOW_VALUE((short)1, "lowValue"), + HIGH_VALUE((short)2, "highValue"), + NUM_NULLS((short)3, "numNulls"), + NUM_DVS((short)4, "numDVs"), + BIT_VECTORS((short)5, "bitVectors"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOW_VALUE + return LOW_VALUE; + case 2: // HIGH_VALUE + return HIGH_VALUE; + case 3: // NUM_NULLS + return NUM_NULLS; + case 4: // NUM_DVS + return NUM_DVS; + case 5: // BIT_VECTORS + return BIT_VECTORS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LOWVALUE_ISSET_ID = 0; + private static final int __HIGHVALUE_ISSET_ID = 1; + private static final int __NUMNULLS_ISSET_ID = 2; + private static final int __NUMDVS_ISSET_ID = 3; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.LOW_VALUE,_Fields.HIGH_VALUE,_Fields.BIT_VECTORS}; + 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); + tmpMap.put(_Fields.LOW_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lowValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.HIGH_VALUE, new org.apache.thrift.meta_data.FieldMetaData("highValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LongColumnStatsData.class, metaDataMap); + } + + public LongColumnStatsData() { + } + + public LongColumnStatsData( + long numNulls, + long numDVs) + { + this(); + this.numNulls = numNulls; + setNumNullsIsSet(true); + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public LongColumnStatsData(LongColumnStatsData other) { + __isset_bitfield = other.__isset_bitfield; + this.lowValue = other.lowValue; + this.highValue = other.highValue; + this.numNulls = other.numNulls; + this.numDVs = other.numDVs; + if (other.isSetBitVectors()) { + this.bitVectors = other.bitVectors; + } + } + + public LongColumnStatsData deepCopy() { + return new LongColumnStatsData(this); + } + + @Override + public void clear() { + setLowValueIsSet(false); + this.lowValue = 0; + setHighValueIsSet(false); + this.highValue = 0; + setNumNullsIsSet(false); + this.numNulls = 0; + setNumDVsIsSet(false); + this.numDVs = 0; + this.bitVectors = null; + } + + public long getLowValue() { + return this.lowValue; + } + + public void setLowValue(long lowValue) { + this.lowValue = lowValue; + setLowValueIsSet(true); + } + + public void unsetLowValue() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOWVALUE_ISSET_ID); + } + + /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ + public boolean isSetLowValue() { + return EncodingUtils.testBit(__isset_bitfield, __LOWVALUE_ISSET_ID); + } + + public void setLowValueIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOWVALUE_ISSET_ID, value); + } + + public long getHighValue() { + return this.highValue; + } + + public void setHighValue(long highValue) { + this.highValue = highValue; + setHighValueIsSet(true); + } + + public void unsetHighValue() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HIGHVALUE_ISSET_ID); + } + + /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ + public boolean isSetHighValue() { + return EncodingUtils.testBit(__isset_bitfield, __HIGHVALUE_ISSET_ID); + } + + public void setHighValueIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HIGHVALUE_ISSET_ID, value); + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); + } + + public long getNumDVs() { + return this.numDVs; + } + + public void setNumDVs(long numDVs) { + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + public void unsetNumDVs() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); + } + + /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ + public boolean isSetNumDVs() { + return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); + } + + public void setNumDVsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); + } + + public String getBitVectors() { + return this.bitVectors; + } + + public void setBitVectors(String bitVectors) { + this.bitVectors = bitVectors; + } + + public void unsetBitVectors() { + this.bitVectors = null; + } + + /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ + public boolean isSetBitVectors() { + return this.bitVectors != null; + } + + public void setBitVectorsIsSet(boolean value) { + if (!value) { + this.bitVectors = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOW_VALUE: + if (value == null) { + unsetLowValue(); + } else { + setLowValue((Long)value); + } + break; + + case HIGH_VALUE: + if (value == null) { + unsetHighValue(); + } else { + setHighValue((Long)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + case NUM_DVS: + if (value == null) { + unsetNumDVs(); + } else { + setNumDVs((Long)value); + } + break; + + case BIT_VECTORS: + if (value == null) { + unsetBitVectors(); + } else { + setBitVectors((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOW_VALUE: + return getLowValue(); + + case HIGH_VALUE: + return getHighValue(); + + case NUM_NULLS: + return getNumNulls(); + + case NUM_DVS: + return getNumDVs(); + + case BIT_VECTORS: + return getBitVectors(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOW_VALUE: + return isSetLowValue(); + case HIGH_VALUE: + return isSetHighValue(); + case NUM_NULLS: + return isSetNumNulls(); + case NUM_DVS: + return isSetNumDVs(); + case BIT_VECTORS: + return isSetBitVectors(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof LongColumnStatsData) + return this.equals((LongColumnStatsData)that); + return false; + } + + public boolean equals(LongColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_lowValue = true && this.isSetLowValue(); + boolean that_present_lowValue = true && that.isSetLowValue(); + if (this_present_lowValue || that_present_lowValue) { + if (!(this_present_lowValue && that_present_lowValue)) + return false; + if (this.lowValue != that.lowValue) + return false; + } + + boolean this_present_highValue = true && this.isSetHighValue(); + boolean that_present_highValue = true && that.isSetHighValue(); + if (this_present_highValue || that_present_highValue) { + if (!(this_present_highValue && that_present_highValue)) + return false; + if (this.highValue != that.highValue) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + boolean this_present_numDVs = true; + boolean that_present_numDVs = true; + if (this_present_numDVs || that_present_numDVs) { + if (!(this_present_numDVs && that_present_numDVs)) + return false; + if (this.numDVs != that.numDVs) + return false; + } + + boolean this_present_bitVectors = true && this.isSetBitVectors(); + boolean that_present_bitVectors = true && that.isSetBitVectors(); + if (this_present_bitVectors || that_present_bitVectors) { + if (!(this_present_bitVectors && that_present_bitVectors)) + return false; + if (!this.bitVectors.equals(that.bitVectors)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_lowValue = true && (isSetLowValue()); + list.add(present_lowValue); + if (present_lowValue) + list.add(lowValue); + + boolean present_highValue = true && (isSetHighValue()); + list.add(present_highValue); + if (present_highValue) + list.add(highValue); + + boolean present_numNulls = true; + list.add(present_numNulls); + if (present_numNulls) + list.add(numNulls); + + boolean present_numDVs = true; + list.add(present_numDVs); + if (present_numDVs) + list.add(numDVs); + + boolean present_bitVectors = true && (isSetBitVectors()); + list.add(present_bitVectors); + if (present_bitVectors) + list.add(bitVectors); + + return list.hashCode(); + } + + @Override + public int compareTo(LongColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLowValue()).compareTo(other.isSetLowValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLowValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lowValue, other.lowValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHighValue()).compareTo(other.isSetHighValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHighValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.highValue, other.highValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(other.isSetNumDVs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumDVs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, other.numDVs); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBitVectors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("LongColumnStatsData("); + boolean first = true; + + if (isSetLowValue()) { + sb.append("lowValue:"); + sb.append(this.lowValue); + first = false; + } + if (isSetHighValue()) { + if (!first) sb.append(", "); + sb.append("highValue:"); + sb.append(this.highValue); + first = false; + } + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + if (!first) sb.append(", "); + sb.append("numDVs:"); + sb.append(this.numDVs); + first = false; + if (isSetBitVectors()) { + if (!first) sb.append(", "); + sb.append("bitVectors:"); + if (this.bitVectors == null) { + sb.append("null"); + } else { + sb.append(this.bitVectors); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + if (!isSetNumDVs()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); + } + + // 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 { + // 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 LongColumnStatsDataStandardSchemeFactory implements SchemeFactory { + public LongColumnStatsDataStandardScheme getScheme() { + return new LongColumnStatsDataStandardScheme(); + } + } + + private static class LongColumnStatsDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, LongColumnStatsData 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: // LOW_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lowValue = iprot.readI64(); + struct.setLowValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // HIGH_VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.highValue = iprot.readI64(); + struct.setHighValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_NULLS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NUM_DVS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // BIT_VECTORS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(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, LongColumnStatsData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetLowValue()) { + oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); + oprot.writeI64(struct.lowValue); + oprot.writeFieldEnd(); + } + if (struct.isSetHighValue()) { + oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); + oprot.writeI64(struct.highValue); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(struct.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); + oprot.writeI64(struct.numDVs); + oprot.writeFieldEnd(); + if (struct.bitVectors != null) { + if (struct.isSetBitVectors()) { + oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); + oprot.writeString(struct.bitVectors); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class LongColumnStatsDataTupleSchemeFactory implements SchemeFactory { + public LongColumnStatsDataTupleScheme getScheme() { + return new LongColumnStatsDataTupleScheme(); + } + } + + private static class LongColumnStatsDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, LongColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.numNulls); + oprot.writeI64(struct.numDVs); + BitSet optionals = new BitSet(); + if (struct.isSetLowValue()) { + optionals.set(0); + } + if (struct.isSetHighValue()) { + optionals.set(1); + } + if (struct.isSetBitVectors()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetLowValue()) { + oprot.writeI64(struct.lowValue); + } + if (struct.isSetHighValue()) { + oprot.writeI64(struct.highValue); + } + if (struct.isSetBitVectors()) { + oprot.writeString(struct.bitVectors); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, LongColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.lowValue = iprot.readI64(); + struct.setLowValueIsSet(true); + } + if (incoming.get(1)) { + struct.highValue = iprot.readI64(); + struct.setHighValueIsSet(true); + } + if (incoming.get(2)) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java new file mode 100644 index 0000000..21be66b --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class MetaException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MetaException.class, metaDataMap); + } + + public MetaException() { + } + + public MetaException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public MetaException(MetaException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public MetaException deepCopy() { + return new MetaException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof MetaException) + return this.equals((MetaException)that); + return false; + } + + public boolean equals(MetaException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(MetaException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("MetaException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetadataPpdResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetadataPpdResult.java new file mode 100644 index 0000000..87fad1a --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetadataPpdResult.java @@ -0,0 +1,517 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class MetadataPpdResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MetadataPpdResult"); + + private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField INCLUDE_BITSET_FIELD_DESC = new org.apache.thrift.protocol.TField("includeBitset", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new MetadataPpdResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new MetadataPpdResultTupleSchemeFactory()); + } + + private ByteBuffer metadata; // optional + private ByteBuffer includeBitset; // 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 { + METADATA((short)1, "metadata"), + INCLUDE_BITSET((short)2, "includeBitset"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // METADATA + return METADATA; + case 2: // INCLUDE_BITSET + return INCLUDE_BITSET; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.METADATA,_Fields.INCLUDE_BITSET}; + 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); + tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.INCLUDE_BITSET, new org.apache.thrift.meta_data.FieldMetaData("includeBitset", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MetadataPpdResult.class, metaDataMap); + } + + public MetadataPpdResult() { + } + + /** + * Performs a deep copy on other. + */ + public MetadataPpdResult(MetadataPpdResult other) { + if (other.isSetMetadata()) { + this.metadata = org.apache.thrift.TBaseHelper.copyBinary(other.metadata); + } + if (other.isSetIncludeBitset()) { + this.includeBitset = org.apache.thrift.TBaseHelper.copyBinary(other.includeBitset); + } + } + + public MetadataPpdResult deepCopy() { + return new MetadataPpdResult(this); + } + + @Override + public void clear() { + this.metadata = null; + this.includeBitset = null; + } + + public byte[] getMetadata() { + setMetadata(org.apache.thrift.TBaseHelper.rightSize(metadata)); + return metadata == null ? null : metadata.array(); + } + + public ByteBuffer bufferForMetadata() { + return org.apache.thrift.TBaseHelper.copyBinary(metadata); + } + + public void setMetadata(byte[] metadata) { + this.metadata = metadata == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(metadata, metadata.length)); + } + + public void setMetadata(ByteBuffer metadata) { + this.metadata = org.apache.thrift.TBaseHelper.copyBinary(metadata); + } + + public void unsetMetadata() { + this.metadata = null; + } + + /** Returns true if field metadata is set (has been assigned a value) and false otherwise */ + public boolean isSetMetadata() { + return this.metadata != null; + } + + public void setMetadataIsSet(boolean value) { + if (!value) { + this.metadata = null; + } + } + + public byte[] getIncludeBitset() { + setIncludeBitset(org.apache.thrift.TBaseHelper.rightSize(includeBitset)); + return includeBitset == null ? null : includeBitset.array(); + } + + public ByteBuffer bufferForIncludeBitset() { + return org.apache.thrift.TBaseHelper.copyBinary(includeBitset); + } + + public void setIncludeBitset(byte[] includeBitset) { + this.includeBitset = includeBitset == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(includeBitset, includeBitset.length)); + } + + public void setIncludeBitset(ByteBuffer includeBitset) { + this.includeBitset = org.apache.thrift.TBaseHelper.copyBinary(includeBitset); + } + + public void unsetIncludeBitset() { + this.includeBitset = null; + } + + /** Returns true if field includeBitset is set (has been assigned a value) and false otherwise */ + public boolean isSetIncludeBitset() { + return this.includeBitset != null; + } + + public void setIncludeBitsetIsSet(boolean value) { + if (!value) { + this.includeBitset = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case METADATA: + if (value == null) { + unsetMetadata(); + } else { + setMetadata((ByteBuffer)value); + } + break; + + case INCLUDE_BITSET: + if (value == null) { + unsetIncludeBitset(); + } else { + setIncludeBitset((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case METADATA: + return getMetadata(); + + case INCLUDE_BITSET: + return getIncludeBitset(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case METADATA: + return isSetMetadata(); + case INCLUDE_BITSET: + return isSetIncludeBitset(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof MetadataPpdResult) + return this.equals((MetadataPpdResult)that); + return false; + } + + public boolean equals(MetadataPpdResult that) { + if (that == null) + return false; + + boolean this_present_metadata = true && this.isSetMetadata(); + boolean that_present_metadata = true && that.isSetMetadata(); + if (this_present_metadata || that_present_metadata) { + if (!(this_present_metadata && that_present_metadata)) + return false; + if (!this.metadata.equals(that.metadata)) + return false; + } + + boolean this_present_includeBitset = true && this.isSetIncludeBitset(); + boolean that_present_includeBitset = true && that.isSetIncludeBitset(); + if (this_present_includeBitset || that_present_includeBitset) { + if (!(this_present_includeBitset && that_present_includeBitset)) + return false; + if (!this.includeBitset.equals(that.includeBitset)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_metadata = true && (isSetMetadata()); + list.add(present_metadata); + if (present_metadata) + list.add(metadata); + + boolean present_includeBitset = true && (isSetIncludeBitset()); + list.add(present_includeBitset); + if (present_includeBitset) + list.add(includeBitset); + + return list.hashCode(); + } + + @Override + public int compareTo(MetadataPpdResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMetadata()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIncludeBitset()).compareTo(other.isSetIncludeBitset()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIncludeBitset()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.includeBitset, other.includeBitset); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("MetadataPpdResult("); + boolean first = true; + + if (isSetMetadata()) { + sb.append("metadata:"); + if (this.metadata == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.metadata, sb); + } + first = false; + } + if (isSetIncludeBitset()) { + if (!first) sb.append(", "); + sb.append("includeBitset:"); + if (this.includeBitset == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.includeBitset, sb); + } + 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 MetadataPpdResultStandardSchemeFactory implements SchemeFactory { + public MetadataPpdResultStandardScheme getScheme() { + return new MetadataPpdResultStandardScheme(); + } + } + + private static class MetadataPpdResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, MetadataPpdResult 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: // METADATA + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.metadata = iprot.readBinary(); + struct.setMetadataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // INCLUDE_BITSET + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.includeBitset = iprot.readBinary(); + struct.setIncludeBitsetIsSet(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, MetadataPpdResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.metadata != null) { + if (struct.isSetMetadata()) { + oprot.writeFieldBegin(METADATA_FIELD_DESC); + oprot.writeBinary(struct.metadata); + oprot.writeFieldEnd(); + } + } + if (struct.includeBitset != null) { + if (struct.isSetIncludeBitset()) { + oprot.writeFieldBegin(INCLUDE_BITSET_FIELD_DESC); + oprot.writeBinary(struct.includeBitset); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class MetadataPpdResultTupleSchemeFactory implements SchemeFactory { + public MetadataPpdResultTupleScheme getScheme() { + return new MetadataPpdResultTupleScheme(); + } + } + + private static class MetadataPpdResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, MetadataPpdResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMetadata()) { + optionals.set(0); + } + if (struct.isSetIncludeBitset()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetMetadata()) { + oprot.writeBinary(struct.metadata); + } + if (struct.isSetIncludeBitset()) { + oprot.writeBinary(struct.includeBitset); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, MetadataPpdResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.metadata = iprot.readBinary(); + struct.setMetadataIsSet(true); + } + if (incoming.get(1)) { + struct.includeBitset = iprot.readBinary(); + struct.setIncludeBitsetIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchLockException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchLockException.java new file mode 100644 index 0000000..aefbe4a --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchLockException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class NoSuchLockException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NoSuchLockException"); + + 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 NoSuchLockExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NoSuchLockExceptionTupleSchemeFactory()); + } + + private String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NoSuchLockException.class, metaDataMap); + } + + public NoSuchLockException() { + } + + public NoSuchLockException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public NoSuchLockException(NoSuchLockException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public NoSuchLockException deepCopy() { + return new NoSuchLockException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NoSuchLockException) + return this.equals((NoSuchLockException)that); + return false; + } + + public boolean equals(NoSuchLockException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(NoSuchLockException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("NoSuchLockException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 NoSuchLockExceptionStandardSchemeFactory implements SchemeFactory { + public NoSuchLockExceptionStandardScheme getScheme() { + return new NoSuchLockExceptionStandardScheme(); + } + } + + private static class NoSuchLockExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NoSuchLockException 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, NoSuchLockException 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 NoSuchLockExceptionTupleSchemeFactory implements SchemeFactory { + public NoSuchLockExceptionTupleScheme getScheme() { + return new NoSuchLockExceptionTupleScheme(); + } + } + + private static class NoSuchLockExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NoSuchLockException 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, NoSuchLockException 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java new file mode 100644 index 0000000..efa5326 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class NoSuchObjectException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NoSuchObjectException.class, metaDataMap); + } + + public NoSuchObjectException() { + } + + public NoSuchObjectException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public NoSuchObjectException(NoSuchObjectException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public NoSuchObjectException deepCopy() { + return new NoSuchObjectException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NoSuchObjectException) + return this.equals((NoSuchObjectException)that); + return false; + } + + public boolean equals(NoSuchObjectException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(NoSuchObjectException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("NoSuchObjectException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchTxnException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchTxnException.java new file mode 100644 index 0000000..8149d9c --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchTxnException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class NoSuchTxnException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NoSuchTxnException"); + + 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 NoSuchTxnExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NoSuchTxnExceptionTupleSchemeFactory()); + } + + private String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NoSuchTxnException.class, metaDataMap); + } + + public NoSuchTxnException() { + } + + public NoSuchTxnException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public NoSuchTxnException(NoSuchTxnException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public NoSuchTxnException deepCopy() { + return new NoSuchTxnException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NoSuchTxnException) + return this.equals((NoSuchTxnException)that); + return false; + } + + public boolean equals(NoSuchTxnException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(NoSuchTxnException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("NoSuchTxnException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 NoSuchTxnExceptionStandardSchemeFactory implements SchemeFactory { + public NoSuchTxnExceptionStandardScheme getScheme() { + return new NoSuchTxnExceptionStandardScheme(); + } + } + + private static class NoSuchTxnExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NoSuchTxnException 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, NoSuchTxnException 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 NoSuchTxnExceptionTupleSchemeFactory implements SchemeFactory { + public NoSuchTxnExceptionTupleScheme getScheme() { + return new NoSuchTxnExceptionTupleScheme(); + } + } + + private static class NoSuchTxnExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NoSuchTxnException 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, NoSuchTxnException 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsRequest.java new file mode 100644 index 0000000..d12e270 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsRequest.java @@ -0,0 +1,490 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class NotNullConstraintsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotNullConstraintsRequest"); + + 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 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 NotNullConstraintsRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NotNullConstraintsRequestTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotNullConstraintsRequest.class, metaDataMap); + } + + public NotNullConstraintsRequest() { + } + + public NotNullConstraintsRequest( + String db_name, + String tbl_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + } + + /** + * Performs a deep copy on other. + */ + public NotNullConstraintsRequest(NotNullConstraintsRequest other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + } + + public NotNullConstraintsRequest deepCopy() { + return new NotNullConstraintsRequest(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NotNullConstraintsRequest) + return this.equals((NotNullConstraintsRequest)that); + return false; + } + + public boolean equals(NotNullConstraintsRequest that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + return list.hashCode(); + } + + @Override + public int compareTo(NotNullConstraintsRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("NotNullConstraintsRequest("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDb_name()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'db_name' is unset! Struct:" + toString()); + } + + if (!isSetTbl_name()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tbl_name' is unset! Struct:" + toString()); + } + + // 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 NotNullConstraintsRequestStandardSchemeFactory implements SchemeFactory { + public NotNullConstraintsRequestStandardScheme getScheme() { + return new NotNullConstraintsRequestStandardScheme(); + } + } + + private static class NotNullConstraintsRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NotNullConstraintsRequest 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; + 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, NotNullConstraintsRequest 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.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class NotNullConstraintsRequestTupleSchemeFactory implements SchemeFactory { + public NotNullConstraintsRequestTupleScheme getScheme() { + return new NotNullConstraintsRequestTupleScheme(); + } + } + + private static class NotNullConstraintsRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NotNullConstraintsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.db_name); + oprot.writeString(struct.tbl_name); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, NotNullConstraintsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsResponse.java new file mode 100644 index 0000000..b49895b --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsResponse.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class NotNullConstraintsResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotNullConstraintsResponse"); + + private static final org.apache.thrift.protocol.TField NOT_NULL_CONSTRAINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("notNullConstraints", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new NotNullConstraintsResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NotNullConstraintsResponseTupleSchemeFactory()); + } + + private List notNullConstraints; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NOT_NULL_CONSTRAINTS((short)1, "notNullConstraints"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NOT_NULL_CONSTRAINTS + return NOT_NULL_CONSTRAINTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NOT_NULL_CONSTRAINTS, new org.apache.thrift.meta_data.FieldMetaData("notNullConstraints", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLNotNullConstraint.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotNullConstraintsResponse.class, metaDataMap); + } + + public NotNullConstraintsResponse() { + } + + public NotNullConstraintsResponse( + List notNullConstraints) + { + this(); + this.notNullConstraints = notNullConstraints; + } + + /** + * Performs a deep copy on other. + */ + public NotNullConstraintsResponse(NotNullConstraintsResponse other) { + if (other.isSetNotNullConstraints()) { + List __this__notNullConstraints = new ArrayList(other.notNullConstraints.size()); + for (SQLNotNullConstraint other_element : other.notNullConstraints) { + __this__notNullConstraints.add(new SQLNotNullConstraint(other_element)); + } + this.notNullConstraints = __this__notNullConstraints; + } + } + + public NotNullConstraintsResponse deepCopy() { + return new NotNullConstraintsResponse(this); + } + + @Override + public void clear() { + this.notNullConstraints = null; + } + + public int getNotNullConstraintsSize() { + return (this.notNullConstraints == null) ? 0 : this.notNullConstraints.size(); + } + + public java.util.Iterator getNotNullConstraintsIterator() { + return (this.notNullConstraints == null) ? null : this.notNullConstraints.iterator(); + } + + public void addToNotNullConstraints(SQLNotNullConstraint elem) { + if (this.notNullConstraints == null) { + this.notNullConstraints = new ArrayList(); + } + this.notNullConstraints.add(elem); + } + + public List getNotNullConstraints() { + return this.notNullConstraints; + } + + public void setNotNullConstraints(List notNullConstraints) { + this.notNullConstraints = notNullConstraints; + } + + public void unsetNotNullConstraints() { + this.notNullConstraints = null; + } + + /** Returns true if field notNullConstraints is set (has been assigned a value) and false otherwise */ + public boolean isSetNotNullConstraints() { + return this.notNullConstraints != null; + } + + public void setNotNullConstraintsIsSet(boolean value) { + if (!value) { + this.notNullConstraints = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NOT_NULL_CONSTRAINTS: + if (value == null) { + unsetNotNullConstraints(); + } else { + setNotNullConstraints((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NOT_NULL_CONSTRAINTS: + return getNotNullConstraints(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NOT_NULL_CONSTRAINTS: + return isSetNotNullConstraints(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NotNullConstraintsResponse) + return this.equals((NotNullConstraintsResponse)that); + return false; + } + + public boolean equals(NotNullConstraintsResponse that) { + if (that == null) + return false; + + boolean this_present_notNullConstraints = true && this.isSetNotNullConstraints(); + boolean that_present_notNullConstraints = true && that.isSetNotNullConstraints(); + if (this_present_notNullConstraints || that_present_notNullConstraints) { + if (!(this_present_notNullConstraints && that_present_notNullConstraints)) + return false; + if (!this.notNullConstraints.equals(that.notNullConstraints)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_notNullConstraints = true && (isSetNotNullConstraints()); + list.add(present_notNullConstraints); + if (present_notNullConstraints) + list.add(notNullConstraints); + + return list.hashCode(); + } + + @Override + public int compareTo(NotNullConstraintsResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNotNullConstraints()).compareTo(other.isSetNotNullConstraints()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNotNullConstraints()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notNullConstraints, other.notNullConstraints); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("NotNullConstraintsResponse("); + boolean first = true; + + sb.append("notNullConstraints:"); + if (this.notNullConstraints == null) { + sb.append("null"); + } else { + sb.append(this.notNullConstraints); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetNotNullConstraints()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'notNullConstraints' is unset! Struct:" + toString()); + } + + // 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 NotNullConstraintsResponseStandardSchemeFactory implements SchemeFactory { + public NotNullConstraintsResponseStandardScheme getScheme() { + return new NotNullConstraintsResponseStandardScheme(); + } + } + + private static class NotNullConstraintsResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NotNullConstraintsResponse 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: // NOT_NULL_CONSTRAINTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list346 = iprot.readListBegin(); + struct.notNullConstraints = new ArrayList(_list346.size); + SQLNotNullConstraint _elem347; + for (int _i348 = 0; _i348 < _list346.size; ++_i348) + { + _elem347 = new SQLNotNullConstraint(); + _elem347.read(iprot); + struct.notNullConstraints.add(_elem347); + } + iprot.readListEnd(); + } + struct.setNotNullConstraintsIsSet(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, NotNullConstraintsResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.notNullConstraints != null) { + oprot.writeFieldBegin(NOT_NULL_CONSTRAINTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.notNullConstraints.size())); + for (SQLNotNullConstraint _iter349 : struct.notNullConstraints) + { + _iter349.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class NotNullConstraintsResponseTupleSchemeFactory implements SchemeFactory { + public NotNullConstraintsResponseTupleScheme getScheme() { + return new NotNullConstraintsResponseTupleScheme(); + } + } + + private static class NotNullConstraintsResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NotNullConstraintsResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.notNullConstraints.size()); + for (SQLNotNullConstraint _iter350 : struct.notNullConstraints) + { + _iter350.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, NotNullConstraintsResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list351 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.notNullConstraints = new ArrayList(_list351.size); + SQLNotNullConstraint _elem352; + for (int _i353 = 0; _i353 < _list351.size; ++_i353) + { + _elem352 = new SQLNotNullConstraint(); + _elem352.read(iprot); + struct.notNullConstraints.add(_elem352); + } + } + struct.setNotNullConstraintsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEvent.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEvent.java new file mode 100644 index 0000000..8e0fb40 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEvent.java @@ -0,0 +1,1006 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class NotificationEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotificationEvent"); + + private static final org.apache.thrift.protocol.TField EVENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("eventId", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField EVENT_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("eventTime", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)5); + 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)6); + private static final org.apache.thrift.protocol.TField MESSAGE_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("messageFormat", org.apache.thrift.protocol.TType.STRING, (short)7); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new NotificationEventStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NotificationEventTupleSchemeFactory()); + } + + private long eventId; // required + private int eventTime; // required + private String eventType; // required + private String dbName; // optional + private String tableName; // optional + private String message; // required + private String messageFormat; // 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 { + EVENT_ID((short)1, "eventId"), + EVENT_TIME((short)2, "eventTime"), + EVENT_TYPE((short)3, "eventType"), + DB_NAME((short)4, "dbName"), + TABLE_NAME((short)5, "tableName"), + MESSAGE((short)6, "message"), + MESSAGE_FORMAT((short)7, "messageFormat"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // EVENT_ID + return EVENT_ID; + case 2: // EVENT_TIME + return EVENT_TIME; + case 3: // EVENT_TYPE + return EVENT_TYPE; + case 4: // DB_NAME + return DB_NAME; + case 5: // TABLE_NAME + return TABLE_NAME; + case 6: // MESSAGE + return MESSAGE; + case 7: // MESSAGE_FORMAT + return MESSAGE_FORMAT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __EVENTID_ISSET_ID = 0; + private static final int __EVENTTIME_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.DB_NAME,_Fields.TABLE_NAME,_Fields.MESSAGE_FORMAT}; + 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); + tmpMap.put(_Fields.EVENT_ID, new org.apache.thrift.meta_data.FieldMetaData("eventId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.EVENT_TIME, new org.apache.thrift.meta_data.FieldMetaData("eventTime", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.EVENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("eventType", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MESSAGE_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("messageFormat", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotificationEvent.class, metaDataMap); + } + + public NotificationEvent() { + } + + public NotificationEvent( + long eventId, + int eventTime, + String eventType, + String message) + { + this(); + this.eventId = eventId; + setEventIdIsSet(true); + this.eventTime = eventTime; + setEventTimeIsSet(true); + this.eventType = eventType; + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public NotificationEvent(NotificationEvent other) { + __isset_bitfield = other.__isset_bitfield; + this.eventId = other.eventId; + this.eventTime = other.eventTime; + if (other.isSetEventType()) { + this.eventType = other.eventType; + } + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetMessage()) { + this.message = other.message; + } + if (other.isSetMessageFormat()) { + this.messageFormat = other.messageFormat; + } + } + + public NotificationEvent deepCopy() { + return new NotificationEvent(this); + } + + @Override + public void clear() { + setEventIdIsSet(false); + this.eventId = 0; + setEventTimeIsSet(false); + this.eventTime = 0; + this.eventType = null; + this.dbName = null; + this.tableName = null; + this.message = null; + this.messageFormat = null; + } + + public long getEventId() { + return this.eventId; + } + + public void setEventId(long eventId) { + this.eventId = eventId; + setEventIdIsSet(true); + } + + public void unsetEventId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EVENTID_ISSET_ID); + } + + /** Returns true if field eventId is set (has been assigned a value) and false otherwise */ + public boolean isSetEventId() { + return EncodingUtils.testBit(__isset_bitfield, __EVENTID_ISSET_ID); + } + + public void setEventIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EVENTID_ISSET_ID, value); + } + + public int getEventTime() { + return this.eventTime; + } + + public void setEventTime(int eventTime) { + this.eventTime = eventTime; + setEventTimeIsSet(true); + } + + public void unsetEventTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EVENTTIME_ISSET_ID); + } + + /** Returns true if field eventTime is set (has been assigned a value) and false otherwise */ + public boolean isSetEventTime() { + return EncodingUtils.testBit(__isset_bitfield, __EVENTTIME_ISSET_ID); + } + + public void setEventTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EVENTTIME_ISSET_ID, value); + } + + public String getEventType() { + return this.eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public void unsetEventType() { + this.eventType = null; + } + + /** Returns true if field eventType is set (has been assigned a value) and false otherwise */ + public boolean isSetEventType() { + return this.eventType != null; + } + + public void setEventTypeIsSet(boolean value) { + if (!value) { + this.eventType = null; + } + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTableName() { + return this.tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public String getMessageFormat() { + return this.messageFormat; + } + + public void setMessageFormat(String messageFormat) { + this.messageFormat = messageFormat; + } + + public void unsetMessageFormat() { + this.messageFormat = null; + } + + /** Returns true if field messageFormat is set (has been assigned a value) and false otherwise */ + public boolean isSetMessageFormat() { + return this.messageFormat != null; + } + + public void setMessageFormatIsSet(boolean value) { + if (!value) { + this.messageFormat = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case EVENT_ID: + if (value == null) { + unsetEventId(); + } else { + setEventId((Long)value); + } + break; + + case EVENT_TIME: + if (value == null) { + unsetEventTime(); + } else { + setEventTime((Integer)value); + } + break; + + case EVENT_TYPE: + if (value == null) { + unsetEventType(); + } else { + setEventType((String)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + case MESSAGE_FORMAT: + if (value == null) { + unsetMessageFormat(); + } else { + setMessageFormat((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case EVENT_ID: + return getEventId(); + + case EVENT_TIME: + return getEventTime(); + + case EVENT_TYPE: + return getEventType(); + + case DB_NAME: + return getDbName(); + + case TABLE_NAME: + return getTableName(); + + case MESSAGE: + return getMessage(); + + case MESSAGE_FORMAT: + return getMessageFormat(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case EVENT_ID: + return isSetEventId(); + case EVENT_TIME: + return isSetEventTime(); + case EVENT_TYPE: + return isSetEventType(); + case DB_NAME: + return isSetDbName(); + case TABLE_NAME: + return isSetTableName(); + case MESSAGE: + return isSetMessage(); + case MESSAGE_FORMAT: + return isSetMessageFormat(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NotificationEvent) + return this.equals((NotificationEvent)that); + return false; + } + + public boolean equals(NotificationEvent that) { + if (that == null) + return false; + + boolean this_present_eventId = true; + boolean that_present_eventId = true; + if (this_present_eventId || that_present_eventId) { + if (!(this_present_eventId && that_present_eventId)) + return false; + if (this.eventId != that.eventId) + return false; + } + + boolean this_present_eventTime = true; + boolean that_present_eventTime = true; + if (this_present_eventTime || that_present_eventTime) { + if (!(this_present_eventTime && that_present_eventTime)) + return false; + if (this.eventTime != that.eventTime) + return false; + } + + boolean this_present_eventType = true && this.isSetEventType(); + boolean that_present_eventType = true && that.isSetEventType(); + if (this_present_eventType || that_present_eventType) { + if (!(this_present_eventType && that_present_eventType)) + return false; + if (!this.eventType.equals(that.eventType)) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + boolean this_present_messageFormat = true && this.isSetMessageFormat(); + boolean that_present_messageFormat = true && that.isSetMessageFormat(); + if (this_present_messageFormat || that_present_messageFormat) { + if (!(this_present_messageFormat && that_present_messageFormat)) + return false; + if (!this.messageFormat.equals(that.messageFormat)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_eventId = true; + list.add(present_eventId); + if (present_eventId) + list.add(eventId); + + boolean present_eventTime = true; + list.add(present_eventTime); + if (present_eventTime) + list.add(eventTime); + + boolean present_eventType = true && (isSetEventType()); + list.add(present_eventType); + if (present_eventType) + list.add(eventType); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + boolean present_messageFormat = true && (isSetMessageFormat()); + list.add(present_messageFormat); + if (present_messageFormat) + list.add(messageFormat); + + return list.hashCode(); + } + + @Override + public int compareTo(NotificationEvent other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetEventId()).compareTo(other.isSetEventId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEventId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventId, other.eventId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEventTime()).compareTo(other.isSetEventTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEventTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventTime, other.eventTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEventType()).compareTo(other.isSetEventType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEventType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, other.eventType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMessageFormat()).compareTo(other.isSetMessageFormat()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessageFormat()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.messageFormat, other.messageFormat); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("NotificationEvent("); + boolean first = true; + + sb.append("eventId:"); + sb.append(this.eventId); + first = false; + if (!first) sb.append(", "); + sb.append("eventTime:"); + sb.append(this.eventTime); + first = false; + if (!first) sb.append(", "); + sb.append("eventType:"); + if (this.eventType == null) { + sb.append("null"); + } else { + sb.append(this.eventType); + } + first = false; + if (isSetDbName()) { + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + } + if (isSetTableName()) { + if (!first) sb.append(", "); + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + if (isSetMessageFormat()) { + if (!first) sb.append(", "); + sb.append("messageFormat:"); + if (this.messageFormat == null) { + sb.append("null"); + } else { + sb.append(this.messageFormat); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetEventId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'eventId' is unset! Struct:" + toString()); + } + + if (!isSetEventTime()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'eventTime' is unset! Struct:" + toString()); + } + + if (!isSetEventType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'eventType' is unset! Struct:" + toString()); + } + + if (!isSetMessage()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' is unset! Struct:" + toString()); + } + + // 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 { + // 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 NotificationEventStandardSchemeFactory implements SchemeFactory { + public NotificationEventStandardScheme getScheme() { + return new NotificationEventStandardScheme(); + } + } + + private static class NotificationEventStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NotificationEvent 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: // EVENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.eventId = iprot.readI64(); + struct.setEventIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // EVENT_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.eventTime = iprot.readI32(); + struct.setEventTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // EVENT_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.eventType = iprot.readString(); + struct.setEventTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // 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 5: // 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 6: // 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 7: // MESSAGE_FORMAT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.messageFormat = iprot.readString(); + struct.setMessageFormatIsSet(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, NotificationEvent struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(EVENT_ID_FIELD_DESC); + oprot.writeI64(struct.eventId); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(EVENT_TIME_FIELD_DESC); + oprot.writeI32(struct.eventTime); + oprot.writeFieldEnd(); + if (struct.eventType != null) { + oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); + oprot.writeString(struct.eventType); + oprot.writeFieldEnd(); + } + if (struct.dbName != null) { + if (struct.isSetDbName()) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + } + if (struct.tableName != null) { + if (struct.isSetTableName()) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.tableName); + oprot.writeFieldEnd(); + } + } + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + if (struct.messageFormat != null) { + if (struct.isSetMessageFormat()) { + oprot.writeFieldBegin(MESSAGE_FORMAT_FIELD_DESC); + oprot.writeString(struct.messageFormat); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class NotificationEventTupleSchemeFactory implements SchemeFactory { + public NotificationEventTupleScheme getScheme() { + return new NotificationEventTupleScheme(); + } + } + + private static class NotificationEventTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NotificationEvent struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.eventId); + oprot.writeI32(struct.eventTime); + oprot.writeString(struct.eventType); + oprot.writeString(struct.message); + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + if (struct.isSetTableName()) { + optionals.set(1); + } + if (struct.isSetMessageFormat()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetTableName()) { + oprot.writeString(struct.tableName); + } + if (struct.isSetMessageFormat()) { + oprot.writeString(struct.messageFormat); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, NotificationEvent struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.eventId = iprot.readI64(); + struct.setEventIdIsSet(true); + struct.eventTime = iprot.readI32(); + struct.setEventTimeIsSet(true); + struct.eventType = iprot.readString(); + struct.setEventTypeIsSet(true); + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(1)) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } + if (incoming.get(2)) { + struct.messageFormat = iprot.readString(); + struct.setMessageFormatIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventRequest.java new file mode 100644 index 0000000..bafb9b6 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventRequest.java @@ -0,0 +1,490 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class NotificationEventRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotificationEventRequest"); + + private static final org.apache.thrift.protocol.TField LAST_EVENT_FIELD_DESC = new org.apache.thrift.protocol.TField("lastEvent", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField MAX_EVENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxEvents", org.apache.thrift.protocol.TType.I32, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new NotificationEventRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NotificationEventRequestTupleSchemeFactory()); + } + + private long lastEvent; // required + private int maxEvents; // 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 { + LAST_EVENT((short)1, "lastEvent"), + MAX_EVENTS((short)2, "maxEvents"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LAST_EVENT + return LAST_EVENT; + case 2: // MAX_EVENTS + return MAX_EVENTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LASTEVENT_ISSET_ID = 0; + private static final int __MAXEVENTS_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.MAX_EVENTS}; + 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); + tmpMap.put(_Fields.LAST_EVENT, new org.apache.thrift.meta_data.FieldMetaData("lastEvent", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.MAX_EVENTS, new org.apache.thrift.meta_data.FieldMetaData("maxEvents", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotificationEventRequest.class, metaDataMap); + } + + public NotificationEventRequest() { + } + + public NotificationEventRequest( + long lastEvent) + { + this(); + this.lastEvent = lastEvent; + setLastEventIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public NotificationEventRequest(NotificationEventRequest other) { + __isset_bitfield = other.__isset_bitfield; + this.lastEvent = other.lastEvent; + this.maxEvents = other.maxEvents; + } + + public NotificationEventRequest deepCopy() { + return new NotificationEventRequest(this); + } + + @Override + public void clear() { + setLastEventIsSet(false); + this.lastEvent = 0; + setMaxEventsIsSet(false); + this.maxEvents = 0; + } + + public long getLastEvent() { + return this.lastEvent; + } + + public void setLastEvent(long lastEvent) { + this.lastEvent = lastEvent; + setLastEventIsSet(true); + } + + public void unsetLastEvent() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTEVENT_ISSET_ID); + } + + /** Returns true if field lastEvent is set (has been assigned a value) and false otherwise */ + public boolean isSetLastEvent() { + return EncodingUtils.testBit(__isset_bitfield, __LASTEVENT_ISSET_ID); + } + + public void setLastEventIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTEVENT_ISSET_ID, value); + } + + public int getMaxEvents() { + return this.maxEvents; + } + + public void setMaxEvents(int maxEvents) { + this.maxEvents = maxEvents; + setMaxEventsIsSet(true); + } + + public void unsetMaxEvents() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXEVENTS_ISSET_ID); + } + + /** Returns true if field maxEvents is set (has been assigned a value) and false otherwise */ + public boolean isSetMaxEvents() { + return EncodingUtils.testBit(__isset_bitfield, __MAXEVENTS_ISSET_ID); + } + + public void setMaxEventsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXEVENTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LAST_EVENT: + if (value == null) { + unsetLastEvent(); + } else { + setLastEvent((Long)value); + } + break; + + case MAX_EVENTS: + if (value == null) { + unsetMaxEvents(); + } else { + setMaxEvents((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LAST_EVENT: + return getLastEvent(); + + case MAX_EVENTS: + return getMaxEvents(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LAST_EVENT: + return isSetLastEvent(); + case MAX_EVENTS: + return isSetMaxEvents(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NotificationEventRequest) + return this.equals((NotificationEventRequest)that); + return false; + } + + public boolean equals(NotificationEventRequest that) { + if (that == null) + return false; + + boolean this_present_lastEvent = true; + boolean that_present_lastEvent = true; + if (this_present_lastEvent || that_present_lastEvent) { + if (!(this_present_lastEvent && that_present_lastEvent)) + return false; + if (this.lastEvent != that.lastEvent) + return false; + } + + boolean this_present_maxEvents = true && this.isSetMaxEvents(); + boolean that_present_maxEvents = true && that.isSetMaxEvents(); + if (this_present_maxEvents || that_present_maxEvents) { + if (!(this_present_maxEvents && that_present_maxEvents)) + return false; + if (this.maxEvents != that.maxEvents) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_lastEvent = true; + list.add(present_lastEvent); + if (present_lastEvent) + list.add(lastEvent); + + boolean present_maxEvents = true && (isSetMaxEvents()); + list.add(present_maxEvents); + if (present_maxEvents) + list.add(maxEvents); + + return list.hashCode(); + } + + @Override + public int compareTo(NotificationEventRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLastEvent()).compareTo(other.isSetLastEvent()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastEvent()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastEvent, other.lastEvent); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMaxEvents()).compareTo(other.isSetMaxEvents()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxEvents()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxEvents, other.maxEvents); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("NotificationEventRequest("); + boolean first = true; + + sb.append("lastEvent:"); + sb.append(this.lastEvent); + first = false; + if (isSetMaxEvents()) { + if (!first) sb.append(", "); + sb.append("maxEvents:"); + sb.append(this.maxEvents); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetLastEvent()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'lastEvent' is unset! Struct:" + toString()); + } + + // 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 { + // 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 NotificationEventRequestStandardSchemeFactory implements SchemeFactory { + public NotificationEventRequestStandardScheme getScheme() { + return new NotificationEventRequestStandardScheme(); + } + } + + private static class NotificationEventRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NotificationEventRequest 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: // LAST_EVENT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lastEvent = iprot.readI64(); + struct.setLastEventIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MAX_EVENTS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.maxEvents = iprot.readI32(); + struct.setMaxEventsIsSet(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, NotificationEventRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(LAST_EVENT_FIELD_DESC); + oprot.writeI64(struct.lastEvent); + oprot.writeFieldEnd(); + if (struct.isSetMaxEvents()) { + oprot.writeFieldBegin(MAX_EVENTS_FIELD_DESC); + oprot.writeI32(struct.maxEvents); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class NotificationEventRequestTupleSchemeFactory implements SchemeFactory { + public NotificationEventRequestTupleScheme getScheme() { + return new NotificationEventRequestTupleScheme(); + } + } + + private static class NotificationEventRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NotificationEventRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.lastEvent); + BitSet optionals = new BitSet(); + if (struct.isSetMaxEvents()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMaxEvents()) { + oprot.writeI32(struct.maxEvents); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, NotificationEventRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.lastEvent = iprot.readI64(); + struct.setLastEventIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.maxEvents = iprot.readI32(); + struct.setMaxEventsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java new file mode 100644 index 0000000..bcfc75b --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class NotificationEventResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotificationEventResponse"); + + private static final org.apache.thrift.protocol.TField EVENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("events", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new NotificationEventResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NotificationEventResponseTupleSchemeFactory()); + } + + private List events; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + EVENTS((short)1, "events"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // EVENTS + return EVENTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.EVENTS, new org.apache.thrift.meta_data.FieldMetaData("events", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NotificationEvent.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotificationEventResponse.class, metaDataMap); + } + + public NotificationEventResponse() { + } + + public NotificationEventResponse( + List events) + { + this(); + this.events = events; + } + + /** + * Performs a deep copy on other. + */ + public NotificationEventResponse(NotificationEventResponse other) { + if (other.isSetEvents()) { + List __this__events = new ArrayList(other.events.size()); + for (NotificationEvent other_element : other.events) { + __this__events.add(new NotificationEvent(other_element)); + } + this.events = __this__events; + } + } + + public NotificationEventResponse deepCopy() { + return new NotificationEventResponse(this); + } + + @Override + public void clear() { + this.events = null; + } + + public int getEventsSize() { + return (this.events == null) ? 0 : this.events.size(); + } + + public java.util.Iterator getEventsIterator() { + return (this.events == null) ? null : this.events.iterator(); + } + + public void addToEvents(NotificationEvent elem) { + if (this.events == null) { + this.events = new ArrayList(); + } + this.events.add(elem); + } + + public List getEvents() { + return this.events; + } + + public void setEvents(List events) { + this.events = events; + } + + public void unsetEvents() { + this.events = null; + } + + /** Returns true if field events is set (has been assigned a value) and false otherwise */ + public boolean isSetEvents() { + return this.events != null; + } + + public void setEventsIsSet(boolean value) { + if (!value) { + this.events = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case EVENTS: + if (value == null) { + unsetEvents(); + } else { + setEvents((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case EVENTS: + return getEvents(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case EVENTS: + return isSetEvents(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NotificationEventResponse) + return this.equals((NotificationEventResponse)that); + return false; + } + + public boolean equals(NotificationEventResponse that) { + if (that == null) + return false; + + boolean this_present_events = true && this.isSetEvents(); + boolean that_present_events = true && that.isSetEvents(); + if (this_present_events || that_present_events) { + if (!(this_present_events && that_present_events)) + return false; + if (!this.events.equals(that.events)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_events = true && (isSetEvents()); + list.add(present_events); + if (present_events) + list.add(events); + + return list.hashCode(); + } + + @Override + public int compareTo(NotificationEventResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetEvents()).compareTo(other.isSetEvents()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEvents()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.events, other.events); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("NotificationEventResponse("); + boolean first = true; + + sb.append("events:"); + if (this.events == null) { + sb.append("null"); + } else { + sb.append(this.events); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetEvents()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'events' is unset! Struct:" + toString()); + } + + // 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 NotificationEventResponseStandardSchemeFactory implements SchemeFactory { + public NotificationEventResponseStandardScheme getScheme() { + return new NotificationEventResponseStandardScheme(); + } + } + + private static class NotificationEventResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NotificationEventResponse 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: // EVENTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list582 = iprot.readListBegin(); + struct.events = new ArrayList(_list582.size); + NotificationEvent _elem583; + for (int _i584 = 0; _i584 < _list582.size; ++_i584) + { + _elem583 = new NotificationEvent(); + _elem583.read(iprot); + struct.events.add(_elem583); + } + iprot.readListEnd(); + } + struct.setEventsIsSet(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, NotificationEventResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.events != null) { + oprot.writeFieldBegin(EVENTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.events.size())); + for (NotificationEvent _iter585 : struct.events) + { + _iter585.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class NotificationEventResponseTupleSchemeFactory implements SchemeFactory { + public NotificationEventResponseTupleScheme getScheme() { + return new NotificationEventResponseTupleScheme(); + } + } + + private static class NotificationEventResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NotificationEventResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.events.size()); + for (NotificationEvent _iter586 : struct.events) + { + _iter586.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, NotificationEventResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list587 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.events = new ArrayList(_list587.size); + NotificationEvent _elem588; + for (int _i589 = 0; _i589 < _list587.size; ++_i589) + { + _elem588 = new NotificationEvent(); + _elem588.read(iprot); + struct.events.add(_elem588); + } + } + struct.setEventsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java new file mode 100644 index 0000000..f058c0d --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java @@ -0,0 +1,702 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class OpenTxnRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenTxnRequest"); + + private static final org.apache.thrift.protocol.TField NUM_TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("num_txns", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField AGENT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("agentInfo", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new OpenTxnRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new OpenTxnRequestTupleSchemeFactory()); + } + + private int num_txns; // required + private String user; // required + private String hostname; // required + private String agentInfo; // 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 { + NUM_TXNS((short)1, "num_txns"), + USER((short)2, "user"), + HOSTNAME((short)3, "hostname"), + AGENT_INFO((short)4, "agentInfo"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NUM_TXNS + return NUM_TXNS; + case 2: // USER + return USER; + case 3: // HOSTNAME + return HOSTNAME; + case 4: // AGENT_INFO + return AGENT_INFO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __NUM_TXNS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.AGENT_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); + tmpMap.put(_Fields.NUM_TXNS, new org.apache.thrift.meta_data.FieldMetaData("num_txns", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AGENT_INFO, new org.apache.thrift.meta_data.FieldMetaData("agentInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OpenTxnRequest.class, metaDataMap); + } + + public OpenTxnRequest() { + this.agentInfo = "Unknown"; + + } + + public OpenTxnRequest( + int num_txns, + String user, + String hostname) + { + this(); + this.num_txns = num_txns; + setNum_txnsIsSet(true); + this.user = user; + this.hostname = hostname; + } + + /** + * Performs a deep copy on other. + */ + public OpenTxnRequest(OpenTxnRequest other) { + __isset_bitfield = other.__isset_bitfield; + this.num_txns = other.num_txns; + if (other.isSetUser()) { + this.user = other.user; + } + if (other.isSetHostname()) { + this.hostname = other.hostname; + } + if (other.isSetAgentInfo()) { + this.agentInfo = other.agentInfo; + } + } + + public OpenTxnRequest deepCopy() { + return new OpenTxnRequest(this); + } + + @Override + public void clear() { + setNum_txnsIsSet(false); + this.num_txns = 0; + this.user = null; + this.hostname = null; + this.agentInfo = "Unknown"; + + } + + public int getNum_txns() { + return this.num_txns; + } + + public void setNum_txns(int num_txns) { + this.num_txns = num_txns; + setNum_txnsIsSet(true); + } + + public void unsetNum_txns() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_TXNS_ISSET_ID); + } + + /** Returns true if field num_txns is set (has been assigned a value) and false otherwise */ + public boolean isSetNum_txns() { + return EncodingUtils.testBit(__isset_bitfield, __NUM_TXNS_ISSET_ID); + } + + public void setNum_txnsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_TXNS_ISSET_ID, value); + } + + public String getUser() { + return this.user; + } + + public void setUser(String user) { + this.user = user; + } + + public void unsetUser() { + this.user = null; + } + + /** Returns true if field user is set (has been assigned a value) and false otherwise */ + public boolean isSetUser() { + return this.user != null; + } + + public void setUserIsSet(boolean value) { + if (!value) { + this.user = null; + } + } + + public String getHostname() { + return this.hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public void unsetHostname() { + this.hostname = null; + } + + /** Returns true if field hostname is set (has been assigned a value) and false otherwise */ + public boolean isSetHostname() { + return this.hostname != null; + } + + public void setHostnameIsSet(boolean value) { + if (!value) { + this.hostname = null; + } + } + + public String getAgentInfo() { + return this.agentInfo; + } + + public void setAgentInfo(String agentInfo) { + this.agentInfo = agentInfo; + } + + public void unsetAgentInfo() { + this.agentInfo = null; + } + + /** Returns true if field agentInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetAgentInfo() { + return this.agentInfo != null; + } + + public void setAgentInfoIsSet(boolean value) { + if (!value) { + this.agentInfo = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NUM_TXNS: + if (value == null) { + unsetNum_txns(); + } else { + setNum_txns((Integer)value); + } + break; + + case USER: + if (value == null) { + unsetUser(); + } else { + setUser((String)value); + } + break; + + case HOSTNAME: + if (value == null) { + unsetHostname(); + } else { + setHostname((String)value); + } + break; + + case AGENT_INFO: + if (value == null) { + unsetAgentInfo(); + } else { + setAgentInfo((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NUM_TXNS: + return getNum_txns(); + + case USER: + return getUser(); + + case HOSTNAME: + return getHostname(); + + case AGENT_INFO: + return getAgentInfo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NUM_TXNS: + return isSetNum_txns(); + case USER: + return isSetUser(); + case HOSTNAME: + return isSetHostname(); + case AGENT_INFO: + return isSetAgentInfo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof OpenTxnRequest) + return this.equals((OpenTxnRequest)that); + return false; + } + + public boolean equals(OpenTxnRequest that) { + if (that == null) + return false; + + boolean this_present_num_txns = true; + boolean that_present_num_txns = true; + if (this_present_num_txns || that_present_num_txns) { + if (!(this_present_num_txns && that_present_num_txns)) + return false; + if (this.num_txns != that.num_txns) + return false; + } + + boolean this_present_user = true && this.isSetUser(); + boolean that_present_user = true && that.isSetUser(); + if (this_present_user || that_present_user) { + if (!(this_present_user && that_present_user)) + return false; + if (!this.user.equals(that.user)) + return false; + } + + boolean this_present_hostname = true && this.isSetHostname(); + boolean that_present_hostname = true && that.isSetHostname(); + if (this_present_hostname || that_present_hostname) { + if (!(this_present_hostname && that_present_hostname)) + return false; + if (!this.hostname.equals(that.hostname)) + return false; + } + + boolean this_present_agentInfo = true && this.isSetAgentInfo(); + boolean that_present_agentInfo = true && that.isSetAgentInfo(); + if (this_present_agentInfo || that_present_agentInfo) { + if (!(this_present_agentInfo && that_present_agentInfo)) + return false; + if (!this.agentInfo.equals(that.agentInfo)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_num_txns = true; + list.add(present_num_txns); + if (present_num_txns) + list.add(num_txns); + + boolean present_user = true && (isSetUser()); + list.add(present_user); + if (present_user) + list.add(user); + + boolean present_hostname = true && (isSetHostname()); + list.add(present_hostname); + if (present_hostname) + list.add(hostname); + + boolean present_agentInfo = true && (isSetAgentInfo()); + list.add(present_agentInfo); + if (present_agentInfo) + list.add(agentInfo); + + return list.hashCode(); + } + + @Override + public int compareTo(OpenTxnRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNum_txns()).compareTo(other.isSetNum_txns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNum_txns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_txns, other.num_txns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHostname()).compareTo(other.isSetHostname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHostname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, other.hostname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAgentInfo()).compareTo(other.isSetAgentInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentInfo, other.agentInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("OpenTxnRequest("); + boolean first = true; + + sb.append("num_txns:"); + sb.append(this.num_txns); + first = false; + if (!first) sb.append(", "); + sb.append("user:"); + if (this.user == null) { + sb.append("null"); + } else { + sb.append(this.user); + } + first = false; + if (!first) sb.append(", "); + sb.append("hostname:"); + if (this.hostname == null) { + sb.append("null"); + } else { + sb.append(this.hostname); + } + first = false; + if (isSetAgentInfo()) { + if (!first) sb.append(", "); + sb.append("agentInfo:"); + if (this.agentInfo == null) { + sb.append("null"); + } else { + sb.append(this.agentInfo); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetNum_txns()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_txns' is unset! Struct:" + toString()); + } + + if (!isSetUser()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'user' is unset! Struct:" + toString()); + } + + if (!isSetHostname()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'hostname' is unset! Struct:" + toString()); + } + + // 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 { + // 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 OpenTxnRequestStandardSchemeFactory implements SchemeFactory { + public OpenTxnRequestStandardScheme getScheme() { + return new OpenTxnRequestStandardScheme(); + } + } + + private static class OpenTxnRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, OpenTxnRequest 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_TXNS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.num_txns = iprot.readI32(); + struct.setNum_txnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // USER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user = iprot.readString(); + struct.setUserIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // HOSTNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.hostname = iprot.readString(); + struct.setHostnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // AGENT_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.agentInfo = iprot.readString(); + struct.setAgentInfoIsSet(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, OpenTxnRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(NUM_TXNS_FIELD_DESC); + oprot.writeI32(struct.num_txns); + oprot.writeFieldEnd(); + if (struct.user != null) { + oprot.writeFieldBegin(USER_FIELD_DESC); + oprot.writeString(struct.user); + oprot.writeFieldEnd(); + } + if (struct.hostname != null) { + oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); + oprot.writeString(struct.hostname); + oprot.writeFieldEnd(); + } + if (struct.agentInfo != null) { + if (struct.isSetAgentInfo()) { + oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC); + oprot.writeString(struct.agentInfo); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class OpenTxnRequestTupleSchemeFactory implements SchemeFactory { + public OpenTxnRequestTupleScheme getScheme() { + return new OpenTxnRequestTupleScheme(); + } + } + + private static class OpenTxnRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, OpenTxnRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI32(struct.num_txns); + oprot.writeString(struct.user); + oprot.writeString(struct.hostname); + BitSet optionals = new BitSet(); + if (struct.isSetAgentInfo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetAgentInfo()) { + oprot.writeString(struct.agentInfo); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, OpenTxnRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.num_txns = iprot.readI32(); + struct.setNum_txnsIsSet(true); + struct.user = iprot.readString(); + struct.setUserIsSet(true); + struct.hostname = iprot.readString(); + struct.setHostnameIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.agentInfo = iprot.readString(); + struct.setAgentInfoIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java new file mode 100644 index 0000000..c23482a --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java @@ -0,0 +1,438 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class OpenTxnsResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenTxnsResponse"); + + private static final org.apache.thrift.protocol.TField TXN_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("txn_ids", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new OpenTxnsResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new OpenTxnsResponseTupleSchemeFactory()); + } + + private List txn_ids; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TXN_IDS((short)1, "txn_ids"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TXN_IDS + return TXN_IDS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TXN_IDS, new org.apache.thrift.meta_data.FieldMetaData("txn_ids", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OpenTxnsResponse.class, metaDataMap); + } + + public OpenTxnsResponse() { + } + + public OpenTxnsResponse( + List txn_ids) + { + this(); + this.txn_ids = txn_ids; + } + + /** + * Performs a deep copy on other. + */ + public OpenTxnsResponse(OpenTxnsResponse other) { + if (other.isSetTxn_ids()) { + List __this__txn_ids = new ArrayList(other.txn_ids); + this.txn_ids = __this__txn_ids; + } + } + + public OpenTxnsResponse deepCopy() { + return new OpenTxnsResponse(this); + } + + @Override + public void clear() { + this.txn_ids = null; + } + + public int getTxn_idsSize() { + return (this.txn_ids == null) ? 0 : this.txn_ids.size(); + } + + public java.util.Iterator getTxn_idsIterator() { + return (this.txn_ids == null) ? null : this.txn_ids.iterator(); + } + + public void addToTxn_ids(long elem) { + if (this.txn_ids == null) { + this.txn_ids = new ArrayList(); + } + this.txn_ids.add(elem); + } + + public List getTxn_ids() { + return this.txn_ids; + } + + public void setTxn_ids(List txn_ids) { + this.txn_ids = txn_ids; + } + + public void unsetTxn_ids() { + this.txn_ids = null; + } + + /** Returns true if field txn_ids is set (has been assigned a value) and false otherwise */ + public boolean isSetTxn_ids() { + return this.txn_ids != null; + } + + public void setTxn_idsIsSet(boolean value) { + if (!value) { + this.txn_ids = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TXN_IDS: + if (value == null) { + unsetTxn_ids(); + } else { + setTxn_ids((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TXN_IDS: + return getTxn_ids(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TXN_IDS: + return isSetTxn_ids(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof OpenTxnsResponse) + return this.equals((OpenTxnsResponse)that); + return false; + } + + public boolean equals(OpenTxnsResponse that) { + if (that == null) + return false; + + boolean this_present_txn_ids = true && this.isSetTxn_ids(); + boolean that_present_txn_ids = true && that.isSetTxn_ids(); + if (this_present_txn_ids || that_present_txn_ids) { + if (!(this_present_txn_ids && that_present_txn_ids)) + return false; + if (!this.txn_ids.equals(that.txn_ids)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_txn_ids = true && (isSetTxn_ids()); + list.add(present_txn_ids); + if (present_txn_ids) + list.add(txn_ids); + + return list.hashCode(); + } + + @Override + public int compareTo(OpenTxnsResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTxn_ids()).compareTo(other.isSetTxn_ids()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxn_ids()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txn_ids, other.txn_ids); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("OpenTxnsResponse("); + boolean first = true; + + sb.append("txn_ids:"); + if (this.txn_ids == null) { + sb.append("null"); + } else { + sb.append(this.txn_ids); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetTxn_ids()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'txn_ids' is unset! Struct:" + toString()); + } + + // 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 OpenTxnsResponseStandardSchemeFactory implements SchemeFactory { + public OpenTxnsResponseStandardScheme getScheme() { + return new OpenTxnsResponseStandardScheme(); + } + } + + private static class OpenTxnsResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, OpenTxnsResponse 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: // TXN_IDS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list508 = iprot.readListBegin(); + struct.txn_ids = new ArrayList(_list508.size); + long _elem509; + for (int _i510 = 0; _i510 < _list508.size; ++_i510) + { + _elem509 = iprot.readI64(); + struct.txn_ids.add(_elem509); + } + iprot.readListEnd(); + } + struct.setTxn_idsIsSet(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, OpenTxnsResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.txn_ids != null) { + oprot.writeFieldBegin(TXN_IDS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.txn_ids.size())); + for (long _iter511 : struct.txn_ids) + { + oprot.writeI64(_iter511); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class OpenTxnsResponseTupleSchemeFactory implements SchemeFactory { + public OpenTxnsResponseTupleScheme getScheme() { + return new OpenTxnsResponseTupleScheme(); + } + } + + private static class OpenTxnsResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, OpenTxnsResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.txn_ids.size()); + for (long _iter512 : struct.txn_ids) + { + oprot.writeI64(_iter512); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, OpenTxnsResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list513 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.txn_ids = new ArrayList(_list513.size); + long _elem514; + for (int _i515 = 0; _i515 < _list513.size; ++_i515) + { + _elem514 = iprot.readI64(); + struct.txn_ids.add(_elem514); + } + } + struct.setTxn_idsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java new file mode 100644 index 0000000..cc0e2dd --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java @@ -0,0 +1,497 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class Order implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Order"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + COL((short)1, "col"), + ORDER((short)2, "order"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // COL + return COL; + case 2: // ORDER + return ORDER; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ORDER_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.COL, new org.apache.thrift.meta_data.FieldMetaData("col", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ORDER, new org.apache.thrift.meta_data.FieldMetaData("order", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap); + } + + public Order() { + } + + public Order( + String col, + int order) + { + this(); + this.col = col; + this.order = order; + setOrderIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public Order(Order other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetCol()) { + this.col = other.col; + } + this.order = other.order; + } + + public Order deepCopy() { + return new Order(this); + } + + @Override + public void clear() { + this.col = null; + setOrderIsSet(false); + this.order = 0; + } + + public String getCol() { + return this.col; + } + + public void setCol(String col) { + this.col = col; + } + + public void unsetCol() { + this.col = null; + } + + /** Returns true if field col is set (has been assigned a value) and false otherwise */ + public boolean isSetCol() { + return this.col != null; + } + + public void setColIsSet(boolean value) { + if (!value) { + this.col = null; + } + } + + public int getOrder() { + return this.order; + } + + public void setOrder(int order) { + this.order = order; + setOrderIsSet(true); + } + + public void unsetOrder() { + __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 EncodingUtils.testBit(__isset_bitfield, __ORDER_ISSET_ID); + } + + public void setOrderIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ORDER_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case COL: + if (value == null) { + unsetCol(); + } else { + setCol((String)value); + } + break; + + case ORDER: + if (value == null) { + unsetOrder(); + } else { + setOrder((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case COL: + return getCol(); + + case ORDER: + return getOrder(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case COL: + return isSetCol(); + case ORDER: + return isSetOrder(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Order) + return this.equals((Order)that); + return false; + } + + public boolean equals(Order that) { + if (that == null) + return false; + + boolean this_present_col = true && this.isSetCol(); + boolean that_present_col = true && that.isSetCol(); + if (this_present_col || that_present_col) { + if (!(this_present_col && that_present_col)) + return false; + if (!this.col.equals(that.col)) + return false; + } + + boolean this_present_order = true; + boolean that_present_order = true; + if (this_present_order || that_present_order) { + if (!(this_present_order && that_present_order)) + return false; + if (this.order != that.order) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_col = true && (isSetCol()); + list.add(present_col); + if (present_col) + list.add(col); + + boolean present_order = true; + list.add(present_order); + if (present_order) + list.add(order); + + return list.hashCode(); + } + + @Override + public int compareTo(Order other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetCol()).compareTo(other.isSetCol()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCol()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col, other.col); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrder()).compareTo(other.isSetOrder()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrder()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.order, other.order); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Order("); + boolean first = true; + + sb.append("col:"); + if (this.col == null) { + sb.append("null"); + } else { + sb.append(this.col); + } + first = false; + if (!first) sb.append(", "); + sb.append("order:"); + sb.append(this.order); + 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 { + // 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java new file mode 100644 index 0000000..08e2c50 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java @@ -0,0 +1,1229 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class Partition implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Partition"); + + private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)3); + 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)4); + private static final org.apache.thrift.protocol.TField LAST_ACCESS_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAccessTime", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField SD_FIELD_DESC = new org.apache.thrift.protocol.TField("sd", org.apache.thrift.protocol.TType.STRUCT, (short)6); + 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 + private int createTime; // required + private int lastAccessTime; // required + private StorageDescriptor sd; // required + private Map parameters; // 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 { + VALUES((short)1, "values"), + DB_NAME((short)2, "dbName"), + TABLE_NAME((short)3, "tableName"), + CREATE_TIME((short)4, "createTime"), + LAST_ACCESS_TIME((short)5, "lastAccessTime"), + SD((short)6, "sd"), + PARAMETERS((short)7, "parameters"), + PRIVILEGES((short)8, "privileges"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // VALUES + return VALUES; + case 2: // DB_NAME + return DB_NAME; + case 3: // TABLE_NAME + return TABLE_NAME; + case 4: // CREATE_TIME + return CREATE_TIME; + case 5: // LAST_ACCESS_TIME + return LAST_ACCESS_TIME; + case 6: // SD + return SD; + case 7: // PARAMETERS + return PARAMETERS; + case 8: // PRIVILEGES + return PRIVILEGES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __CREATETIME_ISSET_ID = 0; + private static final int __LASTACCESSTIME_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _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); + tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.LAST_ACCESS_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastAccessTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SD, new org.apache.thrift.meta_data.FieldMetaData("sd", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StorageDescriptor.class))); + tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrincipalPrivilegeSet.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Partition.class, metaDataMap); + } + + public Partition() { + } + + public Partition( + List values, + String dbName, + String tableName, + int createTime, + int lastAccessTime, + StorageDescriptor sd, + Map parameters) + { + this(); + this.values = values; + this.dbName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(dbName); + this.tableName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(tableName); + this.createTime = createTime; + setCreateTimeIsSet(true); + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + this.sd = sd; + this.parameters = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(parameters); + } + + /** + * Performs a deep copy on other. + */ + public Partition(Partition other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetValues()) { + List __this__values = new ArrayList(other.values); + this.values = __this__values; + } + if (other.isSetDbName()) { + this.dbName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.dbName); + } + if (other.isSetTableName()) { + this.tableName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.tableName); + } + this.createTime = other.createTime; + this.lastAccessTime = other.lastAccessTime; + if (other.isSetSd()) { + this.sd = new StorageDescriptor(other.sd); + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(other.parameters); + this.parameters = __this__parameters; + } + if (other.isSetPrivileges()) { + this.privileges = new PrincipalPrivilegeSet(other.privileges); + } + } + + public Partition deepCopy() { + return new Partition(this); + } + + @Override + public void clear() { + this.values = null; + this.dbName = null; + this.tableName = null; + setCreateTimeIsSet(false); + this.createTime = 0; + setLastAccessTimeIsSet(false); + this.lastAccessTime = 0; + this.sd = null; + this.parameters = null; + this.privileges = null; + } + + public int getValuesSize() { + return (this.values == null) ? 0 : this.values.size(); + } + + public java.util.Iterator getValuesIterator() { + return (this.values == null) ? null : this.values.iterator(); + } + + public void addToValues(String elem) { + if (this.values == null) { + this.values = new ArrayList(); + } + this.values.add(elem); + } + + public List getValues() { + return this.values; + } + + public void setValues(List values) { + this.values = values; + } + + public void unsetValues() { + this.values = null; + } + + /** Returns true if field values is set (has been assigned a value) and false otherwise */ + public boolean isSetValues() { + return this.values != null; + } + + public void setValuesIsSet(boolean value) { + if (!value) { + this.values = null; + } + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(dbName); + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTableName() { + return this.tableName; + } + + public void setTableName(String tableName) { + this.tableName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(tableName); + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + public int getLastAccessTime() { + return this.lastAccessTime; + } + + public void setLastAccessTime(int lastAccessTime) { + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + } + + public void unsetLastAccessTime() { + __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 EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); + } + + public void setLastAccessTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); + } + + public StorageDescriptor getSd() { + return this.sd; + } + + public void setSd(StorageDescriptor sd) { + this.sd = sd; + } + + public void unsetSd() { + this.sd = null; + } + + /** Returns true if field sd is set (has been assigned a value) and false otherwise */ + public boolean isSetSd() { + return this.sd != null; + } + + public void setSdIsSet(boolean value) { + if (!value) { + this.sd = null; + } + } + + public int getParametersSize() { + return (this.parameters == null) ? 0 : this.parameters.size(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(parameters); + } + + public void unsetParameters() { + this.parameters = null; + } + + /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ + public boolean isSetParameters() { + return this.parameters != null; + } + + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + + public PrincipalPrivilegeSet getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrincipalPrivilegeSet privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case VALUES: + if (value == null) { + unsetValues(); + } else { + setValues((List)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case LAST_ACCESS_TIME: + if (value == null) { + unsetLastAccessTime(); + } else { + setLastAccessTime((Integer)value); + } + break; + + case SD: + if (value == null) { + unsetSd(); + } else { + setSd((StorageDescriptor)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrincipalPrivilegeSet)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case VALUES: + return getValues(); + + case DB_NAME: + return getDbName(); + + case TABLE_NAME: + return getTableName(); + + case CREATE_TIME: + return getCreateTime(); + + case LAST_ACCESS_TIME: + return getLastAccessTime(); + + case SD: + return getSd(); + + case PARAMETERS: + return getParameters(); + + case PRIVILEGES: + return getPrivileges(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case VALUES: + return isSetValues(); + case DB_NAME: + return isSetDbName(); + case TABLE_NAME: + return isSetTableName(); + case CREATE_TIME: + return isSetCreateTime(); + case LAST_ACCESS_TIME: + return isSetLastAccessTime(); + case SD: + return isSetSd(); + case PARAMETERS: + return isSetParameters(); + case PRIVILEGES: + return isSetPrivileges(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Partition) + return this.equals((Partition)that); + return false; + } + + public boolean equals(Partition that) { + if (that == null) + return false; + + boolean this_present_values = true && this.isSetValues(); + boolean that_present_values = true && that.isSetValues(); + if (this_present_values || that_present_values) { + if (!(this_present_values && that_present_values)) + return false; + if (!this.values.equals(that.values)) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_lastAccessTime = true; + boolean that_present_lastAccessTime = true; + if (this_present_lastAccessTime || that_present_lastAccessTime) { + if (!(this_present_lastAccessTime && that_present_lastAccessTime)) + return false; + if (this.lastAccessTime != that.lastAccessTime) + return false; + } + + boolean this_present_sd = true && this.isSetSd(); + boolean that_present_sd = true && that.isSetSd(); + if (this_present_sd || that_present_sd) { + if (!(this_present_sd && that_present_sd)) + return false; + if (!this.sd.equals(that.sd)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_values = true && (isSetValues()); + list.add(present_values); + if (present_values) + list.add(values); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); + + boolean present_createTime = true; + list.add(present_createTime); + if (present_createTime) + list.add(createTime); + + boolean present_lastAccessTime = true; + list.add(present_lastAccessTime); + if (present_lastAccessTime) + list.add(lastAccessTime); + + boolean present_sd = true && (isSetSd()); + list.add(present_sd); + if (present_sd) + list.add(sd); + + boolean present_parameters = true && (isSetParameters()); + list.add(present_parameters); + if (present_parameters) + list.add(parameters); + + boolean present_privileges = true && (isSetPrivileges()); + list.add(present_privileges); + if (present_privileges) + list.add(privileges); + + return list.hashCode(); + } + + @Override + public int compareTo(Partition other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValues()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(other.isSetLastAccessTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastAccessTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastAccessTime, other.lastAccessTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSd()).compareTo(other.isSetSd()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSd()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sd, other.sd); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Partition("); + boolean first = true; + + sb.append("values:"); + if (this.values == null) { + sb.append("null"); + } else { + sb.append(this.values); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("lastAccessTime:"); + sb.append(this.lastAccessTime); + first = false; + if (!first) sb.append(", "); + sb.append("sd:"); + if (this.sd == null) { + sb.append("null"); + } else { + sb.append(this.sd); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + first = false; + if (isSetPrivileges()) { + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 { + // 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 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 _list208 = iprot.readListBegin(); + struct.values = new ArrayList(_list208.size); + String _elem209; + for (int _i210 = 0; _i210 < _list208.size; ++_i210) + { + _elem209 = iprot.readString(); + struct.values.add(_elem209); + } + 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 _map211 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map211.size); + String _key212; + String _val213; + for (int _i214 = 0; _i214 < _map211.size; ++_i214) + { + _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 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 _iter215 : struct.values) + { + oprot.writeString(_iter215); + } + 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 _iter216 : struct.parameters.entrySet()) + { + oprot.writeString(_iter216.getKey()); + oprot.writeString(_iter216.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 _iter217 : struct.values) + { + oprot.writeString(_iter217); + } + } + } + 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 _iter218 : struct.parameters.entrySet()) + { + oprot.writeString(_iter218.getKey()); + oprot.writeString(_iter218.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 _list219 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.values = new ArrayList(_list219.size); + String _elem220; + for (int _i221 = 0; _i221 < _list219.size; ++_i221) + { + _elem220 = iprot.readString(); + struct.values.add(_elem220); + } + } + 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 _map222 = 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*_map222.size); + String _key223; + String _val224; + for (int _i225 = 0; _i225 < _map222.size; ++_i225) + { + _key223 = iprot.readString(); + _val224 = iprot.readString(); + struct.parameters.put(_key223, _val224); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(7)) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java new file mode 100644 index 0000000..b515401 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java @@ -0,0 +1,42 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum PartitionEventType implements org.apache.thrift.TEnum { + LOAD_DONE(1); + + private final int value; + + private PartitionEventType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static PartitionEventType findByValue(int value) { + switch (value) { + case 1: + return LOAD_DONE; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionListComposingSpec.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionListComposingSpec.java new file mode 100644 index 0000000..e8232b9 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionListComposingSpec.java @@ -0,0 +1,449 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PartitionListComposingSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionListComposingSpec"); + + private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PartitionListComposingSpecStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PartitionListComposingSpecTupleSchemeFactory()); + } + + private List partitions; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PARTITIONS((short)1, "partitions"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PARTITIONS + return PARTITIONS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionListComposingSpec.class, metaDataMap); + } + + public PartitionListComposingSpec() { + } + + public PartitionListComposingSpec( + List partitions) + { + this(); + this.partitions = partitions; + } + + /** + * Performs a deep copy on other. + */ + public PartitionListComposingSpec(PartitionListComposingSpec other) { + if (other.isSetPartitions()) { + List __this__partitions = new ArrayList(other.partitions.size()); + for (Partition other_element : other.partitions) { + __this__partitions.add(new Partition(other_element)); + } + this.partitions = __this__partitions; + } + } + + public PartitionListComposingSpec deepCopy() { + return new PartitionListComposingSpec(this); + } + + @Override + public void clear() { + this.partitions = null; + } + + public int getPartitionsSize() { + return (this.partitions == null) ? 0 : this.partitions.size(); + } + + public java.util.Iterator getPartitionsIterator() { + return (this.partitions == null) ? null : this.partitions.iterator(); + } + + public void addToPartitions(Partition elem) { + if (this.partitions == null) { + this.partitions = new ArrayList(); + } + this.partitions.add(elem); + } + + public List getPartitions() { + return this.partitions; + } + + public void setPartitions(List partitions) { + this.partitions = partitions; + } + + public void unsetPartitions() { + this.partitions = null; + } + + /** Returns true if field partitions is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitions() { + return this.partitions != null; + } + + public void setPartitionsIsSet(boolean value) { + if (!value) { + this.partitions = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PARTITIONS: + if (value == null) { + unsetPartitions(); + } else { + setPartitions((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PARTITIONS: + return getPartitions(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PARTITIONS: + return isSetPartitions(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PartitionListComposingSpec) + return this.equals((PartitionListComposingSpec)that); + return false; + } + + public boolean equals(PartitionListComposingSpec that) { + if (that == null) + return false; + + boolean this_present_partitions = true && this.isSetPartitions(); + boolean that_present_partitions = true && that.isSetPartitions(); + if (this_present_partitions || that_present_partitions) { + if (!(this_present_partitions && that_present_partitions)) + return false; + if (!this.partitions.equals(that.partitions)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_partitions = true && (isSetPartitions()); + list.add(present_partitions); + if (present_partitions) + list.add(partitions); + + return list.hashCode(); + } + + @Override + public int compareTo(PartitionListComposingSpec other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPartitions()).compareTo(other.isSetPartitions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PartitionListComposingSpec("); + boolean first = true; + + sb.append("partitions:"); + if (this.partitions == null) { + sb.append("null"); + } else { + sb.append(this.partitions); + } + 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 PartitionListComposingSpecStandardSchemeFactory implements SchemeFactory { + public PartitionListComposingSpecStandardScheme getScheme() { + return new PartitionListComposingSpecStandardScheme(); + } + } + + private static class PartitionListComposingSpecStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionListComposingSpec 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: // PARTITIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list252 = iprot.readListBegin(); + struct.partitions = new ArrayList(_list252.size); + Partition _elem253; + for (int _i254 = 0; _i254 < _list252.size; ++_i254) + { + _elem253 = new Partition(); + _elem253.read(iprot); + struct.partitions.add(_elem253); + } + iprot.readListEnd(); + } + struct.setPartitionsIsSet(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, PartitionListComposingSpec struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.partitions != null) { + oprot.writeFieldBegin(PARTITIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size())); + for (Partition _iter255 : struct.partitions) + { + _iter255.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PartitionListComposingSpecTupleSchemeFactory implements SchemeFactory { + public PartitionListComposingSpecTupleScheme getScheme() { + return new PartitionListComposingSpecTupleScheme(); + } + } + + private static class PartitionListComposingSpecTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PartitionListComposingSpec struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPartitions()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetPartitions()) { + { + oprot.writeI32(struct.partitions.size()); + for (Partition _iter256 : struct.partitions) + { + _iter256.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PartitionListComposingSpec struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list257 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.partitions = new ArrayList(_list257.size); + Partition _elem258; + for (int _i259 = 0; _i259 < _list257.size; ++_i259) + { + _elem258 = new Partition(); + _elem258.read(iprot); + struct.partitions.add(_elem258); + } + } + struct.setPartitionsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpec.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpec.java new file mode 100644 index 0000000..e8188a9 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpec.java @@ -0,0 +1,826 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PartitionSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionSpec"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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 TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField ROOT_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("rootPath", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField SHARED_SDPARTITION_SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedSDPartitionSpec", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final org.apache.thrift.protocol.TField PARTITION_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionList", org.apache.thrift.protocol.TType.STRUCT, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PartitionSpecStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PartitionSpecTupleSchemeFactory()); + } + + private String dbName; // required + private String tableName; // required + private String rootPath; // required + private PartitionSpecWithSharedSD sharedSDPartitionSpec; // optional + private PartitionListComposingSpec partitionList; // 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 { + DB_NAME((short)1, "dbName"), + TABLE_NAME((short)2, "tableName"), + ROOT_PATH((short)3, "rootPath"), + SHARED_SDPARTITION_SPEC((short)4, "sharedSDPartitionSpec"), + PARTITION_LIST((short)5, "partitionList"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + case 3: // ROOT_PATH + return ROOT_PATH; + case 4: // SHARED_SDPARTITION_SPEC + return SHARED_SDPARTITION_SPEC; + case 5: // PARTITION_LIST + return PARTITION_LIST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.SHARED_SDPARTITION_SPEC,_Fields.PARTITION_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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ROOT_PATH, new org.apache.thrift.meta_data.FieldMetaData("rootPath", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SHARED_SDPARTITION_SPEC, new org.apache.thrift.meta_data.FieldMetaData("sharedSDPartitionSpec", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionSpecWithSharedSD.class))); + tmpMap.put(_Fields.PARTITION_LIST, new org.apache.thrift.meta_data.FieldMetaData("partitionList", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionListComposingSpec.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionSpec.class, metaDataMap); + } + + public PartitionSpec() { + } + + public PartitionSpec( + String dbName, + String tableName, + String rootPath) + { + this(); + this.dbName = dbName; + this.tableName = tableName; + this.rootPath = rootPath; + } + + /** + * Performs a deep copy on other. + */ + public PartitionSpec(PartitionSpec other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRootPath()) { + this.rootPath = other.rootPath; + } + if (other.isSetSharedSDPartitionSpec()) { + this.sharedSDPartitionSpec = new PartitionSpecWithSharedSD(other.sharedSDPartitionSpec); + } + if (other.isSetPartitionList()) { + this.partitionList = new PartitionListComposingSpec(other.partitionList); + } + } + + public PartitionSpec deepCopy() { + return new PartitionSpec(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tableName = null; + this.rootPath = null; + this.sharedSDPartitionSpec = null; + this.partitionList = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTableName() { + return this.tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public String getRootPath() { + return this.rootPath; + } + + public void setRootPath(String rootPath) { + this.rootPath = rootPath; + } + + public void unsetRootPath() { + this.rootPath = null; + } + + /** Returns true if field rootPath is set (has been assigned a value) and false otherwise */ + public boolean isSetRootPath() { + return this.rootPath != null; + } + + public void setRootPathIsSet(boolean value) { + if (!value) { + this.rootPath = null; + } + } + + public PartitionSpecWithSharedSD getSharedSDPartitionSpec() { + return this.sharedSDPartitionSpec; + } + + public void setSharedSDPartitionSpec(PartitionSpecWithSharedSD sharedSDPartitionSpec) { + this.sharedSDPartitionSpec = sharedSDPartitionSpec; + } + + public void unsetSharedSDPartitionSpec() { + this.sharedSDPartitionSpec = null; + } + + /** Returns true if field sharedSDPartitionSpec is set (has been assigned a value) and false otherwise */ + public boolean isSetSharedSDPartitionSpec() { + return this.sharedSDPartitionSpec != null; + } + + public void setSharedSDPartitionSpecIsSet(boolean value) { + if (!value) { + this.sharedSDPartitionSpec = null; + } + } + + public PartitionListComposingSpec getPartitionList() { + return this.partitionList; + } + + public void setPartitionList(PartitionListComposingSpec partitionList) { + this.partitionList = partitionList; + } + + public void unsetPartitionList() { + this.partitionList = null; + } + + /** Returns true if field partitionList is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitionList() { + return this.partitionList != null; + } + + public void setPartitionListIsSet(boolean value) { + if (!value) { + this.partitionList = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + case ROOT_PATH: + if (value == null) { + unsetRootPath(); + } else { + setRootPath((String)value); + } + break; + + case SHARED_SDPARTITION_SPEC: + if (value == null) { + unsetSharedSDPartitionSpec(); + } else { + setSharedSDPartitionSpec((PartitionSpecWithSharedSD)value); + } + break; + + case PARTITION_LIST: + if (value == null) { + unsetPartitionList(); + } else { + setPartitionList((PartitionListComposingSpec)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TABLE_NAME: + return getTableName(); + + case ROOT_PATH: + return getRootPath(); + + case SHARED_SDPARTITION_SPEC: + return getSharedSDPartitionSpec(); + + case PARTITION_LIST: + return getPartitionList(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case TABLE_NAME: + return isSetTableName(); + case ROOT_PATH: + return isSetRootPath(); + case SHARED_SDPARTITION_SPEC: + return isSetSharedSDPartitionSpec(); + case PARTITION_LIST: + return isSetPartitionList(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PartitionSpec) + return this.equals((PartitionSpec)that); + return false; + } + + public boolean equals(PartitionSpec that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_rootPath = true && this.isSetRootPath(); + boolean that_present_rootPath = true && that.isSetRootPath(); + if (this_present_rootPath || that_present_rootPath) { + if (!(this_present_rootPath && that_present_rootPath)) + return false; + if (!this.rootPath.equals(that.rootPath)) + return false; + } + + boolean this_present_sharedSDPartitionSpec = true && this.isSetSharedSDPartitionSpec(); + boolean that_present_sharedSDPartitionSpec = true && that.isSetSharedSDPartitionSpec(); + if (this_present_sharedSDPartitionSpec || that_present_sharedSDPartitionSpec) { + if (!(this_present_sharedSDPartitionSpec && that_present_sharedSDPartitionSpec)) + return false; + if (!this.sharedSDPartitionSpec.equals(that.sharedSDPartitionSpec)) + return false; + } + + boolean this_present_partitionList = true && this.isSetPartitionList(); + boolean that_present_partitionList = true && that.isSetPartitionList(); + if (this_present_partitionList || that_present_partitionList) { + if (!(this_present_partitionList && that_present_partitionList)) + return false; + if (!this.partitionList.equals(that.partitionList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); + + boolean present_rootPath = true && (isSetRootPath()); + list.add(present_rootPath); + if (present_rootPath) + list.add(rootPath); + + boolean present_sharedSDPartitionSpec = true && (isSetSharedSDPartitionSpec()); + list.add(present_sharedSDPartitionSpec); + if (present_sharedSDPartitionSpec) + list.add(sharedSDPartitionSpec); + + boolean present_partitionList = true && (isSetPartitionList()); + list.add(present_partitionList); + if (present_partitionList) + list.add(partitionList); + + return list.hashCode(); + } + + @Override + public int compareTo(PartitionSpec other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRootPath()).compareTo(other.isSetRootPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRootPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rootPath, other.rootPath); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSharedSDPartitionSpec()).compareTo(other.isSetSharedSDPartitionSpec()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSharedSDPartitionSpec()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sharedSDPartitionSpec, other.sharedSDPartitionSpec); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartitionList()).compareTo(other.isSetPartitionList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionList, other.partitionList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PartitionSpec("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("rootPath:"); + if (this.rootPath == null) { + sb.append("null"); + } else { + sb.append(this.rootPath); + } + first = false; + if (isSetSharedSDPartitionSpec()) { + if (!first) sb.append(", "); + sb.append("sharedSDPartitionSpec:"); + if (this.sharedSDPartitionSpec == null) { + sb.append("null"); + } else { + sb.append(this.sharedSDPartitionSpec); + } + first = false; + } + if (isSetPartitionList()) { + if (!first) sb.append(", "); + sb.append("partitionList:"); + if (this.partitionList == null) { + sb.append("null"); + } else { + sb.append(this.partitionList); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (sharedSDPartitionSpec != null) { + sharedSDPartitionSpec.validate(); + } + if (partitionList != null) { + partitionList.validate(); + } + } + + 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 PartitionSpecStandardSchemeFactory implements SchemeFactory { + public PartitionSpecStandardScheme getScheme() { + return new PartitionSpecStandardScheme(); + } + } + + private static class PartitionSpecStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionSpec 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.dbName = iprot.readString(); + struct.setDbNameIsSet(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.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ROOT_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.rootPath = iprot.readString(); + struct.setRootPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // SHARED_SDPARTITION_SPEC + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.sharedSDPartitionSpec = new PartitionSpecWithSharedSD(); + struct.sharedSDPartitionSpec.read(iprot); + struct.setSharedSDPartitionSpecIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // PARTITION_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.partitionList = new PartitionListComposingSpec(); + struct.partitionList.read(iprot); + struct.setPartitionListIsSet(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, PartitionSpec struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + 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(); + } + if (struct.rootPath != null) { + oprot.writeFieldBegin(ROOT_PATH_FIELD_DESC); + oprot.writeString(struct.rootPath); + oprot.writeFieldEnd(); + } + if (struct.sharedSDPartitionSpec != null) { + if (struct.isSetSharedSDPartitionSpec()) { + oprot.writeFieldBegin(SHARED_SDPARTITION_SPEC_FIELD_DESC); + struct.sharedSDPartitionSpec.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.partitionList != null) { + if (struct.isSetPartitionList()) { + oprot.writeFieldBegin(PARTITION_LIST_FIELD_DESC); + struct.partitionList.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PartitionSpecTupleSchemeFactory implements SchemeFactory { + public PartitionSpecTupleScheme getScheme() { + return new PartitionSpecTupleScheme(); + } + } + + private static class PartitionSpecTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PartitionSpec struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + if (struct.isSetTableName()) { + optionals.set(1); + } + if (struct.isSetRootPath()) { + optionals.set(2); + } + if (struct.isSetSharedSDPartitionSpec()) { + optionals.set(3); + } + if (struct.isSetPartitionList()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetTableName()) { + oprot.writeString(struct.tableName); + } + if (struct.isSetRootPath()) { + oprot.writeString(struct.rootPath); + } + if (struct.isSetSharedSDPartitionSpec()) { + struct.sharedSDPartitionSpec.write(oprot); + } + if (struct.isSetPartitionList()) { + struct.partitionList.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PartitionSpec struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + if (incoming.get(1)) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } + if (incoming.get(2)) { + struct.rootPath = iprot.readString(); + struct.setRootPathIsSet(true); + } + if (incoming.get(3)) { + struct.sharedSDPartitionSpec = new PartitionSpecWithSharedSD(); + struct.sharedSDPartitionSpec.read(iprot); + struct.setSharedSDPartitionSpecIsSet(true); + } + if (incoming.get(4)) { + struct.partitionList = new PartitionListComposingSpec(); + struct.partitionList.read(iprot); + struct.setPartitionListIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpecWithSharedSD.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpecWithSharedSD.java new file mode 100644 index 0000000..2c41912 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpecWithSharedSD.java @@ -0,0 +1,558 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PartitionSpecWithSharedSD implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionSpecWithSharedSD"); + + private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField SD_FIELD_DESC = new org.apache.thrift.protocol.TField("sd", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PartitionSpecWithSharedSDStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PartitionSpecWithSharedSDTupleSchemeFactory()); + } + + private List partitions; // required + private StorageDescriptor sd; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PARTITIONS((short)1, "partitions"), + SD((short)2, "sd"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PARTITIONS + return PARTITIONS; + case 2: // SD + return SD; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionWithoutSD.class)))); + tmpMap.put(_Fields.SD, new org.apache.thrift.meta_data.FieldMetaData("sd", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StorageDescriptor.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionSpecWithSharedSD.class, metaDataMap); + } + + public PartitionSpecWithSharedSD() { + } + + public PartitionSpecWithSharedSD( + List partitions, + StorageDescriptor sd) + { + this(); + this.partitions = partitions; + this.sd = sd; + } + + /** + * Performs a deep copy on other. + */ + public PartitionSpecWithSharedSD(PartitionSpecWithSharedSD other) { + if (other.isSetPartitions()) { + List __this__partitions = new ArrayList(other.partitions.size()); + for (PartitionWithoutSD other_element : other.partitions) { + __this__partitions.add(new PartitionWithoutSD(other_element)); + } + this.partitions = __this__partitions; + } + if (other.isSetSd()) { + this.sd = new StorageDescriptor(other.sd); + } + } + + public PartitionSpecWithSharedSD deepCopy() { + return new PartitionSpecWithSharedSD(this); + } + + @Override + public void clear() { + this.partitions = null; + this.sd = null; + } + + public int getPartitionsSize() { + return (this.partitions == null) ? 0 : this.partitions.size(); + } + + public java.util.Iterator getPartitionsIterator() { + return (this.partitions == null) ? null : this.partitions.iterator(); + } + + public void addToPartitions(PartitionWithoutSD elem) { + if (this.partitions == null) { + this.partitions = new ArrayList(); + } + this.partitions.add(elem); + } + + public List getPartitions() { + return this.partitions; + } + + public void setPartitions(List partitions) { + this.partitions = partitions; + } + + public void unsetPartitions() { + this.partitions = null; + } + + /** Returns true if field partitions is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitions() { + return this.partitions != null; + } + + public void setPartitionsIsSet(boolean value) { + if (!value) { + this.partitions = null; + } + } + + public StorageDescriptor getSd() { + return this.sd; + } + + public void setSd(StorageDescriptor sd) { + this.sd = sd; + } + + public void unsetSd() { + this.sd = null; + } + + /** Returns true if field sd is set (has been assigned a value) and false otherwise */ + public boolean isSetSd() { + return this.sd != null; + } + + public void setSdIsSet(boolean value) { + if (!value) { + this.sd = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PARTITIONS: + if (value == null) { + unsetPartitions(); + } else { + setPartitions((List)value); + } + break; + + case SD: + if (value == null) { + unsetSd(); + } else { + setSd((StorageDescriptor)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PARTITIONS: + return getPartitions(); + + case SD: + return getSd(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PARTITIONS: + return isSetPartitions(); + case SD: + return isSetSd(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PartitionSpecWithSharedSD) + return this.equals((PartitionSpecWithSharedSD)that); + return false; + } + + public boolean equals(PartitionSpecWithSharedSD that) { + if (that == null) + return false; + + boolean this_present_partitions = true && this.isSetPartitions(); + boolean that_present_partitions = true && that.isSetPartitions(); + if (this_present_partitions || that_present_partitions) { + if (!(this_present_partitions && that_present_partitions)) + return false; + if (!this.partitions.equals(that.partitions)) + return false; + } + + boolean this_present_sd = true && this.isSetSd(); + boolean that_present_sd = true && that.isSetSd(); + if (this_present_sd || that_present_sd) { + if (!(this_present_sd && that_present_sd)) + return false; + if (!this.sd.equals(that.sd)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_partitions = true && (isSetPartitions()); + list.add(present_partitions); + if (present_partitions) + list.add(partitions); + + boolean present_sd = true && (isSetSd()); + list.add(present_sd); + if (present_sd) + list.add(sd); + + return list.hashCode(); + } + + @Override + public int compareTo(PartitionSpecWithSharedSD other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPartitions()).compareTo(other.isSetPartitions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSd()).compareTo(other.isSetSd()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSd()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sd, other.sd); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PartitionSpecWithSharedSD("); + boolean first = true; + + sb.append("partitions:"); + if (this.partitions == null) { + sb.append("null"); + } else { + sb.append(this.partitions); + } + first = false; + if (!first) sb.append(", "); + sb.append("sd:"); + if (this.sd == null) { + sb.append("null"); + } else { + sb.append(this.sd); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 PartitionSpecWithSharedSDStandardSchemeFactory implements SchemeFactory { + public PartitionSpecWithSharedSDStandardScheme getScheme() { + return new PartitionSpecWithSharedSDStandardScheme(); + } + } + + private static class PartitionSpecWithSharedSDStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionSpecWithSharedSD 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: // PARTITIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list244 = iprot.readListBegin(); + struct.partitions = new ArrayList(_list244.size); + PartitionWithoutSD _elem245; + for (int _i246 = 0; _i246 < _list244.size; ++_i246) + { + _elem245 = new PartitionWithoutSD(); + _elem245.read(iprot); + struct.partitions.add(_elem245); + } + iprot.readListEnd(); + } + struct.setPartitionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // 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; + 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, PartitionSpecWithSharedSD struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.partitions != null) { + oprot.writeFieldBegin(PARTITIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size())); + for (PartitionWithoutSD _iter247 : struct.partitions) + { + _iter247.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.sd != null) { + oprot.writeFieldBegin(SD_FIELD_DESC); + struct.sd.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PartitionSpecWithSharedSDTupleSchemeFactory implements SchemeFactory { + public PartitionSpecWithSharedSDTupleScheme getScheme() { + return new PartitionSpecWithSharedSDTupleScheme(); + } + } + + private static class PartitionSpecWithSharedSDTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PartitionSpecWithSharedSD struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPartitions()) { + optionals.set(0); + } + if (struct.isSetSd()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetPartitions()) { + { + oprot.writeI32(struct.partitions.size()); + for (PartitionWithoutSD _iter248 : struct.partitions) + { + _iter248.write(oprot); + } + } + } + if (struct.isSetSd()) { + struct.sd.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PartitionSpecWithSharedSD struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list249 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.partitions = new ArrayList(_list249.size); + PartitionWithoutSD _elem250; + for (int _i251 = 0; _i251 < _list249.size; ++_i251) + { + _elem250 = new PartitionWithoutSD(); + _elem250.read(iprot); + struct.partitions.add(_elem250); + } + } + struct.setPartitionsIsSet(true); + } + if (incoming.get(1)) { + struct.sd = new StorageDescriptor(); + struct.sd.read(iprot); + struct.setSdIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionWithoutSD.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionWithoutSD.java new file mode 100644 index 0000000..f0c5ce1 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionWithoutSD.java @@ -0,0 +1,1016 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PartitionWithoutSD implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionWithoutSD"); + + private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)1); + 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 LAST_ACCESS_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAccessTime", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField RELATIVE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("relativePath", org.apache.thrift.protocol.TType.STRING, (short)4); + 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)5); + 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)6); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PartitionWithoutSDStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PartitionWithoutSDTupleSchemeFactory()); + } + + private List values; // required + private int createTime; // required + private int lastAccessTime; // required + private String relativePath; // required + private Map parameters; // 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 { + VALUES((short)1, "values"), + CREATE_TIME((short)2, "createTime"), + LAST_ACCESS_TIME((short)3, "lastAccessTime"), + RELATIVE_PATH((short)4, "relativePath"), + PARAMETERS((short)5, "parameters"), + PRIVILEGES((short)6, "privileges"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // VALUES + return VALUES; + case 2: // CREATE_TIME + return CREATE_TIME; + case 3: // LAST_ACCESS_TIME + return LAST_ACCESS_TIME; + case 4: // RELATIVE_PATH + return RELATIVE_PATH; + case 5: // PARAMETERS + return PARAMETERS; + case 6: // PRIVILEGES + return PRIVILEGES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __CREATETIME_ISSET_ID = 0; + private static final int __LASTACCESSTIME_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _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); + tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.LAST_ACCESS_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastAccessTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.RELATIVE_PATH, new org.apache.thrift.meta_data.FieldMetaData("relativePath", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrincipalPrivilegeSet.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionWithoutSD.class, metaDataMap); + } + + public PartitionWithoutSD() { + } + + public PartitionWithoutSD( + List values, + int createTime, + int lastAccessTime, + String relativePath, + Map parameters) + { + this(); + this.values = values; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + this.relativePath = relativePath; + this.parameters = parameters; + } + + /** + * Performs a deep copy on other. + */ + public PartitionWithoutSD(PartitionWithoutSD other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetValues()) { + List __this__values = new ArrayList(other.values); + this.values = __this__values; + } + this.createTime = other.createTime; + this.lastAccessTime = other.lastAccessTime; + if (other.isSetRelativePath()) { + this.relativePath = other.relativePath; + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(other.parameters); + this.parameters = __this__parameters; + } + if (other.isSetPrivileges()) { + this.privileges = new PrincipalPrivilegeSet(other.privileges); + } + } + + public PartitionWithoutSD deepCopy() { + return new PartitionWithoutSD(this); + } + + @Override + public void clear() { + this.values = null; + setCreateTimeIsSet(false); + this.createTime = 0; + setLastAccessTimeIsSet(false); + this.lastAccessTime = 0; + this.relativePath = null; + this.parameters = null; + this.privileges = null; + } + + public int getValuesSize() { + return (this.values == null) ? 0 : this.values.size(); + } + + public java.util.Iterator getValuesIterator() { + return (this.values == null) ? null : this.values.iterator(); + } + + public void addToValues(String elem) { + if (this.values == null) { + this.values = new ArrayList(); + } + this.values.add(elem); + } + + public List getValues() { + return this.values; + } + + public void setValues(List values) { + this.values = values; + } + + public void unsetValues() { + this.values = null; + } + + /** Returns true if field values is set (has been assigned a value) and false otherwise */ + public boolean isSetValues() { + return this.values != null; + } + + public void setValuesIsSet(boolean value) { + if (!value) { + this.values = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + public int getLastAccessTime() { + return this.lastAccessTime; + } + + public void setLastAccessTime(int lastAccessTime) { + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + } + + public void unsetLastAccessTime() { + __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 EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); + } + + public void setLastAccessTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); + } + + public String getRelativePath() { + return this.relativePath; + } + + public void setRelativePath(String relativePath) { + this.relativePath = relativePath; + } + + public void unsetRelativePath() { + this.relativePath = null; + } + + /** Returns true if field relativePath is set (has been assigned a value) and false otherwise */ + public boolean isSetRelativePath() { + return this.relativePath != null; + } + + public void setRelativePathIsSet(boolean value) { + if (!value) { + this.relativePath = null; + } + } + + public int getParametersSize() { + return (this.parameters == null) ? 0 : this.parameters.size(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = parameters; + } + + public void unsetParameters() { + this.parameters = null; + } + + /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ + public boolean isSetParameters() { + return this.parameters != null; + } + + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + + public PrincipalPrivilegeSet getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrincipalPrivilegeSet privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case VALUES: + if (value == null) { + unsetValues(); + } else { + setValues((List)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case LAST_ACCESS_TIME: + if (value == null) { + unsetLastAccessTime(); + } else { + setLastAccessTime((Integer)value); + } + break; + + case RELATIVE_PATH: + if (value == null) { + unsetRelativePath(); + } else { + setRelativePath((String)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrincipalPrivilegeSet)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case VALUES: + return getValues(); + + case CREATE_TIME: + return getCreateTime(); + + case LAST_ACCESS_TIME: + return getLastAccessTime(); + + case RELATIVE_PATH: + return getRelativePath(); + + case PARAMETERS: + return getParameters(); + + case PRIVILEGES: + return getPrivileges(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case VALUES: + return isSetValues(); + case CREATE_TIME: + return isSetCreateTime(); + case LAST_ACCESS_TIME: + return isSetLastAccessTime(); + case RELATIVE_PATH: + return isSetRelativePath(); + case PARAMETERS: + return isSetParameters(); + case PRIVILEGES: + return isSetPrivileges(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PartitionWithoutSD) + return this.equals((PartitionWithoutSD)that); + return false; + } + + public boolean equals(PartitionWithoutSD that) { + if (that == null) + return false; + + boolean this_present_values = true && this.isSetValues(); + boolean that_present_values = true && that.isSetValues(); + if (this_present_values || that_present_values) { + if (!(this_present_values && that_present_values)) + return false; + if (!this.values.equals(that.values)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_lastAccessTime = true; + boolean that_present_lastAccessTime = true; + if (this_present_lastAccessTime || that_present_lastAccessTime) { + if (!(this_present_lastAccessTime && that_present_lastAccessTime)) + return false; + if (this.lastAccessTime != that.lastAccessTime) + return false; + } + + boolean this_present_relativePath = true && this.isSetRelativePath(); + boolean that_present_relativePath = true && that.isSetRelativePath(); + if (this_present_relativePath || that_present_relativePath) { + if (!(this_present_relativePath && that_present_relativePath)) + return false; + if (!this.relativePath.equals(that.relativePath)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_values = true && (isSetValues()); + list.add(present_values); + if (present_values) + list.add(values); + + boolean present_createTime = true; + list.add(present_createTime); + if (present_createTime) + list.add(createTime); + + boolean present_lastAccessTime = true; + list.add(present_lastAccessTime); + if (present_lastAccessTime) + list.add(lastAccessTime); + + boolean present_relativePath = true && (isSetRelativePath()); + list.add(present_relativePath); + if (present_relativePath) + list.add(relativePath); + + boolean present_parameters = true && (isSetParameters()); + list.add(present_parameters); + if (present_parameters) + list.add(parameters); + + boolean present_privileges = true && (isSetPrivileges()); + list.add(present_privileges); + if (present_privileges) + list.add(privileges); + + return list.hashCode(); + } + + @Override + public int compareTo(PartitionWithoutSD other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValues()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(other.isSetLastAccessTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastAccessTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastAccessTime, other.lastAccessTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRelativePath()).compareTo(other.isSetRelativePath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRelativePath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.relativePath, other.relativePath); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PartitionWithoutSD("); + boolean first = true; + + sb.append("values:"); + if (this.values == null) { + sb.append("null"); + } else { + sb.append(this.values); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("lastAccessTime:"); + sb.append(this.lastAccessTime); + first = false; + if (!first) sb.append(", "); + sb.append("relativePath:"); + if (this.relativePath == null) { + sb.append("null"); + } else { + sb.append(this.relativePath); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + first = false; + if (isSetPrivileges()) { + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 { + // 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 PartitionWithoutSDStandardSchemeFactory implements SchemeFactory { + public PartitionWithoutSDStandardScheme getScheme() { + return new PartitionWithoutSDStandardScheme(); + } + } + + private static class PartitionWithoutSDStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionWithoutSD 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 _list226 = iprot.readListBegin(); + struct.values = new ArrayList(_list226.size); + String _elem227; + for (int _i228 = 0; _i228 < _list226.size; ++_i228) + { + _elem227 = iprot.readString(); + struct.values.add(_elem227); + } + iprot.readListEnd(); + } + struct.setValuesIsSet(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: // 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 4: // RELATIVE_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.relativePath = iprot.readString(); + struct.setRelativePathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // PARAMETERS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map229 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map229.size); + String _key230; + String _val231; + for (int _i232 = 0; _i232 < _map229.size; ++_i232) + { + _key230 = iprot.readString(); + _val231 = iprot.readString(); + struct.parameters.put(_key230, _val231); + } + iprot.readMapEnd(); + } + struct.setParametersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // 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, PartitionWithoutSD 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 _iter233 : struct.values) + { + oprot.writeString(_iter233); + } + oprot.writeListEnd(); + } + 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.relativePath != null) { + oprot.writeFieldBegin(RELATIVE_PATH_FIELD_DESC); + oprot.writeString(struct.relativePath); + 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 _iter234 : struct.parameters.entrySet()) + { + oprot.writeString(_iter234.getKey()); + oprot.writeString(_iter234.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 PartitionWithoutSDTupleSchemeFactory implements SchemeFactory { + public PartitionWithoutSDTupleScheme getScheme() { + return new PartitionWithoutSDTupleScheme(); + } + } + + private static class PartitionWithoutSDTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PartitionWithoutSD struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetValues()) { + optionals.set(0); + } + if (struct.isSetCreateTime()) { + optionals.set(1); + } + if (struct.isSetLastAccessTime()) { + optionals.set(2); + } + if (struct.isSetRelativePath()) { + optionals.set(3); + } + if (struct.isSetParameters()) { + optionals.set(4); + } + if (struct.isSetPrivileges()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetValues()) { + { + oprot.writeI32(struct.values.size()); + for (String _iter235 : struct.values) + { + oprot.writeString(_iter235); + } + } + } + if (struct.isSetCreateTime()) { + oprot.writeI32(struct.createTime); + } + if (struct.isSetLastAccessTime()) { + oprot.writeI32(struct.lastAccessTime); + } + if (struct.isSetRelativePath()) { + oprot.writeString(struct.relativePath); + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter236 : struct.parameters.entrySet()) + { + oprot.writeString(_iter236.getKey()); + oprot.writeString(_iter236.getValue()); + } + } + } + if (struct.isSetPrivileges()) { + struct.privileges.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PartitionWithoutSD struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list237 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.values = new ArrayList(_list237.size); + String _elem238; + for (int _i239 = 0; _i239 < _list237.size; ++_i239) + { + _elem238 = iprot.readString(); + struct.values.add(_elem238); + } + } + struct.setValuesIsSet(true); + } + if (incoming.get(1)) { + struct.createTime = iprot.readI32(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(2)) { + struct.lastAccessTime = iprot.readI32(); + struct.setLastAccessTimeIsSet(true); + } + if (incoming.get(3)) { + struct.relativePath = iprot.readString(); + struct.setRelativePathIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TMap _map240 = 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*_map240.size); + String _key241; + String _val242; + for (int _i243 = 0; _i243 < _map240.size; ++_i243) + { + _key241 = iprot.readString(); + _val242 = iprot.readString(); + struct.parameters.put(_key241, _val242); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(5)) { + struct.privileges = new PrincipalPrivilegeSet(); + struct.privileges.read(iprot); + struct.setPrivilegesIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprRequest.java new file mode 100644 index 0000000..59972af --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprRequest.java @@ -0,0 +1,815 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PartitionsByExprRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionsByExprRequest"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField EXPR_FIELD_DESC = new org.apache.thrift.protocol.TField("expr", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField DEFAULT_PARTITION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPartitionName", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField MAX_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxParts", org.apache.thrift.protocol.TType.I16, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PartitionsByExprRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PartitionsByExprRequestTupleSchemeFactory()); + } + + private String dbName; // required + private String tblName; // required + private ByteBuffer expr; // required + private String defaultPartitionName; // optional + private short maxParts; // 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 { + DB_NAME((short)1, "dbName"), + TBL_NAME((short)2, "tblName"), + EXPR((short)3, "expr"), + DEFAULT_PARTITION_NAME((short)4, "defaultPartitionName"), + MAX_PARTS((short)5, "maxParts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // EXPR + return EXPR; + case 4: // DEFAULT_PARTITION_NAME + return DEFAULT_PARTITION_NAME; + case 5: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAXPARTS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.DEFAULT_PARTITION_NAME,_Fields.MAX_PARTS}; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.EXPR, new org.apache.thrift.meta_data.FieldMetaData("expr", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.DEFAULT_PARTITION_NAME, new org.apache.thrift.meta_data.FieldMetaData("defaultPartitionName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("maxParts", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionsByExprRequest.class, metaDataMap); + } + + public PartitionsByExprRequest() { + this.maxParts = (short)-1; + + } + + public PartitionsByExprRequest( + String dbName, + String tblName, + ByteBuffer expr) + { + this(); + this.dbName = dbName; + this.tblName = tblName; + this.expr = org.apache.thrift.TBaseHelper.copyBinary(expr); + } + + /** + * Performs a deep copy on other. + */ + public PartitionsByExprRequest(PartitionsByExprRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTblName()) { + this.tblName = other.tblName; + } + if (other.isSetExpr()) { + this.expr = org.apache.thrift.TBaseHelper.copyBinary(other.expr); + } + if (other.isSetDefaultPartitionName()) { + this.defaultPartitionName = other.defaultPartitionName; + } + this.maxParts = other.maxParts; + } + + public PartitionsByExprRequest deepCopy() { + return new PartitionsByExprRequest(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tblName = null; + this.expr = null; + this.defaultPartitionName = null; + this.maxParts = (short)-1; + + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTblName() { + return this.tblName; + } + + public void setTblName(String tblName) { + this.tblName = tblName; + } + + public void unsetTblName() { + this.tblName = null; + } + + /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ + public boolean isSetTblName() { + return this.tblName != null; + } + + public void setTblNameIsSet(boolean value) { + if (!value) { + this.tblName = null; + } + } + + public byte[] getExpr() { + setExpr(org.apache.thrift.TBaseHelper.rightSize(expr)); + return expr == null ? null : expr.array(); + } + + public ByteBuffer bufferForExpr() { + return org.apache.thrift.TBaseHelper.copyBinary(expr); + } + + public void setExpr(byte[] expr) { + this.expr = expr == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(expr, expr.length)); + } + + public void setExpr(ByteBuffer expr) { + this.expr = org.apache.thrift.TBaseHelper.copyBinary(expr); + } + + public void unsetExpr() { + this.expr = null; + } + + /** Returns true if field expr is set (has been assigned a value) and false otherwise */ + public boolean isSetExpr() { + return this.expr != null; + } + + public void setExprIsSet(boolean value) { + if (!value) { + this.expr = null; + } + } + + public String getDefaultPartitionName() { + return this.defaultPartitionName; + } + + public void setDefaultPartitionName(String defaultPartitionName) { + this.defaultPartitionName = defaultPartitionName; + } + + public void unsetDefaultPartitionName() { + this.defaultPartitionName = null; + } + + /** Returns true if field defaultPartitionName is set (has been assigned a value) and false otherwise */ + public boolean isSetDefaultPartitionName() { + return this.defaultPartitionName != null; + } + + public void setDefaultPartitionNameIsSet(boolean value) { + if (!value) { + this.defaultPartitionName = null; + } + } + + public short getMaxParts() { + return this.maxParts; + } + + public void setMaxParts(short maxParts) { + this.maxParts = maxParts; + setMaxPartsIsSet(true); + } + + public void unsetMaxParts() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXPARTS_ISSET_ID); + } + + /** Returns true if field maxParts is set (has been assigned a value) and false otherwise */ + public boolean isSetMaxParts() { + return EncodingUtils.testBit(__isset_bitfield, __MAXPARTS_ISSET_ID); + } + + public void setMaxPartsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXPARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTblName(); + } else { + setTblName((String)value); + } + break; + + case EXPR: + if (value == null) { + unsetExpr(); + } else { + setExpr((ByteBuffer)value); + } + break; + + case DEFAULT_PARTITION_NAME: + if (value == null) { + unsetDefaultPartitionName(); + } else { + setDefaultPartitionName((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMaxParts(); + } else { + setMaxParts((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TBL_NAME: + return getTblName(); + + case EXPR: + return getExpr(); + + case DEFAULT_PARTITION_NAME: + return getDefaultPartitionName(); + + case MAX_PARTS: + return getMaxParts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case TBL_NAME: + return isSetTblName(); + case EXPR: + return isSetExpr(); + case DEFAULT_PARTITION_NAME: + return isSetDefaultPartitionName(); + case MAX_PARTS: + return isSetMaxParts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PartitionsByExprRequest) + return this.equals((PartitionsByExprRequest)that); + return false; + } + + public boolean equals(PartitionsByExprRequest that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tblName = true && this.isSetTblName(); + boolean that_present_tblName = true && that.isSetTblName(); + if (this_present_tblName || that_present_tblName) { + if (!(this_present_tblName && that_present_tblName)) + return false; + if (!this.tblName.equals(that.tblName)) + return false; + } + + boolean this_present_expr = true && this.isSetExpr(); + boolean that_present_expr = true && that.isSetExpr(); + if (this_present_expr || that_present_expr) { + if (!(this_present_expr && that_present_expr)) + return false; + if (!this.expr.equals(that.expr)) + return false; + } + + boolean this_present_defaultPartitionName = true && this.isSetDefaultPartitionName(); + boolean that_present_defaultPartitionName = true && that.isSetDefaultPartitionName(); + if (this_present_defaultPartitionName || that_present_defaultPartitionName) { + if (!(this_present_defaultPartitionName && that_present_defaultPartitionName)) + return false; + if (!this.defaultPartitionName.equals(that.defaultPartitionName)) + return false; + } + + boolean this_present_maxParts = true && this.isSetMaxParts(); + boolean that_present_maxParts = true && that.isSetMaxParts(); + if (this_present_maxParts || that_present_maxParts) { + if (!(this_present_maxParts && that_present_maxParts)) + return false; + if (this.maxParts != that.maxParts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tblName = true && (isSetTblName()); + list.add(present_tblName); + if (present_tblName) + list.add(tblName); + + boolean present_expr = true && (isSetExpr()); + list.add(present_expr); + if (present_expr) + list.add(expr); + + boolean present_defaultPartitionName = true && (isSetDefaultPartitionName()); + list.add(present_defaultPartitionName); + if (present_defaultPartitionName) + list.add(defaultPartitionName); + + boolean present_maxParts = true && (isSetMaxParts()); + list.add(present_maxParts); + if (present_maxParts) + list.add(maxParts); + + return list.hashCode(); + } + + @Override + public int compareTo(PartitionsByExprRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTblName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExpr()).compareTo(other.isSetExpr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExpr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expr, other.expr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDefaultPartitionName()).compareTo(other.isSetDefaultPartitionName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDefaultPartitionName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultPartitionName, other.defaultPartitionName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMaxParts()).compareTo(other.isSetMaxParts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxParts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxParts, other.maxParts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PartitionsByExprRequest("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tblName:"); + if (this.tblName == null) { + sb.append("null"); + } else { + sb.append(this.tblName); + } + first = false; + if (!first) sb.append(", "); + sb.append("expr:"); + if (this.expr == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.expr, sb); + } + first = false; + if (isSetDefaultPartitionName()) { + if (!first) sb.append(", "); + sb.append("defaultPartitionName:"); + if (this.defaultPartitionName == null) { + sb.append("null"); + } else { + sb.append(this.defaultPartitionName); + } + first = false; + } + if (isSetMaxParts()) { + if (!first) sb.append(", "); + sb.append("maxParts:"); + sb.append(this.maxParts); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + if (!isSetTblName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); + } + + if (!isSetExpr()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'expr' is unset! Struct:" + toString()); + } + + // 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 { + // 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 PartitionsByExprRequestStandardSchemeFactory implements SchemeFactory { + public PartitionsByExprRequestStandardScheme getScheme() { + return new PartitionsByExprRequestStandardScheme(); + } + } + + private static class PartitionsByExprRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionsByExprRequest 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.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.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // EXPR + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.expr = iprot.readBinary(); + struct.setExprIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DEFAULT_PARTITION_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.defaultPartitionName = iprot.readString(); + struct.setDefaultPartitionNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // MAX_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.maxParts = iprot.readI16(); + struct.setMaxPartsIsSet(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, PartitionsByExprRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.tblName != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tblName); + oprot.writeFieldEnd(); + } + if (struct.expr != null) { + oprot.writeFieldBegin(EXPR_FIELD_DESC); + oprot.writeBinary(struct.expr); + oprot.writeFieldEnd(); + } + if (struct.defaultPartitionName != null) { + if (struct.isSetDefaultPartitionName()) { + oprot.writeFieldBegin(DEFAULT_PARTITION_NAME_FIELD_DESC); + oprot.writeString(struct.defaultPartitionName); + oprot.writeFieldEnd(); + } + } + if (struct.isSetMaxParts()) { + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(struct.maxParts); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PartitionsByExprRequestTupleSchemeFactory implements SchemeFactory { + public PartitionsByExprRequestTupleScheme getScheme() { + return new PartitionsByExprRequestTupleScheme(); + } + } + + private static class PartitionsByExprRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PartitionsByExprRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbName); + oprot.writeString(struct.tblName); + oprot.writeBinary(struct.expr); + BitSet optionals = new BitSet(); + if (struct.isSetDefaultPartitionName()) { + optionals.set(0); + } + if (struct.isSetMaxParts()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDefaultPartitionName()) { + oprot.writeString(struct.defaultPartitionName); + } + if (struct.isSetMaxParts()) { + oprot.writeI16(struct.maxParts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsByExprRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + struct.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + struct.expr = iprot.readBinary(); + struct.setExprIsSet(true); + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.defaultPartitionName = iprot.readString(); + struct.setDefaultPartitionNameIsSet(true); + } + if (incoming.get(1)) { + struct.maxParts = iprot.readI16(); + struct.setMaxPartsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java new file mode 100644 index 0000000..7df156f --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java @@ -0,0 +1,542 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PartitionsByExprResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionsByExprResult"); + + private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField HAS_UNKNOWN_PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasUnknownPartitions", org.apache.thrift.protocol.TType.BOOL, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PartitionsByExprResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PartitionsByExprResultTupleSchemeFactory()); + } + + private List partitions; // required + private boolean hasUnknownPartitions; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PARTITIONS((short)1, "partitions"), + HAS_UNKNOWN_PARTITIONS((short)2, "hasUnknownPartitions"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PARTITIONS + return PARTITIONS; + case 2: // HAS_UNKNOWN_PARTITIONS + return HAS_UNKNOWN_PARTITIONS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __HASUNKNOWNPARTITIONS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.HAS_UNKNOWN_PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("hasUnknownPartitions", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionsByExprResult.class, metaDataMap); + } + + public PartitionsByExprResult() { + } + + public PartitionsByExprResult( + List partitions, + boolean hasUnknownPartitions) + { + this(); + this.partitions = partitions; + this.hasUnknownPartitions = hasUnknownPartitions; + setHasUnknownPartitionsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public PartitionsByExprResult(PartitionsByExprResult other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetPartitions()) { + List __this__partitions = new ArrayList(other.partitions.size()); + for (Partition other_element : other.partitions) { + __this__partitions.add(new Partition(other_element)); + } + this.partitions = __this__partitions; + } + this.hasUnknownPartitions = other.hasUnknownPartitions; + } + + public PartitionsByExprResult deepCopy() { + return new PartitionsByExprResult(this); + } + + @Override + public void clear() { + this.partitions = null; + setHasUnknownPartitionsIsSet(false); + this.hasUnknownPartitions = false; + } + + public int getPartitionsSize() { + return (this.partitions == null) ? 0 : this.partitions.size(); + } + + public java.util.Iterator getPartitionsIterator() { + return (this.partitions == null) ? null : this.partitions.iterator(); + } + + public void addToPartitions(Partition elem) { + if (this.partitions == null) { + this.partitions = new ArrayList(); + } + this.partitions.add(elem); + } + + public List getPartitions() { + return this.partitions; + } + + public void setPartitions(List partitions) { + this.partitions = partitions; + } + + public void unsetPartitions() { + this.partitions = null; + } + + /** Returns true if field partitions is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitions() { + return this.partitions != null; + } + + public void setPartitionsIsSet(boolean value) { + if (!value) { + this.partitions = null; + } + } + + public boolean isHasUnknownPartitions() { + return this.hasUnknownPartitions; + } + + public void setHasUnknownPartitions(boolean hasUnknownPartitions) { + this.hasUnknownPartitions = hasUnknownPartitions; + setHasUnknownPartitionsIsSet(true); + } + + public void unsetHasUnknownPartitions() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASUNKNOWNPARTITIONS_ISSET_ID); + } + + /** Returns true if field hasUnknownPartitions is set (has been assigned a value) and false otherwise */ + public boolean isSetHasUnknownPartitions() { + return EncodingUtils.testBit(__isset_bitfield, __HASUNKNOWNPARTITIONS_ISSET_ID); + } + + public void setHasUnknownPartitionsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASUNKNOWNPARTITIONS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PARTITIONS: + if (value == null) { + unsetPartitions(); + } else { + setPartitions((List)value); + } + break; + + case HAS_UNKNOWN_PARTITIONS: + if (value == null) { + unsetHasUnknownPartitions(); + } else { + setHasUnknownPartitions((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PARTITIONS: + return getPartitions(); + + case HAS_UNKNOWN_PARTITIONS: + return isHasUnknownPartitions(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PARTITIONS: + return isSetPartitions(); + case HAS_UNKNOWN_PARTITIONS: + return isSetHasUnknownPartitions(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PartitionsByExprResult) + return this.equals((PartitionsByExprResult)that); + return false; + } + + public boolean equals(PartitionsByExprResult that) { + if (that == null) + return false; + + boolean this_present_partitions = true && this.isSetPartitions(); + boolean that_present_partitions = true && that.isSetPartitions(); + if (this_present_partitions || that_present_partitions) { + if (!(this_present_partitions && that_present_partitions)) + return false; + if (!this.partitions.equals(that.partitions)) + return false; + } + + boolean this_present_hasUnknownPartitions = true; + boolean that_present_hasUnknownPartitions = true; + if (this_present_hasUnknownPartitions || that_present_hasUnknownPartitions) { + if (!(this_present_hasUnknownPartitions && that_present_hasUnknownPartitions)) + return false; + if (this.hasUnknownPartitions != that.hasUnknownPartitions) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_partitions = true && (isSetPartitions()); + list.add(present_partitions); + if (present_partitions) + list.add(partitions); + + boolean present_hasUnknownPartitions = true; + list.add(present_hasUnknownPartitions); + if (present_hasUnknownPartitions) + list.add(hasUnknownPartitions); + + return list.hashCode(); + } + + @Override + public int compareTo(PartitionsByExprResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPartitions()).compareTo(other.isSetPartitions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHasUnknownPartitions()).compareTo(other.isSetHasUnknownPartitions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHasUnknownPartitions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasUnknownPartitions, other.hasUnknownPartitions); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PartitionsByExprResult("); + boolean first = true; + + sb.append("partitions:"); + if (this.partitions == null) { + sb.append("null"); + } else { + sb.append(this.partitions); + } + first = false; + if (!first) sb.append(", "); + sb.append("hasUnknownPartitions:"); + sb.append(this.hasUnknownPartitions); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetPartitions()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'partitions' is unset! Struct:" + toString()); + } + + if (!isSetHasUnknownPartitions()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'hasUnknownPartitions' is unset! Struct:" + toString()); + } + + // 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 { + // 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 PartitionsByExprResultStandardSchemeFactory implements SchemeFactory { + public PartitionsByExprResultStandardScheme getScheme() { + return new PartitionsByExprResultStandardScheme(); + } + } + + private static class PartitionsByExprResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionsByExprResult 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: // PARTITIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list386 = iprot.readListBegin(); + struct.partitions = new ArrayList(_list386.size); + Partition _elem387; + for (int _i388 = 0; _i388 < _list386.size; ++_i388) + { + _elem387 = new Partition(); + _elem387.read(iprot); + struct.partitions.add(_elem387); + } + iprot.readListEnd(); + } + struct.setPartitionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // HAS_UNKNOWN_PARTITIONS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.hasUnknownPartitions = iprot.readBool(); + struct.setHasUnknownPartitionsIsSet(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, PartitionsByExprResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.partitions != null) { + oprot.writeFieldBegin(PARTITIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size())); + for (Partition _iter389 : struct.partitions) + { + _iter389.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(HAS_UNKNOWN_PARTITIONS_FIELD_DESC); + oprot.writeBool(struct.hasUnknownPartitions); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PartitionsByExprResultTupleSchemeFactory implements SchemeFactory { + public PartitionsByExprResultTupleScheme getScheme() { + return new PartitionsByExprResultTupleScheme(); + } + } + + private static class PartitionsByExprResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PartitionsByExprResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.partitions.size()); + for (Partition _iter390 : struct.partitions) + { + _iter390.write(oprot); + } + } + oprot.writeBool(struct.hasUnknownPartitions); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsByExprResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list391 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.partitions = new ArrayList(_list391.size); + Partition _elem392; + for (int _i393 = 0; _i393 < _list391.size; ++_i393) + { + _elem392 = new Partition(); + _elem392.read(iprot); + struct.partitions.add(_elem392); + } + } + struct.setPartitionsIsSet(true); + struct.hasUnknownPartitions = iprot.readBool(); + struct.setHasUnknownPartitionsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java new file mode 100644 index 0000000..b43f6c0 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java @@ -0,0 +1,790 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PartitionsStatsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionsStatsRequest"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COL_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("colNames", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField PART_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partNames", org.apache.thrift.protocol.TType.LIST, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PartitionsStatsRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PartitionsStatsRequestTupleSchemeFactory()); + } + + private String dbName; // required + private String tblName; // required + private List colNames; // required + private List partNames; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"), + TBL_NAME((short)2, "tblName"), + COL_NAMES((short)3, "colNames"), + PART_NAMES((short)4, "partNames"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // COL_NAMES + return COL_NAMES; + case 4: // PART_NAMES + return PART_NAMES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("colNames", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.PART_NAMES, new org.apache.thrift.meta_data.FieldMetaData("partNames", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionsStatsRequest.class, metaDataMap); + } + + public PartitionsStatsRequest() { + } + + public PartitionsStatsRequest( + String dbName, + String tblName, + List colNames, + List partNames) + { + this(); + this.dbName = dbName; + this.tblName = tblName; + this.colNames = colNames; + this.partNames = partNames; + } + + /** + * Performs a deep copy on other. + */ + public PartitionsStatsRequest(PartitionsStatsRequest other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTblName()) { + this.tblName = other.tblName; + } + if (other.isSetColNames()) { + List __this__colNames = new ArrayList(other.colNames); + this.colNames = __this__colNames; + } + if (other.isSetPartNames()) { + List __this__partNames = new ArrayList(other.partNames); + this.partNames = __this__partNames; + } + } + + public PartitionsStatsRequest deepCopy() { + return new PartitionsStatsRequest(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tblName = null; + this.colNames = null; + this.partNames = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTblName() { + return this.tblName; + } + + public void setTblName(String tblName) { + this.tblName = tblName; + } + + public void unsetTblName() { + this.tblName = null; + } + + /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ + public boolean isSetTblName() { + return this.tblName != null; + } + + public void setTblNameIsSet(boolean value) { + if (!value) { + this.tblName = null; + } + } + + public int getColNamesSize() { + return (this.colNames == null) ? 0 : this.colNames.size(); + } + + public java.util.Iterator getColNamesIterator() { + return (this.colNames == null) ? null : this.colNames.iterator(); + } + + public void addToColNames(String elem) { + if (this.colNames == null) { + this.colNames = new ArrayList(); + } + this.colNames.add(elem); + } + + public List getColNames() { + return this.colNames; + } + + public void setColNames(List colNames) { + this.colNames = colNames; + } + + public void unsetColNames() { + this.colNames = null; + } + + /** Returns true if field colNames is set (has been assigned a value) and false otherwise */ + public boolean isSetColNames() { + return this.colNames != null; + } + + public void setColNamesIsSet(boolean value) { + if (!value) { + this.colNames = null; + } + } + + public int getPartNamesSize() { + return (this.partNames == null) ? 0 : this.partNames.size(); + } + + public java.util.Iterator getPartNamesIterator() { + return (this.partNames == null) ? null : this.partNames.iterator(); + } + + public void addToPartNames(String elem) { + if (this.partNames == null) { + this.partNames = new ArrayList(); + } + this.partNames.add(elem); + } + + public List getPartNames() { + return this.partNames; + } + + public void setPartNames(List partNames) { + this.partNames = partNames; + } + + public void unsetPartNames() { + this.partNames = null; + } + + /** Returns true if field partNames is set (has been assigned a value) and false otherwise */ + public boolean isSetPartNames() { + return this.partNames != null; + } + + public void setPartNamesIsSet(boolean value) { + if (!value) { + this.partNames = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTblName(); + } else { + setTblName((String)value); + } + break; + + case COL_NAMES: + if (value == null) { + unsetColNames(); + } else { + setColNames((List)value); + } + break; + + case PART_NAMES: + if (value == null) { + unsetPartNames(); + } else { + setPartNames((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TBL_NAME: + return getTblName(); + + case COL_NAMES: + return getColNames(); + + case PART_NAMES: + return getPartNames(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case TBL_NAME: + return isSetTblName(); + case COL_NAMES: + return isSetColNames(); + case PART_NAMES: + return isSetPartNames(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PartitionsStatsRequest) + return this.equals((PartitionsStatsRequest)that); + return false; + } + + public boolean equals(PartitionsStatsRequest that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tblName = true && this.isSetTblName(); + boolean that_present_tblName = true && that.isSetTblName(); + if (this_present_tblName || that_present_tblName) { + if (!(this_present_tblName && that_present_tblName)) + return false; + if (!this.tblName.equals(that.tblName)) + return false; + } + + boolean this_present_colNames = true && this.isSetColNames(); + boolean that_present_colNames = true && that.isSetColNames(); + if (this_present_colNames || that_present_colNames) { + if (!(this_present_colNames && that_present_colNames)) + return false; + if (!this.colNames.equals(that.colNames)) + return false; + } + + boolean this_present_partNames = true && this.isSetPartNames(); + boolean that_present_partNames = true && that.isSetPartNames(); + if (this_present_partNames || that_present_partNames) { + if (!(this_present_partNames && that_present_partNames)) + return false; + if (!this.partNames.equals(that.partNames)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tblName = true && (isSetTblName()); + list.add(present_tblName); + if (present_tblName) + list.add(tblName); + + boolean present_colNames = true && (isSetColNames()); + list.add(present_colNames); + if (present_colNames) + list.add(colNames); + + boolean present_partNames = true && (isSetPartNames()); + list.add(present_partNames); + if (present_partNames) + list.add(partNames); + + return list.hashCode(); + } + + @Override + public int compareTo(PartitionsStatsRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTblName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColNames()).compareTo(other.isSetColNames()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColNames()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colNames, other.colNames); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartNames()).compareTo(other.isSetPartNames()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartNames()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partNames, other.partNames); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PartitionsStatsRequest("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tblName:"); + if (this.tblName == null) { + sb.append("null"); + } else { + sb.append(this.tblName); + } + first = false; + if (!first) sb.append(", "); + sb.append("colNames:"); + if (this.colNames == null) { + sb.append("null"); + } else { + sb.append(this.colNames); + } + first = false; + if (!first) sb.append(", "); + sb.append("partNames:"); + if (this.partNames == null) { + sb.append("null"); + } else { + sb.append(this.partNames); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + if (!isSetTblName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); + } + + if (!isSetColNames()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'colNames' is unset! Struct:" + toString()); + } + + if (!isSetPartNames()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'partNames' is unset! Struct:" + toString()); + } + + // 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 PartitionsStatsRequestStandardSchemeFactory implements SchemeFactory { + public PartitionsStatsRequestStandardScheme getScheme() { + return new PartitionsStatsRequestStandardScheme(); + } + } + + private static class PartitionsStatsRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionsStatsRequest 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.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.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COL_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list428 = iprot.readListBegin(); + struct.colNames = new ArrayList(_list428.size); + String _elem429; + for (int _i430 = 0; _i430 < _list428.size; ++_i430) + { + _elem429 = iprot.readString(); + struct.colNames.add(_elem429); + } + iprot.readListEnd(); + } + struct.setColNamesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // PART_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list431 = iprot.readListBegin(); + struct.partNames = new ArrayList(_list431.size); + String _elem432; + for (int _i433 = 0; _i433 < _list431.size; ++_i433) + { + _elem432 = iprot.readString(); + struct.partNames.add(_elem432); + } + iprot.readListEnd(); + } + struct.setPartNamesIsSet(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, PartitionsStatsRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.tblName != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tblName); + oprot.writeFieldEnd(); + } + if (struct.colNames != null) { + oprot.writeFieldBegin(COL_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.colNames.size())); + for (String _iter434 : struct.colNames) + { + oprot.writeString(_iter434); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.partNames != null) { + oprot.writeFieldBegin(PART_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partNames.size())); + for (String _iter435 : struct.partNames) + { + oprot.writeString(_iter435); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PartitionsStatsRequestTupleSchemeFactory implements SchemeFactory { + public PartitionsStatsRequestTupleScheme getScheme() { + return new PartitionsStatsRequestTupleScheme(); + } + } + + private static class PartitionsStatsRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbName); + oprot.writeString(struct.tblName); + { + oprot.writeI32(struct.colNames.size()); + for (String _iter436 : struct.colNames) + { + oprot.writeString(_iter436); + } + } + { + oprot.writeI32(struct.partNames.size()); + for (String _iter437 : struct.partNames) + { + oprot.writeString(_iter437); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + struct.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + { + org.apache.thrift.protocol.TList _list438 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.colNames = new ArrayList(_list438.size); + String _elem439; + for (int _i440 = 0; _i440 < _list438.size; ++_i440) + { + _elem439 = iprot.readString(); + struct.colNames.add(_elem439); + } + } + struct.setColNamesIsSet(true); + { + org.apache.thrift.protocol.TList _list441 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.partNames = new ArrayList(_list441.size); + String _elem442; + for (int _i443 = 0; _i443 < _list441.size; ++_i443) + { + _elem442 = iprot.readString(); + struct.partNames.add(_elem442); + } + } + struct.setPartNamesIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java new file mode 100644 index 0000000..63ed662 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java @@ -0,0 +1,490 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PartitionsStatsResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PartitionsStatsResult"); + + private static final org.apache.thrift.protocol.TField PART_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("partStats", org.apache.thrift.protocol.TType.MAP, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PartitionsStatsResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PartitionsStatsResultTupleSchemeFactory()); + } + + private Map> partStats; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PART_STATS((short)1, "partStats"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PART_STATS + return PART_STATS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PART_STATS, new org.apache.thrift.meta_data.FieldMetaData("partStats", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsObj.class))))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PartitionsStatsResult.class, metaDataMap); + } + + public PartitionsStatsResult() { + } + + public PartitionsStatsResult( + Map> partStats) + { + this(); + this.partStats = partStats; + } + + /** + * Performs a deep copy on other. + */ + public PartitionsStatsResult(PartitionsStatsResult other) { + if (other.isSetPartStats()) { + Map> __this__partStats = new HashMap>(other.partStats.size()); + for (Map.Entry> other_element : other.partStats.entrySet()) { + + String other_element_key = other_element.getKey(); + List other_element_value = other_element.getValue(); + + String __this__partStats_copy_key = other_element_key; + + List __this__partStats_copy_value = new ArrayList(other_element_value.size()); + for (ColumnStatisticsObj other_element_value_element : other_element_value) { + __this__partStats_copy_value.add(new ColumnStatisticsObj(other_element_value_element)); + } + + __this__partStats.put(__this__partStats_copy_key, __this__partStats_copy_value); + } + this.partStats = __this__partStats; + } + } + + public PartitionsStatsResult deepCopy() { + return new PartitionsStatsResult(this); + } + + @Override + public void clear() { + this.partStats = null; + } + + public int getPartStatsSize() { + return (this.partStats == null) ? 0 : this.partStats.size(); + } + + public void putToPartStats(String key, List val) { + if (this.partStats == null) { + this.partStats = new HashMap>(); + } + this.partStats.put(key, val); + } + + public Map> getPartStats() { + return this.partStats; + } + + public void setPartStats(Map> partStats) { + this.partStats = partStats; + } + + public void unsetPartStats() { + this.partStats = null; + } + + /** Returns true if field partStats is set (has been assigned a value) and false otherwise */ + public boolean isSetPartStats() { + return this.partStats != null; + } + + public void setPartStatsIsSet(boolean value) { + if (!value) { + this.partStats = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PART_STATS: + if (value == null) { + unsetPartStats(); + } else { + setPartStats((Map>)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PART_STATS: + return getPartStats(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PART_STATS: + return isSetPartStats(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PartitionsStatsResult) + return this.equals((PartitionsStatsResult)that); + return false; + } + + public boolean equals(PartitionsStatsResult that) { + if (that == null) + return false; + + boolean this_present_partStats = true && this.isSetPartStats(); + boolean that_present_partStats = true && that.isSetPartStats(); + if (this_present_partStats || that_present_partStats) { + if (!(this_present_partStats && that_present_partStats)) + return false; + if (!this.partStats.equals(that.partStats)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_partStats = true && (isSetPartStats()); + list.add(present_partStats); + if (present_partStats) + list.add(partStats); + + return list.hashCode(); + } + + @Override + public int compareTo(PartitionsStatsResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPartStats()).compareTo(other.isSetPartStats()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartStats()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partStats, other.partStats); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PartitionsStatsResult("); + boolean first = true; + + sb.append("partStats:"); + if (this.partStats == null) { + sb.append("null"); + } else { + sb.append(this.partStats); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetPartStats()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'partStats' is unset! Struct:" + toString()); + } + + // 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 PartitionsStatsResultStandardSchemeFactory implements SchemeFactory { + public PartitionsStatsResultStandardScheme getScheme() { + return new PartitionsStatsResultStandardScheme(); + } + } + + private static class PartitionsStatsResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionsStatsResult 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_STATS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map402 = iprot.readMapBegin(); + struct.partStats = new HashMap>(2*_map402.size); + String _key403; + List _val404; + for (int _i405 = 0; _i405 < _map402.size; ++_i405) + { + _key403 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list406 = iprot.readListBegin(); + _val404 = new ArrayList(_list406.size); + ColumnStatisticsObj _elem407; + for (int _i408 = 0; _i408 < _list406.size; ++_i408) + { + _elem407 = new ColumnStatisticsObj(); + _elem407.read(iprot); + _val404.add(_elem407); + } + iprot.readListEnd(); + } + struct.partStats.put(_key403, _val404); + } + iprot.readMapEnd(); + } + struct.setPartStatsIsSet(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, PartitionsStatsResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.partStats != null) { + oprot.writeFieldBegin(PART_STATS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.partStats.size())); + for (Map.Entry> _iter409 : struct.partStats.entrySet()) + { + oprot.writeString(_iter409.getKey()); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter409.getValue().size())); + for (ColumnStatisticsObj _iter410 : _iter409.getValue()) + { + _iter410.write(oprot); + } + oprot.writeListEnd(); + } + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PartitionsStatsResultTupleSchemeFactory implements SchemeFactory { + public PartitionsStatsResultTupleScheme getScheme() { + return new PartitionsStatsResultTupleScheme(); + } + } + + private static class PartitionsStatsResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.partStats.size()); + for (Map.Entry> _iter411 : struct.partStats.entrySet()) + { + oprot.writeString(_iter411.getKey()); + { + oprot.writeI32(_iter411.getValue().size()); + for (ColumnStatisticsObj _iter412 : _iter411.getValue()) + { + _iter412.write(oprot); + } + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TMap _map413 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.partStats = new HashMap>(2*_map413.size); + String _key414; + List _val415; + for (int _i416 = 0; _i416 < _map413.size; ++_i416) + { + _key414 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list417 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val415 = new ArrayList(_list417.size); + ColumnStatisticsObj _elem418; + for (int _i419 = 0; _i419 < _list417.size; ++_i419) + { + _elem418 = new ColumnStatisticsObj(); + _elem418.read(iprot); + _val415.add(_elem418); + } + } + struct.partStats.put(_key414, _val415); + } + } + struct.setPartStatsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysRequest.java new file mode 100644 index 0000000..8763ec8 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysRequest.java @@ -0,0 +1,490 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PrimaryKeysRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrimaryKeysRequest"); + + 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 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 PrimaryKeysRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PrimaryKeysRequestTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrimaryKeysRequest.class, metaDataMap); + } + + public PrimaryKeysRequest() { + } + + public PrimaryKeysRequest( + String db_name, + String tbl_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + } + + /** + * Performs a deep copy on other. + */ + public PrimaryKeysRequest(PrimaryKeysRequest other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + } + + public PrimaryKeysRequest deepCopy() { + return new PrimaryKeysRequest(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PrimaryKeysRequest) + return this.equals((PrimaryKeysRequest)that); + return false; + } + + public boolean equals(PrimaryKeysRequest that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + return list.hashCode(); + } + + @Override + public int compareTo(PrimaryKeysRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PrimaryKeysRequest("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDb_name()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'db_name' is unset! Struct:" + toString()); + } + + if (!isSetTbl_name()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tbl_name' is unset! Struct:" + toString()); + } + + // 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 PrimaryKeysRequestStandardSchemeFactory implements SchemeFactory { + public PrimaryKeysRequestStandardScheme getScheme() { + return new PrimaryKeysRequestStandardScheme(); + } + } + + private static class PrimaryKeysRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PrimaryKeysRequest 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; + 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, PrimaryKeysRequest 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.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PrimaryKeysRequestTupleSchemeFactory implements SchemeFactory { + public PrimaryKeysRequestTupleScheme getScheme() { + return new PrimaryKeysRequestTupleScheme(); + } + } + + private static class PrimaryKeysRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PrimaryKeysRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.db_name); + oprot.writeString(struct.tbl_name); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PrimaryKeysRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java new file mode 100644 index 0000000..a25234b --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PrimaryKeysResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrimaryKeysResponse"); + + private static final org.apache.thrift.protocol.TField PRIMARY_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("primaryKeys", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PrimaryKeysResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PrimaryKeysResponseTupleSchemeFactory()); + } + + private List primaryKeys; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PRIMARY_KEYS((short)1, "primaryKeys"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PRIMARY_KEYS + return PRIMARY_KEYS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PRIMARY_KEYS, new org.apache.thrift.meta_data.FieldMetaData("primaryKeys", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLPrimaryKey.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrimaryKeysResponse.class, metaDataMap); + } + + public PrimaryKeysResponse() { + } + + public PrimaryKeysResponse( + List primaryKeys) + { + this(); + this.primaryKeys = primaryKeys; + } + + /** + * Performs a deep copy on other. + */ + public PrimaryKeysResponse(PrimaryKeysResponse other) { + if (other.isSetPrimaryKeys()) { + List __this__primaryKeys = new ArrayList(other.primaryKeys.size()); + for (SQLPrimaryKey other_element : other.primaryKeys) { + __this__primaryKeys.add(new SQLPrimaryKey(other_element)); + } + this.primaryKeys = __this__primaryKeys; + } + } + + public PrimaryKeysResponse deepCopy() { + return new PrimaryKeysResponse(this); + } + + @Override + public void clear() { + this.primaryKeys = null; + } + + public int getPrimaryKeysSize() { + return (this.primaryKeys == null) ? 0 : this.primaryKeys.size(); + } + + public java.util.Iterator getPrimaryKeysIterator() { + return (this.primaryKeys == null) ? null : this.primaryKeys.iterator(); + } + + public void addToPrimaryKeys(SQLPrimaryKey elem) { + if (this.primaryKeys == null) { + this.primaryKeys = new ArrayList(); + } + this.primaryKeys.add(elem); + } + + public List getPrimaryKeys() { + return this.primaryKeys; + } + + public void setPrimaryKeys(List primaryKeys) { + this.primaryKeys = primaryKeys; + } + + public void unsetPrimaryKeys() { + this.primaryKeys = null; + } + + /** Returns true if field primaryKeys is set (has been assigned a value) and false otherwise */ + public boolean isSetPrimaryKeys() { + return this.primaryKeys != null; + } + + public void setPrimaryKeysIsSet(boolean value) { + if (!value) { + this.primaryKeys = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRIMARY_KEYS: + if (value == null) { + unsetPrimaryKeys(); + } else { + setPrimaryKeys((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRIMARY_KEYS: + return getPrimaryKeys(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRIMARY_KEYS: + return isSetPrimaryKeys(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PrimaryKeysResponse) + return this.equals((PrimaryKeysResponse)that); + return false; + } + + public boolean equals(PrimaryKeysResponse that) { + if (that == null) + return false; + + boolean this_present_primaryKeys = true && this.isSetPrimaryKeys(); + boolean that_present_primaryKeys = true && that.isSetPrimaryKeys(); + if (this_present_primaryKeys || that_present_primaryKeys) { + if (!(this_present_primaryKeys && that_present_primaryKeys)) + return false; + if (!this.primaryKeys.equals(that.primaryKeys)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_primaryKeys = true && (isSetPrimaryKeys()); + list.add(present_primaryKeys); + if (present_primaryKeys) + list.add(primaryKeys); + + return list.hashCode(); + } + + @Override + public int compareTo(PrimaryKeysResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPrimaryKeys()).compareTo(other.isSetPrimaryKeys()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrimaryKeys()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.primaryKeys, other.primaryKeys); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PrimaryKeysResponse("); + boolean first = true; + + sb.append("primaryKeys:"); + if (this.primaryKeys == null) { + sb.append("null"); + } else { + sb.append(this.primaryKeys); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetPrimaryKeys()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'primaryKeys' is unset! Struct:" + toString()); + } + + // 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 PrimaryKeysResponseStandardSchemeFactory implements SchemeFactory { + public PrimaryKeysResponseStandardScheme getScheme() { + return new PrimaryKeysResponseStandardScheme(); + } + } + + private static class PrimaryKeysResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PrimaryKeysResponse 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: // PRIMARY_KEYS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list322 = iprot.readListBegin(); + struct.primaryKeys = new ArrayList(_list322.size); + SQLPrimaryKey _elem323; + for (int _i324 = 0; _i324 < _list322.size; ++_i324) + { + _elem323 = new SQLPrimaryKey(); + _elem323.read(iprot); + struct.primaryKeys.add(_elem323); + } + iprot.readListEnd(); + } + struct.setPrimaryKeysIsSet(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, PrimaryKeysResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.primaryKeys != null) { + oprot.writeFieldBegin(PRIMARY_KEYS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.primaryKeys.size())); + for (SQLPrimaryKey _iter325 : struct.primaryKeys) + { + _iter325.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PrimaryKeysResponseTupleSchemeFactory implements SchemeFactory { + public PrimaryKeysResponseTupleScheme getScheme() { + return new PrimaryKeysResponseTupleScheme(); + } + } + + private static class PrimaryKeysResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PrimaryKeysResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.primaryKeys.size()); + for (SQLPrimaryKey _iter326 : struct.primaryKeys) + { + _iter326.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PrimaryKeysResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list327 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.primaryKeys = new ArrayList(_list327.size); + SQLPrimaryKey _elem328; + for (int _i329 = 0; _i329 < _list327.size; ++_i329) + { + _elem328 = new SQLPrimaryKey(); + _elem328.read(iprot); + struct.primaryKeys.add(_elem328); + } + } + struct.setPrimaryKeysIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java new file mode 100644 index 0000000..e1792bd --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java @@ -0,0 +1,906 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PrincipalPrivilegeSet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrincipalPrivilegeSet"); + + private static final org.apache.thrift.protocol.TField USER_PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("userPrivileges", org.apache.thrift.protocol.TType.MAP, (short)1); + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_PRIVILEGES((short)1, "userPrivileges"), + GROUP_PRIVILEGES((short)2, "groupPrivileges"), + ROLE_PRIVILEGES((short)3, "rolePrivileges"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_PRIVILEGES + return USER_PRIVILEGES; + case 2: // GROUP_PRIVILEGES + return GROUP_PRIVILEGES; + case 3: // ROLE_PRIVILEGES + return ROLE_PRIVILEGES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.USER_PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("userPrivileges", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeGrantInfo.class))))); + tmpMap.put(_Fields.GROUP_PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("groupPrivileges", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeGrantInfo.class))))); + tmpMap.put(_Fields.ROLE_PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("rolePrivileges", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeGrantInfo.class))))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrincipalPrivilegeSet.class, metaDataMap); + } + + public PrincipalPrivilegeSet() { + } + + public PrincipalPrivilegeSet( + Map> userPrivileges, + Map> groupPrivileges, + Map> rolePrivileges) + { + this(); + this.userPrivileges = userPrivileges; + this.groupPrivileges = groupPrivileges; + this.rolePrivileges = rolePrivileges; + } + + /** + * Performs a deep copy on other. + */ + public PrincipalPrivilegeSet(PrincipalPrivilegeSet other) { + if (other.isSetUserPrivileges()) { + Map> __this__userPrivileges = new HashMap>(other.userPrivileges.size()); + for (Map.Entry> other_element : other.userPrivileges.entrySet()) { + + String other_element_key = other_element.getKey(); + List other_element_value = other_element.getValue(); + + String __this__userPrivileges_copy_key = other_element_key; + + List __this__userPrivileges_copy_value = new ArrayList(other_element_value.size()); + for (PrivilegeGrantInfo other_element_value_element : other_element_value) { + __this__userPrivileges_copy_value.add(new PrivilegeGrantInfo(other_element_value_element)); + } + + __this__userPrivileges.put(__this__userPrivileges_copy_key, __this__userPrivileges_copy_value); + } + this.userPrivileges = __this__userPrivileges; + } + if (other.isSetGroupPrivileges()) { + Map> __this__groupPrivileges = new HashMap>(other.groupPrivileges.size()); + for (Map.Entry> other_element : other.groupPrivileges.entrySet()) { + + String other_element_key = other_element.getKey(); + List other_element_value = other_element.getValue(); + + String __this__groupPrivileges_copy_key = other_element_key; + + List __this__groupPrivileges_copy_value = new ArrayList(other_element_value.size()); + for (PrivilegeGrantInfo other_element_value_element : other_element_value) { + __this__groupPrivileges_copy_value.add(new PrivilegeGrantInfo(other_element_value_element)); + } + + __this__groupPrivileges.put(__this__groupPrivileges_copy_key, __this__groupPrivileges_copy_value); + } + this.groupPrivileges = __this__groupPrivileges; + } + if (other.isSetRolePrivileges()) { + Map> __this__rolePrivileges = new HashMap>(other.rolePrivileges.size()); + for (Map.Entry> other_element : other.rolePrivileges.entrySet()) { + + String other_element_key = other_element.getKey(); + List other_element_value = other_element.getValue(); + + String __this__rolePrivileges_copy_key = other_element_key; + + List __this__rolePrivileges_copy_value = new ArrayList(other_element_value.size()); + for (PrivilegeGrantInfo other_element_value_element : other_element_value) { + __this__rolePrivileges_copy_value.add(new PrivilegeGrantInfo(other_element_value_element)); + } + + __this__rolePrivileges.put(__this__rolePrivileges_copy_key, __this__rolePrivileges_copy_value); + } + this.rolePrivileges = __this__rolePrivileges; + } + } + + public PrincipalPrivilegeSet deepCopy() { + return new PrincipalPrivilegeSet(this); + } + + @Override + public void clear() { + this.userPrivileges = null; + this.groupPrivileges = null; + this.rolePrivileges = null; + } + + public int getUserPrivilegesSize() { + return (this.userPrivileges == null) ? 0 : this.userPrivileges.size(); + } + + public void putToUserPrivileges(String key, List val) { + if (this.userPrivileges == null) { + this.userPrivileges = new HashMap>(); + } + this.userPrivileges.put(key, val); + } + + public Map> getUserPrivileges() { + return this.userPrivileges; + } + + public void setUserPrivileges(Map> userPrivileges) { + this.userPrivileges = userPrivileges; + } + + public void unsetUserPrivileges() { + this.userPrivileges = null; + } + + /** Returns true if field userPrivileges is set (has been assigned a value) and false otherwise */ + public boolean isSetUserPrivileges() { + return this.userPrivileges != null; + } + + public void setUserPrivilegesIsSet(boolean value) { + if (!value) { + this.userPrivileges = null; + } + } + + public int getGroupPrivilegesSize() { + return (this.groupPrivileges == null) ? 0 : this.groupPrivileges.size(); + } + + public void putToGroupPrivileges(String key, List val) { + if (this.groupPrivileges == null) { + this.groupPrivileges = new HashMap>(); + } + this.groupPrivileges.put(key, val); + } + + public Map> getGroupPrivileges() { + return this.groupPrivileges; + } + + public void setGroupPrivileges(Map> groupPrivileges) { + this.groupPrivileges = groupPrivileges; + } + + public void unsetGroupPrivileges() { + this.groupPrivileges = null; + } + + /** Returns true if field groupPrivileges is set (has been assigned a value) and false otherwise */ + public boolean isSetGroupPrivileges() { + return this.groupPrivileges != null; + } + + public void setGroupPrivilegesIsSet(boolean value) { + if (!value) { + this.groupPrivileges = null; + } + } + + public int getRolePrivilegesSize() { + return (this.rolePrivileges == null) ? 0 : this.rolePrivileges.size(); + } + + public void putToRolePrivileges(String key, List val) { + if (this.rolePrivileges == null) { + this.rolePrivileges = new HashMap>(); + } + this.rolePrivileges.put(key, val); + } + + public Map> getRolePrivileges() { + return this.rolePrivileges; + } + + public void setRolePrivileges(Map> rolePrivileges) { + this.rolePrivileges = rolePrivileges; + } + + public void unsetRolePrivileges() { + this.rolePrivileges = null; + } + + /** Returns true if field rolePrivileges is set (has been assigned a value) and false otherwise */ + public boolean isSetRolePrivileges() { + return this.rolePrivileges != null; + } + + public void setRolePrivilegesIsSet(boolean value) { + if (!value) { + this.rolePrivileges = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_PRIVILEGES: + if (value == null) { + unsetUserPrivileges(); + } else { + setUserPrivileges((Map>)value); + } + break; + + case GROUP_PRIVILEGES: + if (value == null) { + unsetGroupPrivileges(); + } else { + setGroupPrivileges((Map>)value); + } + break; + + case ROLE_PRIVILEGES: + if (value == null) { + unsetRolePrivileges(); + } else { + setRolePrivileges((Map>)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_PRIVILEGES: + return getUserPrivileges(); + + case GROUP_PRIVILEGES: + return getGroupPrivileges(); + + case ROLE_PRIVILEGES: + return getRolePrivileges(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_PRIVILEGES: + return isSetUserPrivileges(); + case GROUP_PRIVILEGES: + return isSetGroupPrivileges(); + case ROLE_PRIVILEGES: + return isSetRolePrivileges(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PrincipalPrivilegeSet) + return this.equals((PrincipalPrivilegeSet)that); + return false; + } + + public boolean equals(PrincipalPrivilegeSet that) { + if (that == null) + return false; + + boolean this_present_userPrivileges = true && this.isSetUserPrivileges(); + boolean that_present_userPrivileges = true && that.isSetUserPrivileges(); + if (this_present_userPrivileges || that_present_userPrivileges) { + if (!(this_present_userPrivileges && that_present_userPrivileges)) + return false; + if (!this.userPrivileges.equals(that.userPrivileges)) + return false; + } + + boolean this_present_groupPrivileges = true && this.isSetGroupPrivileges(); + boolean that_present_groupPrivileges = true && that.isSetGroupPrivileges(); + if (this_present_groupPrivileges || that_present_groupPrivileges) { + if (!(this_present_groupPrivileges && that_present_groupPrivileges)) + return false; + if (!this.groupPrivileges.equals(that.groupPrivileges)) + return false; + } + + boolean this_present_rolePrivileges = true && this.isSetRolePrivileges(); + boolean that_present_rolePrivileges = true && that.isSetRolePrivileges(); + if (this_present_rolePrivileges || that_present_rolePrivileges) { + if (!(this_present_rolePrivileges && that_present_rolePrivileges)) + return false; + if (!this.rolePrivileges.equals(that.rolePrivileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_userPrivileges = true && (isSetUserPrivileges()); + list.add(present_userPrivileges); + if (present_userPrivileges) + list.add(userPrivileges); + + boolean present_groupPrivileges = true && (isSetGroupPrivileges()); + list.add(present_groupPrivileges); + if (present_groupPrivileges) + list.add(groupPrivileges); + + boolean present_rolePrivileges = true && (isSetRolePrivileges()); + list.add(present_rolePrivileges); + if (present_rolePrivileges) + list.add(rolePrivileges); + + return list.hashCode(); + } + + @Override + public int compareTo(PrincipalPrivilegeSet other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserPrivileges()).compareTo(other.isSetUserPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserPrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userPrivileges, other.userPrivileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroupPrivileges()).compareTo(other.isSetGroupPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroupPrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupPrivileges, other.groupPrivileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRolePrivileges()).compareTo(other.isSetRolePrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRolePrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rolePrivileges, other.rolePrivileges); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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) { + { + org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin(); + struct.userPrivileges = new HashMap>(2*_map24.size); + String _key25; + List _val26; + for (int _i27 = 0; _i27 < _map24.size; ++_i27) + { + _key25 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list28 = iprot.readListBegin(); + _val26 = new ArrayList(_list28.size); + PrivilegeGrantInfo _elem29; + for (int _i30 = 0; _i30 < _list28.size; ++_i30) + { + _elem29 = new PrivilegeGrantInfo(); + _elem29.read(iprot); + _val26.add(_elem29); + } + iprot.readListEnd(); + } + struct.userPrivileges.put(_key25, _val26); + } + iprot.readMapEnd(); + } + struct.setUserPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GROUP_PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map31 = iprot.readMapBegin(); + struct.groupPrivileges = new HashMap>(2*_map31.size); + String _key32; + List _val33; + for (int _i34 = 0; _i34 < _map31.size; ++_i34) + { + _key32 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list35 = iprot.readListBegin(); + _val33 = new ArrayList(_list35.size); + PrivilegeGrantInfo _elem36; + for (int _i37 = 0; _i37 < _list35.size; ++_i37) + { + _elem36 = new PrivilegeGrantInfo(); + _elem36.read(iprot); + _val33.add(_elem36); + } + iprot.readListEnd(); + } + struct.groupPrivileges.put(_key32, _val33); + } + iprot.readMapEnd(); + } + struct.setGroupPrivilegesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ROLE_PRIVILEGES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map38 = iprot.readMapBegin(); + struct.rolePrivileges = new HashMap>(2*_map38.size); + String _key39; + List _val40; + for (int _i41 = 0; _i41 < _map38.size; ++_i41) + { + _key39 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(); + _val40 = new ArrayList(_list42.size); + PrivilegeGrantInfo _elem43; + for (int _i44 = 0; _i44 < _list42.size; ++_i44) + { + _elem43 = new PrivilegeGrantInfo(); + _elem43.read(iprot); + _val40.add(_elem43); + } + iprot.readListEnd(); + } + struct.rolePrivileges.put(_key39, _val40); + } + iprot.readMapEnd(); + } + struct.setRolePrivilegesIsSet(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, PrincipalPrivilegeSet struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.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, struct.userPrivileges.size())); + for (Map.Entry> _iter45 : struct.userPrivileges.entrySet()) + { + oprot.writeString(_iter45.getKey()); + { + 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.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.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, struct.groupPrivileges.size())); + for (Map.Entry> _iter47 : struct.groupPrivileges.entrySet()) + { + oprot.writeString(_iter47.getKey()); + { + 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.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.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, struct.rolePrivileges.size())); + for (Map.Entry> _iter49 : struct.rolePrivileges.entrySet()) + { + oprot.writeString(_iter49.getKey()); + { + 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.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PrincipalPrivilegeSetTupleSchemeFactory implements SchemeFactory { + public PrincipalPrivilegeSetTupleScheme getScheme() { + return new PrincipalPrivilegeSetTupleScheme(); + } + } + + private static class PrincipalPrivilegeSetTupleScheme extends TupleScheme { + + @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); + } + } + } + } + } + } + + @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); + String _key58; + List _val59; + for (int _i60 = 0; _i60 < _map57.size; ++_i60) + { + _key58 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list61 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val59 = new ArrayList(_list61.size); + PrivilegeGrantInfo _elem62; + for (int _i63 = 0; _i63 < _list61.size; ++_i63) + { + _elem62 = new PrivilegeGrantInfo(); + _elem62.read(iprot); + _val59.add(_elem62); + } + } + struct.userPrivileges.put(_key58, _val59); + } + } + 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); + String _key65; + List _val66; + for (int _i67 = 0; _i67 < _map64.size; ++_i67) + { + _key65 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list68 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val66 = new ArrayList(_list68.size); + PrivilegeGrantInfo _elem69; + for (int _i70 = 0; _i70 < _list68.size; ++_i70) + { + _elem69 = new PrivilegeGrantInfo(); + _elem69.read(iprot); + _val66.add(_elem69); + } + } + struct.groupPrivileges.put(_key65, _val66); + } + } + 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); + String _key72; + List _val73; + for (int _i74 = 0; _i74 < _map71.size; ++_i74) + { + _key72 = iprot.readString(); + { + org.apache.thrift.protocol.TList _list75 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val73 = new ArrayList(_list75.size); + PrivilegeGrantInfo _elem76; + for (int _i77 = 0; _i77 < _list75.size; ++_i77) + { + _elem76 = new PrivilegeGrantInfo(); + _elem76.read(iprot); + _val73.add(_elem76); + } + } + struct.rolePrivileges.put(_key72, _val73); + } + } + struct.setRolePrivilegesIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalType.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalType.java new file mode 100644 index 0000000..82eb8fd --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalType.java @@ -0,0 +1,48 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum PrincipalType implements org.apache.thrift.TEnum { + USER(1), + ROLE(2), + GROUP(3); + + private final int value; + + private PrincipalType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static PrincipalType findByValue(int value) { + switch (value) { + case 1: + return USER; + case 2: + return ROLE; + case 3: + return GROUP; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java new file mode 100644 index 0000000..bba2d40 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java @@ -0,0 +1,449 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PrivilegeBag implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrivilegeBag"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PRIVILEGES((short)1, "privileges"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PRIVILEGES + return PRIVILEGES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectPrivilege.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrivilegeBag.class, metaDataMap); + } + + public PrivilegeBag() { + } + + public PrivilegeBag( + List privileges) + { + this(); + this.privileges = privileges; + } + + /** + * Performs a deep copy on other. + */ + public PrivilegeBag(PrivilegeBag other) { + if (other.isSetPrivileges()) { + List __this__privileges = new ArrayList(other.privileges.size()); + for (HiveObjectPrivilege other_element : other.privileges) { + __this__privileges.add(new HiveObjectPrivilege(other_element)); + } + this.privileges = __this__privileges; + } + } + + public PrivilegeBag deepCopy() { + return new PrivilegeBag(this); + } + + @Override + public void clear() { + this.privileges = null; + } + + public int getPrivilegesSize() { + return (this.privileges == null) ? 0 : this.privileges.size(); + } + + public java.util.Iterator getPrivilegesIterator() { + return (this.privileges == null) ? null : this.privileges.iterator(); + } + + public void addToPrivileges(HiveObjectPrivilege elem) { + if (this.privileges == null) { + this.privileges = new ArrayList(); + } + this.privileges.add(elem); + } + + public List getPrivileges() { + return this.privileges; + } + + public void setPrivileges(List privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRIVILEGES: + return getPrivileges(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRIVILEGES: + return isSetPrivileges(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PrivilegeBag) + return this.equals((PrivilegeBag)that); + return false; + } + + public boolean equals(PrivilegeBag that) { + if (that == null) + return false; + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_privileges = true && (isSetPrivileges()); + list.add(present_privileges); + if (present_privileges) + list.add(privileges); + + return list.hashCode(); + } + + @Override + public int compareTo(PrivilegeBag other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PrivilegeBag("); + boolean first = true; + + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + 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 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); + HiveObjectPrivilege _elem17; + for (int _i18 = 0; _i18 < _list16.size; ++_i18) + { + _elem17 = new HiveObjectPrivilege(); + _elem17.read(iprot); + struct.privileges.add(_elem17); + } + 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); + HiveObjectPrivilege _elem22; + for (int _i23 = 0; _i23 < _list21.size; ++_i23) + { + _elem22 = new HiveObjectPrivilege(); + _elem22.read(iprot); + struct.privileges.add(_elem22); + } + } + struct.setPrivilegesIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java new file mode 100644 index 0000000..ba08d3a --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java @@ -0,0 +1,815 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PrivilegeGrantInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrivilegeGrantInfo"); + + private static final org.apache.thrift.protocol.TField PRIVILEGE_FIELD_DESC = new org.apache.thrift.protocol.TField("privilege", org.apache.thrift.protocol.TType.STRING, (short)1); + 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 GRANTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("grantor", org.apache.thrift.protocol.TType.STRING, (short)3); + 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 + private PrincipalType grantorType; // required + private boolean grantOption; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PRIVILEGE((short)1, "privilege"), + CREATE_TIME((short)2, "createTime"), + GRANTOR((short)3, "grantor"), + /** + * + * @see PrincipalType + */ + GRANTOR_TYPE((short)4, "grantorType"), + GRANT_OPTION((short)5, "grantOption"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PRIVILEGE + return PRIVILEGE; + case 2: // CREATE_TIME + return CREATE_TIME; + case 3: // GRANTOR + return GRANTOR; + case 4: // GRANTOR_TYPE + return GRANTOR_TYPE; + case 5: // GRANT_OPTION + return GRANT_OPTION; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __CREATETIME_ISSET_ID = 0; + private static final int __GRANTOPTION_ISSET_ID = 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); + tmpMap.put(_Fields.PRIVILEGE, new org.apache.thrift.meta_data.FieldMetaData("privilege", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.GRANTOR, new org.apache.thrift.meta_data.FieldMetaData("grantor", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GRANTOR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("grantorType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("grantOption", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrivilegeGrantInfo.class, metaDataMap); + } + + public PrivilegeGrantInfo() { + } + + public PrivilegeGrantInfo( + String privilege, + int createTime, + String grantor, + PrincipalType grantorType, + boolean grantOption) + { + this(); + this.privilege = privilege; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.grantor = grantor; + this.grantorType = grantorType; + this.grantOption = grantOption; + setGrantOptionIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public PrivilegeGrantInfo(PrivilegeGrantInfo other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetPrivilege()) { + this.privilege = other.privilege; + } + this.createTime = other.createTime; + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + if (other.isSetGrantorType()) { + this.grantorType = other.grantorType; + } + this.grantOption = other.grantOption; + } + + public PrivilegeGrantInfo deepCopy() { + return new PrivilegeGrantInfo(this); + } + + @Override + public void clear() { + this.privilege = null; + setCreateTimeIsSet(false); + this.createTime = 0; + this.grantor = null; + this.grantorType = null; + setGrantOptionIsSet(false); + this.grantOption = false; + } + + public String getPrivilege() { + return this.privilege; + } + + public void setPrivilege(String privilege) { + this.privilege = privilege; + } + + public void unsetPrivilege() { + this.privilege = null; + } + + /** Returns true if field privilege is set (has been assigned a value) and false otherwise */ + public boolean isSetPrivilege() { + return this.privilege != null; + } + + public void setPrivilegeIsSet(boolean value) { + if (!value) { + this.privilege = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + public String getGrantor() { + return this.grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public void unsetGrantor() { + this.grantor = null; + } + + /** Returns true if field grantor is set (has been assigned a value) and false otherwise */ + public boolean isSetGrantor() { + return this.grantor != null; + } + + public void setGrantorIsSet(boolean value) { + if (!value) { + this.grantor = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getGrantorType() { + return this.grantorType; + } + + /** + * + * @see PrincipalType + */ + public void setGrantorType(PrincipalType grantorType) { + this.grantorType = grantorType; + } + + public void unsetGrantorType() { + this.grantorType = null; + } + + /** Returns true if field grantorType is set (has been assigned a value) and false otherwise */ + public boolean isSetGrantorType() { + return this.grantorType != null; + } + + public void setGrantorTypeIsSet(boolean value) { + if (!value) { + this.grantorType = null; + } + } + + public boolean isGrantOption() { + return this.grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + setGrantOptionIsSet(true); + } + + public void unsetGrantOption() { + __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 EncodingUtils.testBit(__isset_bitfield, __GRANTOPTION_ISSET_ID); + } + + public void setGrantOptionIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANTOPTION_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRIVILEGE: + if (value == null) { + unsetPrivilege(); + } else { + setPrivilege((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); + } + break; + + case GRANTOR_TYPE: + if (value == null) { + unsetGrantorType(); + } else { + setGrantorType((PrincipalType)value); + } + break; + + case GRANT_OPTION: + if (value == null) { + unsetGrantOption(); + } else { + setGrantOption((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRIVILEGE: + return getPrivilege(); + + case CREATE_TIME: + return getCreateTime(); + + case GRANTOR: + return getGrantor(); + + case GRANTOR_TYPE: + return getGrantorType(); + + case GRANT_OPTION: + return isGrantOption(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRIVILEGE: + return isSetPrivilege(); + case CREATE_TIME: + return isSetCreateTime(); + case GRANTOR: + return isSetGrantor(); + case GRANTOR_TYPE: + return isSetGrantorType(); + case GRANT_OPTION: + return isSetGrantOption(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PrivilegeGrantInfo) + return this.equals((PrivilegeGrantInfo)that); + return false; + } + + public boolean equals(PrivilegeGrantInfo that) { + if (that == null) + return false; + + boolean this_present_privilege = true && this.isSetPrivilege(); + boolean that_present_privilege = true && that.isSetPrivilege(); + if (this_present_privilege || that_present_privilege) { + if (!(this_present_privilege && that_present_privilege)) + return false; + if (!this.privilege.equals(that.privilege)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) + return false; + } + + boolean this_present_grantorType = true && this.isSetGrantorType(); + boolean that_present_grantorType = true && that.isSetGrantorType(); + if (this_present_grantorType || that_present_grantorType) { + if (!(this_present_grantorType && that_present_grantorType)) + return false; + if (!this.grantorType.equals(that.grantorType)) + return false; + } + + boolean this_present_grantOption = true; + boolean that_present_grantOption = true; + if (this_present_grantOption || that_present_grantOption) { + if (!(this_present_grantOption && that_present_grantOption)) + return false; + if (this.grantOption != that.grantOption) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_privilege = true && (isSetPrivilege()); + list.add(present_privilege); + if (present_privilege) + list.add(privilege); + + boolean present_createTime = true; + list.add(present_createTime); + if (present_createTime) + list.add(createTime); + + boolean present_grantor = true && (isSetGrantor()); + list.add(present_grantor); + if (present_grantor) + list.add(grantor); + + boolean present_grantorType = true && (isSetGrantorType()); + list.add(present_grantorType); + if (present_grantorType) + list.add(grantorType.getValue()); + + boolean present_grantOption = true; + list.add(present_grantOption); + if (present_grantOption) + list.add(grantOption); + + return list.hashCode(); + } + + @Override + public int compareTo(PrivilegeGrantInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPrivilege()).compareTo(other.isSetPrivilege()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivilege()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privilege, other.privilege); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(other.isSetGrantor()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantor()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantor, other.grantor); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantorType()).compareTo(other.isSetGrantorType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantorType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorType, other.grantorType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantOption()).compareTo(other.isSetGrantOption()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantOption()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantOption, other.grantOption); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PrivilegeGrantInfo("); + boolean first = true; + + sb.append("privilege:"); + if (this.privilege == null) { + sb.append("null"); + } else { + sb.append(this.privilege); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("grantor:"); + if (this.grantor == null) { + sb.append("null"); + } else { + sb.append(this.grantor); + } + first = false; + if (!first) sb.append(", "); + sb.append("grantorType:"); + if (this.grantorType == null) { + sb.append("null"); + } else { + sb.append(this.grantorType); + } + first = false; + if (!first) sb.append(", "); + sb.append("grantOption:"); + sb.append(this.grantOption); + 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 { + // 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 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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorTypeIsSet(true); + } + if (incoming.get(4)) { + struct.grantOption = iprot.readBool(); + struct.setGrantOptionIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java new file mode 100644 index 0000000..0c06ff3 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java @@ -0,0 +1,710 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PutFileMetadataRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PutFileMetadataRequest"); + + private static final org.apache.thrift.protocol.TField FILE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fileIds", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PutFileMetadataRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PutFileMetadataRequestTupleSchemeFactory()); + } + + private List fileIds; // required + private List metadata; // required + private FileMetadataExprType type; // 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 { + FILE_IDS((short)1, "fileIds"), + METADATA((short)2, "metadata"), + /** + * + * @see FileMetadataExprType + */ + TYPE((short)3, "type"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FILE_IDS + return FILE_IDS; + case 2: // METADATA + return METADATA; + case 3: // TYPE + return TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.TYPE}; + 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); + tmpMap.put(_Fields.FILE_IDS, new org.apache.thrift.meta_data.FieldMetaData("fileIds", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FileMetadataExprType.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PutFileMetadataRequest.class, metaDataMap); + } + + public PutFileMetadataRequest() { + } + + public PutFileMetadataRequest( + List fileIds, + List metadata) + { + this(); + this.fileIds = fileIds; + this.metadata = metadata; + } + + /** + * Performs a deep copy on other. + */ + public PutFileMetadataRequest(PutFileMetadataRequest other) { + if (other.isSetFileIds()) { + List __this__fileIds = new ArrayList(other.fileIds); + this.fileIds = __this__fileIds; + } + if (other.isSetMetadata()) { + List __this__metadata = new ArrayList(other.metadata); + this.metadata = __this__metadata; + } + if (other.isSetType()) { + this.type = other.type; + } + } + + public PutFileMetadataRequest deepCopy() { + return new PutFileMetadataRequest(this); + } + + @Override + public void clear() { + this.fileIds = null; + this.metadata = null; + this.type = null; + } + + public int getFileIdsSize() { + return (this.fileIds == null) ? 0 : this.fileIds.size(); + } + + public java.util.Iterator getFileIdsIterator() { + return (this.fileIds == null) ? null : this.fileIds.iterator(); + } + + public void addToFileIds(long elem) { + if (this.fileIds == null) { + this.fileIds = new ArrayList(); + } + this.fileIds.add(elem); + } + + public List getFileIds() { + return this.fileIds; + } + + public void setFileIds(List fileIds) { + this.fileIds = fileIds; + } + + public void unsetFileIds() { + this.fileIds = null; + } + + /** Returns true if field fileIds is set (has been assigned a value) and false otherwise */ + public boolean isSetFileIds() { + return this.fileIds != null; + } + + public void setFileIdsIsSet(boolean value) { + if (!value) { + this.fileIds = null; + } + } + + public int getMetadataSize() { + return (this.metadata == null) ? 0 : this.metadata.size(); + } + + public java.util.Iterator getMetadataIterator() { + return (this.metadata == null) ? null : this.metadata.iterator(); + } + + public void addToMetadata(ByteBuffer elem) { + if (this.metadata == null) { + this.metadata = new ArrayList(); + } + this.metadata.add(elem); + } + + public List getMetadata() { + return this.metadata; + } + + public void setMetadata(List metadata) { + this.metadata = metadata; + } + + public void unsetMetadata() { + this.metadata = null; + } + + /** Returns true if field metadata is set (has been assigned a value) and false otherwise */ + public boolean isSetMetadata() { + return this.metadata != null; + } + + public void setMetadataIsSet(boolean value) { + if (!value) { + this.metadata = null; + } + } + + /** + * + * @see FileMetadataExprType + */ + public FileMetadataExprType getType() { + return this.type; + } + + /** + * + * @see FileMetadataExprType + */ + public void setType(FileMetadataExprType type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FILE_IDS: + if (value == null) { + unsetFileIds(); + } else { + setFileIds((List)value); + } + break; + + case METADATA: + if (value == null) { + unsetMetadata(); + } else { + setMetadata((List)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((FileMetadataExprType)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FILE_IDS: + return getFileIds(); + + case METADATA: + return getMetadata(); + + case TYPE: + return getType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FILE_IDS: + return isSetFileIds(); + case METADATA: + return isSetMetadata(); + case TYPE: + return isSetType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PutFileMetadataRequest) + return this.equals((PutFileMetadataRequest)that); + return false; + } + + public boolean equals(PutFileMetadataRequest that) { + if (that == null) + return false; + + boolean this_present_fileIds = true && this.isSetFileIds(); + boolean that_present_fileIds = true && that.isSetFileIds(); + if (this_present_fileIds || that_present_fileIds) { + if (!(this_present_fileIds && that_present_fileIds)) + return false; + if (!this.fileIds.equals(that.fileIds)) + return false; + } + + boolean this_present_metadata = true && this.isSetMetadata(); + boolean that_present_metadata = true && that.isSetMetadata(); + if (this_present_metadata || that_present_metadata) { + if (!(this_present_metadata && that_present_metadata)) + return false; + if (!this.metadata.equals(that.metadata)) + return false; + } + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_fileIds = true && (isSetFileIds()); + list.add(present_fileIds); + if (present_fileIds) + list.add(fileIds); + + boolean present_metadata = true && (isSetMetadata()); + list.add(present_metadata); + if (present_metadata) + list.add(metadata); + + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(PutFileMetadataRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetFileIds()).compareTo(other.isSetFileIds()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFileIds()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileIds, other.fileIds); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMetadata()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PutFileMetadataRequest("); + boolean first = true; + + sb.append("fileIds:"); + if (this.fileIds == null) { + sb.append("null"); + } else { + sb.append(this.fileIds); + } + first = false; + if (!first) sb.append(", "); + sb.append("metadata:"); + if (this.metadata == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.metadata, sb); + } + first = false; + if (isSetType()) { + if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetFileIds()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'fileIds' is unset! Struct:" + toString()); + } + + if (!isSetMetadata()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'metadata' is unset! Struct:" + toString()); + } + + // 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 PutFileMetadataRequestStandardSchemeFactory implements SchemeFactory { + public PutFileMetadataRequestStandardScheme getScheme() { + return new PutFileMetadataRequestStandardScheme(); + } + } + + private static class PutFileMetadataRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PutFileMetadataRequest 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: // FILE_IDS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list650 = iprot.readListBegin(); + struct.fileIds = new ArrayList(_list650.size); + long _elem651; + for (int _i652 = 0; _i652 < _list650.size; ++_i652) + { + _elem651 = iprot.readI64(); + struct.fileIds.add(_elem651); + } + iprot.readListEnd(); + } + struct.setFileIdsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // METADATA + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list653 = iprot.readListBegin(); + struct.metadata = new ArrayList(_list653.size); + ByteBuffer _elem654; + for (int _i655 = 0; _i655 < _list653.size; ++_i655) + { + _elem654 = iprot.readBinary(); + struct.metadata.add(_elem654); + } + iprot.readListEnd(); + } + struct.setMetadataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.hadoop.hive.metastore.api.FileMetadataExprType.findByValue(iprot.readI32()); + 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, PutFileMetadataRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.fileIds != null) { + oprot.writeFieldBegin(FILE_IDS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size())); + for (long _iter656 : struct.fileIds) + { + oprot.writeI64(_iter656); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.metadata != null) { + oprot.writeFieldBegin(METADATA_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.metadata.size())); + for (ByteBuffer _iter657 : struct.metadata) + { + oprot.writeBinary(_iter657); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.type != null) { + if (struct.isSetType()) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PutFileMetadataRequestTupleSchemeFactory implements SchemeFactory { + public PutFileMetadataRequestTupleScheme getScheme() { + return new PutFileMetadataRequestTupleScheme(); + } + } + + private static class PutFileMetadataRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PutFileMetadataRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.fileIds.size()); + for (long _iter658 : struct.fileIds) + { + oprot.writeI64(_iter658); + } + } + { + oprot.writeI32(struct.metadata.size()); + for (ByteBuffer _iter659 : struct.metadata) + { + oprot.writeBinary(_iter659); + } + } + BitSet optionals = new BitSet(); + if (struct.isSetType()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetType()) { + oprot.writeI32(struct.type.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PutFileMetadataRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list660 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); + struct.fileIds = new ArrayList(_list660.size); + long _elem661; + for (int _i662 = 0; _i662 < _list660.size; ++_i662) + { + _elem661 = iprot.readI64(); + struct.fileIds.add(_elem661); + } + } + struct.setFileIdsIsSet(true); + { + org.apache.thrift.protocol.TList _list663 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.metadata = new ArrayList(_list663.size); + ByteBuffer _elem664; + for (int _i665 = 0; _i665 < _list663.size; ++_i665) + { + _elem664 = iprot.readBinary(); + struct.metadata.add(_elem664); + } + } + struct.setMetadataIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.type = org.apache.hadoop.hive.metastore.api.FileMetadataExprType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataResult.java new file mode 100644 index 0000000..d807671 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataResult.java @@ -0,0 +1,283 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class PutFileMetadataResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PutFileMetadataResult"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PutFileMetadataResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PutFileMetadataResultTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PutFileMetadataResult.class, metaDataMap); + } + + public PutFileMetadataResult() { + } + + /** + * Performs a deep copy on other. + */ + public PutFileMetadataResult(PutFileMetadataResult other) { + } + + public PutFileMetadataResult deepCopy() { + return new PutFileMetadataResult(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PutFileMetadataResult) + return this.equals((PutFileMetadataResult)that); + return false; + } + + public boolean equals(PutFileMetadataResult that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(PutFileMetadataResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("PutFileMetadataResult("); + boolean first = true; + + 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 PutFileMetadataResultStandardSchemeFactory implements SchemeFactory { + public PutFileMetadataResultStandardScheme getScheme() { + return new PutFileMetadataResultStandardScheme(); + } + } + + private static class PutFileMetadataResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PutFileMetadataResult 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, PutFileMetadataResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PutFileMetadataResultTupleSchemeFactory implements SchemeFactory { + public PutFileMetadataResultTupleScheme getScheme() { + return new PutFileMetadataResultTupleScheme(); + } + } + + private static class PutFileMetadataResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PutFileMetadataResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PutFileMetadataResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java new file mode 100644 index 0000000..77067c6 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java @@ -0,0 +1,438 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +public class RequestPartsSpec extends org.apache.thrift.TUnion { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RequestPartsSpec"); + 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)1); + private static final org.apache.thrift.protocol.TField EXPRS_FIELD_DESC = new org.apache.thrift.protocol.TField("exprs", org.apache.thrift.protocol.TType.LIST, (short)2); + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAMES((short)1, "names"), + EXPRS((short)2, "exprs"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAMES + return NAMES; + case 2: // EXPRS + return EXPRS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + 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); + tmpMap.put(_Fields.NAMES, new org.apache.thrift.meta_data.FieldMetaData("names", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.EXPRS, new org.apache.thrift.meta_data.FieldMetaData("exprs", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DropPartitionsExpr.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RequestPartsSpec.class, metaDataMap); + } + + public RequestPartsSpec() { + super(); + } + + public RequestPartsSpec(_Fields setField, Object value) { + super(setField, value); + } + + public RequestPartsSpec(RequestPartsSpec other) { + super(other); + } + public RequestPartsSpec deepCopy() { + return new RequestPartsSpec(this); + } + + public static RequestPartsSpec names(List value) { + RequestPartsSpec x = new RequestPartsSpec(); + x.setNames(value); + return x; + } + + public static RequestPartsSpec exprs(List value) { + RequestPartsSpec x = new RequestPartsSpec(); + x.setExprs(value); + return x; + } + + + @Override + protected void checkType(_Fields setField, Object value) throws ClassCastException { + switch (setField) { + case NAMES: + if (value instanceof List) { + break; + } + throw new ClassCastException("Was expecting value of type List for field 'names', but got " + value.getClass().getSimpleName()); + case EXPRS: + if (value instanceof List) { + break; + } + throw new ClassCastException("Was expecting value of type List for field 'exprs', but got " + value.getClass().getSimpleName()); + default: + throw new IllegalArgumentException("Unknown field id " + setField); + } + } + + @Override + protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { + _Fields setField = _Fields.findByThriftId(field.id); + if (setField != null) { + switch (setField) { + case NAMES: + if (field.type == NAMES_FIELD_DESC.type) { + List names; + { + org.apache.thrift.protocol.TList _list468 = iprot.readListBegin(); + names = new ArrayList(_list468.size); + String _elem469; + for (int _i470 = 0; _i470 < _list468.size; ++_i470) + { + _elem469 = iprot.readString(); + names.add(_elem469); + } + iprot.readListEnd(); + } + return names; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case EXPRS: + if (field.type == EXPRS_FIELD_DESC.type) { + List exprs; + { + org.apache.thrift.protocol.TList _list471 = iprot.readListBegin(); + exprs = new ArrayList(_list471.size); + DropPartitionsExpr _elem472; + for (int _i473 = 0; _i473 < _list471.size; ++_i473) + { + _elem472 = new DropPartitionsExpr(); + _elem472.read(iprot); + exprs.add(_elem472); + } + iprot.readListEnd(); + } + return exprs; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + default: + throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + } + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + } + + @Override + protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + switch (setField_) { + case NAMES: + List names = (List)value_; + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, names.size())); + for (String _iter474 : names) + { + oprot.writeString(_iter474); + } + oprot.writeListEnd(); + } + return; + case EXPRS: + List exprs = (List)value_; + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, exprs.size())); + for (DropPartitionsExpr _iter475 : exprs) + { + _iter475.write(oprot); + } + oprot.writeListEnd(); + } + return; + default: + throw new IllegalStateException("Cannot write union with unknown field " + setField_); + } + } + + @Override + protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { + _Fields setField = _Fields.findByThriftId(fieldID); + if (setField != null) { + switch (setField) { + case NAMES: + List names; + { + org.apache.thrift.protocol.TList _list476 = iprot.readListBegin(); + names = new ArrayList(_list476.size); + String _elem477; + for (int _i478 = 0; _i478 < _list476.size; ++_i478) + { + _elem477 = iprot.readString(); + names.add(_elem477); + } + iprot.readListEnd(); + } + return names; + case EXPRS: + List exprs; + { + org.apache.thrift.protocol.TList _list479 = iprot.readListBegin(); + exprs = new ArrayList(_list479.size); + DropPartitionsExpr _elem480; + for (int _i481 = 0; _i481 < _list479.size; ++_i481) + { + _elem480 = new DropPartitionsExpr(); + _elem480.read(iprot); + exprs.add(_elem480); + } + iprot.readListEnd(); + } + return exprs; + default: + throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + } + } else { + throw new TProtocolException("Couldn't find a field with field id " + fieldID); + } + } + + @Override + protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + switch (setField_) { + case NAMES: + List names = (List)value_; + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, names.size())); + for (String _iter482 : names) + { + oprot.writeString(_iter482); + } + oprot.writeListEnd(); + } + return; + case EXPRS: + List exprs = (List)value_; + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, exprs.size())); + for (DropPartitionsExpr _iter483 : exprs) + { + _iter483.write(oprot); + } + oprot.writeListEnd(); + } + return; + default: + throw new IllegalStateException("Cannot write union with unknown field " + setField_); + } + } + + @Override + protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { + switch (setField) { + case NAMES: + return NAMES_FIELD_DESC; + case EXPRS: + return EXPRS_FIELD_DESC; + default: + throw new IllegalArgumentException("Unknown field id " + setField); + } + } + + @Override + protected org.apache.thrift.protocol.TStruct getStructDesc() { + return STRUCT_DESC; + } + + @Override + protected _Fields enumForId(short id) { + return _Fields.findByThriftIdOrThrow(id); + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + + public List getNames() { + if (getSetField() == _Fields.NAMES) { + return (List)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'names' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setNames(List value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.NAMES; + value_ = value; + } + + public List getExprs() { + if (getSetField() == _Fields.EXPRS) { + return (List)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'exprs' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setExprs(List value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.EXPRS; + value_ = value; + } + + public boolean isSetNames() { + return setField_ == _Fields.NAMES; + } + + + public boolean isSetExprs() { + return setField_ == _Fields.EXPRS; + } + + + public boolean equals(Object other) { + if (other instanceof RequestPartsSpec) { + return equals((RequestPartsSpec)other); + } else { + return false; + } + } + + public boolean equals(RequestPartsSpec other) { + return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); + } + + @Override + public int compareTo(RequestPartsSpec other) { + int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); + if (lastComparison == 0) { + return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); + } + return lastComparison; + } + + + @Override + public int hashCode() { + List list = new ArrayList(); + list.add(this.getClass().getName()); + org.apache.thrift.TFieldIdEnum setField = getSetField(); + if (setField != null) { + list.add(setField.getThriftFieldId()); + Object value = getFieldValue(); + if (value instanceof org.apache.thrift.TEnum) { + list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); + } else { + list.add(value); + } + } + return list.hashCode(); + } + 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); + } + } + + +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ResourceType.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ResourceType.java new file mode 100644 index 0000000..a15c1ee --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ResourceType.java @@ -0,0 +1,48 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum ResourceType implements org.apache.thrift.TEnum { + JAR(1), + FILE(2), + ARCHIVE(3); + + private final int value; + + private ResourceType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static ResourceType findByValue(int value) { + switch (value) { + case 1: + return JAR; + case 2: + return FILE; + case 3: + return ARCHIVE; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ResourceUri.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ResourceUri.java new file mode 100644 index 0000000..994a498 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ResourceUri.java @@ -0,0 +1,511 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ResourceUri implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ResourceUri"); + + private static final org.apache.thrift.protocol.TField RESOURCE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceType", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField URI_FIELD_DESC = new org.apache.thrift.protocol.TField("uri", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ResourceUriStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ResourceUriTupleSchemeFactory()); + } + + private ResourceType resourceType; // required + private String uri; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * + * @see ResourceType + */ + RESOURCE_TYPE((short)1, "resourceType"), + URI((short)2, "uri"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RESOURCE_TYPE + return RESOURCE_TYPE; + case 2: // URI + return URI; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RESOURCE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("resourceType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ResourceType.class))); + tmpMap.put(_Fields.URI, new org.apache.thrift.meta_data.FieldMetaData("uri", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ResourceUri.class, metaDataMap); + } + + public ResourceUri() { + } + + public ResourceUri( + ResourceType resourceType, + String uri) + { + this(); + this.resourceType = resourceType; + this.uri = uri; + } + + /** + * Performs a deep copy on other. + */ + public ResourceUri(ResourceUri other) { + if (other.isSetResourceType()) { + this.resourceType = other.resourceType; + } + if (other.isSetUri()) { + this.uri = other.uri; + } + } + + public ResourceUri deepCopy() { + return new ResourceUri(this); + } + + @Override + public void clear() { + this.resourceType = null; + this.uri = null; + } + + /** + * + * @see ResourceType + */ + public ResourceType getResourceType() { + return this.resourceType; + } + + /** + * + * @see ResourceType + */ + public void setResourceType(ResourceType resourceType) { + this.resourceType = resourceType; + } + + public void unsetResourceType() { + this.resourceType = null; + } + + /** Returns true if field resourceType is set (has been assigned a value) and false otherwise */ + public boolean isSetResourceType() { + return this.resourceType != null; + } + + public void setResourceTypeIsSet(boolean value) { + if (!value) { + this.resourceType = null; + } + } + + public String getUri() { + return this.uri; + } + + public void setUri(String uri) { + this.uri = uri; + } + + public void unsetUri() { + this.uri = null; + } + + /** Returns true if field uri is set (has been assigned a value) and false otherwise */ + public boolean isSetUri() { + return this.uri != null; + } + + public void setUriIsSet(boolean value) { + if (!value) { + this.uri = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RESOURCE_TYPE: + if (value == null) { + unsetResourceType(); + } else { + setResourceType((ResourceType)value); + } + break; + + case URI: + if (value == null) { + unsetUri(); + } else { + setUri((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RESOURCE_TYPE: + return getResourceType(); + + case URI: + return getUri(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RESOURCE_TYPE: + return isSetResourceType(); + case URI: + return isSetUri(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ResourceUri) + return this.equals((ResourceUri)that); + return false; + } + + public boolean equals(ResourceUri that) { + if (that == null) + return false; + + boolean this_present_resourceType = true && this.isSetResourceType(); + boolean that_present_resourceType = true && that.isSetResourceType(); + if (this_present_resourceType || that_present_resourceType) { + if (!(this_present_resourceType && that_present_resourceType)) + return false; + if (!this.resourceType.equals(that.resourceType)) + return false; + } + + boolean this_present_uri = true && this.isSetUri(); + boolean that_present_uri = true && that.isSetUri(); + if (this_present_uri || that_present_uri) { + if (!(this_present_uri && that_present_uri)) + return false; + if (!this.uri.equals(that.uri)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_resourceType = true && (isSetResourceType()); + list.add(present_resourceType); + if (present_resourceType) + list.add(resourceType.getValue()); + + boolean present_uri = true && (isSetUri()); + list.add(present_uri); + if (present_uri) + list.add(uri); + + return list.hashCode(); + } + + @Override + public int compareTo(ResourceUri other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetResourceType()).compareTo(other.isSetResourceType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetResourceType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceType, other.resourceType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUri()).compareTo(other.isSetUri()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUri()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uri, other.uri); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ResourceUri("); + boolean first = true; + + sb.append("resourceType:"); + if (this.resourceType == null) { + sb.append("null"); + } else { + sb.append(this.resourceType); + } + first = false; + if (!first) sb.append(", "); + sb.append("uri:"); + if (this.uri == null) { + sb.append("null"); + } else { + sb.append(this.uri); + } + 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 ResourceUriStandardSchemeFactory implements SchemeFactory { + public ResourceUriStandardScheme getScheme() { + return new ResourceUriStandardScheme(); + } + } + + private static class ResourceUriStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ResourceUri 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: // RESOURCE_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.resourceType = org.apache.hadoop.hive.metastore.api.ResourceType.findByValue(iprot.readI32()); + struct.setResourceTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // URI + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.uri = iprot.readString(); + struct.setUriIsSet(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, ResourceUri struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.resourceType != null) { + oprot.writeFieldBegin(RESOURCE_TYPE_FIELD_DESC); + oprot.writeI32(struct.resourceType.getValue()); + oprot.writeFieldEnd(); + } + if (struct.uri != null) { + oprot.writeFieldBegin(URI_FIELD_DESC); + oprot.writeString(struct.uri); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ResourceUriTupleSchemeFactory implements SchemeFactory { + public ResourceUriTupleScheme getScheme() { + return new ResourceUriTupleScheme(); + } + } + + private static class ResourceUriTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ResourceUri struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetResourceType()) { + optionals.set(0); + } + if (struct.isSetUri()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetResourceType()) { + oprot.writeI32(struct.resourceType.getValue()); + } + if (struct.isSetUri()) { + oprot.writeString(struct.uri); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ResourceUri struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.resourceType = org.apache.hadoop.hive.metastore.api.ResourceType.findByValue(iprot.readI32()); + struct.setResourceTypeIsSet(true); + } + if (incoming.get(1)) { + struct.uri = iprot.readString(); + struct.setUriIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java new file mode 100644 index 0000000..612c64d --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java @@ -0,0 +1,601 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class Role implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Role"); + + private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)1); + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ROLE_NAME((short)1, "roleName"), + CREATE_TIME((short)2, "createTime"), + OWNER_NAME((short)3, "ownerName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ROLE_NAME + return ROLE_NAME; + case 2: // CREATE_TIME + return CREATE_TIME; + case 3: // OWNER_NAME + return OWNER_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __CREATETIME_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.OWNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("ownerName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Role.class, metaDataMap); + } + + public Role() { + } + + public Role( + String roleName, + int createTime, + String ownerName) + { + this(); + this.roleName = roleName; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.ownerName = ownerName; + } + + /** + * Performs a deep copy on other. + */ + public Role(Role other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetRoleName()) { + this.roleName = other.roleName; + } + this.createTime = other.createTime; + if (other.isSetOwnerName()) { + this.ownerName = other.ownerName; + } + } + + public Role deepCopy() { + return new Role(this); + } + + @Override + public void clear() { + this.roleName = null; + setCreateTimeIsSet(false); + this.createTime = 0; + this.ownerName = null; + } + + public String getRoleName() { + return this.roleName; + } + + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + public void unsetRoleName() { + this.roleName = null; + } + + /** Returns true if field roleName is set (has been assigned a value) and false otherwise */ + public boolean isSetRoleName() { + return this.roleName != null; + } + + public void setRoleNameIsSet(boolean value) { + if (!value) { + this.roleName = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + public String getOwnerName() { + return this.ownerName; + } + + public void setOwnerName(String ownerName) { + this.ownerName = ownerName; + } + + public void unsetOwnerName() { + this.ownerName = null; + } + + /** Returns true if field ownerName is set (has been assigned a value) and false otherwise */ + public boolean isSetOwnerName() { + return this.ownerName != null; + } + + public void setOwnerNameIsSet(boolean value) { + if (!value) { + this.ownerName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROLE_NAME: + if (value == null) { + unsetRoleName(); + } else { + setRoleName((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case OWNER_NAME: + if (value == null) { + unsetOwnerName(); + } else { + setOwnerName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROLE_NAME: + return getRoleName(); + + case CREATE_TIME: + return getCreateTime(); + + case OWNER_NAME: + return getOwnerName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ROLE_NAME: + return isSetRoleName(); + case CREATE_TIME: + return isSetCreateTime(); + case OWNER_NAME: + return isSetOwnerName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Role) + return this.equals((Role)that); + return false; + } + + public boolean equals(Role that) { + if (that == null) + return false; + + boolean this_present_roleName = true && this.isSetRoleName(); + boolean that_present_roleName = true && that.isSetRoleName(); + if (this_present_roleName || that_present_roleName) { + if (!(this_present_roleName && that_present_roleName)) + return false; + if (!this.roleName.equals(that.roleName)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_ownerName = true && this.isSetOwnerName(); + boolean that_present_ownerName = true && that.isSetOwnerName(); + if (this_present_ownerName || that_present_ownerName) { + if (!(this_present_ownerName && that_present_ownerName)) + return false; + if (!this.ownerName.equals(that.ownerName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_roleName = true && (isSetRoleName()); + list.add(present_roleName); + if (present_roleName) + list.add(roleName); + + boolean present_createTime = true; + list.add(present_createTime); + if (present_createTime) + list.add(createTime); + + boolean present_ownerName = true && (isSetOwnerName()); + list.add(present_ownerName); + if (present_ownerName) + list.add(ownerName); + + return list.hashCode(); + } + + @Override + public int compareTo(Role other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRoleName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwnerName()).compareTo(other.isSetOwnerName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwnerName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerName, other.ownerName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Role("); + boolean first = true; + + sb.append("roleName:"); + if (this.roleName == null) { + sb.append("null"); + } else { + sb.append(this.roleName); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("ownerName:"); + if (this.ownerName == null) { + sb.append("null"); + } else { + sb.append(this.ownerName); + } + 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 { + // 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RolePrincipalGrant.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RolePrincipalGrant.java new file mode 100644 index 0000000..81e8d16 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RolePrincipalGrant.java @@ -0,0 +1,1035 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class RolePrincipalGrant implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RolePrincipalGrant"); + + private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principalName", 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("principalType", org.apache.thrift.protocol.TType.I32, (short)3); + 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)4); + private static final org.apache.thrift.protocol.TField GRANT_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("grantTime", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField GRANTOR_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("grantorName", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField GRANTOR_PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("grantorPrincipalType", org.apache.thrift.protocol.TType.I32, (short)7); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new RolePrincipalGrantStandardSchemeFactory()); + schemes.put(TupleScheme.class, new RolePrincipalGrantTupleSchemeFactory()); + } + + private String roleName; // required + private String principalName; // required + private PrincipalType principalType; // required + private boolean grantOption; // required + private int grantTime; // required + private String grantorName; // required + private PrincipalType grantorPrincipalType; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ROLE_NAME((short)1, "roleName"), + PRINCIPAL_NAME((short)2, "principalName"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)3, "principalType"), + GRANT_OPTION((short)4, "grantOption"), + GRANT_TIME((short)5, "grantTime"), + GRANTOR_NAME((short)6, "grantorName"), + /** + * + * @see PrincipalType + */ + GRANTOR_PRINCIPAL_TYPE((short)7, "grantorPrincipalType"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ROLE_NAME + return ROLE_NAME; + case 2: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 3: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; + case 4: // GRANT_OPTION + return GRANT_OPTION; + case 5: // GRANT_TIME + return GRANT_TIME; + case 6: // GRANTOR_NAME + return GRANTOR_NAME; + case 7: // GRANTOR_PRINCIPAL_TYPE + return GRANTOR_PRINCIPAL_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __GRANTOPTION_ISSET_ID = 0; + private static final int __GRANTTIME_ISSET_ID = 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); + tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principalName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principalType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("grantOption", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.GRANT_TIME, new org.apache.thrift.meta_data.FieldMetaData("grantTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.GRANTOR_NAME, new org.apache.thrift.meta_data.FieldMetaData("grantorName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GRANTOR_PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("grantorPrincipalType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RolePrincipalGrant.class, metaDataMap); + } + + public RolePrincipalGrant() { + } + + public RolePrincipalGrant( + String roleName, + String principalName, + PrincipalType principalType, + boolean grantOption, + int grantTime, + String grantorName, + PrincipalType grantorPrincipalType) + { + this(); + this.roleName = roleName; + this.principalName = principalName; + this.principalType = principalType; + this.grantOption = grantOption; + setGrantOptionIsSet(true); + this.grantTime = grantTime; + setGrantTimeIsSet(true); + this.grantorName = grantorName; + this.grantorPrincipalType = grantorPrincipalType; + } + + /** + * Performs a deep copy on other. + */ + public RolePrincipalGrant(RolePrincipalGrant other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetRoleName()) { + this.roleName = other.roleName; + } + if (other.isSetPrincipalName()) { + this.principalName = other.principalName; + } + if (other.isSetPrincipalType()) { + this.principalType = other.principalType; + } + this.grantOption = other.grantOption; + this.grantTime = other.grantTime; + if (other.isSetGrantorName()) { + this.grantorName = other.grantorName; + } + if (other.isSetGrantorPrincipalType()) { + this.grantorPrincipalType = other.grantorPrincipalType; + } + } + + public RolePrincipalGrant deepCopy() { + return new RolePrincipalGrant(this); + } + + @Override + public void clear() { + this.roleName = null; + this.principalName = null; + this.principalType = null; + setGrantOptionIsSet(false); + this.grantOption = false; + setGrantTimeIsSet(false); + this.grantTime = 0; + this.grantorName = null; + this.grantorPrincipalType = null; + } + + public String getRoleName() { + return this.roleName; + } + + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + public void unsetRoleName() { + this.roleName = null; + } + + /** Returns true if field roleName is set (has been assigned a value) and false otherwise */ + public boolean isSetRoleName() { + return this.roleName != null; + } + + public void setRoleNameIsSet(boolean value) { + if (!value) { + this.roleName = null; + } + } + + public String getPrincipalName() { + return this.principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public void unsetPrincipalName() { + this.principalName = null; + } + + /** Returns true if field principalName is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipalName() { + return this.principalName != null; + } + + public void setPrincipalNameIsSet(boolean value) { + if (!value) { + this.principalName = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipalType() { + return this.principalType; + } + + /** + * + * @see PrincipalType + */ + public void setPrincipalType(PrincipalType principalType) { + this.principalType = principalType; + } + + public void unsetPrincipalType() { + this.principalType = null; + } + + /** Returns true if field principalType is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipalType() { + return this.principalType != null; + } + + public void setPrincipalTypeIsSet(boolean value) { + if (!value) { + this.principalType = null; + } + } + + public boolean isGrantOption() { + return this.grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + setGrantOptionIsSet(true); + } + + public void unsetGrantOption() { + __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 EncodingUtils.testBit(__isset_bitfield, __GRANTOPTION_ISSET_ID); + } + + public void setGrantOptionIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANTOPTION_ISSET_ID, value); + } + + public int getGrantTime() { + return this.grantTime; + } + + public void setGrantTime(int grantTime) { + this.grantTime = grantTime; + setGrantTimeIsSet(true); + } + + public void unsetGrantTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GRANTTIME_ISSET_ID); + } + + /** Returns true if field grantTime is set (has been assigned a value) and false otherwise */ + public boolean isSetGrantTime() { + return EncodingUtils.testBit(__isset_bitfield, __GRANTTIME_ISSET_ID); + } + + public void setGrantTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANTTIME_ISSET_ID, value); + } + + public String getGrantorName() { + return this.grantorName; + } + + public void setGrantorName(String grantorName) { + this.grantorName = grantorName; + } + + public void unsetGrantorName() { + this.grantorName = null; + } + + /** Returns true if field grantorName is set (has been assigned a value) and false otherwise */ + public boolean isSetGrantorName() { + return this.grantorName != null; + } + + public void setGrantorNameIsSet(boolean value) { + if (!value) { + this.grantorName = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getGrantorPrincipalType() { + return this.grantorPrincipalType; + } + + /** + * + * @see PrincipalType + */ + public void setGrantorPrincipalType(PrincipalType grantorPrincipalType) { + this.grantorPrincipalType = grantorPrincipalType; + } + + public void unsetGrantorPrincipalType() { + this.grantorPrincipalType = null; + } + + /** Returns true if field grantorPrincipalType is set (has been assigned a value) and false otherwise */ + public boolean isSetGrantorPrincipalType() { + return this.grantorPrincipalType != null; + } + + public void setGrantorPrincipalTypeIsSet(boolean value) { + if (!value) { + this.grantorPrincipalType = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROLE_NAME: + if (value == null) { + unsetRoleName(); + } else { + setRoleName((String)value); + } + break; + + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipalName(); + } else { + setPrincipalName((String)value); + } + break; + + case PRINCIPAL_TYPE: + if (value == null) { + unsetPrincipalType(); + } else { + setPrincipalType((PrincipalType)value); + } + break; + + case GRANT_OPTION: + if (value == null) { + unsetGrantOption(); + } else { + setGrantOption((Boolean)value); + } + break; + + case GRANT_TIME: + if (value == null) { + unsetGrantTime(); + } else { + setGrantTime((Integer)value); + } + break; + + case GRANTOR_NAME: + if (value == null) { + unsetGrantorName(); + } else { + setGrantorName((String)value); + } + break; + + case GRANTOR_PRINCIPAL_TYPE: + if (value == null) { + unsetGrantorPrincipalType(); + } else { + setGrantorPrincipalType((PrincipalType)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROLE_NAME: + return getRoleName(); + + case PRINCIPAL_NAME: + return getPrincipalName(); + + case PRINCIPAL_TYPE: + return getPrincipalType(); + + case GRANT_OPTION: + return isGrantOption(); + + case GRANT_TIME: + return getGrantTime(); + + case GRANTOR_NAME: + return getGrantorName(); + + case GRANTOR_PRINCIPAL_TYPE: + return getGrantorPrincipalType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ROLE_NAME: + return isSetRoleName(); + case PRINCIPAL_NAME: + return isSetPrincipalName(); + case PRINCIPAL_TYPE: + return isSetPrincipalType(); + case GRANT_OPTION: + return isSetGrantOption(); + case GRANT_TIME: + return isSetGrantTime(); + case GRANTOR_NAME: + return isSetGrantorName(); + case GRANTOR_PRINCIPAL_TYPE: + return isSetGrantorPrincipalType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof RolePrincipalGrant) + return this.equals((RolePrincipalGrant)that); + return false; + } + + public boolean equals(RolePrincipalGrant that) { + if (that == null) + return false; + + boolean this_present_roleName = true && this.isSetRoleName(); + boolean that_present_roleName = true && that.isSetRoleName(); + if (this_present_roleName || that_present_roleName) { + if (!(this_present_roleName && that_present_roleName)) + return false; + if (!this.roleName.equals(that.roleName)) + return false; + } + + boolean this_present_principalName = true && this.isSetPrincipalName(); + boolean that_present_principalName = true && that.isSetPrincipalName(); + if (this_present_principalName || that_present_principalName) { + if (!(this_present_principalName && that_present_principalName)) + return false; + if (!this.principalName.equals(that.principalName)) + return false; + } + + boolean this_present_principalType = true && this.isSetPrincipalType(); + boolean that_present_principalType = true && that.isSetPrincipalType(); + if (this_present_principalType || that_present_principalType) { + if (!(this_present_principalType && that_present_principalType)) + return false; + if (!this.principalType.equals(that.principalType)) + return false; + } + + boolean this_present_grantOption = true; + boolean that_present_grantOption = true; + if (this_present_grantOption || that_present_grantOption) { + if (!(this_present_grantOption && that_present_grantOption)) + return false; + if (this.grantOption != that.grantOption) + return false; + } + + boolean this_present_grantTime = true; + boolean that_present_grantTime = true; + if (this_present_grantTime || that_present_grantTime) { + if (!(this_present_grantTime && that_present_grantTime)) + return false; + if (this.grantTime != that.grantTime) + return false; + } + + boolean this_present_grantorName = true && this.isSetGrantorName(); + boolean that_present_grantorName = true && that.isSetGrantorName(); + if (this_present_grantorName || that_present_grantorName) { + if (!(this_present_grantorName && that_present_grantorName)) + return false; + if (!this.grantorName.equals(that.grantorName)) + return false; + } + + boolean this_present_grantorPrincipalType = true && this.isSetGrantorPrincipalType(); + boolean that_present_grantorPrincipalType = true && that.isSetGrantorPrincipalType(); + if (this_present_grantorPrincipalType || that_present_grantorPrincipalType) { + if (!(this_present_grantorPrincipalType && that_present_grantorPrincipalType)) + return false; + if (!this.grantorPrincipalType.equals(that.grantorPrincipalType)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_roleName = true && (isSetRoleName()); + list.add(present_roleName); + if (present_roleName) + list.add(roleName); + + boolean present_principalName = true && (isSetPrincipalName()); + list.add(present_principalName); + if (present_principalName) + list.add(principalName); + + boolean present_principalType = true && (isSetPrincipalType()); + list.add(present_principalType); + if (present_principalType) + list.add(principalType.getValue()); + + boolean present_grantOption = true; + list.add(present_grantOption); + if (present_grantOption) + list.add(grantOption); + + boolean present_grantTime = true; + list.add(present_grantTime); + if (present_grantTime) + list.add(grantTime); + + boolean present_grantorName = true && (isSetGrantorName()); + list.add(present_grantorName); + if (present_grantorName) + list.add(grantorName); + + boolean present_grantorPrincipalType = true && (isSetGrantorPrincipalType()); + list.add(present_grantorPrincipalType); + if (present_grantorPrincipalType) + list.add(grantorPrincipalType.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(RolePrincipalGrant other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRoleName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipalName()).compareTo(other.isSetPrincipalName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalName, other.principalName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipalType()).compareTo(other.isSetPrincipalType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalType, other.principalType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantOption()).compareTo(other.isSetGrantOption()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantOption()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantOption, other.grantOption); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantTime()).compareTo(other.isSetGrantTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantTime, other.grantTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantorName()).compareTo(other.isSetGrantorName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantorName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorName, other.grantorName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantorPrincipalType()).compareTo(other.isSetGrantorPrincipalType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantorPrincipalType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorPrincipalType, other.grantorPrincipalType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("RolePrincipalGrant("); + boolean first = true; + + sb.append("roleName:"); + if (this.roleName == null) { + sb.append("null"); + } else { + sb.append(this.roleName); + } + first = false; + if (!first) sb.append(", "); + sb.append("principalName:"); + if (this.principalName == null) { + sb.append("null"); + } else { + sb.append(this.principalName); + } + first = false; + if (!first) sb.append(", "); + sb.append("principalType:"); + if (this.principalType == null) { + sb.append("null"); + } else { + sb.append(this.principalType); + } + first = false; + if (!first) sb.append(", "); + sb.append("grantOption:"); + sb.append(this.grantOption); + first = false; + if (!first) sb.append(", "); + sb.append("grantTime:"); + sb.append(this.grantTime); + first = false; + if (!first) sb.append(", "); + sb.append("grantorName:"); + if (this.grantorName == null) { + sb.append("null"); + } else { + sb.append(this.grantorName); + } + first = false; + if (!first) sb.append(", "); + sb.append("grantorPrincipalType:"); + if (this.grantorPrincipalType == null) { + sb.append("null"); + } else { + sb.append(this.grantorPrincipalType); + } + 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 { + // 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 RolePrincipalGrantStandardSchemeFactory implements SchemeFactory { + public RolePrincipalGrantStandardScheme getScheme() { + return new RolePrincipalGrantStandardScheme(); + } + } + + private static class RolePrincipalGrantStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, RolePrincipalGrant 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: // 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 = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipalTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // 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; + case 5: // GRANT_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.grantTime = iprot.readI32(); + struct.setGrantTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // GRANTOR_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.grantorName = iprot.readString(); + struct.setGrantorNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // GRANTOR_PRINCIPAL_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.grantorPrincipalType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorPrincipalTypeIsSet(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, RolePrincipalGrant 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(); + } + 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(); + } + oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); + oprot.writeBool(struct.grantOption); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(GRANT_TIME_FIELD_DESC); + oprot.writeI32(struct.grantTime); + oprot.writeFieldEnd(); + if (struct.grantorName != null) { + oprot.writeFieldBegin(GRANTOR_NAME_FIELD_DESC); + oprot.writeString(struct.grantorName); + oprot.writeFieldEnd(); + } + if (struct.grantorPrincipalType != null) { + oprot.writeFieldBegin(GRANTOR_PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(struct.grantorPrincipalType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class RolePrincipalGrantTupleSchemeFactory implements SchemeFactory { + public RolePrincipalGrantTupleScheme getScheme() { + return new RolePrincipalGrantTupleScheme(); + } + } + + private static class RolePrincipalGrantTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, RolePrincipalGrant struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRoleName()) { + optionals.set(0); + } + if (struct.isSetPrincipalName()) { + optionals.set(1); + } + if (struct.isSetPrincipalType()) { + optionals.set(2); + } + if (struct.isSetGrantOption()) { + optionals.set(3); + } + if (struct.isSetGrantTime()) { + optionals.set(4); + } + if (struct.isSetGrantorName()) { + optionals.set(5); + } + if (struct.isSetGrantorPrincipalType()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetRoleName()) { + oprot.writeString(struct.roleName); + } + if (struct.isSetPrincipalName()) { + oprot.writeString(struct.principalName); + } + if (struct.isSetPrincipalType()) { + oprot.writeI32(struct.principalType.getValue()); + } + if (struct.isSetGrantOption()) { + oprot.writeBool(struct.grantOption); + } + if (struct.isSetGrantTime()) { + oprot.writeI32(struct.grantTime); + } + if (struct.isSetGrantorName()) { + oprot.writeString(struct.grantorName); + } + if (struct.isSetGrantorPrincipalType()) { + oprot.writeI32(struct.grantorPrincipalType.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, RolePrincipalGrant struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.roleName = iprot.readString(); + struct.setRoleNameIsSet(true); + } + if (incoming.get(1)) { + struct.principalName = iprot.readString(); + struct.setPrincipalNameIsSet(true); + } + if (incoming.get(2)) { + struct.principalType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipalTypeIsSet(true); + } + if (incoming.get(3)) { + struct.grantOption = iprot.readBool(); + struct.setGrantOptionIsSet(true); + } + if (incoming.get(4)) { + struct.grantTime = iprot.readI32(); + struct.setGrantTimeIsSet(true); + } + if (incoming.get(5)) { + struct.grantorName = iprot.readString(); + struct.setGrantorNameIsSet(true); + } + if (incoming.get(6)) { + struct.grantorPrincipalType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setGrantorPrincipalTypeIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java new file mode 100644 index 0000000..44c5d72 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java @@ -0,0 +1,1715 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class SQLForeignKey implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SQLForeignKey"); + + private static final org.apache.thrift.protocol.TField PKTABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("pktable_db", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PKTABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pktable_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PKCOLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pkcolumn_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField FKTABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("fktable_db", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField FKTABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fktable_name", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField FKCOLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fkcolumn_name", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField KEY_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("key_seq", org.apache.thrift.protocol.TType.I32, (short)7); + private static final org.apache.thrift.protocol.TField UPDATE_RULE_FIELD_DESC = new org.apache.thrift.protocol.TField("update_rule", org.apache.thrift.protocol.TType.I32, (short)8); + private static final org.apache.thrift.protocol.TField DELETE_RULE_FIELD_DESC = new org.apache.thrift.protocol.TField("delete_rule", org.apache.thrift.protocol.TType.I32, (short)9); + private static final org.apache.thrift.protocol.TField FK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fk_name", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField PK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pk_name", org.apache.thrift.protocol.TType.STRING, (short)11); + private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)12); + private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)13); + private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)14); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SQLForeignKeyStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SQLForeignKeyTupleSchemeFactory()); + } + + private String pktable_db; // required + private String pktable_name; // required + private String pkcolumn_name; // required + private String fktable_db; // required + private String fktable_name; // required + private String fkcolumn_name; // required + private int key_seq; // required + private int update_rule; // required + private int delete_rule; // required + private String fk_name; // required + private String pk_name; // required + private boolean enable_cstr; // required + private boolean validate_cstr; // required + private boolean rely_cstr; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PKTABLE_DB((short)1, "pktable_db"), + PKTABLE_NAME((short)2, "pktable_name"), + PKCOLUMN_NAME((short)3, "pkcolumn_name"), + FKTABLE_DB((short)4, "fktable_db"), + FKTABLE_NAME((short)5, "fktable_name"), + FKCOLUMN_NAME((short)6, "fkcolumn_name"), + KEY_SEQ((short)7, "key_seq"), + UPDATE_RULE((short)8, "update_rule"), + DELETE_RULE((short)9, "delete_rule"), + FK_NAME((short)10, "fk_name"), + PK_NAME((short)11, "pk_name"), + ENABLE_CSTR((short)12, "enable_cstr"), + VALIDATE_CSTR((short)13, "validate_cstr"), + RELY_CSTR((short)14, "rely_cstr"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PKTABLE_DB + return PKTABLE_DB; + case 2: // PKTABLE_NAME + return PKTABLE_NAME; + case 3: // PKCOLUMN_NAME + return PKCOLUMN_NAME; + case 4: // FKTABLE_DB + return FKTABLE_DB; + case 5: // FKTABLE_NAME + return FKTABLE_NAME; + case 6: // FKCOLUMN_NAME + return FKCOLUMN_NAME; + case 7: // KEY_SEQ + return KEY_SEQ; + case 8: // UPDATE_RULE + return UPDATE_RULE; + case 9: // DELETE_RULE + return DELETE_RULE; + case 10: // FK_NAME + return FK_NAME; + case 11: // PK_NAME + return PK_NAME; + case 12: // ENABLE_CSTR + return ENABLE_CSTR; + case 13: // VALIDATE_CSTR + return VALIDATE_CSTR; + case 14: // RELY_CSTR + return RELY_CSTR; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __KEY_SEQ_ISSET_ID = 0; + private static final int __UPDATE_RULE_ISSET_ID = 1; + private static final int __DELETE_RULE_ISSET_ID = 2; + private static final int __ENABLE_CSTR_ISSET_ID = 3; + private static final int __VALIDATE_CSTR_ISSET_ID = 4; + private static final int __RELY_CSTR_ISSET_ID = 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); + tmpMap.put(_Fields.PKTABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("pktable_db", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PKTABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("pktable_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PKCOLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("pkcolumn_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FKTABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("fktable_db", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FKTABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("fktable_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FKCOLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("fkcolumn_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.KEY_SEQ, new org.apache.thrift.meta_data.FieldMetaData("key_seq", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.UPDATE_RULE, new org.apache.thrift.meta_data.FieldMetaData("update_rule", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.DELETE_RULE, new org.apache.thrift.meta_data.FieldMetaData("delete_rule", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.FK_NAME, new org.apache.thrift.meta_data.FieldMetaData("fk_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PK_NAME, new org.apache.thrift.meta_data.FieldMetaData("pk_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ENABLE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("enable_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.VALIDATE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("validate_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.RELY_CSTR, new org.apache.thrift.meta_data.FieldMetaData("rely_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SQLForeignKey.class, metaDataMap); + } + + public SQLForeignKey() { + } + + public SQLForeignKey( + String pktable_db, + String pktable_name, + String pkcolumn_name, + String fktable_db, + String fktable_name, + String fkcolumn_name, + int key_seq, + int update_rule, + int delete_rule, + String fk_name, + String pk_name, + boolean enable_cstr, + boolean validate_cstr, + boolean rely_cstr) + { + this(); + this.pktable_db = pktable_db; + this.pktable_name = pktable_name; + this.pkcolumn_name = pkcolumn_name; + this.fktable_db = fktable_db; + this.fktable_name = fktable_name; + this.fkcolumn_name = fkcolumn_name; + this.key_seq = key_seq; + setKey_seqIsSet(true); + this.update_rule = update_rule; + setUpdate_ruleIsSet(true); + this.delete_rule = delete_rule; + setDelete_ruleIsSet(true); + this.fk_name = fk_name; + this.pk_name = pk_name; + this.enable_cstr = enable_cstr; + setEnable_cstrIsSet(true); + this.validate_cstr = validate_cstr; + setValidate_cstrIsSet(true); + this.rely_cstr = rely_cstr; + setRely_cstrIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public SQLForeignKey(SQLForeignKey other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetPktable_db()) { + this.pktable_db = other.pktable_db; + } + if (other.isSetPktable_name()) { + this.pktable_name = other.pktable_name; + } + if (other.isSetPkcolumn_name()) { + this.pkcolumn_name = other.pkcolumn_name; + } + if (other.isSetFktable_db()) { + this.fktable_db = other.fktable_db; + } + if (other.isSetFktable_name()) { + this.fktable_name = other.fktable_name; + } + if (other.isSetFkcolumn_name()) { + this.fkcolumn_name = other.fkcolumn_name; + } + this.key_seq = other.key_seq; + this.update_rule = other.update_rule; + this.delete_rule = other.delete_rule; + if (other.isSetFk_name()) { + this.fk_name = other.fk_name; + } + if (other.isSetPk_name()) { + this.pk_name = other.pk_name; + } + this.enable_cstr = other.enable_cstr; + this.validate_cstr = other.validate_cstr; + this.rely_cstr = other.rely_cstr; + } + + public SQLForeignKey deepCopy() { + return new SQLForeignKey(this); + } + + @Override + public void clear() { + this.pktable_db = null; + this.pktable_name = null; + this.pkcolumn_name = null; + this.fktable_db = null; + this.fktable_name = null; + this.fkcolumn_name = null; + setKey_seqIsSet(false); + this.key_seq = 0; + setUpdate_ruleIsSet(false); + this.update_rule = 0; + setDelete_ruleIsSet(false); + this.delete_rule = 0; + this.fk_name = null; + this.pk_name = null; + setEnable_cstrIsSet(false); + this.enable_cstr = false; + setValidate_cstrIsSet(false); + this.validate_cstr = false; + setRely_cstrIsSet(false); + this.rely_cstr = false; + } + + public String getPktable_db() { + return this.pktable_db; + } + + public void setPktable_db(String pktable_db) { + this.pktable_db = pktable_db; + } + + public void unsetPktable_db() { + this.pktable_db = null; + } + + /** Returns true if field pktable_db is set (has been assigned a value) and false otherwise */ + public boolean isSetPktable_db() { + return this.pktable_db != null; + } + + public void setPktable_dbIsSet(boolean value) { + if (!value) { + this.pktable_db = null; + } + } + + public String getPktable_name() { + return this.pktable_name; + } + + public void setPktable_name(String pktable_name) { + this.pktable_name = pktable_name; + } + + public void unsetPktable_name() { + this.pktable_name = null; + } + + /** Returns true if field pktable_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPktable_name() { + return this.pktable_name != null; + } + + public void setPktable_nameIsSet(boolean value) { + if (!value) { + this.pktable_name = null; + } + } + + public String getPkcolumn_name() { + return this.pkcolumn_name; + } + + public void setPkcolumn_name(String pkcolumn_name) { + this.pkcolumn_name = pkcolumn_name; + } + + public void unsetPkcolumn_name() { + this.pkcolumn_name = null; + } + + /** Returns true if field pkcolumn_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPkcolumn_name() { + return this.pkcolumn_name != null; + } + + public void setPkcolumn_nameIsSet(boolean value) { + if (!value) { + this.pkcolumn_name = null; + } + } + + public String getFktable_db() { + return this.fktable_db; + } + + public void setFktable_db(String fktable_db) { + this.fktable_db = fktable_db; + } + + public void unsetFktable_db() { + this.fktable_db = null; + } + + /** Returns true if field fktable_db is set (has been assigned a value) and false otherwise */ + public boolean isSetFktable_db() { + return this.fktable_db != null; + } + + public void setFktable_dbIsSet(boolean value) { + if (!value) { + this.fktable_db = null; + } + } + + public String getFktable_name() { + return this.fktable_name; + } + + public void setFktable_name(String fktable_name) { + this.fktable_name = fktable_name; + } + + public void unsetFktable_name() { + this.fktable_name = null; + } + + /** Returns true if field fktable_name is set (has been assigned a value) and false otherwise */ + public boolean isSetFktable_name() { + return this.fktable_name != null; + } + + public void setFktable_nameIsSet(boolean value) { + if (!value) { + this.fktable_name = null; + } + } + + public String getFkcolumn_name() { + return this.fkcolumn_name; + } + + public void setFkcolumn_name(String fkcolumn_name) { + this.fkcolumn_name = fkcolumn_name; + } + + public void unsetFkcolumn_name() { + this.fkcolumn_name = null; + } + + /** Returns true if field fkcolumn_name is set (has been assigned a value) and false otherwise */ + public boolean isSetFkcolumn_name() { + return this.fkcolumn_name != null; + } + + public void setFkcolumn_nameIsSet(boolean value) { + if (!value) { + this.fkcolumn_name = null; + } + } + + public int getKey_seq() { + return this.key_seq; + } + + public void setKey_seq(int key_seq) { + this.key_seq = key_seq; + setKey_seqIsSet(true); + } + + public void unsetKey_seq() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); + } + + /** Returns true if field key_seq is set (has been assigned a value) and false otherwise */ + public boolean isSetKey_seq() { + return EncodingUtils.testBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); + } + + public void setKey_seqIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEY_SEQ_ISSET_ID, value); + } + + public int getUpdate_rule() { + return this.update_rule; + } + + public void setUpdate_rule(int update_rule) { + this.update_rule = update_rule; + setUpdate_ruleIsSet(true); + } + + public void unsetUpdate_rule() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATE_RULE_ISSET_ID); + } + + /** Returns true if field update_rule is set (has been assigned a value) and false otherwise */ + public boolean isSetUpdate_rule() { + return EncodingUtils.testBit(__isset_bitfield, __UPDATE_RULE_ISSET_ID); + } + + public void setUpdate_ruleIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATE_RULE_ISSET_ID, value); + } + + public int getDelete_rule() { + return this.delete_rule; + } + + public void setDelete_rule(int delete_rule) { + this.delete_rule = delete_rule; + setDelete_ruleIsSet(true); + } + + public void unsetDelete_rule() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETE_RULE_ISSET_ID); + } + + /** Returns true if field delete_rule is set (has been assigned a value) and false otherwise */ + public boolean isSetDelete_rule() { + return EncodingUtils.testBit(__isset_bitfield, __DELETE_RULE_ISSET_ID); + } + + public void setDelete_ruleIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETE_RULE_ISSET_ID, value); + } + + public String getFk_name() { + return this.fk_name; + } + + public void setFk_name(String fk_name) { + this.fk_name = fk_name; + } + + public void unsetFk_name() { + this.fk_name = null; + } + + /** Returns true if field fk_name is set (has been assigned a value) and false otherwise */ + public boolean isSetFk_name() { + return this.fk_name != null; + } + + public void setFk_nameIsSet(boolean value) { + if (!value) { + this.fk_name = null; + } + } + + public String getPk_name() { + return this.pk_name; + } + + public void setPk_name(String pk_name) { + this.pk_name = pk_name; + } + + public void unsetPk_name() { + this.pk_name = null; + } + + /** Returns true if field pk_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPk_name() { + return this.pk_name != null; + } + + public void setPk_nameIsSet(boolean value) { + if (!value) { + this.pk_name = null; + } + } + + public boolean isEnable_cstr() { + return this.enable_cstr; + } + + public void setEnable_cstr(boolean enable_cstr) { + this.enable_cstr = enable_cstr; + setEnable_cstrIsSet(true); + } + + public void unsetEnable_cstr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); + } + + /** Returns true if field enable_cstr is set (has been assigned a value) and false otherwise */ + public boolean isSetEnable_cstr() { + return EncodingUtils.testBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); + } + + public void setEnable_cstrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID, value); + } + + public boolean isValidate_cstr() { + return this.validate_cstr; + } + + public void setValidate_cstr(boolean validate_cstr) { + this.validate_cstr = validate_cstr; + setValidate_cstrIsSet(true); + } + + public void unsetValidate_cstr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); + } + + /** Returns true if field validate_cstr is set (has been assigned a value) and false otherwise */ + public boolean isSetValidate_cstr() { + return EncodingUtils.testBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); + } + + public void setValidate_cstrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID, value); + } + + public boolean isRely_cstr() { + return this.rely_cstr; + } + + public void setRely_cstr(boolean rely_cstr) { + this.rely_cstr = rely_cstr; + setRely_cstrIsSet(true); + } + + public void unsetRely_cstr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); + } + + /** Returns true if field rely_cstr is set (has been assigned a value) and false otherwise */ + public boolean isSetRely_cstr() { + return EncodingUtils.testBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); + } + + public void setRely_cstrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELY_CSTR_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PKTABLE_DB: + if (value == null) { + unsetPktable_db(); + } else { + setPktable_db((String)value); + } + break; + + case PKTABLE_NAME: + if (value == null) { + unsetPktable_name(); + } else { + setPktable_name((String)value); + } + break; + + case PKCOLUMN_NAME: + if (value == null) { + unsetPkcolumn_name(); + } else { + setPkcolumn_name((String)value); + } + break; + + case FKTABLE_DB: + if (value == null) { + unsetFktable_db(); + } else { + setFktable_db((String)value); + } + break; + + case FKTABLE_NAME: + if (value == null) { + unsetFktable_name(); + } else { + setFktable_name((String)value); + } + break; + + case FKCOLUMN_NAME: + if (value == null) { + unsetFkcolumn_name(); + } else { + setFkcolumn_name((String)value); + } + break; + + case KEY_SEQ: + if (value == null) { + unsetKey_seq(); + } else { + setKey_seq((Integer)value); + } + break; + + case UPDATE_RULE: + if (value == null) { + unsetUpdate_rule(); + } else { + setUpdate_rule((Integer)value); + } + break; + + case DELETE_RULE: + if (value == null) { + unsetDelete_rule(); + } else { + setDelete_rule((Integer)value); + } + break; + + case FK_NAME: + if (value == null) { + unsetFk_name(); + } else { + setFk_name((String)value); + } + break; + + case PK_NAME: + if (value == null) { + unsetPk_name(); + } else { + setPk_name((String)value); + } + break; + + case ENABLE_CSTR: + if (value == null) { + unsetEnable_cstr(); + } else { + setEnable_cstr((Boolean)value); + } + break; + + case VALIDATE_CSTR: + if (value == null) { + unsetValidate_cstr(); + } else { + setValidate_cstr((Boolean)value); + } + break; + + case RELY_CSTR: + if (value == null) { + unsetRely_cstr(); + } else { + setRely_cstr((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PKTABLE_DB: + return getPktable_db(); + + case PKTABLE_NAME: + return getPktable_name(); + + case PKCOLUMN_NAME: + return getPkcolumn_name(); + + case FKTABLE_DB: + return getFktable_db(); + + case FKTABLE_NAME: + return getFktable_name(); + + case FKCOLUMN_NAME: + return getFkcolumn_name(); + + case KEY_SEQ: + return getKey_seq(); + + case UPDATE_RULE: + return getUpdate_rule(); + + case DELETE_RULE: + return getDelete_rule(); + + case FK_NAME: + return getFk_name(); + + case PK_NAME: + return getPk_name(); + + case ENABLE_CSTR: + return isEnable_cstr(); + + case VALIDATE_CSTR: + return isValidate_cstr(); + + case RELY_CSTR: + return isRely_cstr(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PKTABLE_DB: + return isSetPktable_db(); + case PKTABLE_NAME: + return isSetPktable_name(); + case PKCOLUMN_NAME: + return isSetPkcolumn_name(); + case FKTABLE_DB: + return isSetFktable_db(); + case FKTABLE_NAME: + return isSetFktable_name(); + case FKCOLUMN_NAME: + return isSetFkcolumn_name(); + case KEY_SEQ: + return isSetKey_seq(); + case UPDATE_RULE: + return isSetUpdate_rule(); + case DELETE_RULE: + return isSetDelete_rule(); + case FK_NAME: + return isSetFk_name(); + case PK_NAME: + return isSetPk_name(); + case ENABLE_CSTR: + return isSetEnable_cstr(); + case VALIDATE_CSTR: + return isSetValidate_cstr(); + case RELY_CSTR: + return isSetRely_cstr(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SQLForeignKey) + return this.equals((SQLForeignKey)that); + return false; + } + + public boolean equals(SQLForeignKey that) { + if (that == null) + return false; + + boolean this_present_pktable_db = true && this.isSetPktable_db(); + boolean that_present_pktable_db = true && that.isSetPktable_db(); + if (this_present_pktable_db || that_present_pktable_db) { + if (!(this_present_pktable_db && that_present_pktable_db)) + return false; + if (!this.pktable_db.equals(that.pktable_db)) + return false; + } + + boolean this_present_pktable_name = true && this.isSetPktable_name(); + boolean that_present_pktable_name = true && that.isSetPktable_name(); + if (this_present_pktable_name || that_present_pktable_name) { + if (!(this_present_pktable_name && that_present_pktable_name)) + return false; + if (!this.pktable_name.equals(that.pktable_name)) + return false; + } + + boolean this_present_pkcolumn_name = true && this.isSetPkcolumn_name(); + boolean that_present_pkcolumn_name = true && that.isSetPkcolumn_name(); + if (this_present_pkcolumn_name || that_present_pkcolumn_name) { + if (!(this_present_pkcolumn_name && that_present_pkcolumn_name)) + return false; + if (!this.pkcolumn_name.equals(that.pkcolumn_name)) + return false; + } + + boolean this_present_fktable_db = true && this.isSetFktable_db(); + boolean that_present_fktable_db = true && that.isSetFktable_db(); + if (this_present_fktable_db || that_present_fktable_db) { + if (!(this_present_fktable_db && that_present_fktable_db)) + return false; + if (!this.fktable_db.equals(that.fktable_db)) + return false; + } + + boolean this_present_fktable_name = true && this.isSetFktable_name(); + boolean that_present_fktable_name = true && that.isSetFktable_name(); + if (this_present_fktable_name || that_present_fktable_name) { + if (!(this_present_fktable_name && that_present_fktable_name)) + return false; + if (!this.fktable_name.equals(that.fktable_name)) + return false; + } + + boolean this_present_fkcolumn_name = true && this.isSetFkcolumn_name(); + boolean that_present_fkcolumn_name = true && that.isSetFkcolumn_name(); + if (this_present_fkcolumn_name || that_present_fkcolumn_name) { + if (!(this_present_fkcolumn_name && that_present_fkcolumn_name)) + return false; + if (!this.fkcolumn_name.equals(that.fkcolumn_name)) + return false; + } + + boolean this_present_key_seq = true; + boolean that_present_key_seq = true; + if (this_present_key_seq || that_present_key_seq) { + if (!(this_present_key_seq && that_present_key_seq)) + return false; + if (this.key_seq != that.key_seq) + return false; + } + + boolean this_present_update_rule = true; + boolean that_present_update_rule = true; + if (this_present_update_rule || that_present_update_rule) { + if (!(this_present_update_rule && that_present_update_rule)) + return false; + if (this.update_rule != that.update_rule) + return false; + } + + boolean this_present_delete_rule = true; + boolean that_present_delete_rule = true; + if (this_present_delete_rule || that_present_delete_rule) { + if (!(this_present_delete_rule && that_present_delete_rule)) + return false; + if (this.delete_rule != that.delete_rule) + return false; + } + + boolean this_present_fk_name = true && this.isSetFk_name(); + boolean that_present_fk_name = true && that.isSetFk_name(); + if (this_present_fk_name || that_present_fk_name) { + if (!(this_present_fk_name && that_present_fk_name)) + return false; + if (!this.fk_name.equals(that.fk_name)) + return false; + } + + boolean this_present_pk_name = true && this.isSetPk_name(); + boolean that_present_pk_name = true && that.isSetPk_name(); + if (this_present_pk_name || that_present_pk_name) { + if (!(this_present_pk_name && that_present_pk_name)) + return false; + if (!this.pk_name.equals(that.pk_name)) + return false; + } + + boolean this_present_enable_cstr = true; + boolean that_present_enable_cstr = true; + if (this_present_enable_cstr || that_present_enable_cstr) { + if (!(this_present_enable_cstr && that_present_enable_cstr)) + return false; + if (this.enable_cstr != that.enable_cstr) + return false; + } + + boolean this_present_validate_cstr = true; + boolean that_present_validate_cstr = true; + if (this_present_validate_cstr || that_present_validate_cstr) { + if (!(this_present_validate_cstr && that_present_validate_cstr)) + return false; + if (this.validate_cstr != that.validate_cstr) + return false; + } + + boolean this_present_rely_cstr = true; + boolean that_present_rely_cstr = true; + if (this_present_rely_cstr || that_present_rely_cstr) { + if (!(this_present_rely_cstr && that_present_rely_cstr)) + return false; + if (this.rely_cstr != that.rely_cstr) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_pktable_db = true && (isSetPktable_db()); + list.add(present_pktable_db); + if (present_pktable_db) + list.add(pktable_db); + + boolean present_pktable_name = true && (isSetPktable_name()); + list.add(present_pktable_name); + if (present_pktable_name) + list.add(pktable_name); + + boolean present_pkcolumn_name = true && (isSetPkcolumn_name()); + list.add(present_pkcolumn_name); + if (present_pkcolumn_name) + list.add(pkcolumn_name); + + boolean present_fktable_db = true && (isSetFktable_db()); + list.add(present_fktable_db); + if (present_fktable_db) + list.add(fktable_db); + + boolean present_fktable_name = true && (isSetFktable_name()); + list.add(present_fktable_name); + if (present_fktable_name) + list.add(fktable_name); + + boolean present_fkcolumn_name = true && (isSetFkcolumn_name()); + list.add(present_fkcolumn_name); + if (present_fkcolumn_name) + list.add(fkcolumn_name); + + boolean present_key_seq = true; + list.add(present_key_seq); + if (present_key_seq) + list.add(key_seq); + + boolean present_update_rule = true; + list.add(present_update_rule); + if (present_update_rule) + list.add(update_rule); + + boolean present_delete_rule = true; + list.add(present_delete_rule); + if (present_delete_rule) + list.add(delete_rule); + + boolean present_fk_name = true && (isSetFk_name()); + list.add(present_fk_name); + if (present_fk_name) + list.add(fk_name); + + boolean present_pk_name = true && (isSetPk_name()); + list.add(present_pk_name); + if (present_pk_name) + list.add(pk_name); + + boolean present_enable_cstr = true; + list.add(present_enable_cstr); + if (present_enable_cstr) + list.add(enable_cstr); + + boolean present_validate_cstr = true; + list.add(present_validate_cstr); + if (present_validate_cstr) + list.add(validate_cstr); + + boolean present_rely_cstr = true; + list.add(present_rely_cstr); + if (present_rely_cstr) + list.add(rely_cstr); + + return list.hashCode(); + } + + @Override + public int compareTo(SQLForeignKey other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPktable_db()).compareTo(other.isSetPktable_db()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPktable_db()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pktable_db, other.pktable_db); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPktable_name()).compareTo(other.isSetPktable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPktable_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pktable_name, other.pktable_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPkcolumn_name()).compareTo(other.isSetPkcolumn_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPkcolumn_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pkcolumn_name, other.pkcolumn_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFktable_db()).compareTo(other.isSetFktable_db()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFktable_db()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fktable_db, other.fktable_db); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFktable_name()).compareTo(other.isSetFktable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFktable_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fktable_name, other.fktable_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFkcolumn_name()).compareTo(other.isSetFkcolumn_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFkcolumn_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fkcolumn_name, other.fkcolumn_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetKey_seq()).compareTo(other.isSetKey_seq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetKey_seq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_seq, other.key_seq); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUpdate_rule()).compareTo(other.isSetUpdate_rule()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUpdate_rule()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.update_rule, other.update_rule); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDelete_rule()).compareTo(other.isSetDelete_rule()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDelete_rule()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delete_rule, other.delete_rule); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFk_name()).compareTo(other.isSetFk_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFk_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fk_name, other.fk_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPk_name()).compareTo(other.isSetPk_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPk_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pk_name, other.pk_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnable_cstr()).compareTo(other.isSetEnable_cstr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnable_cstr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_cstr, other.enable_cstr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetValidate_cstr()).compareTo(other.isSetValidate_cstr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValidate_cstr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validate_cstr, other.validate_cstr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRely_cstr()).compareTo(other.isSetRely_cstr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRely_cstr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rely_cstr, other.rely_cstr); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("SQLForeignKey("); + boolean first = true; + + sb.append("pktable_db:"); + if (this.pktable_db == null) { + sb.append("null"); + } else { + sb.append(this.pktable_db); + } + first = false; + if (!first) sb.append(", "); + sb.append("pktable_name:"); + if (this.pktable_name == null) { + sb.append("null"); + } else { + sb.append(this.pktable_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("pkcolumn_name:"); + if (this.pkcolumn_name == null) { + sb.append("null"); + } else { + sb.append(this.pkcolumn_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("fktable_db:"); + if (this.fktable_db == null) { + sb.append("null"); + } else { + sb.append(this.fktable_db); + } + first = false; + if (!first) sb.append(", "); + sb.append("fktable_name:"); + if (this.fktable_name == null) { + sb.append("null"); + } else { + sb.append(this.fktable_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("fkcolumn_name:"); + if (this.fkcolumn_name == null) { + sb.append("null"); + } else { + sb.append(this.fkcolumn_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("key_seq:"); + sb.append(this.key_seq); + first = false; + if (!first) sb.append(", "); + sb.append("update_rule:"); + sb.append(this.update_rule); + first = false; + if (!first) sb.append(", "); + sb.append("delete_rule:"); + sb.append(this.delete_rule); + first = false; + if (!first) sb.append(", "); + sb.append("fk_name:"); + if (this.fk_name == null) { + sb.append("null"); + } else { + sb.append(this.fk_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("pk_name:"); + if (this.pk_name == null) { + sb.append("null"); + } else { + sb.append(this.pk_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("enable_cstr:"); + sb.append(this.enable_cstr); + first = false; + if (!first) sb.append(", "); + sb.append("validate_cstr:"); + sb.append(this.validate_cstr); + first = false; + if (!first) sb.append(", "); + sb.append("rely_cstr:"); + sb.append(this.rely_cstr); + 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 { + // 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 SQLForeignKeyStandardSchemeFactory implements SchemeFactory { + public SQLForeignKeyStandardScheme getScheme() { + return new SQLForeignKeyStandardScheme(); + } + } + + private static class SQLForeignKeyStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SQLForeignKey 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: // PKTABLE_DB + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.pktable_db = iprot.readString(); + struct.setPktable_dbIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PKTABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.pktable_name = iprot.readString(); + struct.setPktable_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PKCOLUMN_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.pkcolumn_name = iprot.readString(); + struct.setPkcolumn_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // FKTABLE_DB + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.fktable_db = iprot.readString(); + struct.setFktable_dbIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // FKTABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.fktable_name = iprot.readString(); + struct.setFktable_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // FKCOLUMN_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.fkcolumn_name = iprot.readString(); + struct.setFkcolumn_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // KEY_SEQ + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.key_seq = iprot.readI32(); + struct.setKey_seqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // UPDATE_RULE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.update_rule = iprot.readI32(); + struct.setUpdate_ruleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // DELETE_RULE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.delete_rule = iprot.readI32(); + struct.setDelete_ruleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // FK_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.fk_name = iprot.readString(); + struct.setFk_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // PK_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.pk_name = iprot.readString(); + struct.setPk_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // ENABLE_CSTR + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.enable_cstr = iprot.readBool(); + struct.setEnable_cstrIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // VALIDATE_CSTR + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.validate_cstr = iprot.readBool(); + struct.setValidate_cstrIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // RELY_CSTR + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.rely_cstr = iprot.readBool(); + struct.setRely_cstrIsSet(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, SQLForeignKey struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.pktable_db != null) { + oprot.writeFieldBegin(PKTABLE_DB_FIELD_DESC); + oprot.writeString(struct.pktable_db); + oprot.writeFieldEnd(); + } + if (struct.pktable_name != null) { + oprot.writeFieldBegin(PKTABLE_NAME_FIELD_DESC); + oprot.writeString(struct.pktable_name); + oprot.writeFieldEnd(); + } + if (struct.pkcolumn_name != null) { + oprot.writeFieldBegin(PKCOLUMN_NAME_FIELD_DESC); + oprot.writeString(struct.pkcolumn_name); + oprot.writeFieldEnd(); + } + if (struct.fktable_db != null) { + oprot.writeFieldBegin(FKTABLE_DB_FIELD_DESC); + oprot.writeString(struct.fktable_db); + oprot.writeFieldEnd(); + } + if (struct.fktable_name != null) { + oprot.writeFieldBegin(FKTABLE_NAME_FIELD_DESC); + oprot.writeString(struct.fktable_name); + oprot.writeFieldEnd(); + } + if (struct.fkcolumn_name != null) { + oprot.writeFieldBegin(FKCOLUMN_NAME_FIELD_DESC); + oprot.writeString(struct.fkcolumn_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(KEY_SEQ_FIELD_DESC); + oprot.writeI32(struct.key_seq); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(UPDATE_RULE_FIELD_DESC); + oprot.writeI32(struct.update_rule); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(DELETE_RULE_FIELD_DESC); + oprot.writeI32(struct.delete_rule); + oprot.writeFieldEnd(); + if (struct.fk_name != null) { + oprot.writeFieldBegin(FK_NAME_FIELD_DESC); + oprot.writeString(struct.fk_name); + oprot.writeFieldEnd(); + } + if (struct.pk_name != null) { + oprot.writeFieldBegin(PK_NAME_FIELD_DESC); + oprot.writeString(struct.pk_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ENABLE_CSTR_FIELD_DESC); + oprot.writeBool(struct.enable_cstr); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(VALIDATE_CSTR_FIELD_DESC); + oprot.writeBool(struct.validate_cstr); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(RELY_CSTR_FIELD_DESC); + oprot.writeBool(struct.rely_cstr); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SQLForeignKeyTupleSchemeFactory implements SchemeFactory { + public SQLForeignKeyTupleScheme getScheme() { + return new SQLForeignKeyTupleScheme(); + } + } + + private static class SQLForeignKeyTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SQLForeignKey struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPktable_db()) { + optionals.set(0); + } + if (struct.isSetPktable_name()) { + optionals.set(1); + } + if (struct.isSetPkcolumn_name()) { + optionals.set(2); + } + if (struct.isSetFktable_db()) { + optionals.set(3); + } + if (struct.isSetFktable_name()) { + optionals.set(4); + } + if (struct.isSetFkcolumn_name()) { + optionals.set(5); + } + if (struct.isSetKey_seq()) { + optionals.set(6); + } + if (struct.isSetUpdate_rule()) { + optionals.set(7); + } + if (struct.isSetDelete_rule()) { + optionals.set(8); + } + if (struct.isSetFk_name()) { + optionals.set(9); + } + if (struct.isSetPk_name()) { + optionals.set(10); + } + if (struct.isSetEnable_cstr()) { + optionals.set(11); + } + if (struct.isSetValidate_cstr()) { + optionals.set(12); + } + if (struct.isSetRely_cstr()) { + optionals.set(13); + } + oprot.writeBitSet(optionals, 14); + if (struct.isSetPktable_db()) { + oprot.writeString(struct.pktable_db); + } + if (struct.isSetPktable_name()) { + oprot.writeString(struct.pktable_name); + } + if (struct.isSetPkcolumn_name()) { + oprot.writeString(struct.pkcolumn_name); + } + if (struct.isSetFktable_db()) { + oprot.writeString(struct.fktable_db); + } + if (struct.isSetFktable_name()) { + oprot.writeString(struct.fktable_name); + } + if (struct.isSetFkcolumn_name()) { + oprot.writeString(struct.fkcolumn_name); + } + if (struct.isSetKey_seq()) { + oprot.writeI32(struct.key_seq); + } + if (struct.isSetUpdate_rule()) { + oprot.writeI32(struct.update_rule); + } + if (struct.isSetDelete_rule()) { + oprot.writeI32(struct.delete_rule); + } + if (struct.isSetFk_name()) { + oprot.writeString(struct.fk_name); + } + if (struct.isSetPk_name()) { + oprot.writeString(struct.pk_name); + } + if (struct.isSetEnable_cstr()) { + oprot.writeBool(struct.enable_cstr); + } + if (struct.isSetValidate_cstr()) { + oprot.writeBool(struct.validate_cstr); + } + if (struct.isSetRely_cstr()) { + oprot.writeBool(struct.rely_cstr); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SQLForeignKey struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(14); + if (incoming.get(0)) { + struct.pktable_db = iprot.readString(); + struct.setPktable_dbIsSet(true); + } + if (incoming.get(1)) { + struct.pktable_name = iprot.readString(); + struct.setPktable_nameIsSet(true); + } + if (incoming.get(2)) { + struct.pkcolumn_name = iprot.readString(); + struct.setPkcolumn_nameIsSet(true); + } + if (incoming.get(3)) { + struct.fktable_db = iprot.readString(); + struct.setFktable_dbIsSet(true); + } + if (incoming.get(4)) { + struct.fktable_name = iprot.readString(); + struct.setFktable_nameIsSet(true); + } + if (incoming.get(5)) { + struct.fkcolumn_name = iprot.readString(); + struct.setFkcolumn_nameIsSet(true); + } + if (incoming.get(6)) { + struct.key_seq = iprot.readI32(); + struct.setKey_seqIsSet(true); + } + if (incoming.get(7)) { + struct.update_rule = iprot.readI32(); + struct.setUpdate_ruleIsSet(true); + } + if (incoming.get(8)) { + struct.delete_rule = iprot.readI32(); + struct.setDelete_ruleIsSet(true); + } + if (incoming.get(9)) { + struct.fk_name = iprot.readString(); + struct.setFk_nameIsSet(true); + } + if (incoming.get(10)) { + struct.pk_name = iprot.readString(); + struct.setPk_nameIsSet(true); + } + if (incoming.get(11)) { + struct.enable_cstr = iprot.readBool(); + struct.setEnable_cstrIsSet(true); + } + if (incoming.get(12)) { + struct.validate_cstr = iprot.readBool(); + struct.setValidate_cstrIsSet(true); + } + if (incoming.get(13)) { + struct.rely_cstr = iprot.readBool(); + struct.setRely_cstrIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLNotNullConstraint.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLNotNullConstraint.java new file mode 100644 index 0000000..01dbc68 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLNotNullConstraint.java @@ -0,0 +1,1005 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class SQLNotNullConstraint implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SQLNotNullConstraint"); + + private static final org.apache.thrift.protocol.TField TABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("table_db", 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 org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField NN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("nn_name", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)5); + private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SQLNotNullConstraintStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SQLNotNullConstraintTupleSchemeFactory()); + } + + private String table_db; // required + private String table_name; // required + private String column_name; // required + private String nn_name; // required + private boolean enable_cstr; // required + private boolean validate_cstr; // required + private boolean rely_cstr; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE_DB((short)1, "table_db"), + TABLE_NAME((short)2, "table_name"), + COLUMN_NAME((short)3, "column_name"), + NN_NAME((short)4, "nn_name"), + ENABLE_CSTR((short)5, "enable_cstr"), + VALIDATE_CSTR((short)6, "validate_cstr"), + RELY_CSTR((short)7, "rely_cstr"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_DB + return TABLE_DB; + case 2: // TABLE_NAME + return TABLE_NAME; + case 3: // COLUMN_NAME + return COLUMN_NAME; + case 4: // NN_NAME + return NN_NAME; + case 5: // ENABLE_CSTR + return ENABLE_CSTR; + case 6: // VALIDATE_CSTR + return VALIDATE_CSTR; + case 7: // RELY_CSTR + return RELY_CSTR; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ENABLE_CSTR_ISSET_ID = 0; + private static final int __VALIDATE_CSTR_ISSET_ID = 1; + private static final int __RELY_CSTR_ISSET_ID = 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); + tmpMap.put(_Fields.TABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("table_db", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("column_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NN_NAME, new org.apache.thrift.meta_data.FieldMetaData("nn_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ENABLE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("enable_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.VALIDATE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("validate_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.RELY_CSTR, new org.apache.thrift.meta_data.FieldMetaData("rely_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SQLNotNullConstraint.class, metaDataMap); + } + + public SQLNotNullConstraint() { + } + + public SQLNotNullConstraint( + String table_db, + String table_name, + String column_name, + String nn_name, + boolean enable_cstr, + boolean validate_cstr, + boolean rely_cstr) + { + this(); + this.table_db = table_db; + this.table_name = table_name; + this.column_name = column_name; + this.nn_name = nn_name; + this.enable_cstr = enable_cstr; + setEnable_cstrIsSet(true); + this.validate_cstr = validate_cstr; + setValidate_cstrIsSet(true); + this.rely_cstr = rely_cstr; + setRely_cstrIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public SQLNotNullConstraint(SQLNotNullConstraint other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetTable_db()) { + this.table_db = other.table_db; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + if (other.isSetColumn_name()) { + this.column_name = other.column_name; + } + if (other.isSetNn_name()) { + this.nn_name = other.nn_name; + } + this.enable_cstr = other.enable_cstr; + this.validate_cstr = other.validate_cstr; + this.rely_cstr = other.rely_cstr; + } + + public SQLNotNullConstraint deepCopy() { + return new SQLNotNullConstraint(this); + } + + @Override + public void clear() { + this.table_db = null; + this.table_name = null; + this.column_name = null; + this.nn_name = null; + setEnable_cstrIsSet(false); + this.enable_cstr = false; + setValidate_cstrIsSet(false); + this.validate_cstr = false; + setRely_cstrIsSet(false); + this.rely_cstr = false; + } + + public String getTable_db() { + return this.table_db; + } + + public void setTable_db(String table_db) { + this.table_db = table_db; + } + + public void unsetTable_db() { + this.table_db = null; + } + + /** Returns true if field table_db is set (has been assigned a value) and false otherwise */ + public boolean isSetTable_db() { + return this.table_db != null; + } + + public void setTable_dbIsSet(boolean value) { + if (!value) { + this.table_db = null; + } + } + + public String getTable_name() { + return this.table_name; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; + } + + public void unsetTable_name() { + this.table_name = null; + } + + /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; + } + + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } + } + + public String getColumn_name() { + return this.column_name; + } + + public void setColumn_name(String column_name) { + this.column_name = column_name; + } + + public void unsetColumn_name() { + this.column_name = null; + } + + /** Returns true if field column_name is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn_name() { + return this.column_name != null; + } + + public void setColumn_nameIsSet(boolean value) { + if (!value) { + this.column_name = null; + } + } + + public String getNn_name() { + return this.nn_name; + } + + public void setNn_name(String nn_name) { + this.nn_name = nn_name; + } + + public void unsetNn_name() { + this.nn_name = null; + } + + /** Returns true if field nn_name is set (has been assigned a value) and false otherwise */ + public boolean isSetNn_name() { + return this.nn_name != null; + } + + public void setNn_nameIsSet(boolean value) { + if (!value) { + this.nn_name = null; + } + } + + public boolean isEnable_cstr() { + return this.enable_cstr; + } + + public void setEnable_cstr(boolean enable_cstr) { + this.enable_cstr = enable_cstr; + setEnable_cstrIsSet(true); + } + + public void unsetEnable_cstr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); + } + + /** Returns true if field enable_cstr is set (has been assigned a value) and false otherwise */ + public boolean isSetEnable_cstr() { + return EncodingUtils.testBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); + } + + public void setEnable_cstrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID, value); + } + + public boolean isValidate_cstr() { + return this.validate_cstr; + } + + public void setValidate_cstr(boolean validate_cstr) { + this.validate_cstr = validate_cstr; + setValidate_cstrIsSet(true); + } + + public void unsetValidate_cstr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); + } + + /** Returns true if field validate_cstr is set (has been assigned a value) and false otherwise */ + public boolean isSetValidate_cstr() { + return EncodingUtils.testBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); + } + + public void setValidate_cstrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID, value); + } + + public boolean isRely_cstr() { + return this.rely_cstr; + } + + public void setRely_cstr(boolean rely_cstr) { + this.rely_cstr = rely_cstr; + setRely_cstrIsSet(true); + } + + public void unsetRely_cstr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); + } + + /** Returns true if field rely_cstr is set (has been assigned a value) and false otherwise */ + public boolean isSetRely_cstr() { + return EncodingUtils.testBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); + } + + public void setRely_cstrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELY_CSTR_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_DB: + if (value == null) { + unsetTable_db(); + } else { + setTable_db((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + case COLUMN_NAME: + if (value == null) { + unsetColumn_name(); + } else { + setColumn_name((String)value); + } + break; + + case NN_NAME: + if (value == null) { + unsetNn_name(); + } else { + setNn_name((String)value); + } + break; + + case ENABLE_CSTR: + if (value == null) { + unsetEnable_cstr(); + } else { + setEnable_cstr((Boolean)value); + } + break; + + case VALIDATE_CSTR: + if (value == null) { + unsetValidate_cstr(); + } else { + setValidate_cstr((Boolean)value); + } + break; + + case RELY_CSTR: + if (value == null) { + unsetRely_cstr(); + } else { + setRely_cstr((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_DB: + return getTable_db(); + + case TABLE_NAME: + return getTable_name(); + + case COLUMN_NAME: + return getColumn_name(); + + case NN_NAME: + return getNn_name(); + + case ENABLE_CSTR: + return isEnable_cstr(); + + case VALIDATE_CSTR: + return isValidate_cstr(); + + case RELY_CSTR: + return isRely_cstr(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_DB: + return isSetTable_db(); + case TABLE_NAME: + return isSetTable_name(); + case COLUMN_NAME: + return isSetColumn_name(); + case NN_NAME: + return isSetNn_name(); + case ENABLE_CSTR: + return isSetEnable_cstr(); + case VALIDATE_CSTR: + return isSetValidate_cstr(); + case RELY_CSTR: + return isSetRely_cstr(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SQLNotNullConstraint) + return this.equals((SQLNotNullConstraint)that); + return false; + } + + public boolean equals(SQLNotNullConstraint that) { + if (that == null) + return false; + + boolean this_present_table_db = true && this.isSetTable_db(); + boolean that_present_table_db = true && that.isSetTable_db(); + if (this_present_table_db || that_present_table_db) { + if (!(this_present_table_db && that_present_table_db)) + return false; + if (!this.table_db.equals(that.table_db)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + boolean this_present_column_name = true && this.isSetColumn_name(); + boolean that_present_column_name = true && that.isSetColumn_name(); + if (this_present_column_name || that_present_column_name) { + if (!(this_present_column_name && that_present_column_name)) + return false; + if (!this.column_name.equals(that.column_name)) + return false; + } + + boolean this_present_nn_name = true && this.isSetNn_name(); + boolean that_present_nn_name = true && that.isSetNn_name(); + if (this_present_nn_name || that_present_nn_name) { + if (!(this_present_nn_name && that_present_nn_name)) + return false; + if (!this.nn_name.equals(that.nn_name)) + return false; + } + + boolean this_present_enable_cstr = true; + boolean that_present_enable_cstr = true; + if (this_present_enable_cstr || that_present_enable_cstr) { + if (!(this_present_enable_cstr && that_present_enable_cstr)) + return false; + if (this.enable_cstr != that.enable_cstr) + return false; + } + + boolean this_present_validate_cstr = true; + boolean that_present_validate_cstr = true; + if (this_present_validate_cstr || that_present_validate_cstr) { + if (!(this_present_validate_cstr && that_present_validate_cstr)) + return false; + if (this.validate_cstr != that.validate_cstr) + return false; + } + + boolean this_present_rely_cstr = true; + boolean that_present_rely_cstr = true; + if (this_present_rely_cstr || that_present_rely_cstr) { + if (!(this_present_rely_cstr && that_present_rely_cstr)) + return false; + if (this.rely_cstr != that.rely_cstr) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table_db = true && (isSetTable_db()); + list.add(present_table_db); + if (present_table_db) + list.add(table_db); + + boolean present_table_name = true && (isSetTable_name()); + list.add(present_table_name); + if (present_table_name) + list.add(table_name); + + boolean present_column_name = true && (isSetColumn_name()); + list.add(present_column_name); + if (present_column_name) + list.add(column_name); + + boolean present_nn_name = true && (isSetNn_name()); + list.add(present_nn_name); + if (present_nn_name) + list.add(nn_name); + + boolean present_enable_cstr = true; + list.add(present_enable_cstr); + if (present_enable_cstr) + list.add(enable_cstr); + + boolean present_validate_cstr = true; + list.add(present_validate_cstr); + if (present_validate_cstr) + list.add(validate_cstr); + + boolean present_rely_cstr = true; + list.add(present_rely_cstr); + if (present_rely_cstr) + list.add(rely_cstr); + + return list.hashCode(); + } + + @Override + public int compareTo(SQLNotNullConstraint other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable_db()).compareTo(other.isSetTable_db()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_db()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_db, other.table_db); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn_name()).compareTo(other.isSetColumn_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_name, other.column_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNn_name()).compareTo(other.isSetNn_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNn_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nn_name, other.nn_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnable_cstr()).compareTo(other.isSetEnable_cstr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnable_cstr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_cstr, other.enable_cstr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetValidate_cstr()).compareTo(other.isSetValidate_cstr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValidate_cstr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validate_cstr, other.validate_cstr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRely_cstr()).compareTo(other.isSetRely_cstr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRely_cstr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rely_cstr, other.rely_cstr); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("SQLNotNullConstraint("); + boolean first = true; + + sb.append("table_db:"); + if (this.table_db == null) { + sb.append("null"); + } else { + sb.append(this.table_db); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("column_name:"); + if (this.column_name == null) { + sb.append("null"); + } else { + sb.append(this.column_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("nn_name:"); + if (this.nn_name == null) { + sb.append("null"); + } else { + sb.append(this.nn_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("enable_cstr:"); + sb.append(this.enable_cstr); + first = false; + if (!first) sb.append(", "); + sb.append("validate_cstr:"); + sb.append(this.validate_cstr); + first = false; + if (!first) sb.append(", "); + sb.append("rely_cstr:"); + sb.append(this.rely_cstr); + 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 { + // 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 SQLNotNullConstraintStandardSchemeFactory implements SchemeFactory { + public SQLNotNullConstraintStandardScheme getScheme() { + return new SQLNotNullConstraintStandardScheme(); + } + } + + private static class SQLNotNullConstraintStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SQLNotNullConstraint 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_DB + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table_db = iprot.readString(); + struct.setTable_dbIsSet(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; + case 3: // COLUMN_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.column_name = iprot.readString(); + struct.setColumn_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NN_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.nn_name = iprot.readString(); + struct.setNn_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ENABLE_CSTR + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.enable_cstr = iprot.readBool(); + struct.setEnable_cstrIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // VALIDATE_CSTR + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.validate_cstr = iprot.readBool(); + struct.setValidate_cstrIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // RELY_CSTR + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.rely_cstr = iprot.readBool(); + struct.setRely_cstrIsSet(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, SQLNotNullConstraint struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table_db != null) { + oprot.writeFieldBegin(TABLE_DB_FIELD_DESC); + oprot.writeString(struct.table_db); + oprot.writeFieldEnd(); + } + if (struct.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.table_name); + oprot.writeFieldEnd(); + } + if (struct.column_name != null) { + oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); + oprot.writeString(struct.column_name); + oprot.writeFieldEnd(); + } + if (struct.nn_name != null) { + oprot.writeFieldBegin(NN_NAME_FIELD_DESC); + oprot.writeString(struct.nn_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ENABLE_CSTR_FIELD_DESC); + oprot.writeBool(struct.enable_cstr); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(VALIDATE_CSTR_FIELD_DESC); + oprot.writeBool(struct.validate_cstr); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(RELY_CSTR_FIELD_DESC); + oprot.writeBool(struct.rely_cstr); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SQLNotNullConstraintTupleSchemeFactory implements SchemeFactory { + public SQLNotNullConstraintTupleScheme getScheme() { + return new SQLNotNullConstraintTupleScheme(); + } + } + + private static class SQLNotNullConstraintTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SQLNotNullConstraint struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTable_db()) { + optionals.set(0); + } + if (struct.isSetTable_name()) { + optionals.set(1); + } + if (struct.isSetColumn_name()) { + optionals.set(2); + } + if (struct.isSetNn_name()) { + optionals.set(3); + } + if (struct.isSetEnable_cstr()) { + optionals.set(4); + } + if (struct.isSetValidate_cstr()) { + optionals.set(5); + } + if (struct.isSetRely_cstr()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetTable_db()) { + oprot.writeString(struct.table_db); + } + if (struct.isSetTable_name()) { + oprot.writeString(struct.table_name); + } + if (struct.isSetColumn_name()) { + oprot.writeString(struct.column_name); + } + if (struct.isSetNn_name()) { + oprot.writeString(struct.nn_name); + } + if (struct.isSetEnable_cstr()) { + oprot.writeBool(struct.enable_cstr); + } + if (struct.isSetValidate_cstr()) { + oprot.writeBool(struct.validate_cstr); + } + if (struct.isSetRely_cstr()) { + oprot.writeBool(struct.rely_cstr); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SQLNotNullConstraint struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.table_db = iprot.readString(); + struct.setTable_dbIsSet(true); + } + if (incoming.get(1)) { + struct.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } + if (incoming.get(2)) { + struct.column_name = iprot.readString(); + struct.setColumn_nameIsSet(true); + } + if (incoming.get(3)) { + struct.nn_name = iprot.readString(); + struct.setNn_nameIsSet(true); + } + if (incoming.get(4)) { + struct.enable_cstr = iprot.readBool(); + struct.setEnable_cstrIsSet(true); + } + if (incoming.get(5)) { + struct.validate_cstr = iprot.readBool(); + struct.setValidate_cstrIsSet(true); + } + if (incoming.get(6)) { + struct.rely_cstr = iprot.readBool(); + struct.setRely_cstrIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLPrimaryKey.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLPrimaryKey.java new file mode 100644 index 0000000..546528c --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLPrimaryKey.java @@ -0,0 +1,1103 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class SQLPrimaryKey implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SQLPrimaryKey"); + + private static final org.apache.thrift.protocol.TField TABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("table_db", 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 org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField KEY_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("key_seq", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField PK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pk_name", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)8); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SQLPrimaryKeyStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SQLPrimaryKeyTupleSchemeFactory()); + } + + private String table_db; // required + private String table_name; // required + private String column_name; // required + private int key_seq; // required + private String pk_name; // required + private boolean enable_cstr; // required + private boolean validate_cstr; // required + private boolean rely_cstr; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE_DB((short)1, "table_db"), + TABLE_NAME((short)2, "table_name"), + COLUMN_NAME((short)3, "column_name"), + KEY_SEQ((short)4, "key_seq"), + PK_NAME((short)5, "pk_name"), + ENABLE_CSTR((short)6, "enable_cstr"), + VALIDATE_CSTR((short)7, "validate_cstr"), + RELY_CSTR((short)8, "rely_cstr"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_DB + return TABLE_DB; + case 2: // TABLE_NAME + return TABLE_NAME; + case 3: // COLUMN_NAME + return COLUMN_NAME; + case 4: // KEY_SEQ + return KEY_SEQ; + case 5: // PK_NAME + return PK_NAME; + case 6: // ENABLE_CSTR + return ENABLE_CSTR; + case 7: // VALIDATE_CSTR + return VALIDATE_CSTR; + case 8: // RELY_CSTR + return RELY_CSTR; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __KEY_SEQ_ISSET_ID = 0; + private static final int __ENABLE_CSTR_ISSET_ID = 1; + private static final int __VALIDATE_CSTR_ISSET_ID = 2; + private static final int __RELY_CSTR_ISSET_ID = 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); + tmpMap.put(_Fields.TABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("table_db", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("column_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.KEY_SEQ, new org.apache.thrift.meta_data.FieldMetaData("key_seq", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.PK_NAME, new org.apache.thrift.meta_data.FieldMetaData("pk_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ENABLE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("enable_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.VALIDATE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("validate_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.RELY_CSTR, new org.apache.thrift.meta_data.FieldMetaData("rely_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SQLPrimaryKey.class, metaDataMap); + } + + public SQLPrimaryKey() { + } + + public SQLPrimaryKey( + String table_db, + String table_name, + String column_name, + int key_seq, + String pk_name, + boolean enable_cstr, + boolean validate_cstr, + boolean rely_cstr) + { + this(); + this.table_db = table_db; + this.table_name = table_name; + this.column_name = column_name; + this.key_seq = key_seq; + setKey_seqIsSet(true); + this.pk_name = pk_name; + this.enable_cstr = enable_cstr; + setEnable_cstrIsSet(true); + this.validate_cstr = validate_cstr; + setValidate_cstrIsSet(true); + this.rely_cstr = rely_cstr; + setRely_cstrIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public SQLPrimaryKey(SQLPrimaryKey other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetTable_db()) { + this.table_db = other.table_db; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + if (other.isSetColumn_name()) { + this.column_name = other.column_name; + } + this.key_seq = other.key_seq; + if (other.isSetPk_name()) { + this.pk_name = other.pk_name; + } + this.enable_cstr = other.enable_cstr; + this.validate_cstr = other.validate_cstr; + this.rely_cstr = other.rely_cstr; + } + + public SQLPrimaryKey deepCopy() { + return new SQLPrimaryKey(this); + } + + @Override + public void clear() { + this.table_db = null; + this.table_name = null; + this.column_name = null; + setKey_seqIsSet(false); + this.key_seq = 0; + this.pk_name = null; + setEnable_cstrIsSet(false); + this.enable_cstr = false; + setValidate_cstrIsSet(false); + this.validate_cstr = false; + setRely_cstrIsSet(false); + this.rely_cstr = false; + } + + public String getTable_db() { + return this.table_db; + } + + public void setTable_db(String table_db) { + this.table_db = table_db; + } + + public void unsetTable_db() { + this.table_db = null; + } + + /** Returns true if field table_db is set (has been assigned a value) and false otherwise */ + public boolean isSetTable_db() { + return this.table_db != null; + } + + public void setTable_dbIsSet(boolean value) { + if (!value) { + this.table_db = null; + } + } + + public String getTable_name() { + return this.table_name; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; + } + + public void unsetTable_name() { + this.table_name = null; + } + + /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; + } + + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } + } + + public String getColumn_name() { + return this.column_name; + } + + public void setColumn_name(String column_name) { + this.column_name = column_name; + } + + public void unsetColumn_name() { + this.column_name = null; + } + + /** Returns true if field column_name is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn_name() { + return this.column_name != null; + } + + public void setColumn_nameIsSet(boolean value) { + if (!value) { + this.column_name = null; + } + } + + public int getKey_seq() { + return this.key_seq; + } + + public void setKey_seq(int key_seq) { + this.key_seq = key_seq; + setKey_seqIsSet(true); + } + + public void unsetKey_seq() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); + } + + /** Returns true if field key_seq is set (has been assigned a value) and false otherwise */ + public boolean isSetKey_seq() { + return EncodingUtils.testBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); + } + + public void setKey_seqIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEY_SEQ_ISSET_ID, value); + } + + public String getPk_name() { + return this.pk_name; + } + + public void setPk_name(String pk_name) { + this.pk_name = pk_name; + } + + public void unsetPk_name() { + this.pk_name = null; + } + + /** Returns true if field pk_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPk_name() { + return this.pk_name != null; + } + + public void setPk_nameIsSet(boolean value) { + if (!value) { + this.pk_name = null; + } + } + + public boolean isEnable_cstr() { + return this.enable_cstr; + } + + public void setEnable_cstr(boolean enable_cstr) { + this.enable_cstr = enable_cstr; + setEnable_cstrIsSet(true); + } + + public void unsetEnable_cstr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); + } + + /** Returns true if field enable_cstr is set (has been assigned a value) and false otherwise */ + public boolean isSetEnable_cstr() { + return EncodingUtils.testBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); + } + + public void setEnable_cstrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID, value); + } + + public boolean isValidate_cstr() { + return this.validate_cstr; + } + + public void setValidate_cstr(boolean validate_cstr) { + this.validate_cstr = validate_cstr; + setValidate_cstrIsSet(true); + } + + public void unsetValidate_cstr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); + } + + /** Returns true if field validate_cstr is set (has been assigned a value) and false otherwise */ + public boolean isSetValidate_cstr() { + return EncodingUtils.testBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); + } + + public void setValidate_cstrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID, value); + } + + public boolean isRely_cstr() { + return this.rely_cstr; + } + + public void setRely_cstr(boolean rely_cstr) { + this.rely_cstr = rely_cstr; + setRely_cstrIsSet(true); + } + + public void unsetRely_cstr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); + } + + /** Returns true if field rely_cstr is set (has been assigned a value) and false otherwise */ + public boolean isSetRely_cstr() { + return EncodingUtils.testBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); + } + + public void setRely_cstrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELY_CSTR_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_DB: + if (value == null) { + unsetTable_db(); + } else { + setTable_db((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + case COLUMN_NAME: + if (value == null) { + unsetColumn_name(); + } else { + setColumn_name((String)value); + } + break; + + case KEY_SEQ: + if (value == null) { + unsetKey_seq(); + } else { + setKey_seq((Integer)value); + } + break; + + case PK_NAME: + if (value == null) { + unsetPk_name(); + } else { + setPk_name((String)value); + } + break; + + case ENABLE_CSTR: + if (value == null) { + unsetEnable_cstr(); + } else { + setEnable_cstr((Boolean)value); + } + break; + + case VALIDATE_CSTR: + if (value == null) { + unsetValidate_cstr(); + } else { + setValidate_cstr((Boolean)value); + } + break; + + case RELY_CSTR: + if (value == null) { + unsetRely_cstr(); + } else { + setRely_cstr((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_DB: + return getTable_db(); + + case TABLE_NAME: + return getTable_name(); + + case COLUMN_NAME: + return getColumn_name(); + + case KEY_SEQ: + return getKey_seq(); + + case PK_NAME: + return getPk_name(); + + case ENABLE_CSTR: + return isEnable_cstr(); + + case VALIDATE_CSTR: + return isValidate_cstr(); + + case RELY_CSTR: + return isRely_cstr(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_DB: + return isSetTable_db(); + case TABLE_NAME: + return isSetTable_name(); + case COLUMN_NAME: + return isSetColumn_name(); + case KEY_SEQ: + return isSetKey_seq(); + case PK_NAME: + return isSetPk_name(); + case ENABLE_CSTR: + return isSetEnable_cstr(); + case VALIDATE_CSTR: + return isSetValidate_cstr(); + case RELY_CSTR: + return isSetRely_cstr(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SQLPrimaryKey) + return this.equals((SQLPrimaryKey)that); + return false; + } + + public boolean equals(SQLPrimaryKey that) { + if (that == null) + return false; + + boolean this_present_table_db = true && this.isSetTable_db(); + boolean that_present_table_db = true && that.isSetTable_db(); + if (this_present_table_db || that_present_table_db) { + if (!(this_present_table_db && that_present_table_db)) + return false; + if (!this.table_db.equals(that.table_db)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + boolean this_present_column_name = true && this.isSetColumn_name(); + boolean that_present_column_name = true && that.isSetColumn_name(); + if (this_present_column_name || that_present_column_name) { + if (!(this_present_column_name && that_present_column_name)) + return false; + if (!this.column_name.equals(that.column_name)) + return false; + } + + boolean this_present_key_seq = true; + boolean that_present_key_seq = true; + if (this_present_key_seq || that_present_key_seq) { + if (!(this_present_key_seq && that_present_key_seq)) + return false; + if (this.key_seq != that.key_seq) + return false; + } + + boolean this_present_pk_name = true && this.isSetPk_name(); + boolean that_present_pk_name = true && that.isSetPk_name(); + if (this_present_pk_name || that_present_pk_name) { + if (!(this_present_pk_name && that_present_pk_name)) + return false; + if (!this.pk_name.equals(that.pk_name)) + return false; + } + + boolean this_present_enable_cstr = true; + boolean that_present_enable_cstr = true; + if (this_present_enable_cstr || that_present_enable_cstr) { + if (!(this_present_enable_cstr && that_present_enable_cstr)) + return false; + if (this.enable_cstr != that.enable_cstr) + return false; + } + + boolean this_present_validate_cstr = true; + boolean that_present_validate_cstr = true; + if (this_present_validate_cstr || that_present_validate_cstr) { + if (!(this_present_validate_cstr && that_present_validate_cstr)) + return false; + if (this.validate_cstr != that.validate_cstr) + return false; + } + + boolean this_present_rely_cstr = true; + boolean that_present_rely_cstr = true; + if (this_present_rely_cstr || that_present_rely_cstr) { + if (!(this_present_rely_cstr && that_present_rely_cstr)) + return false; + if (this.rely_cstr != that.rely_cstr) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table_db = true && (isSetTable_db()); + list.add(present_table_db); + if (present_table_db) + list.add(table_db); + + boolean present_table_name = true && (isSetTable_name()); + list.add(present_table_name); + if (present_table_name) + list.add(table_name); + + boolean present_column_name = true && (isSetColumn_name()); + list.add(present_column_name); + if (present_column_name) + list.add(column_name); + + boolean present_key_seq = true; + list.add(present_key_seq); + if (present_key_seq) + list.add(key_seq); + + boolean present_pk_name = true && (isSetPk_name()); + list.add(present_pk_name); + if (present_pk_name) + list.add(pk_name); + + boolean present_enable_cstr = true; + list.add(present_enable_cstr); + if (present_enable_cstr) + list.add(enable_cstr); + + boolean present_validate_cstr = true; + list.add(present_validate_cstr); + if (present_validate_cstr) + list.add(validate_cstr); + + boolean present_rely_cstr = true; + list.add(present_rely_cstr); + if (present_rely_cstr) + list.add(rely_cstr); + + return list.hashCode(); + } + + @Override + public int compareTo(SQLPrimaryKey other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable_db()).compareTo(other.isSetTable_db()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_db()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_db, other.table_db); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn_name()).compareTo(other.isSetColumn_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_name, other.column_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetKey_seq()).compareTo(other.isSetKey_seq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetKey_seq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_seq, other.key_seq); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPk_name()).compareTo(other.isSetPk_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPk_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pk_name, other.pk_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnable_cstr()).compareTo(other.isSetEnable_cstr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnable_cstr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_cstr, other.enable_cstr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetValidate_cstr()).compareTo(other.isSetValidate_cstr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValidate_cstr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validate_cstr, other.validate_cstr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRely_cstr()).compareTo(other.isSetRely_cstr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRely_cstr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rely_cstr, other.rely_cstr); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("SQLPrimaryKey("); + boolean first = true; + + sb.append("table_db:"); + if (this.table_db == null) { + sb.append("null"); + } else { + sb.append(this.table_db); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("column_name:"); + if (this.column_name == null) { + sb.append("null"); + } else { + sb.append(this.column_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("key_seq:"); + sb.append(this.key_seq); + first = false; + if (!first) sb.append(", "); + sb.append("pk_name:"); + if (this.pk_name == null) { + sb.append("null"); + } else { + sb.append(this.pk_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("enable_cstr:"); + sb.append(this.enable_cstr); + first = false; + if (!first) sb.append(", "); + sb.append("validate_cstr:"); + sb.append(this.validate_cstr); + first = false; + if (!first) sb.append(", "); + sb.append("rely_cstr:"); + sb.append(this.rely_cstr); + 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 { + // 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 SQLPrimaryKeyStandardSchemeFactory implements SchemeFactory { + public SQLPrimaryKeyStandardScheme getScheme() { + return new SQLPrimaryKeyStandardScheme(); + } + } + + private static class SQLPrimaryKeyStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SQLPrimaryKey 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_DB + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table_db = iprot.readString(); + struct.setTable_dbIsSet(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; + case 3: // COLUMN_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.column_name = iprot.readString(); + struct.setColumn_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // KEY_SEQ + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.key_seq = iprot.readI32(); + struct.setKey_seqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // PK_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.pk_name = iprot.readString(); + struct.setPk_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // ENABLE_CSTR + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.enable_cstr = iprot.readBool(); + struct.setEnable_cstrIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // VALIDATE_CSTR + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.validate_cstr = iprot.readBool(); + struct.setValidate_cstrIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // RELY_CSTR + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.rely_cstr = iprot.readBool(); + struct.setRely_cstrIsSet(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, SQLPrimaryKey struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table_db != null) { + oprot.writeFieldBegin(TABLE_DB_FIELD_DESC); + oprot.writeString(struct.table_db); + oprot.writeFieldEnd(); + } + if (struct.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.table_name); + oprot.writeFieldEnd(); + } + if (struct.column_name != null) { + oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); + oprot.writeString(struct.column_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(KEY_SEQ_FIELD_DESC); + oprot.writeI32(struct.key_seq); + oprot.writeFieldEnd(); + if (struct.pk_name != null) { + oprot.writeFieldBegin(PK_NAME_FIELD_DESC); + oprot.writeString(struct.pk_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ENABLE_CSTR_FIELD_DESC); + oprot.writeBool(struct.enable_cstr); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(VALIDATE_CSTR_FIELD_DESC); + oprot.writeBool(struct.validate_cstr); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(RELY_CSTR_FIELD_DESC); + oprot.writeBool(struct.rely_cstr); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SQLPrimaryKeyTupleSchemeFactory implements SchemeFactory { + public SQLPrimaryKeyTupleScheme getScheme() { + return new SQLPrimaryKeyTupleScheme(); + } + } + + private static class SQLPrimaryKeyTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SQLPrimaryKey struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTable_db()) { + optionals.set(0); + } + if (struct.isSetTable_name()) { + optionals.set(1); + } + if (struct.isSetColumn_name()) { + optionals.set(2); + } + if (struct.isSetKey_seq()) { + optionals.set(3); + } + if (struct.isSetPk_name()) { + optionals.set(4); + } + if (struct.isSetEnable_cstr()) { + optionals.set(5); + } + if (struct.isSetValidate_cstr()) { + optionals.set(6); + } + if (struct.isSetRely_cstr()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); + if (struct.isSetTable_db()) { + oprot.writeString(struct.table_db); + } + if (struct.isSetTable_name()) { + oprot.writeString(struct.table_name); + } + if (struct.isSetColumn_name()) { + oprot.writeString(struct.column_name); + } + if (struct.isSetKey_seq()) { + oprot.writeI32(struct.key_seq); + } + if (struct.isSetPk_name()) { + oprot.writeString(struct.pk_name); + } + if (struct.isSetEnable_cstr()) { + oprot.writeBool(struct.enable_cstr); + } + if (struct.isSetValidate_cstr()) { + oprot.writeBool(struct.validate_cstr); + } + if (struct.isSetRely_cstr()) { + oprot.writeBool(struct.rely_cstr); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SQLPrimaryKey struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(8); + if (incoming.get(0)) { + struct.table_db = iprot.readString(); + struct.setTable_dbIsSet(true); + } + if (incoming.get(1)) { + struct.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } + if (incoming.get(2)) { + struct.column_name = iprot.readString(); + struct.setColumn_nameIsSet(true); + } + if (incoming.get(3)) { + struct.key_seq = iprot.readI32(); + struct.setKey_seqIsSet(true); + } + if (incoming.get(4)) { + struct.pk_name = iprot.readString(); + struct.setPk_nameIsSet(true); + } + if (incoming.get(5)) { + struct.enable_cstr = iprot.readBool(); + struct.setEnable_cstrIsSet(true); + } + if (incoming.get(6)) { + struct.validate_cstr = iprot.readBool(); + struct.setValidate_cstrIsSet(true); + } + if (incoming.get(7)) { + struct.rely_cstr = iprot.readBool(); + struct.setRely_cstrIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLUniqueConstraint.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLUniqueConstraint.java new file mode 100644 index 0000000..5b78613 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLUniqueConstraint.java @@ -0,0 +1,1103 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class SQLUniqueConstraint implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SQLUniqueConstraint"); + + private static final org.apache.thrift.protocol.TField TABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("table_db", 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 org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField KEY_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("key_seq", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField UK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("uk_name", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)8); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SQLUniqueConstraintStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SQLUniqueConstraintTupleSchemeFactory()); + } + + private String table_db; // required + private String table_name; // required + private String column_name; // required + private int key_seq; // required + private String uk_name; // required + private boolean enable_cstr; // required + private boolean validate_cstr; // required + private boolean rely_cstr; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE_DB((short)1, "table_db"), + TABLE_NAME((short)2, "table_name"), + COLUMN_NAME((short)3, "column_name"), + KEY_SEQ((short)4, "key_seq"), + UK_NAME((short)5, "uk_name"), + ENABLE_CSTR((short)6, "enable_cstr"), + VALIDATE_CSTR((short)7, "validate_cstr"), + RELY_CSTR((short)8, "rely_cstr"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_DB + return TABLE_DB; + case 2: // TABLE_NAME + return TABLE_NAME; + case 3: // COLUMN_NAME + return COLUMN_NAME; + case 4: // KEY_SEQ + return KEY_SEQ; + case 5: // UK_NAME + return UK_NAME; + case 6: // ENABLE_CSTR + return ENABLE_CSTR; + case 7: // VALIDATE_CSTR + return VALIDATE_CSTR; + case 8: // RELY_CSTR + return RELY_CSTR; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __KEY_SEQ_ISSET_ID = 0; + private static final int __ENABLE_CSTR_ISSET_ID = 1; + private static final int __VALIDATE_CSTR_ISSET_ID = 2; + private static final int __RELY_CSTR_ISSET_ID = 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); + tmpMap.put(_Fields.TABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("table_db", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("column_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.KEY_SEQ, new org.apache.thrift.meta_data.FieldMetaData("key_seq", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.UK_NAME, new org.apache.thrift.meta_data.FieldMetaData("uk_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ENABLE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("enable_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.VALIDATE_CSTR, new org.apache.thrift.meta_data.FieldMetaData("validate_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.RELY_CSTR, new org.apache.thrift.meta_data.FieldMetaData("rely_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SQLUniqueConstraint.class, metaDataMap); + } + + public SQLUniqueConstraint() { + } + + public SQLUniqueConstraint( + String table_db, + String table_name, + String column_name, + int key_seq, + String uk_name, + boolean enable_cstr, + boolean validate_cstr, + boolean rely_cstr) + { + this(); + this.table_db = table_db; + this.table_name = table_name; + this.column_name = column_name; + this.key_seq = key_seq; + setKey_seqIsSet(true); + this.uk_name = uk_name; + this.enable_cstr = enable_cstr; + setEnable_cstrIsSet(true); + this.validate_cstr = validate_cstr; + setValidate_cstrIsSet(true); + this.rely_cstr = rely_cstr; + setRely_cstrIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public SQLUniqueConstraint(SQLUniqueConstraint other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetTable_db()) { + this.table_db = other.table_db; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + if (other.isSetColumn_name()) { + this.column_name = other.column_name; + } + this.key_seq = other.key_seq; + if (other.isSetUk_name()) { + this.uk_name = other.uk_name; + } + this.enable_cstr = other.enable_cstr; + this.validate_cstr = other.validate_cstr; + this.rely_cstr = other.rely_cstr; + } + + public SQLUniqueConstraint deepCopy() { + return new SQLUniqueConstraint(this); + } + + @Override + public void clear() { + this.table_db = null; + this.table_name = null; + this.column_name = null; + setKey_seqIsSet(false); + this.key_seq = 0; + this.uk_name = null; + setEnable_cstrIsSet(false); + this.enable_cstr = false; + setValidate_cstrIsSet(false); + this.validate_cstr = false; + setRely_cstrIsSet(false); + this.rely_cstr = false; + } + + public String getTable_db() { + return this.table_db; + } + + public void setTable_db(String table_db) { + this.table_db = table_db; + } + + public void unsetTable_db() { + this.table_db = null; + } + + /** Returns true if field table_db is set (has been assigned a value) and false otherwise */ + public boolean isSetTable_db() { + return this.table_db != null; + } + + public void setTable_dbIsSet(boolean value) { + if (!value) { + this.table_db = null; + } + } + + public String getTable_name() { + return this.table_name; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; + } + + public void unsetTable_name() { + this.table_name = null; + } + + /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; + } + + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } + } + + public String getColumn_name() { + return this.column_name; + } + + public void setColumn_name(String column_name) { + this.column_name = column_name; + } + + public void unsetColumn_name() { + this.column_name = null; + } + + /** Returns true if field column_name is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn_name() { + return this.column_name != null; + } + + public void setColumn_nameIsSet(boolean value) { + if (!value) { + this.column_name = null; + } + } + + public int getKey_seq() { + return this.key_seq; + } + + public void setKey_seq(int key_seq) { + this.key_seq = key_seq; + setKey_seqIsSet(true); + } + + public void unsetKey_seq() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); + } + + /** Returns true if field key_seq is set (has been assigned a value) and false otherwise */ + public boolean isSetKey_seq() { + return EncodingUtils.testBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); + } + + public void setKey_seqIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEY_SEQ_ISSET_ID, value); + } + + public String getUk_name() { + return this.uk_name; + } + + public void setUk_name(String uk_name) { + this.uk_name = uk_name; + } + + public void unsetUk_name() { + this.uk_name = null; + } + + /** Returns true if field uk_name is set (has been assigned a value) and false otherwise */ + public boolean isSetUk_name() { + return this.uk_name != null; + } + + public void setUk_nameIsSet(boolean value) { + if (!value) { + this.uk_name = null; + } + } + + public boolean isEnable_cstr() { + return this.enable_cstr; + } + + public void setEnable_cstr(boolean enable_cstr) { + this.enable_cstr = enable_cstr; + setEnable_cstrIsSet(true); + } + + public void unsetEnable_cstr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); + } + + /** Returns true if field enable_cstr is set (has been assigned a value) and false otherwise */ + public boolean isSetEnable_cstr() { + return EncodingUtils.testBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID); + } + + public void setEnable_cstrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID, value); + } + + public boolean isValidate_cstr() { + return this.validate_cstr; + } + + public void setValidate_cstr(boolean validate_cstr) { + this.validate_cstr = validate_cstr; + setValidate_cstrIsSet(true); + } + + public void unsetValidate_cstr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); + } + + /** Returns true if field validate_cstr is set (has been assigned a value) and false otherwise */ + public boolean isSetValidate_cstr() { + return EncodingUtils.testBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID); + } + + public void setValidate_cstrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATE_CSTR_ISSET_ID, value); + } + + public boolean isRely_cstr() { + return this.rely_cstr; + } + + public void setRely_cstr(boolean rely_cstr) { + this.rely_cstr = rely_cstr; + setRely_cstrIsSet(true); + } + + public void unsetRely_cstr() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); + } + + /** Returns true if field rely_cstr is set (has been assigned a value) and false otherwise */ + public boolean isSetRely_cstr() { + return EncodingUtils.testBit(__isset_bitfield, __RELY_CSTR_ISSET_ID); + } + + public void setRely_cstrIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELY_CSTR_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_DB: + if (value == null) { + unsetTable_db(); + } else { + setTable_db((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + case COLUMN_NAME: + if (value == null) { + unsetColumn_name(); + } else { + setColumn_name((String)value); + } + break; + + case KEY_SEQ: + if (value == null) { + unsetKey_seq(); + } else { + setKey_seq((Integer)value); + } + break; + + case UK_NAME: + if (value == null) { + unsetUk_name(); + } else { + setUk_name((String)value); + } + break; + + case ENABLE_CSTR: + if (value == null) { + unsetEnable_cstr(); + } else { + setEnable_cstr((Boolean)value); + } + break; + + case VALIDATE_CSTR: + if (value == null) { + unsetValidate_cstr(); + } else { + setValidate_cstr((Boolean)value); + } + break; + + case RELY_CSTR: + if (value == null) { + unsetRely_cstr(); + } else { + setRely_cstr((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_DB: + return getTable_db(); + + case TABLE_NAME: + return getTable_name(); + + case COLUMN_NAME: + return getColumn_name(); + + case KEY_SEQ: + return getKey_seq(); + + case UK_NAME: + return getUk_name(); + + case ENABLE_CSTR: + return isEnable_cstr(); + + case VALIDATE_CSTR: + return isValidate_cstr(); + + case RELY_CSTR: + return isRely_cstr(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_DB: + return isSetTable_db(); + case TABLE_NAME: + return isSetTable_name(); + case COLUMN_NAME: + return isSetColumn_name(); + case KEY_SEQ: + return isSetKey_seq(); + case UK_NAME: + return isSetUk_name(); + case ENABLE_CSTR: + return isSetEnable_cstr(); + case VALIDATE_CSTR: + return isSetValidate_cstr(); + case RELY_CSTR: + return isSetRely_cstr(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SQLUniqueConstraint) + return this.equals((SQLUniqueConstraint)that); + return false; + } + + public boolean equals(SQLUniqueConstraint that) { + if (that == null) + return false; + + boolean this_present_table_db = true && this.isSetTable_db(); + boolean that_present_table_db = true && that.isSetTable_db(); + if (this_present_table_db || that_present_table_db) { + if (!(this_present_table_db && that_present_table_db)) + return false; + if (!this.table_db.equals(that.table_db)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + boolean this_present_column_name = true && this.isSetColumn_name(); + boolean that_present_column_name = true && that.isSetColumn_name(); + if (this_present_column_name || that_present_column_name) { + if (!(this_present_column_name && that_present_column_name)) + return false; + if (!this.column_name.equals(that.column_name)) + return false; + } + + boolean this_present_key_seq = true; + boolean that_present_key_seq = true; + if (this_present_key_seq || that_present_key_seq) { + if (!(this_present_key_seq && that_present_key_seq)) + return false; + if (this.key_seq != that.key_seq) + return false; + } + + boolean this_present_uk_name = true && this.isSetUk_name(); + boolean that_present_uk_name = true && that.isSetUk_name(); + if (this_present_uk_name || that_present_uk_name) { + if (!(this_present_uk_name && that_present_uk_name)) + return false; + if (!this.uk_name.equals(that.uk_name)) + return false; + } + + boolean this_present_enable_cstr = true; + boolean that_present_enable_cstr = true; + if (this_present_enable_cstr || that_present_enable_cstr) { + if (!(this_present_enable_cstr && that_present_enable_cstr)) + return false; + if (this.enable_cstr != that.enable_cstr) + return false; + } + + boolean this_present_validate_cstr = true; + boolean that_present_validate_cstr = true; + if (this_present_validate_cstr || that_present_validate_cstr) { + if (!(this_present_validate_cstr && that_present_validate_cstr)) + return false; + if (this.validate_cstr != that.validate_cstr) + return false; + } + + boolean this_present_rely_cstr = true; + boolean that_present_rely_cstr = true; + if (this_present_rely_cstr || that_present_rely_cstr) { + if (!(this_present_rely_cstr && that_present_rely_cstr)) + return false; + if (this.rely_cstr != that.rely_cstr) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_table_db = true && (isSetTable_db()); + list.add(present_table_db); + if (present_table_db) + list.add(table_db); + + boolean present_table_name = true && (isSetTable_name()); + list.add(present_table_name); + if (present_table_name) + list.add(table_name); + + boolean present_column_name = true && (isSetColumn_name()); + list.add(present_column_name); + if (present_column_name) + list.add(column_name); + + boolean present_key_seq = true; + list.add(present_key_seq); + if (present_key_seq) + list.add(key_seq); + + boolean present_uk_name = true && (isSetUk_name()); + list.add(present_uk_name); + if (present_uk_name) + list.add(uk_name); + + boolean present_enable_cstr = true; + list.add(present_enable_cstr); + if (present_enable_cstr) + list.add(enable_cstr); + + boolean present_validate_cstr = true; + list.add(present_validate_cstr); + if (present_validate_cstr) + list.add(validate_cstr); + + boolean present_rely_cstr = true; + list.add(present_rely_cstr); + if (present_rely_cstr) + list.add(rely_cstr); + + return list.hashCode(); + } + + @Override + public int compareTo(SQLUniqueConstraint other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTable_db()).compareTo(other.isSetTable_db()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_db()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_db, other.table_db); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn_name()).compareTo(other.isSetColumn_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_name, other.column_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetKey_seq()).compareTo(other.isSetKey_seq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetKey_seq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_seq, other.key_seq); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUk_name()).compareTo(other.isSetUk_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUk_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uk_name, other.uk_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnable_cstr()).compareTo(other.isSetEnable_cstr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnable_cstr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_cstr, other.enable_cstr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetValidate_cstr()).compareTo(other.isSetValidate_cstr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValidate_cstr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validate_cstr, other.validate_cstr); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRely_cstr()).compareTo(other.isSetRely_cstr()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRely_cstr()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rely_cstr, other.rely_cstr); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("SQLUniqueConstraint("); + boolean first = true; + + sb.append("table_db:"); + if (this.table_db == null) { + sb.append("null"); + } else { + sb.append(this.table_db); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("column_name:"); + if (this.column_name == null) { + sb.append("null"); + } else { + sb.append(this.column_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("key_seq:"); + sb.append(this.key_seq); + first = false; + if (!first) sb.append(", "); + sb.append("uk_name:"); + if (this.uk_name == null) { + sb.append("null"); + } else { + sb.append(this.uk_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("enable_cstr:"); + sb.append(this.enable_cstr); + first = false; + if (!first) sb.append(", "); + sb.append("validate_cstr:"); + sb.append(this.validate_cstr); + first = false; + if (!first) sb.append(", "); + sb.append("rely_cstr:"); + sb.append(this.rely_cstr); + 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 { + // 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 SQLUniqueConstraintStandardSchemeFactory implements SchemeFactory { + public SQLUniqueConstraintStandardScheme getScheme() { + return new SQLUniqueConstraintStandardScheme(); + } + } + + private static class SQLUniqueConstraintStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SQLUniqueConstraint 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_DB + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table_db = iprot.readString(); + struct.setTable_dbIsSet(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; + case 3: // COLUMN_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.column_name = iprot.readString(); + struct.setColumn_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // KEY_SEQ + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.key_seq = iprot.readI32(); + struct.setKey_seqIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // UK_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.uk_name = iprot.readString(); + struct.setUk_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // ENABLE_CSTR + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.enable_cstr = iprot.readBool(); + struct.setEnable_cstrIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // VALIDATE_CSTR + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.validate_cstr = iprot.readBool(); + struct.setValidate_cstrIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // RELY_CSTR + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.rely_cstr = iprot.readBool(); + struct.setRely_cstrIsSet(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, SQLUniqueConstraint struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table_db != null) { + oprot.writeFieldBegin(TABLE_DB_FIELD_DESC); + oprot.writeString(struct.table_db); + oprot.writeFieldEnd(); + } + if (struct.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.table_name); + oprot.writeFieldEnd(); + } + if (struct.column_name != null) { + oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); + oprot.writeString(struct.column_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(KEY_SEQ_FIELD_DESC); + oprot.writeI32(struct.key_seq); + oprot.writeFieldEnd(); + if (struct.uk_name != null) { + oprot.writeFieldBegin(UK_NAME_FIELD_DESC); + oprot.writeString(struct.uk_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ENABLE_CSTR_FIELD_DESC); + oprot.writeBool(struct.enable_cstr); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(VALIDATE_CSTR_FIELD_DESC); + oprot.writeBool(struct.validate_cstr); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(RELY_CSTR_FIELD_DESC); + oprot.writeBool(struct.rely_cstr); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SQLUniqueConstraintTupleSchemeFactory implements SchemeFactory { + public SQLUniqueConstraintTupleScheme getScheme() { + return new SQLUniqueConstraintTupleScheme(); + } + } + + private static class SQLUniqueConstraintTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SQLUniqueConstraint struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTable_db()) { + optionals.set(0); + } + if (struct.isSetTable_name()) { + optionals.set(1); + } + if (struct.isSetColumn_name()) { + optionals.set(2); + } + if (struct.isSetKey_seq()) { + optionals.set(3); + } + if (struct.isSetUk_name()) { + optionals.set(4); + } + if (struct.isSetEnable_cstr()) { + optionals.set(5); + } + if (struct.isSetValidate_cstr()) { + optionals.set(6); + } + if (struct.isSetRely_cstr()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); + if (struct.isSetTable_db()) { + oprot.writeString(struct.table_db); + } + if (struct.isSetTable_name()) { + oprot.writeString(struct.table_name); + } + if (struct.isSetColumn_name()) { + oprot.writeString(struct.column_name); + } + if (struct.isSetKey_seq()) { + oprot.writeI32(struct.key_seq); + } + if (struct.isSetUk_name()) { + oprot.writeString(struct.uk_name); + } + if (struct.isSetEnable_cstr()) { + oprot.writeBool(struct.enable_cstr); + } + if (struct.isSetValidate_cstr()) { + oprot.writeBool(struct.validate_cstr); + } + if (struct.isSetRely_cstr()) { + oprot.writeBool(struct.rely_cstr); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SQLUniqueConstraint struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(8); + if (incoming.get(0)) { + struct.table_db = iprot.readString(); + struct.setTable_dbIsSet(true); + } + if (incoming.get(1)) { + struct.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } + if (incoming.get(2)) { + struct.column_name = iprot.readString(); + struct.setColumn_nameIsSet(true); + } + if (incoming.get(3)) { + struct.key_seq = iprot.readI32(); + struct.setKey_seqIsSet(true); + } + if (incoming.get(4)) { + struct.uk_name = iprot.readString(); + struct.setUk_nameIsSet(true); + } + if (incoming.get(5)) { + struct.enable_cstr = iprot.readBool(); + struct.setEnable_cstrIsSet(true); + } + if (incoming.get(6)) { + struct.validate_cstr = iprot.readBool(); + struct.setValidate_cstrIsSet(true); + } + if (incoming.get(7)) { + struct.rely_cstr = iprot.readBool(); + struct.setRely_cstrIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java new file mode 100644 index 0000000..75d0ebb --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java @@ -0,0 +1,605 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class Schema implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Schema"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + FIELD_SCHEMAS((short)1, "fieldSchemas"), + PROPERTIES((short)2, "properties"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FIELD_SCHEMAS + return FIELD_SCHEMAS; + case 2: // PROPERTIES + return PROPERTIES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.FIELD_SCHEMAS, new org.apache.thrift.meta_data.FieldMetaData("fieldSchemas", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); + tmpMap.put(_Fields.PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("properties", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Schema.class, metaDataMap); + } + + public Schema() { + } + + public Schema( + List fieldSchemas, + Map properties) + { + this(); + this.fieldSchemas = fieldSchemas; + this.properties = properties; + } + + /** + * Performs a deep copy on other. + */ + public Schema(Schema other) { + if (other.isSetFieldSchemas()) { + List __this__fieldSchemas = new ArrayList(other.fieldSchemas.size()); + for (FieldSchema other_element : other.fieldSchemas) { + __this__fieldSchemas.add(new FieldSchema(other_element)); + } + this.fieldSchemas = __this__fieldSchemas; + } + if (other.isSetProperties()) { + Map __this__properties = new HashMap(other.properties); + this.properties = __this__properties; + } + } + + public Schema deepCopy() { + return new Schema(this); + } + + @Override + public void clear() { + this.fieldSchemas = null; + this.properties = null; + } + + public int getFieldSchemasSize() { + return (this.fieldSchemas == null) ? 0 : this.fieldSchemas.size(); + } + + public java.util.Iterator getFieldSchemasIterator() { + return (this.fieldSchemas == null) ? null : this.fieldSchemas.iterator(); + } + + public void addToFieldSchemas(FieldSchema elem) { + if (this.fieldSchemas == null) { + this.fieldSchemas = new ArrayList(); + } + this.fieldSchemas.add(elem); + } + + public List getFieldSchemas() { + return this.fieldSchemas; + } + + public void setFieldSchemas(List fieldSchemas) { + this.fieldSchemas = fieldSchemas; + } + + public void unsetFieldSchemas() { + this.fieldSchemas = null; + } + + /** Returns true if field fieldSchemas is set (has been assigned a value) and false otherwise */ + public boolean isSetFieldSchemas() { + return this.fieldSchemas != null; + } + + public void setFieldSchemasIsSet(boolean value) { + if (!value) { + this.fieldSchemas = null; + } + } + + public int getPropertiesSize() { + return (this.properties == null) ? 0 : this.properties.size(); + } + + public void putToProperties(String key, String val) { + if (this.properties == null) { + this.properties = new HashMap(); + } + this.properties.put(key, val); + } + + public Map getProperties() { + return this.properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + + public void unsetProperties() { + this.properties = null; + } + + /** Returns true if field properties is set (has been assigned a value) and false otherwise */ + public boolean isSetProperties() { + return this.properties != null; + } + + public void setPropertiesIsSet(boolean value) { + if (!value) { + this.properties = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FIELD_SCHEMAS: + if (value == null) { + unsetFieldSchemas(); + } else { + setFieldSchemas((List)value); + } + break; + + case PROPERTIES: + if (value == null) { + unsetProperties(); + } else { + setProperties((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FIELD_SCHEMAS: + return getFieldSchemas(); + + case PROPERTIES: + return getProperties(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FIELD_SCHEMAS: + return isSetFieldSchemas(); + case PROPERTIES: + return isSetProperties(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Schema) + return this.equals((Schema)that); + return false; + } + + public boolean equals(Schema that) { + if (that == null) + return false; + + boolean this_present_fieldSchemas = true && this.isSetFieldSchemas(); + boolean that_present_fieldSchemas = true && that.isSetFieldSchemas(); + if (this_present_fieldSchemas || that_present_fieldSchemas) { + if (!(this_present_fieldSchemas && that_present_fieldSchemas)) + return false; + if (!this.fieldSchemas.equals(that.fieldSchemas)) + return false; + } + + boolean this_present_properties = true && this.isSetProperties(); + boolean that_present_properties = true && that.isSetProperties(); + if (this_present_properties || that_present_properties) { + if (!(this_present_properties && that_present_properties)) + return false; + if (!this.properties.equals(that.properties)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_fieldSchemas = true && (isSetFieldSchemas()); + list.add(present_fieldSchemas); + if (present_fieldSchemas) + list.add(fieldSchemas); + + boolean present_properties = true && (isSetProperties()); + list.add(present_properties); + if (present_properties) + list.add(properties); + + return list.hashCode(); + } + + @Override + public int compareTo(Schema other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetFieldSchemas()).compareTo(other.isSetFieldSchemas()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFieldSchemas()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fieldSchemas, other.fieldSchemas); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetProperties()).compareTo(other.isSetProperties()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetProperties()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.properties, other.properties); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Schema("); + boolean first = true; + + sb.append("fieldSchemas:"); + if (this.fieldSchemas == null) { + sb.append("null"); + } else { + sb.append(this.fieldSchemas); + } + first = false; + if (!first) sb.append(", "); + sb.append("properties:"); + if (this.properties == null) { + sb.append("null"); + } else { + sb.append(this.properties); + } + 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 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 _list294 = iprot.readListBegin(); + struct.fieldSchemas = new ArrayList(_list294.size); + FieldSchema _elem295; + for (int _i296 = 0; _i296 < _list294.size; ++_i296) + { + _elem295 = new FieldSchema(); + _elem295.read(iprot); + struct.fieldSchemas.add(_elem295); + } + 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 _map297 = iprot.readMapBegin(); + struct.properties = new HashMap(2*_map297.size); + String _key298; + String _val299; + for (int _i300 = 0; _i300 < _map297.size; ++_i300) + { + _key298 = iprot.readString(); + _val299 = iprot.readString(); + struct.properties.put(_key298, _val299); + } + 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 _iter301 : struct.fieldSchemas) + { + _iter301.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 _iter302 : struct.properties.entrySet()) + { + oprot.writeString(_iter302.getKey()); + oprot.writeString(_iter302.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 _iter303 : struct.fieldSchemas) + { + _iter303.write(oprot); + } + } + } + if (struct.isSetProperties()) { + { + oprot.writeI32(struct.properties.size()); + for (Map.Entry _iter304 : struct.properties.entrySet()) + { + oprot.writeString(_iter304.getKey()); + oprot.writeString(_iter304.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 _list305 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.fieldSchemas = new ArrayList(_list305.size); + FieldSchema _elem306; + for (int _i307 = 0; _i307 < _list305.size; ++_i307) + { + _elem306 = new FieldSchema(); + _elem306.read(iprot); + struct.fieldSchemas.add(_elem306); + } + } + struct.setFieldSchemasIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TMap _map308 = 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*_map308.size); + String _key309; + String _val310; + for (int _i311 = 0; _i311 < _map308.size; ++_i311) + { + _key309 = iprot.readString(); + _val310 = iprot.readString(); + struct.properties.put(_key309, _val310); + } + } + struct.setPropertiesIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java new file mode 100644 index 0000000..986e0a2 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java @@ -0,0 +1,655 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class SerDeInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SerDeInfo"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"), + SERIALIZATION_LIB((short)2, "serializationLib"), + PARAMETERS((short)3, "parameters"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + case 2: // SERIALIZATION_LIB + return SERIALIZATION_LIB; + case 3: // PARAMETERS + return PARAMETERS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SERIALIZATION_LIB, new org.apache.thrift.meta_data.FieldMetaData("serializationLib", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SerDeInfo.class, metaDataMap); + } + + public SerDeInfo() { + } + + public SerDeInfo( + String name, + String serializationLib, + Map parameters) + { + this(); + this.name = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(name); + this.serializationLib = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(serializationLib); + this.parameters = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(parameters); + } + + /** + * Performs a deep copy on other. + */ + public SerDeInfo(SerDeInfo other) { + if (other.isSetName()) { + this.name = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.name); + } + if (other.isSetSerializationLib()) { + this.serializationLib = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.serializationLib); + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(other.parameters); + this.parameters = __this__parameters; + } + } + + public SerDeInfo deepCopy() { + return new SerDeInfo(this); + } + + @Override + public void clear() { + this.name = null; + this.serializationLib = null; + this.parameters = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(name); + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public String getSerializationLib() { + return this.serializationLib; + } + + public void setSerializationLib(String serializationLib) { + this.serializationLib = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(serializationLib); + } + + public void unsetSerializationLib() { + this.serializationLib = null; + } + + /** Returns true if field serializationLib is set (has been assigned a value) and false otherwise */ + public boolean isSetSerializationLib() { + return this.serializationLib != null; + } + + public void setSerializationLibIsSet(boolean value) { + if (!value) { + this.serializationLib = null; + } + } + + public int getParametersSize() { + return (this.parameters == null) ? 0 : this.parameters.size(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(parameters); + } + + public void unsetParameters() { + this.parameters = null; + } + + /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ + public boolean isSetParameters() { + return this.parameters != null; + } + + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case SERIALIZATION_LIB: + if (value == null) { + unsetSerializationLib(); + } else { + setSerializationLib((String)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case SERIALIZATION_LIB: + return getSerializationLib(); + + case PARAMETERS: + return getParameters(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case SERIALIZATION_LIB: + return isSetSerializationLib(); + case PARAMETERS: + return isSetParameters(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SerDeInfo) + return this.equals((SerDeInfo)that); + return false; + } + + public boolean equals(SerDeInfo that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_serializationLib = true && this.isSetSerializationLib(); + boolean that_present_serializationLib = true && that.isSetSerializationLib(); + if (this_present_serializationLib || that_present_serializationLib) { + if (!(this_present_serializationLib && that_present_serializationLib)) + return false; + if (!this.serializationLib.equals(that.serializationLib)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + boolean present_serializationLib = true && (isSetSerializationLib()); + list.add(present_serializationLib); + if (present_serializationLib) + list.add(serializationLib); + + boolean present_parameters = true && (isSetParameters()); + list.add(present_parameters); + if (present_parameters) + list.add(parameters); + + return list.hashCode(); + } + + @Override + public int compareTo(SerDeInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSerializationLib()).compareTo(other.isSetSerializationLib()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSerializationLib()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serializationLib, other.serializationLib); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("SerDeInfo("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("serializationLib:"); + if (this.serializationLib == null) { + sb.append("null"); + } else { + sb.append(this.serializationLib); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + 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 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 _map104 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map104.size); + String _key105; + String _val106; + for (int _i107 = 0; _i107 < _map104.size; ++_i107) + { + _key105 = iprot.readString(); + _val106 = iprot.readString(); + struct.parameters.put(_key105, _val106); + } + 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 _iter108 : struct.parameters.entrySet()) + { + oprot.writeString(_iter108.getKey()); + oprot.writeString(_iter108.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 _iter109 : struct.parameters.entrySet()) + { + oprot.writeString(_iter109.getKey()); + oprot.writeString(_iter109.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 _map110 = 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*_map110.size); + String _key111; + String _val112; + for (int _i113 = 0; _i113 < _map110.size; ++_i113) + { + _key111 = iprot.readString(); + _val112 = iprot.readString(); + struct.parameters.put(_key111, _val112); + } + } + struct.setParametersIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsRequest.java new file mode 100644 index 0000000..c8088b4 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsRequest.java @@ -0,0 +1,550 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class SetPartitionsStatsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SetPartitionsStatsRequest"); + + private static final org.apache.thrift.protocol.TField COL_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("colStats", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField NEED_MERGE_FIELD_DESC = new org.apache.thrift.protocol.TField("needMerge", org.apache.thrift.protocol.TType.BOOL, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SetPartitionsStatsRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SetPartitionsStatsRequestTupleSchemeFactory()); + } + + private List colStats; // required + private boolean needMerge; // 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 { + COL_STATS((short)1, "colStats"), + NEED_MERGE((short)2, "needMerge"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // COL_STATS + return COL_STATS; + case 2: // NEED_MERGE + return NEED_MERGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __NEEDMERGE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.NEED_MERGE}; + 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); + tmpMap.put(_Fields.COL_STATS, new org.apache.thrift.meta_data.FieldMetaData("colStats", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class)))); + tmpMap.put(_Fields.NEED_MERGE, new org.apache.thrift.meta_data.FieldMetaData("needMerge", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SetPartitionsStatsRequest.class, metaDataMap); + } + + public SetPartitionsStatsRequest() { + } + + public SetPartitionsStatsRequest( + List colStats) + { + this(); + this.colStats = colStats; + } + + /** + * Performs a deep copy on other. + */ + public SetPartitionsStatsRequest(SetPartitionsStatsRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetColStats()) { + List __this__colStats = new ArrayList(other.colStats.size()); + for (ColumnStatistics other_element : other.colStats) { + __this__colStats.add(new ColumnStatistics(other_element)); + } + this.colStats = __this__colStats; + } + this.needMerge = other.needMerge; + } + + public SetPartitionsStatsRequest deepCopy() { + return new SetPartitionsStatsRequest(this); + } + + @Override + public void clear() { + this.colStats = null; + setNeedMergeIsSet(false); + this.needMerge = false; + } + + public int getColStatsSize() { + return (this.colStats == null) ? 0 : this.colStats.size(); + } + + public java.util.Iterator getColStatsIterator() { + return (this.colStats == null) ? null : this.colStats.iterator(); + } + + public void addToColStats(ColumnStatistics elem) { + if (this.colStats == null) { + this.colStats = new ArrayList(); + } + this.colStats.add(elem); + } + + public List getColStats() { + return this.colStats; + } + + public void setColStats(List colStats) { + this.colStats = colStats; + } + + public void unsetColStats() { + this.colStats = null; + } + + /** Returns true if field colStats is set (has been assigned a value) and false otherwise */ + public boolean isSetColStats() { + return this.colStats != null; + } + + public void setColStatsIsSet(boolean value) { + if (!value) { + this.colStats = null; + } + } + + public boolean isNeedMerge() { + return this.needMerge; + } + + public void setNeedMerge(boolean needMerge) { + this.needMerge = needMerge; + setNeedMergeIsSet(true); + } + + public void unsetNeedMerge() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NEEDMERGE_ISSET_ID); + } + + /** Returns true if field needMerge is set (has been assigned a value) and false otherwise */ + public boolean isSetNeedMerge() { + return EncodingUtils.testBit(__isset_bitfield, __NEEDMERGE_ISSET_ID); + } + + public void setNeedMergeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NEEDMERGE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case COL_STATS: + if (value == null) { + unsetColStats(); + } else { + setColStats((List)value); + } + break; + + case NEED_MERGE: + if (value == null) { + unsetNeedMerge(); + } else { + setNeedMerge((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case COL_STATS: + return getColStats(); + + case NEED_MERGE: + return isNeedMerge(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case COL_STATS: + return isSetColStats(); + case NEED_MERGE: + return isSetNeedMerge(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SetPartitionsStatsRequest) + return this.equals((SetPartitionsStatsRequest)that); + return false; + } + + public boolean equals(SetPartitionsStatsRequest that) { + if (that == null) + return false; + + boolean this_present_colStats = true && this.isSetColStats(); + boolean that_present_colStats = true && that.isSetColStats(); + if (this_present_colStats || that_present_colStats) { + if (!(this_present_colStats && that_present_colStats)) + return false; + if (!this.colStats.equals(that.colStats)) + return false; + } + + boolean this_present_needMerge = true && this.isSetNeedMerge(); + boolean that_present_needMerge = true && that.isSetNeedMerge(); + if (this_present_needMerge || that_present_needMerge) { + if (!(this_present_needMerge && that_present_needMerge)) + return false; + if (this.needMerge != that.needMerge) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_colStats = true && (isSetColStats()); + list.add(present_colStats); + if (present_colStats) + list.add(colStats); + + boolean present_needMerge = true && (isSetNeedMerge()); + list.add(present_needMerge); + if (present_needMerge) + list.add(needMerge); + + return list.hashCode(); + } + + @Override + public int compareTo(SetPartitionsStatsRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetColStats()).compareTo(other.isSetColStats()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColStats()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colStats, other.colStats); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNeedMerge()).compareTo(other.isSetNeedMerge()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNeedMerge()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.needMerge, other.needMerge); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("SetPartitionsStatsRequest("); + boolean first = true; + + sb.append("colStats:"); + if (this.colStats == null) { + sb.append("null"); + } else { + sb.append(this.colStats); + } + first = false; + if (isSetNeedMerge()) { + if (!first) sb.append(", "); + sb.append("needMerge:"); + sb.append(this.needMerge); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetColStats()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'colStats' is unset! Struct:" + toString()); + } + + // 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 { + // 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 SetPartitionsStatsRequestStandardSchemeFactory implements SchemeFactory { + public SetPartitionsStatsRequestStandardScheme getScheme() { + return new SetPartitionsStatsRequestStandardScheme(); + } + } + + private static class SetPartitionsStatsRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SetPartitionsStatsRequest 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_STATS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list286 = iprot.readListBegin(); + struct.colStats = new ArrayList(_list286.size); + ColumnStatistics _elem287; + for (int _i288 = 0; _i288 < _list286.size; ++_i288) + { + _elem287 = new ColumnStatistics(); + _elem287.read(iprot); + struct.colStats.add(_elem287); + } + iprot.readListEnd(); + } + struct.setColStatsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NEED_MERGE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.needMerge = iprot.readBool(); + struct.setNeedMergeIsSet(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, SetPartitionsStatsRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.colStats != null) { + oprot.writeFieldBegin(COL_STATS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.colStats.size())); + for (ColumnStatistics _iter289 : struct.colStats) + { + _iter289.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.isSetNeedMerge()) { + oprot.writeFieldBegin(NEED_MERGE_FIELD_DESC); + oprot.writeBool(struct.needMerge); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SetPartitionsStatsRequestTupleSchemeFactory implements SchemeFactory { + public SetPartitionsStatsRequestTupleScheme getScheme() { + return new SetPartitionsStatsRequestTupleScheme(); + } + } + + private static class SetPartitionsStatsRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SetPartitionsStatsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.colStats.size()); + for (ColumnStatistics _iter290 : struct.colStats) + { + _iter290.write(oprot); + } + } + BitSet optionals = new BitSet(); + if (struct.isSetNeedMerge()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetNeedMerge()) { + oprot.writeBool(struct.needMerge); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SetPartitionsStatsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list291 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.colStats = new ArrayList(_list291.size); + ColumnStatistics _elem292; + for (int _i293 = 0; _i293 < _list291.size; ++_i293) + { + _elem292 = new ColumnStatistics(); + _elem292.read(iprot); + struct.colStats.add(_elem292); + } + } + struct.setColStatsIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.needMerge = iprot.readBool(); + struct.setNeedMergeIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactRequest.java new file mode 100644 index 0000000..ad1c57c --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactRequest.java @@ -0,0 +1,283 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ShowCompactRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowCompactRequest"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ShowCompactRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ShowCompactRequestTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowCompactRequest.class, metaDataMap); + } + + public ShowCompactRequest() { + } + + /** + * Performs a deep copy on other. + */ + public ShowCompactRequest(ShowCompactRequest other) { + } + + public ShowCompactRequest deepCopy() { + return new ShowCompactRequest(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ShowCompactRequest) + return this.equals((ShowCompactRequest)that); + return false; + } + + public boolean equals(ShowCompactRequest that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(ShowCompactRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ShowCompactRequest("); + boolean first = true; + + 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 ShowCompactRequestStandardSchemeFactory implements SchemeFactory { + public ShowCompactRequestStandardScheme getScheme() { + return new ShowCompactRequestStandardScheme(); + } + } + + private static class ShowCompactRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ShowCompactRequest 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, ShowCompactRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ShowCompactRequestTupleSchemeFactory implements SchemeFactory { + public ShowCompactRequestTupleScheme getScheme() { + return new ShowCompactRequestTupleScheme(); + } + } + + private static class ShowCompactRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ShowCompactRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java new file mode 100644 index 0000000..1dd13cc --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ShowCompactResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowCompactResponse"); + + private static final org.apache.thrift.protocol.TField COMPACTS_FIELD_DESC = new org.apache.thrift.protocol.TField("compacts", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ShowCompactResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ShowCompactResponseTupleSchemeFactory()); + } + + private List compacts; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + COMPACTS((short)1, "compacts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // COMPACTS + return COMPACTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.COMPACTS, new org.apache.thrift.meta_data.FieldMetaData("compacts", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowCompactResponseElement.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowCompactResponse.class, metaDataMap); + } + + public ShowCompactResponse() { + } + + public ShowCompactResponse( + List compacts) + { + this(); + this.compacts = compacts; + } + + /** + * Performs a deep copy on other. + */ + public ShowCompactResponse(ShowCompactResponse other) { + if (other.isSetCompacts()) { + List __this__compacts = new ArrayList(other.compacts.size()); + for (ShowCompactResponseElement other_element : other.compacts) { + __this__compacts.add(new ShowCompactResponseElement(other_element)); + } + this.compacts = __this__compacts; + } + } + + public ShowCompactResponse deepCopy() { + return new ShowCompactResponse(this); + } + + @Override + public void clear() { + this.compacts = null; + } + + public int getCompactsSize() { + return (this.compacts == null) ? 0 : this.compacts.size(); + } + + public java.util.Iterator getCompactsIterator() { + return (this.compacts == null) ? null : this.compacts.iterator(); + } + + public void addToCompacts(ShowCompactResponseElement elem) { + if (this.compacts == null) { + this.compacts = new ArrayList(); + } + this.compacts.add(elem); + } + + public List getCompacts() { + return this.compacts; + } + + public void setCompacts(List compacts) { + this.compacts = compacts; + } + + public void unsetCompacts() { + this.compacts = null; + } + + /** Returns true if field compacts is set (has been assigned a value) and false otherwise */ + public boolean isSetCompacts() { + return this.compacts != null; + } + + public void setCompactsIsSet(boolean value) { + if (!value) { + this.compacts = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case COMPACTS: + if (value == null) { + unsetCompacts(); + } else { + setCompacts((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case COMPACTS: + return getCompacts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case COMPACTS: + return isSetCompacts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ShowCompactResponse) + return this.equals((ShowCompactResponse)that); + return false; + } + + public boolean equals(ShowCompactResponse that) { + if (that == null) + return false; + + boolean this_present_compacts = true && this.isSetCompacts(); + boolean that_present_compacts = true && that.isSetCompacts(); + if (this_present_compacts || that_present_compacts) { + if (!(this_present_compacts && that_present_compacts)) + return false; + if (!this.compacts.equals(that.compacts)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_compacts = true && (isSetCompacts()); + list.add(present_compacts); + if (present_compacts) + list.add(compacts); + + return list.hashCode(); + } + + @Override + public int compareTo(ShowCompactResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetCompacts()).compareTo(other.isSetCompacts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompacts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compacts, other.compacts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ShowCompactResponse("); + boolean first = true; + + sb.append("compacts:"); + if (this.compacts == null) { + sb.append("null"); + } else { + sb.append(this.compacts); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetCompacts()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'compacts' is unset! Struct:" + toString()); + } + + // 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 ShowCompactResponseStandardSchemeFactory implements SchemeFactory { + public ShowCompactResponseStandardScheme getScheme() { + return new ShowCompactResponseStandardScheme(); + } + } + + private static class ShowCompactResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ShowCompactResponse 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: // COMPACTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list566 = iprot.readListBegin(); + struct.compacts = new ArrayList(_list566.size); + ShowCompactResponseElement _elem567; + for (int _i568 = 0; _i568 < _list566.size; ++_i568) + { + _elem567 = new ShowCompactResponseElement(); + _elem567.read(iprot); + struct.compacts.add(_elem567); + } + iprot.readListEnd(); + } + struct.setCompactsIsSet(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, ShowCompactResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.compacts != null) { + oprot.writeFieldBegin(COMPACTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.compacts.size())); + for (ShowCompactResponseElement _iter569 : struct.compacts) + { + _iter569.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ShowCompactResponseTupleSchemeFactory implements SchemeFactory { + public ShowCompactResponseTupleScheme getScheme() { + return new ShowCompactResponseTupleScheme(); + } + } + + private static class ShowCompactResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.compacts.size()); + for (ShowCompactResponseElement _iter570 : struct.compacts) + { + _iter570.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list571 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.compacts = new ArrayList(_list571.size); + ShowCompactResponseElement _elem572; + for (int _i573 = 0; _i573 < _list571.size; ++_i573) + { + _elem572 = new ShowCompactResponseElement(); + _elem572.read(iprot); + struct.compacts.add(_elem572); + } + } + struct.setCompactsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java new file mode 100644 index 0000000..78b4f7c --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java @@ -0,0 +1,1641 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ShowCompactResponseElement implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowCompactResponseElement"); + + 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 TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PARTITIONNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionname", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField WORKERID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerid", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField START_FIELD_DESC = new org.apache.thrift.protocol.TField("start", org.apache.thrift.protocol.TType.I64, (short)7); + private static final org.apache.thrift.protocol.TField RUN_AS_FIELD_DESC = new org.apache.thrift.protocol.TField("runAs", org.apache.thrift.protocol.TType.STRING, (short)8); + private static final org.apache.thrift.protocol.TField HIGHTEST_TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hightestTxnId", org.apache.thrift.protocol.TType.I64, (short)9); + private static final org.apache.thrift.protocol.TField META_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("metaInfo", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)11); + private static final org.apache.thrift.protocol.TField HADOOP_JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hadoopJobId", org.apache.thrift.protocol.TType.STRING, (short)12); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)13); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ShowCompactResponseElementStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ShowCompactResponseElementTupleSchemeFactory()); + } + + private String dbname; // required + private String tablename; // required + private String partitionname; // optional + private CompactionType type; // required + private String state; // required + private String workerid; // optional + private long start; // optional + private String runAs; // optional + private long hightestTxnId; // optional + private String metaInfo; // optional + private long endTime; // optional + private String hadoopJobId; // optional + private long id; // 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 { + DBNAME((short)1, "dbname"), + TABLENAME((short)2, "tablename"), + PARTITIONNAME((short)3, "partitionname"), + /** + * + * @see CompactionType + */ + TYPE((short)4, "type"), + STATE((short)5, "state"), + WORKERID((short)6, "workerid"), + START((short)7, "start"), + RUN_AS((short)8, "runAs"), + HIGHTEST_TXN_ID((short)9, "hightestTxnId"), + META_INFO((short)10, "metaInfo"), + END_TIME((short)11, "endTime"), + HADOOP_JOB_ID((short)12, "hadoopJobId"), + ID((short)13, "id"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // TABLENAME + return TABLENAME; + case 3: // PARTITIONNAME + return PARTITIONNAME; + case 4: // TYPE + return TYPE; + case 5: // STATE + return STATE; + case 6: // WORKERID + return WORKERID; + case 7: // START + return START; + case 8: // RUN_AS + return RUN_AS; + case 9: // HIGHTEST_TXN_ID + return HIGHTEST_TXN_ID; + case 10: // META_INFO + return META_INFO; + case 11: // END_TIME + return END_TIME; + case 12: // HADOOP_JOB_ID + return HADOOP_JOB_ID; + case 13: // ID + return ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __START_ISSET_ID = 0; + private static final int __HIGHTESTTXNID_ISSET_ID = 1; + private static final int __ENDTIME_ISSET_ID = 2; + private static final int __ID_ISSET_ID = 3; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.PARTITIONNAME,_Fields.WORKERID,_Fields.START,_Fields.RUN_AS,_Fields.HIGHTEST_TXN_ID,_Fields.META_INFO,_Fields.END_TIME,_Fields.HADOOP_JOB_ID,_Fields.ID}; + 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CompactionType.class))); + tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.WORKERID, new org.apache.thrift.meta_data.FieldMetaData("workerid", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.START, new org.apache.thrift.meta_data.FieldMetaData("start", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.RUN_AS, new org.apache.thrift.meta_data.FieldMetaData("runAs", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.HIGHTEST_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("hightestTxnId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.META_INFO, new org.apache.thrift.meta_data.FieldMetaData("metaInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.HADOOP_JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("hadoopJobId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowCompactResponseElement.class, metaDataMap); + } + + public ShowCompactResponseElement() { + this.hadoopJobId = "None"; + + } + + public ShowCompactResponseElement( + String dbname, + String tablename, + CompactionType type, + String state) + { + this(); + this.dbname = dbname; + this.tablename = tablename; + this.type = type; + this.state = state; + } + + /** + * Performs a deep copy on other. + */ + public ShowCompactResponseElement(ShowCompactResponseElement other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTablename()) { + this.tablename = other.tablename; + } + if (other.isSetPartitionname()) { + this.partitionname = other.partitionname; + } + if (other.isSetType()) { + this.type = other.type; + } + if (other.isSetState()) { + this.state = other.state; + } + if (other.isSetWorkerid()) { + this.workerid = other.workerid; + } + this.start = other.start; + if (other.isSetRunAs()) { + this.runAs = other.runAs; + } + this.hightestTxnId = other.hightestTxnId; + if (other.isSetMetaInfo()) { + this.metaInfo = other.metaInfo; + } + this.endTime = other.endTime; + if (other.isSetHadoopJobId()) { + this.hadoopJobId = other.hadoopJobId; + } + this.id = other.id; + } + + public ShowCompactResponseElement deepCopy() { + return new ShowCompactResponseElement(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tablename = null; + this.partitionname = null; + this.type = null; + this.state = null; + this.workerid = null; + setStartIsSet(false); + this.start = 0; + this.runAs = null; + setHightestTxnIdIsSet(false); + this.hightestTxnId = 0; + this.metaInfo = null; + setEndTimeIsSet(false); + this.endTime = 0; + this.hadoopJobId = "None"; + + setIdIsSet(false); + this.id = 0; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTablename() { + return this.tablename; + } + + public void setTablename(String tablename) { + this.tablename = tablename; + } + + public void unsetTablename() { + this.tablename = null; + } + + /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ + public boolean isSetTablename() { + return this.tablename != null; + } + + public void setTablenameIsSet(boolean value) { + if (!value) { + this.tablename = null; + } + } + + public String getPartitionname() { + return this.partitionname; + } + + public void setPartitionname(String partitionname) { + this.partitionname = partitionname; + } + + public void unsetPartitionname() { + this.partitionname = null; + } + + /** Returns true if field partitionname is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitionname() { + return this.partitionname != null; + } + + public void setPartitionnameIsSet(boolean value) { + if (!value) { + this.partitionname = null; + } + } + + /** + * + * @see CompactionType + */ + public CompactionType getType() { + return this.type; + } + + /** + * + * @see CompactionType + */ + public void setType(CompactionType type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public String getState() { + return this.state; + } + + public void setState(String state) { + this.state = state; + } + + public void unsetState() { + this.state = null; + } + + /** Returns true if field state is set (has been assigned a value) and false otherwise */ + public boolean isSetState() { + return this.state != null; + } + + public void setStateIsSet(boolean value) { + if (!value) { + this.state = null; + } + } + + public String getWorkerid() { + return this.workerid; + } + + public void setWorkerid(String workerid) { + this.workerid = workerid; + } + + public void unsetWorkerid() { + this.workerid = null; + } + + /** Returns true if field workerid is set (has been assigned a value) and false otherwise */ + public boolean isSetWorkerid() { + return this.workerid != null; + } + + public void setWorkeridIsSet(boolean value) { + if (!value) { + this.workerid = null; + } + } + + public long getStart() { + return this.start; + } + + public void setStart(long start) { + this.start = start; + setStartIsSet(true); + } + + public void unsetStart() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __START_ISSET_ID); + } + + /** Returns true if field start is set (has been assigned a value) and false otherwise */ + public boolean isSetStart() { + return EncodingUtils.testBit(__isset_bitfield, __START_ISSET_ID); + } + + public void setStartIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __START_ISSET_ID, value); + } + + public String getRunAs() { + return this.runAs; + } + + public void setRunAs(String runAs) { + this.runAs = runAs; + } + + public void unsetRunAs() { + this.runAs = null; + } + + /** Returns true if field runAs is set (has been assigned a value) and false otherwise */ + public boolean isSetRunAs() { + return this.runAs != null; + } + + public void setRunAsIsSet(boolean value) { + if (!value) { + this.runAs = null; + } + } + + public long getHightestTxnId() { + return this.hightestTxnId; + } + + public void setHightestTxnId(long hightestTxnId) { + this.hightestTxnId = hightestTxnId; + setHightestTxnIdIsSet(true); + } + + public void unsetHightestTxnId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HIGHTESTTXNID_ISSET_ID); + } + + /** Returns true if field hightestTxnId is set (has been assigned a value) and false otherwise */ + public boolean isSetHightestTxnId() { + return EncodingUtils.testBit(__isset_bitfield, __HIGHTESTTXNID_ISSET_ID); + } + + public void setHightestTxnIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HIGHTESTTXNID_ISSET_ID, value); + } + + public String getMetaInfo() { + return this.metaInfo; + } + + public void setMetaInfo(String metaInfo) { + this.metaInfo = metaInfo; + } + + public void unsetMetaInfo() { + this.metaInfo = null; + } + + /** Returns true if field metaInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetMetaInfo() { + return this.metaInfo != null; + } + + public void setMetaInfoIsSet(boolean value) { + if (!value) { + this.metaInfo = null; + } + } + + public long getEndTime() { + return this.endTime; + } + + public void setEndTime(long endTime) { + this.endTime = endTime; + setEndTimeIsSet(true); + } + + public void unsetEndTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID); + } + + /** Returns true if field endTime is set (has been assigned a value) and false otherwise */ + public boolean isSetEndTime() { + return EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID); + } + + public void setEndTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value); + } + + public String getHadoopJobId() { + return this.hadoopJobId; + } + + public void setHadoopJobId(String hadoopJobId) { + this.hadoopJobId = hadoopJobId; + } + + public void unsetHadoopJobId() { + this.hadoopJobId = null; + } + + /** Returns true if field hadoopJobId is set (has been assigned a value) and false otherwise */ + public boolean isSetHadoopJobId() { + return this.hadoopJobId != null; + } + + public void setHadoopJobIdIsSet(boolean value) { + if (!value) { + this.hadoopJobId = null; + } + } + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + setIdIsSet(true); + } + + public void unsetId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); + } + + public void setIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TABLENAME: + if (value == null) { + unsetTablename(); + } else { + setTablename((String)value); + } + break; + + case PARTITIONNAME: + if (value == null) { + unsetPartitionname(); + } else { + setPartitionname((String)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((CompactionType)value); + } + break; + + case STATE: + if (value == null) { + unsetState(); + } else { + setState((String)value); + } + break; + + case WORKERID: + if (value == null) { + unsetWorkerid(); + } else { + setWorkerid((String)value); + } + break; + + case START: + if (value == null) { + unsetStart(); + } else { + setStart((Long)value); + } + break; + + case RUN_AS: + if (value == null) { + unsetRunAs(); + } else { + setRunAs((String)value); + } + break; + + case HIGHTEST_TXN_ID: + if (value == null) { + unsetHightestTxnId(); + } else { + setHightestTxnId((Long)value); + } + break; + + case META_INFO: + if (value == null) { + unsetMetaInfo(); + } else { + setMetaInfo((String)value); + } + break; + + case END_TIME: + if (value == null) { + unsetEndTime(); + } else { + setEndTime((Long)value); + } + break; + + case HADOOP_JOB_ID: + if (value == null) { + unsetHadoopJobId(); + } else { + setHadoopJobId((String)value); + } + break; + + case ID: + if (value == null) { + unsetId(); + } else { + setId((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TABLENAME: + return getTablename(); + + case PARTITIONNAME: + return getPartitionname(); + + case TYPE: + return getType(); + + case STATE: + return getState(); + + case WORKERID: + return getWorkerid(); + + case START: + return getStart(); + + case RUN_AS: + return getRunAs(); + + case HIGHTEST_TXN_ID: + return getHightestTxnId(); + + case META_INFO: + return getMetaInfo(); + + case END_TIME: + return getEndTime(); + + case HADOOP_JOB_ID: + return getHadoopJobId(); + + case ID: + return getId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TABLENAME: + return isSetTablename(); + case PARTITIONNAME: + return isSetPartitionname(); + case TYPE: + return isSetType(); + case STATE: + return isSetState(); + case WORKERID: + return isSetWorkerid(); + case START: + return isSetStart(); + case RUN_AS: + return isSetRunAs(); + case HIGHTEST_TXN_ID: + return isSetHightestTxnId(); + case META_INFO: + return isSetMetaInfo(); + case END_TIME: + return isSetEndTime(); + case HADOOP_JOB_ID: + return isSetHadoopJobId(); + case ID: + return isSetId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ShowCompactResponseElement) + return this.equals((ShowCompactResponseElement)that); + return false; + } + + public boolean equals(ShowCompactResponseElement that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tablename = true && this.isSetTablename(); + boolean that_present_tablename = true && that.isSetTablename(); + if (this_present_tablename || that_present_tablename) { + if (!(this_present_tablename && that_present_tablename)) + return false; + if (!this.tablename.equals(that.tablename)) + return false; + } + + boolean this_present_partitionname = true && this.isSetPartitionname(); + boolean that_present_partitionname = true && that.isSetPartitionname(); + if (this_present_partitionname || that_present_partitionname) { + if (!(this_present_partitionname && that_present_partitionname)) + return false; + if (!this.partitionname.equals(that.partitionname)) + return false; + } + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + boolean this_present_state = true && this.isSetState(); + boolean that_present_state = true && that.isSetState(); + if (this_present_state || that_present_state) { + if (!(this_present_state && that_present_state)) + return false; + if (!this.state.equals(that.state)) + return false; + } + + boolean this_present_workerid = true && this.isSetWorkerid(); + boolean that_present_workerid = true && that.isSetWorkerid(); + if (this_present_workerid || that_present_workerid) { + if (!(this_present_workerid && that_present_workerid)) + return false; + if (!this.workerid.equals(that.workerid)) + return false; + } + + boolean this_present_start = true && this.isSetStart(); + boolean that_present_start = true && that.isSetStart(); + if (this_present_start || that_present_start) { + if (!(this_present_start && that_present_start)) + return false; + if (this.start != that.start) + return false; + } + + boolean this_present_runAs = true && this.isSetRunAs(); + boolean that_present_runAs = true && that.isSetRunAs(); + if (this_present_runAs || that_present_runAs) { + if (!(this_present_runAs && that_present_runAs)) + return false; + if (!this.runAs.equals(that.runAs)) + return false; + } + + boolean this_present_hightestTxnId = true && this.isSetHightestTxnId(); + boolean that_present_hightestTxnId = true && that.isSetHightestTxnId(); + if (this_present_hightestTxnId || that_present_hightestTxnId) { + if (!(this_present_hightestTxnId && that_present_hightestTxnId)) + return false; + if (this.hightestTxnId != that.hightestTxnId) + return false; + } + + boolean this_present_metaInfo = true && this.isSetMetaInfo(); + boolean that_present_metaInfo = true && that.isSetMetaInfo(); + if (this_present_metaInfo || that_present_metaInfo) { + if (!(this_present_metaInfo && that_present_metaInfo)) + return false; + if (!this.metaInfo.equals(that.metaInfo)) + return false; + } + + boolean this_present_endTime = true && this.isSetEndTime(); + boolean that_present_endTime = true && that.isSetEndTime(); + if (this_present_endTime || that_present_endTime) { + if (!(this_present_endTime && that_present_endTime)) + return false; + if (this.endTime != that.endTime) + return false; + } + + boolean this_present_hadoopJobId = true && this.isSetHadoopJobId(); + boolean that_present_hadoopJobId = true && that.isSetHadoopJobId(); + if (this_present_hadoopJobId || that_present_hadoopJobId) { + if (!(this_present_hadoopJobId && that_present_hadoopJobId)) + return false; + if (!this.hadoopJobId.equals(that.hadoopJobId)) + return false; + } + + boolean this_present_id = true && this.isSetId(); + boolean that_present_id = true && that.isSetId(); + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (this.id != that.id) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tablename = true && (isSetTablename()); + list.add(present_tablename); + if (present_tablename) + list.add(tablename); + + boolean present_partitionname = true && (isSetPartitionname()); + list.add(present_partitionname); + if (present_partitionname) + list.add(partitionname); + + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + + boolean present_state = true && (isSetState()); + list.add(present_state); + if (present_state) + list.add(state); + + boolean present_workerid = true && (isSetWorkerid()); + list.add(present_workerid); + if (present_workerid) + list.add(workerid); + + boolean present_start = true && (isSetStart()); + list.add(present_start); + if (present_start) + list.add(start); + + boolean present_runAs = true && (isSetRunAs()); + list.add(present_runAs); + if (present_runAs) + list.add(runAs); + + boolean present_hightestTxnId = true && (isSetHightestTxnId()); + list.add(present_hightestTxnId); + if (present_hightestTxnId) + list.add(hightestTxnId); + + boolean present_metaInfo = true && (isSetMetaInfo()); + list.add(present_metaInfo); + if (present_metaInfo) + list.add(metaInfo); + + boolean present_endTime = true && (isSetEndTime()); + list.add(present_endTime); + if (present_endTime) + list.add(endTime); + + boolean present_hadoopJobId = true && (isSetHadoopJobId()); + list.add(present_hadoopJobId); + if (present_hadoopJobId) + list.add(hadoopJobId); + + boolean present_id = true && (isSetId()); + list.add(present_id); + if (present_id) + list.add(id); + + return list.hashCode(); + } + + @Override + public int compareTo(ShowCompactResponseElement other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTablename()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartitionname()).compareTo(other.isSetPartitionname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionname, other.partitionname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetState()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetWorkerid()).compareTo(other.isSetWorkerid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetWorkerid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerid, other.workerid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStart()).compareTo(other.isSetStart()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStart()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start, other.start); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRunAs()).compareTo(other.isSetRunAs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRunAs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runAs, other.runAs); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHightestTxnId()).compareTo(other.isSetHightestTxnId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHightestTxnId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hightestTxnId, other.hightestTxnId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMetaInfo()).compareTo(other.isSetMetaInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMetaInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metaInfo, other.metaInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEndTime()).compareTo(other.isSetEndTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHadoopJobId()).compareTo(other.isSetHadoopJobId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHadoopJobId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hadoopJobId, other.hadoopJobId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ShowCompactResponseElement("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tablename:"); + if (this.tablename == null) { + sb.append("null"); + } else { + sb.append(this.tablename); + } + first = false; + if (isSetPartitionname()) { + if (!first) sb.append(", "); + sb.append("partitionname:"); + if (this.partitionname == null) { + sb.append("null"); + } else { + sb.append(this.partitionname); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (!first) sb.append(", "); + sb.append("state:"); + if (this.state == null) { + sb.append("null"); + } else { + sb.append(this.state); + } + first = false; + if (isSetWorkerid()) { + if (!first) sb.append(", "); + sb.append("workerid:"); + if (this.workerid == null) { + sb.append("null"); + } else { + sb.append(this.workerid); + } + first = false; + } + if (isSetStart()) { + if (!first) sb.append(", "); + sb.append("start:"); + sb.append(this.start); + first = false; + } + if (isSetRunAs()) { + if (!first) sb.append(", "); + sb.append("runAs:"); + if (this.runAs == null) { + sb.append("null"); + } else { + sb.append(this.runAs); + } + first = false; + } + if (isSetHightestTxnId()) { + if (!first) sb.append(", "); + sb.append("hightestTxnId:"); + sb.append(this.hightestTxnId); + first = false; + } + if (isSetMetaInfo()) { + if (!first) sb.append(", "); + sb.append("metaInfo:"); + if (this.metaInfo == null) { + sb.append("null"); + } else { + sb.append(this.metaInfo); + } + first = false; + } + if (isSetEndTime()) { + if (!first) sb.append(", "); + sb.append("endTime:"); + sb.append(this.endTime); + first = false; + } + if (isSetHadoopJobId()) { + if (!first) sb.append(", "); + sb.append("hadoopJobId:"); + if (this.hadoopJobId == null) { + sb.append("null"); + } else { + sb.append(this.hadoopJobId); + } + first = false; + } + if (isSetId()) { + if (!first) sb.append(", "); + sb.append("id:"); + sb.append(this.id); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbname()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); + } + + if (!isSetTablename()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString()); + } + + if (!isSetType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); + } + + if (!isSetState()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); + } + + // 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 { + // 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 ShowCompactResponseElementStandardSchemeFactory implements SchemeFactory { + public ShowCompactResponseElementStandardScheme getScheme() { + return new ShowCompactResponseElementStandardScheme(); + } + } + + private static class ShowCompactResponseElementStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ShowCompactResponseElement 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: // TABLENAME + 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 3: // PARTITIONNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.partitionname = iprot.readString(); + struct.setPartitionnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // STATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.state = iprot.readString(); + struct.setStateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // WORKERID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.workerid = iprot.readString(); + struct.setWorkeridIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // START + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.start = iprot.readI64(); + struct.setStartIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // RUN_AS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.runAs = iprot.readString(); + struct.setRunAsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // HIGHTEST_TXN_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.hightestTxnId = iprot.readI64(); + struct.setHightestTxnIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // META_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.metaInfo = iprot.readString(); + struct.setMetaInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // END_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.endTime = iprot.readI64(); + struct.setEndTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // HADOOP_JOB_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.hadoopJobId = iprot.readString(); + struct.setHadoopJobIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.id = iprot.readI64(); + struct.setIdIsSet(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, ShowCompactResponseElement 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.tablename != null) { + oprot.writeFieldBegin(TABLENAME_FIELD_DESC); + oprot.writeString(struct.tablename); + oprot.writeFieldEnd(); + } + if (struct.partitionname != null) { + if (struct.isSetPartitionname()) { + oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC); + oprot.writeString(struct.partitionname); + oprot.writeFieldEnd(); + } + } + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } + if (struct.state != null) { + oprot.writeFieldBegin(STATE_FIELD_DESC); + oprot.writeString(struct.state); + oprot.writeFieldEnd(); + } + if (struct.workerid != null) { + if (struct.isSetWorkerid()) { + oprot.writeFieldBegin(WORKERID_FIELD_DESC); + oprot.writeString(struct.workerid); + oprot.writeFieldEnd(); + } + } + if (struct.isSetStart()) { + oprot.writeFieldBegin(START_FIELD_DESC); + oprot.writeI64(struct.start); + oprot.writeFieldEnd(); + } + if (struct.runAs != null) { + if (struct.isSetRunAs()) { + oprot.writeFieldBegin(RUN_AS_FIELD_DESC); + oprot.writeString(struct.runAs); + oprot.writeFieldEnd(); + } + } + if (struct.isSetHightestTxnId()) { + oprot.writeFieldBegin(HIGHTEST_TXN_ID_FIELD_DESC); + oprot.writeI64(struct.hightestTxnId); + oprot.writeFieldEnd(); + } + if (struct.metaInfo != null) { + if (struct.isSetMetaInfo()) { + oprot.writeFieldBegin(META_INFO_FIELD_DESC); + oprot.writeString(struct.metaInfo); + oprot.writeFieldEnd(); + } + } + if (struct.isSetEndTime()) { + oprot.writeFieldBegin(END_TIME_FIELD_DESC); + oprot.writeI64(struct.endTime); + oprot.writeFieldEnd(); + } + if (struct.hadoopJobId != null) { + if (struct.isSetHadoopJobId()) { + oprot.writeFieldBegin(HADOOP_JOB_ID_FIELD_DESC); + oprot.writeString(struct.hadoopJobId); + oprot.writeFieldEnd(); + } + } + if (struct.isSetId()) { + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeI64(struct.id); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ShowCompactResponseElementTupleSchemeFactory implements SchemeFactory { + public ShowCompactResponseElementTupleScheme getScheme() { + return new ShowCompactResponseElementTupleScheme(); + } + } + + private static class ShowCompactResponseElementTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponseElement struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbname); + oprot.writeString(struct.tablename); + oprot.writeI32(struct.type.getValue()); + oprot.writeString(struct.state); + BitSet optionals = new BitSet(); + if (struct.isSetPartitionname()) { + optionals.set(0); + } + if (struct.isSetWorkerid()) { + optionals.set(1); + } + if (struct.isSetStart()) { + optionals.set(2); + } + if (struct.isSetRunAs()) { + optionals.set(3); + } + if (struct.isSetHightestTxnId()) { + optionals.set(4); + } + if (struct.isSetMetaInfo()) { + optionals.set(5); + } + if (struct.isSetEndTime()) { + optionals.set(6); + } + if (struct.isSetHadoopJobId()) { + optionals.set(7); + } + if (struct.isSetId()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); + if (struct.isSetPartitionname()) { + oprot.writeString(struct.partitionname); + } + if (struct.isSetWorkerid()) { + oprot.writeString(struct.workerid); + } + if (struct.isSetStart()) { + oprot.writeI64(struct.start); + } + if (struct.isSetRunAs()) { + oprot.writeString(struct.runAs); + } + if (struct.isSetHightestTxnId()) { + oprot.writeI64(struct.hightestTxnId); + } + if (struct.isSetMetaInfo()) { + oprot.writeString(struct.metaInfo); + } + if (struct.isSetEndTime()) { + oprot.writeI64(struct.endTime); + } + if (struct.isSetHadoopJobId()) { + oprot.writeString(struct.hadoopJobId); + } + if (struct.isSetId()) { + oprot.writeI64(struct.id); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponseElement struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + struct.tablename = iprot.readString(); + struct.setTablenameIsSet(true); + struct.type = org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + struct.state = iprot.readString(); + struct.setStateIsSet(true); + BitSet incoming = iprot.readBitSet(9); + if (incoming.get(0)) { + struct.partitionname = iprot.readString(); + struct.setPartitionnameIsSet(true); + } + if (incoming.get(1)) { + struct.workerid = iprot.readString(); + struct.setWorkeridIsSet(true); + } + if (incoming.get(2)) { + struct.start = iprot.readI64(); + struct.setStartIsSet(true); + } + if (incoming.get(3)) { + struct.runAs = iprot.readString(); + struct.setRunAsIsSet(true); + } + if (incoming.get(4)) { + struct.hightestTxnId = iprot.readI64(); + struct.setHightestTxnIdIsSet(true); + } + if (incoming.get(5)) { + struct.metaInfo = iprot.readString(); + struct.setMetaInfoIsSet(true); + } + if (incoming.get(6)) { + struct.endTime = iprot.readI64(); + struct.setEndTimeIsSet(true); + } + if (incoming.get(7)) { + struct.hadoopJobId = iprot.readString(); + struct.setHadoopJobIdIsSet(true); + } + if (incoming.get(8)) { + struct.id = iprot.readI64(); + struct.setIdIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksRequest.java new file mode 100644 index 0000000..f566d6f --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksRequest.java @@ -0,0 +1,710 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ShowLocksRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowLocksRequest"); + + 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 TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PARTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partname", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField IS_EXTENDED_FIELD_DESC = new org.apache.thrift.protocol.TField("isExtended", org.apache.thrift.protocol.TType.BOOL, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ShowLocksRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ShowLocksRequestTupleSchemeFactory()); + } + + private String dbname; // optional + private String tablename; // optional + private String partname; // optional + private boolean isExtended; // 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 { + DBNAME((short)1, "dbname"), + TABLENAME((short)2, "tablename"), + PARTNAME((short)3, "partname"), + IS_EXTENDED((short)4, "isExtended"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // TABLENAME + return TABLENAME; + case 3: // PARTNAME + return PARTNAME; + case 4: // IS_EXTENDED + return IS_EXTENDED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ISEXTENDED_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.DBNAME,_Fields.TABLENAME,_Fields.PARTNAME,_Fields.IS_EXTENDED}; + 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARTNAME, new org.apache.thrift.meta_data.FieldMetaData("partname", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IS_EXTENDED, new org.apache.thrift.meta_data.FieldMetaData("isExtended", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowLocksRequest.class, metaDataMap); + } + + public ShowLocksRequest() { + this.isExtended = false; + + } + + /** + * Performs a deep copy on other. + */ + public ShowLocksRequest(ShowLocksRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTablename()) { + this.tablename = other.tablename; + } + if (other.isSetPartname()) { + this.partname = other.partname; + } + this.isExtended = other.isExtended; + } + + public ShowLocksRequest deepCopy() { + return new ShowLocksRequest(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tablename = null; + this.partname = null; + this.isExtended = false; + + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTablename() { + return this.tablename; + } + + public void setTablename(String tablename) { + this.tablename = tablename; + } + + public void unsetTablename() { + this.tablename = null; + } + + /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ + public boolean isSetTablename() { + return this.tablename != null; + } + + public void setTablenameIsSet(boolean value) { + if (!value) { + this.tablename = null; + } + } + + public String getPartname() { + return this.partname; + } + + public void setPartname(String partname) { + this.partname = partname; + } + + public void unsetPartname() { + this.partname = null; + } + + /** Returns true if field partname is set (has been assigned a value) and false otherwise */ + public boolean isSetPartname() { + return this.partname != null; + } + + public void setPartnameIsSet(boolean value) { + if (!value) { + this.partname = null; + } + } + + public boolean isIsExtended() { + return this.isExtended; + } + + public void setIsExtended(boolean isExtended) { + this.isExtended = isExtended; + setIsExtendedIsSet(true); + } + + public void unsetIsExtended() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISEXTENDED_ISSET_ID); + } + + /** Returns true if field isExtended is set (has been assigned a value) and false otherwise */ + public boolean isSetIsExtended() { + return EncodingUtils.testBit(__isset_bitfield, __ISEXTENDED_ISSET_ID); + } + + public void setIsExtendedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISEXTENDED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TABLENAME: + if (value == null) { + unsetTablename(); + } else { + setTablename((String)value); + } + break; + + case PARTNAME: + if (value == null) { + unsetPartname(); + } else { + setPartname((String)value); + } + break; + + case IS_EXTENDED: + if (value == null) { + unsetIsExtended(); + } else { + setIsExtended((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TABLENAME: + return getTablename(); + + case PARTNAME: + return getPartname(); + + case IS_EXTENDED: + return isIsExtended(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TABLENAME: + return isSetTablename(); + case PARTNAME: + return isSetPartname(); + case IS_EXTENDED: + return isSetIsExtended(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ShowLocksRequest) + return this.equals((ShowLocksRequest)that); + return false; + } + + public boolean equals(ShowLocksRequest that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tablename = true && this.isSetTablename(); + boolean that_present_tablename = true && that.isSetTablename(); + if (this_present_tablename || that_present_tablename) { + if (!(this_present_tablename && that_present_tablename)) + return false; + if (!this.tablename.equals(that.tablename)) + return false; + } + + boolean this_present_partname = true && this.isSetPartname(); + boolean that_present_partname = true && that.isSetPartname(); + if (this_present_partname || that_present_partname) { + if (!(this_present_partname && that_present_partname)) + return false; + if (!this.partname.equals(that.partname)) + return false; + } + + boolean this_present_isExtended = true && this.isSetIsExtended(); + boolean that_present_isExtended = true && that.isSetIsExtended(); + if (this_present_isExtended || that_present_isExtended) { + if (!(this_present_isExtended && that_present_isExtended)) + return false; + if (this.isExtended != that.isExtended) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tablename = true && (isSetTablename()); + list.add(present_tablename); + if (present_tablename) + list.add(tablename); + + boolean present_partname = true && (isSetPartname()); + list.add(present_partname); + if (present_partname) + list.add(partname); + + boolean present_isExtended = true && (isSetIsExtended()); + list.add(present_isExtended); + if (present_isExtended) + list.add(isExtended); + + return list.hashCode(); + } + + @Override + public int compareTo(ShowLocksRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTablename()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartname()).compareTo(other.isSetPartname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partname, other.partname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsExtended()).compareTo(other.isSetIsExtended()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsExtended()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isExtended, other.isExtended); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ShowLocksRequest("); + boolean first = true; + + if (isSetDbname()) { + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + } + if (isSetTablename()) { + if (!first) sb.append(", "); + sb.append("tablename:"); + if (this.tablename == null) { + sb.append("null"); + } else { + sb.append(this.tablename); + } + first = false; + } + if (isSetPartname()) { + if (!first) sb.append(", "); + sb.append("partname:"); + if (this.partname == null) { + sb.append("null"); + } else { + sb.append(this.partname); + } + first = false; + } + if (isSetIsExtended()) { + if (!first) sb.append(", "); + sb.append("isExtended:"); + sb.append(this.isExtended); + 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 { + // 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 ShowLocksRequestStandardSchemeFactory implements SchemeFactory { + public ShowLocksRequestStandardScheme getScheme() { + return new ShowLocksRequestStandardScheme(); + } + } + + private static class ShowLocksRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ShowLocksRequest 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: // TABLENAME + 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 3: // PARTNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.partname = iprot.readString(); + struct.setPartnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // IS_EXTENDED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isExtended = iprot.readBool(); + struct.setIsExtendedIsSet(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, ShowLocksRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbname != null) { + if (struct.isSetDbname()) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + } + if (struct.tablename != null) { + if (struct.isSetTablename()) { + oprot.writeFieldBegin(TABLENAME_FIELD_DESC); + oprot.writeString(struct.tablename); + oprot.writeFieldEnd(); + } + } + if (struct.partname != null) { + if (struct.isSetPartname()) { + oprot.writeFieldBegin(PARTNAME_FIELD_DESC); + oprot.writeString(struct.partname); + oprot.writeFieldEnd(); + } + } + if (struct.isSetIsExtended()) { + oprot.writeFieldBegin(IS_EXTENDED_FIELD_DESC); + oprot.writeBool(struct.isExtended); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ShowLocksRequestTupleSchemeFactory implements SchemeFactory { + public ShowLocksRequestTupleScheme getScheme() { + return new ShowLocksRequestTupleScheme(); + } + } + + private static class ShowLocksRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ShowLocksRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbname()) { + optionals.set(0); + } + if (struct.isSetTablename()) { + optionals.set(1); + } + if (struct.isSetPartname()) { + optionals.set(2); + } + if (struct.isSetIsExtended()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetTablename()) { + oprot.writeString(struct.tablename); + } + if (struct.isSetPartname()) { + oprot.writeString(struct.partname); + } + if (struct.isSetIsExtended()) { + oprot.writeBool(struct.isExtended); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ShowLocksRequest 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.tablename = iprot.readString(); + struct.setTablenameIsSet(true); + } + if (incoming.get(2)) { + struct.partname = iprot.readString(); + struct.setPartnameIsSet(true); + } + if (incoming.get(3)) { + struct.isExtended = iprot.readBool(); + struct.setIsExtendedIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java new file mode 100644 index 0000000..11ef050 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java @@ -0,0 +1,449 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ShowLocksResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowLocksResponse"); + + private static final org.apache.thrift.protocol.TField LOCKS_FIELD_DESC = new org.apache.thrift.protocol.TField("locks", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ShowLocksResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ShowLocksResponseTupleSchemeFactory()); + } + + private List locks; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + LOCKS((short)1, "locks"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOCKS + return LOCKS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.LOCKS, new org.apache.thrift.meta_data.FieldMetaData("locks", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowLocksResponseElement.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowLocksResponse.class, metaDataMap); + } + + public ShowLocksResponse() { + } + + public ShowLocksResponse( + List locks) + { + this(); + this.locks = locks; + } + + /** + * Performs a deep copy on other. + */ + public ShowLocksResponse(ShowLocksResponse other) { + if (other.isSetLocks()) { + List __this__locks = new ArrayList(other.locks.size()); + for (ShowLocksResponseElement other_element : other.locks) { + __this__locks.add(new ShowLocksResponseElement(other_element)); + } + this.locks = __this__locks; + } + } + + public ShowLocksResponse deepCopy() { + return new ShowLocksResponse(this); + } + + @Override + public void clear() { + this.locks = null; + } + + public int getLocksSize() { + return (this.locks == null) ? 0 : this.locks.size(); + } + + public java.util.Iterator getLocksIterator() { + return (this.locks == null) ? null : this.locks.iterator(); + } + + public void addToLocks(ShowLocksResponseElement elem) { + if (this.locks == null) { + this.locks = new ArrayList(); + } + this.locks.add(elem); + } + + public List getLocks() { + return this.locks; + } + + public void setLocks(List locks) { + this.locks = locks; + } + + public void unsetLocks() { + this.locks = null; + } + + /** Returns true if field locks is set (has been assigned a value) and false otherwise */ + public boolean isSetLocks() { + return this.locks != null; + } + + public void setLocksIsSet(boolean value) { + if (!value) { + this.locks = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOCKS: + if (value == null) { + unsetLocks(); + } else { + setLocks((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOCKS: + return getLocks(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOCKS: + return isSetLocks(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ShowLocksResponse) + return this.equals((ShowLocksResponse)that); + return false; + } + + public boolean equals(ShowLocksResponse that) { + if (that == null) + return false; + + boolean this_present_locks = true && this.isSetLocks(); + boolean that_present_locks = true && that.isSetLocks(); + if (this_present_locks || that_present_locks) { + if (!(this_present_locks && that_present_locks)) + return false; + if (!this.locks.equals(that.locks)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_locks = true && (isSetLocks()); + list.add(present_locks); + if (present_locks) + list.add(locks); + + return list.hashCode(); + } + + @Override + public int compareTo(ShowLocksResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLocks()).compareTo(other.isSetLocks()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLocks()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.locks, other.locks); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ShowLocksResponse("); + boolean first = true; + + sb.append("locks:"); + if (this.locks == null) { + sb.append("null"); + } else { + sb.append(this.locks); + } + 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 ShowLocksResponseStandardSchemeFactory implements SchemeFactory { + public ShowLocksResponseStandardScheme getScheme() { + return new ShowLocksResponseStandardScheme(); + } + } + + private static class ShowLocksResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ShowLocksResponse 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: // LOCKS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list532 = iprot.readListBegin(); + struct.locks = new ArrayList(_list532.size); + ShowLocksResponseElement _elem533; + for (int _i534 = 0; _i534 < _list532.size; ++_i534) + { + _elem533 = new ShowLocksResponseElement(); + _elem533.read(iprot); + struct.locks.add(_elem533); + } + iprot.readListEnd(); + } + struct.setLocksIsSet(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, ShowLocksResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.locks != null) { + oprot.writeFieldBegin(LOCKS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.locks.size())); + for (ShowLocksResponseElement _iter535 : struct.locks) + { + _iter535.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ShowLocksResponseTupleSchemeFactory implements SchemeFactory { + public ShowLocksResponseTupleScheme getScheme() { + return new ShowLocksResponseTupleScheme(); + } + } + + private static class ShowLocksResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetLocks()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetLocks()) { + { + oprot.writeI32(struct.locks.size()); + for (ShowLocksResponseElement _iter536 : struct.locks) + { + _iter536.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list537 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.locks = new ArrayList(_list537.size); + ShowLocksResponseElement _elem538; + for (int _i539 = 0; _i539 < _list537.size; ++_i539) + { + _elem538 = new ShowLocksResponseElement(); + _elem538.read(iprot); + struct.locks.add(_elem538); + } + } + struct.setLocksIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java new file mode 100644 index 0000000..4bd7a7e --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java @@ -0,0 +1,1929 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ShowLocksResponseElement implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowLocksResponseElement"); + + private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1); + 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)2); + private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PARTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partname", org.apache.thrift.protocol.TType.STRING, (short)4); + 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)5); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)7); + private static final org.apache.thrift.protocol.TField LASTHEARTBEAT_FIELD_DESC = new org.apache.thrift.protocol.TField("lastheartbeat", org.apache.thrift.protocol.TType.I64, (short)8); + private static final org.apache.thrift.protocol.TField ACQUIREDAT_FIELD_DESC = new org.apache.thrift.protocol.TField("acquiredat", org.apache.thrift.protocol.TType.I64, (short)9); + private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)11); + private static final org.apache.thrift.protocol.TField HEARTBEAT_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("heartbeatCount", org.apache.thrift.protocol.TType.I32, (short)12); + private static final org.apache.thrift.protocol.TField AGENT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("agentInfo", org.apache.thrift.protocol.TType.STRING, (short)13); + private static final org.apache.thrift.protocol.TField BLOCKED_BY_EXT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockedByExtId", org.apache.thrift.protocol.TType.I64, (short)14); + private static final org.apache.thrift.protocol.TField BLOCKED_BY_INT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockedByIntId", org.apache.thrift.protocol.TType.I64, (short)15); + private static final org.apache.thrift.protocol.TField LOCK_ID_INTERNAL_FIELD_DESC = new org.apache.thrift.protocol.TField("lockIdInternal", org.apache.thrift.protocol.TType.I64, (short)16); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ShowLocksResponseElementStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ShowLocksResponseElementTupleSchemeFactory()); + } + + private long lockid; // required + private String dbname; // required + private String tablename; // optional + private String partname; // optional + private LockState state; // required + private LockType type; // required + private long txnid; // optional + private long lastheartbeat; // required + private long acquiredat; // optional + private String user; // required + private String hostname; // required + private int heartbeatCount; // optional + private String agentInfo; // optional + private long blockedByExtId; // optional + private long blockedByIntId; // optional + private long lockIdInternal; // 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 { + LOCKID((short)1, "lockid"), + DBNAME((short)2, "dbname"), + TABLENAME((short)3, "tablename"), + PARTNAME((short)4, "partname"), + /** + * + * @see LockState + */ + STATE((short)5, "state"), + /** + * + * @see LockType + */ + TYPE((short)6, "type"), + TXNID((short)7, "txnid"), + LASTHEARTBEAT((short)8, "lastheartbeat"), + ACQUIREDAT((short)9, "acquiredat"), + USER((short)10, "user"), + HOSTNAME((short)11, "hostname"), + HEARTBEAT_COUNT((short)12, "heartbeatCount"), + AGENT_INFO((short)13, "agentInfo"), + BLOCKED_BY_EXT_ID((short)14, "blockedByExtId"), + BLOCKED_BY_INT_ID((short)15, "blockedByIntId"), + LOCK_ID_INTERNAL((short)16, "lockIdInternal"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOCKID + return LOCKID; + case 2: // DBNAME + return DBNAME; + case 3: // TABLENAME + return TABLENAME; + case 4: // PARTNAME + return PARTNAME; + case 5: // STATE + return STATE; + case 6: // TYPE + return TYPE; + case 7: // TXNID + return TXNID; + case 8: // LASTHEARTBEAT + return LASTHEARTBEAT; + case 9: // ACQUIREDAT + return ACQUIREDAT; + case 10: // USER + return USER; + case 11: // HOSTNAME + return HOSTNAME; + case 12: // HEARTBEAT_COUNT + return HEARTBEAT_COUNT; + case 13: // AGENT_INFO + return AGENT_INFO; + case 14: // BLOCKED_BY_EXT_ID + return BLOCKED_BY_EXT_ID; + case 15: // BLOCKED_BY_INT_ID + return BLOCKED_BY_INT_ID; + case 16: // LOCK_ID_INTERNAL + return LOCK_ID_INTERNAL; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LOCKID_ISSET_ID = 0; + private static final int __TXNID_ISSET_ID = 1; + private static final int __LASTHEARTBEAT_ISSET_ID = 2; + private static final int __ACQUIREDAT_ISSET_ID = 3; + private static final int __HEARTBEATCOUNT_ISSET_ID = 4; + private static final int __BLOCKEDBYEXTID_ISSET_ID = 5; + private static final int __BLOCKEDBYINTID_ISSET_ID = 6; + private static final int __LOCKIDINTERNAL_ISSET_ID = 7; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.TABLENAME,_Fields.PARTNAME,_Fields.TXNID,_Fields.ACQUIREDAT,_Fields.HEARTBEAT_COUNT,_Fields.AGENT_INFO,_Fields.BLOCKED_BY_EXT_ID,_Fields.BLOCKED_BY_INT_ID,_Fields.LOCK_ID_INTERNAL}; + 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); + tmpMap.put(_Fields.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PARTNAME, new org.apache.thrift.meta_data.FieldMetaData("partname", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockState.class))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockType.class))); + tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.LASTHEARTBEAT, new org.apache.thrift.meta_data.FieldMetaData("lastheartbeat", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ACQUIREDAT, new org.apache.thrift.meta_data.FieldMetaData("acquiredat", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.HEARTBEAT_COUNT, new org.apache.thrift.meta_data.FieldMetaData("heartbeatCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.AGENT_INFO, new org.apache.thrift.meta_data.FieldMetaData("agentInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.BLOCKED_BY_EXT_ID, new org.apache.thrift.meta_data.FieldMetaData("blockedByExtId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.BLOCKED_BY_INT_ID, new org.apache.thrift.meta_data.FieldMetaData("blockedByIntId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.LOCK_ID_INTERNAL, new org.apache.thrift.meta_data.FieldMetaData("lockIdInternal", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowLocksResponseElement.class, metaDataMap); + } + + public ShowLocksResponseElement() { + this.heartbeatCount = 0; + + } + + public ShowLocksResponseElement( + long lockid, + String dbname, + LockState state, + LockType type, + long lastheartbeat, + String user, + String hostname) + { + this(); + this.lockid = lockid; + setLockidIsSet(true); + this.dbname = dbname; + this.state = state; + this.type = type; + this.lastheartbeat = lastheartbeat; + setLastheartbeatIsSet(true); + this.user = user; + this.hostname = hostname; + } + + /** + * Performs a deep copy on other. + */ + public ShowLocksResponseElement(ShowLocksResponseElement other) { + __isset_bitfield = other.__isset_bitfield; + this.lockid = other.lockid; + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTablename()) { + this.tablename = other.tablename; + } + if (other.isSetPartname()) { + this.partname = other.partname; + } + if (other.isSetState()) { + this.state = other.state; + } + if (other.isSetType()) { + this.type = other.type; + } + this.txnid = other.txnid; + this.lastheartbeat = other.lastheartbeat; + this.acquiredat = other.acquiredat; + if (other.isSetUser()) { + this.user = other.user; + } + if (other.isSetHostname()) { + this.hostname = other.hostname; + } + this.heartbeatCount = other.heartbeatCount; + if (other.isSetAgentInfo()) { + this.agentInfo = other.agentInfo; + } + this.blockedByExtId = other.blockedByExtId; + this.blockedByIntId = other.blockedByIntId; + this.lockIdInternal = other.lockIdInternal; + } + + public ShowLocksResponseElement deepCopy() { + return new ShowLocksResponseElement(this); + } + + @Override + public void clear() { + setLockidIsSet(false); + this.lockid = 0; + this.dbname = null; + this.tablename = null; + this.partname = null; + this.state = null; + this.type = null; + setTxnidIsSet(false); + this.txnid = 0; + setLastheartbeatIsSet(false); + this.lastheartbeat = 0; + setAcquiredatIsSet(false); + this.acquiredat = 0; + this.user = null; + this.hostname = null; + this.heartbeatCount = 0; + + this.agentInfo = null; + setBlockedByExtIdIsSet(false); + this.blockedByExtId = 0; + setBlockedByIntIdIsSet(false); + this.blockedByIntId = 0; + setLockIdInternalIsSet(false); + this.lockIdInternal = 0; + } + + public long getLockid() { + return this.lockid; + } + + public void setLockid(long lockid) { + this.lockid = lockid; + setLockidIsSet(true); + } + + public void unsetLockid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKID_ISSET_ID); + } + + /** Returns true if field lockid is set (has been assigned a value) and false otherwise */ + public boolean isSetLockid() { + return EncodingUtils.testBit(__isset_bitfield, __LOCKID_ISSET_ID); + } + + public void setLockidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value); + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTablename() { + return this.tablename; + } + + public void setTablename(String tablename) { + this.tablename = tablename; + } + + public void unsetTablename() { + this.tablename = null; + } + + /** Returns true if field tablename is set (has been assigned a value) and false otherwise */ + public boolean isSetTablename() { + return this.tablename != null; + } + + public void setTablenameIsSet(boolean value) { + if (!value) { + this.tablename = null; + } + } + + public String getPartname() { + return this.partname; + } + + public void setPartname(String partname) { + this.partname = partname; + } + + public void unsetPartname() { + this.partname = null; + } + + /** Returns true if field partname is set (has been assigned a value) and false otherwise */ + public boolean isSetPartname() { + return this.partname != null; + } + + public void setPartnameIsSet(boolean value) { + if (!value) { + this.partname = null; + } + } + + /** + * + * @see LockState + */ + public LockState getState() { + return this.state; + } + + /** + * + * @see LockState + */ + public void setState(LockState state) { + this.state = state; + } + + public void unsetState() { + this.state = null; + } + + /** Returns true if field state is set (has been assigned a value) and false otherwise */ + public boolean isSetState() { + return this.state != null; + } + + public void setStateIsSet(boolean value) { + if (!value) { + this.state = null; + } + } + + /** + * + * @see LockType + */ + public LockType getType() { + return this.type; + } + + /** + * + * @see LockType + */ + public void setType(LockType type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public long getTxnid() { + return this.txnid; + } + + public void setTxnid(long txnid) { + this.txnid = txnid; + setTxnidIsSet(true); + } + + public void unsetTxnid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + /** Returns true if field txnid is set (has been assigned a value) and false otherwise */ + public boolean isSetTxnid() { + return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID); + } + + public void setTxnidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value); + } + + public long getLastheartbeat() { + return this.lastheartbeat; + } + + public void setLastheartbeat(long lastheartbeat) { + this.lastheartbeat = lastheartbeat; + setLastheartbeatIsSet(true); + } + + public void unsetLastheartbeat() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTHEARTBEAT_ISSET_ID); + } + + /** Returns true if field lastheartbeat is set (has been assigned a value) and false otherwise */ + public boolean isSetLastheartbeat() { + return EncodingUtils.testBit(__isset_bitfield, __LASTHEARTBEAT_ISSET_ID); + } + + public void setLastheartbeatIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTHEARTBEAT_ISSET_ID, value); + } + + public long getAcquiredat() { + return this.acquiredat; + } + + public void setAcquiredat(long acquiredat) { + this.acquiredat = acquiredat; + setAcquiredatIsSet(true); + } + + public void unsetAcquiredat() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ACQUIREDAT_ISSET_ID); + } + + /** Returns true if field acquiredat is set (has been assigned a value) and false otherwise */ + public boolean isSetAcquiredat() { + return EncodingUtils.testBit(__isset_bitfield, __ACQUIREDAT_ISSET_ID); + } + + public void setAcquiredatIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ACQUIREDAT_ISSET_ID, value); + } + + public String getUser() { + return this.user; + } + + public void setUser(String user) { + this.user = user; + } + + public void unsetUser() { + this.user = null; + } + + /** Returns true if field user is set (has been assigned a value) and false otherwise */ + public boolean isSetUser() { + return this.user != null; + } + + public void setUserIsSet(boolean value) { + if (!value) { + this.user = null; + } + } + + public String getHostname() { + return this.hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public void unsetHostname() { + this.hostname = null; + } + + /** Returns true if field hostname is set (has been assigned a value) and false otherwise */ + public boolean isSetHostname() { + return this.hostname != null; + } + + public void setHostnameIsSet(boolean value) { + if (!value) { + this.hostname = null; + } + } + + public int getHeartbeatCount() { + return this.heartbeatCount; + } + + public void setHeartbeatCount(int heartbeatCount) { + this.heartbeatCount = heartbeatCount; + setHeartbeatCountIsSet(true); + } + + public void unsetHeartbeatCount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID); + } + + /** Returns true if field heartbeatCount is set (has been assigned a value) and false otherwise */ + public boolean isSetHeartbeatCount() { + return EncodingUtils.testBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID); + } + + public void setHeartbeatCountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID, value); + } + + public String getAgentInfo() { + return this.agentInfo; + } + + public void setAgentInfo(String agentInfo) { + this.agentInfo = agentInfo; + } + + public void unsetAgentInfo() { + this.agentInfo = null; + } + + /** Returns true if field agentInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetAgentInfo() { + return this.agentInfo != null; + } + + public void setAgentInfoIsSet(boolean value) { + if (!value) { + this.agentInfo = null; + } + } + + public long getBlockedByExtId() { + return this.blockedByExtId; + } + + public void setBlockedByExtId(long blockedByExtId) { + this.blockedByExtId = blockedByExtId; + setBlockedByExtIdIsSet(true); + } + + public void unsetBlockedByExtId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKEDBYEXTID_ISSET_ID); + } + + /** Returns true if field blockedByExtId is set (has been assigned a value) and false otherwise */ + public boolean isSetBlockedByExtId() { + return EncodingUtils.testBit(__isset_bitfield, __BLOCKEDBYEXTID_ISSET_ID); + } + + public void setBlockedByExtIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKEDBYEXTID_ISSET_ID, value); + } + + public long getBlockedByIntId() { + return this.blockedByIntId; + } + + public void setBlockedByIntId(long blockedByIntId) { + this.blockedByIntId = blockedByIntId; + setBlockedByIntIdIsSet(true); + } + + public void unsetBlockedByIntId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKEDBYINTID_ISSET_ID); + } + + /** Returns true if field blockedByIntId is set (has been assigned a value) and false otherwise */ + public boolean isSetBlockedByIntId() { + return EncodingUtils.testBit(__isset_bitfield, __BLOCKEDBYINTID_ISSET_ID); + } + + public void setBlockedByIntIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKEDBYINTID_ISSET_ID, value); + } + + public long getLockIdInternal() { + return this.lockIdInternal; + } + + public void setLockIdInternal(long lockIdInternal) { + this.lockIdInternal = lockIdInternal; + setLockIdInternalIsSet(true); + } + + public void unsetLockIdInternal() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKIDINTERNAL_ISSET_ID); + } + + /** Returns true if field lockIdInternal is set (has been assigned a value) and false otherwise */ + public boolean isSetLockIdInternal() { + return EncodingUtils.testBit(__isset_bitfield, __LOCKIDINTERNAL_ISSET_ID); + } + + public void setLockIdInternalIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKIDINTERNAL_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOCKID: + if (value == null) { + unsetLockid(); + } else { + setLockid((Long)value); + } + break; + + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TABLENAME: + if (value == null) { + unsetTablename(); + } else { + setTablename((String)value); + } + break; + + case PARTNAME: + if (value == null) { + unsetPartname(); + } else { + setPartname((String)value); + } + break; + + case STATE: + if (value == null) { + unsetState(); + } else { + setState((LockState)value); + } + break; + + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((LockType)value); + } + break; + + case TXNID: + if (value == null) { + unsetTxnid(); + } else { + setTxnid((Long)value); + } + break; + + case LASTHEARTBEAT: + if (value == null) { + unsetLastheartbeat(); + } else { + setLastheartbeat((Long)value); + } + break; + + case ACQUIREDAT: + if (value == null) { + unsetAcquiredat(); + } else { + setAcquiredat((Long)value); + } + break; + + case USER: + if (value == null) { + unsetUser(); + } else { + setUser((String)value); + } + break; + + case HOSTNAME: + if (value == null) { + unsetHostname(); + } else { + setHostname((String)value); + } + break; + + case HEARTBEAT_COUNT: + if (value == null) { + unsetHeartbeatCount(); + } else { + setHeartbeatCount((Integer)value); + } + break; + + case AGENT_INFO: + if (value == null) { + unsetAgentInfo(); + } else { + setAgentInfo((String)value); + } + break; + + case BLOCKED_BY_EXT_ID: + if (value == null) { + unsetBlockedByExtId(); + } else { + setBlockedByExtId((Long)value); + } + break; + + case BLOCKED_BY_INT_ID: + if (value == null) { + unsetBlockedByIntId(); + } else { + setBlockedByIntId((Long)value); + } + break; + + case LOCK_ID_INTERNAL: + if (value == null) { + unsetLockIdInternal(); + } else { + setLockIdInternal((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOCKID: + return getLockid(); + + case DBNAME: + return getDbname(); + + case TABLENAME: + return getTablename(); + + case PARTNAME: + return getPartname(); + + case STATE: + return getState(); + + case TYPE: + return getType(); + + case TXNID: + return getTxnid(); + + case LASTHEARTBEAT: + return getLastheartbeat(); + + case ACQUIREDAT: + return getAcquiredat(); + + case USER: + return getUser(); + + case HOSTNAME: + return getHostname(); + + case HEARTBEAT_COUNT: + return getHeartbeatCount(); + + case AGENT_INFO: + return getAgentInfo(); + + case BLOCKED_BY_EXT_ID: + return getBlockedByExtId(); + + case BLOCKED_BY_INT_ID: + return getBlockedByIntId(); + + case LOCK_ID_INTERNAL: + return getLockIdInternal(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOCKID: + return isSetLockid(); + case DBNAME: + return isSetDbname(); + case TABLENAME: + return isSetTablename(); + case PARTNAME: + return isSetPartname(); + case STATE: + return isSetState(); + case TYPE: + return isSetType(); + case TXNID: + return isSetTxnid(); + case LASTHEARTBEAT: + return isSetLastheartbeat(); + case ACQUIREDAT: + return isSetAcquiredat(); + case USER: + return isSetUser(); + case HOSTNAME: + return isSetHostname(); + case HEARTBEAT_COUNT: + return isSetHeartbeatCount(); + case AGENT_INFO: + return isSetAgentInfo(); + case BLOCKED_BY_EXT_ID: + return isSetBlockedByExtId(); + case BLOCKED_BY_INT_ID: + return isSetBlockedByIntId(); + case LOCK_ID_INTERNAL: + return isSetLockIdInternal(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ShowLocksResponseElement) + return this.equals((ShowLocksResponseElement)that); + return false; + } + + public boolean equals(ShowLocksResponseElement that) { + if (that == null) + return false; + + boolean this_present_lockid = true; + boolean that_present_lockid = true; + if (this_present_lockid || that_present_lockid) { + if (!(this_present_lockid && that_present_lockid)) + return false; + if (this.lockid != that.lockid) + return false; + } + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tablename = true && this.isSetTablename(); + boolean that_present_tablename = true && that.isSetTablename(); + if (this_present_tablename || that_present_tablename) { + if (!(this_present_tablename && that_present_tablename)) + return false; + if (!this.tablename.equals(that.tablename)) + return false; + } + + boolean this_present_partname = true && this.isSetPartname(); + boolean that_present_partname = true && that.isSetPartname(); + if (this_present_partname || that_present_partname) { + if (!(this_present_partname && that_present_partname)) + return false; + if (!this.partname.equals(that.partname)) + return false; + } + + boolean this_present_state = true && this.isSetState(); + boolean that_present_state = true && that.isSetState(); + if (this_present_state || that_present_state) { + if (!(this_present_state && that_present_state)) + return false; + if (!this.state.equals(that.state)) + return false; + } + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + boolean this_present_txnid = true && this.isSetTxnid(); + boolean that_present_txnid = true && that.isSetTxnid(); + if (this_present_txnid || that_present_txnid) { + if (!(this_present_txnid && that_present_txnid)) + return false; + if (this.txnid != that.txnid) + return false; + } + + boolean this_present_lastheartbeat = true; + boolean that_present_lastheartbeat = true; + if (this_present_lastheartbeat || that_present_lastheartbeat) { + if (!(this_present_lastheartbeat && that_present_lastheartbeat)) + return false; + if (this.lastheartbeat != that.lastheartbeat) + return false; + } + + boolean this_present_acquiredat = true && this.isSetAcquiredat(); + boolean that_present_acquiredat = true && that.isSetAcquiredat(); + if (this_present_acquiredat || that_present_acquiredat) { + if (!(this_present_acquiredat && that_present_acquiredat)) + return false; + if (this.acquiredat != that.acquiredat) + return false; + } + + boolean this_present_user = true && this.isSetUser(); + boolean that_present_user = true && that.isSetUser(); + if (this_present_user || that_present_user) { + if (!(this_present_user && that_present_user)) + return false; + if (!this.user.equals(that.user)) + return false; + } + + boolean this_present_hostname = true && this.isSetHostname(); + boolean that_present_hostname = true && that.isSetHostname(); + if (this_present_hostname || that_present_hostname) { + if (!(this_present_hostname && that_present_hostname)) + return false; + if (!this.hostname.equals(that.hostname)) + return false; + } + + boolean this_present_heartbeatCount = true && this.isSetHeartbeatCount(); + boolean that_present_heartbeatCount = true && that.isSetHeartbeatCount(); + if (this_present_heartbeatCount || that_present_heartbeatCount) { + if (!(this_present_heartbeatCount && that_present_heartbeatCount)) + return false; + if (this.heartbeatCount != that.heartbeatCount) + return false; + } + + boolean this_present_agentInfo = true && this.isSetAgentInfo(); + boolean that_present_agentInfo = true && that.isSetAgentInfo(); + if (this_present_agentInfo || that_present_agentInfo) { + if (!(this_present_agentInfo && that_present_agentInfo)) + return false; + if (!this.agentInfo.equals(that.agentInfo)) + return false; + } + + boolean this_present_blockedByExtId = true && this.isSetBlockedByExtId(); + boolean that_present_blockedByExtId = true && that.isSetBlockedByExtId(); + if (this_present_blockedByExtId || that_present_blockedByExtId) { + if (!(this_present_blockedByExtId && that_present_blockedByExtId)) + return false; + if (this.blockedByExtId != that.blockedByExtId) + return false; + } + + boolean this_present_blockedByIntId = true && this.isSetBlockedByIntId(); + boolean that_present_blockedByIntId = true && that.isSetBlockedByIntId(); + if (this_present_blockedByIntId || that_present_blockedByIntId) { + if (!(this_present_blockedByIntId && that_present_blockedByIntId)) + return false; + if (this.blockedByIntId != that.blockedByIntId) + return false; + } + + boolean this_present_lockIdInternal = true && this.isSetLockIdInternal(); + boolean that_present_lockIdInternal = true && that.isSetLockIdInternal(); + if (this_present_lockIdInternal || that_present_lockIdInternal) { + if (!(this_present_lockIdInternal && that_present_lockIdInternal)) + return false; + if (this.lockIdInternal != that.lockIdInternal) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_lockid = true; + list.add(present_lockid); + if (present_lockid) + list.add(lockid); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tablename = true && (isSetTablename()); + list.add(present_tablename); + if (present_tablename) + list.add(tablename); + + boolean present_partname = true && (isSetPartname()); + list.add(present_partname); + if (present_partname) + list.add(partname); + + boolean present_state = true && (isSetState()); + list.add(present_state); + if (present_state) + list.add(state.getValue()); + + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + + boolean present_txnid = true && (isSetTxnid()); + list.add(present_txnid); + if (present_txnid) + list.add(txnid); + + boolean present_lastheartbeat = true; + list.add(present_lastheartbeat); + if (present_lastheartbeat) + list.add(lastheartbeat); + + boolean present_acquiredat = true && (isSetAcquiredat()); + list.add(present_acquiredat); + if (present_acquiredat) + list.add(acquiredat); + + boolean present_user = true && (isSetUser()); + list.add(present_user); + if (present_user) + list.add(user); + + boolean present_hostname = true && (isSetHostname()); + list.add(present_hostname); + if (present_hostname) + list.add(hostname); + + boolean present_heartbeatCount = true && (isSetHeartbeatCount()); + list.add(present_heartbeatCount); + if (present_heartbeatCount) + list.add(heartbeatCount); + + boolean present_agentInfo = true && (isSetAgentInfo()); + list.add(present_agentInfo); + if (present_agentInfo) + list.add(agentInfo); + + boolean present_blockedByExtId = true && (isSetBlockedByExtId()); + list.add(present_blockedByExtId); + if (present_blockedByExtId) + list.add(blockedByExtId); + + boolean present_blockedByIntId = true && (isSetBlockedByIntId()); + list.add(present_blockedByIntId); + if (present_blockedByIntId) + list.add(blockedByIntId); + + boolean present_lockIdInternal = true && (isSetLockIdInternal()); + list.add(present_lockIdInternal); + if (present_lockIdInternal) + list.add(lockIdInternal); + + return list.hashCode(); + } + + @Override + public int compareTo(ShowLocksResponseElement other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLockid()).compareTo(other.isSetLockid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLockid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, other.lockid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTablename()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartname()).compareTo(other.isSetPartname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partname, other.partname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetState()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxnid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastheartbeat()).compareTo(other.isSetLastheartbeat()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastheartbeat()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastheartbeat, other.lastheartbeat); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAcquiredat()).compareTo(other.isSetAcquiredat()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAcquiredat()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acquiredat, other.acquiredat); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHostname()).compareTo(other.isSetHostname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHostname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, other.hostname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHeartbeatCount()).compareTo(other.isSetHeartbeatCount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHeartbeatCount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.heartbeatCount, other.heartbeatCount); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAgentInfo()).compareTo(other.isSetAgentInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentInfo, other.agentInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBlockedByExtId()).compareTo(other.isSetBlockedByExtId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBlockedByExtId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockedByExtId, other.blockedByExtId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBlockedByIntId()).compareTo(other.isSetBlockedByIntId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBlockedByIntId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockedByIntId, other.blockedByIntId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLockIdInternal()).compareTo(other.isSetLockIdInternal()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLockIdInternal()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockIdInternal, other.lockIdInternal); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("ShowLocksResponseElement("); + boolean first = true; + + sb.append("lockid:"); + sb.append(this.lockid); + first = false; + if (!first) sb.append(", "); + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (isSetTablename()) { + if (!first) sb.append(", "); + sb.append("tablename:"); + if (this.tablename == null) { + sb.append("null"); + } else { + sb.append(this.tablename); + } + first = false; + } + if (isSetPartname()) { + if (!first) sb.append(", "); + sb.append("partname:"); + if (this.partname == null) { + sb.append("null"); + } else { + sb.append(this.partname); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("state:"); + if (this.state == null) { + sb.append("null"); + } else { + sb.append(this.state); + } + first = false; + if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (isSetTxnid()) { + if (!first) sb.append(", "); + sb.append("txnid:"); + sb.append(this.txnid); + first = false; + } + if (!first) sb.append(", "); + sb.append("lastheartbeat:"); + sb.append(this.lastheartbeat); + first = false; + if (isSetAcquiredat()) { + if (!first) sb.append(", "); + sb.append("acquiredat:"); + sb.append(this.acquiredat); + first = false; + } + if (!first) sb.append(", "); + sb.append("user:"); + if (this.user == null) { + sb.append("null"); + } else { + sb.append(this.user); + } + first = false; + if (!first) sb.append(", "); + sb.append("hostname:"); + if (this.hostname == null) { + sb.append("null"); + } else { + sb.append(this.hostname); + } + first = false; + if (isSetHeartbeatCount()) { + if (!first) sb.append(", "); + sb.append("heartbeatCount:"); + sb.append(this.heartbeatCount); + first = false; + } + if (isSetAgentInfo()) { + if (!first) sb.append(", "); + sb.append("agentInfo:"); + if (this.agentInfo == null) { + sb.append("null"); + } else { + sb.append(this.agentInfo); + } + first = false; + } + if (isSetBlockedByExtId()) { + if (!first) sb.append(", "); + sb.append("blockedByExtId:"); + sb.append(this.blockedByExtId); + first = false; + } + if (isSetBlockedByIntId()) { + if (!first) sb.append(", "); + sb.append("blockedByIntId:"); + sb.append(this.blockedByIntId); + first = false; + } + if (isSetLockIdInternal()) { + if (!first) sb.append(", "); + sb.append("lockIdInternal:"); + sb.append(this.lockIdInternal); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetLockid()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'lockid' is unset! Struct:" + toString()); + } + + if (!isSetDbname()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); + } + + if (!isSetState()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); + } + + if (!isSetType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); + } + + if (!isSetLastheartbeat()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'lastheartbeat' is unset! Struct:" + toString()); + } + + if (!isSetUser()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'user' is unset! Struct:" + toString()); + } + + if (!isSetHostname()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'hostname' is unset! Struct:" + toString()); + } + + // 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 { + // 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 ShowLocksResponseElementStandardSchemeFactory implements SchemeFactory { + public ShowLocksResponseElementStandardScheme getScheme() { + return new ShowLocksResponseElementStandardScheme(); + } + } + + private static class ShowLocksResponseElementStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ShowLocksResponseElement 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: // LOCKID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lockid = iprot.readI64(); + struct.setLockidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // 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 3: // TABLENAME + 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: // PARTNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.partname = iprot.readString(); + struct.setPartnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // STATE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.state = org.apache.hadoop.hive.metastore.api.LockState.findByValue(iprot.readI32()); + struct.setStateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.hadoop.hive.metastore.api.LockType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // TXNID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // LASTHEARTBEAT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lastheartbeat = iprot.readI64(); + struct.setLastheartbeatIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // ACQUIREDAT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.acquiredat = iprot.readI64(); + struct.setAcquiredatIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // USER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user = iprot.readString(); + struct.setUserIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // HOSTNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.hostname = iprot.readString(); + struct.setHostnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // HEARTBEAT_COUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.heartbeatCount = iprot.readI32(); + struct.setHeartbeatCountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // AGENT_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.agentInfo = iprot.readString(); + struct.setAgentInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // BLOCKED_BY_EXT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.blockedByExtId = iprot.readI64(); + struct.setBlockedByExtIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // BLOCKED_BY_INT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.blockedByIntId = iprot.readI64(); + struct.setBlockedByIntIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // LOCK_ID_INTERNAL + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lockIdInternal = iprot.readI64(); + struct.setLockIdInternalIsSet(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, ShowLocksResponseElement struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(LOCKID_FIELD_DESC); + oprot.writeI64(struct.lockid); + oprot.writeFieldEnd(); + if (struct.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } + if (struct.tablename != null) { + if (struct.isSetTablename()) { + oprot.writeFieldBegin(TABLENAME_FIELD_DESC); + oprot.writeString(struct.tablename); + oprot.writeFieldEnd(); + } + } + if (struct.partname != null) { + if (struct.isSetPartname()) { + oprot.writeFieldBegin(PARTNAME_FIELD_DESC); + oprot.writeString(struct.partname); + oprot.writeFieldEnd(); + } + } + if (struct.state != null) { + oprot.writeFieldBegin(STATE_FIELD_DESC); + oprot.writeI32(struct.state.getValue()); + oprot.writeFieldEnd(); + } + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } + if (struct.isSetTxnid()) { + oprot.writeFieldBegin(TXNID_FIELD_DESC); + oprot.writeI64(struct.txnid); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(LASTHEARTBEAT_FIELD_DESC); + oprot.writeI64(struct.lastheartbeat); + oprot.writeFieldEnd(); + if (struct.isSetAcquiredat()) { + oprot.writeFieldBegin(ACQUIREDAT_FIELD_DESC); + oprot.writeI64(struct.acquiredat); + oprot.writeFieldEnd(); + } + if (struct.user != null) { + oprot.writeFieldBegin(USER_FIELD_DESC); + oprot.writeString(struct.user); + oprot.writeFieldEnd(); + } + if (struct.hostname != null) { + oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); + oprot.writeString(struct.hostname); + oprot.writeFieldEnd(); + } + if (struct.isSetHeartbeatCount()) { + oprot.writeFieldBegin(HEARTBEAT_COUNT_FIELD_DESC); + oprot.writeI32(struct.heartbeatCount); + oprot.writeFieldEnd(); + } + if (struct.agentInfo != null) { + if (struct.isSetAgentInfo()) { + oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC); + oprot.writeString(struct.agentInfo); + oprot.writeFieldEnd(); + } + } + if (struct.isSetBlockedByExtId()) { + oprot.writeFieldBegin(BLOCKED_BY_EXT_ID_FIELD_DESC); + oprot.writeI64(struct.blockedByExtId); + oprot.writeFieldEnd(); + } + if (struct.isSetBlockedByIntId()) { + oprot.writeFieldBegin(BLOCKED_BY_INT_ID_FIELD_DESC); + oprot.writeI64(struct.blockedByIntId); + oprot.writeFieldEnd(); + } + if (struct.isSetLockIdInternal()) { + oprot.writeFieldBegin(LOCK_ID_INTERNAL_FIELD_DESC); + oprot.writeI64(struct.lockIdInternal); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ShowLocksResponseElementTupleSchemeFactory implements SchemeFactory { + public ShowLocksResponseElementTupleScheme getScheme() { + return new ShowLocksResponseElementTupleScheme(); + } + } + + private static class ShowLocksResponseElementTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponseElement struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.lockid); + oprot.writeString(struct.dbname); + oprot.writeI32(struct.state.getValue()); + oprot.writeI32(struct.type.getValue()); + oprot.writeI64(struct.lastheartbeat); + oprot.writeString(struct.user); + oprot.writeString(struct.hostname); + BitSet optionals = new BitSet(); + if (struct.isSetTablename()) { + optionals.set(0); + } + if (struct.isSetPartname()) { + optionals.set(1); + } + if (struct.isSetTxnid()) { + optionals.set(2); + } + if (struct.isSetAcquiredat()) { + optionals.set(3); + } + if (struct.isSetHeartbeatCount()) { + optionals.set(4); + } + if (struct.isSetAgentInfo()) { + optionals.set(5); + } + if (struct.isSetBlockedByExtId()) { + optionals.set(6); + } + if (struct.isSetBlockedByIntId()) { + optionals.set(7); + } + if (struct.isSetLockIdInternal()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); + if (struct.isSetTablename()) { + oprot.writeString(struct.tablename); + } + if (struct.isSetPartname()) { + oprot.writeString(struct.partname); + } + if (struct.isSetTxnid()) { + oprot.writeI64(struct.txnid); + } + if (struct.isSetAcquiredat()) { + oprot.writeI64(struct.acquiredat); + } + if (struct.isSetHeartbeatCount()) { + oprot.writeI32(struct.heartbeatCount); + } + if (struct.isSetAgentInfo()) { + oprot.writeString(struct.agentInfo); + } + if (struct.isSetBlockedByExtId()) { + oprot.writeI64(struct.blockedByExtId); + } + if (struct.isSetBlockedByIntId()) { + oprot.writeI64(struct.blockedByIntId); + } + if (struct.isSetLockIdInternal()) { + oprot.writeI64(struct.lockIdInternal); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponseElement struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.lockid = iprot.readI64(); + struct.setLockidIsSet(true); + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + struct.state = org.apache.hadoop.hive.metastore.api.LockState.findByValue(iprot.readI32()); + struct.setStateIsSet(true); + struct.type = org.apache.hadoop.hive.metastore.api.LockType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + struct.lastheartbeat = iprot.readI64(); + struct.setLastheartbeatIsSet(true); + struct.user = iprot.readString(); + struct.setUserIsSet(true); + struct.hostname = iprot.readString(); + struct.setHostnameIsSet(true); + BitSet incoming = iprot.readBitSet(9); + if (incoming.get(0)) { + struct.tablename = iprot.readString(); + struct.setTablenameIsSet(true); + } + if (incoming.get(1)) { + struct.partname = iprot.readString(); + struct.setPartnameIsSet(true); + } + if (incoming.get(2)) { + struct.txnid = iprot.readI64(); + struct.setTxnidIsSet(true); + } + if (incoming.get(3)) { + struct.acquiredat = iprot.readI64(); + struct.setAcquiredatIsSet(true); + } + if (incoming.get(4)) { + struct.heartbeatCount = iprot.readI32(); + struct.setHeartbeatCountIsSet(true); + } + if (incoming.get(5)) { + struct.agentInfo = iprot.readString(); + struct.setAgentInfoIsSet(true); + } + if (incoming.get(6)) { + struct.blockedByExtId = iprot.readI64(); + struct.setBlockedByExtIdIsSet(true); + } + if (incoming.get(7)) { + struct.blockedByIntId = iprot.readI64(); + struct.setBlockedByIntIdIsSet(true); + } + if (incoming.get(8)) { + struct.lockIdInternal = iprot.readI64(); + struct.setLockIdInternalIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java new file mode 100644 index 0000000..c32f50c --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java @@ -0,0 +1,834 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class SkewedInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SkewedInfo"); + + private static final org.apache.thrift.protocol.TField SKEWED_COL_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("skewedColNames", org.apache.thrift.protocol.TType.LIST, (short)1); + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SKEWED_COL_NAMES((short)1, "skewedColNames"), + SKEWED_COL_VALUES((short)2, "skewedColValues"), + SKEWED_COL_VALUE_LOCATION_MAPS((short)3, "skewedColValueLocationMaps"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SKEWED_COL_NAMES + return SKEWED_COL_NAMES; + case 2: // SKEWED_COL_VALUES + return SKEWED_COL_VALUES; + case 3: // SKEWED_COL_VALUE_LOCATION_MAPS + return SKEWED_COL_VALUE_LOCATION_MAPS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SKEWED_COL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("skewedColNames", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.SKEWED_COL_VALUES, new org.apache.thrift.meta_data.FieldMetaData("skewedColValues", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.SKEWED_COL_VALUE_LOCATION_MAPS, new org.apache.thrift.meta_data.FieldMetaData("skewedColValueLocationMaps", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SkewedInfo.class, metaDataMap); + } + + public SkewedInfo() { + } + + public SkewedInfo( + List skewedColNames, + List> skewedColValues, + Map,String> skewedColValueLocationMaps) + { + this(); + this.skewedColNames = skewedColNames; + this.skewedColValues = skewedColValues; + this.skewedColValueLocationMaps = skewedColValueLocationMaps; + } + + /** + * Performs a deep copy on other. + */ + public SkewedInfo(SkewedInfo other) { + if (other.isSetSkewedColNames()) { + List __this__skewedColNames = new ArrayList(other.skewedColNames); + this.skewedColNames = __this__skewedColNames; + } + if (other.isSetSkewedColValues()) { + List> __this__skewedColValues = new ArrayList>(other.skewedColValues.size()); + for (List other_element : other.skewedColValues) { + List __this__skewedColValues_copy = new ArrayList(other_element); + __this__skewedColValues.add(__this__skewedColValues_copy); + } + this.skewedColValues = __this__skewedColValues; + } + if (other.isSetSkewedColValueLocationMaps()) { + Map,String> __this__skewedColValueLocationMaps = new HashMap,String>(other.skewedColValueLocationMaps.size()); + for (Map.Entry, String> other_element : other.skewedColValueLocationMaps.entrySet()) { + + List other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + List __this__skewedColValueLocationMaps_copy_key = new ArrayList(other_element_key); + + String __this__skewedColValueLocationMaps_copy_value = other_element_value; + + __this__skewedColValueLocationMaps.put(__this__skewedColValueLocationMaps_copy_key, __this__skewedColValueLocationMaps_copy_value); + } + this.skewedColValueLocationMaps = __this__skewedColValueLocationMaps; + } + } + + public SkewedInfo deepCopy() { + return new SkewedInfo(this); + } + + @Override + public void clear() { + this.skewedColNames = null; + this.skewedColValues = null; + this.skewedColValueLocationMaps = null; + } + + public int getSkewedColNamesSize() { + return (this.skewedColNames == null) ? 0 : this.skewedColNames.size(); + } + + public java.util.Iterator getSkewedColNamesIterator() { + return (this.skewedColNames == null) ? null : this.skewedColNames.iterator(); + } + + public void addToSkewedColNames(String elem) { + if (this.skewedColNames == null) { + this.skewedColNames = new ArrayList(); + } + this.skewedColNames.add(elem); + } + + public List getSkewedColNames() { + return this.skewedColNames; + } + + public void setSkewedColNames(List skewedColNames) { + this.skewedColNames = skewedColNames; + } + + public void unsetSkewedColNames() { + this.skewedColNames = null; + } + + /** Returns true if field skewedColNames is set (has been assigned a value) and false otherwise */ + public boolean isSetSkewedColNames() { + return this.skewedColNames != null; + } + + public void setSkewedColNamesIsSet(boolean value) { + if (!value) { + this.skewedColNames = null; + } + } + + public int getSkewedColValuesSize() { + return (this.skewedColValues == null) ? 0 : this.skewedColValues.size(); + } + + public java.util.Iterator> getSkewedColValuesIterator() { + return (this.skewedColValues == null) ? null : this.skewedColValues.iterator(); + } + + public void addToSkewedColValues(List elem) { + if (this.skewedColValues == null) { + this.skewedColValues = new ArrayList>(); + } + this.skewedColValues.add(elem); + } + + public List> getSkewedColValues() { + return this.skewedColValues; + } + + public void setSkewedColValues(List> skewedColValues) { + this.skewedColValues = skewedColValues; + } + + public void unsetSkewedColValues() { + this.skewedColValues = null; + } + + /** Returns true if field skewedColValues is set (has been assigned a value) and false otherwise */ + public boolean isSetSkewedColValues() { + return this.skewedColValues != null; + } + + public void setSkewedColValuesIsSet(boolean value) { + if (!value) { + this.skewedColValues = null; + } + } + + public int getSkewedColValueLocationMapsSize() { + return (this.skewedColValueLocationMaps == null) ? 0 : this.skewedColValueLocationMaps.size(); + } + + public void putToSkewedColValueLocationMaps(List key, String val) { + if (this.skewedColValueLocationMaps == null) { + this.skewedColValueLocationMaps = new HashMap,String>(); + } + this.skewedColValueLocationMaps.put(key, val); + } + + public Map,String> getSkewedColValueLocationMaps() { + return this.skewedColValueLocationMaps; + } + + public void setSkewedColValueLocationMaps(Map,String> skewedColValueLocationMaps) { + this.skewedColValueLocationMaps = skewedColValueLocationMaps; + } + + public void unsetSkewedColValueLocationMaps() { + this.skewedColValueLocationMaps = null; + } + + /** Returns true if field skewedColValueLocationMaps is set (has been assigned a value) and false otherwise */ + public boolean isSetSkewedColValueLocationMaps() { + return this.skewedColValueLocationMaps != null; + } + + public void setSkewedColValueLocationMapsIsSet(boolean value) { + if (!value) { + this.skewedColValueLocationMaps = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SKEWED_COL_NAMES: + if (value == null) { + unsetSkewedColNames(); + } else { + setSkewedColNames((List)value); + } + break; + + case SKEWED_COL_VALUES: + if (value == null) { + unsetSkewedColValues(); + } else { + setSkewedColValues((List>)value); + } + break; + + case SKEWED_COL_VALUE_LOCATION_MAPS: + if (value == null) { + unsetSkewedColValueLocationMaps(); + } else { + setSkewedColValueLocationMaps((Map,String>)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SKEWED_COL_NAMES: + return getSkewedColNames(); + + case SKEWED_COL_VALUES: + return getSkewedColValues(); + + case SKEWED_COL_VALUE_LOCATION_MAPS: + return getSkewedColValueLocationMaps(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SKEWED_COL_NAMES: + return isSetSkewedColNames(); + case SKEWED_COL_VALUES: + return isSetSkewedColValues(); + case SKEWED_COL_VALUE_LOCATION_MAPS: + return isSetSkewedColValueLocationMaps(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SkewedInfo) + return this.equals((SkewedInfo)that); + return false; + } + + public boolean equals(SkewedInfo that) { + if (that == null) + return false; + + boolean this_present_skewedColNames = true && this.isSetSkewedColNames(); + boolean that_present_skewedColNames = true && that.isSetSkewedColNames(); + if (this_present_skewedColNames || that_present_skewedColNames) { + if (!(this_present_skewedColNames && that_present_skewedColNames)) + return false; + if (!this.skewedColNames.equals(that.skewedColNames)) + return false; + } + + boolean this_present_skewedColValues = true && this.isSetSkewedColValues(); + boolean that_present_skewedColValues = true && that.isSetSkewedColValues(); + if (this_present_skewedColValues || that_present_skewedColValues) { + if (!(this_present_skewedColValues && that_present_skewedColValues)) + return false; + if (!this.skewedColValues.equals(that.skewedColValues)) + return false; + } + + boolean this_present_skewedColValueLocationMaps = true && this.isSetSkewedColValueLocationMaps(); + boolean that_present_skewedColValueLocationMaps = true && that.isSetSkewedColValueLocationMaps(); + if (this_present_skewedColValueLocationMaps || that_present_skewedColValueLocationMaps) { + if (!(this_present_skewedColValueLocationMaps && that_present_skewedColValueLocationMaps)) + return false; + if (!this.skewedColValueLocationMaps.equals(that.skewedColValueLocationMaps)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_skewedColNames = true && (isSetSkewedColNames()); + list.add(present_skewedColNames); + if (present_skewedColNames) + list.add(skewedColNames); + + boolean present_skewedColValues = true && (isSetSkewedColValues()); + list.add(present_skewedColValues); + if (present_skewedColValues) + list.add(skewedColValues); + + boolean present_skewedColValueLocationMaps = true && (isSetSkewedColValueLocationMaps()); + list.add(present_skewedColValueLocationMaps); + if (present_skewedColValueLocationMaps) + list.add(skewedColValueLocationMaps); + + return list.hashCode(); + } + + @Override + public int compareTo(SkewedInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSkewedColNames()).compareTo(other.isSetSkewedColNames()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSkewedColNames()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skewedColNames, other.skewedColNames); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSkewedColValues()).compareTo(other.isSetSkewedColValues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSkewedColValues()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skewedColValues, other.skewedColValues); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSkewedColValueLocationMaps()).compareTo(other.isSetSkewedColValueLocationMaps()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSkewedColValueLocationMaps()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skewedColValueLocationMaps, other.skewedColValueLocationMaps); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("SkewedInfo("); + boolean first = true; + + sb.append("skewedColNames:"); + if (this.skewedColNames == null) { + sb.append("null"); + } else { + sb.append(this.skewedColNames); + } + first = false; + if (!first) sb.append(", "); + sb.append("skewedColValues:"); + if (this.skewedColValues == null) { + sb.append("null"); + } else { + sb.append(this.skewedColValues); + } + first = false; + if (!first) sb.append(", "); + sb.append("skewedColValueLocationMaps:"); + if (this.skewedColValueLocationMaps == null) { + sb.append("null"); + } else { + sb.append(this.skewedColValueLocationMaps); + } + 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 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 _list114 = iprot.readListBegin(); + struct.skewedColNames = new ArrayList(_list114.size); + String _elem115; + for (int _i116 = 0; _i116 < _list114.size; ++_i116) + { + _elem115 = iprot.readString(); + struct.skewedColNames.add(_elem115); + } + 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 _list117 = iprot.readListBegin(); + struct.skewedColValues = new ArrayList>(_list117.size); + List _elem118; + for (int _i119 = 0; _i119 < _list117.size; ++_i119) + { + { + org.apache.thrift.protocol.TList _list120 = iprot.readListBegin(); + _elem118 = new ArrayList(_list120.size); + String _elem121; + for (int _i122 = 0; _i122 < _list120.size; ++_i122) + { + _elem121 = iprot.readString(); + _elem118.add(_elem121); + } + iprot.readListEnd(); + } + struct.skewedColValues.add(_elem118); + } + 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 _map123 = iprot.readMapBegin(); + struct.skewedColValueLocationMaps = new HashMap,String>(2*_map123.size); + List _key124; + String _val125; + for (int _i126 = 0; _i126 < _map123.size; ++_i126) + { + { + org.apache.thrift.protocol.TList _list127 = iprot.readListBegin(); + _key124 = new ArrayList(_list127.size); + String _elem128; + for (int _i129 = 0; _i129 < _list127.size; ++_i129) + { + _elem128 = iprot.readString(); + _key124.add(_elem128); + } + iprot.readListEnd(); + } + _val125 = iprot.readString(); + struct.skewedColValueLocationMaps.put(_key124, _val125); + } + 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 _iter130 : struct.skewedColNames) + { + oprot.writeString(_iter130); + } + 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 _iter131 : struct.skewedColValues) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter131.size())); + for (String _iter132 : _iter131) + { + oprot.writeString(_iter132); + } + 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> _iter133 : struct.skewedColValueLocationMaps.entrySet()) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter133.getKey().size())); + for (String _iter134 : _iter133.getKey()) + { + oprot.writeString(_iter134); + } + oprot.writeListEnd(); + } + oprot.writeString(_iter133.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 _iter135 : struct.skewedColNames) + { + oprot.writeString(_iter135); + } + } + } + if (struct.isSetSkewedColValues()) { + { + oprot.writeI32(struct.skewedColValues.size()); + for (List _iter136 : struct.skewedColValues) + { + { + oprot.writeI32(_iter136.size()); + for (String _iter137 : _iter136) + { + oprot.writeString(_iter137); + } + } + } + } + } + if (struct.isSetSkewedColValueLocationMaps()) { + { + oprot.writeI32(struct.skewedColValueLocationMaps.size()); + for (Map.Entry, String> _iter138 : struct.skewedColValueLocationMaps.entrySet()) + { + { + oprot.writeI32(_iter138.getKey().size()); + for (String _iter139 : _iter138.getKey()) + { + oprot.writeString(_iter139); + } + } + oprot.writeString(_iter138.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 _list140 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.skewedColNames = new ArrayList(_list140.size); + String _elem141; + for (int _i142 = 0; _i142 < _list140.size; ++_i142) + { + _elem141 = iprot.readString(); + struct.skewedColNames.add(_elem141); + } + } + struct.setSkewedColNamesIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.skewedColValues = new ArrayList>(_list143.size); + List _elem144; + for (int _i145 = 0; _i145 < _list143.size; ++_i145) + { + { + org.apache.thrift.protocol.TList _list146 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + _elem144 = new ArrayList(_list146.size); + String _elem147; + for (int _i148 = 0; _i148 < _list146.size; ++_i148) + { + _elem147 = iprot.readString(); + _elem144.add(_elem147); + } + } + struct.skewedColValues.add(_elem144); + } + } + struct.setSkewedColValuesIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map149 = 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*_map149.size); + List _key150; + String _val151; + for (int _i152 = 0; _i152 < _map149.size; ++_i152) + { + { + org.apache.thrift.protocol.TList _list153 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + _key150 = new ArrayList(_list153.size); + String _elem154; + for (int _i155 = 0; _i155 < _list153.size; ++_i155) + { + _elem154 = iprot.readString(); + _key150.add(_elem154); + } + } + _val151 = iprot.readString(); + struct.skewedColValueLocationMaps.put(_key150, _val151); + } + } + struct.setSkewedColValueLocationMapsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java new file mode 100644 index 0000000..8b40aca --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java @@ -0,0 +1,1748 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class StorageDescriptor implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StorageDescriptor"); + + private static final org.apache.thrift.protocol.TField COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("cols", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("location", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField INPUT_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("inputFormat", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField OUTPUT_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("outputFormat", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("compressed", org.apache.thrift.protocol.TType.BOOL, (short)5); + private static final org.apache.thrift.protocol.TField NUM_BUCKETS_FIELD_DESC = new org.apache.thrift.protocol.TField("numBuckets", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField SERDE_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("serdeInfo", org.apache.thrift.protocol.TType.STRUCT, (short)7); + private static final org.apache.thrift.protocol.TField BUCKET_COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("bucketCols", org.apache.thrift.protocol.TType.LIST, (short)8); + private static final org.apache.thrift.protocol.TField SORT_COLS_FIELD_DESC = new org.apache.thrift.protocol.TField("sortCols", org.apache.thrift.protocol.TType.LIST, (short)9); + 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 org.apache.thrift.protocol.TField STORED_AS_SUB_DIRECTORIES_FIELD_DESC = new org.apache.thrift.protocol.TField("storedAsSubDirectories", org.apache.thrift.protocol.TType.BOOL, (short)12); + + 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 + private String outputFormat; // required + private boolean compressed; // required + private int numBuckets; // required + private SerDeInfo serdeInfo; // required + private List bucketCols; // required + private List sortCols; // required + private Map parameters; // required + private SkewedInfo skewedInfo; // optional + private boolean storedAsSubDirectories; // 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 { + COLS((short)1, "cols"), + LOCATION((short)2, "location"), + INPUT_FORMAT((short)3, "inputFormat"), + OUTPUT_FORMAT((short)4, "outputFormat"), + COMPRESSED((short)5, "compressed"), + NUM_BUCKETS((short)6, "numBuckets"), + SERDE_INFO((short)7, "serdeInfo"), + BUCKET_COLS((short)8, "bucketCols"), + SORT_COLS((short)9, "sortCols"), + PARAMETERS((short)10, "parameters"), + SKEWED_INFO((short)11, "skewedInfo"), + STORED_AS_SUB_DIRECTORIES((short)12, "storedAsSubDirectories"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // COLS + return COLS; + case 2: // LOCATION + return LOCATION; + case 3: // INPUT_FORMAT + return INPUT_FORMAT; + case 4: // OUTPUT_FORMAT + return OUTPUT_FORMAT; + case 5: // COMPRESSED + return COMPRESSED; + case 6: // NUM_BUCKETS + return NUM_BUCKETS; + case 7: // SERDE_INFO + return SERDE_INFO; + case 8: // BUCKET_COLS + return BUCKET_COLS; + case 9: // SORT_COLS + return SORT_COLS; + case 10: // PARAMETERS + return PARAMETERS; + case 11: // SKEWED_INFO + return SKEWED_INFO; + case 12: // STORED_AS_SUB_DIRECTORIES + return STORED_AS_SUB_DIRECTORIES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __COMPRESSED_ISSET_ID = 0; + private static final int __NUMBUCKETS_ISSET_ID = 1; + private static final int __STOREDASSUBDIRECTORIES_ISSET_ID = 2; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.SKEWED_INFO,_Fields.STORED_AS_SUB_DIRECTORIES}; + 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); + tmpMap.put(_Fields.COLS, new org.apache.thrift.meta_data.FieldMetaData("cols", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); + tmpMap.put(_Fields.LOCATION, new org.apache.thrift.meta_data.FieldMetaData("location", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.INPUT_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("inputFormat", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OUTPUT_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("outputFormat", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("compressed", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.NUM_BUCKETS, new org.apache.thrift.meta_data.FieldMetaData("numBuckets", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SERDE_INFO, new org.apache.thrift.meta_data.FieldMetaData("serdeInfo", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SerDeInfo.class))); + tmpMap.put(_Fields.BUCKET_COLS, new org.apache.thrift.meta_data.FieldMetaData("bucketCols", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.SORT_COLS, new org.apache.thrift.meta_data.FieldMetaData("sortCols", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Order.class)))); + tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.SKEWED_INFO, new org.apache.thrift.meta_data.FieldMetaData("skewedInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SkewedInfo.class))); + tmpMap.put(_Fields.STORED_AS_SUB_DIRECTORIES, new org.apache.thrift.meta_data.FieldMetaData("storedAsSubDirectories", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StorageDescriptor.class, metaDataMap); + } + + public StorageDescriptor() { + } + + public StorageDescriptor( + List cols, + String location, + String inputFormat, + String outputFormat, + boolean compressed, + int numBuckets, + SerDeInfo serdeInfo, + List bucketCols, + List sortCols, + Map parameters) + { + this(); + this.cols = cols; + this.location = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(location); + this.inputFormat = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(inputFormat); + this.outputFormat = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(outputFormat); + this.compressed = compressed; + setCompressedIsSet(true); + this.numBuckets = numBuckets; + setNumBucketsIsSet(true); + this.serdeInfo = serdeInfo; + this.bucketCols = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(bucketCols); + this.sortCols = sortCols; + this.parameters = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(parameters); + } + + /** + * Performs a deep copy on other. + */ + public StorageDescriptor(StorageDescriptor other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetCols()) { + List __this__cols = new ArrayList(other.cols.size()); + for (FieldSchema other_element : other.cols) { + __this__cols.add(new FieldSchema(other_element)); + } + this.cols = __this__cols; + } + if (other.isSetLocation()) { + this.location = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.location); + } + if (other.isSetInputFormat()) { + this.inputFormat = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.inputFormat); + } + if (other.isSetOutputFormat()) { + this.outputFormat = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.outputFormat); + } + this.compressed = other.compressed; + this.numBuckets = other.numBuckets; + if (other.isSetSerdeInfo()) { + this.serdeInfo = new SerDeInfo(other.serdeInfo); + } + if (other.isSetBucketCols()) { + List __this__bucketCols = new ArrayList(other.bucketCols); + this.bucketCols = __this__bucketCols; + } + if (other.isSetSortCols()) { + List __this__sortCols = new ArrayList(other.sortCols.size()); + for (Order other_element : other.sortCols) { + __this__sortCols.add(new Order(other_element)); + } + this.sortCols = __this__sortCols; + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(other.parameters); + this.parameters = __this__parameters; + } + if (other.isSetSkewedInfo()) { + this.skewedInfo = new SkewedInfo(other.skewedInfo); + } + this.storedAsSubDirectories = other.storedAsSubDirectories; + } + + public StorageDescriptor deepCopy() { + return new StorageDescriptor(this); + } + + @Override + public void clear() { + this.cols = null; + this.location = null; + this.inputFormat = null; + this.outputFormat = null; + setCompressedIsSet(false); + this.compressed = false; + setNumBucketsIsSet(false); + this.numBuckets = 0; + this.serdeInfo = null; + this.bucketCols = null; + this.sortCols = null; + this.parameters = null; + this.skewedInfo = null; + setStoredAsSubDirectoriesIsSet(false); + this.storedAsSubDirectories = false; + } + + public int getColsSize() { + return (this.cols == null) ? 0 : this.cols.size(); + } + + public java.util.Iterator getColsIterator() { + return (this.cols == null) ? null : this.cols.iterator(); + } + + public void addToCols(FieldSchema elem) { + if (this.cols == null) { + this.cols = new ArrayList(); + } + this.cols.add(elem); + } + + public List getCols() { + return this.cols; + } + + public void setCols(List cols) { + this.cols = cols; + } + + public void unsetCols() { + this.cols = null; + } + + /** Returns true if field cols is set (has been assigned a value) and false otherwise */ + public boolean isSetCols() { + return this.cols != null; + } + + public void setColsIsSet(boolean value) { + if (!value) { + this.cols = null; + } + } + + public String getLocation() { + return this.location; + } + + public void setLocation(String location) { + this.location = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(location); + } + + public void unsetLocation() { + this.location = null; + } + + /** Returns true if field location is set (has been assigned a value) and false otherwise */ + public boolean isSetLocation() { + return this.location != null; + } + + public void setLocationIsSet(boolean value) { + if (!value) { + this.location = null; + } + } + + public String getInputFormat() { + return this.inputFormat; + } + + public void setInputFormat(String inputFormat) { + this.inputFormat = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(inputFormat); + } + + public void unsetInputFormat() { + this.inputFormat = null; + } + + /** Returns true if field inputFormat is set (has been assigned a value) and false otherwise */ + public boolean isSetInputFormat() { + return this.inputFormat != null; + } + + public void setInputFormatIsSet(boolean value) { + if (!value) { + this.inputFormat = null; + } + } + + public String getOutputFormat() { + return this.outputFormat; + } + + public void setOutputFormat(String outputFormat) { + this.outputFormat = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(outputFormat); + } + + public void unsetOutputFormat() { + this.outputFormat = null; + } + + /** Returns true if field outputFormat is set (has been assigned a value) and false otherwise */ + public boolean isSetOutputFormat() { + return this.outputFormat != null; + } + + public void setOutputFormatIsSet(boolean value) { + if (!value) { + this.outputFormat = null; + } + } + + public boolean isCompressed() { + return this.compressed; + } + + public void setCompressed(boolean compressed) { + this.compressed = compressed; + setCompressedIsSet(true); + } + + public void unsetCompressed() { + __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 EncodingUtils.testBit(__isset_bitfield, __COMPRESSED_ISSET_ID); + } + + public void setCompressedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPRESSED_ISSET_ID, value); + } + + public int getNumBuckets() { + return this.numBuckets; + } + + public void setNumBuckets(int numBuckets) { + this.numBuckets = numBuckets; + setNumBucketsIsSet(true); + } + + public void unsetNumBuckets() { + __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 EncodingUtils.testBit(__isset_bitfield, __NUMBUCKETS_ISSET_ID); + } + + public void setNumBucketsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBUCKETS_ISSET_ID, value); + } + + public SerDeInfo getSerdeInfo() { + return this.serdeInfo; + } + + public void setSerdeInfo(SerDeInfo serdeInfo) { + this.serdeInfo = serdeInfo; + } + + public void unsetSerdeInfo() { + this.serdeInfo = null; + } + + /** Returns true if field serdeInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetSerdeInfo() { + return this.serdeInfo != null; + } + + public void setSerdeInfoIsSet(boolean value) { + if (!value) { + this.serdeInfo = null; + } + } + + public int getBucketColsSize() { + return (this.bucketCols == null) ? 0 : this.bucketCols.size(); + } + + public java.util.Iterator getBucketColsIterator() { + return (this.bucketCols == null) ? null : this.bucketCols.iterator(); + } + + public void addToBucketCols(String elem) { + if (this.bucketCols == null) { + this.bucketCols = new ArrayList(); + } + this.bucketCols.add(elem); + } + + public List getBucketCols() { + return this.bucketCols; + } + + public void setBucketCols(List bucketCols) { + this.bucketCols = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(bucketCols); + } + + public void unsetBucketCols() { + this.bucketCols = null; + } + + /** Returns true if field bucketCols is set (has been assigned a value) and false otherwise */ + public boolean isSetBucketCols() { + return this.bucketCols != null; + } + + public void setBucketColsIsSet(boolean value) { + if (!value) { + this.bucketCols = null; + } + } + + public int getSortColsSize() { + return (this.sortCols == null) ? 0 : this.sortCols.size(); + } + + public java.util.Iterator getSortColsIterator() { + return (this.sortCols == null) ? null : this.sortCols.iterator(); + } + + public void addToSortCols(Order elem) { + if (this.sortCols == null) { + this.sortCols = new ArrayList(); + } + this.sortCols.add(elem); + } + + public List getSortCols() { + return this.sortCols; + } + + public void setSortCols(List sortCols) { + this.sortCols = sortCols; + } + + public void unsetSortCols() { + this.sortCols = null; + } + + /** Returns true if field sortCols is set (has been assigned a value) and false otherwise */ + public boolean isSetSortCols() { + return this.sortCols != null; + } + + public void setSortColsIsSet(boolean value) { + if (!value) { + this.sortCols = null; + } + } + + public int getParametersSize() { + return (this.parameters == null) ? 0 : this.parameters.size(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(parameters); + } + + public void unsetParameters() { + this.parameters = null; + } + + /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ + public boolean isSetParameters() { + return this.parameters != null; + } + + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + + public SkewedInfo getSkewedInfo() { + return this.skewedInfo; + } + + public void setSkewedInfo(SkewedInfo skewedInfo) { + this.skewedInfo = skewedInfo; + } + + public void unsetSkewedInfo() { + this.skewedInfo = null; + } + + /** Returns true if field skewedInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetSkewedInfo() { + return this.skewedInfo != null; + } + + public void setSkewedInfoIsSet(boolean value) { + if (!value) { + this.skewedInfo = null; + } + } + + public boolean isStoredAsSubDirectories() { + return this.storedAsSubDirectories; + } + + public void setStoredAsSubDirectories(boolean storedAsSubDirectories) { + this.storedAsSubDirectories = storedAsSubDirectories; + setStoredAsSubDirectoriesIsSet(true); + } + + public void unsetStoredAsSubDirectories() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STOREDASSUBDIRECTORIES_ISSET_ID); + } + + /** Returns true if field storedAsSubDirectories is set (has been assigned a value) and false otherwise */ + public boolean isSetStoredAsSubDirectories() { + return EncodingUtils.testBit(__isset_bitfield, __STOREDASSUBDIRECTORIES_ISSET_ID); + } + + public void setStoredAsSubDirectoriesIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STOREDASSUBDIRECTORIES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case COLS: + if (value == null) { + unsetCols(); + } else { + setCols((List)value); + } + break; + + case LOCATION: + if (value == null) { + unsetLocation(); + } else { + setLocation((String)value); + } + break; + + case INPUT_FORMAT: + if (value == null) { + unsetInputFormat(); + } else { + setInputFormat((String)value); + } + break; + + case OUTPUT_FORMAT: + if (value == null) { + unsetOutputFormat(); + } else { + setOutputFormat((String)value); + } + break; + + case COMPRESSED: + if (value == null) { + unsetCompressed(); + } else { + setCompressed((Boolean)value); + } + break; + + case NUM_BUCKETS: + if (value == null) { + unsetNumBuckets(); + } else { + setNumBuckets((Integer)value); + } + break; + + case SERDE_INFO: + if (value == null) { + unsetSerdeInfo(); + } else { + setSerdeInfo((SerDeInfo)value); + } + break; + + case BUCKET_COLS: + if (value == null) { + unsetBucketCols(); + } else { + setBucketCols((List)value); + } + break; + + case SORT_COLS: + if (value == null) { + unsetSortCols(); + } else { + setSortCols((List)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + case SKEWED_INFO: + if (value == null) { + unsetSkewedInfo(); + } else { + setSkewedInfo((SkewedInfo)value); + } + break; + + case STORED_AS_SUB_DIRECTORIES: + if (value == null) { + unsetStoredAsSubDirectories(); + } else { + setStoredAsSubDirectories((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case COLS: + return getCols(); + + case LOCATION: + return getLocation(); + + case INPUT_FORMAT: + return getInputFormat(); + + case OUTPUT_FORMAT: + return getOutputFormat(); + + case COMPRESSED: + return isCompressed(); + + case NUM_BUCKETS: + return getNumBuckets(); + + case SERDE_INFO: + return getSerdeInfo(); + + case BUCKET_COLS: + return getBucketCols(); + + case SORT_COLS: + return getSortCols(); + + case PARAMETERS: + return getParameters(); + + case SKEWED_INFO: + return getSkewedInfo(); + + case STORED_AS_SUB_DIRECTORIES: + return isStoredAsSubDirectories(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case COLS: + return isSetCols(); + case LOCATION: + return isSetLocation(); + case INPUT_FORMAT: + return isSetInputFormat(); + case OUTPUT_FORMAT: + return isSetOutputFormat(); + case COMPRESSED: + return isSetCompressed(); + case NUM_BUCKETS: + return isSetNumBuckets(); + case SERDE_INFO: + return isSetSerdeInfo(); + case BUCKET_COLS: + return isSetBucketCols(); + case SORT_COLS: + return isSetSortCols(); + case PARAMETERS: + return isSetParameters(); + case SKEWED_INFO: + return isSetSkewedInfo(); + case STORED_AS_SUB_DIRECTORIES: + return isSetStoredAsSubDirectories(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof StorageDescriptor) + return this.equals((StorageDescriptor)that); + return false; + } + + public boolean equals(StorageDescriptor that) { + if (that == null) + return false; + + boolean this_present_cols = true && this.isSetCols(); + boolean that_present_cols = true && that.isSetCols(); + if (this_present_cols || that_present_cols) { + if (!(this_present_cols && that_present_cols)) + return false; + if (!this.cols.equals(that.cols)) + return false; + } + + boolean this_present_location = true && this.isSetLocation(); + boolean that_present_location = true && that.isSetLocation(); + if (this_present_location || that_present_location) { + if (!(this_present_location && that_present_location)) + return false; + if (!this.location.equals(that.location)) + return false; + } + + boolean this_present_inputFormat = true && this.isSetInputFormat(); + boolean that_present_inputFormat = true && that.isSetInputFormat(); + if (this_present_inputFormat || that_present_inputFormat) { + if (!(this_present_inputFormat && that_present_inputFormat)) + return false; + if (!this.inputFormat.equals(that.inputFormat)) + return false; + } + + boolean this_present_outputFormat = true && this.isSetOutputFormat(); + boolean that_present_outputFormat = true && that.isSetOutputFormat(); + if (this_present_outputFormat || that_present_outputFormat) { + if (!(this_present_outputFormat && that_present_outputFormat)) + return false; + if (!this.outputFormat.equals(that.outputFormat)) + return false; + } + + boolean this_present_compressed = true; + boolean that_present_compressed = true; + if (this_present_compressed || that_present_compressed) { + if (!(this_present_compressed && that_present_compressed)) + return false; + if (this.compressed != that.compressed) + return false; + } + + boolean this_present_numBuckets = true; + boolean that_present_numBuckets = true; + if (this_present_numBuckets || that_present_numBuckets) { + if (!(this_present_numBuckets && that_present_numBuckets)) + return false; + if (this.numBuckets != that.numBuckets) + return false; + } + + boolean this_present_serdeInfo = true && this.isSetSerdeInfo(); + boolean that_present_serdeInfo = true && that.isSetSerdeInfo(); + if (this_present_serdeInfo || that_present_serdeInfo) { + if (!(this_present_serdeInfo && that_present_serdeInfo)) + return false; + if (!this.serdeInfo.equals(that.serdeInfo)) + return false; + } + + boolean this_present_bucketCols = true && this.isSetBucketCols(); + boolean that_present_bucketCols = true && that.isSetBucketCols(); + if (this_present_bucketCols || that_present_bucketCols) { + if (!(this_present_bucketCols && that_present_bucketCols)) + return false; + if (!this.bucketCols.equals(that.bucketCols)) + return false; + } + + boolean this_present_sortCols = true && this.isSetSortCols(); + boolean that_present_sortCols = true && that.isSetSortCols(); + if (this_present_sortCols || that_present_sortCols) { + if (!(this_present_sortCols && that_present_sortCols)) + return false; + if (!this.sortCols.equals(that.sortCols)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + boolean this_present_skewedInfo = true && this.isSetSkewedInfo(); + boolean that_present_skewedInfo = true && that.isSetSkewedInfo(); + if (this_present_skewedInfo || that_present_skewedInfo) { + if (!(this_present_skewedInfo && that_present_skewedInfo)) + return false; + if (!this.skewedInfo.equals(that.skewedInfo)) + return false; + } + + boolean this_present_storedAsSubDirectories = true && this.isSetStoredAsSubDirectories(); + boolean that_present_storedAsSubDirectories = true && that.isSetStoredAsSubDirectories(); + if (this_present_storedAsSubDirectories || that_present_storedAsSubDirectories) { + if (!(this_present_storedAsSubDirectories && that_present_storedAsSubDirectories)) + return false; + if (this.storedAsSubDirectories != that.storedAsSubDirectories) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_cols = true && (isSetCols()); + list.add(present_cols); + if (present_cols) + list.add(cols); + + boolean present_location = true && (isSetLocation()); + list.add(present_location); + if (present_location) + list.add(location); + + boolean present_inputFormat = true && (isSetInputFormat()); + list.add(present_inputFormat); + if (present_inputFormat) + list.add(inputFormat); + + boolean present_outputFormat = true && (isSetOutputFormat()); + list.add(present_outputFormat); + if (present_outputFormat) + list.add(outputFormat); + + boolean present_compressed = true; + list.add(present_compressed); + if (present_compressed) + list.add(compressed); + + boolean present_numBuckets = true; + list.add(present_numBuckets); + if (present_numBuckets) + list.add(numBuckets); + + boolean present_serdeInfo = true && (isSetSerdeInfo()); + list.add(present_serdeInfo); + if (present_serdeInfo) + list.add(serdeInfo); + + boolean present_bucketCols = true && (isSetBucketCols()); + list.add(present_bucketCols); + if (present_bucketCols) + list.add(bucketCols); + + boolean present_sortCols = true && (isSetSortCols()); + list.add(present_sortCols); + if (present_sortCols) + list.add(sortCols); + + boolean present_parameters = true && (isSetParameters()); + list.add(present_parameters); + if (present_parameters) + list.add(parameters); + + boolean present_skewedInfo = true && (isSetSkewedInfo()); + list.add(present_skewedInfo); + if (present_skewedInfo) + list.add(skewedInfo); + + boolean present_storedAsSubDirectories = true && (isSetStoredAsSubDirectories()); + list.add(present_storedAsSubDirectories); + if (present_storedAsSubDirectories) + list.add(storedAsSubDirectories); + + return list.hashCode(); + } + + @Override + public int compareTo(StorageDescriptor other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetCols()).compareTo(other.isSetCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCols()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cols, other.cols); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLocation()).compareTo(other.isSetLocation()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLocation()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.location, other.location); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetInputFormat()).compareTo(other.isSetInputFormat()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetInputFormat()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inputFormat, other.inputFormat); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOutputFormat()).compareTo(other.isSetOutputFormat()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOutputFormat()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputFormat, other.outputFormat); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCompressed()).compareTo(other.isSetCompressed()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompressed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressed, other.compressed); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumBuckets()).compareTo(other.isSetNumBuckets()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumBuckets()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numBuckets, other.numBuckets); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSerdeInfo()).compareTo(other.isSetSerdeInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSerdeInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serdeInfo, other.serdeInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBucketCols()).compareTo(other.isSetBucketCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBucketCols()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bucketCols, other.bucketCols); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSortCols()).compareTo(other.isSetSortCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSortCols()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sortCols, other.sortCols); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSkewedInfo()).compareTo(other.isSetSkewedInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSkewedInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skewedInfo, other.skewedInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStoredAsSubDirectories()).compareTo(other.isSetStoredAsSubDirectories()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStoredAsSubDirectories()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storedAsSubDirectories, other.storedAsSubDirectories); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("StorageDescriptor("); + boolean first = true; + + sb.append("cols:"); + if (this.cols == null) { + sb.append("null"); + } else { + sb.append(this.cols); + } + first = false; + if (!first) sb.append(", "); + sb.append("location:"); + if (this.location == null) { + sb.append("null"); + } else { + sb.append(this.location); + } + first = false; + if (!first) sb.append(", "); + sb.append("inputFormat:"); + if (this.inputFormat == null) { + sb.append("null"); + } else { + sb.append(this.inputFormat); + } + first = false; + if (!first) sb.append(", "); + sb.append("outputFormat:"); + if (this.outputFormat == null) { + sb.append("null"); + } else { + sb.append(this.outputFormat); + } + first = false; + if (!first) sb.append(", "); + sb.append("compressed:"); + sb.append(this.compressed); + first = false; + if (!first) sb.append(", "); + sb.append("numBuckets:"); + sb.append(this.numBuckets); + first = false; + if (!first) sb.append(", "); + sb.append("serdeInfo:"); + if (this.serdeInfo == null) { + sb.append("null"); + } else { + sb.append(this.serdeInfo); + } + first = false; + if (!first) sb.append(", "); + sb.append("bucketCols:"); + if (this.bucketCols == null) { + sb.append("null"); + } else { + sb.append(this.bucketCols); + } + first = false; + if (!first) sb.append(", "); + sb.append("sortCols:"); + if (this.sortCols == null) { + sb.append("null"); + } else { + sb.append(this.sortCols); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + first = false; + if (isSetSkewedInfo()) { + if (!first) sb.append(", "); + sb.append("skewedInfo:"); + if (this.skewedInfo == null) { + sb.append("null"); + } else { + sb.append(this.skewedInfo); + } + first = false; + } + if (isSetStoredAsSubDirectories()) { + if (!first) sb.append(", "); + sb.append("storedAsSubDirectories:"); + sb.append(this.storedAsSubDirectories); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 { + // 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 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 _list156 = iprot.readListBegin(); + struct.cols = new ArrayList(_list156.size); + FieldSchema _elem157; + for (int _i158 = 0; _i158 < _list156.size; ++_i158) + { + _elem157 = new FieldSchema(); + _elem157.read(iprot); + struct.cols.add(_elem157); + } + 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 _list159 = iprot.readListBegin(); + struct.bucketCols = new ArrayList(_list159.size); + String _elem160; + for (int _i161 = 0; _i161 < _list159.size; ++_i161) + { + _elem160 = iprot.readString(); + struct.bucketCols.add(_elem160); + } + 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 _list162 = iprot.readListBegin(); + struct.sortCols = new ArrayList(_list162.size); + Order _elem163; + for (int _i164 = 0; _i164 < _list162.size; ++_i164) + { + _elem163 = new Order(); + _elem163.read(iprot); + struct.sortCols.add(_elem163); + } + 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 _map165 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map165.size); + String _key166; + String _val167; + for (int _i168 = 0; _i168 < _map165.size; ++_i168) + { + _key166 = iprot.readString(); + _val167 = iprot.readString(); + struct.parameters.put(_key166, _val167); + } + 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; + case 12: // STORED_AS_SUB_DIRECTORIES + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.storedAsSubDirectories = iprot.readBool(); + struct.setStoredAsSubDirectoriesIsSet(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 _iter169 : struct.cols) + { + _iter169.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 _iter170 : struct.bucketCols) + { + oprot.writeString(_iter170); + } + 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 _iter171 : struct.sortCols) + { + _iter171.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 _iter172 : struct.parameters.entrySet()) + { + oprot.writeString(_iter172.getKey()); + oprot.writeString(_iter172.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.skewedInfo != null) { + if (struct.isSetSkewedInfo()) { + oprot.writeFieldBegin(SKEWED_INFO_FIELD_DESC); + struct.skewedInfo.write(oprot); + oprot.writeFieldEnd(); + } + } + if (struct.isSetStoredAsSubDirectories()) { + oprot.writeFieldBegin(STORED_AS_SUB_DIRECTORIES_FIELD_DESC); + oprot.writeBool(struct.storedAsSubDirectories); + 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); + } + if (struct.isSetStoredAsSubDirectories()) { + optionals.set(11); + } + oprot.writeBitSet(optionals, 12); + if (struct.isSetCols()) { + { + oprot.writeI32(struct.cols.size()); + for (FieldSchema _iter173 : struct.cols) + { + _iter173.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 _iter174 : struct.bucketCols) + { + oprot.writeString(_iter174); + } + } + } + if (struct.isSetSortCols()) { + { + oprot.writeI32(struct.sortCols.size()); + for (Order _iter175 : struct.sortCols) + { + _iter175.write(oprot); + } + } + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter176 : struct.parameters.entrySet()) + { + oprot.writeString(_iter176.getKey()); + oprot.writeString(_iter176.getValue()); + } + } + } + if (struct.isSetSkewedInfo()) { + struct.skewedInfo.write(oprot); + } + if (struct.isSetStoredAsSubDirectories()) { + oprot.writeBool(struct.storedAsSubDirectories); + } + } + + @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(12); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list177 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.cols = new ArrayList(_list177.size); + FieldSchema _elem178; + for (int _i179 = 0; _i179 < _list177.size; ++_i179) + { + _elem178 = new FieldSchema(); + _elem178.read(iprot); + struct.cols.add(_elem178); + } + } + 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 _list180 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.bucketCols = new ArrayList(_list180.size); + String _elem181; + for (int _i182 = 0; _i182 < _list180.size; ++_i182) + { + _elem181 = iprot.readString(); + struct.bucketCols.add(_elem181); + } + } + struct.setBucketColsIsSet(true); + } + if (incoming.get(8)) { + { + org.apache.thrift.protocol.TList _list183 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.sortCols = new ArrayList(_list183.size); + Order _elem184; + for (int _i185 = 0; _i185 < _list183.size; ++_i185) + { + _elem184 = new Order(); + _elem184.read(iprot); + struct.sortCols.add(_elem184); + } + } + struct.setSortColsIsSet(true); + } + if (incoming.get(9)) { + { + org.apache.thrift.protocol.TMap _map186 = 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*_map186.size); + String _key187; + String _val188; + for (int _i189 = 0; _i189 < _map186.size; ++_i189) + { + _key187 = iprot.readString(); + _val188 = iprot.readString(); + struct.parameters.put(_key187, _val188); + } + } + struct.setParametersIsSet(true); + } + if (incoming.get(10)) { + struct.skewedInfo = new SkewedInfo(); + struct.skewedInfo.read(iprot); + struct.setSkewedInfoIsSet(true); + } + if (incoming.get(11)) { + struct.storedAsSubDirectories = iprot.readBool(); + struct.setStoredAsSubDirectoriesIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java new file mode 100644 index 0000000..c9afe87 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java @@ -0,0 +1,782 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class StringColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StringColumnStatsData"); + + private static final org.apache.thrift.protocol.TField MAX_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("maxColLen", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField AVG_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("avgColLen", org.apache.thrift.protocol.TType.DOUBLE, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField BIT_VECTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("bitVectors", org.apache.thrift.protocol.TType.STRING, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new StringColumnStatsDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new StringColumnStatsDataTupleSchemeFactory()); + } + + private long maxColLen; // required + private double avgColLen; // required + private long numNulls; // required + private long numDVs; // required + private String bitVectors; // 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 { + MAX_COL_LEN((short)1, "maxColLen"), + AVG_COL_LEN((short)2, "avgColLen"), + NUM_NULLS((short)3, "numNulls"), + NUM_DVS((short)4, "numDVs"), + BIT_VECTORS((short)5, "bitVectors"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MAX_COL_LEN + return MAX_COL_LEN; + case 2: // AVG_COL_LEN + return AVG_COL_LEN; + case 3: // NUM_NULLS + return NUM_NULLS; + case 4: // NUM_DVS + return NUM_DVS; + case 5: // BIT_VECTORS + return BIT_VECTORS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAXCOLLEN_ISSET_ID = 0; + private static final int __AVGCOLLEN_ISSET_ID = 1; + private static final int __NUMNULLS_ISSET_ID = 2; + private static final int __NUMDVS_ISSET_ID = 3; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.BIT_VECTORS}; + 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); + tmpMap.put(_Fields.MAX_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("maxColLen", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.AVG_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("avgColLen", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.BIT_VECTORS, new org.apache.thrift.meta_data.FieldMetaData("bitVectors", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StringColumnStatsData.class, metaDataMap); + } + + public StringColumnStatsData() { + } + + public StringColumnStatsData( + long maxColLen, + double avgColLen, + long numNulls, + long numDVs) + { + this(); + this.maxColLen = maxColLen; + setMaxColLenIsSet(true); + this.avgColLen = avgColLen; + setAvgColLenIsSet(true); + this.numNulls = numNulls; + setNumNullsIsSet(true); + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public StringColumnStatsData(StringColumnStatsData other) { + __isset_bitfield = other.__isset_bitfield; + this.maxColLen = other.maxColLen; + this.avgColLen = other.avgColLen; + this.numNulls = other.numNulls; + this.numDVs = other.numDVs; + if (other.isSetBitVectors()) { + this.bitVectors = other.bitVectors; + } + } + + public StringColumnStatsData deepCopy() { + return new StringColumnStatsData(this); + } + + @Override + public void clear() { + setMaxColLenIsSet(false); + this.maxColLen = 0; + setAvgColLenIsSet(false); + this.avgColLen = 0.0; + setNumNullsIsSet(false); + this.numNulls = 0; + setNumDVsIsSet(false); + this.numDVs = 0; + this.bitVectors = null; + } + + public long getMaxColLen() { + return this.maxColLen; + } + + public void setMaxColLen(long maxColLen) { + this.maxColLen = maxColLen; + setMaxColLenIsSet(true); + } + + public void unsetMaxColLen() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID); + } + + /** Returns true if field maxColLen is set (has been assigned a value) and false otherwise */ + public boolean isSetMaxColLen() { + return EncodingUtils.testBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID); + } + + public void setMaxColLenIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXCOLLEN_ISSET_ID, value); + } + + public double getAvgColLen() { + return this.avgColLen; + } + + public void setAvgColLen(double avgColLen) { + this.avgColLen = avgColLen; + setAvgColLenIsSet(true); + } + + public void unsetAvgColLen() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID); + } + + /** Returns true if field avgColLen is set (has been assigned a value) and false otherwise */ + public boolean isSetAvgColLen() { + return EncodingUtils.testBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID); + } + + public void setAvgColLenIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AVGCOLLEN_ISSET_ID, value); + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value); + } + + public long getNumDVs() { + return this.numDVs; + } + + public void setNumDVs(long numDVs) { + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + public void unsetNumDVs() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID); + } + + /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ + public boolean isSetNumDVs() { + return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID); + } + + public void setNumDVsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value); + } + + public String getBitVectors() { + return this.bitVectors; + } + + public void setBitVectors(String bitVectors) { + this.bitVectors = bitVectors; + } + + public void unsetBitVectors() { + this.bitVectors = null; + } + + /** Returns true if field bitVectors is set (has been assigned a value) and false otherwise */ + public boolean isSetBitVectors() { + return this.bitVectors != null; + } + + public void setBitVectorsIsSet(boolean value) { + if (!value) { + this.bitVectors = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MAX_COL_LEN: + if (value == null) { + unsetMaxColLen(); + } else { + setMaxColLen((Long)value); + } + break; + + case AVG_COL_LEN: + if (value == null) { + unsetAvgColLen(); + } else { + setAvgColLen((Double)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + case NUM_DVS: + if (value == null) { + unsetNumDVs(); + } else { + setNumDVs((Long)value); + } + break; + + case BIT_VECTORS: + if (value == null) { + unsetBitVectors(); + } else { + setBitVectors((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MAX_COL_LEN: + return getMaxColLen(); + + case AVG_COL_LEN: + return getAvgColLen(); + + case NUM_NULLS: + return getNumNulls(); + + case NUM_DVS: + return getNumDVs(); + + case BIT_VECTORS: + return getBitVectors(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MAX_COL_LEN: + return isSetMaxColLen(); + case AVG_COL_LEN: + return isSetAvgColLen(); + case NUM_NULLS: + return isSetNumNulls(); + case NUM_DVS: + return isSetNumDVs(); + case BIT_VECTORS: + return isSetBitVectors(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof StringColumnStatsData) + return this.equals((StringColumnStatsData)that); + return false; + } + + public boolean equals(StringColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_maxColLen = true; + boolean that_present_maxColLen = true; + if (this_present_maxColLen || that_present_maxColLen) { + if (!(this_present_maxColLen && that_present_maxColLen)) + return false; + if (this.maxColLen != that.maxColLen) + return false; + } + + boolean this_present_avgColLen = true; + boolean that_present_avgColLen = true; + if (this_present_avgColLen || that_present_avgColLen) { + if (!(this_present_avgColLen && that_present_avgColLen)) + return false; + if (this.avgColLen != that.avgColLen) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + boolean this_present_numDVs = true; + boolean that_present_numDVs = true; + if (this_present_numDVs || that_present_numDVs) { + if (!(this_present_numDVs && that_present_numDVs)) + return false; + if (this.numDVs != that.numDVs) + return false; + } + + boolean this_present_bitVectors = true && this.isSetBitVectors(); + boolean that_present_bitVectors = true && that.isSetBitVectors(); + if (this_present_bitVectors || that_present_bitVectors) { + if (!(this_present_bitVectors && that_present_bitVectors)) + return false; + if (!this.bitVectors.equals(that.bitVectors)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_maxColLen = true; + list.add(present_maxColLen); + if (present_maxColLen) + list.add(maxColLen); + + boolean present_avgColLen = true; + list.add(present_avgColLen); + if (present_avgColLen) + list.add(avgColLen); + + boolean present_numNulls = true; + list.add(present_numNulls); + if (present_numNulls) + list.add(numNulls); + + boolean present_numDVs = true; + list.add(present_numDVs); + if (present_numDVs) + list.add(numDVs); + + boolean present_bitVectors = true && (isSetBitVectors()); + list.add(present_bitVectors); + if (present_bitVectors) + list.add(bitVectors); + + return list.hashCode(); + } + + @Override + public int compareTo(StringColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMaxColLen()).compareTo(other.isSetMaxColLen()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxColLen()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxColLen, other.maxColLen); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAvgColLen()).compareTo(other.isSetAvgColLen()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAvgColLen()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.avgColLen, other.avgColLen); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(other.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, other.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(other.isSetNumDVs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumDVs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, other.numDVs); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBitVectors()).compareTo(other.isSetBitVectors()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBitVectors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitVectors, other.bitVectors); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("StringColumnStatsData("); + boolean first = true; + + sb.append("maxColLen:"); + sb.append(this.maxColLen); + first = false; + if (!first) sb.append(", "); + sb.append("avgColLen:"); + sb.append(this.avgColLen); + first = false; + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + if (!first) sb.append(", "); + sb.append("numDVs:"); + sb.append(this.numDVs); + first = false; + if (isSetBitVectors()) { + if (!first) sb.append(", "); + sb.append("bitVectors:"); + if (this.bitVectors == null) { + sb.append("null"); + } else { + sb.append(this.bitVectors); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetMaxColLen()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxColLen' is unset! Struct:" + toString()); + } + + if (!isSetAvgColLen()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'avgColLen' is unset! Struct:" + toString()); + } + + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + if (!isSetNumDVs()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); + } + + // 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 { + // 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 StringColumnStatsDataStandardSchemeFactory implements SchemeFactory { + public StringColumnStatsDataStandardScheme getScheme() { + return new StringColumnStatsDataStandardScheme(); + } + } + + private static class StringColumnStatsDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, StringColumnStatsData 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: // MAX_COL_LEN + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.maxColLen = iprot.readI64(); + struct.setMaxColLenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // AVG_COL_LEN + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.avgColLen = iprot.readDouble(); + struct.setAvgColLenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NUM_NULLS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NUM_DVS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // BIT_VECTORS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(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, StringColumnStatsData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(MAX_COL_LEN_FIELD_DESC); + oprot.writeI64(struct.maxColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(AVG_COL_LEN_FIELD_DESC); + oprot.writeDouble(struct.avgColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(struct.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); + oprot.writeI64(struct.numDVs); + oprot.writeFieldEnd(); + if (struct.bitVectors != null) { + if (struct.isSetBitVectors()) { + oprot.writeFieldBegin(BIT_VECTORS_FIELD_DESC); + oprot.writeString(struct.bitVectors); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class StringColumnStatsDataTupleSchemeFactory implements SchemeFactory { + public StringColumnStatsDataTupleScheme getScheme() { + return new StringColumnStatsDataTupleScheme(); + } + } + + private static class StringColumnStatsDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, StringColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.maxColLen); + oprot.writeDouble(struct.avgColLen); + oprot.writeI64(struct.numNulls); + oprot.writeI64(struct.numDVs); + BitSet optionals = new BitSet(); + if (struct.isSetBitVectors()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetBitVectors()) { + oprot.writeString(struct.bitVectors); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, StringColumnStatsData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.maxColLen = iprot.readI64(); + struct.setMaxColLenIsSet(true); + struct.avgColLen = iprot.readDouble(); + struct.setAvgColLenIsSet(true); + struct.numNulls = iprot.readI64(); + struct.setNumNullsIsSet(true); + struct.numDVs = iprot.readI64(); + struct.setNumDVsIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.bitVectors = iprot.readString(); + struct.setBitVectorsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java new file mode 100644 index 0000000..800219f --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java @@ -0,0 +1,1948 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class Table implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable
{ + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Table"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)3); + 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)4); + private static final org.apache.thrift.protocol.TField LAST_ACCESS_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAccessTime", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField RETENTION_FIELD_DESC = new org.apache.thrift.protocol.TField("retention", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField SD_FIELD_DESC = new org.apache.thrift.protocol.TField("sd", org.apache.thrift.protocol.TType.STRUCT, (short)7); + private static final org.apache.thrift.protocol.TField PARTITION_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionKeys", org.apache.thrift.protocol.TType.LIST, (short)8); + 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 VIEW_ORIGINAL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("viewOriginalText", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField VIEW_EXPANDED_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("viewExpandedText", org.apache.thrift.protocol.TType.STRING, (short)11); + 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 org.apache.thrift.protocol.TField TEMPORARY_FIELD_DESC = new org.apache.thrift.protocol.TField("temporary", org.apache.thrift.protocol.TType.BOOL, (short)14); + private static final org.apache.thrift.protocol.TField REWRITE_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("rewriteEnabled", org.apache.thrift.protocol.TType.BOOL, (short)15); + + 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 + private int createTime; // required + private int lastAccessTime; // required + private int retention; // required + private StorageDescriptor sd; // required + private List partitionKeys; // required + private Map parameters; // required + private String viewOriginalText; // required + private String viewExpandedText; // required + private String tableType; // required + private PrincipalPrivilegeSet privileges; // optional + private boolean temporary; // optional + private boolean rewriteEnabled; // 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 { + TABLE_NAME((short)1, "tableName"), + DB_NAME((short)2, "dbName"), + OWNER((short)3, "owner"), + CREATE_TIME((short)4, "createTime"), + LAST_ACCESS_TIME((short)5, "lastAccessTime"), + RETENTION((short)6, "retention"), + SD((short)7, "sd"), + PARTITION_KEYS((short)8, "partitionKeys"), + PARAMETERS((short)9, "parameters"), + VIEW_ORIGINAL_TEXT((short)10, "viewOriginalText"), + VIEW_EXPANDED_TEXT((short)11, "viewExpandedText"), + TABLE_TYPE((short)12, "tableType"), + PRIVILEGES((short)13, "privileges"), + TEMPORARY((short)14, "temporary"), + REWRITE_ENABLED((short)15, "rewriteEnabled"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // DB_NAME + return DB_NAME; + case 3: // OWNER + return OWNER; + case 4: // CREATE_TIME + return CREATE_TIME; + case 5: // LAST_ACCESS_TIME + return LAST_ACCESS_TIME; + case 6: // RETENTION + return RETENTION; + case 7: // SD + return SD; + case 8: // PARTITION_KEYS + return PARTITION_KEYS; + case 9: // PARAMETERS + return PARAMETERS; + case 10: // VIEW_ORIGINAL_TEXT + return VIEW_ORIGINAL_TEXT; + case 11: // VIEW_EXPANDED_TEXT + return VIEW_EXPANDED_TEXT; + case 12: // TABLE_TYPE + return TABLE_TYPE; + case 13: // PRIVILEGES + return PRIVILEGES; + case 14: // TEMPORARY + return TEMPORARY; + case 15: // REWRITE_ENABLED + return REWRITE_ENABLED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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 static final int __TEMPORARY_ISSET_ID = 3; + private static final int __REWRITEENABLED_ISSET_ID = 4; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.PRIVILEGES,_Fields.TEMPORARY,_Fields.REWRITE_ENABLED}; + 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); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.LAST_ACCESS_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastAccessTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.RETENTION, new org.apache.thrift.meta_data.FieldMetaData("retention", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.SD, new org.apache.thrift.meta_data.FieldMetaData("sd", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StorageDescriptor.class))); + tmpMap.put(_Fields.PARTITION_KEYS, new org.apache.thrift.meta_data.FieldMetaData("partitionKeys", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); + tmpMap.put(_Fields.PARAMETERS, new org.apache.thrift.meta_data.FieldMetaData("parameters", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.VIEW_ORIGINAL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("viewOriginalText", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.VIEW_EXPANDED_TEXT, new org.apache.thrift.meta_data.FieldMetaData("viewExpandedText", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("tableType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrincipalPrivilegeSet.class))); + tmpMap.put(_Fields.TEMPORARY, new org.apache.thrift.meta_data.FieldMetaData("temporary", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.REWRITE_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("rewriteEnabled", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Table.class, metaDataMap); + } + + public Table() { + this.temporary = false; + + } + + public Table( + String tableName, + String dbName, + String owner, + int createTime, + int lastAccessTime, + int retention, + StorageDescriptor sd, + List partitionKeys, + Map parameters, + String viewOriginalText, + String viewExpandedText, + String tableType) + { + this(); + this.tableName = tableName; + this.dbName = dbName; + this.owner = owner; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + this.retention = retention; + setRetentionIsSet(true); + this.sd = sd; + this.partitionKeys = partitionKeys; + this.parameters = parameters; + this.viewOriginalText = viewOriginalText; + this.viewExpandedText = viewExpandedText; + this.tableType = tableType; + } + + /** + * Performs a deep copy on other. + */ + public Table(Table other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetOwner()) { + this.owner = other.owner; + } + this.createTime = other.createTime; + this.lastAccessTime = other.lastAccessTime; + this.retention = other.retention; + if (other.isSetSd()) { + this.sd = new StorageDescriptor(other.sd); + } + if (other.isSetPartitionKeys()) { + List __this__partitionKeys = new ArrayList(other.partitionKeys.size()); + for (FieldSchema other_element : other.partitionKeys) { + __this__partitionKeys.add(new FieldSchema(other_element)); + } + this.partitionKeys = __this__partitionKeys; + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(other.parameters); + this.parameters = __this__parameters; + } + if (other.isSetViewOriginalText()) { + this.viewOriginalText = other.viewOriginalText; + } + if (other.isSetViewExpandedText()) { + this.viewExpandedText = other.viewExpandedText; + } + if (other.isSetTableType()) { + this.tableType = other.tableType; + } + if (other.isSetPrivileges()) { + this.privileges = new PrincipalPrivilegeSet(other.privileges); + } + this.temporary = other.temporary; + this.rewriteEnabled = other.rewriteEnabled; + } + + public Table deepCopy() { + return new Table(this); + } + + @Override + public void clear() { + this.tableName = null; + this.dbName = null; + this.owner = null; + setCreateTimeIsSet(false); + this.createTime = 0; + setLastAccessTimeIsSet(false); + this.lastAccessTime = 0; + setRetentionIsSet(false); + this.retention = 0; + this.sd = null; + this.partitionKeys = null; + this.parameters = null; + this.viewOriginalText = null; + this.viewExpandedText = null; + this.tableType = null; + this.privileges = null; + this.temporary = false; + + setRewriteEnabledIsSet(false); + this.rewriteEnabled = false; + } + + public String getTableName() { + return this.tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getOwner() { + return this.owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public void unsetOwner() { + this.owner = null; + } + + /** Returns true if field owner is set (has been assigned a value) and false otherwise */ + public boolean isSetOwner() { + return this.owner != null; + } + + public void setOwnerIsSet(boolean value) { + if (!value) { + this.owner = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + public int getLastAccessTime() { + return this.lastAccessTime; + } + + public void setLastAccessTime(int lastAccessTime) { + this.lastAccessTime = lastAccessTime; + setLastAccessTimeIsSet(true); + } + + public void unsetLastAccessTime() { + __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 EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID); + } + + public void setLastAccessTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value); + } + + public int getRetention() { + return this.retention; + } + + public void setRetention(int retention) { + this.retention = retention; + setRetentionIsSet(true); + } + + public void unsetRetention() { + __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 EncodingUtils.testBit(__isset_bitfield, __RETENTION_ISSET_ID); + } + + public void setRetentionIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETENTION_ISSET_ID, value); + } + + public StorageDescriptor getSd() { + return this.sd; + } + + public void setSd(StorageDescriptor sd) { + this.sd = sd; + } + + public void unsetSd() { + this.sd = null; + } + + /** Returns true if field sd is set (has been assigned a value) and false otherwise */ + public boolean isSetSd() { + return this.sd != null; + } + + public void setSdIsSet(boolean value) { + if (!value) { + this.sd = null; + } + } + + public int getPartitionKeysSize() { + return (this.partitionKeys == null) ? 0 : this.partitionKeys.size(); + } + + public java.util.Iterator getPartitionKeysIterator() { + return (this.partitionKeys == null) ? null : this.partitionKeys.iterator(); + } + + public void addToPartitionKeys(FieldSchema elem) { + if (this.partitionKeys == null) { + this.partitionKeys = new ArrayList(); + } + this.partitionKeys.add(elem); + } + + public List getPartitionKeys() { + return this.partitionKeys; + } + + public void setPartitionKeys(List partitionKeys) { + this.partitionKeys = partitionKeys; + } + + public void unsetPartitionKeys() { + this.partitionKeys = null; + } + + /** Returns true if field partitionKeys is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitionKeys() { + return this.partitionKeys != null; + } + + public void setPartitionKeysIsSet(boolean value) { + if (!value) { + this.partitionKeys = null; + } + } + + public int getParametersSize() { + return (this.parameters == null) ? 0 : this.parameters.size(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = parameters; + } + + public void unsetParameters() { + this.parameters = null; + } + + /** Returns true if field parameters is set (has been assigned a value) and false otherwise */ + public boolean isSetParameters() { + return this.parameters != null; + } + + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + + public String getViewOriginalText() { + return this.viewOriginalText; + } + + public void setViewOriginalText(String viewOriginalText) { + this.viewOriginalText = viewOriginalText; + } + + public void unsetViewOriginalText() { + this.viewOriginalText = null; + } + + /** Returns true if field viewOriginalText is set (has been assigned a value) and false otherwise */ + public boolean isSetViewOriginalText() { + return this.viewOriginalText != null; + } + + public void setViewOriginalTextIsSet(boolean value) { + if (!value) { + this.viewOriginalText = null; + } + } + + public String getViewExpandedText() { + return this.viewExpandedText; + } + + public void setViewExpandedText(String viewExpandedText) { + this.viewExpandedText = viewExpandedText; + } + + public void unsetViewExpandedText() { + this.viewExpandedText = null; + } + + /** Returns true if field viewExpandedText is set (has been assigned a value) and false otherwise */ + public boolean isSetViewExpandedText() { + return this.viewExpandedText != null; + } + + public void setViewExpandedTextIsSet(boolean value) { + if (!value) { + this.viewExpandedText = null; + } + } + + public String getTableType() { + return this.tableType; + } + + public void setTableType(String tableType) { + this.tableType = tableType; + } + + public void unsetTableType() { + this.tableType = null; + } + + /** Returns true if field tableType is set (has been assigned a value) and false otherwise */ + public boolean isSetTableType() { + return this.tableType != null; + } + + public void setTableTypeIsSet(boolean value) { + if (!value) { + this.tableType = null; + } + } + + public PrincipalPrivilegeSet getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrincipalPrivilegeSet privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public boolean isTemporary() { + return this.temporary; + } + + public void setTemporary(boolean temporary) { + this.temporary = temporary; + setTemporaryIsSet(true); + } + + public void unsetTemporary() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TEMPORARY_ISSET_ID); + } + + /** Returns true if field temporary is set (has been assigned a value) and false otherwise */ + public boolean isSetTemporary() { + return EncodingUtils.testBit(__isset_bitfield, __TEMPORARY_ISSET_ID); + } + + public void setTemporaryIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TEMPORARY_ISSET_ID, value); + } + + public boolean isRewriteEnabled() { + return this.rewriteEnabled; + } + + public void setRewriteEnabled(boolean rewriteEnabled) { + this.rewriteEnabled = rewriteEnabled; + setRewriteEnabledIsSet(true); + } + + public void unsetRewriteEnabled() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REWRITEENABLED_ISSET_ID); + } + + /** Returns true if field rewriteEnabled is set (has been assigned a value) and false otherwise */ + public boolean isSetRewriteEnabled() { + return EncodingUtils.testBit(__isset_bitfield, __REWRITEENABLED_ISSET_ID); + } + + public void setRewriteEnabledIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REWRITEENABLED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case OWNER: + if (value == null) { + unsetOwner(); + } else { + setOwner((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case LAST_ACCESS_TIME: + if (value == null) { + unsetLastAccessTime(); + } else { + setLastAccessTime((Integer)value); + } + break; + + case RETENTION: + if (value == null) { + unsetRetention(); + } else { + setRetention((Integer)value); + } + break; + + case SD: + if (value == null) { + unsetSd(); + } else { + setSd((StorageDescriptor)value); + } + break; + + case PARTITION_KEYS: + if (value == null) { + unsetPartitionKeys(); + } else { + setPartitionKeys((List)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + case VIEW_ORIGINAL_TEXT: + if (value == null) { + unsetViewOriginalText(); + } else { + setViewOriginalText((String)value); + } + break; + + case VIEW_EXPANDED_TEXT: + if (value == null) { + unsetViewExpandedText(); + } else { + setViewExpandedText((String)value); + } + break; + + case TABLE_TYPE: + if (value == null) { + unsetTableType(); + } else { + setTableType((String)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrincipalPrivilegeSet)value); + } + break; + + case TEMPORARY: + if (value == null) { + unsetTemporary(); + } else { + setTemporary((Boolean)value); + } + break; + + case REWRITE_ENABLED: + if (value == null) { + unsetRewriteEnabled(); + } else { + setRewriteEnabled((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case DB_NAME: + return getDbName(); + + case OWNER: + return getOwner(); + + case CREATE_TIME: + return getCreateTime(); + + case LAST_ACCESS_TIME: + return getLastAccessTime(); + + case RETENTION: + return getRetention(); + + case SD: + return getSd(); + + case PARTITION_KEYS: + return getPartitionKeys(); + + case PARAMETERS: + return getParameters(); + + case VIEW_ORIGINAL_TEXT: + return getViewOriginalText(); + + case VIEW_EXPANDED_TEXT: + return getViewExpandedText(); + + case TABLE_TYPE: + return getTableType(); + + case PRIVILEGES: + return getPrivileges(); + + case TEMPORARY: + return isTemporary(); + + case REWRITE_ENABLED: + return isRewriteEnabled(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case DB_NAME: + return isSetDbName(); + case OWNER: + return isSetOwner(); + case CREATE_TIME: + return isSetCreateTime(); + case LAST_ACCESS_TIME: + return isSetLastAccessTime(); + case RETENTION: + return isSetRetention(); + case SD: + return isSetSd(); + case PARTITION_KEYS: + return isSetPartitionKeys(); + case PARAMETERS: + return isSetParameters(); + case VIEW_ORIGINAL_TEXT: + return isSetViewOriginalText(); + case VIEW_EXPANDED_TEXT: + return isSetViewExpandedText(); + case TABLE_TYPE: + return isSetTableType(); + case PRIVILEGES: + return isSetPrivileges(); + case TEMPORARY: + return isSetTemporary(); + case REWRITE_ENABLED: + return isSetRewriteEnabled(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Table) + return this.equals((Table)that); + return false; + } + + public boolean equals(Table that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_owner = true && this.isSetOwner(); + boolean that_present_owner = true && that.isSetOwner(); + if (this_present_owner || that_present_owner) { + if (!(this_present_owner && that_present_owner)) + return false; + if (!this.owner.equals(that.owner)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_lastAccessTime = true; + boolean that_present_lastAccessTime = true; + if (this_present_lastAccessTime || that_present_lastAccessTime) { + if (!(this_present_lastAccessTime && that_present_lastAccessTime)) + return false; + if (this.lastAccessTime != that.lastAccessTime) + return false; + } + + boolean this_present_retention = true; + boolean that_present_retention = true; + if (this_present_retention || that_present_retention) { + if (!(this_present_retention && that_present_retention)) + return false; + if (this.retention != that.retention) + return false; + } + + boolean this_present_sd = true && this.isSetSd(); + boolean that_present_sd = true && that.isSetSd(); + if (this_present_sd || that_present_sd) { + if (!(this_present_sd && that_present_sd)) + return false; + if (!this.sd.equals(that.sd)) + return false; + } + + boolean this_present_partitionKeys = true && this.isSetPartitionKeys(); + boolean that_present_partitionKeys = true && that.isSetPartitionKeys(); + if (this_present_partitionKeys || that_present_partitionKeys) { + if (!(this_present_partitionKeys && that_present_partitionKeys)) + return false; + if (!this.partitionKeys.equals(that.partitionKeys)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + boolean this_present_viewOriginalText = true && this.isSetViewOriginalText(); + boolean that_present_viewOriginalText = true && that.isSetViewOriginalText(); + if (this_present_viewOriginalText || that_present_viewOriginalText) { + if (!(this_present_viewOriginalText && that_present_viewOriginalText)) + return false; + if (!this.viewOriginalText.equals(that.viewOriginalText)) + return false; + } + + boolean this_present_viewExpandedText = true && this.isSetViewExpandedText(); + boolean that_present_viewExpandedText = true && that.isSetViewExpandedText(); + if (this_present_viewExpandedText || that_present_viewExpandedText) { + if (!(this_present_viewExpandedText && that_present_viewExpandedText)) + return false; + if (!this.viewExpandedText.equals(that.viewExpandedText)) + return false; + } + + boolean this_present_tableType = true && this.isSetTableType(); + boolean that_present_tableType = true && that.isSetTableType(); + if (this_present_tableType || that_present_tableType) { + if (!(this_present_tableType && that_present_tableType)) + return false; + if (!this.tableType.equals(that.tableType)) + return false; + } + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + boolean this_present_temporary = true && this.isSetTemporary(); + boolean that_present_temporary = true && that.isSetTemporary(); + if (this_present_temporary || that_present_temporary) { + if (!(this_present_temporary && that_present_temporary)) + return false; + if (this.temporary != that.temporary) + return false; + } + + boolean this_present_rewriteEnabled = true && this.isSetRewriteEnabled(); + boolean that_present_rewriteEnabled = true && that.isSetRewriteEnabled(); + if (this_present_rewriteEnabled || that_present_rewriteEnabled) { + if (!(this_present_rewriteEnabled && that_present_rewriteEnabled)) + return false; + if (this.rewriteEnabled != that.rewriteEnabled) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_owner = true && (isSetOwner()); + list.add(present_owner); + if (present_owner) + list.add(owner); + + boolean present_createTime = true; + list.add(present_createTime); + if (present_createTime) + list.add(createTime); + + boolean present_lastAccessTime = true; + list.add(present_lastAccessTime); + if (present_lastAccessTime) + list.add(lastAccessTime); + + boolean present_retention = true; + list.add(present_retention); + if (present_retention) + list.add(retention); + + boolean present_sd = true && (isSetSd()); + list.add(present_sd); + if (present_sd) + list.add(sd); + + boolean present_partitionKeys = true && (isSetPartitionKeys()); + list.add(present_partitionKeys); + if (present_partitionKeys) + list.add(partitionKeys); + + boolean present_parameters = true && (isSetParameters()); + list.add(present_parameters); + if (present_parameters) + list.add(parameters); + + boolean present_viewOriginalText = true && (isSetViewOriginalText()); + list.add(present_viewOriginalText); + if (present_viewOriginalText) + list.add(viewOriginalText); + + boolean present_viewExpandedText = true && (isSetViewExpandedText()); + list.add(present_viewExpandedText); + if (present_viewExpandedText) + list.add(viewExpandedText); + + boolean present_tableType = true && (isSetTableType()); + list.add(present_tableType); + if (present_tableType) + list.add(tableType); + + boolean present_privileges = true && (isSetPrivileges()); + list.add(present_privileges); + if (present_privileges) + list.add(privileges); + + boolean present_temporary = true && (isSetTemporary()); + list.add(present_temporary); + if (present_temporary) + list.add(temporary); + + boolean present_rewriteEnabled = true && (isSetRewriteEnabled()); + list.add(present_rewriteEnabled); + if (present_rewriteEnabled) + list.add(rewriteEnabled); + + return list.hashCode(); + } + + @Override + public int compareTo(Table other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwner()).compareTo(other.isSetOwner()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwner()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, other.owner); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(other.isSetLastAccessTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastAccessTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastAccessTime, other.lastAccessTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRetention()).compareTo(other.isSetRetention()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRetention()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.retention, other.retention); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSd()).compareTo(other.isSetSd()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSd()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sd, other.sd); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartitionKeys()).compareTo(other.isSetPartitionKeys()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionKeys()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionKeys, other.partitionKeys); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(other.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetViewOriginalText()).compareTo(other.isSetViewOriginalText()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetViewOriginalText()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.viewOriginalText, other.viewOriginalText); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetViewExpandedText()).compareTo(other.isSetViewExpandedText()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetViewExpandedText()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.viewExpandedText, other.viewExpandedText); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableType()).compareTo(other.isSetTableType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableType, other.tableType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTemporary()).compareTo(other.isSetTemporary()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTemporary()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.temporary, other.temporary); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRewriteEnabled()).compareTo(other.isSetRewriteEnabled()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRewriteEnabled()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rewriteEnabled, other.rewriteEnabled); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Table("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("owner:"); + if (this.owner == null) { + sb.append("null"); + } else { + sb.append(this.owner); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("lastAccessTime:"); + sb.append(this.lastAccessTime); + first = false; + if (!first) sb.append(", "); + sb.append("retention:"); + sb.append(this.retention); + first = false; + if (!first) sb.append(", "); + sb.append("sd:"); + if (this.sd == null) { + sb.append("null"); + } else { + sb.append(this.sd); + } + first = false; + if (!first) sb.append(", "); + sb.append("partitionKeys:"); + if (this.partitionKeys == null) { + sb.append("null"); + } else { + sb.append(this.partitionKeys); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + first = false; + if (!first) sb.append(", "); + sb.append("viewOriginalText:"); + if (this.viewOriginalText == null) { + sb.append("null"); + } else { + sb.append(this.viewOriginalText); + } + first = false; + if (!first) sb.append(", "); + sb.append("viewExpandedText:"); + if (this.viewExpandedText == null) { + sb.append("null"); + } else { + sb.append(this.viewExpandedText); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableType:"); + if (this.tableType == null) { + sb.append("null"); + } else { + sb.append(this.tableType); + } + first = false; + if (isSetPrivileges()) { + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + } + if (isSetTemporary()) { + if (!first) sb.append(", "); + sb.append("temporary:"); + sb.append(this.temporary); + first = false; + } + if (isSetRewriteEnabled()) { + if (!first) sb.append(", "); + sb.append("rewriteEnabled:"); + sb.append(this.rewriteEnabled); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 { + // 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 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 _list190 = iprot.readListBegin(); + struct.partitionKeys = new ArrayList(_list190.size); + FieldSchema _elem191; + for (int _i192 = 0; _i192 < _list190.size; ++_i192) + { + _elem191 = new FieldSchema(); + _elem191.read(iprot); + struct.partitionKeys.add(_elem191); + } + 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 _map193 = iprot.readMapBegin(); + struct.parameters = new HashMap(2*_map193.size); + String _key194; + String _val195; + for (int _i196 = 0; _i196 < _map193.size; ++_i196) + { + _key194 = iprot.readString(); + _val195 = iprot.readString(); + struct.parameters.put(_key194, _val195); + } + 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; + case 14: // TEMPORARY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.temporary = iprot.readBool(); + struct.setTemporaryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // REWRITE_ENABLED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.rewriteEnabled = iprot.readBool(); + struct.setRewriteEnabledIsSet(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 _iter197 : struct.partitionKeys) + { + _iter197.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 _iter198 : struct.parameters.entrySet()) + { + oprot.writeString(_iter198.getKey()); + oprot.writeString(_iter198.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(); + } + } + if (struct.isSetTemporary()) { + oprot.writeFieldBegin(TEMPORARY_FIELD_DESC); + oprot.writeBool(struct.temporary); + oprot.writeFieldEnd(); + } + if (struct.isSetRewriteEnabled()) { + oprot.writeFieldBegin(REWRITE_ENABLED_FIELD_DESC); + oprot.writeBool(struct.rewriteEnabled); + 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); + } + if (struct.isSetTemporary()) { + optionals.set(13); + } + if (struct.isSetRewriteEnabled()) { + optionals.set(14); + } + oprot.writeBitSet(optionals, 15); + 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 _iter199 : struct.partitionKeys) + { + _iter199.write(oprot); + } + } + } + if (struct.isSetParameters()) { + { + oprot.writeI32(struct.parameters.size()); + for (Map.Entry _iter200 : struct.parameters.entrySet()) + { + oprot.writeString(_iter200.getKey()); + oprot.writeString(_iter200.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); + } + if (struct.isSetTemporary()) { + oprot.writeBool(struct.temporary); + } + if (struct.isSetRewriteEnabled()) { + oprot.writeBool(struct.rewriteEnabled); + } + } + + @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(15); + 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 _list201 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.partitionKeys = new ArrayList(_list201.size); + FieldSchema _elem202; + for (int _i203 = 0; _i203 < _list201.size; ++_i203) + { + _elem202 = new FieldSchema(); + _elem202.read(iprot); + struct.partitionKeys.add(_elem202); + } + } + struct.setPartitionKeysIsSet(true); + } + if (incoming.get(8)) { + { + org.apache.thrift.protocol.TMap _map204 = 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*_map204.size); + String _key205; + String _val206; + for (int _i207 = 0; _i207 < _map204.size; ++_i207) + { + _key205 = iprot.readString(); + _val206 = iprot.readString(); + struct.parameters.put(_key205, _val206); + } + } + 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); + } + if (incoming.get(13)) { + struct.temporary = iprot.readBool(); + struct.setTemporaryIsSet(true); + } + if (incoming.get(14)) { + struct.rewriteEnabled = iprot.readBool(); + struct.setRewriteEnabledIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableMeta.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableMeta.java new file mode 100644 index 0000000..08a8e36 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableMeta.java @@ -0,0 +1,701 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TableMeta implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableMeta"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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 TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)2); + 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)3); + 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)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TableMetaStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TableMetaTupleSchemeFactory()); + } + + private String dbName; // required + private String tableName; // required + private String tableType; // required + private String comments; // 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 { + DB_NAME((short)1, "dbName"), + TABLE_NAME((short)2, "tableName"), + TABLE_TYPE((short)3, "tableType"), + COMMENTS((short)4, "comments"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + case 3: // TABLE_TYPE + return TABLE_TYPE; + case 4: // COMMENTS + return COMMENTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.COMMENTS}; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("tableType", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COMMENTS, new org.apache.thrift.meta_data.FieldMetaData("comments", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableMeta.class, metaDataMap); + } + + public TableMeta() { + } + + public TableMeta( + String dbName, + String tableName, + String tableType) + { + this(); + this.dbName = dbName; + this.tableName = tableName; + this.tableType = tableType; + } + + /** + * Performs a deep copy on other. + */ + public TableMeta(TableMeta other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetTableType()) { + this.tableType = other.tableType; + } + if (other.isSetComments()) { + this.comments = other.comments; + } + } + + public TableMeta deepCopy() { + return new TableMeta(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tableName = null; + this.tableType = null; + this.comments = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTableName() { + return this.tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public String getTableType() { + return this.tableType; + } + + public void setTableType(String tableType) { + this.tableType = tableType; + } + + public void unsetTableType() { + this.tableType = null; + } + + /** Returns true if field tableType is set (has been assigned a value) and false otherwise */ + public boolean isSetTableType() { + return this.tableType != null; + } + + public void setTableTypeIsSet(boolean value) { + if (!value) { + this.tableType = null; + } + } + + public String getComments() { + return this.comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public void unsetComments() { + this.comments = null; + } + + /** Returns true if field comments is set (has been assigned a value) and false otherwise */ + public boolean isSetComments() { + return this.comments != null; + } + + public void setCommentsIsSet(boolean value) { + if (!value) { + this.comments = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + case TABLE_TYPE: + if (value == null) { + unsetTableType(); + } else { + setTableType((String)value); + } + break; + + case COMMENTS: + if (value == null) { + unsetComments(); + } else { + setComments((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TABLE_NAME: + return getTableName(); + + case TABLE_TYPE: + return getTableType(); + + case COMMENTS: + return getComments(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case TABLE_NAME: + return isSetTableName(); + case TABLE_TYPE: + return isSetTableType(); + case COMMENTS: + return isSetComments(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TableMeta) + return this.equals((TableMeta)that); + return false; + } + + public boolean equals(TableMeta that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_tableType = true && this.isSetTableType(); + boolean that_present_tableType = true && that.isSetTableType(); + if (this_present_tableType || that_present_tableType) { + if (!(this_present_tableType && that_present_tableType)) + return false; + if (!this.tableType.equals(that.tableType)) + return false; + } + + boolean this_present_comments = true && this.isSetComments(); + boolean that_present_comments = true && that.isSetComments(); + if (this_present_comments || that_present_comments) { + if (!(this_present_comments && that_present_comments)) + return false; + if (!this.comments.equals(that.comments)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); + + boolean present_tableType = true && (isSetTableType()); + list.add(present_tableType); + if (present_tableType) + list.add(tableType); + + boolean present_comments = true && (isSetComments()); + list.add(present_comments); + if (present_comments) + list.add(comments); + + return list.hashCode(); + } + + @Override + public int compareTo(TableMeta other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableType()).compareTo(other.isSetTableType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableType, other.tableType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetComments()).compareTo(other.isSetComments()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetComments()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comments, other.comments); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("TableMeta("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableType:"); + if (this.tableType == null) { + sb.append("null"); + } else { + sb.append(this.tableType); + } + first = false; + if (isSetComments()) { + if (!first) sb.append(", "); + sb.append("comments:"); + if (this.comments == null) { + sb.append("null"); + } else { + sb.append(this.comments); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + if (!isSetTableName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' is unset! Struct:" + toString()); + } + + if (!isSetTableType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableType' is unset! Struct:" + toString()); + } + + // 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 TableMetaStandardSchemeFactory implements SchemeFactory { + public TableMetaStandardScheme getScheme() { + return new TableMetaStandardScheme(); + } + } + + private static class TableMetaStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TableMeta 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.dbName = iprot.readString(); + struct.setDbNameIsSet(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.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // 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 4: // 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, TableMeta struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + 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(); + } + if (struct.tableType != null) { + oprot.writeFieldBegin(TABLE_TYPE_FIELD_DESC); + oprot.writeString(struct.tableType); + oprot.writeFieldEnd(); + } + if (struct.comments != null) { + if (struct.isSetComments()) { + oprot.writeFieldBegin(COMMENTS_FIELD_DESC); + oprot.writeString(struct.comments); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TableMetaTupleSchemeFactory implements SchemeFactory { + public TableMetaTupleScheme getScheme() { + return new TableMetaTupleScheme(); + } + } + + private static class TableMetaTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TableMeta struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbName); + oprot.writeString(struct.tableName); + oprot.writeString(struct.tableType); + BitSet optionals = new BitSet(); + if (struct.isSetComments()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetComments()) { + oprot.writeString(struct.comments); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TableMeta struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + struct.tableType = iprot.readString(); + struct.setTableTypeIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.comments = iprot.readString(); + struct.setCommentsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java new file mode 100644 index 0000000..b4a0490 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java @@ -0,0 +1,640 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TableStatsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableStatsRequest"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COL_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("colNames", org.apache.thrift.protocol.TType.LIST, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TableStatsRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TableStatsRequestTupleSchemeFactory()); + } + + private String dbName; // required + private String tblName; // required + private List colNames; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"), + TBL_NAME((short)2, "tblName"), + COL_NAMES((short)3, "colNames"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // COL_NAMES + return COL_NAMES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("colNames", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableStatsRequest.class, metaDataMap); + } + + public TableStatsRequest() { + } + + public TableStatsRequest( + String dbName, + String tblName, + List colNames) + { + this(); + this.dbName = dbName; + this.tblName = tblName; + this.colNames = colNames; + } + + /** + * Performs a deep copy on other. + */ + public TableStatsRequest(TableStatsRequest other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTblName()) { + this.tblName = other.tblName; + } + if (other.isSetColNames()) { + List __this__colNames = new ArrayList(other.colNames); + this.colNames = __this__colNames; + } + } + + public TableStatsRequest deepCopy() { + return new TableStatsRequest(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tblName = null; + this.colNames = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTblName() { + return this.tblName; + } + + public void setTblName(String tblName) { + this.tblName = tblName; + } + + public void unsetTblName() { + this.tblName = null; + } + + /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ + public boolean isSetTblName() { + return this.tblName != null; + } + + public void setTblNameIsSet(boolean value) { + if (!value) { + this.tblName = null; + } + } + + public int getColNamesSize() { + return (this.colNames == null) ? 0 : this.colNames.size(); + } + + public java.util.Iterator getColNamesIterator() { + return (this.colNames == null) ? null : this.colNames.iterator(); + } + + public void addToColNames(String elem) { + if (this.colNames == null) { + this.colNames = new ArrayList(); + } + this.colNames.add(elem); + } + + public List getColNames() { + return this.colNames; + } + + public void setColNames(List colNames) { + this.colNames = colNames; + } + + public void unsetColNames() { + this.colNames = null; + } + + /** Returns true if field colNames is set (has been assigned a value) and false otherwise */ + public boolean isSetColNames() { + return this.colNames != null; + } + + public void setColNamesIsSet(boolean value) { + if (!value) { + this.colNames = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTblName(); + } else { + setTblName((String)value); + } + break; + + case COL_NAMES: + if (value == null) { + unsetColNames(); + } else { + setColNames((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TBL_NAME: + return getTblName(); + + case COL_NAMES: + return getColNames(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case TBL_NAME: + return isSetTblName(); + case COL_NAMES: + return isSetColNames(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TableStatsRequest) + return this.equals((TableStatsRequest)that); + return false; + } + + public boolean equals(TableStatsRequest that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tblName = true && this.isSetTblName(); + boolean that_present_tblName = true && that.isSetTblName(); + if (this_present_tblName || that_present_tblName) { + if (!(this_present_tblName && that_present_tblName)) + return false; + if (!this.tblName.equals(that.tblName)) + return false; + } + + boolean this_present_colNames = true && this.isSetColNames(); + boolean that_present_colNames = true && that.isSetColNames(); + if (this_present_colNames || that_present_colNames) { + if (!(this_present_colNames && that_present_colNames)) + return false; + if (!this.colNames.equals(that.colNames)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tblName = true && (isSetTblName()); + list.add(present_tblName); + if (present_tblName) + list.add(tblName); + + boolean present_colNames = true && (isSetColNames()); + list.add(present_colNames); + if (present_colNames) + list.add(colNames); + + return list.hashCode(); + } + + @Override + public int compareTo(TableStatsRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTblName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColNames()).compareTo(other.isSetColNames()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColNames()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colNames, other.colNames); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("TableStatsRequest("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tblName:"); + if (this.tblName == null) { + sb.append("null"); + } else { + sb.append(this.tblName); + } + first = false; + if (!first) sb.append(", "); + sb.append("colNames:"); + if (this.colNames == null) { + sb.append("null"); + } else { + sb.append(this.colNames); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + if (!isSetTblName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' is unset! Struct:" + toString()); + } + + if (!isSetColNames()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'colNames' is unset! Struct:" + toString()); + } + + // 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 TableStatsRequestStandardSchemeFactory implements SchemeFactory { + public TableStatsRequestStandardScheme getScheme() { + return new TableStatsRequestStandardScheme(); + } + } + + private static class TableStatsRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TableStatsRequest 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.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.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COL_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list420 = iprot.readListBegin(); + struct.colNames = new ArrayList(_list420.size); + String _elem421; + for (int _i422 = 0; _i422 < _list420.size; ++_i422) + { + _elem421 = iprot.readString(); + struct.colNames.add(_elem421); + } + iprot.readListEnd(); + } + struct.setColNamesIsSet(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, TableStatsRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.tblName != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tblName); + oprot.writeFieldEnd(); + } + if (struct.colNames != null) { + oprot.writeFieldBegin(COL_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.colNames.size())); + for (String _iter423 : struct.colNames) + { + oprot.writeString(_iter423); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TableStatsRequestTupleSchemeFactory implements SchemeFactory { + public TableStatsRequestTupleScheme getScheme() { + return new TableStatsRequestTupleScheme(); + } + } + + private static class TableStatsRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TableStatsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbName); + oprot.writeString(struct.tblName); + { + oprot.writeI32(struct.colNames.size()); + for (String _iter424 : struct.colNames) + { + oprot.writeString(_iter424); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TableStatsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + struct.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + { + org.apache.thrift.protocol.TList _list425 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.colNames = new ArrayList(_list425.size); + String _elem426; + for (int _i427 = 0; _i427 < _list425.size; ++_i427) + { + _elem426 = iprot.readString(); + struct.colNames.add(_elem426); + } + } + struct.setColNamesIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java new file mode 100644 index 0000000..3a2c0fb --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TableStatsResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableStatsResult"); + + private static final org.apache.thrift.protocol.TField TABLE_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("tableStats", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TableStatsResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TableStatsResultTupleSchemeFactory()); + } + + private List tableStats; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE_STATS((short)1, "tableStats"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_STATS + return TABLE_STATS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TABLE_STATS, new org.apache.thrift.meta_data.FieldMetaData("tableStats", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsObj.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableStatsResult.class, metaDataMap); + } + + public TableStatsResult() { + } + + public TableStatsResult( + List tableStats) + { + this(); + this.tableStats = tableStats; + } + + /** + * Performs a deep copy on other. + */ + public TableStatsResult(TableStatsResult other) { + if (other.isSetTableStats()) { + List __this__tableStats = new ArrayList(other.tableStats.size()); + for (ColumnStatisticsObj other_element : other.tableStats) { + __this__tableStats.add(new ColumnStatisticsObj(other_element)); + } + this.tableStats = __this__tableStats; + } + } + + public TableStatsResult deepCopy() { + return new TableStatsResult(this); + } + + @Override + public void clear() { + this.tableStats = null; + } + + public int getTableStatsSize() { + return (this.tableStats == null) ? 0 : this.tableStats.size(); + } + + public java.util.Iterator getTableStatsIterator() { + return (this.tableStats == null) ? null : this.tableStats.iterator(); + } + + public void addToTableStats(ColumnStatisticsObj elem) { + if (this.tableStats == null) { + this.tableStats = new ArrayList(); + } + this.tableStats.add(elem); + } + + public List getTableStats() { + return this.tableStats; + } + + public void setTableStats(List tableStats) { + this.tableStats = tableStats; + } + + public void unsetTableStats() { + this.tableStats = null; + } + + /** Returns true if field tableStats is set (has been assigned a value) and false otherwise */ + public boolean isSetTableStats() { + return this.tableStats != null; + } + + public void setTableStatsIsSet(boolean value) { + if (!value) { + this.tableStats = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_STATS: + if (value == null) { + unsetTableStats(); + } else { + setTableStats((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_STATS: + return getTableStats(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_STATS: + return isSetTableStats(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TableStatsResult) + return this.equals((TableStatsResult)that); + return false; + } + + public boolean equals(TableStatsResult that) { + if (that == null) + return false; + + boolean this_present_tableStats = true && this.isSetTableStats(); + boolean that_present_tableStats = true && that.isSetTableStats(); + if (this_present_tableStats || that_present_tableStats) { + if (!(this_present_tableStats && that_present_tableStats)) + return false; + if (!this.tableStats.equals(that.tableStats)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_tableStats = true && (isSetTableStats()); + list.add(present_tableStats); + if (present_tableStats) + list.add(tableStats); + + return list.hashCode(); + } + + @Override + public int compareTo(TableStatsResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTableStats()).compareTo(other.isSetTableStats()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableStats()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableStats, other.tableStats); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("TableStatsResult("); + boolean first = true; + + sb.append("tableStats:"); + if (this.tableStats == null) { + sb.append("null"); + } else { + sb.append(this.tableStats); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetTableStats()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableStats' is unset! Struct:" + toString()); + } + + // 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 TableStatsResultStandardSchemeFactory implements SchemeFactory { + public TableStatsResultStandardScheme getScheme() { + return new TableStatsResultStandardScheme(); + } + } + + private static class TableStatsResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TableStatsResult 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_STATS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list394 = iprot.readListBegin(); + struct.tableStats = new ArrayList(_list394.size); + ColumnStatisticsObj _elem395; + for (int _i396 = 0; _i396 < _list394.size; ++_i396) + { + _elem395 = new ColumnStatisticsObj(); + _elem395.read(iprot); + struct.tableStats.add(_elem395); + } + iprot.readListEnd(); + } + struct.setTableStatsIsSet(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, TableStatsResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableStats != null) { + oprot.writeFieldBegin(TABLE_STATS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tableStats.size())); + for (ColumnStatisticsObj _iter397 : struct.tableStats) + { + _iter397.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TableStatsResultTupleSchemeFactory implements SchemeFactory { + public TableStatsResultTupleScheme getScheme() { + return new TableStatsResultTupleScheme(); + } + } + + private static class TableStatsResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TableStatsResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.tableStats.size()); + for (ColumnStatisticsObj _iter398 : struct.tableStats) + { + _iter398.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TableStatsResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list399 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.tableStats = new ArrayList(_list399.size); + ColumnStatisticsObj _elem400; + for (int _i401 = 0; _i401 < _list399.size; ++_i401) + { + _elem400 = new ColumnStatisticsObj(); + _elem400.read(iprot); + struct.tableStats.add(_elem400); + } + } + struct.setTableStatsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java new file mode 100644 index 0000000..541cbb9 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java @@ -0,0 +1,187347 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class ThriftHiveMetastore { + + /** + * This interface is live. + */ + public interface Iface extends com.facebook.fb303.FacebookService.Iface { + + public String getMetaConf(String key) throws MetaException, org.apache.thrift.TException; + + public void setMetaConf(String key, String value) throws MetaException, org.apache.thrift.TException; + + public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException; + + public Database get_database(String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public void drop_database(String name, boolean deleteData, boolean cascade) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException; + + public List get_databases(String pattern) throws MetaException, org.apache.thrift.TException; + + public List get_all_databases() throws MetaException, org.apache.thrift.TException; + + public void alter_database(String dbname, Database db) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public Type get_type(String name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public boolean create_type(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException; + + public boolean drop_type(String type) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public Map get_type_all(String name) throws MetaException, org.apache.thrift.TException; + + public List get_fields(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException; + + public List get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException; + + public List get_schema(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException; + + public List get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException; + + public void create_table(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public void create_table_with_constraints(Table tbl, List primaryKeys, List foreignKeys, List uniqueConstraints, List notNullConstraints) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public void drop_constraint(DropConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public void add_primary_key(AddPrimaryKeyRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public void add_foreign_key(AddForeignKeyRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public void add_unique_constraint(AddUniqueConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public void add_not_null_constraint(AddNotNullConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public void drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public void truncate_table(String dbName, String tableName, List partNames) throws MetaException, org.apache.thrift.TException; + + public List get_tables(String db_name, String pattern) throws MetaException, org.apache.thrift.TException; + + public List get_tables_by_type(String db_name, String pattern, String tableType) throws MetaException, org.apache.thrift.TException; + + public List get_table_meta(String db_patterns, String tbl_patterns, List tbl_types) throws MetaException, org.apache.thrift.TException; + + public List get_all_tables(String db_name) throws MetaException, org.apache.thrift.TException; + + public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public List
get_table_objects_by_name(String dbname, List tbl_names) throws org.apache.thrift.TException; + + public GetTableResult get_table_req(GetTableRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public GetTablesResult get_table_objects_by_name_req(GetTablesRequest req) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException; + + public List get_table_names_by_filter(String dbname, String filter, short max_tables) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException; + + public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, org.apache.thrift.TException; + + public void alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException; + + public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade) throws InvalidOperationException, MetaException, org.apache.thrift.TException; + + public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; + + public Partition add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; + + public int add_partitions(List new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; + + public int add_partitions_pspec(List new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; + + public Partition append_partition(String db_name, String tbl_name, List part_vals) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; + + public AddPartitionsResult add_partitions_req(AddPartitionsRequest request) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; + + public Partition append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; + + public Partition append_partition_by_name(String db_name, String tbl_name, String part_name) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; + + public Partition append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; + + public boolean drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public boolean drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public boolean drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public boolean drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public DropPartitionsResult drop_partitions_req(DropPartitionsRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public Partition get_partition(String db_name, String tbl_name, List part_vals) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public Partition exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException; + + public List exchange_partitions(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException; + + public Partition get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public List get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public List get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public List get_partitions_pspec(String db_name, String tbl_name, int max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public List get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, org.apache.thrift.TException; + + public List get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public List get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public List get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public List get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public List get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public PartitionsByExprResult get_partitions_by_expr(PartitionsByExprRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public int get_num_partitions_by_filter(String db_name, String tbl_name, String filter) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public List get_partitions_by_names(String db_name, String tbl_name, List names) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public void alter_partition(String db_name, String tbl_name, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException; + + public void alter_partitions(String db_name, String tbl_name, List new_parts) throws InvalidOperationException, MetaException, org.apache.thrift.TException; + + public void alter_partitions_with_environment_context(String db_name, String tbl_name, List new_parts, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException; + + public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException; + + public void rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException; + + public boolean partition_name_has_valid_characters(List part_vals, boolean throw_exception) throws MetaException, org.apache.thrift.TException; + + public String get_config_value(String name, String defaultValue) throws ConfigValSecurityException, org.apache.thrift.TException; + + public List partition_name_to_vals(String part_name) throws MetaException, org.apache.thrift.TException; + + public Map partition_name_to_spec(String part_name) throws MetaException, org.apache.thrift.TException; + + public void markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException; + + public boolean isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException; + + public Index add_index(Index new_index, Table index_table) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException; + + public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws InvalidOperationException, MetaException, org.apache.thrift.TException; + + public boolean drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public Index get_index_by_name(String db_name, String tbl_name, String index_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public List get_indexes(String db_name, String tbl_name, short max_indexes) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, org.apache.thrift.TException; + + public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public ForeignKeysResponse get_foreign_keys(ForeignKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public UniqueConstraintsResponse get_unique_constraints(UniqueConstraintsRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public NotNullConstraintsResponse get_not_null_constraints(NotNullConstraintsRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public boolean update_table_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException; + + public boolean update_partition_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException; + + public ColumnStatistics get_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException; + + public ColumnStatistics get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException; + + public TableStatsResult get_table_statistics_req(TableStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public PartitionsStatsResult get_partitions_statistics_req(PartitionsStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public AggrStats get_aggr_stats_for(PartitionsStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public boolean set_aggr_stats_for(SetPartitionsStatsRequest request) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException; + + public boolean delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException; + + public boolean delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException; + + public void create_function(Function func) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public void drop_function(String dbName, String funcName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public void alter_function(String dbName, String funcName, Function newFunc) throws InvalidOperationException, MetaException, org.apache.thrift.TException; + + public List get_functions(String dbName, String pattern) throws MetaException, org.apache.thrift.TException; + + public Function get_function(String dbName, String funcName) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public GetAllFunctionsResponse get_all_functions() throws MetaException, org.apache.thrift.TException; + + public boolean create_role(Role role) throws MetaException, org.apache.thrift.TException; + + public boolean drop_role(String role_name) throws MetaException, org.apache.thrift.TException; + + public List get_role_names() throws MetaException, org.apache.thrift.TException; + + public boolean grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws MetaException, org.apache.thrift.TException; + + public boolean revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws MetaException, org.apache.thrift.TException; + + public List list_roles(String principal_name, PrincipalType principal_type) throws MetaException, org.apache.thrift.TException; + + public GrantRevokeRoleResponse grant_revoke_role(GrantRevokeRoleRequest request) throws MetaException, org.apache.thrift.TException; + + public GetPrincipalsInRoleResponse get_principals_in_role(GetPrincipalsInRoleRequest request) throws MetaException, org.apache.thrift.TException; + + public GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request) throws MetaException, org.apache.thrift.TException; + + public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names) throws MetaException, org.apache.thrift.TException; + + public List list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws MetaException, org.apache.thrift.TException; + + public boolean grant_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException; + + public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException; + + public GrantRevokePrivilegeResponse grant_revoke_privileges(GrantRevokePrivilegeRequest request) throws MetaException, org.apache.thrift.TException; + + public List set_ugi(String user_name, List group_names) throws MetaException, org.apache.thrift.TException; + + public String get_delegation_token(String token_owner, String renewer_kerberos_principal_name) throws MetaException, org.apache.thrift.TException; + + public long renew_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException; + + public void cancel_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException; + + public boolean add_token(String token_identifier, String delegation_token) throws org.apache.thrift.TException; + + public boolean remove_token(String token_identifier) throws org.apache.thrift.TException; + + public String get_token(String token_identifier) throws org.apache.thrift.TException; + + public List get_all_token_identifiers() throws org.apache.thrift.TException; + + public int add_master_key(String key) throws MetaException, org.apache.thrift.TException; + + public void update_master_key(int seq_number, String key) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; + + public boolean remove_master_key(int key_seq) throws org.apache.thrift.TException; + + public List get_master_keys() throws org.apache.thrift.TException; + + public GetOpenTxnsResponse get_open_txns() throws org.apache.thrift.TException; + + public GetOpenTxnsInfoResponse get_open_txns_info() throws org.apache.thrift.TException; + + public OpenTxnsResponse open_txns(OpenTxnRequest rqst) throws org.apache.thrift.TException; + + public void abort_txn(AbortTxnRequest rqst) throws NoSuchTxnException, org.apache.thrift.TException; + + public void abort_txns(AbortTxnsRequest rqst) throws NoSuchTxnException, org.apache.thrift.TException; + + public void commit_txn(CommitTxnRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException; + + public LockResponse lock(LockRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException; + + public LockResponse check_lock(CheckLockRequest rqst) throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException; + + public void unlock(UnlockRequest rqst) throws NoSuchLockException, TxnOpenException, org.apache.thrift.TException; + + public ShowLocksResponse show_locks(ShowLocksRequest rqst) throws org.apache.thrift.TException; + + public void heartbeat(HeartbeatRequest ids) throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException; + + public HeartbeatTxnRangeResponse heartbeat_txn_range(HeartbeatTxnRangeRequest txns) throws org.apache.thrift.TException; + + public void compact(CompactionRequest rqst) throws org.apache.thrift.TException; + + public CompactionResponse compact2(CompactionRequest rqst) throws org.apache.thrift.TException; + + public ShowCompactResponse show_compact(ShowCompactRequest rqst) throws org.apache.thrift.TException; + + public void add_dynamic_partitions(AddDynamicPartitions rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException; + + public NotificationEventResponse get_next_notification(NotificationEventRequest rqst) throws org.apache.thrift.TException; + + public CurrentNotificationEventId get_current_notificationEventId() throws org.apache.thrift.TException; + + public FireEventResponse fire_listener_event(FireEventRequest rqst) throws org.apache.thrift.TException; + + public void flushCache() throws org.apache.thrift.TException; + + public CmRecycleResponse cm_recycle(CmRecycleRequest request) throws MetaException, org.apache.thrift.TException; + + public GetFileMetadataByExprResult get_file_metadata_by_expr(GetFileMetadataByExprRequest req) throws org.apache.thrift.TException; + + public GetFileMetadataResult get_file_metadata(GetFileMetadataRequest req) throws org.apache.thrift.TException; + + public PutFileMetadataResult put_file_metadata(PutFileMetadataRequest req) throws org.apache.thrift.TException; + + public ClearFileMetadataResult clear_file_metadata(ClearFileMetadataRequest req) throws org.apache.thrift.TException; + + public CacheFileMetadataResult cache_file_metadata(CacheFileMetadataRequest req) throws org.apache.thrift.TException; + + public String get_metastore_db_uuid() throws MetaException, org.apache.thrift.TException; + + } + + public interface AsyncIface extends com.facebook.fb303.FacebookService .AsyncIface { + + public void getMetaConf(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void setMetaConf(String key, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void create_database(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_database(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_database(String name, boolean deleteData, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_databases(String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_all_databases(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void alter_database(String dbname, Database db, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_type(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void create_type(Type type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_type(String type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_type_all(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_fields(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_schema(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void create_table(Table tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void create_table_with_constraints(Table tbl, List primaryKeys, List foreignKeys, List uniqueConstraints, List notNullConstraints, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_constraint(DropConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_primary_key(AddPrimaryKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_foreign_key(AddForeignKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_unique_constraint(AddUniqueConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_not_null_constraint(AddNotNullConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_table(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void truncate_table(String dbName, String tableName, List partNames, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_tables(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_tables_by_type(String db_name, String pattern, String tableType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_table_meta(String db_patterns, String tbl_patterns, List tbl_types, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_all_tables(String db_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_table(String dbname, String tbl_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_table_objects_by_name(String dbname, List tbl_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_table_req(GetTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_table_objects_by_name_req(GetTablesRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_table_names_by_filter(String dbname, String filter, short max_tables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void alter_table(String dbname, String tbl_name, Table new_tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_partition(Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_partitions(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_partitions_pspec(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void append_partition(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_partitions_req(AddPartitionsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void append_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_partitions_req(DropPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partition(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void exchange_partitions(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partitions(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partitions_pspec(String db_name, String tbl_name, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partition_names(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partitions_by_expr(PartitionsByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_num_partitions_by_filter(String db_name, String tbl_name, String filter, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partitions_by_names(String db_name, String tbl_name, List names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void alter_partition(String db_name, String tbl_name, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void alter_partitions(String db_name, String tbl_name, List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void alter_partitions_with_environment_context(String db_name, String tbl_name, List new_parts, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void partition_name_has_valid_characters(List part_vals, boolean throw_exception, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_config_value(String name, String defaultValue, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void partition_name_to_vals(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void partition_name_to_spec(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_index(Index new_index, Table index_table, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_index_by_name(String db_name, String tbl_name, String index_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_indexes(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_index_names(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_primary_keys(PrimaryKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_foreign_keys(ForeignKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_unique_constraints(UniqueConstraintsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_not_null_constraints(NotNullConstraintsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void update_table_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void update_partition_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_table_statistics_req(TableStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partitions_statistics_req(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_aggr_stats_for(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void set_aggr_stats_for(SetPartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void delete_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void create_function(Function func, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void alter_function(String dbName, String funcName, Function newFunc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_functions(String dbName, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_all_functions(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void create_role(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void drop_role(String role_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_role_names(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void revoke_role(String role_name, String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void list_roles(String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void grant_revoke_role(GrantRevokeRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_principals_in_role(GetPrincipalsInRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void grant_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void revoke_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void grant_revoke_privileges(GrantRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void set_ugi(String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_delegation_token(String token_owner, String renewer_kerberos_principal_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void renew_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void cancel_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_token(String token_identifier, String delegation_token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void remove_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_all_token_identifiers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_master_key(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void update_master_key(int seq_number, String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void remove_master_key(int key_seq, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_master_keys(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_open_txns(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_open_txns_info(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void open_txns(OpenTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void abort_txn(AbortTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void abort_txns(AbortTxnsRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void commit_txn(CommitTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void lock(LockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void check_lock(CheckLockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void unlock(UnlockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void show_locks(ShowLocksRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void heartbeat(HeartbeatRequest ids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void heartbeat_txn_range(HeartbeatTxnRangeRequest txns, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void compact(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void compact2(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void show_compact(ShowCompactRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void add_dynamic_partitions(AddDynamicPartitions rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_next_notification(NotificationEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_current_notificationEventId(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void fire_listener_event(FireEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void flushCache(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void cm_recycle(CmRecycleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_file_metadata_by_expr(GetFileMetadataByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_file_metadata(GetFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void put_file_metadata(PutFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void clear_file_metadata(ClearFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void cache_file_metadata(CacheFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_metastore_db_uuid(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + } + + public static class Client extends com.facebook.fb303.FacebookService.Client implements Iface { + public static class Factory implements org.apache.thrift.TServiceClientFactory { + public Factory() {} + public Client getClient(org.apache.thrift.protocol.TProtocol prot) { + return new Client(prot); + } + public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + return new Client(iprot, oprot); + } + } + + public Client(org.apache.thrift.protocol.TProtocol prot) + { + super(prot, prot); + } + + public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + super(iprot, oprot); + } + + public String getMetaConf(String key) throws MetaException, org.apache.thrift.TException + { + send_getMetaConf(key); + return recv_getMetaConf(); + } + + public void send_getMetaConf(String key) throws org.apache.thrift.TException + { + getMetaConf_args args = new getMetaConf_args(); + args.setKey(key); + sendBase("getMetaConf", args); + } + + public String recv_getMetaConf() throws MetaException, org.apache.thrift.TException + { + getMetaConf_result result = new getMetaConf_result(); + receiveBase(result, "getMetaConf"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMetaConf failed: unknown result"); + } + + public void setMetaConf(String key, String value) throws MetaException, org.apache.thrift.TException + { + send_setMetaConf(key, value); + recv_setMetaConf(); + } + + public void send_setMetaConf(String key, String value) throws org.apache.thrift.TException + { + setMetaConf_args args = new setMetaConf_args(); + args.setKey(key); + args.setValue(value); + sendBase("setMetaConf", args); + } + + public void recv_setMetaConf() throws MetaException, org.apache.thrift.TException + { + setMetaConf_result result = new setMetaConf_result(); + receiveBase(result, "setMetaConf"); + if (result.o1 != null) { + throw result.o1; + } + return; + } + + public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException + { + send_create_database(database); + recv_create_database(); + } + + public void send_create_database(Database database) throws org.apache.thrift.TException + { + create_database_args args = new create_database_args(); + args.setDatabase(database); + sendBase("create_database", args); + } + + public void recv_create_database() throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException + { + create_database_result result = new create_database_result(); + receiveBase(result, "create_database"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + return; + } + + public Database get_database(String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_get_database(name); + return recv_get_database(); + } + + public void send_get_database(String name) throws org.apache.thrift.TException + { + get_database_args args = new get_database_args(); + args.setName(name); + sendBase("get_database", args); + } + + public Database recv_get_database() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + get_database_result result = new get_database_result(); + receiveBase(result, "get_database"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_database failed: unknown result"); + } + + public void drop_database(String name, boolean deleteData, boolean cascade) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException + { + send_drop_database(name, deleteData, cascade); + recv_drop_database(); + } + + public void send_drop_database(String name, boolean deleteData, boolean cascade) throws org.apache.thrift.TException + { + drop_database_args args = new drop_database_args(); + args.setName(name); + args.setDeleteData(deleteData); + args.setCascade(cascade); + sendBase("drop_database", args); + } + + public void recv_drop_database() throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException + { + drop_database_result result = new drop_database_result(); + receiveBase(result, "drop_database"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + return; + } + + public List get_databases(String pattern) throws MetaException, org.apache.thrift.TException + { + send_get_databases(pattern); + return recv_get_databases(); + } + + public void send_get_databases(String pattern) throws org.apache.thrift.TException + { + get_databases_args args = new get_databases_args(); + args.setPattern(pattern); + sendBase("get_databases", args); + } + + public List recv_get_databases() throws MetaException, org.apache.thrift.TException + { + get_databases_result result = new get_databases_result(); + receiveBase(result, "get_databases"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_databases failed: unknown result"); + } + + public List get_all_databases() throws MetaException, org.apache.thrift.TException + { + send_get_all_databases(); + return recv_get_all_databases(); + } + + public void send_get_all_databases() throws org.apache.thrift.TException + { + get_all_databases_args args = new get_all_databases_args(); + sendBase("get_all_databases", args); + } + + public List recv_get_all_databases() throws MetaException, org.apache.thrift.TException + { + get_all_databases_result result = new get_all_databases_result(); + receiveBase(result, "get_all_databases"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result"); + } + + public void alter_database(String dbname, Database db) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_alter_database(dbname, db); + recv_alter_database(); + } + + public void send_alter_database(String dbname, Database db) throws org.apache.thrift.TException + { + alter_database_args args = new alter_database_args(); + args.setDbname(dbname); + args.setDb(db); + sendBase("alter_database", args); + } + + public void recv_alter_database() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + alter_database_result result = new alter_database_result(); + receiveBase(result, "alter_database"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public Type get_type(String name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_type(name); + return recv_get_type(); + } + + public void send_get_type(String name) throws org.apache.thrift.TException + { + get_type_args args = new get_type_args(); + args.setName(name); + sendBase("get_type", args); + } + + public Type recv_get_type() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_type_result result = new get_type_result(); + receiveBase(result, "get_type"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_type failed: unknown result"); + } + + public boolean create_type(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException + { + send_create_type(type); + return recv_create_type(); + } + + public void send_create_type(Type type) throws org.apache.thrift.TException + { + create_type_args args = new create_type_args(); + args.setType(type); + sendBase("create_type", args); + } + + public boolean recv_create_type() throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException + { + create_type_result result = new create_type_result(); + receiveBase(result, "create_type"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "create_type failed: unknown result"); + } + + public boolean drop_type(String type) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_drop_type(type); + return recv_drop_type(); + } + + public void send_drop_type(String type) throws org.apache.thrift.TException + { + drop_type_args args = new drop_type_args(); + args.setType(type); + sendBase("drop_type", args); + } + + public boolean recv_drop_type() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + drop_type_result result = new drop_type_result(); + receiveBase(result, "drop_type"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_type failed: unknown result"); + } + + public Map get_type_all(String name) throws MetaException, org.apache.thrift.TException + { + send_get_type_all(name); + return recv_get_type_all(); + } + + public void send_get_type_all(String name) throws org.apache.thrift.TException + { + get_type_all_args args = new get_type_all_args(); + args.setName(name); + sendBase("get_type_all", args); + } + + public Map recv_get_type_all() throws MetaException, org.apache.thrift.TException + { + get_type_all_result result = new get_type_all_result(); + receiveBase(result, "get_type_all"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_type_all failed: unknown result"); + } + + public List get_fields(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException + { + send_get_fields(db_name, table_name); + return recv_get_fields(); + } + + public void send_get_fields(String db_name, String table_name) throws org.apache.thrift.TException + { + get_fields_args args = new get_fields_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + sendBase("get_fields", args); + } + + public List recv_get_fields() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException + { + get_fields_result result = new get_fields_result(); + receiveBase(result, "get_fields"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_fields failed: unknown result"); + } + + public List get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException + { + send_get_fields_with_environment_context(db_name, table_name, environment_context); + return recv_get_fields_with_environment_context(); + } + + public void send_get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws org.apache.thrift.TException + { + get_fields_with_environment_context_args args = new get_fields_with_environment_context_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setEnvironment_context(environment_context); + sendBase("get_fields_with_environment_context", args); + } + + public List recv_get_fields_with_environment_context() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException + { + get_fields_with_environment_context_result result = new get_fields_with_environment_context_result(); + receiveBase(result, "get_fields_with_environment_context"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_fields_with_environment_context failed: unknown result"); + } + + public List get_schema(String db_name, String table_name) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException + { + send_get_schema(db_name, table_name); + return recv_get_schema(); + } + + public void send_get_schema(String db_name, String table_name) throws org.apache.thrift.TException + { + get_schema_args args = new get_schema_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + sendBase("get_schema", args); + } + + public List recv_get_schema() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException + { + get_schema_result result = new get_schema_result(); + receiveBase(result, "get_schema"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_schema failed: unknown result"); + } + + public List get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException + { + send_get_schema_with_environment_context(db_name, table_name, environment_context); + return recv_get_schema_with_environment_context(); + } + + public void send_get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context) throws org.apache.thrift.TException + { + get_schema_with_environment_context_args args = new get_schema_with_environment_context_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setEnvironment_context(environment_context); + sendBase("get_schema_with_environment_context", args); + } + + public List recv_get_schema_with_environment_context() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException + { + get_schema_with_environment_context_result result = new get_schema_with_environment_context_result(); + receiveBase(result, "get_schema_with_environment_context"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_schema_with_environment_context failed: unknown result"); + } + + public void create_table(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_create_table(tbl); + recv_create_table(); + } + + public void send_create_table(Table tbl) throws org.apache.thrift.TException + { + create_table_args args = new create_table_args(); + args.setTbl(tbl); + sendBase("create_table", args); + } + + public void recv_create_table() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException + { + create_table_result result = new create_table_result(); + receiveBase(result, "create_table"); + 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 void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_create_table_with_environment_context(tbl, environment_context); + recv_create_table_with_environment_context(); + } + + public void send_create_table_with_environment_context(Table tbl, EnvironmentContext environment_context) throws org.apache.thrift.TException + { + create_table_with_environment_context_args args = new create_table_with_environment_context_args(); + args.setTbl(tbl); + args.setEnvironment_context(environment_context); + sendBase("create_table_with_environment_context", args); + } + + public void recv_create_table_with_environment_context() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException + { + create_table_with_environment_context_result result = new create_table_with_environment_context_result(); + receiveBase(result, "create_table_with_environment_context"); + 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 void create_table_with_constraints(Table tbl, List primaryKeys, List foreignKeys, List uniqueConstraints, List notNullConstraints) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints); + recv_create_table_with_constraints(); + } + + public void send_create_table_with_constraints(Table tbl, List primaryKeys, List foreignKeys, List uniqueConstraints, List notNullConstraints) throws org.apache.thrift.TException + { + create_table_with_constraints_args args = new create_table_with_constraints_args(); + args.setTbl(tbl); + args.setPrimaryKeys(primaryKeys); + args.setForeignKeys(foreignKeys); + args.setUniqueConstraints(uniqueConstraints); + args.setNotNullConstraints(notNullConstraints); + sendBase("create_table_with_constraints", args); + } + + public void recv_create_table_with_constraints() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException + { + create_table_with_constraints_result result = new create_table_with_constraints_result(); + receiveBase(result, "create_table_with_constraints"); + 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 void drop_constraint(DropConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_drop_constraint(req); + recv_drop_constraint(); + } + + public void send_drop_constraint(DropConstraintRequest req) throws org.apache.thrift.TException + { + drop_constraint_args args = new drop_constraint_args(); + args.setReq(req); + sendBase("drop_constraint", args); + } + + public void recv_drop_constraint() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + drop_constraint_result result = new drop_constraint_result(); + receiveBase(result, "drop_constraint"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o3 != null) { + throw result.o3; + } + return; + } + + public void add_primary_key(AddPrimaryKeyRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_add_primary_key(req); + recv_add_primary_key(); + } + + public void send_add_primary_key(AddPrimaryKeyRequest req) throws org.apache.thrift.TException + { + add_primary_key_args args = new add_primary_key_args(); + args.setReq(req); + sendBase("add_primary_key", args); + } + + public void recv_add_primary_key() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + add_primary_key_result result = new add_primary_key_result(); + receiveBase(result, "add_primary_key"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public void add_foreign_key(AddForeignKeyRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_add_foreign_key(req); + recv_add_foreign_key(); + } + + public void send_add_foreign_key(AddForeignKeyRequest req) throws org.apache.thrift.TException + { + add_foreign_key_args args = new add_foreign_key_args(); + args.setReq(req); + sendBase("add_foreign_key", args); + } + + public void recv_add_foreign_key() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + add_foreign_key_result result = new add_foreign_key_result(); + receiveBase(result, "add_foreign_key"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public void add_unique_constraint(AddUniqueConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_add_unique_constraint(req); + recv_add_unique_constraint(); + } + + public void send_add_unique_constraint(AddUniqueConstraintRequest req) throws org.apache.thrift.TException + { + add_unique_constraint_args args = new add_unique_constraint_args(); + args.setReq(req); + sendBase("add_unique_constraint", args); + } + + public void recv_add_unique_constraint() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + add_unique_constraint_result result = new add_unique_constraint_result(); + receiveBase(result, "add_unique_constraint"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public void add_not_null_constraint(AddNotNullConstraintRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_add_not_null_constraint(req); + recv_add_not_null_constraint(); + } + + public void send_add_not_null_constraint(AddNotNullConstraintRequest req) throws org.apache.thrift.TException + { + add_not_null_constraint_args args = new add_not_null_constraint_args(); + args.setReq(req); + sendBase("add_not_null_constraint", args); + } + + public void recv_add_not_null_constraint() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + add_not_null_constraint_result result = new add_not_null_constraint_result(); + receiveBase(result, "add_not_null_constraint"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public void drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_drop_table(dbname, name, deleteData); + recv_drop_table(); + } + + public void send_drop_table(String dbname, String name, boolean deleteData) throws org.apache.thrift.TException + { + drop_table_args args = new drop_table_args(); + args.setDbname(dbname); + args.setName(name); + args.setDeleteData(deleteData); + sendBase("drop_table", args); + } + + public void recv_drop_table() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + drop_table_result result = new drop_table_result(); + receiveBase(result, "drop_table"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o3 != null) { + throw result.o3; + } + return; + } + + public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_drop_table_with_environment_context(dbname, name, deleteData, environment_context); + recv_drop_table_with_environment_context(); + } + + public void send_drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context) throws org.apache.thrift.TException + { + drop_table_with_environment_context_args args = new drop_table_with_environment_context_args(); + args.setDbname(dbname); + args.setName(name); + args.setDeleteData(deleteData); + args.setEnvironment_context(environment_context); + sendBase("drop_table_with_environment_context", args); + } + + public void recv_drop_table_with_environment_context() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + drop_table_with_environment_context_result result = new drop_table_with_environment_context_result(); + receiveBase(result, "drop_table_with_environment_context"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o3 != null) { + throw result.o3; + } + return; + } + + public void truncate_table(String dbName, String tableName, List partNames) throws MetaException, org.apache.thrift.TException + { + send_truncate_table(dbName, tableName, partNames); + recv_truncate_table(); + } + + public void send_truncate_table(String dbName, String tableName, List partNames) throws org.apache.thrift.TException + { + truncate_table_args args = new truncate_table_args(); + args.setDbName(dbName); + args.setTableName(tableName); + args.setPartNames(partNames); + sendBase("truncate_table", args); + } + + public void recv_truncate_table() throws MetaException, org.apache.thrift.TException + { + truncate_table_result result = new truncate_table_result(); + receiveBase(result, "truncate_table"); + if (result.o1 != null) { + throw result.o1; + } + return; + } + + public List get_tables(String db_name, String pattern) throws MetaException, org.apache.thrift.TException + { + send_get_tables(db_name, pattern); + return recv_get_tables(); + } + + public void send_get_tables(String db_name, String pattern) throws org.apache.thrift.TException + { + get_tables_args args = new get_tables_args(); + args.setDb_name(db_name); + args.setPattern(pattern); + sendBase("get_tables", args); + } + + public List recv_get_tables() throws MetaException, org.apache.thrift.TException + { + get_tables_result result = new get_tables_result(); + receiveBase(result, "get_tables"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_tables failed: unknown result"); + } + + public List get_tables_by_type(String db_name, String pattern, String tableType) throws MetaException, org.apache.thrift.TException + { + send_get_tables_by_type(db_name, pattern, tableType); + return recv_get_tables_by_type(); + } + + public void send_get_tables_by_type(String db_name, String pattern, String tableType) throws org.apache.thrift.TException + { + get_tables_by_type_args args = new get_tables_by_type_args(); + args.setDb_name(db_name); + args.setPattern(pattern); + args.setTableType(tableType); + sendBase("get_tables_by_type", args); + } + + public List recv_get_tables_by_type() throws MetaException, org.apache.thrift.TException + { + get_tables_by_type_result result = new get_tables_by_type_result(); + receiveBase(result, "get_tables_by_type"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_tables_by_type failed: unknown result"); + } + + public List get_table_meta(String db_patterns, String tbl_patterns, List tbl_types) throws MetaException, org.apache.thrift.TException + { + send_get_table_meta(db_patterns, tbl_patterns, tbl_types); + return recv_get_table_meta(); + } + + public void send_get_table_meta(String db_patterns, String tbl_patterns, List tbl_types) throws org.apache.thrift.TException + { + get_table_meta_args args = new get_table_meta_args(); + args.setDb_patterns(db_patterns); + args.setTbl_patterns(tbl_patterns); + args.setTbl_types(tbl_types); + sendBase("get_table_meta", args); + } + + public List recv_get_table_meta() throws MetaException, org.apache.thrift.TException + { + get_table_meta_result result = new get_table_meta_result(); + receiveBase(result, "get_table_meta"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_meta failed: unknown result"); + } + + public List get_all_tables(String db_name) throws MetaException, org.apache.thrift.TException + { + send_get_all_tables(db_name); + return recv_get_all_tables(); + } + + public void send_get_all_tables(String db_name) throws org.apache.thrift.TException + { + get_all_tables_args args = new get_all_tables_args(); + args.setDb_name(db_name); + sendBase("get_all_tables", args); + } + + public List recv_get_all_tables() throws MetaException, org.apache.thrift.TException + { + get_all_tables_result result = new get_all_tables_result(); + receiveBase(result, "get_all_tables"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result"); + } + + public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_table(dbname, tbl_name); + return recv_get_table(); + } + + public void send_get_table(String dbname, String tbl_name) throws org.apache.thrift.TException + { + get_table_args args = new get_table_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); + sendBase("get_table", args); + } + + public Table recv_get_table() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_table_result result = new get_table_result(); + receiveBase(result, "get_table"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table failed: unknown result"); + } + + public List
get_table_objects_by_name(String dbname, List tbl_names) throws org.apache.thrift.TException + { + send_get_table_objects_by_name(dbname, tbl_names); + return recv_get_table_objects_by_name(); + } + + public void send_get_table_objects_by_name(String dbname, List tbl_names) throws org.apache.thrift.TException + { + get_table_objects_by_name_args args = new get_table_objects_by_name_args(); + args.setDbname(dbname); + args.setTbl_names(tbl_names); + sendBase("get_table_objects_by_name", args); + } + + public List
recv_get_table_objects_by_name() throws org.apache.thrift.TException + { + get_table_objects_by_name_result result = new get_table_objects_by_name_result(); + receiveBase(result, "get_table_objects_by_name"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); + } + + public GetTableResult get_table_req(GetTableRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_table_req(req); + return recv_get_table_req(); + } + + public void send_get_table_req(GetTableRequest req) throws org.apache.thrift.TException + { + get_table_req_args args = new get_table_req_args(); + args.setReq(req); + sendBase("get_table_req", args); + } + + public GetTableResult recv_get_table_req() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_table_req_result result = new get_table_req_result(); + receiveBase(result, "get_table_req"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_req failed: unknown result"); + } + + public GetTablesResult get_table_objects_by_name_req(GetTablesRequest req) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException + { + send_get_table_objects_by_name_req(req); + return recv_get_table_objects_by_name_req(); + } + + public void send_get_table_objects_by_name_req(GetTablesRequest req) throws org.apache.thrift.TException + { + get_table_objects_by_name_req_args args = new get_table_objects_by_name_req_args(); + args.setReq(req); + sendBase("get_table_objects_by_name_req", args); + } + + public GetTablesResult recv_get_table_objects_by_name_req() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException + { + get_table_objects_by_name_req_result result = new get_table_objects_by_name_req_result(); + receiveBase(result, "get_table_objects_by_name_req"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_objects_by_name_req failed: unknown result"); + } + + public List get_table_names_by_filter(String dbname, String filter, short max_tables) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException + { + send_get_table_names_by_filter(dbname, filter, max_tables); + return recv_get_table_names_by_filter(); + } + + public void send_get_table_names_by_filter(String dbname, String filter, short max_tables) throws org.apache.thrift.TException + { + get_table_names_by_filter_args args = new get_table_names_by_filter_args(); + args.setDbname(dbname); + args.setFilter(filter); + args.setMax_tables(max_tables); + sendBase("get_table_names_by_filter", args); + } + + public List recv_get_table_names_by_filter() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException + { + get_table_names_by_filter_result result = new get_table_names_by_filter_result(); + receiveBase(result, "get_table_names_by_filter"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); + } + + public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + send_alter_table(dbname, tbl_name, new_tbl); + recv_alter_table(); + } + + public void send_alter_table(String dbname, String tbl_name, Table new_tbl) throws org.apache.thrift.TException + { + alter_table_args args = new alter_table_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); + args.setNew_tbl(new_tbl); + sendBase("alter_table", args); + } + + public void recv_alter_table() throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + alter_table_result result = new alter_table_result(); + receiveBase(result, "alter_table"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public void alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); + recv_alter_table_with_environment_context(); + } + + public void send_alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context) throws org.apache.thrift.TException + { + alter_table_with_environment_context_args args = new alter_table_with_environment_context_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); + args.setNew_tbl(new_tbl); + args.setEnvironment_context(environment_context); + sendBase("alter_table_with_environment_context", args); + } + + public void recv_alter_table_with_environment_context() throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + alter_table_with_environment_context_result result = new alter_table_with_environment_context_result(); + receiveBase(result, "alter_table_with_environment_context"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade) throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade); + recv_alter_table_with_cascade(); + } + + public void send_alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade) throws org.apache.thrift.TException + { + alter_table_with_cascade_args args = new alter_table_with_cascade_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); + args.setNew_tbl(new_tbl); + args.setCascade(cascade); + sendBase("alter_table_with_cascade", args); + } + + public void recv_alter_table_with_cascade() throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + alter_table_with_cascade_result result = new alter_table_with_cascade_result(); + receiveBase(result, "alter_table_with_cascade"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + send_add_partition(new_part); + return recv_add_partition(); + } + + public void send_add_partition(Partition new_part) throws org.apache.thrift.TException + { + add_partition_args args = new add_partition_args(); + args.setNew_part(new_part); + sendBase("add_partition", args); + } + + public Partition recv_add_partition() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + add_partition_result result = new add_partition_result(); + receiveBase(result, "add_partition"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partition failed: unknown result"); + } + + public Partition add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + send_add_partition_with_environment_context(new_part, environment_context); + return recv_add_partition_with_environment_context(); + } + + public void send_add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context) throws org.apache.thrift.TException + { + add_partition_with_environment_context_args args = new add_partition_with_environment_context_args(); + args.setNew_part(new_part); + args.setEnvironment_context(environment_context); + sendBase("add_partition_with_environment_context", args); + } + + public Partition recv_add_partition_with_environment_context() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + add_partition_with_environment_context_result result = new add_partition_with_environment_context_result(); + receiveBase(result, "add_partition_with_environment_context"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partition_with_environment_context failed: unknown result"); + } + + public int add_partitions(List new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + send_add_partitions(new_parts); + return recv_add_partitions(); + } + + public void send_add_partitions(List new_parts) throws org.apache.thrift.TException + { + add_partitions_args args = new add_partitions_args(); + args.setNew_parts(new_parts); + sendBase("add_partitions", args); + } + + public int recv_add_partitions() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + add_partitions_result result = new add_partitions_result(); + receiveBase(result, "add_partitions"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partitions failed: unknown result"); + } + + public int add_partitions_pspec(List new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + send_add_partitions_pspec(new_parts); + return recv_add_partitions_pspec(); + } + + public void send_add_partitions_pspec(List new_parts) throws org.apache.thrift.TException + { + add_partitions_pspec_args args = new add_partitions_pspec_args(); + args.setNew_parts(new_parts); + sendBase("add_partitions_pspec", args); + } + + public int recv_add_partitions_pspec() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + add_partitions_pspec_result result = new add_partitions_pspec_result(); + receiveBase(result, "add_partitions_pspec"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partitions_pspec failed: unknown result"); + } + + public Partition append_partition(String db_name, String tbl_name, List part_vals) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + send_append_partition(db_name, tbl_name, part_vals); + return recv_append_partition(); + } + + public void send_append_partition(String db_name, String tbl_name, List part_vals) throws org.apache.thrift.TException + { + append_partition_args args = new append_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + sendBase("append_partition", args); + } + + public Partition recv_append_partition() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + append_partition_result result = new append_partition_result(); + receiveBase(result, "append_partition"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_partition failed: unknown result"); + } + + public AddPartitionsResult add_partitions_req(AddPartitionsRequest request) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + send_add_partitions_req(request); + return recv_add_partitions_req(); + } + + public void send_add_partitions_req(AddPartitionsRequest request) throws org.apache.thrift.TException + { + add_partitions_req_args args = new add_partitions_req_args(); + args.setRequest(request); + sendBase("add_partitions_req", args); + } + + public AddPartitionsResult recv_add_partitions_req() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + add_partitions_req_result result = new add_partitions_req_result(); + receiveBase(result, "add_partitions_req"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_partitions_req failed: unknown result"); + } + + public Partition append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context); + return recv_append_partition_with_environment_context(); + } + + public void send_append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context) throws org.apache.thrift.TException + { + append_partition_with_environment_context_args args = new append_partition_with_environment_context_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setEnvironment_context(environment_context); + sendBase("append_partition_with_environment_context", args); + } + + public Partition recv_append_partition_with_environment_context() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + append_partition_with_environment_context_result result = new append_partition_with_environment_context_result(); + receiveBase(result, "append_partition_with_environment_context"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_partition_with_environment_context failed: unknown result"); + } + + public Partition append_partition_by_name(String db_name, String tbl_name, String part_name) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + send_append_partition_by_name(db_name, tbl_name, part_name); + return recv_append_partition_by_name(); + } + + public void send_append_partition_by_name(String db_name, String tbl_name, String part_name) throws org.apache.thrift.TException + { + append_partition_by_name_args args = new append_partition_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + sendBase("append_partition_by_name", args); + } + + public Partition recv_append_partition_by_name() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + append_partition_by_name_result result = new append_partition_by_name_result(); + receiveBase(result, "append_partition_by_name"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_partition_by_name failed: unknown result"); + } + + public Partition append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context); + return recv_append_partition_by_name_with_environment_context(); + } + + public void send_append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context) throws org.apache.thrift.TException + { + append_partition_by_name_with_environment_context_args args = new append_partition_by_name_with_environment_context_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setEnvironment_context(environment_context); + sendBase("append_partition_by_name_with_environment_context", args); + } + + public Partition recv_append_partition_by_name_with_environment_context() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + append_partition_by_name_with_environment_context_result result = new append_partition_by_name_with_environment_context_result(); + receiveBase(result, "append_partition_by_name_with_environment_context"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_partition_by_name_with_environment_context failed: unknown result"); + } + + public boolean drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_drop_partition(db_name, tbl_name, part_vals, deleteData); + return recv_drop_partition(); + } + + public void send_drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws org.apache.thrift.TException + { + drop_partition_args args = new drop_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setDeleteData(deleteData); + sendBase("drop_partition", args); + } + + public boolean recv_drop_partition() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + drop_partition_result result = new drop_partition_result(); + receiveBase(result, "drop_partition"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partition failed: unknown result"); + } + + public boolean drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context); + return recv_drop_partition_with_environment_context(); + } + + public void send_drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context) throws org.apache.thrift.TException + { + drop_partition_with_environment_context_args args = new drop_partition_with_environment_context_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setDeleteData(deleteData); + args.setEnvironment_context(environment_context); + sendBase("drop_partition_with_environment_context", args); + } + + public boolean recv_drop_partition_with_environment_context() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + drop_partition_with_environment_context_result result = new drop_partition_with_environment_context_result(); + receiveBase(result, "drop_partition_with_environment_context"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partition_with_environment_context failed: unknown result"); + } + + public boolean drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + return recv_drop_partition_by_name(); + } + + public void send_drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws org.apache.thrift.TException + { + drop_partition_by_name_args args = new drop_partition_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setDeleteData(deleteData); + sendBase("drop_partition_by_name", args); + } + + public boolean recv_drop_partition_by_name() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + drop_partition_by_name_result result = new drop_partition_by_name_result(); + receiveBase(result, "drop_partition_by_name"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partition_by_name failed: unknown result"); + } + + public boolean drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context); + return recv_drop_partition_by_name_with_environment_context(); + } + + public void send_drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context) throws org.apache.thrift.TException + { + drop_partition_by_name_with_environment_context_args args = new drop_partition_by_name_with_environment_context_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setDeleteData(deleteData); + args.setEnvironment_context(environment_context); + sendBase("drop_partition_by_name_with_environment_context", args); + } + + public boolean recv_drop_partition_by_name_with_environment_context() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + drop_partition_by_name_with_environment_context_result result = new drop_partition_by_name_with_environment_context_result(); + receiveBase(result, "drop_partition_by_name_with_environment_context"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partition_by_name_with_environment_context failed: unknown result"); + } + + public DropPartitionsResult drop_partitions_req(DropPartitionsRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_drop_partitions_req(req); + return recv_drop_partitions_req(); + } + + public void send_drop_partitions_req(DropPartitionsRequest req) throws org.apache.thrift.TException + { + drop_partitions_req_args args = new drop_partitions_req_args(); + args.setReq(req); + sendBase("drop_partitions_req", args); + } + + public DropPartitionsResult recv_drop_partitions_req() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + drop_partitions_req_result result = new drop_partitions_req_result(); + receiveBase(result, "drop_partitions_req"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_partitions_req failed: unknown result"); + } + + public Partition get_partition(String db_name, String tbl_name, List part_vals) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_partition(db_name, tbl_name, part_vals); + return recv_get_partition(); + } + + public void send_get_partition(String db_name, String tbl_name, List part_vals) throws org.apache.thrift.TException + { + get_partition_args args = new get_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + sendBase("get_partition", args); + } + + public Partition recv_get_partition() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_partition_result result = new get_partition_result(); + receiveBase(result, "get_partition"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition failed: unknown result"); + } + + public Partition exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); + return recv_exchange_partition(); + } + + public void send_exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws org.apache.thrift.TException + { + exchange_partition_args args = new exchange_partition_args(); + args.setPartitionSpecs(partitionSpecs); + args.setSource_db(source_db); + args.setSource_table_name(source_table_name); + args.setDest_db(dest_db); + args.setDest_table_name(dest_table_name); + sendBase("exchange_partition", args); + } + + public Partition recv_exchange_partition() throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + exchange_partition_result result = new exchange_partition_result(); + receiveBase(result, "exchange_partition"); + if (result.isSetSuccess()) { + 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; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "exchange_partition failed: unknown result"); + } + + public List exchange_partitions(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name); + return recv_exchange_partitions(); + } + + public void send_exchange_partitions(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name) throws org.apache.thrift.TException + { + exchange_partitions_args args = new exchange_partitions_args(); + args.setPartitionSpecs(partitionSpecs); + args.setSource_db(source_db); + args.setSource_table_name(source_table_name); + args.setDest_db(dest_db); + args.setDest_table_name(dest_table_name); + sendBase("exchange_partitions", args); + } + + public List recv_exchange_partitions() throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + exchange_partitions_result result = new exchange_partitions_result(); + receiveBase(result, "exchange_partitions"); + if (result.isSetSuccess()) { + 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; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "exchange_partitions failed: unknown result"); + } + + public Partition get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); + return recv_get_partition_with_auth(); + } + + public void send_get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names) throws org.apache.thrift.TException + { + get_partition_with_auth_args args = new get_partition_with_auth_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setUser_name(user_name); + args.setGroup_names(group_names); + sendBase("get_partition_with_auth", args); + } + + public Partition recv_get_partition_with_auth() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_partition_with_auth_result result = new get_partition_with_auth_result(); + receiveBase(result, "get_partition_with_auth"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_with_auth failed: unknown result"); + } + + public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_partition_by_name(db_name, tbl_name, part_name); + return recv_get_partition_by_name(); + } + + public void send_get_partition_by_name(String db_name, String tbl_name, String part_name) throws org.apache.thrift.TException + { + get_partition_by_name_args args = new get_partition_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + sendBase("get_partition_by_name", args); + } + + public Partition recv_get_partition_by_name() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_partition_by_name_result result = new get_partition_by_name_result(); + receiveBase(result, "get_partition_by_name"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_by_name failed: unknown result"); + } + + public List get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_get_partitions(db_name, tbl_name, max_parts); + return recv_get_partitions(); + } + + public void send_get_partitions(String db_name, String tbl_name, short max_parts) throws org.apache.thrift.TException + { + get_partitions_args args = new get_partitions_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + sendBase("get_partitions", args); + } + + public List recv_get_partitions() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + get_partitions_result result = new get_partitions_result(); + receiveBase(result, "get_partitions"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result"); + } + + public List get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); + return recv_get_partitions_with_auth(); + } + + public void send_get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names) throws org.apache.thrift.TException + { + get_partitions_with_auth_args args = new get_partitions_with_auth_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + args.setUser_name(user_name); + args.setGroup_names(group_names); + sendBase("get_partitions_with_auth", args); + } + + public List recv_get_partitions_with_auth() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + get_partitions_with_auth_result result = new get_partitions_with_auth_result(); + receiveBase(result, "get_partitions_with_auth"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); + } + + public List get_partitions_pspec(String db_name, String tbl_name, int max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_get_partitions_pspec(db_name, tbl_name, max_parts); + return recv_get_partitions_pspec(); + } + + public void send_get_partitions_pspec(String db_name, String tbl_name, int max_parts) throws org.apache.thrift.TException + { + get_partitions_pspec_args args = new get_partitions_pspec_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + sendBase("get_partitions_pspec", args); + } + + public List recv_get_partitions_pspec() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + get_partitions_pspec_result result = new get_partitions_pspec_result(); + receiveBase(result, "get_partitions_pspec"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_pspec failed: unknown result"); + } + + public List get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, org.apache.thrift.TException + { + send_get_partition_names(db_name, tbl_name, max_parts); + return recv_get_partition_names(); + } + + public void send_get_partition_names(String db_name, String tbl_name, short max_parts) throws org.apache.thrift.TException + { + get_partition_names_args args = new get_partition_names_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + sendBase("get_partition_names", args); + } + + public List recv_get_partition_names() throws MetaException, org.apache.thrift.TException + { + get_partition_names_result result = new get_partition_names_result(); + receiveBase(result, "get_partition_names"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_names failed: unknown result"); + } + + public List get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); + return recv_get_partitions_ps(); + } + + public void send_get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws org.apache.thrift.TException + { + get_partitions_ps_args args = new get_partitions_ps_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); + sendBase("get_partitions_ps", args); + } + + public List recv_get_partitions_ps() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_partitions_ps_result result = new get_partitions_ps_result(); + receiveBase(result, "get_partitions_ps"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result"); + } + + public List get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); + return recv_get_partitions_ps_with_auth(); + } + + public void send_get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) throws org.apache.thrift.TException + { + get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); + args.setUser_name(user_name); + args.setGroup_names(group_names); + sendBase("get_partitions_ps_with_auth", args); + } + + public List recv_get_partitions_ps_with_auth() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); + receiveBase(result, "get_partitions_ps_with_auth"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); + } + + public List get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); + return recv_get_partition_names_ps(); + } + + public void send_get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws org.apache.thrift.TException + { + get_partition_names_ps_args args = new get_partition_names_ps_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); + sendBase("get_partition_names_ps", args); + } + + public List recv_get_partition_names_ps() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_partition_names_ps_result result = new get_partition_names_ps_result(); + receiveBase(result, "get_partition_names_ps"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_names_ps failed: unknown result"); + } + + public List get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); + return recv_get_partitions_by_filter(); + } + + public void send_get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws org.apache.thrift.TException + { + get_partitions_by_filter_args args = new get_partitions_by_filter_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setFilter(filter); + args.setMax_parts(max_parts); + sendBase("get_partitions_by_filter", args); + } + + public List recv_get_partitions_by_filter() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_partitions_by_filter_result result = new get_partitions_by_filter_result(); + receiveBase(result, "get_partitions_by_filter"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); + } + + public List get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts); + return recv_get_part_specs_by_filter(); + } + + public void send_get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts) throws org.apache.thrift.TException + { + get_part_specs_by_filter_args args = new get_part_specs_by_filter_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setFilter(filter); + args.setMax_parts(max_parts); + sendBase("get_part_specs_by_filter", args); + } + + public List recv_get_part_specs_by_filter() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_part_specs_by_filter_result result = new get_part_specs_by_filter_result(); + receiveBase(result, "get_part_specs_by_filter"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_part_specs_by_filter failed: unknown result"); + } + + public PartitionsByExprResult get_partitions_by_expr(PartitionsByExprRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_partitions_by_expr(req); + return recv_get_partitions_by_expr(); + } + + public void send_get_partitions_by_expr(PartitionsByExprRequest req) throws org.apache.thrift.TException + { + get_partitions_by_expr_args args = new get_partitions_by_expr_args(); + args.setReq(req); + sendBase("get_partitions_by_expr", args); + } + + public PartitionsByExprResult recv_get_partitions_by_expr() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_partitions_by_expr_result result = new get_partitions_by_expr_result(); + receiveBase(result, "get_partitions_by_expr"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_by_expr failed: unknown result"); + } + + public int get_num_partitions_by_filter(String db_name, String tbl_name, String filter) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_num_partitions_by_filter(db_name, tbl_name, filter); + return recv_get_num_partitions_by_filter(); + } + + public void send_get_num_partitions_by_filter(String db_name, String tbl_name, String filter) throws org.apache.thrift.TException + { + get_num_partitions_by_filter_args args = new get_num_partitions_by_filter_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setFilter(filter); + sendBase("get_num_partitions_by_filter", args); + } + + public int recv_get_num_partitions_by_filter() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_num_partitions_by_filter_result result = new get_num_partitions_by_filter_result(); + receiveBase(result, "get_num_partitions_by_filter"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_num_partitions_by_filter failed: unknown result"); + } + + public List get_partitions_by_names(String db_name, String tbl_name, List names) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_partitions_by_names(db_name, tbl_name, names); + return recv_get_partitions_by_names(); + } + + public void send_get_partitions_by_names(String db_name, String tbl_name, List names) throws org.apache.thrift.TException + { + get_partitions_by_names_args args = new get_partitions_by_names_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNames(names); + sendBase("get_partitions_by_names", args); + } + + public List recv_get_partitions_by_names() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_partitions_by_names_result result = new get_partitions_by_names_result(); + receiveBase(result, "get_partitions_by_names"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_by_names failed: unknown result"); + } + + public void alter_partition(String db_name, String tbl_name, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + send_alter_partition(db_name, tbl_name, new_part); + recv_alter_partition(); + } + + public void send_alter_partition(String db_name, String tbl_name, Partition new_part) throws org.apache.thrift.TException + { + alter_partition_args args = new alter_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNew_part(new_part); + sendBase("alter_partition", args); + } + + public void recv_alter_partition() throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + alter_partition_result result = new alter_partition_result(); + receiveBase(result, "alter_partition"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public void alter_partitions(String db_name, String tbl_name, List new_parts) throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + send_alter_partitions(db_name, tbl_name, new_parts); + recv_alter_partitions(); + } + + public void send_alter_partitions(String db_name, String tbl_name, List new_parts) throws org.apache.thrift.TException + { + alter_partitions_args args = new alter_partitions_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNew_parts(new_parts); + sendBase("alter_partitions", args); + } + + public void recv_alter_partitions() throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + alter_partitions_result result = new alter_partitions_result(); + receiveBase(result, "alter_partitions"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public void alter_partitions_with_environment_context(String db_name, String tbl_name, List new_parts, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context); + recv_alter_partitions_with_environment_context(); + } + + public void send_alter_partitions_with_environment_context(String db_name, String tbl_name, List new_parts, EnvironmentContext environment_context) throws org.apache.thrift.TException + { + alter_partitions_with_environment_context_args args = new alter_partitions_with_environment_context_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNew_parts(new_parts); + args.setEnvironment_context(environment_context); + sendBase("alter_partitions_with_environment_context", args); + } + + public void recv_alter_partitions_with_environment_context() throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + alter_partitions_with_environment_context_result result = new alter_partitions_with_environment_context_result(); + receiveBase(result, "alter_partitions_with_environment_context"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); + recv_alter_partition_with_environment_context(); + } + + public void send_alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context) throws org.apache.thrift.TException + { + alter_partition_with_environment_context_args args = new alter_partition_with_environment_context_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNew_part(new_part); + args.setEnvironment_context(environment_context); + sendBase("alter_partition_with_environment_context", args); + } + + public void recv_alter_partition_with_environment_context() throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + alter_partition_with_environment_context_result result = new alter_partition_with_environment_context_result(); + receiveBase(result, "alter_partition_with_environment_context"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public void rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part) throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + send_rename_partition(db_name, tbl_name, part_vals, new_part); + recv_rename_partition(); + } + + public void send_rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part) throws org.apache.thrift.TException + { + rename_partition_args args = new rename_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setNew_part(new_part); + sendBase("rename_partition", args); + } + + public void recv_rename_partition() throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + rename_partition_result result = new rename_partition_result(); + receiveBase(result, "rename_partition"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public boolean partition_name_has_valid_characters(List part_vals, boolean throw_exception) throws MetaException, org.apache.thrift.TException + { + send_partition_name_has_valid_characters(part_vals, throw_exception); + return recv_partition_name_has_valid_characters(); + } + + public void send_partition_name_has_valid_characters(List part_vals, boolean throw_exception) throws org.apache.thrift.TException + { + partition_name_has_valid_characters_args args = new partition_name_has_valid_characters_args(); + args.setPart_vals(part_vals); + args.setThrow_exception(throw_exception); + sendBase("partition_name_has_valid_characters", args); + } + + public boolean recv_partition_name_has_valid_characters() throws MetaException, org.apache.thrift.TException + { + partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); + receiveBase(result, "partition_name_has_valid_characters"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partition_name_has_valid_characters failed: unknown result"); + } + + public String get_config_value(String name, String defaultValue) throws ConfigValSecurityException, org.apache.thrift.TException + { + send_get_config_value(name, defaultValue); + return recv_get_config_value(); + } + + public void send_get_config_value(String name, String defaultValue) throws org.apache.thrift.TException + { + get_config_value_args args = new get_config_value_args(); + args.setName(name); + args.setDefaultValue(defaultValue); + sendBase("get_config_value", args); + } + + public String recv_get_config_value() throws ConfigValSecurityException, org.apache.thrift.TException + { + get_config_value_result result = new get_config_value_result(); + receiveBase(result, "get_config_value"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_config_value failed: unknown result"); + } + + public List partition_name_to_vals(String part_name) throws MetaException, org.apache.thrift.TException + { + send_partition_name_to_vals(part_name); + return recv_partition_name_to_vals(); + } + + public void send_partition_name_to_vals(String part_name) throws org.apache.thrift.TException + { + partition_name_to_vals_args args = new partition_name_to_vals_args(); + args.setPart_name(part_name); + sendBase("partition_name_to_vals", args); + } + + public List recv_partition_name_to_vals() throws MetaException, org.apache.thrift.TException + { + partition_name_to_vals_result result = new partition_name_to_vals_result(); + receiveBase(result, "partition_name_to_vals"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partition_name_to_vals failed: unknown result"); + } + + public Map partition_name_to_spec(String part_name) throws MetaException, org.apache.thrift.TException + { + send_partition_name_to_spec(part_name); + return recv_partition_name_to_spec(); + } + + public void send_partition_name_to_spec(String part_name) throws org.apache.thrift.TException + { + partition_name_to_spec_args args = new partition_name_to_spec_args(); + args.setPart_name(part_name); + sendBase("partition_name_to_spec", args); + } + + public Map recv_partition_name_to_spec() throws MetaException, org.apache.thrift.TException + { + partition_name_to_spec_result result = new partition_name_to_spec_result(); + receiveBase(result, "partition_name_to_spec"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partition_name_to_spec failed: unknown result"); + } + + public void markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException + { + send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); + recv_markPartitionForEvent(); + } + + public void send_markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws org.apache.thrift.TException + { + markPartitionForEvent_args args = new markPartitionForEvent_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setEventType(eventType); + sendBase("markPartitionForEvent", args); + } + + public void recv_markPartitionForEvent() throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException + { + markPartitionForEvent_result result = new markPartitionForEvent_result(); + receiveBase(result, "markPartitionForEvent"); + 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 boolean isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException + { + send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); + return recv_isPartitionMarkedForEvent(); + } + + public void send_isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType) throws org.apache.thrift.TException + { + isPartitionMarkedForEvent_args args = new isPartitionMarkedForEvent_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setEventType(eventType); + sendBase("isPartitionMarkedForEvent", args); + } + + public boolean recv_isPartitionMarkedForEvent() throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException + { + isPartitionMarkedForEvent_result result = new isPartitionMarkedForEvent_result(); + receiveBase(result, "isPartitionMarkedForEvent"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result"); + } + + public Index add_index(Index new_index, Table index_table) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + send_add_index(new_index, index_table); + return recv_add_index(); + } + + public void send_add_index(Index new_index, Table index_table) throws org.apache.thrift.TException + { + add_index_args args = new add_index_args(); + args.setNew_index(new_index); + args.setIndex_table(index_table); + sendBase("add_index", args); + } + + public Index recv_add_index() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException + { + add_index_result result = new add_index_result(); + receiveBase(result, "add_index"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_index failed: unknown result"); + } + + public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + send_alter_index(dbname, base_tbl_name, idx_name, new_idx); + recv_alter_index(); + } + + public void send_alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx) throws org.apache.thrift.TException + { + alter_index_args args = new alter_index_args(); + args.setDbname(dbname); + args.setBase_tbl_name(base_tbl_name); + args.setIdx_name(idx_name); + args.setNew_idx(new_idx); + sendBase("alter_index", args); + } + + public void recv_alter_index() throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + alter_index_result result = new alter_index_result(); + receiveBase(result, "alter_index"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public boolean drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); + return recv_drop_index_by_name(); + } + + public void send_drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws org.apache.thrift.TException + { + drop_index_by_name_args args = new drop_index_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setIndex_name(index_name); + args.setDeleteData(deleteData); + sendBase("drop_index_by_name", args); + } + + public boolean recv_drop_index_by_name() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + drop_index_by_name_result result = new drop_index_by_name_result(); + receiveBase(result, "drop_index_by_name"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_index_by_name failed: unknown result"); + } + + public Index get_index_by_name(String db_name, String tbl_name, String index_name) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_index_by_name(db_name, tbl_name, index_name); + return recv_get_index_by_name(); + } + + public void send_get_index_by_name(String db_name, String tbl_name, String index_name) throws org.apache.thrift.TException + { + get_index_by_name_args args = new get_index_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setIndex_name(index_name); + sendBase("get_index_by_name", args); + } + + public Index recv_get_index_by_name() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_index_by_name_result result = new get_index_by_name_result(); + receiveBase(result, "get_index_by_name"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_index_by_name failed: unknown result"); + } + + public List get_indexes(String db_name, String tbl_name, short max_indexes) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_get_indexes(db_name, tbl_name, max_indexes); + return recv_get_indexes(); + } + + public void send_get_indexes(String db_name, String tbl_name, short max_indexes) throws org.apache.thrift.TException + { + get_indexes_args args = new get_indexes_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_indexes(max_indexes); + sendBase("get_indexes", args); + } + + public List recv_get_indexes() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + get_indexes_result result = new get_indexes_result(); + receiveBase(result, "get_indexes"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_indexes failed: unknown result"); + } + + public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, org.apache.thrift.TException + { + send_get_index_names(db_name, tbl_name, max_indexes); + return recv_get_index_names(); + } + + public void send_get_index_names(String db_name, String tbl_name, short max_indexes) throws org.apache.thrift.TException + { + get_index_names_args args = new get_index_names_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_indexes(max_indexes); + sendBase("get_index_names", args); + } + + public List recv_get_index_names() throws MetaException, org.apache.thrift.TException + { + get_index_names_result result = new get_index_names_result(); + receiveBase(result, "get_index_names"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); + } + + public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_primary_keys(request); + return recv_get_primary_keys(); + } + + public void send_get_primary_keys(PrimaryKeysRequest request) throws org.apache.thrift.TException + { + get_primary_keys_args args = new get_primary_keys_args(); + args.setRequest(request); + sendBase("get_primary_keys", args); + } + + public PrimaryKeysResponse recv_get_primary_keys() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_primary_keys_result result = new get_primary_keys_result(); + receiveBase(result, "get_primary_keys"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_primary_keys failed: unknown result"); + } + + public ForeignKeysResponse get_foreign_keys(ForeignKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_foreign_keys(request); + return recv_get_foreign_keys(); + } + + public void send_get_foreign_keys(ForeignKeysRequest request) throws org.apache.thrift.TException + { + get_foreign_keys_args args = new get_foreign_keys_args(); + args.setRequest(request); + sendBase("get_foreign_keys", args); + } + + public ForeignKeysResponse recv_get_foreign_keys() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_foreign_keys_result result = new get_foreign_keys_result(); + receiveBase(result, "get_foreign_keys"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_foreign_keys failed: unknown result"); + } + + public UniqueConstraintsResponse get_unique_constraints(UniqueConstraintsRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_unique_constraints(request); + return recv_get_unique_constraints(); + } + + public void send_get_unique_constraints(UniqueConstraintsRequest request) throws org.apache.thrift.TException + { + get_unique_constraints_args args = new get_unique_constraints_args(); + args.setRequest(request); + sendBase("get_unique_constraints", args); + } + + public UniqueConstraintsResponse recv_get_unique_constraints() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_unique_constraints_result result = new get_unique_constraints_result(); + receiveBase(result, "get_unique_constraints"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_unique_constraints failed: unknown result"); + } + + public NotNullConstraintsResponse get_not_null_constraints(NotNullConstraintsRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_not_null_constraints(request); + return recv_get_not_null_constraints(); + } + + public void send_get_not_null_constraints(NotNullConstraintsRequest request) throws org.apache.thrift.TException + { + get_not_null_constraints_args args = new get_not_null_constraints_args(); + args.setRequest(request); + sendBase("get_not_null_constraints", args); + } + + public NotNullConstraintsResponse recv_get_not_null_constraints() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_not_null_constraints_result result = new get_not_null_constraints_result(); + receiveBase(result, "get_not_null_constraints"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_not_null_constraints failed: unknown result"); + } + + public boolean update_table_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException + { + send_update_table_column_statistics(stats_obj); + return recv_update_table_column_statistics(); + } + + public void send_update_table_column_statistics(ColumnStatistics stats_obj) throws org.apache.thrift.TException + { + update_table_column_statistics_args args = new update_table_column_statistics_args(); + args.setStats_obj(stats_obj); + sendBase("update_table_column_statistics", args); + } + + public boolean recv_update_table_column_statistics() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException + { + update_table_column_statistics_result result = new update_table_column_statistics_result(); + receiveBase(result, "update_table_column_statistics"); + if (result.isSetSuccess()) { + 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; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "update_table_column_statistics failed: unknown result"); + } + + public boolean update_partition_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException + { + send_update_partition_column_statistics(stats_obj); + return recv_update_partition_column_statistics(); + } + + public void send_update_partition_column_statistics(ColumnStatistics stats_obj) throws org.apache.thrift.TException + { + update_partition_column_statistics_args args = new update_partition_column_statistics_args(); + args.setStats_obj(stats_obj); + sendBase("update_partition_column_statistics", args); + } + + public boolean recv_update_partition_column_statistics() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException + { + update_partition_column_statistics_result result = new update_partition_column_statistics_result(); + receiveBase(result, "update_partition_column_statistics"); + if (result.isSetSuccess()) { + 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; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "update_partition_column_statistics failed: unknown result"); + } + + public ColumnStatistics get_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException + { + send_get_table_column_statistics(db_name, tbl_name, col_name); + return recv_get_table_column_statistics(); + } + + public void send_get_table_column_statistics(String db_name, String tbl_name, String col_name) throws org.apache.thrift.TException + { + get_table_column_statistics_args args = new get_table_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setCol_name(col_name); + sendBase("get_table_column_statistics", args); + } + + public ColumnStatistics recv_get_table_column_statistics() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException + { + get_table_column_statistics_result result = new get_table_column_statistics_result(); + receiveBase(result, "get_table_column_statistics"); + if (result.isSetSuccess()) { + 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; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_column_statistics failed: unknown result"); + } + + public ColumnStatistics get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException + { + send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name); + return recv_get_partition_column_statistics(); + } + + public void send_get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws org.apache.thrift.TException + { + get_partition_column_statistics_args args = new get_partition_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setCol_name(col_name); + sendBase("get_partition_column_statistics", args); + } + + public ColumnStatistics recv_get_partition_column_statistics() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException + { + get_partition_column_statistics_result result = new get_partition_column_statistics_result(); + receiveBase(result, "get_partition_column_statistics"); + if (result.isSetSuccess()) { + 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; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_column_statistics failed: unknown result"); + } + + public TableStatsResult get_table_statistics_req(TableStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_get_table_statistics_req(request); + return recv_get_table_statistics_req(); + } + + public void send_get_table_statistics_req(TableStatsRequest request) throws org.apache.thrift.TException + { + get_table_statistics_req_args args = new get_table_statistics_req_args(); + args.setRequest(request); + sendBase("get_table_statistics_req", args); + } + + public TableStatsResult recv_get_table_statistics_req() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + get_table_statistics_req_result result = new get_table_statistics_req_result(); + receiveBase(result, "get_table_statistics_req"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_statistics_req failed: unknown result"); + } + + public PartitionsStatsResult get_partitions_statistics_req(PartitionsStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_get_partitions_statistics_req(request); + return recv_get_partitions_statistics_req(); + } + + public void send_get_partitions_statistics_req(PartitionsStatsRequest request) throws org.apache.thrift.TException + { + get_partitions_statistics_req_args args = new get_partitions_statistics_req_args(); + args.setRequest(request); + sendBase("get_partitions_statistics_req", args); + } + + public PartitionsStatsResult recv_get_partitions_statistics_req() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + get_partitions_statistics_req_result result = new get_partitions_statistics_req_result(); + receiveBase(result, "get_partitions_statistics_req"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partitions_statistics_req failed: unknown result"); + } + + public AggrStats get_aggr_stats_for(PartitionsStatsRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_get_aggr_stats_for(request); + return recv_get_aggr_stats_for(); + } + + public void send_get_aggr_stats_for(PartitionsStatsRequest request) throws org.apache.thrift.TException + { + get_aggr_stats_for_args args = new get_aggr_stats_for_args(); + args.setRequest(request); + sendBase("get_aggr_stats_for", args); + } + + public AggrStats recv_get_aggr_stats_for() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + get_aggr_stats_for_result result = new get_aggr_stats_for_result(); + receiveBase(result, "get_aggr_stats_for"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_aggr_stats_for failed: unknown result"); + } + + public boolean set_aggr_stats_for(SetPartitionsStatsRequest request) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException + { + send_set_aggr_stats_for(request); + return recv_set_aggr_stats_for(); + } + + public void send_set_aggr_stats_for(SetPartitionsStatsRequest request) throws org.apache.thrift.TException + { + set_aggr_stats_for_args args = new set_aggr_stats_for_args(); + args.setRequest(request); + sendBase("set_aggr_stats_for", args); + } + + public boolean recv_set_aggr_stats_for() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException + { + set_aggr_stats_for_result result = new set_aggr_stats_for_result(); + receiveBase(result, "set_aggr_stats_for"); + if (result.isSetSuccess()) { + 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; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "set_aggr_stats_for failed: unknown result"); + } + + public boolean delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); + return recv_delete_partition_column_statistics(); + } + + public void send_delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws org.apache.thrift.TException + { + delete_partition_column_statistics_args args = new delete_partition_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setCol_name(col_name); + sendBase("delete_partition_column_statistics", args); + } + + public boolean recv_delete_partition_column_statistics() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); + receiveBase(result, "delete_partition_column_statistics"); + if (result.isSetSuccess()) { + 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; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delete_partition_column_statistics failed: unknown result"); + } + + public boolean delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + send_delete_table_column_statistics(db_name, tbl_name, col_name); + return recv_delete_table_column_statistics(); + } + + public void send_delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws org.apache.thrift.TException + { + delete_table_column_statistics_args args = new delete_table_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setCol_name(col_name); + sendBase("delete_table_column_statistics", args); + } + + public boolean recv_delete_table_column_statistics() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + delete_table_column_statistics_result result = new delete_table_column_statistics_result(); + receiveBase(result, "delete_table_column_statistics"); + if (result.isSetSuccess()) { + 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; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); + } + + public void create_function(Function func) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_create_function(func); + recv_create_function(); + } + + public void send_create_function(Function func) throws org.apache.thrift.TException + { + create_function_args args = new create_function_args(); + args.setFunc(func); + sendBase("create_function", args); + } + + public void recv_create_function() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException + { + create_function_result result = new create_function_result(); + receiveBase(result, "create_function"); + 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 void drop_function(String dbName, String funcName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_drop_function(dbName, funcName); + recv_drop_function(); + } + + public void send_drop_function(String dbName, String funcName) throws org.apache.thrift.TException + { + drop_function_args args = new drop_function_args(); + args.setDbName(dbName); + args.setFuncName(funcName); + sendBase("drop_function", args); + } + + public void recv_drop_function() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + drop_function_result result = new drop_function_result(); + receiveBase(result, "drop_function"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o3 != null) { + throw result.o3; + } + return; + } + + public void alter_function(String dbName, String funcName, Function newFunc) throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + send_alter_function(dbName, funcName, newFunc); + recv_alter_function(); + } + + public void send_alter_function(String dbName, String funcName, Function newFunc) throws org.apache.thrift.TException + { + alter_function_args args = new alter_function_args(); + args.setDbName(dbName); + args.setFuncName(funcName); + args.setNewFunc(newFunc); + sendBase("alter_function", args); + } + + public void recv_alter_function() throws InvalidOperationException, MetaException, org.apache.thrift.TException + { + alter_function_result result = new alter_function_result(); + receiveBase(result, "alter_function"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public List get_functions(String dbName, String pattern) throws MetaException, org.apache.thrift.TException + { + send_get_functions(dbName, pattern); + return recv_get_functions(); + } + + public void send_get_functions(String dbName, String pattern) throws org.apache.thrift.TException + { + get_functions_args args = new get_functions_args(); + args.setDbName(dbName); + args.setPattern(pattern); + sendBase("get_functions", args); + } + + public List recv_get_functions() throws MetaException, org.apache.thrift.TException + { + get_functions_result result = new get_functions_result(); + receiveBase(result, "get_functions"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_functions failed: unknown result"); + } + + public Function get_function(String dbName, String funcName) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_function(dbName, funcName); + return recv_get_function(); + } + + public void send_get_function(String dbName, String funcName) throws org.apache.thrift.TException + { + get_function_args args = new get_function_args(); + args.setDbName(dbName); + args.setFuncName(funcName); + sendBase("get_function", args); + } + + public Function recv_get_function() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_function_result result = new get_function_result(); + receiveBase(result, "get_function"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_function failed: unknown result"); + } + + public GetAllFunctionsResponse get_all_functions() throws MetaException, org.apache.thrift.TException + { + send_get_all_functions(); + return recv_get_all_functions(); + } + + public void send_get_all_functions() throws org.apache.thrift.TException + { + get_all_functions_args args = new get_all_functions_args(); + sendBase("get_all_functions", args); + } + + public GetAllFunctionsResponse recv_get_all_functions() throws MetaException, org.apache.thrift.TException + { + get_all_functions_result result = new get_all_functions_result(); + receiveBase(result, "get_all_functions"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_functions failed: unknown result"); + } + + public boolean create_role(Role role) throws MetaException, org.apache.thrift.TException + { + send_create_role(role); + return recv_create_role(); + } + + public void send_create_role(Role role) throws org.apache.thrift.TException + { + create_role_args args = new create_role_args(); + args.setRole(role); + sendBase("create_role", args); + } + + public boolean recv_create_role() throws MetaException, org.apache.thrift.TException + { + create_role_result result = new create_role_result(); + receiveBase(result, "create_role"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "create_role failed: unknown result"); + } + + public boolean drop_role(String role_name) throws MetaException, org.apache.thrift.TException + { + send_drop_role(role_name); + return recv_drop_role(); + } + + public void send_drop_role(String role_name) throws org.apache.thrift.TException + { + drop_role_args args = new drop_role_args(); + args.setRole_name(role_name); + sendBase("drop_role", args); + } + + public boolean recv_drop_role() throws MetaException, org.apache.thrift.TException + { + drop_role_result result = new drop_role_result(); + receiveBase(result, "drop_role"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drop_role failed: unknown result"); + } + + public List get_role_names() throws MetaException, org.apache.thrift.TException + { + send_get_role_names(); + return recv_get_role_names(); + } + + public void send_get_role_names() throws org.apache.thrift.TException + { + get_role_names_args args = new get_role_names_args(); + sendBase("get_role_names", args); + } + + public List recv_get_role_names() throws MetaException, org.apache.thrift.TException + { + get_role_names_result result = new get_role_names_result(); + receiveBase(result, "get_role_names"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_role_names failed: unknown result"); + } + + public boolean grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws MetaException, org.apache.thrift.TException + { + send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); + return recv_grant_role(); + } + + public void send_grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws org.apache.thrift.TException + { + grant_role_args args = new grant_role_args(); + args.setRole_name(role_name); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + args.setGrantor(grantor); + args.setGrantorType(grantorType); + args.setGrant_option(grant_option); + sendBase("grant_role", args); + } + + public boolean recv_grant_role() throws MetaException, org.apache.thrift.TException + { + grant_role_result result = new grant_role_result(); + receiveBase(result, "grant_role"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_role failed: unknown result"); + } + + public boolean revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws MetaException, org.apache.thrift.TException + { + send_revoke_role(role_name, principal_name, principal_type); + return recv_revoke_role(); + } + + public void send_revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws org.apache.thrift.TException + { + revoke_role_args args = new revoke_role_args(); + args.setRole_name(role_name); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + sendBase("revoke_role", args); + } + + public boolean recv_revoke_role() throws MetaException, org.apache.thrift.TException + { + revoke_role_result result = new revoke_role_result(); + receiveBase(result, "revoke_role"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revoke_role failed: unknown result"); + } + + public List list_roles(String principal_name, PrincipalType principal_type) throws MetaException, org.apache.thrift.TException + { + send_list_roles(principal_name, principal_type); + return recv_list_roles(); + } + + public void send_list_roles(String principal_name, PrincipalType principal_type) throws org.apache.thrift.TException + { + list_roles_args args = new list_roles_args(); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + sendBase("list_roles", args); + } + + public List recv_list_roles() throws MetaException, org.apache.thrift.TException + { + list_roles_result result = new list_roles_result(); + receiveBase(result, "list_roles"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_roles failed: unknown result"); + } + + public GrantRevokeRoleResponse grant_revoke_role(GrantRevokeRoleRequest request) throws MetaException, org.apache.thrift.TException + { + send_grant_revoke_role(request); + return recv_grant_revoke_role(); + } + + public void send_grant_revoke_role(GrantRevokeRoleRequest request) throws org.apache.thrift.TException + { + grant_revoke_role_args args = new grant_revoke_role_args(); + args.setRequest(request); + sendBase("grant_revoke_role", args); + } + + public GrantRevokeRoleResponse recv_grant_revoke_role() throws MetaException, org.apache.thrift.TException + { + grant_revoke_role_result result = new grant_revoke_role_result(); + receiveBase(result, "grant_revoke_role"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_revoke_role failed: unknown result"); + } + + public GetPrincipalsInRoleResponse get_principals_in_role(GetPrincipalsInRoleRequest request) throws MetaException, org.apache.thrift.TException + { + send_get_principals_in_role(request); + return recv_get_principals_in_role(); + } + + public void send_get_principals_in_role(GetPrincipalsInRoleRequest request) throws org.apache.thrift.TException + { + get_principals_in_role_args args = new get_principals_in_role_args(); + args.setRequest(request); + sendBase("get_principals_in_role", args); + } + + public GetPrincipalsInRoleResponse recv_get_principals_in_role() throws MetaException, org.apache.thrift.TException + { + get_principals_in_role_result result = new get_principals_in_role_result(); + receiveBase(result, "get_principals_in_role"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_principals_in_role failed: unknown result"); + } + + public GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request) throws MetaException, org.apache.thrift.TException + { + send_get_role_grants_for_principal(request); + return recv_get_role_grants_for_principal(); + } + + public void send_get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request) throws org.apache.thrift.TException + { + get_role_grants_for_principal_args args = new get_role_grants_for_principal_args(); + args.setRequest(request); + sendBase("get_role_grants_for_principal", args); + } + + public GetRoleGrantsForPrincipalResponse recv_get_role_grants_for_principal() throws MetaException, org.apache.thrift.TException + { + get_role_grants_for_principal_result result = new get_role_grants_for_principal_result(); + receiveBase(result, "get_role_grants_for_principal"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_role_grants_for_principal failed: unknown result"); + } + + public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names) throws MetaException, org.apache.thrift.TException + { + send_get_privilege_set(hiveObject, user_name, group_names); + return recv_get_privilege_set(); + } + + public void send_get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names) throws org.apache.thrift.TException + { + get_privilege_set_args args = new get_privilege_set_args(); + args.setHiveObject(hiveObject); + args.setUser_name(user_name); + args.setGroup_names(group_names); + sendBase("get_privilege_set", args); + } + + public PrincipalPrivilegeSet recv_get_privilege_set() throws MetaException, org.apache.thrift.TException + { + get_privilege_set_result result = new get_privilege_set_result(); + receiveBase(result, "get_privilege_set"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_privilege_set failed: unknown result"); + } + + public List list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws MetaException, org.apache.thrift.TException + { + send_list_privileges(principal_name, principal_type, hiveObject); + return recv_list_privileges(); + } + + public void send_list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws org.apache.thrift.TException + { + list_privileges_args args = new list_privileges_args(); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + args.setHiveObject(hiveObject); + sendBase("list_privileges", args); + } + + public List recv_list_privileges() throws MetaException, org.apache.thrift.TException + { + list_privileges_result result = new list_privileges_result(); + receiveBase(result, "list_privileges"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "list_privileges failed: unknown result"); + } + + public boolean grant_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException + { + send_grant_privileges(privileges); + return recv_grant_privileges(); + } + + public void send_grant_privileges(PrivilegeBag privileges) throws org.apache.thrift.TException + { + grant_privileges_args args = new grant_privileges_args(); + args.setPrivileges(privileges); + sendBase("grant_privileges", args); + } + + public boolean recv_grant_privileges() throws MetaException, org.apache.thrift.TException + { + grant_privileges_result result = new grant_privileges_result(); + receiveBase(result, "grant_privileges"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_privileges failed: unknown result"); + } + + public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException + { + send_revoke_privileges(privileges); + return recv_revoke_privileges(); + } + + public void send_revoke_privileges(PrivilegeBag privileges) throws org.apache.thrift.TException + { + revoke_privileges_args args = new revoke_privileges_args(); + args.setPrivileges(privileges); + sendBase("revoke_privileges", args); + } + + public boolean recv_revoke_privileges() throws MetaException, org.apache.thrift.TException + { + revoke_privileges_result result = new revoke_privileges_result(); + receiveBase(result, "revoke_privileges"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result"); + } + + public GrantRevokePrivilegeResponse grant_revoke_privileges(GrantRevokePrivilegeRequest request) throws MetaException, org.apache.thrift.TException + { + send_grant_revoke_privileges(request); + return recv_grant_revoke_privileges(); + } + + public void send_grant_revoke_privileges(GrantRevokePrivilegeRequest request) throws org.apache.thrift.TException + { + grant_revoke_privileges_args args = new grant_revoke_privileges_args(); + args.setRequest(request); + sendBase("grant_revoke_privileges", args); + } + + public GrantRevokePrivilegeResponse recv_grant_revoke_privileges() throws MetaException, org.apache.thrift.TException + { + grant_revoke_privileges_result result = new grant_revoke_privileges_result(); + receiveBase(result, "grant_revoke_privileges"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grant_revoke_privileges failed: unknown result"); + } + + public List set_ugi(String user_name, List group_names) throws MetaException, org.apache.thrift.TException + { + send_set_ugi(user_name, group_names); + return recv_set_ugi(); + } + + public void send_set_ugi(String user_name, List group_names) throws org.apache.thrift.TException + { + set_ugi_args args = new set_ugi_args(); + args.setUser_name(user_name); + args.setGroup_names(group_names); + sendBase("set_ugi", args); + } + + public List recv_set_ugi() throws MetaException, org.apache.thrift.TException + { + set_ugi_result result = new set_ugi_result(); + receiveBase(result, "set_ugi"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "set_ugi failed: unknown result"); + } + + public String get_delegation_token(String token_owner, String renewer_kerberos_principal_name) throws MetaException, org.apache.thrift.TException + { + send_get_delegation_token(token_owner, renewer_kerberos_principal_name); + return recv_get_delegation_token(); + } + + public void send_get_delegation_token(String token_owner, String renewer_kerberos_principal_name) throws org.apache.thrift.TException + { + get_delegation_token_args args = new get_delegation_token_args(); + args.setToken_owner(token_owner); + args.setRenewer_kerberos_principal_name(renewer_kerberos_principal_name); + sendBase("get_delegation_token", args); + } + + public String recv_get_delegation_token() throws MetaException, org.apache.thrift.TException + { + get_delegation_token_result result = new get_delegation_token_result(); + receiveBase(result, "get_delegation_token"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_delegation_token failed: unknown result"); + } + + public long renew_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException + { + send_renew_delegation_token(token_str_form); + return recv_renew_delegation_token(); + } + + public void send_renew_delegation_token(String token_str_form) throws org.apache.thrift.TException + { + renew_delegation_token_args args = new renew_delegation_token_args(); + args.setToken_str_form(token_str_form); + sendBase("renew_delegation_token", args); + } + + public long recv_renew_delegation_token() throws MetaException, org.apache.thrift.TException + { + renew_delegation_token_result result = new renew_delegation_token_result(); + receiveBase(result, "renew_delegation_token"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "renew_delegation_token failed: unknown result"); + } + + public void cancel_delegation_token(String token_str_form) throws MetaException, org.apache.thrift.TException + { + send_cancel_delegation_token(token_str_form); + recv_cancel_delegation_token(); + } + + public void send_cancel_delegation_token(String token_str_form) throws org.apache.thrift.TException + { + cancel_delegation_token_args args = new cancel_delegation_token_args(); + args.setToken_str_form(token_str_form); + sendBase("cancel_delegation_token", args); + } + + public void recv_cancel_delegation_token() throws MetaException, org.apache.thrift.TException + { + cancel_delegation_token_result result = new cancel_delegation_token_result(); + receiveBase(result, "cancel_delegation_token"); + if (result.o1 != null) { + throw result.o1; + } + return; + } + + public boolean add_token(String token_identifier, String delegation_token) throws org.apache.thrift.TException + { + send_add_token(token_identifier, delegation_token); + return recv_add_token(); + } + + public void send_add_token(String token_identifier, String delegation_token) throws org.apache.thrift.TException + { + add_token_args args = new add_token_args(); + args.setToken_identifier(token_identifier); + args.setDelegation_token(delegation_token); + sendBase("add_token", args); + } + + public boolean recv_add_token() throws org.apache.thrift.TException + { + add_token_result result = new add_token_result(); + receiveBase(result, "add_token"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_token failed: unknown result"); + } + + public boolean remove_token(String token_identifier) throws org.apache.thrift.TException + { + send_remove_token(token_identifier); + return recv_remove_token(); + } + + public void send_remove_token(String token_identifier) throws org.apache.thrift.TException + { + remove_token_args args = new remove_token_args(); + args.setToken_identifier(token_identifier); + sendBase("remove_token", args); + } + + public boolean recv_remove_token() throws org.apache.thrift.TException + { + remove_token_result result = new remove_token_result(); + receiveBase(result, "remove_token"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "remove_token failed: unknown result"); + } + + public String get_token(String token_identifier) throws org.apache.thrift.TException + { + send_get_token(token_identifier); + return recv_get_token(); + } + + public void send_get_token(String token_identifier) throws org.apache.thrift.TException + { + get_token_args args = new get_token_args(); + args.setToken_identifier(token_identifier); + sendBase("get_token", args); + } + + public String recv_get_token() throws org.apache.thrift.TException + { + get_token_result result = new get_token_result(); + receiveBase(result, "get_token"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_token failed: unknown result"); + } + + public List get_all_token_identifiers() throws org.apache.thrift.TException + { + send_get_all_token_identifiers(); + return recv_get_all_token_identifiers(); + } + + public void send_get_all_token_identifiers() throws org.apache.thrift.TException + { + get_all_token_identifiers_args args = new get_all_token_identifiers_args(); + sendBase("get_all_token_identifiers", args); + } + + public List recv_get_all_token_identifiers() throws org.apache.thrift.TException + { + get_all_token_identifiers_result result = new get_all_token_identifiers_result(); + receiveBase(result, "get_all_token_identifiers"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_token_identifiers failed: unknown result"); + } + + public int add_master_key(String key) throws MetaException, org.apache.thrift.TException + { + send_add_master_key(key); + return recv_add_master_key(); + } + + public void send_add_master_key(String key) throws org.apache.thrift.TException + { + add_master_key_args args = new add_master_key_args(); + args.setKey(key); + sendBase("add_master_key", args); + } + + public int recv_add_master_key() throws MetaException, org.apache.thrift.TException + { + add_master_key_result result = new add_master_key_result(); + receiveBase(result, "add_master_key"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "add_master_key failed: unknown result"); + } + + public void update_master_key(int seq_number, String key) throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + send_update_master_key(seq_number, key); + recv_update_master_key(); + } + + public void send_update_master_key(int seq_number, String key) throws org.apache.thrift.TException + { + update_master_key_args args = new update_master_key_args(); + args.setSeq_number(seq_number); + args.setKey(key); + sendBase("update_master_key", args); + } + + public void recv_update_master_key() throws NoSuchObjectException, MetaException, org.apache.thrift.TException + { + update_master_key_result result = new update_master_key_result(); + receiveBase(result, "update_master_key"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public boolean remove_master_key(int key_seq) throws org.apache.thrift.TException + { + send_remove_master_key(key_seq); + return recv_remove_master_key(); + } + + public void send_remove_master_key(int key_seq) throws org.apache.thrift.TException + { + remove_master_key_args args = new remove_master_key_args(); + args.setKey_seq(key_seq); + sendBase("remove_master_key", args); + } + + public boolean recv_remove_master_key() throws org.apache.thrift.TException + { + remove_master_key_result result = new remove_master_key_result(); + receiveBase(result, "remove_master_key"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "remove_master_key failed: unknown result"); + } + + public List get_master_keys() throws org.apache.thrift.TException + { + send_get_master_keys(); + return recv_get_master_keys(); + } + + public void send_get_master_keys() throws org.apache.thrift.TException + { + get_master_keys_args args = new get_master_keys_args(); + sendBase("get_master_keys", args); + } + + public List recv_get_master_keys() throws org.apache.thrift.TException + { + get_master_keys_result result = new get_master_keys_result(); + receiveBase(result, "get_master_keys"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_master_keys failed: unknown result"); + } + + public GetOpenTxnsResponse get_open_txns() throws org.apache.thrift.TException + { + send_get_open_txns(); + return recv_get_open_txns(); + } + + public void send_get_open_txns() throws org.apache.thrift.TException + { + get_open_txns_args args = new get_open_txns_args(); + sendBase("get_open_txns", args); + } + + public GetOpenTxnsResponse recv_get_open_txns() throws org.apache.thrift.TException + { + get_open_txns_result result = new get_open_txns_result(); + receiveBase(result, "get_open_txns"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_open_txns failed: unknown result"); + } + + public GetOpenTxnsInfoResponse get_open_txns_info() throws org.apache.thrift.TException + { + send_get_open_txns_info(); + return recv_get_open_txns_info(); + } + + public void send_get_open_txns_info() throws org.apache.thrift.TException + { + get_open_txns_info_args args = new get_open_txns_info_args(); + sendBase("get_open_txns_info", args); + } + + public GetOpenTxnsInfoResponse recv_get_open_txns_info() throws org.apache.thrift.TException + { + get_open_txns_info_result result = new get_open_txns_info_result(); + receiveBase(result, "get_open_txns_info"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_open_txns_info failed: unknown result"); + } + + public OpenTxnsResponse open_txns(OpenTxnRequest rqst) throws org.apache.thrift.TException + { + send_open_txns(rqst); + return recv_open_txns(); + } + + public void send_open_txns(OpenTxnRequest rqst) throws org.apache.thrift.TException + { + open_txns_args args = new open_txns_args(); + args.setRqst(rqst); + sendBase("open_txns", args); + } + + public OpenTxnsResponse recv_open_txns() throws org.apache.thrift.TException + { + open_txns_result result = new open_txns_result(); + receiveBase(result, "open_txns"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "open_txns failed: unknown result"); + } + + public void abort_txn(AbortTxnRequest rqst) throws NoSuchTxnException, org.apache.thrift.TException + { + send_abort_txn(rqst); + recv_abort_txn(); + } + + public void send_abort_txn(AbortTxnRequest rqst) throws org.apache.thrift.TException + { + abort_txn_args args = new abort_txn_args(); + args.setRqst(rqst); + sendBase("abort_txn", args); + } + + public void recv_abort_txn() throws NoSuchTxnException, org.apache.thrift.TException + { + abort_txn_result result = new abort_txn_result(); + receiveBase(result, "abort_txn"); + if (result.o1 != null) { + throw result.o1; + } + return; + } + + public void abort_txns(AbortTxnsRequest rqst) throws NoSuchTxnException, org.apache.thrift.TException + { + send_abort_txns(rqst); + recv_abort_txns(); + } + + public void send_abort_txns(AbortTxnsRequest rqst) throws org.apache.thrift.TException + { + abort_txns_args args = new abort_txns_args(); + args.setRqst(rqst); + sendBase("abort_txns", args); + } + + public void recv_abort_txns() throws NoSuchTxnException, org.apache.thrift.TException + { + abort_txns_result result = new abort_txns_result(); + receiveBase(result, "abort_txns"); + if (result.o1 != null) { + throw result.o1; + } + return; + } + + public void commit_txn(CommitTxnRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException + { + send_commit_txn(rqst); + recv_commit_txn(); + } + + public void send_commit_txn(CommitTxnRequest rqst) throws org.apache.thrift.TException + { + commit_txn_args args = new commit_txn_args(); + args.setRqst(rqst); + sendBase("commit_txn", args); + } + + public void recv_commit_txn() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException + { + commit_txn_result result = new commit_txn_result(); + receiveBase(result, "commit_txn"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public LockResponse lock(LockRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException + { + send_lock(rqst); + return recv_lock(); + } + + public void send_lock(LockRequest rqst) throws org.apache.thrift.TException + { + lock_args args = new lock_args(); + args.setRqst(rqst); + sendBase("lock", args); + } + + public LockResponse recv_lock() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException + { + lock_result result = new lock_result(); + receiveBase(result, "lock"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "lock failed: unknown result"); + } + + public LockResponse check_lock(CheckLockRequest rqst) throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException + { + send_check_lock(rqst); + return recv_check_lock(); + } + + public void send_check_lock(CheckLockRequest rqst) throws org.apache.thrift.TException + { + check_lock_args args = new check_lock_args(); + args.setRqst(rqst); + sendBase("check_lock", args); + } + + public LockResponse recv_check_lock() throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException + { + check_lock_result result = new check_lock_result(); + receiveBase(result, "check_lock"); + if (result.isSetSuccess()) { + 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 org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "check_lock failed: unknown result"); + } + + public void unlock(UnlockRequest rqst) throws NoSuchLockException, TxnOpenException, org.apache.thrift.TException + { + send_unlock(rqst); + recv_unlock(); + } + + public void send_unlock(UnlockRequest rqst) throws org.apache.thrift.TException + { + unlock_args args = new unlock_args(); + args.setRqst(rqst); + sendBase("unlock", args); + } + + public void recv_unlock() throws NoSuchLockException, TxnOpenException, org.apache.thrift.TException + { + unlock_result result = new unlock_result(); + receiveBase(result, "unlock"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public ShowLocksResponse show_locks(ShowLocksRequest rqst) throws org.apache.thrift.TException + { + send_show_locks(rqst); + return recv_show_locks(); + } + + public void send_show_locks(ShowLocksRequest rqst) throws org.apache.thrift.TException + { + show_locks_args args = new show_locks_args(); + args.setRqst(rqst); + sendBase("show_locks", args); + } + + public ShowLocksResponse recv_show_locks() throws org.apache.thrift.TException + { + show_locks_result result = new show_locks_result(); + receiveBase(result, "show_locks"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "show_locks failed: unknown result"); + } + + public void heartbeat(HeartbeatRequest ids) throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException + { + send_heartbeat(ids); + recv_heartbeat(); + } + + public void send_heartbeat(HeartbeatRequest ids) throws org.apache.thrift.TException + { + heartbeat_args args = new heartbeat_args(); + args.setIds(ids); + sendBase("heartbeat", args); + } + + public void recv_heartbeat() throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException + { + heartbeat_result result = new heartbeat_result(); + receiveBase(result, "heartbeat"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + return; + } + + public HeartbeatTxnRangeResponse heartbeat_txn_range(HeartbeatTxnRangeRequest txns) throws org.apache.thrift.TException + { + send_heartbeat_txn_range(txns); + return recv_heartbeat_txn_range(); + } + + public void send_heartbeat_txn_range(HeartbeatTxnRangeRequest txns) throws org.apache.thrift.TException + { + heartbeat_txn_range_args args = new heartbeat_txn_range_args(); + args.setTxns(txns); + sendBase("heartbeat_txn_range", args); + } + + public HeartbeatTxnRangeResponse recv_heartbeat_txn_range() throws org.apache.thrift.TException + { + heartbeat_txn_range_result result = new heartbeat_txn_range_result(); + receiveBase(result, "heartbeat_txn_range"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "heartbeat_txn_range failed: unknown result"); + } + + public void compact(CompactionRequest rqst) throws org.apache.thrift.TException + { + send_compact(rqst); + recv_compact(); + } + + public void send_compact(CompactionRequest rqst) throws org.apache.thrift.TException + { + compact_args args = new compact_args(); + args.setRqst(rqst); + sendBase("compact", args); + } + + public void recv_compact() throws org.apache.thrift.TException + { + compact_result result = new compact_result(); + receiveBase(result, "compact"); + return; + } + + public CompactionResponse compact2(CompactionRequest rqst) throws org.apache.thrift.TException + { + send_compact2(rqst); + return recv_compact2(); + } + + public void send_compact2(CompactionRequest rqst) throws org.apache.thrift.TException + { + compact2_args args = new compact2_args(); + args.setRqst(rqst); + sendBase("compact2", args); + } + + public CompactionResponse recv_compact2() throws org.apache.thrift.TException + { + compact2_result result = new compact2_result(); + receiveBase(result, "compact2"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "compact2 failed: unknown result"); + } + + public ShowCompactResponse show_compact(ShowCompactRequest rqst) throws org.apache.thrift.TException + { + send_show_compact(rqst); + return recv_show_compact(); + } + + public void send_show_compact(ShowCompactRequest rqst) throws org.apache.thrift.TException + { + show_compact_args args = new show_compact_args(); + args.setRqst(rqst); + sendBase("show_compact", args); + } + + public ShowCompactResponse recv_show_compact() throws org.apache.thrift.TException + { + show_compact_result result = new show_compact_result(); + receiveBase(result, "show_compact"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "show_compact failed: unknown result"); + } + + public void add_dynamic_partitions(AddDynamicPartitions rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException + { + send_add_dynamic_partitions(rqst); + recv_add_dynamic_partitions(); + } + + public void send_add_dynamic_partitions(AddDynamicPartitions rqst) throws org.apache.thrift.TException + { + add_dynamic_partitions_args args = new add_dynamic_partitions_args(); + args.setRqst(rqst); + sendBase("add_dynamic_partitions", args); + } + + public void recv_add_dynamic_partitions() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException + { + add_dynamic_partitions_result result = new add_dynamic_partitions_result(); + receiveBase(result, "add_dynamic_partitions"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + return; + } + + public NotificationEventResponse get_next_notification(NotificationEventRequest rqst) throws org.apache.thrift.TException + { + send_get_next_notification(rqst); + return recv_get_next_notification(); + } + + public void send_get_next_notification(NotificationEventRequest rqst) throws org.apache.thrift.TException + { + get_next_notification_args args = new get_next_notification_args(); + args.setRqst(rqst); + sendBase("get_next_notification", args); + } + + public NotificationEventResponse recv_get_next_notification() throws org.apache.thrift.TException + { + get_next_notification_result result = new get_next_notification_result(); + receiveBase(result, "get_next_notification"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_next_notification failed: unknown result"); + } + + public CurrentNotificationEventId get_current_notificationEventId() throws org.apache.thrift.TException + { + send_get_current_notificationEventId(); + return recv_get_current_notificationEventId(); + } + + public void send_get_current_notificationEventId() throws org.apache.thrift.TException + { + get_current_notificationEventId_args args = new get_current_notificationEventId_args(); + sendBase("get_current_notificationEventId", args); + } + + public CurrentNotificationEventId recv_get_current_notificationEventId() throws org.apache.thrift.TException + { + get_current_notificationEventId_result result = new get_current_notificationEventId_result(); + receiveBase(result, "get_current_notificationEventId"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_current_notificationEventId failed: unknown result"); + } + + public FireEventResponse fire_listener_event(FireEventRequest rqst) throws org.apache.thrift.TException + { + send_fire_listener_event(rqst); + return recv_fire_listener_event(); + } + + public void send_fire_listener_event(FireEventRequest rqst) throws org.apache.thrift.TException + { + fire_listener_event_args args = new fire_listener_event_args(); + args.setRqst(rqst); + sendBase("fire_listener_event", args); + } + + public FireEventResponse recv_fire_listener_event() throws org.apache.thrift.TException + { + fire_listener_event_result result = new fire_listener_event_result(); + receiveBase(result, "fire_listener_event"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fire_listener_event failed: unknown result"); + } + + public void flushCache() throws org.apache.thrift.TException + { + send_flushCache(); + recv_flushCache(); + } + + public void send_flushCache() throws org.apache.thrift.TException + { + flushCache_args args = new flushCache_args(); + sendBase("flushCache", args); + } + + public void recv_flushCache() throws org.apache.thrift.TException + { + flushCache_result result = new flushCache_result(); + receiveBase(result, "flushCache"); + return; + } + + public CmRecycleResponse cm_recycle(CmRecycleRequest request) throws MetaException, org.apache.thrift.TException + { + send_cm_recycle(request); + return recv_cm_recycle(); + } + + public void send_cm_recycle(CmRecycleRequest request) throws org.apache.thrift.TException + { + cm_recycle_args args = new cm_recycle_args(); + args.setRequest(request); + sendBase("cm_recycle", args); + } + + public CmRecycleResponse recv_cm_recycle() throws MetaException, org.apache.thrift.TException + { + cm_recycle_result result = new cm_recycle_result(); + receiveBase(result, "cm_recycle"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cm_recycle failed: unknown result"); + } + + public GetFileMetadataByExprResult get_file_metadata_by_expr(GetFileMetadataByExprRequest req) throws org.apache.thrift.TException + { + send_get_file_metadata_by_expr(req); + return recv_get_file_metadata_by_expr(); + } + + public void send_get_file_metadata_by_expr(GetFileMetadataByExprRequest req) throws org.apache.thrift.TException + { + get_file_metadata_by_expr_args args = new get_file_metadata_by_expr_args(); + args.setReq(req); + sendBase("get_file_metadata_by_expr", args); + } + + public GetFileMetadataByExprResult recv_get_file_metadata_by_expr() throws org.apache.thrift.TException + { + get_file_metadata_by_expr_result result = new get_file_metadata_by_expr_result(); + receiveBase(result, "get_file_metadata_by_expr"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_file_metadata_by_expr failed: unknown result"); + } + + public GetFileMetadataResult get_file_metadata(GetFileMetadataRequest req) throws org.apache.thrift.TException + { + send_get_file_metadata(req); + return recv_get_file_metadata(); + } + + public void send_get_file_metadata(GetFileMetadataRequest req) throws org.apache.thrift.TException + { + get_file_metadata_args args = new get_file_metadata_args(); + args.setReq(req); + sendBase("get_file_metadata", args); + } + + public GetFileMetadataResult recv_get_file_metadata() throws org.apache.thrift.TException + { + get_file_metadata_result result = new get_file_metadata_result(); + receiveBase(result, "get_file_metadata"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_file_metadata failed: unknown result"); + } + + public PutFileMetadataResult put_file_metadata(PutFileMetadataRequest req) throws org.apache.thrift.TException + { + send_put_file_metadata(req); + return recv_put_file_metadata(); + } + + public void send_put_file_metadata(PutFileMetadataRequest req) throws org.apache.thrift.TException + { + put_file_metadata_args args = new put_file_metadata_args(); + args.setReq(req); + sendBase("put_file_metadata", args); + } + + public PutFileMetadataResult recv_put_file_metadata() throws org.apache.thrift.TException + { + put_file_metadata_result result = new put_file_metadata_result(); + receiveBase(result, "put_file_metadata"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "put_file_metadata failed: unknown result"); + } + + public ClearFileMetadataResult clear_file_metadata(ClearFileMetadataRequest req) throws org.apache.thrift.TException + { + send_clear_file_metadata(req); + return recv_clear_file_metadata(); + } + + public void send_clear_file_metadata(ClearFileMetadataRequest req) throws org.apache.thrift.TException + { + clear_file_metadata_args args = new clear_file_metadata_args(); + args.setReq(req); + sendBase("clear_file_metadata", args); + } + + public ClearFileMetadataResult recv_clear_file_metadata() throws org.apache.thrift.TException + { + clear_file_metadata_result result = new clear_file_metadata_result(); + receiveBase(result, "clear_file_metadata"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "clear_file_metadata failed: unknown result"); + } + + public CacheFileMetadataResult cache_file_metadata(CacheFileMetadataRequest req) throws org.apache.thrift.TException + { + send_cache_file_metadata(req); + return recv_cache_file_metadata(); + } + + public void send_cache_file_metadata(CacheFileMetadataRequest req) throws org.apache.thrift.TException + { + cache_file_metadata_args args = new cache_file_metadata_args(); + args.setReq(req); + sendBase("cache_file_metadata", args); + } + + public CacheFileMetadataResult recv_cache_file_metadata() throws org.apache.thrift.TException + { + cache_file_metadata_result result = new cache_file_metadata_result(); + receiveBase(result, "cache_file_metadata"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cache_file_metadata failed: unknown result"); + } + + public String get_metastore_db_uuid() throws MetaException, org.apache.thrift.TException + { + send_get_metastore_db_uuid(); + return recv_get_metastore_db_uuid(); + } + + public void send_get_metastore_db_uuid() throws org.apache.thrift.TException + { + get_metastore_db_uuid_args args = new get_metastore_db_uuid_args(); + sendBase("get_metastore_db_uuid", args); + } + + public String recv_get_metastore_db_uuid() throws MetaException, org.apache.thrift.TException + { + get_metastore_db_uuid_result result = new get_metastore_db_uuid_result(); + receiveBase(result, "get_metastore_db_uuid"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_metastore_db_uuid failed: unknown result"); + } + + } + public static class AsyncClient extends com.facebook.fb303.FacebookService.AsyncClient implements AsyncIface { + public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { + private org.apache.thrift.async.TAsyncClientManager clientManager; + private org.apache.thrift.protocol.TProtocolFactory protocolFactory; + public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { + this.clientManager = clientManager; + this.protocolFactory = protocolFactory; + } + public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { + return new AsyncClient(protocolFactory, clientManager, transport); + } + } + + public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } + + public void getMetaConf(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getMetaConf_call method_call = new getMetaConf_call(key, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getMetaConf_call extends org.apache.thrift.async.TAsyncMethodCall { + private String key; + public getMetaConf_call(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.key = key; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMetaConf", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getMetaConf_args args = new getMetaConf_args(); + args.setKey(key); + args.write(prot); + prot.writeMessageEnd(); + } + + public String getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getMetaConf(); + } + } + + public void setMetaConf(String key, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + setMetaConf_call method_call = new setMetaConf_call(key, value, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class setMetaConf_call extends org.apache.thrift.async.TAsyncMethodCall { + private String key; + private String value; + public setMetaConf_call(String key, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.key = key; + this.value = value; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setMetaConf", org.apache.thrift.protocol.TMessageType.CALL, 0)); + setMetaConf_args args = new setMetaConf_args(); + args.setKey(key); + args.setValue(value); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_setMetaConf(); + } + } + + public void create_database(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + create_database_call method_call = new create_database_call(database, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class create_database_call extends org.apache.thrift.async.TAsyncMethodCall { + private Database database; + public create_database_call(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.database = database; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); + create_database_args args = new create_database_args(); + args.setDatabase(database); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_create_database(); + } + } + + public void get_database(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_database_call method_call = new get_database_call(name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_database_call extends org.apache.thrift.async.TAsyncMethodCall { + private String name; + public get_database_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_database_args args = new get_database_args(); + args.setName(name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Database getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_database(); + } + } + + public void drop_database(String name, boolean deleteData, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_database_call method_call = new drop_database_call(name, deleteData, cascade, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_database_call extends org.apache.thrift.async.TAsyncMethodCall { + private String name; + private boolean deleteData; + private boolean cascade; + public drop_database_call(String name, boolean deleteData, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + this.deleteData = deleteData; + this.cascade = cascade; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_database_args args = new drop_database_args(); + args.setName(name); + args.setDeleteData(deleteData); + args.setCascade(cascade); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_drop_database(); + } + } + + public void get_databases(String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_databases_call method_call = new get_databases_call(pattern, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_databases_call extends org.apache.thrift.async.TAsyncMethodCall { + private String pattern; + public get_databases_call(String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.pattern = pattern; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_databases", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_databases_args args = new get_databases_args(); + args.setPattern(pattern); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_databases(); + } + } + + public void get_all_databases(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_all_databases_call method_call = new get_all_databases_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_all_databases_call extends org.apache.thrift.async.TAsyncMethodCall { + public get_all_databases_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_databases", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_all_databases_args args = new get_all_databases_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_all_databases(); + } + } + + public void alter_database(String dbname, Database db, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + alter_database_call method_call = new alter_database_call(dbname, db, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class alter_database_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbname; + private Database db; + public alter_database_call(String dbname, Database db, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.db = db; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_database", org.apache.thrift.protocol.TMessageType.CALL, 0)); + alter_database_args args = new alter_database_args(); + args.setDbname(dbname); + args.setDb(db); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_database(); + } + } + + public void get_type(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_type_call method_call = new get_type_call(name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_type_call extends org.apache.thrift.async.TAsyncMethodCall { + private String name; + public get_type_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_type", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_type_args args = new get_type_args(); + args.setName(name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Type getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_type(); + } + } + + public void create_type(Type type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + create_type_call method_call = new create_type_call(type, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class create_type_call extends org.apache.thrift.async.TAsyncMethodCall { + private Type type; + public create_type_call(Type type, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.type = type; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_type", org.apache.thrift.protocol.TMessageType.CALL, 0)); + create_type_args args = new create_type_args(); + args.setType(type); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_create_type(); + } + } + + public void drop_type(String type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_type_call method_call = new drop_type_call(type, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_type_call extends org.apache.thrift.async.TAsyncMethodCall { + private String type; + public drop_type_call(String type, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.type = type; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_type", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_type_args args = new drop_type_args(); + args.setType(type); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_type(); + } + } + + public void get_type_all(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_type_all_call method_call = new get_type_all_call(name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_type_all_call extends org.apache.thrift.async.TAsyncMethodCall { + private String name; + public get_type_all_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_type_all", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_type_all_args args = new get_type_all_args(); + args.setName(name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Map getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_type_all(); + } + } + + public void get_fields(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_fields_call method_call = new get_fields_call(db_name, table_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_fields_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String table_name; + public get_fields_call(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.table_name = table_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_fields", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_fields_args args = new get_fields_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_fields(); + } + } + + public void get_fields_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_fields_with_environment_context_call method_call = new get_fields_with_environment_context_call(db_name, table_name, environment_context, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_fields_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String table_name; + private EnvironmentContext environment_context; + public get_fields_with_environment_context_call(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.table_name = table_name; + this.environment_context = environment_context; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_fields_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_fields_with_environment_context_args args = new get_fields_with_environment_context_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setEnvironment_context(environment_context); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_fields_with_environment_context(); + } + } + + public void get_schema(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_schema_call method_call = new get_schema_call(db_name, table_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_schema_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String table_name; + public get_schema_call(String db_name, String table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.table_name = table_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_schema", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_schema_args args = new get_schema_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_schema(); + } + } + + public void get_schema_with_environment_context(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_schema_with_environment_context_call method_call = new get_schema_with_environment_context_call(db_name, table_name, environment_context, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_schema_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String table_name; + private EnvironmentContext environment_context; + public get_schema_with_environment_context_call(String db_name, String table_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.table_name = table_name; + this.environment_context = environment_context; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_schema_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_schema_with_environment_context_args args = new get_schema_with_environment_context_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setEnvironment_context(environment_context); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, UnknownTableException, UnknownDBException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_schema_with_environment_context(); + } + } + + public void create_table(Table tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + create_table_call method_call = new create_table_call(tbl, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class create_table_call extends org.apache.thrift.async.TAsyncMethodCall { + private Table tbl; + public create_table_call(Table tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tbl = tbl; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); + create_table_args args = new create_table_args(); + args.setTbl(tbl); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_create_table(); + } + } + + public void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + create_table_with_environment_context_call method_call = new create_table_with_environment_context_call(tbl, environment_context, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class create_table_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { + private Table tbl; + private EnvironmentContext environment_context; + public create_table_with_environment_context_call(Table tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tbl = tbl; + this.environment_context = environment_context; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_table_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); + create_table_with_environment_context_args args = new create_table_with_environment_context_args(); + args.setTbl(tbl); + args.setEnvironment_context(environment_context); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_create_table_with_environment_context(); + } + } + + public void create_table_with_constraints(Table tbl, List primaryKeys, List foreignKeys, List uniqueConstraints, List notNullConstraints, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + create_table_with_constraints_call method_call = new create_table_with_constraints_call(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class create_table_with_constraints_call extends org.apache.thrift.async.TAsyncMethodCall { + private Table tbl; + private List primaryKeys; + private List foreignKeys; + private List uniqueConstraints; + private List notNullConstraints; + public create_table_with_constraints_call(Table tbl, List primaryKeys, List foreignKeys, List uniqueConstraints, List notNullConstraints, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tbl = tbl; + this.primaryKeys = primaryKeys; + this.foreignKeys = foreignKeys; + this.uniqueConstraints = uniqueConstraints; + this.notNullConstraints = notNullConstraints; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_table_with_constraints", org.apache.thrift.protocol.TMessageType.CALL, 0)); + create_table_with_constraints_args args = new create_table_with_constraints_args(); + args.setTbl(tbl); + args.setPrimaryKeys(primaryKeys); + args.setForeignKeys(foreignKeys); + args.setUniqueConstraints(uniqueConstraints); + args.setNotNullConstraints(notNullConstraints); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_create_table_with_constraints(); + } + } + + public void drop_constraint(DropConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_constraint_call method_call = new drop_constraint_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_constraint_call extends org.apache.thrift.async.TAsyncMethodCall { + private DropConstraintRequest req; + public drop_constraint_call(DropConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_constraint", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_constraint_args args = new drop_constraint_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_drop_constraint(); + } + } + + public void add_primary_key(AddPrimaryKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_primary_key_call method_call = new add_primary_key_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_primary_key_call extends org.apache.thrift.async.TAsyncMethodCall { + private AddPrimaryKeyRequest req; + public add_primary_key_call(AddPrimaryKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_primary_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_primary_key_args args = new add_primary_key_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_add_primary_key(); + } + } + + public void add_foreign_key(AddForeignKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_foreign_key_call method_call = new add_foreign_key_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_foreign_key_call extends org.apache.thrift.async.TAsyncMethodCall { + private AddForeignKeyRequest req; + public add_foreign_key_call(AddForeignKeyRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_foreign_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_foreign_key_args args = new add_foreign_key_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_add_foreign_key(); + } + } + + public void add_unique_constraint(AddUniqueConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_unique_constraint_call method_call = new add_unique_constraint_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_unique_constraint_call extends org.apache.thrift.async.TAsyncMethodCall { + private AddUniqueConstraintRequest req; + public add_unique_constraint_call(AddUniqueConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_unique_constraint", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_unique_constraint_args args = new add_unique_constraint_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_add_unique_constraint(); + } + } + + public void add_not_null_constraint(AddNotNullConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_not_null_constraint_call method_call = new add_not_null_constraint_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_not_null_constraint_call extends org.apache.thrift.async.TAsyncMethodCall { + private AddNotNullConstraintRequest req; + public add_not_null_constraint_call(AddNotNullConstraintRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_not_null_constraint", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_not_null_constraint_args args = new add_not_null_constraint_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_add_not_null_constraint(); + } + } + + public void drop_table(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_table_call method_call = new drop_table_call(dbname, name, deleteData, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_table_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbname; + private String name; + private boolean deleteData; + public drop_table_call(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.name = name; + this.deleteData = deleteData; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_table_args args = new drop_table_args(); + args.setDbname(dbname); + args.setName(name); + args.setDeleteData(deleteData); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_drop_table(); + } + } + + public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_table_with_environment_context_call method_call = new drop_table_with_environment_context_call(dbname, name, deleteData, environment_context, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_table_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbname; + private String name; + private boolean deleteData; + private EnvironmentContext environment_context; + public drop_table_with_environment_context_call(String dbname, String name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.name = name; + this.deleteData = deleteData; + this.environment_context = environment_context; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_table_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_table_with_environment_context_args args = new drop_table_with_environment_context_args(); + args.setDbname(dbname); + args.setName(name); + args.setDeleteData(deleteData); + args.setEnvironment_context(environment_context); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_drop_table_with_environment_context(); + } + } + + public void truncate_table(String dbName, String tableName, List partNames, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + truncate_table_call method_call = new truncate_table_call(dbName, tableName, partNames, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class truncate_table_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbName; + private String tableName; + private List partNames; + public truncate_table_call(String dbName, String tableName, List partNames, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbName = dbName; + this.tableName = tableName; + this.partNames = partNames; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("truncate_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); + truncate_table_args args = new truncate_table_args(); + args.setDbName(dbName); + args.setTableName(tableName); + args.setPartNames(partNames); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_truncate_table(); + } + } + + public void get_tables(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_tables_call method_call = new get_tables_call(db_name, pattern, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_tables_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String pattern; + public get_tables_call(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.pattern = pattern; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_tables", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_tables_args args = new get_tables_args(); + args.setDb_name(db_name); + args.setPattern(pattern); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_tables(); + } + } + + public void get_tables_by_type(String db_name, String pattern, String tableType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_tables_by_type_call method_call = new get_tables_by_type_call(db_name, pattern, tableType, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_tables_by_type_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String pattern; + private String tableType; + public get_tables_by_type_call(String db_name, String pattern, String tableType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.pattern = pattern; + this.tableType = tableType; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_tables_by_type", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_tables_by_type_args args = new get_tables_by_type_args(); + args.setDb_name(db_name); + args.setPattern(pattern); + args.setTableType(tableType); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_tables_by_type(); + } + } + + public void get_table_meta(String db_patterns, String tbl_patterns, List tbl_types, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_table_meta_call method_call = new get_table_meta_call(db_patterns, tbl_patterns, tbl_types, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_table_meta_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_patterns; + private String tbl_patterns; + private List tbl_types; + public get_table_meta_call(String db_patterns, String tbl_patterns, List tbl_types, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_patterns = db_patterns; + this.tbl_patterns = tbl_patterns; + this.tbl_types = tbl_types; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_meta", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_table_meta_args args = new get_table_meta_args(); + args.setDb_patterns(db_patterns); + args.setTbl_patterns(tbl_patterns); + args.setTbl_types(tbl_types); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table_meta(); + } + } + + public void get_all_tables(String db_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_all_tables_call method_call = new get_all_tables_call(db_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_all_tables_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + public get_all_tables_call(String db_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_tables", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_all_tables_args args = new get_all_tables_args(); + args.setDb_name(db_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_all_tables(); + } + } + + public void get_table(String dbname, String tbl_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_table_call method_call = new get_table_call(dbname, tbl_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_table_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbname; + private String tbl_name; + public get_table_call(String dbname, String tbl_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.tbl_name = tbl_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_table_args args = new get_table_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Table getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table(); + } + } + + public void get_table_objects_by_name(String dbname, List tbl_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_table_objects_by_name_call method_call = new get_table_objects_by_name_call(dbname, tbl_names, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_table_objects_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbname; + private List tbl_names; + public get_table_objects_by_name_call(String dbname, List tbl_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.tbl_names = tbl_names; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_objects_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_table_objects_by_name_args args = new get_table_objects_by_name_args(); + args.setDbname(dbname); + args.setTbl_names(tbl_names); + args.write(prot); + prot.writeMessageEnd(); + } + + public List
getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table_objects_by_name(); + } + } + + public void get_table_req(GetTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_table_req_call method_call = new get_table_req_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_table_req_call extends org.apache.thrift.async.TAsyncMethodCall { + private GetTableRequest req; + public get_table_req_call(GetTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_table_req_args args = new get_table_req_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public GetTableResult getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table_req(); + } + } + + public void get_table_objects_by_name_req(GetTablesRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_table_objects_by_name_req_call method_call = new get_table_objects_by_name_req_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_table_objects_by_name_req_call extends org.apache.thrift.async.TAsyncMethodCall { + private GetTablesRequest req; + public get_table_objects_by_name_req_call(GetTablesRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_objects_by_name_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_table_objects_by_name_req_args args = new get_table_objects_by_name_req_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public GetTablesResult getResult() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table_objects_by_name_req(); + } + } + + public void get_table_names_by_filter(String dbname, String filter, short max_tables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_table_names_by_filter_call method_call = new get_table_names_by_filter_call(dbname, filter, max_tables, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_table_names_by_filter_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbname; + private String filter; + private short max_tables; + public get_table_names_by_filter_call(String dbname, String filter, short max_tables, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.filter = filter; + this.max_tables = max_tables; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_names_by_filter", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_table_names_by_filter_args args = new get_table_names_by_filter_args(); + args.setDbname(dbname); + args.setFilter(filter); + args.setMax_tables(max_tables); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table_names_by_filter(); + } + } + + public void alter_table(String dbname, String tbl_name, Table new_tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + alter_table_call method_call = new alter_table_call(dbname, tbl_name, new_tbl, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class alter_table_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbname; + private String tbl_name; + private Table new_tbl; + public alter_table_call(String dbname, String tbl_name, Table new_tbl, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.tbl_name = tbl_name; + this.new_tbl = new_tbl; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); + alter_table_args args = new alter_table_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); + args.setNew_tbl(new_tbl); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_table(); + } + } + + public void alter_table_with_environment_context(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + alter_table_with_environment_context_call method_call = new alter_table_with_environment_context_call(dbname, tbl_name, new_tbl, environment_context, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class alter_table_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbname; + private String tbl_name; + private Table new_tbl; + private EnvironmentContext environment_context; + public alter_table_with_environment_context_call(String dbname, String tbl_name, Table new_tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.tbl_name = tbl_name; + this.new_tbl = new_tbl; + this.environment_context = environment_context; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_table_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); + alter_table_with_environment_context_args args = new alter_table_with_environment_context_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); + args.setNew_tbl(new_tbl); + args.setEnvironment_context(environment_context); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_table_with_environment_context(); + } + } + + public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + alter_table_with_cascade_call method_call = new alter_table_with_cascade_call(dbname, tbl_name, new_tbl, cascade, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class alter_table_with_cascade_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbname; + private String tbl_name; + private Table new_tbl; + private boolean cascade; + public alter_table_with_cascade_call(String dbname, String tbl_name, Table new_tbl, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.tbl_name = tbl_name; + this.new_tbl = new_tbl; + this.cascade = cascade; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_table_with_cascade", org.apache.thrift.protocol.TMessageType.CALL, 0)); + alter_table_with_cascade_args args = new alter_table_with_cascade_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); + args.setNew_tbl(new_tbl); + args.setCascade(cascade); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_table_with_cascade(); + } + } + + public void add_partition(Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_partition_call method_call = new add_partition_call(new_part, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_partition_call extends org.apache.thrift.async.TAsyncMethodCall { + private Partition new_part; + public add_partition_call(Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.new_part = new_part; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_partition_args args = new add_partition_args(); + args.setNew_part(new_part); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_add_partition(); + } + } + + public void add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_partition_with_environment_context_call method_call = new add_partition_with_environment_context_call(new_part, environment_context, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_partition_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { + private Partition new_part; + private EnvironmentContext environment_context; + public add_partition_with_environment_context_call(Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.new_part = new_part; + this.environment_context = environment_context; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partition_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_partition_with_environment_context_args args = new add_partition_with_environment_context_args(); + args.setNew_part(new_part); + args.setEnvironment_context(environment_context); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_add_partition_with_environment_context(); + } + } + + public void add_partitions(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_partitions_call method_call = new add_partitions_call(new_parts, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { + private List new_parts; + public add_partitions_call(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.new_parts = new_parts; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_partitions_args args = new add_partitions_args(); + args.setNew_parts(new_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_add_partitions(); + } + } + + public void add_partitions_pspec(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_partitions_pspec_call method_call = new add_partitions_pspec_call(new_parts, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_partitions_pspec_call extends org.apache.thrift.async.TAsyncMethodCall { + private List new_parts; + public add_partitions_pspec_call(List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.new_parts = new_parts; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partitions_pspec", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_partitions_pspec_args args = new add_partitions_pspec_args(); + args.setNew_parts(new_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_add_partitions_pspec(); + } + } + + public void append_partition(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + append_partition_call method_call = new append_partition_call(db_name, tbl_name, part_vals, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class append_partition_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + public append_partition_call(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); + append_partition_args args = new append_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_append_partition(); + } + } + + public void add_partitions_req(AddPartitionsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_partitions_req_call method_call = new add_partitions_req_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_partitions_req_call extends org.apache.thrift.async.TAsyncMethodCall { + private AddPartitionsRequest request; + public add_partitions_req_call(AddPartitionsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_partitions_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_partitions_req_args args = new add_partitions_req_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public AddPartitionsResult getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_add_partitions_req(); + } + } + + public void append_partition_with_environment_context(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + append_partition_with_environment_context_call method_call = new append_partition_with_environment_context_call(db_name, tbl_name, part_vals, environment_context, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class append_partition_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private EnvironmentContext environment_context; + public append_partition_with_environment_context_call(String db_name, String tbl_name, List part_vals, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.environment_context = environment_context; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_partition_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); + append_partition_with_environment_context_args args = new append_partition_with_environment_context_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setEnvironment_context(environment_context); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_append_partition_with_environment_context(); + } + } + + public void append_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + append_partition_by_name_call method_call = new append_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class append_partition_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + public append_partition_by_name_call(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_partition_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); + append_partition_by_name_args args = new append_partition_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_append_partition_by_name(); + } + } + + public void append_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + append_partition_by_name_with_environment_context_call method_call = new append_partition_by_name_with_environment_context_call(db_name, tbl_name, part_name, environment_context, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class append_partition_by_name_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + private EnvironmentContext environment_context; + public append_partition_by_name_with_environment_context_call(String db_name, String tbl_name, String part_name, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.environment_context = environment_context; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_partition_by_name_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); + append_partition_by_name_with_environment_context_args args = new append_partition_by_name_with_environment_context_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setEnvironment_context(environment_context); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_append_partition_by_name_with_environment_context(); + } + } + + public void drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_partition_call method_call = new drop_partition_call(db_name, tbl_name, part_vals, deleteData, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_partition_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private boolean deleteData; + public drop_partition_call(String db_name, String tbl_name, List part_vals, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.deleteData = deleteData; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_partition_args args = new drop_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setDeleteData(deleteData); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_partition(); + } + } + + public void drop_partition_with_environment_context(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_partition_with_environment_context_call method_call = new drop_partition_with_environment_context_call(db_name, tbl_name, part_vals, deleteData, environment_context, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_partition_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private boolean deleteData; + private EnvironmentContext environment_context; + public drop_partition_with_environment_context_call(String db_name, String tbl_name, List part_vals, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.deleteData = deleteData; + this.environment_context = environment_context; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partition_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_partition_with_environment_context_args args = new drop_partition_with_environment_context_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setDeleteData(deleteData); + args.setEnvironment_context(environment_context); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_partition_with_environment_context(); + } + } + + public void drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_partition_by_name_call method_call = new drop_partition_by_name_call(db_name, tbl_name, part_name, deleteData, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_partition_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + private boolean deleteData; + public drop_partition_by_name_call(String db_name, String tbl_name, String part_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.deleteData = deleteData; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partition_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_partition_by_name_args args = new drop_partition_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setDeleteData(deleteData); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_partition_by_name(); + } + } + + public void drop_partition_by_name_with_environment_context(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_partition_by_name_with_environment_context_call method_call = new drop_partition_by_name_with_environment_context_call(db_name, tbl_name, part_name, deleteData, environment_context, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_partition_by_name_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + private boolean deleteData; + private EnvironmentContext environment_context; + public drop_partition_by_name_with_environment_context_call(String db_name, String tbl_name, String part_name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.deleteData = deleteData; + this.environment_context = environment_context; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partition_by_name_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_partition_by_name_with_environment_context_args args = new drop_partition_by_name_with_environment_context_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setDeleteData(deleteData); + args.setEnvironment_context(environment_context); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_partition_by_name_with_environment_context(); + } + } + + public void drop_partitions_req(DropPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_partitions_req_call method_call = new drop_partitions_req_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_partitions_req_call extends org.apache.thrift.async.TAsyncMethodCall { + private DropPartitionsRequest req; + public drop_partitions_req_call(DropPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_partitions_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_partitions_req_args args = new drop_partitions_req_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public DropPartitionsResult getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_partitions_req(); + } + } + + public void get_partition(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partition_call method_call = new get_partition_call(db_name, tbl_name, part_vals, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partition_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + public get_partition_call(String db_name, String tbl_name, List part_vals, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partition_args args = new get_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition(); + } + } + + public void exchange_partition(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + exchange_partition_call method_call = new exchange_partition_call(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class exchange_partition_call extends org.apache.thrift.async.TAsyncMethodCall { + private Map partitionSpecs; + private String source_db; + private String source_table_name; + private String dest_db; + private String dest_table_name; + public exchange_partition_call(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.partitionSpecs = partitionSpecs; + this.source_db = source_db; + this.source_table_name = source_table_name; + this.dest_db = dest_db; + this.dest_table_name = dest_table_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("exchange_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); + exchange_partition_args args = new exchange_partition_args(); + args.setPartitionSpecs(partitionSpecs); + args.setSource_db(source_db); + args.setSource_table_name(source_table_name); + args.setDest_db(dest_db); + args.setDest_table_name(dest_table_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_exchange_partition(); + } + } + + public void exchange_partitions(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + exchange_partitions_call method_call = new exchange_partitions_call(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class exchange_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { + private Map partitionSpecs; + private String source_db; + private String source_table_name; + private String dest_db; + private String dest_table_name; + public exchange_partitions_call(Map partitionSpecs, String source_db, String source_table_name, String dest_db, String dest_table_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.partitionSpecs = partitionSpecs; + this.source_db = source_db; + this.source_table_name = source_table_name; + this.dest_db = dest_db; + this.dest_table_name = dest_table_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("exchange_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + exchange_partitions_args args = new exchange_partitions_args(); + args.setPartitionSpecs(partitionSpecs); + args.setSource_db(source_db); + args.setSource_table_name(source_table_name); + args.setDest_db(dest_db); + args.setDest_table_name(dest_table_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_exchange_partitions(); + } + } + + public void get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partition_with_auth_call method_call = new get_partition_with_auth_call(db_name, tbl_name, part_vals, user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partition_with_auth_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private String user_name; + private List group_names; + public get_partition_with_auth_call(String db_name, String tbl_name, List part_vals, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.user_name = user_name; + this.group_names = group_names; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_with_auth", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partition_with_auth_args args = new get_partition_with_auth_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_with_auth(); + } + } + + public void get_partition_by_name(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partition_by_name_call method_call = new get_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partition_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + public get_partition_by_name_call(String db_name, String tbl_name, String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partition_by_name_args args = new get_partition_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_by_name(); + } + } + + public void get_partitions(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partitions_call method_call = new get_partitions_call(db_name, tbl_name, max_parts, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_parts; + public get_partitions_call(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partitions_args args = new get_partitions_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions(); + } + } + + public void get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partitions_with_auth_call method_call = new get_partitions_with_auth_call(db_name, tbl_name, max_parts, user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partitions_with_auth_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_parts; + private String user_name; + private List group_names; + public get_partitions_with_auth_call(String db_name, String tbl_name, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + this.user_name = user_name; + this.group_names = group_names; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_with_auth", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partitions_with_auth_args args = new get_partitions_with_auth_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_with_auth(); + } + } + + public void get_partitions_pspec(String db_name, String tbl_name, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partitions_pspec_call method_call = new get_partitions_pspec_call(db_name, tbl_name, max_parts, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partitions_pspec_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private int max_parts; + public get_partitions_pspec_call(String db_name, String tbl_name, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_pspec", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partitions_pspec_args args = new get_partitions_pspec_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_pspec(); + } + } + + public void get_partition_names(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partition_names_call method_call = new get_partition_names_call(db_name, tbl_name, max_parts, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partition_names_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_parts; + public get_partition_names_call(String db_name, String tbl_name, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partition_names_args args = new get_partition_names_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_names(); + } + } + + public void get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partitions_ps_call method_call = new get_partitions_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partitions_ps_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private short max_parts; + public get_partitions_ps_call(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_ps", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partitions_ps_args args = new get_partitions_ps_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_ps(); + } + } + + public void get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partitions_ps_with_auth_call method_call = new get_partitions_ps_with_auth_call(db_name, tbl_name, part_vals, max_parts, user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partitions_ps_with_auth_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private short max_parts; + private String user_name; + private List group_names; + public get_partitions_ps_with_auth_call(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + this.user_name = user_name; + this.group_names = group_names; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_ps_with_auth", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_ps_with_auth(); + } + } + + public void get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partition_names_ps_call method_call = new get_partition_names_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partition_names_ps_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private short max_parts; + public get_partition_names_ps_call(String db_name, String tbl_name, List part_vals, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_names_ps", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partition_names_ps_args args = new get_partition_names_ps_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_names_ps(); + } + } + + public void get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partitions_by_filter_call method_call = new get_partitions_by_filter_call(db_name, tbl_name, filter, max_parts, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partitions_by_filter_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String filter; + private short max_parts; + public get_partitions_by_filter_call(String db_name, String tbl_name, String filter, short max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.filter = filter; + this.max_parts = max_parts; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_by_filter", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partitions_by_filter_args args = new get_partitions_by_filter_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setFilter(filter); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_by_filter(); + } + } + + public void get_part_specs_by_filter(String db_name, String tbl_name, String filter, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_part_specs_by_filter_call method_call = new get_part_specs_by_filter_call(db_name, tbl_name, filter, max_parts, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_part_specs_by_filter_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String filter; + private int max_parts; + public get_part_specs_by_filter_call(String db_name, String tbl_name, String filter, int max_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.filter = filter; + this.max_parts = max_parts; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_part_specs_by_filter", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_part_specs_by_filter_args args = new get_part_specs_by_filter_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setFilter(filter); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_part_specs_by_filter(); + } + } + + public void get_partitions_by_expr(PartitionsByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partitions_by_expr_call method_call = new get_partitions_by_expr_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partitions_by_expr_call extends org.apache.thrift.async.TAsyncMethodCall { + private PartitionsByExprRequest req; + public get_partitions_by_expr_call(PartitionsByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_by_expr", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partitions_by_expr_args args = new get_partitions_by_expr_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public PartitionsByExprResult getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_by_expr(); + } + } + + public void get_num_partitions_by_filter(String db_name, String tbl_name, String filter, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_num_partitions_by_filter_call method_call = new get_num_partitions_by_filter_call(db_name, tbl_name, filter, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_num_partitions_by_filter_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String filter; + public get_num_partitions_by_filter_call(String db_name, String tbl_name, String filter, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.filter = filter; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_num_partitions_by_filter", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_num_partitions_by_filter_args args = new get_num_partitions_by_filter_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setFilter(filter); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_num_partitions_by_filter(); + } + } + + public void get_partitions_by_names(String db_name, String tbl_name, List names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partitions_by_names_call method_call = new get_partitions_by_names_call(db_name, tbl_name, names, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partitions_by_names_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List names; + public get_partitions_by_names_call(String db_name, String tbl_name, List names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.names = names; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_by_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partitions_by_names_args args = new get_partitions_by_names_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNames(names); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_by_names(); + } + } + + public void alter_partition(String db_name, String tbl_name, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + alter_partition_call method_call = new alter_partition_call(db_name, tbl_name, new_part, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class alter_partition_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private Partition new_part; + public alter_partition_call(String db_name, String tbl_name, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_part = new_part; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); + alter_partition_args args = new alter_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNew_part(new_part); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_partition(); + } + } + + public void alter_partitions(String db_name, String tbl_name, List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + alter_partitions_call method_call = new alter_partitions_call(db_name, tbl_name, new_parts, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class alter_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List new_parts; + public alter_partitions_call(String db_name, String tbl_name, List new_parts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_parts = new_parts; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + alter_partitions_args args = new alter_partitions_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNew_parts(new_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_partitions(); + } + } + + public void alter_partitions_with_environment_context(String db_name, String tbl_name, List new_parts, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + alter_partitions_with_environment_context_call method_call = new alter_partitions_with_environment_context_call(db_name, tbl_name, new_parts, environment_context, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class alter_partitions_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List new_parts; + private EnvironmentContext environment_context; + public alter_partitions_with_environment_context_call(String db_name, String tbl_name, List new_parts, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_parts = new_parts; + this.environment_context = environment_context; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partitions_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); + alter_partitions_with_environment_context_args args = new alter_partitions_with_environment_context_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNew_parts(new_parts); + args.setEnvironment_context(environment_context); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_partitions_with_environment_context(); + } + } + + public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + alter_partition_with_environment_context_call method_call = new alter_partition_with_environment_context_call(db_name, tbl_name, new_part, environment_context, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class alter_partition_with_environment_context_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private Partition new_part; + private EnvironmentContext environment_context; + public alter_partition_with_environment_context_call(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_part = new_part; + this.environment_context = environment_context; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partition_with_environment_context", org.apache.thrift.protocol.TMessageType.CALL, 0)); + alter_partition_with_environment_context_args args = new alter_partition_with_environment_context_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNew_part(new_part); + args.setEnvironment_context(environment_context); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_partition_with_environment_context(); + } + } + + public void rename_partition(String db_name, String tbl_name, List part_vals, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + rename_partition_call method_call = new rename_partition_call(db_name, tbl_name, part_vals, new_part, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class rename_partition_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private Partition new_part; + public rename_partition_call(String db_name, String tbl_name, List part_vals, Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.new_part = new_part; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("rename_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); + rename_partition_args args = new rename_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setNew_part(new_part); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_rename_partition(); + } + } + + public void partition_name_has_valid_characters(List part_vals, boolean throw_exception, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + partition_name_has_valid_characters_call method_call = new partition_name_has_valid_characters_call(part_vals, throw_exception, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class partition_name_has_valid_characters_call extends org.apache.thrift.async.TAsyncMethodCall { + private List part_vals; + private boolean throw_exception; + public partition_name_has_valid_characters_call(List part_vals, boolean throw_exception, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.part_vals = part_vals; + this.throw_exception = throw_exception; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partition_name_has_valid_characters", org.apache.thrift.protocol.TMessageType.CALL, 0)); + partition_name_has_valid_characters_args args = new partition_name_has_valid_characters_args(); + args.setPart_vals(part_vals); + args.setThrow_exception(throw_exception); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_partition_name_has_valid_characters(); + } + } + + public void get_config_value(String name, String defaultValue, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_config_value_call method_call = new get_config_value_call(name, defaultValue, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_config_value_call extends org.apache.thrift.async.TAsyncMethodCall { + private String name; + private String defaultValue; + public get_config_value_call(String name, String defaultValue, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + this.defaultValue = defaultValue; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_config_value", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_config_value_args args = new get_config_value_args(); + args.setName(name); + args.setDefaultValue(defaultValue); + args.write(prot); + prot.writeMessageEnd(); + } + + public String getResult() throws ConfigValSecurityException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_config_value(); + } + } + + public void partition_name_to_vals(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + partition_name_to_vals_call method_call = new partition_name_to_vals_call(part_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class partition_name_to_vals_call extends org.apache.thrift.async.TAsyncMethodCall { + private String part_name; + public partition_name_to_vals_call(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.part_name = part_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partition_name_to_vals", org.apache.thrift.protocol.TMessageType.CALL, 0)); + partition_name_to_vals_args args = new partition_name_to_vals_args(); + args.setPart_name(part_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_partition_name_to_vals(); + } + } + + public void partition_name_to_spec(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + partition_name_to_spec_call method_call = new partition_name_to_spec_call(part_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class partition_name_to_spec_call extends org.apache.thrift.async.TAsyncMethodCall { + private String part_name; + public partition_name_to_spec_call(String part_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.part_name = part_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partition_name_to_spec", org.apache.thrift.protocol.TMessageType.CALL, 0)); + partition_name_to_spec_args args = new partition_name_to_spec_args(); + args.setPart_name(part_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Map getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_partition_name_to_spec(); + } + } + + public void markPartitionForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + markPartitionForEvent_call method_call = new markPartitionForEvent_call(db_name, tbl_name, part_vals, eventType, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class markPartitionForEvent_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private Map part_vals; + private PartitionEventType eventType; + public markPartitionForEvent_call(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.eventType = eventType; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markPartitionForEvent", org.apache.thrift.protocol.TMessageType.CALL, 0)); + markPartitionForEvent_args args = new markPartitionForEvent_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setEventType(eventType); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_markPartitionForEvent(); + } + } + + public void isPartitionMarkedForEvent(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + isPartitionMarkedForEvent_call method_call = new isPartitionMarkedForEvent_call(db_name, tbl_name, part_vals, eventType, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class isPartitionMarkedForEvent_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private Map part_vals; + private PartitionEventType eventType; + public isPartitionMarkedForEvent_call(String db_name, String tbl_name, Map part_vals, PartitionEventType eventType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.eventType = eventType; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isPartitionMarkedForEvent", org.apache.thrift.protocol.TMessageType.CALL, 0)); + isPartitionMarkedForEvent_args args = new isPartitionMarkedForEvent_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setEventType(eventType); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, NoSuchObjectException, UnknownDBException, UnknownTableException, UnknownPartitionException, InvalidPartitionException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_isPartitionMarkedForEvent(); + } + } + + public void add_index(Index new_index, Table index_table, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_index_call method_call = new add_index_call(new_index, index_table, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_index_call extends org.apache.thrift.async.TAsyncMethodCall { + private Index new_index; + private Table index_table; + public add_index_call(Index new_index, Table index_table, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.new_index = new_index; + this.index_table = index_table; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_index", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_index_args args = new add_index_args(); + args.setNew_index(new_index); + args.setIndex_table(index_table); + args.write(prot); + prot.writeMessageEnd(); + } + + public Index getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_add_index(); + } + } + + public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + alter_index_call method_call = new alter_index_call(dbname, base_tbl_name, idx_name, new_idx, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class alter_index_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbname; + private String base_tbl_name; + private String idx_name; + private Index new_idx; + public alter_index_call(String dbname, String base_tbl_name, String idx_name, Index new_idx, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.base_tbl_name = base_tbl_name; + this.idx_name = idx_name; + this.new_idx = new_idx; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_index", org.apache.thrift.protocol.TMessageType.CALL, 0)); + alter_index_args args = new alter_index_args(); + args.setDbname(dbname); + args.setBase_tbl_name(base_tbl_name); + args.setIdx_name(idx_name); + args.setNew_idx(new_idx); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_index(); + } + } + + public void drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_index_by_name_call method_call = new drop_index_by_name_call(db_name, tbl_name, index_name, deleteData, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_index_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String index_name; + private boolean deleteData; + public drop_index_by_name_call(String db_name, String tbl_name, String index_name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + this.deleteData = deleteData; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_index_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_index_by_name_args args = new drop_index_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setIndex_name(index_name); + args.setDeleteData(deleteData); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_index_by_name(); + } + } + + public void get_index_by_name(String db_name, String tbl_name, String index_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_index_by_name_call method_call = new get_index_by_name_call(db_name, tbl_name, index_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_index_by_name_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String index_name; + public get_index_by_name_call(String db_name, String tbl_name, String index_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_index_by_name", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_index_by_name_args args = new get_index_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setIndex_name(index_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Index getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_index_by_name(); + } + } + + public void get_indexes(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_indexes_call method_call = new get_indexes_call(db_name, tbl_name, max_indexes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_indexes_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_indexes; + public get_indexes_call(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_indexes", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_indexes_args args = new get_indexes_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_indexes(max_indexes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_indexes(); + } + } + + public void get_index_names(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_index_names_call method_call = new get_index_names_call(db_name, tbl_name, max_indexes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_index_names_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_indexes; + public get_index_names_call(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_index_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_index_names_args args = new get_index_names_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_indexes(max_indexes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_index_names(); + } + } + + public void get_primary_keys(PrimaryKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_primary_keys_call method_call = new get_primary_keys_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_primary_keys_call extends org.apache.thrift.async.TAsyncMethodCall { + private PrimaryKeysRequest request; + public get_primary_keys_call(PrimaryKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_primary_keys", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_primary_keys_args args = new get_primary_keys_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public PrimaryKeysResponse getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_primary_keys(); + } + } + + public void get_foreign_keys(ForeignKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_foreign_keys_call method_call = new get_foreign_keys_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_foreign_keys_call extends org.apache.thrift.async.TAsyncMethodCall { + private ForeignKeysRequest request; + public get_foreign_keys_call(ForeignKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_foreign_keys", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_foreign_keys_args args = new get_foreign_keys_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public ForeignKeysResponse getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_foreign_keys(); + } + } + + public void get_unique_constraints(UniqueConstraintsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_unique_constraints_call method_call = new get_unique_constraints_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_unique_constraints_call extends org.apache.thrift.async.TAsyncMethodCall { + private UniqueConstraintsRequest request; + public get_unique_constraints_call(UniqueConstraintsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_unique_constraints", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_unique_constraints_args args = new get_unique_constraints_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public UniqueConstraintsResponse getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_unique_constraints(); + } + } + + public void get_not_null_constraints(NotNullConstraintsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_not_null_constraints_call method_call = new get_not_null_constraints_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_not_null_constraints_call extends org.apache.thrift.async.TAsyncMethodCall { + private NotNullConstraintsRequest request; + public get_not_null_constraints_call(NotNullConstraintsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_not_null_constraints", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_not_null_constraints_args args = new get_not_null_constraints_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public NotNullConstraintsResponse getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_not_null_constraints(); + } + } + + public void update_table_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + update_table_column_statistics_call method_call = new update_table_column_statistics_call(stats_obj, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class update_table_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private ColumnStatistics stats_obj; + public update_table_column_statistics_call(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.stats_obj = stats_obj; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_table_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + update_table_column_statistics_args args = new update_table_column_statistics_args(); + args.setStats_obj(stats_obj); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_update_table_column_statistics(); + } + } + + public void update_partition_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + update_partition_column_statistics_call method_call = new update_partition_column_statistics_call(stats_obj, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class update_partition_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private ColumnStatistics stats_obj; + public update_partition_column_statistics_call(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.stats_obj = stats_obj; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_partition_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + update_partition_column_statistics_args args = new update_partition_column_statistics_args(); + args.setStats_obj(stats_obj); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_update_partition_column_statistics(); + } + } + + public void get_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_table_column_statistics_call method_call = new get_table_column_statistics_call(db_name, tbl_name, col_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_table_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String col_name; + public get_table_column_statistics_call(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.col_name = col_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_table_column_statistics_args args = new get_table_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setCol_name(col_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public ColumnStatistics getResult() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table_column_statistics(); + } + } + + public void get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partition_column_statistics_call method_call = new get_partition_column_statistics_call(db_name, tbl_name, part_name, col_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partition_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + private String col_name; + public get_partition_column_statistics_call(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.col_name = col_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partition_column_statistics_args args = new get_partition_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setCol_name(col_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public ColumnStatistics getResult() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_column_statistics(); + } + } + + public void get_table_statistics_req(TableStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_table_statistics_req_call method_call = new get_table_statistics_req_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_table_statistics_req_call extends org.apache.thrift.async.TAsyncMethodCall { + private TableStatsRequest request; + public get_table_statistics_req_call(TableStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_statistics_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_table_statistics_req_args args = new get_table_statistics_req_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public TableStatsResult getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table_statistics_req(); + } + } + + public void get_partitions_statistics_req(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partitions_statistics_req_call method_call = new get_partitions_statistics_req_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partitions_statistics_req_call extends org.apache.thrift.async.TAsyncMethodCall { + private PartitionsStatsRequest request; + public get_partitions_statistics_req_call(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partitions_statistics_req", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partitions_statistics_req_args args = new get_partitions_statistics_req_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public PartitionsStatsResult getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_statistics_req(); + } + } + + public void get_aggr_stats_for(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_aggr_stats_for_call method_call = new get_aggr_stats_for_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_aggr_stats_for_call extends org.apache.thrift.async.TAsyncMethodCall { + private PartitionsStatsRequest request; + public get_aggr_stats_for_call(PartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_aggr_stats_for", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_aggr_stats_for_args args = new get_aggr_stats_for_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public AggrStats getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_aggr_stats_for(); + } + } + + public void set_aggr_stats_for(SetPartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + set_aggr_stats_for_call method_call = new set_aggr_stats_for_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class set_aggr_stats_for_call extends org.apache.thrift.async.TAsyncMethodCall { + private SetPartitionsStatsRequest request; + public set_aggr_stats_for_call(SetPartitionsStatsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_aggr_stats_for", org.apache.thrift.protocol.TMessageType.CALL, 0)); + set_aggr_stats_for_args args = new set_aggr_stats_for_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_set_aggr_stats_for(); + } + } + + public void delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + delete_partition_column_statistics_call method_call = new delete_partition_column_statistics_call(db_name, tbl_name, part_name, col_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class delete_partition_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + private String col_name; + public delete_partition_column_statistics_call(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.col_name = col_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delete_partition_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + delete_partition_column_statistics_args args = new delete_partition_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setCol_name(col_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_delete_partition_column_statistics(); + } + } + + public void delete_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + delete_table_column_statistics_call method_call = new delete_table_column_statistics_call(db_name, tbl_name, col_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class delete_table_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String col_name; + public delete_table_column_statistics_call(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.col_name = col_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delete_table_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + delete_table_column_statistics_args args = new delete_table_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setCol_name(col_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_delete_table_column_statistics(); + } + } + + public void create_function(Function func, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + create_function_call method_call = new create_function_call(func, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class create_function_call extends org.apache.thrift.async.TAsyncMethodCall { + private Function func; + public create_function_call(Function func, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.func = func; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); + create_function_args args = new create_function_args(); + args.setFunc(func); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_create_function(); + } + } + + public void drop_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_function_call method_call = new drop_function_call(dbName, funcName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_function_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbName; + private String funcName; + public drop_function_call(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbName = dbName; + this.funcName = funcName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_function_args args = new drop_function_args(); + args.setDbName(dbName); + args.setFuncName(funcName); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_drop_function(); + } + } + + public void alter_function(String dbName, String funcName, Function newFunc, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + alter_function_call method_call = new alter_function_call(dbName, funcName, newFunc, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class alter_function_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbName; + private String funcName; + private Function newFunc; + public alter_function_call(String dbName, String funcName, Function newFunc, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbName = dbName; + this.funcName = funcName; + this.newFunc = newFunc; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); + alter_function_args args = new alter_function_args(); + args.setDbName(dbName); + args.setFuncName(funcName); + args.setNewFunc(newFunc); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_function(); + } + } + + public void get_functions(String dbName, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_functions_call method_call = new get_functions_call(dbName, pattern, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_functions_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbName; + private String pattern; + public get_functions_call(String dbName, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbName = dbName; + this.pattern = pattern; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_functions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_functions_args args = new get_functions_args(); + args.setDbName(dbName); + args.setPattern(pattern); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_functions(); + } + } + + public void get_function(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_function_call method_call = new get_function_call(dbName, funcName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_function_call extends org.apache.thrift.async.TAsyncMethodCall { + private String dbName; + private String funcName; + public get_function_call(String dbName, String funcName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbName = dbName; + this.funcName = funcName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_function", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_function_args args = new get_function_args(); + args.setDbName(dbName); + args.setFuncName(funcName); + args.write(prot); + prot.writeMessageEnd(); + } + + public Function getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_function(); + } + } + + public void get_all_functions(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_all_functions_call method_call = new get_all_functions_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_all_functions_call extends org.apache.thrift.async.TAsyncMethodCall { + public get_all_functions_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_functions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_all_functions_args args = new get_all_functions_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public GetAllFunctionsResponse getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_all_functions(); + } + } + + public void create_role(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + create_role_call method_call = new create_role_call(role, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class create_role_call extends org.apache.thrift.async.TAsyncMethodCall { + private Role role; + public create_role_call(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.role = role; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); + create_role_args args = new create_role_args(); + args.setRole(role); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_create_role(); + } + } + + public void drop_role(String role_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + drop_role_call method_call = new drop_role_call(role_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class drop_role_call extends org.apache.thrift.async.TAsyncMethodCall { + private String role_name; + public drop_role_call(String role_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.role_name = role_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); + drop_role_args args = new drop_role_args(); + args.setRole_name(role_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_role(); + } + } + + public void get_role_names(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_role_names_call method_call = new get_role_names_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_role_names_call extends org.apache.thrift.async.TAsyncMethodCall { + public get_role_names_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_role_names", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_role_names_args args = new get_role_names_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_role_names(); + } + } + + public void grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + grant_role_call method_call = new grant_role_call(role_name, principal_name, principal_type, grantor, grantorType, grant_option, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class grant_role_call extends org.apache.thrift.async.TAsyncMethodCall { + private String role_name; + private String principal_name; + private PrincipalType principal_type; + private String grantor; + private PrincipalType grantorType; + private boolean grant_option; + public grant_role_call(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.role_name = role_name; + this.principal_name = principal_name; + this.principal_type = principal_type; + this.grantor = grantor; + this.grantorType = grantorType; + this.grant_option = grant_option; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); + grant_role_args args = new grant_role_args(); + args.setRole_name(role_name); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + args.setGrantor(grantor); + args.setGrantorType(grantorType); + args.setGrant_option(grant_option); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_grant_role(); + } + } + + public void revoke_role(String role_name, String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + revoke_role_call method_call = new revoke_role_call(role_name, principal_name, principal_type, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class revoke_role_call extends org.apache.thrift.async.TAsyncMethodCall { + private String role_name; + private String principal_name; + private PrincipalType principal_type; + public revoke_role_call(String role_name, String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.role_name = role_name; + this.principal_name = principal_name; + this.principal_type = principal_type; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revoke_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); + revoke_role_args args = new revoke_role_args(); + args.setRole_name(role_name); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_revoke_role(); + } + } + + public void list_roles(String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + list_roles_call method_call = new list_roles_call(principal_name, principal_type, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class list_roles_call extends org.apache.thrift.async.TAsyncMethodCall { + private String principal_name; + private PrincipalType principal_type; + public list_roles_call(String principal_name, PrincipalType principal_type, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.principal_name = principal_name; + this.principal_type = principal_type; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_roles", org.apache.thrift.protocol.TMessageType.CALL, 0)); + list_roles_args args = new list_roles_args(); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_list_roles(); + } + } + + public void grant_revoke_role(GrantRevokeRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + grant_revoke_role_call method_call = new grant_revoke_role_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class grant_revoke_role_call extends org.apache.thrift.async.TAsyncMethodCall { + private GrantRevokeRoleRequest request; + public grant_revoke_role_call(GrantRevokeRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_revoke_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); + grant_revoke_role_args args = new grant_revoke_role_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public GrantRevokeRoleResponse getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_grant_revoke_role(); + } + } + + public void get_principals_in_role(GetPrincipalsInRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_principals_in_role_call method_call = new get_principals_in_role_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_principals_in_role_call extends org.apache.thrift.async.TAsyncMethodCall { + private GetPrincipalsInRoleRequest request; + public get_principals_in_role_call(GetPrincipalsInRoleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_principals_in_role", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_principals_in_role_args args = new get_principals_in_role_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public GetPrincipalsInRoleResponse getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_principals_in_role(); + } + } + + public void get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_role_grants_for_principal_call method_call = new get_role_grants_for_principal_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_role_grants_for_principal_call extends org.apache.thrift.async.TAsyncMethodCall { + private GetRoleGrantsForPrincipalRequest request; + public get_role_grants_for_principal_call(GetRoleGrantsForPrincipalRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_role_grants_for_principal", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_role_grants_for_principal_args args = new get_role_grants_for_principal_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public GetRoleGrantsForPrincipalResponse getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_role_grants_for_principal(); + } + } + + public void get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_privilege_set_call method_call = new get_privilege_set_call(hiveObject, user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_privilege_set_call extends org.apache.thrift.async.TAsyncMethodCall { + private HiveObjectRef hiveObject; + private String user_name; + private List group_names; + public get_privilege_set_call(HiveObjectRef hiveObject, String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.hiveObject = hiveObject; + this.user_name = user_name; + this.group_names = group_names; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_privilege_set", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_privilege_set_args args = new get_privilege_set_args(); + args.setHiveObject(hiveObject); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } + + public PrincipalPrivilegeSet getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_privilege_set(); + } + } + + public void list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + list_privileges_call method_call = new list_privileges_call(principal_name, principal_type, hiveObject, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class list_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { + private String principal_name; + private PrincipalType principal_type; + private HiveObjectRef hiveObject; + public list_privileges_call(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.principal_name = principal_name; + this.principal_type = principal_type; + this.hiveObject = hiveObject; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("list_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); + list_privileges_args args = new list_privileges_args(); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + args.setHiveObject(hiveObject); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_list_privileges(); + } + } + + public void grant_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + grant_privileges_call method_call = new grant_privileges_call(privileges, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class grant_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { + private PrivilegeBag privileges; + public grant_privileges_call(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.privileges = privileges; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); + grant_privileges_args args = new grant_privileges_args(); + args.setPrivileges(privileges); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_grant_privileges(); + } + } + + public void revoke_privileges(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + revoke_privileges_call method_call = new revoke_privileges_call(privileges, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class revoke_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { + private PrivilegeBag privileges; + public revoke_privileges_call(PrivilegeBag privileges, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.privileges = privileges; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("revoke_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); + revoke_privileges_args args = new revoke_privileges_args(); + args.setPrivileges(privileges); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_revoke_privileges(); + } + } + + public void grant_revoke_privileges(GrantRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + grant_revoke_privileges_call method_call = new grant_revoke_privileges_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class grant_revoke_privileges_call extends org.apache.thrift.async.TAsyncMethodCall { + private GrantRevokePrivilegeRequest request; + public grant_revoke_privileges_call(GrantRevokePrivilegeRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grant_revoke_privileges", org.apache.thrift.protocol.TMessageType.CALL, 0)); + grant_revoke_privileges_args args = new grant_revoke_privileges_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public GrantRevokePrivilegeResponse getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_grant_revoke_privileges(); + } + } + + public void set_ugi(String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + set_ugi_call method_call = new set_ugi_call(user_name, group_names, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class set_ugi_call extends org.apache.thrift.async.TAsyncMethodCall { + private String user_name; + private List group_names; + public set_ugi_call(String user_name, List group_names, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.user_name = user_name; + this.group_names = group_names; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("set_ugi", org.apache.thrift.protocol.TMessageType.CALL, 0)); + set_ugi_args args = new set_ugi_args(); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_set_ugi(); + } + } + + public void get_delegation_token(String token_owner, String renewer_kerberos_principal_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_delegation_token_call method_call = new get_delegation_token_call(token_owner, renewer_kerberos_principal_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_delegation_token_call extends org.apache.thrift.async.TAsyncMethodCall { + private String token_owner; + private String renewer_kerberos_principal_name; + public get_delegation_token_call(String token_owner, String renewer_kerberos_principal_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.token_owner = token_owner; + this.renewer_kerberos_principal_name = renewer_kerberos_principal_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_delegation_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_delegation_token_args args = new get_delegation_token_args(); + args.setToken_owner(token_owner); + args.setRenewer_kerberos_principal_name(renewer_kerberos_principal_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public String getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_delegation_token(); + } + } + + public void renew_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + renew_delegation_token_call method_call = new renew_delegation_token_call(token_str_form, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class renew_delegation_token_call extends org.apache.thrift.async.TAsyncMethodCall { + private String token_str_form; + public renew_delegation_token_call(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.token_str_form = token_str_form; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("renew_delegation_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); + renew_delegation_token_args args = new renew_delegation_token_args(); + args.setToken_str_form(token_str_form); + args.write(prot); + prot.writeMessageEnd(); + } + + public long getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_renew_delegation_token(); + } + } + + public void cancel_delegation_token(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + cancel_delegation_token_call method_call = new cancel_delegation_token_call(token_str_form, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class cancel_delegation_token_call extends org.apache.thrift.async.TAsyncMethodCall { + private String token_str_form; + public cancel_delegation_token_call(String token_str_form, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.token_str_form = token_str_form; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancel_delegation_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); + cancel_delegation_token_args args = new cancel_delegation_token_args(); + args.setToken_str_form(token_str_form); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_cancel_delegation_token(); + } + } + + public void add_token(String token_identifier, String delegation_token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_token_call method_call = new add_token_call(token_identifier, delegation_token, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_token_call extends org.apache.thrift.async.TAsyncMethodCall { + private String token_identifier; + private String delegation_token; + public add_token_call(String token_identifier, String delegation_token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.token_identifier = token_identifier; + this.delegation_token = delegation_token; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_token_args args = new add_token_args(); + args.setToken_identifier(token_identifier); + args.setDelegation_token(delegation_token); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_add_token(); + } + } + + public void remove_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + remove_token_call method_call = new remove_token_call(token_identifier, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class remove_token_call extends org.apache.thrift.async.TAsyncMethodCall { + private String token_identifier; + public remove_token_call(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.token_identifier = token_identifier; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); + remove_token_args args = new remove_token_args(); + args.setToken_identifier(token_identifier); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_remove_token(); + } + } + + public void get_token(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_token_call method_call = new get_token_call(token_identifier, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_token_call extends org.apache.thrift.async.TAsyncMethodCall { + private String token_identifier; + public get_token_call(String token_identifier, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.token_identifier = token_identifier; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_token", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_token_args args = new get_token_args(); + args.setToken_identifier(token_identifier); + args.write(prot); + prot.writeMessageEnd(); + } + + public String getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_token(); + } + } + + public void get_all_token_identifiers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_all_token_identifiers_call method_call = new get_all_token_identifiers_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_all_token_identifiers_call extends org.apache.thrift.async.TAsyncMethodCall { + public get_all_token_identifiers_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_all_token_identifiers", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_all_token_identifiers_args args = new get_all_token_identifiers_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_all_token_identifiers(); + } + } + + public void add_master_key(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_master_key_call method_call = new add_master_key_call(key, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_master_key_call extends org.apache.thrift.async.TAsyncMethodCall { + private String key; + public add_master_key_call(String key, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.key = key; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_master_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_master_key_args args = new add_master_key_args(); + args.setKey(key); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_add_master_key(); + } + } + + public void update_master_key(int seq_number, String key, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + update_master_key_call method_call = new update_master_key_call(seq_number, key, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class update_master_key_call extends org.apache.thrift.async.TAsyncMethodCall { + private int seq_number; + private String key; + public update_master_key_call(int seq_number, String key, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.seq_number = seq_number; + this.key = key; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_master_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); + update_master_key_args args = new update_master_key_args(); + args.setSeq_number(seq_number); + args.setKey(key); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_update_master_key(); + } + } + + public void remove_master_key(int key_seq, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + remove_master_key_call method_call = new remove_master_key_call(key_seq, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class remove_master_key_call extends org.apache.thrift.async.TAsyncMethodCall { + private int key_seq; + public remove_master_key_call(int key_seq, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.key_seq = key_seq; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_master_key", org.apache.thrift.protocol.TMessageType.CALL, 0)); + remove_master_key_args args = new remove_master_key_args(); + args.setKey_seq(key_seq); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_remove_master_key(); + } + } + + public void get_master_keys(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_master_keys_call method_call = new get_master_keys_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_master_keys_call extends org.apache.thrift.async.TAsyncMethodCall { + public get_master_keys_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_master_keys", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_master_keys_args args = new get_master_keys_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_master_keys(); + } + } + + public void get_open_txns(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_open_txns_call method_call = new get_open_txns_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_open_txns_call extends org.apache.thrift.async.TAsyncMethodCall { + public get_open_txns_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_open_txns", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_open_txns_args args = new get_open_txns_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public GetOpenTxnsResponse getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_open_txns(); + } + } + + public void get_open_txns_info(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_open_txns_info_call method_call = new get_open_txns_info_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_open_txns_info_call extends org.apache.thrift.async.TAsyncMethodCall { + public get_open_txns_info_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_open_txns_info", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_open_txns_info_args args = new get_open_txns_info_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public GetOpenTxnsInfoResponse getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_open_txns_info(); + } + } + + public void open_txns(OpenTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + open_txns_call method_call = new open_txns_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class open_txns_call extends org.apache.thrift.async.TAsyncMethodCall { + private OpenTxnRequest rqst; + public open_txns_call(OpenTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("open_txns", org.apache.thrift.protocol.TMessageType.CALL, 0)); + open_txns_args args = new open_txns_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public OpenTxnsResponse getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_open_txns(); + } + } + + public void abort_txn(AbortTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + abort_txn_call method_call = new abort_txn_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class abort_txn_call extends org.apache.thrift.async.TAsyncMethodCall { + private AbortTxnRequest rqst; + public abort_txn_call(AbortTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("abort_txn", org.apache.thrift.protocol.TMessageType.CALL, 0)); + abort_txn_args args = new abort_txn_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchTxnException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_abort_txn(); + } + } + + public void abort_txns(AbortTxnsRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + abort_txns_call method_call = new abort_txns_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class abort_txns_call extends org.apache.thrift.async.TAsyncMethodCall { + private AbortTxnsRequest rqst; + public abort_txns_call(AbortTxnsRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("abort_txns", org.apache.thrift.protocol.TMessageType.CALL, 0)); + abort_txns_args args = new abort_txns_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchTxnException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_abort_txns(); + } + } + + public void commit_txn(CommitTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + commit_txn_call method_call = new commit_txn_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class commit_txn_call extends org.apache.thrift.async.TAsyncMethodCall { + private CommitTxnRequest rqst; + public commit_txn_call(CommitTxnRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("commit_txn", org.apache.thrift.protocol.TMessageType.CALL, 0)); + commit_txn_args args = new commit_txn_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_commit_txn(); + } + } + + public void lock(LockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + lock_call method_call = new lock_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class lock_call extends org.apache.thrift.async.TAsyncMethodCall { + private LockRequest rqst; + public lock_call(LockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("lock", org.apache.thrift.protocol.TMessageType.CALL, 0)); + lock_args args = new lock_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public LockResponse getResult() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_lock(); + } + } + + public void check_lock(CheckLockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + check_lock_call method_call = new check_lock_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class check_lock_call extends org.apache.thrift.async.TAsyncMethodCall { + private CheckLockRequest rqst; + public check_lock_call(CheckLockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("check_lock", org.apache.thrift.protocol.TMessageType.CALL, 0)); + check_lock_args args = new check_lock_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public LockResponse getResult() throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_check_lock(); + } + } + + public void unlock(UnlockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + unlock_call method_call = new unlock_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class unlock_call extends org.apache.thrift.async.TAsyncMethodCall { + private UnlockRequest rqst; + public unlock_call(UnlockRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unlock", org.apache.thrift.protocol.TMessageType.CALL, 0)); + unlock_args args = new unlock_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchLockException, TxnOpenException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_unlock(); + } + } + + public void show_locks(ShowLocksRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + show_locks_call method_call = new show_locks_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class show_locks_call extends org.apache.thrift.async.TAsyncMethodCall { + private ShowLocksRequest rqst; + public show_locks_call(ShowLocksRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("show_locks", org.apache.thrift.protocol.TMessageType.CALL, 0)); + show_locks_args args = new show_locks_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public ShowLocksResponse getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_show_locks(); + } + } + + public void heartbeat(HeartbeatRequest ids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + heartbeat_call method_call = new heartbeat_call(ids, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class heartbeat_call extends org.apache.thrift.async.TAsyncMethodCall { + private HeartbeatRequest ids; + public heartbeat_call(HeartbeatRequest ids, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.ids = ids; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("heartbeat", org.apache.thrift.protocol.TMessageType.CALL, 0)); + heartbeat_args args = new heartbeat_args(); + args.setIds(ids); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_heartbeat(); + } + } + + public void heartbeat_txn_range(HeartbeatTxnRangeRequest txns, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + heartbeat_txn_range_call method_call = new heartbeat_txn_range_call(txns, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class heartbeat_txn_range_call extends org.apache.thrift.async.TAsyncMethodCall { + private HeartbeatTxnRangeRequest txns; + public heartbeat_txn_range_call(HeartbeatTxnRangeRequest txns, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.txns = txns; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("heartbeat_txn_range", org.apache.thrift.protocol.TMessageType.CALL, 0)); + heartbeat_txn_range_args args = new heartbeat_txn_range_args(); + args.setTxns(txns); + args.write(prot); + prot.writeMessageEnd(); + } + + public HeartbeatTxnRangeResponse getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_heartbeat_txn_range(); + } + } + + public void compact(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + compact_call method_call = new compact_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class compact_call extends org.apache.thrift.async.TAsyncMethodCall { + private CompactionRequest rqst; + public compact_call(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("compact", org.apache.thrift.protocol.TMessageType.CALL, 0)); + compact_args args = new compact_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_compact(); + } + } + + public void compact2(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + compact2_call method_call = new compact2_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class compact2_call extends org.apache.thrift.async.TAsyncMethodCall { + private CompactionRequest rqst; + public compact2_call(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("compact2", org.apache.thrift.protocol.TMessageType.CALL, 0)); + compact2_args args = new compact2_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public CompactionResponse getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_compact2(); + } + } + + public void show_compact(ShowCompactRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + show_compact_call method_call = new show_compact_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class show_compact_call extends org.apache.thrift.async.TAsyncMethodCall { + private ShowCompactRequest rqst; + public show_compact_call(ShowCompactRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("show_compact", org.apache.thrift.protocol.TMessageType.CALL, 0)); + show_compact_args args = new show_compact_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public ShowCompactResponse getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_show_compact(); + } + } + + public void add_dynamic_partitions(AddDynamicPartitions rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + add_dynamic_partitions_call method_call = new add_dynamic_partitions_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class add_dynamic_partitions_call extends org.apache.thrift.async.TAsyncMethodCall { + private AddDynamicPartitions rqst; + public add_dynamic_partitions_call(AddDynamicPartitions rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_dynamic_partitions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + add_dynamic_partitions_args args = new add_dynamic_partitions_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_add_dynamic_partitions(); + } + } + + public void get_next_notification(NotificationEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_next_notification_call method_call = new get_next_notification_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_next_notification_call extends org.apache.thrift.async.TAsyncMethodCall { + private NotificationEventRequest rqst; + public get_next_notification_call(NotificationEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_next_notification", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_next_notification_args args = new get_next_notification_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public NotificationEventResponse getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_next_notification(); + } + } + + public void get_current_notificationEventId(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_current_notificationEventId_call method_call = new get_current_notificationEventId_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_current_notificationEventId_call extends org.apache.thrift.async.TAsyncMethodCall { + public get_current_notificationEventId_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_current_notificationEventId", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_current_notificationEventId_args args = new get_current_notificationEventId_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public CurrentNotificationEventId getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_current_notificationEventId(); + } + } + + public void fire_listener_event(FireEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + fire_listener_event_call method_call = new fire_listener_event_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class fire_listener_event_call extends org.apache.thrift.async.TAsyncMethodCall { + private FireEventRequest rqst; + public fire_listener_event_call(FireEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fire_listener_event", org.apache.thrift.protocol.TMessageType.CALL, 0)); + fire_listener_event_args args = new fire_listener_event_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public FireEventResponse getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_fire_listener_event(); + } + } + + public void flushCache(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + flushCache_call method_call = new flushCache_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class flushCache_call extends org.apache.thrift.async.TAsyncMethodCall { + public flushCache_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("flushCache", org.apache.thrift.protocol.TMessageType.CALL, 0)); + flushCache_args args = new flushCache_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_flushCache(); + } + } + + public void cm_recycle(CmRecycleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + cm_recycle_call method_call = new cm_recycle_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class cm_recycle_call extends org.apache.thrift.async.TAsyncMethodCall { + private CmRecycleRequest request; + public cm_recycle_call(CmRecycleRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cm_recycle", org.apache.thrift.protocol.TMessageType.CALL, 0)); + cm_recycle_args args = new cm_recycle_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public CmRecycleResponse getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_cm_recycle(); + } + } + + public void get_file_metadata_by_expr(GetFileMetadataByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_file_metadata_by_expr_call method_call = new get_file_metadata_by_expr_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_file_metadata_by_expr_call extends org.apache.thrift.async.TAsyncMethodCall { + private GetFileMetadataByExprRequest req; + public get_file_metadata_by_expr_call(GetFileMetadataByExprRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_file_metadata_by_expr", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_file_metadata_by_expr_args args = new get_file_metadata_by_expr_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public GetFileMetadataByExprResult getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_file_metadata_by_expr(); + } + } + + public void get_file_metadata(GetFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_file_metadata_call method_call = new get_file_metadata_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_file_metadata_call extends org.apache.thrift.async.TAsyncMethodCall { + private GetFileMetadataRequest req; + public get_file_metadata_call(GetFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_file_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_file_metadata_args args = new get_file_metadata_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public GetFileMetadataResult getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_file_metadata(); + } + } + + public void put_file_metadata(PutFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + put_file_metadata_call method_call = new put_file_metadata_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class put_file_metadata_call extends org.apache.thrift.async.TAsyncMethodCall { + private PutFileMetadataRequest req; + public put_file_metadata_call(PutFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("put_file_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); + put_file_metadata_args args = new put_file_metadata_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public PutFileMetadataResult getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_put_file_metadata(); + } + } + + public void clear_file_metadata(ClearFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + clear_file_metadata_call method_call = new clear_file_metadata_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class clear_file_metadata_call extends org.apache.thrift.async.TAsyncMethodCall { + private ClearFileMetadataRequest req; + public clear_file_metadata_call(ClearFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("clear_file_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); + clear_file_metadata_args args = new clear_file_metadata_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public ClearFileMetadataResult getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_clear_file_metadata(); + } + } + + public void cache_file_metadata(CacheFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + cache_file_metadata_call method_call = new cache_file_metadata_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class cache_file_metadata_call extends org.apache.thrift.async.TAsyncMethodCall { + private CacheFileMetadataRequest req; + public cache_file_metadata_call(CacheFileMetadataRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.req = req; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cache_file_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0)); + cache_file_metadata_args args = new cache_file_metadata_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public CacheFileMetadataResult getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_cache_file_metadata(); + } + } + + public void get_metastore_db_uuid(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_metastore_db_uuid_call method_call = new get_metastore_db_uuid_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_metastore_db_uuid_call extends org.apache.thrift.async.TAsyncMethodCall { + public get_metastore_db_uuid_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_metastore_db_uuid", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_metastore_db_uuid_args args = new get_metastore_db_uuid_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public String getResult() throws MetaException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_metastore_db_uuid(); + } + } + + } + + 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>())); + } + + protected Processor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("getMetaConf", new getMetaConf()); + processMap.put("setMetaConf", new setMetaConf()); + processMap.put("create_database", new create_database()); + processMap.put("get_database", new get_database()); + processMap.put("drop_database", new drop_database()); + processMap.put("get_databases", new get_databases()); + processMap.put("get_all_databases", new get_all_databases()); + processMap.put("alter_database", new alter_database()); + processMap.put("get_type", new get_type()); + processMap.put("create_type", new create_type()); + processMap.put("drop_type", new drop_type()); + processMap.put("get_type_all", new get_type_all()); + processMap.put("get_fields", new get_fields()); + processMap.put("get_fields_with_environment_context", new get_fields_with_environment_context()); + processMap.put("get_schema", new get_schema()); + processMap.put("get_schema_with_environment_context", new get_schema_with_environment_context()); + processMap.put("create_table", new create_table()); + processMap.put("create_table_with_environment_context", new create_table_with_environment_context()); + processMap.put("create_table_with_constraints", new create_table_with_constraints()); + processMap.put("drop_constraint", new drop_constraint()); + processMap.put("add_primary_key", new add_primary_key()); + processMap.put("add_foreign_key", new add_foreign_key()); + processMap.put("add_unique_constraint", new add_unique_constraint()); + processMap.put("add_not_null_constraint", new add_not_null_constraint()); + processMap.put("drop_table", new drop_table()); + processMap.put("drop_table_with_environment_context", new drop_table_with_environment_context()); + processMap.put("truncate_table", new truncate_table()); + processMap.put("get_tables", new get_tables()); + processMap.put("get_tables_by_type", new get_tables_by_type()); + processMap.put("get_table_meta", new get_table_meta()); + processMap.put("get_all_tables", new get_all_tables()); + processMap.put("get_table", new get_table()); + processMap.put("get_table_objects_by_name", new get_table_objects_by_name()); + processMap.put("get_table_req", new get_table_req()); + processMap.put("get_table_objects_by_name_req", new get_table_objects_by_name_req()); + processMap.put("get_table_names_by_filter", new get_table_names_by_filter()); + processMap.put("alter_table", new alter_table()); + processMap.put("alter_table_with_environment_context", new alter_table_with_environment_context()); + processMap.put("alter_table_with_cascade", new alter_table_with_cascade()); + processMap.put("add_partition", new add_partition()); + processMap.put("add_partition_with_environment_context", new add_partition_with_environment_context()); + processMap.put("add_partitions", new add_partitions()); + processMap.put("add_partitions_pspec", new add_partitions_pspec()); + processMap.put("append_partition", new append_partition()); + processMap.put("add_partitions_req", new add_partitions_req()); + processMap.put("append_partition_with_environment_context", new append_partition_with_environment_context()); + processMap.put("append_partition_by_name", new append_partition_by_name()); + processMap.put("append_partition_by_name_with_environment_context", new append_partition_by_name_with_environment_context()); + processMap.put("drop_partition", new drop_partition()); + processMap.put("drop_partition_with_environment_context", new drop_partition_with_environment_context()); + processMap.put("drop_partition_by_name", new drop_partition_by_name()); + processMap.put("drop_partition_by_name_with_environment_context", new drop_partition_by_name_with_environment_context()); + processMap.put("drop_partitions_req", new drop_partitions_req()); + processMap.put("get_partition", new get_partition()); + processMap.put("exchange_partition", new exchange_partition()); + processMap.put("exchange_partitions", new exchange_partitions()); + processMap.put("get_partition_with_auth", new get_partition_with_auth()); + processMap.put("get_partition_by_name", new get_partition_by_name()); + processMap.put("get_partitions", new get_partitions()); + processMap.put("get_partitions_with_auth", new get_partitions_with_auth()); + processMap.put("get_partitions_pspec", new get_partitions_pspec()); + processMap.put("get_partition_names", new get_partition_names()); + processMap.put("get_partitions_ps", new get_partitions_ps()); + processMap.put("get_partitions_ps_with_auth", new get_partitions_ps_with_auth()); + processMap.put("get_partition_names_ps", new get_partition_names_ps()); + processMap.put("get_partitions_by_filter", new get_partitions_by_filter()); + processMap.put("get_part_specs_by_filter", new get_part_specs_by_filter()); + processMap.put("get_partitions_by_expr", new get_partitions_by_expr()); + processMap.put("get_num_partitions_by_filter", new get_num_partitions_by_filter()); + processMap.put("get_partitions_by_names", new get_partitions_by_names()); + processMap.put("alter_partition", new alter_partition()); + processMap.put("alter_partitions", new alter_partitions()); + processMap.put("alter_partitions_with_environment_context", new alter_partitions_with_environment_context()); + processMap.put("alter_partition_with_environment_context", new alter_partition_with_environment_context()); + processMap.put("rename_partition", new rename_partition()); + processMap.put("partition_name_has_valid_characters", new partition_name_has_valid_characters()); + processMap.put("get_config_value", new get_config_value()); + processMap.put("partition_name_to_vals", new partition_name_to_vals()); + processMap.put("partition_name_to_spec", new partition_name_to_spec()); + processMap.put("markPartitionForEvent", new markPartitionForEvent()); + processMap.put("isPartitionMarkedForEvent", new isPartitionMarkedForEvent()); + processMap.put("add_index", new add_index()); + processMap.put("alter_index", new alter_index()); + processMap.put("drop_index_by_name", new drop_index_by_name()); + processMap.put("get_index_by_name", new get_index_by_name()); + processMap.put("get_indexes", new get_indexes()); + processMap.put("get_index_names", new get_index_names()); + processMap.put("get_primary_keys", new get_primary_keys()); + processMap.put("get_foreign_keys", new get_foreign_keys()); + processMap.put("get_unique_constraints", new get_unique_constraints()); + processMap.put("get_not_null_constraints", new get_not_null_constraints()); + processMap.put("update_table_column_statistics", new update_table_column_statistics()); + processMap.put("update_partition_column_statistics", new update_partition_column_statistics()); + processMap.put("get_table_column_statistics", new get_table_column_statistics()); + processMap.put("get_partition_column_statistics", new get_partition_column_statistics()); + processMap.put("get_table_statistics_req", new get_table_statistics_req()); + processMap.put("get_partitions_statistics_req", new get_partitions_statistics_req()); + processMap.put("get_aggr_stats_for", new get_aggr_stats_for()); + processMap.put("set_aggr_stats_for", new set_aggr_stats_for()); + processMap.put("delete_partition_column_statistics", new delete_partition_column_statistics()); + processMap.put("delete_table_column_statistics", new delete_table_column_statistics()); + processMap.put("create_function", new create_function()); + processMap.put("drop_function", new drop_function()); + processMap.put("alter_function", new alter_function()); + processMap.put("get_functions", new get_functions()); + processMap.put("get_function", new get_function()); + processMap.put("get_all_functions", new get_all_functions()); + processMap.put("create_role", new create_role()); + processMap.put("drop_role", new drop_role()); + processMap.put("get_role_names", new get_role_names()); + processMap.put("grant_role", new grant_role()); + processMap.put("revoke_role", new revoke_role()); + processMap.put("list_roles", new list_roles()); + processMap.put("grant_revoke_role", new grant_revoke_role()); + processMap.put("get_principals_in_role", new get_principals_in_role()); + processMap.put("get_role_grants_for_principal", new get_role_grants_for_principal()); + processMap.put("get_privilege_set", new get_privilege_set()); + processMap.put("list_privileges", new list_privileges()); + processMap.put("grant_privileges", new grant_privileges()); + processMap.put("revoke_privileges", new revoke_privileges()); + processMap.put("grant_revoke_privileges", new grant_revoke_privileges()); + processMap.put("set_ugi", new set_ugi()); + processMap.put("get_delegation_token", new get_delegation_token()); + processMap.put("renew_delegation_token", new renew_delegation_token()); + processMap.put("cancel_delegation_token", new cancel_delegation_token()); + processMap.put("add_token", new add_token()); + processMap.put("remove_token", new remove_token()); + processMap.put("get_token", new get_token()); + processMap.put("get_all_token_identifiers", new get_all_token_identifiers()); + processMap.put("add_master_key", new add_master_key()); + processMap.put("update_master_key", new update_master_key()); + processMap.put("remove_master_key", new remove_master_key()); + processMap.put("get_master_keys", new get_master_keys()); + processMap.put("get_open_txns", new get_open_txns()); + processMap.put("get_open_txns_info", new get_open_txns_info()); + processMap.put("open_txns", new open_txns()); + processMap.put("abort_txn", new abort_txn()); + processMap.put("abort_txns", new abort_txns()); + processMap.put("commit_txn", new commit_txn()); + processMap.put("lock", new lock()); + processMap.put("check_lock", new check_lock()); + processMap.put("unlock", new unlock()); + processMap.put("show_locks", new show_locks()); + processMap.put("heartbeat", new heartbeat()); + processMap.put("heartbeat_txn_range", new heartbeat_txn_range()); + processMap.put("compact", new compact()); + processMap.put("compact2", new compact2()); + processMap.put("show_compact", new show_compact()); + processMap.put("add_dynamic_partitions", new add_dynamic_partitions()); + processMap.put("get_next_notification", new get_next_notification()); + processMap.put("get_current_notificationEventId", new get_current_notificationEventId()); + processMap.put("fire_listener_event", new fire_listener_event()); + processMap.put("flushCache", new flushCache()); + processMap.put("cm_recycle", new cm_recycle()); + processMap.put("get_file_metadata_by_expr", new get_file_metadata_by_expr()); + processMap.put("get_file_metadata", new get_file_metadata()); + processMap.put("put_file_metadata", new put_file_metadata()); + processMap.put("clear_file_metadata", new clear_file_metadata()); + processMap.put("cache_file_metadata", new cache_file_metadata()); + processMap.put("get_metastore_db_uuid", new get_metastore_db_uuid()); + return processMap; + } + + public static class getMetaConf extends org.apache.thrift.ProcessFunction { + public getMetaConf() { + super("getMetaConf"); + } + + public getMetaConf_args getEmptyArgsInstance() { + return new getMetaConf_args(); + } + + protected boolean isOneway() { + return false; + } + + public getMetaConf_result getResult(I iface, getMetaConf_args args) throws org.apache.thrift.TException { + getMetaConf_result result = new getMetaConf_result(); + try { + result.success = iface.getMetaConf(args.key); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class setMetaConf extends org.apache.thrift.ProcessFunction { + public setMetaConf() { + super("setMetaConf"); + } + + public setMetaConf_args getEmptyArgsInstance() { + return new setMetaConf_args(); + } + + protected boolean isOneway() { + return false; + } + + public setMetaConf_result getResult(I iface, setMetaConf_args args) throws org.apache.thrift.TException { + setMetaConf_result result = new setMetaConf_result(); + try { + iface.setMetaConf(args.key, args.value); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class create_database extends org.apache.thrift.ProcessFunction { + public create_database() { + super("create_database"); + } + + public create_database_args getEmptyArgsInstance() { + return new create_database_args(); + } + + 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); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class get_database extends org.apache.thrift.ProcessFunction { + public get_database() { + super("get_database"); + } + + public get_database_args getEmptyArgsInstance() { + return new get_database_args(); + } + + 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); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class drop_database extends org.apache.thrift.ProcessFunction { + public drop_database() { + super("drop_database"); + } + + public drop_database_args getEmptyArgsInstance() { + return new drop_database_args(); + } + + 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); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (InvalidOperationException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class get_databases extends org.apache.thrift.ProcessFunction { + public get_databases() { + super("get_databases"); + } + + public get_databases_args getEmptyArgsInstance() { + return new get_databases_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_all_databases extends org.apache.thrift.ProcessFunction { + public get_all_databases() { + super("get_all_databases"); + } + + public get_all_databases_args getEmptyArgsInstance() { + return new get_all_databases_args(); + } + + 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(); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class alter_database extends org.apache.thrift.ProcessFunction { + public alter_database() { + super("alter_database"); + } + + public alter_database_args getEmptyArgsInstance() { + return new alter_database_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_type extends org.apache.thrift.ProcessFunction { + public get_type() { + super("get_type"); + } + + public get_type_args getEmptyArgsInstance() { + return new get_type_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class create_type extends org.apache.thrift.ProcessFunction { + public create_type() { + super("create_type"); + } + + public create_type_args getEmptyArgsInstance() { + return new create_type_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class drop_type extends org.apache.thrift.ProcessFunction { + public drop_type() { + super("drop_type"); + } + + public drop_type_args getEmptyArgsInstance() { + return new drop_type_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_type_all extends org.apache.thrift.ProcessFunction { + public get_type_all() { + super("get_type_all"); + } + + public get_type_all_args getEmptyArgsInstance() { + return new get_type_all_args(); + } + + 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); + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_fields extends org.apache.thrift.ProcessFunction { + public get_fields() { + super("get_fields"); + } + + public get_fields_args getEmptyArgsInstance() { + return new get_fields_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (UnknownTableException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class get_fields_with_environment_context extends org.apache.thrift.ProcessFunction { + public get_fields_with_environment_context() { + super("get_fields_with_environment_context"); + } + + public get_fields_with_environment_context_args getEmptyArgsInstance() { + return new get_fields_with_environment_context_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_fields_with_environment_context_result getResult(I iface, get_fields_with_environment_context_args args) throws org.apache.thrift.TException { + get_fields_with_environment_context_result result = new get_fields_with_environment_context_result(); + try { + result.success = iface.get_fields_with_environment_context(args.db_name, args.table_name, args.environment_context); + } catch (MetaException o1) { + result.o1 = o1; + } catch (UnknownTableException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class get_schema extends org.apache.thrift.ProcessFunction { + public get_schema() { + super("get_schema"); + } + + public get_schema_args getEmptyArgsInstance() { + return new get_schema_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (UnknownTableException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class get_schema_with_environment_context extends org.apache.thrift.ProcessFunction { + public get_schema_with_environment_context() { + super("get_schema_with_environment_context"); + } + + public get_schema_with_environment_context_args getEmptyArgsInstance() { + return new get_schema_with_environment_context_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_schema_with_environment_context_result getResult(I iface, get_schema_with_environment_context_args args) throws org.apache.thrift.TException { + get_schema_with_environment_context_result result = new get_schema_with_environment_context_result(); + try { + result.success = iface.get_schema_with_environment_context(args.db_name, args.table_name, args.environment_context); + } catch (MetaException o1) { + result.o1 = o1; + } catch (UnknownTableException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class create_table extends org.apache.thrift.ProcessFunction { + public create_table() { + super("create_table"); + } + + public create_table_args getEmptyArgsInstance() { + return new create_table_args(); + } + + 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); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (NoSuchObjectException o4) { + result.o4 = o4; + } + return result; + } + } + + 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"); + } + + public create_table_with_environment_context_args getEmptyArgsInstance() { + return new create_table_with_environment_context_args(); + } + + 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); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (NoSuchObjectException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class create_table_with_constraints extends org.apache.thrift.ProcessFunction { + public create_table_with_constraints() { + super("create_table_with_constraints"); + } + + public create_table_with_constraints_args getEmptyArgsInstance() { + return new create_table_with_constraints_args(); + } + + protected boolean isOneway() { + return false; + } + + public create_table_with_constraints_result getResult(I iface, create_table_with_constraints_args args) throws org.apache.thrift.TException { + create_table_with_constraints_result result = new create_table_with_constraints_result(); + try { + iface.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys, args.uniqueConstraints, args.notNullConstraints); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (NoSuchObjectException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class drop_constraint extends org.apache.thrift.ProcessFunction { + public drop_constraint() { + super("drop_constraint"); + } + + public drop_constraint_args getEmptyArgsInstance() { + return new drop_constraint_args(); + } + + protected boolean isOneway() { + return false; + } + + public drop_constraint_result getResult(I iface, drop_constraint_args args) throws org.apache.thrift.TException { + drop_constraint_result result = new drop_constraint_result(); + try { + iface.drop_constraint(args.req); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class add_primary_key extends org.apache.thrift.ProcessFunction { + public add_primary_key() { + super("add_primary_key"); + } + + public add_primary_key_args getEmptyArgsInstance() { + return new add_primary_key_args(); + } + + protected boolean isOneway() { + return false; + } + + public add_primary_key_result getResult(I iface, add_primary_key_args args) throws org.apache.thrift.TException { + add_primary_key_result result = new add_primary_key_result(); + try { + iface.add_primary_key(args.req); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class add_foreign_key extends org.apache.thrift.ProcessFunction { + public add_foreign_key() { + super("add_foreign_key"); + } + + public add_foreign_key_args getEmptyArgsInstance() { + return new add_foreign_key_args(); + } + + protected boolean isOneway() { + return false; + } + + public add_foreign_key_result getResult(I iface, add_foreign_key_args args) throws org.apache.thrift.TException { + add_foreign_key_result result = new add_foreign_key_result(); + try { + iface.add_foreign_key(args.req); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class add_unique_constraint extends org.apache.thrift.ProcessFunction { + public add_unique_constraint() { + super("add_unique_constraint"); + } + + public add_unique_constraint_args getEmptyArgsInstance() { + return new add_unique_constraint_args(); + } + + protected boolean isOneway() { + return false; + } + + public add_unique_constraint_result getResult(I iface, add_unique_constraint_args args) throws org.apache.thrift.TException { + add_unique_constraint_result result = new add_unique_constraint_result(); + try { + iface.add_unique_constraint(args.req); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class add_not_null_constraint extends org.apache.thrift.ProcessFunction { + public add_not_null_constraint() { + super("add_not_null_constraint"); + } + + public add_not_null_constraint_args getEmptyArgsInstance() { + return new add_not_null_constraint_args(); + } + + protected boolean isOneway() { + return false; + } + + public add_not_null_constraint_result getResult(I iface, add_not_null_constraint_args args) throws org.apache.thrift.TException { + add_not_null_constraint_result result = new add_not_null_constraint_result(); + try { + iface.add_not_null_constraint(args.req); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class drop_table extends org.apache.thrift.ProcessFunction { + public drop_table() { + super("drop_table"); + } + + public drop_table_args getEmptyArgsInstance() { + return new drop_table_args(); + } + + 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); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class drop_table_with_environment_context extends org.apache.thrift.ProcessFunction { + public drop_table_with_environment_context() { + super("drop_table_with_environment_context"); + } + + public drop_table_with_environment_context_args getEmptyArgsInstance() { + return new drop_table_with_environment_context_args(); + } + + protected boolean isOneway() { + return false; + } + + public drop_table_with_environment_context_result getResult(I iface, drop_table_with_environment_context_args args) throws org.apache.thrift.TException { + drop_table_with_environment_context_result result = new drop_table_with_environment_context_result(); + try { + iface.drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class truncate_table extends org.apache.thrift.ProcessFunction { + public truncate_table() { + super("truncate_table"); + } + + public truncate_table_args getEmptyArgsInstance() { + return new truncate_table_args(); + } + + protected boolean isOneway() { + return false; + } + + public truncate_table_result getResult(I iface, truncate_table_args args) throws org.apache.thrift.TException { + truncate_table_result result = new truncate_table_result(); + try { + iface.truncate_table(args.dbName, args.tableName, args.partNames); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_tables extends org.apache.thrift.ProcessFunction { + public get_tables() { + super("get_tables"); + } + + public get_tables_args getEmptyArgsInstance() { + return new get_tables_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_tables_by_type extends org.apache.thrift.ProcessFunction { + public get_tables_by_type() { + super("get_tables_by_type"); + } + + public get_tables_by_type_args getEmptyArgsInstance() { + return new get_tables_by_type_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_tables_by_type_result getResult(I iface, get_tables_by_type_args args) throws org.apache.thrift.TException { + get_tables_by_type_result result = new get_tables_by_type_result(); + try { + result.success = iface.get_tables_by_type(args.db_name, args.pattern, args.tableType); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_table_meta extends org.apache.thrift.ProcessFunction { + public get_table_meta() { + super("get_table_meta"); + } + + public get_table_meta_args getEmptyArgsInstance() { + return new get_table_meta_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_table_meta_result getResult(I iface, get_table_meta_args args) throws org.apache.thrift.TException { + get_table_meta_result result = new get_table_meta_result(); + try { + result.success = iface.get_table_meta(args.db_patterns, args.tbl_patterns, args.tbl_types); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_all_tables extends org.apache.thrift.ProcessFunction { + public get_all_tables() { + super("get_all_tables"); + } + + public get_all_tables_args getEmptyArgsInstance() { + return new get_all_tables_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_table extends org.apache.thrift.ProcessFunction { + public get_table() { + super("get_table"); + } + + public get_table_args getEmptyArgsInstance() { + return new get_table_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + 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"); + } + + public get_table_objects_by_name_args getEmptyArgsInstance() { + return new get_table_objects_by_name_args(); + } + + 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(); + result.success = iface.get_table_objects_by_name(args.dbname, args.tbl_names); + return result; + } + } + + public static class get_table_req extends org.apache.thrift.ProcessFunction { + public get_table_req() { + super("get_table_req"); + } + + public get_table_req_args getEmptyArgsInstance() { + return new get_table_req_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_table_req_result getResult(I iface, get_table_req_args args) throws org.apache.thrift.TException { + get_table_req_result result = new get_table_req_result(); + try { + result.success = iface.get_table_req(args.req); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_table_objects_by_name_req extends org.apache.thrift.ProcessFunction { + public get_table_objects_by_name_req() { + super("get_table_objects_by_name_req"); + } + + public get_table_objects_by_name_req_args getEmptyArgsInstance() { + return new get_table_objects_by_name_req_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_table_objects_by_name_req_result getResult(I iface, get_table_objects_by_name_req_args args) throws org.apache.thrift.TException { + get_table_objects_by_name_req_result result = new get_table_objects_by_name_req_result(); + try { + result.success = iface.get_table_objects_by_name_req(args.req); + } catch (MetaException o1) { + result.o1 = o1; + } catch (InvalidOperationException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } + return result; + } + } + + 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"); + } + + public get_table_names_by_filter_args getEmptyArgsInstance() { + return new get_table_names_by_filter_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (InvalidOperationException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class alter_table extends org.apache.thrift.ProcessFunction { + public alter_table() { + super("alter_table"); + } + + public alter_table_args getEmptyArgsInstance() { + return new alter_table_args(); + } + + 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); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + 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"); + } + + public alter_table_with_environment_context_args getEmptyArgsInstance() { + return new alter_table_with_environment_context_args(); + } + + 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); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class alter_table_with_cascade extends org.apache.thrift.ProcessFunction { + public alter_table_with_cascade() { + super("alter_table_with_cascade"); + } + + public alter_table_with_cascade_args getEmptyArgsInstance() { + return new alter_table_with_cascade_args(); + } + + protected boolean isOneway() { + return false; + } + + public alter_table_with_cascade_result getResult(I iface, alter_table_with_cascade_args args) throws org.apache.thrift.TException { + alter_table_with_cascade_result result = new alter_table_with_cascade_result(); + try { + iface.alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class add_partition extends org.apache.thrift.ProcessFunction { + public add_partition() { + super("add_partition"); + } + + public add_partition_args getEmptyArgsInstance() { + return new add_partition_args(); + } + + 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); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + 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"); + } + + public add_partition_with_environment_context_args getEmptyArgsInstance() { + return new add_partition_with_environment_context_args(); + } + + 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); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class add_partitions extends org.apache.thrift.ProcessFunction { + public add_partitions() { + super("add_partitions"); + } + + public add_partitions_args getEmptyArgsInstance() { + return new add_partitions_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class add_partitions_pspec extends org.apache.thrift.ProcessFunction { + public add_partitions_pspec() { + super("add_partitions_pspec"); + } + + public add_partitions_pspec_args getEmptyArgsInstance() { + return new add_partitions_pspec_args(); + } + + protected boolean isOneway() { + return false; + } + + public add_partitions_pspec_result getResult(I iface, add_partitions_pspec_args args) throws org.apache.thrift.TException { + add_partitions_pspec_result result = new add_partitions_pspec_result(); + try { + result.success = iface.add_partitions_pspec(args.new_parts); + result.setSuccessIsSet(true); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class append_partition extends org.apache.thrift.ProcessFunction { + public append_partition() { + super("append_partition"); + } + + public append_partition_args getEmptyArgsInstance() { + return new append_partition_args(); + } + + 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); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class add_partitions_req extends org.apache.thrift.ProcessFunction { + public add_partitions_req() { + super("add_partitions_req"); + } + + public add_partitions_req_args getEmptyArgsInstance() { + return new add_partitions_req_args(); + } + + protected boolean isOneway() { + return false; + } + + public add_partitions_req_result getResult(I iface, add_partitions_req_args args) throws org.apache.thrift.TException { + add_partitions_req_result result = new add_partitions_req_result(); + try { + result.success = iface.add_partitions_req(args.request); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class append_partition_with_environment_context extends org.apache.thrift.ProcessFunction { + public append_partition_with_environment_context() { + super("append_partition_with_environment_context"); + } + + public append_partition_with_environment_context_args getEmptyArgsInstance() { + return new append_partition_with_environment_context_args(); + } + + protected boolean isOneway() { + return false; + } + + public append_partition_with_environment_context_result getResult(I iface, append_partition_with_environment_context_args args) throws org.apache.thrift.TException { + append_partition_with_environment_context_result result = new append_partition_with_environment_context_result(); + try { + result.success = iface.append_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.environment_context); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class append_partition_by_name extends org.apache.thrift.ProcessFunction { + public append_partition_by_name() { + super("append_partition_by_name"); + } + + public append_partition_by_name_args getEmptyArgsInstance() { + return new append_partition_by_name_args(); + } + + 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); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class append_partition_by_name_with_environment_context extends org.apache.thrift.ProcessFunction { + public append_partition_by_name_with_environment_context() { + super("append_partition_by_name_with_environment_context"); + } + + public append_partition_by_name_with_environment_context_args getEmptyArgsInstance() { + return new append_partition_by_name_with_environment_context_args(); + } + + protected boolean isOneway() { + return false; + } + + public append_partition_by_name_with_environment_context_result getResult(I iface, append_partition_by_name_with_environment_context_args args) throws org.apache.thrift.TException { + append_partition_by_name_with_environment_context_result result = new append_partition_by_name_with_environment_context_result(); + try { + result.success = iface.append_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.environment_context); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class drop_partition extends org.apache.thrift.ProcessFunction { + public drop_partition() { + super("drop_partition"); + } + + public drop_partition_args getEmptyArgsInstance() { + return new drop_partition_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class drop_partition_with_environment_context extends org.apache.thrift.ProcessFunction { + public drop_partition_with_environment_context() { + super("drop_partition_with_environment_context"); + } + + public drop_partition_with_environment_context_args getEmptyArgsInstance() { + return new drop_partition_with_environment_context_args(); + } + + protected boolean isOneway() { + return false; + } + + public drop_partition_with_environment_context_result getResult(I iface, drop_partition_with_environment_context_args args) throws org.apache.thrift.TException { + drop_partition_with_environment_context_result result = new drop_partition_with_environment_context_result(); + try { + result.success = iface.drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class drop_partition_by_name extends org.apache.thrift.ProcessFunction { + public drop_partition_by_name() { + super("drop_partition_by_name"); + } + + public drop_partition_by_name_args getEmptyArgsInstance() { + return new drop_partition_by_name_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class drop_partition_by_name_with_environment_context extends org.apache.thrift.ProcessFunction { + public drop_partition_by_name_with_environment_context() { + super("drop_partition_by_name_with_environment_context"); + } + + public drop_partition_by_name_with_environment_context_args getEmptyArgsInstance() { + return new drop_partition_by_name_with_environment_context_args(); + } + + protected boolean isOneway() { + return false; + } + + public drop_partition_by_name_with_environment_context_result getResult(I iface, drop_partition_by_name_with_environment_context_args args) throws org.apache.thrift.TException { + drop_partition_by_name_with_environment_context_result result = new drop_partition_by_name_with_environment_context_result(); + try { + result.success = iface.drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class drop_partitions_req extends org.apache.thrift.ProcessFunction { + public drop_partitions_req() { + super("drop_partitions_req"); + } + + public drop_partitions_req_args getEmptyArgsInstance() { + return new drop_partitions_req_args(); + } + + protected boolean isOneway() { + return false; + } + + public drop_partitions_req_result getResult(I iface, drop_partitions_req_args args) throws org.apache.thrift.TException { + drop_partitions_req_result result = new drop_partitions_req_result(); + try { + result.success = iface.drop_partitions_req(args.req); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_partition extends org.apache.thrift.ProcessFunction { + public get_partition() { + super("get_partition"); + } + + public get_partition_args getEmptyArgsInstance() { + return new get_partition_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class exchange_partition extends org.apache.thrift.ProcessFunction { + public exchange_partition() { + super("exchange_partition"); + } + + public exchange_partition_args getEmptyArgsInstance() { + return new exchange_partition_args(); + } + + protected boolean isOneway() { + return false; + } + + public exchange_partition_result getResult(I iface, exchange_partition_args args) throws org.apache.thrift.TException { + exchange_partition_result result = new exchange_partition_result(); + try { + result.success = iface.exchange_partition(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (InvalidObjectException o3) { + result.o3 = o3; + } catch (InvalidInputException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class exchange_partitions extends org.apache.thrift.ProcessFunction { + public exchange_partitions() { + super("exchange_partitions"); + } + + public exchange_partitions_args getEmptyArgsInstance() { + return new exchange_partitions_args(); + } + + protected boolean isOneway() { + return false; + } + + public exchange_partitions_result getResult(I iface, exchange_partitions_args args) throws org.apache.thrift.TException { + exchange_partitions_result result = new exchange_partitions_result(); + try { + result.success = iface.exchange_partitions(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (InvalidObjectException o3) { + result.o3 = o3; + } catch (InvalidInputException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class get_partition_with_auth extends org.apache.thrift.ProcessFunction { + public get_partition_with_auth() { + super("get_partition_with_auth"); + } + + public get_partition_with_auth_args getEmptyArgsInstance() { + return new get_partition_with_auth_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_partition_by_name extends org.apache.thrift.ProcessFunction { + public get_partition_by_name() { + super("get_partition_by_name"); + } + + public get_partition_by_name_args getEmptyArgsInstance() { + return new get_partition_by_name_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_partitions extends org.apache.thrift.ProcessFunction { + public get_partitions() { + super("get_partitions"); + } + + public get_partitions_args getEmptyArgsInstance() { + return new get_partitions_args(); + } + + 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); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_partitions_with_auth extends org.apache.thrift.ProcessFunction { + public get_partitions_with_auth() { + super("get_partitions_with_auth"); + } + + public get_partitions_with_auth_args getEmptyArgsInstance() { + return new get_partitions_with_auth_args(); + } + + 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); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_partitions_pspec extends org.apache.thrift.ProcessFunction { + public get_partitions_pspec() { + super("get_partitions_pspec"); + } + + public get_partitions_pspec_args getEmptyArgsInstance() { + return new get_partitions_pspec_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_partitions_pspec_result getResult(I iface, get_partitions_pspec_args args) throws org.apache.thrift.TException { + get_partitions_pspec_result result = new get_partitions_pspec_result(); + try { + result.success = iface.get_partitions_pspec(args.db_name, args.tbl_name, args.max_parts); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_partition_names extends org.apache.thrift.ProcessFunction { + public get_partition_names() { + super("get_partition_names"); + } + + public get_partition_names_args getEmptyArgsInstance() { + return new get_partition_names_args(); + } + + 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); + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_partitions_ps extends org.apache.thrift.ProcessFunction { + public get_partitions_ps() { + super("get_partitions_ps"); + } + + public get_partitions_ps_args getEmptyArgsInstance() { + return new get_partitions_ps_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + 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"); + } + + public get_partitions_ps_with_auth_args getEmptyArgsInstance() { + return new get_partitions_ps_with_auth_args(); + } + + 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); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_partition_names_ps extends org.apache.thrift.ProcessFunction { + public get_partition_names_ps() { + super("get_partition_names_ps"); + } + + public get_partition_names_ps_args getEmptyArgsInstance() { + return new get_partition_names_ps_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_partitions_by_filter extends org.apache.thrift.ProcessFunction { + public get_partitions_by_filter() { + super("get_partitions_by_filter"); + } + + public get_partitions_by_filter_args getEmptyArgsInstance() { + return new get_partitions_by_filter_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_part_specs_by_filter extends org.apache.thrift.ProcessFunction { + public get_part_specs_by_filter() { + super("get_part_specs_by_filter"); + } + + public get_part_specs_by_filter_args getEmptyArgsInstance() { + return new get_part_specs_by_filter_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_part_specs_by_filter_result getResult(I iface, get_part_specs_by_filter_args args) throws org.apache.thrift.TException { + get_part_specs_by_filter_result result = new get_part_specs_by_filter_result(); + try { + result.success = iface.get_part_specs_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_partitions_by_expr extends org.apache.thrift.ProcessFunction { + public get_partitions_by_expr() { + super("get_partitions_by_expr"); + } + + public get_partitions_by_expr_args getEmptyArgsInstance() { + return new get_partitions_by_expr_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_partitions_by_expr_result getResult(I iface, get_partitions_by_expr_args args) throws org.apache.thrift.TException { + get_partitions_by_expr_result result = new get_partitions_by_expr_result(); + try { + result.success = iface.get_partitions_by_expr(args.req); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_num_partitions_by_filter extends org.apache.thrift.ProcessFunction { + public get_num_partitions_by_filter() { + super("get_num_partitions_by_filter"); + } + + public get_num_partitions_by_filter_args getEmptyArgsInstance() { + return new get_num_partitions_by_filter_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_num_partitions_by_filter_result getResult(I iface, get_num_partitions_by_filter_args args) throws org.apache.thrift.TException { + get_num_partitions_by_filter_result result = new get_num_partitions_by_filter_result(); + try { + result.success = iface.get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_partitions_by_names extends org.apache.thrift.ProcessFunction { + public get_partitions_by_names() { + super("get_partitions_by_names"); + } + + public get_partitions_by_names_args getEmptyArgsInstance() { + return new get_partitions_by_names_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class alter_partition extends org.apache.thrift.ProcessFunction { + public alter_partition() { + super("alter_partition"); + } + + public alter_partition_args getEmptyArgsInstance() { + return new alter_partition_args(); + } + + 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); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class alter_partitions extends org.apache.thrift.ProcessFunction { + public alter_partitions() { + super("alter_partitions"); + } + + public alter_partitions_args getEmptyArgsInstance() { + return new alter_partitions_args(); + } + + 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); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class alter_partitions_with_environment_context extends org.apache.thrift.ProcessFunction { + public alter_partitions_with_environment_context() { + super("alter_partitions_with_environment_context"); + } + + public alter_partitions_with_environment_context_args getEmptyArgsInstance() { + return new alter_partitions_with_environment_context_args(); + } + + protected boolean isOneway() { + return false; + } + + public alter_partitions_with_environment_context_result getResult(I iface, alter_partitions_with_environment_context_args args) throws org.apache.thrift.TException { + alter_partitions_with_environment_context_result result = new alter_partitions_with_environment_context_result(); + try { + iface.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + 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"); + } + + public alter_partition_with_environment_context_args getEmptyArgsInstance() { + return new alter_partition_with_environment_context_args(); + } + + 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); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class rename_partition extends org.apache.thrift.ProcessFunction { + public rename_partition() { + super("rename_partition"); + } + + public rename_partition_args getEmptyArgsInstance() { + return new rename_partition_args(); + } + + 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); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class partition_name_has_valid_characters extends org.apache.thrift.ProcessFunction { + public partition_name_has_valid_characters() { + super("partition_name_has_valid_characters"); + } + + public partition_name_has_valid_characters_args getEmptyArgsInstance() { + return new partition_name_has_valid_characters_args(); + } + + protected boolean isOneway() { + return false; + } + + public partition_name_has_valid_characters_result getResult(I iface, partition_name_has_valid_characters_args args) throws org.apache.thrift.TException { + partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); + try { + result.success = iface.partition_name_has_valid_characters(args.part_vals, args.throw_exception); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_config_value extends org.apache.thrift.ProcessFunction { + public get_config_value() { + super("get_config_value"); + } + + public get_config_value_args getEmptyArgsInstance() { + return new get_config_value_args(); + } + + 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); + } catch (ConfigValSecurityException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class partition_name_to_vals extends org.apache.thrift.ProcessFunction { + public partition_name_to_vals() { + super("partition_name_to_vals"); + } + + public partition_name_to_vals_args getEmptyArgsInstance() { + return new partition_name_to_vals_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class partition_name_to_spec extends org.apache.thrift.ProcessFunction { + public partition_name_to_spec() { + super("partition_name_to_spec"); + } + + public partition_name_to_spec_args getEmptyArgsInstance() { + return new partition_name_to_spec_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class markPartitionForEvent extends org.apache.thrift.ProcessFunction { + public markPartitionForEvent() { + super("markPartitionForEvent"); + } + + public markPartitionForEvent_args getEmptyArgsInstance() { + return new markPartitionForEvent_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } catch (UnknownTableException o4) { + result.o4 = o4; + } catch (UnknownPartitionException o5) { + result.o5 = o5; + } catch (InvalidPartitionException o6) { + result.o6 = o6; + } + return result; + } + } + + public static class isPartitionMarkedForEvent extends org.apache.thrift.ProcessFunction { + public isPartitionMarkedForEvent() { + super("isPartitionMarkedForEvent"); + } + + public isPartitionMarkedForEvent_args getEmptyArgsInstance() { + return new isPartitionMarkedForEvent_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } catch (UnknownTableException o4) { + result.o4 = o4; + } catch (UnknownPartitionException o5) { + result.o5 = o5; + } catch (InvalidPartitionException o6) { + result.o6 = o6; + } + return result; + } + } + + public static class add_index extends org.apache.thrift.ProcessFunction { + public add_index() { + super("add_index"); + } + + public add_index_args getEmptyArgsInstance() { + return new add_index_args(); + } + + 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); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class alter_index extends org.apache.thrift.ProcessFunction { + public alter_index() { + super("alter_index"); + } + + public alter_index_args getEmptyArgsInstance() { + return new alter_index_args(); + } + + 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); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class drop_index_by_name extends org.apache.thrift.ProcessFunction { + public drop_index_by_name() { + super("drop_index_by_name"); + } + + public drop_index_by_name_args getEmptyArgsInstance() { + return new drop_index_by_name_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_index_by_name extends org.apache.thrift.ProcessFunction { + public get_index_by_name() { + super("get_index_by_name"); + } + + public get_index_by_name_args getEmptyArgsInstance() { + return new get_index_by_name_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_indexes extends org.apache.thrift.ProcessFunction { + public get_indexes() { + super("get_indexes"); + } + + public get_indexes_args getEmptyArgsInstance() { + return new get_indexes_args(); + } + + 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); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_index_names extends org.apache.thrift.ProcessFunction { + public get_index_names() { + super("get_index_names"); + } + + public get_index_names_args getEmptyArgsInstance() { + return new get_index_names_args(); + } + + 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); + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_primary_keys extends org.apache.thrift.ProcessFunction { + public get_primary_keys() { + super("get_primary_keys"); + } + + public get_primary_keys_args getEmptyArgsInstance() { + return new get_primary_keys_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_primary_keys_result getResult(I iface, get_primary_keys_args args) throws org.apache.thrift.TException { + get_primary_keys_result result = new get_primary_keys_result(); + try { + result.success = iface.get_primary_keys(args.request); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_foreign_keys extends org.apache.thrift.ProcessFunction { + public get_foreign_keys() { + super("get_foreign_keys"); + } + + public get_foreign_keys_args getEmptyArgsInstance() { + return new get_foreign_keys_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_foreign_keys_result getResult(I iface, get_foreign_keys_args args) throws org.apache.thrift.TException { + get_foreign_keys_result result = new get_foreign_keys_result(); + try { + result.success = iface.get_foreign_keys(args.request); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_unique_constraints extends org.apache.thrift.ProcessFunction { + public get_unique_constraints() { + super("get_unique_constraints"); + } + + public get_unique_constraints_args getEmptyArgsInstance() { + return new get_unique_constraints_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_unique_constraints_result getResult(I iface, get_unique_constraints_args args) throws org.apache.thrift.TException { + get_unique_constraints_result result = new get_unique_constraints_result(); + try { + result.success = iface.get_unique_constraints(args.request); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_not_null_constraints extends org.apache.thrift.ProcessFunction { + public get_not_null_constraints() { + super("get_not_null_constraints"); + } + + public get_not_null_constraints_args getEmptyArgsInstance() { + return new get_not_null_constraints_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_not_null_constraints_result getResult(I iface, get_not_null_constraints_args args) throws org.apache.thrift.TException { + get_not_null_constraints_result result = new get_not_null_constraints_result(); + try { + result.success = iface.get_not_null_constraints(args.request); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class update_table_column_statistics extends org.apache.thrift.ProcessFunction { + public update_table_column_statistics() { + super("update_table_column_statistics"); + } + + public update_table_column_statistics_args getEmptyArgsInstance() { + return new update_table_column_statistics_args(); + } + + protected boolean isOneway() { + return false; + } + + public update_table_column_statistics_result getResult(I iface, update_table_column_statistics_args args) throws org.apache.thrift.TException { + update_table_column_statistics_result result = new update_table_column_statistics_result(); + try { + result.success = iface.update_table_column_statistics(args.stats_obj); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (InvalidInputException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class update_partition_column_statistics extends org.apache.thrift.ProcessFunction { + public update_partition_column_statistics() { + super("update_partition_column_statistics"); + } + + public update_partition_column_statistics_args getEmptyArgsInstance() { + return new update_partition_column_statistics_args(); + } + + protected boolean isOneway() { + return false; + } + + public update_partition_column_statistics_result getResult(I iface, update_partition_column_statistics_args args) throws org.apache.thrift.TException { + update_partition_column_statistics_result result = new update_partition_column_statistics_result(); + try { + result.success = iface.update_partition_column_statistics(args.stats_obj); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (InvalidInputException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class get_table_column_statistics extends org.apache.thrift.ProcessFunction { + public get_table_column_statistics() { + super("get_table_column_statistics"); + } + + public get_table_column_statistics_args getEmptyArgsInstance() { + return new get_table_column_statistics_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_table_column_statistics_result getResult(I iface, get_table_column_statistics_args args) throws org.apache.thrift.TException { + get_table_column_statistics_result result = new get_table_column_statistics_result(); + try { + result.success = iface.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (InvalidInputException o3) { + result.o3 = o3; + } catch (InvalidObjectException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class get_partition_column_statistics extends org.apache.thrift.ProcessFunction { + public get_partition_column_statistics() { + super("get_partition_column_statistics"); + } + + public get_partition_column_statistics_args getEmptyArgsInstance() { + return new get_partition_column_statistics_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_partition_column_statistics_result getResult(I iface, get_partition_column_statistics_args args) throws org.apache.thrift.TException { + get_partition_column_statistics_result result = new get_partition_column_statistics_result(); + try { + result.success = iface.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (InvalidInputException o3) { + result.o3 = o3; + } catch (InvalidObjectException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class get_table_statistics_req extends org.apache.thrift.ProcessFunction { + public get_table_statistics_req() { + super("get_table_statistics_req"); + } + + public get_table_statistics_req_args getEmptyArgsInstance() { + return new get_table_statistics_req_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_table_statistics_req_result getResult(I iface, get_table_statistics_req_args args) throws org.apache.thrift.TException { + get_table_statistics_req_result result = new get_table_statistics_req_result(); + try { + result.success = iface.get_table_statistics_req(args.request); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_partitions_statistics_req extends org.apache.thrift.ProcessFunction { + public get_partitions_statistics_req() { + super("get_partitions_statistics_req"); + } + + public get_partitions_statistics_req_args getEmptyArgsInstance() { + return new get_partitions_statistics_req_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_partitions_statistics_req_result getResult(I iface, get_partitions_statistics_req_args args) throws org.apache.thrift.TException { + get_partitions_statistics_req_result result = new get_partitions_statistics_req_result(); + try { + result.success = iface.get_partitions_statistics_req(args.request); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_aggr_stats_for extends org.apache.thrift.ProcessFunction { + public get_aggr_stats_for() { + super("get_aggr_stats_for"); + } + + public get_aggr_stats_for_args getEmptyArgsInstance() { + return new get_aggr_stats_for_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_aggr_stats_for_result getResult(I iface, get_aggr_stats_for_args args) throws org.apache.thrift.TException { + get_aggr_stats_for_result result = new get_aggr_stats_for_result(); + try { + result.success = iface.get_aggr_stats_for(args.request); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class set_aggr_stats_for extends org.apache.thrift.ProcessFunction { + public set_aggr_stats_for() { + super("set_aggr_stats_for"); + } + + public set_aggr_stats_for_args getEmptyArgsInstance() { + return new set_aggr_stats_for_args(); + } + + protected boolean isOneway() { + return false; + } + + public set_aggr_stats_for_result getResult(I iface, set_aggr_stats_for_args args) throws org.apache.thrift.TException { + set_aggr_stats_for_result result = new set_aggr_stats_for_result(); + try { + result.success = iface.set_aggr_stats_for(args.request); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (InvalidInputException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class delete_partition_column_statistics extends org.apache.thrift.ProcessFunction { + public delete_partition_column_statistics() { + super("delete_partition_column_statistics"); + } + + public delete_partition_column_statistics_args getEmptyArgsInstance() { + return new delete_partition_column_statistics_args(); + } + + protected boolean isOneway() { + return false; + } + + public delete_partition_column_statistics_result getResult(I iface, delete_partition_column_statistics_args args) throws org.apache.thrift.TException { + delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); + try { + result.success = iface.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (InvalidObjectException o3) { + result.o3 = o3; + } catch (InvalidInputException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class delete_table_column_statistics extends org.apache.thrift.ProcessFunction { + public delete_table_column_statistics() { + super("delete_table_column_statistics"); + } + + public delete_table_column_statistics_args getEmptyArgsInstance() { + return new delete_table_column_statistics_args(); + } + + protected boolean isOneway() { + return false; + } + + public delete_table_column_statistics_result getResult(I iface, delete_table_column_statistics_args args) throws org.apache.thrift.TException { + delete_table_column_statistics_result result = new delete_table_column_statistics_result(); + try { + result.success = iface.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (InvalidObjectException o3) { + result.o3 = o3; + } catch (InvalidInputException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class create_function extends org.apache.thrift.ProcessFunction { + public create_function() { + super("create_function"); + } + + public create_function_args getEmptyArgsInstance() { + return new create_function_args(); + } + + protected boolean isOneway() { + return false; + } + + public create_function_result getResult(I iface, create_function_args args) throws org.apache.thrift.TException { + create_function_result result = new create_function_result(); + try { + iface.create_function(args.func); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (NoSuchObjectException o4) { + result.o4 = o4; + } + return result; + } + } + + public static class drop_function extends org.apache.thrift.ProcessFunction { + public drop_function() { + super("drop_function"); + } + + public drop_function_args getEmptyArgsInstance() { + return new drop_function_args(); + } + + protected boolean isOneway() { + return false; + } + + public drop_function_result getResult(I iface, drop_function_args args) throws org.apache.thrift.TException { + drop_function_result result = new drop_function_result(); + try { + iface.drop_function(args.dbName, args.funcName); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class alter_function extends org.apache.thrift.ProcessFunction { + public alter_function() { + super("alter_function"); + } + + public alter_function_args getEmptyArgsInstance() { + return new alter_function_args(); + } + + protected boolean isOneway() { + return false; + } + + public alter_function_result getResult(I iface, alter_function_args args) throws org.apache.thrift.TException { + alter_function_result result = new alter_function_result(); + try { + iface.alter_function(args.dbName, args.funcName, args.newFunc); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_functions extends org.apache.thrift.ProcessFunction { + public get_functions() { + super("get_functions"); + } + + public get_functions_args getEmptyArgsInstance() { + return new get_functions_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_functions_result getResult(I iface, get_functions_args args) throws org.apache.thrift.TException { + get_functions_result result = new get_functions_result(); + try { + result.success = iface.get_functions(args.dbName, args.pattern); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_function extends org.apache.thrift.ProcessFunction { + public get_function() { + super("get_function"); + } + + public get_function_args getEmptyArgsInstance() { + return new get_function_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_function_result getResult(I iface, get_function_args args) throws org.apache.thrift.TException { + get_function_result result = new get_function_result(); + try { + result.success = iface.get_function(args.dbName, args.funcName); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_all_functions extends org.apache.thrift.ProcessFunction { + public get_all_functions() { + super("get_all_functions"); + } + + public get_all_functions_args getEmptyArgsInstance() { + return new get_all_functions_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_all_functions_result getResult(I iface, get_all_functions_args args) throws org.apache.thrift.TException { + get_all_functions_result result = new get_all_functions_result(); + try { + result.success = iface.get_all_functions(); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class create_role extends org.apache.thrift.ProcessFunction { + public create_role() { + super("create_role"); + } + + public create_role_args getEmptyArgsInstance() { + return new create_role_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class drop_role extends org.apache.thrift.ProcessFunction { + public drop_role() { + super("drop_role"); + } + + public drop_role_args getEmptyArgsInstance() { + return new drop_role_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_role_names extends org.apache.thrift.ProcessFunction { + public get_role_names() { + super("get_role_names"); + } + + public get_role_names_args getEmptyArgsInstance() { + return new get_role_names_args(); + } + + 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(); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class grant_role extends org.apache.thrift.ProcessFunction { + public grant_role() { + super("grant_role"); + } + + public grant_role_args getEmptyArgsInstance() { + return new grant_role_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class revoke_role extends org.apache.thrift.ProcessFunction { + public revoke_role() { + super("revoke_role"); + } + + public revoke_role_args getEmptyArgsInstance() { + return new revoke_role_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class list_roles extends org.apache.thrift.ProcessFunction { + public list_roles() { + super("list_roles"); + } + + public list_roles_args getEmptyArgsInstance() { + return new list_roles_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class grant_revoke_role extends org.apache.thrift.ProcessFunction { + public grant_revoke_role() { + super("grant_revoke_role"); + } + + public grant_revoke_role_args getEmptyArgsInstance() { + return new grant_revoke_role_args(); + } + + protected boolean isOneway() { + return false; + } + + public grant_revoke_role_result getResult(I iface, grant_revoke_role_args args) throws org.apache.thrift.TException { + grant_revoke_role_result result = new grant_revoke_role_result(); + try { + result.success = iface.grant_revoke_role(args.request); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_principals_in_role extends org.apache.thrift.ProcessFunction { + public get_principals_in_role() { + super("get_principals_in_role"); + } + + public get_principals_in_role_args getEmptyArgsInstance() { + return new get_principals_in_role_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_principals_in_role_result getResult(I iface, get_principals_in_role_args args) throws org.apache.thrift.TException { + get_principals_in_role_result result = new get_principals_in_role_result(); + try { + result.success = iface.get_principals_in_role(args.request); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_role_grants_for_principal extends org.apache.thrift.ProcessFunction { + public get_role_grants_for_principal() { + super("get_role_grants_for_principal"); + } + + public get_role_grants_for_principal_args getEmptyArgsInstance() { + return new get_role_grants_for_principal_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_role_grants_for_principal_result getResult(I iface, get_role_grants_for_principal_args args) throws org.apache.thrift.TException { + get_role_grants_for_principal_result result = new get_role_grants_for_principal_result(); + try { + result.success = iface.get_role_grants_for_principal(args.request); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_privilege_set extends org.apache.thrift.ProcessFunction { + public get_privilege_set() { + super("get_privilege_set"); + } + + public get_privilege_set_args getEmptyArgsInstance() { + return new get_privilege_set_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class list_privileges extends org.apache.thrift.ProcessFunction { + public list_privileges() { + super("list_privileges"); + } + + public list_privileges_args getEmptyArgsInstance() { + return new list_privileges_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class grant_privileges extends org.apache.thrift.ProcessFunction { + public grant_privileges() { + super("grant_privileges"); + } + + public grant_privileges_args getEmptyArgsInstance() { + return new grant_privileges_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class revoke_privileges extends org.apache.thrift.ProcessFunction { + public revoke_privileges() { + super("revoke_privileges"); + } + + public revoke_privileges_args getEmptyArgsInstance() { + return new revoke_privileges_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class grant_revoke_privileges extends org.apache.thrift.ProcessFunction { + public grant_revoke_privileges() { + super("grant_revoke_privileges"); + } + + public grant_revoke_privileges_args getEmptyArgsInstance() { + return new grant_revoke_privileges_args(); + } + + protected boolean isOneway() { + return false; + } + + public grant_revoke_privileges_result getResult(I iface, grant_revoke_privileges_args args) throws org.apache.thrift.TException { + grant_revoke_privileges_result result = new grant_revoke_privileges_result(); + try { + result.success = iface.grant_revoke_privileges(args.request); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class set_ugi extends org.apache.thrift.ProcessFunction { + public set_ugi() { + super("set_ugi"); + } + + public set_ugi_args getEmptyArgsInstance() { + return new set_ugi_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_delegation_token extends org.apache.thrift.ProcessFunction { + public get_delegation_token() { + super("get_delegation_token"); + } + + public get_delegation_token_args getEmptyArgsInstance() { + return new get_delegation_token_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class renew_delegation_token extends org.apache.thrift.ProcessFunction { + public renew_delegation_token() { + super("renew_delegation_token"); + } + + public renew_delegation_token_args getEmptyArgsInstance() { + return new renew_delegation_token_args(); + } + + 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); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class cancel_delegation_token extends org.apache.thrift.ProcessFunction { + public cancel_delegation_token() { + super("cancel_delegation_token"); + } + + public cancel_delegation_token_args getEmptyArgsInstance() { + return new cancel_delegation_token_args(); + } + + 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); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class add_token extends org.apache.thrift.ProcessFunction { + public add_token() { + super("add_token"); + } + + public add_token_args getEmptyArgsInstance() { + return new add_token_args(); + } + + protected boolean isOneway() { + return false; + } + + public add_token_result getResult(I iface, add_token_args args) throws org.apache.thrift.TException { + add_token_result result = new add_token_result(); + result.success = iface.add_token(args.token_identifier, args.delegation_token); + result.setSuccessIsSet(true); + return result; + } + } + + public static class remove_token extends org.apache.thrift.ProcessFunction { + public remove_token() { + super("remove_token"); + } + + public remove_token_args getEmptyArgsInstance() { + return new remove_token_args(); + } + + protected boolean isOneway() { + return false; + } + + public remove_token_result getResult(I iface, remove_token_args args) throws org.apache.thrift.TException { + remove_token_result result = new remove_token_result(); + result.success = iface.remove_token(args.token_identifier); + result.setSuccessIsSet(true); + return result; + } + } + + public static class get_token extends org.apache.thrift.ProcessFunction { + public get_token() { + super("get_token"); + } + + public get_token_args getEmptyArgsInstance() { + return new get_token_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_token_result getResult(I iface, get_token_args args) throws org.apache.thrift.TException { + get_token_result result = new get_token_result(); + result.success = iface.get_token(args.token_identifier); + return result; + } + } + + public static class get_all_token_identifiers extends org.apache.thrift.ProcessFunction { + public get_all_token_identifiers() { + super("get_all_token_identifiers"); + } + + public get_all_token_identifiers_args getEmptyArgsInstance() { + return new get_all_token_identifiers_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_all_token_identifiers_result getResult(I iface, get_all_token_identifiers_args args) throws org.apache.thrift.TException { + get_all_token_identifiers_result result = new get_all_token_identifiers_result(); + result.success = iface.get_all_token_identifiers(); + return result; + } + } + + public static class add_master_key extends org.apache.thrift.ProcessFunction { + public add_master_key() { + super("add_master_key"); + } + + public add_master_key_args getEmptyArgsInstance() { + return new add_master_key_args(); + } + + protected boolean isOneway() { + return false; + } + + public add_master_key_result getResult(I iface, add_master_key_args args) throws org.apache.thrift.TException { + add_master_key_result result = new add_master_key_result(); + try { + result.success = iface.add_master_key(args.key); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class update_master_key extends org.apache.thrift.ProcessFunction { + public update_master_key() { + super("update_master_key"); + } + + public update_master_key_args getEmptyArgsInstance() { + return new update_master_key_args(); + } + + protected boolean isOneway() { + return false; + } + + public update_master_key_result getResult(I iface, update_master_key_args args) throws org.apache.thrift.TException { + update_master_key_result result = new update_master_key_result(); + try { + iface.update_master_key(args.seq_number, args.key); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class remove_master_key extends org.apache.thrift.ProcessFunction { + public remove_master_key() { + super("remove_master_key"); + } + + public remove_master_key_args getEmptyArgsInstance() { + return new remove_master_key_args(); + } + + protected boolean isOneway() { + return false; + } + + public remove_master_key_result getResult(I iface, remove_master_key_args args) throws org.apache.thrift.TException { + remove_master_key_result result = new remove_master_key_result(); + result.success = iface.remove_master_key(args.key_seq); + result.setSuccessIsSet(true); + return result; + } + } + + public static class get_master_keys extends org.apache.thrift.ProcessFunction { + public get_master_keys() { + super("get_master_keys"); + } + + public get_master_keys_args getEmptyArgsInstance() { + return new get_master_keys_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_master_keys_result getResult(I iface, get_master_keys_args args) throws org.apache.thrift.TException { + get_master_keys_result result = new get_master_keys_result(); + result.success = iface.get_master_keys(); + return result; + } + } + + public static class get_open_txns extends org.apache.thrift.ProcessFunction { + public get_open_txns() { + super("get_open_txns"); + } + + public get_open_txns_args getEmptyArgsInstance() { + return new get_open_txns_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_open_txns_result getResult(I iface, get_open_txns_args args) throws org.apache.thrift.TException { + get_open_txns_result result = new get_open_txns_result(); + result.success = iface.get_open_txns(); + return result; + } + } + + public static class get_open_txns_info extends org.apache.thrift.ProcessFunction { + public get_open_txns_info() { + super("get_open_txns_info"); + } + + public get_open_txns_info_args getEmptyArgsInstance() { + return new get_open_txns_info_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_open_txns_info_result getResult(I iface, get_open_txns_info_args args) throws org.apache.thrift.TException { + get_open_txns_info_result result = new get_open_txns_info_result(); + result.success = iface.get_open_txns_info(); + return result; + } + } + + public static class open_txns extends org.apache.thrift.ProcessFunction { + public open_txns() { + super("open_txns"); + } + + public open_txns_args getEmptyArgsInstance() { + return new open_txns_args(); + } + + protected boolean isOneway() { + return false; + } + + public open_txns_result getResult(I iface, open_txns_args args) throws org.apache.thrift.TException { + open_txns_result result = new open_txns_result(); + result.success = iface.open_txns(args.rqst); + return result; + } + } + + public static class abort_txn extends org.apache.thrift.ProcessFunction { + public abort_txn() { + super("abort_txn"); + } + + public abort_txn_args getEmptyArgsInstance() { + return new abort_txn_args(); + } + + protected boolean isOneway() { + return false; + } + + public abort_txn_result getResult(I iface, abort_txn_args args) throws org.apache.thrift.TException { + abort_txn_result result = new abort_txn_result(); + try { + iface.abort_txn(args.rqst); + } catch (NoSuchTxnException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class abort_txns extends org.apache.thrift.ProcessFunction { + public abort_txns() { + super("abort_txns"); + } + + public abort_txns_args getEmptyArgsInstance() { + return new abort_txns_args(); + } + + protected boolean isOneway() { + return false; + } + + public abort_txns_result getResult(I iface, abort_txns_args args) throws org.apache.thrift.TException { + abort_txns_result result = new abort_txns_result(); + try { + iface.abort_txns(args.rqst); + } catch (NoSuchTxnException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class commit_txn extends org.apache.thrift.ProcessFunction { + public commit_txn() { + super("commit_txn"); + } + + public commit_txn_args getEmptyArgsInstance() { + return new commit_txn_args(); + } + + protected boolean isOneway() { + return false; + } + + public commit_txn_result getResult(I iface, commit_txn_args args) throws org.apache.thrift.TException { + commit_txn_result result = new commit_txn_result(); + try { + iface.commit_txn(args.rqst); + } catch (NoSuchTxnException o1) { + result.o1 = o1; + } catch (TxnAbortedException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class lock extends org.apache.thrift.ProcessFunction { + public lock() { + super("lock"); + } + + public lock_args getEmptyArgsInstance() { + return new lock_args(); + } + + protected boolean isOneway() { + return false; + } + + public lock_result getResult(I iface, lock_args args) throws org.apache.thrift.TException { + lock_result result = new lock_result(); + try { + result.success = iface.lock(args.rqst); + } catch (NoSuchTxnException o1) { + result.o1 = o1; + } catch (TxnAbortedException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class check_lock extends org.apache.thrift.ProcessFunction { + public check_lock() { + super("check_lock"); + } + + public check_lock_args getEmptyArgsInstance() { + return new check_lock_args(); + } + + protected boolean isOneway() { + return false; + } + + public check_lock_result getResult(I iface, check_lock_args args) throws org.apache.thrift.TException { + check_lock_result result = new check_lock_result(); + try { + result.success = iface.check_lock(args.rqst); + } catch (NoSuchTxnException o1) { + result.o1 = o1; + } catch (TxnAbortedException o2) { + result.o2 = o2; + } catch (NoSuchLockException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class unlock extends org.apache.thrift.ProcessFunction { + public unlock() { + super("unlock"); + } + + public unlock_args getEmptyArgsInstance() { + return new unlock_args(); + } + + protected boolean isOneway() { + return false; + } + + public unlock_result getResult(I iface, unlock_args args) throws org.apache.thrift.TException { + unlock_result result = new unlock_result(); + try { + iface.unlock(args.rqst); + } catch (NoSuchLockException o1) { + result.o1 = o1; + } catch (TxnOpenException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class show_locks extends org.apache.thrift.ProcessFunction { + public show_locks() { + super("show_locks"); + } + + public show_locks_args getEmptyArgsInstance() { + return new show_locks_args(); + } + + protected boolean isOneway() { + return false; + } + + public show_locks_result getResult(I iface, show_locks_args args) throws org.apache.thrift.TException { + show_locks_result result = new show_locks_result(); + result.success = iface.show_locks(args.rqst); + return result; + } + } + + public static class heartbeat extends org.apache.thrift.ProcessFunction { + public heartbeat() { + super("heartbeat"); + } + + public heartbeat_args getEmptyArgsInstance() { + return new heartbeat_args(); + } + + protected boolean isOneway() { + return false; + } + + public heartbeat_result getResult(I iface, heartbeat_args args) throws org.apache.thrift.TException { + heartbeat_result result = new heartbeat_result(); + try { + iface.heartbeat(args.ids); + } catch (NoSuchLockException o1) { + result.o1 = o1; + } catch (NoSuchTxnException o2) { + result.o2 = o2; + } catch (TxnAbortedException o3) { + result.o3 = o3; + } + return result; + } + } + + public static class heartbeat_txn_range extends org.apache.thrift.ProcessFunction { + public heartbeat_txn_range() { + super("heartbeat_txn_range"); + } + + public heartbeat_txn_range_args getEmptyArgsInstance() { + return new heartbeat_txn_range_args(); + } + + protected boolean isOneway() { + return false; + } + + public heartbeat_txn_range_result getResult(I iface, heartbeat_txn_range_args args) throws org.apache.thrift.TException { + heartbeat_txn_range_result result = new heartbeat_txn_range_result(); + result.success = iface.heartbeat_txn_range(args.txns); + return result; + } + } + + public static class compact extends org.apache.thrift.ProcessFunction { + public compact() { + super("compact"); + } + + public compact_args getEmptyArgsInstance() { + return new compact_args(); + } + + protected boolean isOneway() { + return false; + } + + public compact_result getResult(I iface, compact_args args) throws org.apache.thrift.TException { + compact_result result = new compact_result(); + iface.compact(args.rqst); + return result; + } + } + + public static class compact2 extends org.apache.thrift.ProcessFunction { + public compact2() { + super("compact2"); + } + + public compact2_args getEmptyArgsInstance() { + return new compact2_args(); + } + + protected boolean isOneway() { + return false; + } + + public compact2_result getResult(I iface, compact2_args args) throws org.apache.thrift.TException { + compact2_result result = new compact2_result(); + result.success = iface.compact2(args.rqst); + return result; + } + } + + public static class show_compact extends org.apache.thrift.ProcessFunction { + public show_compact() { + super("show_compact"); + } + + public show_compact_args getEmptyArgsInstance() { + return new show_compact_args(); + } + + protected boolean isOneway() { + return false; + } + + public show_compact_result getResult(I iface, show_compact_args args) throws org.apache.thrift.TException { + show_compact_result result = new show_compact_result(); + result.success = iface.show_compact(args.rqst); + return result; + } + } + + public static class add_dynamic_partitions extends org.apache.thrift.ProcessFunction { + public add_dynamic_partitions() { + super("add_dynamic_partitions"); + } + + public add_dynamic_partitions_args getEmptyArgsInstance() { + return new add_dynamic_partitions_args(); + } + + protected boolean isOneway() { + return false; + } + + public add_dynamic_partitions_result getResult(I iface, add_dynamic_partitions_args args) throws org.apache.thrift.TException { + add_dynamic_partitions_result result = new add_dynamic_partitions_result(); + try { + iface.add_dynamic_partitions(args.rqst); + } catch (NoSuchTxnException o1) { + result.o1 = o1; + } catch (TxnAbortedException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_next_notification extends org.apache.thrift.ProcessFunction { + public get_next_notification() { + super("get_next_notification"); + } + + public get_next_notification_args getEmptyArgsInstance() { + return new get_next_notification_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_next_notification_result getResult(I iface, get_next_notification_args args) throws org.apache.thrift.TException { + get_next_notification_result result = new get_next_notification_result(); + result.success = iface.get_next_notification(args.rqst); + return result; + } + } + + public static class get_current_notificationEventId extends org.apache.thrift.ProcessFunction { + public get_current_notificationEventId() { + super("get_current_notificationEventId"); + } + + public get_current_notificationEventId_args getEmptyArgsInstance() { + return new get_current_notificationEventId_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_current_notificationEventId_result getResult(I iface, get_current_notificationEventId_args args) throws org.apache.thrift.TException { + get_current_notificationEventId_result result = new get_current_notificationEventId_result(); + result.success = iface.get_current_notificationEventId(); + return result; + } + } + + public static class fire_listener_event extends org.apache.thrift.ProcessFunction { + public fire_listener_event() { + super("fire_listener_event"); + } + + public fire_listener_event_args getEmptyArgsInstance() { + return new fire_listener_event_args(); + } + + protected boolean isOneway() { + return false; + } + + public fire_listener_event_result getResult(I iface, fire_listener_event_args args) throws org.apache.thrift.TException { + fire_listener_event_result result = new fire_listener_event_result(); + result.success = iface.fire_listener_event(args.rqst); + return result; + } + } + + public static class flushCache extends org.apache.thrift.ProcessFunction { + public flushCache() { + super("flushCache"); + } + + public flushCache_args getEmptyArgsInstance() { + return new flushCache_args(); + } + + protected boolean isOneway() { + return false; + } + + public flushCache_result getResult(I iface, flushCache_args args) throws org.apache.thrift.TException { + flushCache_result result = new flushCache_result(); + iface.flushCache(); + return result; + } + } + + public static class cm_recycle extends org.apache.thrift.ProcessFunction { + public cm_recycle() { + super("cm_recycle"); + } + + public cm_recycle_args getEmptyArgsInstance() { + return new cm_recycle_args(); + } + + protected boolean isOneway() { + return false; + } + + public cm_recycle_result getResult(I iface, cm_recycle_args args) throws org.apache.thrift.TException { + cm_recycle_result result = new cm_recycle_result(); + try { + result.success = iface.cm_recycle(args.request); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + public static class get_file_metadata_by_expr extends org.apache.thrift.ProcessFunction { + public get_file_metadata_by_expr() { + super("get_file_metadata_by_expr"); + } + + public get_file_metadata_by_expr_args getEmptyArgsInstance() { + return new get_file_metadata_by_expr_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_file_metadata_by_expr_result getResult(I iface, get_file_metadata_by_expr_args args) throws org.apache.thrift.TException { + get_file_metadata_by_expr_result result = new get_file_metadata_by_expr_result(); + result.success = iface.get_file_metadata_by_expr(args.req); + return result; + } + } + + public static class get_file_metadata extends org.apache.thrift.ProcessFunction { + public get_file_metadata() { + super("get_file_metadata"); + } + + public get_file_metadata_args getEmptyArgsInstance() { + return new get_file_metadata_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_file_metadata_result getResult(I iface, get_file_metadata_args args) throws org.apache.thrift.TException { + get_file_metadata_result result = new get_file_metadata_result(); + result.success = iface.get_file_metadata(args.req); + return result; + } + } + + public static class put_file_metadata extends org.apache.thrift.ProcessFunction { + public put_file_metadata() { + super("put_file_metadata"); + } + + public put_file_metadata_args getEmptyArgsInstance() { + return new put_file_metadata_args(); + } + + protected boolean isOneway() { + return false; + } + + public put_file_metadata_result getResult(I iface, put_file_metadata_args args) throws org.apache.thrift.TException { + put_file_metadata_result result = new put_file_metadata_result(); + result.success = iface.put_file_metadata(args.req); + return result; + } + } + + public static class clear_file_metadata extends org.apache.thrift.ProcessFunction { + public clear_file_metadata() { + super("clear_file_metadata"); + } + + public clear_file_metadata_args getEmptyArgsInstance() { + return new clear_file_metadata_args(); + } + + protected boolean isOneway() { + return false; + } + + public clear_file_metadata_result getResult(I iface, clear_file_metadata_args args) throws org.apache.thrift.TException { + clear_file_metadata_result result = new clear_file_metadata_result(); + result.success = iface.clear_file_metadata(args.req); + return result; + } + } + + public static class cache_file_metadata extends org.apache.thrift.ProcessFunction { + public cache_file_metadata() { + super("cache_file_metadata"); + } + + public cache_file_metadata_args getEmptyArgsInstance() { + return new cache_file_metadata_args(); + } + + protected boolean isOneway() { + return false; + } + + public cache_file_metadata_result getResult(I iface, cache_file_metadata_args args) throws org.apache.thrift.TException { + cache_file_metadata_result result = new cache_file_metadata_result(); + result.success = iface.cache_file_metadata(args.req); + return result; + } + } + + public static class get_metastore_db_uuid extends org.apache.thrift.ProcessFunction { + public get_metastore_db_uuid() { + super("get_metastore_db_uuid"); + } + + public get_metastore_db_uuid_args getEmptyArgsInstance() { + return new get_metastore_db_uuid_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_metastore_db_uuid_result getResult(I iface, get_metastore_db_uuid_args args) throws org.apache.thrift.TException { + get_metastore_db_uuid_result result = new get_metastore_db_uuid_result(); + try { + result.success = iface.get_metastore_db_uuid(); + } catch (MetaException o1) { + result.o1 = o1; + } + return result; + } + } + + } + + public static class AsyncProcessor extends com.facebook.fb303.FacebookService.AsyncProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); + public AsyncProcessor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected AsyncProcessor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("getMetaConf", new getMetaConf()); + processMap.put("setMetaConf", new setMetaConf()); + processMap.put("create_database", new create_database()); + processMap.put("get_database", new get_database()); + processMap.put("drop_database", new drop_database()); + processMap.put("get_databases", new get_databases()); + processMap.put("get_all_databases", new get_all_databases()); + processMap.put("alter_database", new alter_database()); + processMap.put("get_type", new get_type()); + processMap.put("create_type", new create_type()); + processMap.put("drop_type", new drop_type()); + processMap.put("get_type_all", new get_type_all()); + processMap.put("get_fields", new get_fields()); + processMap.put("get_fields_with_environment_context", new get_fields_with_environment_context()); + processMap.put("get_schema", new get_schema()); + processMap.put("get_schema_with_environment_context", new get_schema_with_environment_context()); + processMap.put("create_table", new create_table()); + processMap.put("create_table_with_environment_context", new create_table_with_environment_context()); + processMap.put("create_table_with_constraints", new create_table_with_constraints()); + processMap.put("drop_constraint", new drop_constraint()); + processMap.put("add_primary_key", new add_primary_key()); + processMap.put("add_foreign_key", new add_foreign_key()); + processMap.put("add_unique_constraint", new add_unique_constraint()); + processMap.put("add_not_null_constraint", new add_not_null_constraint()); + processMap.put("drop_table", new drop_table()); + processMap.put("drop_table_with_environment_context", new drop_table_with_environment_context()); + processMap.put("truncate_table", new truncate_table()); + processMap.put("get_tables", new get_tables()); + processMap.put("get_tables_by_type", new get_tables_by_type()); + processMap.put("get_table_meta", new get_table_meta()); + processMap.put("get_all_tables", new get_all_tables()); + processMap.put("get_table", new get_table()); + processMap.put("get_table_objects_by_name", new get_table_objects_by_name()); + processMap.put("get_table_req", new get_table_req()); + processMap.put("get_table_objects_by_name_req", new get_table_objects_by_name_req()); + processMap.put("get_table_names_by_filter", new get_table_names_by_filter()); + processMap.put("alter_table", new alter_table()); + processMap.put("alter_table_with_environment_context", new alter_table_with_environment_context()); + processMap.put("alter_table_with_cascade", new alter_table_with_cascade()); + processMap.put("add_partition", new add_partition()); + processMap.put("add_partition_with_environment_context", new add_partition_with_environment_context()); + processMap.put("add_partitions", new add_partitions()); + processMap.put("add_partitions_pspec", new add_partitions_pspec()); + processMap.put("append_partition", new append_partition()); + processMap.put("add_partitions_req", new add_partitions_req()); + processMap.put("append_partition_with_environment_context", new append_partition_with_environment_context()); + processMap.put("append_partition_by_name", new append_partition_by_name()); + processMap.put("append_partition_by_name_with_environment_context", new append_partition_by_name_with_environment_context()); + processMap.put("drop_partition", new drop_partition()); + processMap.put("drop_partition_with_environment_context", new drop_partition_with_environment_context()); + processMap.put("drop_partition_by_name", new drop_partition_by_name()); + processMap.put("drop_partition_by_name_with_environment_context", new drop_partition_by_name_with_environment_context()); + processMap.put("drop_partitions_req", new drop_partitions_req()); + processMap.put("get_partition", new get_partition()); + processMap.put("exchange_partition", new exchange_partition()); + processMap.put("exchange_partitions", new exchange_partitions()); + processMap.put("get_partition_with_auth", new get_partition_with_auth()); + processMap.put("get_partition_by_name", new get_partition_by_name()); + processMap.put("get_partitions", new get_partitions()); + processMap.put("get_partitions_with_auth", new get_partitions_with_auth()); + processMap.put("get_partitions_pspec", new get_partitions_pspec()); + processMap.put("get_partition_names", new get_partition_names()); + processMap.put("get_partitions_ps", new get_partitions_ps()); + processMap.put("get_partitions_ps_with_auth", new get_partitions_ps_with_auth()); + processMap.put("get_partition_names_ps", new get_partition_names_ps()); + processMap.put("get_partitions_by_filter", new get_partitions_by_filter()); + processMap.put("get_part_specs_by_filter", new get_part_specs_by_filter()); + processMap.put("get_partitions_by_expr", new get_partitions_by_expr()); + processMap.put("get_num_partitions_by_filter", new get_num_partitions_by_filter()); + processMap.put("get_partitions_by_names", new get_partitions_by_names()); + processMap.put("alter_partition", new alter_partition()); + processMap.put("alter_partitions", new alter_partitions()); + processMap.put("alter_partitions_with_environment_context", new alter_partitions_with_environment_context()); + processMap.put("alter_partition_with_environment_context", new alter_partition_with_environment_context()); + processMap.put("rename_partition", new rename_partition()); + processMap.put("partition_name_has_valid_characters", new partition_name_has_valid_characters()); + processMap.put("get_config_value", new get_config_value()); + processMap.put("partition_name_to_vals", new partition_name_to_vals()); + processMap.put("partition_name_to_spec", new partition_name_to_spec()); + processMap.put("markPartitionForEvent", new markPartitionForEvent()); + processMap.put("isPartitionMarkedForEvent", new isPartitionMarkedForEvent()); + processMap.put("add_index", new add_index()); + processMap.put("alter_index", new alter_index()); + processMap.put("drop_index_by_name", new drop_index_by_name()); + processMap.put("get_index_by_name", new get_index_by_name()); + processMap.put("get_indexes", new get_indexes()); + processMap.put("get_index_names", new get_index_names()); + processMap.put("get_primary_keys", new get_primary_keys()); + processMap.put("get_foreign_keys", new get_foreign_keys()); + processMap.put("get_unique_constraints", new get_unique_constraints()); + processMap.put("get_not_null_constraints", new get_not_null_constraints()); + processMap.put("update_table_column_statistics", new update_table_column_statistics()); + processMap.put("update_partition_column_statistics", new update_partition_column_statistics()); + processMap.put("get_table_column_statistics", new get_table_column_statistics()); + processMap.put("get_partition_column_statistics", new get_partition_column_statistics()); + processMap.put("get_table_statistics_req", new get_table_statistics_req()); + processMap.put("get_partitions_statistics_req", new get_partitions_statistics_req()); + processMap.put("get_aggr_stats_for", new get_aggr_stats_for()); + processMap.put("set_aggr_stats_for", new set_aggr_stats_for()); + processMap.put("delete_partition_column_statistics", new delete_partition_column_statistics()); + processMap.put("delete_table_column_statistics", new delete_table_column_statistics()); + processMap.put("create_function", new create_function()); + processMap.put("drop_function", new drop_function()); + processMap.put("alter_function", new alter_function()); + processMap.put("get_functions", new get_functions()); + processMap.put("get_function", new get_function()); + processMap.put("get_all_functions", new get_all_functions()); + processMap.put("create_role", new create_role()); + processMap.put("drop_role", new drop_role()); + processMap.put("get_role_names", new get_role_names()); + processMap.put("grant_role", new grant_role()); + processMap.put("revoke_role", new revoke_role()); + processMap.put("list_roles", new list_roles()); + processMap.put("grant_revoke_role", new grant_revoke_role()); + processMap.put("get_principals_in_role", new get_principals_in_role()); + processMap.put("get_role_grants_for_principal", new get_role_grants_for_principal()); + processMap.put("get_privilege_set", new get_privilege_set()); + processMap.put("list_privileges", new list_privileges()); + processMap.put("grant_privileges", new grant_privileges()); + processMap.put("revoke_privileges", new revoke_privileges()); + processMap.put("grant_revoke_privileges", new grant_revoke_privileges()); + processMap.put("set_ugi", new set_ugi()); + processMap.put("get_delegation_token", new get_delegation_token()); + processMap.put("renew_delegation_token", new renew_delegation_token()); + processMap.put("cancel_delegation_token", new cancel_delegation_token()); + processMap.put("add_token", new add_token()); + processMap.put("remove_token", new remove_token()); + processMap.put("get_token", new get_token()); + processMap.put("get_all_token_identifiers", new get_all_token_identifiers()); + processMap.put("add_master_key", new add_master_key()); + processMap.put("update_master_key", new update_master_key()); + processMap.put("remove_master_key", new remove_master_key()); + processMap.put("get_master_keys", new get_master_keys()); + processMap.put("get_open_txns", new get_open_txns()); + processMap.put("get_open_txns_info", new get_open_txns_info()); + processMap.put("open_txns", new open_txns()); + processMap.put("abort_txn", new abort_txn()); + processMap.put("abort_txns", new abort_txns()); + processMap.put("commit_txn", new commit_txn()); + processMap.put("lock", new lock()); + processMap.put("check_lock", new check_lock()); + processMap.put("unlock", new unlock()); + processMap.put("show_locks", new show_locks()); + processMap.put("heartbeat", new heartbeat()); + processMap.put("heartbeat_txn_range", new heartbeat_txn_range()); + processMap.put("compact", new compact()); + processMap.put("compact2", new compact2()); + processMap.put("show_compact", new show_compact()); + processMap.put("add_dynamic_partitions", new add_dynamic_partitions()); + processMap.put("get_next_notification", new get_next_notification()); + processMap.put("get_current_notificationEventId", new get_current_notificationEventId()); + processMap.put("fire_listener_event", new fire_listener_event()); + processMap.put("flushCache", new flushCache()); + processMap.put("cm_recycle", new cm_recycle()); + processMap.put("get_file_metadata_by_expr", new get_file_metadata_by_expr()); + processMap.put("get_file_metadata", new get_file_metadata()); + processMap.put("put_file_metadata", new put_file_metadata()); + processMap.put("clear_file_metadata", new clear_file_metadata()); + processMap.put("cache_file_metadata", new cache_file_metadata()); + processMap.put("get_metastore_db_uuid", new get_metastore_db_uuid()); + return processMap; + } + + public static class getMetaConf extends org.apache.thrift.AsyncProcessFunction { + public getMetaConf() { + super("getMetaConf"); + } + + public getMetaConf_args getEmptyArgsInstance() { + return new getMetaConf_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(String o) { + getMetaConf_result result = new getMetaConf_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getMetaConf_result result = new getMetaConf_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getMetaConf_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getMetaConf(args.key,resultHandler); + } + } + + public static class setMetaConf extends org.apache.thrift.AsyncProcessFunction { + public setMetaConf() { + super("setMetaConf"); + } + + public setMetaConf_args getEmptyArgsInstance() { + return new setMetaConf_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + setMetaConf_result result = new setMetaConf_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + setMetaConf_result result = new setMetaConf_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, setMetaConf_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.setMetaConf(args.key, args.value,resultHandler); + } + } + + public static class create_database extends org.apache.thrift.AsyncProcessFunction { + public create_database() { + super("create_database"); + } + + public create_database_args getEmptyArgsInstance() { + return new create_database_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + create_database_result result = new create_database_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + create_database_result result = new create_database_result(); + if (e instanceof AlreadyExistsException) { + result.o1 = (AlreadyExistsException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o2 = (InvalidObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, create_database_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.create_database(args.database,resultHandler); + } + } + + public static class get_database extends org.apache.thrift.AsyncProcessFunction { + public get_database() { + super("get_database"); + } + + public get_database_args getEmptyArgsInstance() { + return new get_database_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Database o) { + get_database_result result = new get_database_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_database_result result = new get_database_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_database_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_database(args.name,resultHandler); + } + } + + public static class drop_database extends org.apache.thrift.AsyncProcessFunction { + public drop_database() { + super("drop_database"); + } + + public drop_database_args getEmptyArgsInstance() { + return new drop_database_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + drop_database_result result = new drop_database_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_database_result result = new drop_database_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidOperationException) { + result.o2 = (InvalidOperationException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_database_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_database(args.name, args.deleteData, args.cascade,resultHandler); + } + } + + public static class get_databases extends org.apache.thrift.AsyncProcessFunction> { + public get_databases() { + super("get_databases"); + } + + public get_databases_args getEmptyArgsInstance() { + return new get_databases_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_databases_result result = new get_databases_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_databases_result result = new get_databases_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_databases_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_databases(args.pattern,resultHandler); + } + } + + public static class get_all_databases extends org.apache.thrift.AsyncProcessFunction> { + public get_all_databases() { + super("get_all_databases"); + } + + public get_all_databases_args getEmptyArgsInstance() { + return new get_all_databases_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_all_databases_result result = new get_all_databases_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_all_databases_result result = new get_all_databases_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_all_databases_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_all_databases(resultHandler); + } + } + + public static class alter_database extends org.apache.thrift.AsyncProcessFunction { + public alter_database() { + super("alter_database"); + } + + public alter_database_args getEmptyArgsInstance() { + return new alter_database_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + alter_database_result result = new alter_database_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + alter_database_result result = new alter_database_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, alter_database_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.alter_database(args.dbname, args.db,resultHandler); + } + } + + public static class get_type extends org.apache.thrift.AsyncProcessFunction { + public get_type() { + super("get_type"); + } + + public get_type_args getEmptyArgsInstance() { + return new get_type_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Type o) { + get_type_result result = new get_type_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_type_result result = new get_type_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_type_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_type(args.name,resultHandler); + } + } + + public static class create_type extends org.apache.thrift.AsyncProcessFunction { + public create_type() { + super("create_type"); + } + + public create_type_args getEmptyArgsInstance() { + return new create_type_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + create_type_result result = new create_type_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + create_type_result result = new create_type_result(); + if (e instanceof AlreadyExistsException) { + result.o1 = (AlreadyExistsException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o2 = (InvalidObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, create_type_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.create_type(args.type,resultHandler); + } + } + + public static class drop_type extends org.apache.thrift.AsyncProcessFunction { + public drop_type() { + super("drop_type"); + } + + public drop_type_args getEmptyArgsInstance() { + return new drop_type_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + drop_type_result result = new drop_type_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_type_result result = new drop_type_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_type_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_type(args.type,resultHandler); + } + } + + public static class get_type_all extends org.apache.thrift.AsyncProcessFunction> { + public get_type_all() { + super("get_type_all"); + } + + public get_type_all_args getEmptyArgsInstance() { + return new get_type_all_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(Map o) { + get_type_all_result result = new get_type_all_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_type_all_result result = new get_type_all_result(); + if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_type_all_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_type_all(args.name,resultHandler); + } + } + + public static class get_fields extends org.apache.thrift.AsyncProcessFunction> { + public get_fields() { + super("get_fields"); + } + + public get_fields_args getEmptyArgsInstance() { + return new get_fields_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_fields_result result = new get_fields_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_fields_result result = new get_fields_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof UnknownTableException) { + result.o2 = (UnknownTableException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof UnknownDBException) { + result.o3 = (UnknownDBException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_fields_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_fields(args.db_name, args.table_name,resultHandler); + } + } + + public static class get_fields_with_environment_context extends org.apache.thrift.AsyncProcessFunction> { + public get_fields_with_environment_context() { + super("get_fields_with_environment_context"); + } + + public get_fields_with_environment_context_args getEmptyArgsInstance() { + return new get_fields_with_environment_context_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_fields_with_environment_context_result result = new get_fields_with_environment_context_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_fields_with_environment_context_result result = new get_fields_with_environment_context_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof UnknownTableException) { + result.o2 = (UnknownTableException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof UnknownDBException) { + result.o3 = (UnknownDBException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_fields_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_fields_with_environment_context(args.db_name, args.table_name, args.environment_context,resultHandler); + } + } + + public static class get_schema extends org.apache.thrift.AsyncProcessFunction> { + public get_schema() { + super("get_schema"); + } + + public get_schema_args getEmptyArgsInstance() { + return new get_schema_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_schema_result result = new get_schema_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_schema_result result = new get_schema_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof UnknownTableException) { + result.o2 = (UnknownTableException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof UnknownDBException) { + result.o3 = (UnknownDBException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_schema_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_schema(args.db_name, args.table_name,resultHandler); + } + } + + public static class get_schema_with_environment_context extends org.apache.thrift.AsyncProcessFunction> { + public get_schema_with_environment_context() { + super("get_schema_with_environment_context"); + } + + public get_schema_with_environment_context_args getEmptyArgsInstance() { + return new get_schema_with_environment_context_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_schema_with_environment_context_result result = new get_schema_with_environment_context_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_schema_with_environment_context_result result = new get_schema_with_environment_context_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof UnknownTableException) { + result.o2 = (UnknownTableException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof UnknownDBException) { + result.o3 = (UnknownDBException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_schema_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_schema_with_environment_context(args.db_name, args.table_name, args.environment_context,resultHandler); + } + } + + public static class create_table extends org.apache.thrift.AsyncProcessFunction { + public create_table() { + super("create_table"); + } + + public create_table_args getEmptyArgsInstance() { + return new create_table_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + create_table_result result = new create_table_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + create_table_result result = new create_table_result(); + if (e instanceof AlreadyExistsException) { + result.o1 = (AlreadyExistsException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o2 = (InvalidObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o4 = (NoSuchObjectException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, create_table_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.create_table(args.tbl,resultHandler); + } + } + + public static class create_table_with_environment_context extends org.apache.thrift.AsyncProcessFunction { + public create_table_with_environment_context() { + super("create_table_with_environment_context"); + } + + public create_table_with_environment_context_args getEmptyArgsInstance() { + return new create_table_with_environment_context_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + create_table_with_environment_context_result result = new create_table_with_environment_context_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + create_table_with_environment_context_result result = new create_table_with_environment_context_result(); + if (e instanceof AlreadyExistsException) { + result.o1 = (AlreadyExistsException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o2 = (InvalidObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o4 = (NoSuchObjectException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, create_table_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.create_table_with_environment_context(args.tbl, args.environment_context,resultHandler); + } + } + + public static class create_table_with_constraints extends org.apache.thrift.AsyncProcessFunction { + public create_table_with_constraints() { + super("create_table_with_constraints"); + } + + public create_table_with_constraints_args getEmptyArgsInstance() { + return new create_table_with_constraints_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + create_table_with_constraints_result result = new create_table_with_constraints_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + create_table_with_constraints_result result = new create_table_with_constraints_result(); + if (e instanceof AlreadyExistsException) { + result.o1 = (AlreadyExistsException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o2 = (InvalidObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o4 = (NoSuchObjectException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, create_table_with_constraints_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys, args.uniqueConstraints, args.notNullConstraints,resultHandler); + } + } + + public static class drop_constraint extends org.apache.thrift.AsyncProcessFunction { + public drop_constraint() { + super("drop_constraint"); + } + + public drop_constraint_args getEmptyArgsInstance() { + return new drop_constraint_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + drop_constraint_result result = new drop_constraint_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_constraint_result result = new drop_constraint_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_constraint_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_constraint(args.req,resultHandler); + } + } + + public static class add_primary_key extends org.apache.thrift.AsyncProcessFunction { + public add_primary_key() { + super("add_primary_key"); + } + + public add_primary_key_args getEmptyArgsInstance() { + return new add_primary_key_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + add_primary_key_result result = new add_primary_key_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_primary_key_result result = new add_primary_key_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_primary_key_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_primary_key(args.req,resultHandler); + } + } + + public static class add_foreign_key extends org.apache.thrift.AsyncProcessFunction { + public add_foreign_key() { + super("add_foreign_key"); + } + + public add_foreign_key_args getEmptyArgsInstance() { + return new add_foreign_key_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + add_foreign_key_result result = new add_foreign_key_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_foreign_key_result result = new add_foreign_key_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_foreign_key_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_foreign_key(args.req,resultHandler); + } + } + + public static class add_unique_constraint extends org.apache.thrift.AsyncProcessFunction { + public add_unique_constraint() { + super("add_unique_constraint"); + } + + public add_unique_constraint_args getEmptyArgsInstance() { + return new add_unique_constraint_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + add_unique_constraint_result result = new add_unique_constraint_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_unique_constraint_result result = new add_unique_constraint_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_unique_constraint_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_unique_constraint(args.req,resultHandler); + } + } + + public static class add_not_null_constraint extends org.apache.thrift.AsyncProcessFunction { + public add_not_null_constraint() { + super("add_not_null_constraint"); + } + + public add_not_null_constraint_args getEmptyArgsInstance() { + return new add_not_null_constraint_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + add_not_null_constraint_result result = new add_not_null_constraint_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_not_null_constraint_result result = new add_not_null_constraint_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_not_null_constraint_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_not_null_constraint(args.req,resultHandler); + } + } + + public static class drop_table extends org.apache.thrift.AsyncProcessFunction { + public drop_table() { + super("drop_table"); + } + + public drop_table_args getEmptyArgsInstance() { + return new drop_table_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + drop_table_result result = new drop_table_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_table_result result = new drop_table_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_table_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_table(args.dbname, args.name, args.deleteData,resultHandler); + } + } + + public static class drop_table_with_environment_context extends org.apache.thrift.AsyncProcessFunction { + public drop_table_with_environment_context() { + super("drop_table_with_environment_context"); + } + + public drop_table_with_environment_context_args getEmptyArgsInstance() { + return new drop_table_with_environment_context_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + drop_table_with_environment_context_result result = new drop_table_with_environment_context_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_table_with_environment_context_result result = new drop_table_with_environment_context_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_table_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context,resultHandler); + } + } + + public static class truncate_table extends org.apache.thrift.AsyncProcessFunction { + public truncate_table() { + super("truncate_table"); + } + + public truncate_table_args getEmptyArgsInstance() { + return new truncate_table_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + truncate_table_result result = new truncate_table_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + truncate_table_result result = new truncate_table_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, truncate_table_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.truncate_table(args.dbName, args.tableName, args.partNames,resultHandler); + } + } + + public static class get_tables extends org.apache.thrift.AsyncProcessFunction> { + public get_tables() { + super("get_tables"); + } + + public get_tables_args getEmptyArgsInstance() { + return new get_tables_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_tables_result result = new get_tables_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_tables_result result = new get_tables_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_tables_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_tables(args.db_name, args.pattern,resultHandler); + } + } + + public static class get_tables_by_type extends org.apache.thrift.AsyncProcessFunction> { + public get_tables_by_type() { + super("get_tables_by_type"); + } + + public get_tables_by_type_args getEmptyArgsInstance() { + return new get_tables_by_type_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_tables_by_type_result result = new get_tables_by_type_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_tables_by_type_result result = new get_tables_by_type_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_tables_by_type_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_tables_by_type(args.db_name, args.pattern, args.tableType,resultHandler); + } + } + + public static class get_table_meta extends org.apache.thrift.AsyncProcessFunction> { + public get_table_meta() { + super("get_table_meta"); + } + + public get_table_meta_args getEmptyArgsInstance() { + return new get_table_meta_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_table_meta_result result = new get_table_meta_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_table_meta_result result = new get_table_meta_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_table_meta_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_table_meta(args.db_patterns, args.tbl_patterns, args.tbl_types,resultHandler); + } + } + + public static class get_all_tables extends org.apache.thrift.AsyncProcessFunction> { + public get_all_tables() { + super("get_all_tables"); + } + + public get_all_tables_args getEmptyArgsInstance() { + return new get_all_tables_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_all_tables_result result = new get_all_tables_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_all_tables_result result = new get_all_tables_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_all_tables_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_all_tables(args.db_name,resultHandler); + } + } + + public static class get_table extends org.apache.thrift.AsyncProcessFunction { + public get_table() { + super("get_table"); + } + + public get_table_args getEmptyArgsInstance() { + return new get_table_args(); + } + + public AsyncMethodCallback
getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback
() { + public void onComplete(Table o) { + get_table_result result = new get_table_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_table_result result = new get_table_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_table_args args, org.apache.thrift.async.AsyncMethodCallback
resultHandler) throws TException { + iface.get_table(args.dbname, args.tbl_name,resultHandler); + } + } + + public static class get_table_objects_by_name extends org.apache.thrift.AsyncProcessFunction> { + public get_table_objects_by_name() { + super("get_table_objects_by_name"); + } + + public get_table_objects_by_name_args getEmptyArgsInstance() { + return new get_table_objects_by_name_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List
o) { + get_table_objects_by_name_result result = new get_table_objects_by_name_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_table_objects_by_name_result result = new get_table_objects_by_name_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_table_objects_by_name_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_table_objects_by_name(args.dbname, args.tbl_names,resultHandler); + } + } + + public static class get_table_req extends org.apache.thrift.AsyncProcessFunction { + public get_table_req() { + super("get_table_req"); + } + + public get_table_req_args getEmptyArgsInstance() { + return new get_table_req_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(GetTableResult o) { + get_table_req_result result = new get_table_req_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_table_req_result result = new get_table_req_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_table_req_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_table_req(args.req,resultHandler); + } + } + + public static class get_table_objects_by_name_req extends org.apache.thrift.AsyncProcessFunction { + public get_table_objects_by_name_req() { + super("get_table_objects_by_name_req"); + } + + public get_table_objects_by_name_req_args getEmptyArgsInstance() { + return new get_table_objects_by_name_req_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(GetTablesResult o) { + get_table_objects_by_name_req_result result = new get_table_objects_by_name_req_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_table_objects_by_name_req_result result = new get_table_objects_by_name_req_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidOperationException) { + result.o2 = (InvalidOperationException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof UnknownDBException) { + result.o3 = (UnknownDBException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_table_objects_by_name_req_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_table_objects_by_name_req(args.req,resultHandler); + } + } + + public static class get_table_names_by_filter extends org.apache.thrift.AsyncProcessFunction> { + public get_table_names_by_filter() { + super("get_table_names_by_filter"); + } + + public get_table_names_by_filter_args getEmptyArgsInstance() { + return new get_table_names_by_filter_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_table_names_by_filter_result result = new get_table_names_by_filter_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_table_names_by_filter_result result = new get_table_names_by_filter_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidOperationException) { + result.o2 = (InvalidOperationException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof UnknownDBException) { + result.o3 = (UnknownDBException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_table_names_by_filter_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_table_names_by_filter(args.dbname, args.filter, args.max_tables,resultHandler); + } + } + + public static class alter_table extends org.apache.thrift.AsyncProcessFunction { + public alter_table() { + super("alter_table"); + } + + public alter_table_args getEmptyArgsInstance() { + return new alter_table_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + alter_table_result result = new alter_table_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + alter_table_result result = new alter_table_result(); + if (e instanceof InvalidOperationException) { + result.o1 = (InvalidOperationException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, alter_table_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.alter_table(args.dbname, args.tbl_name, args.new_tbl,resultHandler); + } + } + + public static class alter_table_with_environment_context extends org.apache.thrift.AsyncProcessFunction { + public alter_table_with_environment_context() { + super("alter_table_with_environment_context"); + } + + public alter_table_with_environment_context_args getEmptyArgsInstance() { + return new alter_table_with_environment_context_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + alter_table_with_environment_context_result result = new alter_table_with_environment_context_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + alter_table_with_environment_context_result result = new alter_table_with_environment_context_result(); + if (e instanceof InvalidOperationException) { + result.o1 = (InvalidOperationException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, alter_table_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context,resultHandler); + } + } + + public static class alter_table_with_cascade extends org.apache.thrift.AsyncProcessFunction { + public alter_table_with_cascade() { + super("alter_table_with_cascade"); + } + + public alter_table_with_cascade_args getEmptyArgsInstance() { + return new alter_table_with_cascade_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + alter_table_with_cascade_result result = new alter_table_with_cascade_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + alter_table_with_cascade_result result = new alter_table_with_cascade_result(); + if (e instanceof InvalidOperationException) { + result.o1 = (InvalidOperationException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, alter_table_with_cascade_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade,resultHandler); + } + } + + public static class add_partition extends org.apache.thrift.AsyncProcessFunction { + public add_partition() { + super("add_partition"); + } + + public add_partition_args getEmptyArgsInstance() { + return new add_partition_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Partition o) { + add_partition_result result = new add_partition_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_partition_result result = new add_partition_result(); + if (e instanceof InvalidObjectException) { + result.o1 = (InvalidObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof AlreadyExistsException) { + result.o2 = (AlreadyExistsException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_partition(args.new_part,resultHandler); + } + } + + public static class add_partition_with_environment_context extends org.apache.thrift.AsyncProcessFunction { + public add_partition_with_environment_context() { + super("add_partition_with_environment_context"); + } + + public add_partition_with_environment_context_args getEmptyArgsInstance() { + return new add_partition_with_environment_context_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Partition o) { + add_partition_with_environment_context_result result = new add_partition_with_environment_context_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_partition_with_environment_context_result result = new add_partition_with_environment_context_result(); + if (e instanceof InvalidObjectException) { + result.o1 = (InvalidObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof AlreadyExistsException) { + result.o2 = (AlreadyExistsException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_partition_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_partition_with_environment_context(args.new_part, args.environment_context,resultHandler); + } + } + + public static class add_partitions extends org.apache.thrift.AsyncProcessFunction { + public add_partitions() { + super("add_partitions"); + } + + public add_partitions_args getEmptyArgsInstance() { + return new add_partitions_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Integer o) { + add_partitions_result result = new add_partitions_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_partitions_result result = new add_partitions_result(); + if (e instanceof InvalidObjectException) { + result.o1 = (InvalidObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof AlreadyExistsException) { + result.o2 = (AlreadyExistsException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_partitions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_partitions(args.new_parts,resultHandler); + } + } + + public static class add_partitions_pspec extends org.apache.thrift.AsyncProcessFunction { + public add_partitions_pspec() { + super("add_partitions_pspec"); + } + + public add_partitions_pspec_args getEmptyArgsInstance() { + return new add_partitions_pspec_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Integer o) { + add_partitions_pspec_result result = new add_partitions_pspec_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_partitions_pspec_result result = new add_partitions_pspec_result(); + if (e instanceof InvalidObjectException) { + result.o1 = (InvalidObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof AlreadyExistsException) { + result.o2 = (AlreadyExistsException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_partitions_pspec_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_partitions_pspec(args.new_parts,resultHandler); + } + } + + public static class append_partition extends org.apache.thrift.AsyncProcessFunction { + public append_partition() { + super("append_partition"); + } + + public append_partition_args getEmptyArgsInstance() { + return new append_partition_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Partition o) { + append_partition_result result = new append_partition_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + append_partition_result result = new append_partition_result(); + if (e instanceof InvalidObjectException) { + result.o1 = (InvalidObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof AlreadyExistsException) { + result.o2 = (AlreadyExistsException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, append_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.append_partition(args.db_name, args.tbl_name, args.part_vals,resultHandler); + } + } + + public static class add_partitions_req extends org.apache.thrift.AsyncProcessFunction { + public add_partitions_req() { + super("add_partitions_req"); + } + + public add_partitions_req_args getEmptyArgsInstance() { + return new add_partitions_req_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(AddPartitionsResult o) { + add_partitions_req_result result = new add_partitions_req_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_partitions_req_result result = new add_partitions_req_result(); + if (e instanceof InvalidObjectException) { + result.o1 = (InvalidObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof AlreadyExistsException) { + result.o2 = (AlreadyExistsException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_partitions_req_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_partitions_req(args.request,resultHandler); + } + } + + public static class append_partition_with_environment_context extends org.apache.thrift.AsyncProcessFunction { + public append_partition_with_environment_context() { + super("append_partition_with_environment_context"); + } + + public append_partition_with_environment_context_args getEmptyArgsInstance() { + return new append_partition_with_environment_context_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Partition o) { + append_partition_with_environment_context_result result = new append_partition_with_environment_context_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + append_partition_with_environment_context_result result = new append_partition_with_environment_context_result(); + if (e instanceof InvalidObjectException) { + result.o1 = (InvalidObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof AlreadyExistsException) { + result.o2 = (AlreadyExistsException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, append_partition_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.append_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.environment_context,resultHandler); + } + } + + public static class append_partition_by_name extends org.apache.thrift.AsyncProcessFunction { + public append_partition_by_name() { + super("append_partition_by_name"); + } + + public append_partition_by_name_args getEmptyArgsInstance() { + return new append_partition_by_name_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Partition o) { + append_partition_by_name_result result = new append_partition_by_name_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + append_partition_by_name_result result = new append_partition_by_name_result(); + if (e instanceof InvalidObjectException) { + result.o1 = (InvalidObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof AlreadyExistsException) { + result.o2 = (AlreadyExistsException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, append_partition_by_name_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.append_partition_by_name(args.db_name, args.tbl_name, args.part_name,resultHandler); + } + } + + public static class append_partition_by_name_with_environment_context extends org.apache.thrift.AsyncProcessFunction { + public append_partition_by_name_with_environment_context() { + super("append_partition_by_name_with_environment_context"); + } + + public append_partition_by_name_with_environment_context_args getEmptyArgsInstance() { + return new append_partition_by_name_with_environment_context_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Partition o) { + append_partition_by_name_with_environment_context_result result = new append_partition_by_name_with_environment_context_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + append_partition_by_name_with_environment_context_result result = new append_partition_by_name_with_environment_context_result(); + if (e instanceof InvalidObjectException) { + result.o1 = (InvalidObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof AlreadyExistsException) { + result.o2 = (AlreadyExistsException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, append_partition_by_name_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.append_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.environment_context,resultHandler); + } + } + + public static class drop_partition extends org.apache.thrift.AsyncProcessFunction { + public drop_partition() { + super("drop_partition"); + } + + public drop_partition_args getEmptyArgsInstance() { + return new drop_partition_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + drop_partition_result result = new drop_partition_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_partition_result result = new drop_partition_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData,resultHandler); + } + } + + public static class drop_partition_with_environment_context extends org.apache.thrift.AsyncProcessFunction { + public drop_partition_with_environment_context() { + super("drop_partition_with_environment_context"); + } + + public drop_partition_with_environment_context_args getEmptyArgsInstance() { + return new drop_partition_with_environment_context_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + drop_partition_with_environment_context_result result = new drop_partition_with_environment_context_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_partition_with_environment_context_result result = new drop_partition_with_environment_context_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_partition_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context,resultHandler); + } + } + + public static class drop_partition_by_name extends org.apache.thrift.AsyncProcessFunction { + public drop_partition_by_name() { + super("drop_partition_by_name"); + } + + public drop_partition_by_name_args getEmptyArgsInstance() { + return new drop_partition_by_name_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + drop_partition_by_name_result result = new drop_partition_by_name_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_partition_by_name_result result = new drop_partition_by_name_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_partition_by_name_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData,resultHandler); + } + } + + public static class drop_partition_by_name_with_environment_context extends org.apache.thrift.AsyncProcessFunction { + public drop_partition_by_name_with_environment_context() { + super("drop_partition_by_name_with_environment_context"); + } + + public drop_partition_by_name_with_environment_context_args getEmptyArgsInstance() { + return new drop_partition_by_name_with_environment_context_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + drop_partition_by_name_with_environment_context_result result = new drop_partition_by_name_with_environment_context_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_partition_by_name_with_environment_context_result result = new drop_partition_by_name_with_environment_context_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_partition_by_name_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context,resultHandler); + } + } + + public static class drop_partitions_req extends org.apache.thrift.AsyncProcessFunction { + public drop_partitions_req() { + super("drop_partitions_req"); + } + + public drop_partitions_req_args getEmptyArgsInstance() { + return new drop_partitions_req_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(DropPartitionsResult o) { + drop_partitions_req_result result = new drop_partitions_req_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_partitions_req_result result = new drop_partitions_req_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_partitions_req_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_partitions_req(args.req,resultHandler); + } + } + + public static class get_partition extends org.apache.thrift.AsyncProcessFunction { + public get_partition() { + super("get_partition"); + } + + public get_partition_args getEmptyArgsInstance() { + return new get_partition_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Partition o) { + get_partition_result result = new get_partition_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partition_result result = new get_partition_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_partition(args.db_name, args.tbl_name, args.part_vals,resultHandler); + } + } + + public static class exchange_partition extends org.apache.thrift.AsyncProcessFunction { + public exchange_partition() { + super("exchange_partition"); + } + + public exchange_partition_args getEmptyArgsInstance() { + return new exchange_partition_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Partition o) { + exchange_partition_result result = new exchange_partition_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + exchange_partition_result result = new exchange_partition_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o3 = (InvalidObjectException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof InvalidInputException) { + result.o4 = (InvalidInputException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, exchange_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.exchange_partition(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name,resultHandler); + } + } + + public static class exchange_partitions extends org.apache.thrift.AsyncProcessFunction> { + public exchange_partitions() { + super("exchange_partitions"); + } + + public exchange_partitions_args getEmptyArgsInstance() { + return new exchange_partitions_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + exchange_partitions_result result = new exchange_partitions_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + exchange_partitions_result result = new exchange_partitions_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o3 = (InvalidObjectException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof InvalidInputException) { + result.o4 = (InvalidInputException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, exchange_partitions_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.exchange_partitions(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name,resultHandler); + } + } + + public static class get_partition_with_auth extends org.apache.thrift.AsyncProcessFunction { + public get_partition_with_auth() { + super("get_partition_with_auth"); + } + + public get_partition_with_auth_args getEmptyArgsInstance() { + return new get_partition_with_auth_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Partition o) { + get_partition_with_auth_result result = new get_partition_with_auth_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partition_with_auth_result result = new get_partition_with_auth_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partition_with_auth_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names,resultHandler); + } + } + + public static class get_partition_by_name extends org.apache.thrift.AsyncProcessFunction { + public get_partition_by_name() { + super("get_partition_by_name"); + } + + public get_partition_by_name_args getEmptyArgsInstance() { + return new get_partition_by_name_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Partition o) { + get_partition_by_name_result result = new get_partition_by_name_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partition_by_name_result result = new get_partition_by_name_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partition_by_name_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_partition_by_name(args.db_name, args.tbl_name, args.part_name,resultHandler); + } + } + + public static class get_partitions extends org.apache.thrift.AsyncProcessFunction> { + public get_partitions() { + super("get_partitions"); + } + + public get_partitions_args getEmptyArgsInstance() { + return new get_partitions_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_partitions_result result = new get_partitions_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partitions_result result = new get_partitions_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partitions_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_partitions(args.db_name, args.tbl_name, args.max_parts,resultHandler); + } + } + + public static class get_partitions_with_auth extends org.apache.thrift.AsyncProcessFunction> { + public get_partitions_with_auth() { + super("get_partitions_with_auth"); + } + + public get_partitions_with_auth_args getEmptyArgsInstance() { + return new get_partitions_with_auth_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_partitions_with_auth_result result = new get_partitions_with_auth_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partitions_with_auth_result result = new get_partitions_with_auth_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partitions_with_auth_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names,resultHandler); + } + } + + public static class get_partitions_pspec extends org.apache.thrift.AsyncProcessFunction> { + public get_partitions_pspec() { + super("get_partitions_pspec"); + } + + public get_partitions_pspec_args getEmptyArgsInstance() { + return new get_partitions_pspec_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_partitions_pspec_result result = new get_partitions_pspec_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partitions_pspec_result result = new get_partitions_pspec_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partitions_pspec_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_partitions_pspec(args.db_name, args.tbl_name, args.max_parts,resultHandler); + } + } + + public static class get_partition_names extends org.apache.thrift.AsyncProcessFunction> { + public get_partition_names() { + super("get_partition_names"); + } + + public get_partition_names_args getEmptyArgsInstance() { + return new get_partition_names_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_partition_names_result result = new get_partition_names_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partition_names_result result = new get_partition_names_result(); + if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partition_names_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_partition_names(args.db_name, args.tbl_name, args.max_parts,resultHandler); + } + } + + public static class get_partitions_ps extends org.apache.thrift.AsyncProcessFunction> { + public get_partitions_ps() { + super("get_partitions_ps"); + } + + public get_partitions_ps_args getEmptyArgsInstance() { + return new get_partitions_ps_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_partitions_ps_result result = new get_partitions_ps_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partitions_ps_result result = new get_partitions_ps_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partitions_ps_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts,resultHandler); + } + } + + public static class get_partitions_ps_with_auth extends org.apache.thrift.AsyncProcessFunction> { + public get_partitions_ps_with_auth() { + super("get_partitions_ps_with_auth"); + } + + public get_partitions_ps_with_auth_args getEmptyArgsInstance() { + return new get_partitions_ps_with_auth_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partitions_ps_with_auth_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names,resultHandler); + } + } + + public static class get_partition_names_ps extends org.apache.thrift.AsyncProcessFunction> { + public get_partition_names_ps() { + super("get_partition_names_ps"); + } + + public get_partition_names_ps_args getEmptyArgsInstance() { + return new get_partition_names_ps_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_partition_names_ps_result result = new get_partition_names_ps_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partition_names_ps_result result = new get_partition_names_ps_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partition_names_ps_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts,resultHandler); + } + } + + public static class get_partitions_by_filter extends org.apache.thrift.AsyncProcessFunction> { + public get_partitions_by_filter() { + super("get_partitions_by_filter"); + } + + public get_partitions_by_filter_args getEmptyArgsInstance() { + return new get_partitions_by_filter_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_partitions_by_filter_result result = new get_partitions_by_filter_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partitions_by_filter_result result = new get_partitions_by_filter_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partitions_by_filter_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts,resultHandler); + } + } + + public static class get_part_specs_by_filter extends org.apache.thrift.AsyncProcessFunction> { + public get_part_specs_by_filter() { + super("get_part_specs_by_filter"); + } + + public get_part_specs_by_filter_args getEmptyArgsInstance() { + return new get_part_specs_by_filter_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_part_specs_by_filter_result result = new get_part_specs_by_filter_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_part_specs_by_filter_result result = new get_part_specs_by_filter_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_part_specs_by_filter_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_part_specs_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts,resultHandler); + } + } + + public static class get_partitions_by_expr extends org.apache.thrift.AsyncProcessFunction { + public get_partitions_by_expr() { + super("get_partitions_by_expr"); + } + + public get_partitions_by_expr_args getEmptyArgsInstance() { + return new get_partitions_by_expr_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(PartitionsByExprResult o) { + get_partitions_by_expr_result result = new get_partitions_by_expr_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partitions_by_expr_result result = new get_partitions_by_expr_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partitions_by_expr_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_partitions_by_expr(args.req,resultHandler); + } + } + + public static class get_num_partitions_by_filter extends org.apache.thrift.AsyncProcessFunction { + public get_num_partitions_by_filter() { + super("get_num_partitions_by_filter"); + } + + public get_num_partitions_by_filter_args getEmptyArgsInstance() { + return new get_num_partitions_by_filter_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Integer o) { + get_num_partitions_by_filter_result result = new get_num_partitions_by_filter_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_num_partitions_by_filter_result result = new get_num_partitions_by_filter_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_num_partitions_by_filter_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter,resultHandler); + } + } + + public static class get_partitions_by_names extends org.apache.thrift.AsyncProcessFunction> { + public get_partitions_by_names() { + super("get_partitions_by_names"); + } + + public get_partitions_by_names_args getEmptyArgsInstance() { + return new get_partitions_by_names_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_partitions_by_names_result result = new get_partitions_by_names_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partitions_by_names_result result = new get_partitions_by_names_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partitions_by_names_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_partitions_by_names(args.db_name, args.tbl_name, args.names,resultHandler); + } + } + + public static class alter_partition extends org.apache.thrift.AsyncProcessFunction { + public alter_partition() { + super("alter_partition"); + } + + public alter_partition_args getEmptyArgsInstance() { + return new alter_partition_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + alter_partition_result result = new alter_partition_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + alter_partition_result result = new alter_partition_result(); + if (e instanceof InvalidOperationException) { + result.o1 = (InvalidOperationException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, alter_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.alter_partition(args.db_name, args.tbl_name, args.new_part,resultHandler); + } + } + + public static class alter_partitions extends org.apache.thrift.AsyncProcessFunction { + public alter_partitions() { + super("alter_partitions"); + } + + public alter_partitions_args getEmptyArgsInstance() { + return new alter_partitions_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + alter_partitions_result result = new alter_partitions_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + alter_partitions_result result = new alter_partitions_result(); + if (e instanceof InvalidOperationException) { + result.o1 = (InvalidOperationException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, alter_partitions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.alter_partitions(args.db_name, args.tbl_name, args.new_parts,resultHandler); + } + } + + public static class alter_partitions_with_environment_context extends org.apache.thrift.AsyncProcessFunction { + public alter_partitions_with_environment_context() { + super("alter_partitions_with_environment_context"); + } + + public alter_partitions_with_environment_context_args getEmptyArgsInstance() { + return new alter_partitions_with_environment_context_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + alter_partitions_with_environment_context_result result = new alter_partitions_with_environment_context_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + alter_partitions_with_environment_context_result result = new alter_partitions_with_environment_context_result(); + if (e instanceof InvalidOperationException) { + result.o1 = (InvalidOperationException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, alter_partitions_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context,resultHandler); + } + } + + public static class alter_partition_with_environment_context extends org.apache.thrift.AsyncProcessFunction { + public alter_partition_with_environment_context() { + super("alter_partition_with_environment_context"); + } + + public alter_partition_with_environment_context_args getEmptyArgsInstance() { + return new alter_partition_with_environment_context_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + alter_partition_with_environment_context_result result = new alter_partition_with_environment_context_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + alter_partition_with_environment_context_result result = new alter_partition_with_environment_context_result(); + if (e instanceof InvalidOperationException) { + result.o1 = (InvalidOperationException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, alter_partition_with_environment_context_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context,resultHandler); + } + } + + public static class rename_partition extends org.apache.thrift.AsyncProcessFunction { + public rename_partition() { + super("rename_partition"); + } + + public rename_partition_args getEmptyArgsInstance() { + return new rename_partition_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + rename_partition_result result = new rename_partition_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + rename_partition_result result = new rename_partition_result(); + if (e instanceof InvalidOperationException) { + result.o1 = (InvalidOperationException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, rename_partition_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part,resultHandler); + } + } + + public static class partition_name_has_valid_characters extends org.apache.thrift.AsyncProcessFunction { + public partition_name_has_valid_characters() { + super("partition_name_has_valid_characters"); + } + + public partition_name_has_valid_characters_args getEmptyArgsInstance() { + return new partition_name_has_valid_characters_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + partition_name_has_valid_characters_result result = new partition_name_has_valid_characters_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, partition_name_has_valid_characters_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.partition_name_has_valid_characters(args.part_vals, args.throw_exception,resultHandler); + } + } + + public static class get_config_value extends org.apache.thrift.AsyncProcessFunction { + public get_config_value() { + super("get_config_value"); + } + + public get_config_value_args getEmptyArgsInstance() { + return new get_config_value_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(String o) { + get_config_value_result result = new get_config_value_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_config_value_result result = new get_config_value_result(); + if (e instanceof ConfigValSecurityException) { + result.o1 = (ConfigValSecurityException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_config_value_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_config_value(args.name, args.defaultValue,resultHandler); + } + } + + public static class partition_name_to_vals extends org.apache.thrift.AsyncProcessFunction> { + public partition_name_to_vals() { + super("partition_name_to_vals"); + } + + public partition_name_to_vals_args getEmptyArgsInstance() { + return new partition_name_to_vals_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + partition_name_to_vals_result result = new partition_name_to_vals_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + partition_name_to_vals_result result = new partition_name_to_vals_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, partition_name_to_vals_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.partition_name_to_vals(args.part_name,resultHandler); + } + } + + public static class partition_name_to_spec extends org.apache.thrift.AsyncProcessFunction> { + public partition_name_to_spec() { + super("partition_name_to_spec"); + } + + public partition_name_to_spec_args getEmptyArgsInstance() { + return new partition_name_to_spec_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(Map o) { + partition_name_to_spec_result result = new partition_name_to_spec_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + partition_name_to_spec_result result = new partition_name_to_spec_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, partition_name_to_spec_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.partition_name_to_spec(args.part_name,resultHandler); + } + } + + public static class markPartitionForEvent extends org.apache.thrift.AsyncProcessFunction { + public markPartitionForEvent() { + super("markPartitionForEvent"); + } + + public markPartitionForEvent_args getEmptyArgsInstance() { + return new markPartitionForEvent_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + markPartitionForEvent_result result = new markPartitionForEvent_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + markPartitionForEvent_result result = new markPartitionForEvent_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof UnknownDBException) { + result.o3 = (UnknownDBException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof UnknownTableException) { + result.o4 = (UnknownTableException) e; + result.setO4IsSet(true); + msg = result; + } + else if (e instanceof UnknownPartitionException) { + result.o5 = (UnknownPartitionException) e; + result.setO5IsSet(true); + msg = result; + } + else if (e instanceof InvalidPartitionException) { + result.o6 = (InvalidPartitionException) e; + result.setO6IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, markPartitionForEvent_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType,resultHandler); + } + } + + public static class isPartitionMarkedForEvent extends org.apache.thrift.AsyncProcessFunction { + public isPartitionMarkedForEvent() { + super("isPartitionMarkedForEvent"); + } + + public isPartitionMarkedForEvent_args getEmptyArgsInstance() { + return new isPartitionMarkedForEvent_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + isPartitionMarkedForEvent_result result = new isPartitionMarkedForEvent_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + isPartitionMarkedForEvent_result result = new isPartitionMarkedForEvent_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof UnknownDBException) { + result.o3 = (UnknownDBException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof UnknownTableException) { + result.o4 = (UnknownTableException) e; + result.setO4IsSet(true); + msg = result; + } + else if (e instanceof UnknownPartitionException) { + result.o5 = (UnknownPartitionException) e; + result.setO5IsSet(true); + msg = result; + } + else if (e instanceof InvalidPartitionException) { + result.o6 = (InvalidPartitionException) e; + result.setO6IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, isPartitionMarkedForEvent_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType,resultHandler); + } + } + + public static class add_index extends org.apache.thrift.AsyncProcessFunction { + public add_index() { + super("add_index"); + } + + public add_index_args getEmptyArgsInstance() { + return new add_index_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Index o) { + add_index_result result = new add_index_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_index_result result = new add_index_result(); + if (e instanceof InvalidObjectException) { + result.o1 = (InvalidObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof AlreadyExistsException) { + result.o2 = (AlreadyExistsException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_index_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_index(args.new_index, args.index_table,resultHandler); + } + } + + public static class alter_index extends org.apache.thrift.AsyncProcessFunction { + public alter_index() { + super("alter_index"); + } + + public alter_index_args getEmptyArgsInstance() { + return new alter_index_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + alter_index_result result = new alter_index_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + alter_index_result result = new alter_index_result(); + if (e instanceof InvalidOperationException) { + result.o1 = (InvalidOperationException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, alter_index_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx,resultHandler); + } + } + + public static class drop_index_by_name extends org.apache.thrift.AsyncProcessFunction { + public drop_index_by_name() { + super("drop_index_by_name"); + } + + public drop_index_by_name_args getEmptyArgsInstance() { + return new drop_index_by_name_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + drop_index_by_name_result result = new drop_index_by_name_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_index_by_name_result result = new drop_index_by_name_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_index_by_name_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData,resultHandler); + } + } + + public static class get_index_by_name extends org.apache.thrift.AsyncProcessFunction { + public get_index_by_name() { + super("get_index_by_name"); + } + + public get_index_by_name_args getEmptyArgsInstance() { + return new get_index_by_name_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Index o) { + get_index_by_name_result result = new get_index_by_name_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_index_by_name_result result = new get_index_by_name_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_index_by_name_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_index_by_name(args.db_name, args.tbl_name, args.index_name,resultHandler); + } + } + + public static class get_indexes extends org.apache.thrift.AsyncProcessFunction> { + public get_indexes() { + super("get_indexes"); + } + + public get_indexes_args getEmptyArgsInstance() { + return new get_indexes_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_indexes_result result = new get_indexes_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_indexes_result result = new get_indexes_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_indexes_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_indexes(args.db_name, args.tbl_name, args.max_indexes,resultHandler); + } + } + + public static class get_index_names extends org.apache.thrift.AsyncProcessFunction> { + public get_index_names() { + super("get_index_names"); + } + + public get_index_names_args getEmptyArgsInstance() { + return new get_index_names_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_index_names_result result = new get_index_names_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_index_names_result result = new get_index_names_result(); + if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_index_names_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_index_names(args.db_name, args.tbl_name, args.max_indexes,resultHandler); + } + } + + public static class get_primary_keys extends org.apache.thrift.AsyncProcessFunction { + public get_primary_keys() { + super("get_primary_keys"); + } + + public get_primary_keys_args getEmptyArgsInstance() { + return new get_primary_keys_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(PrimaryKeysResponse o) { + get_primary_keys_result result = new get_primary_keys_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_primary_keys_result result = new get_primary_keys_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_primary_keys_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_primary_keys(args.request,resultHandler); + } + } + + public static class get_foreign_keys extends org.apache.thrift.AsyncProcessFunction { + public get_foreign_keys() { + super("get_foreign_keys"); + } + + public get_foreign_keys_args getEmptyArgsInstance() { + return new get_foreign_keys_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(ForeignKeysResponse o) { + get_foreign_keys_result result = new get_foreign_keys_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_foreign_keys_result result = new get_foreign_keys_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_foreign_keys_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_foreign_keys(args.request,resultHandler); + } + } + + public static class get_unique_constraints extends org.apache.thrift.AsyncProcessFunction { + public get_unique_constraints() { + super("get_unique_constraints"); + } + + public get_unique_constraints_args getEmptyArgsInstance() { + return new get_unique_constraints_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(UniqueConstraintsResponse o) { + get_unique_constraints_result result = new get_unique_constraints_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_unique_constraints_result result = new get_unique_constraints_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_unique_constraints_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_unique_constraints(args.request,resultHandler); + } + } + + public static class get_not_null_constraints extends org.apache.thrift.AsyncProcessFunction { + public get_not_null_constraints() { + super("get_not_null_constraints"); + } + + public get_not_null_constraints_args getEmptyArgsInstance() { + return new get_not_null_constraints_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(NotNullConstraintsResponse o) { + get_not_null_constraints_result result = new get_not_null_constraints_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_not_null_constraints_result result = new get_not_null_constraints_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_not_null_constraints_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_not_null_constraints(args.request,resultHandler); + } + } + + public static class update_table_column_statistics extends org.apache.thrift.AsyncProcessFunction { + public update_table_column_statistics() { + super("update_table_column_statistics"); + } + + public update_table_column_statistics_args getEmptyArgsInstance() { + return new update_table_column_statistics_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + update_table_column_statistics_result result = new update_table_column_statistics_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + update_table_column_statistics_result result = new update_table_column_statistics_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o2 = (InvalidObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof InvalidInputException) { + result.o4 = (InvalidInputException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, update_table_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.update_table_column_statistics(args.stats_obj,resultHandler); + } + } + + public static class update_partition_column_statistics extends org.apache.thrift.AsyncProcessFunction { + public update_partition_column_statistics() { + super("update_partition_column_statistics"); + } + + public update_partition_column_statistics_args getEmptyArgsInstance() { + return new update_partition_column_statistics_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + update_partition_column_statistics_result result = new update_partition_column_statistics_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + update_partition_column_statistics_result result = new update_partition_column_statistics_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o2 = (InvalidObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof InvalidInputException) { + result.o4 = (InvalidInputException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, update_partition_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.update_partition_column_statistics(args.stats_obj,resultHandler); + } + } + + public static class get_table_column_statistics extends org.apache.thrift.AsyncProcessFunction { + public get_table_column_statistics() { + super("get_table_column_statistics"); + } + + public get_table_column_statistics_args getEmptyArgsInstance() { + return new get_table_column_statistics_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(ColumnStatistics o) { + get_table_column_statistics_result result = new get_table_column_statistics_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_table_column_statistics_result result = new get_table_column_statistics_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof InvalidInputException) { + result.o3 = (InvalidInputException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o4 = (InvalidObjectException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_table_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name,resultHandler); + } + } + + public static class get_partition_column_statistics extends org.apache.thrift.AsyncProcessFunction { + public get_partition_column_statistics() { + super("get_partition_column_statistics"); + } + + public get_partition_column_statistics_args getEmptyArgsInstance() { + return new get_partition_column_statistics_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(ColumnStatistics o) { + get_partition_column_statistics_result result = new get_partition_column_statistics_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partition_column_statistics_result result = new get_partition_column_statistics_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof InvalidInputException) { + result.o3 = (InvalidInputException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o4 = (InvalidObjectException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partition_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name,resultHandler); + } + } + + public static class get_table_statistics_req extends org.apache.thrift.AsyncProcessFunction { + public get_table_statistics_req() { + super("get_table_statistics_req"); + } + + public get_table_statistics_req_args getEmptyArgsInstance() { + return new get_table_statistics_req_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TableStatsResult o) { + get_table_statistics_req_result result = new get_table_statistics_req_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_table_statistics_req_result result = new get_table_statistics_req_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_table_statistics_req_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_table_statistics_req(args.request,resultHandler); + } + } + + public static class get_partitions_statistics_req extends org.apache.thrift.AsyncProcessFunction { + public get_partitions_statistics_req() { + super("get_partitions_statistics_req"); + } + + public get_partitions_statistics_req_args getEmptyArgsInstance() { + return new get_partitions_statistics_req_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(PartitionsStatsResult o) { + get_partitions_statistics_req_result result = new get_partitions_statistics_req_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_partitions_statistics_req_result result = new get_partitions_statistics_req_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_partitions_statistics_req_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_partitions_statistics_req(args.request,resultHandler); + } + } + + public static class get_aggr_stats_for extends org.apache.thrift.AsyncProcessFunction { + public get_aggr_stats_for() { + super("get_aggr_stats_for"); + } + + public get_aggr_stats_for_args getEmptyArgsInstance() { + return new get_aggr_stats_for_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(AggrStats o) { + get_aggr_stats_for_result result = new get_aggr_stats_for_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_aggr_stats_for_result result = new get_aggr_stats_for_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_aggr_stats_for_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_aggr_stats_for(args.request,resultHandler); + } + } + + public static class set_aggr_stats_for extends org.apache.thrift.AsyncProcessFunction { + public set_aggr_stats_for() { + super("set_aggr_stats_for"); + } + + public set_aggr_stats_for_args getEmptyArgsInstance() { + return new set_aggr_stats_for_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + set_aggr_stats_for_result result = new set_aggr_stats_for_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + set_aggr_stats_for_result result = new set_aggr_stats_for_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o2 = (InvalidObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof InvalidInputException) { + result.o4 = (InvalidInputException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, set_aggr_stats_for_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.set_aggr_stats_for(args.request,resultHandler); + } + } + + public static class delete_partition_column_statistics extends org.apache.thrift.AsyncProcessFunction { + public delete_partition_column_statistics() { + super("delete_partition_column_statistics"); + } + + public delete_partition_column_statistics_args getEmptyArgsInstance() { + return new delete_partition_column_statistics_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o3 = (InvalidObjectException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof InvalidInputException) { + result.o4 = (InvalidInputException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, delete_partition_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name,resultHandler); + } + } + + public static class delete_table_column_statistics extends org.apache.thrift.AsyncProcessFunction { + public delete_table_column_statistics() { + super("delete_table_column_statistics"); + } + + public delete_table_column_statistics_args getEmptyArgsInstance() { + return new delete_table_column_statistics_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + delete_table_column_statistics_result result = new delete_table_column_statistics_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + delete_table_column_statistics_result result = new delete_table_column_statistics_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o3 = (InvalidObjectException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof InvalidInputException) { + result.o4 = (InvalidInputException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, delete_table_column_statistics_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name,resultHandler); + } + } + + public static class create_function extends org.apache.thrift.AsyncProcessFunction { + public create_function() { + super("create_function"); + } + + public create_function_args getEmptyArgsInstance() { + return new create_function_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + create_function_result result = new create_function_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + create_function_result result = new create_function_result(); + if (e instanceof AlreadyExistsException) { + result.o1 = (AlreadyExistsException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o2 = (InvalidObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o4 = (NoSuchObjectException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, create_function_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.create_function(args.func,resultHandler); + } + } + + public static class drop_function extends org.apache.thrift.AsyncProcessFunction { + public drop_function() { + super("drop_function"); + } + + public drop_function_args getEmptyArgsInstance() { + return new drop_function_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + drop_function_result result = new drop_function_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_function_result result = new drop_function_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_function_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_function(args.dbName, args.funcName,resultHandler); + } + } + + public static class alter_function extends org.apache.thrift.AsyncProcessFunction { + public alter_function() { + super("alter_function"); + } + + public alter_function_args getEmptyArgsInstance() { + return new alter_function_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + alter_function_result result = new alter_function_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + alter_function_result result = new alter_function_result(); + if (e instanceof InvalidOperationException) { + result.o1 = (InvalidOperationException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, alter_function_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.alter_function(args.dbName, args.funcName, args.newFunc,resultHandler); + } + } + + public static class get_functions extends org.apache.thrift.AsyncProcessFunction> { + public get_functions() { + super("get_functions"); + } + + public get_functions_args getEmptyArgsInstance() { + return new get_functions_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_functions_result result = new get_functions_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_functions_result result = new get_functions_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_functions_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_functions(args.dbName, args.pattern,resultHandler); + } + } + + public static class get_function extends org.apache.thrift.AsyncProcessFunction { + public get_function() { + super("get_function"); + } + + public get_function_args getEmptyArgsInstance() { + return new get_function_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Function o) { + get_function_result result = new get_function_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_function_result result = new get_function_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_function_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_function(args.dbName, args.funcName,resultHandler); + } + } + + public static class get_all_functions extends org.apache.thrift.AsyncProcessFunction { + public get_all_functions() { + super("get_all_functions"); + } + + public get_all_functions_args getEmptyArgsInstance() { + return new get_all_functions_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(GetAllFunctionsResponse o) { + get_all_functions_result result = new get_all_functions_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_all_functions_result result = new get_all_functions_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_all_functions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_all_functions(resultHandler); + } + } + + public static class create_role extends org.apache.thrift.AsyncProcessFunction { + public create_role() { + super("create_role"); + } + + public create_role_args getEmptyArgsInstance() { + return new create_role_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + create_role_result result = new create_role_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + create_role_result result = new create_role_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, create_role_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.create_role(args.role,resultHandler); + } + } + + public static class drop_role extends org.apache.thrift.AsyncProcessFunction { + public drop_role() { + super("drop_role"); + } + + public drop_role_args getEmptyArgsInstance() { + return new drop_role_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + drop_role_result result = new drop_role_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + drop_role_result result = new drop_role_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, drop_role_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.drop_role(args.role_name,resultHandler); + } + } + + public static class get_role_names extends org.apache.thrift.AsyncProcessFunction> { + public get_role_names() { + super("get_role_names"); + } + + public get_role_names_args getEmptyArgsInstance() { + return new get_role_names_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_role_names_result result = new get_role_names_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_role_names_result result = new get_role_names_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_role_names_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_role_names(resultHandler); + } + } + + public static class grant_role extends org.apache.thrift.AsyncProcessFunction { + public grant_role() { + super("grant_role"); + } + + public grant_role_args getEmptyArgsInstance() { + return new grant_role_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + grant_role_result result = new grant_role_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + grant_role_result result = new grant_role_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, grant_role_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option,resultHandler); + } + } + + public static class revoke_role extends org.apache.thrift.AsyncProcessFunction { + public revoke_role() { + super("revoke_role"); + } + + public revoke_role_args getEmptyArgsInstance() { + return new revoke_role_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + revoke_role_result result = new revoke_role_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + revoke_role_result result = new revoke_role_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, revoke_role_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.revoke_role(args.role_name, args.principal_name, args.principal_type,resultHandler); + } + } + + public static class list_roles extends org.apache.thrift.AsyncProcessFunction> { + public list_roles() { + super("list_roles"); + } + + public list_roles_args getEmptyArgsInstance() { + return new list_roles_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + list_roles_result result = new list_roles_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + list_roles_result result = new list_roles_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, list_roles_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.list_roles(args.principal_name, args.principal_type,resultHandler); + } + } + + public static class grant_revoke_role extends org.apache.thrift.AsyncProcessFunction { + public grant_revoke_role() { + super("grant_revoke_role"); + } + + public grant_revoke_role_args getEmptyArgsInstance() { + return new grant_revoke_role_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(GrantRevokeRoleResponse o) { + grant_revoke_role_result result = new grant_revoke_role_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + grant_revoke_role_result result = new grant_revoke_role_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, grant_revoke_role_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.grant_revoke_role(args.request,resultHandler); + } + } + + public static class get_principals_in_role extends org.apache.thrift.AsyncProcessFunction { + public get_principals_in_role() { + super("get_principals_in_role"); + } + + public get_principals_in_role_args getEmptyArgsInstance() { + return new get_principals_in_role_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(GetPrincipalsInRoleResponse o) { + get_principals_in_role_result result = new get_principals_in_role_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_principals_in_role_result result = new get_principals_in_role_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_principals_in_role_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_principals_in_role(args.request,resultHandler); + } + } + + public static class get_role_grants_for_principal extends org.apache.thrift.AsyncProcessFunction { + public get_role_grants_for_principal() { + super("get_role_grants_for_principal"); + } + + public get_role_grants_for_principal_args getEmptyArgsInstance() { + return new get_role_grants_for_principal_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(GetRoleGrantsForPrincipalResponse o) { + get_role_grants_for_principal_result result = new get_role_grants_for_principal_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_role_grants_for_principal_result result = new get_role_grants_for_principal_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_role_grants_for_principal_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_role_grants_for_principal(args.request,resultHandler); + } + } + + public static class get_privilege_set extends org.apache.thrift.AsyncProcessFunction { + public get_privilege_set() { + super("get_privilege_set"); + } + + public get_privilege_set_args getEmptyArgsInstance() { + return new get_privilege_set_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(PrincipalPrivilegeSet o) { + get_privilege_set_result result = new get_privilege_set_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_privilege_set_result result = new get_privilege_set_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_privilege_set_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_privilege_set(args.hiveObject, args.user_name, args.group_names,resultHandler); + } + } + + public static class list_privileges extends org.apache.thrift.AsyncProcessFunction> { + public list_privileges() { + super("list_privileges"); + } + + public list_privileges_args getEmptyArgsInstance() { + return new list_privileges_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + list_privileges_result result = new list_privileges_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + list_privileges_result result = new list_privileges_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, list_privileges_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.list_privileges(args.principal_name, args.principal_type, args.hiveObject,resultHandler); + } + } + + public static class grant_privileges extends org.apache.thrift.AsyncProcessFunction { + public grant_privileges() { + super("grant_privileges"); + } + + public grant_privileges_args getEmptyArgsInstance() { + return new grant_privileges_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + grant_privileges_result result = new grant_privileges_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + grant_privileges_result result = new grant_privileges_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, grant_privileges_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.grant_privileges(args.privileges,resultHandler); + } + } + + public static class revoke_privileges extends org.apache.thrift.AsyncProcessFunction { + public revoke_privileges() { + super("revoke_privileges"); + } + + public revoke_privileges_args getEmptyArgsInstance() { + return new revoke_privileges_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + revoke_privileges_result result = new revoke_privileges_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + revoke_privileges_result result = new revoke_privileges_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, revoke_privileges_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.revoke_privileges(args.privileges,resultHandler); + } + } + + public static class grant_revoke_privileges extends org.apache.thrift.AsyncProcessFunction { + public grant_revoke_privileges() { + super("grant_revoke_privileges"); + } + + public grant_revoke_privileges_args getEmptyArgsInstance() { + return new grant_revoke_privileges_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(GrantRevokePrivilegeResponse o) { + grant_revoke_privileges_result result = new grant_revoke_privileges_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + grant_revoke_privileges_result result = new grant_revoke_privileges_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, grant_revoke_privileges_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.grant_revoke_privileges(args.request,resultHandler); + } + } + + public static class set_ugi extends org.apache.thrift.AsyncProcessFunction> { + public set_ugi() { + super("set_ugi"); + } + + public set_ugi_args getEmptyArgsInstance() { + return new set_ugi_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + set_ugi_result result = new set_ugi_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + set_ugi_result result = new set_ugi_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, set_ugi_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.set_ugi(args.user_name, args.group_names,resultHandler); + } + } + + public static class get_delegation_token extends org.apache.thrift.AsyncProcessFunction { + public get_delegation_token() { + super("get_delegation_token"); + } + + public get_delegation_token_args getEmptyArgsInstance() { + return new get_delegation_token_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(String o) { + get_delegation_token_result result = new get_delegation_token_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_delegation_token_result result = new get_delegation_token_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_delegation_token_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name,resultHandler); + } + } + + public static class renew_delegation_token extends org.apache.thrift.AsyncProcessFunction { + public renew_delegation_token() { + super("renew_delegation_token"); + } + + public renew_delegation_token_args getEmptyArgsInstance() { + return new renew_delegation_token_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Long o) { + renew_delegation_token_result result = new renew_delegation_token_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + renew_delegation_token_result result = new renew_delegation_token_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, renew_delegation_token_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.renew_delegation_token(args.token_str_form,resultHandler); + } + } + + public static class cancel_delegation_token extends org.apache.thrift.AsyncProcessFunction { + public cancel_delegation_token() { + super("cancel_delegation_token"); + } + + public cancel_delegation_token_args getEmptyArgsInstance() { + return new cancel_delegation_token_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + cancel_delegation_token_result result = new cancel_delegation_token_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + cancel_delegation_token_result result = new cancel_delegation_token_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, cancel_delegation_token_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.cancel_delegation_token(args.token_str_form,resultHandler); + } + } + + public static class add_token extends org.apache.thrift.AsyncProcessFunction { + public add_token() { + super("add_token"); + } + + public add_token_args getEmptyArgsInstance() { + return new add_token_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + add_token_result result = new add_token_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_token_result result = new add_token_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_token_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_token(args.token_identifier, args.delegation_token,resultHandler); + } + } + + public static class remove_token extends org.apache.thrift.AsyncProcessFunction { + public remove_token() { + super("remove_token"); + } + + public remove_token_args getEmptyArgsInstance() { + return new remove_token_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + remove_token_result result = new remove_token_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + remove_token_result result = new remove_token_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, remove_token_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.remove_token(args.token_identifier,resultHandler); + } + } + + public static class get_token extends org.apache.thrift.AsyncProcessFunction { + public get_token() { + super("get_token"); + } + + public get_token_args getEmptyArgsInstance() { + return new get_token_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(String o) { + get_token_result result = new get_token_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_token_result result = new get_token_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_token_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_token(args.token_identifier,resultHandler); + } + } + + public static class get_all_token_identifiers extends org.apache.thrift.AsyncProcessFunction> { + public get_all_token_identifiers() { + super("get_all_token_identifiers"); + } + + public get_all_token_identifiers_args getEmptyArgsInstance() { + return new get_all_token_identifiers_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_all_token_identifiers_result result = new get_all_token_identifiers_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_all_token_identifiers_result result = new get_all_token_identifiers_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_all_token_identifiers_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_all_token_identifiers(resultHandler); + } + } + + public static class add_master_key extends org.apache.thrift.AsyncProcessFunction { + public add_master_key() { + super("add_master_key"); + } + + public add_master_key_args getEmptyArgsInstance() { + return new add_master_key_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Integer o) { + add_master_key_result result = new add_master_key_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_master_key_result result = new add_master_key_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_master_key_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_master_key(args.key,resultHandler); + } + } + + public static class update_master_key extends org.apache.thrift.AsyncProcessFunction { + public update_master_key() { + super("update_master_key"); + } + + public update_master_key_args getEmptyArgsInstance() { + return new update_master_key_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + update_master_key_result result = new update_master_key_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + update_master_key_result result = new update_master_key_result(); + if (e instanceof NoSuchObjectException) { + result.o1 = (NoSuchObjectException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o2 = (MetaException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, update_master_key_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.update_master_key(args.seq_number, args.key,resultHandler); + } + } + + public static class remove_master_key extends org.apache.thrift.AsyncProcessFunction { + public remove_master_key() { + super("remove_master_key"); + } + + public remove_master_key_args getEmptyArgsInstance() { + return new remove_master_key_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + remove_master_key_result result = new remove_master_key_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + remove_master_key_result result = new remove_master_key_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, remove_master_key_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.remove_master_key(args.key_seq,resultHandler); + } + } + + public static class get_master_keys extends org.apache.thrift.AsyncProcessFunction> { + public get_master_keys() { + super("get_master_keys"); + } + + public get_master_keys_args getEmptyArgsInstance() { + return new get_master_keys_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + get_master_keys_result result = new get_master_keys_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_master_keys_result result = new get_master_keys_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_master_keys_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.get_master_keys(resultHandler); + } + } + + public static class get_open_txns extends org.apache.thrift.AsyncProcessFunction { + public get_open_txns() { + super("get_open_txns"); + } + + public get_open_txns_args getEmptyArgsInstance() { + return new get_open_txns_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(GetOpenTxnsResponse o) { + get_open_txns_result result = new get_open_txns_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_open_txns_result result = new get_open_txns_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_open_txns_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_open_txns(resultHandler); + } + } + + public static class get_open_txns_info extends org.apache.thrift.AsyncProcessFunction { + public get_open_txns_info() { + super("get_open_txns_info"); + } + + public get_open_txns_info_args getEmptyArgsInstance() { + return new get_open_txns_info_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(GetOpenTxnsInfoResponse o) { + get_open_txns_info_result result = new get_open_txns_info_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_open_txns_info_result result = new get_open_txns_info_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_open_txns_info_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_open_txns_info(resultHandler); + } + } + + public static class open_txns extends org.apache.thrift.AsyncProcessFunction { + public open_txns() { + super("open_txns"); + } + + public open_txns_args getEmptyArgsInstance() { + return new open_txns_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(OpenTxnsResponse o) { + open_txns_result result = new open_txns_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + open_txns_result result = new open_txns_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, open_txns_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.open_txns(args.rqst,resultHandler); + } + } + + public static class abort_txn extends org.apache.thrift.AsyncProcessFunction { + public abort_txn() { + super("abort_txn"); + } + + public abort_txn_args getEmptyArgsInstance() { + return new abort_txn_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + abort_txn_result result = new abort_txn_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + abort_txn_result result = new abort_txn_result(); + if (e instanceof NoSuchTxnException) { + result.o1 = (NoSuchTxnException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, abort_txn_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.abort_txn(args.rqst,resultHandler); + } + } + + public static class abort_txns extends org.apache.thrift.AsyncProcessFunction { + public abort_txns() { + super("abort_txns"); + } + + public abort_txns_args getEmptyArgsInstance() { + return new abort_txns_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + abort_txns_result result = new abort_txns_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + abort_txns_result result = new abort_txns_result(); + if (e instanceof NoSuchTxnException) { + result.o1 = (NoSuchTxnException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, abort_txns_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.abort_txns(args.rqst,resultHandler); + } + } + + public static class commit_txn extends org.apache.thrift.AsyncProcessFunction { + public commit_txn() { + super("commit_txn"); + } + + public commit_txn_args getEmptyArgsInstance() { + return new commit_txn_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + commit_txn_result result = new commit_txn_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + commit_txn_result result = new commit_txn_result(); + if (e instanceof NoSuchTxnException) { + result.o1 = (NoSuchTxnException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof TxnAbortedException) { + result.o2 = (TxnAbortedException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, commit_txn_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.commit_txn(args.rqst,resultHandler); + } + } + + public static class lock extends org.apache.thrift.AsyncProcessFunction { + public lock() { + super("lock"); + } + + public lock_args getEmptyArgsInstance() { + return new lock_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(LockResponse o) { + lock_result result = new lock_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + lock_result result = new lock_result(); + if (e instanceof NoSuchTxnException) { + result.o1 = (NoSuchTxnException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof TxnAbortedException) { + result.o2 = (TxnAbortedException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, lock_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.lock(args.rqst,resultHandler); + } + } + + public static class check_lock extends org.apache.thrift.AsyncProcessFunction { + public check_lock() { + super("check_lock"); + } + + public check_lock_args getEmptyArgsInstance() { + return new check_lock_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(LockResponse o) { + check_lock_result result = new check_lock_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + check_lock_result result = new check_lock_result(); + if (e instanceof NoSuchTxnException) { + result.o1 = (NoSuchTxnException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof TxnAbortedException) { + result.o2 = (TxnAbortedException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof NoSuchLockException) { + result.o3 = (NoSuchLockException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, check_lock_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.check_lock(args.rqst,resultHandler); + } + } + + public static class unlock extends org.apache.thrift.AsyncProcessFunction { + public unlock() { + super("unlock"); + } + + public unlock_args getEmptyArgsInstance() { + return new unlock_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + unlock_result result = new unlock_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + unlock_result result = new unlock_result(); + if (e instanceof NoSuchLockException) { + result.o1 = (NoSuchLockException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof TxnOpenException) { + result.o2 = (TxnOpenException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, unlock_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.unlock(args.rqst,resultHandler); + } + } + + public static class show_locks extends org.apache.thrift.AsyncProcessFunction { + public show_locks() { + super("show_locks"); + } + + public show_locks_args getEmptyArgsInstance() { + return new show_locks_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(ShowLocksResponse o) { + show_locks_result result = new show_locks_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + show_locks_result result = new show_locks_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, show_locks_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.show_locks(args.rqst,resultHandler); + } + } + + public static class heartbeat extends org.apache.thrift.AsyncProcessFunction { + public heartbeat() { + super("heartbeat"); + } + + public heartbeat_args getEmptyArgsInstance() { + return new heartbeat_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + heartbeat_result result = new heartbeat_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + heartbeat_result result = new heartbeat_result(); + if (e instanceof NoSuchLockException) { + result.o1 = (NoSuchLockException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchTxnException) { + result.o2 = (NoSuchTxnException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof TxnAbortedException) { + result.o3 = (TxnAbortedException) e; + result.setO3IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, heartbeat_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.heartbeat(args.ids,resultHandler); + } + } + + public static class heartbeat_txn_range extends org.apache.thrift.AsyncProcessFunction { + public heartbeat_txn_range() { + super("heartbeat_txn_range"); + } + + public heartbeat_txn_range_args getEmptyArgsInstance() { + return new heartbeat_txn_range_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(HeartbeatTxnRangeResponse o) { + heartbeat_txn_range_result result = new heartbeat_txn_range_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + heartbeat_txn_range_result result = new heartbeat_txn_range_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, heartbeat_txn_range_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.heartbeat_txn_range(args.txns,resultHandler); + } + } + + public static class compact extends org.apache.thrift.AsyncProcessFunction { + public compact() { + super("compact"); + } + + public compact_args getEmptyArgsInstance() { + return new compact_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + compact_result result = new compact_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + compact_result result = new compact_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, compact_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.compact(args.rqst,resultHandler); + } + } + + public static class compact2 extends org.apache.thrift.AsyncProcessFunction { + public compact2() { + super("compact2"); + } + + public compact2_args getEmptyArgsInstance() { + return new compact2_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(CompactionResponse o) { + compact2_result result = new compact2_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + compact2_result result = new compact2_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, compact2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.compact2(args.rqst,resultHandler); + } + } + + public static class show_compact extends org.apache.thrift.AsyncProcessFunction { + public show_compact() { + super("show_compact"); + } + + public show_compact_args getEmptyArgsInstance() { + return new show_compact_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(ShowCompactResponse o) { + show_compact_result result = new show_compact_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + show_compact_result result = new show_compact_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, show_compact_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.show_compact(args.rqst,resultHandler); + } + } + + public static class add_dynamic_partitions extends org.apache.thrift.AsyncProcessFunction { + public add_dynamic_partitions() { + super("add_dynamic_partitions"); + } + + public add_dynamic_partitions_args getEmptyArgsInstance() { + return new add_dynamic_partitions_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + add_dynamic_partitions_result result = new add_dynamic_partitions_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + add_dynamic_partitions_result result = new add_dynamic_partitions_result(); + if (e instanceof NoSuchTxnException) { + result.o1 = (NoSuchTxnException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof TxnAbortedException) { + result.o2 = (TxnAbortedException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, add_dynamic_partitions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.add_dynamic_partitions(args.rqst,resultHandler); + } + } + + public static class get_next_notification extends org.apache.thrift.AsyncProcessFunction { + public get_next_notification() { + super("get_next_notification"); + } + + public get_next_notification_args getEmptyArgsInstance() { + return new get_next_notification_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(NotificationEventResponse o) { + get_next_notification_result result = new get_next_notification_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_next_notification_result result = new get_next_notification_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_next_notification_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_next_notification(args.rqst,resultHandler); + } + } + + public static class get_current_notificationEventId extends org.apache.thrift.AsyncProcessFunction { + public get_current_notificationEventId() { + super("get_current_notificationEventId"); + } + + public get_current_notificationEventId_args getEmptyArgsInstance() { + return new get_current_notificationEventId_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(CurrentNotificationEventId o) { + get_current_notificationEventId_result result = new get_current_notificationEventId_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_current_notificationEventId_result result = new get_current_notificationEventId_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_current_notificationEventId_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_current_notificationEventId(resultHandler); + } + } + + public static class fire_listener_event extends org.apache.thrift.AsyncProcessFunction { + public fire_listener_event() { + super("fire_listener_event"); + } + + public fire_listener_event_args getEmptyArgsInstance() { + return new fire_listener_event_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(FireEventResponse o) { + fire_listener_event_result result = new fire_listener_event_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + fire_listener_event_result result = new fire_listener_event_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, fire_listener_event_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.fire_listener_event(args.rqst,resultHandler); + } + } + + public static class flushCache extends org.apache.thrift.AsyncProcessFunction { + public flushCache() { + super("flushCache"); + } + + public flushCache_args getEmptyArgsInstance() { + return new flushCache_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + flushCache_result result = new flushCache_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + flushCache_result result = new flushCache_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, flushCache_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.flushCache(resultHandler); + } + } + + public static class cm_recycle extends org.apache.thrift.AsyncProcessFunction { + public cm_recycle() { + super("cm_recycle"); + } + + public cm_recycle_args getEmptyArgsInstance() { + return new cm_recycle_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(CmRecycleResponse o) { + cm_recycle_result result = new cm_recycle_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + cm_recycle_result result = new cm_recycle_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, cm_recycle_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.cm_recycle(args.request,resultHandler); + } + } + + public static class get_file_metadata_by_expr extends org.apache.thrift.AsyncProcessFunction { + public get_file_metadata_by_expr() { + super("get_file_metadata_by_expr"); + } + + public get_file_metadata_by_expr_args getEmptyArgsInstance() { + return new get_file_metadata_by_expr_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(GetFileMetadataByExprResult o) { + get_file_metadata_by_expr_result result = new get_file_metadata_by_expr_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_file_metadata_by_expr_result result = new get_file_metadata_by_expr_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_file_metadata_by_expr_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_file_metadata_by_expr(args.req,resultHandler); + } + } + + public static class get_file_metadata extends org.apache.thrift.AsyncProcessFunction { + public get_file_metadata() { + super("get_file_metadata"); + } + + public get_file_metadata_args getEmptyArgsInstance() { + return new get_file_metadata_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(GetFileMetadataResult o) { + get_file_metadata_result result = new get_file_metadata_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_file_metadata_result result = new get_file_metadata_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_file_metadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_file_metadata(args.req,resultHandler); + } + } + + public static class put_file_metadata extends org.apache.thrift.AsyncProcessFunction { + public put_file_metadata() { + super("put_file_metadata"); + } + + public put_file_metadata_args getEmptyArgsInstance() { + return new put_file_metadata_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(PutFileMetadataResult o) { + put_file_metadata_result result = new put_file_metadata_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + put_file_metadata_result result = new put_file_metadata_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, put_file_metadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.put_file_metadata(args.req,resultHandler); + } + } + + public static class clear_file_metadata extends org.apache.thrift.AsyncProcessFunction { + public clear_file_metadata() { + super("clear_file_metadata"); + } + + public clear_file_metadata_args getEmptyArgsInstance() { + return new clear_file_metadata_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(ClearFileMetadataResult o) { + clear_file_metadata_result result = new clear_file_metadata_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + clear_file_metadata_result result = new clear_file_metadata_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, clear_file_metadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.clear_file_metadata(args.req,resultHandler); + } + } + + public static class cache_file_metadata extends org.apache.thrift.AsyncProcessFunction { + public cache_file_metadata() { + super("cache_file_metadata"); + } + + public cache_file_metadata_args getEmptyArgsInstance() { + return new cache_file_metadata_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(CacheFileMetadataResult o) { + cache_file_metadata_result result = new cache_file_metadata_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + cache_file_metadata_result result = new cache_file_metadata_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, cache_file_metadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.cache_file_metadata(args.req,resultHandler); + } + } + + public static class get_metastore_db_uuid extends org.apache.thrift.AsyncProcessFunction { + public get_metastore_db_uuid() { + super("get_metastore_db_uuid"); + } + + public get_metastore_db_uuid_args getEmptyArgsInstance() { + return new get_metastore_db_uuid_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(String o) { + get_metastore_db_uuid_result result = new get_metastore_db_uuid_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_metastore_db_uuid_result result = new get_metastore_db_uuid_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_metastore_db_uuid_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.get_metastore_db_uuid(resultHandler); + } + } + + } + + public static class getMetaConf_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMetaConf_args"); + + private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getMetaConf_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getMetaConf_argsTupleSchemeFactory()); + } + + private String key; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + KEY((short)1, "key"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // KEY + return KEY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMetaConf_args.class, metaDataMap); + } + + public getMetaConf_args() { + } + + public getMetaConf_args( + String key) + { + this(); + this.key = key; + } + + /** + * Performs a deep copy on other. + */ + public getMetaConf_args(getMetaConf_args other) { + if (other.isSetKey()) { + this.key = other.key; + } + } + + public getMetaConf_args deepCopy() { + return new getMetaConf_args(this); + } + + @Override + public void clear() { + this.key = null; + } + + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + + public void unsetKey() { + this.key = null; + } + + /** Returns true if field key is set (has been assigned a value) and false otherwise */ + public boolean isSetKey() { + return this.key != null; + } + + public void setKeyIsSet(boolean value) { + if (!value) { + this.key = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case KEY: + if (value == null) { + unsetKey(); + } else { + setKey((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case KEY: + return getKey(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case KEY: + return isSetKey(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getMetaConf_args) + return this.equals((getMetaConf_args)that); + return false; + } + + public boolean equals(getMetaConf_args that) { + if (that == null) + return false; + + boolean this_present_key = true && this.isSetKey(); + boolean that_present_key = true && that.isSetKey(); + if (this_present_key || that_present_key) { + if (!(this_present_key && that_present_key)) + return false; + if (!this.key.equals(that.key)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_key = true && (isSetKey()); + list.add(present_key); + if (present_key) + list.add(key); + + return list.hashCode(); + } + + @Override + public int compareTo(getMetaConf_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetKey()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("getMetaConf_args("); + boolean first = true; + + sb.append("key:"); + if (this.key == null) { + sb.append("null"); + } else { + sb.append(this.key); + } + 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 getMetaConf_argsStandardSchemeFactory implements SchemeFactory { + public getMetaConf_argsStandardScheme getScheme() { + return new getMetaConf_argsStandardScheme(); + } + } + + private static class getMetaConf_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getMetaConf_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: // KEY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.key = iprot.readString(); + struct.setKeyIsSet(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, getMetaConf_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.key != null) { + oprot.writeFieldBegin(KEY_FIELD_DESC); + oprot.writeString(struct.key); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getMetaConf_argsTupleSchemeFactory implements SchemeFactory { + public getMetaConf_argsTupleScheme getScheme() { + return new getMetaConf_argsTupleScheme(); + } + } + + private static class getMetaConf_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getMetaConf_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetKey()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetKey()) { + oprot.writeString(struct.key); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getMetaConf_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.key = iprot.readString(); + struct.setKeyIsSet(true); + } + } + } + + } + + public static class getMetaConf_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMetaConf_result"); + + 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 getMetaConf_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getMetaConf_resultTupleSchemeFactory()); + } + + private String success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMetaConf_result.class, metaDataMap); + } + + public getMetaConf_result() { + } + + public getMetaConf_result( + String success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public getMetaConf_result(getMetaConf_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public getMetaConf_result deepCopy() { + return new getMetaConf_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public String getSuccess() { + return this.success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((String)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getMetaConf_result) + return this.equals((getMetaConf_result)that); + return false; + } + + public boolean equals(getMetaConf_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(getMetaConf_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("getMetaConf_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 getMetaConf_resultStandardSchemeFactory implements SchemeFactory { + public getMetaConf_resultStandardScheme getScheme() { + return new getMetaConf_resultStandardScheme(); + } + } + + private static class getMetaConf_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getMetaConf_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, getMetaConf_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 getMetaConf_resultTupleSchemeFactory implements SchemeFactory { + public getMetaConf_resultTupleScheme getScheme() { + return new getMetaConf_resultTupleScheme(); + } + } + + private static class getMetaConf_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getMetaConf_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, getMetaConf_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 setMetaConf_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setMetaConf_args"); + + private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new setMetaConf_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new setMetaConf_argsTupleSchemeFactory()); + } + + private String key; // required + private String value; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + KEY((short)1, "key"), + VALUE((short)2, "value"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // KEY + return KEY; + case 2: // VALUE + return VALUE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setMetaConf_args.class, metaDataMap); + } + + public setMetaConf_args() { + } + + public setMetaConf_args( + String key, + String value) + { + this(); + this.key = key; + this.value = value; + } + + /** + * Performs a deep copy on other. + */ + public setMetaConf_args(setMetaConf_args other) { + if (other.isSetKey()) { + this.key = other.key; + } + if (other.isSetValue()) { + this.value = other.value; + } + } + + public setMetaConf_args deepCopy() { + return new setMetaConf_args(this); + } + + @Override + public void clear() { + this.key = null; + this.value = null; + } + + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + + public void unsetKey() { + this.key = null; + } + + /** Returns true if field key is set (has been assigned a value) and false otherwise */ + public boolean isSetKey() { + return this.key != null; + } + + public void setKeyIsSet(boolean value) { + if (!value) { + this.key = null; + } + } + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + + public void unsetValue() { + this.value = null; + } + + /** Returns true if field value is set (has been assigned a value) and false otherwise */ + public boolean isSetValue() { + return this.value != null; + } + + public void setValueIsSet(boolean value) { + if (!value) { + this.value = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case KEY: + if (value == null) { + unsetKey(); + } else { + setKey((String)value); + } + break; + + case VALUE: + if (value == null) { + unsetValue(); + } else { + setValue((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case KEY: + return getKey(); + + case VALUE: + return getValue(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case KEY: + return isSetKey(); + case VALUE: + return isSetValue(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof setMetaConf_args) + return this.equals((setMetaConf_args)that); + return false; + } + + public boolean equals(setMetaConf_args that) { + if (that == null) + return false; + + boolean this_present_key = true && this.isSetKey(); + boolean that_present_key = true && that.isSetKey(); + if (this_present_key || that_present_key) { + if (!(this_present_key && that_present_key)) + return false; + if (!this.key.equals(that.key)) + return false; + } + + boolean this_present_value = true && this.isSetValue(); + boolean that_present_value = true && that.isSetValue(); + if (this_present_value || that_present_value) { + if (!(this_present_value && that_present_value)) + return false; + if (!this.value.equals(that.value)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_key = true && (isSetKey()); + list.add(present_key); + if (present_key) + list.add(key); + + boolean present_value = true && (isSetValue()); + list.add(present_value); + if (present_value) + list.add(value); + + return list.hashCode(); + } + + @Override + public int compareTo(setMetaConf_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetKey()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("setMetaConf_args("); + boolean first = true; + + sb.append("key:"); + if (this.key == null) { + sb.append("null"); + } else { + sb.append(this.key); + } + first = false; + if (!first) sb.append(", "); + sb.append("value:"); + if (this.value == null) { + sb.append("null"); + } else { + sb.append(this.value); + } + 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 setMetaConf_argsStandardSchemeFactory implements SchemeFactory { + public setMetaConf_argsStandardScheme getScheme() { + return new setMetaConf_argsStandardScheme(); + } + } + + private static class setMetaConf_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, setMetaConf_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: // KEY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.key = iprot.readString(); + struct.setKeyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.value = iprot.readString(); + struct.setValueIsSet(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, setMetaConf_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.key != null) { + oprot.writeFieldBegin(KEY_FIELD_DESC); + oprot.writeString(struct.key); + oprot.writeFieldEnd(); + } + if (struct.value != null) { + oprot.writeFieldBegin(VALUE_FIELD_DESC); + oprot.writeString(struct.value); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class setMetaConf_argsTupleSchemeFactory implements SchemeFactory { + public setMetaConf_argsTupleScheme getScheme() { + return new setMetaConf_argsTupleScheme(); + } + } + + private static class setMetaConf_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, setMetaConf_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetKey()) { + optionals.set(0); + } + if (struct.isSetValue()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetKey()) { + oprot.writeString(struct.key); + } + if (struct.isSetValue()) { + oprot.writeString(struct.value); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, setMetaConf_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.key = iprot.readString(); + struct.setKeyIsSet(true); + } + if (incoming.get(1)) { + struct.value = iprot.readString(); + struct.setValueIsSet(true); + } + } + } + + } + + public static class setMetaConf_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setMetaConf_result"); + + 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 setMetaConf_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new setMetaConf_resultTupleSchemeFactory()); + } + + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setMetaConf_result.class, metaDataMap); + } + + public setMetaConf_result() { + } + + public setMetaConf_result( + MetaException o1) + { + this(); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public setMetaConf_result(setMetaConf_result other) { + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public setMetaConf_result deepCopy() { + return new setMetaConf_result(this); + } + + @Override + public void clear() { + this.o1 = null; + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof setMetaConf_result) + return this.equals((setMetaConf_result)that); + return false; + } + + public boolean equals(setMetaConf_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(setMetaConf_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("setMetaConf_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 setMetaConf_resultStandardSchemeFactory implements SchemeFactory { + public setMetaConf_resultStandardScheme getScheme() { + return new setMetaConf_resultStandardScheme(); + } + } + + private static class setMetaConf_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, setMetaConf_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, setMetaConf_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 setMetaConf_resultTupleSchemeFactory implements SchemeFactory { + public setMetaConf_resultTupleScheme getScheme() { + return new setMetaConf_resultTupleScheme(); + } + } + + private static class setMetaConf_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, setMetaConf_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, setMetaConf_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); + } + } + } + + } + + public static class create_database_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_database_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DATABASE((short)1, "database"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DATABASE + return DATABASE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Database.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_database_args.class, metaDataMap); + } + + public create_database_args() { + } + + public create_database_args( + Database database) + { + this(); + this.database = database; + } + + /** + * Performs a deep copy on other. + */ + public create_database_args(create_database_args other) { + if (other.isSetDatabase()) { + this.database = new Database(other.database); + } + } + + public create_database_args deepCopy() { + return new create_database_args(this); + } + + @Override + public void clear() { + this.database = null; + } + + public Database getDatabase() { + return this.database; + } + + public void setDatabase(Database database) { + this.database = database; + } + + public void unsetDatabase() { + this.database = null; + } + + /** Returns true if field database is set (has been assigned a value) and false otherwise */ + public boolean isSetDatabase() { + return this.database != null; + } + + public void setDatabaseIsSet(boolean value) { + if (!value) { + this.database = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DATABASE: + if (value == null) { + unsetDatabase(); + } else { + setDatabase((Database)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DATABASE: + return getDatabase(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DATABASE: + return isSetDatabase(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_database_args) + return this.equals((create_database_args)that); + return false; + } + + public boolean equals(create_database_args that) { + if (that == null) + return false; + + boolean this_present_database = true && this.isSetDatabase(); + boolean that_present_database = true && that.isSetDatabase(); + if (this_present_database || that_present_database) { + if (!(this_present_database && that_present_database)) + return false; + if (!this.database.equals(that.database)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_database = true && (isSetDatabase()); + list.add(present_database); + if (present_database) + list.add(database); + + return list.hashCode(); + } + + @Override + public int compareTo(create_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDatabase()).compareTo(other.isSetDatabase()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatabase()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.database); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_database_args("); + boolean first = true; + + sb.append("database:"); + if (this.database == null) { + sb.append("null"); + } else { + sb.append(this.database); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_database_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_database_result.class, metaDataMap); + } + + public create_database_result() { + } + + public create_database_result( + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public create_database_result(create_database_result other) { + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public create_database_result deepCopy() { + return new create_database_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_database_result) + return this.equals((create_database_result)that); + return false; + } + + public boolean equals(create_database_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(create_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_database_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_database_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_database_args.class, metaDataMap); + } + + public get_database_args() { + } + + public get_database_args( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public get_database_args(get_database_args other) { + if (other.isSetName()) { + this.name = other.name; + } + } + + public get_database_args deepCopy() { + return new get_database_args(this); + } + + @Override + public void clear() { + this.name = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_database_args) + return this.equals((get_database_args)that); + return false; + } + + public boolean equals(get_database_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + return list.hashCode(); + } + + @Override + public int compareTo(get_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_database_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_database_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Database.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_database_result.class, metaDataMap); + } + + public get_database_result() { + } + + public get_database_result( + Database success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_database_result(get_database_result other) { + if (other.isSetSuccess()) { + this.success = new Database(other.success); + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_database_result deepCopy() { + return new get_database_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Database getSuccess() { + return this.success; + } + + public void setSuccess(Database success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Database)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_database_result) + return this.equals((get_database_result)that); + return false; + } + + public boolean equals(get_database_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_database_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_database_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"), + DELETE_DATA((short)2, "deleteData"), + CASCADE((short)3, "cascade"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + case 2: // DELETE_DATA + return DELETE_DATA; + case 3: // CASCADE + return CASCADE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + private static final int __CASCADE_ISSET_ID = 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); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.CASCADE, new org.apache.thrift.meta_data.FieldMetaData("cascade", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_database_args.class, metaDataMap); + } + + public drop_database_args() { + } + + public drop_database_args( + String name, + boolean deleteData, + boolean cascade) + { + this(); + this.name = name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + this.cascade = cascade; + setCascadeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public drop_database_args(drop_database_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetName()) { + this.name = other.name; + } + this.deleteData = other.deleteData; + this.cascade = other.cascade; + } + + public drop_database_args deepCopy() { + return new drop_database_args(this); + } + + @Override + public void clear() { + this.name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + setCascadeIsSet(false); + this.cascade = false; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); + } + + public boolean isCascade() { + return this.cascade; + } + + public void setCascade(boolean cascade) { + this.cascade = cascade; + setCascadeIsSet(true); + } + + public void unsetCascade() { + __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 EncodingUtils.testBit(__isset_bitfield, __CASCADE_ISSET_ID); + } + + public void setCascadeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CASCADE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + case CASCADE: + if (value == null) { + unsetCascade(); + } else { + setCascade((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case DELETE_DATA: + return isDeleteData(); + + case CASCADE: + return isCascade(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case DELETE_DATA: + return isSetDeleteData(); + case CASCADE: + return isSetCascade(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_database_args) + return this.equals((drop_database_args)that); + return false; + } + + public boolean equals(drop_database_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + boolean this_present_cascade = true; + boolean that_present_cascade = true; + if (this_present_cascade || that_present_cascade) { + if (!(this_present_cascade && that_present_cascade)) + return false; + if (this.cascade != that.cascade) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + boolean present_deleteData = true; + list.add(present_deleteData); + if (present_deleteData) + list.add(deleteData); + + boolean present_cascade = true; + list.add(present_cascade); + if (present_cascade) + list.add(cascade); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCascade()).compareTo(other.isSetCascade()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCascade()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cascade, other.cascade); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_database_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + if (!first) sb.append(", "); + sb.append("cascade:"); + sb.append(this.cascade); + 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 { + // 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_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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_database_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_database_result.class, metaDataMap); + } + + public drop_database_result() { + } + + public drop_database_result( + NoSuchObjectException o1, + InvalidOperationException o2, + MetaException o3) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public drop_database_result(drop_database_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidOperationException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public drop_database_result deepCopy() { + return new drop_database_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidOperationException getO2() { + return this.o2; + } + + public void setO2(InvalidOperationException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidOperationException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_database_result) + return this.equals((drop_database_result)that); + return false; + } + + public boolean equals(drop_database_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_database_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_databases_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PATTERN((short)1, "pattern"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PATTERN + return PATTERN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PATTERN, new org.apache.thrift.meta_data.FieldMetaData("pattern", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_databases_args.class, metaDataMap); + } + + public get_databases_args() { + } + + public get_databases_args( + String pattern) + { + this(); + this.pattern = pattern; + } + + /** + * Performs a deep copy on other. + */ + public get_databases_args(get_databases_args other) { + if (other.isSetPattern()) { + this.pattern = other.pattern; + } + } + + public get_databases_args deepCopy() { + return new get_databases_args(this); + } + + @Override + public void clear() { + this.pattern = null; + } + + public String getPattern() { + return this.pattern; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + public void unsetPattern() { + this.pattern = null; + } + + /** Returns true if field pattern is set (has been assigned a value) and false otherwise */ + public boolean isSetPattern() { + return this.pattern != null; + } + + public void setPatternIsSet(boolean value) { + if (!value) { + this.pattern = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PATTERN: + if (value == null) { + unsetPattern(); + } else { + setPattern((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PATTERN: + return getPattern(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PATTERN: + return isSetPattern(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_databases_args) + return this.equals((get_databases_args)that); + return false; + } + + public boolean equals(get_databases_args that) { + if (that == null) + return false; + + boolean this_present_pattern = true && this.isSetPattern(); + boolean that_present_pattern = true && that.isSetPattern(); + if (this_present_pattern || that_present_pattern) { + if (!(this_present_pattern && that_present_pattern)) + return false; + if (!this.pattern.equals(that.pattern)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_pattern = true && (isSetPattern()); + list.add(present_pattern); + if (present_pattern) + list.add(pattern); + + return list.hashCode(); + } + + @Override + public int compareTo(get_databases_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPattern()).compareTo(other.isSetPattern()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPattern()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, other.pattern); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_databases_args("); + boolean first = true; + + sb.append("pattern:"); + if (this.pattern == null) { + sb.append("null"); + } else { + sb.append(this.pattern); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_databases_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_databases_result.class, metaDataMap); + } + + public get_databases_result() { + } + + public get_databases_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_databases_result(get_databases_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_databases_result deepCopy() { + return new get_databases_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_databases_result) + return this.equals((get_databases_result)that); + return false; + } + + public boolean equals(get_databases_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_databases_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_databases_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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 _list706 = iprot.readListBegin(); + struct.success = new ArrayList(_list706.size); + String _elem707; + for (int _i708 = 0; _i708 < _list706.size; ++_i708) + { + _elem707 = iprot.readString(); + struct.success.add(_elem707); + } + 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 _iter709 : struct.success) + { + oprot.writeString(_iter709); + } + 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 _iter710 : struct.success) + { + oprot.writeString(_iter710); + } + } + } + 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 _list711 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list711.size); + String _elem712; + for (int _i713 = 0; _i713 < _list711.size; ++_i713) + { + _elem712 = iprot.readString(); + struct.success.add(_elem712); + } + } + 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, Comparable { + 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 { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_databases_args.class, metaDataMap); + } + + public get_all_databases_args() { + } + + /** + * Performs a deep copy on other. + */ + public get_all_databases_args(get_all_databases_args other) { + } + + public get_all_databases_args deepCopy() { + return new get_all_databases_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_databases_args) + return this.equals((get_all_databases_args)that); + return false; + } + + public boolean equals(get_all_databases_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(get_all_databases_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_all_databases_args("); + boolean first = true; + + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_databases_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_databases_result.class, metaDataMap); + } + + public get_all_databases_result() { + } + + public get_all_databases_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_all_databases_result(get_all_databases_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_all_databases_result deepCopy() { + return new get_all_databases_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_databases_result) + return this.equals((get_all_databases_result)that); + return false; + } + + public boolean equals(get_all_databases_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_all_databases_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_all_databases_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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 _list714 = iprot.readListBegin(); + struct.success = new ArrayList(_list714.size); + String _elem715; + for (int _i716 = 0; _i716 < _list714.size; ++_i716) + { + _elem715 = iprot.readString(); + struct.success.add(_elem715); + } + 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 _iter717 : struct.success) + { + oprot.writeString(_iter717); + } + 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 _iter718 : struct.success) + { + oprot.writeString(_iter718); + } + } + } + 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 _list719 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list719.size); + String _elem720; + for (int _i721 = 0; _i721 < _list719.size; ++_i721) + { + _elem720 = iprot.readString(); + struct.success.add(_elem720); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_database_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DBNAME((short)1, "dbname"), + DB((short)2, "db"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // DB + return DB; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Database.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_database_args.class, metaDataMap); + } + + public alter_database_args() { + } + + public alter_database_args( + String dbname, + Database db) + { + this(); + this.dbname = dbname; + this.db = db; + } + + /** + * Performs a deep copy on other. + */ + public alter_database_args(alter_database_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetDb()) { + this.db = new Database(other.db); + } + } + + public alter_database_args deepCopy() { + return new alter_database_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.db = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public Database getDb() { + return this.db; + } + + public void setDb(Database db) { + this.db = db; + } + + public void unsetDb() { + this.db = null; + } + + /** Returns true if field db is set (has been assigned a value) and false otherwise */ + public boolean isSetDb() { + return this.db != null; + } + + public void setDbIsSet(boolean value) { + if (!value) { + this.db = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case DB: + if (value == null) { + unsetDb(); + } else { + setDb((Database)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case DB: + return getDb(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case DB: + return isSetDb(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_database_args) + return this.equals((alter_database_args)that); + return false; + } + + public boolean equals(alter_database_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_db = true && this.isSetDb(); + boolean that_present_db = true && that.isSetDb(); + if (this_present_db || that_present_db) { + if (!(this_present_db && that_present_db)) + return false; + if (!this.db.equals(that.db)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_db = true && (isSetDb()); + list.add(present_db); + if (present_db) + list.add(db); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDb()).compareTo(other.isSetDb()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_database_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("db:"); + if (this.db == null) { + sb.append("null"); + } else { + sb.append(this.db); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_database_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_database_result.class, metaDataMap); + } + + public alter_database_result() { + } + + public alter_database_result( + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_database_result(alter_database_result other) { + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public alter_database_result deepCopy() { + return new alter_database_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_database_result) + return this.equals((alter_database_result)that); + return false; + } + + public boolean equals(alter_database_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_database_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_type_args.class, metaDataMap); + } + + public get_type_args() { + } + + public get_type_args( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public get_type_args(get_type_args other) { + if (other.isSetName()) { + this.name = other.name; + } + } + + public get_type_args deepCopy() { + return new get_type_args(this); + } + + @Override + public void clear() { + this.name = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_type_args) + return this.equals((get_type_args)that); + return false; + } + + public boolean equals(get_type_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + return list.hashCode(); + } + + @Override + public int compareTo(get_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_type_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Type.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_type_result.class, metaDataMap); + } + + public get_type_result() { + } + + public get_type_result( + Type success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_type_result(get_type_result other) { + if (other.isSetSuccess()) { + this.success = new Type(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_type_result deepCopy() { + return new get_type_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Type getSuccess() { + return this.success; + } + + public void setSuccess(Type success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Type)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_type_result) + return this.equals((get_type_result)that); + return false; + } + + public boolean equals(get_type_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_type_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_type_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_type_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TYPE((short)1, "type"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TYPE + return TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Type.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_type_args.class, metaDataMap); + } + + public create_type_args() { + } + + public create_type_args( + Type type) + { + this(); + this.type = type; + } + + /** + * Performs a deep copy on other. + */ + public create_type_args(create_type_args other) { + if (other.isSetType()) { + this.type = new Type(other.type); + } + } + + public create_type_args deepCopy() { + return new create_type_args(this); + } + + @Override + public void clear() { + this.type = null; + } + + public Type getType() { + return this.type; + } + + public void setType(Type type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((Type)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TYPE: + return getType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TYPE: + return isSetType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_type_args) + return this.equals((create_type_args)that); + return false; + } + + public boolean equals(create_type_args that) { + if (that == null) + return false; + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type); + + return list.hashCode(); + } + + @Override + public int compareTo(create_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_type_args("); + boolean first = true; + + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_type_result"); + + 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 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 + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_type_result.class, metaDataMap); + } + + public create_type_result() { + } + + public create_type_result( + boolean success, + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public create_type_result(create_type_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public create_type_result deepCopy() { + return new create_type_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_type_result) + return this.equals((create_type_result)that); + return false; + } + + public boolean equals(create_type_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(create_type_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_type_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 { + // 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_type_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TYPE((short)1, "type"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TYPE + return TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_type_args.class, metaDataMap); + } + + public drop_type_args() { + } + + public drop_type_args( + String type) + { + this(); + this.type = type; + } + + /** + * Performs a deep copy on other. + */ + public drop_type_args(drop_type_args other) { + if (other.isSetType()) { + this.type = other.type; + } + } + + public drop_type_args deepCopy() { + return new drop_type_args(this); + } + + @Override + public void clear() { + this.type = null; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TYPE: + return getType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TYPE: + return isSetType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_type_args) + return this.equals((drop_type_args)that); + return false; + } + + public boolean equals(drop_type_args that) { + if (that == null) + return false; + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_type_args("); + boolean first = true; + + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_type_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_type_result.class, metaDataMap); + } + + public drop_type_result() { + } + + public drop_type_result( + boolean success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_type_result(drop_type_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public drop_type_result deepCopy() { + return new drop_type_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_type_result) + return this.equals((drop_type_result)that); + return false; + } + + public boolean equals(drop_type_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_type_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_type_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 { + // 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_all_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_type_all_args.class, metaDataMap); + } + + public get_type_all_args() { + } + + public get_type_all_args( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public get_type_all_args(get_type_all_args other) { + if (other.isSetName()) { + this.name = other.name; + } + } + + public get_type_all_args deepCopy() { + return new get_type_all_args(this); + } + + @Override + public void clear() { + this.name = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_type_all_args) + return this.equals((get_type_all_args)that); + return false; + } + + public boolean equals(get_type_all_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + return list.hashCode(); + } + + @Override + public int compareTo(get_type_all_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_type_all_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_type_all_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O2((short)1, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Type.class)))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_type_all_result.class, metaDataMap); + } + + public get_type_all_result() { + } + + public get_type_all_result( + Map success, + MetaException o2) + { + this(); + this.success = success; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_type_all_result(get_type_all_result other) { + if (other.isSetSuccess()) { + Map __this__success = new HashMap(other.success.size()); + for (Map.Entry other_element : other.success.entrySet()) { + + String other_element_key = other_element.getKey(); + Type other_element_value = other_element.getValue(); + + String __this__success_copy_key = other_element_key; + + Type __this__success_copy_value = new Type(other_element_value); + + __this__success.put(__this__success_copy_key, __this__success_copy_value); + } + this.success = __this__success; + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_type_all_result deepCopy() { + return new get_type_all_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public void putToSuccess(String key, Type val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); + } + + public Map getSuccess() { + return this.success; + } + + public void setSuccess(Map success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Map)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_type_all_result) + return this.equals((get_type_all_result)that); + return false; + } + + public boolean equals(get_type_all_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_type_all_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_type_all_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 _map722 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map722.size); + String _key723; + Type _val724; + for (int _i725 = 0; _i725 < _map722.size; ++_i725) + { + _key723 = iprot.readString(); + _val724 = new Type(); + _val724.read(iprot); + struct.success.put(_key723, _val724); + } + 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 _iter726 : struct.success.entrySet()) + { + oprot.writeString(_iter726.getKey()); + _iter726.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 _iter727 : struct.success.entrySet()) + { + oprot.writeString(_iter727.getKey()); + _iter727.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 _map728 = 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*_map728.size); + String _key729; + Type _val730; + for (int _i731 = 0; _i731 < _map728.size; ++_i731) + { + _key729 = iprot.readString(); + _val730 = new Type(); + _val730.read(iprot); + struct.success.put(_key729, _val730); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TABLE_NAME((short)2, "table_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_fields_args.class, metaDataMap); + } + + public get_fields_args() { + } + + public get_fields_args( + String db_name, + String table_name) + { + this(); + this.db_name = db_name; + this.table_name = table_name; + } + + /** + * Performs a deep copy on other. + */ + public get_fields_args(get_fields_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + } + + public get_fields_args deepCopy() { + return new get_fields_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.table_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTable_name() { + return this.table_name; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; + } + + public void unsetTable_name() { + this.table_name = null; + } + + /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; + } + + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_fields_args) + return this.equals((get_fields_args)that); + return false; + } + + public boolean equals(get_fields_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_table_name = true && (isSetTable_name()); + list.add(present_table_name); + if (present_table_name) + list.add(table_name); + + return list.hashCode(); + } + + @Override + public int compareTo(get_fields_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_fields_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_result"); + + 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 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 + private UnknownDBException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_fields_result.class, metaDataMap); + } + + public get_fields_result() { + } + + public get_fields_result( + List success, + MetaException o1, + UnknownTableException o2, + UnknownDBException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public get_fields_result(get_fields_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (FieldSchema other_element : other.success) { + __this__success.add(new FieldSchema(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new UnknownTableException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + } + + public get_fields_result deepCopy() { + return new get_fields_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(FieldSchema elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public UnknownTableException getO2() { + return this.o2; + } + + public void setO2(UnknownTableException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public UnknownDBException getO3() { + return this.o3; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((UnknownTableException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_fields_result) + return this.equals((get_fields_result)that); + return false; + } + + public boolean equals(get_fields_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(get_fields_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_fields_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 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 _list732 = iprot.readListBegin(); + struct.success = new ArrayList(_list732.size); + FieldSchema _elem733; + for (int _i734 = 0; _i734 < _list732.size; ++_i734) + { + _elem733 = new FieldSchema(); + _elem733.read(iprot); + struct.success.add(_elem733); + } + 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 _iter735 : struct.success) + { + _iter735.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 _iter736 : struct.success) + { + _iter736.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 _list737 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list737.size); + FieldSchema _elem738; + for (int _i739 = 0; _i739 < _list737.size; ++_i739) + { + _elem738 = new FieldSchema(); + _elem738.read(iprot); + struct.success.add(_elem738); + } + } + 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_fields_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_with_environment_context_args"); + + 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 org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", 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_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_fields_with_environment_context_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String table_name; // required + private EnvironmentContext environment_context; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TABLE_NAME((short)2, "table_name"), + ENVIRONMENT_CONTEXT((short)3, "environment_context"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + case 3: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_fields_with_environment_context_args.class, metaDataMap); + } + + public get_fields_with_environment_context_args() { + } + + public get_fields_with_environment_context_args( + String db_name, + String table_name, + EnvironmentContext environment_context) + { + this(); + this.db_name = db_name; + this.table_name = table_name; + this.environment_context = environment_context; + } + + /** + * Performs a deep copy on other. + */ + public get_fields_with_environment_context_args(get_fields_with_environment_context_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + if (other.isSetEnvironment_context()) { + this.environment_context = new EnvironmentContext(other.environment_context); + } + } + + public get_fields_with_environment_context_args deepCopy() { + return new get_fields_with_environment_context_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.table_name = null; + this.environment_context = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTable_name() { + return this.table_name; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; + } + + public void unsetTable_name() { + this.table_name = null; + } + + /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; + } + + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } + } + + public EnvironmentContext getEnvironment_context() { + return this.environment_context; + } + + public void setEnvironment_context(EnvironmentContext environment_context) { + this.environment_context = environment_context; + } + + public void unsetEnvironment_context() { + this.environment_context = null; + } + + /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment_context() { + return this.environment_context != null; + } + + public void setEnvironment_contextIsSet(boolean value) { + if (!value) { + this.environment_context = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironment_context(); + } else { + setEnvironment_context((EnvironmentContext)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + case ENVIRONMENT_CONTEXT: + return getEnvironment_context(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironment_context(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_fields_with_environment_context_args) + return this.equals((get_fields_with_environment_context_args)that); + return false; + } + + public boolean equals(get_fields_with_environment_context_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + boolean this_present_environment_context = true && this.isSetEnvironment_context(); + boolean that_present_environment_context = true && that.isSetEnvironment_context(); + if (this_present_environment_context || that_present_environment_context) { + if (!(this_present_environment_context && that_present_environment_context)) + return false; + if (!this.environment_context.equals(that.environment_context)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_table_name = true && (isSetTable_name()); + list.add(present_table_name); + if (present_table_name) + list.add(table_name); + + boolean present_environment_context = true && (isSetEnvironment_context()); + list.add(present_environment_context); + if (present_environment_context) + list.add(environment_context); + + return list.hashCode(); + } + + @Override + public int compareTo(get_fields_with_environment_context_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment_context()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_fields_with_environment_context_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("environment_context:"); + if (this.environment_context == null) { + sb.append("null"); + } else { + sb.append(this.environment_context); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (environment_context != null) { + environment_context.validate(); + } + } + + 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 get_fields_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public get_fields_with_environment_context_argsStandardScheme getScheme() { + return new get_fields_with_environment_context_argsStandardScheme(); + } + } + + private static class get_fields_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_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: // 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; + case 3: // 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, get_fields_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.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.table_name); + 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 get_fields_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public get_fields_with_environment_context_argsTupleScheme getScheme() { + return new get_fields_with_environment_context_argsTupleScheme(); + } + } + + private static class get_fields_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_fields_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.isSetTable_name()) { + optionals.set(1); + } + if (struct.isSetEnvironment_context()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTable_name()) { + oprot.writeString(struct.table_name); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_fields_with_environment_context_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.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } + if (incoming.get(2)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + + } + + public static class get_fields_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_fields_with_environment_context_result"); + + 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 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_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_fields_with_environment_context_resultTupleSchemeFactory()); + } + + private List success; // required + private MetaException o1; // required + private UnknownTableException o2; // required + private UnknownDBException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_fields_with_environment_context_result.class, metaDataMap); + } + + public get_fields_with_environment_context_result() { + } + + public get_fields_with_environment_context_result( + List success, + MetaException o1, + UnknownTableException o2, + UnknownDBException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public get_fields_with_environment_context_result(get_fields_with_environment_context_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (FieldSchema other_element : other.success) { + __this__success.add(new FieldSchema(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new UnknownTableException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + } + + public get_fields_with_environment_context_result deepCopy() { + return new get_fields_with_environment_context_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(FieldSchema elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public UnknownTableException getO2() { + return this.o2; + } + + public void setO2(UnknownTableException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public UnknownDBException getO3() { + return this.o3; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((UnknownTableException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_fields_with_environment_context_result) + return this.equals((get_fields_with_environment_context_result)that); + return false; + } + + public boolean equals(get_fields_with_environment_context_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(get_fields_with_environment_context_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_fields_with_environment_context_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 get_fields_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public get_fields_with_environment_context_resultStandardScheme getScheme() { + return new get_fields_with_environment_context_resultStandardScheme(); + } + } + + private static class get_fields_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_fields_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.LIST) { + { + org.apache.thrift.protocol.TList _list740 = iprot.readListBegin(); + struct.success = new ArrayList(_list740.size); + FieldSchema _elem741; + for (int _i742 = 0; _i742 < _list740.size; ++_i742) + { + _elem741 = new FieldSchema(); + _elem741.read(iprot); + struct.success.add(_elem741); + } + 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_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); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (FieldSchema _iter743 : struct.success) + { + _iter743.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_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public get_fields_with_environment_context_resultTupleScheme getScheme() { + return new get_fields_with_environment_context_resultTupleScheme(); + } + } + + private static class get_fields_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_fields_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()) { + { + oprot.writeI32(struct.success.size()); + for (FieldSchema _iter744 : struct.success) + { + _iter744.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_with_environment_context_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 _list745 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list745.size); + FieldSchema _elem746; + for (int _i747 = 0; _i747 < _list745.size; ++_i747) + { + _elem746 = new FieldSchema(); + _elem746.read(iprot); + struct.success.add(_elem746); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TABLE_NAME((short)2, "table_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_schema_args.class, metaDataMap); + } + + public get_schema_args() { + } + + public get_schema_args( + String db_name, + String table_name) + { + this(); + this.db_name = db_name; + this.table_name = table_name; + } + + /** + * Performs a deep copy on other. + */ + public get_schema_args(get_schema_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + } + + public get_schema_args deepCopy() { + return new get_schema_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.table_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTable_name() { + return this.table_name; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; + } + + public void unsetTable_name() { + this.table_name = null; + } + + /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; + } + + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_schema_args) + return this.equals((get_schema_args)that); + return false; + } + + public boolean equals(get_schema_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_table_name = true && (isSetTable_name()); + list.add(present_table_name); + if (present_table_name) + list.add(table_name); + + return list.hashCode(); + } + + @Override + public int compareTo(get_schema_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_schema_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_result"); + + 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 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 + private UnknownDBException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_schema_result.class, metaDataMap); + } + + public get_schema_result() { + } + + public get_schema_result( + List success, + MetaException o1, + UnknownTableException o2, + UnknownDBException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public get_schema_result(get_schema_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (FieldSchema other_element : other.success) { + __this__success.add(new FieldSchema(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new UnknownTableException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + } + + public get_schema_result deepCopy() { + return new get_schema_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(FieldSchema elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public UnknownTableException getO2() { + return this.o2; + } + + public void setO2(UnknownTableException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public UnknownDBException getO3() { + return this.o3; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((UnknownTableException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_schema_result) + return this.equals((get_schema_result)that); + return false; + } + + public boolean equals(get_schema_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(get_schema_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_schema_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 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 _list748 = iprot.readListBegin(); + struct.success = new ArrayList(_list748.size); + FieldSchema _elem749; + for (int _i750 = 0; _i750 < _list748.size; ++_i750) + { + _elem749 = new FieldSchema(); + _elem749.read(iprot); + struct.success.add(_elem749); + } + 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 _iter751 : struct.success) + { + _iter751.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 _iter752 : struct.success) + { + _iter752.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 _list753 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list753.size); + FieldSchema _elem754; + for (int _i755 = 0; _i755 < _list753.size; ++_i755) + { + _elem754 = new FieldSchema(); + _elem754.read(iprot); + struct.success.add(_elem754); + } + } + 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_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_with_environment_context_args"); + + 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 org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", 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_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_schema_with_environment_context_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String table_name; // required + private EnvironmentContext environment_context; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TABLE_NAME((short)2, "table_name"), + ENVIRONMENT_CONTEXT((short)3, "environment_context"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + case 3: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_schema_with_environment_context_args.class, metaDataMap); + } + + public get_schema_with_environment_context_args() { + } + + public get_schema_with_environment_context_args( + String db_name, + String table_name, + EnvironmentContext environment_context) + { + this(); + this.db_name = db_name; + this.table_name = table_name; + this.environment_context = environment_context; + } + + /** + * Performs a deep copy on other. + */ + public get_schema_with_environment_context_args(get_schema_with_environment_context_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + if (other.isSetEnvironment_context()) { + this.environment_context = new EnvironmentContext(other.environment_context); + } + } + + public get_schema_with_environment_context_args deepCopy() { + return new get_schema_with_environment_context_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.table_name = null; + this.environment_context = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTable_name() { + return this.table_name; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; + } + + public void unsetTable_name() { + this.table_name = null; + } + + /** Returns true if field table_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; + } + + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } + } + + public EnvironmentContext getEnvironment_context() { + return this.environment_context; + } + + public void setEnvironment_context(EnvironmentContext environment_context) { + this.environment_context = environment_context; + } + + public void unsetEnvironment_context() { + this.environment_context = null; + } + + /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment_context() { + return this.environment_context != null; + } + + public void setEnvironment_contextIsSet(boolean value) { + if (!value) { + this.environment_context = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironment_context(); + } else { + setEnvironment_context((EnvironmentContext)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + case ENVIRONMENT_CONTEXT: + return getEnvironment_context(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironment_context(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_schema_with_environment_context_args) + return this.equals((get_schema_with_environment_context_args)that); + return false; + } + + public boolean equals(get_schema_with_environment_context_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + boolean this_present_environment_context = true && this.isSetEnvironment_context(); + boolean that_present_environment_context = true && that.isSetEnvironment_context(); + if (this_present_environment_context || that_present_environment_context) { + if (!(this_present_environment_context && that_present_environment_context)) + return false; + if (!this.environment_context.equals(that.environment_context)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_table_name = true && (isSetTable_name()); + list.add(present_table_name); + if (present_table_name) + list.add(table_name); + + boolean present_environment_context = true && (isSetEnvironment_context()); + list.add(present_environment_context); + if (present_environment_context) + list.add(environment_context); + + return list.hashCode(); + } + + @Override + public int compareTo(get_schema_with_environment_context_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(other.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_name, other.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment_context()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_schema_with_environment_context_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("environment_context:"); + if (this.environment_context == null) { + sb.append("null"); + } else { + sb.append(this.environment_context); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (environment_context != null) { + environment_context.validate(); + } + } + + 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 get_schema_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public get_schema_with_environment_context_argsStandardScheme getScheme() { + return new get_schema_with_environment_context_argsStandardScheme(); + } + } + + private static class get_schema_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_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: // 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; + case 3: // 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, get_schema_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.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.table_name); + 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 get_schema_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public get_schema_with_environment_context_argsTupleScheme getScheme() { + return new get_schema_with_environment_context_argsTupleScheme(); + } + } + + private static class get_schema_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_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.isSetTable_name()) { + optionals.set(1); + } + if (struct.isSetEnvironment_context()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetTable_name()) { + oprot.writeString(struct.table_name); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_schema_with_environment_context_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.table_name = iprot.readString(); + struct.setTable_nameIsSet(true); + } + if (incoming.get(2)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + + } + + public static class get_schema_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_schema_with_environment_context_result"); + + 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 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_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_schema_with_environment_context_resultTupleSchemeFactory()); + } + + private List success; // required + private MetaException o1; // required + private UnknownTableException o2; // required + private UnknownDBException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_schema_with_environment_context_result.class, metaDataMap); + } + + public get_schema_with_environment_context_result() { + } + + public get_schema_with_environment_context_result( + List success, + MetaException o1, + UnknownTableException o2, + UnknownDBException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public get_schema_with_environment_context_result(get_schema_with_environment_context_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (FieldSchema other_element : other.success) { + __this__success.add(new FieldSchema(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new UnknownTableException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + } + + public get_schema_with_environment_context_result deepCopy() { + return new get_schema_with_environment_context_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(FieldSchema elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public UnknownTableException getO2() { + return this.o2; + } + + public void setO2(UnknownTableException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public UnknownDBException getO3() { + return this.o3; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((UnknownTableException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_schema_with_environment_context_result) + return this.equals((get_schema_with_environment_context_result)that); + return false; + } + + public boolean equals(get_schema_with_environment_context_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(get_schema_with_environment_context_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_schema_with_environment_context_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 get_schema_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public get_schema_with_environment_context_resultStandardScheme getScheme() { + return new get_schema_with_environment_context_resultStandardScheme(); + } + } + + private static class get_schema_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_schema_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.LIST) { + { + org.apache.thrift.protocol.TList _list756 = iprot.readListBegin(); + struct.success = new ArrayList(_list756.size); + FieldSchema _elem757; + for (int _i758 = 0; _i758 < _list756.size; ++_i758) + { + _elem757 = new FieldSchema(); + _elem757.read(iprot); + struct.success.add(_elem757); + } + 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_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); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (FieldSchema _iter759 : struct.success) + { + _iter759.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_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public get_schema_with_environment_context_resultTupleScheme getScheme() { + return new get_schema_with_environment_context_resultTupleScheme(); + } + } + + private static class get_schema_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_schema_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()) { + { + oprot.writeI32(struct.success.size()); + for (FieldSchema _iter760 : struct.success) + { + _iter760.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_with_environment_context_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 _list761 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list761.size); + FieldSchema _elem762; + for (int _i763 = 0; _i763 < _list761.size; ++_i763) + { + _elem762 = new FieldSchema(); + _elem762.read(iprot); + struct.success.add(_elem762); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TBL((short)1, "tbl"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TBL + return TBL; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TBL, new org.apache.thrift.meta_data.FieldMetaData("tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap); + } + + public create_table_args() { + } + + public create_table_args( + Table tbl) + { + this(); + this.tbl = tbl; + } + + /** + * Performs a deep copy on other. + */ + public create_table_args(create_table_args other) { + if (other.isSetTbl()) { + this.tbl = new Table(other.tbl); + } + } + + public create_table_args deepCopy() { + return new create_table_args(this); + } + + @Override + public void clear() { + this.tbl = null; + } + + public Table getTbl() { + return this.tbl; + } + + public void setTbl(Table tbl) { + this.tbl = tbl; + } + + public void unsetTbl() { + this.tbl = null; + } + + /** Returns true if field tbl is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl() { + return this.tbl != null; + } + + public void setTblIsSet(boolean value) { + if (!value) { + this.tbl = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TBL: + if (value == null) { + unsetTbl(); + } else { + setTbl((Table)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TBL: + return getTbl(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TBL: + return isSetTbl(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_table_args) + return this.equals((create_table_args)that); + return false; + } + + public boolean equals(create_table_args that) { + if (that == null) + return false; + + boolean this_present_tbl = true && this.isSetTbl(); + boolean that_present_tbl = true && that.isSetTbl(); + if (this_present_tbl || that_present_tbl) { + if (!(this_present_tbl && that_present_tbl)) + return false; + if (!this.tbl.equals(that.tbl)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_tbl = true && (isSetTbl()); + list.add(present_tbl); + if (present_tbl) + list.add(tbl); + + return list.hashCode(); + } + + @Override + public int compareTo(create_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTbl()).compareTo(other.isSetTbl()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, other.tbl); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_table_args("); + boolean first = true; + + sb.append("tbl:"); + if (this.tbl == null) { + sb.append("null"); + } else { + sb.append(this.tbl); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_result"); + + 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 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 + private NoSuchObjectException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap); + } + + public create_table_result() { + } + + public create_table_result( + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3, + NoSuchObjectException o4) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public create_table_result(create_table_result other) { + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new NoSuchObjectException(other.o4); + } + } + + public create_table_result deepCopy() { + return new create_table_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public NoSuchObjectException getO4() { + return this.o4; + } + + public void setO4(NoSuchObjectException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_table_result) + return this.equals((create_table_result)that); + return false; + } + + public boolean equals(create_table_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(create_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_environment_context_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TBL((short)1, "tbl"), + ENVIRONMENT_CONTEXT((short)2, "environment_context"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TBL + return TBL; + case 2: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TBL, new org.apache.thrift.meta_data.FieldMetaData("tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_with_environment_context_args.class, metaDataMap); + } + + public create_table_with_environment_context_args() { + } + + public create_table_with_environment_context_args( + Table tbl, + EnvironmentContext environment_context) + { + this(); + this.tbl = tbl; + this.environment_context = environment_context; + } + + /** + * Performs a deep copy on other. + */ + public create_table_with_environment_context_args(create_table_with_environment_context_args other) { + if (other.isSetTbl()) { + this.tbl = new Table(other.tbl); + } + if (other.isSetEnvironment_context()) { + this.environment_context = new EnvironmentContext(other.environment_context); + } + } + + public create_table_with_environment_context_args deepCopy() { + return new create_table_with_environment_context_args(this); + } + + @Override + public void clear() { + this.tbl = null; + this.environment_context = null; + } + + public Table getTbl() { + return this.tbl; + } + + public void setTbl(Table tbl) { + this.tbl = tbl; + } + + public void unsetTbl() { + this.tbl = null; + } + + /** Returns true if field tbl is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl() { + return this.tbl != null; + } + + public void setTblIsSet(boolean value) { + if (!value) { + this.tbl = null; + } + } + + public EnvironmentContext getEnvironment_context() { + return this.environment_context; + } + + public void setEnvironment_context(EnvironmentContext environment_context) { + this.environment_context = environment_context; + } + + public void unsetEnvironment_context() { + this.environment_context = null; + } + + /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment_context() { + return this.environment_context != null; + } + + public void setEnvironment_contextIsSet(boolean value) { + if (!value) { + this.environment_context = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TBL: + if (value == null) { + unsetTbl(); + } else { + setTbl((Table)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironment_context(); + } else { + setEnvironment_context((EnvironmentContext)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TBL: + return getTbl(); + + case ENVIRONMENT_CONTEXT: + return getEnvironment_context(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TBL: + return isSetTbl(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironment_context(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_table_with_environment_context_args) + return this.equals((create_table_with_environment_context_args)that); + return false; + } + + public boolean equals(create_table_with_environment_context_args that) { + if (that == null) + return false; + + boolean this_present_tbl = true && this.isSetTbl(); + boolean that_present_tbl = true && that.isSetTbl(); + if (this_present_tbl || that_present_tbl) { + if (!(this_present_tbl && that_present_tbl)) + return false; + if (!this.tbl.equals(that.tbl)) + return false; + } + + boolean this_present_environment_context = true && this.isSetEnvironment_context(); + boolean that_present_environment_context = true && that.isSetEnvironment_context(); + if (this_present_environment_context || that_present_environment_context) { + if (!(this_present_environment_context && that_present_environment_context)) + return false; + if (!this.environment_context.equals(that.environment_context)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_tbl = true && (isSetTbl()); + list.add(present_tbl); + if (present_tbl) + list.add(tbl); + + boolean present_environment_context = true && (isSetEnvironment_context()); + list.add(present_environment_context); + if (present_environment_context) + list.add(environment_context); + + return list.hashCode(); + } + + @Override + public int compareTo(create_table_with_environment_context_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTbl()).compareTo(other.isSetTbl()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, other.tbl); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment_context()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_table_with_environment_context_args("); + boolean first = true; + + sb.append("tbl:"); + if (this.tbl == null) { + sb.append("null"); + } else { + sb.append(this.tbl); + } + first = false; + if (!first) sb.append(", "); + sb.append("environment_context:"); + if (this.environment_context == null) { + sb.append("null"); + } else { + sb.append(this.environment_context); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_environment_context_result"); + + 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 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 + private NoSuchObjectException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_with_environment_context_result.class, metaDataMap); + } + + public create_table_with_environment_context_result() { + } + + public create_table_with_environment_context_result( + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3, + NoSuchObjectException o4) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public create_table_with_environment_context_result(create_table_with_environment_context_result other) { + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new NoSuchObjectException(other.o4); + } + } + + public create_table_with_environment_context_result deepCopy() { + return new create_table_with_environment_context_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public NoSuchObjectException getO4() { + return this.o4; + } + + public void setO4(NoSuchObjectException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_table_with_environment_context_result) + return this.equals((create_table_with_environment_context_result)that); + return false; + } + + public boolean equals(create_table_with_environment_context_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(create_table_with_environment_context_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_table_with_environment_context_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + 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 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 create_table_with_constraints_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_constraints_args"); + + 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 PRIMARY_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("primaryKeys", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField FOREIGN_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignKeys", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField UNIQUE_CONSTRAINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("uniqueConstraints", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField NOT_NULL_CONSTRAINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("notNullConstraints", org.apache.thrift.protocol.TType.LIST, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_table_with_constraints_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_table_with_constraints_argsTupleSchemeFactory()); + } + + private Table tbl; // required + private List primaryKeys; // required + private List foreignKeys; // required + private List uniqueConstraints; // required + private List notNullConstraints; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TBL((short)1, "tbl"), + PRIMARY_KEYS((short)2, "primaryKeys"), + FOREIGN_KEYS((short)3, "foreignKeys"), + UNIQUE_CONSTRAINTS((short)4, "uniqueConstraints"), + NOT_NULL_CONSTRAINTS((short)5, "notNullConstraints"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TBL + return TBL; + case 2: // PRIMARY_KEYS + return PRIMARY_KEYS; + case 3: // FOREIGN_KEYS + return FOREIGN_KEYS; + case 4: // UNIQUE_CONSTRAINTS + return UNIQUE_CONSTRAINTS; + case 5: // NOT_NULL_CONSTRAINTS + return NOT_NULL_CONSTRAINTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TBL, new org.apache.thrift.meta_data.FieldMetaData("tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); + tmpMap.put(_Fields.PRIMARY_KEYS, new org.apache.thrift.meta_data.FieldMetaData("primaryKeys", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLPrimaryKey.class)))); + tmpMap.put(_Fields.FOREIGN_KEYS, new org.apache.thrift.meta_data.FieldMetaData("foreignKeys", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLForeignKey.class)))); + tmpMap.put(_Fields.UNIQUE_CONSTRAINTS, new org.apache.thrift.meta_data.FieldMetaData("uniqueConstraints", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLUniqueConstraint.class)))); + tmpMap.put(_Fields.NOT_NULL_CONSTRAINTS, new org.apache.thrift.meta_data.FieldMetaData("notNullConstraints", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLNotNullConstraint.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_with_constraints_args.class, metaDataMap); + } + + public create_table_with_constraints_args() { + } + + public create_table_with_constraints_args( + Table tbl, + List primaryKeys, + List foreignKeys, + List uniqueConstraints, + List notNullConstraints) + { + this(); + this.tbl = tbl; + this.primaryKeys = primaryKeys; + this.foreignKeys = foreignKeys; + this.uniqueConstraints = uniqueConstraints; + this.notNullConstraints = notNullConstraints; + } + + /** + * Performs a deep copy on other. + */ + public create_table_with_constraints_args(create_table_with_constraints_args other) { + if (other.isSetTbl()) { + this.tbl = new Table(other.tbl); + } + if (other.isSetPrimaryKeys()) { + List __this__primaryKeys = new ArrayList(other.primaryKeys.size()); + for (SQLPrimaryKey other_element : other.primaryKeys) { + __this__primaryKeys.add(new SQLPrimaryKey(other_element)); + } + this.primaryKeys = __this__primaryKeys; + } + if (other.isSetForeignKeys()) { + List __this__foreignKeys = new ArrayList(other.foreignKeys.size()); + for (SQLForeignKey other_element : other.foreignKeys) { + __this__foreignKeys.add(new SQLForeignKey(other_element)); + } + this.foreignKeys = __this__foreignKeys; + } + if (other.isSetUniqueConstraints()) { + List __this__uniqueConstraints = new ArrayList(other.uniqueConstraints.size()); + for (SQLUniqueConstraint other_element : other.uniqueConstraints) { + __this__uniqueConstraints.add(new SQLUniqueConstraint(other_element)); + } + this.uniqueConstraints = __this__uniqueConstraints; + } + if (other.isSetNotNullConstraints()) { + List __this__notNullConstraints = new ArrayList(other.notNullConstraints.size()); + for (SQLNotNullConstraint other_element : other.notNullConstraints) { + __this__notNullConstraints.add(new SQLNotNullConstraint(other_element)); + } + this.notNullConstraints = __this__notNullConstraints; + } + } + + public create_table_with_constraints_args deepCopy() { + return new create_table_with_constraints_args(this); + } + + @Override + public void clear() { + this.tbl = null; + this.primaryKeys = null; + this.foreignKeys = null; + this.uniqueConstraints = null; + this.notNullConstraints = null; + } + + public Table getTbl() { + return this.tbl; + } + + public void setTbl(Table tbl) { + this.tbl = tbl; + } + + public void unsetTbl() { + this.tbl = null; + } + + /** Returns true if field tbl is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl() { + return this.tbl != null; + } + + public void setTblIsSet(boolean value) { + if (!value) { + this.tbl = null; + } + } + + public int getPrimaryKeysSize() { + return (this.primaryKeys == null) ? 0 : this.primaryKeys.size(); + } + + public java.util.Iterator getPrimaryKeysIterator() { + return (this.primaryKeys == null) ? null : this.primaryKeys.iterator(); + } + + public void addToPrimaryKeys(SQLPrimaryKey elem) { + if (this.primaryKeys == null) { + this.primaryKeys = new ArrayList(); + } + this.primaryKeys.add(elem); + } + + public List getPrimaryKeys() { + return this.primaryKeys; + } + + public void setPrimaryKeys(List primaryKeys) { + this.primaryKeys = primaryKeys; + } + + public void unsetPrimaryKeys() { + this.primaryKeys = null; + } + + /** Returns true if field primaryKeys is set (has been assigned a value) and false otherwise */ + public boolean isSetPrimaryKeys() { + return this.primaryKeys != null; + } + + public void setPrimaryKeysIsSet(boolean value) { + if (!value) { + this.primaryKeys = null; + } + } + + public int getForeignKeysSize() { + return (this.foreignKeys == null) ? 0 : this.foreignKeys.size(); + } + + public java.util.Iterator getForeignKeysIterator() { + return (this.foreignKeys == null) ? null : this.foreignKeys.iterator(); + } + + public void addToForeignKeys(SQLForeignKey elem) { + if (this.foreignKeys == null) { + this.foreignKeys = new ArrayList(); + } + this.foreignKeys.add(elem); + } + + public List getForeignKeys() { + return this.foreignKeys; + } + + public void setForeignKeys(List foreignKeys) { + this.foreignKeys = foreignKeys; + } + + public void unsetForeignKeys() { + this.foreignKeys = null; + } + + /** Returns true if field foreignKeys is set (has been assigned a value) and false otherwise */ + public boolean isSetForeignKeys() { + return this.foreignKeys != null; + } + + public void setForeignKeysIsSet(boolean value) { + if (!value) { + this.foreignKeys = null; + } + } + + public int getUniqueConstraintsSize() { + return (this.uniqueConstraints == null) ? 0 : this.uniqueConstraints.size(); + } + + public java.util.Iterator getUniqueConstraintsIterator() { + return (this.uniqueConstraints == null) ? null : this.uniqueConstraints.iterator(); + } + + public void addToUniqueConstraints(SQLUniqueConstraint elem) { + if (this.uniqueConstraints == null) { + this.uniqueConstraints = new ArrayList(); + } + this.uniqueConstraints.add(elem); + } + + public List getUniqueConstraints() { + return this.uniqueConstraints; + } + + public void setUniqueConstraints(List uniqueConstraints) { + this.uniqueConstraints = uniqueConstraints; + } + + public void unsetUniqueConstraints() { + this.uniqueConstraints = null; + } + + /** Returns true if field uniqueConstraints is set (has been assigned a value) and false otherwise */ + public boolean isSetUniqueConstraints() { + return this.uniqueConstraints != null; + } + + public void setUniqueConstraintsIsSet(boolean value) { + if (!value) { + this.uniqueConstraints = null; + } + } + + public int getNotNullConstraintsSize() { + return (this.notNullConstraints == null) ? 0 : this.notNullConstraints.size(); + } + + public java.util.Iterator getNotNullConstraintsIterator() { + return (this.notNullConstraints == null) ? null : this.notNullConstraints.iterator(); + } + + public void addToNotNullConstraints(SQLNotNullConstraint elem) { + if (this.notNullConstraints == null) { + this.notNullConstraints = new ArrayList(); + } + this.notNullConstraints.add(elem); + } + + public List getNotNullConstraints() { + return this.notNullConstraints; + } + + public void setNotNullConstraints(List notNullConstraints) { + this.notNullConstraints = notNullConstraints; + } + + public void unsetNotNullConstraints() { + this.notNullConstraints = null; + } + + /** Returns true if field notNullConstraints is set (has been assigned a value) and false otherwise */ + public boolean isSetNotNullConstraints() { + return this.notNullConstraints != null; + } + + public void setNotNullConstraintsIsSet(boolean value) { + if (!value) { + this.notNullConstraints = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TBL: + if (value == null) { + unsetTbl(); + } else { + setTbl((Table)value); + } + break; + + case PRIMARY_KEYS: + if (value == null) { + unsetPrimaryKeys(); + } else { + setPrimaryKeys((List)value); + } + break; + + case FOREIGN_KEYS: + if (value == null) { + unsetForeignKeys(); + } else { + setForeignKeys((List)value); + } + break; + + case UNIQUE_CONSTRAINTS: + if (value == null) { + unsetUniqueConstraints(); + } else { + setUniqueConstraints((List)value); + } + break; + + case NOT_NULL_CONSTRAINTS: + if (value == null) { + unsetNotNullConstraints(); + } else { + setNotNullConstraints((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TBL: + return getTbl(); + + case PRIMARY_KEYS: + return getPrimaryKeys(); + + case FOREIGN_KEYS: + return getForeignKeys(); + + case UNIQUE_CONSTRAINTS: + return getUniqueConstraints(); + + case NOT_NULL_CONSTRAINTS: + return getNotNullConstraints(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TBL: + return isSetTbl(); + case PRIMARY_KEYS: + return isSetPrimaryKeys(); + case FOREIGN_KEYS: + return isSetForeignKeys(); + case UNIQUE_CONSTRAINTS: + return isSetUniqueConstraints(); + case NOT_NULL_CONSTRAINTS: + return isSetNotNullConstraints(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_table_with_constraints_args) + return this.equals((create_table_with_constraints_args)that); + return false; + } + + public boolean equals(create_table_with_constraints_args that) { + if (that == null) + return false; + + boolean this_present_tbl = true && this.isSetTbl(); + boolean that_present_tbl = true && that.isSetTbl(); + if (this_present_tbl || that_present_tbl) { + if (!(this_present_tbl && that_present_tbl)) + return false; + if (!this.tbl.equals(that.tbl)) + return false; + } + + boolean this_present_primaryKeys = true && this.isSetPrimaryKeys(); + boolean that_present_primaryKeys = true && that.isSetPrimaryKeys(); + if (this_present_primaryKeys || that_present_primaryKeys) { + if (!(this_present_primaryKeys && that_present_primaryKeys)) + return false; + if (!this.primaryKeys.equals(that.primaryKeys)) + return false; + } + + boolean this_present_foreignKeys = true && this.isSetForeignKeys(); + boolean that_present_foreignKeys = true && that.isSetForeignKeys(); + if (this_present_foreignKeys || that_present_foreignKeys) { + if (!(this_present_foreignKeys && that_present_foreignKeys)) + return false; + if (!this.foreignKeys.equals(that.foreignKeys)) + return false; + } + + boolean this_present_uniqueConstraints = true && this.isSetUniqueConstraints(); + boolean that_present_uniqueConstraints = true && that.isSetUniqueConstraints(); + if (this_present_uniqueConstraints || that_present_uniqueConstraints) { + if (!(this_present_uniqueConstraints && that_present_uniqueConstraints)) + return false; + if (!this.uniqueConstraints.equals(that.uniqueConstraints)) + return false; + } + + boolean this_present_notNullConstraints = true && this.isSetNotNullConstraints(); + boolean that_present_notNullConstraints = true && that.isSetNotNullConstraints(); + if (this_present_notNullConstraints || that_present_notNullConstraints) { + if (!(this_present_notNullConstraints && that_present_notNullConstraints)) + return false; + if (!this.notNullConstraints.equals(that.notNullConstraints)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_tbl = true && (isSetTbl()); + list.add(present_tbl); + if (present_tbl) + list.add(tbl); + + boolean present_primaryKeys = true && (isSetPrimaryKeys()); + list.add(present_primaryKeys); + if (present_primaryKeys) + list.add(primaryKeys); + + boolean present_foreignKeys = true && (isSetForeignKeys()); + list.add(present_foreignKeys); + if (present_foreignKeys) + list.add(foreignKeys); + + boolean present_uniqueConstraints = true && (isSetUniqueConstraints()); + list.add(present_uniqueConstraints); + if (present_uniqueConstraints) + list.add(uniqueConstraints); + + boolean present_notNullConstraints = true && (isSetNotNullConstraints()); + list.add(present_notNullConstraints); + if (present_notNullConstraints) + list.add(notNullConstraints); + + return list.hashCode(); + } + + @Override + public int compareTo(create_table_with_constraints_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTbl()).compareTo(other.isSetTbl()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, other.tbl); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrimaryKeys()).compareTo(other.isSetPrimaryKeys()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrimaryKeys()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.primaryKeys, other.primaryKeys); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetForeignKeys()).compareTo(other.isSetForeignKeys()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetForeignKeys()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignKeys, other.foreignKeys); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUniqueConstraints()).compareTo(other.isSetUniqueConstraints()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUniqueConstraints()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uniqueConstraints, other.uniqueConstraints); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNotNullConstraints()).compareTo(other.isSetNotNullConstraints()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNotNullConstraints()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notNullConstraints, other.notNullConstraints); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_table_with_constraints_args("); + boolean first = true; + + sb.append("tbl:"); + if (this.tbl == null) { + sb.append("null"); + } else { + sb.append(this.tbl); + } + first = false; + if (!first) sb.append(", "); + sb.append("primaryKeys:"); + if (this.primaryKeys == null) { + sb.append("null"); + } else { + sb.append(this.primaryKeys); + } + first = false; + if (!first) sb.append(", "); + sb.append("foreignKeys:"); + if (this.foreignKeys == null) { + sb.append("null"); + } else { + sb.append(this.foreignKeys); + } + first = false; + if (!first) sb.append(", "); + sb.append("uniqueConstraints:"); + if (this.uniqueConstraints == null) { + sb.append("null"); + } else { + sb.append(this.uniqueConstraints); + } + first = false; + if (!first) sb.append(", "); + sb.append("notNullConstraints:"); + if (this.notNullConstraints == null) { + sb.append("null"); + } else { + sb.append(this.notNullConstraints); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 create_table_with_constraints_argsStandardSchemeFactory implements SchemeFactory { + public create_table_with_constraints_argsStandardScheme getScheme() { + return new create_table_with_constraints_argsStandardScheme(); + } + } + + private static class create_table_with_constraints_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_constraints_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: // PRIMARY_KEYS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list764 = iprot.readListBegin(); + struct.primaryKeys = new ArrayList(_list764.size); + SQLPrimaryKey _elem765; + for (int _i766 = 0; _i766 < _list764.size; ++_i766) + { + _elem765 = new SQLPrimaryKey(); + _elem765.read(iprot); + struct.primaryKeys.add(_elem765); + } + iprot.readListEnd(); + } + struct.setPrimaryKeysIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FOREIGN_KEYS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list767 = iprot.readListBegin(); + struct.foreignKeys = new ArrayList(_list767.size); + SQLForeignKey _elem768; + for (int _i769 = 0; _i769 < _list767.size; ++_i769) + { + _elem768 = new SQLForeignKey(); + _elem768.read(iprot); + struct.foreignKeys.add(_elem768); + } + iprot.readListEnd(); + } + struct.setForeignKeysIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // UNIQUE_CONSTRAINTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list770 = iprot.readListBegin(); + struct.uniqueConstraints = new ArrayList(_list770.size); + SQLUniqueConstraint _elem771; + for (int _i772 = 0; _i772 < _list770.size; ++_i772) + { + _elem771 = new SQLUniqueConstraint(); + _elem771.read(iprot); + struct.uniqueConstraints.add(_elem771); + } + iprot.readListEnd(); + } + struct.setUniqueConstraintsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // NOT_NULL_CONSTRAINTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list773 = iprot.readListBegin(); + struct.notNullConstraints = new ArrayList(_list773.size); + SQLNotNullConstraint _elem774; + for (int _i775 = 0; _i775 < _list773.size; ++_i775) + { + _elem774 = new SQLNotNullConstraint(); + _elem774.read(iprot); + struct.notNullConstraints.add(_elem774); + } + iprot.readListEnd(); + } + struct.setNotNullConstraintsIsSet(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_constraints_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.primaryKeys != null) { + oprot.writeFieldBegin(PRIMARY_KEYS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.primaryKeys.size())); + for (SQLPrimaryKey _iter776 : struct.primaryKeys) + { + _iter776.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.foreignKeys != null) { + oprot.writeFieldBegin(FOREIGN_KEYS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeys.size())); + for (SQLForeignKey _iter777 : struct.foreignKeys) + { + _iter777.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.uniqueConstraints != null) { + oprot.writeFieldBegin(UNIQUE_CONSTRAINTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.uniqueConstraints.size())); + for (SQLUniqueConstraint _iter778 : struct.uniqueConstraints) + { + _iter778.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.notNullConstraints != null) { + oprot.writeFieldBegin(NOT_NULL_CONSTRAINTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.notNullConstraints.size())); + for (SQLNotNullConstraint _iter779 : struct.notNullConstraints) + { + _iter779.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_table_with_constraints_argsTupleSchemeFactory implements SchemeFactory { + public create_table_with_constraints_argsTupleScheme getScheme() { + return new create_table_with_constraints_argsTupleScheme(); + } + } + + private static class create_table_with_constraints_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_constraints_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTbl()) { + optionals.set(0); + } + if (struct.isSetPrimaryKeys()) { + optionals.set(1); + } + if (struct.isSetForeignKeys()) { + optionals.set(2); + } + if (struct.isSetUniqueConstraints()) { + optionals.set(3); + } + if (struct.isSetNotNullConstraints()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetTbl()) { + struct.tbl.write(oprot); + } + if (struct.isSetPrimaryKeys()) { + { + oprot.writeI32(struct.primaryKeys.size()); + for (SQLPrimaryKey _iter780 : struct.primaryKeys) + { + _iter780.write(oprot); + } + } + } + if (struct.isSetForeignKeys()) { + { + oprot.writeI32(struct.foreignKeys.size()); + for (SQLForeignKey _iter781 : struct.foreignKeys) + { + _iter781.write(oprot); + } + } + } + if (struct.isSetUniqueConstraints()) { + { + oprot.writeI32(struct.uniqueConstraints.size()); + for (SQLUniqueConstraint _iter782 : struct.uniqueConstraints) + { + _iter782.write(oprot); + } + } + } + if (struct.isSetNotNullConstraints()) { + { + oprot.writeI32(struct.notNullConstraints.size()); + for (SQLNotNullConstraint _iter783 : struct.notNullConstraints) + { + _iter783.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_table_with_constraints_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.tbl = new Table(); + struct.tbl.read(iprot); + struct.setTblIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list784 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.primaryKeys = new ArrayList(_list784.size); + SQLPrimaryKey _elem785; + for (int _i786 = 0; _i786 < _list784.size; ++_i786) + { + _elem785 = new SQLPrimaryKey(); + _elem785.read(iprot); + struct.primaryKeys.add(_elem785); + } + } + struct.setPrimaryKeysIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list787 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.foreignKeys = new ArrayList(_list787.size); + SQLForeignKey _elem788; + for (int _i789 = 0; _i789 < _list787.size; ++_i789) + { + _elem788 = new SQLForeignKey(); + _elem788.read(iprot); + struct.foreignKeys.add(_elem788); + } + } + struct.setForeignKeysIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list790 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.uniqueConstraints = new ArrayList(_list790.size); + SQLUniqueConstraint _elem791; + for (int _i792 = 0; _i792 < _list790.size; ++_i792) + { + _elem791 = new SQLUniqueConstraint(); + _elem791.read(iprot); + struct.uniqueConstraints.add(_elem791); + } + } + struct.setUniqueConstraintsIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TList _list793 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.notNullConstraints = new ArrayList(_list793.size); + SQLNotNullConstraint _elem794; + for (int _i795 = 0; _i795 < _list793.size; ++_i795) + { + _elem794 = new SQLNotNullConstraint(); + _elem794.read(iprot); + struct.notNullConstraints.add(_elem794); + } + } + struct.setNotNullConstraintsIsSet(true); + } + } + } + + } + + public static class create_table_with_constraints_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_constraints_result"); + + 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 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_constraints_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_table_with_constraints_resultTupleSchemeFactory()); + } + + private AlreadyExistsException o1; // required + private InvalidObjectException o2; // required + private MetaException o3; // required + private NoSuchObjectException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_with_constraints_result.class, metaDataMap); + } + + public create_table_with_constraints_result() { + } + + public create_table_with_constraints_result( + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3, + NoSuchObjectException o4) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public create_table_with_constraints_result(create_table_with_constraints_result other) { + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new NoSuchObjectException(other.o4); + } + } + + public create_table_with_constraints_result deepCopy() { + return new create_table_with_constraints_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public NoSuchObjectException getO4() { + return this.o4; + } + + public void setO4(NoSuchObjectException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_table_with_constraints_result) + return this.equals((create_table_with_constraints_result)that); + return false; + } + + public boolean equals(create_table_with_constraints_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(create_table_with_constraints_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_table_with_constraints_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + 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 create_table_with_constraints_resultStandardSchemeFactory implements SchemeFactory { + public create_table_with_constraints_resultStandardScheme getScheme() { + return new create_table_with_constraints_resultStandardScheme(); + } + } + + private static class create_table_with_constraints_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_constraints_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_constraints_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_constraints_resultTupleSchemeFactory implements SchemeFactory { + public create_table_with_constraints_resultTupleScheme getScheme() { + return new create_table_with_constraints_resultTupleScheme(); + } + } + + private static class create_table_with_constraints_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_constraints_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_constraints_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_constraint_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_constraint_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_constraint_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_constraint_argsTupleSchemeFactory()); + } + + private DropConstraintRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DropConstraintRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_constraint_args.class, metaDataMap); + } + + public drop_constraint_args() { + } + + public drop_constraint_args( + DropConstraintRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public drop_constraint_args(drop_constraint_args other) { + if (other.isSetReq()) { + this.req = new DropConstraintRequest(other.req); + } + } + + public drop_constraint_args deepCopy() { + return new drop_constraint_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public DropConstraintRequest getReq() { + return this.req; + } + + public void setReq(DropConstraintRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((DropConstraintRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_constraint_args) + return this.equals((drop_constraint_args)that); + return false; + } + + public boolean equals(drop_constraint_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_constraint_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_constraint_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 drop_constraint_argsStandardSchemeFactory implements SchemeFactory { + public drop_constraint_argsStandardScheme getScheme() { + return new drop_constraint_argsStandardScheme(); + } + } + + private static class drop_constraint_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_constraint_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new DropConstraintRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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_constraint_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_constraint_argsTupleSchemeFactory implements SchemeFactory { + public drop_constraint_argsTupleScheme getScheme() { + return new drop_constraint_argsTupleScheme(); + } + } + + private static class drop_constraint_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_constraint_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_constraint_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new DropConstraintRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class drop_constraint_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_constraint_result"); + + 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_constraint_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_constraint_resultTupleSchemeFactory()); + } + + private NoSuchObjectException o1; // required + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O3((short)2, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_constraint_result.class, metaDataMap); + } + + public drop_constraint_result() { + } + + public drop_constraint_result( + NoSuchObjectException o1, + MetaException o3) + { + this(); + this.o1 = o1; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public drop_constraint_result(drop_constraint_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public drop_constraint_result deepCopy() { + return new drop_constraint_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o3 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_constraint_result) + return this.equals((drop_constraint_result)that); + return false; + } + + public boolean equals(drop_constraint_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_constraint_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_constraint_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 drop_constraint_resultStandardSchemeFactory implements SchemeFactory { + public drop_constraint_resultStandardScheme getScheme() { + return new drop_constraint_resultStandardScheme(); + } + } + + private static class drop_constraint_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_constraint_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_constraint_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_constraint_resultTupleSchemeFactory implements SchemeFactory { + public drop_constraint_resultTupleScheme getScheme() { + return new drop_constraint_resultTupleScheme(); + } + } + + private static class drop_constraint_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_constraint_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_constraint_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 add_primary_key_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_primary_key_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_primary_key_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_primary_key_argsTupleSchemeFactory()); + } + + private AddPrimaryKeyRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddPrimaryKeyRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_primary_key_args.class, metaDataMap); + } + + public add_primary_key_args() { + } + + public add_primary_key_args( + AddPrimaryKeyRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public add_primary_key_args(add_primary_key_args other) { + if (other.isSetReq()) { + this.req = new AddPrimaryKeyRequest(other.req); + } + } + + public add_primary_key_args deepCopy() { + return new add_primary_key_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public AddPrimaryKeyRequest getReq() { + return this.req; + } + + public void setReq(AddPrimaryKeyRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((AddPrimaryKeyRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_primary_key_args) + return this.equals((add_primary_key_args)that); + return false; + } + + public boolean equals(add_primary_key_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(add_primary_key_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_primary_key_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 add_primary_key_argsStandardSchemeFactory implements SchemeFactory { + public add_primary_key_argsStandardScheme getScheme() { + return new add_primary_key_argsStandardScheme(); + } + } + + private static class add_primary_key_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_primary_key_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new AddPrimaryKeyRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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_primary_key_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_primary_key_argsTupleSchemeFactory implements SchemeFactory { + public add_primary_key_argsTupleScheme getScheme() { + return new add_primary_key_argsTupleScheme(); + } + } + + private static class add_primary_key_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_primary_key_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_primary_key_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new AddPrimaryKeyRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class add_primary_key_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_primary_key_result"); + + 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 add_primary_key_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_primary_key_resultTupleSchemeFactory()); + } + + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_primary_key_result.class, metaDataMap); + } + + public add_primary_key_result() { + } + + public add_primary_key_result( + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public add_primary_key_result(add_primary_key_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public add_primary_key_result deepCopy() { + return new add_primary_key_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_primary_key_result) + return this.equals((add_primary_key_result)that); + return false; + } + + public boolean equals(add_primary_key_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(add_primary_key_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_primary_key_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 add_primary_key_resultStandardSchemeFactory implements SchemeFactory { + public add_primary_key_resultStandardScheme getScheme() { + return new add_primary_key_resultStandardScheme(); + } + } + + private static class add_primary_key_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_primary_key_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 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, add_primary_key_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 add_primary_key_resultTupleSchemeFactory implements SchemeFactory { + public add_primary_key_resultTupleScheme getScheme() { + return new add_primary_key_resultTupleScheme(); + } + } + + private static class add_primary_key_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_primary_key_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, add_primary_key_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.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + + } + + public static class add_foreign_key_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_foreign_key_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_foreign_key_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_foreign_key_argsTupleSchemeFactory()); + } + + private AddForeignKeyRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddForeignKeyRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_foreign_key_args.class, metaDataMap); + } + + public add_foreign_key_args() { + } + + public add_foreign_key_args( + AddForeignKeyRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public add_foreign_key_args(add_foreign_key_args other) { + if (other.isSetReq()) { + this.req = new AddForeignKeyRequest(other.req); + } + } + + public add_foreign_key_args deepCopy() { + return new add_foreign_key_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public AddForeignKeyRequest getReq() { + return this.req; + } + + public void setReq(AddForeignKeyRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((AddForeignKeyRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_foreign_key_args) + return this.equals((add_foreign_key_args)that); + return false; + } + + public boolean equals(add_foreign_key_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(add_foreign_key_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_foreign_key_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 add_foreign_key_argsStandardSchemeFactory implements SchemeFactory { + public add_foreign_key_argsStandardScheme getScheme() { + return new add_foreign_key_argsStandardScheme(); + } + } + + private static class add_foreign_key_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_foreign_key_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new AddForeignKeyRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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_foreign_key_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_foreign_key_argsTupleSchemeFactory implements SchemeFactory { + public add_foreign_key_argsTupleScheme getScheme() { + return new add_foreign_key_argsTupleScheme(); + } + } + + private static class add_foreign_key_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_foreign_key_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_foreign_key_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new AddForeignKeyRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class add_foreign_key_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_foreign_key_result"); + + 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 add_foreign_key_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_foreign_key_resultTupleSchemeFactory()); + } + + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_foreign_key_result.class, metaDataMap); + } + + public add_foreign_key_result() { + } + + public add_foreign_key_result( + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public add_foreign_key_result(add_foreign_key_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public add_foreign_key_result deepCopy() { + return new add_foreign_key_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_foreign_key_result) + return this.equals((add_foreign_key_result)that); + return false; + } + + public boolean equals(add_foreign_key_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(add_foreign_key_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_foreign_key_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 add_foreign_key_resultStandardSchemeFactory implements SchemeFactory { + public add_foreign_key_resultStandardScheme getScheme() { + return new add_foreign_key_resultStandardScheme(); + } + } + + private static class add_foreign_key_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_foreign_key_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 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, add_foreign_key_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 add_foreign_key_resultTupleSchemeFactory implements SchemeFactory { + public add_foreign_key_resultTupleScheme getScheme() { + return new add_foreign_key_resultTupleScheme(); + } + } + + private static class add_foreign_key_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_foreign_key_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, add_foreign_key_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.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + + } + + public static class add_unique_constraint_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_unique_constraint_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_unique_constraint_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_unique_constraint_argsTupleSchemeFactory()); + } + + private AddUniqueConstraintRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddUniqueConstraintRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_unique_constraint_args.class, metaDataMap); + } + + public add_unique_constraint_args() { + } + + public add_unique_constraint_args( + AddUniqueConstraintRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public add_unique_constraint_args(add_unique_constraint_args other) { + if (other.isSetReq()) { + this.req = new AddUniqueConstraintRequest(other.req); + } + } + + public add_unique_constraint_args deepCopy() { + return new add_unique_constraint_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public AddUniqueConstraintRequest getReq() { + return this.req; + } + + public void setReq(AddUniqueConstraintRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((AddUniqueConstraintRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_unique_constraint_args) + return this.equals((add_unique_constraint_args)that); + return false; + } + + public boolean equals(add_unique_constraint_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(add_unique_constraint_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_unique_constraint_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 add_unique_constraint_argsStandardSchemeFactory implements SchemeFactory { + public add_unique_constraint_argsStandardScheme getScheme() { + return new add_unique_constraint_argsStandardScheme(); + } + } + + private static class add_unique_constraint_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_unique_constraint_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new AddUniqueConstraintRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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_unique_constraint_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_unique_constraint_argsTupleSchemeFactory implements SchemeFactory { + public add_unique_constraint_argsTupleScheme getScheme() { + return new add_unique_constraint_argsTupleScheme(); + } + } + + private static class add_unique_constraint_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_unique_constraint_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_unique_constraint_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new AddUniqueConstraintRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class add_unique_constraint_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_unique_constraint_result"); + + 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 add_unique_constraint_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_unique_constraint_resultTupleSchemeFactory()); + } + + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_unique_constraint_result.class, metaDataMap); + } + + public add_unique_constraint_result() { + } + + public add_unique_constraint_result( + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public add_unique_constraint_result(add_unique_constraint_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public add_unique_constraint_result deepCopy() { + return new add_unique_constraint_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_unique_constraint_result) + return this.equals((add_unique_constraint_result)that); + return false; + } + + public boolean equals(add_unique_constraint_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(add_unique_constraint_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_unique_constraint_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 add_unique_constraint_resultStandardSchemeFactory implements SchemeFactory { + public add_unique_constraint_resultStandardScheme getScheme() { + return new add_unique_constraint_resultStandardScheme(); + } + } + + private static class add_unique_constraint_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_unique_constraint_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 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, add_unique_constraint_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 add_unique_constraint_resultTupleSchemeFactory implements SchemeFactory { + public add_unique_constraint_resultTupleScheme getScheme() { + return new add_unique_constraint_resultTupleScheme(); + } + } + + private static class add_unique_constraint_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_unique_constraint_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, add_unique_constraint_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.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + + } + + public static class add_not_null_constraint_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_not_null_constraint_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_not_null_constraint_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_not_null_constraint_argsTupleSchemeFactory()); + } + + private AddNotNullConstraintRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddNotNullConstraintRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_not_null_constraint_args.class, metaDataMap); + } + + public add_not_null_constraint_args() { + } + + public add_not_null_constraint_args( + AddNotNullConstraintRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public add_not_null_constraint_args(add_not_null_constraint_args other) { + if (other.isSetReq()) { + this.req = new AddNotNullConstraintRequest(other.req); + } + } + + public add_not_null_constraint_args deepCopy() { + return new add_not_null_constraint_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public AddNotNullConstraintRequest getReq() { + return this.req; + } + + public void setReq(AddNotNullConstraintRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((AddNotNullConstraintRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_not_null_constraint_args) + return this.equals((add_not_null_constraint_args)that); + return false; + } + + public boolean equals(add_not_null_constraint_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(add_not_null_constraint_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_not_null_constraint_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 add_not_null_constraint_argsStandardSchemeFactory implements SchemeFactory { + public add_not_null_constraint_argsStandardScheme getScheme() { + return new add_not_null_constraint_argsStandardScheme(); + } + } + + private static class add_not_null_constraint_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_not_null_constraint_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new AddNotNullConstraintRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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_not_null_constraint_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_not_null_constraint_argsTupleSchemeFactory implements SchemeFactory { + public add_not_null_constraint_argsTupleScheme getScheme() { + return new add_not_null_constraint_argsTupleScheme(); + } + } + + private static class add_not_null_constraint_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_not_null_constraint_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_not_null_constraint_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new AddNotNullConstraintRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class add_not_null_constraint_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_not_null_constraint_result"); + + 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 add_not_null_constraint_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_not_null_constraint_resultTupleSchemeFactory()); + } + + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_not_null_constraint_result.class, metaDataMap); + } + + public add_not_null_constraint_result() { + } + + public add_not_null_constraint_result( + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public add_not_null_constraint_result(add_not_null_constraint_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public add_not_null_constraint_result deepCopy() { + return new add_not_null_constraint_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_not_null_constraint_result) + return this.equals((add_not_null_constraint_result)that); + return false; + } + + public boolean equals(add_not_null_constraint_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(add_not_null_constraint_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_not_null_constraint_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 add_not_null_constraint_resultStandardSchemeFactory implements SchemeFactory { + public add_not_null_constraint_resultStandardScheme getScheme() { + return new add_not_null_constraint_resultStandardScheme(); + } + } + + private static class add_not_null_constraint_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_not_null_constraint_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 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, add_not_null_constraint_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 add_not_null_constraint_resultTupleSchemeFactory implements SchemeFactory { + public add_not_null_constraint_resultTupleScheme getScheme() { + return new add_not_null_constraint_resultTupleScheme(); + } + } + + private static class add_not_null_constraint_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_not_null_constraint_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, add_not_null_constraint_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.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + + } + + public static class drop_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DBNAME((short)1, "dbname"), + NAME((short)2, "name"), + DELETE_DATA((short)3, "deleteData"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // NAME + return NAME; + case 3: // DELETE_DATA + return DELETE_DATA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap); + } + + public drop_table_args() { + } + + public drop_table_args( + String dbname, + String name, + boolean deleteData) + { + this(); + this.dbname = dbname; + this.name = name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public drop_table_args(drop_table_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetName()) { + this.name = other.name; + } + this.deleteData = other.deleteData; + } + + public drop_table_args deepCopy() { + return new drop_table_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case NAME: + return getName(); + + case DELETE_DATA: + return isDeleteData(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case NAME: + return isSetName(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_table_args) + return this.equals((drop_table_args)that); + return false; + } + + public boolean equals(drop_table_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + boolean present_deleteData = true; + list.add(present_deleteData); + if (present_deleteData) + list.add(deleteData); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_table_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + 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 { + // 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_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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O3((short)2, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_table_result.class, metaDataMap); + } + + public drop_table_result() { + } + + public drop_table_result( + NoSuchObjectException o1, + MetaException o3) + { + this(); + this.o1 = o1; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public drop_table_result(drop_table_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public drop_table_result deepCopy() { + return new drop_table_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o3 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_table_result) + return this.equals((drop_table_result)that); + return false; + } + + public boolean equals(drop_table_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 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 drop_table_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_with_environment_context_args"); + + 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 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 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 drop_table_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_table_with_environment_context_argsTupleSchemeFactory()); + } + + private String dbname; // required + private String name; // required + private boolean deleteData; // required + private EnvironmentContext environment_context; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DBNAME((short)1, "dbname"), + NAME((short)2, "name"), + DELETE_DATA((short)3, "deleteData"), + ENVIRONMENT_CONTEXT((short)4, "environment_context"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // NAME + return NAME; + case 3: // DELETE_DATA + return DELETE_DATA; + case 4: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_table_with_environment_context_args.class, metaDataMap); + } + + public drop_table_with_environment_context_args() { + } + + public drop_table_with_environment_context_args( + String dbname, + String name, + boolean deleteData, + EnvironmentContext environment_context) + { + this(); + this.dbname = dbname; + this.name = name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + this.environment_context = environment_context; + } + + /** + * Performs a deep copy on other. + */ + public drop_table_with_environment_context_args(drop_table_with_environment_context_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetName()) { + this.name = other.name; + } + this.deleteData = other.deleteData; + if (other.isSetEnvironment_context()) { + this.environment_context = new EnvironmentContext(other.environment_context); + } + } + + public drop_table_with_environment_context_args deepCopy() { + return new drop_table_with_environment_context_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + this.environment_context = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); + } + + public EnvironmentContext getEnvironment_context() { + return this.environment_context; + } + + public void setEnvironment_context(EnvironmentContext environment_context) { + this.environment_context = environment_context; + } + + public void unsetEnvironment_context() { + this.environment_context = null; + } + + /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment_context() { + return this.environment_context != null; + } + + public void setEnvironment_contextIsSet(boolean value) { + if (!value) { + this.environment_context = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironment_context(); + } else { + setEnvironment_context((EnvironmentContext)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case NAME: + return getName(); + + case DELETE_DATA: + return isDeleteData(); + + case ENVIRONMENT_CONTEXT: + return getEnvironment_context(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case NAME: + return isSetName(); + case DELETE_DATA: + return isSetDeleteData(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironment_context(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_table_with_environment_context_args) + return this.equals((drop_table_with_environment_context_args)that); + return false; + } + + public boolean equals(drop_table_with_environment_context_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + boolean this_present_environment_context = true && this.isSetEnvironment_context(); + boolean that_present_environment_context = true && that.isSetEnvironment_context(); + if (this_present_environment_context || that_present_environment_context) { + if (!(this_present_environment_context && that_present_environment_context)) + return false; + if (!this.environment_context.equals(that.environment_context)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + boolean present_deleteData = true; + list.add(present_deleteData); + if (present_deleteData) + list.add(deleteData); + + boolean present_environment_context = true && (isSetEnvironment_context()); + list.add(present_environment_context); + if (present_environment_context) + list.add(environment_context); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_table_with_environment_context_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment_context()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_table_with_environment_context_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + if (!first) sb.append(", "); + sb.append("environment_context:"); + if (this.environment_context == null) { + sb.append("null"); + } else { + sb.append(this.environment_context); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (environment_context != null) { + environment_context.validate(); + } + } + + 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 { + // 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_table_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public drop_table_with_environment_context_argsStandardScheme getScheme() { + return new drop_table_with_environment_context_argsStandardScheme(); + } + } + + private static class drop_table_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_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: // 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; + 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, drop_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.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(); + 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 drop_table_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public drop_table_with_environment_context_argsTupleScheme getScheme() { + return new drop_table_with_environment_context_argsTupleScheme(); + } + } + + private static class drop_table_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_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.isSetName()) { + optionals.set(1); + } + if (struct.isSetDeleteData()) { + optionals.set(2); + } + if (struct.isSetEnvironment_context()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_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.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(2)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + if (incoming.get(3)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + + } + + public static class drop_table_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_with_environment_context_result"); + + 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_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_table_with_environment_context_resultTupleSchemeFactory()); + } + + private NoSuchObjectException o1; // required + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O3((short)2, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_table_with_environment_context_result.class, metaDataMap); + } + + public drop_table_with_environment_context_result() { + } + + public drop_table_with_environment_context_result( + NoSuchObjectException o1, + MetaException o3) + { + this(); + this.o1 = o1; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public drop_table_with_environment_context_result(drop_table_with_environment_context_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public drop_table_with_environment_context_result deepCopy() { + return new drop_table_with_environment_context_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o3 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_table_with_environment_context_result) + return this.equals((drop_table_with_environment_context_result)that); + return false; + } + + public boolean equals(drop_table_with_environment_context_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_table_with_environment_context_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_table_with_environment_context_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 drop_table_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public drop_table_with_environment_context_resultStandardScheme getScheme() { + return new drop_table_with_environment_context_resultStandardScheme(); + } + } + + private static class drop_table_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_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 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_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.o3 != null) { + oprot.writeFieldBegin(O3_FIELD_DESC); + struct.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_table_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public drop_table_with_environment_context_resultTupleScheme getScheme() { + return new drop_table_with_environment_context_resultTupleScheme(); + } + } + + private static class drop_table_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_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.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_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 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 truncate_table_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("truncate_table_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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 TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PART_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partNames", org.apache.thrift.protocol.TType.LIST, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new truncate_table_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new truncate_table_argsTupleSchemeFactory()); + } + + private String dbName; // required + private String tableName; // required + private List partNames; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"), + TABLE_NAME((short)2, "tableName"), + PART_NAMES((short)3, "partNames"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + case 3: // PART_NAMES + return PART_NAMES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_NAMES, new org.apache.thrift.meta_data.FieldMetaData("partNames", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(truncate_table_args.class, metaDataMap); + } + + public truncate_table_args() { + } + + public truncate_table_args( + String dbName, + String tableName, + List partNames) + { + this(); + this.dbName = dbName; + this.tableName = tableName; + this.partNames = partNames; + } + + /** + * Performs a deep copy on other. + */ + public truncate_table_args(truncate_table_args other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetPartNames()) { + List __this__partNames = new ArrayList(other.partNames); + this.partNames = __this__partNames; + } + } + + public truncate_table_args deepCopy() { + return new truncate_table_args(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tableName = null; + this.partNames = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTableName() { + return this.tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getPartNamesSize() { + return (this.partNames == null) ? 0 : this.partNames.size(); + } + + public java.util.Iterator getPartNamesIterator() { + return (this.partNames == null) ? null : this.partNames.iterator(); + } + + public void addToPartNames(String elem) { + if (this.partNames == null) { + this.partNames = new ArrayList(); + } + this.partNames.add(elem); + } + + public List getPartNames() { + return this.partNames; + } + + public void setPartNames(List partNames) { + this.partNames = partNames; + } + + public void unsetPartNames() { + this.partNames = null; + } + + /** Returns true if field partNames is set (has been assigned a value) and false otherwise */ + public boolean isSetPartNames() { + return this.partNames != null; + } + + public void setPartNamesIsSet(boolean value) { + if (!value) { + this.partNames = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + case PART_NAMES: + if (value == null) { + unsetPartNames(); + } else { + setPartNames((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TABLE_NAME: + return getTableName(); + + case PART_NAMES: + return getPartNames(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case TABLE_NAME: + return isSetTableName(); + case PART_NAMES: + return isSetPartNames(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof truncate_table_args) + return this.equals((truncate_table_args)that); + return false; + } + + public boolean equals(truncate_table_args that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_partNames = true && this.isSetPartNames(); + boolean that_present_partNames = true && that.isSetPartNames(); + if (this_present_partNames || that_present_partNames) { + if (!(this_present_partNames && that_present_partNames)) + return false; + if (!this.partNames.equals(that.partNames)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); + + boolean present_partNames = true && (isSetPartNames()); + list.add(present_partNames); + if (present_partNames) + list.add(partNames); + + return list.hashCode(); + } + + @Override + public int compareTo(truncate_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartNames()).compareTo(other.isSetPartNames()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartNames()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partNames, other.partNames); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("truncate_table_args("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("partNames:"); + if (this.partNames == null) { + sb.append("null"); + } else { + sb.append(this.partNames); + } + 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 truncate_table_argsStandardSchemeFactory implements SchemeFactory { + public truncate_table_argsStandardScheme getScheme() { + return new truncate_table_argsStandardScheme(); + } + } + + private static class truncate_table_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, truncate_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: // 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 2: // 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 3: // PART_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list796 = iprot.readListBegin(); + struct.partNames = new ArrayList(_list796.size); + String _elem797; + for (int _i798 = 0; _i798 < _list796.size; ++_i798) + { + _elem797 = iprot.readString(); + struct.partNames.add(_elem797); + } + iprot.readListEnd(); + } + struct.setPartNamesIsSet(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, truncate_table_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + 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(); + } + if (struct.partNames != null) { + oprot.writeFieldBegin(PART_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partNames.size())); + for (String _iter799 : struct.partNames) + { + oprot.writeString(_iter799); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class truncate_table_argsTupleSchemeFactory implements SchemeFactory { + public truncate_table_argsTupleScheme getScheme() { + return new truncate_table_argsTupleScheme(); + } + } + + private static class truncate_table_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, truncate_table_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + if (struct.isSetTableName()) { + optionals.set(1); + } + if (struct.isSetPartNames()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetTableName()) { + oprot.writeString(struct.tableName); + } + if (struct.isSetPartNames()) { + { + oprot.writeI32(struct.partNames.size()); + for (String _iter800 : struct.partNames) + { + oprot.writeString(_iter800); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, truncate_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.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list801 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.partNames = new ArrayList(_list801.size); + String _elem802; + for (int _i803 = 0; _i803 < _list801.size; ++_i803) + { + _elem802 = iprot.readString(); + struct.partNames.add(_elem802); + } + } + struct.setPartNamesIsSet(true); + } + } + } + + } + + public static class truncate_table_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("truncate_table_result"); + + 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 truncate_table_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new truncate_table_resultTupleSchemeFactory()); + } + + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(truncate_table_result.class, metaDataMap); + } + + public truncate_table_result() { + } + + public truncate_table_result( + MetaException o1) + { + this(); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public truncate_table_result(truncate_table_result other) { + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public truncate_table_result deepCopy() { + return new truncate_table_result(this); + } + + @Override + public void clear() { + this.o1 = null; + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof truncate_table_result) + return this.equals((truncate_table_result)that); + return false; + } + + public boolean equals(truncate_table_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(truncate_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("truncate_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 truncate_table_resultStandardSchemeFactory implements SchemeFactory { + public truncate_table_resultStandardScheme getScheme() { + return new truncate_table_resultStandardScheme(); + } + } + + private static class truncate_table_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, truncate_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 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, truncate_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class truncate_table_resultTupleSchemeFactory implements SchemeFactory { + public truncate_table_resultTupleScheme getScheme() { + return new truncate_table_resultTupleScheme(); + } + } + + private static class truncate_table_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, truncate_table_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, truncate_table_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); + } + } + } + + } + + public static class get_tables_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + PATTERN((short)2, "pattern"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // PATTERN + return PATTERN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PATTERN, new org.apache.thrift.meta_data.FieldMetaData("pattern", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap); + } + + public get_tables_args() { + } + + public get_tables_args( + String db_name, + String pattern) + { + this(); + this.db_name = db_name; + this.pattern = pattern; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_args(get_tables_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetPattern()) { + this.pattern = other.pattern; + } + } + + public get_tables_args deepCopy() { + return new get_tables_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.pattern = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getPattern() { + return this.pattern; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + public void unsetPattern() { + this.pattern = null; + } + + /** Returns true if field pattern is set (has been assigned a value) and false otherwise */ + public boolean isSetPattern() { + return this.pattern != null; + } + + public void setPatternIsSet(boolean value) { + if (!value) { + this.pattern = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case PATTERN: + if (value == null) { + unsetPattern(); + } else { + setPattern((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case PATTERN: + return getPattern(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case PATTERN: + return isSetPattern(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_tables_args) + return this.equals((get_tables_args)that); + return false; + } + + public boolean equals(get_tables_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_pattern = true && this.isSetPattern(); + boolean that_present_pattern = true && that.isSetPattern(); + if (this_present_pattern || that_present_pattern) { + if (!(this_present_pattern && that_present_pattern)) + return false; + if (!this.pattern.equals(that.pattern)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_pattern = true && (isSetPattern()); + list.add(present_pattern); + if (present_pattern) + list.add(pattern); + + return list.hashCode(); + } + + @Override + public int compareTo(get_tables_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPattern()).compareTo(other.isSetPattern()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPattern()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, other.pattern); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_tables_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("pattern:"); + if (this.pattern == null) { + sb.append("null"); + } else { + sb.append(this.pattern); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); + } + + public get_tables_result() { + } + + public get_tables_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_result(get_tables_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_tables_result deepCopy() { + return new get_tables_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_tables_result) + return this.equals((get_tables_result)that); + return false; + } + + public boolean equals(get_tables_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_tables_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_tables_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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 _list804 = iprot.readListBegin(); + struct.success = new ArrayList(_list804.size); + String _elem805; + for (int _i806 = 0; _i806 < _list804.size; ++_i806) + { + _elem805 = iprot.readString(); + struct.success.add(_elem805); + } + 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 _iter807 : struct.success) + { + oprot.writeString(_iter807); + } + 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 _iter808 : struct.success) + { + oprot.writeString(_iter808); + } + } + } + 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 _list809 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list809.size); + String _elem810; + for (int _i811 = 0; _i811 < _list809.size; ++_i811) + { + _elem810 = iprot.readString(); + struct.success.add(_elem810); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + + } + + public static class get_tables_by_type_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_by_type_args"); + + 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 org.apache.thrift.protocol.TField TABLE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("tableType", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_tables_by_type_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_tables_by_type_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String pattern; // required + private String tableType; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + PATTERN((short)2, "pattern"), + TABLE_TYPE((short)3, "tableType"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // PATTERN + return PATTERN; + case 3: // TABLE_TYPE + return TABLE_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PATTERN, new org.apache.thrift.meta_data.FieldMetaData("pattern", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("tableType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_by_type_args.class, metaDataMap); + } + + public get_tables_by_type_args() { + } + + public get_tables_by_type_args( + String db_name, + String pattern, + String tableType) + { + this(); + this.db_name = db_name; + this.pattern = pattern; + this.tableType = tableType; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_by_type_args(get_tables_by_type_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetPattern()) { + this.pattern = other.pattern; + } + if (other.isSetTableType()) { + this.tableType = other.tableType; + } + } + + public get_tables_by_type_args deepCopy() { + return new get_tables_by_type_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.pattern = null; + this.tableType = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getPattern() { + return this.pattern; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + public void unsetPattern() { + this.pattern = null; + } + + /** Returns true if field pattern is set (has been assigned a value) and false otherwise */ + public boolean isSetPattern() { + return this.pattern != null; + } + + public void setPatternIsSet(boolean value) { + if (!value) { + this.pattern = null; + } + } + + public String getTableType() { + return this.tableType; + } + + public void setTableType(String tableType) { + this.tableType = tableType; + } + + public void unsetTableType() { + this.tableType = null; + } + + /** Returns true if field tableType is set (has been assigned a value) and false otherwise */ + public boolean isSetTableType() { + return this.tableType != null; + } + + public void setTableTypeIsSet(boolean value) { + if (!value) { + this.tableType = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case PATTERN: + if (value == null) { + unsetPattern(); + } else { + setPattern((String)value); + } + break; + + case TABLE_TYPE: + if (value == null) { + unsetTableType(); + } else { + setTableType((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case PATTERN: + return getPattern(); + + case TABLE_TYPE: + return getTableType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case PATTERN: + return isSetPattern(); + case TABLE_TYPE: + return isSetTableType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_tables_by_type_args) + return this.equals((get_tables_by_type_args)that); + return false; + } + + public boolean equals(get_tables_by_type_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_pattern = true && this.isSetPattern(); + boolean that_present_pattern = true && that.isSetPattern(); + if (this_present_pattern || that_present_pattern) { + if (!(this_present_pattern && that_present_pattern)) + return false; + if (!this.pattern.equals(that.pattern)) + return false; + } + + boolean this_present_tableType = true && this.isSetTableType(); + boolean that_present_tableType = true && that.isSetTableType(); + if (this_present_tableType || that_present_tableType) { + if (!(this_present_tableType && that_present_tableType)) + return false; + if (!this.tableType.equals(that.tableType)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_pattern = true && (isSetPattern()); + list.add(present_pattern); + if (present_pattern) + list.add(pattern); + + boolean present_tableType = true && (isSetTableType()); + list.add(present_tableType); + if (present_tableType) + list.add(tableType); + + return list.hashCode(); + } + + @Override + public int compareTo(get_tables_by_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPattern()).compareTo(other.isSetPattern()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPattern()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, other.pattern); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableType()).compareTo(other.isSetTableType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableType, other.tableType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_tables_by_type_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("pattern:"); + if (this.pattern == null) { + sb.append("null"); + } else { + sb.append(this.pattern); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableType:"); + if (this.tableType == null) { + sb.append("null"); + } else { + sb.append(this.tableType); + } + 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 get_tables_by_type_argsStandardSchemeFactory implements SchemeFactory { + public get_tables_by_type_argsStandardScheme getScheme() { + return new get_tables_by_type_argsStandardScheme(); + } + } + + private static class get_tables_by_type_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_by_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: // 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; + case 3: // 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; + 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_by_type_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(); + } + if (struct.tableType != null) { + oprot.writeFieldBegin(TABLE_TYPE_FIELD_DESC); + oprot.writeString(struct.tableType); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_tables_by_type_argsTupleSchemeFactory implements SchemeFactory { + public get_tables_by_type_argsTupleScheme getScheme() { + return new get_tables_by_type_argsTupleScheme(); + } + } + + private static class get_tables_by_type_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_by_type_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); + } + if (struct.isSetTableType()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_name()) { + oprot.writeString(struct.db_name); + } + if (struct.isSetPattern()) { + oprot.writeString(struct.pattern); + } + if (struct.isSetTableType()) { + oprot.writeString(struct.tableType); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_by_type_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.pattern = iprot.readString(); + struct.setPatternIsSet(true); + } + if (incoming.get(2)) { + struct.tableType = iprot.readString(); + struct.setTableTypeIsSet(true); + } + } + } + + } + + public static class get_tables_by_type_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_tables_by_type_result"); + + 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_by_type_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_tables_by_type_resultTupleSchemeFactory()); + } + + private List success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_tables_by_type_result.class, metaDataMap); + } + + public get_tables_by_type_result() { + } + + public get_tables_by_type_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_by_type_result(get_tables_by_type_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_tables_by_type_result deepCopy() { + return new get_tables_by_type_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_tables_by_type_result) + return this.equals((get_tables_by_type_result)that); + return false; + } + + public boolean equals(get_tables_by_type_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_tables_by_type_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_tables_by_type_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 get_tables_by_type_resultStandardSchemeFactory implements SchemeFactory { + public get_tables_by_type_resultStandardScheme getScheme() { + return new get_tables_by_type_resultStandardScheme(); + } + } + + private static class get_tables_by_type_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_tables_by_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.LIST) { + { + org.apache.thrift.protocol.TList _list812 = iprot.readListBegin(); + struct.success = new ArrayList(_list812.size); + String _elem813; + for (int _i814 = 0; _i814 < _list812.size; ++_i814) + { + _elem813 = iprot.readString(); + struct.success.add(_elem813); + } + 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_by_type_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 _iter815 : struct.success) + { + oprot.writeString(_iter815); + } + 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_by_type_resultTupleSchemeFactory implements SchemeFactory { + public get_tables_by_type_resultTupleScheme getScheme() { + return new get_tables_by_type_resultTupleScheme(); + } + } + + private static class get_tables_by_type_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_tables_by_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); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter816 : struct.success) + { + oprot.writeString(_iter816); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_tables_by_type_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 _list817 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list817.size); + String _elem818; + for (int _i819 = 0; _i819 < _list817.size; ++_i819) + { + _elem818 = iprot.readString(); + struct.success.add(_elem818); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + + } + + public static class get_table_meta_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_meta_args"); + + private static final org.apache.thrift.protocol.TField DB_PATTERNS_FIELD_DESC = new org.apache.thrift.protocol.TField("db_patterns", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TBL_PATTERNS_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_patterns", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TBL_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_types", org.apache.thrift.protocol.TType.LIST, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_meta_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_meta_argsTupleSchemeFactory()); + } + + private String db_patterns; // required + private String tbl_patterns; // required + private List tbl_types; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_PATTERNS((short)1, "db_patterns"), + TBL_PATTERNS((short)2, "tbl_patterns"), + TBL_TYPES((short)3, "tbl_types"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_PATTERNS + return DB_PATTERNS; + case 2: // TBL_PATTERNS + return TBL_PATTERNS; + case 3: // TBL_TYPES + return TBL_TYPES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_PATTERNS, new org.apache.thrift.meta_data.FieldMetaData("db_patterns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_PATTERNS, new org.apache.thrift.meta_data.FieldMetaData("tbl_patterns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_TYPES, new org.apache.thrift.meta_data.FieldMetaData("tbl_types", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_meta_args.class, metaDataMap); + } + + public get_table_meta_args() { + } + + public get_table_meta_args( + String db_patterns, + String tbl_patterns, + List tbl_types) + { + this(); + this.db_patterns = db_patterns; + this.tbl_patterns = tbl_patterns; + this.tbl_types = tbl_types; + } + + /** + * Performs a deep copy on other. + */ + public get_table_meta_args(get_table_meta_args other) { + if (other.isSetDb_patterns()) { + this.db_patterns = other.db_patterns; + } + if (other.isSetTbl_patterns()) { + this.tbl_patterns = other.tbl_patterns; + } + if (other.isSetTbl_types()) { + List __this__tbl_types = new ArrayList(other.tbl_types); + this.tbl_types = __this__tbl_types; + } + } + + public get_table_meta_args deepCopy() { + return new get_table_meta_args(this); + } + + @Override + public void clear() { + this.db_patterns = null; + this.tbl_patterns = null; + this.tbl_types = null; + } + + public String getDb_patterns() { + return this.db_patterns; + } + + public void setDb_patterns(String db_patterns) { + this.db_patterns = db_patterns; + } + + public void unsetDb_patterns() { + this.db_patterns = null; + } + + /** Returns true if field db_patterns is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_patterns() { + return this.db_patterns != null; + } + + public void setDb_patternsIsSet(boolean value) { + if (!value) { + this.db_patterns = null; + } + } + + public String getTbl_patterns() { + return this.tbl_patterns; + } + + public void setTbl_patterns(String tbl_patterns) { + this.tbl_patterns = tbl_patterns; + } + + public void unsetTbl_patterns() { + this.tbl_patterns = null; + } + + /** Returns true if field tbl_patterns is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_patterns() { + return this.tbl_patterns != null; + } + + public void setTbl_patternsIsSet(boolean value) { + if (!value) { + this.tbl_patterns = null; + } + } + + public int getTbl_typesSize() { + return (this.tbl_types == null) ? 0 : this.tbl_types.size(); + } + + public java.util.Iterator getTbl_typesIterator() { + return (this.tbl_types == null) ? null : this.tbl_types.iterator(); + } + + public void addToTbl_types(String elem) { + if (this.tbl_types == null) { + this.tbl_types = new ArrayList(); + } + this.tbl_types.add(elem); + } + + public List getTbl_types() { + return this.tbl_types; + } + + public void setTbl_types(List tbl_types) { + this.tbl_types = tbl_types; + } + + public void unsetTbl_types() { + this.tbl_types = null; + } + + /** Returns true if field tbl_types is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_types() { + return this.tbl_types != null; + } + + public void setTbl_typesIsSet(boolean value) { + if (!value) { + this.tbl_types = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_PATTERNS: + if (value == null) { + unsetDb_patterns(); + } else { + setDb_patterns((String)value); + } + break; + + case TBL_PATTERNS: + if (value == null) { + unsetTbl_patterns(); + } else { + setTbl_patterns((String)value); + } + break; + + case TBL_TYPES: + if (value == null) { + unsetTbl_types(); + } else { + setTbl_types((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_PATTERNS: + return getDb_patterns(); + + case TBL_PATTERNS: + return getTbl_patterns(); + + case TBL_TYPES: + return getTbl_types(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_PATTERNS: + return isSetDb_patterns(); + case TBL_PATTERNS: + return isSetTbl_patterns(); + case TBL_TYPES: + return isSetTbl_types(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_meta_args) + return this.equals((get_table_meta_args)that); + return false; + } + + public boolean equals(get_table_meta_args that) { + if (that == null) + return false; + + boolean this_present_db_patterns = true && this.isSetDb_patterns(); + boolean that_present_db_patterns = true && that.isSetDb_patterns(); + if (this_present_db_patterns || that_present_db_patterns) { + if (!(this_present_db_patterns && that_present_db_patterns)) + return false; + if (!this.db_patterns.equals(that.db_patterns)) + return false; + } + + boolean this_present_tbl_patterns = true && this.isSetTbl_patterns(); + boolean that_present_tbl_patterns = true && that.isSetTbl_patterns(); + if (this_present_tbl_patterns || that_present_tbl_patterns) { + if (!(this_present_tbl_patterns && that_present_tbl_patterns)) + return false; + if (!this.tbl_patterns.equals(that.tbl_patterns)) + return false; + } + + boolean this_present_tbl_types = true && this.isSetTbl_types(); + boolean that_present_tbl_types = true && that.isSetTbl_types(); + if (this_present_tbl_types || that_present_tbl_types) { + if (!(this_present_tbl_types && that_present_tbl_types)) + return false; + if (!this.tbl_types.equals(that.tbl_types)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_patterns = true && (isSetDb_patterns()); + list.add(present_db_patterns); + if (present_db_patterns) + list.add(db_patterns); + + boolean present_tbl_patterns = true && (isSetTbl_patterns()); + list.add(present_tbl_patterns); + if (present_tbl_patterns) + list.add(tbl_patterns); + + boolean present_tbl_types = true && (isSetTbl_types()); + list.add(present_tbl_types); + if (present_tbl_types) + list.add(tbl_types); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_meta_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_patterns()).compareTo(other.isSetDb_patterns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_patterns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_patterns, other.db_patterns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_patterns()).compareTo(other.isSetTbl_patterns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_patterns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_patterns, other.tbl_patterns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_types()).compareTo(other.isSetTbl_types()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_types()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_types, other.tbl_types); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_meta_args("); + boolean first = true; + + sb.append("db_patterns:"); + if (this.db_patterns == null) { + sb.append("null"); + } else { + sb.append(this.db_patterns); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_patterns:"); + if (this.tbl_patterns == null) { + sb.append("null"); + } else { + sb.append(this.tbl_patterns); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_types:"); + if (this.tbl_types == null) { + sb.append("null"); + } else { + sb.append(this.tbl_types); + } + 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 get_table_meta_argsStandardSchemeFactory implements SchemeFactory { + public get_table_meta_argsStandardScheme getScheme() { + return new get_table_meta_argsStandardScheme(); + } + } + + private static class get_table_meta_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_meta_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_PATTERNS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.db_patterns = iprot.readString(); + struct.setDb_patternsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_PATTERNS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tbl_patterns = iprot.readString(); + struct.setTbl_patternsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TBL_TYPES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list820 = iprot.readListBegin(); + struct.tbl_types = new ArrayList(_list820.size); + String _elem821; + for (int _i822 = 0; _i822 < _list820.size; ++_i822) + { + _elem821 = iprot.readString(); + struct.tbl_types.add(_elem821); + } + iprot.readListEnd(); + } + struct.setTbl_typesIsSet(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_meta_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.db_patterns != null) { + oprot.writeFieldBegin(DB_PATTERNS_FIELD_DESC); + oprot.writeString(struct.db_patterns); + oprot.writeFieldEnd(); + } + if (struct.tbl_patterns != null) { + oprot.writeFieldBegin(TBL_PATTERNS_FIELD_DESC); + oprot.writeString(struct.tbl_patterns); + oprot.writeFieldEnd(); + } + if (struct.tbl_types != null) { + oprot.writeFieldBegin(TBL_TYPES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tbl_types.size())); + for (String _iter823 : struct.tbl_types) + { + oprot.writeString(_iter823); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_meta_argsTupleSchemeFactory implements SchemeFactory { + public get_table_meta_argsTupleScheme getScheme() { + return new get_table_meta_argsTupleScheme(); + } + } + + private static class get_table_meta_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_meta_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDb_patterns()) { + optionals.set(0); + } + if (struct.isSetTbl_patterns()) { + optionals.set(1); + } + if (struct.isSetTbl_types()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDb_patterns()) { + oprot.writeString(struct.db_patterns); + } + if (struct.isSetTbl_patterns()) { + oprot.writeString(struct.tbl_patterns); + } + if (struct.isSetTbl_types()) { + { + oprot.writeI32(struct.tbl_types.size()); + for (String _iter824 : struct.tbl_types) + { + oprot.writeString(_iter824); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_meta_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.db_patterns = iprot.readString(); + struct.setDb_patternsIsSet(true); + } + if (incoming.get(1)) { + struct.tbl_patterns = iprot.readString(); + struct.setTbl_patternsIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list825 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.tbl_types = new ArrayList(_list825.size); + String _elem826; + for (int _i827 = 0; _i827 < _list825.size; ++_i827) + { + _elem826 = iprot.readString(); + struct.tbl_types.add(_elem826); + } + } + struct.setTbl_typesIsSet(true); + } + } + } + + } + + public static class get_table_meta_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_meta_result"); + + 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_table_meta_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_meta_resultTupleSchemeFactory()); + } + + private List success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TableMeta.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_meta_result.class, metaDataMap); + } + + public get_table_meta_result() { + } + + public get_table_meta_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_table_meta_result(get_table_meta_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (TableMeta other_element : other.success) { + __this__success.add(new TableMeta(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_table_meta_result deepCopy() { + return new get_table_meta_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TableMeta elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_meta_result) + return this.equals((get_table_meta_result)that); + return false; + } + + public boolean equals(get_table_meta_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_meta_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_meta_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 get_table_meta_resultStandardSchemeFactory implements SchemeFactory { + public get_table_meta_resultStandardScheme getScheme() { + return new get_table_meta_resultStandardScheme(); + } + } + + private static class get_table_meta_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_meta_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 _list828 = iprot.readListBegin(); + struct.success = new ArrayList(_list828.size); + TableMeta _elem829; + for (int _i830 = 0; _i830 < _list828.size; ++_i830) + { + _elem829 = new TableMeta(); + _elem829.read(iprot); + struct.success.add(_elem829); + } + 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_table_meta_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 (TableMeta _iter831 : struct.success) + { + _iter831.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 get_table_meta_resultTupleSchemeFactory implements SchemeFactory { + public get_table_meta_resultTupleScheme getScheme() { + return new get_table_meta_resultTupleScheme(); + } + } + + private static class get_table_meta_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_meta_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 (TableMeta _iter832 : struct.success) + { + _iter832.write(oprot); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_meta_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 _list833 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list833.size); + TableMeta _elem834; + for (int _i835 = 0; _i835 < _list833.size; ++_i835) + { + _elem834 = new TableMeta(); + _elem834.read(iprot); + struct.success.add(_elem834); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_tables_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_tables_args.class, metaDataMap); + } + + public get_all_tables_args() { + } + + public get_all_tables_args( + String db_name) + { + this(); + this.db_name = db_name; + } + + /** + * Performs a deep copy on other. + */ + public get_all_tables_args(get_all_tables_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + } + + public get_all_tables_args deepCopy() { + return new get_all_tables_args(this); + } + + @Override + public void clear() { + this.db_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_tables_args) + return this.equals((get_all_tables_args)that); + return false; + } + + public boolean equals(get_all_tables_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + return list.hashCode(); + } + + @Override + public int compareTo(get_all_tables_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_all_tables_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_tables_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_tables_result.class, metaDataMap); + } + + public get_all_tables_result() { + } + + public get_all_tables_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_all_tables_result(get_all_tables_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_all_tables_result deepCopy() { + return new get_all_tables_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_tables_result) + return this.equals((get_all_tables_result)that); + return false; + } + + public boolean equals(get_all_tables_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_all_tables_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_all_tables_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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 _list836 = iprot.readListBegin(); + struct.success = new ArrayList(_list836.size); + String _elem837; + for (int _i838 = 0; _i838 < _list836.size; ++_i838) + { + _elem837 = iprot.readString(); + struct.success.add(_elem837); + } + 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 _iter839 : struct.success) + { + oprot.writeString(_iter839); + } + 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 _iter840 : struct.success) + { + oprot.writeString(_iter840); + } + } + } + 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 _list841 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list841.size); + String _elem842; + for (int _i843 = 0; _i843 < _list841.size; ++_i843) + { + _elem842 = iprot.readString(); + struct.success.add(_elem842); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DBNAME((short)1, "dbname"), + TBL_NAME((short)2, "tbl_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // TBL_NAME + return TBL_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_args.class, metaDataMap); + } + + public get_table_args() { + } + + public get_table_args( + String dbname, + String tbl_name) + { + this(); + this.dbname = dbname; + this.tbl_name = tbl_name; + } + + /** + * Performs a deep copy on other. + */ + public get_table_args(get_table_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + } + + public get_table_args deepCopy() { + return new get_table_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tbl_name = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TBL_NAME: + return getTbl_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TBL_NAME: + return isSetTbl_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_args) + return this.equals((get_table_args)that); + return false; + } + + public boolean equals(get_table_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_result.class, metaDataMap); + } + + public get_table_result() { + } + + public get_table_result( + Table success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_table_result(get_table_result other) { + if (other.isSetSuccess()) { + this.success = new Table(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_table_result deepCopy() { + return new get_table_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Table getSuccess() { + return this.success; + } + + public void setSuccess(Table success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Table)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_result) + return this.equals((get_table_result)that); + return false; + } + + public boolean equals(get_table_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DBNAME((short)1, "dbname"), + TBL_NAMES((short)2, "tbl_names"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // TBL_NAMES + return TBL_NAMES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("tbl_names", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_objects_by_name_args.class, metaDataMap); + } + + public get_table_objects_by_name_args() { + } + + public get_table_objects_by_name_args( + String dbname, + List tbl_names) + { + this(); + this.dbname = dbname; + this.tbl_names = tbl_names; + } + + /** + * Performs a deep copy on other. + */ + public get_table_objects_by_name_args(get_table_objects_by_name_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTbl_names()) { + List __this__tbl_names = new ArrayList(other.tbl_names); + this.tbl_names = __this__tbl_names; + } + } + + public get_table_objects_by_name_args deepCopy() { + return new get_table_objects_by_name_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tbl_names = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public int getTbl_namesSize() { + return (this.tbl_names == null) ? 0 : this.tbl_names.size(); + } + + public java.util.Iterator getTbl_namesIterator() { + return (this.tbl_names == null) ? null : this.tbl_names.iterator(); + } + + public void addToTbl_names(String elem) { + if (this.tbl_names == null) { + this.tbl_names = new ArrayList(); + } + this.tbl_names.add(elem); + } + + public List getTbl_names() { + return this.tbl_names; + } + + public void setTbl_names(List tbl_names) { + this.tbl_names = tbl_names; + } + + public void unsetTbl_names() { + this.tbl_names = null; + } + + /** Returns true if field tbl_names is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_names() { + return this.tbl_names != null; + } + + public void setTbl_namesIsSet(boolean value) { + if (!value) { + this.tbl_names = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TBL_NAMES: + if (value == null) { + unsetTbl_names(); + } else { + setTbl_names((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TBL_NAMES: + return getTbl_names(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TBL_NAMES: + return isSetTbl_names(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_objects_by_name_args) + return this.equals((get_table_objects_by_name_args)that); + return false; + } + + public boolean equals(get_table_objects_by_name_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tbl_names = true && this.isSetTbl_names(); + boolean that_present_tbl_names = true && that.isSetTbl_names(); + if (this_present_tbl_names || that_present_tbl_names) { + if (!(this_present_tbl_names && that_present_tbl_names)) + return false; + if (!this.tbl_names.equals(that.tbl_names)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tbl_names = true && (isSetTbl_names()); + list.add(present_tbl_names); + if (present_tbl_names) + list.add(tbl_names); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_objects_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_names()).compareTo(other.isSetTbl_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_names()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_names, other.tbl_names); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_objects_by_name_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_names:"); + if (this.tbl_names == null) { + sb.append("null"); + } else { + sb.append(this.tbl_names); + } + 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 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 _list844 = iprot.readListBegin(); + struct.tbl_names = new ArrayList(_list844.size); + String _elem845; + for (int _i846 = 0; _i846 < _list844.size; ++_i846) + { + _elem845 = iprot.readString(); + struct.tbl_names.add(_elem845); + } + 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 _iter847 : struct.tbl_names) + { + oprot.writeString(_iter847); + } + 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 _iter848 : struct.tbl_names) + { + oprot.writeString(_iter848); + } + } + } + } + + @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 _list849 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.tbl_names = new ArrayList(_list849.size); + String _elem850; + for (int _i851 = 0; _i851 < _list849.size; ++_i851) + { + _elem850 = iprot.readString(); + struct.tbl_names.add(_elem850); + } + } + struct.setTbl_namesIsSet(true); + } + } + } + + } + + public static class get_table_objects_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_objects_by_name_result.class, metaDataMap); + } + + public get_table_objects_by_name_result() { + } + + public get_table_objects_by_name_result( + List
success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public get_table_objects_by_name_result(get_table_objects_by_name_result other) { + if (other.isSetSuccess()) { + List
__this__success = new ArrayList
(other.success.size()); + for (Table other_element : other.success) { + __this__success.add(new Table(other_element)); + } + this.success = __this__success; + } + } + + public get_table_objects_by_name_result deepCopy() { + return new get_table_objects_by_name_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator
getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Table elem) { + if (this.success == null) { + this.success = new ArrayList
(); + } + this.success.add(elem); + } + + public List
getSuccess() { + return this.success; + } + + public void setSuccess(List
success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List
)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_objects_by_name_result) + return this.equals((get_table_objects_by_name_result)that); + return false; + } + + public boolean equals(get_table_objects_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_objects_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_objects_by_name_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + 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 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 _list852 = iprot.readListBegin(); + struct.success = new ArrayList
(_list852.size); + Table _elem853; + for (int _i854 = 0; _i854 < _list852.size; ++_i854) + { + _elem853 = new Table(); + _elem853.read(iprot); + struct.success.add(_elem853); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(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 _iter855 : struct.success) + { + _iter855.write(oprot); + } + oprot.writeListEnd(); + } + 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); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Table _iter856 : struct.success) + { + _iter856.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(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list857 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList
(_list857.size); + Table _elem858; + for (int _i859 = 0; _i859 < _list857.size; ++_i859) + { + _elem858 = new Table(); + _elem858.read(iprot); + struct.success.add(_elem858); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class get_table_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_req_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_req_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_req_argsTupleSchemeFactory()); + } + + private GetTableRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetTableRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_req_args.class, metaDataMap); + } + + public get_table_req_args() { + } + + public get_table_req_args( + GetTableRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public get_table_req_args(get_table_req_args other) { + if (other.isSetReq()) { + this.req = new GetTableRequest(other.req); + } + } + + public get_table_req_args deepCopy() { + return new get_table_req_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public GetTableRequest getReq() { + return this.req; + } + + public void setReq(GetTableRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((GetTableRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_req_args) + return this.equals((get_table_req_args)that); + return false; + } + + public boolean equals(get_table_req_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_req_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_req_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 get_table_req_argsStandardSchemeFactory implements SchemeFactory { + public get_table_req_argsStandardScheme getScheme() { + return new get_table_req_argsStandardScheme(); + } + } + + private static class get_table_req_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_req_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new GetTableRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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_req_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_req_argsTupleSchemeFactory implements SchemeFactory { + public get_table_req_argsTupleScheme getScheme() { + return new get_table_req_argsTupleScheme(); + } + } + + private static class get_table_req_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_req_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_req_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new GetTableRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class get_table_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_req_result"); + + 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 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_req_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_req_resultTupleSchemeFactory()); + } + + private GetTableResult success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetTableResult.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_req_result.class, metaDataMap); + } + + public get_table_req_result() { + } + + public get_table_req_result( + GetTableResult success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_table_req_result(get_table_req_result other) { + if (other.isSetSuccess()) { + this.success = new GetTableResult(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_table_req_result deepCopy() { + return new get_table_req_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public GetTableResult getSuccess() { + return this.success; + } + + public void setSuccess(GetTableResult success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((GetTableResult)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_req_result) + return this.equals((get_table_req_result)that); + return false; + } + + public boolean equals(get_table_req_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_req_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_req_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_table_req_resultStandardSchemeFactory implements SchemeFactory { + public get_table_req_resultStandardScheme getScheme() { + return new get_table_req_resultStandardScheme(); + } + } + + private static class get_table_req_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_req_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 GetTableResult(); + 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_req_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_req_resultTupleSchemeFactory implements SchemeFactory { + public get_table_req_resultTupleScheme getScheme() { + return new get_table_req_resultTupleScheme(); + } + } + + private static class get_table_req_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_req_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_req_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new GetTableResult(); + 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_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_req_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_objects_by_name_req_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_objects_by_name_req_argsTupleSchemeFactory()); + } + + private GetTablesRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetTablesRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_objects_by_name_req_args.class, metaDataMap); + } + + public get_table_objects_by_name_req_args() { + } + + public get_table_objects_by_name_req_args( + GetTablesRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public get_table_objects_by_name_req_args(get_table_objects_by_name_req_args other) { + if (other.isSetReq()) { + this.req = new GetTablesRequest(other.req); + } + } + + public get_table_objects_by_name_req_args deepCopy() { + return new get_table_objects_by_name_req_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public GetTablesRequest getReq() { + return this.req; + } + + public void setReq(GetTablesRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((GetTablesRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_objects_by_name_req_args) + return this.equals((get_table_objects_by_name_req_args)that); + return false; + } + + public boolean equals(get_table_objects_by_name_req_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_objects_by_name_req_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_objects_by_name_req_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 get_table_objects_by_name_req_argsStandardSchemeFactory implements SchemeFactory { + public get_table_objects_by_name_req_argsStandardScheme getScheme() { + return new get_table_objects_by_name_req_argsStandardScheme(); + } + } + + private static class get_table_objects_by_name_req_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_by_name_req_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new GetTablesRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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_req_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_objects_by_name_req_argsTupleSchemeFactory implements SchemeFactory { + public get_table_objects_by_name_req_argsTupleScheme getScheme() { + return new get_table_objects_by_name_req_argsTupleScheme(); + } + } + + private static class get_table_objects_by_name_req_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_req_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_req_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new GetTablesRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class get_table_objects_by_name_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_objects_by_name_req_result"); + + 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 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_req_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_objects_by_name_req_resultTupleSchemeFactory()); + } + + private GetTablesResult success; // required + private MetaException o1; // required + private InvalidOperationException o2; // required + private UnknownDBException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetTablesResult.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_objects_by_name_req_result.class, metaDataMap); + } + + public get_table_objects_by_name_req_result() { + } + + public get_table_objects_by_name_req_result( + GetTablesResult success, + MetaException o1, + InvalidOperationException o2, + UnknownDBException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public get_table_objects_by_name_req_result(get_table_objects_by_name_req_result other) { + if (other.isSetSuccess()) { + this.success = new GetTablesResult(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidOperationException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + } + + public get_table_objects_by_name_req_result deepCopy() { + return new get_table_objects_by_name_req_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public GetTablesResult getSuccess() { + return this.success; + } + + public void setSuccess(GetTablesResult success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidOperationException getO2() { + return this.o2; + } + + public void setO2(InvalidOperationException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public UnknownDBException getO3() { + return this.o3; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((GetTablesResult)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidOperationException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_objects_by_name_req_result) + return this.equals((get_table_objects_by_name_req_result)that); + return false; + } + + public boolean equals(get_table_objects_by_name_req_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_objects_by_name_req_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_objects_by_name_req_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_table_objects_by_name_req_resultStandardSchemeFactory implements SchemeFactory { + public get_table_objects_by_name_req_resultStandardScheme getScheme() { + return new get_table_objects_by_name_req_resultStandardScheme(); + } + } + + private static class get_table_objects_by_name_req_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_objects_by_name_req_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 GetTablesResult(); + 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 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_req_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 get_table_objects_by_name_req_resultTupleSchemeFactory implements SchemeFactory { + public get_table_objects_by_name_req_resultTupleScheme getScheme() { + return new get_table_objects_by_name_req_resultTupleScheme(); + } + } + + private static class get_table_objects_by_name_req_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_objects_by_name_req_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, get_table_objects_by_name_req_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new GetTablesResult(); + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_names_by_filter_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DBNAME((short)1, "dbname"), + FILTER((short)2, "filter"), + MAX_TABLES((short)3, "max_tables"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // FILTER + return FILTER; + case 3: // MAX_TABLES + return MAX_TABLES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_TABLES_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FILTER, new org.apache.thrift.meta_data.FieldMetaData("filter", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_TABLES, new org.apache.thrift.meta_data.FieldMetaData("max_tables", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_names_by_filter_args.class, metaDataMap); + } + + public get_table_names_by_filter_args() { + this.max_tables = (short)-1; + + } + + public get_table_names_by_filter_args( + String dbname, + String filter, + short max_tables) + { + this(); + this.dbname = dbname; + this.filter = filter; + this.max_tables = max_tables; + setMax_tablesIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_table_names_by_filter_args(get_table_names_by_filter_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetFilter()) { + this.filter = other.filter; + } + this.max_tables = other.max_tables; + } + + public get_table_names_by_filter_args deepCopy() { + return new get_table_names_by_filter_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.filter = null; + this.max_tables = (short)-1; + + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getFilter() { + return this.filter; + } + + public void setFilter(String filter) { + this.filter = filter; + } + + public void unsetFilter() { + this.filter = null; + } + + /** Returns true if field filter is set (has been assigned a value) and false otherwise */ + public boolean isSetFilter() { + return this.filter != null; + } + + public void setFilterIsSet(boolean value) { + if (!value) { + this.filter = null; + } + } + + public short getMax_tables() { + return this.max_tables; + } + + public void setMax_tables(short max_tables) { + this.max_tables = max_tables; + setMax_tablesIsSet(true); + } + + public void unsetMax_tables() { + __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 EncodingUtils.testBit(__isset_bitfield, __MAX_TABLES_ISSET_ID); + } + + public void setMax_tablesIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_TABLES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case FILTER: + if (value == null) { + unsetFilter(); + } else { + setFilter((String)value); + } + break; + + case MAX_TABLES: + if (value == null) { + unsetMax_tables(); + } else { + setMax_tables((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case FILTER: + return getFilter(); + + case MAX_TABLES: + return getMax_tables(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case FILTER: + return isSetFilter(); + case MAX_TABLES: + return isSetMax_tables(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_names_by_filter_args) + return this.equals((get_table_names_by_filter_args)that); + return false; + } + + public boolean equals(get_table_names_by_filter_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_filter = true && this.isSetFilter(); + boolean that_present_filter = true && that.isSetFilter(); + if (this_present_filter || that_present_filter) { + if (!(this_present_filter && that_present_filter)) + return false; + if (!this.filter.equals(that.filter)) + return false; + } + + boolean this_present_max_tables = true; + boolean that_present_max_tables = true; + if (this_present_max_tables || that_present_max_tables) { + if (!(this_present_max_tables && that_present_max_tables)) + return false; + if (this.max_tables != that.max_tables) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_filter = true && (isSetFilter()); + list.add(present_filter); + if (present_filter) + list.add(filter); + + boolean present_max_tables = true; + list.add(present_max_tables); + if (present_max_tables) + list.add(max_tables); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_names_by_filter_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFilter()).compareTo(other.isSetFilter()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilter()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, other.filter); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_tables()).compareTo(other.isSetMax_tables()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_tables()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_tables, other.max_tables); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_names_by_filter_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("filter:"); + if (this.filter == null) { + sb.append("null"); + } else { + sb.append(this.filter); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_tables:"); + sb.append(this.max_tables); + 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 { + // 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_names_by_filter_result"); + + 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 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 + private UnknownDBException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_names_by_filter_result.class, metaDataMap); + } + + public get_table_names_by_filter_result() { + } + + public get_table_names_by_filter_result( + List success, + MetaException o1, + InvalidOperationException o2, + UnknownDBException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public get_table_names_by_filter_result(get_table_names_by_filter_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidOperationException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + } + + public get_table_names_by_filter_result deepCopy() { + return new get_table_names_by_filter_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidOperationException getO2() { + return this.o2; + } + + public void setO2(InvalidOperationException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public UnknownDBException getO3() { + return this.o3; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidOperationException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_names_by_filter_result) + return this.equals((get_table_names_by_filter_result)that); + return false; + } + + public boolean equals(get_table_names_by_filter_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_names_by_filter_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_names_by_filter_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 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 _list860 = iprot.readListBegin(); + struct.success = new ArrayList(_list860.size); + String _elem861; + for (int _i862 = 0; _i862 < _list860.size; ++_i862) + { + _elem861 = iprot.readString(); + struct.success.add(_elem861); + } + 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 _iter863 : struct.success) + { + oprot.writeString(_iter863); + } + 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 _iter864 : struct.success) + { + oprot.writeString(_iter864); + } + } + } + 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 _list865 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list865.size); + String _elem866; + for (int _i867 = 0; _i867 < _list865.size; ++_i867) + { + _elem866 = iprot.readString(); + struct.success.add(_elem866); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DBNAME((short)1, "dbname"), + TBL_NAME((short)2, "tbl_name"), + NEW_TBL((short)3, "new_tbl"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // NEW_TBL + return NEW_TBL; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_TBL, new org.apache.thrift.meta_data.FieldMetaData("new_tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_args.class, metaDataMap); + } + + public alter_table_args() { + } + + public alter_table_args( + String dbname, + String tbl_name, + Table new_tbl) + { + this(); + this.dbname = dbname; + this.tbl_name = tbl_name; + this.new_tbl = new_tbl; + } + + /** + * Performs a deep copy on other. + */ + public alter_table_args(alter_table_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_tbl()) { + this.new_tbl = new Table(other.new_tbl); + } + } + + public alter_table_args deepCopy() { + return new alter_table_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tbl_name = null; + this.new_tbl = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public Table getNew_tbl() { + return this.new_tbl; + } + + public void setNew_tbl(Table new_tbl) { + this.new_tbl = new_tbl; + } + + public void unsetNew_tbl() { + this.new_tbl = null; + } + + /** Returns true if field new_tbl is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_tbl() { + return this.new_tbl != null; + } + + public void setNew_tblIsSet(boolean value) { + if (!value) { + this.new_tbl = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NEW_TBL: + if (value == null) { + unsetNew_tbl(); + } else { + setNew_tbl((Table)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TBL_NAME: + return getTbl_name(); + + case NEW_TBL: + return getNew_tbl(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_TBL: + return isSetNew_tbl(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_table_args) + return this.equals((alter_table_args)that); + return false; + } + + public boolean equals(alter_table_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_new_tbl = true && this.isSetNew_tbl(); + boolean that_present_new_tbl = true && that.isSetNew_tbl(); + if (this_present_new_tbl || that_present_new_tbl) { + if (!(this_present_new_tbl && that_present_new_tbl)) + return false; + if (!this.new_tbl.equals(that.new_tbl)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_new_tbl = true && (isSetNew_tbl()); + list.add(present_new_tbl); + if (present_new_tbl) + list.add(new_tbl); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(other.isSetNew_tbl()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_tbl()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, other.new_tbl); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_table_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_tbl:"); + if (this.new_tbl == null) { + sb.append("null"); + } else { + sb.append(this.new_tbl); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_result.class, metaDataMap); + } + + public alter_table_result() { + } + + public alter_table_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_table_result(alter_table_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_table_result deepCopy() { + return new alter_table_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_table_result) + return this.equals((alter_table_result)that); + return false; + } + + public boolean equals(alter_table_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_with_environment_context_args"); + + 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 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 + private EnvironmentContext environment_context; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DBNAME((short)1, "dbname"), + TBL_NAME((short)2, "tbl_name"), + NEW_TBL((short)3, "new_tbl"), + ENVIRONMENT_CONTEXT((short)4, "environment_context"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // NEW_TBL + return NEW_TBL; + case 4: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_TBL, new org.apache.thrift.meta_data.FieldMetaData("new_tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_with_environment_context_args.class, metaDataMap); + } + + public alter_table_with_environment_context_args() { + } + + public alter_table_with_environment_context_args( + String dbname, + String tbl_name, + Table new_tbl, + EnvironmentContext environment_context) + { + this(); + this.dbname = dbname; + this.tbl_name = tbl_name; + this.new_tbl = new_tbl; + this.environment_context = environment_context; + } + + /** + * Performs a deep copy on other. + */ + public alter_table_with_environment_context_args(alter_table_with_environment_context_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_tbl()) { + this.new_tbl = new Table(other.new_tbl); + } + if (other.isSetEnvironment_context()) { + this.environment_context = new EnvironmentContext(other.environment_context); + } + } + + public alter_table_with_environment_context_args deepCopy() { + return new alter_table_with_environment_context_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tbl_name = null; + this.new_tbl = null; + this.environment_context = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public Table getNew_tbl() { + return this.new_tbl; + } + + public void setNew_tbl(Table new_tbl) { + this.new_tbl = new_tbl; + } + + public void unsetNew_tbl() { + this.new_tbl = null; + } + + /** Returns true if field new_tbl is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_tbl() { + return this.new_tbl != null; + } + + public void setNew_tblIsSet(boolean value) { + if (!value) { + this.new_tbl = null; + } + } + + public EnvironmentContext getEnvironment_context() { + return this.environment_context; + } + + public void setEnvironment_context(EnvironmentContext environment_context) { + this.environment_context = environment_context; + } + + public void unsetEnvironment_context() { + this.environment_context = null; + } + + /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment_context() { + return this.environment_context != null; + } + + public void setEnvironment_contextIsSet(boolean value) { + if (!value) { + this.environment_context = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NEW_TBL: + if (value == null) { + unsetNew_tbl(); + } else { + setNew_tbl((Table)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironment_context(); + } else { + setEnvironment_context((EnvironmentContext)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TBL_NAME: + return getTbl_name(); + + case NEW_TBL: + return getNew_tbl(); + + case ENVIRONMENT_CONTEXT: + return getEnvironment_context(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_TBL: + return isSetNew_tbl(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironment_context(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_table_with_environment_context_args) + return this.equals((alter_table_with_environment_context_args)that); + return false; + } + + public boolean equals(alter_table_with_environment_context_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_new_tbl = true && this.isSetNew_tbl(); + boolean that_present_new_tbl = true && that.isSetNew_tbl(); + if (this_present_new_tbl || that_present_new_tbl) { + if (!(this_present_new_tbl && that_present_new_tbl)) + return false; + if (!this.new_tbl.equals(that.new_tbl)) + return false; + } + + boolean this_present_environment_context = true && this.isSetEnvironment_context(); + boolean that_present_environment_context = true && that.isSetEnvironment_context(); + if (this_present_environment_context || that_present_environment_context) { + if (!(this_present_environment_context && that_present_environment_context)) + return false; + if (!this.environment_context.equals(that.environment_context)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_new_tbl = true && (isSetNew_tbl()); + list.add(present_new_tbl); + if (present_new_tbl) + list.add(new_tbl); + + boolean present_environment_context = true && (isSetEnvironment_context()); + list.add(present_environment_context); + if (present_environment_context) + list.add(environment_context); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_table_with_environment_context_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(other.isSetNew_tbl()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_tbl()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, other.new_tbl); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment_context()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_table_with_environment_context_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_tbl:"); + if (this.new_tbl == null) { + sb.append("null"); + } else { + sb.append(this.new_tbl); + } + first = false; + if (!first) sb.append(", "); + sb.append("environment_context:"); + if (this.environment_context == null) { + sb.append("null"); + } else { + sb.append(this.environment_context); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_with_environment_context_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_with_environment_context_result.class, metaDataMap); + } + + public alter_table_with_environment_context_result() { + } + + public alter_table_with_environment_context_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_table_with_environment_context_result(alter_table_with_environment_context_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_table_with_environment_context_result deepCopy() { + return new alter_table_with_environment_context_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_table_with_environment_context_result) + return this.equals((alter_table_with_environment_context_result)that); + return false; + } + + public boolean equals(alter_table_with_environment_context_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_table_with_environment_context_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_table_with_environment_context_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 alter_table_with_cascade_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_with_cascade_args"); + + 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 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 CASCADE_FIELD_DESC = new org.apache.thrift.protocol.TField("cascade", org.apache.thrift.protocol.TType.BOOL, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_table_with_cascade_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_table_with_cascade_argsTupleSchemeFactory()); + } + + private String dbname; // required + private String tbl_name; // required + private Table new_tbl; // required + private boolean cascade; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DBNAME((short)1, "dbname"), + TBL_NAME((short)2, "tbl_name"), + NEW_TBL((short)3, "new_tbl"), + CASCADE((short)4, "cascade"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // NEW_TBL + return NEW_TBL; + case 4: // CASCADE + return CASCADE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __CASCADE_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_TBL, new org.apache.thrift.meta_data.FieldMetaData("new_tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); + tmpMap.put(_Fields.CASCADE, new org.apache.thrift.meta_data.FieldMetaData("cascade", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_with_cascade_args.class, metaDataMap); + } + + public alter_table_with_cascade_args() { + } + + public alter_table_with_cascade_args( + String dbname, + String tbl_name, + Table new_tbl, + boolean cascade) + { + this(); + this.dbname = dbname; + this.tbl_name = tbl_name; + this.new_tbl = new_tbl; + this.cascade = cascade; + setCascadeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public alter_table_with_cascade_args(alter_table_with_cascade_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_tbl()) { + this.new_tbl = new Table(other.new_tbl); + } + this.cascade = other.cascade; + } + + public alter_table_with_cascade_args deepCopy() { + return new alter_table_with_cascade_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tbl_name = null; + this.new_tbl = null; + setCascadeIsSet(false); + this.cascade = false; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public Table getNew_tbl() { + return this.new_tbl; + } + + public void setNew_tbl(Table new_tbl) { + this.new_tbl = new_tbl; + } + + public void unsetNew_tbl() { + this.new_tbl = null; + } + + /** Returns true if field new_tbl is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_tbl() { + return this.new_tbl != null; + } + + public void setNew_tblIsSet(boolean value) { + if (!value) { + this.new_tbl = null; + } + } + + public boolean isCascade() { + return this.cascade; + } + + public void setCascade(boolean cascade) { + this.cascade = cascade; + setCascadeIsSet(true); + } + + public void unsetCascade() { + __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 EncodingUtils.testBit(__isset_bitfield, __CASCADE_ISSET_ID); + } + + public void setCascadeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CASCADE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NEW_TBL: + if (value == null) { + unsetNew_tbl(); + } else { + setNew_tbl((Table)value); + } + break; + + case CASCADE: + if (value == null) { + unsetCascade(); + } else { + setCascade((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TBL_NAME: + return getTbl_name(); + + case NEW_TBL: + return getNew_tbl(); + + case CASCADE: + return isCascade(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_TBL: + return isSetNew_tbl(); + case CASCADE: + return isSetCascade(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_table_with_cascade_args) + return this.equals((alter_table_with_cascade_args)that); + return false; + } + + public boolean equals(alter_table_with_cascade_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_new_tbl = true && this.isSetNew_tbl(); + boolean that_present_new_tbl = true && that.isSetNew_tbl(); + if (this_present_new_tbl || that_present_new_tbl) { + if (!(this_present_new_tbl && that_present_new_tbl)) + return false; + if (!this.new_tbl.equals(that.new_tbl)) + return false; + } + + boolean this_present_cascade = true; + boolean that_present_cascade = true; + if (this_present_cascade || that_present_cascade) { + if (!(this_present_cascade && that_present_cascade)) + return false; + if (this.cascade != that.cascade) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_new_tbl = true && (isSetNew_tbl()); + list.add(present_new_tbl); + if (present_new_tbl) + list.add(new_tbl); + + boolean present_cascade = true; + list.add(present_cascade); + if (present_cascade) + list.add(cascade); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_table_with_cascade_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(other.isSetNew_tbl()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_tbl()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_tbl, other.new_tbl); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCascade()).compareTo(other.isSetCascade()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCascade()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cascade, other.cascade); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_table_with_cascade_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_tbl:"); + if (this.new_tbl == null) { + sb.append("null"); + } else { + sb.append(this.new_tbl); + } + first = false; + if (!first) sb.append(", "); + sb.append("cascade:"); + sb.append(this.cascade); + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 { + // 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 alter_table_with_cascade_argsStandardSchemeFactory implements SchemeFactory { + public alter_table_with_cascade_argsStandardScheme getScheme() { + return new alter_table_with_cascade_argsStandardScheme(); + } + } + + private static class alter_table_with_cascade_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_with_cascade_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: // 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, alter_table_with_cascade_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.writeFieldBegin(CASCADE_FIELD_DESC); + oprot.writeBool(struct.cascade); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_table_with_cascade_argsTupleSchemeFactory implements SchemeFactory { + public alter_table_with_cascade_argsTupleScheme getScheme() { + return new alter_table_with_cascade_argsTupleScheme(); + } + } + + private static class alter_table_with_cascade_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_with_cascade_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.isSetCascade()) { + 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.isSetCascade()) { + oprot.writeBool(struct.cascade); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_table_with_cascade_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.cascade = iprot.readBool(); + struct.setCascadeIsSet(true); + } + } + } + + } + + public static class alter_table_with_cascade_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_table_with_cascade_result"); + + 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_cascade_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_table_with_cascade_resultTupleSchemeFactory()); + } + + private InvalidOperationException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_table_with_cascade_result.class, metaDataMap); + } + + public alter_table_with_cascade_result() { + } + + public alter_table_with_cascade_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_table_with_cascade_result(alter_table_with_cascade_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_table_with_cascade_result deepCopy() { + return new alter_table_with_cascade_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_table_with_cascade_result) + return this.equals((alter_table_with_cascade_result)that); + return false; + } + + public boolean equals(alter_table_with_cascade_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_table_with_cascade_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_table_with_cascade_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 alter_table_with_cascade_resultStandardSchemeFactory implements SchemeFactory { + public alter_table_with_cascade_resultStandardScheme getScheme() { + return new alter_table_with_cascade_resultStandardScheme(); + } + } + + private static class alter_table_with_cascade_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_table_with_cascade_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_cascade_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_cascade_resultTupleSchemeFactory implements SchemeFactory { + public alter_table_with_cascade_resultTupleScheme getScheme() { + return new alter_table_with_cascade_resultTupleScheme(); + } + } + + private static class alter_table_with_cascade_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_table_with_cascade_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_cascade_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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NEW_PART((short)1, "new_part"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NEW_PART + return NEW_PART; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partition_args.class, metaDataMap); + } + + public add_partition_args() { + } + + public add_partition_args( + Partition new_part) + { + this(); + this.new_part = new_part; + } + + /** + * Performs a deep copy on other. + */ + public add_partition_args(add_partition_args other) { + if (other.isSetNew_part()) { + this.new_part = new Partition(other.new_part); + } + } + + public add_partition_args deepCopy() { + return new add_partition_args(this); + } + + @Override + public void clear() { + this.new_part = null; + } + + public Partition getNew_part() { + return this.new_part; + } + + public void setNew_part(Partition new_part) { + this.new_part = new_part; + } + + public void unsetNew_part() { + this.new_part = null; + } + + /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_part() { + return this.new_part != null; + } + + public void setNew_partIsSet(boolean value) { + if (!value) { + this.new_part = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NEW_PART: + if (value == null) { + unsetNew_part(); + } else { + setNew_part((Partition)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NEW_PART: + return getNew_part(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NEW_PART: + return isSetNew_part(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partition_args) + return this.equals((add_partition_args)that); + return false; + } + + public boolean equals(add_partition_args that) { + if (that == null) + return false; + + boolean this_present_new_part = true && this.isSetNew_part(); + boolean that_present_new_part = true && that.isSetNew_part(); + if (this_present_new_part || that_present_new_part) { + if (!(this_present_new_part && that_present_new_part)) + return false; + if (!this.new_part.equals(that.new_part)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_new_part = true && (isSetNew_part()); + list.add(present_new_part); + if (present_new_part) + list.add(new_part); + + return list.hashCode(); + } + + @Override + public int compareTo(add_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_part()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.new_part); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_partition_args("); + boolean first = true; + + sb.append("new_part:"); + if (this.new_part == null) { + sb.append("null"); + } else { + sb.append(this.new_part); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_result"); + + 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 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 + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partition_result.class, metaDataMap); + } + + public add_partition_result() { + } + + public add_partition_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public add_partition_result(add_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public add_partition_result deepCopy() { + return new add_partition_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partition_result) + return this.equals((add_partition_result)that); + return false; + } + + public boolean equals(add_partition_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(add_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_partition_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_with_environment_context_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NEW_PART((short)1, "new_part"), + ENVIRONMENT_CONTEXT((short)2, "environment_context"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NEW_PART + return NEW_PART; + case 2: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partition_with_environment_context_args.class, metaDataMap); + } + + public add_partition_with_environment_context_args() { + } + + public add_partition_with_environment_context_args( + Partition new_part, + EnvironmentContext environment_context) + { + this(); + this.new_part = new_part; + this.environment_context = environment_context; + } + + /** + * Performs a deep copy on other. + */ + public add_partition_with_environment_context_args(add_partition_with_environment_context_args other) { + if (other.isSetNew_part()) { + this.new_part = new Partition(other.new_part); + } + if (other.isSetEnvironment_context()) { + this.environment_context = new EnvironmentContext(other.environment_context); + } + } + + public add_partition_with_environment_context_args deepCopy() { + return new add_partition_with_environment_context_args(this); + } + + @Override + public void clear() { + this.new_part = null; + this.environment_context = null; + } + + public Partition getNew_part() { + return this.new_part; + } + + public void setNew_part(Partition new_part) { + this.new_part = new_part; + } + + public void unsetNew_part() { + this.new_part = null; + } + + /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_part() { + return this.new_part != null; + } + + public void setNew_partIsSet(boolean value) { + if (!value) { + this.new_part = null; + } + } + + public EnvironmentContext getEnvironment_context() { + return this.environment_context; + } + + public void setEnvironment_context(EnvironmentContext environment_context) { + this.environment_context = environment_context; + } + + public void unsetEnvironment_context() { + this.environment_context = null; + } + + /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment_context() { + return this.environment_context != null; + } + + public void setEnvironment_contextIsSet(boolean value) { + if (!value) { + this.environment_context = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NEW_PART: + if (value == null) { + unsetNew_part(); + } else { + setNew_part((Partition)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironment_context(); + } else { + setEnvironment_context((EnvironmentContext)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NEW_PART: + return getNew_part(); + + case ENVIRONMENT_CONTEXT: + return getEnvironment_context(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NEW_PART: + return isSetNew_part(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironment_context(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partition_with_environment_context_args) + return this.equals((add_partition_with_environment_context_args)that); + return false; + } + + public boolean equals(add_partition_with_environment_context_args that) { + if (that == null) + return false; + + boolean this_present_new_part = true && this.isSetNew_part(); + boolean that_present_new_part = true && that.isSetNew_part(); + if (this_present_new_part || that_present_new_part) { + if (!(this_present_new_part && that_present_new_part)) + return false; + if (!this.new_part.equals(that.new_part)) + return false; + } + + boolean this_present_environment_context = true && this.isSetEnvironment_context(); + boolean that_present_environment_context = true && that.isSetEnvironment_context(); + if (this_present_environment_context || that_present_environment_context) { + if (!(this_present_environment_context && that_present_environment_context)) + return false; + if (!this.environment_context.equals(that.environment_context)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_new_part = true && (isSetNew_part()); + list.add(present_new_part); + if (present_new_part) + list.add(new_part); + + boolean present_environment_context = true && (isSetEnvironment_context()); + list.add(present_environment_context); + if (present_environment_context) + list.add(environment_context); + + return list.hashCode(); + } + + @Override + public int compareTo(add_partition_with_environment_context_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_part()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.new_part); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment_context()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_partition_with_environment_context_args("); + boolean first = true; + + sb.append("new_part:"); + if (this.new_part == null) { + sb.append("null"); + } else { + sb.append(this.new_part); + } + first = false; + if (!first) sb.append(", "); + sb.append("environment_context:"); + if (this.environment_context == null) { + sb.append("null"); + } else { + sb.append(this.environment_context); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partition_with_environment_context_result"); + + 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 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 + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partition_with_environment_context_result.class, metaDataMap); + } + + public add_partition_with_environment_context_result() { + } + + public add_partition_with_environment_context_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public add_partition_with_environment_context_result(add_partition_with_environment_context_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public add_partition_with_environment_context_result deepCopy() { + return new add_partition_with_environment_context_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partition_with_environment_context_result) + return this.equals((add_partition_with_environment_context_result)that); + return false; + } + + public boolean equals(add_partition_with_environment_context_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(add_partition_with_environment_context_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_partition_with_environment_context_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NEW_PARTS((short)1, "new_parts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NEW_PARTS + return NEW_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NEW_PARTS, new org.apache.thrift.meta_data.FieldMetaData("new_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_args.class, metaDataMap); + } + + public add_partitions_args() { + } + + public add_partitions_args( + List new_parts) + { + this(); + this.new_parts = new_parts; + } + + /** + * Performs a deep copy on other. + */ + public add_partitions_args(add_partitions_args other) { + if (other.isSetNew_parts()) { + List __this__new_parts = new ArrayList(other.new_parts.size()); + for (Partition other_element : other.new_parts) { + __this__new_parts.add(new Partition(other_element)); + } + this.new_parts = __this__new_parts; + } + } + + public add_partitions_args deepCopy() { + return new add_partitions_args(this); + } + + @Override + public void clear() { + this.new_parts = null; + } + + public int getNew_partsSize() { + return (this.new_parts == null) ? 0 : this.new_parts.size(); + } + + public java.util.Iterator getNew_partsIterator() { + return (this.new_parts == null) ? null : this.new_parts.iterator(); + } + + public void addToNew_parts(Partition elem) { + if (this.new_parts == null) { + this.new_parts = new ArrayList(); + } + this.new_parts.add(elem); + } + + public List getNew_parts() { + return this.new_parts; + } + + public void setNew_parts(List new_parts) { + this.new_parts = new_parts; + } + + public void unsetNew_parts() { + this.new_parts = null; + } + + /** Returns true if field new_parts is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_parts() { + return this.new_parts != null; + } + + public void setNew_partsIsSet(boolean value) { + if (!value) { + this.new_parts = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NEW_PARTS: + if (value == null) { + unsetNew_parts(); + } else { + setNew_parts((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NEW_PARTS: + return getNew_parts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NEW_PARTS: + return isSetNew_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partitions_args) + return this.equals((add_partitions_args)that); + return false; + } + + public boolean equals(add_partitions_args that) { + if (that == null) + return false; + + boolean this_present_new_parts = true && this.isSetNew_parts(); + boolean that_present_new_parts = true && that.isSetNew_parts(); + if (this_present_new_parts || that_present_new_parts) { + if (!(this_present_new_parts && that_present_new_parts)) + return false; + if (!this.new_parts.equals(that.new_parts)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_new_parts = true && (isSetNew_parts()); + list.add(present_new_parts); + if (present_new_parts) + list.add(new_parts); + + return list.hashCode(); + } + + @Override + public int compareTo(add_partitions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(other.isSetNew_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, other.new_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_partitions_args("); + boolean first = true; + + sb.append("new_parts:"); + if (this.new_parts == null) { + sb.append("null"); + } else { + sb.append(this.new_parts); + } + 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 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 _list868 = iprot.readListBegin(); + struct.new_parts = new ArrayList(_list868.size); + Partition _elem869; + for (int _i870 = 0; _i870 < _list868.size; ++_i870) + { + _elem869 = new Partition(); + _elem869.read(iprot); + struct.new_parts.add(_elem869); + } + 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 _iter871 : struct.new_parts) + { + _iter871.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 _iter872 : struct.new_parts) + { + _iter872.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 _list873 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.new_parts = new ArrayList(_list873.size); + Partition _elem874; + for (int _i875 = 0; _i875 < _list873.size; ++_i875) + { + _elem874 = new Partition(); + _elem874.read(iprot); + struct.new_parts.add(_elem874); + } + } + struct.setNew_partsIsSet(true); + } + } + } + + } + + public static class add_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (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 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 + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_result.class, metaDataMap); + } + + public add_partitions_result() { + } + + public add_partitions_result( + int success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public add_partitions_result(add_partitions_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public add_partitions_result deepCopy() { + return new add_partitions_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public int getSuccess() { + return this.success; + } + + public void setSuccess(int success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partitions_result) + return this.equals((add_partitions_result)that); + return false; + } + + public boolean equals(add_partitions_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(add_partitions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_partitions_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 { + // 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 add_partitions_pspec_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_pspec_args"); + + 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_pspec_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partitions_pspec_argsTupleSchemeFactory()); + } + + private List new_parts; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NEW_PARTS((short)1, "new_parts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NEW_PARTS + return NEW_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NEW_PARTS, new org.apache.thrift.meta_data.FieldMetaData("new_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionSpec.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_pspec_args.class, metaDataMap); + } + + public add_partitions_pspec_args() { + } + + public add_partitions_pspec_args( + List new_parts) + { + this(); + this.new_parts = new_parts; + } + + /** + * Performs a deep copy on other. + */ + public add_partitions_pspec_args(add_partitions_pspec_args other) { + if (other.isSetNew_parts()) { + List __this__new_parts = new ArrayList(other.new_parts.size()); + for (PartitionSpec other_element : other.new_parts) { + __this__new_parts.add(new PartitionSpec(other_element)); + } + this.new_parts = __this__new_parts; + } + } + + public add_partitions_pspec_args deepCopy() { + return new add_partitions_pspec_args(this); + } + + @Override + public void clear() { + this.new_parts = null; + } + + public int getNew_partsSize() { + return (this.new_parts == null) ? 0 : this.new_parts.size(); + } + + public java.util.Iterator getNew_partsIterator() { + return (this.new_parts == null) ? null : this.new_parts.iterator(); + } + + public void addToNew_parts(PartitionSpec elem) { + if (this.new_parts == null) { + this.new_parts = new ArrayList(); + } + this.new_parts.add(elem); + } + + public List getNew_parts() { + return this.new_parts; + } + + public void setNew_parts(List new_parts) { + this.new_parts = new_parts; + } + + public void unsetNew_parts() { + this.new_parts = null; + } + + /** Returns true if field new_parts is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_parts() { + return this.new_parts != null; + } + + public void setNew_partsIsSet(boolean value) { + if (!value) { + this.new_parts = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NEW_PARTS: + if (value == null) { + unsetNew_parts(); + } else { + setNew_parts((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NEW_PARTS: + return getNew_parts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NEW_PARTS: + return isSetNew_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partitions_pspec_args) + return this.equals((add_partitions_pspec_args)that); + return false; + } + + public boolean equals(add_partitions_pspec_args that) { + if (that == null) + return false; + + boolean this_present_new_parts = true && this.isSetNew_parts(); + boolean that_present_new_parts = true && that.isSetNew_parts(); + if (this_present_new_parts || that_present_new_parts) { + if (!(this_present_new_parts && that_present_new_parts)) + return false; + if (!this.new_parts.equals(that.new_parts)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_new_parts = true && (isSetNew_parts()); + list.add(present_new_parts); + if (present_new_parts) + list.add(new_parts); + + return list.hashCode(); + } + + @Override + public int compareTo(add_partitions_pspec_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(other.isSetNew_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, other.new_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_partitions_pspec_args("); + boolean first = true; + + sb.append("new_parts:"); + if (this.new_parts == null) { + sb.append("null"); + } else { + sb.append(this.new_parts); + } + 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 add_partitions_pspec_argsStandardSchemeFactory implements SchemeFactory { + public add_partitions_pspec_argsStandardScheme getScheme() { + return new add_partitions_pspec_argsStandardScheme(); + } + } + + private static class add_partitions_pspec_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_pspec_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 _list876 = iprot.readListBegin(); + struct.new_parts = new ArrayList(_list876.size); + PartitionSpec _elem877; + for (int _i878 = 0; _i878 < _list876.size; ++_i878) + { + _elem877 = new PartitionSpec(); + _elem877.read(iprot); + struct.new_parts.add(_elem877); + } + 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_pspec_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 (PartitionSpec _iter879 : struct.new_parts) + { + _iter879.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partitions_pspec_argsTupleSchemeFactory implements SchemeFactory { + public add_partitions_pspec_argsTupleScheme getScheme() { + return new add_partitions_pspec_argsTupleScheme(); + } + } + + private static class add_partitions_pspec_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_pspec_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 (PartitionSpec _iter880 : struct.new_parts) + { + _iter880.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_pspec_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 _list881 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.new_parts = new ArrayList(_list881.size); + PartitionSpec _elem882; + for (int _i883 = 0; _i883 < _list881.size; ++_i883) + { + _elem882 = new PartitionSpec(); + _elem882.read(iprot); + struct.new_parts.add(_elem882); + } + } + struct.setNew_partsIsSet(true); + } + } + } + + } + + public static class add_partitions_pspec_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_pspec_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (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 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_pspec_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partitions_pspec_resultTupleSchemeFactory()); + } + + private int success; // required + private InvalidObjectException o1; // required + private AlreadyExistsException o2; // required + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_pspec_result.class, metaDataMap); + } + + public add_partitions_pspec_result() { + } + + public add_partitions_pspec_result( + int success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public add_partitions_pspec_result(add_partitions_pspec_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public add_partitions_pspec_result deepCopy() { + return new add_partitions_pspec_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public int getSuccess() { + return this.success; + } + + public void setSuccess(int success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partitions_pspec_result) + return this.equals((add_partitions_pspec_result)that); + return false; + } + + public boolean equals(add_partitions_pspec_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(add_partitions_pspec_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_partitions_pspec_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 { + // 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_pspec_resultStandardSchemeFactory implements SchemeFactory { + public add_partitions_pspec_resultStandardScheme getScheme() { + return new add_partitions_pspec_resultStandardScheme(); + } + } + + private static class add_partitions_pspec_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_pspec_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_pspec_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_pspec_resultTupleSchemeFactory implements SchemeFactory { + public add_partitions_pspec_resultTupleScheme getScheme() { + return new add_partitions_pspec_resultTupleScheme(); + } + } + + private static class add_partitions_pspec_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_pspec_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_pspec_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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_args.class, metaDataMap); + } + + public append_partition_args() { + } + + public append_partition_args( + String db_name, + String tbl_name, + List part_vals) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_args(append_partition_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(other.part_vals); + this.part_vals = __this__part_vals; + } + } + + public append_partition_args deepCopy() { + return new append_partition_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_args) + return this.equals((append_partition_args)that); + return false; + } + + public boolean equals(append_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + return list.hashCode(); + } + + @Override + public int compareTo(append_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("append_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + 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 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 _list884 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list884.size); + String _elem885; + for (int _i886 = 0; _i886 < _list884.size; ++_i886) + { + _elem885 = iprot.readString(); + struct.part_vals.add(_elem885); + } + 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 _iter887 : struct.part_vals) + { + oprot.writeString(_iter887); + } + 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 _iter888 : struct.part_vals) + { + oprot.writeString(_iter888); + } + } + } + } + + @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 _list889 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list889.size); + String _elem890; + for (int _i891 = 0; _i891 < _list889.size; ++_i891) + { + _elem890 = iprot.readString(); + struct.part_vals.add(_elem890); + } + } + struct.setPart_valsIsSet(true); + } + } + } + + } + + public static class append_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_result"); + + 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 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 + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_result.class, metaDataMap); + } + + public append_partition_result() { + } + + public append_partition_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_result(append_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public append_partition_result deepCopy() { + return new append_partition_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_result) + return this.equals((append_partition_result)that); + return false; + } + + public boolean equals(append_partition_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(append_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("append_partition_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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 add_partitions_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_req_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_partitions_req_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partitions_req_argsTupleSchemeFactory()); + } + + private AddPartitionsRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddPartitionsRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_req_args.class, metaDataMap); + } + + public add_partitions_req_args() { + } + + public add_partitions_req_args( + AddPartitionsRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public add_partitions_req_args(add_partitions_req_args other) { + if (other.isSetRequest()) { + this.request = new AddPartitionsRequest(other.request); + } + } + + public add_partitions_req_args deepCopy() { + return new add_partitions_req_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public AddPartitionsRequest getRequest() { + return this.request; + } + + public void setRequest(AddPartitionsRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((AddPartitionsRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partitions_req_args) + return this.equals((add_partitions_req_args)that); + return false; + } + + public boolean equals(add_partitions_req_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(add_partitions_req_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_partitions_req_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 add_partitions_req_argsStandardSchemeFactory implements SchemeFactory { + public add_partitions_req_argsStandardScheme getScheme() { + return new add_partitions_req_argsStandardScheme(); + } + } + + private static class add_partitions_req_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_req_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new AddPartitionsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_req_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_partitions_req_argsTupleSchemeFactory implements SchemeFactory { + public add_partitions_req_argsTupleScheme getScheme() { + return new add_partitions_req_argsTupleScheme(); + } + } + + private static class add_partitions_req_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_req_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_partitions_req_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new AddPartitionsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class add_partitions_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_partitions_req_result"); + + 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 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_req_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_partitions_req_resultTupleSchemeFactory()); + } + + private AddPartitionsResult success; // required + private InvalidObjectException o1; // required + private AlreadyExistsException o2; // required + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddPartitionsResult.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_partitions_req_result.class, metaDataMap); + } + + public add_partitions_req_result() { + } + + public add_partitions_req_result( + AddPartitionsResult success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public add_partitions_req_result(add_partitions_req_result other) { + if (other.isSetSuccess()) { + this.success = new AddPartitionsResult(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public add_partitions_req_result deepCopy() { + return new add_partitions_req_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public AddPartitionsResult getSuccess() { + return this.success; + } + + public void setSuccess(AddPartitionsResult success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((AddPartitionsResult)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partitions_req_result) + return this.equals((add_partitions_req_result)that); + return false; + } + + public boolean equals(add_partitions_req_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(add_partitions_req_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_partitions_req_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 add_partitions_req_resultStandardSchemeFactory implements SchemeFactory { + public add_partitions_req_resultStandardScheme getScheme() { + return new add_partitions_req_resultStandardScheme(); + } + } + + private static class add_partitions_req_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_partitions_req_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 AddPartitionsResult(); + 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_partitions_req_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_partitions_req_resultTupleSchemeFactory implements SchemeFactory { + public add_partitions_req_resultTupleScheme getScheme() { + return new add_partitions_req_resultTupleScheme(); + } + } + + private static class add_partitions_req_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_partitions_req_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_partitions_req_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new AddPartitionsResult(); + 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_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_with_environment_context_args"); + + 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 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 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 append_partition_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_partition_with_environment_context_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + private List part_vals; // required + private EnvironmentContext environment_context; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + ENVIRONMENT_CONTEXT((short)4, "environment_context"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_with_environment_context_args.class, metaDataMap); + } + + public append_partition_with_environment_context_args() { + } + + public append_partition_with_environment_context_args( + String db_name, + String tbl_name, + List part_vals, + EnvironmentContext environment_context) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.environment_context = environment_context; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_with_environment_context_args(append_partition_with_environment_context_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(other.part_vals); + this.part_vals = __this__part_vals; + } + if (other.isSetEnvironment_context()) { + this.environment_context = new EnvironmentContext(other.environment_context); + } + } + + public append_partition_with_environment_context_args deepCopy() { + return new append_partition_with_environment_context_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.environment_context = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public EnvironmentContext getEnvironment_context() { + return this.environment_context; + } + + public void setEnvironment_context(EnvironmentContext environment_context) { + this.environment_context = environment_context; + } + + public void unsetEnvironment_context() { + this.environment_context = null; + } + + /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment_context() { + return this.environment_context != null; + } + + public void setEnvironment_contextIsSet(boolean value) { + if (!value) { + this.environment_context = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironment_context(); + } else { + setEnvironment_context((EnvironmentContext)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case ENVIRONMENT_CONTEXT: + return getEnvironment_context(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironment_context(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_with_environment_context_args) + return this.equals((append_partition_with_environment_context_args)that); + return false; + } + + public boolean equals(append_partition_with_environment_context_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_environment_context = true && this.isSetEnvironment_context(); + boolean that_present_environment_context = true && that.isSetEnvironment_context(); + if (this_present_environment_context || that_present_environment_context) { + if (!(this_present_environment_context && that_present_environment_context)) + return false; + if (!this.environment_context.equals(that.environment_context)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + boolean present_environment_context = true && (isSetEnvironment_context()); + list.add(present_environment_context); + if (present_environment_context) + list.add(environment_context); + + return list.hashCode(); + } + + @Override + public int compareTo(append_partition_with_environment_context_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment_context()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("append_partition_with_environment_context_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("environment_context:"); + if (this.environment_context == null) { + sb.append("null"); + } else { + sb.append(this.environment_context); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (environment_context != null) { + environment_context.validate(); + } + } + + 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 append_partition_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public append_partition_with_environment_context_argsStandardScheme getScheme() { + return new append_partition_with_environment_context_argsStandardScheme(); + } + } + + private static class append_partition_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_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: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list892 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list892.size); + String _elem893; + for (int _i894 = 0; _i894 < _list892.size; ++_i894) + { + _elem893 = iprot.readString(); + struct.part_vals.add(_elem893); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(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, append_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.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 _iter895 : struct.part_vals) + { + oprot.writeString(_iter895); + } + oprot.writeListEnd(); + } + 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 append_partition_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public append_partition_with_environment_context_argsTupleScheme getScheme() { + return new append_partition_with_environment_context_argsTupleScheme(); + } + } + + private static class append_partition_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_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.isSetPart_vals()) { + 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.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter896 : struct.part_vals) + { + oprot.writeString(_iter896); + } + } + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, append_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)) { + { + org.apache.thrift.protocol.TList _list897 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list897.size); + String _elem898; + for (int _i899 = 0; _i899 < _list897.size; ++_i899) + { + _elem898 = iprot.readString(); + struct.part_vals.add(_elem898); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + + } + + public static class append_partition_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_with_environment_context_result"); + + 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 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_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_partition_with_environment_context_resultTupleSchemeFactory()); + } + + private Partition success; // required + private InvalidObjectException o1; // required + private AlreadyExistsException o2; // required + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_with_environment_context_result.class, metaDataMap); + } + + public append_partition_with_environment_context_result() { + } + + public append_partition_with_environment_context_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_with_environment_context_result(append_partition_with_environment_context_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public append_partition_with_environment_context_result deepCopy() { + return new append_partition_with_environment_context_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_with_environment_context_result) + return this.equals((append_partition_with_environment_context_result)that); + return false; + } + + public boolean equals(append_partition_with_environment_context_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(append_partition_with_environment_context_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("append_partition_with_environment_context_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 append_partition_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public append_partition_with_environment_context_resultStandardScheme getScheme() { + return new append_partition_with_environment_context_resultStandardScheme(); + } + } + + private static class append_partition_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_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, append_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 append_partition_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public append_partition_with_environment_context_resultTupleScheme getScheme() { + return new append_partition_with_environment_context_resultTupleScheme(); + } + } + + private static class append_partition_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_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, append_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 append_partition_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_by_name_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_by_name_args.class, metaDataMap); + } + + public append_partition_by_name_args() { + } + + public append_partition_by_name_args( + String db_name, + String tbl_name, + String part_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_by_name_args(append_partition_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + } + + public append_partition_by_name_args deepCopy() { + return new append_partition_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_by_name_args) + return this.equals((append_partition_by_name_args)that); + return false; + } + + public boolean equals(append_partition_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_name = true && (isSetPart_name()); + list.add(present_part_name); + if (present_part_name) + list.add(part_name); + + return list.hashCode(); + } + + @Override + public int compareTo(append_partition_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("append_partition_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_by_name_result"); + + 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 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 + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_by_name_result.class, metaDataMap); + } + + public append_partition_by_name_result() { + } + + public append_partition_by_name_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_by_name_result(append_partition_by_name_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public append_partition_by_name_result deepCopy() { + return new append_partition_by_name_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_by_name_result) + return this.equals((append_partition_by_name_result)that); + return false; + } + + public boolean equals(append_partition_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(append_partition_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("append_partition_by_name_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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 append_partition_by_name_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_by_name_with_environment_context_args"); + + 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 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 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 append_partition_by_name_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_partition_by_name_with_environment_context_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + private String part_name; // required + private EnvironmentContext environment_context; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_name"), + ENVIRONMENT_CONTEXT((short)4, "environment_context"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; + case 4: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_by_name_with_environment_context_args.class, metaDataMap); + } + + public append_partition_by_name_with_environment_context_args() { + } + + public append_partition_by_name_with_environment_context_args( + String db_name, + String tbl_name, + String part_name, + EnvironmentContext environment_context) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.environment_context = environment_context; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_by_name_with_environment_context_args(append_partition_by_name_with_environment_context_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + if (other.isSetEnvironment_context()) { + this.environment_context = new EnvironmentContext(other.environment_context); + } + } + + public append_partition_by_name_with_environment_context_args deepCopy() { + return new append_partition_by_name_with_environment_context_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + this.environment_context = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public EnvironmentContext getEnvironment_context() { + return this.environment_context; + } + + public void setEnvironment_context(EnvironmentContext environment_context) { + this.environment_context = environment_context; + } + + public void unsetEnvironment_context() { + this.environment_context = null; + } + + /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment_context() { + return this.environment_context != null; + } + + public void setEnvironment_contextIsSet(boolean value) { + if (!value) { + this.environment_context = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironment_context(); + } else { + setEnvironment_context((EnvironmentContext)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + case ENVIRONMENT_CONTEXT: + return getEnvironment_context(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironment_context(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_by_name_with_environment_context_args) + return this.equals((append_partition_by_name_with_environment_context_args)that); + return false; + } + + public boolean equals(append_partition_by_name_with_environment_context_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_environment_context = true && this.isSetEnvironment_context(); + boolean that_present_environment_context = true && that.isSetEnvironment_context(); + if (this_present_environment_context || that_present_environment_context) { + if (!(this_present_environment_context && that_present_environment_context)) + return false; + if (!this.environment_context.equals(that.environment_context)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_name = true && (isSetPart_name()); + list.add(present_part_name); + if (present_part_name) + list.add(part_name); + + boolean present_environment_context = true && (isSetEnvironment_context()); + list.add(present_environment_context); + if (present_environment_context) + list.add(environment_context); + + return list.hashCode(); + } + + @Override + public int compareTo(append_partition_by_name_with_environment_context_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment_context()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("append_partition_by_name_with_environment_context_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("environment_context:"); + if (this.environment_context == null) { + sb.append("null"); + } else { + sb.append(this.environment_context); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (environment_context != null) { + environment_context.validate(); + } + } + + 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 append_partition_by_name_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public append_partition_by_name_with_environment_context_argsStandardScheme getScheme() { + return new append_partition_by_name_with_environment_context_argsStandardScheme(); + } + } + + private static class append_partition_by_name_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_by_name_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: // 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: // 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, append_partition_by_name_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.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.part_name); + 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 append_partition_by_name_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public append_partition_by_name_with_environment_context_argsTupleScheme getScheme() { + return new append_partition_by_name_with_environment_context_argsTupleScheme(); + } + } + + private static class append_partition_by_name_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_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.isSetPart_name()) { + 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.isSetPart_name()) { + oprot.writeString(struct.part_name); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_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.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + if (incoming.get(3)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + + } + + public static class append_partition_by_name_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("append_partition_by_name_with_environment_context_result"); + + 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 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_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new append_partition_by_name_with_environment_context_resultTupleSchemeFactory()); + } + + private Partition success; // required + private InvalidObjectException o1; // required + private AlreadyExistsException o2; // required + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_partition_by_name_with_environment_context_result.class, metaDataMap); + } + + public append_partition_by_name_with_environment_context_result() { + } + + public append_partition_by_name_with_environment_context_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_by_name_with_environment_context_result(append_partition_by_name_with_environment_context_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public append_partition_by_name_with_environment_context_result deepCopy() { + return new append_partition_by_name_with_environment_context_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_by_name_with_environment_context_result) + return this.equals((append_partition_by_name_with_environment_context_result)that); + return false; + } + + public boolean equals(append_partition_by_name_with_environment_context_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(append_partition_by_name_with_environment_context_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("append_partition_by_name_with_environment_context_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 append_partition_by_name_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public append_partition_by_name_with_environment_context_resultStandardScheme getScheme() { + return new append_partition_by_name_with_environment_context_resultStandardScheme(); + } + } + + private static class append_partition_by_name_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, append_partition_by_name_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, append_partition_by_name_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 append_partition_by_name_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public append_partition_by_name_with_environment_context_resultTupleScheme getScheme() { + return new append_partition_by_name_with_environment_context_resultTupleScheme(); + } + } + + private static class append_partition_by_name_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, append_partition_by_name_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, append_partition_by_name_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 drop_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_args"); + + 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 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 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 + private boolean deleteData; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + DELETE_DATA((short)4, "deleteData"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // DELETE_DATA + return DELETE_DATA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_args.class, metaDataMap); + } + + public drop_partition_args() { + } + + public drop_partition_args( + String db_name, + String tbl_name, + List part_vals, + boolean deleteData) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_args(drop_partition_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(other.part_vals); + this.part_vals = __this__part_vals; + } + this.deleteData = other.deleteData; + } + + public drop_partition_args deepCopy() { + return new drop_partition_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case DELETE_DATA: + return isDeleteData(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_args) + return this.equals((drop_partition_args)that); + return false; + } + + public boolean equals(drop_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + boolean present_deleteData = true; + list.add(present_deleteData); + if (present_deleteData) + list.add(deleteData); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + 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 { + // 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_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 _list900 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list900.size); + String _elem901; + for (int _i902 = 0; _i902 < _list900.size; ++_i902) + { + _elem901 = iprot.readString(); + struct.part_vals.add(_elem901); + } + 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 _iter903 : struct.part_vals) + { + oprot.writeString(_iter903); + } + 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 _iter904 : struct.part_vals) + { + oprot.writeString(_iter904); + } + } + } + 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 _list905 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list905.size); + String _elem906; + for (int _i907 = 0; _i907 < _list905.size; ++_i907) + { + _elem906 = iprot.readString(); + struct.part_vals.add(_elem906); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_result.class, metaDataMap); + } + + public drop_partition_result() { + } + + public drop_partition_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_result(drop_partition_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public drop_partition_result deepCopy() { + return new drop_partition_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_result) + return this.equals((drop_partition_result)that); + return false; + } + + public boolean equals(drop_partition_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_partition_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 { + // 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_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_with_environment_context_args"); + + 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 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 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 org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_partition_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partition_with_environment_context_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + private List part_vals; // required + private boolean deleteData; // required + private EnvironmentContext environment_context; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + DELETE_DATA((short)4, "deleteData"), + ENVIRONMENT_CONTEXT((short)5, "environment_context"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // DELETE_DATA + return DELETE_DATA; + case 5: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_with_environment_context_args.class, metaDataMap); + } + + public drop_partition_with_environment_context_args() { + } + + public drop_partition_with_environment_context_args( + String db_name, + String tbl_name, + List part_vals, + boolean deleteData, + EnvironmentContext environment_context) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + this.environment_context = environment_context; + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_with_environment_context_args(drop_partition_with_environment_context_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(other.part_vals); + this.part_vals = __this__part_vals; + } + this.deleteData = other.deleteData; + if (other.isSetEnvironment_context()) { + this.environment_context = new EnvironmentContext(other.environment_context); + } + } + + public drop_partition_with_environment_context_args deepCopy() { + return new drop_partition_with_environment_context_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + setDeleteDataIsSet(false); + this.deleteData = false; + this.environment_context = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); + } + + public EnvironmentContext getEnvironment_context() { + return this.environment_context; + } + + public void setEnvironment_context(EnvironmentContext environment_context) { + this.environment_context = environment_context; + } + + public void unsetEnvironment_context() { + this.environment_context = null; + } + + /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment_context() { + return this.environment_context != null; + } + + public void setEnvironment_contextIsSet(boolean value) { + if (!value) { + this.environment_context = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironment_context(); + } else { + setEnvironment_context((EnvironmentContext)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case DELETE_DATA: + return isDeleteData(); + + case ENVIRONMENT_CONTEXT: + return getEnvironment_context(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case DELETE_DATA: + return isSetDeleteData(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironment_context(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_with_environment_context_args) + return this.equals((drop_partition_with_environment_context_args)that); + return false; + } + + public boolean equals(drop_partition_with_environment_context_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + boolean this_present_environment_context = true && this.isSetEnvironment_context(); + boolean that_present_environment_context = true && that.isSetEnvironment_context(); + if (this_present_environment_context || that_present_environment_context) { + if (!(this_present_environment_context && that_present_environment_context)) + return false; + if (!this.environment_context.equals(that.environment_context)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + boolean present_deleteData = true; + list.add(present_deleteData); + if (present_deleteData) + list.add(deleteData); + + boolean present_environment_context = true && (isSetEnvironment_context()); + list.add(present_environment_context); + if (present_environment_context) + list.add(environment_context); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_partition_with_environment_context_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment_context()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_partition_with_environment_context_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + if (!first) sb.append(", "); + sb.append("environment_context:"); + if (this.environment_context == null) { + sb.append("null"); + } else { + sb.append(this.environment_context); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (environment_context != null) { + environment_context.validate(); + } + } + + 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 { + // 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_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public drop_partition_with_environment_context_argsStandardScheme getScheme() { + return new drop_partition_with_environment_context_argsStandardScheme(); + } + } + + private static class drop_partition_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_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: // PART_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list908 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list908.size); + String _elem909; + for (int _i910 = 0; _i910 < _list908.size; ++_i910) + { + _elem909 = iprot.readString(); + struct.part_vals.add(_elem909); + } + 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; + case 5: // 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, drop_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.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 _iter911 : struct.part_vals) + { + oprot.writeString(_iter911); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(struct.deleteData); + 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 drop_partition_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public drop_partition_with_environment_context_argsTupleScheme getScheme() { + return new drop_partition_with_environment_context_argsTupleScheme(); + } + } + + private static class drop_partition_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_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.isSetPart_vals()) { + optionals.set(2); + } + if (struct.isSetDeleteData()) { + optionals.set(3); + } + if (struct.isSetEnvironment_context()) { + 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 _iter912 : struct.part_vals) + { + oprot.writeString(_iter912); + } + } + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_with_environment_context_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 _list913 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list913.size); + String _elem914; + for (int _i915 = 0; _i915 < _list913.size; ++_i915) + { + _elem914 = iprot.readString(); + struct.part_vals.add(_elem914); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + if (incoming.get(4)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + + } + + public static class drop_partition_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_with_environment_context_result"); + + 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 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_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partition_with_environment_context_resultTupleSchemeFactory()); + } + + private boolean success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_with_environment_context_result.class, metaDataMap); + } + + public drop_partition_with_environment_context_result() { + } + + public drop_partition_with_environment_context_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_with_environment_context_result(drop_partition_with_environment_context_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public drop_partition_with_environment_context_result deepCopy() { + return new drop_partition_with_environment_context_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_with_environment_context_result) + return this.equals((drop_partition_with_environment_context_result)that); + return false; + } + + public boolean equals(drop_partition_with_environment_context_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_partition_with_environment_context_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_partition_with_environment_context_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 { + // 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_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public drop_partition_with_environment_context_resultStandardScheme getScheme() { + return new drop_partition_with_environment_context_resultStandardScheme(); + } + } + + private static class drop_partition_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_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.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_with_environment_context_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_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public drop_partition_with_environment_context_resultTupleScheme getScheme() { + return new drop_partition_with_environment_context_resultTupleScheme(); + } + } + + private static class drop_partition_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_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); + } + 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_with_environment_context_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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_by_name_args"); + + 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 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 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 + private boolean deleteData; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_name"), + DELETE_DATA((short)4, "deleteData"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; + case 4: // DELETE_DATA + return DELETE_DATA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_by_name_args.class, metaDataMap); + } + + public drop_partition_by_name_args() { + } + + public drop_partition_by_name_args( + String db_name, + String tbl_name, + String part_name, + boolean deleteData) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_by_name_args(drop_partition_by_name_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + this.deleteData = other.deleteData; + } + + public drop_partition_by_name_args deepCopy() { + return new drop_partition_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + case DELETE_DATA: + return isDeleteData(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_by_name_args) + return this.equals((drop_partition_by_name_args)that); + return false; + } + + public boolean equals(drop_partition_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_name = true && (isSetPart_name()); + list.add(present_part_name); + if (present_part_name) + list.add(part_name); + + boolean present_deleteData = true; + list.add(present_deleteData); + if (present_deleteData) + list.add(deleteData); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_partition_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_partition_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + 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 { + // 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_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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_by_name_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_by_name_result.class, metaDataMap); + } + + public drop_partition_by_name_result() { + } + + public drop_partition_by_name_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_by_name_result(drop_partition_by_name_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public drop_partition_by_name_result deepCopy() { + return new drop_partition_by_name_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_by_name_result) + return this.equals((drop_partition_by_name_result)that); + return false; + } + + public boolean equals(drop_partition_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_partition_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_partition_by_name_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 { + // 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 drop_partition_by_name_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_by_name_with_environment_context_args"); + + 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 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 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 org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment_context", org.apache.thrift.protocol.TType.STRUCT, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_partition_by_name_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partition_by_name_with_environment_context_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + private String part_name; // required + private boolean deleteData; // required + private EnvironmentContext environment_context; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_name"), + DELETE_DATA((short)4, "deleteData"), + ENVIRONMENT_CONTEXT((short)5, "environment_context"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; + case 4: // DELETE_DATA + return DELETE_DATA; + case 5: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_by_name_with_environment_context_args.class, metaDataMap); + } + + public drop_partition_by_name_with_environment_context_args() { + } + + public drop_partition_by_name_with_environment_context_args( + String db_name, + String tbl_name, + String part_name, + boolean deleteData, + EnvironmentContext environment_context) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + this.environment_context = environment_context; + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_by_name_with_environment_context_args(drop_partition_by_name_with_environment_context_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + this.deleteData = other.deleteData; + if (other.isSetEnvironment_context()) { + this.environment_context = new EnvironmentContext(other.environment_context); + } + } + + public drop_partition_by_name_with_environment_context_args deepCopy() { + return new drop_partition_by_name_with_environment_context_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + this.environment_context = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); + } + + public EnvironmentContext getEnvironment_context() { + return this.environment_context; + } + + public void setEnvironment_context(EnvironmentContext environment_context) { + this.environment_context = environment_context; + } + + public void unsetEnvironment_context() { + this.environment_context = null; + } + + /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment_context() { + return this.environment_context != null; + } + + public void setEnvironment_contextIsSet(boolean value) { + if (!value) { + this.environment_context = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironment_context(); + } else { + setEnvironment_context((EnvironmentContext)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + case DELETE_DATA: + return isDeleteData(); + + case ENVIRONMENT_CONTEXT: + return getEnvironment_context(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + case DELETE_DATA: + return isSetDeleteData(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironment_context(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_by_name_with_environment_context_args) + return this.equals((drop_partition_by_name_with_environment_context_args)that); + return false; + } + + public boolean equals(drop_partition_by_name_with_environment_context_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + boolean this_present_environment_context = true && this.isSetEnvironment_context(); + boolean that_present_environment_context = true && that.isSetEnvironment_context(); + if (this_present_environment_context || that_present_environment_context) { + if (!(this_present_environment_context && that_present_environment_context)) + return false; + if (!this.environment_context.equals(that.environment_context)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_name = true && (isSetPart_name()); + list.add(present_part_name); + if (present_part_name) + list.add(part_name); + + boolean present_deleteData = true; + list.add(present_deleteData); + if (present_deleteData) + list.add(deleteData); + + boolean present_environment_context = true && (isSetEnvironment_context()); + list.add(present_environment_context); + if (present_environment_context) + list.add(environment_context); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_partition_by_name_with_environment_context_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment_context()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_partition_by_name_with_environment_context_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + if (!first) sb.append(", "); + sb.append("environment_context:"); + if (this.environment_context == null) { + sb.append("null"); + } else { + sb.append(this.environment_context); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (environment_context != null) { + environment_context.validate(); + } + } + + 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 { + // 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_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public drop_partition_by_name_with_environment_context_argsStandardScheme getScheme() { + return new drop_partition_by_name_with_environment_context_argsStandardScheme(); + } + } + + private static class drop_partition_by_name_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_by_name_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: // 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; + case 5: // 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, drop_partition_by_name_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.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(); + 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 drop_partition_by_name_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public drop_partition_by_name_with_environment_context_argsTupleScheme getScheme() { + return new drop_partition_by_name_with_environment_context_argsTupleScheme(); + } + } + + private static class drop_partition_by_name_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_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.isSetPart_name()) { + optionals.set(2); + } + if (struct.isSetDeleteData()) { + optionals.set(3); + } + if (struct.isSetEnvironment_context()) { + 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_name()) { + oprot.writeString(struct.part_name); + } + if (struct.isSetDeleteData()) { + oprot.writeBool(struct.deleteData); + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_with_environment_context_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.part_name = iprot.readString(); + struct.setPart_nameIsSet(true); + } + if (incoming.get(3)) { + struct.deleteData = iprot.readBool(); + struct.setDeleteDataIsSet(true); + } + if (incoming.get(4)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + + } + + public static class drop_partition_by_name_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partition_by_name_with_environment_context_result"); + + 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 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_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partition_by_name_with_environment_context_resultTupleSchemeFactory()); + } + + private boolean success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partition_by_name_with_environment_context_result.class, metaDataMap); + } + + public drop_partition_by_name_with_environment_context_result() { + } + + public drop_partition_by_name_with_environment_context_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_by_name_with_environment_context_result(drop_partition_by_name_with_environment_context_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public drop_partition_by_name_with_environment_context_result deepCopy() { + return new drop_partition_by_name_with_environment_context_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_by_name_with_environment_context_result) + return this.equals((drop_partition_by_name_with_environment_context_result)that); + return false; + } + + public boolean equals(drop_partition_by_name_with_environment_context_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_partition_by_name_with_environment_context_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_partition_by_name_with_environment_context_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 { + // 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_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public drop_partition_by_name_with_environment_context_resultStandardScheme getScheme() { + return new drop_partition_by_name_with_environment_context_resultStandardScheme(); + } + } + + private static class drop_partition_by_name_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partition_by_name_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.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_with_environment_context_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_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public drop_partition_by_name_with_environment_context_resultTupleScheme getScheme() { + return new drop_partition_by_name_with_environment_context_resultTupleScheme(); + } + } + + private static class drop_partition_by_name_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_partition_by_name_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); + } + 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_with_environment_context_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_partitions_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partitions_req_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_partitions_req_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partitions_req_argsTupleSchemeFactory()); + } + + private DropPartitionsRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DropPartitionsRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partitions_req_args.class, metaDataMap); + } + + public drop_partitions_req_args() { + } + + public drop_partitions_req_args( + DropPartitionsRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public drop_partitions_req_args(drop_partitions_req_args other) { + if (other.isSetReq()) { + this.req = new DropPartitionsRequest(other.req); + } + } + + public drop_partitions_req_args deepCopy() { + return new drop_partitions_req_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public DropPartitionsRequest getReq() { + return this.req; + } + + public void setReq(DropPartitionsRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((DropPartitionsRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partitions_req_args) + return this.equals((drop_partitions_req_args)that); + return false; + } + + public boolean equals(drop_partitions_req_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_partitions_req_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_partitions_req_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 drop_partitions_req_argsStandardSchemeFactory implements SchemeFactory { + public drop_partitions_req_argsStandardScheme getScheme() { + return new drop_partitions_req_argsStandardScheme(); + } + } + + private static class drop_partitions_req_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partitions_req_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new DropPartitionsRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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_partitions_req_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_partitions_req_argsTupleSchemeFactory implements SchemeFactory { + public drop_partitions_req_argsTupleScheme getScheme() { + return new drop_partitions_req_argsTupleScheme(); + } + } + + private static class drop_partitions_req_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_partitions_req_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_partitions_req_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new DropPartitionsRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class drop_partitions_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_partitions_req_result"); + + 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 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_partitions_req_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_partitions_req_resultTupleSchemeFactory()); + } + + private DropPartitionsResult success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DropPartitionsResult.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_partitions_req_result.class, metaDataMap); + } + + public drop_partitions_req_result() { + } + + public drop_partitions_req_result( + DropPartitionsResult success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_partitions_req_result(drop_partitions_req_result other) { + if (other.isSetSuccess()) { + this.success = new DropPartitionsResult(other.success); + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public drop_partitions_req_result deepCopy() { + return new drop_partitions_req_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public DropPartitionsResult getSuccess() { + return this.success; + } + + public void setSuccess(DropPartitionsResult success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((DropPartitionsResult)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partitions_req_result) + return this.equals((drop_partitions_req_result)that); + return false; + } + + public boolean equals(drop_partitions_req_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_partitions_req_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_partitions_req_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 drop_partitions_req_resultStandardSchemeFactory implements SchemeFactory { + public drop_partitions_req_resultStandardScheme getScheme() { + return new drop_partitions_req_resultStandardScheme(); + } + } + + private static class drop_partitions_req_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_partitions_req_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 DropPartitionsResult(); + 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, drop_partitions_req_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 drop_partitions_req_resultTupleSchemeFactory implements SchemeFactory { + public drop_partitions_req_resultTupleScheme getScheme() { + return new drop_partitions_req_resultTupleScheme(); + } + } + + private static class drop_partitions_req_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_partitions_req_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, drop_partitions_req_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new DropPartitionsResult(); + 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 get_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_args.class, metaDataMap); + } + + public get_partition_args() { + } + + public get_partition_args( + String db_name, + String tbl_name, + List part_vals) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_args(get_partition_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(other.part_vals); + this.part_vals = __this__part_vals; + } + } + + public get_partition_args deepCopy() { + return new get_partition_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_args) + return this.equals((get_partition_args)that); + return false; + } + + public boolean equals(get_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + 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 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 _list916 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list916.size); + String _elem917; + for (int _i918 = 0; _i918 < _list916.size; ++_i918) + { + _elem917 = iprot.readString(); + struct.part_vals.add(_elem917); + } + 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 _iter919 : struct.part_vals) + { + oprot.writeString(_iter919); + } + 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 _iter920 : struct.part_vals) + { + oprot.writeString(_iter920); + } + } + } + } + + @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 _list921 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list921.size); + String _elem922; + for (int _i923 = 0; _i923 < _list921.size; ++_i923) + { + _elem922 = iprot.readString(); + struct.part_vals.add(_elem922); + } + } + struct.setPart_valsIsSet(true); + } + } + } + + } + + public static class get_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_result.class, metaDataMap); + } + + public get_partition_result() { + } + + public get_partition_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_result(get_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_partition_result deepCopy() { + return new get_partition_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_result) + return this.equals((get_partition_result)that); + return false; + } + + public boolean equals(get_partition_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partition_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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 exchange_partition_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exchange_partition_args"); + + private static final org.apache.thrift.protocol.TField PARTITION_SPECS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionSpecs", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final org.apache.thrift.protocol.TField SOURCE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("source_db", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField SOURCE_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("source_table_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField DEST_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("dest_db", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField DEST_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dest_table_name", org.apache.thrift.protocol.TType.STRING, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new exchange_partition_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new exchange_partition_argsTupleSchemeFactory()); + } + + private Map partitionSpecs; // required + private String source_db; // required + private String source_table_name; // required + private String dest_db; // required + private String dest_table_name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PARTITION_SPECS((short)1, "partitionSpecs"), + SOURCE_DB((short)2, "source_db"), + SOURCE_TABLE_NAME((short)3, "source_table_name"), + DEST_DB((short)4, "dest_db"), + DEST_TABLE_NAME((short)5, "dest_table_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PARTITION_SPECS + return PARTITION_SPECS; + case 2: // SOURCE_DB + return SOURCE_DB; + case 3: // SOURCE_TABLE_NAME + return SOURCE_TABLE_NAME; + case 4: // DEST_DB + return DEST_DB; + case 5: // DEST_TABLE_NAME + return DEST_TABLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PARTITION_SPECS, new org.apache.thrift.meta_data.FieldMetaData("partitionSpecs", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.SOURCE_DB, new org.apache.thrift.meta_data.FieldMetaData("source_db", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SOURCE_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("source_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DEST_DB, new org.apache.thrift.meta_data.FieldMetaData("dest_db", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DEST_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("dest_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exchange_partition_args.class, metaDataMap); + } + + public exchange_partition_args() { + } + + public exchange_partition_args( + Map partitionSpecs, + String source_db, + String source_table_name, + String dest_db, + String dest_table_name) + { + this(); + this.partitionSpecs = partitionSpecs; + this.source_db = source_db; + this.source_table_name = source_table_name; + this.dest_db = dest_db; + this.dest_table_name = dest_table_name; + } + + /** + * Performs a deep copy on other. + */ + public exchange_partition_args(exchange_partition_args other) { + if (other.isSetPartitionSpecs()) { + Map __this__partitionSpecs = new HashMap(other.partitionSpecs); + this.partitionSpecs = __this__partitionSpecs; + } + if (other.isSetSource_db()) { + this.source_db = other.source_db; + } + if (other.isSetSource_table_name()) { + this.source_table_name = other.source_table_name; + } + if (other.isSetDest_db()) { + this.dest_db = other.dest_db; + } + if (other.isSetDest_table_name()) { + this.dest_table_name = other.dest_table_name; + } + } + + public exchange_partition_args deepCopy() { + return new exchange_partition_args(this); + } + + @Override + public void clear() { + this.partitionSpecs = null; + this.source_db = null; + this.source_table_name = null; + this.dest_db = null; + this.dest_table_name = null; + } + + public int getPartitionSpecsSize() { + return (this.partitionSpecs == null) ? 0 : this.partitionSpecs.size(); + } + + public void putToPartitionSpecs(String key, String val) { + if (this.partitionSpecs == null) { + this.partitionSpecs = new HashMap(); + } + this.partitionSpecs.put(key, val); + } + + public Map getPartitionSpecs() { + return this.partitionSpecs; + } + + public void setPartitionSpecs(Map partitionSpecs) { + this.partitionSpecs = partitionSpecs; + } + + public void unsetPartitionSpecs() { + this.partitionSpecs = null; + } + + /** Returns true if field partitionSpecs is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitionSpecs() { + return this.partitionSpecs != null; + } + + public void setPartitionSpecsIsSet(boolean value) { + if (!value) { + this.partitionSpecs = null; + } + } + + public String getSource_db() { + return this.source_db; + } + + public void setSource_db(String source_db) { + this.source_db = source_db; + } + + public void unsetSource_db() { + this.source_db = null; + } + + /** Returns true if field source_db is set (has been assigned a value) and false otherwise */ + public boolean isSetSource_db() { + return this.source_db != null; + } + + public void setSource_dbIsSet(boolean value) { + if (!value) { + this.source_db = null; + } + } + + public String getSource_table_name() { + return this.source_table_name; + } + + public void setSource_table_name(String source_table_name) { + this.source_table_name = source_table_name; + } + + public void unsetSource_table_name() { + this.source_table_name = null; + } + + /** Returns true if field source_table_name is set (has been assigned a value) and false otherwise */ + public boolean isSetSource_table_name() { + return this.source_table_name != null; + } + + public void setSource_table_nameIsSet(boolean value) { + if (!value) { + this.source_table_name = null; + } + } + + public String getDest_db() { + return this.dest_db; + } + + public void setDest_db(String dest_db) { + this.dest_db = dest_db; + } + + public void unsetDest_db() { + this.dest_db = null; + } + + /** Returns true if field dest_db is set (has been assigned a value) and false otherwise */ + public boolean isSetDest_db() { + return this.dest_db != null; + } + + public void setDest_dbIsSet(boolean value) { + if (!value) { + this.dest_db = null; + } + } + + public String getDest_table_name() { + return this.dest_table_name; + } + + public void setDest_table_name(String dest_table_name) { + this.dest_table_name = dest_table_name; + } + + public void unsetDest_table_name() { + this.dest_table_name = null; + } + + /** Returns true if field dest_table_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDest_table_name() { + return this.dest_table_name != null; + } + + public void setDest_table_nameIsSet(boolean value) { + if (!value) { + this.dest_table_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PARTITION_SPECS: + if (value == null) { + unsetPartitionSpecs(); + } else { + setPartitionSpecs((Map)value); + } + break; + + case SOURCE_DB: + if (value == null) { + unsetSource_db(); + } else { + setSource_db((String)value); + } + break; + + case SOURCE_TABLE_NAME: + if (value == null) { + unsetSource_table_name(); + } else { + setSource_table_name((String)value); + } + break; + + case DEST_DB: + if (value == null) { + unsetDest_db(); + } else { + setDest_db((String)value); + } + break; + + case DEST_TABLE_NAME: + if (value == null) { + unsetDest_table_name(); + } else { + setDest_table_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PARTITION_SPECS: + return getPartitionSpecs(); + + case SOURCE_DB: + return getSource_db(); + + case SOURCE_TABLE_NAME: + return getSource_table_name(); + + case DEST_DB: + return getDest_db(); + + case DEST_TABLE_NAME: + return getDest_table_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PARTITION_SPECS: + return isSetPartitionSpecs(); + case SOURCE_DB: + return isSetSource_db(); + case SOURCE_TABLE_NAME: + return isSetSource_table_name(); + case DEST_DB: + return isSetDest_db(); + case DEST_TABLE_NAME: + return isSetDest_table_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof exchange_partition_args) + return this.equals((exchange_partition_args)that); + return false; + } + + public boolean equals(exchange_partition_args that) { + if (that == null) + return false; + + boolean this_present_partitionSpecs = true && this.isSetPartitionSpecs(); + boolean that_present_partitionSpecs = true && that.isSetPartitionSpecs(); + if (this_present_partitionSpecs || that_present_partitionSpecs) { + if (!(this_present_partitionSpecs && that_present_partitionSpecs)) + return false; + if (!this.partitionSpecs.equals(that.partitionSpecs)) + return false; + } + + boolean this_present_source_db = true && this.isSetSource_db(); + boolean that_present_source_db = true && that.isSetSource_db(); + if (this_present_source_db || that_present_source_db) { + if (!(this_present_source_db && that_present_source_db)) + return false; + if (!this.source_db.equals(that.source_db)) + return false; + } + + boolean this_present_source_table_name = true && this.isSetSource_table_name(); + boolean that_present_source_table_name = true && that.isSetSource_table_name(); + if (this_present_source_table_name || that_present_source_table_name) { + if (!(this_present_source_table_name && that_present_source_table_name)) + return false; + if (!this.source_table_name.equals(that.source_table_name)) + return false; + } + + boolean this_present_dest_db = true && this.isSetDest_db(); + boolean that_present_dest_db = true && that.isSetDest_db(); + if (this_present_dest_db || that_present_dest_db) { + if (!(this_present_dest_db && that_present_dest_db)) + return false; + if (!this.dest_db.equals(that.dest_db)) + return false; + } + + boolean this_present_dest_table_name = true && this.isSetDest_table_name(); + boolean that_present_dest_table_name = true && that.isSetDest_table_name(); + if (this_present_dest_table_name || that_present_dest_table_name) { + if (!(this_present_dest_table_name && that_present_dest_table_name)) + return false; + if (!this.dest_table_name.equals(that.dest_table_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_partitionSpecs = true && (isSetPartitionSpecs()); + list.add(present_partitionSpecs); + if (present_partitionSpecs) + list.add(partitionSpecs); + + boolean present_source_db = true && (isSetSource_db()); + list.add(present_source_db); + if (present_source_db) + list.add(source_db); + + boolean present_source_table_name = true && (isSetSource_table_name()); + list.add(present_source_table_name); + if (present_source_table_name) + list.add(source_table_name); + + boolean present_dest_db = true && (isSetDest_db()); + list.add(present_dest_db); + if (present_dest_db) + list.add(dest_db); + + boolean present_dest_table_name = true && (isSetDest_table_name()); + list.add(present_dest_table_name); + if (present_dest_table_name) + list.add(dest_table_name); + + return list.hashCode(); + } + + @Override + public int compareTo(exchange_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPartitionSpecs()).compareTo(other.isSetPartitionSpecs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionSpecs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionSpecs, other.partitionSpecs); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSource_db()).compareTo(other.isSetSource_db()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSource_db()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_db, other.source_db); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSource_table_name()).compareTo(other.isSetSource_table_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSource_table_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_table_name, other.source_table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDest_db()).compareTo(other.isSetDest_db()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDest_db()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_db, other.dest_db); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDest_table_name()).compareTo(other.isSetDest_table_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDest_table_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_table_name, other.dest_table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("exchange_partition_args("); + boolean first = true; + + sb.append("partitionSpecs:"); + if (this.partitionSpecs == null) { + sb.append("null"); + } else { + sb.append(this.partitionSpecs); + } + first = false; + if (!first) sb.append(", "); + sb.append("source_db:"); + if (this.source_db == null) { + sb.append("null"); + } else { + sb.append(this.source_db); + } + first = false; + if (!first) sb.append(", "); + sb.append("source_table_name:"); + if (this.source_table_name == null) { + sb.append("null"); + } else { + sb.append(this.source_table_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("dest_db:"); + if (this.dest_db == null) { + sb.append("null"); + } else { + sb.append(this.dest_db); + } + first = false; + if (!first) sb.append(", "); + sb.append("dest_table_name:"); + if (this.dest_table_name == null) { + sb.append("null"); + } else { + sb.append(this.dest_table_name); + } + 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 exchange_partition_argsStandardSchemeFactory implements SchemeFactory { + public exchange_partition_argsStandardScheme getScheme() { + return new exchange_partition_argsStandardScheme(); + } + } + + private static class exchange_partition_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, exchange_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: // PARTITION_SPECS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map924 = iprot.readMapBegin(); + struct.partitionSpecs = new HashMap(2*_map924.size); + String _key925; + String _val926; + for (int _i927 = 0; _i927 < _map924.size; ++_i927) + { + _key925 = iprot.readString(); + _val926 = iprot.readString(); + struct.partitionSpecs.put(_key925, _val926); + } + iprot.readMapEnd(); + } + struct.setPartitionSpecsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // SOURCE_DB + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.source_db = iprot.readString(); + struct.setSource_dbIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SOURCE_TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.source_table_name = iprot.readString(); + struct.setSource_table_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DEST_DB + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dest_db = iprot.readString(); + struct.setDest_dbIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // DEST_TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dest_table_name = iprot.readString(); + struct.setDest_table_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, exchange_partition_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.partitionSpecs != null) { + oprot.writeFieldBegin(PARTITION_SPECS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.partitionSpecs.size())); + for (Map.Entry _iter928 : struct.partitionSpecs.entrySet()) + { + oprot.writeString(_iter928.getKey()); + oprot.writeString(_iter928.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.source_db != null) { + oprot.writeFieldBegin(SOURCE_DB_FIELD_DESC); + oprot.writeString(struct.source_db); + oprot.writeFieldEnd(); + } + if (struct.source_table_name != null) { + oprot.writeFieldBegin(SOURCE_TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.source_table_name); + oprot.writeFieldEnd(); + } + if (struct.dest_db != null) { + oprot.writeFieldBegin(DEST_DB_FIELD_DESC); + oprot.writeString(struct.dest_db); + oprot.writeFieldEnd(); + } + if (struct.dest_table_name != null) { + oprot.writeFieldBegin(DEST_TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.dest_table_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class exchange_partition_argsTupleSchemeFactory implements SchemeFactory { + public exchange_partition_argsTupleScheme getScheme() { + return new exchange_partition_argsTupleScheme(); + } + } + + private static class exchange_partition_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, exchange_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPartitionSpecs()) { + optionals.set(0); + } + if (struct.isSetSource_db()) { + optionals.set(1); + } + if (struct.isSetSource_table_name()) { + optionals.set(2); + } + if (struct.isSetDest_db()) { + optionals.set(3); + } + if (struct.isSetDest_table_name()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetPartitionSpecs()) { + { + oprot.writeI32(struct.partitionSpecs.size()); + for (Map.Entry _iter929 : struct.partitionSpecs.entrySet()) + { + oprot.writeString(_iter929.getKey()); + oprot.writeString(_iter929.getValue()); + } + } + } + if (struct.isSetSource_db()) { + oprot.writeString(struct.source_db); + } + if (struct.isSetSource_table_name()) { + oprot.writeString(struct.source_table_name); + } + if (struct.isSetDest_db()) { + oprot.writeString(struct.dest_db); + } + if (struct.isSetDest_table_name()) { + oprot.writeString(struct.dest_table_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, exchange_partition_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map930 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.partitionSpecs = new HashMap(2*_map930.size); + String _key931; + String _val932; + for (int _i933 = 0; _i933 < _map930.size; ++_i933) + { + _key931 = iprot.readString(); + _val932 = iprot.readString(); + struct.partitionSpecs.put(_key931, _val932); + } + } + struct.setPartitionSpecsIsSet(true); + } + if (incoming.get(1)) { + struct.source_db = iprot.readString(); + struct.setSource_dbIsSet(true); + } + if (incoming.get(2)) { + struct.source_table_name = iprot.readString(); + struct.setSource_table_nameIsSet(true); + } + if (incoming.get(3)) { + struct.dest_db = iprot.readString(); + struct.setDest_dbIsSet(true); + } + if (incoming.get(4)) { + struct.dest_table_name = iprot.readString(); + struct.setDest_table_nameIsSet(true); + } + } + } + + } + + public static class exchange_partition_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exchange_partition_result"); + + 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 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 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 exchange_partition_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new exchange_partition_resultTupleSchemeFactory()); + } + + private Partition success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + private InvalidObjectException o3; // required + private InvalidInputException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exchange_partition_result.class, metaDataMap); + } + + public exchange_partition_result() { + } + + public exchange_partition_result( + Partition success, + MetaException o1, + NoSuchObjectException o2, + InvalidObjectException o3, + InvalidInputException o4) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public exchange_partition_result(exchange_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new InvalidObjectException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidInputException(other.o4); + } + } + + public exchange_partition_result deepCopy() { + return new exchange_partition_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public InvalidObjectException getO3() { + return this.o3; + } + + public void setO3(InvalidObjectException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidInputException getO4() { + return this.o4; + } + + public void setO4(InvalidInputException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((InvalidObjectException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidInputException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof exchange_partition_result) + return this.equals((exchange_partition_result)that); + return false; + } + + public boolean equals(exchange_partition_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(exchange_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("exchange_partition_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 exchange_partition_resultStandardSchemeFactory implements SchemeFactory { + public exchange_partition_resultStandardScheme getScheme() { + return new exchange_partition_resultStandardScheme(); + } + } + + private static class exchange_partition_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, exchange_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; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new InvalidObjectException(); + 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 InvalidInputException(); + 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, exchange_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(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class exchange_partition_resultTupleSchemeFactory implements SchemeFactory { + public exchange_partition_resultTupleScheme getScheme() { + return new exchange_partition_resultTupleScheme(); + } + } + + private static class exchange_partition_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, exchange_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); + } + if (struct.isSetO4()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + 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); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, exchange_partition_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + 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); + } + if (incoming.get(3)) { + struct.o3 = new InvalidObjectException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + + } + + public static class exchange_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exchange_partitions_args"); + + private static final org.apache.thrift.protocol.TField PARTITION_SPECS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionSpecs", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final org.apache.thrift.protocol.TField SOURCE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("source_db", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField SOURCE_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("source_table_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField DEST_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("dest_db", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField DEST_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dest_table_name", org.apache.thrift.protocol.TType.STRING, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new exchange_partitions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new exchange_partitions_argsTupleSchemeFactory()); + } + + private Map partitionSpecs; // required + private String source_db; // required + private String source_table_name; // required + private String dest_db; // required + private String dest_table_name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PARTITION_SPECS((short)1, "partitionSpecs"), + SOURCE_DB((short)2, "source_db"), + SOURCE_TABLE_NAME((short)3, "source_table_name"), + DEST_DB((short)4, "dest_db"), + DEST_TABLE_NAME((short)5, "dest_table_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PARTITION_SPECS + return PARTITION_SPECS; + case 2: // SOURCE_DB + return SOURCE_DB; + case 3: // SOURCE_TABLE_NAME + return SOURCE_TABLE_NAME; + case 4: // DEST_DB + return DEST_DB; + case 5: // DEST_TABLE_NAME + return DEST_TABLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PARTITION_SPECS, new org.apache.thrift.meta_data.FieldMetaData("partitionSpecs", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.SOURCE_DB, new org.apache.thrift.meta_data.FieldMetaData("source_db", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SOURCE_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("source_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DEST_DB, new org.apache.thrift.meta_data.FieldMetaData("dest_db", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DEST_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("dest_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exchange_partitions_args.class, metaDataMap); + } + + public exchange_partitions_args() { + } + + public exchange_partitions_args( + Map partitionSpecs, + String source_db, + String source_table_name, + String dest_db, + String dest_table_name) + { + this(); + this.partitionSpecs = partitionSpecs; + this.source_db = source_db; + this.source_table_name = source_table_name; + this.dest_db = dest_db; + this.dest_table_name = dest_table_name; + } + + /** + * Performs a deep copy on other. + */ + public exchange_partitions_args(exchange_partitions_args other) { + if (other.isSetPartitionSpecs()) { + Map __this__partitionSpecs = new HashMap(other.partitionSpecs); + this.partitionSpecs = __this__partitionSpecs; + } + if (other.isSetSource_db()) { + this.source_db = other.source_db; + } + if (other.isSetSource_table_name()) { + this.source_table_name = other.source_table_name; + } + if (other.isSetDest_db()) { + this.dest_db = other.dest_db; + } + if (other.isSetDest_table_name()) { + this.dest_table_name = other.dest_table_name; + } + } + + public exchange_partitions_args deepCopy() { + return new exchange_partitions_args(this); + } + + @Override + public void clear() { + this.partitionSpecs = null; + this.source_db = null; + this.source_table_name = null; + this.dest_db = null; + this.dest_table_name = null; + } + + public int getPartitionSpecsSize() { + return (this.partitionSpecs == null) ? 0 : this.partitionSpecs.size(); + } + + public void putToPartitionSpecs(String key, String val) { + if (this.partitionSpecs == null) { + this.partitionSpecs = new HashMap(); + } + this.partitionSpecs.put(key, val); + } + + public Map getPartitionSpecs() { + return this.partitionSpecs; + } + + public void setPartitionSpecs(Map partitionSpecs) { + this.partitionSpecs = partitionSpecs; + } + + public void unsetPartitionSpecs() { + this.partitionSpecs = null; + } + + /** Returns true if field partitionSpecs is set (has been assigned a value) and false otherwise */ + public boolean isSetPartitionSpecs() { + return this.partitionSpecs != null; + } + + public void setPartitionSpecsIsSet(boolean value) { + if (!value) { + this.partitionSpecs = null; + } + } + + public String getSource_db() { + return this.source_db; + } + + public void setSource_db(String source_db) { + this.source_db = source_db; + } + + public void unsetSource_db() { + this.source_db = null; + } + + /** Returns true if field source_db is set (has been assigned a value) and false otherwise */ + public boolean isSetSource_db() { + return this.source_db != null; + } + + public void setSource_dbIsSet(boolean value) { + if (!value) { + this.source_db = null; + } + } + + public String getSource_table_name() { + return this.source_table_name; + } + + public void setSource_table_name(String source_table_name) { + this.source_table_name = source_table_name; + } + + public void unsetSource_table_name() { + this.source_table_name = null; + } + + /** Returns true if field source_table_name is set (has been assigned a value) and false otherwise */ + public boolean isSetSource_table_name() { + return this.source_table_name != null; + } + + public void setSource_table_nameIsSet(boolean value) { + if (!value) { + this.source_table_name = null; + } + } + + public String getDest_db() { + return this.dest_db; + } + + public void setDest_db(String dest_db) { + this.dest_db = dest_db; + } + + public void unsetDest_db() { + this.dest_db = null; + } + + /** Returns true if field dest_db is set (has been assigned a value) and false otherwise */ + public boolean isSetDest_db() { + return this.dest_db != null; + } + + public void setDest_dbIsSet(boolean value) { + if (!value) { + this.dest_db = null; + } + } + + public String getDest_table_name() { + return this.dest_table_name; + } + + public void setDest_table_name(String dest_table_name) { + this.dest_table_name = dest_table_name; + } + + public void unsetDest_table_name() { + this.dest_table_name = null; + } + + /** Returns true if field dest_table_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDest_table_name() { + return this.dest_table_name != null; + } + + public void setDest_table_nameIsSet(boolean value) { + if (!value) { + this.dest_table_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PARTITION_SPECS: + if (value == null) { + unsetPartitionSpecs(); + } else { + setPartitionSpecs((Map)value); + } + break; + + case SOURCE_DB: + if (value == null) { + unsetSource_db(); + } else { + setSource_db((String)value); + } + break; + + case SOURCE_TABLE_NAME: + if (value == null) { + unsetSource_table_name(); + } else { + setSource_table_name((String)value); + } + break; + + case DEST_DB: + if (value == null) { + unsetDest_db(); + } else { + setDest_db((String)value); + } + break; + + case DEST_TABLE_NAME: + if (value == null) { + unsetDest_table_name(); + } else { + setDest_table_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PARTITION_SPECS: + return getPartitionSpecs(); + + case SOURCE_DB: + return getSource_db(); + + case SOURCE_TABLE_NAME: + return getSource_table_name(); + + case DEST_DB: + return getDest_db(); + + case DEST_TABLE_NAME: + return getDest_table_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PARTITION_SPECS: + return isSetPartitionSpecs(); + case SOURCE_DB: + return isSetSource_db(); + case SOURCE_TABLE_NAME: + return isSetSource_table_name(); + case DEST_DB: + return isSetDest_db(); + case DEST_TABLE_NAME: + return isSetDest_table_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof exchange_partitions_args) + return this.equals((exchange_partitions_args)that); + return false; + } + + public boolean equals(exchange_partitions_args that) { + if (that == null) + return false; + + boolean this_present_partitionSpecs = true && this.isSetPartitionSpecs(); + boolean that_present_partitionSpecs = true && that.isSetPartitionSpecs(); + if (this_present_partitionSpecs || that_present_partitionSpecs) { + if (!(this_present_partitionSpecs && that_present_partitionSpecs)) + return false; + if (!this.partitionSpecs.equals(that.partitionSpecs)) + return false; + } + + boolean this_present_source_db = true && this.isSetSource_db(); + boolean that_present_source_db = true && that.isSetSource_db(); + if (this_present_source_db || that_present_source_db) { + if (!(this_present_source_db && that_present_source_db)) + return false; + if (!this.source_db.equals(that.source_db)) + return false; + } + + boolean this_present_source_table_name = true && this.isSetSource_table_name(); + boolean that_present_source_table_name = true && that.isSetSource_table_name(); + if (this_present_source_table_name || that_present_source_table_name) { + if (!(this_present_source_table_name && that_present_source_table_name)) + return false; + if (!this.source_table_name.equals(that.source_table_name)) + return false; + } + + boolean this_present_dest_db = true && this.isSetDest_db(); + boolean that_present_dest_db = true && that.isSetDest_db(); + if (this_present_dest_db || that_present_dest_db) { + if (!(this_present_dest_db && that_present_dest_db)) + return false; + if (!this.dest_db.equals(that.dest_db)) + return false; + } + + boolean this_present_dest_table_name = true && this.isSetDest_table_name(); + boolean that_present_dest_table_name = true && that.isSetDest_table_name(); + if (this_present_dest_table_name || that_present_dest_table_name) { + if (!(this_present_dest_table_name && that_present_dest_table_name)) + return false; + if (!this.dest_table_name.equals(that.dest_table_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_partitionSpecs = true && (isSetPartitionSpecs()); + list.add(present_partitionSpecs); + if (present_partitionSpecs) + list.add(partitionSpecs); + + boolean present_source_db = true && (isSetSource_db()); + list.add(present_source_db); + if (present_source_db) + list.add(source_db); + + boolean present_source_table_name = true && (isSetSource_table_name()); + list.add(present_source_table_name); + if (present_source_table_name) + list.add(source_table_name); + + boolean present_dest_db = true && (isSetDest_db()); + list.add(present_dest_db); + if (present_dest_db) + list.add(dest_db); + + boolean present_dest_table_name = true && (isSetDest_table_name()); + list.add(present_dest_table_name); + if (present_dest_table_name) + list.add(dest_table_name); + + return list.hashCode(); + } + + @Override + public int compareTo(exchange_partitions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPartitionSpecs()).compareTo(other.isSetPartitionSpecs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionSpecs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionSpecs, other.partitionSpecs); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSource_db()).compareTo(other.isSetSource_db()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSource_db()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_db, other.source_db); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSource_table_name()).compareTo(other.isSetSource_table_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSource_table_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_table_name, other.source_table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDest_db()).compareTo(other.isSetDest_db()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDest_db()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_db, other.dest_db); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDest_table_name()).compareTo(other.isSetDest_table_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDest_table_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest_table_name, other.dest_table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("exchange_partitions_args("); + boolean first = true; + + sb.append("partitionSpecs:"); + if (this.partitionSpecs == null) { + sb.append("null"); + } else { + sb.append(this.partitionSpecs); + } + first = false; + if (!first) sb.append(", "); + sb.append("source_db:"); + if (this.source_db == null) { + sb.append("null"); + } else { + sb.append(this.source_db); + } + first = false; + if (!first) sb.append(", "); + sb.append("source_table_name:"); + if (this.source_table_name == null) { + sb.append("null"); + } else { + sb.append(this.source_table_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("dest_db:"); + if (this.dest_db == null) { + sb.append("null"); + } else { + sb.append(this.dest_db); + } + first = false; + if (!first) sb.append(", "); + sb.append("dest_table_name:"); + if (this.dest_table_name == null) { + sb.append("null"); + } else { + sb.append(this.dest_table_name); + } + 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 exchange_partitions_argsStandardSchemeFactory implements SchemeFactory { + public exchange_partitions_argsStandardScheme getScheme() { + return new exchange_partitions_argsStandardScheme(); + } + } + + private static class exchange_partitions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, exchange_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: // PARTITION_SPECS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map934 = iprot.readMapBegin(); + struct.partitionSpecs = new HashMap(2*_map934.size); + String _key935; + String _val936; + for (int _i937 = 0; _i937 < _map934.size; ++_i937) + { + _key935 = iprot.readString(); + _val936 = iprot.readString(); + struct.partitionSpecs.put(_key935, _val936); + } + iprot.readMapEnd(); + } + struct.setPartitionSpecsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // SOURCE_DB + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.source_db = iprot.readString(); + struct.setSource_dbIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SOURCE_TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.source_table_name = iprot.readString(); + struct.setSource_table_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DEST_DB + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dest_db = iprot.readString(); + struct.setDest_dbIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // DEST_TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dest_table_name = iprot.readString(); + struct.setDest_table_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, exchange_partitions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.partitionSpecs != null) { + oprot.writeFieldBegin(PARTITION_SPECS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.partitionSpecs.size())); + for (Map.Entry _iter938 : struct.partitionSpecs.entrySet()) + { + oprot.writeString(_iter938.getKey()); + oprot.writeString(_iter938.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.source_db != null) { + oprot.writeFieldBegin(SOURCE_DB_FIELD_DESC); + oprot.writeString(struct.source_db); + oprot.writeFieldEnd(); + } + if (struct.source_table_name != null) { + oprot.writeFieldBegin(SOURCE_TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.source_table_name); + oprot.writeFieldEnd(); + } + if (struct.dest_db != null) { + oprot.writeFieldBegin(DEST_DB_FIELD_DESC); + oprot.writeString(struct.dest_db); + oprot.writeFieldEnd(); + } + if (struct.dest_table_name != null) { + oprot.writeFieldBegin(DEST_TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.dest_table_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class exchange_partitions_argsTupleSchemeFactory implements SchemeFactory { + public exchange_partitions_argsTupleScheme getScheme() { + return new exchange_partitions_argsTupleScheme(); + } + } + + private static class exchange_partitions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, exchange_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPartitionSpecs()) { + optionals.set(0); + } + if (struct.isSetSource_db()) { + optionals.set(1); + } + if (struct.isSetSource_table_name()) { + optionals.set(2); + } + if (struct.isSetDest_db()) { + optionals.set(3); + } + if (struct.isSetDest_table_name()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetPartitionSpecs()) { + { + oprot.writeI32(struct.partitionSpecs.size()); + for (Map.Entry _iter939 : struct.partitionSpecs.entrySet()) + { + oprot.writeString(_iter939.getKey()); + oprot.writeString(_iter939.getValue()); + } + } + } + if (struct.isSetSource_db()) { + oprot.writeString(struct.source_db); + } + if (struct.isSetSource_table_name()) { + oprot.writeString(struct.source_table_name); + } + if (struct.isSetDest_db()) { + oprot.writeString(struct.dest_db); + } + if (struct.isSetDest_table_name()) { + oprot.writeString(struct.dest_table_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, exchange_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map940 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.partitionSpecs = new HashMap(2*_map940.size); + String _key941; + String _val942; + for (int _i943 = 0; _i943 < _map940.size; ++_i943) + { + _key941 = iprot.readString(); + _val942 = iprot.readString(); + struct.partitionSpecs.put(_key941, _val942); + } + } + struct.setPartitionSpecsIsSet(true); + } + if (incoming.get(1)) { + struct.source_db = iprot.readString(); + struct.setSource_dbIsSet(true); + } + if (incoming.get(2)) { + struct.source_table_name = iprot.readString(); + struct.setSource_table_nameIsSet(true); + } + if (incoming.get(3)) { + struct.dest_db = iprot.readString(); + struct.setDest_dbIsSet(true); + } + if (incoming.get(4)) { + struct.dest_table_name = iprot.readString(); + struct.setDest_table_nameIsSet(true); + } + } + } + + } + + public static class exchange_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exchange_partitions_result"); + + 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 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 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 exchange_partitions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new exchange_partitions_resultTupleSchemeFactory()); + } + + private List success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + private InvalidObjectException o3; // required + private InvalidInputException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exchange_partitions_result.class, metaDataMap); + } + + public exchange_partitions_result() { + } + + public exchange_partitions_result( + List success, + MetaException o1, + NoSuchObjectException o2, + InvalidObjectException o3, + InvalidInputException o4) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public exchange_partitions_result(exchange_partitions_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new InvalidObjectException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidInputException(other.o4); + } + } + + public exchange_partitions_result deepCopy() { + return new exchange_partitions_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public InvalidObjectException getO3() { + return this.o3; + } + + public void setO3(InvalidObjectException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidInputException getO4() { + return this.o4; + } + + public void setO4(InvalidInputException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((InvalidObjectException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidInputException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof exchange_partitions_result) + return this.equals((exchange_partitions_result)that); + return false; + } + + public boolean equals(exchange_partitions_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(exchange_partitions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("exchange_partitions_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + 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 exchange_partitions_resultStandardSchemeFactory implements SchemeFactory { + public exchange_partitions_resultStandardScheme getScheme() { + return new exchange_partitions_resultStandardScheme(); + } + } + + private static class exchange_partitions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, exchange_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 _list944 = iprot.readListBegin(); + struct.success = new ArrayList(_list944.size); + Partition _elem945; + for (int _i946 = 0; _i946 < _list944.size; ++_i946) + { + _elem945 = new Partition(); + _elem945.read(iprot); + struct.success.add(_elem945); + } + 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; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new InvalidObjectException(); + 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 InvalidInputException(); + 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, exchange_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 _iter947 : struct.success) + { + _iter947.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(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class exchange_partitions_resultTupleSchemeFactory implements SchemeFactory { + public exchange_partitions_resultTupleScheme getScheme() { + return new exchange_partitions_resultTupleScheme(); + } + } + + private static class exchange_partitions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, exchange_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); + } + if (struct.isSetO4()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Partition _iter948 : struct.success) + { + _iter948.write(oprot); + } + } + } + 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, exchange_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list949 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list949.size); + Partition _elem950; + for (int _i951 = 0; _i951 < _list949.size; ++_i951) + { + _elem950 = new Partition(); + _elem950.read(iprot); + struct.success.add(_elem950); + } + } + 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 InvalidObjectException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + + } + + public static class get_partition_with_auth_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_with_auth_args"); + + 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 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 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 + private String user_name; // required + private List group_names; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + USER_NAME((short)4, "user_name"), + GROUP_NAMES((short)5, "group_names"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // USER_NAME + return USER_NAME; + case 5: // GROUP_NAMES + return GROUP_NAMES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_with_auth_args.class, metaDataMap); + } + + public get_partition_with_auth_args() { + } + + public get_partition_with_auth_args( + String db_name, + String tbl_name, + List part_vals, + String user_name, + List group_names) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.user_name = user_name; + this.group_names = group_names; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_with_auth_args(get_partition_with_auth_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(other.part_vals); + this.part_vals = __this__part_vals; + } + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(other.group_names); + this.group_names = __this__group_names; + } + } + + public get_partition_with_auth_args deepCopy() { + return new get_partition_with_auth_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.user_name = null; + this.group_names = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public String getUser_name() { + return this.user_name; + } + + public void setUser_name(String user_name) { + this.user_name = user_name; + } + + public void unsetUser_name() { + this.user_name = null; + } + + /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; + } + + public void setUser_nameIsSet(boolean value) { + if (!value) { + this.user_name = null; + } + } + + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); + } + + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); + } + + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); + } + + public List getGroup_names() { + return this.group_names; + } + + public void setGroup_names(List group_names) { + this.group_names = group_names; + } + + public void unsetGroup_names() { + this.group_names = null; + } + + /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; + } + + public void setGroup_namesIsSet(boolean value) { + if (!value) { + this.group_names = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_with_auth_args) + return this.equals((get_partition_with_auth_args)that); + return false; + } + + public boolean equals(get_partition_with_auth_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) + return false; + } + + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) + return false; + if (!this.group_names.equals(that.group_names)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + boolean present_user_name = true && (isSetUser_name()); + list.add(present_user_name); + if (present_user_name) + list.add(user_name); + + boolean present_group_names = true && (isSetGroup_names()); + list.add(present_group_names); + if (present_group_names) + list.add(group_names); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partition_with_auth_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroup_names()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.group_names); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partition_with_auth_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_names:"); + if (this.group_names == null) { + sb.append("null"); + } else { + sb.append(this.group_names); + } + 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 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 _list952 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list952.size); + String _elem953; + for (int _i954 = 0; _i954 < _list952.size; ++_i954) + { + _elem953 = iprot.readString(); + struct.part_vals.add(_elem953); + } + 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 _list955 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list955.size); + String _elem956; + for (int _i957 = 0; _i957 < _list955.size; ++_i957) + { + _elem956 = iprot.readString(); + struct.group_names.add(_elem956); + } + 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 _iter958 : struct.part_vals) + { + oprot.writeString(_iter958); + } + 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 _iter959 : struct.group_names) + { + oprot.writeString(_iter959); + } + 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 _iter960 : struct.part_vals) + { + oprot.writeString(_iter960); + } + } + } + if (struct.isSetUser_name()) { + oprot.writeString(struct.user_name); + } + if (struct.isSetGroup_names()) { + { + oprot.writeI32(struct.group_names.size()); + for (String _iter961 : struct.group_names) + { + oprot.writeString(_iter961); + } + } + } + } + + @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 _list962 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list962.size); + String _elem963; + for (int _i964 = 0; _i964 < _list962.size; ++_i964) + { + _elem963 = iprot.readString(); + struct.part_vals.add(_elem963); + } + } + 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 _list965 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list965.size); + String _elem966; + for (int _i967 = 0; _i967 < _list965.size; ++_i967) + { + _elem966 = iprot.readString(); + struct.group_names.add(_elem966); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + + } + + public static class get_partition_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_with_auth_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_with_auth_result.class, metaDataMap); + } + + public get_partition_with_auth_result() { + } + + public get_partition_with_auth_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_with_auth_result(get_partition_with_auth_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_partition_with_auth_result deepCopy() { + return new get_partition_with_auth_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_with_auth_result) + return this.equals((get_partition_with_auth_result)that); + return false; + } + + public boolean equals(get_partition_with_auth_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partition_with_auth_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partition_with_auth_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_by_name_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_by_name_args.class, metaDataMap); + } + + public get_partition_by_name_args() { + } + + public get_partition_by_name_args( + String db_name, + String tbl_name, + String part_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_by_name_args(get_partition_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + } + + public get_partition_by_name_args deepCopy() { + return new get_partition_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_by_name_args) + return this.equals((get_partition_by_name_args)that); + return false; + } + + public boolean equals(get_partition_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_name = true && (isSetPart_name()); + list.add(present_part_name); + if (present_part_name) + list.add(part_name); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partition_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partition_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_by_name_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_by_name_result.class, metaDataMap); + } + + public get_partition_by_name_result() { + } + + public get_partition_by_name_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_by_name_result(get_partition_by_name_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_partition_by_name_result deepCopy() { + return new get_partition_by_name_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_by_name_result) + return this.equals((get_partition_by_name_result)that); + return false; + } + + public boolean equals(get_partition_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partition_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partition_by_name_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_PARTS((short)3, "max_parts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_args.class, metaDataMap); + } + + public get_partitions_args() { + this.max_parts = (short)-1; + + } + + public get_partitions_args( + String db_name, + String tbl_name, + short max_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_args(get_partitions_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + this.max_parts = other.max_parts; + } + + public get_partitions_args deepCopy() { + return new get_partitions_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_parts = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_PARTS: + return getMax_parts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_args) + return this.equals((get_partitions_args)that); + return false; + } + + public boolean equals(get_partitions_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_max_parts = true; + list.add(present_max_parts); + if (present_max_parts) + list.add(max_parts); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + 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 { + // 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_result.class, metaDataMap); + } + + public get_partitions_result() { + } + + public get_partitions_result( + List success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_result(get_partitions_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_partitions_result deepCopy() { + return new get_partitions_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_result) + return this.equals((get_partitions_result)that); + return false; + } + + public boolean equals(get_partitions_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 _list968 = iprot.readListBegin(); + struct.success = new ArrayList(_list968.size); + Partition _elem969; + for (int _i970 = 0; _i970 < _list968.size; ++_i970) + { + _elem969 = new Partition(); + _elem969.read(iprot); + struct.success.add(_elem969); + } + 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 _iter971 : struct.success) + { + _iter971.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 _iter972 : struct.success) + { + _iter972.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 _list973 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list973.size); + Partition _elem974; + for (int _i975 = 0; _i975 < _list973.size; ++_i975) + { + _elem974 = new Partition(); + _elem974.read(iprot); + struct.success.add(_elem974); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_with_auth_args"); + + 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 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 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 + private String user_name; // required + private List group_names; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_PARTS((short)3, "max_parts"), + USER_NAME((short)4, "user_name"), + GROUP_NAMES((short)5, "group_names"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_PARTS + return MAX_PARTS; + case 4: // USER_NAME + return USER_NAME; + case 5: // GROUP_NAMES + return GROUP_NAMES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_with_auth_args.class, metaDataMap); + } + + public get_partitions_with_auth_args() { + this.max_parts = (short)-1; + + } + + public get_partitions_with_auth_args( + String db_name, + String tbl_name, + short max_parts, + String user_name, + List group_names) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + setMax_partsIsSet(true); + this.user_name = user_name; + this.group_names = group_names; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_with_auth_args(get_partitions_with_auth_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + this.max_parts = other.max_parts; + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(other.group_names); + this.group_names = __this__group_names; + } + } + + public get_partitions_with_auth_args deepCopy() { + return new get_partitions_with_auth_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_parts = (short)-1; + + this.user_name = null; + this.group_names = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); + } + + public String getUser_name() { + return this.user_name; + } + + public void setUser_name(String user_name) { + this.user_name = user_name; + } + + public void unsetUser_name() { + this.user_name = null; + } + + /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; + } + + public void setUser_nameIsSet(boolean value) { + if (!value) { + this.user_name = null; + } + } + + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); + } + + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); + } + + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); + } + + public List getGroup_names() { + return this.group_names; + } + + public void setGroup_names(List group_names) { + this.group_names = group_names; + } + + public void unsetGroup_names() { + this.group_names = null; + } + + /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; + } + + public void setGroup_namesIsSet(boolean value) { + if (!value) { + this.group_names = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_PARTS: + return getMax_parts(); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_with_auth_args) + return this.equals((get_partitions_with_auth_args)that); + return false; + } + + public boolean equals(get_partitions_with_auth_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) + return false; + } + + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) + return false; + if (!this.group_names.equals(that.group_names)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_max_parts = true; + list.add(present_max_parts); + if (present_max_parts) + list.add(max_parts); + + boolean present_user_name = true && (isSetUser_name()); + list.add(present_user_name); + if (present_user_name) + list.add(user_name); + + boolean present_group_names = true && (isSetGroup_names()); + list.add(present_group_names); + if (present_group_names) + list.add(group_names); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_with_auth_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroup_names()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.group_names); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_with_auth_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; + if (!first) sb.append(", "); + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_names:"); + if (this.group_names == null) { + sb.append("null"); + } else { + sb.append(this.group_names); + } + 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 { + // 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 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 _list976 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list976.size); + String _elem977; + for (int _i978 = 0; _i978 < _list976.size; ++_i978) + { + _elem977 = iprot.readString(); + struct.group_names.add(_elem977); + } + 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 _iter979 : struct.group_names) + { + oprot.writeString(_iter979); + } + 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 _iter980 : struct.group_names) + { + oprot.writeString(_iter980); + } + } + } + } + + @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 _list981 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list981.size); + String _elem982; + for (int _i983 = 0; _i983 < _list981.size; ++_i983) + { + _elem982 = iprot.readString(); + struct.group_names.add(_elem982); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + + } + + public static class get_partitions_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_with_auth_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_with_auth_result.class, metaDataMap); + } + + public get_partitions_with_auth_result() { + } + + public get_partitions_with_auth_result( + List success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_with_auth_result(get_partitions_with_auth_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_partitions_with_auth_result deepCopy() { + return new get_partitions_with_auth_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_with_auth_result) + return this.equals((get_partitions_with_auth_result)that); + return false; + } + + public boolean equals(get_partitions_with_auth_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_with_auth_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_with_auth_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 _list984 = iprot.readListBegin(); + struct.success = new ArrayList(_list984.size); + Partition _elem985; + for (int _i986 = 0; _i986 < _list984.size; ++_i986) + { + _elem985 = new Partition(); + _elem985.read(iprot); + struct.success.add(_elem985); + } + 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 _iter987 : struct.success) + { + _iter987.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 _iter988 : struct.success) + { + _iter988.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 _list989 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list989.size); + Partition _elem990; + for (int _i991 = 0; _i991 < _list989.size; ++_i991) + { + _elem990 = new Partition(); + _elem990.read(iprot); + struct.success.add(_elem990); + } + } + 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_pspec_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_pspec_args"); + + 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 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.I32, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_pspec_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_pspec_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + private int max_parts; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_PARTS((short)3, "max_parts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_pspec_args.class, metaDataMap); + } + + public get_partitions_pspec_args() { + this.max_parts = -1; + + } + + public get_partitions_pspec_args( + String db_name, + String tbl_name, + int max_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_pspec_args(get_partitions_pspec_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + this.max_parts = other.max_parts; + } + + public get_partitions_pspec_args deepCopy() { + return new get_partitions_pspec_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_parts = -1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(int max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_PARTS: + return getMax_parts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_pspec_args) + return this.equals((get_partitions_pspec_args)that); + return false; + } + + public boolean equals(get_partitions_pspec_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_max_parts = true; + list.add(present_max_parts); + if (present_max_parts) + list.add(max_parts); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_pspec_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_pspec_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + 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 { + // 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 get_partitions_pspec_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_pspec_argsStandardScheme getScheme() { + return new get_partitions_pspec_argsStandardScheme(); + } + } + + private static class get_partitions_pspec_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_pspec_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.I32) { + struct.max_parts = iprot.readI32(); + 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_pspec_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.writeI32(struct.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_pspec_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_pspec_argsTupleScheme getScheme() { + return new get_partitions_pspec_argsTupleScheme(); + } + } + + private static class get_partitions_pspec_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_pspec_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.writeI32(struct.max_parts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_pspec_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.readI32(); + struct.setMax_partsIsSet(true); + } + } + } + + } + + public static class get_partitions_pspec_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_pspec_result"); + + 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 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_pspec_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_pspec_resultTupleSchemeFactory()); + } + + private List success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionSpec.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_pspec_result.class, metaDataMap); + } + + public get_partitions_pspec_result() { + } + + public get_partitions_pspec_result( + List success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_pspec_result(get_partitions_pspec_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (PartitionSpec other_element : other.success) { + __this__success.add(new PartitionSpec(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_partitions_pspec_result deepCopy() { + return new get_partitions_pspec_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(PartitionSpec elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_pspec_result) + return this.equals((get_partitions_pspec_result)that); + return false; + } + + public boolean equals(get_partitions_pspec_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_pspec_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_pspec_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 get_partitions_pspec_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_pspec_resultStandardScheme getScheme() { + return new get_partitions_pspec_resultStandardScheme(); + } + } + + private static class get_partitions_pspec_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_pspec_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 _list992 = iprot.readListBegin(); + struct.success = new ArrayList(_list992.size); + PartitionSpec _elem993; + for (int _i994 = 0; _i994 < _list992.size; ++_i994) + { + _elem993 = new PartitionSpec(); + _elem993.read(iprot); + struct.success.add(_elem993); + } + 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_pspec_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 (PartitionSpec _iter995 : struct.success) + { + _iter995.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_pspec_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_pspec_resultTupleScheme getScheme() { + return new get_partitions_pspec_resultTupleScheme(); + } + } + + private static class get_partitions_pspec_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_pspec_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 (PartitionSpec _iter996 : struct.success) + { + _iter996.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_pspec_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 _list997 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list997.size); + PartitionSpec _elem998; + for (int _i999 = 0; _i999 < _list997.size; ++_i999) + { + _elem998 = new PartitionSpec(); + _elem998.read(iprot); + struct.success.add(_elem998); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_PARTS((short)3, "max_parts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_names_args.class, metaDataMap); + } + + public get_partition_names_args() { + this.max_parts = (short)-1; + + } + + public get_partition_names_args( + String db_name, + String tbl_name, + short max_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_partition_names_args(get_partition_names_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + this.max_parts = other.max_parts; + } + + public get_partition_names_args deepCopy() { + return new get_partition_names_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_parts = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_PARTS: + return getMax_parts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_names_args) + return this.equals((get_partition_names_args)that); + return false; + } + + public boolean equals(get_partition_names_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_max_parts = true; + list.add(present_max_parts); + if (present_max_parts) + list.add(max_parts); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partition_names_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partition_names_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + 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 { + // 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O2((short)1, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); + } + + public get_partition_names_result() { + } + + public get_partition_names_result( + List success, + MetaException o2) + { + this(); + this.success = success; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_names_result(get_partition_names_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_partition_names_result deepCopy() { + return new get_partition_names_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_names_result) + return this.equals((get_partition_names_result)that); + return false; + } + + public boolean equals(get_partition_names_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partition_names_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partition_names_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 _list1000 = iprot.readListBegin(); + struct.success = new ArrayList(_list1000.size); + String _elem1001; + for (int _i1002 = 0; _i1002 < _list1000.size; ++_i1002) + { + _elem1001 = iprot.readString(); + struct.success.add(_elem1001); + } + 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 _iter1003 : struct.success) + { + oprot.writeString(_iter1003); + } + 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 _iter1004 : struct.success) + { + oprot.writeString(_iter1004); + } + } + } + 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 _list1005 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list1005.size); + String _elem1006; + for (int _i1007 = 0; _i1007 < _list1005.size; ++_i1007) + { + _elem1006 = iprot.readString(); + struct.success.add(_elem1006); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_args"); + + 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 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 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 + private short max_parts; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + MAX_PARTS((short)4, "max_parts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_ps_args.class, metaDataMap); + } + + public get_partitions_ps_args() { + this.max_parts = (short)-1; + + } + + public get_partitions_ps_args( + String db_name, + String tbl_name, + List part_vals, + short max_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_ps_args(get_partitions_ps_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(other.part_vals); + this.part_vals = __this__part_vals; + } + this.max_parts = other.max_parts; + } + + public get_partitions_ps_args deepCopy() { + return new get_partitions_ps_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.max_parts = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case MAX_PARTS: + return getMax_parts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case MAX_PARTS: + return isSetMax_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_ps_args) + return this.equals((get_partitions_ps_args)that); + return false; + } + + public boolean equals(get_partitions_ps_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + boolean present_max_parts = true; + list.add(present_max_parts); + if (present_max_parts) + list.add(max_parts); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_ps_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_ps_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + 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 { + // 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 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 _list1008 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list1008.size); + String _elem1009; + for (int _i1010 = 0; _i1010 < _list1008.size; ++_i1010) + { + _elem1009 = iprot.readString(); + struct.part_vals.add(_elem1009); + } + 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 _iter1011 : struct.part_vals) + { + oprot.writeString(_iter1011); + } + 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 _iter1012 : struct.part_vals) + { + oprot.writeString(_iter1012); + } + } + } + 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 _list1013 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list1013.size); + String _elem1014; + for (int _i1015 = 0; _i1015 < _list1013.size; ++_i1015) + { + _elem1014 = iprot.readString(); + struct.part_vals.add(_elem1014); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_ps_result.class, metaDataMap); + } + + public get_partitions_ps_result() { + } + + public get_partitions_ps_result( + List success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_ps_result(get_partitions_ps_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_partitions_ps_result deepCopy() { + return new get_partitions_ps_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_ps_result) + return this.equals((get_partitions_ps_result)that); + return false; + } + + public boolean equals(get_partitions_ps_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_ps_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_ps_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 _list1016 = iprot.readListBegin(); + struct.success = new ArrayList(_list1016.size); + Partition _elem1017; + for (int _i1018 = 0; _i1018 < _list1016.size; ++_i1018) + { + _elem1017 = new Partition(); + _elem1017.read(iprot); + struct.success.add(_elem1017); + } + 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 _iter1019 : struct.success) + { + _iter1019.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 _iter1020 : struct.success) + { + _iter1020.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 _list1021 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list1021.size); + Partition _elem1022; + for (int _i1023 = 0; _i1023 < _list1021.size; ++_i1023) + { + _elem1022 = new Partition(); + _elem1022.read(iprot); + struct.success.add(_elem1022); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_with_auth_args"); + + 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 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 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 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 + private short max_parts; // required + private String user_name; // required + private List group_names; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + MAX_PARTS((short)4, "max_parts"), + USER_NAME((short)5, "user_name"), + GROUP_NAMES((short)6, "group_names"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // MAX_PARTS + return MAX_PARTS; + case 5: // USER_NAME + return USER_NAME; + case 6: // GROUP_NAMES + return GROUP_NAMES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_ps_with_auth_args.class, metaDataMap); + } + + public get_partitions_ps_with_auth_args() { + this.max_parts = (short)-1; + + } + + public get_partitions_ps_with_auth_args( + String db_name, + String tbl_name, + List part_vals, + short max_parts, + String user_name, + List group_names) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + setMax_partsIsSet(true); + this.user_name = user_name; + this.group_names = group_names; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_ps_with_auth_args(get_partitions_ps_with_auth_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(other.part_vals); + this.part_vals = __this__part_vals; + } + this.max_parts = other.max_parts; + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(other.group_names); + this.group_names = __this__group_names; + } + } + + public get_partitions_ps_with_auth_args deepCopy() { + return new get_partitions_ps_with_auth_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.max_parts = (short)-1; + + this.user_name = null; + this.group_names = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); + } + + public String getUser_name() { + return this.user_name; + } + + public void setUser_name(String user_name) { + this.user_name = user_name; + } + + public void unsetUser_name() { + this.user_name = null; + } + + /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; + } + + public void setUser_nameIsSet(boolean value) { + if (!value) { + this.user_name = null; + } + } + + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); + } + + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); + } + + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); + } + + public List getGroup_names() { + return this.group_names; + } + + public void setGroup_names(List group_names) { + this.group_names = group_names; + } + + public void unsetGroup_names() { + this.group_names = null; + } + + /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; + } + + public void setGroup_namesIsSet(boolean value) { + if (!value) { + this.group_names = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case MAX_PARTS: + return getMax_parts(); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case MAX_PARTS: + return isSetMax_parts(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_ps_with_auth_args) + return this.equals((get_partitions_ps_with_auth_args)that); + return false; + } + + public boolean equals(get_partitions_ps_with_auth_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) + return false; + } + + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) + return false; + if (!this.group_names.equals(that.group_names)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + boolean present_max_parts = true; + list.add(present_max_parts); + if (present_max_parts) + list.add(max_parts); + + boolean present_user_name = true && (isSetUser_name()); + list.add(present_user_name); + if (present_user_name) + list.add(user_name); + + boolean present_group_names = true && (isSetGroup_names()); + list.add(present_group_names); + if (present_group_names) + list.add(group_names); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_ps_with_auth_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroup_names()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.group_names); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_ps_with_auth_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; + if (!first) sb.append(", "); + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_names:"); + if (this.group_names == null) { + sb.append("null"); + } else { + sb.append(this.group_names); + } + 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 { + // 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 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 _list1024 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list1024.size); + String _elem1025; + for (int _i1026 = 0; _i1026 < _list1024.size; ++_i1026) + { + _elem1025 = iprot.readString(); + struct.part_vals.add(_elem1025); + } + 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 _list1027 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list1027.size); + String _elem1028; + for (int _i1029 = 0; _i1029 < _list1027.size; ++_i1029) + { + _elem1028 = iprot.readString(); + struct.group_names.add(_elem1028); + } + 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 _iter1030 : struct.part_vals) + { + oprot.writeString(_iter1030); + } + 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 _iter1031 : struct.group_names) + { + oprot.writeString(_iter1031); + } + 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 _iter1032 : struct.part_vals) + { + oprot.writeString(_iter1032); + } + } + } + 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 _iter1033 : struct.group_names) + { + oprot.writeString(_iter1033); + } + } + } + } + + @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 _list1034 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list1034.size); + String _elem1035; + for (int _i1036 = 0; _i1036 < _list1034.size; ++_i1036) + { + _elem1035 = iprot.readString(); + struct.part_vals.add(_elem1035); + } + } + 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 _list1037 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list1037.size); + String _elem1038; + for (int _i1039 = 0; _i1039 < _list1037.size; ++_i1039) + { + _elem1038 = iprot.readString(); + struct.group_names.add(_elem1038); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + + } + + public static class get_partitions_ps_with_auth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_ps_with_auth_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_ps_with_auth_result.class, metaDataMap); + } + + public get_partitions_ps_with_auth_result() { + } + + public get_partitions_ps_with_auth_result( + List success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_ps_with_auth_result(get_partitions_ps_with_auth_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_partitions_ps_with_auth_result deepCopy() { + return new get_partitions_ps_with_auth_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_ps_with_auth_result) + return this.equals((get_partitions_ps_with_auth_result)that); + return false; + } + + public boolean equals(get_partitions_ps_with_auth_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_ps_with_auth_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_ps_with_auth_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 _list1040 = iprot.readListBegin(); + struct.success = new ArrayList(_list1040.size); + Partition _elem1041; + for (int _i1042 = 0; _i1042 < _list1040.size; ++_i1042) + { + _elem1041 = new Partition(); + _elem1041.read(iprot); + struct.success.add(_elem1041); + } + 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 _iter1043 : struct.success) + { + _iter1043.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 _iter1044 : struct.success) + { + _iter1044.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 _list1045 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list1045.size); + Partition _elem1046; + for (int _i1047 = 0; _i1047 < _list1045.size; ++_i1047) + { + _elem1046 = new Partition(); + _elem1046.read(iprot); + struct.success.add(_elem1046); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_ps_args"); + + 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 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 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 + private short max_parts; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + MAX_PARTS((short)4, "max_parts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); + } + + public get_partition_names_ps_args() { + this.max_parts = (short)-1; + + } + + public get_partition_names_ps_args( + String db_name, + String tbl_name, + List part_vals, + short max_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_partition_names_ps_args(get_partition_names_ps_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(other.part_vals); + this.part_vals = __this__part_vals; + } + this.max_parts = other.max_parts; + } + + public get_partition_names_ps_args deepCopy() { + return new get_partition_names_ps_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.max_parts = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case MAX_PARTS: + return getMax_parts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case MAX_PARTS: + return isSetMax_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_names_ps_args) + return this.equals((get_partition_names_ps_args)that); + return false; + } + + public boolean equals(get_partition_names_ps_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + boolean present_max_parts = true; + list.add(present_max_parts); + if (present_max_parts) + list.add(max_parts); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partition_names_ps_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partition_names_ps_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + 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 { + // 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 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 _list1048 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list1048.size); + String _elem1049; + for (int _i1050 = 0; _i1050 < _list1048.size; ++_i1050) + { + _elem1049 = iprot.readString(); + struct.part_vals.add(_elem1049); + } + 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 _iter1051 : struct.part_vals) + { + oprot.writeString(_iter1051); + } + 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 _iter1052 : struct.part_vals) + { + oprot.writeString(_iter1052); + } + } + } + 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 _list1053 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list1053.size); + String _elem1054; + for (int _i1055 = 0; _i1055 < _list1053.size; ++_i1055) + { + _elem1054 = iprot.readString(); + struct.part_vals.add(_elem1054); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_names_ps_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_names_ps_result.class, metaDataMap); + } + + public get_partition_names_ps_result() { + } + + public get_partition_names_ps_result( + List success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_names_ps_result(get_partition_names_ps_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_partition_names_ps_result deepCopy() { + return new get_partition_names_ps_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_names_ps_result) + return this.equals((get_partition_names_ps_result)that); + return false; + } + + public boolean equals(get_partition_names_ps_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partition_names_ps_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partition_names_ps_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 _list1056 = iprot.readListBegin(); + struct.success = new ArrayList(_list1056.size); + String _elem1057; + for (int _i1058 = 0; _i1058 < _list1056.size; ++_i1058) + { + _elem1057 = iprot.readString(); + struct.success.add(_elem1057); + } + 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 _iter1059 : struct.success) + { + oprot.writeString(_iter1059); + } + 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 _iter1060 : struct.success) + { + oprot.writeString(_iter1060); + } + } + } + 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 _list1061 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list1061.size); + String _elem1062; + for (int _i1063 = 0; _i1063 < _list1061.size; ++_i1063) + { + _elem1062 = iprot.readString(); + struct.success.add(_elem1062); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_filter_args"); + + 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 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 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 + private short max_parts; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + FILTER((short)3, "filter"), + MAX_PARTS((short)4, "max_parts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // FILTER + return FILTER; + case 4: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FILTER, new org.apache.thrift.meta_data.FieldMetaData("filter", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); + } + + public get_partitions_by_filter_args() { + this.max_parts = (short)-1; + + } + + public get_partitions_by_filter_args( + String db_name, + String tbl_name, + String filter, + short max_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.filter = filter; + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_by_filter_args(get_partitions_by_filter_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetFilter()) { + this.filter = other.filter; + } + this.max_parts = other.max_parts; + } + + public get_partitions_by_filter_args deepCopy() { + return new get_partitions_by_filter_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.filter = null; + this.max_parts = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getFilter() { + return this.filter; + } + + public void setFilter(String filter) { + this.filter = filter; + } + + public void unsetFilter() { + this.filter = null; + } + + /** Returns true if field filter is set (has been assigned a value) and false otherwise */ + public boolean isSetFilter() { + return this.filter != null; + } + + public void setFilterIsSet(boolean value) { + if (!value) { + this.filter = null; + } + } + + public short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case FILTER: + if (value == null) { + unsetFilter(); + } else { + setFilter((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case FILTER: + return getFilter(); + + case MAX_PARTS: + return getMax_parts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case FILTER: + return isSetFilter(); + case MAX_PARTS: + return isSetMax_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_by_filter_args) + return this.equals((get_partitions_by_filter_args)that); + return false; + } + + public boolean equals(get_partitions_by_filter_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_filter = true && this.isSetFilter(); + boolean that_present_filter = true && that.isSetFilter(); + if (this_present_filter || that_present_filter) { + if (!(this_present_filter && that_present_filter)) + return false; + if (!this.filter.equals(that.filter)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_filter = true && (isSetFilter()); + list.add(present_filter); + if (present_filter) + list.add(filter); + + boolean present_max_parts = true; + list.add(present_max_parts); + if (present_max_parts) + list.add(max_parts); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_by_filter_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFilter()).compareTo(other.isSetFilter()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilter()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, other.filter); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_by_filter_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("filter:"); + if (this.filter == null) { + sb.append("null"); + } else { + sb.append(this.filter); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + 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 { + // 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_filter_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_result.class, metaDataMap); + } + + public get_partitions_by_filter_result() { + } + + public get_partitions_by_filter_result( + List success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_by_filter_result(get_partitions_by_filter_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_partitions_by_filter_result deepCopy() { + return new get_partitions_by_filter_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_by_filter_result) + return this.equals((get_partitions_by_filter_result)that); + return false; + } + + public boolean equals(get_partitions_by_filter_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_by_filter_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_by_filter_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 _list1064 = iprot.readListBegin(); + struct.success = new ArrayList(_list1064.size); + Partition _elem1065; + for (int _i1066 = 0; _i1066 < _list1064.size; ++_i1066) + { + _elem1065 = new Partition(); + _elem1065.read(iprot); + struct.success.add(_elem1065); + } + 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 _iter1067 : struct.success) + { + _iter1067.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 _iter1068 : struct.success) + { + _iter1068.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 _list1069 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list1069.size); + Partition _elem1070; + for (int _i1071 = 0; _i1071 < _list1069.size; ++_i1071) + { + _elem1070 = new Partition(); + _elem1070.read(iprot); + struct.success.add(_elem1070); + } + } + 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_part_specs_by_filter_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_part_specs_by_filter_args"); + + 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 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 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.I32, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_part_specs_by_filter_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_part_specs_by_filter_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + private String filter; // required + private int max_parts; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + FILTER((short)3, "filter"), + MAX_PARTS((short)4, "max_parts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // FILTER + return FILTER; + case 4: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FILTER, new org.apache.thrift.meta_data.FieldMetaData("filter", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new org.apache.thrift.meta_data.FieldMetaData("max_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_part_specs_by_filter_args.class, metaDataMap); + } + + public get_part_specs_by_filter_args() { + this.max_parts = -1; + + } + + public get_part_specs_by_filter_args( + String db_name, + String tbl_name, + String filter, + int max_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.filter = filter; + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_part_specs_by_filter_args(get_part_specs_by_filter_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetFilter()) { + this.filter = other.filter; + } + this.max_parts = other.max_parts; + } + + public get_part_specs_by_filter_args deepCopy() { + return new get_part_specs_by_filter_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.filter = null; + this.max_parts = -1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getFilter() { + return this.filter; + } + + public void setFilter(String filter) { + this.filter = filter; + } + + public void unsetFilter() { + this.filter = null; + } + + /** Returns true if field filter is set (has been assigned a value) and false otherwise */ + public boolean isSetFilter() { + return this.filter != null; + } + + public void setFilterIsSet(boolean value) { + if (!value) { + this.filter = null; + } + } + + public int getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(int max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __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 EncodingUtils.testBit(__isset_bitfield, __MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case FILTER: + if (value == null) { + unsetFilter(); + } else { + setFilter((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case FILTER: + return getFilter(); + + case MAX_PARTS: + return getMax_parts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case FILTER: + return isSetFilter(); + case MAX_PARTS: + return isSetMax_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_part_specs_by_filter_args) + return this.equals((get_part_specs_by_filter_args)that); + return false; + } + + public boolean equals(get_part_specs_by_filter_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_filter = true && this.isSetFilter(); + boolean that_present_filter = true && that.isSetFilter(); + if (this_present_filter || that_present_filter) { + if (!(this_present_filter && that_present_filter)) + return false; + if (!this.filter.equals(that.filter)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_filter = true && (isSetFilter()); + list.add(present_filter); + if (present_filter) + list.add(filter); + + boolean present_max_parts = true; + list.add(present_max_parts); + if (present_max_parts) + list.add(max_parts); + + return list.hashCode(); + } + + @Override + public int compareTo(get_part_specs_by_filter_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFilter()).compareTo(other.isSetFilter()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilter()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, other.filter); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(other.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_parts, other.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_part_specs_by_filter_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("filter:"); + if (this.filter == null) { + sb.append("null"); + } else { + sb.append(this.filter); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + 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 { + // 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 get_part_specs_by_filter_argsStandardSchemeFactory implements SchemeFactory { + public get_part_specs_by_filter_argsStandardScheme getScheme() { + return new get_part_specs_by_filter_argsStandardScheme(); + } + } + + private static class get_part_specs_by_filter_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_part_specs_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.I32) { + struct.max_parts = iprot.readI32(); + 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_part_specs_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.writeI32(struct.max_parts); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_part_specs_by_filter_argsTupleSchemeFactory implements SchemeFactory { + public get_part_specs_by_filter_argsTupleScheme getScheme() { + return new get_part_specs_by_filter_argsTupleScheme(); + } + } + + private static class get_part_specs_by_filter_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_part_specs_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.writeI32(struct.max_parts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_part_specs_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.readI32(); + struct.setMax_partsIsSet(true); + } + } + } + + } + + public static class get_part_specs_by_filter_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_part_specs_by_filter_result"); + + 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 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_part_specs_by_filter_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_part_specs_by_filter_resultTupleSchemeFactory()); + } + + private List success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionSpec.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_part_specs_by_filter_result.class, metaDataMap); + } + + public get_part_specs_by_filter_result() { + } + + public get_part_specs_by_filter_result( + List success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_part_specs_by_filter_result(get_part_specs_by_filter_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (PartitionSpec other_element : other.success) { + __this__success.add(new PartitionSpec(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_part_specs_by_filter_result deepCopy() { + return new get_part_specs_by_filter_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(PartitionSpec elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_part_specs_by_filter_result) + return this.equals((get_part_specs_by_filter_result)that); + return false; + } + + public boolean equals(get_part_specs_by_filter_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_part_specs_by_filter_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_part_specs_by_filter_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 get_part_specs_by_filter_resultStandardSchemeFactory implements SchemeFactory { + public get_part_specs_by_filter_resultStandardScheme getScheme() { + return new get_part_specs_by_filter_resultStandardScheme(); + } + } + + private static class get_part_specs_by_filter_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_part_specs_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 _list1072 = iprot.readListBegin(); + struct.success = new ArrayList(_list1072.size); + PartitionSpec _elem1073; + for (int _i1074 = 0; _i1074 < _list1072.size; ++_i1074) + { + _elem1073 = new PartitionSpec(); + _elem1073.read(iprot); + struct.success.add(_elem1073); + } + 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_part_specs_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 (PartitionSpec _iter1075 : struct.success) + { + _iter1075.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_part_specs_by_filter_resultTupleSchemeFactory implements SchemeFactory { + public get_part_specs_by_filter_resultTupleScheme getScheme() { + return new get_part_specs_by_filter_resultTupleScheme(); + } + } + + private static class get_part_specs_by_filter_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_part_specs_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 (PartitionSpec _iter1076 : struct.success) + { + _iter1076.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_part_specs_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 _list1077 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list1077.size); + PartitionSpec _elem1078; + for (int _i1079 = 0; _i1079 < _list1077.size; ++_i1079) + { + _elem1078 = new PartitionSpec(); + _elem1078.read(iprot); + struct.success.add(_elem1078); + } + } + 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_expr_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_expr_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_by_expr_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_by_expr_argsTupleSchemeFactory()); + } + + private PartitionsByExprRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsByExprRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_expr_args.class, metaDataMap); + } + + public get_partitions_by_expr_args() { + } + + public get_partitions_by_expr_args( + PartitionsByExprRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_by_expr_args(get_partitions_by_expr_args other) { + if (other.isSetReq()) { + this.req = new PartitionsByExprRequest(other.req); + } + } + + public get_partitions_by_expr_args deepCopy() { + return new get_partitions_by_expr_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public PartitionsByExprRequest getReq() { + return this.req; + } + + public void setReq(PartitionsByExprRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((PartitionsByExprRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_by_expr_args) + return this.equals((get_partitions_by_expr_args)that); + return false; + } + + public boolean equals(get_partitions_by_expr_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_by_expr_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_by_expr_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 get_partitions_by_expr_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_by_expr_argsStandardScheme getScheme() { + return new get_partitions_by_expr_argsStandardScheme(); + } + } + + private static class get_partitions_by_expr_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_expr_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new PartitionsByExprRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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_expr_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_by_expr_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_by_expr_argsTupleScheme getScheme() { + return new get_partitions_by_expr_argsTupleScheme(); + } + } + + private static class get_partitions_by_expr_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_expr_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_expr_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new PartitionsByExprRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class get_partitions_by_expr_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_expr_result"); + + 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 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_expr_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_by_expr_resultTupleSchemeFactory()); + } + + private PartitionsByExprResult success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsByExprResult.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_expr_result.class, metaDataMap); + } + + public get_partitions_by_expr_result() { + } + + public get_partitions_by_expr_result( + PartitionsByExprResult success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_by_expr_result(get_partitions_by_expr_result other) { + if (other.isSetSuccess()) { + this.success = new PartitionsByExprResult(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_partitions_by_expr_result deepCopy() { + return new get_partitions_by_expr_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public PartitionsByExprResult getSuccess() { + return this.success; + } + + public void setSuccess(PartitionsByExprResult success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((PartitionsByExprResult)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_by_expr_result) + return this.equals((get_partitions_by_expr_result)that); + return false; + } + + public boolean equals(get_partitions_by_expr_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_by_expr_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_by_expr_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_partitions_by_expr_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_by_expr_resultStandardScheme getScheme() { + return new get_partitions_by_expr_resultStandardScheme(); + } + } + + private static class get_partitions_by_expr_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_by_expr_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 PartitionsByExprResult(); + 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_partitions_by_expr_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_partitions_by_expr_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_by_expr_resultTupleScheme getScheme() { + return new get_partitions_by_expr_resultTupleScheme(); + } + } + + private static class get_partitions_by_expr_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_by_expr_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_partitions_by_expr_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new PartitionsByExprResult(); + 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_num_partitions_by_filter_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_num_partitions_by_filter_args"); + + 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 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 FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("filter", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_num_partitions_by_filter_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_num_partitions_by_filter_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + private String filter; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + FILTER((short)3, "filter"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // FILTER + return FILTER; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FILTER, new org.apache.thrift.meta_data.FieldMetaData("filter", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_num_partitions_by_filter_args.class, metaDataMap); + } + + public get_num_partitions_by_filter_args() { + } + + public get_num_partitions_by_filter_args( + String db_name, + String tbl_name, + String filter) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.filter = filter; + } + + /** + * Performs a deep copy on other. + */ + public get_num_partitions_by_filter_args(get_num_partitions_by_filter_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetFilter()) { + this.filter = other.filter; + } + } + + public get_num_partitions_by_filter_args deepCopy() { + return new get_num_partitions_by_filter_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.filter = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getFilter() { + return this.filter; + } + + public void setFilter(String filter) { + this.filter = filter; + } + + public void unsetFilter() { + this.filter = null; + } + + /** Returns true if field filter is set (has been assigned a value) and false otherwise */ + public boolean isSetFilter() { + return this.filter != null; + } + + public void setFilterIsSet(boolean value) { + if (!value) { + this.filter = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case FILTER: + if (value == null) { + unsetFilter(); + } else { + setFilter((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case FILTER: + return getFilter(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case FILTER: + return isSetFilter(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_num_partitions_by_filter_args) + return this.equals((get_num_partitions_by_filter_args)that); + return false; + } + + public boolean equals(get_num_partitions_by_filter_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_filter = true && this.isSetFilter(); + boolean that_present_filter = true && that.isSetFilter(); + if (this_present_filter || that_present_filter) { + if (!(this_present_filter && that_present_filter)) + return false; + if (!this.filter.equals(that.filter)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_filter = true && (isSetFilter()); + list.add(present_filter); + if (present_filter) + list.add(filter); + + return list.hashCode(); + } + + @Override + public int compareTo(get_num_partitions_by_filter_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFilter()).compareTo(other.isSetFilter()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilter()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter, other.filter); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_num_partitions_by_filter_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("filter:"); + if (this.filter == null) { + sb.append("null"); + } else { + sb.append(this.filter); + } + 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 get_num_partitions_by_filter_argsStandardSchemeFactory implements SchemeFactory { + public get_num_partitions_by_filter_argsStandardScheme getScheme() { + return new get_num_partitions_by_filter_argsStandardScheme(); + } + } + + private static class get_num_partitions_by_filter_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_num_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; + 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_num_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.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_num_partitions_by_filter_argsTupleSchemeFactory implements SchemeFactory { + public get_num_partitions_by_filter_argsTupleScheme getScheme() { + return new get_num_partitions_by_filter_argsTupleScheme(); + } + } + + private static class get_num_partitions_by_filter_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_num_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); + } + oprot.writeBitSet(optionals, 3); + 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); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_num_partitions_by_filter_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.filter = iprot.readString(); + struct.setFilterIsSet(true); + } + } + } + + } + + public static class get_num_partitions_by_filter_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_num_partitions_by_filter_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (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 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_num_partitions_by_filter_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_num_partitions_by_filter_resultTupleSchemeFactory()); + } + + private int success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_num_partitions_by_filter_result.class, metaDataMap); + } + + public get_num_partitions_by_filter_result() { + } + + public get_num_partitions_by_filter_result( + int success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_num_partitions_by_filter_result(get_num_partitions_by_filter_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_num_partitions_by_filter_result deepCopy() { + return new get_num_partitions_by_filter_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.o1 = null; + this.o2 = null; + } + + public int getSuccess() { + return this.success; + } + + public void setSuccess(int success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_num_partitions_by_filter_result) + return this.equals((get_num_partitions_by_filter_result)that); + return false; + } + + public boolean equals(get_num_partitions_by_filter_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_num_partitions_by_filter_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_num_partitions_by_filter_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 { + // 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 get_num_partitions_by_filter_resultStandardSchemeFactory implements SchemeFactory { + public get_num_partitions_by_filter_resultStandardScheme getScheme() { + return new get_num_partitions_by_filter_resultStandardScheme(); + } + } + + private static class get_num_partitions_by_filter_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_num_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.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 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_num_partitions_by_filter_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_num_partitions_by_filter_resultTupleSchemeFactory implements SchemeFactory { + public get_num_partitions_by_filter_resultTupleScheme getScheme() { + return new get_num_partitions_by_filter_resultTupleScheme(); + } + } + + private static class get_num_partitions_by_filter_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_num_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); + } + 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_num_partitions_by_filter_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readI32(); + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_names_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + NAMES((short)3, "names"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // NAMES + return NAMES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NAMES, new org.apache.thrift.meta_data.FieldMetaData("names", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_names_args.class, metaDataMap); + } + + public get_partitions_by_names_args() { + } + + public get_partitions_by_names_args( + String db_name, + String tbl_name, + List names) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.names = names; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_by_names_args(get_partitions_by_names_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNames()) { + List __this__names = new ArrayList(other.names); + this.names = __this__names; + } + } + + public get_partitions_by_names_args deepCopy() { + return new get_partitions_by_names_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.names = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getNamesSize() { + return (this.names == null) ? 0 : this.names.size(); + } + + public java.util.Iterator getNamesIterator() { + return (this.names == null) ? null : this.names.iterator(); + } + + public void addToNames(String elem) { + if (this.names == null) { + this.names = new ArrayList(); + } + this.names.add(elem); + } + + public List getNames() { + return this.names; + } + + public void setNames(List names) { + this.names = names; + } + + public void unsetNames() { + this.names = null; + } + + /** Returns true if field names is set (has been assigned a value) and false otherwise */ + public boolean isSetNames() { + return this.names != null; + } + + public void setNamesIsSet(boolean value) { + if (!value) { + this.names = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NAMES: + if (value == null) { + unsetNames(); + } else { + setNames((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case NAMES: + return getNames(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case NAMES: + return isSetNames(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_by_names_args) + return this.equals((get_partitions_by_names_args)that); + return false; + } + + public boolean equals(get_partitions_by_names_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_names = true && this.isSetNames(); + boolean that_present_names = true && that.isSetNames(); + if (this_present_names || that_present_names) { + if (!(this_present_names && that_present_names)) + return false; + if (!this.names.equals(that.names)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_names = true && (isSetNames()); + list.add(present_names); + if (present_names) + list.add(names); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_by_names_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNames()).compareTo(other.isSetNames()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNames()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.names, other.names); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_by_names_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("names:"); + if (this.names == null) { + sb.append("null"); + } else { + sb.append(this.names); + } + 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 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 _list1080 = iprot.readListBegin(); + struct.names = new ArrayList(_list1080.size); + String _elem1081; + for (int _i1082 = 0; _i1082 < _list1080.size; ++_i1082) + { + _elem1081 = iprot.readString(); + struct.names.add(_elem1081); + } + 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 _iter1083 : struct.names) + { + oprot.writeString(_iter1083); + } + 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 _iter1084 : struct.names) + { + oprot.writeString(_iter1084); + } + } + } + } + + @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 _list1085 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.names = new ArrayList(_list1085.size); + String _elem1086; + for (int _i1087 = 0; _i1087 < _list1085.size; ++_i1087) + { + _elem1086 = iprot.readString(); + struct.names.add(_elem1086); + } + } + struct.setNamesIsSet(true); + } + } + } + + } + + public static class get_partitions_by_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_by_names_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_by_names_result.class, metaDataMap); + } + + public get_partitions_by_names_result() { + } + + public get_partitions_by_names_result( + List success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_by_names_result(get_partitions_by_names_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_partitions_by_names_result deepCopy() { + return new get_partitions_by_names_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_by_names_result) + return this.equals((get_partitions_by_names_result)that); + return false; + } + + public boolean equals(get_partitions_by_names_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_by_names_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_by_names_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 _list1088 = iprot.readListBegin(); + struct.success = new ArrayList(_list1088.size); + Partition _elem1089; + for (int _i1090 = 0; _i1090 < _list1088.size; ++_i1090) + { + _elem1089 = new Partition(); + _elem1089.read(iprot); + struct.success.add(_elem1089); + } + 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 _iter1091 : struct.success) + { + _iter1091.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 _iter1092 : struct.success) + { + _iter1092.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 _list1093 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list1093.size); + Partition _elem1094; + for (int _i1095 = 0; _i1095 < _list1093.size; ++_i1095) + { + _elem1094 = new Partition(); + _elem1094.read(iprot); + struct.success.add(_elem1094); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + NEW_PART((short)3, "new_part"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // NEW_PART + return NEW_PART; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); + } + + public alter_partition_args() { + } + + public alter_partition_args( + String db_name, + String tbl_name, + Partition new_part) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_part = new_part; + } + + /** + * Performs a deep copy on other. + */ + public alter_partition_args(alter_partition_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_part()) { + this.new_part = new Partition(other.new_part); + } + } + + public alter_partition_args deepCopy() { + return new alter_partition_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.new_part = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public Partition getNew_part() { + return this.new_part; + } + + public void setNew_part(Partition new_part) { + this.new_part = new_part; + } + + public void unsetNew_part() { + this.new_part = null; + } + + /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_part() { + return this.new_part != null; + } + + public void setNew_partIsSet(boolean value) { + if (!value) { + this.new_part = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NEW_PART: + if (value == null) { + unsetNew_part(); + } else { + setNew_part((Partition)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case NEW_PART: + return getNew_part(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_PART: + return isSetNew_part(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_partition_args) + return this.equals((alter_partition_args)that); + return false; + } + + public boolean equals(alter_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_new_part = true && this.isSetNew_part(); + boolean that_present_new_part = true && that.isSetNew_part(); + if (this_present_new_part || that_present_new_part) { + if (!(this_present_new_part && that_present_new_part)) + return false; + if (!this.new_part.equals(that.new_part)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_new_part = true && (isSetNew_part()); + list.add(present_new_part); + if (present_new_part) + list.add(new_part); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_part()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.new_part); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_part:"); + if (this.new_part == null) { + sb.append("null"); + } else { + sb.append(this.new_part); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partition_result.class, metaDataMap); + } + + public alter_partition_result() { + } + + public alter_partition_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_partition_result(alter_partition_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_partition_result deepCopy() { + return new alter_partition_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_partition_result) + return this.equals((alter_partition_result)that); + return false; + } + + public boolean equals(alter_partition_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_partition_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partitions_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + NEW_PARTS((short)3, "new_parts"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // NEW_PARTS + return NEW_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_PARTS, new org.apache.thrift.meta_data.FieldMetaData("new_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partitions_args.class, metaDataMap); + } + + public alter_partitions_args() { + } + + public alter_partitions_args( + String db_name, + String tbl_name, + List new_parts) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_parts = new_parts; + } + + /** + * Performs a deep copy on other. + */ + public alter_partitions_args(alter_partitions_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_parts()) { + List __this__new_parts = new ArrayList(other.new_parts.size()); + for (Partition other_element : other.new_parts) { + __this__new_parts.add(new Partition(other_element)); + } + this.new_parts = __this__new_parts; + } + } + + public alter_partitions_args deepCopy() { + return new alter_partitions_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.new_parts = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getNew_partsSize() { + return (this.new_parts == null) ? 0 : this.new_parts.size(); + } + + public java.util.Iterator getNew_partsIterator() { + return (this.new_parts == null) ? null : this.new_parts.iterator(); + } + + public void addToNew_parts(Partition elem) { + if (this.new_parts == null) { + this.new_parts = new ArrayList(); + } + this.new_parts.add(elem); + } + + public List getNew_parts() { + return this.new_parts; + } + + public void setNew_parts(List new_parts) { + this.new_parts = new_parts; + } + + public void unsetNew_parts() { + this.new_parts = null; + } + + /** Returns true if field new_parts is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_parts() { + return this.new_parts != null; + } + + public void setNew_partsIsSet(boolean value) { + if (!value) { + this.new_parts = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NEW_PARTS: + if (value == null) { + unsetNew_parts(); + } else { + setNew_parts((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case NEW_PARTS: + return getNew_parts(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_PARTS: + return isSetNew_parts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_partitions_args) + return this.equals((alter_partitions_args)that); + return false; + } + + public boolean equals(alter_partitions_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_new_parts = true && this.isSetNew_parts(); + boolean that_present_new_parts = true && that.isSetNew_parts(); + if (this_present_new_parts || that_present_new_parts) { + if (!(this_present_new_parts && that_present_new_parts)) + return false; + if (!this.new_parts.equals(that.new_parts)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_new_parts = true && (isSetNew_parts()); + list.add(present_new_parts); + if (present_new_parts) + list.add(new_parts); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_partitions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(other.isSetNew_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, other.new_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_partitions_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_parts:"); + if (this.new_parts == null) { + sb.append("null"); + } else { + sb.append(this.new_parts); + } + 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 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 _list1096 = iprot.readListBegin(); + struct.new_parts = new ArrayList(_list1096.size); + Partition _elem1097; + for (int _i1098 = 0; _i1098 < _list1096.size; ++_i1098) + { + _elem1097 = new Partition(); + _elem1097.read(iprot); + struct.new_parts.add(_elem1097); + } + 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 _iter1099 : struct.new_parts) + { + _iter1099.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 _iter1100 : struct.new_parts) + { + _iter1100.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 _list1101 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.new_parts = new ArrayList(_list1101.size); + Partition _elem1102; + for (int _i1103 = 0; _i1103 < _list1101.size; ++_i1103) + { + _elem1102 = new Partition(); + _elem1102.read(iprot); + struct.new_parts.add(_elem1102); + } + } + struct.setNew_partsIsSet(true); + } + } + } + + } + + public static class alter_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partitions_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partitions_result.class, metaDataMap); + } + + public alter_partitions_result() { + } + + public alter_partitions_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_partitions_result(alter_partitions_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_partitions_result deepCopy() { + return new alter_partitions_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_partitions_result) + return this.equals((alter_partitions_result)that); + return false; + } + + public boolean equals(alter_partitions_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_partitions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_partitions_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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_partitions_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partitions_with_environment_context_args"); + + 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 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 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_partitions_with_environment_context_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partitions_with_environment_context_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + private List new_parts; // required + private EnvironmentContext environment_context; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + NEW_PARTS((short)3, "new_parts"), + ENVIRONMENT_CONTEXT((short)4, "environment_context"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // NEW_PARTS + return NEW_PARTS; + case 4: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_PARTS, new org.apache.thrift.meta_data.FieldMetaData("new_parts", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partitions_with_environment_context_args.class, metaDataMap); + } + + public alter_partitions_with_environment_context_args() { + } + + public alter_partitions_with_environment_context_args( + String db_name, + String tbl_name, + List new_parts, + EnvironmentContext environment_context) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_parts = new_parts; + this.environment_context = environment_context; + } + + /** + * Performs a deep copy on other. + */ + public alter_partitions_with_environment_context_args(alter_partitions_with_environment_context_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_parts()) { + List __this__new_parts = new ArrayList(other.new_parts.size()); + for (Partition other_element : other.new_parts) { + __this__new_parts.add(new Partition(other_element)); + } + this.new_parts = __this__new_parts; + } + if (other.isSetEnvironment_context()) { + this.environment_context = new EnvironmentContext(other.environment_context); + } + } + + public alter_partitions_with_environment_context_args deepCopy() { + return new alter_partitions_with_environment_context_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.new_parts = null; + this.environment_context = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getNew_partsSize() { + return (this.new_parts == null) ? 0 : this.new_parts.size(); + } + + public java.util.Iterator getNew_partsIterator() { + return (this.new_parts == null) ? null : this.new_parts.iterator(); + } + + public void addToNew_parts(Partition elem) { + if (this.new_parts == null) { + this.new_parts = new ArrayList(); + } + this.new_parts.add(elem); + } + + public List getNew_parts() { + return this.new_parts; + } + + public void setNew_parts(List new_parts) { + this.new_parts = new_parts; + } + + public void unsetNew_parts() { + this.new_parts = null; + } + + /** Returns true if field new_parts is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_parts() { + return this.new_parts != null; + } + + public void setNew_partsIsSet(boolean value) { + if (!value) { + this.new_parts = null; + } + } + + public EnvironmentContext getEnvironment_context() { + return this.environment_context; + } + + public void setEnvironment_context(EnvironmentContext environment_context) { + this.environment_context = environment_context; + } + + public void unsetEnvironment_context() { + this.environment_context = null; + } + + /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment_context() { + return this.environment_context != null; + } + + public void setEnvironment_contextIsSet(boolean value) { + if (!value) { + this.environment_context = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NEW_PARTS: + if (value == null) { + unsetNew_parts(); + } else { + setNew_parts((List)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironment_context(); + } else { + setEnvironment_context((EnvironmentContext)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case NEW_PARTS: + return getNew_parts(); + + case ENVIRONMENT_CONTEXT: + return getEnvironment_context(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_PARTS: + return isSetNew_parts(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironment_context(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_partitions_with_environment_context_args) + return this.equals((alter_partitions_with_environment_context_args)that); + return false; + } + + public boolean equals(alter_partitions_with_environment_context_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_new_parts = true && this.isSetNew_parts(); + boolean that_present_new_parts = true && that.isSetNew_parts(); + if (this_present_new_parts || that_present_new_parts) { + if (!(this_present_new_parts && that_present_new_parts)) + return false; + if (!this.new_parts.equals(that.new_parts)) + return false; + } + + boolean this_present_environment_context = true && this.isSetEnvironment_context(); + boolean that_present_environment_context = true && that.isSetEnvironment_context(); + if (this_present_environment_context || that_present_environment_context) { + if (!(this_present_environment_context && that_present_environment_context)) + return false; + if (!this.environment_context.equals(that.environment_context)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_new_parts = true && (isSetNew_parts()); + list.add(present_new_parts); + if (present_new_parts) + list.add(new_parts); + + boolean present_environment_context = true && (isSetEnvironment_context()); + list.add(present_environment_context); + if (present_environment_context) + list.add(environment_context); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_partitions_with_environment_context_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_parts()).compareTo(other.isSetNew_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_parts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_parts, other.new_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment_context()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_partitions_with_environment_context_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_parts:"); + if (this.new_parts == null) { + sb.append("null"); + } else { + sb.append(this.new_parts); + } + first = false; + if (!first) sb.append(", "); + sb.append("environment_context:"); + if (this.environment_context == null) { + sb.append("null"); + } else { + sb.append(this.environment_context); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (environment_context != null) { + environment_context.validate(); + } + } + + 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 alter_partitions_with_environment_context_argsStandardSchemeFactory implements SchemeFactory { + public alter_partitions_with_environment_context_argsStandardScheme getScheme() { + return new alter_partitions_with_environment_context_argsStandardScheme(); + } + } + + private static class alter_partitions_with_environment_context_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_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_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list1104 = iprot.readListBegin(); + struct.new_parts = new ArrayList(_list1104.size); + Partition _elem1105; + for (int _i1106 = 0; _i1106 < _list1104.size; ++_i1106) + { + _elem1105 = new Partition(); + _elem1105.read(iprot); + struct.new_parts.add(_elem1105); + } + iprot.readListEnd(); + } + struct.setNew_partsIsSet(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_partitions_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_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 _iter1107 : struct.new_parts) + { + _iter1107.write(oprot); + } + oprot.writeListEnd(); + } + 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_partitions_with_environment_context_argsTupleSchemeFactory implements SchemeFactory { + public alter_partitions_with_environment_context_argsTupleScheme getScheme() { + return new alter_partitions_with_environment_context_argsTupleScheme(); + } + } + + private static class alter_partitions_with_environment_context_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partitions_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_parts()) { + 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_parts()) { + { + oprot.writeI32(struct.new_parts.size()); + for (Partition _iter1108 : struct.new_parts) + { + _iter1108.write(oprot); + } + } + } + if (struct.isSetEnvironment_context()) { + struct.environment_context.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_partitions_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)) { + { + org.apache.thrift.protocol.TList _list1109 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.new_parts = new ArrayList(_list1109.size); + Partition _elem1110; + for (int _i1111 = 0; _i1111 < _list1109.size; ++_i1111) + { + _elem1110 = new Partition(); + _elem1110.read(iprot); + struct.new_parts.add(_elem1110); + } + } + struct.setNew_partsIsSet(true); + } + if (incoming.get(3)) { + struct.environment_context = new EnvironmentContext(); + struct.environment_context.read(iprot); + struct.setEnvironment_contextIsSet(true); + } + } + } + + } + + public static class alter_partitions_with_environment_context_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partitions_with_environment_context_result"); + + 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_with_environment_context_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_partitions_with_environment_context_resultTupleSchemeFactory()); + } + + private InvalidOperationException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partitions_with_environment_context_result.class, metaDataMap); + } + + public alter_partitions_with_environment_context_result() { + } + + public alter_partitions_with_environment_context_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_partitions_with_environment_context_result(alter_partitions_with_environment_context_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_partitions_with_environment_context_result deepCopy() { + return new alter_partitions_with_environment_context_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_partitions_with_environment_context_result) + return this.equals((alter_partitions_with_environment_context_result)that); + return false; + } + + public boolean equals(alter_partitions_with_environment_context_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_partitions_with_environment_context_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_partitions_with_environment_context_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 alter_partitions_with_environment_context_resultStandardSchemeFactory implements SchemeFactory { + public alter_partitions_with_environment_context_resultStandardScheme getScheme() { + return new alter_partitions_with_environment_context_resultStandardScheme(); + } + } + + private static class alter_partitions_with_environment_context_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_partitions_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_partitions_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_partitions_with_environment_context_resultTupleSchemeFactory implements SchemeFactory { + public alter_partitions_with_environment_context_resultTupleScheme getScheme() { + return new alter_partitions_with_environment_context_resultTupleScheme(); + } + } + + private static class alter_partitions_with_environment_context_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_partitions_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_partitions_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 alter_partition_with_environment_context_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_with_environment_context_args"); + + 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 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 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 + private EnvironmentContext environment_context; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + NEW_PART((short)3, "new_part"), + ENVIRONMENT_CONTEXT((short)4, "environment_context"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // NEW_PART + return NEW_PART; + case 4: // ENVIRONMENT_CONTEXT + return ENVIRONMENT_CONTEXT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environment_context", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partition_with_environment_context_args.class, metaDataMap); + } + + public alter_partition_with_environment_context_args() { + } + + public alter_partition_with_environment_context_args( + String db_name, + String tbl_name, + Partition new_part, + EnvironmentContext environment_context) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_part = new_part; + this.environment_context = environment_context; + } + + /** + * Performs a deep copy on other. + */ + public alter_partition_with_environment_context_args(alter_partition_with_environment_context_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_part()) { + this.new_part = new Partition(other.new_part); + } + if (other.isSetEnvironment_context()) { + this.environment_context = new EnvironmentContext(other.environment_context); + } + } + + public alter_partition_with_environment_context_args deepCopy() { + return new alter_partition_with_environment_context_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.new_part = null; + this.environment_context = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public Partition getNew_part() { + return this.new_part; + } + + public void setNew_part(Partition new_part) { + this.new_part = new_part; + } + + public void unsetNew_part() { + this.new_part = null; + } + + /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_part() { + return this.new_part != null; + } + + public void setNew_partIsSet(boolean value) { + if (!value) { + this.new_part = null; + } + } + + public EnvironmentContext getEnvironment_context() { + return this.environment_context; + } + + public void setEnvironment_context(EnvironmentContext environment_context) { + this.environment_context = environment_context; + } + + public void unsetEnvironment_context() { + this.environment_context = null; + } + + /** Returns true if field environment_context is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment_context() { + return this.environment_context != null; + } + + public void setEnvironment_contextIsSet(boolean value) { + if (!value) { + this.environment_context = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NEW_PART: + if (value == null) { + unsetNew_part(); + } else { + setNew_part((Partition)value); + } + break; + + case ENVIRONMENT_CONTEXT: + if (value == null) { + unsetEnvironment_context(); + } else { + setEnvironment_context((EnvironmentContext)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case NEW_PART: + return getNew_part(); + + case ENVIRONMENT_CONTEXT: + return getEnvironment_context(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_PART: + return isSetNew_part(); + case ENVIRONMENT_CONTEXT: + return isSetEnvironment_context(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_partition_with_environment_context_args) + return this.equals((alter_partition_with_environment_context_args)that); + return false; + } + + public boolean equals(alter_partition_with_environment_context_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_new_part = true && this.isSetNew_part(); + boolean that_present_new_part = true && that.isSetNew_part(); + if (this_present_new_part || that_present_new_part) { + if (!(this_present_new_part && that_present_new_part)) + return false; + if (!this.new_part.equals(that.new_part)) + return false; + } + + boolean this_present_environment_context = true && this.isSetEnvironment_context(); + boolean that_present_environment_context = true && that.isSetEnvironment_context(); + if (this_present_environment_context || that_present_environment_context) { + if (!(this_present_environment_context && that_present_environment_context)) + return false; + if (!this.environment_context.equals(that.environment_context)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_new_part = true && (isSetNew_part()); + list.add(present_new_part); + if (present_new_part) + list.add(new_part); + + boolean present_environment_context = true && (isSetEnvironment_context()); + list.add(present_environment_context); + if (present_environment_context) + list.add(environment_context); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_partition_with_environment_context_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_part()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.new_part); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEnvironment_context()).compareTo(other.isSetEnvironment_context()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment_context()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment_context, other.environment_context); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_partition_with_environment_context_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_part:"); + if (this.new_part == null) { + sb.append("null"); + } else { + sb.append(this.new_part); + } + first = false; + if (!first) sb.append(", "); + sb.append("environment_context:"); + if (this.environment_context == null) { + sb.append("null"); + } else { + sb.append(this.environment_context); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_partition_with_environment_context_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_partition_with_environment_context_result.class, metaDataMap); + } + + public alter_partition_with_environment_context_result() { + } + + public alter_partition_with_environment_context_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_partition_with_environment_context_result(alter_partition_with_environment_context_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_partition_with_environment_context_result deepCopy() { + return new alter_partition_with_environment_context_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_partition_with_environment_context_result) + return this.equals((alter_partition_with_environment_context_result)that); + return false; + } + + public boolean equals(alter_partition_with_environment_context_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_partition_with_environment_context_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_partition_with_environment_context_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_partition_args"); + + 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 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 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 + private Partition new_part; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + NEW_PART((short)4, "new_part"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // NEW_PART + return NEW_PART; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.NEW_PART, new org.apache.thrift.meta_data.FieldMetaData("new_part", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(rename_partition_args.class, metaDataMap); + } + + public rename_partition_args() { + } + + public rename_partition_args( + String db_name, + String tbl_name, + List part_vals, + Partition new_part) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.new_part = new_part; + } + + /** + * Performs a deep copy on other. + */ + public rename_partition_args(rename_partition_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(other.part_vals); + this.part_vals = __this__part_vals; + } + if (other.isSetNew_part()) { + this.new_part = new Partition(other.new_part); + } + } + + public rename_partition_args deepCopy() { + return new rename_partition_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.new_part = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public Partition getNew_part() { + return this.new_part; + } + + public void setNew_part(Partition new_part) { + this.new_part = new_part; + } + + public void unsetNew_part() { + this.new_part = null; + } + + /** Returns true if field new_part is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_part() { + return this.new_part != null; + } + + public void setNew_partIsSet(boolean value) { + if (!value) { + this.new_part = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case NEW_PART: + if (value == null) { + unsetNew_part(); + } else { + setNew_part((Partition)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case NEW_PART: + return getNew_part(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case NEW_PART: + return isSetNew_part(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof rename_partition_args) + return this.equals((rename_partition_args)that); + return false; + } + + public boolean equals(rename_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_new_part = true && this.isSetNew_part(); + boolean that_present_new_part = true && that.isSetNew_part(); + if (this_present_new_part || that_present_new_part) { + if (!(this_present_new_part && that_present_new_part)) + return false; + if (!this.new_part.equals(that.new_part)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + boolean present_new_part = true && (isSetNew_part()); + list.add(present_new_part); + if (present_new_part) + list.add(new_part); + + return list.hashCode(); + } + + @Override + public int compareTo(rename_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(other.isSetNew_part()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_part()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_part, other.new_part); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("rename_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_part:"); + if (this.new_part == null) { + sb.append("null"); + } else { + sb.append(this.new_part); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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 _list1112 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list1112.size); + String _elem1113; + for (int _i1114 = 0; _i1114 < _list1112.size; ++_i1114) + { + _elem1113 = iprot.readString(); + struct.part_vals.add(_elem1113); + } + 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 _iter1115 : struct.part_vals) + { + oprot.writeString(_iter1115); + } + 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 _iter1116 : struct.part_vals) + { + oprot.writeString(_iter1116); + } + } + } + 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 _list1117 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list1117.size); + String _elem1118; + for (int _i1119 = 0; _i1119 < _list1117.size; ++_i1119) + { + _elem1118 = iprot.readString(); + struct.part_vals.add(_elem1118); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_partition_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(rename_partition_result.class, metaDataMap); + } + + public rename_partition_result() { + } + + public rename_partition_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public rename_partition_result(rename_partition_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public rename_partition_result deepCopy() { + return new rename_partition_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof rename_partition_result) + return this.equals((rename_partition_result)that); + return false; + } + + public boolean equals(rename_partition_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(rename_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("rename_partition_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 partition_name_has_valid_characters_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_has_valid_characters_args"); + + 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)1); + private static final org.apache.thrift.protocol.TField THROW_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("throw_exception", org.apache.thrift.protocol.TType.BOOL, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new partition_name_has_valid_characters_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new partition_name_has_valid_characters_argsTupleSchemeFactory()); + } + + private List part_vals; // required + private boolean throw_exception; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PART_VALS((short)1, "part_vals"), + THROW_EXCEPTION((short)2, "throw_exception"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PART_VALS + return PART_VALS; + case 2: // THROW_EXCEPTION + return THROW_EXCEPTION; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __THROW_EXCEPTION_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.THROW_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("throw_exception", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partition_name_has_valid_characters_args.class, metaDataMap); + } + + public partition_name_has_valid_characters_args() { + } + + public partition_name_has_valid_characters_args( + List part_vals, + boolean throw_exception) + { + this(); + this.part_vals = part_vals; + this.throw_exception = throw_exception; + setThrow_exceptionIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public partition_name_has_valid_characters_args(partition_name_has_valid_characters_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(other.part_vals); + this.part_vals = __this__part_vals; + } + this.throw_exception = other.throw_exception; + } + + public partition_name_has_valid_characters_args deepCopy() { + return new partition_name_has_valid_characters_args(this); + } + + @Override + public void clear() { + this.part_vals = null; + setThrow_exceptionIsSet(false); + this.throw_exception = false; + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public boolean isThrow_exception() { + return this.throw_exception; + } + + public void setThrow_exception(boolean throw_exception) { + this.throw_exception = throw_exception; + setThrow_exceptionIsSet(true); + } + + public void unsetThrow_exception() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __THROW_EXCEPTION_ISSET_ID); + } + + /** Returns true if field throw_exception is set (has been assigned a value) and false otherwise */ + public boolean isSetThrow_exception() { + return EncodingUtils.testBit(__isset_bitfield, __THROW_EXCEPTION_ISSET_ID); + } + + public void setThrow_exceptionIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __THROW_EXCEPTION_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case THROW_EXCEPTION: + if (value == null) { + unsetThrow_exception(); + } else { + setThrow_exception((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PART_VALS: + return getPart_vals(); + + case THROW_EXCEPTION: + return isThrow_exception(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PART_VALS: + return isSetPart_vals(); + case THROW_EXCEPTION: + return isSetThrow_exception(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof partition_name_has_valid_characters_args) + return this.equals((partition_name_has_valid_characters_args)that); + return false; + } + + public boolean equals(partition_name_has_valid_characters_args that) { + if (that == null) + return false; + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_throw_exception = true; + boolean that_present_throw_exception = true; + if (this_present_throw_exception || that_present_throw_exception) { + if (!(this_present_throw_exception && that_present_throw_exception)) + return false; + if (this.throw_exception != that.throw_exception) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + boolean present_throw_exception = true; + list.add(present_throw_exception); + if (present_throw_exception) + list.add(throw_exception); + + return list.hashCode(); + } + + @Override + public int compareTo(partition_name_has_valid_characters_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetThrow_exception()).compareTo(other.isSetThrow_exception()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetThrow_exception()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.throw_exception, other.throw_exception); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("partition_name_has_valid_characters_args("); + boolean first = true; + + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("throw_exception:"); + sb.append(this.throw_exception); + 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 { + // 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 partition_name_has_valid_characters_argsStandardSchemeFactory implements SchemeFactory { + public partition_name_has_valid_characters_argsStandardScheme getScheme() { + return new partition_name_has_valid_characters_argsStandardScheme(); + } + } + + private static class partition_name_has_valid_characters_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_has_valid_characters_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_VALS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list1120 = iprot.readListBegin(); + struct.part_vals = new ArrayList(_list1120.size); + String _elem1121; + for (int _i1122 = 0; _i1122 < _list1120.size; ++_i1122) + { + _elem1121 = iprot.readString(); + struct.part_vals.add(_elem1121); + } + iprot.readListEnd(); + } + struct.setPart_valsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // THROW_EXCEPTION + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.throw_exception = iprot.readBool(); + struct.setThrow_exceptionIsSet(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_has_valid_characters_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + 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 _iter1123 : struct.part_vals) + { + oprot.writeString(_iter1123); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(THROW_EXCEPTION_FIELD_DESC); + oprot.writeBool(struct.throw_exception); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class partition_name_has_valid_characters_argsTupleSchemeFactory implements SchemeFactory { + public partition_name_has_valid_characters_argsTupleScheme getScheme() { + return new partition_name_has_valid_characters_argsTupleScheme(); + } + } + + private static class partition_name_has_valid_characters_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_has_valid_characters_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetPart_vals()) { + optionals.set(0); + } + if (struct.isSetThrow_exception()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetPart_vals()) { + { + oprot.writeI32(struct.part_vals.size()); + for (String _iter1124 : struct.part_vals) + { + oprot.writeString(_iter1124); + } + } + } + if (struct.isSetThrow_exception()) { + oprot.writeBool(struct.throw_exception); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, partition_name_has_valid_characters_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list1125 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.part_vals = new ArrayList(_list1125.size); + String _elem1126; + for (int _i1127 = 0; _i1127 < _list1125.size; ++_i1127) + { + _elem1126 = iprot.readString(); + struct.part_vals.add(_elem1126); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(1)) { + struct.throw_exception = iprot.readBool(); + struct.setThrow_exceptionIsSet(true); + } + } + } + + } + + public static class partition_name_has_valid_characters_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_has_valid_characters_result"); + + 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 partition_name_has_valid_characters_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new partition_name_has_valid_characters_resultTupleSchemeFactory()); + } + + private boolean success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partition_name_has_valid_characters_result.class, metaDataMap); + } + + public partition_name_has_valid_characters_result() { + } + + public partition_name_has_valid_characters_result( + boolean success, + MetaException o1) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public partition_name_has_valid_characters_result(partition_name_has_valid_characters_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public partition_name_has_valid_characters_result deepCopy() { + return new partition_name_has_valid_characters_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof partition_name_has_valid_characters_result) + return this.equals((partition_name_has_valid_characters_result)that); + return false; + } + + public boolean equals(partition_name_has_valid_characters_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(partition_name_has_valid_characters_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("partition_name_has_valid_characters_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 { + // 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 partition_name_has_valid_characters_resultStandardSchemeFactory implements SchemeFactory { + public partition_name_has_valid_characters_resultStandardScheme getScheme() { + return new partition_name_has_valid_characters_resultStandardScheme(); + } + } + + private static class partition_name_has_valid_characters_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, partition_name_has_valid_characters_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, partition_name_has_valid_characters_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 partition_name_has_valid_characters_resultTupleSchemeFactory implements SchemeFactory { + public partition_name_has_valid_characters_resultTupleScheme getScheme() { + return new partition_name_has_valid_characters_resultTupleScheme(); + } + } + + private static class partition_name_has_valid_characters_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, partition_name_has_valid_characters_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, partition_name_has_valid_characters_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_config_value_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_config_value_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"), + DEFAULT_VALUE((short)2, "defaultValue"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + case 2: // DEFAULT_VALUE + return DEFAULT_VALUE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DEFAULT_VALUE, new org.apache.thrift.meta_data.FieldMetaData("defaultValue", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_config_value_args.class, metaDataMap); + } + + public get_config_value_args() { + } + + public get_config_value_args( + String name, + String defaultValue) + { + this(); + this.name = name; + this.defaultValue = defaultValue; + } + + /** + * Performs a deep copy on other. + */ + public get_config_value_args(get_config_value_args other) { + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetDefaultValue()) { + this.defaultValue = other.defaultValue; + } + } + + public get_config_value_args deepCopy() { + return new get_config_value_args(this); + } + + @Override + public void clear() { + this.name = null; + this.defaultValue = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public String getDefaultValue() { + return this.defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public void unsetDefaultValue() { + this.defaultValue = null; + } + + /** Returns true if field defaultValue is set (has been assigned a value) and false otherwise */ + public boolean isSetDefaultValue() { + return this.defaultValue != null; + } + + public void setDefaultValueIsSet(boolean value) { + if (!value) { + this.defaultValue = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case DEFAULT_VALUE: + if (value == null) { + unsetDefaultValue(); + } else { + setDefaultValue((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case DEFAULT_VALUE: + return getDefaultValue(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case DEFAULT_VALUE: + return isSetDefaultValue(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_config_value_args) + return this.equals((get_config_value_args)that); + return false; + } + + public boolean equals(get_config_value_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_defaultValue = true && this.isSetDefaultValue(); + boolean that_present_defaultValue = true && that.isSetDefaultValue(); + if (this_present_defaultValue || that_present_defaultValue) { + if (!(this_present_defaultValue && that_present_defaultValue)) + return false; + if (!this.defaultValue.equals(that.defaultValue)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + boolean present_defaultValue = true && (isSetDefaultValue()); + list.add(present_defaultValue); + if (present_defaultValue) + list.add(defaultValue); + + return list.hashCode(); + } + + @Override + public int compareTo(get_config_value_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDefaultValue()).compareTo(other.isSetDefaultValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDefaultValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultValue, other.defaultValue); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_config_value_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("defaultValue:"); + if (this.defaultValue == null) { + sb.append("null"); + } else { + sb.append(this.defaultValue); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_config_value_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_config_value_result.class, metaDataMap); + } + + public get_config_value_result() { + } + + public get_config_value_result( + String success, + ConfigValSecurityException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_config_value_result(get_config_value_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + if (other.isSetO1()) { + this.o1 = new ConfigValSecurityException(other.o1); + } + } + + public get_config_value_result deepCopy() { + return new get_config_value_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public String getSuccess() { + return this.success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public ConfigValSecurityException getO1() { + return this.o1; + } + + public void setO1(ConfigValSecurityException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((String)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((ConfigValSecurityException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_config_value_result) + return this.equals((get_config_value_result)that); + return false; + } + + public boolean equals(get_config_value_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_config_value_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_config_value_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_to_vals_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PART_NAME((short)1, "part_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PART_NAME + return PART_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partition_name_to_vals_args.class, metaDataMap); + } + + public partition_name_to_vals_args() { + } + + public partition_name_to_vals_args( + String part_name) + { + this(); + this.part_name = part_name; + } + + /** + * Performs a deep copy on other. + */ + public partition_name_to_vals_args(partition_name_to_vals_args other) { + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + } + + public partition_name_to_vals_args deepCopy() { + return new partition_name_to_vals_args(this); + } + + @Override + public void clear() { + this.part_name = null; + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PART_NAME: + return getPart_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PART_NAME: + return isSetPart_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof partition_name_to_vals_args) + return this.equals((partition_name_to_vals_args)that); + return false; + } + + public boolean equals(partition_name_to_vals_args that) { + if (that == null) + return false; + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_part_name = true && (isSetPart_name()); + list.add(present_part_name); + if (present_part_name) + list.add(part_name); + + return list.hashCode(); + } + + @Override + public int compareTo(partition_name_to_vals_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("partition_name_to_vals_args("); + boolean first = true; + + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_to_vals_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); + } + + public partition_name_to_vals_result() { + } + + public partition_name_to_vals_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public partition_name_to_vals_result(partition_name_to_vals_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public partition_name_to_vals_result deepCopy() { + return new partition_name_to_vals_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof partition_name_to_vals_result) + return this.equals((partition_name_to_vals_result)that); + return false; + } + + public boolean equals(partition_name_to_vals_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(partition_name_to_vals_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("partition_name_to_vals_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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 _list1128 = iprot.readListBegin(); + struct.success = new ArrayList(_list1128.size); + String _elem1129; + for (int _i1130 = 0; _i1130 < _list1128.size; ++_i1130) + { + _elem1129 = iprot.readString(); + struct.success.add(_elem1129); + } + 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 _iter1131 : struct.success) + { + oprot.writeString(_iter1131); + } + 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 _iter1132 : struct.success) + { + oprot.writeString(_iter1132); + } + } + } + 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 _list1133 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list1133.size); + String _elem1134; + for (int _i1135 = 0; _i1135 < _list1133.size; ++_i1135) + { + _elem1134 = iprot.readString(); + struct.success.add(_elem1134); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_to_spec_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PART_NAME((short)1, "part_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PART_NAME + return PART_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partition_name_to_spec_args.class, metaDataMap); + } + + public partition_name_to_spec_args() { + } + + public partition_name_to_spec_args( + String part_name) + { + this(); + this.part_name = part_name; + } + + /** + * Performs a deep copy on other. + */ + public partition_name_to_spec_args(partition_name_to_spec_args other) { + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + } + + public partition_name_to_spec_args deepCopy() { + return new partition_name_to_spec_args(this); + } + + @Override + public void clear() { + this.part_name = null; + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PART_NAME: + return getPart_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PART_NAME: + return isSetPart_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof partition_name_to_spec_args) + return this.equals((partition_name_to_spec_args)that); + return false; + } + + public boolean equals(partition_name_to_spec_args that) { + if (that == null) + return false; + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_part_name = true && (isSetPart_name()); + list.add(present_part_name); + if (present_part_name) + list.add(part_name); + + return list.hashCode(); + } + + @Override + public int compareTo(partition_name_to_spec_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("partition_name_to_spec_args("); + boolean first = true; + + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partition_name_to_spec_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partition_name_to_spec_result.class, metaDataMap); + } + + public partition_name_to_spec_result() { + } + + public partition_name_to_spec_result( + Map success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public partition_name_to_spec_result(partition_name_to_spec_result other) { + if (other.isSetSuccess()) { + Map __this__success = new HashMap(other.success); + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public partition_name_to_spec_result deepCopy() { + return new partition_name_to_spec_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public void putToSuccess(String key, String val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); + } + + public Map getSuccess() { + return this.success; + } + + public void setSuccess(Map success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Map)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof partition_name_to_spec_result) + return this.equals((partition_name_to_spec_result)that); + return false; + } + + public boolean equals(partition_name_to_spec_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(partition_name_to_spec_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("partition_name_to_spec_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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 _map1136 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map1136.size); + String _key1137; + String _val1138; + for (int _i1139 = 0; _i1139 < _map1136.size; ++_i1139) + { + _key1137 = iprot.readString(); + _val1138 = iprot.readString(); + struct.success.put(_key1137, _val1138); + } + 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 _iter1140 : struct.success.entrySet()) + { + oprot.writeString(_iter1140.getKey()); + oprot.writeString(_iter1140.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 _iter1141 : struct.success.entrySet()) + { + oprot.writeString(_iter1141.getKey()); + oprot.writeString(_iter1141.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 _map1142 = 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*_map1142.size); + String _key1143; + String _val1144; + for (int _i1145 = 0; _i1145 < _map1142.size; ++_i1145) + { + _key1143 = iprot.readString(); + _val1144 = iprot.readString(); + struct.success.put(_key1143, _val1144); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPartitionForEvent_args"); + + 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 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.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 + private PartitionEventType eventType; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + /** + * + * @see PartitionEventType + */ + EVENT_TYPE((short)4, "eventType"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // EVENT_TYPE + return EVENT_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.EVENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("eventType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PartitionEventType.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPartitionForEvent_args.class, metaDataMap); + } + + public markPartitionForEvent_args() { + } + + public markPartitionForEvent_args( + String db_name, + String tbl_name, + Map part_vals, + PartitionEventType eventType) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.eventType = eventType; + } + + /** + * Performs a deep copy on other. + */ + public markPartitionForEvent_args(markPartitionForEvent_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + Map __this__part_vals = new HashMap(other.part_vals); + this.part_vals = __this__part_vals; + } + if (other.isSetEventType()) { + this.eventType = other.eventType; + } + } + + public markPartitionForEvent_args deepCopy() { + return new markPartitionForEvent_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.eventType = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public void putToPart_vals(String key, String val) { + if (this.part_vals == null) { + this.part_vals = new HashMap(); + } + this.part_vals.put(key, val); + } + + public Map getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(Map part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + /** + * + * @see PartitionEventType + */ + public PartitionEventType getEventType() { + return this.eventType; + } + + /** + * + * @see PartitionEventType + */ + public void setEventType(PartitionEventType eventType) { + this.eventType = eventType; + } + + public void unsetEventType() { + this.eventType = null; + } + + /** Returns true if field eventType is set (has been assigned a value) and false otherwise */ + public boolean isSetEventType() { + return this.eventType != null; + } + + public void setEventTypeIsSet(boolean value) { + if (!value) { + this.eventType = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((Map)value); + } + break; + + case EVENT_TYPE: + if (value == null) { + unsetEventType(); + } else { + setEventType((PartitionEventType)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case EVENT_TYPE: + return getEventType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case EVENT_TYPE: + return isSetEventType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof markPartitionForEvent_args) + return this.equals((markPartitionForEvent_args)that); + return false; + } + + public boolean equals(markPartitionForEvent_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_eventType = true && this.isSetEventType(); + boolean that_present_eventType = true && that.isSetEventType(); + if (this_present_eventType || that_present_eventType) { + if (!(this_present_eventType && that_present_eventType)) + return false; + if (!this.eventType.equals(that.eventType)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + boolean present_eventType = true && (isSetEventType()); + list.add(present_eventType); + if (present_eventType) + list.add(eventType.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(markPartitionForEvent_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEventType()).compareTo(other.isSetEventType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEventType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, other.eventType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("markPartitionForEvent_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("eventType:"); + if (this.eventType == null) { + sb.append("null"); + } else { + sb.append(this.eventType); + } + 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 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 _map1146 = iprot.readMapBegin(); + struct.part_vals = new HashMap(2*_map1146.size); + String _key1147; + String _val1148; + for (int _i1149 = 0; _i1149 < _map1146.size; ++_i1149) + { + _key1147 = iprot.readString(); + _val1148 = iprot.readString(); + struct.part_vals.put(_key1147, _val1148); + } + 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 = org.apache.hadoop.hive.metastore.api.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 _iter1150 : struct.part_vals.entrySet()) + { + oprot.writeString(_iter1150.getKey()); + oprot.writeString(_iter1150.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 _iter1151 : struct.part_vals.entrySet()) + { + oprot.writeString(_iter1151.getKey()); + oprot.writeString(_iter1151.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 _map1152 = 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*_map1152.size); + String _key1153; + String _val1154; + for (int _i1155 = 0; _i1155 < _map1152.size; ++_i1155) + { + _key1153 = iprot.readString(); + _val1154 = iprot.readString(); + struct.part_vals.put(_key1153, _val1154); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.eventType = org.apache.hadoop.hive.metastore.api.PartitionEventType.findByValue(iprot.readI32()); + struct.setEventTypeIsSet(true); + } + } + } + + } + + public static class markPartitionForEvent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPartitionForEvent_result"); + + 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 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 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 + private UnknownTableException o4; // required + private UnknownPartitionException o5; // required + private InvalidPartitionException o6; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"), + O5((short)5, "o5"), + O6((short)6, "o6"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + case 5: // O5 + return O5; + case 6: // O6 + return O6; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O5, new org.apache.thrift.meta_data.FieldMetaData("o5", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O6, new org.apache.thrift.meta_data.FieldMetaData("o6", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPartitionForEvent_result.class, metaDataMap); + } + + public markPartitionForEvent_result() { + } + + public markPartitionForEvent_result( + MetaException o1, + NoSuchObjectException o2, + UnknownDBException o3, + UnknownTableException o4, + UnknownPartitionException o5, + InvalidPartitionException o6) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + this.o5 = o5; + this.o6 = o6; + } + + /** + * Performs a deep copy on other. + */ + public markPartitionForEvent_result(markPartitionForEvent_result other) { + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new UnknownTableException(other.o4); + } + if (other.isSetO5()) { + this.o5 = new UnknownPartitionException(other.o5); + } + if (other.isSetO6()) { + this.o6 = new InvalidPartitionException(other.o6); + } + } + + public markPartitionForEvent_result deepCopy() { + return new markPartitionForEvent_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + this.o5 = null; + this.o6 = null; + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public UnknownDBException getO3() { + return this.o3; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public UnknownTableException getO4() { + return this.o4; + } + + public void setO4(UnknownTableException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public UnknownPartitionException getO5() { + return this.o5; + } + + public void setO5(UnknownPartitionException o5) { + this.o5 = o5; + } + + public void unsetO5() { + this.o5 = null; + } + + /** Returns true if field o5 is set (has been assigned a value) and false otherwise */ + public boolean isSetO5() { + return this.o5 != null; + } + + public void setO5IsSet(boolean value) { + if (!value) { + this.o5 = null; + } + } + + public InvalidPartitionException getO6() { + return this.o6; + } + + public void setO6(InvalidPartitionException o6) { + this.o6 = o6; + } + + public void unsetO6() { + this.o6 = null; + } + + /** Returns true if field o6 is set (has been assigned a value) and false otherwise */ + public boolean isSetO6() { + return this.o6 != null; + } + + public void setO6IsSet(boolean value) { + if (!value) { + this.o6 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((UnknownTableException)value); + } + break; + + case O5: + if (value == null) { + unsetO5(); + } else { + setO5((UnknownPartitionException)value); + } + break; + + case O6: + if (value == null) { + unsetO6(); + } else { + setO6((InvalidPartitionException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + case O5: + return getO5(); + + case O6: + return getO6(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + case O5: + return isSetO5(); + case O6: + return isSetO6(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof markPartitionForEvent_result) + return this.equals((markPartitionForEvent_result)that); + return false; + } + + public boolean equals(markPartitionForEvent_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + boolean this_present_o5 = true && this.isSetO5(); + boolean that_present_o5 = true && that.isSetO5(); + if (this_present_o5 || that_present_o5) { + if (!(this_present_o5 && that_present_o5)) + return false; + if (!this.o5.equals(that.o5)) + return false; + } + + boolean this_present_o6 = true && this.isSetO6(); + boolean that_present_o6 = true && that.isSetO6(); + if (this_present_o6 || that_present_o6) { + if (!(this_present_o6 && that_present_o6)) + return false; + if (!this.o6.equals(that.o6)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + boolean present_o5 = true && (isSetO5()); + list.add(present_o5); + if (present_o5) + list.add(o5); + + boolean present_o6 = true && (isSetO6()); + list.add(present_o6); + if (present_o6) + list.add(o6); + + return list.hashCode(); + } + + @Override + public int compareTo(markPartitionForEvent_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO5()).compareTo(other.isSetO5()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO5()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o5, other.o5); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO6()).compareTo(other.isSetO6()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO6()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o6, other.o6); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("markPartitionForEvent_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; + if (!first) sb.append(", "); + sb.append("o5:"); + if (this.o5 == null) { + sb.append("null"); + } else { + sb.append(this.o5); + } + first = false; + if (!first) sb.append(", "); + sb.append("o6:"); + if (this.o6 == null) { + sb.append("null"); + } else { + sb.append(this.o6); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isPartitionMarkedForEvent_args"); + + 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 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.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 + private PartitionEventType eventType; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + /** + * + * @see PartitionEventType + */ + EVENT_TYPE((short)4, "eventType"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // EVENT_TYPE + return EVENT_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.EVENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("eventType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PartitionEventType.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isPartitionMarkedForEvent_args.class, metaDataMap); + } + + public isPartitionMarkedForEvent_args() { + } + + public isPartitionMarkedForEvent_args( + String db_name, + String tbl_name, + Map part_vals, + PartitionEventType eventType) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.eventType = eventType; + } + + /** + * Performs a deep copy on other. + */ + public isPartitionMarkedForEvent_args(isPartitionMarkedForEvent_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + Map __this__part_vals = new HashMap(other.part_vals); + this.part_vals = __this__part_vals; + } + if (other.isSetEventType()) { + this.eventType = other.eventType; + } + } + + public isPartitionMarkedForEvent_args deepCopy() { + return new isPartitionMarkedForEvent_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.eventType = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public void putToPart_vals(String key, String val) { + if (this.part_vals == null) { + this.part_vals = new HashMap(); + } + this.part_vals.put(key, val); + } + + public Map getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(Map part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + /** + * + * @see PartitionEventType + */ + public PartitionEventType getEventType() { + return this.eventType; + } + + /** + * + * @see PartitionEventType + */ + public void setEventType(PartitionEventType eventType) { + this.eventType = eventType; + } + + public void unsetEventType() { + this.eventType = null; + } + + /** Returns true if field eventType is set (has been assigned a value) and false otherwise */ + public boolean isSetEventType() { + return this.eventType != null; + } + + public void setEventTypeIsSet(boolean value) { + if (!value) { + this.eventType = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((Map)value); + } + break; + + case EVENT_TYPE: + if (value == null) { + unsetEventType(); + } else { + setEventType((PartitionEventType)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case EVENT_TYPE: + return getEventType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case EVENT_TYPE: + return isSetEventType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof isPartitionMarkedForEvent_args) + return this.equals((isPartitionMarkedForEvent_args)that); + return false; + } + + public boolean equals(isPartitionMarkedForEvent_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_eventType = true && this.isSetEventType(); + boolean that_present_eventType = true && that.isSetEventType(); + if (this_present_eventType || that_present_eventType) { + if (!(this_present_eventType && that_present_eventType)) + return false; + if (!this.eventType.equals(that.eventType)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_vals = true && (isSetPart_vals()); + list.add(present_part_vals); + if (present_part_vals) + list.add(part_vals); + + boolean present_eventType = true && (isSetEventType()); + list.add(present_eventType); + if (present_eventType) + list.add(eventType.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(isPartitionMarkedForEvent_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(other.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_vals, other.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEventType()).compareTo(other.isSetEventType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEventType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, other.eventType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("isPartitionMarkedForEvent_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("eventType:"); + if (this.eventType == null) { + sb.append("null"); + } else { + sb.append(this.eventType); + } + 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 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 _map1156 = iprot.readMapBegin(); + struct.part_vals = new HashMap(2*_map1156.size); + String _key1157; + String _val1158; + for (int _i1159 = 0; _i1159 < _map1156.size; ++_i1159) + { + _key1157 = iprot.readString(); + _val1158 = iprot.readString(); + struct.part_vals.put(_key1157, _val1158); + } + 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 = org.apache.hadoop.hive.metastore.api.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 _iter1160 : struct.part_vals.entrySet()) + { + oprot.writeString(_iter1160.getKey()); + oprot.writeString(_iter1160.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 _iter1161 : struct.part_vals.entrySet()) + { + oprot.writeString(_iter1161.getKey()); + oprot.writeString(_iter1161.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 _map1162 = 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*_map1162.size); + String _key1163; + String _val1164; + for (int _i1165 = 0; _i1165 < _map1162.size; ++_i1165) + { + _key1163 = iprot.readString(); + _val1164 = iprot.readString(); + struct.part_vals.put(_key1163, _val1164); + } + } + struct.setPart_valsIsSet(true); + } + if (incoming.get(3)) { + struct.eventType = org.apache.hadoop.hive.metastore.api.PartitionEventType.findByValue(iprot.readI32()); + struct.setEventTypeIsSet(true); + } + } + } + + } + + public static class isPartitionMarkedForEvent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isPartitionMarkedForEvent_result"); + + 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 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 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 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 + private UnknownDBException o3; // required + private UnknownTableException o4; // required + private UnknownPartitionException o5; // required + private InvalidPartitionException o6; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"), + O5((short)5, "o5"), + O6((short)6, "o6"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + case 5: // O5 + return O5; + case 6: // O6 + return O6; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O5, new org.apache.thrift.meta_data.FieldMetaData("o5", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O6, new org.apache.thrift.meta_data.FieldMetaData("o6", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isPartitionMarkedForEvent_result.class, metaDataMap); + } + + public isPartitionMarkedForEvent_result() { + } + + public isPartitionMarkedForEvent_result( + boolean success, + MetaException o1, + NoSuchObjectException o2, + UnknownDBException o3, + UnknownTableException o4, + UnknownPartitionException o5, + InvalidPartitionException o6) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + this.o5 = o5; + this.o6 = o6; + } + + /** + * Performs a deep copy on other. + */ + public isPartitionMarkedForEvent_result(isPartitionMarkedForEvent_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new UnknownTableException(other.o4); + } + if (other.isSetO5()) { + this.o5 = new UnknownPartitionException(other.o5); + } + if (other.isSetO6()) { + this.o6 = new InvalidPartitionException(other.o6); + } + } + + public isPartitionMarkedForEvent_result deepCopy() { + return new isPartitionMarkedForEvent_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + this.o5 = null; + this.o6 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public UnknownDBException getO3() { + return this.o3; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public UnknownTableException getO4() { + return this.o4; + } + + public void setO4(UnknownTableException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public UnknownPartitionException getO5() { + return this.o5; + } + + public void setO5(UnknownPartitionException o5) { + this.o5 = o5; + } + + public void unsetO5() { + this.o5 = null; + } + + /** Returns true if field o5 is set (has been assigned a value) and false otherwise */ + public boolean isSetO5() { + return this.o5 != null; + } + + public void setO5IsSet(boolean value) { + if (!value) { + this.o5 = null; + } + } + + public InvalidPartitionException getO6() { + return this.o6; + } + + public void setO6(InvalidPartitionException o6) { + this.o6 = o6; + } + + public void unsetO6() { + this.o6 = null; + } + + /** Returns true if field o6 is set (has been assigned a value) and false otherwise */ + public boolean isSetO6() { + return this.o6 != null; + } + + public void setO6IsSet(boolean value) { + if (!value) { + this.o6 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((UnknownTableException)value); + } + break; + + case O5: + if (value == null) { + unsetO5(); + } else { + setO5((UnknownPartitionException)value); + } + break; + + case O6: + if (value == null) { + unsetO6(); + } else { + setO6((InvalidPartitionException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + case O5: + return getO5(); + + case O6: + return getO6(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + case O5: + return isSetO5(); + case O6: + return isSetO6(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof isPartitionMarkedForEvent_result) + return this.equals((isPartitionMarkedForEvent_result)that); + return false; + } + + public boolean equals(isPartitionMarkedForEvent_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + boolean this_present_o5 = true && this.isSetO5(); + boolean that_present_o5 = true && that.isSetO5(); + if (this_present_o5 || that_present_o5) { + if (!(this_present_o5 && that_present_o5)) + return false; + if (!this.o5.equals(that.o5)) + return false; + } + + boolean this_present_o6 = true && this.isSetO6(); + boolean that_present_o6 = true && that.isSetO6(); + if (this_present_o6 || that_present_o6) { + if (!(this_present_o6 && that_present_o6)) + return false; + if (!this.o6.equals(that.o6)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + boolean present_o5 = true && (isSetO5()); + list.add(present_o5); + if (present_o5) + list.add(o5); + + boolean present_o6 = true && (isSetO6()); + list.add(present_o6); + if (present_o6) + list.add(o6); + + return list.hashCode(); + } + + @Override + public int compareTo(isPartitionMarkedForEvent_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO5()).compareTo(other.isSetO5()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO5()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o5, other.o5); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO6()).compareTo(other.isSetO6()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO6()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o6, other.o6); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("isPartitionMarkedForEvent_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; + if (!first) sb.append(", "); + sb.append("o5:"); + if (this.o5 == null) { + sb.append("null"); + } else { + sb.append(this.o5); + } + first = false; + if (!first) sb.append(", "); + sb.append("o6:"); + if (this.o6 == null) { + sb.append("null"); + } else { + sb.append(this.o6); + } + 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 { + // 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_index_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NEW_INDEX((short)1, "new_index"), + INDEX_TABLE((short)2, "index_table"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NEW_INDEX + return NEW_INDEX; + case 2: // INDEX_TABLE + return INDEX_TABLE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.NEW_INDEX, new org.apache.thrift.meta_data.FieldMetaData("new_index", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class))); + tmpMap.put(_Fields.INDEX_TABLE, new org.apache.thrift.meta_data.FieldMetaData("index_table", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap); + } + + public add_index_args() { + } + + public add_index_args( + Index new_index, + Table index_table) + { + this(); + this.new_index = new_index; + this.index_table = index_table; + } + + /** + * Performs a deep copy on other. + */ + public add_index_args(add_index_args other) { + if (other.isSetNew_index()) { + this.new_index = new Index(other.new_index); + } + if (other.isSetIndex_table()) { + this.index_table = new Table(other.index_table); + } + } + + public add_index_args deepCopy() { + return new add_index_args(this); + } + + @Override + public void clear() { + this.new_index = null; + this.index_table = null; + } + + public Index getNew_index() { + return this.new_index; + } + + public void setNew_index(Index new_index) { + this.new_index = new_index; + } + + public void unsetNew_index() { + this.new_index = null; + } + + /** Returns true if field new_index is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_index() { + return this.new_index != null; + } + + public void setNew_indexIsSet(boolean value) { + if (!value) { + this.new_index = null; + } + } + + public Table getIndex_table() { + return this.index_table; + } + + public void setIndex_table(Table index_table) { + this.index_table = index_table; + } + + public void unsetIndex_table() { + this.index_table = null; + } + + /** Returns true if field index_table is set (has been assigned a value) and false otherwise */ + public boolean isSetIndex_table() { + return this.index_table != null; + } + + public void setIndex_tableIsSet(boolean value) { + if (!value) { + this.index_table = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NEW_INDEX: + if (value == null) { + unsetNew_index(); + } else { + setNew_index((Index)value); + } + break; + + case INDEX_TABLE: + if (value == null) { + unsetIndex_table(); + } else { + setIndex_table((Table)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NEW_INDEX: + return getNew_index(); + + case INDEX_TABLE: + return getIndex_table(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NEW_INDEX: + return isSetNew_index(); + case INDEX_TABLE: + return isSetIndex_table(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_index_args) + return this.equals((add_index_args)that); + return false; + } + + public boolean equals(add_index_args that) { + if (that == null) + return false; + + boolean this_present_new_index = true && this.isSetNew_index(); + boolean that_present_new_index = true && that.isSetNew_index(); + if (this_present_new_index || that_present_new_index) { + if (!(this_present_new_index && that_present_new_index)) + return false; + if (!this.new_index.equals(that.new_index)) + return false; + } + + boolean this_present_index_table = true && this.isSetIndex_table(); + boolean that_present_index_table = true && that.isSetIndex_table(); + if (this_present_index_table || that_present_index_table) { + if (!(this_present_index_table && that_present_index_table)) + return false; + if (!this.index_table.equals(that.index_table)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_new_index = true && (isSetNew_index()); + list.add(present_new_index); + if (present_new_index) + list.add(new_index); + + boolean present_index_table = true && (isSetIndex_table()); + list.add(present_index_table); + if (present_index_table) + list.add(index_table); + + return list.hashCode(); + } + + @Override + public int compareTo(add_index_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNew_index()).compareTo(other.isSetNew_index()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_index()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_index, other.new_index); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndex_table()).compareTo(other.isSetIndex_table()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndex_table()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_table, other.index_table); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_index_args("); + boolean first = true; + + sb.append("new_index:"); + if (this.new_index == null) { + sb.append("null"); + } else { + sb.append(this.new_index); + } + first = false; + if (!first) sb.append(", "); + sb.append("index_table:"); + if (this.index_table == null) { + sb.append("null"); + } else { + sb.append(this.index_table); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_index_result"); + + 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 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 + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_index_result.class, metaDataMap); + } + + public add_index_result() { + } + + public add_index_result( + Index success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public add_index_result(add_index_result other) { + if (other.isSetSuccess()) { + this.success = new Index(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public add_index_result deepCopy() { + return new add_index_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Index getSuccess() { + return this.success; + } + + public void setSuccess(Index success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Index)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_index_result) + return this.equals((add_index_result)that); + return false; + } + + public boolean equals(add_index_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(add_index_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_index_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_index_args"); + + 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 BASE_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("base_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); + 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 + private Index new_idx; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DBNAME((short)1, "dbname"), + BASE_TBL_NAME((short)2, "base_tbl_name"), + IDX_NAME((short)3, "idx_name"), + NEW_IDX((short)4, "new_idx"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // BASE_TBL_NAME + return BASE_TBL_NAME; + case 3: // IDX_NAME + return IDX_NAME; + case 4: // NEW_IDX + return NEW_IDX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.BASE_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("base_tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IDX_NAME, new org.apache.thrift.meta_data.FieldMetaData("idx_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_IDX, new org.apache.thrift.meta_data.FieldMetaData("new_idx", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_index_args.class, metaDataMap); + } + + public alter_index_args() { + } + + public alter_index_args( + String dbname, + String base_tbl_name, + String idx_name, + Index new_idx) + { + this(); + this.dbname = dbname; + this.base_tbl_name = base_tbl_name; + this.idx_name = idx_name; + this.new_idx = new_idx; + } + + /** + * Performs a deep copy on other. + */ + public alter_index_args(alter_index_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetBase_tbl_name()) { + this.base_tbl_name = other.base_tbl_name; + } + if (other.isSetIdx_name()) { + this.idx_name = other.idx_name; + } + if (other.isSetNew_idx()) { + this.new_idx = new Index(other.new_idx); + } + } + + public alter_index_args deepCopy() { + return new alter_index_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.base_tbl_name = null; + this.idx_name = null; + this.new_idx = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getBase_tbl_name() { + return this.base_tbl_name; + } + + public void setBase_tbl_name(String base_tbl_name) { + this.base_tbl_name = base_tbl_name; + } + + public void unsetBase_tbl_name() { + this.base_tbl_name = null; + } + + /** Returns true if field base_tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetBase_tbl_name() { + return this.base_tbl_name != null; + } + + public void setBase_tbl_nameIsSet(boolean value) { + if (!value) { + this.base_tbl_name = null; + } + } + + public String getIdx_name() { + return this.idx_name; + } + + public void setIdx_name(String idx_name) { + this.idx_name = idx_name; + } + + public void unsetIdx_name() { + this.idx_name = null; + } + + /** Returns true if field idx_name is set (has been assigned a value) and false otherwise */ + public boolean isSetIdx_name() { + return this.idx_name != null; + } + + public void setIdx_nameIsSet(boolean value) { + if (!value) { + this.idx_name = null; + } + } + + public Index getNew_idx() { + return this.new_idx; + } + + public void setNew_idx(Index new_idx) { + this.new_idx = new_idx; + } + + public void unsetNew_idx() { + this.new_idx = null; + } + + /** Returns true if field new_idx is set (has been assigned a value) and false otherwise */ + public boolean isSetNew_idx() { + return this.new_idx != null; + } + + public void setNew_idxIsSet(boolean value) { + if (!value) { + this.new_idx = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case BASE_TBL_NAME: + if (value == null) { + unsetBase_tbl_name(); + } else { + setBase_tbl_name((String)value); + } + break; + + case IDX_NAME: + if (value == null) { + unsetIdx_name(); + } else { + setIdx_name((String)value); + } + break; + + case NEW_IDX: + if (value == null) { + unsetNew_idx(); + } else { + setNew_idx((Index)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case BASE_TBL_NAME: + return getBase_tbl_name(); + + case IDX_NAME: + return getIdx_name(); + + case NEW_IDX: + return getNew_idx(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case BASE_TBL_NAME: + return isSetBase_tbl_name(); + case IDX_NAME: + return isSetIdx_name(); + case NEW_IDX: + return isSetNew_idx(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_index_args) + return this.equals((alter_index_args)that); + return false; + } + + public boolean equals(alter_index_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_base_tbl_name = true && this.isSetBase_tbl_name(); + boolean that_present_base_tbl_name = true && that.isSetBase_tbl_name(); + if (this_present_base_tbl_name || that_present_base_tbl_name) { + if (!(this_present_base_tbl_name && that_present_base_tbl_name)) + return false; + if (!this.base_tbl_name.equals(that.base_tbl_name)) + return false; + } + + boolean this_present_idx_name = true && this.isSetIdx_name(); + boolean that_present_idx_name = true && that.isSetIdx_name(); + if (this_present_idx_name || that_present_idx_name) { + if (!(this_present_idx_name && that_present_idx_name)) + return false; + if (!this.idx_name.equals(that.idx_name)) + return false; + } + + boolean this_present_new_idx = true && this.isSetNew_idx(); + boolean that_present_new_idx = true && that.isSetNew_idx(); + if (this_present_new_idx || that_present_new_idx) { + if (!(this_present_new_idx && that_present_new_idx)) + return false; + if (!this.new_idx.equals(that.new_idx)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbname = true && (isSetDbname()); + list.add(present_dbname); + if (present_dbname) + list.add(dbname); + + boolean present_base_tbl_name = true && (isSetBase_tbl_name()); + list.add(present_base_tbl_name); + if (present_base_tbl_name) + list.add(base_tbl_name); + + boolean present_idx_name = true && (isSetIdx_name()); + list.add(present_idx_name); + if (present_idx_name) + list.add(idx_name); + + boolean present_new_idx = true && (isSetNew_idx()); + list.add(present_new_idx); + if (present_new_idx) + list.add(new_idx); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_index_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBase_tbl_name()).compareTo(other.isSetBase_tbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBase_tbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base_tbl_name, other.base_tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIdx_name()).compareTo(other.isSetIdx_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIdx_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.idx_name, other.idx_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_idx()).compareTo(other.isSetNew_idx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_idx()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_idx, other.new_idx); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_index_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("base_tbl_name:"); + if (this.base_tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.base_tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("idx_name:"); + if (this.idx_name == null) { + sb.append("null"); + } else { + sb.append(this.idx_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_idx:"); + if (this.new_idx == null) { + sb.append("null"); + } else { + sb.append(this.new_idx); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_index_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_index_result.class, metaDataMap); + } + + public alter_index_result() { + } + + public alter_index_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_index_result(alter_index_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_index_result deepCopy() { + return new alter_index_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_index_result) + return this.equals((alter_index_result)that); + return false; + } + + public boolean equals(alter_index_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_index_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_index_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_index_by_name_args"); + + 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 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 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 + private boolean deleteData; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + INDEX_NAME((short)3, "index_name"), + DELETE_DATA((short)4, "deleteData"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // INDEX_NAME + return INDEX_NAME; + case 4: // DELETE_DATA + return DELETE_DATA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_index_by_name_args.class, metaDataMap); + } + + public drop_index_by_name_args() { + } + + public drop_index_by_name_args( + String db_name, + String tbl_name, + String index_name, + boolean deleteData) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public drop_index_by_name_args(drop_index_by_name_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetIndex_name()) { + this.index_name = other.index_name; + } + this.deleteData = other.deleteData; + } + + public drop_index_by_name_args deepCopy() { + return new drop_index_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.index_name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getIndex_name() { + return this.index_name; + } + + public void setIndex_name(String index_name) { + this.index_name = index_name; + } + + public void unsetIndex_name() { + this.index_name = null; + } + + /** Returns true if field index_name is set (has been assigned a value) and false otherwise */ + public boolean isSetIndex_name() { + return this.index_name != null; + } + + public void setIndex_nameIsSet(boolean value) { + if (!value) { + this.index_name = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __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 EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case INDEX_NAME: + if (value == null) { + unsetIndex_name(); + } else { + setIndex_name((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case INDEX_NAME: + return getIndex_name(); + + case DELETE_DATA: + return isDeleteData(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case INDEX_NAME: + return isSetIndex_name(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_index_by_name_args) + return this.equals((drop_index_by_name_args)that); + return false; + } + + public boolean equals(drop_index_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_index_name = true && this.isSetIndex_name(); + boolean that_present_index_name = true && that.isSetIndex_name(); + if (this_present_index_name || that_present_index_name) { + if (!(this_present_index_name && that_present_index_name)) + return false; + if (!this.index_name.equals(that.index_name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_index_name = true && (isSetIndex_name()); + list.add(present_index_name); + if (present_index_name) + list.add(index_name); + + boolean present_deleteData = true; + list.add(present_deleteData); + if (present_deleteData) + list.add(deleteData); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_index_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(other.isSetIndex_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndex_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, other.index_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_index_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("index_name:"); + if (this.index_name == null) { + sb.append("null"); + } else { + sb.append(this.index_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + 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 { + // 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_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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_index_by_name_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_index_by_name_result.class, metaDataMap); + } + + public drop_index_by_name_result() { + } + + public drop_index_by_name_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_index_by_name_result(drop_index_by_name_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public drop_index_by_name_result deepCopy() { + return new drop_index_by_name_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_index_by_name_result) + return this.equals((drop_index_by_name_result)that); + return false; + } + + public boolean equals(drop_index_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_index_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_index_by_name_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 { + // 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_by_name_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + INDEX_NAME((short)3, "index_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // INDEX_NAME + return INDEX_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); + } + + public get_index_by_name_args() { + } + + public get_index_by_name_args( + String db_name, + String tbl_name, + String index_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + } + + /** + * Performs a deep copy on other. + */ + public get_index_by_name_args(get_index_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetIndex_name()) { + this.index_name = other.index_name; + } + } + + public get_index_by_name_args deepCopy() { + return new get_index_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.index_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getIndex_name() { + return this.index_name; + } + + public void setIndex_name(String index_name) { + this.index_name = index_name; + } + + public void unsetIndex_name() { + this.index_name = null; + } + + /** Returns true if field index_name is set (has been assigned a value) and false otherwise */ + public boolean isSetIndex_name() { + return this.index_name != null; + } + + public void setIndex_nameIsSet(boolean value) { + if (!value) { + this.index_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case INDEX_NAME: + if (value == null) { + unsetIndex_name(); + } else { + setIndex_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case INDEX_NAME: + return getIndex_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case INDEX_NAME: + return isSetIndex_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_index_by_name_args) + return this.equals((get_index_by_name_args)that); + return false; + } + + public boolean equals(get_index_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_index_name = true && this.isSetIndex_name(); + boolean that_present_index_name = true && that.isSetIndex_name(); + if (this_present_index_name || that_present_index_name) { + if (!(this_present_index_name && that_present_index_name)) + return false; + if (!this.index_name.equals(that.index_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_index_name = true && (isSetIndex_name()); + list.add(present_index_name); + if (present_index_name) + list.add(index_name); + + return list.hashCode(); + } + + @Override + public int compareTo(get_index_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(other.isSetIndex_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndex_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, other.index_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_index_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("index_name:"); + if (this.index_name == null) { + sb.append("null"); + } else { + sb.append(this.index_name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_by_name_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_by_name_result.class, metaDataMap); + } + + public get_index_by_name_result() { + } + + public get_index_by_name_result( + Index success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_index_by_name_result(get_index_by_name_result other) { + if (other.isSetSuccess()) { + this.success = new Index(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_index_by_name_result deepCopy() { + return new get_index_by_name_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Index getSuccess() { + return this.success; + } + + public void setSuccess(Index success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Index)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_index_by_name_result) + return this.equals((get_index_by_name_result)that); + return false; + } + + public boolean equals(get_index_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_index_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_index_by_name_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_indexes_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_INDEXES((short)3, "max_indexes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_INDEXES + return MAX_INDEXES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_INDEXES_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_INDEXES, new org.apache.thrift.meta_data.FieldMetaData("max_indexes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); + } + + public get_indexes_args() { + this.max_indexes = (short)-1; + + } + + public get_indexes_args( + String db_name, + String tbl_name, + short max_indexes) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_indexes_args(get_indexes_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + this.max_indexes = other.max_indexes; + } + + public get_indexes_args deepCopy() { + return new get_indexes_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_indexes = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public short getMax_indexes() { + return this.max_indexes; + } + + public void setMax_indexes(short max_indexes) { + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); + } + + public void unsetMax_indexes() { + __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 EncodingUtils.testBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); + } + + public void setMax_indexesIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case MAX_INDEXES: + if (value == null) { + unsetMax_indexes(); + } else { + setMax_indexes((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_INDEXES: + return getMax_indexes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_INDEXES: + return isSetMax_indexes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_indexes_args) + return this.equals((get_indexes_args)that); + return false; + } + + public boolean equals(get_indexes_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_indexes = true; + boolean that_present_max_indexes = true; + if (this_present_max_indexes || that_present_max_indexes) { + if (!(this_present_max_indexes && that_present_max_indexes)) + return false; + if (this.max_indexes != that.max_indexes) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_max_indexes = true; + list.add(present_max_indexes); + if (present_max_indexes) + list.add(max_indexes); + + return list.hashCode(); + } + + @Override + public int compareTo(get_indexes_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(other.isSetMax_indexes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_indexes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, other.max_indexes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_indexes_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_indexes:"); + sb.append(this.max_indexes); + 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 { + // 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_indexes_result"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_indexes_result.class, metaDataMap); + } + + public get_indexes_result() { + } + + public get_indexes_result( + List success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_indexes_result(get_indexes_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (Index other_element : other.success) { + __this__success.add(new Index(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_indexes_result deepCopy() { + return new get_indexes_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Index elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_indexes_result) + return this.equals((get_indexes_result)that); + return false; + } + + public boolean equals(get_indexes_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_indexes_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_indexes_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 _list1166 = iprot.readListBegin(); + struct.success = new ArrayList(_list1166.size); + Index _elem1167; + for (int _i1168 = 0; _i1168 < _list1166.size; ++_i1168) + { + _elem1167 = new Index(); + _elem1167.read(iprot); + struct.success.add(_elem1167); + } + 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 _iter1169 : struct.success) + { + _iter1169.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 _iter1170 : struct.success) + { + _iter1170.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 _list1171 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list1171.size); + Index _elem1172; + for (int _i1173 = 0; _i1173 < _list1171.size; ++_i1173) + { + _elem1172 = new Index(); + _elem1172.read(iprot); + struct.success.add(_elem1172); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_names_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_INDEXES((short)3, "max_indexes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_INDEXES + return MAX_INDEXES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_INDEXES_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_INDEXES, new org.apache.thrift.meta_data.FieldMetaData("max_indexes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); + } + + public get_index_names_args() { + this.max_indexes = (short)-1; + + } + + public get_index_names_args( + String db_name, + String tbl_name, + short max_indexes) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_index_names_args(get_index_names_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + this.max_indexes = other.max_indexes; + } + + public get_index_names_args deepCopy() { + return new get_index_names_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_indexes = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public short getMax_indexes() { + return this.max_indexes; + } + + public void setMax_indexes(short max_indexes) { + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); + } + + public void unsetMax_indexes() { + __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 EncodingUtils.testBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID); + } + + public void setMax_indexesIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAX_INDEXES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case MAX_INDEXES: + if (value == null) { + unsetMax_indexes(); + } else { + setMax_indexes((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_INDEXES: + return getMax_indexes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_INDEXES: + return isSetMax_indexes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_index_names_args) + return this.equals((get_index_names_args)that); + return false; + } + + public boolean equals(get_index_names_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_indexes = true; + boolean that_present_max_indexes = true; + if (this_present_max_indexes || that_present_max_indexes) { + if (!(this_present_max_indexes && that_present_max_indexes)) + return false; + if (this.max_indexes != that.max_indexes) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_max_indexes = true; + list.add(present_max_indexes); + if (present_max_indexes) + list.add(max_indexes); + + return list.hashCode(); + } + + @Override + public int compareTo(get_index_names_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(other.isSetMax_indexes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_indexes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, other.max_indexes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_index_names_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_indexes:"); + sb.append(this.max_indexes); + 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 { + // 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_names_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O2((short)1, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); + } + + public get_index_names_result() { + } + + public get_index_names_result( + List success, + MetaException o2) + { + this(); + this.success = success; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_index_names_result(get_index_names_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_index_names_result deepCopy() { + return new get_index_names_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_index_names_result) + return this.equals((get_index_names_result)that); + return false; + } + + public boolean equals(get_index_names_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_index_names_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_index_names_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 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 _list1174 = iprot.readListBegin(); + struct.success = new ArrayList(_list1174.size); + String _elem1175; + for (int _i1176 = 0; _i1176 < _list1174.size; ++_i1176) + { + _elem1175 = iprot.readString(); + struct.success.add(_elem1175); + } + 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 _iter1177 : struct.success) + { + oprot.writeString(_iter1177); + } + 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 _iter1178 : struct.success) + { + oprot.writeString(_iter1178); + } + } + } + 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 _list1179 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list1179.size); + String _elem1180; + for (int _i1181 = 0; _i1181 < _list1179.size; ++_i1181) + { + _elem1180 = iprot.readString(); + struct.success.add(_elem1180); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + + } + + public static class get_primary_keys_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_primary_keys_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_primary_keys_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_primary_keys_argsTupleSchemeFactory()); + } + + private PrimaryKeysRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrimaryKeysRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_primary_keys_args.class, metaDataMap); + } + + public get_primary_keys_args() { + } + + public get_primary_keys_args( + PrimaryKeysRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public get_primary_keys_args(get_primary_keys_args other) { + if (other.isSetRequest()) { + this.request = new PrimaryKeysRequest(other.request); + } + } + + public get_primary_keys_args deepCopy() { + return new get_primary_keys_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public PrimaryKeysRequest getRequest() { + return this.request; + } + + public void setRequest(PrimaryKeysRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((PrimaryKeysRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_primary_keys_args) + return this.equals((get_primary_keys_args)that); + return false; + } + + public boolean equals(get_primary_keys_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(get_primary_keys_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_primary_keys_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 get_primary_keys_argsStandardSchemeFactory implements SchemeFactory { + public get_primary_keys_argsStandardScheme getScheme() { + return new get_primary_keys_argsStandardScheme(); + } + } + + private static class get_primary_keys_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_primary_keys_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new PrimaryKeysRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_primary_keys_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_primary_keys_argsTupleSchemeFactory implements SchemeFactory { + public get_primary_keys_argsTupleScheme getScheme() { + return new get_primary_keys_argsTupleScheme(); + } + } + + private static class get_primary_keys_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_primary_keys_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_primary_keys_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new PrimaryKeysRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class get_primary_keys_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_primary_keys_result"); + + 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 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_primary_keys_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_primary_keys_resultTupleSchemeFactory()); + } + + private PrimaryKeysResponse success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrimaryKeysResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_primary_keys_result.class, metaDataMap); + } + + public get_primary_keys_result() { + } + + public get_primary_keys_result( + PrimaryKeysResponse success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_primary_keys_result(get_primary_keys_result other) { + if (other.isSetSuccess()) { + this.success = new PrimaryKeysResponse(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_primary_keys_result deepCopy() { + return new get_primary_keys_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public PrimaryKeysResponse getSuccess() { + return this.success; + } + + public void setSuccess(PrimaryKeysResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((PrimaryKeysResponse)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_primary_keys_result) + return this.equals((get_primary_keys_result)that); + return false; + } + + public boolean equals(get_primary_keys_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_primary_keys_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_primary_keys_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_primary_keys_resultStandardSchemeFactory implements SchemeFactory { + public get_primary_keys_resultStandardScheme getScheme() { + return new get_primary_keys_resultStandardScheme(); + } + } + + private static class get_primary_keys_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_primary_keys_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 PrimaryKeysResponse(); + 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_primary_keys_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_primary_keys_resultTupleSchemeFactory implements SchemeFactory { + public get_primary_keys_resultTupleScheme getScheme() { + return new get_primary_keys_resultTupleScheme(); + } + } + + private static class get_primary_keys_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_primary_keys_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_primary_keys_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new PrimaryKeysResponse(); + 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_foreign_keys_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_foreign_keys_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_foreign_keys_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_foreign_keys_argsTupleSchemeFactory()); + } + + private ForeignKeysRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ForeignKeysRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_foreign_keys_args.class, metaDataMap); + } + + public get_foreign_keys_args() { + } + + public get_foreign_keys_args( + ForeignKeysRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public get_foreign_keys_args(get_foreign_keys_args other) { + if (other.isSetRequest()) { + this.request = new ForeignKeysRequest(other.request); + } + } + + public get_foreign_keys_args deepCopy() { + return new get_foreign_keys_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public ForeignKeysRequest getRequest() { + return this.request; + } + + public void setRequest(ForeignKeysRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((ForeignKeysRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_foreign_keys_args) + return this.equals((get_foreign_keys_args)that); + return false; + } + + public boolean equals(get_foreign_keys_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(get_foreign_keys_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_foreign_keys_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 get_foreign_keys_argsStandardSchemeFactory implements SchemeFactory { + public get_foreign_keys_argsStandardScheme getScheme() { + return new get_foreign_keys_argsStandardScheme(); + } + } + + private static class get_foreign_keys_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_foreign_keys_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new ForeignKeysRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_foreign_keys_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_foreign_keys_argsTupleSchemeFactory implements SchemeFactory { + public get_foreign_keys_argsTupleScheme getScheme() { + return new get_foreign_keys_argsTupleScheme(); + } + } + + private static class get_foreign_keys_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_foreign_keys_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_foreign_keys_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new ForeignKeysRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class get_foreign_keys_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_foreign_keys_result"); + + 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 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_foreign_keys_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_foreign_keys_resultTupleSchemeFactory()); + } + + private ForeignKeysResponse success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ForeignKeysResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_foreign_keys_result.class, metaDataMap); + } + + public get_foreign_keys_result() { + } + + public get_foreign_keys_result( + ForeignKeysResponse success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_foreign_keys_result(get_foreign_keys_result other) { + if (other.isSetSuccess()) { + this.success = new ForeignKeysResponse(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_foreign_keys_result deepCopy() { + return new get_foreign_keys_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public ForeignKeysResponse getSuccess() { + return this.success; + } + + public void setSuccess(ForeignKeysResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((ForeignKeysResponse)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_foreign_keys_result) + return this.equals((get_foreign_keys_result)that); + return false; + } + + public boolean equals(get_foreign_keys_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_foreign_keys_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_foreign_keys_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_foreign_keys_resultStandardSchemeFactory implements SchemeFactory { + public get_foreign_keys_resultStandardScheme getScheme() { + return new get_foreign_keys_resultStandardScheme(); + } + } + + private static class get_foreign_keys_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_foreign_keys_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 ForeignKeysResponse(); + 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_foreign_keys_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_foreign_keys_resultTupleSchemeFactory implements SchemeFactory { + public get_foreign_keys_resultTupleScheme getScheme() { + return new get_foreign_keys_resultTupleScheme(); + } + } + + private static class get_foreign_keys_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_foreign_keys_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_foreign_keys_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new ForeignKeysResponse(); + 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_unique_constraints_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_unique_constraints_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_unique_constraints_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_unique_constraints_argsTupleSchemeFactory()); + } + + private UniqueConstraintsRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UniqueConstraintsRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_unique_constraints_args.class, metaDataMap); + } + + public get_unique_constraints_args() { + } + + public get_unique_constraints_args( + UniqueConstraintsRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public get_unique_constraints_args(get_unique_constraints_args other) { + if (other.isSetRequest()) { + this.request = new UniqueConstraintsRequest(other.request); + } + } + + public get_unique_constraints_args deepCopy() { + return new get_unique_constraints_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public UniqueConstraintsRequest getRequest() { + return this.request; + } + + public void setRequest(UniqueConstraintsRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((UniqueConstraintsRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_unique_constraints_args) + return this.equals((get_unique_constraints_args)that); + return false; + } + + public boolean equals(get_unique_constraints_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(get_unique_constraints_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_unique_constraints_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 get_unique_constraints_argsStandardSchemeFactory implements SchemeFactory { + public get_unique_constraints_argsStandardScheme getScheme() { + return new get_unique_constraints_argsStandardScheme(); + } + } + + private static class get_unique_constraints_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_unique_constraints_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new UniqueConstraintsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_unique_constraints_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_unique_constraints_argsTupleSchemeFactory implements SchemeFactory { + public get_unique_constraints_argsTupleScheme getScheme() { + return new get_unique_constraints_argsTupleScheme(); + } + } + + private static class get_unique_constraints_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_unique_constraints_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_unique_constraints_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new UniqueConstraintsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class get_unique_constraints_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_unique_constraints_result"); + + 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 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_unique_constraints_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_unique_constraints_resultTupleSchemeFactory()); + } + + private UniqueConstraintsResponse success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UniqueConstraintsResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_unique_constraints_result.class, metaDataMap); + } + + public get_unique_constraints_result() { + } + + public get_unique_constraints_result( + UniqueConstraintsResponse success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_unique_constraints_result(get_unique_constraints_result other) { + if (other.isSetSuccess()) { + this.success = new UniqueConstraintsResponse(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_unique_constraints_result deepCopy() { + return new get_unique_constraints_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public UniqueConstraintsResponse getSuccess() { + return this.success; + } + + public void setSuccess(UniqueConstraintsResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((UniqueConstraintsResponse)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_unique_constraints_result) + return this.equals((get_unique_constraints_result)that); + return false; + } + + public boolean equals(get_unique_constraints_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_unique_constraints_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_unique_constraints_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_unique_constraints_resultStandardSchemeFactory implements SchemeFactory { + public get_unique_constraints_resultStandardScheme getScheme() { + return new get_unique_constraints_resultStandardScheme(); + } + } + + private static class get_unique_constraints_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_unique_constraints_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 UniqueConstraintsResponse(); + 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_unique_constraints_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_unique_constraints_resultTupleSchemeFactory implements SchemeFactory { + public get_unique_constraints_resultTupleScheme getScheme() { + return new get_unique_constraints_resultTupleScheme(); + } + } + + private static class get_unique_constraints_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_unique_constraints_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_unique_constraints_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new UniqueConstraintsResponse(); + 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_not_null_constraints_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_not_null_constraints_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_not_null_constraints_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_not_null_constraints_argsTupleSchemeFactory()); + } + + private NotNullConstraintsRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NotNullConstraintsRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_not_null_constraints_args.class, metaDataMap); + } + + public get_not_null_constraints_args() { + } + + public get_not_null_constraints_args( + NotNullConstraintsRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public get_not_null_constraints_args(get_not_null_constraints_args other) { + if (other.isSetRequest()) { + this.request = new NotNullConstraintsRequest(other.request); + } + } + + public get_not_null_constraints_args deepCopy() { + return new get_not_null_constraints_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public NotNullConstraintsRequest getRequest() { + return this.request; + } + + public void setRequest(NotNullConstraintsRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((NotNullConstraintsRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_not_null_constraints_args) + return this.equals((get_not_null_constraints_args)that); + return false; + } + + public boolean equals(get_not_null_constraints_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(get_not_null_constraints_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_not_null_constraints_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 get_not_null_constraints_argsStandardSchemeFactory implements SchemeFactory { + public get_not_null_constraints_argsStandardScheme getScheme() { + return new get_not_null_constraints_argsStandardScheme(); + } + } + + private static class get_not_null_constraints_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_not_null_constraints_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new NotNullConstraintsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_not_null_constraints_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_not_null_constraints_argsTupleSchemeFactory implements SchemeFactory { + public get_not_null_constraints_argsTupleScheme getScheme() { + return new get_not_null_constraints_argsTupleScheme(); + } + } + + private static class get_not_null_constraints_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_not_null_constraints_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_not_null_constraints_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new NotNullConstraintsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class get_not_null_constraints_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_not_null_constraints_result"); + + 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 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_not_null_constraints_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_not_null_constraints_resultTupleSchemeFactory()); + } + + private NotNullConstraintsResponse success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NotNullConstraintsResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_not_null_constraints_result.class, metaDataMap); + } + + public get_not_null_constraints_result() { + } + + public get_not_null_constraints_result( + NotNullConstraintsResponse success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_not_null_constraints_result(get_not_null_constraints_result other) { + if (other.isSetSuccess()) { + this.success = new NotNullConstraintsResponse(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_not_null_constraints_result deepCopy() { + return new get_not_null_constraints_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public NotNullConstraintsResponse getSuccess() { + return this.success; + } + + public void setSuccess(NotNullConstraintsResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((NotNullConstraintsResponse)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_not_null_constraints_result) + return this.equals((get_not_null_constraints_result)that); + return false; + } + + public boolean equals(get_not_null_constraints_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_not_null_constraints_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_not_null_constraints_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_not_null_constraints_resultStandardSchemeFactory implements SchemeFactory { + public get_not_null_constraints_resultStandardScheme getScheme() { + return new get_not_null_constraints_resultStandardScheme(); + } + } + + private static class get_not_null_constraints_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_not_null_constraints_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 NotNullConstraintsResponse(); + 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_not_null_constraints_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_not_null_constraints_resultTupleSchemeFactory implements SchemeFactory { + public get_not_null_constraints_resultTupleScheme getScheme() { + return new get_not_null_constraints_resultTupleScheme(); + } + } + + private static class get_not_null_constraints_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_not_null_constraints_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_not_null_constraints_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new NotNullConstraintsResponse(); + 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 update_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_table_column_statistics_args"); + + private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("stats_obj", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new update_table_column_statistics_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new update_table_column_statistics_argsTupleSchemeFactory()); + } + + private ColumnStatistics stats_obj; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATS_OBJ((short)1, "stats_obj"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATS_OBJ + return STATS_OBJ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("stats_obj", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_table_column_statistics_args.class, metaDataMap); + } + + public update_table_column_statistics_args() { + } + + public update_table_column_statistics_args( + ColumnStatistics stats_obj) + { + this(); + this.stats_obj = stats_obj; + } + + /** + * Performs a deep copy on other. + */ + public update_table_column_statistics_args(update_table_column_statistics_args other) { + if (other.isSetStats_obj()) { + this.stats_obj = new ColumnStatistics(other.stats_obj); + } + } + + public update_table_column_statistics_args deepCopy() { + return new update_table_column_statistics_args(this); + } + + @Override + public void clear() { + this.stats_obj = null; + } + + public ColumnStatistics getStats_obj() { + return this.stats_obj; + } + + public void setStats_obj(ColumnStatistics stats_obj) { + this.stats_obj = stats_obj; + } + + public void unsetStats_obj() { + this.stats_obj = null; + } + + /** Returns true if field stats_obj is set (has been assigned a value) and false otherwise */ + public boolean isSetStats_obj() { + return this.stats_obj != null; + } + + public void setStats_objIsSet(boolean value) { + if (!value) { + this.stats_obj = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STATS_OBJ: + if (value == null) { + unsetStats_obj(); + } else { + setStats_obj((ColumnStatistics)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case STATS_OBJ: + return getStats_obj(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case STATS_OBJ: + return isSetStats_obj(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof update_table_column_statistics_args) + return this.equals((update_table_column_statistics_args)that); + return false; + } + + public boolean equals(update_table_column_statistics_args that) { + if (that == null) + return false; + + boolean this_present_stats_obj = true && this.isSetStats_obj(); + boolean that_present_stats_obj = true && that.isSetStats_obj(); + if (this_present_stats_obj || that_present_stats_obj) { + if (!(this_present_stats_obj && that_present_stats_obj)) + return false; + if (!this.stats_obj.equals(that.stats_obj)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_stats_obj = true && (isSetStats_obj()); + list.add(present_stats_obj); + if (present_stats_obj) + list.add(stats_obj); + + return list.hashCode(); + } + + @Override + public int compareTo(update_table_column_statistics_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetStats_obj()).compareTo(other.isSetStats_obj()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStats_obj()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stats_obj, other.stats_obj); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("update_table_column_statistics_args("); + boolean first = true; + + sb.append("stats_obj:"); + if (this.stats_obj == null) { + sb.append("null"); + } else { + sb.append(this.stats_obj); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (stats_obj != null) { + stats_obj.validate(); + } + } + + 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 update_table_column_statistics_argsStandardSchemeFactory implements SchemeFactory { + public update_table_column_statistics_argsStandardScheme getScheme() { + return new update_table_column_statistics_argsStandardScheme(); + } + } + + private static class update_table_column_statistics_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, update_table_column_statistics_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: // STATS_OBJ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.stats_obj = new ColumnStatistics(); + struct.stats_obj.read(iprot); + struct.setStats_objIsSet(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, update_table_column_statistics_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.stats_obj != null) { + oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); + struct.stats_obj.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class update_table_column_statistics_argsTupleSchemeFactory implements SchemeFactory { + public update_table_column_statistics_argsTupleScheme getScheme() { + return new update_table_column_statistics_argsTupleScheme(); + } + } + + private static class update_table_column_statistics_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetStats_obj()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetStats_obj()) { + struct.stats_obj.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.stats_obj = new ColumnStatistics(); + struct.stats_obj.read(iprot); + struct.setStats_objIsSet(true); + } + } + } + + } + + public static class update_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_table_column_statistics_result"); + + 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 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 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 update_table_column_statistics_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new update_table_column_statistics_resultTupleSchemeFactory()); + } + + private boolean success; // required + private NoSuchObjectException o1; // required + private InvalidObjectException o2; // required + private MetaException o3; // required + private InvalidInputException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_table_column_statistics_result.class, metaDataMap); + } + + public update_table_column_statistics_result() { + } + + public update_table_column_statistics_result( + boolean success, + NoSuchObjectException o1, + InvalidObjectException o2, + MetaException o3, + InvalidInputException o4) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public update_table_column_statistics_result(update_table_column_statistics_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidInputException(other.o4); + } + } + + public update_table_column_statistics_result deepCopy() { + return new update_table_column_statistics_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidInputException getO4() { + return this.o4; + } + + public void setO4(InvalidInputException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidInputException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof update_table_column_statistics_result) + return this.equals((update_table_column_statistics_result)that); + return false; + } + + public boolean equals(update_table_column_statistics_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(update_table_column_statistics_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("update_table_column_statistics_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + 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 { + // 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 update_table_column_statistics_resultStandardSchemeFactory implements SchemeFactory { + public update_table_column_statistics_resultStandardScheme getScheme() { + return new update_table_column_statistics_resultStandardScheme(); + } + } + + private static class update_table_column_statistics_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, update_table_column_statistics_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 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 InvalidInputException(); + 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, update_table_column_statistics_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class update_table_column_statistics_resultTupleSchemeFactory implements SchemeFactory { + public update_table_column_statistics_resultTupleScheme getScheme() { + return new update_table_column_statistics_resultTupleScheme(); + } + } + + private static class update_table_column_statistics_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_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); + } + oprot.writeBitSet(optionals, 5); + 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); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, update_table_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + 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 InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + + } + + public static class update_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_partition_column_statistics_args"); + + private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("stats_obj", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new update_partition_column_statistics_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new update_partition_column_statistics_argsTupleSchemeFactory()); + } + + private ColumnStatistics stats_obj; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATS_OBJ((short)1, "stats_obj"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATS_OBJ + return STATS_OBJ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("stats_obj", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_partition_column_statistics_args.class, metaDataMap); + } + + public update_partition_column_statistics_args() { + } + + public update_partition_column_statistics_args( + ColumnStatistics stats_obj) + { + this(); + this.stats_obj = stats_obj; + } + + /** + * Performs a deep copy on other. + */ + public update_partition_column_statistics_args(update_partition_column_statistics_args other) { + if (other.isSetStats_obj()) { + this.stats_obj = new ColumnStatistics(other.stats_obj); + } + } + + public update_partition_column_statistics_args deepCopy() { + return new update_partition_column_statistics_args(this); + } + + @Override + public void clear() { + this.stats_obj = null; + } + + public ColumnStatistics getStats_obj() { + return this.stats_obj; + } + + public void setStats_obj(ColumnStatistics stats_obj) { + this.stats_obj = stats_obj; + } + + public void unsetStats_obj() { + this.stats_obj = null; + } + + /** Returns true if field stats_obj is set (has been assigned a value) and false otherwise */ + public boolean isSetStats_obj() { + return this.stats_obj != null; + } + + public void setStats_objIsSet(boolean value) { + if (!value) { + this.stats_obj = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STATS_OBJ: + if (value == null) { + unsetStats_obj(); + } else { + setStats_obj((ColumnStatistics)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case STATS_OBJ: + return getStats_obj(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case STATS_OBJ: + return isSetStats_obj(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof update_partition_column_statistics_args) + return this.equals((update_partition_column_statistics_args)that); + return false; + } + + public boolean equals(update_partition_column_statistics_args that) { + if (that == null) + return false; + + boolean this_present_stats_obj = true && this.isSetStats_obj(); + boolean that_present_stats_obj = true && that.isSetStats_obj(); + if (this_present_stats_obj || that_present_stats_obj) { + if (!(this_present_stats_obj && that_present_stats_obj)) + return false; + if (!this.stats_obj.equals(that.stats_obj)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_stats_obj = true && (isSetStats_obj()); + list.add(present_stats_obj); + if (present_stats_obj) + list.add(stats_obj); + + return list.hashCode(); + } + + @Override + public int compareTo(update_partition_column_statistics_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetStats_obj()).compareTo(other.isSetStats_obj()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStats_obj()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stats_obj, other.stats_obj); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("update_partition_column_statistics_args("); + boolean first = true; + + sb.append("stats_obj:"); + if (this.stats_obj == null) { + sb.append("null"); + } else { + sb.append(this.stats_obj); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (stats_obj != null) { + stats_obj.validate(); + } + } + + 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 update_partition_column_statistics_argsStandardSchemeFactory implements SchemeFactory { + public update_partition_column_statistics_argsStandardScheme getScheme() { + return new update_partition_column_statistics_argsStandardScheme(); + } + } + + private static class update_partition_column_statistics_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, update_partition_column_statistics_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: // STATS_OBJ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.stats_obj = new ColumnStatistics(); + struct.stats_obj.read(iprot); + struct.setStats_objIsSet(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, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.stats_obj != null) { + oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); + struct.stats_obj.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class update_partition_column_statistics_argsTupleSchemeFactory implements SchemeFactory { + public update_partition_column_statistics_argsTupleScheme getScheme() { + return new update_partition_column_statistics_argsTupleScheme(); + } + } + + private static class update_partition_column_statistics_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetStats_obj()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetStats_obj()) { + struct.stats_obj.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.stats_obj = new ColumnStatistics(); + struct.stats_obj.read(iprot); + struct.setStats_objIsSet(true); + } + } + } + + } + + public static class update_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_partition_column_statistics_result"); + + 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 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 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 update_partition_column_statistics_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new update_partition_column_statistics_resultTupleSchemeFactory()); + } + + private boolean success; // required + private NoSuchObjectException o1; // required + private InvalidObjectException o2; // required + private MetaException o3; // required + private InvalidInputException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_partition_column_statistics_result.class, metaDataMap); + } + + public update_partition_column_statistics_result() { + } + + public update_partition_column_statistics_result( + boolean success, + NoSuchObjectException o1, + InvalidObjectException o2, + MetaException o3, + InvalidInputException o4) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public update_partition_column_statistics_result(update_partition_column_statistics_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidInputException(other.o4); + } + } + + public update_partition_column_statistics_result deepCopy() { + return new update_partition_column_statistics_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidInputException getO4() { + return this.o4; + } + + public void setO4(InvalidInputException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidInputException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof update_partition_column_statistics_result) + return this.equals((update_partition_column_statistics_result)that); + return false; + } + + public boolean equals(update_partition_column_statistics_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(update_partition_column_statistics_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("update_partition_column_statistics_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + 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 { + // 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 update_partition_column_statistics_resultStandardSchemeFactory implements SchemeFactory { + public update_partition_column_statistics_resultStandardScheme getScheme() { + return new update_partition_column_statistics_resultStandardScheme(); + } + } + + private static class update_partition_column_statistics_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, update_partition_column_statistics_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 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 InvalidInputException(); + 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, update_partition_column_statistics_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class update_partition_column_statistics_resultTupleSchemeFactory implements SchemeFactory { + public update_partition_column_statistics_resultTupleScheme getScheme() { + return new update_partition_column_statistics_resultTupleScheme(); + } + } + + private static class update_partition_column_statistics_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_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); + } + oprot.writeBitSet(optionals, 5); + 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); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, update_partition_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + 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 InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + + } + + public static class get_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_column_statistics_args"); + + 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 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 COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_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_table_column_statistics_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_column_statistics_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + private String col_name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + COL_NAME((short)3, "col_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // COL_NAME + return COL_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_column_statistics_args.class, metaDataMap); + } + + public get_table_column_statistics_args() { + } + + public get_table_column_statistics_args( + String db_name, + String tbl_name, + String col_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.col_name = col_name; + } + + /** + * Performs a deep copy on other. + */ + public get_table_column_statistics_args(get_table_column_statistics_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetCol_name()) { + this.col_name = other.col_name; + } + } + + public get_table_column_statistics_args deepCopy() { + return new get_table_column_statistics_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.col_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getCol_name() { + return this.col_name; + } + + public void setCol_name(String col_name) { + this.col_name = col_name; + } + + public void unsetCol_name() { + this.col_name = null; + } + + /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ + public boolean isSetCol_name() { + return this.col_name != null; + } + + public void setCol_nameIsSet(boolean value) { + if (!value) { + this.col_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case COL_NAME: + if (value == null) { + unsetCol_name(); + } else { + setCol_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case COL_NAME: + return getCol_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case COL_NAME: + return isSetCol_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_column_statistics_args) + return this.equals((get_table_column_statistics_args)that); + return false; + } + + public boolean equals(get_table_column_statistics_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_col_name = true && this.isSetCol_name(); + boolean that_present_col_name = true && that.isSetCol_name(); + if (this_present_col_name || that_present_col_name) { + if (!(this_present_col_name && that_present_col_name)) + return false; + if (!this.col_name.equals(that.col_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_col_name = true && (isSetCol_name()); + list.add(present_col_name); + if (present_col_name) + list.add(col_name); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_column_statistics_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(other.isSetCol_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCol_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.col_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_column_statistics_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("col_name:"); + if (this.col_name == null) { + sb.append("null"); + } else { + sb.append(this.col_name); + } + 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 get_table_column_statistics_argsStandardSchemeFactory implements SchemeFactory { + public get_table_column_statistics_argsStandardScheme getScheme() { + return new get_table_column_statistics_argsStandardScheme(); + } + } + + private static class get_table_column_statistics_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_column_statistics_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: // COL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.col_name = iprot.readString(); + struct.setCol_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_column_statistics_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.col_name != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(struct.col_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_column_statistics_argsTupleSchemeFactory implements SchemeFactory { + public get_table_column_statistics_argsTupleScheme getScheme() { + return new get_table_column_statistics_argsTupleScheme(); + } + } + + private static class get_table_column_statistics_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_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.isSetCol_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.isSetCol_name()) { + oprot.writeString(struct.col_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_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.col_name = iprot.readString(); + struct.setCol_nameIsSet(true); + } + } + } + + } + + public static class get_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_column_statistics_result"); + + 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 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 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 get_table_column_statistics_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_column_statistics_resultTupleSchemeFactory()); + } + + private ColumnStatistics success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + private InvalidInputException o3; // required + private InvalidObjectException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_column_statistics_result.class, metaDataMap); + } + + public get_table_column_statistics_result() { + } + + public get_table_column_statistics_result( + ColumnStatistics success, + NoSuchObjectException o1, + MetaException o2, + InvalidInputException o3, + InvalidObjectException o4) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public get_table_column_statistics_result(get_table_column_statistics_result other) { + if (other.isSetSuccess()) { + this.success = new ColumnStatistics(other.success); + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new InvalidInputException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidObjectException(other.o4); + } + } + + public get_table_column_statistics_result deepCopy() { + return new get_table_column_statistics_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public ColumnStatistics getSuccess() { + return this.success; + } + + public void setSuccess(ColumnStatistics success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public InvalidInputException getO3() { + return this.o3; + } + + public void setO3(InvalidInputException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidObjectException getO4() { + return this.o4; + } + + public void setO4(InvalidObjectException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((ColumnStatistics)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((InvalidInputException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_column_statistics_result) + return this.equals((get_table_column_statistics_result)that); + return false; + } + + public boolean equals(get_table_column_statistics_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_column_statistics_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_column_statistics_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_table_column_statistics_resultStandardSchemeFactory implements SchemeFactory { + public get_table_column_statistics_resultStandardScheme getScheme() { + return new get_table_column_statistics_resultStandardScheme(); + } + } + + private static class get_table_column_statistics_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_column_statistics_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 ColumnStatistics(); + 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; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new InvalidInputException(); + 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 InvalidObjectException(); + 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, get_table_column_statistics_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(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_column_statistics_resultTupleSchemeFactory implements SchemeFactory { + public get_table_column_statistics_resultTupleScheme getScheme() { + return new get_table_column_statistics_resultTupleScheme(); + } + } + + private static class get_table_column_statistics_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_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); + } + oprot.writeBitSet(optionals, 5); + 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); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.success = new ColumnStatistics(); + 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); + } + if (incoming.get(3)) { + struct.o3 = new InvalidInputException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + + } + + public static class get_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_column_statistics_args"); + + 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 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 org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partition_column_statistics_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_column_statistics_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + private String part_name; // required + private String col_name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_name"), + COL_NAME((short)4, "col_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; + case 4: // COL_NAME + return COL_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_column_statistics_args.class, metaDataMap); + } + + public get_partition_column_statistics_args() { + } + + public get_partition_column_statistics_args( + String db_name, + String tbl_name, + String part_name, + String col_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.col_name = col_name; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_column_statistics_args(get_partition_column_statistics_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + if (other.isSetCol_name()) { + this.col_name = other.col_name; + } + } + + public get_partition_column_statistics_args deepCopy() { + return new get_partition_column_statistics_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + this.col_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public String getCol_name() { + return this.col_name; + } + + public void setCol_name(String col_name) { + this.col_name = col_name; + } + + public void unsetCol_name() { + this.col_name = null; + } + + /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ + public boolean isSetCol_name() { + return this.col_name != null; + } + + public void setCol_nameIsSet(boolean value) { + if (!value) { + this.col_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + case COL_NAME: + if (value == null) { + unsetCol_name(); + } else { + setCol_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + case COL_NAME: + return getCol_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + case COL_NAME: + return isSetCol_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_column_statistics_args) + return this.equals((get_partition_column_statistics_args)that); + return false; + } + + public boolean equals(get_partition_column_statistics_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_col_name = true && this.isSetCol_name(); + boolean that_present_col_name = true && that.isSetCol_name(); + if (this_present_col_name || that_present_col_name) { + if (!(this_present_col_name && that_present_col_name)) + return false; + if (!this.col_name.equals(that.col_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_name = true && (isSetPart_name()); + list.add(present_part_name); + if (present_part_name) + list.add(part_name); + + boolean present_col_name = true && (isSetCol_name()); + list.add(present_col_name); + if (present_col_name) + list.add(col_name); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partition_column_statistics_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(other.isSetCol_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCol_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.col_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partition_column_statistics_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("col_name:"); + if (this.col_name == null) { + sb.append("null"); + } else { + sb.append(this.col_name); + } + 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 get_partition_column_statistics_argsStandardSchemeFactory implements SchemeFactory { + public get_partition_column_statistics_argsStandardScheme getScheme() { + return new get_partition_column_statistics_argsStandardScheme(); + } + } + + private static class get_partition_column_statistics_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_column_statistics_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: // COL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.col_name = iprot.readString(); + struct.setCol_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_column_statistics_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(); + } + if (struct.col_name != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(struct.col_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_column_statistics_argsTupleSchemeFactory implements SchemeFactory { + public get_partition_column_statistics_argsTupleScheme getScheme() { + return new get_partition_column_statistics_argsTupleScheme(); + } + } + + private static class get_partition_column_statistics_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_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.isSetCol_name()) { + 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.isSetCol_name()) { + oprot.writeString(struct.col_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_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.col_name = iprot.readString(); + struct.setCol_nameIsSet(true); + } + } + } + + } + + public static class get_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_column_statistics_result"); + + 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 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 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 get_partition_column_statistics_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partition_column_statistics_resultTupleSchemeFactory()); + } + + private ColumnStatistics success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + private InvalidInputException o3; // required + private InvalidObjectException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_column_statistics_result.class, metaDataMap); + } + + public get_partition_column_statistics_result() { + } + + public get_partition_column_statistics_result( + ColumnStatistics success, + NoSuchObjectException o1, + MetaException o2, + InvalidInputException o3, + InvalidObjectException o4) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_column_statistics_result(get_partition_column_statistics_result other) { + if (other.isSetSuccess()) { + this.success = new ColumnStatistics(other.success); + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new InvalidInputException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidObjectException(other.o4); + } + } + + public get_partition_column_statistics_result deepCopy() { + return new get_partition_column_statistics_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public ColumnStatistics getSuccess() { + return this.success; + } + + public void setSuccess(ColumnStatistics success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public InvalidInputException getO3() { + return this.o3; + } + + public void setO3(InvalidInputException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidObjectException getO4() { + return this.o4; + } + + public void setO4(InvalidObjectException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((ColumnStatistics)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((InvalidInputException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_column_statistics_result) + return this.equals((get_partition_column_statistics_result)that); + return false; + } + + public boolean equals(get_partition_column_statistics_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partition_column_statistics_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partition_column_statistics_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_partition_column_statistics_resultStandardSchemeFactory implements SchemeFactory { + public get_partition_column_statistics_resultStandardScheme getScheme() { + return new get_partition_column_statistics_resultStandardScheme(); + } + } + + private static class get_partition_column_statistics_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partition_column_statistics_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 ColumnStatistics(); + 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; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new InvalidInputException(); + 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 InvalidObjectException(); + 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, get_partition_column_statistics_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(); + } + if (struct.o4 != null) { + oprot.writeFieldBegin(O4_FIELD_DESC); + struct.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partition_column_statistics_resultTupleSchemeFactory implements SchemeFactory { + public get_partition_column_statistics_resultTupleScheme getScheme() { + return new get_partition_column_statistics_resultTupleScheme(); + } + } + + private static class get_partition_column_statistics_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_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); + } + oprot.writeBitSet(optionals, 5); + 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); + } + if (struct.isSetO4()) { + struct.o4.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partition_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.success = new ColumnStatistics(); + 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); + } + if (incoming.get(3)) { + struct.o3 = new InvalidInputException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidObjectException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + + } + + public static class get_table_statistics_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_statistics_req_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_table_statistics_req_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_statistics_req_argsTupleSchemeFactory()); + } + + private TableStatsRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TableStatsRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_statistics_req_args.class, metaDataMap); + } + + public get_table_statistics_req_args() { + } + + public get_table_statistics_req_args( + TableStatsRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public get_table_statistics_req_args(get_table_statistics_req_args other) { + if (other.isSetRequest()) { + this.request = new TableStatsRequest(other.request); + } + } + + public get_table_statistics_req_args deepCopy() { + return new get_table_statistics_req_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public TableStatsRequest getRequest() { + return this.request; + } + + public void setRequest(TableStatsRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((TableStatsRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_statistics_req_args) + return this.equals((get_table_statistics_req_args)that); + return false; + } + + public boolean equals(get_table_statistics_req_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_statistics_req_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_statistics_req_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 get_table_statistics_req_argsStandardSchemeFactory implements SchemeFactory { + public get_table_statistics_req_argsStandardScheme getScheme() { + return new get_table_statistics_req_argsStandardScheme(); + } + } + + private static class get_table_statistics_req_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_statistics_req_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new TableStatsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_statistics_req_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_table_statistics_req_argsTupleSchemeFactory implements SchemeFactory { + public get_table_statistics_req_argsTupleScheme getScheme() { + return new get_table_statistics_req_argsTupleScheme(); + } + } + + private static class get_table_statistics_req_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_statistics_req_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_table_statistics_req_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new TableStatsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class get_table_statistics_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_statistics_req_result"); + + 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 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_statistics_req_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_table_statistics_req_resultTupleSchemeFactory()); + } + + private TableStatsResult success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TableStatsResult.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_statistics_req_result.class, metaDataMap); + } + + public get_table_statistics_req_result() { + } + + public get_table_statistics_req_result( + TableStatsResult success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_table_statistics_req_result(get_table_statistics_req_result other) { + if (other.isSetSuccess()) { + this.success = new TableStatsResult(other.success); + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_table_statistics_req_result deepCopy() { + return new get_table_statistics_req_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public TableStatsResult getSuccess() { + return this.success; + } + + public void setSuccess(TableStatsResult success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TableStatsResult)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_statistics_req_result) + return this.equals((get_table_statistics_req_result)that); + return false; + } + + public boolean equals(get_table_statistics_req_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_table_statistics_req_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_table_statistics_req_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_table_statistics_req_resultStandardSchemeFactory implements SchemeFactory { + public get_table_statistics_req_resultStandardScheme getScheme() { + return new get_table_statistics_req_resultStandardScheme(); + } + } + + private static class get_table_statistics_req_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_table_statistics_req_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 TableStatsResult(); + 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_table_statistics_req_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_statistics_req_resultTupleSchemeFactory implements SchemeFactory { + public get_table_statistics_req_resultTupleScheme getScheme() { + return new get_table_statistics_req_resultTupleScheme(); + } + } + + private static class get_table_statistics_req_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_table_statistics_req_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_statistics_req_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new TableStatsResult(); + 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 get_partitions_statistics_req_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_statistics_req_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_partitions_statistics_req_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_statistics_req_argsTupleSchemeFactory()); + } + + private PartitionsStatsRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsStatsRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_statistics_req_args.class, metaDataMap); + } + + public get_partitions_statistics_req_args() { + } + + public get_partitions_statistics_req_args( + PartitionsStatsRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_statistics_req_args(get_partitions_statistics_req_args other) { + if (other.isSetRequest()) { + this.request = new PartitionsStatsRequest(other.request); + } + } + + public get_partitions_statistics_req_args deepCopy() { + return new get_partitions_statistics_req_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public PartitionsStatsRequest getRequest() { + return this.request; + } + + public void setRequest(PartitionsStatsRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((PartitionsStatsRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_statistics_req_args) + return this.equals((get_partitions_statistics_req_args)that); + return false; + } + + public boolean equals(get_partitions_statistics_req_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_statistics_req_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_statistics_req_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 get_partitions_statistics_req_argsStandardSchemeFactory implements SchemeFactory { + public get_partitions_statistics_req_argsStandardScheme getScheme() { + return new get_partitions_statistics_req_argsStandardScheme(); + } + } + + private static class get_partitions_statistics_req_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_statistics_req_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new PartitionsStatsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_statistics_req_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_partitions_statistics_req_argsTupleSchemeFactory implements SchemeFactory { + public get_partitions_statistics_req_argsTupleScheme getScheme() { + return new get_partitions_statistics_req_argsTupleScheme(); + } + } + + private static class get_partitions_statistics_req_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_statistics_req_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_partitions_statistics_req_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new PartitionsStatsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class get_partitions_statistics_req_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partitions_statistics_req_result"); + + 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 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_statistics_req_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_partitions_statistics_req_resultTupleSchemeFactory()); + } + + private PartitionsStatsResult success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsStatsResult.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partitions_statistics_req_result.class, metaDataMap); + } + + public get_partitions_statistics_req_result() { + } + + public get_partitions_statistics_req_result( + PartitionsStatsResult success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_statistics_req_result(get_partitions_statistics_req_result other) { + if (other.isSetSuccess()) { + this.success = new PartitionsStatsResult(other.success); + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_partitions_statistics_req_result deepCopy() { + return new get_partitions_statistics_req_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public PartitionsStatsResult getSuccess() { + return this.success; + } + + public void setSuccess(PartitionsStatsResult success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((PartitionsStatsResult)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partitions_statistics_req_result) + return this.equals((get_partitions_statistics_req_result)that); + return false; + } + + public boolean equals(get_partitions_statistics_req_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_partitions_statistics_req_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_partitions_statistics_req_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_partitions_statistics_req_resultStandardSchemeFactory implements SchemeFactory { + public get_partitions_statistics_req_resultStandardScheme getScheme() { + return new get_partitions_statistics_req_resultStandardScheme(); + } + } + + private static class get_partitions_statistics_req_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_partitions_statistics_req_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 PartitionsStatsResult(); + 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_partitions_statistics_req_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_partitions_statistics_req_resultTupleSchemeFactory implements SchemeFactory { + public get_partitions_statistics_req_resultTupleScheme getScheme() { + return new get_partitions_statistics_req_resultTupleScheme(); + } + } + + private static class get_partitions_statistics_req_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_partitions_statistics_req_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_partitions_statistics_req_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new PartitionsStatsResult(); + 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 get_aggr_stats_for_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_aggr_stats_for_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_aggr_stats_for_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_aggr_stats_for_argsTupleSchemeFactory()); + } + + private PartitionsStatsRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PartitionsStatsRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_aggr_stats_for_args.class, metaDataMap); + } + + public get_aggr_stats_for_args() { + } + + public get_aggr_stats_for_args( + PartitionsStatsRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public get_aggr_stats_for_args(get_aggr_stats_for_args other) { + if (other.isSetRequest()) { + this.request = new PartitionsStatsRequest(other.request); + } + } + + public get_aggr_stats_for_args deepCopy() { + return new get_aggr_stats_for_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public PartitionsStatsRequest getRequest() { + return this.request; + } + + public void setRequest(PartitionsStatsRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((PartitionsStatsRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_aggr_stats_for_args) + return this.equals((get_aggr_stats_for_args)that); + return false; + } + + public boolean equals(get_aggr_stats_for_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(get_aggr_stats_for_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_aggr_stats_for_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 get_aggr_stats_for_argsStandardSchemeFactory implements SchemeFactory { + public get_aggr_stats_for_argsStandardScheme getScheme() { + return new get_aggr_stats_for_argsStandardScheme(); + } + } + + private static class get_aggr_stats_for_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_aggr_stats_for_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new PartitionsStatsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_aggr_stats_for_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_aggr_stats_for_argsTupleSchemeFactory implements SchemeFactory { + public get_aggr_stats_for_argsTupleScheme getScheme() { + return new get_aggr_stats_for_argsTupleScheme(); + } + } + + private static class get_aggr_stats_for_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_aggr_stats_for_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_aggr_stats_for_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new PartitionsStatsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class get_aggr_stats_for_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_aggr_stats_for_result"); + + 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 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_aggr_stats_for_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_aggr_stats_for_resultTupleSchemeFactory()); + } + + private AggrStats success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AggrStats.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_aggr_stats_for_result.class, metaDataMap); + } + + public get_aggr_stats_for_result() { + } + + public get_aggr_stats_for_result( + AggrStats success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_aggr_stats_for_result(get_aggr_stats_for_result other) { + if (other.isSetSuccess()) { + this.success = new AggrStats(other.success); + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_aggr_stats_for_result deepCopy() { + return new get_aggr_stats_for_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public AggrStats getSuccess() { + return this.success; + } + + public void setSuccess(AggrStats success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((AggrStats)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_aggr_stats_for_result) + return this.equals((get_aggr_stats_for_result)that); + return false; + } + + public boolean equals(get_aggr_stats_for_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_aggr_stats_for_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_aggr_stats_for_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_aggr_stats_for_resultStandardSchemeFactory implements SchemeFactory { + public get_aggr_stats_for_resultStandardScheme getScheme() { + return new get_aggr_stats_for_resultStandardScheme(); + } + } + + private static class get_aggr_stats_for_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_aggr_stats_for_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 AggrStats(); + 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_aggr_stats_for_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_aggr_stats_for_resultTupleSchemeFactory implements SchemeFactory { + public get_aggr_stats_for_resultTupleScheme getScheme() { + return new get_aggr_stats_for_resultTupleScheme(); + } + } + + private static class get_aggr_stats_for_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_aggr_stats_for_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_aggr_stats_for_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new AggrStats(); + 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 set_aggr_stats_for_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_aggr_stats_for_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new set_aggr_stats_for_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new set_aggr_stats_for_argsTupleSchemeFactory()); + } + + private SetPartitionsStatsRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SetPartitionsStatsRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_aggr_stats_for_args.class, metaDataMap); + } + + public set_aggr_stats_for_args() { + } + + public set_aggr_stats_for_args( + SetPartitionsStatsRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public set_aggr_stats_for_args(set_aggr_stats_for_args other) { + if (other.isSetRequest()) { + this.request = new SetPartitionsStatsRequest(other.request); + } + } + + public set_aggr_stats_for_args deepCopy() { + return new set_aggr_stats_for_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public SetPartitionsStatsRequest getRequest() { + return this.request; + } + + public void setRequest(SetPartitionsStatsRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((SetPartitionsStatsRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof set_aggr_stats_for_args) + return this.equals((set_aggr_stats_for_args)that); + return false; + } + + public boolean equals(set_aggr_stats_for_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(set_aggr_stats_for_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("set_aggr_stats_for_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 set_aggr_stats_for_argsStandardSchemeFactory implements SchemeFactory { + public set_aggr_stats_for_argsStandardScheme getScheme() { + return new set_aggr_stats_for_argsStandardScheme(); + } + } + + private static class set_aggr_stats_for_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, set_aggr_stats_for_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new SetPartitionsStatsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_aggr_stats_for_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class set_aggr_stats_for_argsTupleSchemeFactory implements SchemeFactory { + public set_aggr_stats_for_argsTupleScheme getScheme() { + return new set_aggr_stats_for_argsTupleScheme(); + } + } + + private static class set_aggr_stats_for_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, set_aggr_stats_for_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, set_aggr_stats_for_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new SetPartitionsStatsRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class set_aggr_stats_for_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_aggr_stats_for_result"); + + 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 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 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 set_aggr_stats_for_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new set_aggr_stats_for_resultTupleSchemeFactory()); + } + + private boolean success; // required + private NoSuchObjectException o1; // required + private InvalidObjectException o2; // required + private MetaException o3; // required + private InvalidInputException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_aggr_stats_for_result.class, metaDataMap); + } + + public set_aggr_stats_for_result() { + } + + public set_aggr_stats_for_result( + boolean success, + NoSuchObjectException o1, + InvalidObjectException o2, + MetaException o3, + InvalidInputException o4) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public set_aggr_stats_for_result(set_aggr_stats_for_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidInputException(other.o4); + } + } + + public set_aggr_stats_for_result deepCopy() { + return new set_aggr_stats_for_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidInputException getO4() { + return this.o4; + } + + public void setO4(InvalidInputException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidInputException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof set_aggr_stats_for_result) + return this.equals((set_aggr_stats_for_result)that); + return false; + } + + public boolean equals(set_aggr_stats_for_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(set_aggr_stats_for_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("set_aggr_stats_for_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + 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 { + // 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 set_aggr_stats_for_resultStandardSchemeFactory implements SchemeFactory { + public set_aggr_stats_for_resultStandardScheme getScheme() { + return new set_aggr_stats_for_resultStandardScheme(); + } + } + + private static class set_aggr_stats_for_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, set_aggr_stats_for_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 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 InvalidInputException(); + 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, set_aggr_stats_for_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class set_aggr_stats_for_resultTupleSchemeFactory implements SchemeFactory { + public set_aggr_stats_for_resultTupleScheme getScheme() { + return new set_aggr_stats_for_resultTupleScheme(); + } + } + + private static class set_aggr_stats_for_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, set_aggr_stats_for_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); + } + oprot.writeBitSet(optionals, 5); + 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); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, set_aggr_stats_for_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + 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 InvalidObjectException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new MetaException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + + } + + public static class delete_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_partition_column_statistics_args"); + + 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 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 org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new delete_partition_column_statistics_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new delete_partition_column_statistics_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + private String part_name; // required + private String col_name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_name"), + COL_NAME((short)4, "col_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; + case 4: // COL_NAME + return COL_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_partition_column_statistics_args.class, metaDataMap); + } + + public delete_partition_column_statistics_args() { + } + + public delete_partition_column_statistics_args( + String db_name, + String tbl_name, + String part_name, + String col_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.col_name = col_name; + } + + /** + * Performs a deep copy on other. + */ + public delete_partition_column_statistics_args(delete_partition_column_statistics_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + if (other.isSetCol_name()) { + this.col_name = other.col_name; + } + } + + public delete_partition_column_statistics_args deepCopy() { + return new delete_partition_column_statistics_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + this.col_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public String getCol_name() { + return this.col_name; + } + + public void setCol_name(String col_name) { + this.col_name = col_name; + } + + public void unsetCol_name() { + this.col_name = null; + } + + /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ + public boolean isSetCol_name() { + return this.col_name != null; + } + + public void setCol_nameIsSet(boolean value) { + if (!value) { + this.col_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + case COL_NAME: + if (value == null) { + unsetCol_name(); + } else { + setCol_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + case COL_NAME: + return getCol_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + case COL_NAME: + return isSetCol_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof delete_partition_column_statistics_args) + return this.equals((delete_partition_column_statistics_args)that); + return false; + } + + public boolean equals(delete_partition_column_statistics_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_col_name = true && this.isSetCol_name(); + boolean that_present_col_name = true && that.isSetCol_name(); + if (this_present_col_name || that_present_col_name) { + if (!(this_present_col_name && that_present_col_name)) + return false; + if (!this.col_name.equals(that.col_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_part_name = true && (isSetPart_name()); + list.add(present_part_name); + if (present_part_name) + list.add(part_name); + + boolean present_col_name = true && (isSetCol_name()); + list.add(present_col_name); + if (present_col_name) + list.add(col_name); + + return list.hashCode(); + } + + @Override + public int compareTo(delete_partition_column_statistics_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(other.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, other.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(other.isSetCol_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCol_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.col_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("delete_partition_column_statistics_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("col_name:"); + if (this.col_name == null) { + sb.append("null"); + } else { + sb.append(this.col_name); + } + 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 delete_partition_column_statistics_argsStandardSchemeFactory implements SchemeFactory { + public delete_partition_column_statistics_argsStandardScheme getScheme() { + return new delete_partition_column_statistics_argsStandardScheme(); + } + } + + private static class delete_partition_column_statistics_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, delete_partition_column_statistics_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: // COL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.col_name = iprot.readString(); + struct.setCol_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, delete_partition_column_statistics_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(); + } + if (struct.col_name != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(struct.col_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class delete_partition_column_statistics_argsTupleSchemeFactory implements SchemeFactory { + public delete_partition_column_statistics_argsTupleScheme getScheme() { + return new delete_partition_column_statistics_argsTupleScheme(); + } + } + + private static class delete_partition_column_statistics_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_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.isSetCol_name()) { + 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.isSetCol_name()) { + oprot.writeString(struct.col_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_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.col_name = iprot.readString(); + struct.setCol_nameIsSet(true); + } + } + } + + } + + public static class delete_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_partition_column_statistics_result"); + + 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 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 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 delete_partition_column_statistics_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new delete_partition_column_statistics_resultTupleSchemeFactory()); + } + + private boolean success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + private InvalidObjectException o3; // required + private InvalidInputException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_partition_column_statistics_result.class, metaDataMap); + } + + public delete_partition_column_statistics_result() { + } + + public delete_partition_column_statistics_result( + boolean success, + NoSuchObjectException o1, + MetaException o2, + InvalidObjectException o3, + InvalidInputException o4) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public delete_partition_column_statistics_result(delete_partition_column_statistics_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new InvalidObjectException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidInputException(other.o4); + } + } + + public delete_partition_column_statistics_result deepCopy() { + return new delete_partition_column_statistics_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public InvalidObjectException getO3() { + return this.o3; + } + + public void setO3(InvalidObjectException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidInputException getO4() { + return this.o4; + } + + public void setO4(InvalidInputException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((InvalidObjectException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidInputException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof delete_partition_column_statistics_result) + return this.equals((delete_partition_column_statistics_result)that); + return false; + } + + public boolean equals(delete_partition_column_statistics_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(delete_partition_column_statistics_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("delete_partition_column_statistics_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + 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 { + // 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 delete_partition_column_statistics_resultStandardSchemeFactory implements SchemeFactory { + public delete_partition_column_statistics_resultStandardScheme getScheme() { + return new delete_partition_column_statistics_resultStandardScheme(); + } + } + + private static class delete_partition_column_statistics_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, delete_partition_column_statistics_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; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new InvalidObjectException(); + 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 InvalidInputException(); + 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, delete_partition_column_statistics_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class delete_partition_column_statistics_resultTupleSchemeFactory implements SchemeFactory { + public delete_partition_column_statistics_resultTupleScheme getScheme() { + return new delete_partition_column_statistics_resultTupleScheme(); + } + } + + private static class delete_partition_column_statistics_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_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); + } + oprot.writeBitSet(optionals, 5); + 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); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, delete_partition_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + 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); + } + if (incoming.get(3)) { + struct.o3 = new InvalidObjectException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + + } + + public static class delete_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_table_column_statistics_args"); + + 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 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 COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new delete_table_column_statistics_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new delete_table_column_statistics_argsTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + private String col_name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + COL_NAME((short)3, "col_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // COL_NAME + return COL_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_table_column_statistics_args.class, metaDataMap); + } + + public delete_table_column_statistics_args() { + } + + public delete_table_column_statistics_args( + String db_name, + String tbl_name, + String col_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.col_name = col_name; + } + + /** + * Performs a deep copy on other. + */ + public delete_table_column_statistics_args(delete_table_column_statistics_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetCol_name()) { + this.col_name = other.col_name; + } + } + + public delete_table_column_statistics_args deepCopy() { + return new delete_table_column_statistics_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.col_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getCol_name() { + return this.col_name; + } + + public void setCol_name(String col_name) { + this.col_name = col_name; + } + + public void unsetCol_name() { + this.col_name = null; + } + + /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ + public boolean isSetCol_name() { + return this.col_name != null; + } + + public void setCol_nameIsSet(boolean value) { + if (!value) { + this.col_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case COL_NAME: + if (value == null) { + unsetCol_name(); + } else { + setCol_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case COL_NAME: + return getCol_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case COL_NAME: + return isSetCol_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof delete_table_column_statistics_args) + return this.equals((delete_table_column_statistics_args)that); + return false; + } + + public boolean equals(delete_table_column_statistics_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_col_name = true && this.isSetCol_name(); + boolean that_present_col_name = true && that.isSetCol_name(); + if (this_present_col_name || that_present_col_name) { + if (!(this_present_col_name && that_present_col_name)) + return false; + if (!this.col_name.equals(that.col_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + boolean present_col_name = true && (isSetCol_name()); + list.add(present_col_name); + if (present_col_name) + list.add(col_name); + + return list.hashCode(); + } + + @Override + public int compareTo(delete_table_column_statistics_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(other.isSetCol_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCol_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, other.col_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("delete_table_column_statistics_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("col_name:"); + if (this.col_name == null) { + sb.append("null"); + } else { + sb.append(this.col_name); + } + 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 delete_table_column_statistics_argsStandardSchemeFactory implements SchemeFactory { + public delete_table_column_statistics_argsStandardScheme getScheme() { + return new delete_table_column_statistics_argsStandardScheme(); + } + } + + private static class delete_table_column_statistics_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, delete_table_column_statistics_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: // COL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.col_name = iprot.readString(); + struct.setCol_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, delete_table_column_statistics_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.col_name != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(struct.col_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class delete_table_column_statistics_argsTupleSchemeFactory implements SchemeFactory { + public delete_table_column_statistics_argsTupleScheme getScheme() { + return new delete_table_column_statistics_argsTupleScheme(); + } + } + + private static class delete_table_column_statistics_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_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.isSetCol_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.isSetCol_name()) { + oprot.writeString(struct.col_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_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.col_name = iprot.readString(); + struct.setCol_nameIsSet(true); + } + } + } + + } + + public static class delete_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_table_column_statistics_result"); + + 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 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 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 delete_table_column_statistics_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new delete_table_column_statistics_resultTupleSchemeFactory()); + } + + private boolean success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + private InvalidObjectException o3; // required + private InvalidInputException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_table_column_statistics_result.class, metaDataMap); + } + + public delete_table_column_statistics_result() { + } + + public delete_table_column_statistics_result( + boolean success, + NoSuchObjectException o1, + MetaException o2, + InvalidObjectException o3, + InvalidInputException o4) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public delete_table_column_statistics_result(delete_table_column_statistics_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new InvalidObjectException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidInputException(other.o4); + } + } + + public delete_table_column_statistics_result deepCopy() { + return new delete_table_column_statistics_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public InvalidObjectException getO3() { + return this.o3; + } + + public void setO3(InvalidObjectException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidInputException getO4() { + return this.o4; + } + + public void setO4(InvalidInputException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((InvalidObjectException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidInputException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof delete_table_column_statistics_result) + return this.equals((delete_table_column_statistics_result)that); + return false; + } + + public boolean equals(delete_table_column_statistics_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(delete_table_column_statistics_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("delete_table_column_statistics_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + 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 { + // 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 delete_table_column_statistics_resultStandardSchemeFactory implements SchemeFactory { + public delete_table_column_statistics_resultStandardScheme getScheme() { + return new delete_table_column_statistics_resultStandardScheme(); + } + } + + private static class delete_table_column_statistics_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, delete_table_column_statistics_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; + case 3: // O3 + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.o3 = new InvalidObjectException(); + 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 InvalidInputException(); + 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, delete_table_column_statistics_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class delete_table_column_statistics_resultTupleSchemeFactory implements SchemeFactory { + public delete_table_column_statistics_resultTupleScheme getScheme() { + return new delete_table_column_statistics_resultTupleScheme(); + } + } + + private static class delete_table_column_statistics_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_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); + } + oprot.writeBitSet(optionals, 5); + 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); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, delete_table_column_statistics_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + 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); + } + if (incoming.get(3)) { + struct.o3 = new InvalidObjectException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + if (incoming.get(4)) { + struct.o4 = new InvalidInputException(); + struct.o4.read(iprot); + struct.setO4IsSet(true); + } + } + } + + } + + public static class create_function_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_function_args"); + + private static final org.apache.thrift.protocol.TField FUNC_FIELD_DESC = new org.apache.thrift.protocol.TField("func", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new create_function_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_function_argsTupleSchemeFactory()); + } + + private Function func; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + FUNC((short)1, "func"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // FUNC + return FUNC; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.FUNC, new org.apache.thrift.meta_data.FieldMetaData("func", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_function_args.class, metaDataMap); + } + + public create_function_args() { + } + + public create_function_args( + Function func) + { + this(); + this.func = func; + } + + /** + * Performs a deep copy on other. + */ + public create_function_args(create_function_args other) { + if (other.isSetFunc()) { + this.func = new Function(other.func); + } + } + + public create_function_args deepCopy() { + return new create_function_args(this); + } + + @Override + public void clear() { + this.func = null; + } + + public Function getFunc() { + return this.func; + } + + public void setFunc(Function func) { + this.func = func; + } + + public void unsetFunc() { + this.func = null; + } + + /** Returns true if field func is set (has been assigned a value) and false otherwise */ + public boolean isSetFunc() { + return this.func != null; + } + + public void setFuncIsSet(boolean value) { + if (!value) { + this.func = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FUNC: + if (value == null) { + unsetFunc(); + } else { + setFunc((Function)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FUNC: + return getFunc(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FUNC: + return isSetFunc(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_function_args) + return this.equals((create_function_args)that); + return false; + } + + public boolean equals(create_function_args that) { + if (that == null) + return false; + + boolean this_present_func = true && this.isSetFunc(); + boolean that_present_func = true && that.isSetFunc(); + if (this_present_func || that_present_func) { + if (!(this_present_func && that_present_func)) + return false; + if (!this.func.equals(that.func)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_func = true && (isSetFunc()); + list.add(present_func); + if (present_func) + list.add(func); + + return list.hashCode(); + } + + @Override + public int compareTo(create_function_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetFunc()).compareTo(other.isSetFunc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFunc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.func, other.func); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_function_args("); + boolean first = true; + + sb.append("func:"); + if (this.func == null) { + sb.append("null"); + } else { + sb.append(this.func); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (func != null) { + func.validate(); + } + } + + 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 create_function_argsStandardSchemeFactory implements SchemeFactory { + public create_function_argsStandardScheme getScheme() { + return new create_function_argsStandardScheme(); + } + } + + private static class create_function_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_function_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: // FUNC + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.func = new Function(); + struct.func.read(iprot); + struct.setFuncIsSet(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_function_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.func != null) { + oprot.writeFieldBegin(FUNC_FIELD_DESC); + struct.func.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class create_function_argsTupleSchemeFactory implements SchemeFactory { + public create_function_argsTupleScheme getScheme() { + return new create_function_argsTupleScheme(); + } + } + + private static class create_function_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_function_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetFunc()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetFunc()) { + struct.func.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, create_function_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.func = new Function(); + struct.func.read(iprot); + struct.setFuncIsSet(true); + } + } + } + + } + + public static class create_function_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_function_result"); + + 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 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_function_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_function_resultTupleSchemeFactory()); + } + + private AlreadyExistsException o1; // required + private InvalidObjectException o2; // required + private MetaException o3; // required + private NoSuchObjectException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_function_result.class, metaDataMap); + } + + public create_function_result() { + } + + public create_function_result( + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3, + NoSuchObjectException o4) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public create_function_result(create_function_result other) { + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new NoSuchObjectException(other.o4); + } + } + + public create_function_result deepCopy() { + return new create_function_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public NoSuchObjectException getO4() { + return this.o4; + } + + public void setO4(NoSuchObjectException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_function_result) + return this.equals((create_function_result)that); + return false; + } + + public boolean equals(create_function_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + boolean present_o4 = true && (isSetO4()); + list.add(present_o4); + if (present_o4) + list.add(o4); + + return list.hashCode(); + } + + @Override + public int compareTo(create_function_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(other.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_function_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + 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 create_function_resultStandardSchemeFactory implements SchemeFactory { + public create_function_resultStandardScheme getScheme() { + return new create_function_resultStandardScheme(); + } + } + + private static class create_function_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, create_function_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_function_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_function_resultTupleSchemeFactory implements SchemeFactory { + public create_function_resultTupleScheme getScheme() { + return new create_function_resultTupleScheme(); + } + } + + private static class create_function_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, create_function_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_function_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_function_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_function_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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 FUNC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("funcName", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new drop_function_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_function_argsTupleSchemeFactory()); + } + + private String dbName; // required + private String funcName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"), + FUNC_NAME((short)2, "funcName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // FUNC_NAME + return FUNC_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FUNC_NAME, new org.apache.thrift.meta_data.FieldMetaData("funcName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_function_args.class, metaDataMap); + } + + public drop_function_args() { + } + + public drop_function_args( + String dbName, + String funcName) + { + this(); + this.dbName = dbName; + this.funcName = funcName; + } + + /** + * Performs a deep copy on other. + */ + public drop_function_args(drop_function_args other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetFuncName()) { + this.funcName = other.funcName; + } + } + + public drop_function_args deepCopy() { + return new drop_function_args(this); + } + + @Override + public void clear() { + this.dbName = null; + this.funcName = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getFuncName() { + return this.funcName; + } + + public void setFuncName(String funcName) { + this.funcName = funcName; + } + + public void unsetFuncName() { + this.funcName = null; + } + + /** Returns true if field funcName is set (has been assigned a value) and false otherwise */ + public boolean isSetFuncName() { + return this.funcName != null; + } + + public void setFuncNameIsSet(boolean value) { + if (!value) { + this.funcName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case FUNC_NAME: + if (value == null) { + unsetFuncName(); + } else { + setFuncName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case FUNC_NAME: + return getFuncName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case FUNC_NAME: + return isSetFuncName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_function_args) + return this.equals((drop_function_args)that); + return false; + } + + public boolean equals(drop_function_args that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_funcName = true && this.isSetFuncName(); + boolean that_present_funcName = true && that.isSetFuncName(); + if (this_present_funcName || that_present_funcName) { + if (!(this_present_funcName && that_present_funcName)) + return false; + if (!this.funcName.equals(that.funcName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_funcName = true && (isSetFuncName()); + list.add(present_funcName); + if (present_funcName) + list.add(funcName); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_function_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(other.isSetFuncName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFuncName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, other.funcName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_function_args("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("funcName:"); + if (this.funcName == null) { + sb.append("null"); + } else { + sb.append(this.funcName); + } + 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 drop_function_argsStandardSchemeFactory implements SchemeFactory { + public drop_function_argsStandardScheme getScheme() { + return new drop_function_argsStandardScheme(); + } + } + + private static class drop_function_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_function_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.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FUNC_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.funcName = iprot.readString(); + struct.setFuncNameIsSet(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_function_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.funcName != null) { + oprot.writeFieldBegin(FUNC_NAME_FIELD_DESC); + oprot.writeString(struct.funcName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class drop_function_argsTupleSchemeFactory implements SchemeFactory { + public drop_function_argsTupleScheme getScheme() { + return new drop_function_argsTupleScheme(); + } + } + + private static class drop_function_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_function_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + if (struct.isSetFuncName()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetFuncName()) { + oprot.writeString(struct.funcName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, drop_function_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.funcName = iprot.readString(); + struct.setFuncNameIsSet(true); + } + } + } + + } + + public static class drop_function_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_function_result"); + + 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_function_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new drop_function_resultTupleSchemeFactory()); + } + + private NoSuchObjectException o1; // required + private MetaException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O3((short)2, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_function_result.class, metaDataMap); + } + + public drop_function_result() { + } + + public drop_function_result( + NoSuchObjectException o1, + MetaException o3) + { + this(); + this.o1 = o1; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public drop_function_result(drop_function_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public drop_function_result deepCopy() { + return new drop_function_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o3 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_function_result) + return this.equals((drop_function_result)that); + return false; + } + + public boolean equals(drop_function_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_function_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_function_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 drop_function_resultStandardSchemeFactory implements SchemeFactory { + public drop_function_resultStandardScheme getScheme() { + return new drop_function_resultStandardScheme(); + } + } + + private static class drop_function_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, drop_function_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_function_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_function_resultTupleSchemeFactory implements SchemeFactory { + public drop_function_resultTupleScheme getScheme() { + return new drop_function_resultTupleScheme(); + } + } + + private static class drop_function_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, drop_function_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_function_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 alter_function_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_function_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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 FUNC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("funcName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField NEW_FUNC_FIELD_DESC = new org.apache.thrift.protocol.TField("newFunc", org.apache.thrift.protocol.TType.STRUCT, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new alter_function_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_function_argsTupleSchemeFactory()); + } + + private String dbName; // required + private String funcName; // required + private Function newFunc; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"), + FUNC_NAME((short)2, "funcName"), + NEW_FUNC((short)3, "newFunc"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // FUNC_NAME + return FUNC_NAME; + case 3: // NEW_FUNC + return NEW_FUNC; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FUNC_NAME, new org.apache.thrift.meta_data.FieldMetaData("funcName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NEW_FUNC, new org.apache.thrift.meta_data.FieldMetaData("newFunc", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_function_args.class, metaDataMap); + } + + public alter_function_args() { + } + + public alter_function_args( + String dbName, + String funcName, + Function newFunc) + { + this(); + this.dbName = dbName; + this.funcName = funcName; + this.newFunc = newFunc; + } + + /** + * Performs a deep copy on other. + */ + public alter_function_args(alter_function_args other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetFuncName()) { + this.funcName = other.funcName; + } + if (other.isSetNewFunc()) { + this.newFunc = new Function(other.newFunc); + } + } + + public alter_function_args deepCopy() { + return new alter_function_args(this); + } + + @Override + public void clear() { + this.dbName = null; + this.funcName = null; + this.newFunc = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getFuncName() { + return this.funcName; + } + + public void setFuncName(String funcName) { + this.funcName = funcName; + } + + public void unsetFuncName() { + this.funcName = null; + } + + /** Returns true if field funcName is set (has been assigned a value) and false otherwise */ + public boolean isSetFuncName() { + return this.funcName != null; + } + + public void setFuncNameIsSet(boolean value) { + if (!value) { + this.funcName = null; + } + } + + public Function getNewFunc() { + return this.newFunc; + } + + public void setNewFunc(Function newFunc) { + this.newFunc = newFunc; + } + + public void unsetNewFunc() { + this.newFunc = null; + } + + /** Returns true if field newFunc is set (has been assigned a value) and false otherwise */ + public boolean isSetNewFunc() { + return this.newFunc != null; + } + + public void setNewFuncIsSet(boolean value) { + if (!value) { + this.newFunc = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case FUNC_NAME: + if (value == null) { + unsetFuncName(); + } else { + setFuncName((String)value); + } + break; + + case NEW_FUNC: + if (value == null) { + unsetNewFunc(); + } else { + setNewFunc((Function)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case FUNC_NAME: + return getFuncName(); + + case NEW_FUNC: + return getNewFunc(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case FUNC_NAME: + return isSetFuncName(); + case NEW_FUNC: + return isSetNewFunc(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_function_args) + return this.equals((alter_function_args)that); + return false; + } + + public boolean equals(alter_function_args that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_funcName = true && this.isSetFuncName(); + boolean that_present_funcName = true && that.isSetFuncName(); + if (this_present_funcName || that_present_funcName) { + if (!(this_present_funcName && that_present_funcName)) + return false; + if (!this.funcName.equals(that.funcName)) + return false; + } + + boolean this_present_newFunc = true && this.isSetNewFunc(); + boolean that_present_newFunc = true && that.isSetNewFunc(); + if (this_present_newFunc || that_present_newFunc) { + if (!(this_present_newFunc && that_present_newFunc)) + return false; + if (!this.newFunc.equals(that.newFunc)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_funcName = true && (isSetFuncName()); + list.add(present_funcName); + if (present_funcName) + list.add(funcName); + + boolean present_newFunc = true && (isSetNewFunc()); + list.add(present_newFunc); + if (present_newFunc) + list.add(newFunc); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_function_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(other.isSetFuncName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFuncName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, other.funcName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNewFunc()).compareTo(other.isSetNewFunc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNewFunc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newFunc, other.newFunc); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_function_args("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("funcName:"); + if (this.funcName == null) { + sb.append("null"); + } else { + sb.append(this.funcName); + } + first = false; + if (!first) sb.append(", "); + sb.append("newFunc:"); + if (this.newFunc == null) { + sb.append("null"); + } else { + sb.append(this.newFunc); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (newFunc != null) { + newFunc.validate(); + } + } + + 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 alter_function_argsStandardSchemeFactory implements SchemeFactory { + public alter_function_argsStandardScheme getScheme() { + return new alter_function_argsStandardScheme(); + } + } + + private static class alter_function_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_function_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.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FUNC_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.funcName = iprot.readString(); + struct.setFuncNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // NEW_FUNC + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.newFunc = new Function(); + struct.newFunc.read(iprot); + struct.setNewFuncIsSet(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_function_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.funcName != null) { + oprot.writeFieldBegin(FUNC_NAME_FIELD_DESC); + oprot.writeString(struct.funcName); + oprot.writeFieldEnd(); + } + if (struct.newFunc != null) { + oprot.writeFieldBegin(NEW_FUNC_FIELD_DESC); + struct.newFunc.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class alter_function_argsTupleSchemeFactory implements SchemeFactory { + public alter_function_argsTupleScheme getScheme() { + return new alter_function_argsTupleScheme(); + } + } + + private static class alter_function_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_function_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + if (struct.isSetFuncName()) { + optionals.set(1); + } + if (struct.isSetNewFunc()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetFuncName()) { + oprot.writeString(struct.funcName); + } + if (struct.isSetNewFunc()) { + struct.newFunc.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, alter_function_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.funcName = iprot.readString(); + struct.setFuncNameIsSet(true); + } + if (incoming.get(2)) { + struct.newFunc = new Function(); + struct.newFunc.read(iprot); + struct.setNewFuncIsSet(true); + } + } + } + + } + + public static class alter_function_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("alter_function_result"); + + 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_function_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new alter_function_resultTupleSchemeFactory()); + } + + private InvalidOperationException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alter_function_result.class, metaDataMap); + } + + public alter_function_result() { + } + + public alter_function_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_function_result(alter_function_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_function_result deepCopy() { + return new alter_function_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_function_result) + return this.equals((alter_function_result)that); + return false; + } + + public boolean equals(alter_function_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(alter_function_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("alter_function_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 alter_function_resultStandardSchemeFactory implements SchemeFactory { + public alter_function_resultStandardScheme getScheme() { + return new alter_function_resultStandardScheme(); + } + } + + private static class alter_function_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, alter_function_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_function_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_function_resultTupleSchemeFactory implements SchemeFactory { + public alter_function_resultTupleScheme getScheme() { + return new alter_function_resultTupleScheme(); + } + } + + private static class alter_function_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, alter_function_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_function_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_functions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_functions_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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 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_functions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_functions_argsTupleSchemeFactory()); + } + + private String dbName; // required + private String pattern; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"), + PATTERN((short)2, "pattern"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // PATTERN + return PATTERN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PATTERN, new org.apache.thrift.meta_data.FieldMetaData("pattern", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_functions_args.class, metaDataMap); + } + + public get_functions_args() { + } + + public get_functions_args( + String dbName, + String pattern) + { + this(); + this.dbName = dbName; + this.pattern = pattern; + } + + /** + * Performs a deep copy on other. + */ + public get_functions_args(get_functions_args other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetPattern()) { + this.pattern = other.pattern; + } + } + + public get_functions_args deepCopy() { + return new get_functions_args(this); + } + + @Override + public void clear() { + this.dbName = null; + this.pattern = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getPattern() { + return this.pattern; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + public void unsetPattern() { + this.pattern = null; + } + + /** Returns true if field pattern is set (has been assigned a value) and false otherwise */ + public boolean isSetPattern() { + return this.pattern != null; + } + + public void setPatternIsSet(boolean value) { + if (!value) { + this.pattern = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case PATTERN: + if (value == null) { + unsetPattern(); + } else { + setPattern((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case PATTERN: + return getPattern(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case PATTERN: + return isSetPattern(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_functions_args) + return this.equals((get_functions_args)that); + return false; + } + + public boolean equals(get_functions_args that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_pattern = true && this.isSetPattern(); + boolean that_present_pattern = true && that.isSetPattern(); + if (this_present_pattern || that_present_pattern) { + if (!(this_present_pattern && that_present_pattern)) + return false; + if (!this.pattern.equals(that.pattern)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_pattern = true && (isSetPattern()); + list.add(present_pattern); + if (present_pattern) + list.add(pattern); + + return list.hashCode(); + } + + @Override + public int compareTo(get_functions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPattern()).compareTo(other.isSetPattern()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPattern()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pattern, other.pattern); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_functions_args("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("pattern:"); + if (this.pattern == null) { + sb.append("null"); + } else { + sb.append(this.pattern); + } + 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 get_functions_argsStandardSchemeFactory implements SchemeFactory { + public get_functions_argsStandardScheme getScheme() { + return new get_functions_argsStandardScheme(); + } + } + + private static class get_functions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_functions_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.dbName = iprot.readString(); + struct.setDbNameIsSet(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_functions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + 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_functions_argsTupleSchemeFactory implements SchemeFactory { + public get_functions_argsTupleScheme getScheme() { + return new get_functions_argsTupleScheme(); + } + } + + private static class get_functions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_functions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + if (struct.isSetPattern()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetPattern()) { + oprot.writeString(struct.pattern); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_functions_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.pattern = iprot.readString(); + struct.setPatternIsSet(true); + } + } + } + + } + + public static class get_functions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_functions_result"); + + 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_functions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_functions_resultTupleSchemeFactory()); + } + + private List success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_functions_result.class, metaDataMap); + } + + public get_functions_result() { + } + + public get_functions_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_functions_result(get_functions_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_functions_result deepCopy() { + return new get_functions_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_functions_result) + return this.equals((get_functions_result)that); + return false; + } + + public boolean equals(get_functions_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_functions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_functions_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 get_functions_resultStandardSchemeFactory implements SchemeFactory { + public get_functions_resultStandardScheme getScheme() { + return new get_functions_resultStandardScheme(); + } + } + + private static class get_functions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_functions_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 _list1182 = iprot.readListBegin(); + struct.success = new ArrayList(_list1182.size); + String _elem1183; + for (int _i1184 = 0; _i1184 < _list1182.size; ++_i1184) + { + _elem1183 = iprot.readString(); + struct.success.add(_elem1183); + } + 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_functions_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 _iter1185 : struct.success) + { + oprot.writeString(_iter1185); + } + 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_functions_resultTupleSchemeFactory implements SchemeFactory { + public get_functions_resultTupleScheme getScheme() { + return new get_functions_resultTupleScheme(); + } + } + + private static class get_functions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_functions_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 _iter1186 : struct.success) + { + oprot.writeString(_iter1186); + } + } + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_functions_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 _list1187 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list1187.size); + String _elem1188; + for (int _i1189 = 0; _i1189 < _list1187.size; ++_i1189) + { + _elem1188 = iprot.readString(); + struct.success.add(_elem1188); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + + } + + public static class get_function_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_function_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_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 FUNC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("funcName", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_function_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_function_argsTupleSchemeFactory()); + } + + private String dbName; // required + private String funcName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"), + FUNC_NAME((short)2, "funcName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // FUNC_NAME + return FUNC_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FUNC_NAME, new org.apache.thrift.meta_data.FieldMetaData("funcName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_function_args.class, metaDataMap); + } + + public get_function_args() { + } + + public get_function_args( + String dbName, + String funcName) + { + this(); + this.dbName = dbName; + this.funcName = funcName; + } + + /** + * Performs a deep copy on other. + */ + public get_function_args(get_function_args other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetFuncName()) { + this.funcName = other.funcName; + } + } + + public get_function_args deepCopy() { + return new get_function_args(this); + } + + @Override + public void clear() { + this.dbName = null; + this.funcName = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getFuncName() { + return this.funcName; + } + + public void setFuncName(String funcName) { + this.funcName = funcName; + } + + public void unsetFuncName() { + this.funcName = null; + } + + /** Returns true if field funcName is set (has been assigned a value) and false otherwise */ + public boolean isSetFuncName() { + return this.funcName != null; + } + + public void setFuncNameIsSet(boolean value) { + if (!value) { + this.funcName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case FUNC_NAME: + if (value == null) { + unsetFuncName(); + } else { + setFuncName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case FUNC_NAME: + return getFuncName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case FUNC_NAME: + return isSetFuncName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_function_args) + return this.equals((get_function_args)that); + return false; + } + + public boolean equals(get_function_args that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_funcName = true && this.isSetFuncName(); + boolean that_present_funcName = true && that.isSetFuncName(); + if (this_present_funcName || that_present_funcName) { + if (!(this_present_funcName && that_present_funcName)) + return false; + if (!this.funcName.equals(that.funcName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_funcName = true && (isSetFuncName()); + list.add(present_funcName); + if (present_funcName) + list.add(funcName); + + return list.hashCode(); + } + + @Override + public int compareTo(get_function_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFuncName()).compareTo(other.isSetFuncName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFuncName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcName, other.funcName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_function_args("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("funcName:"); + if (this.funcName == null) { + sb.append("null"); + } else { + sb.append(this.funcName); + } + 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 get_function_argsStandardSchemeFactory implements SchemeFactory { + public get_function_argsStandardScheme getScheme() { + return new get_function_argsStandardScheme(); + } + } + + private static class get_function_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_function_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.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // FUNC_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.funcName = iprot.readString(); + struct.setFuncNameIsSet(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_function_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.funcName != null) { + oprot.writeFieldBegin(FUNC_NAME_FIELD_DESC); + oprot.writeString(struct.funcName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_function_argsTupleSchemeFactory implements SchemeFactory { + public get_function_argsTupleScheme getScheme() { + return new get_function_argsTupleScheme(); + } + } + + private static class get_function_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_function_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDbName()) { + optionals.set(0); + } + if (struct.isSetFuncName()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDbName()) { + oprot.writeString(struct.dbName); + } + if (struct.isSetFuncName()) { + oprot.writeString(struct.funcName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_function_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.funcName = iprot.readString(); + struct.setFuncNameIsSet(true); + } + } + } + + } + + public static class get_function_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_function_result"); + + 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 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_function_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_function_resultTupleSchemeFactory()); + } + + private Function success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Function.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_function_result.class, metaDataMap); + } + + public get_function_result() { + } + + public get_function_result( + Function success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_function_result(get_function_result other) { + if (other.isSetSuccess()) { + this.success = new Function(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_function_result deepCopy() { + return new get_function_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Function getSuccess() { + return this.success; + } + + public void setSuccess(Function success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Function)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_function_result) + return this.equals((get_function_result)that); + return false; + } + + public boolean equals(get_function_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(get_function_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_function_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_function_resultStandardSchemeFactory implements SchemeFactory { + public get_function_resultStandardScheme getScheme() { + return new get_function_resultStandardScheme(); + } + } + + private static class get_function_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_function_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 Function(); + 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_function_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_function_resultTupleSchemeFactory implements SchemeFactory { + public get_function_resultTupleScheme getScheme() { + return new get_function_resultTupleScheme(); + } + } + + private static class get_function_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_function_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_function_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new Function(); + 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_all_functions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_functions_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_all_functions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_functions_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 { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_functions_args.class, metaDataMap); + } + + public get_all_functions_args() { + } + + /** + * Performs a deep copy on other. + */ + public get_all_functions_args(get_all_functions_args other) { + } + + public get_all_functions_args deepCopy() { + return new get_all_functions_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_functions_args) + return this.equals((get_all_functions_args)that); + return false; + } + + public boolean equals(get_all_functions_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(get_all_functions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_all_functions_args("); + boolean first = true; + + 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 get_all_functions_argsStandardSchemeFactory implements SchemeFactory { + public get_all_functions_argsStandardScheme getScheme() { + return new get_all_functions_argsStandardScheme(); + } + } + + private static class get_all_functions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_functions_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_functions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_all_functions_argsTupleSchemeFactory implements SchemeFactory { + public get_all_functions_argsTupleScheme getScheme() { + return new get_all_functions_argsTupleScheme(); + } + } + + private static class get_all_functions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_functions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_functions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class get_all_functions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_functions_result"); + + 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_all_functions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_functions_resultTupleSchemeFactory()); + } + + private GetAllFunctionsResponse success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetAllFunctionsResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_functions_result.class, metaDataMap); + } + + public get_all_functions_result() { + } + + public get_all_functions_result( + GetAllFunctionsResponse success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_all_functions_result(get_all_functions_result other) { + if (other.isSetSuccess()) { + this.success = new GetAllFunctionsResponse(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_all_functions_result deepCopy() { + return new get_all_functions_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public GetAllFunctionsResponse getSuccess() { + return this.success; + } + + public void setSuccess(GetAllFunctionsResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((GetAllFunctionsResponse)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_functions_result) + return this.equals((get_all_functions_result)that); + return false; + } + + public boolean equals(get_all_functions_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_all_functions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_all_functions_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_all_functions_resultStandardSchemeFactory implements SchemeFactory { + public get_all_functions_resultStandardScheme getScheme() { + return new get_all_functions_resultStandardScheme(); + } + } + + private static class get_all_functions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_functions_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 GetAllFunctionsResponse(); + 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_all_functions_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_all_functions_resultTupleSchemeFactory implements SchemeFactory { + public get_all_functions_resultTupleScheme getScheme() { + return new get_all_functions_resultTupleScheme(); + } + } + + private static class get_all_functions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_functions_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_all_functions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new GetAllFunctionsResponse(); + 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 create_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_role_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ROLE((short)1, "role"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ROLE + return ROLE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Role.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_role_args.class, metaDataMap); + } + + public create_role_args() { + } + + public create_role_args( + Role role) + { + this(); + this.role = role; + } + + /** + * Performs a deep copy on other. + */ + public create_role_args(create_role_args other) { + if (other.isSetRole()) { + this.role = new Role(other.role); + } + } + + public create_role_args deepCopy() { + return new create_role_args(this); + } + + @Override + public void clear() { + this.role = null; + } + + public Role getRole() { + return this.role; + } + + public void setRole(Role role) { + this.role = role; + } + + public void unsetRole() { + this.role = null; + } + + /** Returns true if field role is set (has been assigned a value) and false otherwise */ + public boolean isSetRole() { + return this.role != null; + } + + public void setRoleIsSet(boolean value) { + if (!value) { + this.role = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROLE: + if (value == null) { + unsetRole(); + } else { + setRole((Role)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROLE: + return getRole(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ROLE: + return isSetRole(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_role_args) + return this.equals((create_role_args)that); + return false; + } + + public boolean equals(create_role_args that) { + if (that == null) + return false; + + boolean this_present_role = true && this.isSetRole(); + boolean that_present_role = true && that.isSetRole(); + if (this_present_role || that_present_role) { + if (!(this_present_role && that_present_role)) + return false; + if (!this.role.equals(that.role)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_role = true && (isSetRole()); + list.add(present_role); + if (present_role) + list.add(role); + + return list.hashCode(); + } + + @Override + public int compareTo(create_role_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRole()).compareTo(other.isSetRole()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRole()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, other.role); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_role_args("); + boolean first = true; + + sb.append("role:"); + if (this.role == null) { + sb.append("null"); + } else { + sb.append(this.role); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_role_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_role_result.class, metaDataMap); + } + + public create_role_result() { + } + + public create_role_result( + boolean success, + MetaException o1) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public create_role_result(create_role_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public create_role_result deepCopy() { + return new create_role_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_role_result) + return this.equals((create_role_result)that); + return false; + } + + public boolean equals(create_role_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(create_role_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("create_role_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 { + // 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_role_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ROLE_NAME((short)1, "role_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ROLE_NAME + return ROLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("role_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_role_args.class, metaDataMap); + } + + public drop_role_args() { + } + + public drop_role_args( + String role_name) + { + this(); + this.role_name = role_name; + } + + /** + * Performs a deep copy on other. + */ + public drop_role_args(drop_role_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_name; + } + } + + public drop_role_args deepCopy() { + return new drop_role_args(this); + } + + @Override + public void clear() { + this.role_name = null; + } + + public String getRole_name() { + return this.role_name; + } + + public void setRole_name(String role_name) { + this.role_name = role_name; + } + + public void unsetRole_name() { + this.role_name = null; + } + + /** Returns true if field role_name is set (has been assigned a value) and false otherwise */ + public boolean isSetRole_name() { + return this.role_name != null; + } + + public void setRole_nameIsSet(boolean value) { + if (!value) { + this.role_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROLE_NAME: + if (value == null) { + unsetRole_name(); + } else { + setRole_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROLE_NAME: + return getRole_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ROLE_NAME: + return isSetRole_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_role_args) + return this.equals((drop_role_args)that); + return false; + } + + public boolean equals(drop_role_args that) { + if (that == null) + return false; + + boolean this_present_role_name = true && this.isSetRole_name(); + boolean that_present_role_name = true && that.isSetRole_name(); + if (this_present_role_name || that_present_role_name) { + if (!(this_present_role_name && that_present_role_name)) + return false; + if (!this.role_name.equals(that.role_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_role_name = true && (isSetRole_name()); + list.add(present_role_name); + if (present_role_name) + list.add(role_name); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_role_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(other.isSetRole_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRole_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, other.role_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_role_args("); + boolean first = true; + + sb.append("role_name:"); + if (this.role_name == null) { + sb.append("null"); + } else { + sb.append(this.role_name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_role_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_role_result.class, metaDataMap); + } + + public drop_role_result() { + } + + public drop_role_result( + boolean success, + MetaException o1) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public drop_role_result(drop_role_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public drop_role_result deepCopy() { + return new drop_role_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_role_result) + return this.equals((drop_role_result)that); + return false; + } + + public boolean equals(drop_role_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(drop_role_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("drop_role_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 { + // 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, Comparable { + 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 { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_role_names_args.class, metaDataMap); + } + + public get_role_names_args() { + } + + /** + * Performs a deep copy on other. + */ + public get_role_names_args(get_role_names_args other) { + } + + public get_role_names_args deepCopy() { + return new get_role_names_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_role_names_args) + return this.equals((get_role_names_args)that); + return false; + } + + public boolean equals(get_role_names_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(get_role_names_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_role_names_args("); + boolean first = true; + + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_names_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_role_names_result.class, metaDataMap); + } + + public get_role_names_result() { + } + + public get_role_names_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_role_names_result(get_role_names_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_role_names_result deepCopy() { + return new get_role_names_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_role_names_result) + return this.equals((get_role_names_result)that); + return false; + } + + public boolean equals(get_role_names_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_role_names_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_role_names_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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 _list1190 = iprot.readListBegin(); + struct.success = new ArrayList(_list1190.size); + String _elem1191; + for (int _i1192 = 0; _i1192 < _list1190.size; ++_i1192) + { + _elem1191 = iprot.readString(); + struct.success.add(_elem1191); + } + 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 _iter1193 : struct.success) + { + oprot.writeString(_iter1193); + } + 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 _iter1194 : struct.success) + { + oprot.writeString(_iter1194); + } + } + } + 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 _list1195 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list1195.size); + String _elem1196; + for (int _i1197 = 0; _i1197 < _list1195.size; ++_i1197) + { + _elem1196 = iprot.readString(); + struct.success.add(_elem1196); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_role_args"); + + 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 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 org.apache.thrift.protocol.TField GRANTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("grantor", org.apache.thrift.protocol.TType.STRING, (short)4); + 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 + private String grantor; // required + private PrincipalType grantorType; // required + private boolean grant_option; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ROLE_NAME((short)1, "role_name"), + PRINCIPAL_NAME((short)2, "principal_name"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)3, "principal_type"), + GRANTOR((short)4, "grantor"), + /** + * + * @see PrincipalType + */ + GRANTOR_TYPE((short)5, "grantorType"), + GRANT_OPTION((short)6, "grant_option"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ROLE_NAME + return ROLE_NAME; + case 2: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 3: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; + case 4: // GRANTOR + return GRANTOR; + case 5: // GRANTOR_TYPE + return GRANTOR_TYPE; + case 6: // GRANT_OPTION + return GRANT_OPTION; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __GRANT_OPTION_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("role_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.GRANTOR, new org.apache.thrift.meta_data.FieldMetaData("grantor", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GRANTOR_TYPE, new org.apache.thrift.meta_data.FieldMetaData("grantorType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("grant_option", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_role_args.class, metaDataMap); + } + + public grant_role_args() { + } + + public grant_role_args( + String role_name, + String principal_name, + PrincipalType principal_type, + String grantor, + PrincipalType grantorType, + boolean grant_option) + { + this(); + this.role_name = role_name; + this.principal_name = principal_name; + this.principal_type = principal_type; + this.grantor = grantor; + this.grantorType = grantorType; + this.grant_option = grant_option; + setGrant_optionIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public grant_role_args(grant_role_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetRole_name()) { + this.role_name = other.role_name; + } + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + if (other.isSetPrincipal_type()) { + this.principal_type = other.principal_type; + } + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + if (other.isSetGrantorType()) { + this.grantorType = other.grantorType; + } + this.grant_option = other.grant_option; + } + + public grant_role_args deepCopy() { + return new grant_role_args(this); + } + + @Override + public void clear() { + this.role_name = null; + this.principal_name = null; + this.principal_type = null; + this.grantor = null; + this.grantorType = null; + setGrant_optionIsSet(false); + this.grant_option = false; + } + + public String getRole_name() { + return this.role_name; + } + + public void setRole_name(String role_name) { + this.role_name = role_name; + } + + public void unsetRole_name() { + this.role_name = null; + } + + /** Returns true if field role_name is set (has been assigned a value) and false otherwise */ + public boolean isSetRole_name() { + return this.role_name != null; + } + + public void setRole_nameIsSet(boolean value) { + if (!value) { + this.role_name = null; + } + } + + public String getPrincipal_name() { + return this.principal_name; + } + + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; + } + + public void unsetPrincipal_name() { + this.principal_name = null; + } + + /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipal_name() { + return this.principal_name != null; + } + + public void setPrincipal_nameIsSet(boolean value) { + if (!value) { + this.principal_name = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipal_type() { + return this.principal_type; + } + + /** + * + * @see PrincipalType + */ + public void setPrincipal_type(PrincipalType principal_type) { + this.principal_type = principal_type; + } + + public void unsetPrincipal_type() { + this.principal_type = null; + } + + /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipal_type() { + return this.principal_type != null; + } + + public void setPrincipal_typeIsSet(boolean value) { + if (!value) { + this.principal_type = null; + } + } + + public String getGrantor() { + return this.grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public void unsetGrantor() { + this.grantor = null; + } + + /** Returns true if field grantor is set (has been assigned a value) and false otherwise */ + public boolean isSetGrantor() { + return this.grantor != null; + } + + public void setGrantorIsSet(boolean value) { + if (!value) { + this.grantor = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getGrantorType() { + return this.grantorType; + } + + /** + * + * @see PrincipalType + */ + public void setGrantorType(PrincipalType grantorType) { + this.grantorType = grantorType; + } + + public void unsetGrantorType() { + this.grantorType = null; + } + + /** Returns true if field grantorType is set (has been assigned a value) and false otherwise */ + public boolean isSetGrantorType() { + return this.grantorType != null; + } + + public void setGrantorTypeIsSet(boolean value) { + if (!value) { + this.grantorType = null; + } + } + + public boolean isGrant_option() { + return this.grant_option; + } + + public void setGrant_option(boolean grant_option) { + this.grant_option = grant_option; + setGrant_optionIsSet(true); + } + + public void unsetGrant_option() { + __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 EncodingUtils.testBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID); + } + + public void setGrant_optionIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GRANT_OPTION_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROLE_NAME: + if (value == null) { + unsetRole_name(); + } else { + setRole_name((String)value); + } + break; + + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipal_name(); + } else { + setPrincipal_name((String)value); + } + break; + + case PRINCIPAL_TYPE: + if (value == null) { + unsetPrincipal_type(); + } else { + setPrincipal_type((PrincipalType)value); + } + break; + + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); + } + break; + + case GRANTOR_TYPE: + if (value == null) { + unsetGrantorType(); + } else { + setGrantorType((PrincipalType)value); + } + break; + + case GRANT_OPTION: + if (value == null) { + unsetGrant_option(); + } else { + setGrant_option((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROLE_NAME: + return getRole_name(); + + case PRINCIPAL_NAME: + return getPrincipal_name(); + + case PRINCIPAL_TYPE: + return getPrincipal_type(); + + case GRANTOR: + return getGrantor(); + + case GRANTOR_TYPE: + return getGrantorType(); + + case GRANT_OPTION: + return isGrant_option(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ROLE_NAME: + return isSetRole_name(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case PRINCIPAL_TYPE: + return isSetPrincipal_type(); + case GRANTOR: + return isSetGrantor(); + case GRANTOR_TYPE: + return isSetGrantorType(); + case GRANT_OPTION: + return isSetGrant_option(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof grant_role_args) + return this.equals((grant_role_args)that); + return false; + } + + public boolean equals(grant_role_args that) { + if (that == null) + return false; + + boolean this_present_role_name = true && this.isSetRole_name(); + boolean that_present_role_name = true && that.isSetRole_name(); + if (this_present_role_name || that_present_role_name) { + if (!(this_present_role_name && that_present_role_name)) + return false; + if (!this.role_name.equals(that.role_name)) + return false; + } + + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) + return false; + if (!this.principal_name.equals(that.principal_name)) + return false; + } + + boolean this_present_principal_type = true && this.isSetPrincipal_type(); + boolean that_present_principal_type = true && that.isSetPrincipal_type(); + if (this_present_principal_type || that_present_principal_type) { + if (!(this_present_principal_type && that_present_principal_type)) + return false; + if (!this.principal_type.equals(that.principal_type)) + return false; + } + + boolean this_present_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) + return false; + } + + boolean this_present_grantorType = true && this.isSetGrantorType(); + boolean that_present_grantorType = true && that.isSetGrantorType(); + if (this_present_grantorType || that_present_grantorType) { + if (!(this_present_grantorType && that_present_grantorType)) + return false; + if (!this.grantorType.equals(that.grantorType)) + return false; + } + + boolean this_present_grant_option = true; + boolean that_present_grant_option = true; + if (this_present_grant_option || that_present_grant_option) { + if (!(this_present_grant_option && that_present_grant_option)) + return false; + if (this.grant_option != that.grant_option) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_role_name = true && (isSetRole_name()); + list.add(present_role_name); + if (present_role_name) + list.add(role_name); + + boolean present_principal_name = true && (isSetPrincipal_name()); + list.add(present_principal_name); + if (present_principal_name) + list.add(principal_name); + + boolean present_principal_type = true && (isSetPrincipal_type()); + list.add(present_principal_type); + if (present_principal_type) + list.add(principal_type.getValue()); + + boolean present_grantor = true && (isSetGrantor()); + list.add(present_grantor); + if (present_grantor) + list.add(grantor); + + boolean present_grantorType = true && (isSetGrantorType()); + list.add(present_grantorType); + if (present_grantorType) + list.add(grantorType.getValue()); + + boolean present_grant_option = true; + list.add(present_grant_option); + if (present_grant_option) + list.add(grant_option); + + return list.hashCode(); + } + + @Override + public int compareTo(grant_role_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(other.isSetRole_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRole_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, other.role_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_type()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(other.isSetGrantor()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantor()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantor, other.grantor); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantorType()).compareTo(other.isSetGrantorType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantorType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorType, other.grantorType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrant_option()).compareTo(other.isSetGrant_option()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrant_option()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grant_option, other.grant_option); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("grant_role_args("); + boolean first = true; + + sb.append("role_name:"); + if (this.role_name == null) { + sb.append("null"); + } else { + sb.append(this.role_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("principal_name:"); + if (this.principal_name == null) { + sb.append("null"); + } else { + sb.append(this.principal_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("principal_type:"); + if (this.principal_type == null) { + sb.append("null"); + } else { + sb.append(this.principal_type); + } + first = false; + if (!first) sb.append(", "); + sb.append("grantor:"); + if (this.grantor == null) { + sb.append("null"); + } else { + sb.append(this.grantor); + } + first = false; + if (!first) sb.append(", "); + sb.append("grantorType:"); + if (this.grantorType == null) { + sb.append("null"); + } else { + sb.append(this.grantorType); + } + first = false; + if (!first) sb.append(", "); + sb.append("grant_option:"); + sb.append(this.grant_option); + 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 { + // 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_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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_role_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_role_result.class, metaDataMap); + } + + public grant_role_result() { + } + + public grant_role_result( + boolean success, + MetaException o1) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public grant_role_result(grant_role_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public grant_role_result deepCopy() { + return new grant_role_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof grant_role_result) + return this.equals((grant_role_result)that); + return false; + } + + public boolean equals(grant_role_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(grant_role_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("grant_role_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 { + // 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_role_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ROLE_NAME((short)1, "role_name"), + PRINCIPAL_NAME((short)2, "principal_name"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)3, "principal_type"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ROLE_NAME + return ROLE_NAME; + case 2: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 3: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("role_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_role_args.class, metaDataMap); + } + + public revoke_role_args() { + } + + public revoke_role_args( + String role_name, + String principal_name, + PrincipalType principal_type) + { + this(); + this.role_name = role_name; + this.principal_name = principal_name; + this.principal_type = principal_type; + } + + /** + * Performs a deep copy on other. + */ + public revoke_role_args(revoke_role_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_name; + } + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + if (other.isSetPrincipal_type()) { + this.principal_type = other.principal_type; + } + } + + public revoke_role_args deepCopy() { + return new revoke_role_args(this); + } + + @Override + public void clear() { + this.role_name = null; + this.principal_name = null; + this.principal_type = null; + } + + public String getRole_name() { + return this.role_name; + } + + public void setRole_name(String role_name) { + this.role_name = role_name; + } + + public void unsetRole_name() { + this.role_name = null; + } + + /** Returns true if field role_name is set (has been assigned a value) and false otherwise */ + public boolean isSetRole_name() { + return this.role_name != null; + } + + public void setRole_nameIsSet(boolean value) { + if (!value) { + this.role_name = null; + } + } + + public String getPrincipal_name() { + return this.principal_name; + } + + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; + } + + public void unsetPrincipal_name() { + this.principal_name = null; + } + + /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipal_name() { + return this.principal_name != null; + } + + public void setPrincipal_nameIsSet(boolean value) { + if (!value) { + this.principal_name = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipal_type() { + return this.principal_type; + } + + /** + * + * @see PrincipalType + */ + public void setPrincipal_type(PrincipalType principal_type) { + this.principal_type = principal_type; + } + + public void unsetPrincipal_type() { + this.principal_type = null; + } + + /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipal_type() { + return this.principal_type != null; + } + + public void setPrincipal_typeIsSet(boolean value) { + if (!value) { + this.principal_type = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROLE_NAME: + if (value == null) { + unsetRole_name(); + } else { + setRole_name((String)value); + } + break; + + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipal_name(); + } else { + setPrincipal_name((String)value); + } + break; + + case PRINCIPAL_TYPE: + if (value == null) { + unsetPrincipal_type(); + } else { + setPrincipal_type((PrincipalType)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROLE_NAME: + return getRole_name(); + + case PRINCIPAL_NAME: + return getPrincipal_name(); + + case PRINCIPAL_TYPE: + return getPrincipal_type(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ROLE_NAME: + return isSetRole_name(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case PRINCIPAL_TYPE: + return isSetPrincipal_type(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof revoke_role_args) + return this.equals((revoke_role_args)that); + return false; + } + + public boolean equals(revoke_role_args that) { + if (that == null) + return false; + + boolean this_present_role_name = true && this.isSetRole_name(); + boolean that_present_role_name = true && that.isSetRole_name(); + if (this_present_role_name || that_present_role_name) { + if (!(this_present_role_name && that_present_role_name)) + return false; + if (!this.role_name.equals(that.role_name)) + return false; + } + + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) + return false; + if (!this.principal_name.equals(that.principal_name)) + return false; + } + + boolean this_present_principal_type = true && this.isSetPrincipal_type(); + boolean that_present_principal_type = true && that.isSetPrincipal_type(); + if (this_present_principal_type || that_present_principal_type) { + if (!(this_present_principal_type && that_present_principal_type)) + return false; + if (!this.principal_type.equals(that.principal_type)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_role_name = true && (isSetRole_name()); + list.add(present_role_name); + if (present_role_name) + list.add(role_name); + + boolean present_principal_name = true && (isSetPrincipal_name()); + list.add(present_principal_name); + if (present_principal_name) + list.add(principal_name); + + boolean present_principal_type = true && (isSetPrincipal_type()); + list.add(present_principal_type); + if (present_principal_type) + list.add(principal_type.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(revoke_role_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(other.isSetRole_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRole_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role_name, other.role_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_type()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("revoke_role_args("); + boolean first = true; + + sb.append("role_name:"); + if (this.role_name == null) { + sb.append("null"); + } else { + sb.append(this.role_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("principal_name:"); + if (this.principal_name == null) { + sb.append("null"); + } else { + sb.append(this.principal_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("principal_type:"); + if (this.principal_type == null) { + sb.append("null"); + } else { + sb.append(this.principal_type); + } + 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 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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } + } + } + + } + + public static class revoke_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_role_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_role_result.class, metaDataMap); + } + + public revoke_role_result() { + } + + public revoke_role_result( + boolean success, + MetaException o1) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public revoke_role_result(revoke_role_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public revoke_role_result deepCopy() { + return new revoke_role_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof revoke_role_result) + return this.equals((revoke_role_result)that); + return false; + } + + public boolean equals(revoke_role_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(revoke_role_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("revoke_role_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 { + // 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_roles_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PRINCIPAL_NAME((short)1, "principal_name"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)2, "principal_type"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_roles_args.class, metaDataMap); + } + + public list_roles_args() { + } + + public list_roles_args( + String principal_name, + PrincipalType principal_type) + { + this(); + this.principal_name = principal_name; + this.principal_type = principal_type; + } + + /** + * Performs a deep copy on other. + */ + public list_roles_args(list_roles_args other) { + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + if (other.isSetPrincipal_type()) { + this.principal_type = other.principal_type; + } + } + + public list_roles_args deepCopy() { + return new list_roles_args(this); + } + + @Override + public void clear() { + this.principal_name = null; + this.principal_type = null; + } + + public String getPrincipal_name() { + return this.principal_name; + } + + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; + } + + public void unsetPrincipal_name() { + this.principal_name = null; + } + + /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipal_name() { + return this.principal_name != null; + } + + public void setPrincipal_nameIsSet(boolean value) { + if (!value) { + this.principal_name = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipal_type() { + return this.principal_type; + } + + /** + * + * @see PrincipalType + */ + public void setPrincipal_type(PrincipalType principal_type) { + this.principal_type = principal_type; + } + + public void unsetPrincipal_type() { + this.principal_type = null; + } + + /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipal_type() { + return this.principal_type != null; + } + + public void setPrincipal_typeIsSet(boolean value) { + if (!value) { + this.principal_type = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipal_name(); + } else { + setPrincipal_name((String)value); + } + break; + + case PRINCIPAL_TYPE: + if (value == null) { + unsetPrincipal_type(); + } else { + setPrincipal_type((PrincipalType)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRINCIPAL_NAME: + return getPrincipal_name(); + + case PRINCIPAL_TYPE: + return getPrincipal_type(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case PRINCIPAL_TYPE: + return isSetPrincipal_type(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof list_roles_args) + return this.equals((list_roles_args)that); + return false; + } + + public boolean equals(list_roles_args that) { + if (that == null) + return false; + + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) + return false; + if (!this.principal_name.equals(that.principal_name)) + return false; + } + + boolean this_present_principal_type = true && this.isSetPrincipal_type(); + boolean that_present_principal_type = true && that.isSetPrincipal_type(); + if (this_present_principal_type || that_present_principal_type) { + if (!(this_present_principal_type && that_present_principal_type)) + return false; + if (!this.principal_type.equals(that.principal_type)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_principal_name = true && (isSetPrincipal_name()); + list.add(present_principal_name); + if (present_principal_name) + list.add(principal_name); + + boolean present_principal_type = true && (isSetPrincipal_type()); + list.add(present_principal_type); + if (present_principal_type) + list.add(principal_type.getValue()); + + return list.hashCode(); + } + + @Override + public int compareTo(list_roles_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_type()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("list_roles_args("); + boolean first = true; + + sb.append("principal_name:"); + if (this.principal_name == null) { + sb.append("null"); + } else { + sb.append(this.principal_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("principal_type:"); + if (this.principal_type == null) { + sb.append("null"); + } else { + sb.append(this.principal_type); + } + 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 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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); + struct.setPrincipal_typeIsSet(true); + } + } + } + + } + + public static class list_roles_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_roles_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Role.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_roles_result.class, metaDataMap); + } + + public list_roles_result() { + } + + public list_roles_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public list_roles_result(list_roles_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (Role other_element : other.success) { + __this__success.add(new Role(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public list_roles_result deepCopy() { + return new list_roles_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Role elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof list_roles_result) + return this.equals((list_roles_result)that); + return false; + } + + public boolean equals(list_roles_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(list_roles_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("list_roles_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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 _list1198 = iprot.readListBegin(); + struct.success = new ArrayList(_list1198.size); + Role _elem1199; + for (int _i1200 = 0; _i1200 < _list1198.size; ++_i1200) + { + _elem1199 = new Role(); + _elem1199.read(iprot); + struct.success.add(_elem1199); + } + 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 _iter1201 : struct.success) + { + _iter1201.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 _iter1202 : struct.success) + { + _iter1202.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 _list1203 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list1203.size); + Role _elem1204; + for (int _i1205 = 0; _i1205 < _list1203.size; ++_i1205) + { + _elem1204 = new Role(); + _elem1204.read(iprot); + struct.success.add(_elem1204); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + + } + + public static class grant_revoke_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_role_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new grant_revoke_role_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_revoke_role_argsTupleSchemeFactory()); + } + + private GrantRevokeRoleRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GrantRevokeRoleRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_revoke_role_args.class, metaDataMap); + } + + public grant_revoke_role_args() { + } + + public grant_revoke_role_args( + GrantRevokeRoleRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public grant_revoke_role_args(grant_revoke_role_args other) { + if (other.isSetRequest()) { + this.request = new GrantRevokeRoleRequest(other.request); + } + } + + public grant_revoke_role_args deepCopy() { + return new grant_revoke_role_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public GrantRevokeRoleRequest getRequest() { + return this.request; + } + + public void setRequest(GrantRevokeRoleRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((GrantRevokeRoleRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof grant_revoke_role_args) + return this.equals((grant_revoke_role_args)that); + return false; + } + + public boolean equals(grant_revoke_role_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(grant_revoke_role_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("grant_revoke_role_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 grant_revoke_role_argsStandardSchemeFactory implements SchemeFactory { + public grant_revoke_role_argsStandardScheme getScheme() { + return new grant_revoke_role_argsStandardScheme(); + } + } + + private static class grant_revoke_role_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new GrantRevokeRoleRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_revoke_role_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class grant_revoke_role_argsTupleSchemeFactory implements SchemeFactory { + public grant_revoke_role_argsTupleScheme getScheme() { + return new grant_revoke_role_argsTupleScheme(); + } + } + + private static class grant_revoke_role_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, grant_revoke_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new GrantRevokeRoleRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class grant_revoke_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_role_result"); + + 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 grant_revoke_role_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_revoke_role_resultTupleSchemeFactory()); + } + + private GrantRevokeRoleResponse success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GrantRevokeRoleResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_revoke_role_result.class, metaDataMap); + } + + public grant_revoke_role_result() { + } + + public grant_revoke_role_result( + GrantRevokeRoleResponse success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public grant_revoke_role_result(grant_revoke_role_result other) { + if (other.isSetSuccess()) { + this.success = new GrantRevokeRoleResponse(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public grant_revoke_role_result deepCopy() { + return new grant_revoke_role_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public GrantRevokeRoleResponse getSuccess() { + return this.success; + } + + public void setSuccess(GrantRevokeRoleResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((GrantRevokeRoleResponse)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof grant_revoke_role_result) + return this.equals((grant_revoke_role_result)that); + return false; + } + + public boolean equals(grant_revoke_role_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(grant_revoke_role_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("grant_revoke_role_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 grant_revoke_role_resultStandardSchemeFactory implements SchemeFactory { + public grant_revoke_role_resultStandardScheme getScheme() { + return new grant_revoke_role_resultStandardScheme(); + } + } + + private static class grant_revoke_role_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_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.STRUCT) { + struct.success = new GrantRevokeRoleResponse(); + 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, grant_revoke_role_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 grant_revoke_role_resultTupleSchemeFactory implements SchemeFactory { + public grant_revoke_role_resultTupleScheme getScheme() { + return new grant_revoke_role_resultTupleScheme(); + } + } + + private static class grant_revoke_role_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, grant_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()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new GrantRevokeRoleResponse(); + 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 get_principals_in_role_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_principals_in_role_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_principals_in_role_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_principals_in_role_argsTupleSchemeFactory()); + } + + private GetPrincipalsInRoleRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetPrincipalsInRoleRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_principals_in_role_args.class, metaDataMap); + } + + public get_principals_in_role_args() { + } + + public get_principals_in_role_args( + GetPrincipalsInRoleRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public get_principals_in_role_args(get_principals_in_role_args other) { + if (other.isSetRequest()) { + this.request = new GetPrincipalsInRoleRequest(other.request); + } + } + + public get_principals_in_role_args deepCopy() { + return new get_principals_in_role_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public GetPrincipalsInRoleRequest getRequest() { + return this.request; + } + + public void setRequest(GetPrincipalsInRoleRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((GetPrincipalsInRoleRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_principals_in_role_args) + return this.equals((get_principals_in_role_args)that); + return false; + } + + public boolean equals(get_principals_in_role_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(get_principals_in_role_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_principals_in_role_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 get_principals_in_role_argsStandardSchemeFactory implements SchemeFactory { + public get_principals_in_role_argsStandardScheme getScheme() { + return new get_principals_in_role_argsStandardScheme(); + } + } + + private static class get_principals_in_role_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_principals_in_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new GetPrincipalsInRoleRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_principals_in_role_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_principals_in_role_argsTupleSchemeFactory implements SchemeFactory { + public get_principals_in_role_argsTupleScheme getScheme() { + return new get_principals_in_role_argsTupleScheme(); + } + } + + private static class get_principals_in_role_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_principals_in_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_principals_in_role_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new GetPrincipalsInRoleRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class get_principals_in_role_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_principals_in_role_result"); + + 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_principals_in_role_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_principals_in_role_resultTupleSchemeFactory()); + } + + private GetPrincipalsInRoleResponse success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetPrincipalsInRoleResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_principals_in_role_result.class, metaDataMap); + } + + public get_principals_in_role_result() { + } + + public get_principals_in_role_result( + GetPrincipalsInRoleResponse success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_principals_in_role_result(get_principals_in_role_result other) { + if (other.isSetSuccess()) { + this.success = new GetPrincipalsInRoleResponse(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_principals_in_role_result deepCopy() { + return new get_principals_in_role_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public GetPrincipalsInRoleResponse getSuccess() { + return this.success; + } + + public void setSuccess(GetPrincipalsInRoleResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((GetPrincipalsInRoleResponse)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_principals_in_role_result) + return this.equals((get_principals_in_role_result)that); + return false; + } + + public boolean equals(get_principals_in_role_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_principals_in_role_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_principals_in_role_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_principals_in_role_resultStandardSchemeFactory implements SchemeFactory { + public get_principals_in_role_resultStandardScheme getScheme() { + return new get_principals_in_role_resultStandardScheme(); + } + } + + private static class get_principals_in_role_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_principals_in_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.STRUCT) { + struct.success = new GetPrincipalsInRoleResponse(); + 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_principals_in_role_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_principals_in_role_resultTupleSchemeFactory implements SchemeFactory { + public get_principals_in_role_resultTupleScheme getScheme() { + return new get_principals_in_role_resultTupleScheme(); + } + } + + private static class get_principals_in_role_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_principals_in_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()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_principals_in_role_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new GetPrincipalsInRoleResponse(); + 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 get_role_grants_for_principal_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_grants_for_principal_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", 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_grants_for_principal_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_role_grants_for_principal_argsTupleSchemeFactory()); + } + + private GetRoleGrantsForPrincipalRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetRoleGrantsForPrincipalRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_role_grants_for_principal_args.class, metaDataMap); + } + + public get_role_grants_for_principal_args() { + } + + public get_role_grants_for_principal_args( + GetRoleGrantsForPrincipalRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public get_role_grants_for_principal_args(get_role_grants_for_principal_args other) { + if (other.isSetRequest()) { + this.request = new GetRoleGrantsForPrincipalRequest(other.request); + } + } + + public get_role_grants_for_principal_args deepCopy() { + return new get_role_grants_for_principal_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public GetRoleGrantsForPrincipalRequest getRequest() { + return this.request; + } + + public void setRequest(GetRoleGrantsForPrincipalRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((GetRoleGrantsForPrincipalRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_role_grants_for_principal_args) + return this.equals((get_role_grants_for_principal_args)that); + return false; + } + + public boolean equals(get_role_grants_for_principal_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(get_role_grants_for_principal_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_role_grants_for_principal_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 get_role_grants_for_principal_argsStandardSchemeFactory implements SchemeFactory { + public get_role_grants_for_principal_argsStandardScheme getScheme() { + return new get_role_grants_for_principal_argsStandardScheme(); + } + } + + private static class get_role_grants_for_principal_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_grants_for_principal_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new GetRoleGrantsForPrincipalRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_grants_for_principal_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_role_grants_for_principal_argsTupleSchemeFactory implements SchemeFactory { + public get_role_grants_for_principal_argsTupleScheme getScheme() { + return new get_role_grants_for_principal_argsTupleScheme(); + } + } + + private static class get_role_grants_for_principal_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_role_grants_for_principal_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_role_grants_for_principal_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new GetRoleGrantsForPrincipalRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class get_role_grants_for_principal_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_role_grants_for_principal_result"); + + 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_role_grants_for_principal_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_role_grants_for_principal_resultTupleSchemeFactory()); + } + + private GetRoleGrantsForPrincipalResponse success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetRoleGrantsForPrincipalResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_role_grants_for_principal_result.class, metaDataMap); + } + + public get_role_grants_for_principal_result() { + } + + public get_role_grants_for_principal_result( + GetRoleGrantsForPrincipalResponse success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_role_grants_for_principal_result(get_role_grants_for_principal_result other) { + if (other.isSetSuccess()) { + this.success = new GetRoleGrantsForPrincipalResponse(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_role_grants_for_principal_result deepCopy() { + return new get_role_grants_for_principal_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public GetRoleGrantsForPrincipalResponse getSuccess() { + return this.success; + } + + public void setSuccess(GetRoleGrantsForPrincipalResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((GetRoleGrantsForPrincipalResponse)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_role_grants_for_principal_result) + return this.equals((get_role_grants_for_principal_result)that); + return false; + } + + public boolean equals(get_role_grants_for_principal_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_role_grants_for_principal_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_role_grants_for_principal_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_role_grants_for_principal_resultStandardSchemeFactory implements SchemeFactory { + public get_role_grants_for_principal_resultStandardScheme getScheme() { + return new get_role_grants_for_principal_resultStandardScheme(); + } + } + + private static class get_role_grants_for_principal_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_role_grants_for_principal_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 GetRoleGrantsForPrincipalResponse(); + 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_role_grants_for_principal_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_role_grants_for_principal_resultTupleSchemeFactory implements SchemeFactory { + public get_role_grants_for_principal_resultTupleScheme getScheme() { + return new get_role_grants_for_principal_resultTupleScheme(); + } + } + + private static class get_role_grants_for_principal_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_role_grants_for_principal_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_role_grants_for_principal_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new GetRoleGrantsForPrincipalResponse(); + 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 get_privilege_set_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_privilege_set_args"); + + 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)1); + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + HIVE_OBJECT((short)1, "hiveObject"), + USER_NAME((short)2, "user_name"), + GROUP_NAMES((short)3, "group_names"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // HIVE_OBJECT + return HIVE_OBJECT; + case 2: // USER_NAME + return USER_NAME; + case 3: // GROUP_NAMES + return GROUP_NAMES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.HIVE_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("hiveObject", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectRef.class))); + tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_privilege_set_args.class, metaDataMap); + } + + public get_privilege_set_args() { + } + + public get_privilege_set_args( + HiveObjectRef hiveObject, + String user_name, + List group_names) + { + this(); + this.hiveObject = hiveObject; + this.user_name = user_name; + this.group_names = group_names; + } + + /** + * Performs a deep copy on other. + */ + public get_privilege_set_args(get_privilege_set_args other) { + if (other.isSetHiveObject()) { + this.hiveObject = new HiveObjectRef(other.hiveObject); + } + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(other.group_names); + this.group_names = __this__group_names; + } + } + + public get_privilege_set_args deepCopy() { + return new get_privilege_set_args(this); + } + + @Override + public void clear() { + this.hiveObject = null; + this.user_name = null; + this.group_names = null; + } + + public HiveObjectRef getHiveObject() { + return this.hiveObject; + } + + public void setHiveObject(HiveObjectRef hiveObject) { + this.hiveObject = hiveObject; + } + + public void unsetHiveObject() { + this.hiveObject = null; + } + + /** Returns true if field hiveObject is set (has been assigned a value) and false otherwise */ + public boolean isSetHiveObject() { + return this.hiveObject != null; + } + + public void setHiveObjectIsSet(boolean value) { + if (!value) { + this.hiveObject = null; + } + } + + public String getUser_name() { + return this.user_name; + } + + public void setUser_name(String user_name) { + this.user_name = user_name; + } + + public void unsetUser_name() { + this.user_name = null; + } + + /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; + } + + public void setUser_nameIsSet(boolean value) { + if (!value) { + this.user_name = null; + } + } + + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); + } + + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); + } + + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); + } + + public List getGroup_names() { + return this.group_names; + } + + public void setGroup_names(List group_names) { + this.group_names = group_names; + } + + public void unsetGroup_names() { + this.group_names = null; + } + + /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; + } + + public void setGroup_namesIsSet(boolean value) { + if (!value) { + this.group_names = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case HIVE_OBJECT: + if (value == null) { + unsetHiveObject(); + } else { + setHiveObject((HiveObjectRef)value); + } + break; + + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case HIVE_OBJECT: + return getHiveObject(); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case HIVE_OBJECT: + return isSetHiveObject(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_privilege_set_args) + return this.equals((get_privilege_set_args)that); + return false; + } + + public boolean equals(get_privilege_set_args that) { + if (that == null) + return false; + + boolean this_present_hiveObject = true && this.isSetHiveObject(); + boolean that_present_hiveObject = true && that.isSetHiveObject(); + if (this_present_hiveObject || that_present_hiveObject) { + if (!(this_present_hiveObject && that_present_hiveObject)) + return false; + if (!this.hiveObject.equals(that.hiveObject)) + return false; + } + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) + return false; + } + + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) + return false; + if (!this.group_names.equals(that.group_names)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_hiveObject = true && (isSetHiveObject()); + list.add(present_hiveObject); + if (present_hiveObject) + list.add(hiveObject); + + boolean present_user_name = true && (isSetUser_name()); + list.add(present_user_name); + if (present_user_name) + list.add(user_name); + + boolean present_group_names = true && (isSetGroup_names()); + list.add(present_group_names); + if (present_group_names) + list.add(group_names); + + return list.hashCode(); + } + + @Override + public int compareTo(get_privilege_set_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(other.isSetHiveObject()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHiveObject()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hiveObject, other.hiveObject); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroup_names()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.group_names); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_privilege_set_args("); + boolean first = true; + + sb.append("hiveObject:"); + if (this.hiveObject == null) { + sb.append("null"); + } else { + sb.append(this.hiveObject); + } + first = false; + if (!first) sb.append(", "); + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_names:"); + if (this.group_names == null) { + sb.append("null"); + } else { + sb.append(this.group_names); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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 _list1206 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list1206.size); + String _elem1207; + for (int _i1208 = 0; _i1208 < _list1206.size; ++_i1208) + { + _elem1207 = iprot.readString(); + struct.group_names.add(_elem1207); + } + 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 _iter1209 : struct.group_names) + { + oprot.writeString(_iter1209); + } + 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 _iter1210 : struct.group_names) + { + oprot.writeString(_iter1210); + } + } + } + } + + @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 _list1211 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list1211.size); + String _elem1212; + for (int _i1213 = 0; _i1213 < _list1211.size; ++_i1213) + { + _elem1212 = iprot.readString(); + struct.group_names.add(_elem1212); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + + } + + public static class get_privilege_set_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_privilege_set_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrincipalPrivilegeSet.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_privilege_set_result.class, metaDataMap); + } + + public get_privilege_set_result() { + } + + public get_privilege_set_result( + PrincipalPrivilegeSet success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_privilege_set_result(get_privilege_set_result other) { + if (other.isSetSuccess()) { + this.success = new PrincipalPrivilegeSet(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_privilege_set_result deepCopy() { + return new get_privilege_set_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public PrincipalPrivilegeSet getSuccess() { + return this.success; + } + + public void setSuccess(PrincipalPrivilegeSet success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((PrincipalPrivilegeSet)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_privilege_set_result) + return this.equals((get_privilege_set_result)that); + return false; + } + + public boolean equals(get_privilege_set_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_privilege_set_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_privilege_set_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_privileges_args"); + + 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 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PRINCIPAL_NAME((short)1, "principal_name"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)2, "principal_type"), + HIVE_OBJECT((short)3, "hiveObject"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; + case 3: // HIVE_OBJECT + return HIVE_OBJECT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.HIVE_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("hiveObject", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectRef.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_privileges_args.class, metaDataMap); + } + + public list_privileges_args() { + } + + public list_privileges_args( + String principal_name, + PrincipalType principal_type, + HiveObjectRef hiveObject) + { + this(); + this.principal_name = principal_name; + this.principal_type = principal_type; + this.hiveObject = hiveObject; + } + + /** + * Performs a deep copy on other. + */ + public list_privileges_args(list_privileges_args other) { + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + if (other.isSetPrincipal_type()) { + this.principal_type = other.principal_type; + } + if (other.isSetHiveObject()) { + this.hiveObject = new HiveObjectRef(other.hiveObject); + } + } + + public list_privileges_args deepCopy() { + return new list_privileges_args(this); + } + + @Override + public void clear() { + this.principal_name = null; + this.principal_type = null; + this.hiveObject = null; + } + + public String getPrincipal_name() { + return this.principal_name; + } + + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; + } + + public void unsetPrincipal_name() { + this.principal_name = null; + } + + /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipal_name() { + return this.principal_name != null; + } + + public void setPrincipal_nameIsSet(boolean value) { + if (!value) { + this.principal_name = null; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipal_type() { + return this.principal_type; + } + + /** + * + * @see PrincipalType + */ + public void setPrincipal_type(PrincipalType principal_type) { + this.principal_type = principal_type; + } + + public void unsetPrincipal_type() { + this.principal_type = null; + } + + /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */ + public boolean isSetPrincipal_type() { + return this.principal_type != null; + } + + public void setPrincipal_typeIsSet(boolean value) { + if (!value) { + this.principal_type = null; + } + } + + public HiveObjectRef getHiveObject() { + return this.hiveObject; + } + + public void setHiveObject(HiveObjectRef hiveObject) { + this.hiveObject = hiveObject; + } + + public void unsetHiveObject() { + this.hiveObject = null; + } + + /** Returns true if field hiveObject is set (has been assigned a value) and false otherwise */ + public boolean isSetHiveObject() { + return this.hiveObject != null; + } + + public void setHiveObjectIsSet(boolean value) { + if (!value) { + this.hiveObject = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipal_name(); + } else { + setPrincipal_name((String)value); + } + break; + + case PRINCIPAL_TYPE: + if (value == null) { + unsetPrincipal_type(); + } else { + setPrincipal_type((PrincipalType)value); + } + break; + + case HIVE_OBJECT: + if (value == null) { + unsetHiveObject(); + } else { + setHiveObject((HiveObjectRef)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRINCIPAL_NAME: + return getPrincipal_name(); + + case PRINCIPAL_TYPE: + return getPrincipal_type(); + + case HIVE_OBJECT: + return getHiveObject(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case PRINCIPAL_TYPE: + return isSetPrincipal_type(); + case HIVE_OBJECT: + return isSetHiveObject(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof list_privileges_args) + return this.equals((list_privileges_args)that); + return false; + } + + public boolean equals(list_privileges_args that) { + if (that == null) + return false; + + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) + return false; + if (!this.principal_name.equals(that.principal_name)) + return false; + } + + boolean this_present_principal_type = true && this.isSetPrincipal_type(); + boolean that_present_principal_type = true && that.isSetPrincipal_type(); + if (this_present_principal_type || that_present_principal_type) { + if (!(this_present_principal_type && that_present_principal_type)) + return false; + if (!this.principal_type.equals(that.principal_type)) + return false; + } + + boolean this_present_hiveObject = true && this.isSetHiveObject(); + boolean that_present_hiveObject = true && that.isSetHiveObject(); + if (this_present_hiveObject || that_present_hiveObject) { + if (!(this_present_hiveObject && that_present_hiveObject)) + return false; + if (!this.hiveObject.equals(that.hiveObject)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_principal_name = true && (isSetPrincipal_name()); + list.add(present_principal_name); + if (present_principal_name) + list.add(principal_name); + + boolean present_principal_type = true && (isSetPrincipal_type()); + list.add(present_principal_type); + if (present_principal_type) + list.add(principal_type.getValue()); + + boolean present_hiveObject = true && (isSetHiveObject()); + list.add(present_hiveObject); + if (present_hiveObject) + list.add(hiveObject); + + return list.hashCode(); + } + + @Override + public int compareTo(list_privileges_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_type()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(other.isSetHiveObject()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHiveObject()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hiveObject, other.hiveObject); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("list_privileges_args("); + boolean first = true; + + sb.append("principal_name:"); + if (this.principal_name == null) { + sb.append("null"); + } else { + sb.append(this.principal_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("principal_type:"); + if (this.principal_type == null) { + sb.append("null"); + } else { + sb.append(this.principal_type); + } + first = false; + if (!first) sb.append(", "); + sb.append("hiveObject:"); + if (this.hiveObject == null) { + sb.append("null"); + } else { + sb.append(this.hiveObject); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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 = org.apache.hadoop.hive.metastore.api.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 = org.apache.hadoop.hive.metastore.api.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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("list_privileges_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HiveObjectPrivilege.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_privileges_result.class, metaDataMap); + } + + public list_privileges_result() { + } + + public list_privileges_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public list_privileges_result(list_privileges_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (HiveObjectPrivilege other_element : other.success) { + __this__success.add(new HiveObjectPrivilege(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public list_privileges_result deepCopy() { + return new list_privileges_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(HiveObjectPrivilege elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof list_privileges_result) + return this.equals((list_privileges_result)that); + return false; + } + + public boolean equals(list_privileges_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(list_privileges_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("list_privileges_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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 _list1214 = iprot.readListBegin(); + struct.success = new ArrayList(_list1214.size); + HiveObjectPrivilege _elem1215; + for (int _i1216 = 0; _i1216 < _list1214.size; ++_i1216) + { + _elem1215 = new HiveObjectPrivilege(); + _elem1215.read(iprot); + struct.success.add(_elem1215); + } + 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 _iter1217 : struct.success) + { + _iter1217.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 _iter1218 : struct.success) + { + _iter1218.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 _list1219 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list1219.size); + HiveObjectPrivilege _elem1220; + for (int _i1221 = 0; _i1221 < _list1219.size; ++_i1221) + { + _elem1220 = new HiveObjectPrivilege(); + _elem1220.read(iprot); + struct.success.add(_elem1220); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_privileges_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PRIVILEGES((short)1, "privileges"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PRIVILEGES + return PRIVILEGES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeBag.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_privileges_args.class, metaDataMap); + } + + public grant_privileges_args() { + } + + public grant_privileges_args( + PrivilegeBag privileges) + { + this(); + this.privileges = privileges; + } + + /** + * Performs a deep copy on other. + */ + public grant_privileges_args(grant_privileges_args other) { + if (other.isSetPrivileges()) { + this.privileges = new PrivilegeBag(other.privileges); + } + } + + public grant_privileges_args deepCopy() { + return new grant_privileges_args(this); + } + + @Override + public void clear() { + this.privileges = null; + } + + public PrivilegeBag getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrivilegeBag privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrivilegeBag)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRIVILEGES: + return getPrivileges(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRIVILEGES: + return isSetPrivileges(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof grant_privileges_args) + return this.equals((grant_privileges_args)that); + return false; + } + + public boolean equals(grant_privileges_args that) { + if (that == null) + return false; + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_privileges = true && (isSetPrivileges()); + list.add(present_privileges); + if (present_privileges) + list.add(privileges); + + return list.hashCode(); + } + + @Override + public int compareTo(grant_privileges_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("grant_privileges_args("); + boolean first = true; + + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_privileges_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_privileges_result.class, metaDataMap); + } + + public grant_privileges_result() { + } + + public grant_privileges_result( + boolean success, + MetaException o1) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public grant_privileges_result(grant_privileges_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public grant_privileges_result deepCopy() { + return new grant_privileges_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof grant_privileges_result) + return this.equals((grant_privileges_result)that); + return false; + } + + public boolean equals(grant_privileges_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(grant_privileges_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("grant_privileges_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 { + // 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_privileges_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PRIVILEGES((short)1, "privileges"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PRIVILEGES + return PRIVILEGES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.PRIVILEGES, new org.apache.thrift.meta_data.FieldMetaData("privileges", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PrivilegeBag.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_privileges_args.class, metaDataMap); + } + + public revoke_privileges_args() { + } + + public revoke_privileges_args( + PrivilegeBag privileges) + { + this(); + this.privileges = privileges; + } + + /** + * Performs a deep copy on other. + */ + public revoke_privileges_args(revoke_privileges_args other) { + if (other.isSetPrivileges()) { + this.privileges = new PrivilegeBag(other.privileges); + } + } + + public revoke_privileges_args deepCopy() { + return new revoke_privileges_args(this); + } + + @Override + public void clear() { + this.privileges = null; + } + + public PrivilegeBag getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrivilegeBag privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been assigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrivilegeBag)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRIVILEGES: + return getPrivileges(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRIVILEGES: + return isSetPrivileges(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof revoke_privileges_args) + return this.equals((revoke_privileges_args)that); + return false; + } + + public boolean equals(revoke_privileges_args that) { + if (that == null) + return false; + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_privileges = true && (isSetPrivileges()); + list.add(present_privileges); + if (present_privileges) + list.add(privileges); + + return list.hashCode(); + } + + @Override + public int compareTo(revoke_privileges_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(other.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privileges, other.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("revoke_privileges_args("); + boolean first = true; + + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("revoke_privileges_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(revoke_privileges_result.class, metaDataMap); + } + + public revoke_privileges_result() { + } + + public revoke_privileges_result( + boolean success, + MetaException o1) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public revoke_privileges_result(revoke_privileges_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public revoke_privileges_result deepCopy() { + return new revoke_privileges_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof revoke_privileges_result) + return this.equals((revoke_privileges_result)that); + return false; + } + + public boolean equals(revoke_privileges_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(revoke_privileges_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("revoke_privileges_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 { + // 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 grant_revoke_privileges_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_privileges_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new grant_revoke_privileges_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_revoke_privileges_argsTupleSchemeFactory()); + } + + private GrantRevokePrivilegeRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GrantRevokePrivilegeRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_revoke_privileges_args.class, metaDataMap); + } + + public grant_revoke_privileges_args() { + } + + public grant_revoke_privileges_args( + GrantRevokePrivilegeRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public grant_revoke_privileges_args(grant_revoke_privileges_args other) { + if (other.isSetRequest()) { + this.request = new GrantRevokePrivilegeRequest(other.request); + } + } + + public grant_revoke_privileges_args deepCopy() { + return new grant_revoke_privileges_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public GrantRevokePrivilegeRequest getRequest() { + return this.request; + } + + public void setRequest(GrantRevokePrivilegeRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((GrantRevokePrivilegeRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof grant_revoke_privileges_args) + return this.equals((grant_revoke_privileges_args)that); + return false; + } + + public boolean equals(grant_revoke_privileges_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(grant_revoke_privileges_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("grant_revoke_privileges_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 grant_revoke_privileges_argsStandardSchemeFactory implements SchemeFactory { + public grant_revoke_privileges_argsStandardScheme getScheme() { + return new grant_revoke_privileges_argsStandardScheme(); + } + } + + private static class grant_revoke_privileges_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new GrantRevokePrivilegeRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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_revoke_privileges_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class grant_revoke_privileges_argsTupleSchemeFactory implements SchemeFactory { + public grant_revoke_privileges_argsTupleScheme getScheme() { + return new grant_revoke_privileges_argsTupleScheme(); + } + } + + private static class grant_revoke_privileges_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new GrantRevokePrivilegeRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class grant_revoke_privileges_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("grant_revoke_privileges_result"); + + 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 grant_revoke_privileges_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new grant_revoke_privileges_resultTupleSchemeFactory()); + } + + private GrantRevokePrivilegeResponse success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GrantRevokePrivilegeResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grant_revoke_privileges_result.class, metaDataMap); + } + + public grant_revoke_privileges_result() { + } + + public grant_revoke_privileges_result( + GrantRevokePrivilegeResponse success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public grant_revoke_privileges_result(grant_revoke_privileges_result other) { + if (other.isSetSuccess()) { + this.success = new GrantRevokePrivilegeResponse(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public grant_revoke_privileges_result deepCopy() { + return new grant_revoke_privileges_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public GrantRevokePrivilegeResponse getSuccess() { + return this.success; + } + + public void setSuccess(GrantRevokePrivilegeResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((GrantRevokePrivilegeResponse)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof grant_revoke_privileges_result) + return this.equals((grant_revoke_privileges_result)that); + return false; + } + + public boolean equals(grant_revoke_privileges_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(grant_revoke_privileges_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("grant_revoke_privileges_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 grant_revoke_privileges_resultStandardSchemeFactory implements SchemeFactory { + public grant_revoke_privileges_resultStandardScheme getScheme() { + return new grant_revoke_privileges_resultStandardScheme(); + } + } + + private static class grant_revoke_privileges_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, grant_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.STRUCT) { + struct.success = new GrantRevokePrivilegeResponse(); + 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, grant_revoke_privileges_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 grant_revoke_privileges_resultTupleSchemeFactory implements SchemeFactory { + public grant_revoke_privileges_resultTupleScheme getScheme() { + return new grant_revoke_privileges_resultTupleScheme(); + } + } + + private static class grant_revoke_privileges_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, grant_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()) { + struct.success.write(oprot); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, grant_revoke_privileges_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new GrantRevokePrivilegeResponse(); + 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 set_ugi_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_ugi_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_NAME((short)1, "user_name"), + GROUP_NAMES((short)2, "group_names"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_NAME + return USER_NAME; + case 2: // GROUP_NAMES + return GROUP_NAMES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_ugi_args.class, metaDataMap); + } + + public set_ugi_args() { + } + + public set_ugi_args( + String user_name, + List group_names) + { + this(); + this.user_name = user_name; + this.group_names = group_names; + } + + /** + * Performs a deep copy on other. + */ + public set_ugi_args(set_ugi_args other) { + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(other.group_names); + this.group_names = __this__group_names; + } + } + + public set_ugi_args deepCopy() { + return new set_ugi_args(this); + } + + @Override + public void clear() { + this.user_name = null; + this.group_names = null; + } + + public String getUser_name() { + return this.user_name; + } + + public void setUser_name(String user_name) { + this.user_name = user_name; + } + + public void unsetUser_name() { + this.user_name = null; + } + + /** Returns true if field user_name is set (has been assigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; + } + + public void setUser_nameIsSet(boolean value) { + if (!value) { + this.user_name = null; + } + } + + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); + } + + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); + } + + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); + } + + public List getGroup_names() { + return this.group_names; + } + + public void setGroup_names(List group_names) { + this.group_names = group_names; + } + + public void unsetGroup_names() { + this.group_names = null; + } + + /** Returns true if field group_names is set (has been assigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; + } + + public void setGroup_namesIsSet(boolean value) { + if (!value) { + this.group_names = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof set_ugi_args) + return this.equals((set_ugi_args)that); + return false; + } + + public boolean equals(set_ugi_args that) { + if (that == null) + return false; + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) + return false; + } + + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) + return false; + if (!this.group_names.equals(that.group_names)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_user_name = true && (isSetUser_name()); + list.add(present_user_name); + if (present_user_name) + list.add(user_name); + + boolean present_group_names = true && (isSetGroup_names()); + list.add(present_group_names); + if (present_group_names) + list.add(group_names); + + return list.hashCode(); + } + + @Override + public int compareTo(set_ugi_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(other.isSetUser_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_name, other.user_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(other.isSetGroup_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroup_names()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_names, other.group_names); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("set_ugi_args("); + boolean first = true; + + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_names:"); + if (this.group_names == null) { + sb.append("null"); + } else { + sb.append(this.group_names); + } + 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 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 _list1222 = iprot.readListBegin(); + struct.group_names = new ArrayList(_list1222.size); + String _elem1223; + for (int _i1224 = 0; _i1224 < _list1222.size; ++_i1224) + { + _elem1223 = iprot.readString(); + struct.group_names.add(_elem1223); + } + 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 _iter1225 : struct.group_names) + { + oprot.writeString(_iter1225); + } + 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 _iter1226 : struct.group_names) + { + oprot.writeString(_iter1226); + } + } + } + } + + @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 _list1227 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.group_names = new ArrayList(_list1227.size); + String _elem1228; + for (int _i1229 = 0; _i1229 < _list1227.size; ++_i1229) + { + _elem1228 = iprot.readString(); + struct.group_names.add(_elem1228); + } + } + struct.setGroup_namesIsSet(true); + } + } + } + + } + + public static class set_ugi_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("set_ugi_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(set_ugi_result.class, metaDataMap); + } + + public set_ugi_result() { + } + + public set_ugi_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public set_ugi_result(set_ugi_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public set_ugi_result deepCopy() { + return new set_ugi_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof set_ugi_result) + return this.equals((set_ugi_result)that); + return false; + } + + public boolean equals(set_ugi_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(set_ugi_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("set_ugi_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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 _list1230 = iprot.readListBegin(); + struct.success = new ArrayList(_list1230.size); + String _elem1231; + for (int _i1232 = 0; _i1232 < _list1230.size; ++_i1232) + { + _elem1231 = iprot.readString(); + struct.success.add(_elem1231); + } + 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 _iter1233 : struct.success) + { + oprot.writeString(_iter1233); + } + 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 _iter1234 : struct.success) + { + oprot.writeString(_iter1234); + } + } + } + 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 _list1235 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list1235.size); + String _elem1236; + for (int _i1237 = 0; _i1237 < _list1235.size; ++_i1237) + { + _elem1236 = iprot.readString(); + struct.success.add(_elem1236); + } + } + 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_delegation_token_args"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TOKEN_OWNER((short)1, "token_owner"), + RENEWER_KERBEROS_PRINCIPAL_NAME((short)2, "renewer_kerberos_principal_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TOKEN_OWNER + return TOKEN_OWNER; + case 2: // RENEWER_KERBEROS_PRINCIPAL_NAME + return RENEWER_KERBEROS_PRINCIPAL_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TOKEN_OWNER, new org.apache.thrift.meta_data.FieldMetaData("token_owner", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.RENEWER_KERBEROS_PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("renewer_kerberos_principal_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_delegation_token_args.class, metaDataMap); + } + + public get_delegation_token_args() { + } + + public get_delegation_token_args( + String token_owner, + String renewer_kerberos_principal_name) + { + this(); + this.token_owner = token_owner; + this.renewer_kerberos_principal_name = renewer_kerberos_principal_name; + } + + /** + * Performs a deep copy on other. + */ + public get_delegation_token_args(get_delegation_token_args other) { + if (other.isSetToken_owner()) { + this.token_owner = other.token_owner; + } + if (other.isSetRenewer_kerberos_principal_name()) { + this.renewer_kerberos_principal_name = other.renewer_kerberos_principal_name; + } + } + + public get_delegation_token_args deepCopy() { + return new get_delegation_token_args(this); + } + + @Override + public void clear() { + this.token_owner = null; + this.renewer_kerberos_principal_name = null; + } + + public String getToken_owner() { + return this.token_owner; + } + + public void setToken_owner(String token_owner) { + this.token_owner = token_owner; + } + + public void unsetToken_owner() { + this.token_owner = null; + } + + /** Returns true if field token_owner is set (has been assigned a value) and false otherwise */ + public boolean isSetToken_owner() { + return this.token_owner != null; + } + + public void setToken_ownerIsSet(boolean value) { + if (!value) { + this.token_owner = null; + } + } + + public String getRenewer_kerberos_principal_name() { + return this.renewer_kerberos_principal_name; + } + + public void setRenewer_kerberos_principal_name(String renewer_kerberos_principal_name) { + this.renewer_kerberos_principal_name = renewer_kerberos_principal_name; + } + + public void unsetRenewer_kerberos_principal_name() { + this.renewer_kerberos_principal_name = null; + } + + /** Returns true if field renewer_kerberos_principal_name is set (has been assigned a value) and false otherwise */ + public boolean isSetRenewer_kerberos_principal_name() { + return this.renewer_kerberos_principal_name != null; + } + + public void setRenewer_kerberos_principal_nameIsSet(boolean value) { + if (!value) { + this.renewer_kerberos_principal_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TOKEN_OWNER: + if (value == null) { + unsetToken_owner(); + } else { + setToken_owner((String)value); + } + break; + + case RENEWER_KERBEROS_PRINCIPAL_NAME: + if (value == null) { + unsetRenewer_kerberos_principal_name(); + } else { + setRenewer_kerberos_principal_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TOKEN_OWNER: + return getToken_owner(); + + case RENEWER_KERBEROS_PRINCIPAL_NAME: + return getRenewer_kerberos_principal_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TOKEN_OWNER: + return isSetToken_owner(); + case RENEWER_KERBEROS_PRINCIPAL_NAME: + return isSetRenewer_kerberos_principal_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_delegation_token_args) + return this.equals((get_delegation_token_args)that); + return false; + } + + public boolean equals(get_delegation_token_args that) { + if (that == null) + return false; + + boolean this_present_token_owner = true && this.isSetToken_owner(); + boolean that_present_token_owner = true && that.isSetToken_owner(); + if (this_present_token_owner || that_present_token_owner) { + if (!(this_present_token_owner && that_present_token_owner)) + return false; + if (!this.token_owner.equals(that.token_owner)) + return false; + } + + boolean this_present_renewer_kerberos_principal_name = true && this.isSetRenewer_kerberos_principal_name(); + boolean that_present_renewer_kerberos_principal_name = true && that.isSetRenewer_kerberos_principal_name(); + if (this_present_renewer_kerberos_principal_name || that_present_renewer_kerberos_principal_name) { + if (!(this_present_renewer_kerberos_principal_name && that_present_renewer_kerberos_principal_name)) + return false; + if (!this.renewer_kerberos_principal_name.equals(that.renewer_kerberos_principal_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_token_owner = true && (isSetToken_owner()); + list.add(present_token_owner); + if (present_token_owner) + list.add(token_owner); + + boolean present_renewer_kerberos_principal_name = true && (isSetRenewer_kerberos_principal_name()); + list.add(present_renewer_kerberos_principal_name); + if (present_renewer_kerberos_principal_name) + list.add(renewer_kerberos_principal_name); + + return list.hashCode(); + } + + @Override + public int compareTo(get_delegation_token_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetToken_owner()).compareTo(other.isSetToken_owner()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetToken_owner()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_owner, other.token_owner); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRenewer_kerberos_principal_name()).compareTo(other.isSetRenewer_kerberos_principal_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRenewer_kerberos_principal_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.renewer_kerberos_principal_name, other.renewer_kerberos_principal_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_delegation_token_args("); + boolean first = true; + + sb.append("token_owner:"); + if (this.token_owner == null) { + sb.append("null"); + } else { + sb.append(this.token_owner); + } + first = false; + if (!first) sb.append(", "); + sb.append("renewer_kerberos_principal_name:"); + if (this.renewer_kerberos_principal_name == null) { + sb.append("null"); + } else { + sb.append(this.renewer_kerberos_principal_name); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_delegation_token_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_delegation_token_result.class, metaDataMap); + } + + public get_delegation_token_result() { + } + + public get_delegation_token_result( + String success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_delegation_token_result(get_delegation_token_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_delegation_token_result deepCopy() { + return new get_delegation_token_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public String getSuccess() { + return this.success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((String)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_delegation_token_result) + return this.equals((get_delegation_token_result)that); + return false; + } + + public boolean equals(get_delegation_token_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_delegation_token_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_delegation_token_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("renew_delegation_token_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TOKEN_STR_FORM((short)1, "token_str_form"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TOKEN_STR_FORM + return TOKEN_STR_FORM; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TOKEN_STR_FORM, new org.apache.thrift.meta_data.FieldMetaData("token_str_form", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(renew_delegation_token_args.class, metaDataMap); + } + + public renew_delegation_token_args() { + } + + public renew_delegation_token_args( + String token_str_form) + { + this(); + this.token_str_form = token_str_form; + } + + /** + * Performs a deep copy on other. + */ + public renew_delegation_token_args(renew_delegation_token_args other) { + if (other.isSetToken_str_form()) { + this.token_str_form = other.token_str_form; + } + } + + public renew_delegation_token_args deepCopy() { + return new renew_delegation_token_args(this); + } + + @Override + public void clear() { + this.token_str_form = null; + } + + public String getToken_str_form() { + return this.token_str_form; + } + + public void setToken_str_form(String token_str_form) { + this.token_str_form = token_str_form; + } + + public void unsetToken_str_form() { + this.token_str_form = null; + } + + /** Returns true if field token_str_form is set (has been assigned a value) and false otherwise */ + public boolean isSetToken_str_form() { + return this.token_str_form != null; + } + + public void setToken_str_formIsSet(boolean value) { + if (!value) { + this.token_str_form = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TOKEN_STR_FORM: + if (value == null) { + unsetToken_str_form(); + } else { + setToken_str_form((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TOKEN_STR_FORM: + return getToken_str_form(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TOKEN_STR_FORM: + return isSetToken_str_form(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof renew_delegation_token_args) + return this.equals((renew_delegation_token_args)that); + return false; + } + + public boolean equals(renew_delegation_token_args that) { + if (that == null) + return false; + + boolean this_present_token_str_form = true && this.isSetToken_str_form(); + boolean that_present_token_str_form = true && that.isSetToken_str_form(); + if (this_present_token_str_form || that_present_token_str_form) { + if (!(this_present_token_str_form && that_present_token_str_form)) + return false; + if (!this.token_str_form.equals(that.token_str_form)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_token_str_form = true && (isSetToken_str_form()); + list.add(present_token_str_form); + if (present_token_str_form) + list.add(token_str_form); + + return list.hashCode(); + } + + @Override + public int compareTo(renew_delegation_token_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetToken_str_form()).compareTo(other.isSetToken_str_form()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetToken_str_form()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_str_form, other.token_str_form); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("renew_delegation_token_args("); + boolean first = true; + + sb.append("token_str_form:"); + if (this.token_str_form == null) { + sb.append("null"); + } else { + sb.append(this.token_str_form); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("renew_delegation_token_result"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(renew_delegation_token_result.class, metaDataMap); + } + + public renew_delegation_token_result() { + } + + public renew_delegation_token_result( + long success, + MetaException o1) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public renew_delegation_token_result(renew_delegation_token_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public renew_delegation_token_result deepCopy() { + return new renew_delegation_token_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.o1 = null; + } + + public long getSuccess() { + return this.success; + } + + public void setSuccess(long success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Long)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof renew_delegation_token_result) + return this.equals((renew_delegation_token_result)that); + return false; + } + + public boolean equals(renew_delegation_token_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(renew_delegation_token_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("renew_delegation_token_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 { + // 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancel_delegation_token_args"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TOKEN_STR_FORM((short)1, "token_str_form"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TOKEN_STR_FORM + return TOKEN_STR_FORM; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TOKEN_STR_FORM, new org.apache.thrift.meta_data.FieldMetaData("token_str_form", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancel_delegation_token_args.class, metaDataMap); + } + + public cancel_delegation_token_args() { + } + + public cancel_delegation_token_args( + String token_str_form) + { + this(); + this.token_str_form = token_str_form; + } + + /** + * Performs a deep copy on other. + */ + public cancel_delegation_token_args(cancel_delegation_token_args other) { + if (other.isSetToken_str_form()) { + this.token_str_form = other.token_str_form; + } + } + + public cancel_delegation_token_args deepCopy() { + return new cancel_delegation_token_args(this); + } + + @Override + public void clear() { + this.token_str_form = null; + } + + public String getToken_str_form() { + return this.token_str_form; + } + + public void setToken_str_form(String token_str_form) { + this.token_str_form = token_str_form; + } + + public void unsetToken_str_form() { + this.token_str_form = null; + } + + /** Returns true if field token_str_form is set (has been assigned a value) and false otherwise */ + public boolean isSetToken_str_form() { + return this.token_str_form != null; + } + + public void setToken_str_formIsSet(boolean value) { + if (!value) { + this.token_str_form = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TOKEN_STR_FORM: + if (value == null) { + unsetToken_str_form(); + } else { + setToken_str_form((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TOKEN_STR_FORM: + return getToken_str_form(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TOKEN_STR_FORM: + return isSetToken_str_form(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof cancel_delegation_token_args) + return this.equals((cancel_delegation_token_args)that); + return false; + } + + public boolean equals(cancel_delegation_token_args that) { + if (that == null) + return false; + + boolean this_present_token_str_form = true && this.isSetToken_str_form(); + boolean that_present_token_str_form = true && that.isSetToken_str_form(); + if (this_present_token_str_form || that_present_token_str_form) { + if (!(this_present_token_str_form && that_present_token_str_form)) + return false; + if (!this.token_str_form.equals(that.token_str_form)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_token_str_form = true && (isSetToken_str_form()); + list.add(present_token_str_form); + if (present_token_str_form) + list.add(token_str_form); + + return list.hashCode(); + } + + @Override + public int compareTo(cancel_delegation_token_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetToken_str_form()).compareTo(other.isSetToken_str_form()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetToken_str_form()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_str_form, other.token_str_form); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("cancel_delegation_token_args("); + boolean first = true; + + sb.append("token_str_form:"); + if (this.token_str_form == null) { + sb.append("null"); + } else { + sb.append(this.token_str_form); + } + 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 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, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancel_delegation_token_result"); + + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancel_delegation_token_result.class, metaDataMap); + } + + public cancel_delegation_token_result() { + } + + public cancel_delegation_token_result( + MetaException o1) + { + this(); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public cancel_delegation_token_result(cancel_delegation_token_result other) { + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public cancel_delegation_token_result deepCopy() { + return new cancel_delegation_token_result(this); + } + + @Override + public void clear() { + this.o1 = null; + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof cancel_delegation_token_result) + return this.equals((cancel_delegation_token_result)that); + return false; + } + + public boolean equals(cancel_delegation_token_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(cancel_delegation_token_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("cancel_delegation_token_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 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); + } + } + } + + } + + public static class add_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_token_args"); + + private static final org.apache.thrift.protocol.TField TOKEN_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_identifier", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField DELEGATION_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("delegation_token", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_token_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_token_argsTupleSchemeFactory()); + } + + private String token_identifier; // required + private String delegation_token; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TOKEN_IDENTIFIER((short)1, "token_identifier"), + DELEGATION_TOKEN((short)2, "delegation_token"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TOKEN_IDENTIFIER + return TOKEN_IDENTIFIER; + case 2: // DELEGATION_TOKEN + return DELEGATION_TOKEN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TOKEN_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("token_identifier", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DELEGATION_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("delegation_token", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_token_args.class, metaDataMap); + } + + public add_token_args() { + } + + public add_token_args( + String token_identifier, + String delegation_token) + { + this(); + this.token_identifier = token_identifier; + this.delegation_token = delegation_token; + } + + /** + * Performs a deep copy on other. + */ + public add_token_args(add_token_args other) { + if (other.isSetToken_identifier()) { + this.token_identifier = other.token_identifier; + } + if (other.isSetDelegation_token()) { + this.delegation_token = other.delegation_token; + } + } + + public add_token_args deepCopy() { + return new add_token_args(this); + } + + @Override + public void clear() { + this.token_identifier = null; + this.delegation_token = null; + } + + public String getToken_identifier() { + return this.token_identifier; + } + + public void setToken_identifier(String token_identifier) { + this.token_identifier = token_identifier; + } + + public void unsetToken_identifier() { + this.token_identifier = null; + } + + /** Returns true if field token_identifier is set (has been assigned a value) and false otherwise */ + public boolean isSetToken_identifier() { + return this.token_identifier != null; + } + + public void setToken_identifierIsSet(boolean value) { + if (!value) { + this.token_identifier = null; + } + } + + public String getDelegation_token() { + return this.delegation_token; + } + + public void setDelegation_token(String delegation_token) { + this.delegation_token = delegation_token; + } + + public void unsetDelegation_token() { + this.delegation_token = null; + } + + /** Returns true if field delegation_token is set (has been assigned a value) and false otherwise */ + public boolean isSetDelegation_token() { + return this.delegation_token != null; + } + + public void setDelegation_tokenIsSet(boolean value) { + if (!value) { + this.delegation_token = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TOKEN_IDENTIFIER: + if (value == null) { + unsetToken_identifier(); + } else { + setToken_identifier((String)value); + } + break; + + case DELEGATION_TOKEN: + if (value == null) { + unsetDelegation_token(); + } else { + setDelegation_token((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TOKEN_IDENTIFIER: + return getToken_identifier(); + + case DELEGATION_TOKEN: + return getDelegation_token(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TOKEN_IDENTIFIER: + return isSetToken_identifier(); + case DELEGATION_TOKEN: + return isSetDelegation_token(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_token_args) + return this.equals((add_token_args)that); + return false; + } + + public boolean equals(add_token_args that) { + if (that == null) + return false; + + boolean this_present_token_identifier = true && this.isSetToken_identifier(); + boolean that_present_token_identifier = true && that.isSetToken_identifier(); + if (this_present_token_identifier || that_present_token_identifier) { + if (!(this_present_token_identifier && that_present_token_identifier)) + return false; + if (!this.token_identifier.equals(that.token_identifier)) + return false; + } + + boolean this_present_delegation_token = true && this.isSetDelegation_token(); + boolean that_present_delegation_token = true && that.isSetDelegation_token(); + if (this_present_delegation_token || that_present_delegation_token) { + if (!(this_present_delegation_token && that_present_delegation_token)) + return false; + if (!this.delegation_token.equals(that.delegation_token)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_token_identifier = true && (isSetToken_identifier()); + list.add(present_token_identifier); + if (present_token_identifier) + list.add(token_identifier); + + boolean present_delegation_token = true && (isSetDelegation_token()); + list.add(present_delegation_token); + if (present_delegation_token) + list.add(delegation_token); + + return list.hashCode(); + } + + @Override + public int compareTo(add_token_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetToken_identifier()).compareTo(other.isSetToken_identifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetToken_identifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_identifier, other.token_identifier); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDelegation_token()).compareTo(other.isSetDelegation_token()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDelegation_token()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegation_token, other.delegation_token); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_token_args("); + boolean first = true; + + sb.append("token_identifier:"); + if (this.token_identifier == null) { + sb.append("null"); + } else { + sb.append(this.token_identifier); + } + first = false; + if (!first) sb.append(", "); + sb.append("delegation_token:"); + if (this.delegation_token == null) { + sb.append("null"); + } else { + sb.append(this.delegation_token); + } + 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 add_token_argsStandardSchemeFactory implements SchemeFactory { + public add_token_argsStandardScheme getScheme() { + return new add_token_argsStandardScheme(); + } + } + + private static class add_token_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_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_IDENTIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.token_identifier = iprot.readString(); + struct.setToken_identifierIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DELEGATION_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.delegation_token = iprot.readString(); + struct.setDelegation_tokenIsSet(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_token_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.token_identifier != null) { + oprot.writeFieldBegin(TOKEN_IDENTIFIER_FIELD_DESC); + oprot.writeString(struct.token_identifier); + oprot.writeFieldEnd(); + } + if (struct.delegation_token != null) { + oprot.writeFieldBegin(DELEGATION_TOKEN_FIELD_DESC); + oprot.writeString(struct.delegation_token); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_token_argsTupleSchemeFactory implements SchemeFactory { + public add_token_argsTupleScheme getScheme() { + return new add_token_argsTupleScheme(); + } + } + + private static class add_token_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetToken_identifier()) { + optionals.set(0); + } + if (struct.isSetDelegation_token()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetToken_identifier()) { + oprot.writeString(struct.token_identifier); + } + if (struct.isSetDelegation_token()) { + oprot.writeString(struct.delegation_token); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.token_identifier = iprot.readString(); + struct.setToken_identifierIsSet(true); + } + if (incoming.get(1)) { + struct.delegation_token = iprot.readString(); + struct.setDelegation_tokenIsSet(true); + } + } + } + + } + + public static class add_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_token_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_token_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_token_resultTupleSchemeFactory()); + } + + private boolean success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_token_result.class, metaDataMap); + } + + public add_token_result() { + } + + public add_token_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public add_token_result(add_token_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public add_token_result deepCopy() { + return new add_token_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_token_result) + return this.equals((add_token_result)that); + return false; + } + + public boolean equals(add_token_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(add_token_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_token_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + 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 { + // 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_token_resultStandardSchemeFactory implements SchemeFactory { + public add_token_resultStandardScheme getScheme() { + return new add_token_resultStandardScheme(); + } + } + + private static class add_token_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_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.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(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_token_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_token_resultTupleSchemeFactory implements SchemeFactory { + public add_token_resultTupleScheme getScheme() { + return new add_token_resultTupleScheme(); + } + } + + private static class add_token_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class remove_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_token_args"); + + private static final org.apache.thrift.protocol.TField TOKEN_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_identifier", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new remove_token_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new remove_token_argsTupleSchemeFactory()); + } + + private String token_identifier; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TOKEN_IDENTIFIER((short)1, "token_identifier"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TOKEN_IDENTIFIER + return TOKEN_IDENTIFIER; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TOKEN_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("token_identifier", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_token_args.class, metaDataMap); + } + + public remove_token_args() { + } + + public remove_token_args( + String token_identifier) + { + this(); + this.token_identifier = token_identifier; + } + + /** + * Performs a deep copy on other. + */ + public remove_token_args(remove_token_args other) { + if (other.isSetToken_identifier()) { + this.token_identifier = other.token_identifier; + } + } + + public remove_token_args deepCopy() { + return new remove_token_args(this); + } + + @Override + public void clear() { + this.token_identifier = null; + } + + public String getToken_identifier() { + return this.token_identifier; + } + + public void setToken_identifier(String token_identifier) { + this.token_identifier = token_identifier; + } + + public void unsetToken_identifier() { + this.token_identifier = null; + } + + /** Returns true if field token_identifier is set (has been assigned a value) and false otherwise */ + public boolean isSetToken_identifier() { + return this.token_identifier != null; + } + + public void setToken_identifierIsSet(boolean value) { + if (!value) { + this.token_identifier = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TOKEN_IDENTIFIER: + if (value == null) { + unsetToken_identifier(); + } else { + setToken_identifier((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TOKEN_IDENTIFIER: + return getToken_identifier(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TOKEN_IDENTIFIER: + return isSetToken_identifier(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof remove_token_args) + return this.equals((remove_token_args)that); + return false; + } + + public boolean equals(remove_token_args that) { + if (that == null) + return false; + + boolean this_present_token_identifier = true && this.isSetToken_identifier(); + boolean that_present_token_identifier = true && that.isSetToken_identifier(); + if (this_present_token_identifier || that_present_token_identifier) { + if (!(this_present_token_identifier && that_present_token_identifier)) + return false; + if (!this.token_identifier.equals(that.token_identifier)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_token_identifier = true && (isSetToken_identifier()); + list.add(present_token_identifier); + if (present_token_identifier) + list.add(token_identifier); + + return list.hashCode(); + } + + @Override + public int compareTo(remove_token_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetToken_identifier()).compareTo(other.isSetToken_identifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetToken_identifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_identifier, other.token_identifier); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("remove_token_args("); + boolean first = true; + + sb.append("token_identifier:"); + if (this.token_identifier == null) { + sb.append("null"); + } else { + sb.append(this.token_identifier); + } + 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 remove_token_argsStandardSchemeFactory implements SchemeFactory { + public remove_token_argsStandardScheme getScheme() { + return new remove_token_argsStandardScheme(); + } + } + + private static class remove_token_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, remove_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_IDENTIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.token_identifier = iprot.readString(); + struct.setToken_identifierIsSet(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, remove_token_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.token_identifier != null) { + oprot.writeFieldBegin(TOKEN_IDENTIFIER_FIELD_DESC); + oprot.writeString(struct.token_identifier); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class remove_token_argsTupleSchemeFactory implements SchemeFactory { + public remove_token_argsTupleScheme getScheme() { + return new remove_token_argsTupleScheme(); + } + } + + private static class remove_token_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, remove_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetToken_identifier()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetToken_identifier()) { + oprot.writeString(struct.token_identifier); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, remove_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.token_identifier = iprot.readString(); + struct.setToken_identifierIsSet(true); + } + } + } + + } + + public static class remove_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_token_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new remove_token_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new remove_token_resultTupleSchemeFactory()); + } + + private boolean success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_token_result.class, metaDataMap); + } + + public remove_token_result() { + } + + public remove_token_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public remove_token_result(remove_token_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public remove_token_result deepCopy() { + return new remove_token_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof remove_token_result) + return this.equals((remove_token_result)that); + return false; + } + + public boolean equals(remove_token_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(remove_token_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("remove_token_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + 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 { + // 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 remove_token_resultStandardSchemeFactory implements SchemeFactory { + public remove_token_resultStandardScheme getScheme() { + return new remove_token_resultStandardScheme(); + } + } + + private static class remove_token_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, remove_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.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(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, remove_token_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class remove_token_resultTupleSchemeFactory implements SchemeFactory { + public remove_token_resultTupleScheme getScheme() { + return new remove_token_resultTupleScheme(); + } + } + + private static class remove_token_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, remove_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, remove_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class get_token_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_token_args"); + + private static final org.apache.thrift.protocol.TField TOKEN_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("token_identifier", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_token_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_token_argsTupleSchemeFactory()); + } + + private String token_identifier; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TOKEN_IDENTIFIER((short)1, "token_identifier"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TOKEN_IDENTIFIER + return TOKEN_IDENTIFIER; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TOKEN_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("token_identifier", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_token_args.class, metaDataMap); + } + + public get_token_args() { + } + + public get_token_args( + String token_identifier) + { + this(); + this.token_identifier = token_identifier; + } + + /** + * Performs a deep copy on other. + */ + public get_token_args(get_token_args other) { + if (other.isSetToken_identifier()) { + this.token_identifier = other.token_identifier; + } + } + + public get_token_args deepCopy() { + return new get_token_args(this); + } + + @Override + public void clear() { + this.token_identifier = null; + } + + public String getToken_identifier() { + return this.token_identifier; + } + + public void setToken_identifier(String token_identifier) { + this.token_identifier = token_identifier; + } + + public void unsetToken_identifier() { + this.token_identifier = null; + } + + /** Returns true if field token_identifier is set (has been assigned a value) and false otherwise */ + public boolean isSetToken_identifier() { + return this.token_identifier != null; + } + + public void setToken_identifierIsSet(boolean value) { + if (!value) { + this.token_identifier = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TOKEN_IDENTIFIER: + if (value == null) { + unsetToken_identifier(); + } else { + setToken_identifier((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TOKEN_IDENTIFIER: + return getToken_identifier(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TOKEN_IDENTIFIER: + return isSetToken_identifier(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_token_args) + return this.equals((get_token_args)that); + return false; + } + + public boolean equals(get_token_args that) { + if (that == null) + return false; + + boolean this_present_token_identifier = true && this.isSetToken_identifier(); + boolean that_present_token_identifier = true && that.isSetToken_identifier(); + if (this_present_token_identifier || that_present_token_identifier) { + if (!(this_present_token_identifier && that_present_token_identifier)) + return false; + if (!this.token_identifier.equals(that.token_identifier)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_token_identifier = true && (isSetToken_identifier()); + list.add(present_token_identifier); + if (present_token_identifier) + list.add(token_identifier); + + return list.hashCode(); + } + + @Override + public int compareTo(get_token_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetToken_identifier()).compareTo(other.isSetToken_identifier()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetToken_identifier()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token_identifier, other.token_identifier); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_token_args("); + boolean first = true; + + sb.append("token_identifier:"); + if (this.token_identifier == null) { + sb.append("null"); + } else { + sb.append(this.token_identifier); + } + 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 get_token_argsStandardSchemeFactory implements SchemeFactory { + public get_token_argsStandardScheme getScheme() { + return new get_token_argsStandardScheme(); + } + } + + private static class get_token_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_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_IDENTIFIER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.token_identifier = iprot.readString(); + struct.setToken_identifierIsSet(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_token_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.token_identifier != null) { + oprot.writeFieldBegin(TOKEN_IDENTIFIER_FIELD_DESC); + oprot.writeString(struct.token_identifier); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_token_argsTupleSchemeFactory implements SchemeFactory { + public get_token_argsTupleScheme getScheme() { + return new get_token_argsTupleScheme(); + } + } + + private static class get_token_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetToken_identifier()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetToken_identifier()) { + oprot.writeString(struct.token_identifier); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_token_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.token_identifier = iprot.readString(); + struct.setToken_identifierIsSet(true); + } + } + } + + } + + public static class get_token_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_token_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_token_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_token_resultTupleSchemeFactory()); + } + + private String success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_token_result.class, metaDataMap); + } + + public get_token_result() { + } + + public get_token_result( + String success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public get_token_result(get_token_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + } + + public get_token_result deepCopy() { + return new get_token_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public String getSuccess() { + return this.success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_token_result) + return this.equals((get_token_result)that); + return false; + } + + public boolean equals(get_token_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(get_token_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_token_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + 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 get_token_resultStandardSchemeFactory implements SchemeFactory { + public get_token_resultStandardScheme getScheme() { + return new get_token_resultStandardScheme(); + } + } + + private static class get_token_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_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; + 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_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_token_resultTupleSchemeFactory implements SchemeFactory { + public get_token_resultTupleScheme getScheme() { + return new get_token_resultTupleScheme(); + } + } + + private static class get_token_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeString(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_token_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class get_all_token_identifiers_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_token_identifiers_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_all_token_identifiers_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_token_identifiers_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 { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_token_identifiers_args.class, metaDataMap); + } + + public get_all_token_identifiers_args() { + } + + /** + * Performs a deep copy on other. + */ + public get_all_token_identifiers_args(get_all_token_identifiers_args other) { + } + + public get_all_token_identifiers_args deepCopy() { + return new get_all_token_identifiers_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_token_identifiers_args) + return this.equals((get_all_token_identifiers_args)that); + return false; + } + + public boolean equals(get_all_token_identifiers_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(get_all_token_identifiers_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_all_token_identifiers_args("); + boolean first = true; + + 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 get_all_token_identifiers_argsStandardSchemeFactory implements SchemeFactory { + public get_all_token_identifiers_argsStandardScheme getScheme() { + return new get_all_token_identifiers_argsStandardScheme(); + } + } + + private static class get_all_token_identifiers_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_token_identifiers_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_token_identifiers_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_all_token_identifiers_argsTupleSchemeFactory implements SchemeFactory { + public get_all_token_identifiers_argsTupleScheme getScheme() { + return new get_all_token_identifiers_argsTupleScheme(); + } + } + + private static class get_all_token_identifiers_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_token_identifiers_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_token_identifiers_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class get_all_token_identifiers_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_all_token_identifiers_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_all_token_identifiers_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_all_token_identifiers_resultTupleSchemeFactory()); + } + + private List success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_all_token_identifiers_result.class, metaDataMap); + } + + public get_all_token_identifiers_result() { + } + + public get_all_token_identifiers_result( + List success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public get_all_token_identifiers_result(get_all_token_identifiers_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + } + + public get_all_token_identifiers_result deepCopy() { + return new get_all_token_identifiers_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_token_identifiers_result) + return this.equals((get_all_token_identifiers_result)that); + return false; + } + + public boolean equals(get_all_token_identifiers_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(get_all_token_identifiers_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_all_token_identifiers_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + 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 get_all_token_identifiers_resultStandardSchemeFactory implements SchemeFactory { + public get_all_token_identifiers_resultStandardScheme getScheme() { + return new get_all_token_identifiers_resultStandardScheme(); + } + } + + private static class get_all_token_identifiers_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_all_token_identifiers_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 _list1238 = iprot.readListBegin(); + struct.success = new ArrayList(_list1238.size); + String _elem1239; + for (int _i1240 = 0; _i1240 < _list1238.size; ++_i1240) + { + _elem1239 = iprot.readString(); + struct.success.add(_elem1239); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(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_token_identifiers_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 _iter1241 : struct.success) + { + oprot.writeString(_iter1241); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_all_token_identifiers_resultTupleSchemeFactory implements SchemeFactory { + public get_all_token_identifiers_resultTupleScheme getScheme() { + return new get_all_token_identifiers_resultTupleScheme(); + } + } + + private static class get_all_token_identifiers_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_all_token_identifiers_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter1242 : struct.success) + { + oprot.writeString(_iter1242); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_all_token_identifiers_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list1243 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list1243.size); + String _elem1244; + for (int _i1245 = 0; _i1245 < _list1243.size; ++_i1245) + { + _elem1244 = iprot.readString(); + struct.success.add(_elem1244); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class add_master_key_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_master_key_args"); + + private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_master_key_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_master_key_argsTupleSchemeFactory()); + } + + private String key; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + KEY((short)1, "key"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // KEY + return KEY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_master_key_args.class, metaDataMap); + } + + public add_master_key_args() { + } + + public add_master_key_args( + String key) + { + this(); + this.key = key; + } + + /** + * Performs a deep copy on other. + */ + public add_master_key_args(add_master_key_args other) { + if (other.isSetKey()) { + this.key = other.key; + } + } + + public add_master_key_args deepCopy() { + return new add_master_key_args(this); + } + + @Override + public void clear() { + this.key = null; + } + + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + + public void unsetKey() { + this.key = null; + } + + /** Returns true if field key is set (has been assigned a value) and false otherwise */ + public boolean isSetKey() { + return this.key != null; + } + + public void setKeyIsSet(boolean value) { + if (!value) { + this.key = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case KEY: + if (value == null) { + unsetKey(); + } else { + setKey((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case KEY: + return getKey(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case KEY: + return isSetKey(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_master_key_args) + return this.equals((add_master_key_args)that); + return false; + } + + public boolean equals(add_master_key_args that) { + if (that == null) + return false; + + boolean this_present_key = true && this.isSetKey(); + boolean that_present_key = true && that.isSetKey(); + if (this_present_key || that_present_key) { + if (!(this_present_key && that_present_key)) + return false; + if (!this.key.equals(that.key)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_key = true && (isSetKey()); + list.add(present_key); + if (present_key) + list.add(key); + + return list.hashCode(); + } + + @Override + public int compareTo(add_master_key_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetKey()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_master_key_args("); + boolean first = true; + + sb.append("key:"); + if (this.key == null) { + sb.append("null"); + } else { + sb.append(this.key); + } + 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 add_master_key_argsStandardSchemeFactory implements SchemeFactory { + public add_master_key_argsStandardScheme getScheme() { + return new add_master_key_argsStandardScheme(); + } + } + + private static class add_master_key_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_master_key_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: // KEY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.key = iprot.readString(); + struct.setKeyIsSet(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_master_key_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.key != null) { + oprot.writeFieldBegin(KEY_FIELD_DESC); + oprot.writeString(struct.key); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_master_key_argsTupleSchemeFactory implements SchemeFactory { + public add_master_key_argsTupleScheme getScheme() { + return new add_master_key_argsTupleScheme(); + } + } + + private static class add_master_key_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_master_key_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetKey()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetKey()) { + oprot.writeString(struct.key); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_master_key_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.key = iprot.readString(); + struct.setKeyIsSet(true); + } + } + } + + } + + public static class add_master_key_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_master_key_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (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 add_master_key_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_master_key_resultTupleSchemeFactory()); + } + + private int success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_master_key_result.class, metaDataMap); + } + + public add_master_key_result() { + } + + public add_master_key_result( + int success, + MetaException o1) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public add_master_key_result(add_master_key_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public add_master_key_result deepCopy() { + return new add_master_key_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.o1 = null; + } + + public int getSuccess() { + return this.success; + } + + public void setSuccess(int success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_master_key_result) + return this.equals((add_master_key_result)that); + return false; + } + + public boolean equals(add_master_key_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(add_master_key_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_master_key_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 { + // 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_master_key_resultStandardSchemeFactory implements SchemeFactory { + public add_master_key_resultStandardScheme getScheme() { + return new add_master_key_resultStandardScheme(); + } + } + + private static class add_master_key_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_master_key_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 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, add_master_key_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_master_key_resultTupleSchemeFactory implements SchemeFactory { + public add_master_key_resultTupleScheme getScheme() { + return new add_master_key_resultTupleScheme(); + } + } + + private static class add_master_key_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_master_key_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); + } + if (struct.isSetO1()) { + struct.o1.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_master_key_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new MetaException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + + } + + public static class update_master_key_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_master_key_args"); + + private static final org.apache.thrift.protocol.TField SEQ_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("seq_number", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new update_master_key_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new update_master_key_argsTupleSchemeFactory()); + } + + private int seq_number; // required + private String key; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SEQ_NUMBER((short)1, "seq_number"), + KEY((short)2, "key"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SEQ_NUMBER + return SEQ_NUMBER; + case 2: // KEY + return KEY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SEQ_NUMBER_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SEQ_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("seq_number", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_master_key_args.class, metaDataMap); + } + + public update_master_key_args() { + } + + public update_master_key_args( + int seq_number, + String key) + { + this(); + this.seq_number = seq_number; + setSeq_numberIsSet(true); + this.key = key; + } + + /** + * Performs a deep copy on other. + */ + public update_master_key_args(update_master_key_args other) { + __isset_bitfield = other.__isset_bitfield; + this.seq_number = other.seq_number; + if (other.isSetKey()) { + this.key = other.key; + } + } + + public update_master_key_args deepCopy() { + return new update_master_key_args(this); + } + + @Override + public void clear() { + setSeq_numberIsSet(false); + this.seq_number = 0; + this.key = null; + } + + public int getSeq_number() { + return this.seq_number; + } + + public void setSeq_number(int seq_number) { + this.seq_number = seq_number; + setSeq_numberIsSet(true); + } + + public void unsetSeq_number() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SEQ_NUMBER_ISSET_ID); + } + + /** Returns true if field seq_number is set (has been assigned a value) and false otherwise */ + public boolean isSetSeq_number() { + return EncodingUtils.testBit(__isset_bitfield, __SEQ_NUMBER_ISSET_ID); + } + + public void setSeq_numberIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SEQ_NUMBER_ISSET_ID, value); + } + + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + + public void unsetKey() { + this.key = null; + } + + /** Returns true if field key is set (has been assigned a value) and false otherwise */ + public boolean isSetKey() { + return this.key != null; + } + + public void setKeyIsSet(boolean value) { + if (!value) { + this.key = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SEQ_NUMBER: + if (value == null) { + unsetSeq_number(); + } else { + setSeq_number((Integer)value); + } + break; + + case KEY: + if (value == null) { + unsetKey(); + } else { + setKey((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SEQ_NUMBER: + return getSeq_number(); + + case KEY: + return getKey(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SEQ_NUMBER: + return isSetSeq_number(); + case KEY: + return isSetKey(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof update_master_key_args) + return this.equals((update_master_key_args)that); + return false; + } + + public boolean equals(update_master_key_args that) { + if (that == null) + return false; + + boolean this_present_seq_number = true; + boolean that_present_seq_number = true; + if (this_present_seq_number || that_present_seq_number) { + if (!(this_present_seq_number && that_present_seq_number)) + return false; + if (this.seq_number != that.seq_number) + return false; + } + + boolean this_present_key = true && this.isSetKey(); + boolean that_present_key = true && that.isSetKey(); + if (this_present_key || that_present_key) { + if (!(this_present_key && that_present_key)) + return false; + if (!this.key.equals(that.key)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_seq_number = true; + list.add(present_seq_number); + if (present_seq_number) + list.add(seq_number); + + boolean present_key = true && (isSetKey()); + list.add(present_key); + if (present_key) + list.add(key); + + return list.hashCode(); + } + + @Override + public int compareTo(update_master_key_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSeq_number()).compareTo(other.isSetSeq_number()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSeq_number()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.seq_number, other.seq_number); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetKey()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("update_master_key_args("); + boolean first = true; + + sb.append("seq_number:"); + sb.append(this.seq_number); + first = false; + if (!first) sb.append(", "); + sb.append("key:"); + if (this.key == null) { + sb.append("null"); + } else { + sb.append(this.key); + } + 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 { + // 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 update_master_key_argsStandardSchemeFactory implements SchemeFactory { + public update_master_key_argsStandardScheme getScheme() { + return new update_master_key_argsStandardScheme(); + } + } + + private static class update_master_key_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, update_master_key_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: // SEQ_NUMBER + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.seq_number = iprot.readI32(); + struct.setSeq_numberIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // KEY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.key = iprot.readString(); + struct.setKeyIsSet(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, update_master_key_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SEQ_NUMBER_FIELD_DESC); + oprot.writeI32(struct.seq_number); + oprot.writeFieldEnd(); + if (struct.key != null) { + oprot.writeFieldBegin(KEY_FIELD_DESC); + oprot.writeString(struct.key); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class update_master_key_argsTupleSchemeFactory implements SchemeFactory { + public update_master_key_argsTupleScheme getScheme() { + return new update_master_key_argsTupleScheme(); + } + } + + private static class update_master_key_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, update_master_key_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSeq_number()) { + optionals.set(0); + } + if (struct.isSetKey()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSeq_number()) { + oprot.writeI32(struct.seq_number); + } + if (struct.isSetKey()) { + oprot.writeString(struct.key); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, update_master_key_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.seq_number = iprot.readI32(); + struct.setSeq_numberIsSet(true); + } + if (incoming.get(1)) { + struct.key = iprot.readString(); + struct.setKeyIsSet(true); + } + } + } + + } + + public static class update_master_key_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_master_key_result"); + + 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 update_master_key_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new update_master_key_resultTupleSchemeFactory()); + } + + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_master_key_result.class, metaDataMap); + } + + public update_master_key_result() { + } + + public update_master_key_result( + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public update_master_key_result(update_master_key_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public update_master_key_result deepCopy() { + return new update_master_key_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof update_master_key_result) + return this.equals((update_master_key_result)that); + return false; + } + + public boolean equals(update_master_key_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(update_master_key_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("update_master_key_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 update_master_key_resultStandardSchemeFactory implements SchemeFactory { + public update_master_key_resultStandardScheme getScheme() { + return new update_master_key_resultStandardScheme(); + } + } + + private static class update_master_key_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, update_master_key_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 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, update_master_key_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 update_master_key_resultTupleSchemeFactory implements SchemeFactory { + public update_master_key_resultTupleScheme getScheme() { + return new update_master_key_resultTupleScheme(); + } + } + + private static class update_master_key_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, update_master_key_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, update_master_key_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.o2 = new MetaException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + + } + + public static class remove_master_key_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_master_key_args"); + + private static final org.apache.thrift.protocol.TField KEY_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("key_seq", org.apache.thrift.protocol.TType.I32, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new remove_master_key_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new remove_master_key_argsTupleSchemeFactory()); + } + + private int key_seq; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + KEY_SEQ((short)1, "key_seq"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // KEY_SEQ + return KEY_SEQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __KEY_SEQ_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.KEY_SEQ, new org.apache.thrift.meta_data.FieldMetaData("key_seq", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_master_key_args.class, metaDataMap); + } + + public remove_master_key_args() { + } + + public remove_master_key_args( + int key_seq) + { + this(); + this.key_seq = key_seq; + setKey_seqIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public remove_master_key_args(remove_master_key_args other) { + __isset_bitfield = other.__isset_bitfield; + this.key_seq = other.key_seq; + } + + public remove_master_key_args deepCopy() { + return new remove_master_key_args(this); + } + + @Override + public void clear() { + setKey_seqIsSet(false); + this.key_seq = 0; + } + + public int getKey_seq() { + return this.key_seq; + } + + public void setKey_seq(int key_seq) { + this.key_seq = key_seq; + setKey_seqIsSet(true); + } + + public void unsetKey_seq() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); + } + + /** Returns true if field key_seq is set (has been assigned a value) and false otherwise */ + public boolean isSetKey_seq() { + return EncodingUtils.testBit(__isset_bitfield, __KEY_SEQ_ISSET_ID); + } + + public void setKey_seqIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEY_SEQ_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case KEY_SEQ: + if (value == null) { + unsetKey_seq(); + } else { + setKey_seq((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case KEY_SEQ: + return getKey_seq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case KEY_SEQ: + return isSetKey_seq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof remove_master_key_args) + return this.equals((remove_master_key_args)that); + return false; + } + + public boolean equals(remove_master_key_args that) { + if (that == null) + return false; + + boolean this_present_key_seq = true; + boolean that_present_key_seq = true; + if (this_present_key_seq || that_present_key_seq) { + if (!(this_present_key_seq && that_present_key_seq)) + return false; + if (this.key_seq != that.key_seq) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_key_seq = true; + list.add(present_key_seq); + if (present_key_seq) + list.add(key_seq); + + return list.hashCode(); + } + + @Override + public int compareTo(remove_master_key_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetKey_seq()).compareTo(other.isSetKey_seq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetKey_seq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_seq, other.key_seq); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("remove_master_key_args("); + boolean first = true; + + sb.append("key_seq:"); + sb.append(this.key_seq); + 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 { + // 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 remove_master_key_argsStandardSchemeFactory implements SchemeFactory { + public remove_master_key_argsStandardScheme getScheme() { + return new remove_master_key_argsStandardScheme(); + } + } + + private static class remove_master_key_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, remove_master_key_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: // KEY_SEQ + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.key_seq = iprot.readI32(); + struct.setKey_seqIsSet(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, remove_master_key_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(KEY_SEQ_FIELD_DESC); + oprot.writeI32(struct.key_seq); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class remove_master_key_argsTupleSchemeFactory implements SchemeFactory { + public remove_master_key_argsTupleScheme getScheme() { + return new remove_master_key_argsTupleScheme(); + } + } + + private static class remove_master_key_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, remove_master_key_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetKey_seq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetKey_seq()) { + oprot.writeI32(struct.key_seq); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, remove_master_key_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.key_seq = iprot.readI32(); + struct.setKey_seqIsSet(true); + } + } + } + + } + + public static class remove_master_key_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_master_key_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new remove_master_key_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new remove_master_key_resultTupleSchemeFactory()); + } + + private boolean success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_master_key_result.class, metaDataMap); + } + + public remove_master_key_result() { + } + + public remove_master_key_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public remove_master_key_result(remove_master_key_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public remove_master_key_result deepCopy() { + return new remove_master_key_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __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 EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return isSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof remove_master_key_result) + return this.equals((remove_master_key_result)that); + return false; + } + + public boolean equals(remove_master_key_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(remove_master_key_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("remove_master_key_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + 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 { + // 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 remove_master_key_resultStandardSchemeFactory implements SchemeFactory { + public remove_master_key_resultStandardScheme getScheme() { + return new remove_master_key_resultStandardScheme(); + } + } + + private static class remove_master_key_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, remove_master_key_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; + 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, remove_master_key_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class remove_master_key_resultTupleSchemeFactory implements SchemeFactory { + public remove_master_key_resultTupleScheme getScheme() { + return new remove_master_key_resultTupleScheme(); + } + } + + private static class remove_master_key_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, remove_master_key_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, remove_master_key_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class get_master_keys_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_master_keys_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_master_keys_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_master_keys_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 { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_master_keys_args.class, metaDataMap); + } + + public get_master_keys_args() { + } + + /** + * Performs a deep copy on other. + */ + public get_master_keys_args(get_master_keys_args other) { + } + + public get_master_keys_args deepCopy() { + return new get_master_keys_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_master_keys_args) + return this.equals((get_master_keys_args)that); + return false; + } + + public boolean equals(get_master_keys_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(get_master_keys_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_master_keys_args("); + boolean first = true; + + 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 get_master_keys_argsStandardSchemeFactory implements SchemeFactory { + public get_master_keys_argsStandardScheme getScheme() { + return new get_master_keys_argsStandardScheme(); + } + } + + private static class get_master_keys_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_master_keys_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_master_keys_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_master_keys_argsTupleSchemeFactory implements SchemeFactory { + public get_master_keys_argsTupleScheme getScheme() { + return new get_master_keys_argsTupleScheme(); + } + } + + private static class get_master_keys_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_master_keys_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_master_keys_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class get_master_keys_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_master_keys_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_master_keys_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_master_keys_resultTupleSchemeFactory()); + } + + private List success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_master_keys_result.class, metaDataMap); + } + + public get_master_keys_result() { + } + + public get_master_keys_result( + List success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public get_master_keys_result(get_master_keys_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success); + this.success = __this__success; + } + } + + public get_master_keys_result deepCopy() { + return new get_master_keys_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_master_keys_result) + return this.equals((get_master_keys_result)that); + return false; + } + + public boolean equals(get_master_keys_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(get_master_keys_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_master_keys_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + 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 get_master_keys_resultStandardSchemeFactory implements SchemeFactory { + public get_master_keys_resultStandardScheme getScheme() { + return new get_master_keys_resultStandardScheme(); + } + } + + private static class get_master_keys_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_master_keys_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 _list1246 = iprot.readListBegin(); + struct.success = new ArrayList(_list1246.size); + String _elem1247; + for (int _i1248 = 0; _i1248 < _list1246.size; ++_i1248) + { + _elem1247 = iprot.readString(); + struct.success.add(_elem1247); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(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_master_keys_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 _iter1249 : struct.success) + { + oprot.writeString(_iter1249); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_master_keys_resultTupleSchemeFactory implements SchemeFactory { + public get_master_keys_resultTupleScheme getScheme() { + return new get_master_keys_resultTupleScheme(); + } + } + + private static class get_master_keys_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_master_keys_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (String _iter1250 : struct.success) + { + oprot.writeString(_iter1250); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_master_keys_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list1251 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list1251.size); + String _elem1252; + for (int _i1253 = 0; _i1253 < _list1251.size; ++_i1253) + { + _elem1252 = iprot.readString(); + struct.success.add(_elem1252); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class get_open_txns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_open_txns_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_open_txns_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 { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_args.class, metaDataMap); + } + + public get_open_txns_args() { + } + + /** + * Performs a deep copy on other. + */ + public get_open_txns_args(get_open_txns_args other) { + } + + public get_open_txns_args deepCopy() { + return new get_open_txns_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_open_txns_args) + return this.equals((get_open_txns_args)that); + return false; + } + + public boolean equals(get_open_txns_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(get_open_txns_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_open_txns_args("); + boolean first = true; + + 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 get_open_txns_argsStandardSchemeFactory implements SchemeFactory { + public get_open_txns_argsStandardScheme getScheme() { + return new get_open_txns_argsStandardScheme(); + } + } + + private static class get_open_txns_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_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_open_txns_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_open_txns_argsTupleSchemeFactory implements SchemeFactory { + public get_open_txns_argsTupleScheme getScheme() { + return new get_open_txns_argsTupleScheme(); + } + } + + private static class get_open_txns_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class get_open_txns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_open_txns_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_open_txns_resultTupleSchemeFactory()); + } + + private GetOpenTxnsResponse success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetOpenTxnsResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_result.class, metaDataMap); + } + + public get_open_txns_result() { + } + + public get_open_txns_result( + GetOpenTxnsResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public get_open_txns_result(get_open_txns_result other) { + if (other.isSetSuccess()) { + this.success = new GetOpenTxnsResponse(other.success); + } + } + + public get_open_txns_result deepCopy() { + return new get_open_txns_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public GetOpenTxnsResponse getSuccess() { + return this.success; + } + + public void setSuccess(GetOpenTxnsResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((GetOpenTxnsResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_open_txns_result) + return this.equals((get_open_txns_result)that); + return false; + } + + public boolean equals(get_open_txns_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(get_open_txns_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_open_txns_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_open_txns_resultStandardSchemeFactory implements SchemeFactory { + public get_open_txns_resultStandardScheme getScheme() { + return new get_open_txns_resultStandardScheme(); + } + } + + private static class get_open_txns_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_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 GetOpenTxnsResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(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_open_txns_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_open_txns_resultTupleSchemeFactory implements SchemeFactory { + public get_open_txns_resultTupleScheme getScheme() { + return new get_open_txns_resultTupleScheme(); + } + } + + private static class get_open_txns_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new GetOpenTxnsResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class get_open_txns_info_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_info_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_open_txns_info_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_open_txns_info_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 { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_info_args.class, metaDataMap); + } + + public get_open_txns_info_args() { + } + + /** + * Performs a deep copy on other. + */ + public get_open_txns_info_args(get_open_txns_info_args other) { + } + + public get_open_txns_info_args deepCopy() { + return new get_open_txns_info_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_open_txns_info_args) + return this.equals((get_open_txns_info_args)that); + return false; + } + + public boolean equals(get_open_txns_info_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(get_open_txns_info_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_open_txns_info_args("); + boolean first = true; + + 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 get_open_txns_info_argsStandardSchemeFactory implements SchemeFactory { + public get_open_txns_info_argsStandardScheme getScheme() { + return new get_open_txns_info_argsStandardScheme(); + } + } + + private static class get_open_txns_info_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_info_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_open_txns_info_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_open_txns_info_argsTupleSchemeFactory implements SchemeFactory { + public get_open_txns_info_argsTupleScheme getScheme() { + return new get_open_txns_info_argsTupleScheme(); + } + } + + private static class get_open_txns_info_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_info_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_info_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class get_open_txns_info_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_open_txns_info_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_open_txns_info_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_open_txns_info_resultTupleSchemeFactory()); + } + + private GetOpenTxnsInfoResponse success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetOpenTxnsInfoResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_open_txns_info_result.class, metaDataMap); + } + + public get_open_txns_info_result() { + } + + public get_open_txns_info_result( + GetOpenTxnsInfoResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public get_open_txns_info_result(get_open_txns_info_result other) { + if (other.isSetSuccess()) { + this.success = new GetOpenTxnsInfoResponse(other.success); + } + } + + public get_open_txns_info_result deepCopy() { + return new get_open_txns_info_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public GetOpenTxnsInfoResponse getSuccess() { + return this.success; + } + + public void setSuccess(GetOpenTxnsInfoResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((GetOpenTxnsInfoResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_open_txns_info_result) + return this.equals((get_open_txns_info_result)that); + return false; + } + + public boolean equals(get_open_txns_info_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(get_open_txns_info_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_open_txns_info_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_open_txns_info_resultStandardSchemeFactory implements SchemeFactory { + public get_open_txns_info_resultStandardScheme getScheme() { + return new get_open_txns_info_resultStandardScheme(); + } + } + + private static class get_open_txns_info_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_open_txns_info_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 GetOpenTxnsInfoResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(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_open_txns_info_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_open_txns_info_resultTupleSchemeFactory implements SchemeFactory { + public get_open_txns_info_resultTupleScheme getScheme() { + return new get_open_txns_info_resultTupleScheme(); + } + } + + private static class get_open_txns_info_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_open_txns_info_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_open_txns_info_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new GetOpenTxnsInfoResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class open_txns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("open_txns_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new open_txns_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new open_txns_argsTupleSchemeFactory()); + } + + private OpenTxnRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OpenTxnRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(open_txns_args.class, metaDataMap); + } + + public open_txns_args() { + } + + public open_txns_args( + OpenTxnRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public open_txns_args(open_txns_args other) { + if (other.isSetRqst()) { + this.rqst = new OpenTxnRequest(other.rqst); + } + } + + public open_txns_args deepCopy() { + return new open_txns_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public OpenTxnRequest getRqst() { + return this.rqst; + } + + public void setRqst(OpenTxnRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((OpenTxnRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof open_txns_args) + return this.equals((open_txns_args)that); + return false; + } + + public boolean equals(open_txns_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(open_txns_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("open_txns_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 open_txns_argsStandardSchemeFactory implements SchemeFactory { + public open_txns_argsStandardScheme getScheme() { + return new open_txns_argsStandardScheme(); + } + } + + private static class open_txns_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, open_txns_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new OpenTxnRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, open_txns_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class open_txns_argsTupleSchemeFactory implements SchemeFactory { + public open_txns_argsTupleScheme getScheme() { + return new open_txns_argsTupleScheme(); + } + } + + private static class open_txns_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, open_txns_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, open_txns_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new OpenTxnRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class open_txns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("open_txns_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new open_txns_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new open_txns_resultTupleSchemeFactory()); + } + + private OpenTxnsResponse success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OpenTxnsResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(open_txns_result.class, metaDataMap); + } + + public open_txns_result() { + } + + public open_txns_result( + OpenTxnsResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public open_txns_result(open_txns_result other) { + if (other.isSetSuccess()) { + this.success = new OpenTxnsResponse(other.success); + } + } + + public open_txns_result deepCopy() { + return new open_txns_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public OpenTxnsResponse getSuccess() { + return this.success; + } + + public void setSuccess(OpenTxnsResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((OpenTxnsResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof open_txns_result) + return this.equals((open_txns_result)that); + return false; + } + + public boolean equals(open_txns_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(open_txns_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("open_txns_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 open_txns_resultStandardSchemeFactory implements SchemeFactory { + public open_txns_resultStandardScheme getScheme() { + return new open_txns_resultStandardScheme(); + } + } + + private static class open_txns_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, open_txns_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 OpenTxnsResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(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, open_txns_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class open_txns_resultTupleSchemeFactory implements SchemeFactory { + public open_txns_resultTupleScheme getScheme() { + return new open_txns_resultTupleScheme(); + } + } + + private static class open_txns_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, open_txns_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, open_txns_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new OpenTxnsResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class abort_txn_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_txn_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new abort_txn_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new abort_txn_argsTupleSchemeFactory()); + } + + private AbortTxnRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AbortTxnRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_txn_args.class, metaDataMap); + } + + public abort_txn_args() { + } + + public abort_txn_args( + AbortTxnRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public abort_txn_args(abort_txn_args other) { + if (other.isSetRqst()) { + this.rqst = new AbortTxnRequest(other.rqst); + } + } + + public abort_txn_args deepCopy() { + return new abort_txn_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public AbortTxnRequest getRqst() { + return this.rqst; + } + + public void setRqst(AbortTxnRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((AbortTxnRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof abort_txn_args) + return this.equals((abort_txn_args)that); + return false; + } + + public boolean equals(abort_txn_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(abort_txn_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("abort_txn_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 abort_txn_argsStandardSchemeFactory implements SchemeFactory { + public abort_txn_argsStandardScheme getScheme() { + return new abort_txn_argsStandardScheme(); + } + } + + private static class abort_txn_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, abort_txn_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new AbortTxnRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, abort_txn_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class abort_txn_argsTupleSchemeFactory implements SchemeFactory { + public abort_txn_argsTupleScheme getScheme() { + return new abort_txn_argsTupleScheme(); + } + } + + private static class abort_txn_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, abort_txn_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, abort_txn_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new AbortTxnRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class abort_txn_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_txn_result"); + + 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 abort_txn_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new abort_txn_resultTupleSchemeFactory()); + } + + private NoSuchTxnException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_txn_result.class, metaDataMap); + } + + public abort_txn_result() { + } + + public abort_txn_result( + NoSuchTxnException o1) + { + this(); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public abort_txn_result(abort_txn_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchTxnException(other.o1); + } + } + + public abort_txn_result deepCopy() { + return new abort_txn_result(this); + } + + @Override + public void clear() { + this.o1 = null; + } + + public NoSuchTxnException getO1() { + return this.o1; + } + + public void setO1(NoSuchTxnException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchTxnException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof abort_txn_result) + return this.equals((abort_txn_result)that); + return false; + } + + public boolean equals(abort_txn_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(abort_txn_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("abort_txn_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 abort_txn_resultStandardSchemeFactory implements SchemeFactory { + public abort_txn_resultStandardScheme getScheme() { + return new abort_txn_resultStandardScheme(); + } + } + + private static class abort_txn_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, abort_txn_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 NoSuchTxnException(); + 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, abort_txn_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 abort_txn_resultTupleSchemeFactory implements SchemeFactory { + public abort_txn_resultTupleScheme getScheme() { + return new abort_txn_resultTupleScheme(); + } + } + + private static class abort_txn_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, abort_txn_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, abort_txn_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.o1 = new NoSuchTxnException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + + } + + public static class abort_txns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_txns_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new abort_txns_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new abort_txns_argsTupleSchemeFactory()); + } + + private AbortTxnsRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AbortTxnsRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_txns_args.class, metaDataMap); + } + + public abort_txns_args() { + } + + public abort_txns_args( + AbortTxnsRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public abort_txns_args(abort_txns_args other) { + if (other.isSetRqst()) { + this.rqst = new AbortTxnsRequest(other.rqst); + } + } + + public abort_txns_args deepCopy() { + return new abort_txns_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public AbortTxnsRequest getRqst() { + return this.rqst; + } + + public void setRqst(AbortTxnsRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((AbortTxnsRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof abort_txns_args) + return this.equals((abort_txns_args)that); + return false; + } + + public boolean equals(abort_txns_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(abort_txns_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("abort_txns_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 abort_txns_argsStandardSchemeFactory implements SchemeFactory { + public abort_txns_argsStandardScheme getScheme() { + return new abort_txns_argsStandardScheme(); + } + } + + private static class abort_txns_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, abort_txns_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new AbortTxnsRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, abort_txns_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class abort_txns_argsTupleSchemeFactory implements SchemeFactory { + public abort_txns_argsTupleScheme getScheme() { + return new abort_txns_argsTupleScheme(); + } + } + + private static class abort_txns_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, abort_txns_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, abort_txns_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new AbortTxnsRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class abort_txns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("abort_txns_result"); + + 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 abort_txns_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new abort_txns_resultTupleSchemeFactory()); + } + + private NoSuchTxnException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(abort_txns_result.class, metaDataMap); + } + + public abort_txns_result() { + } + + public abort_txns_result( + NoSuchTxnException o1) + { + this(); + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public abort_txns_result(abort_txns_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchTxnException(other.o1); + } + } + + public abort_txns_result deepCopy() { + return new abort_txns_result(this); + } + + @Override + public void clear() { + this.o1 = null; + } + + public NoSuchTxnException getO1() { + return this.o1; + } + + public void setO1(NoSuchTxnException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchTxnException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof abort_txns_result) + return this.equals((abort_txns_result)that); + return false; + } + + public boolean equals(abort_txns_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(abort_txns_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("abort_txns_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 abort_txns_resultStandardSchemeFactory implements SchemeFactory { + public abort_txns_resultStandardScheme getScheme() { + return new abort_txns_resultStandardScheme(); + } + } + + private static class abort_txns_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, abort_txns_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 NoSuchTxnException(); + 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, abort_txns_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 abort_txns_resultTupleSchemeFactory implements SchemeFactory { + public abort_txns_resultTupleScheme getScheme() { + return new abort_txns_resultTupleScheme(); + } + } + + private static class abort_txns_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, abort_txns_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, abort_txns_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.o1 = new NoSuchTxnException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + } + } + + } + + public static class commit_txn_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("commit_txn_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new commit_txn_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new commit_txn_argsTupleSchemeFactory()); + } + + private CommitTxnRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CommitTxnRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(commit_txn_args.class, metaDataMap); + } + + public commit_txn_args() { + } + + public commit_txn_args( + CommitTxnRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public commit_txn_args(commit_txn_args other) { + if (other.isSetRqst()) { + this.rqst = new CommitTxnRequest(other.rqst); + } + } + + public commit_txn_args deepCopy() { + return new commit_txn_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public CommitTxnRequest getRqst() { + return this.rqst; + } + + public void setRqst(CommitTxnRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((CommitTxnRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof commit_txn_args) + return this.equals((commit_txn_args)that); + return false; + } + + public boolean equals(commit_txn_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(commit_txn_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("commit_txn_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 commit_txn_argsStandardSchemeFactory implements SchemeFactory { + public commit_txn_argsStandardScheme getScheme() { + return new commit_txn_argsStandardScheme(); + } + } + + private static class commit_txn_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, commit_txn_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new CommitTxnRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, commit_txn_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class commit_txn_argsTupleSchemeFactory implements SchemeFactory { + public commit_txn_argsTupleScheme getScheme() { + return new commit_txn_argsTupleScheme(); + } + } + + private static class commit_txn_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, commit_txn_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, commit_txn_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new CommitTxnRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class commit_txn_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("commit_txn_result"); + + 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 commit_txn_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new commit_txn_resultTupleSchemeFactory()); + } + + private NoSuchTxnException o1; // required + private TxnAbortedException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(commit_txn_result.class, metaDataMap); + } + + public commit_txn_result() { + } + + public commit_txn_result( + NoSuchTxnException o1, + TxnAbortedException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public commit_txn_result(commit_txn_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchTxnException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new TxnAbortedException(other.o2); + } + } + + public commit_txn_result deepCopy() { + return new commit_txn_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public NoSuchTxnException getO1() { + return this.o1; + } + + public void setO1(NoSuchTxnException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public TxnAbortedException getO2() { + return this.o2; + } + + public void setO2(TxnAbortedException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchTxnException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((TxnAbortedException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof commit_txn_result) + return this.equals((commit_txn_result)that); + return false; + } + + public boolean equals(commit_txn_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(commit_txn_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("commit_txn_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 commit_txn_resultStandardSchemeFactory implements SchemeFactory { + public commit_txn_resultStandardScheme getScheme() { + return new commit_txn_resultStandardScheme(); + } + } + + private static class commit_txn_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, commit_txn_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 NoSuchTxnException(); + 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 TxnAbortedException(); + 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, commit_txn_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 commit_txn_resultTupleSchemeFactory implements SchemeFactory { + public commit_txn_resultTupleScheme getScheme() { + return new commit_txn_resultTupleScheme(); + } + } + + private static class commit_txn_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, commit_txn_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, commit_txn_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new NoSuchTxnException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new TxnAbortedException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + + } + + public static class lock_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("lock_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new lock_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new lock_argsTupleSchemeFactory()); + } + + private LockRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LockRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(lock_args.class, metaDataMap); + } + + public lock_args() { + } + + public lock_args( + LockRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public lock_args(lock_args other) { + if (other.isSetRqst()) { + this.rqst = new LockRequest(other.rqst); + } + } + + public lock_args deepCopy() { + return new lock_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public LockRequest getRqst() { + return this.rqst; + } + + public void setRqst(LockRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((LockRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof lock_args) + return this.equals((lock_args)that); + return false; + } + + public boolean equals(lock_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(lock_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("lock_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 lock_argsStandardSchemeFactory implements SchemeFactory { + public lock_argsStandardScheme getScheme() { + return new lock_argsStandardScheme(); + } + } + + private static class lock_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, lock_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new LockRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, lock_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class lock_argsTupleSchemeFactory implements SchemeFactory { + public lock_argsTupleScheme getScheme() { + return new lock_argsTupleScheme(); + } + } + + private static class lock_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, lock_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, lock_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new LockRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class lock_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("lock_result"); + + 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 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 lock_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new lock_resultTupleSchemeFactory()); + } + + private LockResponse success; // required + private NoSuchTxnException o1; // required + private TxnAbortedException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LockResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(lock_result.class, metaDataMap); + } + + public lock_result() { + } + + public lock_result( + LockResponse success, + NoSuchTxnException o1, + TxnAbortedException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public lock_result(lock_result other) { + if (other.isSetSuccess()) { + this.success = new LockResponse(other.success); + } + if (other.isSetO1()) { + this.o1 = new NoSuchTxnException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new TxnAbortedException(other.o2); + } + } + + public lock_result deepCopy() { + return new lock_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public LockResponse getSuccess() { + return this.success; + } + + public void setSuccess(LockResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchTxnException getO1() { + return this.o1; + } + + public void setO1(NoSuchTxnException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public TxnAbortedException getO2() { + return this.o2; + } + + public void setO2(TxnAbortedException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((LockResponse)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchTxnException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((TxnAbortedException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof lock_result) + return this.equals((lock_result)that); + return false; + } + + public boolean equals(lock_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(lock_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("lock_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 lock_resultStandardSchemeFactory implements SchemeFactory { + public lock_resultStandardScheme getScheme() { + return new lock_resultStandardScheme(); + } + } + + private static class lock_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, lock_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 LockResponse(); + 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 NoSuchTxnException(); + 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 TxnAbortedException(); + 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, lock_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 lock_resultTupleSchemeFactory implements SchemeFactory { + public lock_resultTupleScheme getScheme() { + return new lock_resultTupleScheme(); + } + } + + private static class lock_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, lock_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, lock_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new LockResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchTxnException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new TxnAbortedException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + + } + + public static class check_lock_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("check_lock_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new check_lock_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new check_lock_argsTupleSchemeFactory()); + } + + private CheckLockRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CheckLockRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(check_lock_args.class, metaDataMap); + } + + public check_lock_args() { + } + + public check_lock_args( + CheckLockRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public check_lock_args(check_lock_args other) { + if (other.isSetRqst()) { + this.rqst = new CheckLockRequest(other.rqst); + } + } + + public check_lock_args deepCopy() { + return new check_lock_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public CheckLockRequest getRqst() { + return this.rqst; + } + + public void setRqst(CheckLockRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((CheckLockRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof check_lock_args) + return this.equals((check_lock_args)that); + return false; + } + + public boolean equals(check_lock_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(check_lock_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("check_lock_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 check_lock_argsStandardSchemeFactory implements SchemeFactory { + public check_lock_argsStandardScheme getScheme() { + return new check_lock_argsStandardScheme(); + } + } + + private static class check_lock_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, check_lock_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new CheckLockRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, check_lock_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class check_lock_argsTupleSchemeFactory implements SchemeFactory { + public check_lock_argsTupleScheme getScheme() { + return new check_lock_argsTupleScheme(); + } + } + + private static class check_lock_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, check_lock_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, check_lock_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new CheckLockRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class check_lock_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("check_lock_result"); + + 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 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 check_lock_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new check_lock_resultTupleSchemeFactory()); + } + + private LockResponse success; // required + private NoSuchTxnException o1; // required + private TxnAbortedException o2; // required + private NoSuchLockException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LockResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(check_lock_result.class, metaDataMap); + } + + public check_lock_result() { + } + + public check_lock_result( + LockResponse success, + NoSuchTxnException o1, + TxnAbortedException o2, + NoSuchLockException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public check_lock_result(check_lock_result other) { + if (other.isSetSuccess()) { + this.success = new LockResponse(other.success); + } + if (other.isSetO1()) { + this.o1 = new NoSuchTxnException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new TxnAbortedException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new NoSuchLockException(other.o3); + } + } + + public check_lock_result deepCopy() { + return new check_lock_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public LockResponse getSuccess() { + return this.success; + } + + public void setSuccess(LockResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchTxnException getO1() { + return this.o1; + } + + public void setO1(NoSuchTxnException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public TxnAbortedException getO2() { + return this.o2; + } + + public void setO2(TxnAbortedException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public NoSuchLockException getO3() { + return this.o3; + } + + public void setO3(NoSuchLockException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((LockResponse)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchTxnException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((TxnAbortedException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((NoSuchLockException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof check_lock_result) + return this.equals((check_lock_result)that); + return false; + } + + public boolean equals(check_lock_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(check_lock_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("check_lock_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 check_lock_resultStandardSchemeFactory implements SchemeFactory { + public check_lock_resultStandardScheme getScheme() { + return new check_lock_resultStandardScheme(); + } + } + + private static class check_lock_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, check_lock_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 LockResponse(); + 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 NoSuchTxnException(); + 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 TxnAbortedException(); + 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 NoSuchLockException(); + 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, check_lock_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 check_lock_resultTupleSchemeFactory implements SchemeFactory { + public check_lock_resultTupleScheme getScheme() { + return new check_lock_resultTupleScheme(); + } + } + + private static class check_lock_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, check_lock_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, check_lock_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.success = new LockResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.o1 = new NoSuchTxnException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(2)) { + struct.o2 = new TxnAbortedException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(3)) { + struct.o3 = new NoSuchLockException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + + } + + public static class unlock_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unlock_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new unlock_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new unlock_argsTupleSchemeFactory()); + } + + private UnlockRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UnlockRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unlock_args.class, metaDataMap); + } + + public unlock_args() { + } + + public unlock_args( + UnlockRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public unlock_args(unlock_args other) { + if (other.isSetRqst()) { + this.rqst = new UnlockRequest(other.rqst); + } + } + + public unlock_args deepCopy() { + return new unlock_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public UnlockRequest getRqst() { + return this.rqst; + } + + public void setRqst(UnlockRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((UnlockRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof unlock_args) + return this.equals((unlock_args)that); + return false; + } + + public boolean equals(unlock_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(unlock_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("unlock_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 unlock_argsStandardSchemeFactory implements SchemeFactory { + public unlock_argsStandardScheme getScheme() { + return new unlock_argsStandardScheme(); + } + } + + private static class unlock_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, unlock_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new UnlockRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, unlock_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class unlock_argsTupleSchemeFactory implements SchemeFactory { + public unlock_argsTupleScheme getScheme() { + return new unlock_argsTupleScheme(); + } + } + + private static class unlock_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, unlock_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, unlock_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new UnlockRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class unlock_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unlock_result"); + + 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 unlock_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new unlock_resultTupleSchemeFactory()); + } + + private NoSuchLockException o1; // required + private TxnOpenException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unlock_result.class, metaDataMap); + } + + public unlock_result() { + } + + public unlock_result( + NoSuchLockException o1, + TxnOpenException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public unlock_result(unlock_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchLockException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new TxnOpenException(other.o2); + } + } + + public unlock_result deepCopy() { + return new unlock_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public NoSuchLockException getO1() { + return this.o1; + } + + public void setO1(NoSuchLockException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public TxnOpenException getO2() { + return this.o2; + } + + public void setO2(TxnOpenException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchLockException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((TxnOpenException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof unlock_result) + return this.equals((unlock_result)that); + return false; + } + + public boolean equals(unlock_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(unlock_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("unlock_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 unlock_resultStandardSchemeFactory implements SchemeFactory { + public unlock_resultStandardScheme getScheme() { + return new unlock_resultStandardScheme(); + } + } + + private static class unlock_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, unlock_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 NoSuchLockException(); + 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 TxnOpenException(); + 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, unlock_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 unlock_resultTupleSchemeFactory implements SchemeFactory { + public unlock_resultTupleScheme getScheme() { + return new unlock_resultTupleScheme(); + } + } + + private static class unlock_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, unlock_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, unlock_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new NoSuchLockException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new TxnOpenException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + + } + + public static class show_locks_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_locks_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new show_locks_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new show_locks_argsTupleSchemeFactory()); + } + + private ShowLocksRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowLocksRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_locks_args.class, metaDataMap); + } + + public show_locks_args() { + } + + public show_locks_args( + ShowLocksRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public show_locks_args(show_locks_args other) { + if (other.isSetRqst()) { + this.rqst = new ShowLocksRequest(other.rqst); + } + } + + public show_locks_args deepCopy() { + return new show_locks_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public ShowLocksRequest getRqst() { + return this.rqst; + } + + public void setRqst(ShowLocksRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((ShowLocksRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof show_locks_args) + return this.equals((show_locks_args)that); + return false; + } + + public boolean equals(show_locks_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(show_locks_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("show_locks_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 show_locks_argsStandardSchemeFactory implements SchemeFactory { + public show_locks_argsStandardScheme getScheme() { + return new show_locks_argsStandardScheme(); + } + } + + private static class show_locks_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, show_locks_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new ShowLocksRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, show_locks_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class show_locks_argsTupleSchemeFactory implements SchemeFactory { + public show_locks_argsTupleScheme getScheme() { + return new show_locks_argsTupleScheme(); + } + } + + private static class show_locks_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, show_locks_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, show_locks_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new ShowLocksRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class show_locks_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_locks_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new show_locks_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new show_locks_resultTupleSchemeFactory()); + } + + private ShowLocksResponse success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowLocksResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_locks_result.class, metaDataMap); + } + + public show_locks_result() { + } + + public show_locks_result( + ShowLocksResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public show_locks_result(show_locks_result other) { + if (other.isSetSuccess()) { + this.success = new ShowLocksResponse(other.success); + } + } + + public show_locks_result deepCopy() { + return new show_locks_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public ShowLocksResponse getSuccess() { + return this.success; + } + + public void setSuccess(ShowLocksResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((ShowLocksResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof show_locks_result) + return this.equals((show_locks_result)that); + return false; + } + + public boolean equals(show_locks_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(show_locks_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("show_locks_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 show_locks_resultStandardSchemeFactory implements SchemeFactory { + public show_locks_resultStandardScheme getScheme() { + return new show_locks_resultStandardScheme(); + } + } + + private static class show_locks_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, show_locks_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 ShowLocksResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(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, show_locks_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class show_locks_resultTupleSchemeFactory implements SchemeFactory { + public show_locks_resultTupleScheme getScheme() { + return new show_locks_resultTupleScheme(); + } + } + + private static class show_locks_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, show_locks_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, show_locks_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new ShowLocksResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class heartbeat_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_args"); + + private static final org.apache.thrift.protocol.TField IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("ids", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new heartbeat_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new heartbeat_argsTupleSchemeFactory()); + } + + private HeartbeatRequest ids; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IDS((short)1, "ids"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IDS + return IDS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.IDS, new org.apache.thrift.meta_data.FieldMetaData("ids", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_args.class, metaDataMap); + } + + public heartbeat_args() { + } + + public heartbeat_args( + HeartbeatRequest ids) + { + this(); + this.ids = ids; + } + + /** + * Performs a deep copy on other. + */ + public heartbeat_args(heartbeat_args other) { + if (other.isSetIds()) { + this.ids = new HeartbeatRequest(other.ids); + } + } + + public heartbeat_args deepCopy() { + return new heartbeat_args(this); + } + + @Override + public void clear() { + this.ids = null; + } + + public HeartbeatRequest getIds() { + return this.ids; + } + + public void setIds(HeartbeatRequest ids) { + this.ids = ids; + } + + public void unsetIds() { + this.ids = null; + } + + /** Returns true if field ids is set (has been assigned a value) and false otherwise */ + public boolean isSetIds() { + return this.ids != null; + } + + public void setIdsIsSet(boolean value) { + if (!value) { + this.ids = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IDS: + if (value == null) { + unsetIds(); + } else { + setIds((HeartbeatRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IDS: + return getIds(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IDS: + return isSetIds(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof heartbeat_args) + return this.equals((heartbeat_args)that); + return false; + } + + public boolean equals(heartbeat_args that) { + if (that == null) + return false; + + boolean this_present_ids = true && this.isSetIds(); + boolean that_present_ids = true && that.isSetIds(); + if (this_present_ids || that_present_ids) { + if (!(this_present_ids && that_present_ids)) + return false; + if (!this.ids.equals(that.ids)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_ids = true && (isSetIds()); + list.add(present_ids); + if (present_ids) + list.add(ids); + + return list.hashCode(); + } + + @Override + public int compareTo(heartbeat_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetIds()).compareTo(other.isSetIds()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIds()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ids, other.ids); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("heartbeat_args("); + boolean first = true; + + sb.append("ids:"); + if (this.ids == null) { + sb.append("null"); + } else { + sb.append(this.ids); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (ids != null) { + ids.validate(); + } + } + + 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 heartbeat_argsStandardSchemeFactory implements SchemeFactory { + public heartbeat_argsStandardScheme getScheme() { + return new heartbeat_argsStandardScheme(); + } + } + + private static class heartbeat_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_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: // IDS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ids = new HeartbeatRequest(); + struct.ids.read(iprot); + struct.setIdsIsSet(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, heartbeat_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.ids != null) { + oprot.writeFieldBegin(IDS_FIELD_DESC); + struct.ids.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class heartbeat_argsTupleSchemeFactory implements SchemeFactory { + public heartbeat_argsTupleScheme getScheme() { + return new heartbeat_argsTupleScheme(); + } + } + + private static class heartbeat_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIds()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIds()) { + struct.ids.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.ids = new HeartbeatRequest(); + struct.ids.read(iprot); + struct.setIdsIsSet(true); + } + } + } + + } + + public static class heartbeat_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_result"); + + 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 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 heartbeat_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new heartbeat_resultTupleSchemeFactory()); + } + + private NoSuchLockException o1; // required + private NoSuchTxnException o2; // required + private TxnAbortedException o3; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_result.class, metaDataMap); + } + + public heartbeat_result() { + } + + public heartbeat_result( + NoSuchLockException o1, + NoSuchTxnException o2, + TxnAbortedException o3) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public heartbeat_result(heartbeat_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchLockException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchTxnException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new TxnAbortedException(other.o3); + } + } + + public heartbeat_result deepCopy() { + return new heartbeat_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public NoSuchLockException getO1() { + return this.o1; + } + + public void setO1(NoSuchLockException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchTxnException getO2() { + return this.o2; + } + + public void setO2(NoSuchTxnException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public TxnAbortedException getO3() { + return this.o3; + } + + public void setO3(TxnAbortedException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchLockException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchTxnException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((TxnAbortedException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof heartbeat_result) + return this.equals((heartbeat_result)that); + return false; + } + + public boolean equals(heartbeat_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + boolean present_o3 = true && (isSetO3()); + list.add(present_o3); + if (present_o3) + list.add(o3); + + return list.hashCode(); + } + + @Override + public int compareTo(heartbeat_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(other.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("heartbeat_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + 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 heartbeat_resultStandardSchemeFactory implements SchemeFactory { + public heartbeat_resultStandardScheme getScheme() { + return new heartbeat_resultStandardScheme(); + } + } + + private static class heartbeat_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_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 NoSuchLockException(); + 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 NoSuchTxnException(); + 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 TxnAbortedException(); + 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, heartbeat_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 heartbeat_resultTupleSchemeFactory implements SchemeFactory { + public heartbeat_resultTupleScheme getScheme() { + return new heartbeat_resultTupleScheme(); + } + } + + private static class heartbeat_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_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, heartbeat_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.o1 = new NoSuchLockException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new NoSuchTxnException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + if (incoming.get(2)) { + struct.o3 = new TxnAbortedException(); + struct.o3.read(iprot); + struct.setO3IsSet(true); + } + } + } + + } + + public static class heartbeat_txn_range_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_txn_range_args"); + + private static final org.apache.thrift.protocol.TField TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("txns", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new heartbeat_txn_range_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new heartbeat_txn_range_argsTupleSchemeFactory()); + } + + private HeartbeatTxnRangeRequest txns; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TXNS((short)1, "txns"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TXNS + return TXNS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.TXNS, new org.apache.thrift.meta_data.FieldMetaData("txns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatTxnRangeRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_txn_range_args.class, metaDataMap); + } + + public heartbeat_txn_range_args() { + } + + public heartbeat_txn_range_args( + HeartbeatTxnRangeRequest txns) + { + this(); + this.txns = txns; + } + + /** + * Performs a deep copy on other. + */ + public heartbeat_txn_range_args(heartbeat_txn_range_args other) { + if (other.isSetTxns()) { + this.txns = new HeartbeatTxnRangeRequest(other.txns); + } + } + + public heartbeat_txn_range_args deepCopy() { + return new heartbeat_txn_range_args(this); + } + + @Override + public void clear() { + this.txns = null; + } + + public HeartbeatTxnRangeRequest getTxns() { + return this.txns; + } + + public void setTxns(HeartbeatTxnRangeRequest txns) { + this.txns = txns; + } + + public void unsetTxns() { + this.txns = null; + } + + /** Returns true if field txns is set (has been assigned a value) and false otherwise */ + public boolean isSetTxns() { + return this.txns != null; + } + + public void setTxnsIsSet(boolean value) { + if (!value) { + this.txns = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TXNS: + if (value == null) { + unsetTxns(); + } else { + setTxns((HeartbeatTxnRangeRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TXNS: + return getTxns(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TXNS: + return isSetTxns(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof heartbeat_txn_range_args) + return this.equals((heartbeat_txn_range_args)that); + return false; + } + + public boolean equals(heartbeat_txn_range_args that) { + if (that == null) + return false; + + boolean this_present_txns = true && this.isSetTxns(); + boolean that_present_txns = true && that.isSetTxns(); + if (this_present_txns || that_present_txns) { + if (!(this_present_txns && that_present_txns)) + return false; + if (!this.txns.equals(that.txns)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_txns = true && (isSetTxns()); + list.add(present_txns); + if (present_txns) + list.add(txns); + + return list.hashCode(); + } + + @Override + public int compareTo(heartbeat_txn_range_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTxns()).compareTo(other.isSetTxns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTxns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txns, other.txns); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("heartbeat_txn_range_args("); + boolean first = true; + + sb.append("txns:"); + if (this.txns == null) { + sb.append("null"); + } else { + sb.append(this.txns); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (txns != null) { + txns.validate(); + } + } + + 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 heartbeat_txn_range_argsStandardSchemeFactory implements SchemeFactory { + public heartbeat_txn_range_argsStandardScheme getScheme() { + return new heartbeat_txn_range_argsStandardScheme(); + } + } + + private static class heartbeat_txn_range_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range_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: // TXNS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.txns = new HeartbeatTxnRangeRequest(); + struct.txns.read(iprot); + struct.setTxnsIsSet(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, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.txns != null) { + oprot.writeFieldBegin(TXNS_FIELD_DESC); + struct.txns.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class heartbeat_txn_range_argsTupleSchemeFactory implements SchemeFactory { + public heartbeat_txn_range_argsTupleScheme getScheme() { + return new heartbeat_txn_range_argsTupleScheme(); + } + } + + private static class heartbeat_txn_range_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTxns()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTxns()) { + struct.txns.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.txns = new HeartbeatTxnRangeRequest(); + struct.txns.read(iprot); + struct.setTxnsIsSet(true); + } + } + } + + } + + public static class heartbeat_txn_range_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_txn_range_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new heartbeat_txn_range_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new heartbeat_txn_range_resultTupleSchemeFactory()); + } + + private HeartbeatTxnRangeResponse success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatTxnRangeResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_txn_range_result.class, metaDataMap); + } + + public heartbeat_txn_range_result() { + } + + public heartbeat_txn_range_result( + HeartbeatTxnRangeResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public heartbeat_txn_range_result(heartbeat_txn_range_result other) { + if (other.isSetSuccess()) { + this.success = new HeartbeatTxnRangeResponse(other.success); + } + } + + public heartbeat_txn_range_result deepCopy() { + return new heartbeat_txn_range_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public HeartbeatTxnRangeResponse getSuccess() { + return this.success; + } + + public void setSuccess(HeartbeatTxnRangeResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((HeartbeatTxnRangeResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof heartbeat_txn_range_result) + return this.equals((heartbeat_txn_range_result)that); + return false; + } + + public boolean equals(heartbeat_txn_range_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(heartbeat_txn_range_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("heartbeat_txn_range_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 heartbeat_txn_range_resultStandardSchemeFactory implements SchemeFactory { + public heartbeat_txn_range_resultStandardScheme getScheme() { + return new heartbeat_txn_range_resultStandardScheme(); + } + } + + private static class heartbeat_txn_range_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range_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 HeartbeatTxnRangeResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(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, heartbeat_txn_range_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class heartbeat_txn_range_resultTupleSchemeFactory implements SchemeFactory { + public heartbeat_txn_range_resultTupleScheme getScheme() { + return new heartbeat_txn_range_resultTupleScheme(); + } + } + + private static class heartbeat_txn_range_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new HeartbeatTxnRangeResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new compact_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact_argsTupleSchemeFactory()); + } + + private CompactionRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_args.class, metaDataMap); + } + + public compact_args() { + } + + public compact_args( + CompactionRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public compact_args(compact_args other) { + if (other.isSetRqst()) { + this.rqst = new CompactionRequest(other.rqst); + } + } + + public compact_args deepCopy() { + return new compact_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public CompactionRequest getRqst() { + return this.rqst; + } + + public void setRqst(CompactionRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((CompactionRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof compact_args) + return this.equals((compact_args)that); + return false; + } + + public boolean equals(compact_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(compact_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("compact_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 compact_argsStandardSchemeFactory implements SchemeFactory { + public compact_argsStandardScheme getScheme() { + return new compact_argsStandardScheme(); + } + } + + private static class compact_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, compact_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new CompactionRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, compact_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class compact_argsTupleSchemeFactory implements SchemeFactory { + public compact_argsTupleScheme getScheme() { + return new compact_argsTupleScheme(); + } + } + + private static class compact_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new CompactionRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new compact_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact_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 { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_result.class, metaDataMap); + } + + public compact_result() { + } + + /** + * Performs a deep copy on other. + */ + public compact_result(compact_result other) { + } + + public compact_result deepCopy() { + return new compact_result(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof compact_result) + return this.equals((compact_result)that); + return false; + } + + public boolean equals(compact_result that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(compact_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("compact_result("); + boolean first = true; + + 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 compact_resultStandardSchemeFactory implements SchemeFactory { + public compact_resultStandardScheme getScheme() { + return new compact_resultStandardScheme(); + } + } + + private static class compact_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, compact_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, compact_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class compact_resultTupleSchemeFactory implements SchemeFactory { + public compact_resultTupleScheme getScheme() { + return new compact_resultTupleScheme(); + } + } + + private static class compact_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class compact2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact2_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new compact2_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact2_argsTupleSchemeFactory()); + } + + private CompactionRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact2_args.class, metaDataMap); + } + + public compact2_args() { + } + + public compact2_args( + CompactionRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public compact2_args(compact2_args other) { + if (other.isSetRqst()) { + this.rqst = new CompactionRequest(other.rqst); + } + } + + public compact2_args deepCopy() { + return new compact2_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public CompactionRequest getRqst() { + return this.rqst; + } + + public void setRqst(CompactionRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((CompactionRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof compact2_args) + return this.equals((compact2_args)that); + return false; + } + + public boolean equals(compact2_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(compact2_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("compact2_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 compact2_argsStandardSchemeFactory implements SchemeFactory { + public compact2_argsStandardScheme getScheme() { + return new compact2_argsStandardScheme(); + } + } + + private static class compact2_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new CompactionRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, compact2_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class compact2_argsTupleSchemeFactory implements SchemeFactory { + public compact2_argsTupleScheme getScheme() { + return new compact2_argsTupleScheme(); + } + } + + private static class compact2_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, compact2_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, compact2_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new CompactionRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class compact2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact2_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new compact2_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact2_resultTupleSchemeFactory()); + } + + private CompactionResponse success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact2_result.class, metaDataMap); + } + + public compact2_result() { + } + + public compact2_result( + CompactionResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public compact2_result(compact2_result other) { + if (other.isSetSuccess()) { + this.success = new CompactionResponse(other.success); + } + } + + public compact2_result deepCopy() { + return new compact2_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public CompactionResponse getSuccess() { + return this.success; + } + + public void setSuccess(CompactionResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((CompactionResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof compact2_result) + return this.equals((compact2_result)that); + return false; + } + + public boolean equals(compact2_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(compact2_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("compact2_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 compact2_resultStandardSchemeFactory implements SchemeFactory { + public compact2_resultStandardScheme getScheme() { + return new compact2_resultStandardScheme(); + } + } + + private static class compact2_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_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 CompactionResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(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, compact2_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class compact2_resultTupleSchemeFactory implements SchemeFactory { + public compact2_resultTupleScheme getScheme() { + return new compact2_resultTupleScheme(); + } + } + + private static class compact2_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, compact2_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, compact2_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new CompactionResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class show_compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_compact_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new show_compact_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new show_compact_argsTupleSchemeFactory()); + } + + private ShowCompactRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowCompactRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_compact_args.class, metaDataMap); + } + + public show_compact_args() { + } + + public show_compact_args( + ShowCompactRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public show_compact_args(show_compact_args other) { + if (other.isSetRqst()) { + this.rqst = new ShowCompactRequest(other.rqst); + } + } + + public show_compact_args deepCopy() { + return new show_compact_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public ShowCompactRequest getRqst() { + return this.rqst; + } + + public void setRqst(ShowCompactRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((ShowCompactRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof show_compact_args) + return this.equals((show_compact_args)that); + return false; + } + + public boolean equals(show_compact_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(show_compact_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("show_compact_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 show_compact_argsStandardSchemeFactory implements SchemeFactory { + public show_compact_argsStandardScheme getScheme() { + return new show_compact_argsStandardScheme(); + } + } + + private static class show_compact_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new ShowCompactRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, show_compact_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class show_compact_argsTupleSchemeFactory implements SchemeFactory { + public show_compact_argsTupleScheme getScheme() { + return new show_compact_argsTupleScheme(); + } + } + + private static class show_compact_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, show_compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, show_compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new ShowCompactRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class show_compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("show_compact_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new show_compact_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new show_compact_resultTupleSchemeFactory()); + } + + private ShowCompactResponse success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShowCompactResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(show_compact_result.class, metaDataMap); + } + + public show_compact_result() { + } + + public show_compact_result( + ShowCompactResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public show_compact_result(show_compact_result other) { + if (other.isSetSuccess()) { + this.success = new ShowCompactResponse(other.success); + } + } + + public show_compact_result deepCopy() { + return new show_compact_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public ShowCompactResponse getSuccess() { + return this.success; + } + + public void setSuccess(ShowCompactResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((ShowCompactResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof show_compact_result) + return this.equals((show_compact_result)that); + return false; + } + + public boolean equals(show_compact_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(show_compact_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("show_compact_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 show_compact_resultStandardSchemeFactory implements SchemeFactory { + public show_compact_resultStandardScheme getScheme() { + return new show_compact_resultStandardScheme(); + } + } + + private static class show_compact_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, show_compact_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 ShowCompactResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(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, show_compact_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class show_compact_resultTupleSchemeFactory implements SchemeFactory { + public show_compact_resultTupleScheme getScheme() { + return new show_compact_resultTupleScheme(); + } + } + + private static class show_compact_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, show_compact_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, show_compact_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new ShowCompactResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class add_dynamic_partitions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_dynamic_partitions_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new add_dynamic_partitions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_dynamic_partitions_argsTupleSchemeFactory()); + } + + private AddDynamicPartitions rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AddDynamicPartitions.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_dynamic_partitions_args.class, metaDataMap); + } + + public add_dynamic_partitions_args() { + } + + public add_dynamic_partitions_args( + AddDynamicPartitions rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public add_dynamic_partitions_args(add_dynamic_partitions_args other) { + if (other.isSetRqst()) { + this.rqst = new AddDynamicPartitions(other.rqst); + } + } + + public add_dynamic_partitions_args deepCopy() { + return new add_dynamic_partitions_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public AddDynamicPartitions getRqst() { + return this.rqst; + } + + public void setRqst(AddDynamicPartitions rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((AddDynamicPartitions)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_dynamic_partitions_args) + return this.equals((add_dynamic_partitions_args)that); + return false; + } + + public boolean equals(add_dynamic_partitions_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(add_dynamic_partitions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_dynamic_partitions_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 add_dynamic_partitions_argsStandardSchemeFactory implements SchemeFactory { + public add_dynamic_partitions_argsStandardScheme getScheme() { + return new add_dynamic_partitions_argsStandardScheme(); + } + } + + private static class add_dynamic_partitions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new AddDynamicPartitions(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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_dynamic_partitions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class add_dynamic_partitions_argsTupleSchemeFactory implements SchemeFactory { + public add_dynamic_partitions_argsTupleScheme getScheme() { + return new add_dynamic_partitions_argsTupleScheme(); + } + } + + private static class add_dynamic_partitions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, add_dynamic_partitions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new AddDynamicPartitions(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class add_dynamic_partitions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_dynamic_partitions_result"); + + 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 add_dynamic_partitions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new add_dynamic_partitions_resultTupleSchemeFactory()); + } + + private NoSuchTxnException o1; // required + private TxnAbortedException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_dynamic_partitions_result.class, metaDataMap); + } + + public add_dynamic_partitions_result() { + } + + public add_dynamic_partitions_result( + NoSuchTxnException o1, + TxnAbortedException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public add_dynamic_partitions_result(add_dynamic_partitions_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchTxnException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new TxnAbortedException(other.o2); + } + } + + public add_dynamic_partitions_result deepCopy() { + return new add_dynamic_partitions_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public NoSuchTxnException getO1() { + return this.o1; + } + + public void setO1(NoSuchTxnException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public TxnAbortedException getO2() { + return this.o2; + } + + public void setO2(TxnAbortedException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchTxnException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((TxnAbortedException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_dynamic_partitions_result) + return this.equals((add_dynamic_partitions_result)that); + return false; + } + + public boolean equals(add_dynamic_partitions_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + boolean present_o2 = true && (isSetO2()); + list.add(present_o2); + if (present_o2) + list.add(o2); + + return list.hashCode(); + } + + @Override + public int compareTo(add_dynamic_partitions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(other.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("add_dynamic_partitions_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + 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 add_dynamic_partitions_resultStandardSchemeFactory implements SchemeFactory { + public add_dynamic_partitions_resultStandardScheme getScheme() { + return new add_dynamic_partitions_resultStandardScheme(); + } + } + + private static class add_dynamic_partitions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, add_dynamic_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 NoSuchTxnException(); + 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 TxnAbortedException(); + 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, add_dynamic_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 add_dynamic_partitions_resultTupleSchemeFactory implements SchemeFactory { + public add_dynamic_partitions_resultTupleScheme getScheme() { + return new add_dynamic_partitions_resultTupleScheme(); + } + } + + private static class add_dynamic_partitions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, add_dynamic_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, add_dynamic_partitions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.o1 = new NoSuchTxnException(); + struct.o1.read(iprot); + struct.setO1IsSet(true); + } + if (incoming.get(1)) { + struct.o2 = new TxnAbortedException(); + struct.o2.read(iprot); + struct.setO2IsSet(true); + } + } + } + + } + + public static class get_next_notification_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_next_notification_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_next_notification_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_next_notification_argsTupleSchemeFactory()); + } + + private NotificationEventRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NotificationEventRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_next_notification_args.class, metaDataMap); + } + + public get_next_notification_args() { + } + + public get_next_notification_args( + NotificationEventRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public get_next_notification_args(get_next_notification_args other) { + if (other.isSetRqst()) { + this.rqst = new NotificationEventRequest(other.rqst); + } + } + + public get_next_notification_args deepCopy() { + return new get_next_notification_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public NotificationEventRequest getRqst() { + return this.rqst; + } + + public void setRqst(NotificationEventRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((NotificationEventRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_next_notification_args) + return this.equals((get_next_notification_args)that); + return false; + } + + public boolean equals(get_next_notification_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(get_next_notification_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_next_notification_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 get_next_notification_argsStandardSchemeFactory implements SchemeFactory { + public get_next_notification_argsStandardScheme getScheme() { + return new get_next_notification_argsStandardScheme(); + } + } + + private static class get_next_notification_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_next_notification_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new NotificationEventRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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_next_notification_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_next_notification_argsTupleSchemeFactory implements SchemeFactory { + public get_next_notification_argsTupleScheme getScheme() { + return new get_next_notification_argsTupleScheme(); + } + } + + private static class get_next_notification_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_next_notification_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_next_notification_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new NotificationEventRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class get_next_notification_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_next_notification_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_next_notification_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_next_notification_resultTupleSchemeFactory()); + } + + private NotificationEventResponse success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NotificationEventResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_next_notification_result.class, metaDataMap); + } + + public get_next_notification_result() { + } + + public get_next_notification_result( + NotificationEventResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public get_next_notification_result(get_next_notification_result other) { + if (other.isSetSuccess()) { + this.success = new NotificationEventResponse(other.success); + } + } + + public get_next_notification_result deepCopy() { + return new get_next_notification_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public NotificationEventResponse getSuccess() { + return this.success; + } + + public void setSuccess(NotificationEventResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((NotificationEventResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_next_notification_result) + return this.equals((get_next_notification_result)that); + return false; + } + + public boolean equals(get_next_notification_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(get_next_notification_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_next_notification_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_next_notification_resultStandardSchemeFactory implements SchemeFactory { + public get_next_notification_resultStandardScheme getScheme() { + return new get_next_notification_resultStandardScheme(); + } + } + + private static class get_next_notification_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_next_notification_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 NotificationEventResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(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_next_notification_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_next_notification_resultTupleSchemeFactory implements SchemeFactory { + public get_next_notification_resultTupleScheme getScheme() { + return new get_next_notification_resultTupleScheme(); + } + } + + private static class get_next_notification_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_next_notification_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_next_notification_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new NotificationEventResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class get_current_notificationEventId_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_current_notificationEventId_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_current_notificationEventId_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_current_notificationEventId_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 { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_current_notificationEventId_args.class, metaDataMap); + } + + public get_current_notificationEventId_args() { + } + + /** + * Performs a deep copy on other. + */ + public get_current_notificationEventId_args(get_current_notificationEventId_args other) { + } + + public get_current_notificationEventId_args deepCopy() { + return new get_current_notificationEventId_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_current_notificationEventId_args) + return this.equals((get_current_notificationEventId_args)that); + return false; + } + + public boolean equals(get_current_notificationEventId_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(get_current_notificationEventId_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_current_notificationEventId_args("); + boolean first = true; + + 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 get_current_notificationEventId_argsStandardSchemeFactory implements SchemeFactory { + public get_current_notificationEventId_argsStandardScheme getScheme() { + return new get_current_notificationEventId_argsStandardScheme(); + } + } + + private static class get_current_notificationEventId_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_current_notificationEventId_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_current_notificationEventId_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_current_notificationEventId_argsTupleSchemeFactory implements SchemeFactory { + public get_current_notificationEventId_argsTupleScheme getScheme() { + return new get_current_notificationEventId_argsTupleScheme(); + } + } + + private static class get_current_notificationEventId_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_current_notificationEventId_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_current_notificationEventId_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class get_current_notificationEventId_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_current_notificationEventId_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_current_notificationEventId_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_current_notificationEventId_resultTupleSchemeFactory()); + } + + private CurrentNotificationEventId success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CurrentNotificationEventId.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_current_notificationEventId_result.class, metaDataMap); + } + + public get_current_notificationEventId_result() { + } + + public get_current_notificationEventId_result( + CurrentNotificationEventId success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public get_current_notificationEventId_result(get_current_notificationEventId_result other) { + if (other.isSetSuccess()) { + this.success = new CurrentNotificationEventId(other.success); + } + } + + public get_current_notificationEventId_result deepCopy() { + return new get_current_notificationEventId_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public CurrentNotificationEventId getSuccess() { + return this.success; + } + + public void setSuccess(CurrentNotificationEventId success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((CurrentNotificationEventId)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_current_notificationEventId_result) + return this.equals((get_current_notificationEventId_result)that); + return false; + } + + public boolean equals(get_current_notificationEventId_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(get_current_notificationEventId_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_current_notificationEventId_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_current_notificationEventId_resultStandardSchemeFactory implements SchemeFactory { + public get_current_notificationEventId_resultStandardScheme getScheme() { + return new get_current_notificationEventId_resultStandardScheme(); + } + } + + private static class get_current_notificationEventId_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_current_notificationEventId_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 CurrentNotificationEventId(); + struct.success.read(iprot); + struct.setSuccessIsSet(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_current_notificationEventId_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_current_notificationEventId_resultTupleSchemeFactory implements SchemeFactory { + public get_current_notificationEventId_resultTupleScheme getScheme() { + return new get_current_notificationEventId_resultTupleScheme(); + } + } + + private static class get_current_notificationEventId_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_current_notificationEventId_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_current_notificationEventId_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new CurrentNotificationEventId(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class fire_listener_event_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fire_listener_event_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fire_listener_event_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fire_listener_event_argsTupleSchemeFactory()); + } + + private FireEventRequest rqst; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RQST + return RQST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FireEventRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fire_listener_event_args.class, metaDataMap); + } + + public fire_listener_event_args() { + } + + public fire_listener_event_args( + FireEventRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public fire_listener_event_args(fire_listener_event_args other) { + if (other.isSetRqst()) { + this.rqst = new FireEventRequest(other.rqst); + } + } + + public fire_listener_event_args deepCopy() { + return new fire_listener_event_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public FireEventRequest getRqst() { + return this.rqst; + } + + public void setRqst(FireEventRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((FireEventRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof fire_listener_event_args) + return this.equals((fire_listener_event_args)that); + return false; + } + + public boolean equals(fire_listener_event_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(fire_listener_event_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("fire_listener_event_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (rqst != null) { + rqst.validate(); + } + } + + 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 fire_listener_event_argsStandardSchemeFactory implements SchemeFactory { + public fire_listener_event_argsStandardScheme getScheme() { + return new fire_listener_event_argsStandardScheme(); + } + } + + private static class fire_listener_event_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fire_listener_event_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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new FireEventRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, fire_listener_event_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fire_listener_event_argsTupleSchemeFactory implements SchemeFactory { + public fire_listener_event_argsTupleScheme getScheme() { + return new fire_listener_event_argsTupleScheme(); + } + } + + private static class fire_listener_event_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fire_listener_event_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fire_listener_event_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new FireEventRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class fire_listener_event_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fire_listener_event_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new fire_listener_event_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new fire_listener_event_resultTupleSchemeFactory()); + } + + private FireEventResponse success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FireEventResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fire_listener_event_result.class, metaDataMap); + } + + public fire_listener_event_result() { + } + + public fire_listener_event_result( + FireEventResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public fire_listener_event_result(fire_listener_event_result other) { + if (other.isSetSuccess()) { + this.success = new FireEventResponse(other.success); + } + } + + public fire_listener_event_result deepCopy() { + return new fire_listener_event_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public FireEventResponse getSuccess() { + return this.success; + } + + public void setSuccess(FireEventResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((FireEventResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof fire_listener_event_result) + return this.equals((fire_listener_event_result)that); + return false; + } + + public boolean equals(fire_listener_event_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(fire_listener_event_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("fire_listener_event_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 fire_listener_event_resultStandardSchemeFactory implements SchemeFactory { + public fire_listener_event_resultStandardScheme getScheme() { + return new fire_listener_event_resultStandardScheme(); + } + } + + private static class fire_listener_event_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, fire_listener_event_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 FireEventResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(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, fire_listener_event_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class fire_listener_event_resultTupleSchemeFactory implements SchemeFactory { + public fire_listener_event_resultTupleScheme getScheme() { + return new fire_listener_event_resultTupleScheme(); + } + } + + private static class fire_listener_event_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, fire_listener_event_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, fire_listener_event_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new FireEventResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class flushCache_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("flushCache_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new flushCache_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new flushCache_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 { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flushCache_args.class, metaDataMap); + } + + public flushCache_args() { + } + + /** + * Performs a deep copy on other. + */ + public flushCache_args(flushCache_args other) { + } + + public flushCache_args deepCopy() { + return new flushCache_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof flushCache_args) + return this.equals((flushCache_args)that); + return false; + } + + public boolean equals(flushCache_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(flushCache_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("flushCache_args("); + boolean first = true; + + 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 flushCache_argsStandardSchemeFactory implements SchemeFactory { + public flushCache_argsStandardScheme getScheme() { + return new flushCache_argsStandardScheme(); + } + } + + private static class flushCache_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, flushCache_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, flushCache_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class flushCache_argsTupleSchemeFactory implements SchemeFactory { + public flushCache_argsTupleScheme getScheme() { + return new flushCache_argsTupleScheme(); + } + } + + private static class flushCache_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, flushCache_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, flushCache_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class flushCache_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("flushCache_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new flushCache_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new flushCache_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 { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flushCache_result.class, metaDataMap); + } + + public flushCache_result() { + } + + /** + * Performs a deep copy on other. + */ + public flushCache_result(flushCache_result other) { + } + + public flushCache_result deepCopy() { + return new flushCache_result(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof flushCache_result) + return this.equals((flushCache_result)that); + return false; + } + + public boolean equals(flushCache_result that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(flushCache_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("flushCache_result("); + boolean first = true; + + 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 flushCache_resultStandardSchemeFactory implements SchemeFactory { + public flushCache_resultStandardScheme getScheme() { + return new flushCache_resultStandardScheme(); + } + } + + private static class flushCache_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, flushCache_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, flushCache_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class flushCache_resultTupleSchemeFactory implements SchemeFactory { + public flushCache_resultTupleScheme getScheme() { + return new flushCache_resultTupleScheme(); + } + } + + private static class flushCache_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, flushCache_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, flushCache_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class cm_recycle_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cm_recycle_args"); + + private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new cm_recycle_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cm_recycle_argsTupleSchemeFactory()); + } + + private CmRecycleRequest request; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQUEST((short)1, "request"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQUEST + return REQUEST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CmRecycleRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cm_recycle_args.class, metaDataMap); + } + + public cm_recycle_args() { + } + + public cm_recycle_args( + CmRecycleRequest request) + { + this(); + this.request = request; + } + + /** + * Performs a deep copy on other. + */ + public cm_recycle_args(cm_recycle_args other) { + if (other.isSetRequest()) { + this.request = new CmRecycleRequest(other.request); + } + } + + public cm_recycle_args deepCopy() { + return new cm_recycle_args(this); + } + + @Override + public void clear() { + this.request = null; + } + + public CmRecycleRequest getRequest() { + return this.request; + } + + public void setRequest(CmRecycleRequest request) { + this.request = request; + } + + public void unsetRequest() { + this.request = null; + } + + /** Returns true if field request is set (has been assigned a value) and false otherwise */ + public boolean isSetRequest() { + return this.request != null; + } + + public void setRequestIsSet(boolean value) { + if (!value) { + this.request = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQUEST: + if (value == null) { + unsetRequest(); + } else { + setRequest((CmRecycleRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQUEST: + return getRequest(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQUEST: + return isSetRequest(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof cm_recycle_args) + return this.equals((cm_recycle_args)that); + return false; + } + + public boolean equals(cm_recycle_args that) { + if (that == null) + return false; + + boolean this_present_request = true && this.isSetRequest(); + boolean that_present_request = true && that.isSetRequest(); + if (this_present_request || that_present_request) { + if (!(this_present_request && that_present_request)) + return false; + if (!this.request.equals(that.request)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_request = true && (isSetRequest()); + list.add(present_request); + if (present_request) + list.add(request); + + return list.hashCode(); + } + + @Override + public int compareTo(cm_recycle_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRequest()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("cm_recycle_args("); + boolean first = true; + + sb.append("request:"); + if (this.request == null) { + sb.append("null"); + } else { + sb.append(this.request); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (request != null) { + request.validate(); + } + } + + 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 cm_recycle_argsStandardSchemeFactory implements SchemeFactory { + public cm_recycle_argsStandardScheme getScheme() { + return new cm_recycle_argsStandardScheme(); + } + } + + private static class cm_recycle_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cm_recycle_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: // REQUEST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.request = new CmRecycleRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(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, cm_recycle_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.request != null) { + oprot.writeFieldBegin(REQUEST_FIELD_DESC); + struct.request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cm_recycle_argsTupleSchemeFactory implements SchemeFactory { + public cm_recycle_argsTupleScheme getScheme() { + return new cm_recycle_argsTupleScheme(); + } + } + + private static class cm_recycle_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cm_recycle_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRequest()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRequest()) { + struct.request.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cm_recycle_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.request = new CmRecycleRequest(); + struct.request.read(iprot); + struct.setRequestIsSet(true); + } + } + } + + } + + public static class cm_recycle_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cm_recycle_result"); + + 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 cm_recycle_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cm_recycle_resultTupleSchemeFactory()); + } + + private CmRecycleResponse success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CmRecycleResponse.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cm_recycle_result.class, metaDataMap); + } + + public cm_recycle_result() { + } + + public cm_recycle_result( + CmRecycleResponse success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public cm_recycle_result(cm_recycle_result other) { + if (other.isSetSuccess()) { + this.success = new CmRecycleResponse(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public cm_recycle_result deepCopy() { + return new cm_recycle_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public CmRecycleResponse getSuccess() { + return this.success; + } + + public void setSuccess(CmRecycleResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((CmRecycleResponse)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof cm_recycle_result) + return this.equals((cm_recycle_result)that); + return false; + } + + public boolean equals(cm_recycle_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(cm_recycle_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("cm_recycle_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 cm_recycle_resultStandardSchemeFactory implements SchemeFactory { + public cm_recycle_resultStandardScheme getScheme() { + return new cm_recycle_resultStandardScheme(); + } + } + + private static class cm_recycle_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cm_recycle_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 CmRecycleResponse(); + 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, cm_recycle_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 cm_recycle_resultTupleSchemeFactory implements SchemeFactory { + public cm_recycle_resultTupleScheme getScheme() { + return new cm_recycle_resultTupleScheme(); + } + } + + private static class cm_recycle_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cm_recycle_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, cm_recycle_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new CmRecycleResponse(); + 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 get_file_metadata_by_expr_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_file_metadata_by_expr_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_file_metadata_by_expr_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_file_metadata_by_expr_argsTupleSchemeFactory()); + } + + private GetFileMetadataByExprRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetFileMetadataByExprRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_file_metadata_by_expr_args.class, metaDataMap); + } + + public get_file_metadata_by_expr_args() { + } + + public get_file_metadata_by_expr_args( + GetFileMetadataByExprRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public get_file_metadata_by_expr_args(get_file_metadata_by_expr_args other) { + if (other.isSetReq()) { + this.req = new GetFileMetadataByExprRequest(other.req); + } + } + + public get_file_metadata_by_expr_args deepCopy() { + return new get_file_metadata_by_expr_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public GetFileMetadataByExprRequest getReq() { + return this.req; + } + + public void setReq(GetFileMetadataByExprRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((GetFileMetadataByExprRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_file_metadata_by_expr_args) + return this.equals((get_file_metadata_by_expr_args)that); + return false; + } + + public boolean equals(get_file_metadata_by_expr_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(get_file_metadata_by_expr_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_file_metadata_by_expr_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 get_file_metadata_by_expr_argsStandardSchemeFactory implements SchemeFactory { + public get_file_metadata_by_expr_argsStandardScheme getScheme() { + return new get_file_metadata_by_expr_argsStandardScheme(); + } + } + + private static class get_file_metadata_by_expr_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_file_metadata_by_expr_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new GetFileMetadataByExprRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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_file_metadata_by_expr_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_file_metadata_by_expr_argsTupleSchemeFactory implements SchemeFactory { + public get_file_metadata_by_expr_argsTupleScheme getScheme() { + return new get_file_metadata_by_expr_argsTupleScheme(); + } + } + + private static class get_file_metadata_by_expr_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_by_expr_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_by_expr_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new GetFileMetadataByExprRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class get_file_metadata_by_expr_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_file_metadata_by_expr_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_file_metadata_by_expr_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_file_metadata_by_expr_resultTupleSchemeFactory()); + } + + private GetFileMetadataByExprResult success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetFileMetadataByExprResult.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_file_metadata_by_expr_result.class, metaDataMap); + } + + public get_file_metadata_by_expr_result() { + } + + public get_file_metadata_by_expr_result( + GetFileMetadataByExprResult success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public get_file_metadata_by_expr_result(get_file_metadata_by_expr_result other) { + if (other.isSetSuccess()) { + this.success = new GetFileMetadataByExprResult(other.success); + } + } + + public get_file_metadata_by_expr_result deepCopy() { + return new get_file_metadata_by_expr_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public GetFileMetadataByExprResult getSuccess() { + return this.success; + } + + public void setSuccess(GetFileMetadataByExprResult success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((GetFileMetadataByExprResult)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_file_metadata_by_expr_result) + return this.equals((get_file_metadata_by_expr_result)that); + return false; + } + + public boolean equals(get_file_metadata_by_expr_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(get_file_metadata_by_expr_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_file_metadata_by_expr_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_file_metadata_by_expr_resultStandardSchemeFactory implements SchemeFactory { + public get_file_metadata_by_expr_resultStandardScheme getScheme() { + return new get_file_metadata_by_expr_resultStandardScheme(); + } + } + + private static class get_file_metadata_by_expr_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_file_metadata_by_expr_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 GetFileMetadataByExprResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(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_file_metadata_by_expr_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_file_metadata_by_expr_resultTupleSchemeFactory implements SchemeFactory { + public get_file_metadata_by_expr_resultTupleScheme getScheme() { + return new get_file_metadata_by_expr_resultTupleScheme(); + } + } + + private static class get_file_metadata_by_expr_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_by_expr_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_by_expr_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new GetFileMetadataByExprResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class get_file_metadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_file_metadata_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_file_metadata_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_file_metadata_argsTupleSchemeFactory()); + } + + private GetFileMetadataRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetFileMetadataRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_file_metadata_args.class, metaDataMap); + } + + public get_file_metadata_args() { + } + + public get_file_metadata_args( + GetFileMetadataRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public get_file_metadata_args(get_file_metadata_args other) { + if (other.isSetReq()) { + this.req = new GetFileMetadataRequest(other.req); + } + } + + public get_file_metadata_args deepCopy() { + return new get_file_metadata_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public GetFileMetadataRequest getReq() { + return this.req; + } + + public void setReq(GetFileMetadataRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((GetFileMetadataRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_file_metadata_args) + return this.equals((get_file_metadata_args)that); + return false; + } + + public boolean equals(get_file_metadata_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(get_file_metadata_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_file_metadata_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 get_file_metadata_argsStandardSchemeFactory implements SchemeFactory { + public get_file_metadata_argsStandardScheme getScheme() { + return new get_file_metadata_argsStandardScheme(); + } + } + + private static class get_file_metadata_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_file_metadata_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new GetFileMetadataRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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_file_metadata_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_file_metadata_argsTupleSchemeFactory implements SchemeFactory { + public get_file_metadata_argsTupleScheme getScheme() { + return new get_file_metadata_argsTupleScheme(); + } + } + + private static class get_file_metadata_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new GetFileMetadataRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class get_file_metadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_file_metadata_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_file_metadata_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_file_metadata_resultTupleSchemeFactory()); + } + + private GetFileMetadataResult success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetFileMetadataResult.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_file_metadata_result.class, metaDataMap); + } + + public get_file_metadata_result() { + } + + public get_file_metadata_result( + GetFileMetadataResult success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public get_file_metadata_result(get_file_metadata_result other) { + if (other.isSetSuccess()) { + this.success = new GetFileMetadataResult(other.success); + } + } + + public get_file_metadata_result deepCopy() { + return new get_file_metadata_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public GetFileMetadataResult getSuccess() { + return this.success; + } + + public void setSuccess(GetFileMetadataResult success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((GetFileMetadataResult)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_file_metadata_result) + return this.equals((get_file_metadata_result)that); + return false; + } + + public boolean equals(get_file_metadata_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(get_file_metadata_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_file_metadata_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 get_file_metadata_resultStandardSchemeFactory implements SchemeFactory { + public get_file_metadata_resultStandardScheme getScheme() { + return new get_file_metadata_resultStandardScheme(); + } + } + + private static class get_file_metadata_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_file_metadata_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 GetFileMetadataResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(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_file_metadata_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_file_metadata_resultTupleSchemeFactory implements SchemeFactory { + public get_file_metadata_resultTupleScheme getScheme() { + return new get_file_metadata_resultTupleScheme(); + } + } + + private static class get_file_metadata_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_file_metadata_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new GetFileMetadataResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class put_file_metadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_file_metadata_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new put_file_metadata_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new put_file_metadata_argsTupleSchemeFactory()); + } + + private PutFileMetadataRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PutFileMetadataRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_file_metadata_args.class, metaDataMap); + } + + public put_file_metadata_args() { + } + + public put_file_metadata_args( + PutFileMetadataRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public put_file_metadata_args(put_file_metadata_args other) { + if (other.isSetReq()) { + this.req = new PutFileMetadataRequest(other.req); + } + } + + public put_file_metadata_args deepCopy() { + return new put_file_metadata_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public PutFileMetadataRequest getReq() { + return this.req; + } + + public void setReq(PutFileMetadataRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((PutFileMetadataRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof put_file_metadata_args) + return this.equals((put_file_metadata_args)that); + return false; + } + + public boolean equals(put_file_metadata_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(put_file_metadata_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("put_file_metadata_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 put_file_metadata_argsStandardSchemeFactory implements SchemeFactory { + public put_file_metadata_argsStandardScheme getScheme() { + return new put_file_metadata_argsStandardScheme(); + } + } + + private static class put_file_metadata_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, put_file_metadata_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new PutFileMetadataRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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, put_file_metadata_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class put_file_metadata_argsTupleSchemeFactory implements SchemeFactory { + public put_file_metadata_argsTupleScheme getScheme() { + return new put_file_metadata_argsTupleScheme(); + } + } + + private static class put_file_metadata_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, put_file_metadata_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, put_file_metadata_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new PutFileMetadataRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class put_file_metadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("put_file_metadata_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new put_file_metadata_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new put_file_metadata_resultTupleSchemeFactory()); + } + + private PutFileMetadataResult success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PutFileMetadataResult.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_file_metadata_result.class, metaDataMap); + } + + public put_file_metadata_result() { + } + + public put_file_metadata_result( + PutFileMetadataResult success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public put_file_metadata_result(put_file_metadata_result other) { + if (other.isSetSuccess()) { + this.success = new PutFileMetadataResult(other.success); + } + } + + public put_file_metadata_result deepCopy() { + return new put_file_metadata_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public PutFileMetadataResult getSuccess() { + return this.success; + } + + public void setSuccess(PutFileMetadataResult success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((PutFileMetadataResult)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof put_file_metadata_result) + return this.equals((put_file_metadata_result)that); + return false; + } + + public boolean equals(put_file_metadata_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(put_file_metadata_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("put_file_metadata_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 put_file_metadata_resultStandardSchemeFactory implements SchemeFactory { + public put_file_metadata_resultStandardScheme getScheme() { + return new put_file_metadata_resultStandardScheme(); + } + } + + private static class put_file_metadata_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, put_file_metadata_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 PutFileMetadataResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(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, put_file_metadata_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class put_file_metadata_resultTupleSchemeFactory implements SchemeFactory { + public put_file_metadata_resultTupleScheme getScheme() { + return new put_file_metadata_resultTupleScheme(); + } + } + + private static class put_file_metadata_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, put_file_metadata_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, put_file_metadata_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new PutFileMetadataResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class clear_file_metadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clear_file_metadata_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new clear_file_metadata_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new clear_file_metadata_argsTupleSchemeFactory()); + } + + private ClearFileMetadataRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClearFileMetadataRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clear_file_metadata_args.class, metaDataMap); + } + + public clear_file_metadata_args() { + } + + public clear_file_metadata_args( + ClearFileMetadataRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public clear_file_metadata_args(clear_file_metadata_args other) { + if (other.isSetReq()) { + this.req = new ClearFileMetadataRequest(other.req); + } + } + + public clear_file_metadata_args deepCopy() { + return new clear_file_metadata_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public ClearFileMetadataRequest getReq() { + return this.req; + } + + public void setReq(ClearFileMetadataRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((ClearFileMetadataRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof clear_file_metadata_args) + return this.equals((clear_file_metadata_args)that); + return false; + } + + public boolean equals(clear_file_metadata_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(clear_file_metadata_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("clear_file_metadata_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 clear_file_metadata_argsStandardSchemeFactory implements SchemeFactory { + public clear_file_metadata_argsStandardScheme getScheme() { + return new clear_file_metadata_argsStandardScheme(); + } + } + + private static class clear_file_metadata_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, clear_file_metadata_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new ClearFileMetadataRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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, clear_file_metadata_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class clear_file_metadata_argsTupleSchemeFactory implements SchemeFactory { + public clear_file_metadata_argsTupleScheme getScheme() { + return new clear_file_metadata_argsTupleScheme(); + } + } + + private static class clear_file_metadata_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, clear_file_metadata_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, clear_file_metadata_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new ClearFileMetadataRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class clear_file_metadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clear_file_metadata_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new clear_file_metadata_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new clear_file_metadata_resultTupleSchemeFactory()); + } + + private ClearFileMetadataResult success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClearFileMetadataResult.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clear_file_metadata_result.class, metaDataMap); + } + + public clear_file_metadata_result() { + } + + public clear_file_metadata_result( + ClearFileMetadataResult success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public clear_file_metadata_result(clear_file_metadata_result other) { + if (other.isSetSuccess()) { + this.success = new ClearFileMetadataResult(other.success); + } + } + + public clear_file_metadata_result deepCopy() { + return new clear_file_metadata_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public ClearFileMetadataResult getSuccess() { + return this.success; + } + + public void setSuccess(ClearFileMetadataResult success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((ClearFileMetadataResult)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof clear_file_metadata_result) + return this.equals((clear_file_metadata_result)that); + return false; + } + + public boolean equals(clear_file_metadata_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(clear_file_metadata_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("clear_file_metadata_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 clear_file_metadata_resultStandardSchemeFactory implements SchemeFactory { + public clear_file_metadata_resultStandardScheme getScheme() { + return new clear_file_metadata_resultStandardScheme(); + } + } + + private static class clear_file_metadata_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, clear_file_metadata_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 ClearFileMetadataResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(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, clear_file_metadata_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class clear_file_metadata_resultTupleSchemeFactory implements SchemeFactory { + public clear_file_metadata_resultTupleScheme getScheme() { + return new clear_file_metadata_resultTupleScheme(); + } + } + + private static class clear_file_metadata_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, clear_file_metadata_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, clear_file_metadata_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new ClearFileMetadataResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class cache_file_metadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cache_file_metadata_args"); + + private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new cache_file_metadata_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cache_file_metadata_argsTupleSchemeFactory()); + } + + private CacheFileMetadataRequest req; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + REQ((short)1, "req"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // REQ + return REQ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CacheFileMetadataRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cache_file_metadata_args.class, metaDataMap); + } + + public cache_file_metadata_args() { + } + + public cache_file_metadata_args( + CacheFileMetadataRequest req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public cache_file_metadata_args(cache_file_metadata_args other) { + if (other.isSetReq()) { + this.req = new CacheFileMetadataRequest(other.req); + } + } + + public cache_file_metadata_args deepCopy() { + return new cache_file_metadata_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public CacheFileMetadataRequest getReq() { + return this.req; + } + + public void setReq(CacheFileMetadataRequest req) { + this.req = req; + } + + public void unsetReq() { + this.req = null; + } + + /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean value) { + if (!value) { + this.req = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case REQ: + if (value == null) { + unsetReq(); + } else { + setReq((CacheFileMetadataRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case REQ: + return getReq(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case REQ: + return isSetReq(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof cache_file_metadata_args) + return this.equals((cache_file_metadata_args)that); + return false; + } + + public boolean equals(cache_file_metadata_args that) { + if (that == null) + return false; + + boolean this_present_req = true && this.isSetReq(); + boolean that_present_req = true && that.isSetReq(); + if (this_present_req || that_present_req) { + if (!(this_present_req && that_present_req)) + return false; + if (!this.req.equals(that.req)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_req = true && (isSetReq()); + list.add(present_req); + if (present_req) + list.add(req); + + return list.hashCode(); + } + + @Override + public int compareTo(cache_file_metadata_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReq()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("cache_file_metadata_args("); + boolean first = true; + + sb.append("req:"); + if (this.req == null) { + sb.append("null"); + } else { + sb.append(this.req); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (req != null) { + req.validate(); + } + } + + 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 cache_file_metadata_argsStandardSchemeFactory implements SchemeFactory { + public cache_file_metadata_argsStandardScheme getScheme() { + return new cache_file_metadata_argsStandardScheme(); + } + } + + private static class cache_file_metadata_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cache_file_metadata_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: // REQ + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.req = new CacheFileMetadataRequest(); + struct.req.read(iprot); + struct.setReqIsSet(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, cache_file_metadata_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + struct.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cache_file_metadata_argsTupleSchemeFactory implements SchemeFactory { + public cache_file_metadata_argsTupleScheme getScheme() { + return new cache_file_metadata_argsTupleScheme(); + } + } + + private static class cache_file_metadata_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cache_file_metadata_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetReq()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetReq()) { + struct.req.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cache_file_metadata_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new CacheFileMetadataRequest(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class cache_file_metadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cache_file_metadata_result"); + + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new cache_file_metadata_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cache_file_metadata_resultTupleSchemeFactory()); + } + + private CacheFileMetadataResult success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CacheFileMetadataResult.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cache_file_metadata_result.class, metaDataMap); + } + + public cache_file_metadata_result() { + } + + public cache_file_metadata_result( + CacheFileMetadataResult success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public cache_file_metadata_result(cache_file_metadata_result other) { + if (other.isSetSuccess()) { + this.success = new CacheFileMetadataResult(other.success); + } + } + + public cache_file_metadata_result deepCopy() { + return new cache_file_metadata_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public CacheFileMetadataResult getSuccess() { + return this.success; + } + + public void setSuccess(CacheFileMetadataResult success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((CacheFileMetadataResult)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof cache_file_metadata_result) + return this.equals((cache_file_metadata_result)that); + return false; + } + + public boolean equals(cache_file_metadata_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(cache_file_metadata_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("cache_file_metadata_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + 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 { + 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 cache_file_metadata_resultStandardSchemeFactory implements SchemeFactory { + public cache_file_metadata_resultStandardScheme getScheme() { + return new cache_file_metadata_resultStandardScheme(); + } + } + + private static class cache_file_metadata_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cache_file_metadata_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 CacheFileMetadataResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(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, cache_file_metadata_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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cache_file_metadata_resultTupleSchemeFactory implements SchemeFactory { + public cache_file_metadata_resultTupleScheme getScheme() { + return new cache_file_metadata_resultTupleScheme(); + } + } + + private static class cache_file_metadata_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cache_file_metadata_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cache_file_metadata_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new CacheFileMetadataResult(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class get_metastore_db_uuid_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_metastore_db_uuid_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_metastore_db_uuid_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_metastore_db_uuid_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 { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_metastore_db_uuid_args.class, metaDataMap); + } + + public get_metastore_db_uuid_args() { + } + + /** + * Performs a deep copy on other. + */ + public get_metastore_db_uuid_args(get_metastore_db_uuid_args other) { + } + + public get_metastore_db_uuid_args deepCopy() { + return new get_metastore_db_uuid_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_metastore_db_uuid_args) + return this.equals((get_metastore_db_uuid_args)that); + return false; + } + + public boolean equals(get_metastore_db_uuid_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + return list.hashCode(); + } + + @Override + public int compareTo(get_metastore_db_uuid_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_metastore_db_uuid_args("); + boolean first = true; + + 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 get_metastore_db_uuid_argsStandardSchemeFactory implements SchemeFactory { + public get_metastore_db_uuid_argsStandardScheme getScheme() { + return new get_metastore_db_uuid_argsStandardScheme(); + } + } + + private static class get_metastore_db_uuid_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_metastore_db_uuid_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_metastore_db_uuid_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_metastore_db_uuid_argsTupleSchemeFactory implements SchemeFactory { + public get_metastore_db_uuid_argsTupleScheme getScheme() { + return new get_metastore_db_uuid_argsTupleScheme(); + } + } + + private static class get_metastore_db_uuid_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_metastore_db_uuid_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_metastore_db_uuid_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class get_metastore_db_uuid_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_metastore_db_uuid_result"); + + 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_metastore_db_uuid_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_metastore_db_uuid_resultTupleSchemeFactory()); + } + + private String success; // required + private MetaException o1; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_metastore_db_uuid_result.class, metaDataMap); + } + + public get_metastore_db_uuid_result() { + } + + public get_metastore_db_uuid_result( + String success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_metastore_db_uuid_result(get_metastore_db_uuid_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_metastore_db_uuid_result deepCopy() { + return new get_metastore_db_uuid_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + + public String getSuccess() { + return this.success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((String)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_metastore_db_uuid_result) + return this.equals((get_metastore_db_uuid_result)that); + return false; + } + + public boolean equals(get_metastore_db_uuid_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_o1 = true && (isSetO1()); + list.add(present_o1); + if (present_o1) + list.add(o1); + + return list.hashCode(); + } + + @Override + public int compareTo(get_metastore_db_uuid_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("get_metastore_db_uuid_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + 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 get_metastore_db_uuid_resultStandardSchemeFactory implements SchemeFactory { + public get_metastore_db_uuid_resultStandardScheme getScheme() { + return new get_metastore_db_uuid_resultStandardScheme(); + } + } + + private static class get_metastore_db_uuid_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_metastore_db_uuid_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_metastore_db_uuid_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_metastore_db_uuid_resultTupleSchemeFactory implements SchemeFactory { + public get_metastore_db_uuid_resultTupleScheme getScheme() { + return new get_metastore_db_uuid_resultTupleScheme(); + } + } + + private static class get_metastore_db_uuid_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_metastore_db_uuid_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_metastore_db_uuid_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); + } + } + } + + } + +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnAbortedException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnAbortedException.java new file mode 100644 index 0000000..689f646 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnAbortedException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TxnAbortedException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TxnAbortedException"); + + 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 TxnAbortedExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TxnAbortedExceptionTupleSchemeFactory()); + } + + private String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TxnAbortedException.class, metaDataMap); + } + + public TxnAbortedException() { + } + + public TxnAbortedException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public TxnAbortedException(TxnAbortedException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public TxnAbortedException deepCopy() { + return new TxnAbortedException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TxnAbortedException) + return this.equals((TxnAbortedException)that); + return false; + } + + public boolean equals(TxnAbortedException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(TxnAbortedException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("TxnAbortedException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 TxnAbortedExceptionStandardSchemeFactory implements SchemeFactory { + public TxnAbortedExceptionStandardScheme getScheme() { + return new TxnAbortedExceptionStandardScheme(); + } + } + + private static class TxnAbortedExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TxnAbortedException 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, TxnAbortedException 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 TxnAbortedExceptionTupleSchemeFactory implements SchemeFactory { + public TxnAbortedExceptionTupleScheme getScheme() { + return new TxnAbortedExceptionTupleScheme(); + } + } + + private static class TxnAbortedExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TxnAbortedException 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, TxnAbortedException 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java new file mode 100644 index 0000000..ed382ed --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java @@ -0,0 +1,1220 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TxnInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TxnInfo"); + + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1); + 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)2); + private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField AGENT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("agentInfo", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField HEARTBEAT_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("heartbeatCount", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField META_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("metaInfo", org.apache.thrift.protocol.TType.STRING, (short)7); + private static final org.apache.thrift.protocol.TField STARTED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startedTime", org.apache.thrift.protocol.TType.I64, (short)8); + private static final org.apache.thrift.protocol.TField LAST_HEARTBEAT_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastHeartbeatTime", org.apache.thrift.protocol.TType.I64, (short)9); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TxnInfoStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TxnInfoTupleSchemeFactory()); + } + + private long id; // required + private TxnState state; // required + private String user; // required + private String hostname; // required + private String agentInfo; // optional + private int heartbeatCount; // optional + private String metaInfo; // optional + private long startedTime; // optional + private long lastHeartbeatTime; // 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 { + ID((short)1, "id"), + /** + * + * @see TxnState + */ + STATE((short)2, "state"), + USER((short)3, "user"), + HOSTNAME((short)4, "hostname"), + AGENT_INFO((short)5, "agentInfo"), + HEARTBEAT_COUNT((short)6, "heartbeatCount"), + META_INFO((short)7, "metaInfo"), + STARTED_TIME((short)8, "startedTime"), + LAST_HEARTBEAT_TIME((short)9, "lastHeartbeatTime"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ID + return ID; + case 2: // STATE + return STATE; + case 3: // USER + return USER; + case 4: // HOSTNAME + return HOSTNAME; + case 5: // AGENT_INFO + return AGENT_INFO; + case 6: // HEARTBEAT_COUNT + return HEARTBEAT_COUNT; + case 7: // META_INFO + return META_INFO; + case 8: // STARTED_TIME + return STARTED_TIME; + case 9: // LAST_HEARTBEAT_TIME + return LAST_HEARTBEAT_TIME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ID_ISSET_ID = 0; + private static final int __HEARTBEATCOUNT_ISSET_ID = 1; + private static final int __STARTEDTIME_ISSET_ID = 2; + private static final int __LASTHEARTBEATTIME_ISSET_ID = 3; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.AGENT_INFO,_Fields.HEARTBEAT_COUNT,_Fields.META_INFO,_Fields.STARTED_TIME,_Fields.LAST_HEARTBEAT_TIME}; + 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); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TxnState.class))); + tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AGENT_INFO, new org.apache.thrift.meta_data.FieldMetaData("agentInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.HEARTBEAT_COUNT, new org.apache.thrift.meta_data.FieldMetaData("heartbeatCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.META_INFO, new org.apache.thrift.meta_data.FieldMetaData("metaInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.STARTED_TIME, new org.apache.thrift.meta_data.FieldMetaData("startedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.LAST_HEARTBEAT_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastHeartbeatTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TxnInfo.class, metaDataMap); + } + + public TxnInfo() { + this.agentInfo = "Unknown"; + + this.heartbeatCount = 0; + + } + + public TxnInfo( + long id, + TxnState state, + String user, + String hostname) + { + this(); + this.id = id; + setIdIsSet(true); + this.state = state; + this.user = user; + this.hostname = hostname; + } + + /** + * Performs a deep copy on other. + */ + public TxnInfo(TxnInfo other) { + __isset_bitfield = other.__isset_bitfield; + this.id = other.id; + if (other.isSetState()) { + this.state = other.state; + } + if (other.isSetUser()) { + this.user = other.user; + } + if (other.isSetHostname()) { + this.hostname = other.hostname; + } + if (other.isSetAgentInfo()) { + this.agentInfo = other.agentInfo; + } + this.heartbeatCount = other.heartbeatCount; + if (other.isSetMetaInfo()) { + this.metaInfo = other.metaInfo; + } + this.startedTime = other.startedTime; + this.lastHeartbeatTime = other.lastHeartbeatTime; + } + + public TxnInfo deepCopy() { + return new TxnInfo(this); + } + + @Override + public void clear() { + setIdIsSet(false); + this.id = 0; + this.state = null; + this.user = null; + this.hostname = null; + this.agentInfo = "Unknown"; + + this.heartbeatCount = 0; + + this.metaInfo = null; + setStartedTimeIsSet(false); + this.startedTime = 0; + setLastHeartbeatTimeIsSet(false); + this.lastHeartbeatTime = 0; + } + + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + setIdIsSet(true); + } + + public void unsetId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); + } + + public void setIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); + } + + /** + * + * @see TxnState + */ + public TxnState getState() { + return this.state; + } + + /** + * + * @see TxnState + */ + public void setState(TxnState state) { + this.state = state; + } + + public void unsetState() { + this.state = null; + } + + /** Returns true if field state is set (has been assigned a value) and false otherwise */ + public boolean isSetState() { + return this.state != null; + } + + public void setStateIsSet(boolean value) { + if (!value) { + this.state = null; + } + } + + public String getUser() { + return this.user; + } + + public void setUser(String user) { + this.user = user; + } + + public void unsetUser() { + this.user = null; + } + + /** Returns true if field user is set (has been assigned a value) and false otherwise */ + public boolean isSetUser() { + return this.user != null; + } + + public void setUserIsSet(boolean value) { + if (!value) { + this.user = null; + } + } + + public String getHostname() { + return this.hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public void unsetHostname() { + this.hostname = null; + } + + /** Returns true if field hostname is set (has been assigned a value) and false otherwise */ + public boolean isSetHostname() { + return this.hostname != null; + } + + public void setHostnameIsSet(boolean value) { + if (!value) { + this.hostname = null; + } + } + + public String getAgentInfo() { + return this.agentInfo; + } + + public void setAgentInfo(String agentInfo) { + this.agentInfo = agentInfo; + } + + public void unsetAgentInfo() { + this.agentInfo = null; + } + + /** Returns true if field agentInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetAgentInfo() { + return this.agentInfo != null; + } + + public void setAgentInfoIsSet(boolean value) { + if (!value) { + this.agentInfo = null; + } + } + + public int getHeartbeatCount() { + return this.heartbeatCount; + } + + public void setHeartbeatCount(int heartbeatCount) { + this.heartbeatCount = heartbeatCount; + setHeartbeatCountIsSet(true); + } + + public void unsetHeartbeatCount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID); + } + + /** Returns true if field heartbeatCount is set (has been assigned a value) and false otherwise */ + public boolean isSetHeartbeatCount() { + return EncodingUtils.testBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID); + } + + public void setHeartbeatCountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID, value); + } + + public String getMetaInfo() { + return this.metaInfo; + } + + public void setMetaInfo(String metaInfo) { + this.metaInfo = metaInfo; + } + + public void unsetMetaInfo() { + this.metaInfo = null; + } + + /** Returns true if field metaInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetMetaInfo() { + return this.metaInfo != null; + } + + public void setMetaInfoIsSet(boolean value) { + if (!value) { + this.metaInfo = null; + } + } + + public long getStartedTime() { + return this.startedTime; + } + + public void setStartedTime(long startedTime) { + this.startedTime = startedTime; + setStartedTimeIsSet(true); + } + + public void unsetStartedTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTEDTIME_ISSET_ID); + } + + /** Returns true if field startedTime is set (has been assigned a value) and false otherwise */ + public boolean isSetStartedTime() { + return EncodingUtils.testBit(__isset_bitfield, __STARTEDTIME_ISSET_ID); + } + + public void setStartedTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTEDTIME_ISSET_ID, value); + } + + public long getLastHeartbeatTime() { + return this.lastHeartbeatTime; + } + + public void setLastHeartbeatTime(long lastHeartbeatTime) { + this.lastHeartbeatTime = lastHeartbeatTime; + setLastHeartbeatTimeIsSet(true); + } + + public void unsetLastHeartbeatTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTHEARTBEATTIME_ISSET_ID); + } + + /** Returns true if field lastHeartbeatTime is set (has been assigned a value) and false otherwise */ + public boolean isSetLastHeartbeatTime() { + return EncodingUtils.testBit(__isset_bitfield, __LASTHEARTBEATTIME_ISSET_ID); + } + + public void setLastHeartbeatTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTHEARTBEATTIME_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ID: + if (value == null) { + unsetId(); + } else { + setId((Long)value); + } + break; + + case STATE: + if (value == null) { + unsetState(); + } else { + setState((TxnState)value); + } + break; + + case USER: + if (value == null) { + unsetUser(); + } else { + setUser((String)value); + } + break; + + case HOSTNAME: + if (value == null) { + unsetHostname(); + } else { + setHostname((String)value); + } + break; + + case AGENT_INFO: + if (value == null) { + unsetAgentInfo(); + } else { + setAgentInfo((String)value); + } + break; + + case HEARTBEAT_COUNT: + if (value == null) { + unsetHeartbeatCount(); + } else { + setHeartbeatCount((Integer)value); + } + break; + + case META_INFO: + if (value == null) { + unsetMetaInfo(); + } else { + setMetaInfo((String)value); + } + break; + + case STARTED_TIME: + if (value == null) { + unsetStartedTime(); + } else { + setStartedTime((Long)value); + } + break; + + case LAST_HEARTBEAT_TIME: + if (value == null) { + unsetLastHeartbeatTime(); + } else { + setLastHeartbeatTime((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ID: + return getId(); + + case STATE: + return getState(); + + case USER: + return getUser(); + + case HOSTNAME: + return getHostname(); + + case AGENT_INFO: + return getAgentInfo(); + + case HEARTBEAT_COUNT: + return getHeartbeatCount(); + + case META_INFO: + return getMetaInfo(); + + case STARTED_TIME: + return getStartedTime(); + + case LAST_HEARTBEAT_TIME: + return getLastHeartbeatTime(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ID: + return isSetId(); + case STATE: + return isSetState(); + case USER: + return isSetUser(); + case HOSTNAME: + return isSetHostname(); + case AGENT_INFO: + return isSetAgentInfo(); + case HEARTBEAT_COUNT: + return isSetHeartbeatCount(); + case META_INFO: + return isSetMetaInfo(); + case STARTED_TIME: + return isSetStartedTime(); + case LAST_HEARTBEAT_TIME: + return isSetLastHeartbeatTime(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TxnInfo) + return this.equals((TxnInfo)that); + return false; + } + + public boolean equals(TxnInfo that) { + if (that == null) + return false; + + boolean this_present_id = true; + boolean that_present_id = true; + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (this.id != that.id) + return false; + } + + boolean this_present_state = true && this.isSetState(); + boolean that_present_state = true && that.isSetState(); + if (this_present_state || that_present_state) { + if (!(this_present_state && that_present_state)) + return false; + if (!this.state.equals(that.state)) + return false; + } + + boolean this_present_user = true && this.isSetUser(); + boolean that_present_user = true && that.isSetUser(); + if (this_present_user || that_present_user) { + if (!(this_present_user && that_present_user)) + return false; + if (!this.user.equals(that.user)) + return false; + } + + boolean this_present_hostname = true && this.isSetHostname(); + boolean that_present_hostname = true && that.isSetHostname(); + if (this_present_hostname || that_present_hostname) { + if (!(this_present_hostname && that_present_hostname)) + return false; + if (!this.hostname.equals(that.hostname)) + return false; + } + + boolean this_present_agentInfo = true && this.isSetAgentInfo(); + boolean that_present_agentInfo = true && that.isSetAgentInfo(); + if (this_present_agentInfo || that_present_agentInfo) { + if (!(this_present_agentInfo && that_present_agentInfo)) + return false; + if (!this.agentInfo.equals(that.agentInfo)) + return false; + } + + boolean this_present_heartbeatCount = true && this.isSetHeartbeatCount(); + boolean that_present_heartbeatCount = true && that.isSetHeartbeatCount(); + if (this_present_heartbeatCount || that_present_heartbeatCount) { + if (!(this_present_heartbeatCount && that_present_heartbeatCount)) + return false; + if (this.heartbeatCount != that.heartbeatCount) + return false; + } + + boolean this_present_metaInfo = true && this.isSetMetaInfo(); + boolean that_present_metaInfo = true && that.isSetMetaInfo(); + if (this_present_metaInfo || that_present_metaInfo) { + if (!(this_present_metaInfo && that_present_metaInfo)) + return false; + if (!this.metaInfo.equals(that.metaInfo)) + return false; + } + + boolean this_present_startedTime = true && this.isSetStartedTime(); + boolean that_present_startedTime = true && that.isSetStartedTime(); + if (this_present_startedTime || that_present_startedTime) { + if (!(this_present_startedTime && that_present_startedTime)) + return false; + if (this.startedTime != that.startedTime) + return false; + } + + boolean this_present_lastHeartbeatTime = true && this.isSetLastHeartbeatTime(); + boolean that_present_lastHeartbeatTime = true && that.isSetLastHeartbeatTime(); + if (this_present_lastHeartbeatTime || that_present_lastHeartbeatTime) { + if (!(this_present_lastHeartbeatTime && that_present_lastHeartbeatTime)) + return false; + if (this.lastHeartbeatTime != that.lastHeartbeatTime) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_id = true; + list.add(present_id); + if (present_id) + list.add(id); + + boolean present_state = true && (isSetState()); + list.add(present_state); + if (present_state) + list.add(state.getValue()); + + boolean present_user = true && (isSetUser()); + list.add(present_user); + if (present_user) + list.add(user); + + boolean present_hostname = true && (isSetHostname()); + list.add(present_hostname); + if (present_hostname) + list.add(hostname); + + boolean present_agentInfo = true && (isSetAgentInfo()); + list.add(present_agentInfo); + if (present_agentInfo) + list.add(agentInfo); + + boolean present_heartbeatCount = true && (isSetHeartbeatCount()); + list.add(present_heartbeatCount); + if (present_heartbeatCount) + list.add(heartbeatCount); + + boolean present_metaInfo = true && (isSetMetaInfo()); + list.add(present_metaInfo); + if (present_metaInfo) + list.add(metaInfo); + + boolean present_startedTime = true && (isSetStartedTime()); + list.add(present_startedTime); + if (present_startedTime) + list.add(startedTime); + + boolean present_lastHeartbeatTime = true && (isSetLastHeartbeatTime()); + list.add(present_lastHeartbeatTime); + if (present_lastHeartbeatTime) + list.add(lastHeartbeatTime); + + return list.hashCode(); + } + + @Override + public int compareTo(TxnInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetState()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHostname()).compareTo(other.isSetHostname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHostname()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, other.hostname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAgentInfo()).compareTo(other.isSetAgentInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentInfo, other.agentInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHeartbeatCount()).compareTo(other.isSetHeartbeatCount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHeartbeatCount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.heartbeatCount, other.heartbeatCount); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMetaInfo()).compareTo(other.isSetMetaInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMetaInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metaInfo, other.metaInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartedTime()).compareTo(other.isSetStartedTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartedTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startedTime, other.startedTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastHeartbeatTime()).compareTo(other.isSetLastHeartbeatTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastHeartbeatTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastHeartbeatTime, other.lastHeartbeatTime); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("TxnInfo("); + boolean first = true; + + sb.append("id:"); + sb.append(this.id); + first = false; + if (!first) sb.append(", "); + sb.append("state:"); + if (this.state == null) { + sb.append("null"); + } else { + sb.append(this.state); + } + first = false; + if (!first) sb.append(", "); + sb.append("user:"); + if (this.user == null) { + sb.append("null"); + } else { + sb.append(this.user); + } + first = false; + if (!first) sb.append(", "); + sb.append("hostname:"); + if (this.hostname == null) { + sb.append("null"); + } else { + sb.append(this.hostname); + } + first = false; + if (isSetAgentInfo()) { + if (!first) sb.append(", "); + sb.append("agentInfo:"); + if (this.agentInfo == null) { + sb.append("null"); + } else { + sb.append(this.agentInfo); + } + first = false; + } + if (isSetHeartbeatCount()) { + if (!first) sb.append(", "); + sb.append("heartbeatCount:"); + sb.append(this.heartbeatCount); + first = false; + } + if (isSetMetaInfo()) { + if (!first) sb.append(", "); + sb.append("metaInfo:"); + if (this.metaInfo == null) { + sb.append("null"); + } else { + sb.append(this.metaInfo); + } + first = false; + } + if (isSetStartedTime()) { + if (!first) sb.append(", "); + sb.append("startedTime:"); + sb.append(this.startedTime); + first = false; + } + if (isSetLastHeartbeatTime()) { + if (!first) sb.append(", "); + sb.append("lastHeartbeatTime:"); + sb.append(this.lastHeartbeatTime); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString()); + } + + if (!isSetState()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); + } + + if (!isSetUser()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'user' is unset! Struct:" + toString()); + } + + if (!isSetHostname()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'hostname' is unset! Struct:" + toString()); + } + + // 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 { + // 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 TxnInfoStandardSchemeFactory implements SchemeFactory { + public TxnInfoStandardScheme getScheme() { + return new TxnInfoStandardScheme(); + } + } + + private static class TxnInfoStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TxnInfo 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: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.id = iprot.readI64(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STATE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.state = org.apache.hadoop.hive.metastore.api.TxnState.findByValue(iprot.readI32()); + struct.setStateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // USER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.user = iprot.readString(); + struct.setUserIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // HOSTNAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.hostname = iprot.readString(); + struct.setHostnameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // AGENT_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.agentInfo = iprot.readString(); + struct.setAgentInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // HEARTBEAT_COUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.heartbeatCount = iprot.readI32(); + struct.setHeartbeatCountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // META_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.metaInfo = iprot.readString(); + struct.setMetaInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // STARTED_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.startedTime = iprot.readI64(); + struct.setStartedTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // LAST_HEARTBEAT_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lastHeartbeatTime = iprot.readI64(); + struct.setLastHeartbeatTimeIsSet(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, TxnInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeI64(struct.id); + oprot.writeFieldEnd(); + if (struct.state != null) { + oprot.writeFieldBegin(STATE_FIELD_DESC); + oprot.writeI32(struct.state.getValue()); + oprot.writeFieldEnd(); + } + if (struct.user != null) { + oprot.writeFieldBegin(USER_FIELD_DESC); + oprot.writeString(struct.user); + oprot.writeFieldEnd(); + } + if (struct.hostname != null) { + oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); + oprot.writeString(struct.hostname); + oprot.writeFieldEnd(); + } + if (struct.agentInfo != null) { + if (struct.isSetAgentInfo()) { + oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC); + oprot.writeString(struct.agentInfo); + oprot.writeFieldEnd(); + } + } + if (struct.isSetHeartbeatCount()) { + oprot.writeFieldBegin(HEARTBEAT_COUNT_FIELD_DESC); + oprot.writeI32(struct.heartbeatCount); + oprot.writeFieldEnd(); + } + if (struct.metaInfo != null) { + if (struct.isSetMetaInfo()) { + oprot.writeFieldBegin(META_INFO_FIELD_DESC); + oprot.writeString(struct.metaInfo); + oprot.writeFieldEnd(); + } + } + if (struct.isSetStartedTime()) { + oprot.writeFieldBegin(STARTED_TIME_FIELD_DESC); + oprot.writeI64(struct.startedTime); + oprot.writeFieldEnd(); + } + if (struct.isSetLastHeartbeatTime()) { + oprot.writeFieldBegin(LAST_HEARTBEAT_TIME_FIELD_DESC); + oprot.writeI64(struct.lastHeartbeatTime); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TxnInfoTupleSchemeFactory implements SchemeFactory { + public TxnInfoTupleScheme getScheme() { + return new TxnInfoTupleScheme(); + } + } + + private static class TxnInfoTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TxnInfo struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.id); + oprot.writeI32(struct.state.getValue()); + oprot.writeString(struct.user); + oprot.writeString(struct.hostname); + BitSet optionals = new BitSet(); + if (struct.isSetAgentInfo()) { + optionals.set(0); + } + if (struct.isSetHeartbeatCount()) { + optionals.set(1); + } + if (struct.isSetMetaInfo()) { + optionals.set(2); + } + if (struct.isSetStartedTime()) { + optionals.set(3); + } + if (struct.isSetLastHeartbeatTime()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetAgentInfo()) { + oprot.writeString(struct.agentInfo); + } + if (struct.isSetHeartbeatCount()) { + oprot.writeI32(struct.heartbeatCount); + } + if (struct.isSetMetaInfo()) { + oprot.writeString(struct.metaInfo); + } + if (struct.isSetStartedTime()) { + oprot.writeI64(struct.startedTime); + } + if (struct.isSetLastHeartbeatTime()) { + oprot.writeI64(struct.lastHeartbeatTime); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TxnInfo struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.id = iprot.readI64(); + struct.setIdIsSet(true); + struct.state = org.apache.hadoop.hive.metastore.api.TxnState.findByValue(iprot.readI32()); + struct.setStateIsSet(true); + struct.user = iprot.readString(); + struct.setUserIsSet(true); + struct.hostname = iprot.readString(); + struct.setHostnameIsSet(true); + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.agentInfo = iprot.readString(); + struct.setAgentInfoIsSet(true); + } + if (incoming.get(1)) { + struct.heartbeatCount = iprot.readI32(); + struct.setHeartbeatCountIsSet(true); + } + if (incoming.get(2)) { + struct.metaInfo = iprot.readString(); + struct.setMetaInfoIsSet(true); + } + if (incoming.get(3)) { + struct.startedTime = iprot.readI64(); + struct.setStartedTimeIsSet(true); + } + if (incoming.get(4)) { + struct.lastHeartbeatTime = iprot.readI64(); + struct.setLastHeartbeatTimeIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnOpenException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnOpenException.java new file mode 100644 index 0000000..10b5f9b --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnOpenException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TxnOpenException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TxnOpenException"); + + 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 TxnOpenExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TxnOpenExceptionTupleSchemeFactory()); + } + + private String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TxnOpenException.class, metaDataMap); + } + + public TxnOpenException() { + } + + public TxnOpenException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public TxnOpenException(TxnOpenException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public TxnOpenException deepCopy() { + return new TxnOpenException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TxnOpenException) + return this.equals((TxnOpenException)that); + return false; + } + + public boolean equals(TxnOpenException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(TxnOpenException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("TxnOpenException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 TxnOpenExceptionStandardSchemeFactory implements SchemeFactory { + public TxnOpenExceptionStandardScheme getScheme() { + return new TxnOpenExceptionStandardScheme(); + } + } + + private static class TxnOpenExceptionStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TxnOpenException 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, TxnOpenException 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 TxnOpenExceptionTupleSchemeFactory implements SchemeFactory { + public TxnOpenExceptionTupleScheme getScheme() { + return new TxnOpenExceptionTupleScheme(); + } + } + + private static class TxnOpenExceptionTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TxnOpenException 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, TxnOpenException 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnState.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnState.java new file mode 100644 index 0000000..de59755 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnState.java @@ -0,0 +1,48 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hive.metastore.api; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum TxnState implements org.apache.thrift.TEnum { + COMMITTED(1), + ABORTED(2), + OPEN(3); + + private final int value; + + private TxnState(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static TxnState findByValue(int value) { + switch (value) { + case 1: + return COMMITTED; + case 2: + return ABORTED; + case 3: + return OPEN; + default: + return null; + } + } +} diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java new file mode 100644 index 0000000..14cd42e --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java @@ -0,0 +1,768 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class Type implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Type"); + + 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 TYPE1_FIELD_DESC = new org.apache.thrift.protocol.TField("type1", org.apache.thrift.protocol.TType.STRING, (short)2); + 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; // 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 { + NAME((short)1, "name"), + TYPE1((short)2, "type1"), + TYPE2((short)3, "type2"), + FIELDS((short)4, "fields"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + case 2: // TYPE1 + return TYPE1; + case 3: // TYPE2 + return TYPE2; + case 4: // FIELDS + return FIELDS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _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); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TYPE1, new org.apache.thrift.meta_data.FieldMetaData("type1", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TYPE2, new org.apache.thrift.meta_data.FieldMetaData("type2", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FIELDS, new org.apache.thrift.meta_data.FieldMetaData("fields", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FieldSchema.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Type.class, metaDataMap); + } + + public Type() { + } + + public Type( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public Type(Type other) { + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetType1()) { + this.type1 = other.type1; + } + if (other.isSetType2()) { + this.type2 = other.type2; + } + if (other.isSetFields()) { + List __this__fields = new ArrayList(other.fields.size()); + for (FieldSchema other_element : other.fields) { + __this__fields.add(new FieldSchema(other_element)); + } + this.fields = __this__fields; + } + } + + public Type deepCopy() { + return new Type(this); + } + + @Override + public void clear() { + this.name = null; + this.type1 = null; + this.type2 = null; + this.fields = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public String getType1() { + return this.type1; + } + + public void setType1(String type1) { + this.type1 = type1; + } + + public void unsetType1() { + this.type1 = null; + } + + /** Returns true if field type1 is set (has been assigned a value) and false otherwise */ + public boolean isSetType1() { + return this.type1 != null; + } + + public void setType1IsSet(boolean value) { + if (!value) { + this.type1 = null; + } + } + + public String getType2() { + return this.type2; + } + + public void setType2(String type2) { + this.type2 = type2; + } + + public void unsetType2() { + this.type2 = null; + } + + /** Returns true if field type2 is set (has been assigned a value) and false otherwise */ + public boolean isSetType2() { + return this.type2 != null; + } + + public void setType2IsSet(boolean value) { + if (!value) { + this.type2 = null; + } + } + + public int getFieldsSize() { + return (this.fields == null) ? 0 : this.fields.size(); + } + + public java.util.Iterator getFieldsIterator() { + return (this.fields == null) ? null : this.fields.iterator(); + } + + public void addToFields(FieldSchema elem) { + if (this.fields == null) { + this.fields = new ArrayList(); + } + this.fields.add(elem); + } + + public List getFields() { + return this.fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + public void unsetFields() { + this.fields = null; + } + + /** Returns true if field fields is set (has been assigned a value) and false otherwise */ + public boolean isSetFields() { + return this.fields != null; + } + + public void setFieldsIsSet(boolean value) { + if (!value) { + this.fields = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case TYPE1: + if (value == null) { + unsetType1(); + } else { + setType1((String)value); + } + break; + + case TYPE2: + if (value == null) { + unsetType2(); + } else { + setType2((String)value); + } + break; + + case FIELDS: + if (value == null) { + unsetFields(); + } else { + setFields((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case TYPE1: + return getType1(); + + case TYPE2: + return getType2(); + + case FIELDS: + return getFields(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case TYPE1: + return isSetType1(); + case TYPE2: + return isSetType2(); + case FIELDS: + return isSetFields(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Type) + return this.equals((Type)that); + return false; + } + + public boolean equals(Type that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_type1 = true && this.isSetType1(); + boolean that_present_type1 = true && that.isSetType1(); + if (this_present_type1 || that_present_type1) { + if (!(this_present_type1 && that_present_type1)) + return false; + if (!this.type1.equals(that.type1)) + return false; + } + + boolean this_present_type2 = true && this.isSetType2(); + boolean that_present_type2 = true && that.isSetType2(); + if (this_present_type2 || that_present_type2) { + if (!(this_present_type2 && that_present_type2)) + return false; + if (!this.type2.equals(that.type2)) + return false; + } + + boolean this_present_fields = true && this.isSetFields(); + boolean that_present_fields = true && that.isSetFields(); + if (this_present_fields || that_present_fields) { + if (!(this_present_fields && that_present_fields)) + return false; + if (!this.fields.equals(that.fields)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + boolean present_type1 = true && (isSetType1()); + list.add(present_type1); + if (present_type1) + list.add(type1); + + boolean present_type2 = true && (isSetType2()); + list.add(present_type2); + if (present_type2) + list.add(type2); + + boolean present_fields = true && (isSetFields()); + list.add(present_fields); + if (present_fields) + list.add(fields); + + return list.hashCode(); + } + + @Override + public int compareTo(Type other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType1()).compareTo(other.isSetType1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type1, other.type1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType2()).compareTo(other.isSetType2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type2, other.type2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFields()).compareTo(other.isSetFields()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFields()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fields, other.fields); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Type("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (isSetType1()) { + if (!first) sb.append(", "); + sb.append("type1:"); + if (this.type1 == null) { + sb.append("null"); + } else { + sb.append(this.type1); + } + first = false; + } + if (isSetType2()) { + if (!first) sb.append(", "); + sb.append("type2:"); + if (this.type2 == null) { + sb.append("null"); + } else { + sb.append(this.type2); + } + first = false; + } + if (isSetFields()) { + if (!first) sb.append(", "); + sb.append("fields:"); + if (this.fields == null) { + sb.append("null"); + } else { + sb.append(this.fields); + } + 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 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); + FieldSchema _elem1; + for (int _i2 = 0; _i2 < _list0.size; ++_i2) + { + _elem1 = new FieldSchema(); + _elem1.read(iprot); + struct.fields.add(_elem1); + } + 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); + FieldSchema _elem6; + for (int _i7 = 0; _i7 < _list5.size; ++_i7) + { + _elem6 = new FieldSchema(); + _elem6.read(iprot); + struct.fields.add(_elem6); + } + } + struct.setFieldsIsSet(true); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsRequest.java new file mode 100644 index 0000000..ccbecfc --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsRequest.java @@ -0,0 +1,490 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class UniqueConstraintsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UniqueConstraintsRequest"); + + 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 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 UniqueConstraintsRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UniqueConstraintsRequestTupleSchemeFactory()); + } + + private String db_name; // required + private String tbl_name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UniqueConstraintsRequest.class, metaDataMap); + } + + public UniqueConstraintsRequest() { + } + + public UniqueConstraintsRequest( + String db_name, + String tbl_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + } + + /** + * Performs a deep copy on other. + */ + public UniqueConstraintsRequest(UniqueConstraintsRequest other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + } + + public UniqueConstraintsRequest deepCopy() { + return new UniqueConstraintsRequest(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof UniqueConstraintsRequest) + return this.equals((UniqueConstraintsRequest)that); + return false; + } + + public boolean equals(UniqueConstraintsRequest that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_db_name = true && (isSetDb_name()); + list.add(present_db_name); + if (present_db_name) + list.add(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + list.add(present_tbl_name); + if (present_tbl_name) + list.add(tbl_name); + + return list.hashCode(); + } + + @Override + public int compareTo(UniqueConstraintsRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(other.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, other.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(other.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, other.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("UniqueConstraintsRequest("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDb_name()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'db_name' is unset! Struct:" + toString()); + } + + if (!isSetTbl_name()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tbl_name' is unset! Struct:" + toString()); + } + + // 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 UniqueConstraintsRequestStandardSchemeFactory implements SchemeFactory { + public UniqueConstraintsRequestStandardScheme getScheme() { + return new UniqueConstraintsRequestStandardScheme(); + } + } + + private static class UniqueConstraintsRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, UniqueConstraintsRequest 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; + 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, UniqueConstraintsRequest 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.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UniqueConstraintsRequestTupleSchemeFactory implements SchemeFactory { + public UniqueConstraintsRequestTupleScheme getScheme() { + return new UniqueConstraintsRequestTupleScheme(); + } + } + + private static class UniqueConstraintsRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, UniqueConstraintsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.db_name); + oprot.writeString(struct.tbl_name); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, UniqueConstraintsRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.db_name = iprot.readString(); + struct.setDb_nameIsSet(true); + struct.tbl_name = iprot.readString(); + struct.setTbl_nameIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsResponse.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsResponse.java new file mode 100644 index 0000000..7de84ea --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsResponse.java @@ -0,0 +1,443 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class UniqueConstraintsResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UniqueConstraintsResponse"); + + private static final org.apache.thrift.protocol.TField UNIQUE_CONSTRAINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("uniqueConstraints", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new UniqueConstraintsResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UniqueConstraintsResponseTupleSchemeFactory()); + } + + private List uniqueConstraints; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UNIQUE_CONSTRAINTS((short)1, "uniqueConstraints"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UNIQUE_CONSTRAINTS + return UNIQUE_CONSTRAINTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.UNIQUE_CONSTRAINTS, new org.apache.thrift.meta_data.FieldMetaData("uniqueConstraints", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLUniqueConstraint.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UniqueConstraintsResponse.class, metaDataMap); + } + + public UniqueConstraintsResponse() { + } + + public UniqueConstraintsResponse( + List uniqueConstraints) + { + this(); + this.uniqueConstraints = uniqueConstraints; + } + + /** + * Performs a deep copy on other. + */ + public UniqueConstraintsResponse(UniqueConstraintsResponse other) { + if (other.isSetUniqueConstraints()) { + List __this__uniqueConstraints = new ArrayList(other.uniqueConstraints.size()); + for (SQLUniqueConstraint other_element : other.uniqueConstraints) { + __this__uniqueConstraints.add(new SQLUniqueConstraint(other_element)); + } + this.uniqueConstraints = __this__uniqueConstraints; + } + } + + public UniqueConstraintsResponse deepCopy() { + return new UniqueConstraintsResponse(this); + } + + @Override + public void clear() { + this.uniqueConstraints = null; + } + + public int getUniqueConstraintsSize() { + return (this.uniqueConstraints == null) ? 0 : this.uniqueConstraints.size(); + } + + public java.util.Iterator getUniqueConstraintsIterator() { + return (this.uniqueConstraints == null) ? null : this.uniqueConstraints.iterator(); + } + + public void addToUniqueConstraints(SQLUniqueConstraint elem) { + if (this.uniqueConstraints == null) { + this.uniqueConstraints = new ArrayList(); + } + this.uniqueConstraints.add(elem); + } + + public List getUniqueConstraints() { + return this.uniqueConstraints; + } + + public void setUniqueConstraints(List uniqueConstraints) { + this.uniqueConstraints = uniqueConstraints; + } + + public void unsetUniqueConstraints() { + this.uniqueConstraints = null; + } + + /** Returns true if field uniqueConstraints is set (has been assigned a value) and false otherwise */ + public boolean isSetUniqueConstraints() { + return this.uniqueConstraints != null; + } + + public void setUniqueConstraintsIsSet(boolean value) { + if (!value) { + this.uniqueConstraints = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UNIQUE_CONSTRAINTS: + if (value == null) { + unsetUniqueConstraints(); + } else { + setUniqueConstraints((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UNIQUE_CONSTRAINTS: + return getUniqueConstraints(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UNIQUE_CONSTRAINTS: + return isSetUniqueConstraints(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof UniqueConstraintsResponse) + return this.equals((UniqueConstraintsResponse)that); + return false; + } + + public boolean equals(UniqueConstraintsResponse that) { + if (that == null) + return false; + + boolean this_present_uniqueConstraints = true && this.isSetUniqueConstraints(); + boolean that_present_uniqueConstraints = true && that.isSetUniqueConstraints(); + if (this_present_uniqueConstraints || that_present_uniqueConstraints) { + if (!(this_present_uniqueConstraints && that_present_uniqueConstraints)) + return false; + if (!this.uniqueConstraints.equals(that.uniqueConstraints)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_uniqueConstraints = true && (isSetUniqueConstraints()); + list.add(present_uniqueConstraints); + if (present_uniqueConstraints) + list.add(uniqueConstraints); + + return list.hashCode(); + } + + @Override + public int compareTo(UniqueConstraintsResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUniqueConstraints()).compareTo(other.isSetUniqueConstraints()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUniqueConstraints()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uniqueConstraints, other.uniqueConstraints); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("UniqueConstraintsResponse("); + boolean first = true; + + sb.append("uniqueConstraints:"); + if (this.uniqueConstraints == null) { + sb.append("null"); + } else { + sb.append(this.uniqueConstraints); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetUniqueConstraints()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'uniqueConstraints' is unset! Struct:" + toString()); + } + + // 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 UniqueConstraintsResponseStandardSchemeFactory implements SchemeFactory { + public UniqueConstraintsResponseStandardScheme getScheme() { + return new UniqueConstraintsResponseStandardScheme(); + } + } + + private static class UniqueConstraintsResponseStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, UniqueConstraintsResponse 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: // UNIQUE_CONSTRAINTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list338 = iprot.readListBegin(); + struct.uniqueConstraints = new ArrayList(_list338.size); + SQLUniqueConstraint _elem339; + for (int _i340 = 0; _i340 < _list338.size; ++_i340) + { + _elem339 = new SQLUniqueConstraint(); + _elem339.read(iprot); + struct.uniqueConstraints.add(_elem339); + } + iprot.readListEnd(); + } + struct.setUniqueConstraintsIsSet(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, UniqueConstraintsResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.uniqueConstraints != null) { + oprot.writeFieldBegin(UNIQUE_CONSTRAINTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.uniqueConstraints.size())); + for (SQLUniqueConstraint _iter341 : struct.uniqueConstraints) + { + _iter341.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UniqueConstraintsResponseTupleSchemeFactory implements SchemeFactory { + public UniqueConstraintsResponseTupleScheme getScheme() { + return new UniqueConstraintsResponseTupleScheme(); + } + } + + private static class UniqueConstraintsResponseTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, UniqueConstraintsResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.uniqueConstraints.size()); + for (SQLUniqueConstraint _iter342 : struct.uniqueConstraints) + { + _iter342.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, UniqueConstraintsResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list343 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.uniqueConstraints = new ArrayList(_list343.size); + SQLUniqueConstraint _elem344; + for (int _i345 = 0; _i345 < _list343.size; ++_i345) + { + _elem344 = new SQLUniqueConstraint(); + _elem344.read(iprot); + struct.uniqueConstraints.add(_elem344); + } + } + struct.setUniqueConstraintsIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java new file mode 100644 index 0000000..a5ea86f --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class UnknownDBException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnknownDBException.class, metaDataMap); + } + + public UnknownDBException() { + } + + public UnknownDBException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public UnknownDBException(UnknownDBException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public UnknownDBException deepCopy() { + return new UnknownDBException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof UnknownDBException) + return this.equals((UnknownDBException)that); + return false; + } + + public boolean equals(UnknownDBException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(UnknownDBException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("UnknownDBException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownPartitionException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownPartitionException.java new file mode 100644 index 0000000..538ce29 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownPartitionException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class UnknownPartitionException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnknownPartitionException.class, metaDataMap); + } + + public UnknownPartitionException() { + } + + public UnknownPartitionException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public UnknownPartitionException(UnknownPartitionException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public UnknownPartitionException deepCopy() { + return new UnknownPartitionException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof UnknownPartitionException) + return this.equals((UnknownPartitionException)that); + return false; + } + + public boolean equals(UnknownPartitionException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(UnknownPartitionException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("UnknownPartitionException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java new file mode 100644 index 0000000..95bd0dd --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java @@ -0,0 +1,395 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class UnknownTableException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnknownTableException.class, metaDataMap); + } + + public UnknownTableException() { + } + + public UnknownTableException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public UnknownTableException(UnknownTableException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public UnknownTableException deepCopy() { + return new UnknownTableException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof UnknownTableException) + return this.equals((UnknownTableException)that); + return false; + } + + public boolean equals(UnknownTableException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); + } + + @Override + public int compareTo(UnknownTableException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("UnknownTableException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnlockRequest.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnlockRequest.java new file mode 100644 index 0000000..f28e808 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UnlockRequest.java @@ -0,0 +1,387 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class UnlockRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnlockRequest"); + + private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new UnlockRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new UnlockRequestTupleSchemeFactory()); + } + + private long lockid; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + LOCKID((short)1, "lockid"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOCKID + return LOCKID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LOCKID_ISSET_ID = 0; + 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); + tmpMap.put(_Fields.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnlockRequest.class, metaDataMap); + } + + public UnlockRequest() { + } + + public UnlockRequest( + long lockid) + { + this(); + this.lockid = lockid; + setLockidIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public UnlockRequest(UnlockRequest other) { + __isset_bitfield = other.__isset_bitfield; + this.lockid = other.lockid; + } + + public UnlockRequest deepCopy() { + return new UnlockRequest(this); + } + + @Override + public void clear() { + setLockidIsSet(false); + this.lockid = 0; + } + + public long getLockid() { + return this.lockid; + } + + public void setLockid(long lockid) { + this.lockid = lockid; + setLockidIsSet(true); + } + + public void unsetLockid() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKID_ISSET_ID); + } + + /** Returns true if field lockid is set (has been assigned a value) and false otherwise */ + public boolean isSetLockid() { + return EncodingUtils.testBit(__isset_bitfield, __LOCKID_ISSET_ID); + } + + public void setLockidIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOCKID: + if (value == null) { + unsetLockid(); + } else { + setLockid((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOCKID: + return getLockid(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOCKID: + return isSetLockid(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof UnlockRequest) + return this.equals((UnlockRequest)that); + return false; + } + + public boolean equals(UnlockRequest that) { + if (that == null) + return false; + + boolean this_present_lockid = true; + boolean that_present_lockid = true; + if (this_present_lockid || that_present_lockid) { + if (!(this_present_lockid && that_present_lockid)) + return false; + if (this.lockid != that.lockid) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_lockid = true; + list.add(present_lockid); + if (present_lockid) + list.add(lockid); + + return list.hashCode(); + } + + @Override + public int compareTo(UnlockRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetLockid()).compareTo(other.isSetLockid()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLockid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, other.lockid); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("UnlockRequest("); + boolean first = true; + + sb.append("lockid:"); + sb.append(this.lockid); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetLockid()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'lockid' is unset! Struct:" + toString()); + } + + // 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 { + // 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 UnlockRequestStandardSchemeFactory implements SchemeFactory { + public UnlockRequestStandardScheme getScheme() { + return new UnlockRequestStandardScheme(); + } + } + + private static class UnlockRequestStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, UnlockRequest 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: // LOCKID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lockid = iprot.readI64(); + struct.setLockidIsSet(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, UnlockRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(LOCKID_FIELD_DESC); + oprot.writeI64(struct.lockid); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class UnlockRequestTupleSchemeFactory implements SchemeFactory { + public UnlockRequestTupleScheme getScheme() { + return new UnlockRequestTupleScheme(); + } + } + + private static class UnlockRequestTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, UnlockRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.lockid); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, UnlockRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.lockid = iprot.readI64(); + struct.setLockidIsSet(true); + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java new file mode 100644 index 0000000..12a2bce --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java @@ -0,0 +1,499 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class Version implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Version"); + + 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 + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + VERSION((short)1, "version"), + COMMENTS((short)2, "comments"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // VERSION + return VERSION; + case 2: // COMMENTS + return COMMENTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // 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); + tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COMMENTS, new org.apache.thrift.meta_data.FieldMetaData("comments", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Version.class, metaDataMap); + } + + public Version() { + } + + public Version( + String version, + String comments) + { + this(); + this.version = version; + this.comments = comments; + } + + /** + * Performs a deep copy on other. + */ + public Version(Version other) { + if (other.isSetVersion()) { + this.version = other.version; + } + if (other.isSetComments()) { + this.comments = other.comments; + } + } + + public Version deepCopy() { + return new Version(this); + } + + @Override + public void clear() { + this.version = null; + this.comments = null; + } + + public String getVersion() { + return this.version; + } + + public void setVersion(String version) { + this.version = version; + } + + public void unsetVersion() { + this.version = null; + } + + /** Returns true if field version is set (has been assigned a value) and false otherwise */ + public boolean isSetVersion() { + return this.version != null; + } + + public void setVersionIsSet(boolean value) { + if (!value) { + this.version = null; + } + } + + public String getComments() { + return this.comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public void unsetComments() { + this.comments = null; + } + + /** Returns true if field comments is set (has been assigned a value) and false otherwise */ + public boolean isSetComments() { + return this.comments != null; + } + + public void setCommentsIsSet(boolean value) { + if (!value) { + this.comments = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case VERSION: + if (value == null) { + unsetVersion(); + } else { + setVersion((String)value); + } + break; + + case COMMENTS: + if (value == null) { + unsetComments(); + } else { + setComments((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case VERSION: + return getVersion(); + + case COMMENTS: + return getComments(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case VERSION: + return isSetVersion(); + case COMMENTS: + return isSetComments(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Version) + return this.equals((Version)that); + return false; + } + + public boolean equals(Version that) { + if (that == null) + return false; + + boolean this_present_version = true && this.isSetVersion(); + boolean that_present_version = true && that.isSetVersion(); + if (this_present_version || that_present_version) { + if (!(this_present_version && that_present_version)) + return false; + if (!this.version.equals(that.version)) + return false; + } + + boolean this_present_comments = true && this.isSetComments(); + boolean that_present_comments = true && that.isSetComments(); + if (this_present_comments || that_present_comments) { + if (!(this_present_comments && that_present_comments)) + return false; + if (!this.comments.equals(that.comments)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_version = true && (isSetVersion()); + list.add(present_version); + if (present_version) + list.add(version); + + boolean present_comments = true && (isSetComments()); + list.add(present_comments); + if (present_comments) + list.add(comments); + + return list.hashCode(); + } + + @Override + public int compareTo(Version other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetComments()).compareTo(other.isSetComments()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetComments()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comments, other.comments); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + 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("Version("); + boolean first = true; + + sb.append("version:"); + if (this.version == null) { + sb.append("null"); + } else { + sb.append(this.version); + } + first = false; + if (!first) sb.append(", "); + sb.append("comments:"); + if (this.comments == null) { + sb.append("null"); + } else { + sb.append(this.comments); + } + 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 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); + } + } + } + +} + diff --git standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java new file mode 100644 index 0000000..8de8896 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/hive_metastoreConstants.java @@ -0,0 +1,87 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * 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.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 org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +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 javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +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 IS_IMMUTABLE = "immutable"; + + 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 META_TABLE_PARTITION_COLUMN_TYPES = "partition_columns.types"; + + 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"; + + public static final String TABLE_IS_TRANSACTIONAL = "transactional"; + + public static final String TABLE_NO_AUTO_COMPACT = "no_auto_compaction"; + + public static final String TABLE_TRANSACTIONAL_PROPERTIES = "transactional_properties"; + +} diff --git standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php new file mode 100644 index 0000000..cc5e120 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php @@ -0,0 +1,46912 @@ +send_getMetaConf($key); + return $this->recv_getMetaConf(); + } + + public function send_getMetaConf($key) + { + $args = new \metastore\ThriftHiveMetastore_getMetaConf_args(); + $args->key = $key; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getMetaConf', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getMetaConf', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getMetaConf() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_getMetaConf_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_getMetaConf_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("getMetaConf failed: unknown result"); + } + + public function setMetaConf($key, $value) + { + $this->send_setMetaConf($key, $value); + $this->recv_setMetaConf(); + } + + public function send_setMetaConf($key, $value) + { + $args = new \metastore\ThriftHiveMetastore_setMetaConf_args(); + $args->key = $key; + $args->value = $value; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'setMetaConf', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('setMetaConf', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_setMetaConf() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_setMetaConf_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_setMetaConf_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + return; + } + + public function create_database(\metastore\Database $database) + { + $this->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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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_fields_with_environment_context($db_name, $table_name, \metastore\EnvironmentContext $environment_context) + { + $this->send_get_fields_with_environment_context($db_name, $table_name, $environment_context); + return $this->recv_get_fields_with_environment_context(); + } + + public function send_get_fields_with_environment_context($db_name, $table_name, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_get_fields_with_environment_context_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_fields_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_fields_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_fields_with_environment_context() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_fields_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_get_fields_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("get_fields_with_environment_context 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 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 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 get_schema_with_environment_context($db_name, $table_name, \metastore\EnvironmentContext $environment_context) + { + $this->send_get_schema_with_environment_context($db_name, $table_name, $environment_context); + return $this->recv_get_schema_with_environment_context(); + } + + public function send_get_schema_with_environment_context($db_name, $table_name, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_get_schema_with_environment_context_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_schema_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_schema_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_schema_with_environment_context() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_schema_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_get_schema_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("get_schema_with_environment_context 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 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 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 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 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 create_table_with_constraints(\metastore\Table $tbl, array $primaryKeys, array $foreignKeys, array $uniqueConstraints, array $notNullConstraints) + { + $this->send_create_table_with_constraints($tbl, $primaryKeys, $foreignKeys, $uniqueConstraints, $notNullConstraints); + $this->recv_create_table_with_constraints(); + } + + public function send_create_table_with_constraints(\metastore\Table $tbl, array $primaryKeys, array $foreignKeys, array $uniqueConstraints, array $notNullConstraints) + { + $args = new \metastore\ThriftHiveMetastore_create_table_with_constraints_args(); + $args->tbl = $tbl; + $args->primaryKeys = $primaryKeys; + $args->foreignKeys = $foreignKeys; + $args->uniqueConstraints = $uniqueConstraints; + $args->notNullConstraints = $notNullConstraints; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_table_with_constraints', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_table_with_constraints', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_table_with_constraints() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_create_table_with_constraints_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_constraints_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_constraint(\metastore\DropConstraintRequest $req) + { + $this->send_drop_constraint($req); + $this->recv_drop_constraint(); + } + + public function send_drop_constraint(\metastore\DropConstraintRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_drop_constraint_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_constraint', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_constraint', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_constraint() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_constraint_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_constraint_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 add_primary_key(\metastore\AddPrimaryKeyRequest $req) + { + $this->send_add_primary_key($req); + $this->recv_add_primary_key(); + } + + public function send_add_primary_key(\metastore\AddPrimaryKeyRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_add_primary_key_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_primary_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_primary_key', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_primary_key() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_primary_key_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_primary_key_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_foreign_key(\metastore\AddForeignKeyRequest $req) + { + $this->send_add_foreign_key($req); + $this->recv_add_foreign_key(); + } + + public function send_add_foreign_key(\metastore\AddForeignKeyRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_add_foreign_key_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_foreign_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_foreign_key', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_foreign_key() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_foreign_key_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_foreign_key_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_unique_constraint(\metastore\AddUniqueConstraintRequest $req) + { + $this->send_add_unique_constraint($req); + $this->recv_add_unique_constraint(); + } + + public function send_add_unique_constraint(\metastore\AddUniqueConstraintRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_add_unique_constraint_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_unique_constraint', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_unique_constraint', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_unique_constraint() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_unique_constraint_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_unique_constraint_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_not_null_constraint(\metastore\AddNotNullConstraintRequest $req) + { + $this->send_add_not_null_constraint($req); + $this->recv_add_not_null_constraint(); + } + + public function send_add_not_null_constraint(\metastore\AddNotNullConstraintRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_add_not_null_constraint_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_not_null_constraint', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_not_null_constraint', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_not_null_constraint() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_not_null_constraint_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_not_null_constraint_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_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 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 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 drop_table_with_environment_context($dbname, $name, $deleteData, \metastore\EnvironmentContext $environment_context) + { + $this->send_drop_table_with_environment_context($dbname, $name, $deleteData, $environment_context); + $this->recv_drop_table_with_environment_context(); + } + + public function send_drop_table_with_environment_context($dbname, $name, $deleteData, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_drop_table_with_environment_context_args(); + $args->dbname = $dbname; + $args->name = $name; + $args->deleteData = $deleteData; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_table_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_table_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_table_with_environment_context() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_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_drop_table_with_environment_context_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 truncate_table($dbName, $tableName, array $partNames) + { + $this->send_truncate_table($dbName, $tableName, $partNames); + $this->recv_truncate_table(); + } + + public function send_truncate_table($dbName, $tableName, array $partNames) + { + $args = new \metastore\ThriftHiveMetastore_truncate_table_args(); + $args->dbName = $dbName; + $args->tableName = $tableName; + $args->partNames = $partNames; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'truncate_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('truncate_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_truncate_table() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_truncate_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_truncate_table_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + 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 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 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_tables_by_type($db_name, $pattern, $tableType) + { + $this->send_get_tables_by_type($db_name, $pattern, $tableType); + return $this->recv_get_tables_by_type(); + } + + public function send_get_tables_by_type($db_name, $pattern, $tableType) + { + $args = new \metastore\ThriftHiveMetastore_get_tables_by_type_args(); + $args->db_name = $db_name; + $args->pattern = $pattern; + $args->tableType = $tableType; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_tables_by_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_tables_by_type', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_tables_by_type() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_tables_by_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_tables_by_type_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_by_type failed: unknown result"); + } + + public function get_table_meta($db_patterns, $tbl_patterns, array $tbl_types) + { + $this->send_get_table_meta($db_patterns, $tbl_patterns, $tbl_types); + return $this->recv_get_table_meta(); + } + + public function send_get_table_meta($db_patterns, $tbl_patterns, array $tbl_types) + { + $args = new \metastore\ThriftHiveMetastore_get_table_meta_args(); + $args->db_patterns = $db_patterns; + $args->tbl_patterns = $tbl_patterns; + $args->tbl_types = $tbl_types; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_meta', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_meta', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_meta() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_meta_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_meta_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_table_meta 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 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 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 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 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, array $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, array $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 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 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; + } + throw new \Exception("get_table_objects_by_name failed: unknown result"); + } + + public function get_table_req(\metastore\GetTableRequest $req) + { + $this->send_get_table_req($req); + return $this->recv_get_table_req(); + } + + public function send_get_table_req(\metastore\GetTableRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_get_table_req_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_req', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_req() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_req_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_req_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_req failed: unknown result"); + } + + public function get_table_objects_by_name_req(\metastore\GetTablesRequest $req) + { + $this->send_get_table_objects_by_name_req($req); + return $this->recv_get_table_objects_by_name_req(); + } + + public function send_get_table_objects_by_name_req(\metastore\GetTablesRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_get_table_objects_by_name_req_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_objects_by_name_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_objects_by_name_req', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_objects_by_name_req() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_objects_by_name_req_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_req_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_req 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 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 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 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 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 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 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 alter_table_with_cascade($dbname, $tbl_name, \metastore\Table $new_tbl, $cascade) + { + $this->send_alter_table_with_cascade($dbname, $tbl_name, $new_tbl, $cascade); + $this->recv_alter_table_with_cascade(); + } + + public function send_alter_table_with_cascade($dbname, $tbl_name, \metastore\Table $new_tbl, $cascade) + { + $args = new \metastore\ThriftHiveMetastore_alter_table_with_cascade_args(); + $args->dbname = $dbname; + $args->tbl_name = $tbl_name; + $args->new_tbl = $new_tbl; + $args->cascade = $cascade; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_table_with_cascade', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_table_with_cascade', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_table_with_cascade() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_table_with_cascade_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_cascade_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 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 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 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 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(array $new_parts) + { + $this->send_add_partitions($new_parts); + return $this->recv_add_partitions(); + } + + public function send_add_partitions(array $new_parts) + { + $args = new \metastore\ThriftHiveMetastore_add_partitions_args(); + $args->new_parts = $new_parts; + $bin_accel = ($this->output_ instanceof 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 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 add_partitions_pspec(array $new_parts) + { + $this->send_add_partitions_pspec($new_parts); + return $this->recv_add_partitions_pspec(); + } + + public function send_add_partitions_pspec(array $new_parts) + { + $args = new \metastore\ThriftHiveMetastore_add_partitions_pspec_args(); + $args->new_parts = $new_parts; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_partitions_pspec', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_partitions_pspec', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_partitions_pspec() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_partitions_pspec_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_pspec_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_pspec failed: unknown result"); + } + + public function append_partition($db_name, $tbl_name, array $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, array $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 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 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 add_partitions_req(\metastore\AddPartitionsRequest $request) + { + $this->send_add_partitions_req($request); + return $this->recv_add_partitions_req(); + } + + public function send_add_partitions_req(\metastore\AddPartitionsRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_add_partitions_req_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_partitions_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_partitions_req', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_partitions_req() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_partitions_req_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_req_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_req failed: unknown result"); + } + + public function append_partition_with_environment_context($db_name, $tbl_name, array $part_vals, \metastore\EnvironmentContext $environment_context) + { + $this->send_append_partition_with_environment_context($db_name, $tbl_name, $part_vals, $environment_context); + return $this->recv_append_partition_with_environment_context(); + } + + public function send_append_partition_with_environment_context($db_name, $tbl_name, array $part_vals, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_append_partition_with_environment_context_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'append_partition_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('append_partition_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_append_partition_with_environment_context() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_append_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_append_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("append_partition_with_environment_context 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 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 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 append_partition_by_name_with_environment_context($db_name, $tbl_name, $part_name, \metastore\EnvironmentContext $environment_context) + { + $this->send_append_partition_by_name_with_environment_context($db_name, $tbl_name, $part_name, $environment_context); + return $this->recv_append_partition_by_name_with_environment_context(); + } + + public function send_append_partition_by_name_with_environment_context($db_name, $tbl_name, $part_name, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_append_partition_by_name_with_environment_context_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'append_partition_by_name_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('append_partition_by_name_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_append_partition_by_name_with_environment_context() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_append_partition_by_name_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_append_partition_by_name_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("append_partition_by_name_with_environment_context failed: unknown result"); + } + + public function drop_partition($db_name, $tbl_name, array $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, array $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 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 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_with_environment_context($db_name, $tbl_name, array $part_vals, $deleteData, \metastore\EnvironmentContext $environment_context) + { + $this->send_drop_partition_with_environment_context($db_name, $tbl_name, $part_vals, $deleteData, $environment_context); + return $this->recv_drop_partition_with_environment_context(); + } + + public function send_drop_partition_with_environment_context($db_name, $tbl_name, array $part_vals, $deleteData, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_drop_partition_with_environment_context_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->deleteData = $deleteData; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_partition_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_partition_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_partition_with_environment_context() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_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_drop_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; + } + throw new \Exception("drop_partition_with_environment_context 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 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 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 drop_partition_by_name_with_environment_context($db_name, $tbl_name, $part_name, $deleteData, \metastore\EnvironmentContext $environment_context) + { + $this->send_drop_partition_by_name_with_environment_context($db_name, $tbl_name, $part_name, $deleteData, $environment_context); + return $this->recv_drop_partition_by_name_with_environment_context(); + } + + public function send_drop_partition_by_name_with_environment_context($db_name, $tbl_name, $part_name, $deleteData, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_drop_partition_by_name_with_environment_context_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $args->deleteData = $deleteData; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_partition_by_name_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_partition_by_name_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_partition_by_name_with_environment_context() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_partition_by_name_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_drop_partition_by_name_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; + } + throw new \Exception("drop_partition_by_name_with_environment_context failed: unknown result"); + } + + public function drop_partitions_req(\metastore\DropPartitionsRequest $req) + { + $this->send_drop_partitions_req($req); + return $this->recv_drop_partitions_req(); + } + + public function send_drop_partitions_req(\metastore\DropPartitionsRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_drop_partitions_req_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_partitions_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_partitions_req', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_partitions_req() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_partitions_req_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_partitions_req_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_partitions_req failed: unknown result"); + } + + public function get_partition($db_name, $tbl_name, array $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, array $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 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 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 exchange_partition(array $partitionSpecs, $source_db, $source_table_name, $dest_db, $dest_table_name) + { + $this->send_exchange_partition($partitionSpecs, $source_db, $source_table_name, $dest_db, $dest_table_name); + return $this->recv_exchange_partition(); + } + + public function send_exchange_partition(array $partitionSpecs, $source_db, $source_table_name, $dest_db, $dest_table_name) + { + $args = new \metastore\ThriftHiveMetastore_exchange_partition_args(); + $args->partitionSpecs = $partitionSpecs; + $args->source_db = $source_db; + $args->source_table_name = $source_table_name; + $args->dest_db = $dest_db; + $args->dest_table_name = $dest_table_name; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'exchange_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('exchange_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_exchange_partition() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_exchange_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_exchange_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; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new \Exception("exchange_partition failed: unknown result"); + } + + public function exchange_partitions(array $partitionSpecs, $source_db, $source_table_name, $dest_db, $dest_table_name) + { + $this->send_exchange_partitions($partitionSpecs, $source_db, $source_table_name, $dest_db, $dest_table_name); + return $this->recv_exchange_partitions(); + } + + public function send_exchange_partitions(array $partitionSpecs, $source_db, $source_table_name, $dest_db, $dest_table_name) + { + $args = new \metastore\ThriftHiveMetastore_exchange_partitions_args(); + $args->partitionSpecs = $partitionSpecs; + $args->source_db = $source_db; + $args->source_table_name = $source_table_name; + $args->dest_db = $dest_db; + $args->dest_table_name = $dest_table_name; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'exchange_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('exchange_partitions', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_exchange_partitions() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_exchange_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_exchange_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; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new \Exception("exchange_partitions failed: unknown result"); + } + + public function get_partition_with_auth($db_name, $tbl_name, array $part_vals, $user_name, array $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, array $part_vals, $user_name, array $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 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 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 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 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 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 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, array $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, array $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 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 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_partitions_pspec($db_name, $tbl_name, $max_parts) + { + $this->send_get_partitions_pspec($db_name, $tbl_name, $max_parts); + return $this->recv_get_partitions_pspec(); + } + + public function send_get_partitions_pspec($db_name, $tbl_name, $max_parts) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_pspec_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_pspec', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_pspec', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_pspec() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_pspec_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_pspec_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_pspec 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 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 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, array $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, array $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 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 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, array $part_vals, $max_parts, $user_name, array $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, array $part_vals, $max_parts, $user_name, array $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 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 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, array $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, array $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 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 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 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 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_part_specs_by_filter($db_name, $tbl_name, $filter, $max_parts) + { + $this->send_get_part_specs_by_filter($db_name, $tbl_name, $filter, $max_parts); + return $this->recv_get_part_specs_by_filter(); + } + + public function send_get_part_specs_by_filter($db_name, $tbl_name, $filter, $max_parts) + { + $args = new \metastore\ThriftHiveMetastore_get_part_specs_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 TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_part_specs_by_filter', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_part_specs_by_filter', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_part_specs_by_filter() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_part_specs_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_part_specs_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_part_specs_by_filter failed: unknown result"); + } + + public function get_partitions_by_expr(\metastore\PartitionsByExprRequest $req) + { + $this->send_get_partitions_by_expr($req); + return $this->recv_get_partitions_by_expr(); + } + + public function send_get_partitions_by_expr(\metastore\PartitionsByExprRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_by_expr_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_by_expr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_by_expr', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_by_expr() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_by_expr_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_expr_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_expr failed: unknown result"); + } + + public function get_num_partitions_by_filter($db_name, $tbl_name, $filter) + { + $this->send_get_num_partitions_by_filter($db_name, $tbl_name, $filter); + return $this->recv_get_num_partitions_by_filter(); + } + + public function send_get_num_partitions_by_filter($db_name, $tbl_name, $filter) + { + $args = new \metastore\ThriftHiveMetastore_get_num_partitions_by_filter_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->filter = $filter; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_num_partitions_by_filter', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_num_partitions_by_filter', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_num_partitions_by_filter() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_num_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_num_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_num_partitions_by_filter failed: unknown result"); + } + + public function get_partitions_by_names($db_name, $tbl_name, array $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, array $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 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 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 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 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, array $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, array $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 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 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_partitions_with_environment_context($db_name, $tbl_name, array $new_parts, \metastore\EnvironmentContext $environment_context) + { + $this->send_alter_partitions_with_environment_context($db_name, $tbl_name, $new_parts, $environment_context); + $this->recv_alter_partitions_with_environment_context(); + } + + public function send_alter_partitions_with_environment_context($db_name, $tbl_name, array $new_parts, \metastore\EnvironmentContext $environment_context) + { + $args = new \metastore\ThriftHiveMetastore_alter_partitions_with_environment_context_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->new_parts = $new_parts; + $args->environment_context = $environment_context; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_partitions_with_environment_context', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_partitions_with_environment_context', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_partitions_with_environment_context() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_partitions_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_partitions_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 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 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 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, array $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, array $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 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 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 partition_name_has_valid_characters(array $part_vals, $throw_exception) + { + $this->send_partition_name_has_valid_characters($part_vals, $throw_exception); + return $this->recv_partition_name_has_valid_characters(); + } + + public function send_partition_name_has_valid_characters(array $part_vals, $throw_exception) + { + $args = new \metastore\ThriftHiveMetastore_partition_name_has_valid_characters_args(); + $args->part_vals = $part_vals; + $args->throw_exception = $throw_exception; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'partition_name_has_valid_characters', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('partition_name_has_valid_characters', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_partition_name_has_valid_characters() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_partition_name_has_valid_characters_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_has_valid_characters_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_has_valid_characters failed: unknown result"); + } + + 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 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 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 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 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 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 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, array $part_vals, $eventType) + { + $this->send_markPartitionForEvent($db_name, $tbl_name, $part_vals, $eventType); + $this->recv_markPartitionForEvent(); + } + + public function send_markPartitionForEvent($db_name, $tbl_name, array $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 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 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, array $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, array $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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 get_primary_keys(\metastore\PrimaryKeysRequest $request) + { + $this->send_get_primary_keys($request); + return $this->recv_get_primary_keys(); + } + + public function send_get_primary_keys(\metastore\PrimaryKeysRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_get_primary_keys_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_primary_keys', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_primary_keys', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_primary_keys() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_primary_keys_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_primary_keys_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_primary_keys failed: unknown result"); + } + + public function get_foreign_keys(\metastore\ForeignKeysRequest $request) + { + $this->send_get_foreign_keys($request); + return $this->recv_get_foreign_keys(); + } + + public function send_get_foreign_keys(\metastore\ForeignKeysRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_get_foreign_keys_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_foreign_keys', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_foreign_keys', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_foreign_keys() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_foreign_keys_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_foreign_keys_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_foreign_keys failed: unknown result"); + } + + public function get_unique_constraints(\metastore\UniqueConstraintsRequest $request) + { + $this->send_get_unique_constraints($request); + return $this->recv_get_unique_constraints(); + } + + public function send_get_unique_constraints(\metastore\UniqueConstraintsRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_get_unique_constraints_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_unique_constraints', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_unique_constraints', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_unique_constraints() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_unique_constraints_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_unique_constraints_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_unique_constraints failed: unknown result"); + } + + public function get_not_null_constraints(\metastore\NotNullConstraintsRequest $request) + { + $this->send_get_not_null_constraints($request); + return $this->recv_get_not_null_constraints(); + } + + public function send_get_not_null_constraints(\metastore\NotNullConstraintsRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_get_not_null_constraints_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_not_null_constraints', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_not_null_constraints', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_not_null_constraints() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_not_null_constraints_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_not_null_constraints_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_not_null_constraints failed: unknown result"); + } + + public function update_table_column_statistics(\metastore\ColumnStatistics $stats_obj) + { + $this->send_update_table_column_statistics($stats_obj); + return $this->recv_update_table_column_statistics(); + } + + public function send_update_table_column_statistics(\metastore\ColumnStatistics $stats_obj) + { + $args = new \metastore\ThriftHiveMetastore_update_table_column_statistics_args(); + $args->stats_obj = $stats_obj; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'update_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('update_table_column_statistics', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_update_table_column_statistics() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_update_table_column_statistics_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_update_table_column_statistics_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; + } + throw new \Exception("update_table_column_statistics failed: unknown result"); + } + + public function update_partition_column_statistics(\metastore\ColumnStatistics $stats_obj) + { + $this->send_update_partition_column_statistics($stats_obj); + return $this->recv_update_partition_column_statistics(); + } + + public function send_update_partition_column_statistics(\metastore\ColumnStatistics $stats_obj) + { + $args = new \metastore\ThriftHiveMetastore_update_partition_column_statistics_args(); + $args->stats_obj = $stats_obj; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'update_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('update_partition_column_statistics', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_update_partition_column_statistics() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_update_partition_column_statistics_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_update_partition_column_statistics_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; + } + throw new \Exception("update_partition_column_statistics failed: unknown result"); + } + + public function get_table_column_statistics($db_name, $tbl_name, $col_name) + { + $this->send_get_table_column_statistics($db_name, $tbl_name, $col_name); + return $this->recv_get_table_column_statistics(); + } + + public function send_get_table_column_statistics($db_name, $tbl_name, $col_name) + { + $args = new \metastore\ThriftHiveMetastore_get_table_column_statistics_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->col_name = $col_name; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_column_statistics', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_column_statistics() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_column_statistics_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_column_statistics_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; + } + throw new \Exception("get_table_column_statistics failed: unknown result"); + } + + public function get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) + { + $this->send_get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name); + return $this->recv_get_partition_column_statistics(); + } + + public function send_get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) + { + $args = new \metastore\ThriftHiveMetastore_get_partition_column_statistics_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $args->col_name = $col_name; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_column_statistics', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_column_statistics() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partition_column_statistics_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_column_statistics_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; + } + throw new \Exception("get_partition_column_statistics failed: unknown result"); + } + + public function get_table_statistics_req(\metastore\TableStatsRequest $request) + { + $this->send_get_table_statistics_req($request); + return $this->recv_get_table_statistics_req(); + } + + public function send_get_table_statistics_req(\metastore\TableStatsRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_get_table_statistics_req_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_statistics_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_statistics_req', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_statistics_req() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_table_statistics_req_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_statistics_req_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_statistics_req failed: unknown result"); + } + + public function get_partitions_statistics_req(\metastore\PartitionsStatsRequest $request) + { + $this->send_get_partitions_statistics_req($request); + return $this->recv_get_partitions_statistics_req(); + } + + public function send_get_partitions_statistics_req(\metastore\PartitionsStatsRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_get_partitions_statistics_req_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_statistics_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_statistics_req', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_statistics_req() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_partitions_statistics_req_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_statistics_req_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_statistics_req failed: unknown result"); + } + + public function get_aggr_stats_for(\metastore\PartitionsStatsRequest $request) + { + $this->send_get_aggr_stats_for($request); + return $this->recv_get_aggr_stats_for(); + } + + public function send_get_aggr_stats_for(\metastore\PartitionsStatsRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_get_aggr_stats_for_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_aggr_stats_for', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_aggr_stats_for', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_aggr_stats_for() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_aggr_stats_for_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_aggr_stats_for_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_aggr_stats_for failed: unknown result"); + } + + public function set_aggr_stats_for(\metastore\SetPartitionsStatsRequest $request) + { + $this->send_set_aggr_stats_for($request); + return $this->recv_set_aggr_stats_for(); + } + + public function send_set_aggr_stats_for(\metastore\SetPartitionsStatsRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_set_aggr_stats_for_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'set_aggr_stats_for', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('set_aggr_stats_for', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_set_aggr_stats_for() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_set_aggr_stats_for_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_aggr_stats_for_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; + } + throw new \Exception("set_aggr_stats_for failed: unknown result"); + } + + public function delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) + { + $this->send_delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name); + return $this->recv_delete_partition_column_statistics(); + } + + public function send_delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) + { + $args = new \metastore\ThriftHiveMetastore_delete_partition_column_statistics_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $args->col_name = $col_name; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'delete_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('delete_partition_column_statistics', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_delete_partition_column_statistics() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_delete_partition_column_statistics_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_delete_partition_column_statistics_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; + } + throw new \Exception("delete_partition_column_statistics failed: unknown result"); + } + + public function delete_table_column_statistics($db_name, $tbl_name, $col_name) + { + $this->send_delete_table_column_statistics($db_name, $tbl_name, $col_name); + return $this->recv_delete_table_column_statistics(); + } + + public function send_delete_table_column_statistics($db_name, $tbl_name, $col_name) + { + $args = new \metastore\ThriftHiveMetastore_delete_table_column_statistics_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->col_name = $col_name; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'delete_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('delete_table_column_statistics', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_delete_table_column_statistics() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_delete_table_column_statistics_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_delete_table_column_statistics_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; + } + throw new \Exception("delete_table_column_statistics failed: unknown result"); + } + + public function create_function(\metastore\Function $func) + { + $this->send_create_function($func); + $this->recv_create_function(); + } + + public function send_create_function(\metastore\Function $func) + { + $args = new \metastore\ThriftHiveMetastore_create_function_args(); + $args->func = $func; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_function', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_function', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_function() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_create_function_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_function_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_function($dbName, $funcName) + { + $this->send_drop_function($dbName, $funcName); + $this->recv_drop_function(); + } + + public function send_drop_function($dbName, $funcName) + { + $args = new \metastore\ThriftHiveMetastore_drop_function_args(); + $args->dbName = $dbName; + $args->funcName = $funcName; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_function', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_function', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_function() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_drop_function_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_function_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 alter_function($dbName, $funcName, \metastore\Function $newFunc) + { + $this->send_alter_function($dbName, $funcName, $newFunc); + $this->recv_alter_function(); + } + + public function send_alter_function($dbName, $funcName, \metastore\Function $newFunc) + { + $args = new \metastore\ThriftHiveMetastore_alter_function_args(); + $args->dbName = $dbName; + $args->funcName = $funcName; + $args->newFunc = $newFunc; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_function', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_function', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_function() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_function_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_function_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_functions($dbName, $pattern) + { + $this->send_get_functions($dbName, $pattern); + return $this->recv_get_functions(); + } + + public function send_get_functions($dbName, $pattern) + { + $args = new \metastore\ThriftHiveMetastore_get_functions_args(); + $args->dbName = $dbName; + $args->pattern = $pattern; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_functions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_functions', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_functions() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_functions_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_functions_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_functions failed: unknown result"); + } + + public function get_function($dbName, $funcName) + { + $this->send_get_function($dbName, $funcName); + return $this->recv_get_function(); + } + + public function send_get_function($dbName, $funcName) + { + $args = new \metastore\ThriftHiveMetastore_get_function_args(); + $args->dbName = $dbName; + $args->funcName = $funcName; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_function', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_function', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_function() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_function_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_function_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_function failed: unknown result"); + } + + public function get_all_functions() + { + $this->send_get_all_functions(); + return $this->recv_get_all_functions(); + } + + public function send_get_all_functions() + { + $args = new \metastore\ThriftHiveMetastore_get_all_functions_args(); + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_all_functions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_all_functions', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_all_functions() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_all_functions_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_functions_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_functions 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 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 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 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 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 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 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 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 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 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 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 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 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 grant_revoke_role(\metastore\GrantRevokeRoleRequest $request) + { + $this->send_grant_revoke_role($request); + return $this->recv_grant_revoke_role(); + } + + public function send_grant_revoke_role(\metastore\GrantRevokeRoleRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_grant_revoke_role_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'grant_revoke_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('grant_revoke_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_grant_revoke_role() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_grant_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_grant_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("grant_revoke_role failed: unknown result"); + } + + public function get_principals_in_role(\metastore\GetPrincipalsInRoleRequest $request) + { + $this->send_get_principals_in_role($request); + return $this->recv_get_principals_in_role(); + } + + public function send_get_principals_in_role(\metastore\GetPrincipalsInRoleRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_get_principals_in_role_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_principals_in_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_principals_in_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_principals_in_role() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_principals_in_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_get_principals_in_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("get_principals_in_role failed: unknown result"); + } + + public function get_role_grants_for_principal(\metastore\GetRoleGrantsForPrincipalRequest $request) + { + $this->send_get_role_grants_for_principal($request); + return $this->recv_get_role_grants_for_principal(); + } + + public function send_get_role_grants_for_principal(\metastore\GetRoleGrantsForPrincipalRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_get_role_grants_for_principal_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_role_grants_for_principal', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_role_grants_for_principal', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_role_grants_for_principal() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_role_grants_for_principal_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_grants_for_principal_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_grants_for_principal failed: unknown result"); + } + + public function get_privilege_set(\metastore\HiveObjectRef $hiveObject, $user_name, array $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, array $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 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 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 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 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 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 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 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 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 grant_revoke_privileges(\metastore\GrantRevokePrivilegeRequest $request) + { + $this->send_grant_revoke_privileges($request); + return $this->recv_grant_revoke_privileges(); + } + + public function send_grant_revoke_privileges(\metastore\GrantRevokePrivilegeRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_grant_revoke_privileges_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'grant_revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('grant_revoke_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_grant_revoke_privileges() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_grant_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_grant_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("grant_revoke_privileges failed: unknown result"); + } + + public function set_ugi($user_name, array $group_names) + { + $this->send_set_ugi($user_name, $group_names); + return $this->recv_set_ugi(); + } + + public function send_set_ugi($user_name, array $group_names) + { + $args = new \metastore\ThriftHiveMetastore_set_ugi_args(); + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof 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 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 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 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 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 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 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 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; + } + + public function add_token($token_identifier, $delegation_token) + { + $this->send_add_token($token_identifier, $delegation_token); + return $this->recv_add_token(); + } + + public function send_add_token($token_identifier, $delegation_token) + { + $args = new \metastore\ThriftHiveMetastore_add_token_args(); + $args->token_identifier = $token_identifier; + $args->delegation_token = $delegation_token; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_token', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_token() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_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_add_token_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("add_token failed: unknown result"); + } + + public function remove_token($token_identifier) + { + $this->send_remove_token($token_identifier); + return $this->recv_remove_token(); + } + + public function send_remove_token($token_identifier) + { + $args = new \metastore\ThriftHiveMetastore_remove_token_args(); + $args->token_identifier = $token_identifier; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'remove_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('remove_token', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_remove_token() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_remove_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_remove_token_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("remove_token failed: unknown result"); + } + + public function get_token($token_identifier) + { + $this->send_get_token($token_identifier); + return $this->recv_get_token(); + } + + public function send_get_token($token_identifier) + { + $args = new \metastore\ThriftHiveMetastore_get_token_args(); + $args->token_identifier = $token_identifier; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_token', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_token() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_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_token_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("get_token failed: unknown result"); + } + + public function get_all_token_identifiers() + { + $this->send_get_all_token_identifiers(); + return $this->recv_get_all_token_identifiers(); + } + + public function send_get_all_token_identifiers() + { + $args = new \metastore\ThriftHiveMetastore_get_all_token_identifiers_args(); + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_all_token_identifiers', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_all_token_identifiers', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_all_token_identifiers() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_all_token_identifiers_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_token_identifiers_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("get_all_token_identifiers failed: unknown result"); + } + + public function add_master_key($key) + { + $this->send_add_master_key($key); + return $this->recv_add_master_key(); + } + + public function send_add_master_key($key) + { + $args = new \metastore\ThriftHiveMetastore_add_master_key_args(); + $args->key = $key; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_master_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_master_key', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_master_key() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_master_key_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_master_key_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("add_master_key failed: unknown result"); + } + + public function update_master_key($seq_number, $key) + { + $this->send_update_master_key($seq_number, $key); + $this->recv_update_master_key(); + } + + public function send_update_master_key($seq_number, $key) + { + $args = new \metastore\ThriftHiveMetastore_update_master_key_args(); + $args->seq_number = $seq_number; + $args->key = $key; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'update_master_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('update_master_key', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_update_master_key() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_update_master_key_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_update_master_key_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 remove_master_key($key_seq) + { + $this->send_remove_master_key($key_seq); + return $this->recv_remove_master_key(); + } + + public function send_remove_master_key($key_seq) + { + $args = new \metastore\ThriftHiveMetastore_remove_master_key_args(); + $args->key_seq = $key_seq; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'remove_master_key', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('remove_master_key', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_remove_master_key() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_remove_master_key_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_remove_master_key_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("remove_master_key failed: unknown result"); + } + + public function get_master_keys() + { + $this->send_get_master_keys(); + return $this->recv_get_master_keys(); + } + + public function send_get_master_keys() + { + $args = new \metastore\ThriftHiveMetastore_get_master_keys_args(); + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_master_keys', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_master_keys', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_master_keys() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_master_keys_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_master_keys_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("get_master_keys failed: unknown result"); + } + + public function get_open_txns() + { + $this->send_get_open_txns(); + return $this->recv_get_open_txns(); + } + + public function send_get_open_txns() + { + $args = new \metastore\ThriftHiveMetastore_get_open_txns_args(); + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_open_txns', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_open_txns', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_open_txns() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_open_txns_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_open_txns_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("get_open_txns failed: unknown result"); + } + + public function get_open_txns_info() + { + $this->send_get_open_txns_info(); + return $this->recv_get_open_txns_info(); + } + + public function send_get_open_txns_info() + { + $args = new \metastore\ThriftHiveMetastore_get_open_txns_info_args(); + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_open_txns_info', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_open_txns_info', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_open_txns_info() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_open_txns_info_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_open_txns_info_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("get_open_txns_info failed: unknown result"); + } + + public function open_txns(\metastore\OpenTxnRequest $rqst) + { + $this->send_open_txns($rqst); + return $this->recv_open_txns(); + } + + public function send_open_txns(\metastore\OpenTxnRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_open_txns_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'open_txns', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('open_txns', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_open_txns() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_open_txns_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_open_txns_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("open_txns failed: unknown result"); + } + + public function abort_txn(\metastore\AbortTxnRequest $rqst) + { + $this->send_abort_txn($rqst); + $this->recv_abort_txn(); + } + + public function send_abort_txn(\metastore\AbortTxnRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_abort_txn_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'abort_txn', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('abort_txn', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_abort_txn() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_abort_txn_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_abort_txn_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + return; + } + + public function abort_txns(\metastore\AbortTxnsRequest $rqst) + { + $this->send_abort_txns($rqst); + $this->recv_abort_txns(); + } + + public function send_abort_txns(\metastore\AbortTxnsRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_abort_txns_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'abort_txns', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('abort_txns', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_abort_txns() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_abort_txns_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_abort_txns_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + return; + } + + public function commit_txn(\metastore\CommitTxnRequest $rqst) + { + $this->send_commit_txn($rqst); + $this->recv_commit_txn(); + } + + public function send_commit_txn(\metastore\CommitTxnRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_commit_txn_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'commit_txn', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('commit_txn', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_commit_txn() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_commit_txn_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_commit_txn_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 lock(\metastore\LockRequest $rqst) + { + $this->send_lock($rqst); + return $this->recv_lock(); + } + + public function send_lock(\metastore\LockRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_lock_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'lock', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('lock', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_lock() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_lock_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_lock_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("lock failed: unknown result"); + } + + public function check_lock(\metastore\CheckLockRequest $rqst) + { + $this->send_check_lock($rqst); + return $this->recv_check_lock(); + } + + public function send_check_lock(\metastore\CheckLockRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_check_lock_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'check_lock', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('check_lock', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_check_lock() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_check_lock_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_check_lock_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("check_lock failed: unknown result"); + } + + public function unlock(\metastore\UnlockRequest $rqst) + { + $this->send_unlock($rqst); + $this->recv_unlock(); + } + + public function send_unlock(\metastore\UnlockRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_unlock_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'unlock', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('unlock', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_unlock() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_unlock_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_unlock_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 show_locks(\metastore\ShowLocksRequest $rqst) + { + $this->send_show_locks($rqst); + return $this->recv_show_locks(); + } + + public function send_show_locks(\metastore\ShowLocksRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_show_locks_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'show_locks', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('show_locks', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_show_locks() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_show_locks_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_show_locks_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("show_locks failed: unknown result"); + } + + public function heartbeat(\metastore\HeartbeatRequest $ids) + { + $this->send_heartbeat($ids); + $this->recv_heartbeat(); + } + + public function send_heartbeat(\metastore\HeartbeatRequest $ids) + { + $args = new \metastore\ThriftHiveMetastore_heartbeat_args(); + $args->ids = $ids; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'heartbeat', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('heartbeat', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_heartbeat() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_heartbeat_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_heartbeat_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 heartbeat_txn_range(\metastore\HeartbeatTxnRangeRequest $txns) + { + $this->send_heartbeat_txn_range($txns); + return $this->recv_heartbeat_txn_range(); + } + + public function send_heartbeat_txn_range(\metastore\HeartbeatTxnRangeRequest $txns) + { + $args = new \metastore\ThriftHiveMetastore_heartbeat_txn_range_args(); + $args->txns = $txns; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'heartbeat_txn_range', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('heartbeat_txn_range', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_heartbeat_txn_range() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_heartbeat_txn_range_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_heartbeat_txn_range_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("heartbeat_txn_range failed: unknown result"); + } + + public function compact(\metastore\CompactionRequest $rqst) + { + $this->send_compact($rqst); + $this->recv_compact(); + } + + public function send_compact(\metastore\CompactionRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_compact_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'compact', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('compact', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_compact() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_compact_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_compact_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + return; + } + + public function compact2(\metastore\CompactionRequest $rqst) + { + $this->send_compact2($rqst); + return $this->recv_compact2(); + } + + public function send_compact2(\metastore\CompactionRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_compact2_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'compact2', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('compact2', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_compact2() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_compact2_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_compact2_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("compact2 failed: unknown result"); + } + + public function show_compact(\metastore\ShowCompactRequest $rqst) + { + $this->send_show_compact($rqst); + return $this->recv_show_compact(); + } + + public function send_show_compact(\metastore\ShowCompactRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_show_compact_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'show_compact', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('show_compact', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_show_compact() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_show_compact_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_show_compact_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("show_compact failed: unknown result"); + } + + public function add_dynamic_partitions(\metastore\AddDynamicPartitions $rqst) + { + $this->send_add_dynamic_partitions($rqst); + $this->recv_add_dynamic_partitions(); + } + + public function send_add_dynamic_partitions(\metastore\AddDynamicPartitions $rqst) + { + $args = new \metastore\ThriftHiveMetastore_add_dynamic_partitions_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_dynamic_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_dynamic_partitions', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_dynamic_partitions() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_add_dynamic_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_dynamic_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 get_next_notification(\metastore\NotificationEventRequest $rqst) + { + $this->send_get_next_notification($rqst); + return $this->recv_get_next_notification(); + } + + public function send_get_next_notification(\metastore\NotificationEventRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_get_next_notification_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_next_notification', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_next_notification', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_next_notification() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_next_notification_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_next_notification_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("get_next_notification failed: unknown result"); + } + + public function get_current_notificationEventId() + { + $this->send_get_current_notificationEventId(); + return $this->recv_get_current_notificationEventId(); + } + + public function send_get_current_notificationEventId() + { + $args = new \metastore\ThriftHiveMetastore_get_current_notificationEventId_args(); + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_current_notificationEventId', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_current_notificationEventId', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_current_notificationEventId() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_current_notificationEventId_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_current_notificationEventId_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("get_current_notificationEventId failed: unknown result"); + } + + public function fire_listener_event(\metastore\FireEventRequest $rqst) + { + $this->send_fire_listener_event($rqst); + return $this->recv_fire_listener_event(); + } + + public function send_fire_listener_event(\metastore\FireEventRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_fire_listener_event_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'fire_listener_event', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('fire_listener_event', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_fire_listener_event() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_fire_listener_event_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_fire_listener_event_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("fire_listener_event failed: unknown result"); + } + + public function flushCache() + { + $this->send_flushCache(); + $this->recv_flushCache(); + } + + public function send_flushCache() + { + $args = new \metastore\ThriftHiveMetastore_flushCache_args(); + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'flushCache', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('flushCache', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_flushCache() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_flushCache_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_flushCache_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + return; + } + + public function cm_recycle(\metastore\CmRecycleRequest $request) + { + $this->send_cm_recycle($request); + return $this->recv_cm_recycle(); + } + + public function send_cm_recycle(\metastore\CmRecycleRequest $request) + { + $args = new \metastore\ThriftHiveMetastore_cm_recycle_args(); + $args->request = $request; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'cm_recycle', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('cm_recycle', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_cm_recycle() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_cm_recycle_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_cm_recycle_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("cm_recycle failed: unknown result"); + } + + public function get_file_metadata_by_expr(\metastore\GetFileMetadataByExprRequest $req) + { + $this->send_get_file_metadata_by_expr($req); + return $this->recv_get_file_metadata_by_expr(); + } + + public function send_get_file_metadata_by_expr(\metastore\GetFileMetadataByExprRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_get_file_metadata_by_expr_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_file_metadata_by_expr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_file_metadata_by_expr', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_file_metadata_by_expr() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_file_metadata_by_expr_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_file_metadata_by_expr_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("get_file_metadata_by_expr failed: unknown result"); + } + + public function get_file_metadata(\metastore\GetFileMetadataRequest $req) + { + $this->send_get_file_metadata($req); + return $this->recv_get_file_metadata(); + } + + public function send_get_file_metadata(\metastore\GetFileMetadataRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_get_file_metadata_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_file_metadata', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_file_metadata', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_file_metadata() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_file_metadata_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_file_metadata_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("get_file_metadata failed: unknown result"); + } + + public function put_file_metadata(\metastore\PutFileMetadataRequest $req) + { + $this->send_put_file_metadata($req); + return $this->recv_put_file_metadata(); + } + + public function send_put_file_metadata(\metastore\PutFileMetadataRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_put_file_metadata_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'put_file_metadata', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('put_file_metadata', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_put_file_metadata() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_put_file_metadata_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_put_file_metadata_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("put_file_metadata failed: unknown result"); + } + + public function clear_file_metadata(\metastore\ClearFileMetadataRequest $req) + { + $this->send_clear_file_metadata($req); + return $this->recv_clear_file_metadata(); + } + + public function send_clear_file_metadata(\metastore\ClearFileMetadataRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_clear_file_metadata_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'clear_file_metadata', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('clear_file_metadata', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_clear_file_metadata() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_clear_file_metadata_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_clear_file_metadata_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("clear_file_metadata failed: unknown result"); + } + + public function cache_file_metadata(\metastore\CacheFileMetadataRequest $req) + { + $this->send_cache_file_metadata($req); + return $this->recv_cache_file_metadata(); + } + + public function send_cache_file_metadata(\metastore\CacheFileMetadataRequest $req) + { + $args = new \metastore\ThriftHiveMetastore_cache_file_metadata_args(); + $args->req = $req; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'cache_file_metadata', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('cache_file_metadata', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_cache_file_metadata() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_cache_file_metadata_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_cache_file_metadata_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("cache_file_metadata failed: unknown result"); + } + + public function get_metastore_db_uuid() + { + $this->send_get_metastore_db_uuid(); + return $this->recv_get_metastore_db_uuid(); + } + + public function send_get_metastore_db_uuid() + { + $args = new \metastore\ThriftHiveMetastore_get_metastore_db_uuid_args(); + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_metastore_db_uuid', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_metastore_db_uuid', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_metastore_db_uuid() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_metastore_db_uuid_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_metastore_db_uuid_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_metastore_db_uuid failed: unknown result"); + } + +} + +// HELPER FUNCTIONS AND STRUCTURES + +class ThriftHiveMetastore_getMetaConf_args { + static $_TSPEC; + + /** + * @var string + */ + public $key = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'key', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['key'])) { + $this->key = $vals['key']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_getMetaConf_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->key); + } 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_getMetaConf_args'); + if ($this->key !== null) { + $xfer += $output->writeFieldBegin('key', TType::STRING, 1); + $xfer += $output->writeString($this->key); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_getMetaConf_result { + static $_TSPEC; + + /** + * @var string + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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_getMetaConf_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_getMetaConf_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_setMetaConf_args { + static $_TSPEC; + + /** + * @var string + */ + public $key = null; + /** + * @var string + */ + public $value = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'key', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'value', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['key'])) { + $this->key = $vals['key']; + } + if (isset($vals['value'])) { + $this->value = $vals['value']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_setMetaConf_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->key); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->value); + } 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_setMetaConf_args'); + if ($this->key !== null) { + $xfer += $output->writeFieldBegin('key', TType::STRING, 1); + $xfer += $output->writeString($this->key); + $xfer += $output->writeFieldEnd(); + } + if ($this->value !== null) { + $xfer += $output->writeFieldBegin('value', TType::STRING, 2); + $xfer += $output->writeString($this->value); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_setMetaConf_result { + static $_TSPEC; + + /** + * @var \metastore\MetaException + */ + 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_setMetaConf_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_setMetaConf_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; + } + +} + +class ThriftHiveMetastore_create_database_args { + static $_TSPEC; + + /** + * @var \metastore\Database + */ + 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; + + /** + * @var \metastore\AlreadyExistsException + */ + public $o1 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var \metastore\Database + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + public $name = null; + /** + * @var bool + */ + public $deleteData = null; + /** + * @var bool + */ + 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; + + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\InvalidOperationException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size624 = 0; + $_etype627 = 0; + $xfer += $input->readListBegin($_etype627, $_size624); + for ($_i628 = 0; $_i628 < $_size624; ++$_i628) + { + $elem629 = null; + $xfer += $input->readString($elem629); + $this->success []= $elem629; + } + $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 $iter630) + { + $xfer += $output->writeString($iter630); + } + } + $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; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size631 = 0; + $_etype634 = 0; + $xfer += $input->readListBegin($_etype634, $_size631); + for ($_i635 = 0; $_i635 < $_size631; ++$_i635) + { + $elem636 = null; + $xfer += $input->readString($elem636); + $this->success []= $elem636; + } + $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 $iter637) + { + $xfer += $output->writeString($iter637); + } + } + $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; + + /** + * @var string + */ + public $dbname = null; + /** + * @var \metastore\Database + */ + 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; + + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var \metastore\Type + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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; + + /** + * @var \metastore\Type + */ + 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; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\AlreadyExistsException + */ + public $o1 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var array + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size638 = 0; + $_ktype639 = 0; + $_vtype640 = 0; + $xfer += $input->readMapBegin($_ktype639, $_vtype640, $_size638); + for ($_i642 = 0; $_i642 < $_size638; ++$_i642) + { + $key643 = ''; + $val644 = new \metastore\Type(); + $xfer += $input->readString($key643); + $val644 = new \metastore\Type(); + $xfer += $val644->read($input); + $this->success[$key643] = $val644; + } + $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 $kiter645 => $viter646) + { + $xfer += $output->writeString($kiter645); + $xfer += $viter646->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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + 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; + + /** + * @var \metastore\FieldSchema[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\UnknownTableException + */ + public $o2 = null; + /** + * @var \metastore\UnknownDBException + */ + 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(); + $_size647 = 0; + $_etype650 = 0; + $xfer += $input->readListBegin($_etype650, $_size647); + for ($_i651 = 0; $_i651 < $_size647; ++$_i651) + { + $elem652 = null; + $elem652 = new \metastore\FieldSchema(); + $xfer += $elem652->read($input); + $this->success []= $elem652; + } + $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 $iter653) + { + $xfer += $iter653->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_fields_with_environment_context_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $table_name = null; + /** + * @var \metastore\EnvironmentContext + */ + 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' => 'table_name', + 'type' => TType::STRING, + ), + 3 => 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['table_name'])) { + $this->table_name = $vals['table_name']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_fields_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->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + 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_get_fields_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->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); + $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, 3); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_fields_with_environment_context_result { + static $_TSPEC; + + /** + * @var \metastore\FieldSchema[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\UnknownTableException + */ + public $o2 = null; + /** + * @var \metastore\UnknownDBException + */ + 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_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::LST) { + $this->success = array(); + $_size654 = 0; + $_etype657 = 0; + $xfer += $input->readListBegin($_etype657, $_size654); + for ($_i658 = 0; $_i658 < $_size654; ++$_i658) + { + $elem659 = null; + $elem659 = new \metastore\FieldSchema(); + $xfer += $elem659->read($input); + $this->success []= $elem659; + } + $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_with_environment_context_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 $iter660) + { + $xfer += $iter660->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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + 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; + + /** + * @var \metastore\FieldSchema[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\UnknownTableException + */ + public $o2 = null; + /** + * @var \metastore\UnknownDBException + */ + 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(); + $_size661 = 0; + $_etype664 = 0; + $xfer += $input->readListBegin($_etype664, $_size661); + for ($_i665 = 0; $_i665 < $_size661; ++$_i665) + { + $elem666 = null; + $elem666 = new \metastore\FieldSchema(); + $xfer += $elem666->read($input); + $this->success []= $elem666; + } + $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 $iter667) + { + $xfer += $iter667->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_with_environment_context_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $table_name = null; + /** + * @var \metastore\EnvironmentContext + */ + 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' => 'table_name', + 'type' => TType::STRING, + ), + 3 => 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['table_name'])) { + $this->table_name = $vals['table_name']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_schema_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->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + 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_get_schema_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->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); + $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, 3); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_schema_with_environment_context_result { + static $_TSPEC; + + /** + * @var \metastore\FieldSchema[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\UnknownTableException + */ + public $o2 = null; + /** + * @var \metastore\UnknownDBException + */ + 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_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::LST) { + $this->success = array(); + $_size668 = 0; + $_etype671 = 0; + $xfer += $input->readListBegin($_etype671, $_size668); + for ($_i672 = 0; $_i672 < $_size668; ++$_i672) + { + $elem673 = null; + $elem673 = new \metastore\FieldSchema(); + $xfer += $elem673->read($input); + $this->success []= $elem673; + } + $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_with_environment_context_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 $iter674) + { + $xfer += $iter674->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; + + /** + * @var \metastore\Table + */ + 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; + + /** + * @var \metastore\AlreadyExistsException + */ + public $o1 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + public $o3 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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; + + /** + * @var \metastore\Table + */ + public $tbl = null; + /** + * @var \metastore\EnvironmentContext + */ + 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; + + /** + * @var \metastore\AlreadyExistsException + */ + public $o1 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + public $o3 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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_create_table_with_constraints_args { + static $_TSPEC; + + /** + * @var \metastore\Table + */ + public $tbl = null; + /** + * @var \metastore\SQLPrimaryKey[] + */ + public $primaryKeys = null; + /** + * @var \metastore\SQLForeignKey[] + */ + public $foreignKeys = null; + /** + * @var \metastore\SQLUniqueConstraint[] + */ + public $uniqueConstraints = null; + /** + * @var \metastore\SQLNotNullConstraint[] + */ + public $notNullConstraints = 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' => 'primaryKeys', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\SQLPrimaryKey', + ), + ), + 3 => array( + 'var' => 'foreignKeys', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\SQLForeignKey', + ), + ), + 4 => array( + 'var' => 'uniqueConstraints', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\SQLUniqueConstraint', + ), + ), + 5 => array( + 'var' => 'notNullConstraints', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\SQLNotNullConstraint', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tbl'])) { + $this->tbl = $vals['tbl']; + } + if (isset($vals['primaryKeys'])) { + $this->primaryKeys = $vals['primaryKeys']; + } + if (isset($vals['foreignKeys'])) { + $this->foreignKeys = $vals['foreignKeys']; + } + if (isset($vals['uniqueConstraints'])) { + $this->uniqueConstraints = $vals['uniqueConstraints']; + } + if (isset($vals['notNullConstraints'])) { + $this->notNullConstraints = $vals['notNullConstraints']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_with_constraints_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::LST) { + $this->primaryKeys = array(); + $_size675 = 0; + $_etype678 = 0; + $xfer += $input->readListBegin($_etype678, $_size675); + for ($_i679 = 0; $_i679 < $_size675; ++$_i679) + { + $elem680 = null; + $elem680 = new \metastore\SQLPrimaryKey(); + $xfer += $elem680->read($input); + $this->primaryKeys []= $elem680; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->foreignKeys = array(); + $_size681 = 0; + $_etype684 = 0; + $xfer += $input->readListBegin($_etype684, $_size681); + for ($_i685 = 0; $_i685 < $_size681; ++$_i685) + { + $elem686 = null; + $elem686 = new \metastore\SQLForeignKey(); + $xfer += $elem686->read($input); + $this->foreignKeys []= $elem686; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->uniqueConstraints = array(); + $_size687 = 0; + $_etype690 = 0; + $xfer += $input->readListBegin($_etype690, $_size687); + for ($_i691 = 0; $_i691 < $_size687; ++$_i691) + { + $elem692 = null; + $elem692 = new \metastore\SQLUniqueConstraint(); + $xfer += $elem692->read($input); + $this->uniqueConstraints []= $elem692; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->notNullConstraints = array(); + $_size693 = 0; + $_etype696 = 0; + $xfer += $input->readListBegin($_etype696, $_size693); + for ($_i697 = 0; $_i697 < $_size693; ++$_i697) + { + $elem698 = null; + $elem698 = new \metastore\SQLNotNullConstraint(); + $xfer += $elem698->read($input); + $this->notNullConstraints []= $elem698; + } + $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_create_table_with_constraints_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->primaryKeys !== null) { + if (!is_array($this->primaryKeys)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('primaryKeys', TType::LST, 2); + { + $output->writeListBegin(TType::STRUCT, count($this->primaryKeys)); + { + foreach ($this->primaryKeys as $iter699) + { + $xfer += $iter699->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->foreignKeys !== null) { + if (!is_array($this->foreignKeys)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('foreignKeys', TType::LST, 3); + { + $output->writeListBegin(TType::STRUCT, count($this->foreignKeys)); + { + foreach ($this->foreignKeys as $iter700) + { + $xfer += $iter700->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->uniqueConstraints !== null) { + if (!is_array($this->uniqueConstraints)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('uniqueConstraints', TType::LST, 4); + { + $output->writeListBegin(TType::STRUCT, count($this->uniqueConstraints)); + { + foreach ($this->uniqueConstraints as $iter701) + { + $xfer += $iter701->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->notNullConstraints !== null) { + if (!is_array($this->notNullConstraints)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('notNullConstraints', TType::LST, 5); + { + $output->writeListBegin(TType::STRUCT, count($this->notNullConstraints)); + { + foreach ($this->notNullConstraints as $iter702) + { + $xfer += $iter702->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_table_with_constraints_result { + static $_TSPEC; + + /** + * @var \metastore\AlreadyExistsException + */ + public $o1 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + public $o3 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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_constraints_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_constraints_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_constraint_args { + static $_TSPEC; + + /** + * @var \metastore\DropConstraintRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\DropConstraintRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_constraint_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->req = new \metastore\DropConstraintRequest(); + $xfer += $this->req->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_constraint_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_constraint_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_constraint_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_constraint_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_add_primary_key_args { + static $_TSPEC; + + /** + * @var \metastore\AddPrimaryKeyRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\AddPrimaryKeyRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_primary_key_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->req = new \metastore\AddPrimaryKeyRequest(); + $xfer += $this->req->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_primary_key_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_primary_key_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = 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\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_add_primary_key_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\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_add_primary_key_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_foreign_key_args { + static $_TSPEC; + + /** + * @var \metastore\AddForeignKeyRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\AddForeignKeyRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_foreign_key_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->req = new \metastore\AddForeignKeyRequest(); + $xfer += $this->req->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_foreign_key_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_foreign_key_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = 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\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_add_foreign_key_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\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_add_foreign_key_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_unique_constraint_args { + static $_TSPEC; + + /** + * @var \metastore\AddUniqueConstraintRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\AddUniqueConstraintRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_unique_constraint_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->req = new \metastore\AddUniqueConstraintRequest(); + $xfer += $this->req->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_unique_constraint_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_unique_constraint_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = 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\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_add_unique_constraint_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\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_add_unique_constraint_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_not_null_constraint_args { + static $_TSPEC; + + /** + * @var \metastore\AddNotNullConstraintRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\AddNotNullConstraintRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_not_null_constraint_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->req = new \metastore\AddNotNullConstraintRequest(); + $xfer += $this->req->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_not_null_constraint_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_not_null_constraint_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = 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\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_add_not_null_constraint_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\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_add_not_null_constraint_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_table_args { + static $_TSPEC; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $name = null; + /** + * @var bool + */ + 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; + + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_drop_table_with_environment_context_args { + static $_TSPEC; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $name = null; + /** + * @var bool + */ + public $deleteData = null; + /** + * @var \metastore\EnvironmentContext + */ + 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' => 'name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + 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['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_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->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } 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_drop_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->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(); + } + 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_drop_table_with_environment_context_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_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\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_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->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_truncate_table_args { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tableName = null; + /** + * @var string[] + */ + public $partNames = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'partNames', + '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['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['partNames'])) { + $this->partNames = $vals['partNames']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_truncate_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->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->partNames = array(); + $_size703 = 0; + $_etype706 = 0; + $xfer += $input->readListBegin($_etype706, $_size703); + for ($_i707 = 0; $_i707 < $_size703; ++$_i707) + { + $elem708 = null; + $xfer += $input->readString($elem708); + $this->partNames []= $elem708; + } + $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_truncate_table_args'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 2); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->partNames !== null) { + if (!is_array($this->partNames)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partNames', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->partNames)); + { + foreach ($this->partNames as $iter709) + { + $xfer += $output->writeString($iter709); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_truncate_table_result { + static $_TSPEC; + + /** + * @var \metastore\MetaException + */ + 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_truncate_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\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_truncate_table_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; + } + +} + +class ThriftHiveMetastore_get_tables_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + 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; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size710 = 0; + $_etype713 = 0; + $xfer += $input->readListBegin($_etype713, $_size710); + for ($_i714 = 0; $_i714 < $_size710; ++$_i714) + { + $elem715 = null; + $xfer += $input->readString($elem715); + $this->success []= $elem715; + } + $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 $iter716) + { + $xfer += $output->writeString($iter716); + } + } + $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_tables_by_type_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $pattern = null; + /** + * @var string + */ + public $tableType = 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, + ), + 3 => array( + 'var' => 'tableType', + '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']; + } + if (isset($vals['tableType'])) { + $this->tableType = $vals['tableType']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_tables_by_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->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; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableType); + } 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_by_type_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(); + } + if ($this->tableType !== null) { + $xfer += $output->writeFieldBegin('tableType', TType::STRING, 3); + $xfer += $output->writeString($this->tableType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_tables_by_type_result { + static $_TSPEC; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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_by_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::LST) { + $this->success = array(); + $_size717 = 0; + $_etype720 = 0; + $xfer += $input->readListBegin($_etype720, $_size717); + for ($_i721 = 0; $_i721 < $_size717; ++$_i721) + { + $elem722 = null; + $xfer += $input->readString($elem722); + $this->success []= $elem722; + } + $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_by_type_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 $iter723) + { + $xfer += $output->writeString($iter723); + } + } + $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_meta_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_patterns = null; + /** + * @var string + */ + public $tbl_patterns = null; + /** + * @var string[] + */ + public $tbl_types = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_patterns', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_patterns', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'tbl_types', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_patterns'])) { + $this->db_patterns = $vals['db_patterns']; + } + if (isset($vals['tbl_patterns'])) { + $this->tbl_patterns = $vals['tbl_patterns']; + } + if (isset($vals['tbl_types'])) { + $this->tbl_types = $vals['tbl_types']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_meta_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_patterns); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_patterns); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->tbl_types = array(); + $_size724 = 0; + $_etype727 = 0; + $xfer += $input->readListBegin($_etype727, $_size724); + for ($_i728 = 0; $_i728 < $_size724; ++$_i728) + { + $elem729 = null; + $xfer += $input->readString($elem729); + $this->tbl_types []= $elem729; + } + $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_meta_args'); + if ($this->db_patterns !== null) { + $xfer += $output->writeFieldBegin('db_patterns', TType::STRING, 1); + $xfer += $output->writeString($this->db_patterns); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_patterns !== null) { + $xfer += $output->writeFieldBegin('tbl_patterns', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_patterns); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_types !== null) { + if (!is_array($this->tbl_types)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tbl_types', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->tbl_types)); + { + foreach ($this->tbl_types as $iter730) + { + $xfer += $output->writeString($iter730); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_meta_result { + static $_TSPEC; + + /** + * @var \metastore\TableMeta[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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\TableMeta', + ), + ), + 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_table_meta_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(); + $_size731 = 0; + $_etype734 = 0; + $xfer += $input->readListBegin($_etype734, $_size731); + for ($_i735 = 0; $_i735 < $_size731; ++$_i735) + { + $elem736 = null; + $elem736 = new \metastore\TableMeta(); + $xfer += $elem736->read($input); + $this->success []= $elem736; + } + $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_table_meta_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 $iter737) + { + $xfer += $iter737->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_all_tables_args { + static $_TSPEC; + + /** + * @var string + */ + 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; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size738 = 0; + $_etype741 = 0; + $xfer += $input->readListBegin($_etype741, $_size738); + for ($_i742 = 0; $_i742 < $_size738; ++$_i742) + { + $elem743 = null; + $xfer += $input->readString($elem743); + $this->success []= $elem743; + } + $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 $iter744) + { + $xfer += $output->writeString($iter744); + } + } + $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; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + 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; + + /** + * @var \metastore\Table + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string[] + */ + 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(); + $_size745 = 0; + $_etype748 = 0; + $xfer += $input->readListBegin($_etype748, $_size745); + for ($_i749 = 0; $_i749 < $_size745; ++$_i749) + { + $elem750 = null; + $xfer += $input->readString($elem750); + $this->tbl_names []= $elem750; + } + $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 $iter751) + { + $xfer += $output->writeString($iter751); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_objects_by_name_result { + static $_TSPEC; + + /** + * @var \metastore\Table[] + */ + public $success = 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', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + 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(); + $_size752 = 0; + $_etype755 = 0; + $xfer += $input->readListBegin($_etype755, $_size752); + for ($_i756 = 0; $_i756 < $_size752; ++$_i756) + { + $elem757 = null; + $elem757 = new \metastore\Table(); + $xfer += $elem757->read($input); + $this->success []= $elem757; + } + $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_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 $iter758) + { + $xfer += $iter758->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_req_args { + static $_TSPEC; + + /** + * @var \metastore\GetTableRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetTableRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_req_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->req = new \metastore\GetTableRequest(); + $xfer += $this->req->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_req_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_req_result { + static $_TSPEC; + + /** + * @var \metastore\GetTableResult + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetTableResult', + ), + 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_req_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\GetTableResult(); + $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_req_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_req_args { + static $_TSPEC; + + /** + * @var \metastore\GetTablesRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetTablesRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_objects_by_name_req_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->req = new \metastore\GetTablesRequest(); + $xfer += $this->req->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_req_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_objects_by_name_req_result { + static $_TSPEC; + + /** + * @var \metastore\GetTablesResult + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\InvalidOperationException + */ + public $o2 = null; + /** + * @var \metastore\UnknownDBException + */ + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetTablesResult', + ), + 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_req_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\GetTablesResult(); + $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\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_req_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_get_table_names_by_filter_args { + static $_TSPEC; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $filter = null; + /** + * @var int + */ + 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; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\InvalidOperationException + */ + public $o2 = null; + /** + * @var \metastore\UnknownDBException + */ + 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(); + $_size759 = 0; + $_etype762 = 0; + $xfer += $input->readListBegin($_etype762, $_size759); + for ($_i763 = 0; $_i763 < $_size759; ++$_i763) + { + $elem764 = null; + $xfer += $input->readString($elem764); + $this->success []= $elem764; + } + $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 $iter765) + { + $xfer += $output->writeString($iter765); + } + } + $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; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var \metastore\Table + */ + 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; + + /** + * @var \metastore\InvalidOperationException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var \metastore\Table + */ + public $new_tbl = null; + /** + * @var \metastore\EnvironmentContext + */ + 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; + + /** + * @var \metastore\InvalidOperationException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_alter_table_with_cascade_args { + static $_TSPEC; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var \metastore\Table + */ + public $new_tbl = null; + /** + * @var bool + */ + public $cascade = 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' => 'cascade', + 'type' => TType::BOOL, + ), + ); + } + 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['cascade'])) { + $this->cascade = $vals['cascade']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_with_cascade_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::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_alter_table_with_cascade_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->cascade !== null) { + $xfer += $output->writeFieldBegin('cascade', TType::BOOL, 4); + $xfer += $output->writeBool($this->cascade); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_table_with_cascade_result { + static $_TSPEC; + + /** + * @var \metastore\InvalidOperationException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_cascade_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_cascade_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; + + /** + * @var \metastore\Partition + */ + 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; + + /** + * @var \metastore\Partition + */ + public $success = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o1 = null; + /** + * @var \metastore\AlreadyExistsException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var \metastore\Partition + */ + public $new_part = null; + /** + * @var \metastore\EnvironmentContext + */ + 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; + + /** + * @var \metastore\Partition + */ + public $success = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o1 = null; + /** + * @var \metastore\AlreadyExistsException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var \metastore\Partition[] + */ + 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(); + $_size766 = 0; + $_etype769 = 0; + $xfer += $input->readListBegin($_etype769, $_size766); + for ($_i770 = 0; $_i770 < $_size766; ++$_i770) + { + $elem771 = null; + $elem771 = new \metastore\Partition(); + $xfer += $elem771->read($input); + $this->new_parts []= $elem771; + } + $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 $iter772) + { + $xfer += $iter772->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partitions_result { + static $_TSPEC; + + /** + * @var int + */ + public $success = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o1 = null; + /** + * @var \metastore\AlreadyExistsException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + 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_add_partitions_pspec_args { + static $_TSPEC; + + /** + * @var \metastore\PartitionSpec[] + */ + 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\PartitionSpec', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_parts'])) { + $this->new_parts = $vals['new_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partitions_pspec_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(); + $_size773 = 0; + $_etype776 = 0; + $xfer += $input->readListBegin($_etype776, $_size773); + for ($_i777 = 0; $_i777 < $_size773; ++$_i777) + { + $elem778 = null; + $elem778 = new \metastore\PartitionSpec(); + $xfer += $elem778->read($input); + $this->new_parts []= $elem778; + } + $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_pspec_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 $iter779) + { + $xfer += $iter779->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partitions_pspec_result { + static $_TSPEC; + + /** + * @var int + */ + public $success = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o1 = null; + /** + * @var \metastore\AlreadyExistsException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + 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_pspec_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_pspec_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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string[] + */ + 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(); + $_size780 = 0; + $_etype783 = 0; + $xfer += $input->readListBegin($_etype783, $_size780); + for ($_i784 = 0; $_i784 < $_size780; ++$_i784) + { + $elem785 = null; + $xfer += $input->readString($elem785); + $this->part_vals []= $elem785; + } + $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 $iter786) + { + $xfer += $output->writeString($iter786); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_append_partition_result { + static $_TSPEC; + + /** + * @var \metastore\Partition + */ + public $success = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o1 = null; + /** + * @var \metastore\AlreadyExistsException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + 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_add_partitions_req_args { + static $_TSPEC; + + /** + * @var \metastore\AddPartitionsRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\AddPartitionsRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partitions_req_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->request = new \metastore\AddPartitionsRequest(); + $xfer += $this->request->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_req_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_partitions_req_result { + static $_TSPEC; + + /** + * @var \metastore\AddPartitionsResult + */ + public $success = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o1 = null; + /** + * @var \metastore\AlreadyExistsException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\AddPartitionsResult', + ), + 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_req_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\AddPartitionsResult(); + $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_partitions_req_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_with_environment_context_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string[] + */ + public $part_vals = null; + /** + * @var \metastore\EnvironmentContext + */ + 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' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 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['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_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::LST) { + $this->part_vals = array(); + $_size787 = 0; + $_etype790 = 0; + $xfer += $input->readListBegin($_etype790, $_size787); + for ($_i791 = 0; $_i791 < $_size787; ++$_i791) + { + $elem792 = null; + $xfer += $input->readString($elem792); + $this->part_vals []= $elem792; + } + $xfer += $input->readListEnd(); + } 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_append_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->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 $iter793) + { + $xfer += $output->writeString($iter793); + } + } + $output->writeListEnd(); + } + $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_append_partition_with_environment_context_result { + static $_TSPEC; + + /** + * @var \metastore\Partition + */ + public $success = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o1 = null; + /** + * @var \metastore\AlreadyExistsException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + 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_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_append_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_append_partition_by_name_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + 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; + + /** + * @var \metastore\Partition + */ + public $success = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o1 = null; + /** + * @var \metastore\AlreadyExistsException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + 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_append_partition_by_name_with_environment_context_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + public $part_name = null; + /** + * @var \metastore\EnvironmentContext + */ + 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' => 'part_name', + 'type' => TType::STRING, + ), + 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['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_by_name_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::STRING) { + $xfer += $input->readString($this->part_name); + } 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_append_partition_by_name_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->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $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_append_partition_by_name_with_environment_context_result { + static $_TSPEC; + + /** + * @var \metastore\Partition + */ + public $success = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o1 = null; + /** + * @var \metastore\AlreadyExistsException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + 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_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_append_partition_by_name_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_drop_partition_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string[] + */ + public $part_vals = null; + /** + * @var bool + */ + 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(); + $_size794 = 0; + $_etype797 = 0; + $xfer += $input->readListBegin($_etype797, $_size794); + for ($_i798 = 0; $_i798 < $_size794; ++$_i798) + { + $elem799 = null; + $xfer += $input->readString($elem799); + $this->part_vals []= $elem799; + } + $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 $iter800) + { + $xfer += $output->writeString($iter800); + } + } + $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; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_with_environment_context_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string[] + */ + public $part_vals = null; + /** + * @var bool + */ + public $deleteData = null; + /** + * @var \metastore\EnvironmentContext + */ + 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' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + 5 => 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['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_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::LST) { + $this->part_vals = array(); + $_size801 = 0; + $_etype804 = 0; + $xfer += $input->readListBegin($_etype804, $_size801); + for ($_i805 = 0; $_i805 < $_size801; ++$_i805) + { + $elem806 = null; + $xfer += $input->readString($elem806); + $this->part_vals []= $elem806; + } + $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; + case 5: + 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_drop_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->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 $iter807) + { + $xfer += $output->writeString($iter807); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $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, 5); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_partition_with_environment_context_result { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_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::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_with_environment_context_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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + public $part_name = null; + /** + * @var bool + */ + 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; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_drop_partition_by_name_with_environment_context_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + public $part_name = null; + /** + * @var bool + */ + public $deleteData = null; + /** + * @var \metastore\EnvironmentContext + */ + 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' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + 5 => 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['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_by_name_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::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; + case 5: + 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_drop_partition_by_name_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->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(); + } + 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, 5); + $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_partition_by_name_with_environment_context_result { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_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::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_with_environment_context_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_partitions_req_args { + static $_TSPEC; + + /** + * @var \metastore\DropPartitionsRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\DropPartitionsRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partitions_req_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->req = new \metastore\DropPartitionsRequest(); + $xfer += $this->req->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_partitions_req_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_partitions_req_result { + static $_TSPEC; + + /** + * @var \metastore\DropPartitionsResult + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\DropPartitionsResult', + ), + 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_partitions_req_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\DropPartitionsResult(); + $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_drop_partitions_req_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_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string[] + */ + 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(); + $_size808 = 0; + $_etype811 = 0; + $xfer += $input->readListBegin($_etype811, $_size808); + for ($_i812 = 0; $_i812 < $_size808; ++$_i812) + { + $elem813 = null; + $xfer += $input->readString($elem813); + $this->part_vals []= $elem813; + } + $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 $iter814) + { + $xfer += $output->writeString($iter814); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_result { + static $_TSPEC; + + /** + * @var \metastore\Partition + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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_exchange_partition_args { + static $_TSPEC; + + /** + * @var array + */ + public $partitionSpecs = null; + /** + * @var string + */ + public $source_db = null; + /** + * @var string + */ + public $source_table_name = null; + /** + * @var string + */ + public $dest_db = null; + /** + * @var string + */ + public $dest_table_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'partitionSpecs', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'source_db', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'source_table_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'dest_db', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'dest_table_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['partitionSpecs'])) { + $this->partitionSpecs = $vals['partitionSpecs']; + } + if (isset($vals['source_db'])) { + $this->source_db = $vals['source_db']; + } + if (isset($vals['source_table_name'])) { + $this->source_table_name = $vals['source_table_name']; + } + if (isset($vals['dest_db'])) { + $this->dest_db = $vals['dest_db']; + } + if (isset($vals['dest_table_name'])) { + $this->dest_table_name = $vals['dest_table_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_exchange_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::MAP) { + $this->partitionSpecs = array(); + $_size815 = 0; + $_ktype816 = 0; + $_vtype817 = 0; + $xfer += $input->readMapBegin($_ktype816, $_vtype817, $_size815); + for ($_i819 = 0; $_i819 < $_size815; ++$_i819) + { + $key820 = ''; + $val821 = ''; + $xfer += $input->readString($key820); + $xfer += $input->readString($val821); + $this->partitionSpecs[$key820] = $val821; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->source_db); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->source_table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dest_db); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dest_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_exchange_partition_args'); + if ($this->partitionSpecs !== null) { + if (!is_array($this->partitionSpecs)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitionSpecs', TType::MAP, 1); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->partitionSpecs)); + { + foreach ($this->partitionSpecs as $kiter822 => $viter823) + { + $xfer += $output->writeString($kiter822); + $xfer += $output->writeString($viter823); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->source_db !== null) { + $xfer += $output->writeFieldBegin('source_db', TType::STRING, 2); + $xfer += $output->writeString($this->source_db); + $xfer += $output->writeFieldEnd(); + } + if ($this->source_table_name !== null) { + $xfer += $output->writeFieldBegin('source_table_name', TType::STRING, 3); + $xfer += $output->writeString($this->source_table_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->dest_db !== null) { + $xfer += $output->writeFieldBegin('dest_db', TType::STRING, 4); + $xfer += $output->writeString($this->dest_db); + $xfer += $output->writeFieldEnd(); + } + if ($this->dest_table_name !== null) { + $xfer += $output->writeFieldBegin('dest_table_name', TType::STRING, 5); + $xfer += $output->writeString($this->dest_table_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_exchange_partition_result { + static $_TSPEC; + + /** + * @var \metastore\Partition + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o2 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o3 = null; + /** + * @var \metastore\InvalidInputException + */ + public $o4 = 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', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_exchange_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; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\InvalidObjectException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\InvalidInputException(); + $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_exchange_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(); + } + 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_exchange_partitions_args { + static $_TSPEC; + + /** + * @var array + */ + public $partitionSpecs = null; + /** + * @var string + */ + public $source_db = null; + /** + * @var string + */ + public $source_table_name = null; + /** + * @var string + */ + public $dest_db = null; + /** + * @var string + */ + public $dest_table_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'partitionSpecs', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'source_db', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'source_table_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'dest_db', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'dest_table_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['partitionSpecs'])) { + $this->partitionSpecs = $vals['partitionSpecs']; + } + if (isset($vals['source_db'])) { + $this->source_db = $vals['source_db']; + } + if (isset($vals['source_table_name'])) { + $this->source_table_name = $vals['source_table_name']; + } + if (isset($vals['dest_db'])) { + $this->dest_db = $vals['dest_db']; + } + if (isset($vals['dest_table_name'])) { + $this->dest_table_name = $vals['dest_table_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_exchange_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::MAP) { + $this->partitionSpecs = array(); + $_size824 = 0; + $_ktype825 = 0; + $_vtype826 = 0; + $xfer += $input->readMapBegin($_ktype825, $_vtype826, $_size824); + for ($_i828 = 0; $_i828 < $_size824; ++$_i828) + { + $key829 = ''; + $val830 = ''; + $xfer += $input->readString($key829); + $xfer += $input->readString($val830); + $this->partitionSpecs[$key829] = $val830; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->source_db); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->source_table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dest_db); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dest_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_exchange_partitions_args'); + if ($this->partitionSpecs !== null) { + if (!is_array($this->partitionSpecs)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitionSpecs', TType::MAP, 1); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->partitionSpecs)); + { + foreach ($this->partitionSpecs as $kiter831 => $viter832) + { + $xfer += $output->writeString($kiter831); + $xfer += $output->writeString($viter832); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->source_db !== null) { + $xfer += $output->writeFieldBegin('source_db', TType::STRING, 2); + $xfer += $output->writeString($this->source_db); + $xfer += $output->writeFieldEnd(); + } + if ($this->source_table_name !== null) { + $xfer += $output->writeFieldBegin('source_table_name', TType::STRING, 3); + $xfer += $output->writeString($this->source_table_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->dest_db !== null) { + $xfer += $output->writeFieldBegin('dest_db', TType::STRING, 4); + $xfer += $output->writeString($this->dest_db); + $xfer += $output->writeFieldEnd(); + } + if ($this->dest_table_name !== null) { + $xfer += $output->writeFieldBegin('dest_table_name', TType::STRING, 5); + $xfer += $output->writeString($this->dest_table_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_exchange_partitions_result { + static $_TSPEC; + + /** + * @var \metastore\Partition[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o2 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o3 = null; + /** + * @var \metastore\InvalidInputException + */ + public $o4 = 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', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_exchange_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(); + $_size833 = 0; + $_etype836 = 0; + $xfer += $input->readListBegin($_etype836, $_size833); + for ($_i837 = 0; $_i837 < $_size833; ++$_i837) + { + $elem838 = null; + $elem838 = new \metastore\Partition(); + $xfer += $elem838->read($input); + $this->success []= $elem838; + } + $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; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\InvalidObjectException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\InvalidInputException(); + $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_exchange_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 $iter839) + { + $xfer += $iter839->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(); + } + 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_get_partition_with_auth_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string[] + */ + public $part_vals = null; + /** + * @var string + */ + public $user_name = null; + /** + * @var string[] + */ + 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(); + $_size840 = 0; + $_etype843 = 0; + $xfer += $input->readListBegin($_etype843, $_size840); + for ($_i844 = 0; $_i844 < $_size840; ++$_i844) + { + $elem845 = null; + $xfer += $input->readString($elem845); + $this->part_vals []= $elem845; + } + $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(); + $_size846 = 0; + $_etype849 = 0; + $xfer += $input->readListBegin($_etype849, $_size846); + for ($_i850 = 0; $_i850 < $_size846; ++$_i850) + { + $elem851 = null; + $xfer += $input->readString($elem851); + $this->group_names []= $elem851; + } + $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 $iter852) + { + $xfer += $output->writeString($iter852); + } + } + $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 $iter853) + { + $xfer += $output->writeString($iter853); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_with_auth_result { + static $_TSPEC; + + /** + * @var \metastore\Partition + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + 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; + + /** + * @var \metastore\Partition + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var int + */ + 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; + + /** + * @var \metastore\Partition[] + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size854 = 0; + $_etype857 = 0; + $xfer += $input->readListBegin($_etype857, $_size854); + for ($_i858 = 0; $_i858 < $_size854; ++$_i858) + { + $elem859 = null; + $elem859 = new \metastore\Partition(); + $xfer += $elem859->read($input); + $this->success []= $elem859; + } + $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 $iter860) + { + $xfer += $iter860->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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var int + */ + public $max_parts = -1; + /** + * @var string + */ + public $user_name = null; + /** + * @var string[] + */ + 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(); + $_size861 = 0; + $_etype864 = 0; + $xfer += $input->readListBegin($_etype864, $_size861); + for ($_i865 = 0; $_i865 < $_size861; ++$_i865) + { + $elem866 = null; + $xfer += $input->readString($elem866); + $this->group_names []= $elem866; + } + $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 $iter867) + { + $xfer += $output->writeString($iter867); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_with_auth_result { + static $_TSPEC; + + /** + * @var \metastore\Partition[] + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size868 = 0; + $_etype871 = 0; + $xfer += $input->readListBegin($_etype871, $_size868); + for ($_i872 = 0; $_i872 < $_size868; ++$_i872) + { + $elem873 = null; + $elem873 = new \metastore\Partition(); + $xfer += $elem873->read($input); + $this->success []= $elem873; + } + $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 $iter874) + { + $xfer += $iter874->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_pspec_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var int + */ + 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::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['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_pspec_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::I32) { + $xfer += $input->readI32($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_pspec_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::I32, 3); + $xfer += $output->writeI32($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_pspec_result { + static $_TSPEC; + + /** + * @var \metastore\PartitionSpec[] + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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\PartitionSpec', + ), + ), + 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_pspec_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(); + $_size875 = 0; + $_etype878 = 0; + $xfer += $input->readListBegin($_etype878, $_size875); + for ($_i879 = 0; $_i879 < $_size875; ++$_i879) + { + $elem880 = null; + $elem880 = new \metastore\PartitionSpec(); + $xfer += $elem880->read($input); + $this->success []= $elem880; + } + $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_pspec_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 $iter881) + { + $xfer += $iter881->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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var int + */ + 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; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size882 = 0; + $_etype885 = 0; + $xfer += $input->readListBegin($_etype885, $_size882); + for ($_i886 = 0; $_i886 < $_size882; ++$_i886) + { + $elem887 = null; + $xfer += $input->readString($elem887); + $this->success []= $elem887; + } + $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 $iter888) + { + $xfer += $output->writeString($iter888); + } + } + $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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string[] + */ + public $part_vals = null; + /** + * @var int + */ + 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(); + $_size889 = 0; + $_etype892 = 0; + $xfer += $input->readListBegin($_etype892, $_size889); + for ($_i893 = 0; $_i893 < $_size889; ++$_i893) + { + $elem894 = null; + $xfer += $input->readString($elem894); + $this->part_vals []= $elem894; + } + $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 $iter895) + { + $xfer += $output->writeString($iter895); + } + } + $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; + + /** + * @var \metastore\Partition[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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(); + $_size896 = 0; + $_etype899 = 0; + $xfer += $input->readListBegin($_etype899, $_size896); + for ($_i900 = 0; $_i900 < $_size896; ++$_i900) + { + $elem901 = null; + $elem901 = new \metastore\Partition(); + $xfer += $elem901->read($input); + $this->success []= $elem901; + } + $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 $iter902) + { + $xfer += $iter902->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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string[] + */ + public $part_vals = null; + /** + * @var int + */ + public $max_parts = -1; + /** + * @var string + */ + public $user_name = null; + /** + * @var string[] + */ + 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(); + $_size903 = 0; + $_etype906 = 0; + $xfer += $input->readListBegin($_etype906, $_size903); + for ($_i907 = 0; $_i907 < $_size903; ++$_i907) + { + $elem908 = null; + $xfer += $input->readString($elem908); + $this->part_vals []= $elem908; + } + $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(); + $_size909 = 0; + $_etype912 = 0; + $xfer += $input->readListBegin($_etype912, $_size909); + for ($_i913 = 0; $_i913 < $_size909; ++$_i913) + { + $elem914 = null; + $xfer += $input->readString($elem914); + $this->group_names []= $elem914; + } + $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 $iter915) + { + $xfer += $output->writeString($iter915); + } + } + $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 $iter916) + { + $xfer += $output->writeString($iter916); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_ps_with_auth_result { + static $_TSPEC; + + /** + * @var \metastore\Partition[] + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size917 = 0; + $_etype920 = 0; + $xfer += $input->readListBegin($_etype920, $_size917); + for ($_i921 = 0; $_i921 < $_size917; ++$_i921) + { + $elem922 = null; + $elem922 = new \metastore\Partition(); + $xfer += $elem922->read($input); + $this->success []= $elem922; + } + $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 $iter923) + { + $xfer += $iter923->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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string[] + */ + public $part_vals = null; + /** + * @var int + */ + 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(); + $_size924 = 0; + $_etype927 = 0; + $xfer += $input->readListBegin($_etype927, $_size924); + for ($_i928 = 0; $_i928 < $_size924; ++$_i928) + { + $elem929 = null; + $xfer += $input->readString($elem929); + $this->part_vals []= $elem929; + } + $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 $iter930) + { + $xfer += $output->writeString($iter930); + } + } + $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; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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(); + $_size931 = 0; + $_etype934 = 0; + $xfer += $input->readListBegin($_etype934, $_size931); + for ($_i935 = 0; $_i935 < $_size931; ++$_i935) + { + $elem936 = null; + $xfer += $input->readString($elem936); + $this->success []= $elem936; + } + $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 $iter937) + { + $xfer += $output->writeString($iter937); + } + } + $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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + public $filter = null; + /** + * @var int + */ + 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; + + /** + * @var \metastore\Partition[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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(); + $_size938 = 0; + $_etype941 = 0; + $xfer += $input->readListBegin($_etype941, $_size938); + for ($_i942 = 0; $_i942 < $_size938; ++$_i942) + { + $elem943 = null; + $elem943 = new \metastore\Partition(); + $xfer += $elem943->read($input); + $this->success []= $elem943; + } + $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 $iter944) + { + $xfer += $iter944->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_part_specs_by_filter_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + public $filter = null; + /** + * @var int + */ + 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::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['filter'])) { + $this->filter = $vals['filter']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_part_specs_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::I32) { + $xfer += $input->readI32($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_part_specs_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::I32, 4); + $xfer += $output->writeI32($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_part_specs_by_filter_result { + static $_TSPEC; + + /** + * @var \metastore\PartitionSpec[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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\PartitionSpec', + ), + ), + 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_part_specs_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(); + $_size945 = 0; + $_etype948 = 0; + $xfer += $input->readListBegin($_etype948, $_size945); + for ($_i949 = 0; $_i949 < $_size945; ++$_i949) + { + $elem950 = null; + $elem950 = new \metastore\PartitionSpec(); + $xfer += $elem950->read($input); + $this->success []= $elem950; + } + $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_part_specs_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 $iter951) + { + $xfer += $iter951->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_expr_args { + static $_TSPEC; + + /** + * @var \metastore\PartitionsByExprRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\PartitionsByExprRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_by_expr_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->req = new \metastore\PartitionsByExprRequest(); + $xfer += $this->req->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_expr_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_by_expr_result { + static $_TSPEC; + + /** + * @var \metastore\PartitionsByExprResult + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\PartitionsByExprResult', + ), + 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_expr_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\PartitionsByExprResult(); + $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_partitions_by_expr_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_num_partitions_by_filter_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + public $filter = 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' => 'filter', + '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['filter'])) { + $this->filter = $vals['filter']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_num_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; + 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_num_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_num_partitions_by_filter_result { + static $_TSPEC; + + /** + * @var int + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o2 = 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\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_num_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::I32) { + $xfer += $input->readI32($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_get_num_partitions_by_filter_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_by_names_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string[] + */ + 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(); + $_size952 = 0; + $_etype955 = 0; + $xfer += $input->readListBegin($_etype955, $_size952); + for ($_i956 = 0; $_i956 < $_size952; ++$_i956) + { + $elem957 = null; + $xfer += $input->readString($elem957); + $this->names []= $elem957; + } + $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 $iter958) + { + $xfer += $output->writeString($iter958); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_by_names_result { + static $_TSPEC; + + /** + * @var \metastore\Partition[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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(); + $_size959 = 0; + $_etype962 = 0; + $xfer += $input->readListBegin($_etype962, $_size959); + for ($_i963 = 0; $_i963 < $_size959; ++$_i963) + { + $elem964 = null; + $elem964 = new \metastore\Partition(); + $xfer += $elem964->read($input); + $this->success []= $elem964; + } + $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 $iter965) + { + $xfer += $iter965->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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var \metastore\Partition + */ + 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; + + /** + * @var \metastore\InvalidOperationException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var \metastore\Partition[] + */ + 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(); + $_size966 = 0; + $_etype969 = 0; + $xfer += $input->readListBegin($_etype969, $_size966); + for ($_i970 = 0; $_i970 < $_size966; ++$_i970) + { + $elem971 = null; + $elem971 = new \metastore\Partition(); + $xfer += $elem971->read($input); + $this->new_parts []= $elem971; + } + $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 $iter972) + { + $xfer += $iter972->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_partitions_result { + static $_TSPEC; + + /** + * @var \metastore\InvalidOperationException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_partitions_with_environment_context_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var \metastore\Partition[] + */ + public $new_parts = null; + /** + * @var \metastore\EnvironmentContext + */ + 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_parts', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + '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_parts'])) { + $this->new_parts = $vals['new_parts']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partitions_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::LST) { + $this->new_parts = array(); + $_size973 = 0; + $_etype976 = 0; + $xfer += $input->readListBegin($_etype976, $_size973); + for ($_i977 = 0; $_i977 < $_size973; ++$_i977) + { + $elem978 = null; + $elem978 = new \metastore\Partition(); + $xfer += $elem978->read($input); + $this->new_parts []= $elem978; + } + $xfer += $input->readListEnd(); + } 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_partitions_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_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 $iter979) + { + $xfer += $iter979->write($output); + } + } + $output->writeListEnd(); + } + $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_partitions_with_environment_context_result { + static $_TSPEC; + + /** + * @var \metastore\InvalidOperationException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_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_partitions_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_alter_partition_with_environment_context_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var \metastore\Partition + */ + public $new_part = null; + /** + * @var \metastore\EnvironmentContext + */ + 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; + + /** + * @var \metastore\InvalidOperationException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string[] + */ + public $part_vals = null; + /** + * @var \metastore\Partition + */ + 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(); + $_size980 = 0; + $_etype983 = 0; + $xfer += $input->readListBegin($_etype983, $_size980); + for ($_i984 = 0; $_i984 < $_size980; ++$_i984) + { + $elem985 = null; + $xfer += $input->readString($elem985); + $this->part_vals []= $elem985; + } + $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 $iter986) + { + $xfer += $output->writeString($iter986); + } + } + $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; + + /** + * @var \metastore\InvalidOperationException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_partition_name_has_valid_characters_args { + static $_TSPEC; + + /** + * @var string[] + */ + public $part_vals = null; + /** + * @var bool + */ + public $throw_exception = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'throw_exception', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['throw_exception'])) { + $this->throw_exception = $vals['throw_exception']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_partition_name_has_valid_characters_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->part_vals = array(); + $_size987 = 0; + $_etype990 = 0; + $xfer += $input->readListBegin($_etype990, $_size987); + for ($_i991 = 0; $_i991 < $_size987; ++$_i991) + { + $elem992 = null; + $xfer += $input->readString($elem992); + $this->part_vals []= $elem992; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->throw_exception); + } 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_has_valid_characters_args'); + 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, 1); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter993) + { + $xfer += $output->writeString($iter993); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->throw_exception !== null) { + $xfer += $output->writeFieldBegin('throw_exception', TType::BOOL, 2); + $xfer += $output->writeBool($this->throw_exception); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_partition_name_has_valid_characters_result { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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_partition_name_has_valid_characters_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_partition_name_has_valid_characters_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_config_value_args { + static $_TSPEC; + + /** + * @var string + */ + public $name = null; + /** + * @var string + */ + 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; + + /** + * @var string + */ + public $success = null; + /** + * @var \metastore\ConfigValSecurityException + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size994 = 0; + $_etype997 = 0; + $xfer += $input->readListBegin($_etype997, $_size994); + for ($_i998 = 0; $_i998 < $_size994; ++$_i998) + { + $elem999 = null; + $xfer += $input->readString($elem999); + $this->success []= $elem999; + } + $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 $iter1000) + { + $xfer += $output->writeString($iter1000); + } + } + $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; + + /** + * @var string + */ + 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; + + /** + * @var array + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size1001 = 0; + $_ktype1002 = 0; + $_vtype1003 = 0; + $xfer += $input->readMapBegin($_ktype1002, $_vtype1003, $_size1001); + for ($_i1005 = 0; $_i1005 < $_size1001; ++$_i1005) + { + $key1006 = ''; + $val1007 = ''; + $xfer += $input->readString($key1006); + $xfer += $input->readString($val1007); + $this->success[$key1006] = $val1007; + } + $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 $kiter1008 => $viter1009) + { + $xfer += $output->writeString($kiter1008); + $xfer += $output->writeString($viter1009); + } + } + $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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var array + */ + public $part_vals = null; + /** + * @var int + */ + 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(); + $_size1010 = 0; + $_ktype1011 = 0; + $_vtype1012 = 0; + $xfer += $input->readMapBegin($_ktype1011, $_vtype1012, $_size1010); + for ($_i1014 = 0; $_i1014 < $_size1010; ++$_i1014) + { + $key1015 = ''; + $val1016 = ''; + $xfer += $input->readString($key1015); + $xfer += $input->readString($val1016); + $this->part_vals[$key1015] = $val1016; + } + $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 $kiter1017 => $viter1018) + { + $xfer += $output->writeString($kiter1017); + $xfer += $output->writeString($viter1018); + } + } + $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; + + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o2 = null; + /** + * @var \metastore\UnknownDBException + */ + public $o3 = null; + /** + * @var \metastore\UnknownTableException + */ + public $o4 = null; + /** + * @var \metastore\UnknownPartitionException + */ + public $o5 = null; + /** + * @var \metastore\InvalidPartitionException + */ + 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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var array + */ + public $part_vals = null; + /** + * @var int + */ + 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(); + $_size1019 = 0; + $_ktype1020 = 0; + $_vtype1021 = 0; + $xfer += $input->readMapBegin($_ktype1020, $_vtype1021, $_size1019); + for ($_i1023 = 0; $_i1023 < $_size1019; ++$_i1023) + { + $key1024 = ''; + $val1025 = ''; + $xfer += $input->readString($key1024); + $xfer += $input->readString($val1025); + $this->part_vals[$key1024] = $val1025; + } + $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 $kiter1026 => $viter1027) + { + $xfer += $output->writeString($kiter1026); + $xfer += $output->writeString($viter1027); + } + } + $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; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o2 = null; + /** + * @var \metastore\UnknownDBException + */ + public $o3 = null; + /** + * @var \metastore\UnknownTableException + */ + public $o4 = null; + /** + * @var \metastore\UnknownPartitionException + */ + public $o5 = null; + /** + * @var \metastore\InvalidPartitionException + */ + 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; + + /** + * @var \metastore\Index + */ + public $new_index = null; + /** + * @var \metastore\Table + */ + 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; + + /** + * @var \metastore\Index + */ + public $success = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o1 = null; + /** + * @var \metastore\AlreadyExistsException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $base_tbl_name = null; + /** + * @var string + */ + public $idx_name = null; + /** + * @var \metastore\Index + */ + 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; + + /** + * @var \metastore\InvalidOperationException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + public $index_name = null; + /** + * @var bool + */ + 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; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + 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; + + /** + * @var \metastore\Index + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var int + */ + 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; + + /** + * @var \metastore\Index[] + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size1028 = 0; + $_etype1031 = 0; + $xfer += $input->readListBegin($_etype1031, $_size1028); + for ($_i1032 = 0; $_i1032 < $_size1028; ++$_i1032) + { + $elem1033 = null; + $elem1033 = new \metastore\Index(); + $xfer += $elem1033->read($input); + $this->success []= $elem1033; + } + $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 $iter1034) + { + $xfer += $iter1034->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; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var int + */ + 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; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size1035 = 0; + $_etype1038 = 0; + $xfer += $input->readListBegin($_etype1038, $_size1035); + for ($_i1039 = 0; $_i1039 < $_size1035; ++$_i1039) + { + $elem1040 = null; + $xfer += $input->readString($elem1040); + $this->success []= $elem1040; + } + $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 $iter1041) + { + $xfer += $output->writeString($iter1041); + } + } + $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_primary_keys_args { + static $_TSPEC; + + /** + * @var \metastore\PrimaryKeysRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrimaryKeysRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_primary_keys_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->request = new \metastore\PrimaryKeysRequest(); + $xfer += $this->request->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_primary_keys_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_primary_keys_result { + static $_TSPEC; + + /** + * @var \metastore\PrimaryKeysResponse + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrimaryKeysResponse', + ), + 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_primary_keys_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\PrimaryKeysResponse(); + $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_primary_keys_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_foreign_keys_args { + static $_TSPEC; + + /** + * @var \metastore\ForeignKeysRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\ForeignKeysRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_foreign_keys_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->request = new \metastore\ForeignKeysRequest(); + $xfer += $this->request->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_foreign_keys_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_foreign_keys_result { + static $_TSPEC; + + /** + * @var \metastore\ForeignKeysResponse + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\ForeignKeysResponse', + ), + 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_foreign_keys_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\ForeignKeysResponse(); + $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_foreign_keys_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_unique_constraints_args { + static $_TSPEC; + + /** + * @var \metastore\UniqueConstraintsRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\UniqueConstraintsRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_unique_constraints_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->request = new \metastore\UniqueConstraintsRequest(); + $xfer += $this->request->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_unique_constraints_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_unique_constraints_result { + static $_TSPEC; + + /** + * @var \metastore\UniqueConstraintsResponse + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\UniqueConstraintsResponse', + ), + 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_unique_constraints_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\UniqueConstraintsResponse(); + $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_unique_constraints_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_not_null_constraints_args { + static $_TSPEC; + + /** + * @var \metastore\NotNullConstraintsRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\NotNullConstraintsRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_not_null_constraints_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->request = new \metastore\NotNullConstraintsRequest(); + $xfer += $this->request->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_not_null_constraints_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_not_null_constraints_result { + static $_TSPEC; + + /** + * @var \metastore\NotNullConstraintsResponse + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\NotNullConstraintsResponse', + ), + 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_not_null_constraints_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\NotNullConstraintsResponse(); + $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_not_null_constraints_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_update_table_column_statistics_args { + static $_TSPEC; + + /** + * @var \metastore\ColumnStatistics + */ + public $stats_obj = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'stats_obj', + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatistics', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['stats_obj'])) { + $this->stats_obj = $vals['stats_obj']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_update_table_column_statistics_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->stats_obj = new \metastore\ColumnStatistics(); + $xfer += $this->stats_obj->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_update_table_column_statistics_args'); + if ($this->stats_obj !== null) { + if (!is_object($this->stats_obj)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stats_obj', TType::STRUCT, 1); + $xfer += $this->stats_obj->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_update_table_column_statistics_result { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + public $o3 = null; + /** + * @var \metastore\InvalidInputException + */ + public $o4 = 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\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_update_table_column_statistics_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\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\InvalidInputException(); + $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_update_table_column_statistics_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_update_partition_column_statistics_args { + static $_TSPEC; + + /** + * @var \metastore\ColumnStatistics + */ + public $stats_obj = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'stats_obj', + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatistics', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['stats_obj'])) { + $this->stats_obj = $vals['stats_obj']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_update_partition_column_statistics_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->stats_obj = new \metastore\ColumnStatistics(); + $xfer += $this->stats_obj->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_update_partition_column_statistics_args'); + if ($this->stats_obj !== null) { + if (!is_object($this->stats_obj)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stats_obj', TType::STRUCT, 1); + $xfer += $this->stats_obj->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_update_partition_column_statistics_result { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + public $o3 = null; + /** + * @var \metastore\InvalidInputException + */ + public $o4 = 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\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_update_partition_column_statistics_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\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\InvalidInputException(); + $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_update_partition_column_statistics_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_column_statistics_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + public $col_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' => 'col_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['col_name'])) { + $this->col_name = $vals['col_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_column_statistics_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->col_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_column_statistics_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->col_name !== null) { + $xfer += $output->writeFieldBegin('col_name', TType::STRING, 3); + $xfer += $output->writeString($this->col_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_column_statistics_result { + static $_TSPEC; + + /** + * @var \metastore\ColumnStatistics + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = null; + /** + * @var \metastore\InvalidInputException + */ + public $o3 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatistics', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_column_statistics_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\ColumnStatistics(); + $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; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\InvalidInputException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\InvalidObjectException(); + $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_get_table_column_statistics_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(); + } + 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_get_partition_column_statistics_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + public $part_name = null; + /** + * @var string + */ + public $col_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, + ), + 4 => array( + 'var' => 'col_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']; + } + if (isset($vals['col_name'])) { + $this->col_name = $vals['col_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_column_statistics_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::STRING) { + $xfer += $input->readString($this->col_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_column_statistics_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->col_name !== null) { + $xfer += $output->writeFieldBegin('col_name', TType::STRING, 4); + $xfer += $output->writeString($this->col_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partition_column_statistics_result { + static $_TSPEC; + + /** + * @var \metastore\ColumnStatistics + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = null; + /** + * @var \metastore\InvalidInputException + */ + public $o3 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatistics', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_column_statistics_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\ColumnStatistics(); + $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; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\InvalidInputException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\InvalidObjectException(); + $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_get_partition_column_statistics_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(); + } + 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_get_table_statistics_req_args { + static $_TSPEC; + + /** + * @var \metastore\TableStatsRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\TableStatsRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_statistics_req_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->request = new \metastore\TableStatsRequest(); + $xfer += $this->request->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_statistics_req_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_table_statistics_req_result { + static $_TSPEC; + + /** + * @var \metastore\TableStatsResult + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\TableStatsResult', + ), + 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_table_statistics_req_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\TableStatsResult(); + $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_table_statistics_req_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_statistics_req_args { + static $_TSPEC; + + /** + * @var \metastore\PartitionsStatsRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\PartitionsStatsRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_statistics_req_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->request = new \metastore\PartitionsStatsRequest(); + $xfer += $this->request->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_statistics_req_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_partitions_statistics_req_result { + static $_TSPEC; + + /** + * @var \metastore\PartitionsStatsResult + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\PartitionsStatsResult', + ), + 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_statistics_req_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\PartitionsStatsResult(); + $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_partitions_statistics_req_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_aggr_stats_for_args { + static $_TSPEC; + + /** + * @var \metastore\PartitionsStatsRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\PartitionsStatsRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_aggr_stats_for_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->request = new \metastore\PartitionsStatsRequest(); + $xfer += $this->request->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_aggr_stats_for_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_aggr_stats_for_result { + static $_TSPEC; + + /** + * @var \metastore\AggrStats + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\AggrStats', + ), + 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_aggr_stats_for_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\AggrStats(); + $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_aggr_stats_for_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_set_aggr_stats_for_args { + static $_TSPEC; + + /** + * @var \metastore\SetPartitionsStatsRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\SetPartitionsStatsRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_set_aggr_stats_for_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->request = new \metastore\SetPartitionsStatsRequest(); + $xfer += $this->request->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_aggr_stats_for_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_set_aggr_stats_for_result { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + public $o3 = null; + /** + * @var \metastore\InvalidInputException + */ + public $o4 = 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\InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_set_aggr_stats_for_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\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\InvalidInputException(); + $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_set_aggr_stats_for_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_delete_partition_column_statistics_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + public $part_name = null; + /** + * @var string + */ + public $col_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, + ), + 4 => array( + 'var' => 'col_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']; + } + if (isset($vals['col_name'])) { + $this->col_name = $vals['col_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_delete_partition_column_statistics_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::STRING) { + $xfer += $input->readString($this->col_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_delete_partition_column_statistics_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->col_name !== null) { + $xfer += $output->writeFieldBegin('col_name', TType::STRING, 4); + $xfer += $output->writeString($this->col_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_delete_partition_column_statistics_result { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o3 = null; + /** + * @var \metastore\InvalidInputException + */ + public $o4 = 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', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_delete_partition_column_statistics_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; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\InvalidObjectException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\InvalidInputException(); + $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_delete_partition_column_statistics_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_delete_table_column_statistics_args { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_name = null; + /** + * @var string + */ + public $col_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' => 'col_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['col_name'])) { + $this->col_name = $vals['col_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_delete_table_column_statistics_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->col_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_delete_table_column_statistics_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->col_name !== null) { + $xfer += $output->writeFieldBegin('col_name', TType::STRING, 3); + $xfer += $output->writeString($this->col_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_delete_table_column_statistics_result { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o3 = null; + /** + * @var \metastore\InvalidInputException + */ + public $o4 = 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', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidObjectException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => '\metastore\InvalidInputException', + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_delete_table_column_statistics_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; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\InvalidObjectException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new \metastore\InvalidInputException(); + $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_delete_table_column_statistics_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_function_args { + static $_TSPEC; + + /** + * @var \metastore\Function + */ + public $func = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'func', + 'type' => TType::STRUCT, + 'class' => '\metastore\Function', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['func'])) { + $this->func = $vals['func']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_function_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->func = new \metastore\Function(); + $xfer += $this->func->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_function_args'); + if ($this->func !== null) { + if (!is_object($this->func)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('func', TType::STRUCT, 1); + $xfer += $this->func->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_function_result { + static $_TSPEC; + + /** + * @var \metastore\AlreadyExistsException + */ + public $o1 = null; + /** + * @var \metastore\InvalidObjectException + */ + public $o2 = null; + /** + * @var \metastore\MetaException + */ + public $o3 = null; + /** + * @var \metastore\NoSuchObjectException + */ + 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_function_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_function_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_function_args { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $funcName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'funcName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['funcName'])) { + $this->funcName = $vals['funcName']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_function_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->funcName); + } 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_function_args'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->funcName !== null) { + $xfer += $output->writeFieldBegin('funcName', TType::STRING, 2); + $xfer += $output->writeString($this->funcName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_function_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_function_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_function_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_alter_function_args { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $funcName = null; + /** + * @var \metastore\Function + */ + public $newFunc = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'funcName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'newFunc', + 'type' => TType::STRUCT, + 'class' => '\metastore\Function', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['funcName'])) { + $this->funcName = $vals['funcName']; + } + if (isset($vals['newFunc'])) { + $this->newFunc = $vals['newFunc']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_function_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->funcName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->newFunc = new \metastore\Function(); + $xfer += $this->newFunc->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_function_args'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->funcName !== null) { + $xfer += $output->writeFieldBegin('funcName', TType::STRING, 2); + $xfer += $output->writeString($this->funcName); + $xfer += $output->writeFieldEnd(); + } + if ($this->newFunc !== null) { + if (!is_object($this->newFunc)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('newFunc', TType::STRUCT, 3); + $xfer += $this->newFunc->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_function_result { + static $_TSPEC; + + /** + * @var \metastore\InvalidOperationException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + 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_function_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_function_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_functions_args { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $pattern = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'pattern', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_functions_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->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_functions_args'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $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_functions_result { + static $_TSPEC; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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_functions_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(); + $_size1042 = 0; + $_etype1045 = 0; + $xfer += $input->readListBegin($_etype1045, $_size1042); + for ($_i1046 = 0; $_i1046 < $_size1042; ++$_i1046) + { + $elem1047 = null; + $xfer += $input->readString($elem1047); + $this->success []= $elem1047; + } + $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_functions_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 $iter1048) + { + $xfer += $output->writeString($iter1048); + } + } + $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_function_args { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $funcName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'funcName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['funcName'])) { + $this->funcName = $vals['funcName']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_function_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->funcName); + } 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_function_args'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->funcName !== null) { + $xfer += $output->writeFieldBegin('funcName', TType::STRING, 2); + $xfer += $output->writeString($this->funcName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_function_result { + static $_TSPEC; + + /** + * @var \metastore\Function + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchObjectException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\Function', + ), + 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_function_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\Function(); + $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_function_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_all_functions_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_functions_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_functions_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_functions_result { + static $_TSPEC; + + /** + * @var \metastore\GetAllFunctionsResponse + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetAllFunctionsResponse', + ), + 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_functions_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\GetAllFunctionsResponse(); + $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_all_functions_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_create_role_args { + static $_TSPEC; + + /** + * @var \metastore\Role + */ + 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; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size1049 = 0; + $_etype1052 = 0; + $xfer += $input->readListBegin($_etype1052, $_size1049); + for ($_i1053 = 0; $_i1053 < $_size1049; ++$_i1053) + { + $elem1054 = null; + $xfer += $input->readString($elem1054); + $this->success []= $elem1054; + } + $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 $iter1055) + { + $xfer += $output->writeString($iter1055); + } + } + $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; + + /** + * @var string + */ + public $role_name = null; + /** + * @var string + */ + public $principal_name = null; + /** + * @var int + */ + public $principal_type = null; + /** + * @var string + */ + public $grantor = null; + /** + * @var int + */ + public $grantorType = null; + /** + * @var bool + */ + 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; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + public $role_name = null; + /** + * @var string + */ + public $principal_name = null; + /** + * @var int + */ + 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; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + public $principal_name = null; + /** + * @var int + */ + 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; + + /** + * @var \metastore\Role[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size1056 = 0; + $_etype1059 = 0; + $xfer += $input->readListBegin($_etype1059, $_size1056); + for ($_i1060 = 0; $_i1060 < $_size1056; ++$_i1060) + { + $elem1061 = null; + $elem1061 = new \metastore\Role(); + $xfer += $elem1061->read($input); + $this->success []= $elem1061; + } + $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 $iter1062) + { + $xfer += $iter1062->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_revoke_role_args { + static $_TSPEC; + + /** + * @var \metastore\GrantRevokeRoleRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\GrantRevokeRoleRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_grant_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::STRUCT) { + $this->request = new \metastore\GrantRevokeRoleRequest(); + $xfer += $this->request->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_revoke_role_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_grant_revoke_role_result { + static $_TSPEC; + + /** + * @var \metastore\GrantRevokeRoleResponse + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\GrantRevokeRoleResponse', + ), + 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_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::STRUCT) { + $this->success = new \metastore\GrantRevokeRoleResponse(); + $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_grant_revoke_role_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_get_principals_in_role_args { + static $_TSPEC; + + /** + * @var \metastore\GetPrincipalsInRoleRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetPrincipalsInRoleRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_principals_in_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->request = new \metastore\GetPrincipalsInRoleRequest(); + $xfer += $this->request->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_principals_in_role_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_principals_in_role_result { + static $_TSPEC; + + /** + * @var \metastore\GetPrincipalsInRoleResponse + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetPrincipalsInRoleResponse', + ), + 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_principals_in_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::STRUCT) { + $this->success = new \metastore\GetPrincipalsInRoleResponse(); + $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_principals_in_role_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_get_role_grants_for_principal_args { + static $_TSPEC; + + /** + * @var \metastore\GetRoleGrantsForPrincipalRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetRoleGrantsForPrincipalRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_role_grants_for_principal_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->request = new \metastore\GetRoleGrantsForPrincipalRequest(); + $xfer += $this->request->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_grants_for_principal_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_role_grants_for_principal_result { + static $_TSPEC; + + /** + * @var \metastore\GetRoleGrantsForPrincipalResponse + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetRoleGrantsForPrincipalResponse', + ), + 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_grants_for_principal_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\GetRoleGrantsForPrincipalResponse(); + $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_role_grants_for_principal_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_get_privilege_set_args { + static $_TSPEC; + + /** + * @var \metastore\HiveObjectRef + */ + public $hiveObject = null; + /** + * @var string + */ + public $user_name = null; + /** + * @var string[] + */ + 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(); + $_size1063 = 0; + $_etype1066 = 0; + $xfer += $input->readListBegin($_etype1066, $_size1063); + for ($_i1067 = 0; $_i1067 < $_size1063; ++$_i1067) + { + $elem1068 = null; + $xfer += $input->readString($elem1068); + $this->group_names []= $elem1068; + } + $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 $iter1069) + { + $xfer += $output->writeString($iter1069); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_privilege_set_result { + static $_TSPEC; + + /** + * @var \metastore\PrincipalPrivilegeSet + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + public $principal_name = null; + /** + * @var int + */ + public $principal_type = null; + /** + * @var \metastore\HiveObjectRef + */ + 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; + + /** + * @var \metastore\HiveObjectPrivilege[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size1070 = 0; + $_etype1073 = 0; + $xfer += $input->readListBegin($_etype1073, $_size1070); + for ($_i1074 = 0; $_i1074 < $_size1070; ++$_i1074) + { + $elem1075 = null; + $elem1075 = new \metastore\HiveObjectPrivilege(); + $xfer += $elem1075->read($input); + $this->success []= $elem1075; + } + $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 $iter1076) + { + $xfer += $iter1076->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; + + /** + * @var \metastore\PrivilegeBag + */ + 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; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var \metastore\PrivilegeBag + */ + 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; + + /** + * @var bool + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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_grant_revoke_privileges_args { + static $_TSPEC; + + /** + * @var \metastore\GrantRevokePrivilegeRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\GrantRevokePrivilegeRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_grant_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->request = new \metastore\GrantRevokePrivilegeRequest(); + $xfer += $this->request->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_revoke_privileges_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_grant_revoke_privileges_result { + static $_TSPEC; + + /** + * @var \metastore\GrantRevokePrivilegeResponse + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\GrantRevokePrivilegeResponse', + ), + 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_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::STRUCT) { + $this->success = new \metastore\GrantRevokePrivilegeResponse(); + $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_grant_revoke_privileges_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_set_ugi_args { + static $_TSPEC; + + /** + * @var string + */ + public $user_name = null; + /** + * @var string[] + */ + 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(); + $_size1077 = 0; + $_etype1080 = 0; + $xfer += $input->readListBegin($_etype1080, $_size1077); + for ($_i1081 = 0; $_i1081 < $_size1077; ++$_i1081) + { + $elem1082 = null; + $xfer += $input->readString($elem1082); + $this->group_names []= $elem1082; + } + $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 $iter1083) + { + $xfer += $output->writeString($iter1083); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_set_ugi_result { + static $_TSPEC; + + /** + * @var string[] + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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(); + $_size1084 = 0; + $_etype1087 = 0; + $xfer += $input->readListBegin($_etype1087, $_size1084); + for ($_i1088 = 0; $_i1088 < $_size1084; ++$_i1088) + { + $elem1089 = null; + $xfer += $input->readString($elem1089); + $this->success []= $elem1089; + } + $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 $iter1090) + { + $xfer += $output->writeString($iter1090); + } + } + $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; + + /** + * @var string + */ + public $token_owner = null; + /** + * @var string + */ + 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; + + /** + * @var string + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var int + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var \metastore\MetaException + */ + 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; + } + +} + +class ThriftHiveMetastore_add_token_args { + static $_TSPEC; + + /** + * @var string + */ + public $token_identifier = null; + /** + * @var string + */ + public $delegation_token = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'token_identifier', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'delegation_token', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['token_identifier'])) { + $this->token_identifier = $vals['token_identifier']; + } + if (isset($vals['delegation_token'])) { + $this->delegation_token = $vals['delegation_token']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_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_identifier); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->delegation_token); + } 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_token_args'); + if ($this->token_identifier !== null) { + $xfer += $output->writeFieldBegin('token_identifier', TType::STRING, 1); + $xfer += $output->writeString($this->token_identifier); + $xfer += $output->writeFieldEnd(); + } + if ($this->delegation_token !== null) { + $xfer += $output->writeFieldBegin('delegation_token', TType::STRING, 2); + $xfer += $output->writeString($this->delegation_token); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_token_result { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_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::BOOL) { + $xfer += $input->readBool($this->success); + } 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_token_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_remove_token_args { + static $_TSPEC; + + /** + * @var string + */ + public $token_identifier = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'token_identifier', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['token_identifier'])) { + $this->token_identifier = $vals['token_identifier']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_remove_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_identifier); + } 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_remove_token_args'); + if ($this->token_identifier !== null) { + $xfer += $output->writeFieldBegin('token_identifier', TType::STRING, 1); + $xfer += $output->writeString($this->token_identifier); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_remove_token_result { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_remove_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::BOOL) { + $xfer += $input->readBool($this->success); + } 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_remove_token_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_token_args { + static $_TSPEC; + + /** + * @var string + */ + public $token_identifier = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'token_identifier', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['token_identifier'])) { + $this->token_identifier = $vals['token_identifier']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_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_identifier); + } 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_token_args'); + if ($this->token_identifier !== null) { + $xfer += $output->writeFieldBegin('token_identifier', TType::STRING, 1); + $xfer += $output->writeString($this->token_identifier); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_token_result { + static $_TSPEC; + + /** + * @var string + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_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; + 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_token_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_token_identifiers_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_token_identifiers_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_token_identifiers_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_token_identifiers_result { + static $_TSPEC; + + /** + * @var string[] + */ + public $success = 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, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_token_identifiers_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(); + $_size1091 = 0; + $_etype1094 = 0; + $xfer += $input->readListBegin($_etype1094, $_size1091); + for ($_i1095 = 0; $_i1095 < $_size1091; ++$_i1095) + { + $elem1096 = null; + $xfer += $input->readString($elem1096); + $this->success []= $elem1096; + } + $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_all_token_identifiers_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 $iter1097) + { + $xfer += $output->writeString($iter1097); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_master_key_args { + static $_TSPEC; + + /** + * @var string + */ + public $key = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'key', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['key'])) { + $this->key = $vals['key']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_master_key_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->key); + } 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_master_key_args'); + if ($this->key !== null) { + $xfer += $output->writeFieldBegin('key', TType::STRING, 1); + $xfer += $output->writeString($this->key); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_master_key_result { + static $_TSPEC; + + /** + * @var int + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = 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\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_add_master_key_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\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_add_master_key_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_update_master_key_args { + static $_TSPEC; + + /** + * @var int + */ + public $seq_number = null; + /** + * @var string + */ + public $key = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'seq_number', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'key', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['seq_number'])) { + $this->seq_number = $vals['seq_number']; + } + if (isset($vals['key'])) { + $this->key = $vals['key']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_update_master_key_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->seq_number); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->key); + } 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_update_master_key_args'); + if ($this->seq_number !== null) { + $xfer += $output->writeFieldBegin('seq_number', TType::I32, 1); + $xfer += $output->writeI32($this->seq_number); + $xfer += $output->writeFieldEnd(); + } + if ($this->key !== null) { + $xfer += $output->writeFieldBegin('key', TType::STRING, 2); + $xfer += $output->writeString($this->key); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_update_master_key_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchObjectException + */ + public $o1 = null; + /** + * @var \metastore\MetaException + */ + public $o2 = 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\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_update_master_key_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\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_update_master_key_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_remove_master_key_args { + static $_TSPEC; + + /** + * @var int + */ + public $key_seq = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'key_seq', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['key_seq'])) { + $this->key_seq = $vals['key_seq']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_remove_master_key_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->key_seq); + } 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_remove_master_key_args'); + if ($this->key_seq !== null) { + $xfer += $output->writeFieldBegin('key_seq', TType::I32, 1); + $xfer += $output->writeI32($this->key_seq); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_remove_master_key_result { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_remove_master_key_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; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_remove_master_key_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_master_keys_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_master_keys_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_master_keys_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_master_keys_result { + static $_TSPEC; + + /** + * @var string[] + */ + public $success = 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, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_master_keys_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(); + $_size1098 = 0; + $_etype1101 = 0; + $xfer += $input->readListBegin($_etype1101, $_size1098); + for ($_i1102 = 0; $_i1102 < $_size1098; ++$_i1102) + { + $elem1103 = null; + $xfer += $input->readString($elem1103); + $this->success []= $elem1103; + } + $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_master_keys_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 $iter1104) + { + $xfer += $output->writeString($iter1104); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_open_txns_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_open_txns_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_open_txns_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_open_txns_result { + static $_TSPEC; + + /** + * @var \metastore\GetOpenTxnsResponse + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetOpenTxnsResponse', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_open_txns_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\GetOpenTxnsResponse(); + $xfer += $this->success->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_open_txns_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_open_txns_info_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_open_txns_info_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_open_txns_info_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_open_txns_info_result { + static $_TSPEC; + + /** + * @var \metastore\GetOpenTxnsInfoResponse + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetOpenTxnsInfoResponse', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_open_txns_info_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\GetOpenTxnsInfoResponse(); + $xfer += $this->success->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_open_txns_info_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_open_txns_args { + static $_TSPEC; + + /** + * @var \metastore\OpenTxnRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\OpenTxnRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_open_txns_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->rqst = new \metastore\OpenTxnRequest(); + $xfer += $this->rqst->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_open_txns_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_open_txns_result { + static $_TSPEC; + + /** + * @var \metastore\OpenTxnsResponse + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\OpenTxnsResponse', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_open_txns_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\OpenTxnsResponse(); + $xfer += $this->success->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_open_txns_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_abort_txn_args { + static $_TSPEC; + + /** + * @var \metastore\AbortTxnRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\AbortTxnRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_abort_txn_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->rqst = new \metastore\AbortTxnRequest(); + $xfer += $this->rqst->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_abort_txn_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_abort_txn_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchTxnException + */ + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchTxnException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_abort_txn_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\NoSuchTxnException(); + $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_abort_txn_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; + } + +} + +class ThriftHiveMetastore_abort_txns_args { + static $_TSPEC; + + /** + * @var \metastore\AbortTxnsRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\AbortTxnsRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_abort_txns_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->rqst = new \metastore\AbortTxnsRequest(); + $xfer += $this->rqst->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_abort_txns_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_abort_txns_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchTxnException + */ + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchTxnException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_abort_txns_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\NoSuchTxnException(); + $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_abort_txns_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; + } + +} + +class ThriftHiveMetastore_commit_txn_args { + static $_TSPEC; + + /** + * @var \metastore\CommitTxnRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\CommitTxnRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_commit_txn_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->rqst = new \metastore\CommitTxnRequest(); + $xfer += $this->rqst->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_commit_txn_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_commit_txn_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchTxnException + */ + public $o1 = null; + /** + * @var \metastore\TxnAbortedException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchTxnException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\TxnAbortedException', + ), + ); + } + 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_commit_txn_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\NoSuchTxnException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\TxnAbortedException(); + $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_commit_txn_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_lock_args { + static $_TSPEC; + + /** + * @var \metastore\LockRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\LockRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_lock_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->rqst = new \metastore\LockRequest(); + $xfer += $this->rqst->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_lock_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_lock_result { + static $_TSPEC; + + /** + * @var \metastore\LockResponse + */ + public $success = null; + /** + * @var \metastore\NoSuchTxnException + */ + public $o1 = null; + /** + * @var \metastore\TxnAbortedException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\LockResponse', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchTxnException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\TxnAbortedException', + ), + ); + } + 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_lock_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\LockResponse(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchTxnException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\TxnAbortedException(); + $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_lock_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_check_lock_args { + static $_TSPEC; + + /** + * @var \metastore\CheckLockRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\CheckLockRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_check_lock_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->rqst = new \metastore\CheckLockRequest(); + $xfer += $this->rqst->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_check_lock_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_check_lock_result { + static $_TSPEC; + + /** + * @var \metastore\LockResponse + */ + public $success = null; + /** + * @var \metastore\NoSuchTxnException + */ + public $o1 = null; + /** + * @var \metastore\TxnAbortedException + */ + public $o2 = null; + /** + * @var \metastore\NoSuchLockException + */ + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\LockResponse', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchTxnException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\TxnAbortedException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchLockException', + ), + ); + } + 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_check_lock_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\LockResponse(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new \metastore\NoSuchTxnException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\TxnAbortedException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\NoSuchLockException(); + $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_check_lock_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_unlock_args { + static $_TSPEC; + + /** + * @var \metastore\UnlockRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\UnlockRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_unlock_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->rqst = new \metastore\UnlockRequest(); + $xfer += $this->rqst->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_unlock_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_unlock_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchLockException + */ + public $o1 = null; + /** + * @var \metastore\TxnOpenException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchLockException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\TxnOpenException', + ), + ); + } + 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_unlock_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\NoSuchLockException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\TxnOpenException(); + $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_unlock_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_show_locks_args { + static $_TSPEC; + + /** + * @var \metastore\ShowLocksRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\ShowLocksRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_show_locks_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->rqst = new \metastore\ShowLocksRequest(); + $xfer += $this->rqst->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_show_locks_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_show_locks_result { + static $_TSPEC; + + /** + * @var \metastore\ShowLocksResponse + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\ShowLocksResponse', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_show_locks_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\ShowLocksResponse(); + $xfer += $this->success->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_show_locks_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_heartbeat_args { + static $_TSPEC; + + /** + * @var \metastore\HeartbeatRequest + */ + public $ids = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'ids', + 'type' => TType::STRUCT, + 'class' => '\metastore\HeartbeatRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['ids'])) { + $this->ids = $vals['ids']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_heartbeat_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->ids = new \metastore\HeartbeatRequest(); + $xfer += $this->ids->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_heartbeat_args'); + if ($this->ids !== null) { + if (!is_object($this->ids)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('ids', TType::STRUCT, 1); + $xfer += $this->ids->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_heartbeat_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchLockException + */ + public $o1 = null; + /** + * @var \metastore\NoSuchTxnException + */ + public $o2 = null; + /** + * @var \metastore\TxnAbortedException + */ + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchLockException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchTxnException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => '\metastore\TxnAbortedException', + ), + ); + } + 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_heartbeat_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\NoSuchLockException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\NoSuchTxnException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new \metastore\TxnAbortedException(); + $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_heartbeat_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_heartbeat_txn_range_args { + static $_TSPEC; + + /** + * @var \metastore\HeartbeatTxnRangeRequest + */ + public $txns = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'txns', + 'type' => TType::STRUCT, + 'class' => '\metastore\HeartbeatTxnRangeRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['txns'])) { + $this->txns = $vals['txns']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_heartbeat_txn_range_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->txns = new \metastore\HeartbeatTxnRangeRequest(); + $xfer += $this->txns->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_heartbeat_txn_range_args'); + if ($this->txns !== null) { + if (!is_object($this->txns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('txns', TType::STRUCT, 1); + $xfer += $this->txns->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_heartbeat_txn_range_result { + static $_TSPEC; + + /** + * @var \metastore\HeartbeatTxnRangeResponse + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\HeartbeatTxnRangeResponse', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_heartbeat_txn_range_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\HeartbeatTxnRangeResponse(); + $xfer += $this->success->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_heartbeat_txn_range_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_compact_args { + static $_TSPEC; + + /** + * @var \metastore\CompactionRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\CompactionRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_compact_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->rqst = new \metastore\CompactionRequest(); + $xfer += $this->rqst->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_compact_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_compact_result { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_compact_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('ThriftHiveMetastore_compact_result'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_compact2_args { + static $_TSPEC; + + /** + * @var \metastore\CompactionRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\CompactionRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_compact2_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->rqst = new \metastore\CompactionRequest(); + $xfer += $this->rqst->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_compact2_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_compact2_result { + static $_TSPEC; + + /** + * @var \metastore\CompactionResponse + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\CompactionResponse', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_compact2_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\CompactionResponse(); + $xfer += $this->success->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_compact2_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_show_compact_args { + static $_TSPEC; + + /** + * @var \metastore\ShowCompactRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\ShowCompactRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_show_compact_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->rqst = new \metastore\ShowCompactRequest(); + $xfer += $this->rqst->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_show_compact_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_show_compact_result { + static $_TSPEC; + + /** + * @var \metastore\ShowCompactResponse + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\ShowCompactResponse', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_show_compact_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\ShowCompactResponse(); + $xfer += $this->success->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_show_compact_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_dynamic_partitions_args { + static $_TSPEC; + + /** + * @var \metastore\AddDynamicPartitions + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\AddDynamicPartitions', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_dynamic_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::STRUCT) { + $this->rqst = new \metastore\AddDynamicPartitions(); + $xfer += $this->rqst->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_dynamic_partitions_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_add_dynamic_partitions_result { + static $_TSPEC; + + /** + * @var \metastore\NoSuchTxnException + */ + public $o1 = null; + /** + * @var \metastore\TxnAbortedException + */ + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => '\metastore\NoSuchTxnException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => '\metastore\TxnAbortedException', + ), + ); + } + 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_add_dynamic_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\NoSuchTxnException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new \metastore\TxnAbortedException(); + $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_add_dynamic_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_get_next_notification_args { + static $_TSPEC; + + /** + * @var \metastore\NotificationEventRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\NotificationEventRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_next_notification_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->rqst = new \metastore\NotificationEventRequest(); + $xfer += $this->rqst->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_next_notification_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_next_notification_result { + static $_TSPEC; + + /** + * @var \metastore\NotificationEventResponse + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\NotificationEventResponse', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_next_notification_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\NotificationEventResponse(); + $xfer += $this->success->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_next_notification_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_current_notificationEventId_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_current_notificationEventId_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_current_notificationEventId_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_current_notificationEventId_result { + static $_TSPEC; + + /** + * @var \metastore\CurrentNotificationEventId + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\CurrentNotificationEventId', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_current_notificationEventId_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\CurrentNotificationEventId(); + $xfer += $this->success->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_current_notificationEventId_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_fire_listener_event_args { + static $_TSPEC; + + /** + * @var \metastore\FireEventRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\FireEventRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_fire_listener_event_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->rqst = new \metastore\FireEventRequest(); + $xfer += $this->rqst->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_fire_listener_event_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_fire_listener_event_result { + static $_TSPEC; + + /** + * @var \metastore\FireEventResponse + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\FireEventResponse', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_fire_listener_event_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\FireEventResponse(); + $xfer += $this->success->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_fire_listener_event_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_flushCache_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_flushCache_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_flushCache_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_flushCache_result { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_flushCache_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('ThriftHiveMetastore_flushCache_result'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_cm_recycle_args { + static $_TSPEC; + + /** + * @var \metastore\CmRecycleRequest + */ + public $request = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'request', + 'type' => TType::STRUCT, + 'class' => '\metastore\CmRecycleRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['request'])) { + $this->request = $vals['request']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_cm_recycle_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->request = new \metastore\CmRecycleRequest(); + $xfer += $this->request->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_cm_recycle_args'); + if ($this->request !== null) { + if (!is_object($this->request)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); + $xfer += $this->request->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_cm_recycle_result { + static $_TSPEC; + + /** + * @var \metastore\CmRecycleResponse + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\CmRecycleResponse', + ), + 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_cm_recycle_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\CmRecycleResponse(); + $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_cm_recycle_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_get_file_metadata_by_expr_args { + static $_TSPEC; + + /** + * @var \metastore\GetFileMetadataByExprRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetFileMetadataByExprRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_file_metadata_by_expr_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->req = new \metastore\GetFileMetadataByExprRequest(); + $xfer += $this->req->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_file_metadata_by_expr_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_file_metadata_by_expr_result { + static $_TSPEC; + + /** + * @var \metastore\GetFileMetadataByExprResult + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetFileMetadataByExprResult', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_file_metadata_by_expr_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\GetFileMetadataByExprResult(); + $xfer += $this->success->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_file_metadata_by_expr_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_file_metadata_args { + static $_TSPEC; + + /** + * @var \metastore\GetFileMetadataRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetFileMetadataRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_file_metadata_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->req = new \metastore\GetFileMetadataRequest(); + $xfer += $this->req->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_file_metadata_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_file_metadata_result { + static $_TSPEC; + + /** + * @var \metastore\GetFileMetadataResult + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\GetFileMetadataResult', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_file_metadata_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\GetFileMetadataResult(); + $xfer += $this->success->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_file_metadata_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_put_file_metadata_args { + static $_TSPEC; + + /** + * @var \metastore\PutFileMetadataRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\PutFileMetadataRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_put_file_metadata_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->req = new \metastore\PutFileMetadataRequest(); + $xfer += $this->req->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_put_file_metadata_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_put_file_metadata_result { + static $_TSPEC; + + /** + * @var \metastore\PutFileMetadataResult + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\PutFileMetadataResult', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_put_file_metadata_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\PutFileMetadataResult(); + $xfer += $this->success->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_put_file_metadata_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_clear_file_metadata_args { + static $_TSPEC; + + /** + * @var \metastore\ClearFileMetadataRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\ClearFileMetadataRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_clear_file_metadata_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->req = new \metastore\ClearFileMetadataRequest(); + $xfer += $this->req->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_clear_file_metadata_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_clear_file_metadata_result { + static $_TSPEC; + + /** + * @var \metastore\ClearFileMetadataResult + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\ClearFileMetadataResult', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_clear_file_metadata_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\ClearFileMetadataResult(); + $xfer += $this->success->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_clear_file_metadata_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_cache_file_metadata_args { + static $_TSPEC; + + /** + * @var \metastore\CacheFileMetadataRequest + */ + public $req = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'req', + 'type' => TType::STRUCT, + 'class' => '\metastore\CacheFileMetadataRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['req'])) { + $this->req = $vals['req']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_cache_file_metadata_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->req = new \metastore\CacheFileMetadataRequest(); + $xfer += $this->req->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_cache_file_metadata_args'); + if ($this->req !== null) { + if (!is_object($this->req)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1); + $xfer += $this->req->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_cache_file_metadata_result { + static $_TSPEC; + + /** + * @var \metastore\CacheFileMetadataResult + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\CacheFileMetadataResult', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_cache_file_metadata_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\CacheFileMetadataResult(); + $xfer += $this->success->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_cache_file_metadata_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_metastore_db_uuid_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_metastore_db_uuid_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_metastore_db_uuid_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_metastore_db_uuid_result { + static $_TSPEC; + + /** + * @var string + */ + public $success = null; + /** + * @var \metastore\MetaException + */ + 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_metastore_db_uuid_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_metastore_db_uuid_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; + } + +} + + diff --git standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php new file mode 100644 index 0000000..aff783e --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php @@ -0,0 +1,21087 @@ + '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', + ); +} + +final class TxnState { + const COMMITTED = 1; + const ABORTED = 2; + const OPEN = 3; + static public $__names = array( + 1 => 'COMMITTED', + 2 => 'ABORTED', + 3 => 'OPEN', + ); +} + +final class LockLevel { + const DB = 1; + const TABLE = 2; + const PARTITION = 3; + static public $__names = array( + 1 => 'DB', + 2 => 'TABLE', + 3 => 'PARTITION', + ); +} + +final class LockState { + const ACQUIRED = 1; + const WAITING = 2; + const ABORT = 3; + const NOT_ACQUIRED = 4; + static public $__names = array( + 1 => 'ACQUIRED', + 2 => 'WAITING', + 3 => 'ABORT', + 4 => 'NOT_ACQUIRED', + ); +} + +final class LockType { + const SHARED_READ = 1; + const SHARED_WRITE = 2; + const EXCLUSIVE = 3; + static public $__names = array( + 1 => 'SHARED_READ', + 2 => 'SHARED_WRITE', + 3 => 'EXCLUSIVE', + ); +} + +final class CompactionType { + const MINOR = 1; + const MAJOR = 2; + static public $__names = array( + 1 => 'MINOR', + 2 => 'MAJOR', + ); +} + +final class GrantRevokeType { + const GRANT = 1; + const REVOKE = 2; + static public $__names = array( + 1 => 'GRANT', + 2 => 'REVOKE', + ); +} + +final class DataOperationType { + const SELECT = 1; + const INSERT = 2; + const UPDATE = 3; + const DELETE = 4; + const UNSET = 5; + const NO_TXN = 6; + static public $__names = array( + 1 => 'SELECT', + 2 => 'INSERT', + 3 => 'UPDATE', + 4 => 'DELETE', + 5 => 'UNSET', + 6 => 'NO_TXN', + ); +} + +final class EventRequestType { + const INSERT = 1; + const UPDATE = 2; + const DELETE = 3; + static public $__names = array( + 1 => 'INSERT', + 2 => 'UPDATE', + 3 => 'DELETE', + ); +} + +final class FunctionType { + const JAVA = 1; + static public $__names = array( + 1 => 'JAVA', + ); +} + +final class ResourceType { + const JAR = 1; + const FILE = 2; + const ARCHIVE = 3; + static public $__names = array( + 1 => 'JAR', + 2 => 'FILE', + 3 => 'ARCHIVE', + ); +} + +final class FileMetadataExprType { + const ORC_SARG = 1; + static public $__names = array( + 1 => 'ORC_SARG', + ); +} + +final class ClientCapability { + const TEST_CAPABILITY = 1; + static public $__names = array( + 1 => 'TEST_CAPABILITY', + ); +} + +class Version { + static $_TSPEC; + + /** + * @var string + */ + public $version = null; + /** + * @var string + */ + 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; + + /** + * @var string + */ + public $name = null; + /** + * @var string + */ + public $type = null; + /** + * @var string + */ + 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 SQLPrimaryKey { + static $_TSPEC; + + /** + * @var string + */ + public $table_db = null; + /** + * @var string + */ + public $table_name = null; + /** + * @var string + */ + public $column_name = null; + /** + * @var int + */ + public $key_seq = null; + /** + * @var string + */ + public $pk_name = null; + /** + * @var bool + */ + public $enable_cstr = null; + /** + * @var bool + */ + public $validate_cstr = null; + /** + * @var bool + */ + public $rely_cstr = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'table_db', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'column_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'key_seq', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'pk_name', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'enable_cstr', + 'type' => TType::BOOL, + ), + 7 => array( + 'var' => 'validate_cstr', + 'type' => TType::BOOL, + ), + 8 => array( + 'var' => 'rely_cstr', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['table_db'])) { + $this->table_db = $vals['table_db']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + if (isset($vals['column_name'])) { + $this->column_name = $vals['column_name']; + } + if (isset($vals['key_seq'])) { + $this->key_seq = $vals['key_seq']; + } + if (isset($vals['pk_name'])) { + $this->pk_name = $vals['pk_name']; + } + if (isset($vals['enable_cstr'])) { + $this->enable_cstr = $vals['enable_cstr']; + } + if (isset($vals['validate_cstr'])) { + $this->validate_cstr = $vals['validate_cstr']; + } + if (isset($vals['rely_cstr'])) { + $this->rely_cstr = $vals['rely_cstr']; + } + } + } + + public function getName() { + return 'SQLPrimaryKey'; + } + + 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->table_db); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->key_seq); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pk_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->enable_cstr); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->validate_cstr); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->rely_cstr); + } 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('SQLPrimaryKey'); + if ($this->table_db !== null) { + $xfer += $output->writeFieldBegin('table_db', TType::STRING, 1); + $xfer += $output->writeString($this->table_db); + $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(); + } + if ($this->column_name !== null) { + $xfer += $output->writeFieldBegin('column_name', TType::STRING, 3); + $xfer += $output->writeString($this->column_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->key_seq !== null) { + $xfer += $output->writeFieldBegin('key_seq', TType::I32, 4); + $xfer += $output->writeI32($this->key_seq); + $xfer += $output->writeFieldEnd(); + } + if ($this->pk_name !== null) { + $xfer += $output->writeFieldBegin('pk_name', TType::STRING, 5); + $xfer += $output->writeString($this->pk_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->enable_cstr !== null) { + $xfer += $output->writeFieldBegin('enable_cstr', TType::BOOL, 6); + $xfer += $output->writeBool($this->enable_cstr); + $xfer += $output->writeFieldEnd(); + } + if ($this->validate_cstr !== null) { + $xfer += $output->writeFieldBegin('validate_cstr', TType::BOOL, 7); + $xfer += $output->writeBool($this->validate_cstr); + $xfer += $output->writeFieldEnd(); + } + if ($this->rely_cstr !== null) { + $xfer += $output->writeFieldBegin('rely_cstr', TType::BOOL, 8); + $xfer += $output->writeBool($this->rely_cstr); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class SQLForeignKey { + static $_TSPEC; + + /** + * @var string + */ + public $pktable_db = null; + /** + * @var string + */ + public $pktable_name = null; + /** + * @var string + */ + public $pkcolumn_name = null; + /** + * @var string + */ + public $fktable_db = null; + /** + * @var string + */ + public $fktable_name = null; + /** + * @var string + */ + public $fkcolumn_name = null; + /** + * @var int + */ + public $key_seq = null; + /** + * @var int + */ + public $update_rule = null; + /** + * @var int + */ + public $delete_rule = null; + /** + * @var string + */ + public $fk_name = null; + /** + * @var string + */ + public $pk_name = null; + /** + * @var bool + */ + public $enable_cstr = null; + /** + * @var bool + */ + public $validate_cstr = null; + /** + * @var bool + */ + public $rely_cstr = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'pktable_db', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'pktable_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'pkcolumn_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'fktable_db', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'fktable_name', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'fkcolumn_name', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'key_seq', + 'type' => TType::I32, + ), + 8 => array( + 'var' => 'update_rule', + 'type' => TType::I32, + ), + 9 => array( + 'var' => 'delete_rule', + 'type' => TType::I32, + ), + 10 => array( + 'var' => 'fk_name', + 'type' => TType::STRING, + ), + 11 => array( + 'var' => 'pk_name', + 'type' => TType::STRING, + ), + 12 => array( + 'var' => 'enable_cstr', + 'type' => TType::BOOL, + ), + 13 => array( + 'var' => 'validate_cstr', + 'type' => TType::BOOL, + ), + 14 => array( + 'var' => 'rely_cstr', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['pktable_db'])) { + $this->pktable_db = $vals['pktable_db']; + } + if (isset($vals['pktable_name'])) { + $this->pktable_name = $vals['pktable_name']; + } + if (isset($vals['pkcolumn_name'])) { + $this->pkcolumn_name = $vals['pkcolumn_name']; + } + if (isset($vals['fktable_db'])) { + $this->fktable_db = $vals['fktable_db']; + } + if (isset($vals['fktable_name'])) { + $this->fktable_name = $vals['fktable_name']; + } + if (isset($vals['fkcolumn_name'])) { + $this->fkcolumn_name = $vals['fkcolumn_name']; + } + if (isset($vals['key_seq'])) { + $this->key_seq = $vals['key_seq']; + } + if (isset($vals['update_rule'])) { + $this->update_rule = $vals['update_rule']; + } + if (isset($vals['delete_rule'])) { + $this->delete_rule = $vals['delete_rule']; + } + if (isset($vals['fk_name'])) { + $this->fk_name = $vals['fk_name']; + } + if (isset($vals['pk_name'])) { + $this->pk_name = $vals['pk_name']; + } + if (isset($vals['enable_cstr'])) { + $this->enable_cstr = $vals['enable_cstr']; + } + if (isset($vals['validate_cstr'])) { + $this->validate_cstr = $vals['validate_cstr']; + } + if (isset($vals['rely_cstr'])) { + $this->rely_cstr = $vals['rely_cstr']; + } + } + } + + public function getName() { + return 'SQLForeignKey'; + } + + 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->pktable_db); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pktable_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pkcolumn_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->fktable_db); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->fktable_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->fkcolumn_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->key_seq); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->update_rule); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->delete_rule); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->fk_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pk_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 12: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->enable_cstr); + } else { + $xfer += $input->skip($ftype); + } + break; + case 13: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->validate_cstr); + } else { + $xfer += $input->skip($ftype); + } + break; + case 14: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->rely_cstr); + } 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('SQLForeignKey'); + if ($this->pktable_db !== null) { + $xfer += $output->writeFieldBegin('pktable_db', TType::STRING, 1); + $xfer += $output->writeString($this->pktable_db); + $xfer += $output->writeFieldEnd(); + } + if ($this->pktable_name !== null) { + $xfer += $output->writeFieldBegin('pktable_name', TType::STRING, 2); + $xfer += $output->writeString($this->pktable_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->pkcolumn_name !== null) { + $xfer += $output->writeFieldBegin('pkcolumn_name', TType::STRING, 3); + $xfer += $output->writeString($this->pkcolumn_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->fktable_db !== null) { + $xfer += $output->writeFieldBegin('fktable_db', TType::STRING, 4); + $xfer += $output->writeString($this->fktable_db); + $xfer += $output->writeFieldEnd(); + } + if ($this->fktable_name !== null) { + $xfer += $output->writeFieldBegin('fktable_name', TType::STRING, 5); + $xfer += $output->writeString($this->fktable_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->fkcolumn_name !== null) { + $xfer += $output->writeFieldBegin('fkcolumn_name', TType::STRING, 6); + $xfer += $output->writeString($this->fkcolumn_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->key_seq !== null) { + $xfer += $output->writeFieldBegin('key_seq', TType::I32, 7); + $xfer += $output->writeI32($this->key_seq); + $xfer += $output->writeFieldEnd(); + } + if ($this->update_rule !== null) { + $xfer += $output->writeFieldBegin('update_rule', TType::I32, 8); + $xfer += $output->writeI32($this->update_rule); + $xfer += $output->writeFieldEnd(); + } + if ($this->delete_rule !== null) { + $xfer += $output->writeFieldBegin('delete_rule', TType::I32, 9); + $xfer += $output->writeI32($this->delete_rule); + $xfer += $output->writeFieldEnd(); + } + if ($this->fk_name !== null) { + $xfer += $output->writeFieldBegin('fk_name', TType::STRING, 10); + $xfer += $output->writeString($this->fk_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->pk_name !== null) { + $xfer += $output->writeFieldBegin('pk_name', TType::STRING, 11); + $xfer += $output->writeString($this->pk_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->enable_cstr !== null) { + $xfer += $output->writeFieldBegin('enable_cstr', TType::BOOL, 12); + $xfer += $output->writeBool($this->enable_cstr); + $xfer += $output->writeFieldEnd(); + } + if ($this->validate_cstr !== null) { + $xfer += $output->writeFieldBegin('validate_cstr', TType::BOOL, 13); + $xfer += $output->writeBool($this->validate_cstr); + $xfer += $output->writeFieldEnd(); + } + if ($this->rely_cstr !== null) { + $xfer += $output->writeFieldBegin('rely_cstr', TType::BOOL, 14); + $xfer += $output->writeBool($this->rely_cstr); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class SQLUniqueConstraint { + static $_TSPEC; + + /** + * @var string + */ + public $table_db = null; + /** + * @var string + */ + public $table_name = null; + /** + * @var string + */ + public $column_name = null; + /** + * @var int + */ + public $key_seq = null; + /** + * @var string + */ + public $uk_name = null; + /** + * @var bool + */ + public $enable_cstr = null; + /** + * @var bool + */ + public $validate_cstr = null; + /** + * @var bool + */ + public $rely_cstr = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'table_db', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'column_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'key_seq', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'uk_name', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'enable_cstr', + 'type' => TType::BOOL, + ), + 7 => array( + 'var' => 'validate_cstr', + 'type' => TType::BOOL, + ), + 8 => array( + 'var' => 'rely_cstr', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['table_db'])) { + $this->table_db = $vals['table_db']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + if (isset($vals['column_name'])) { + $this->column_name = $vals['column_name']; + } + if (isset($vals['key_seq'])) { + $this->key_seq = $vals['key_seq']; + } + if (isset($vals['uk_name'])) { + $this->uk_name = $vals['uk_name']; + } + if (isset($vals['enable_cstr'])) { + $this->enable_cstr = $vals['enable_cstr']; + } + if (isset($vals['validate_cstr'])) { + $this->validate_cstr = $vals['validate_cstr']; + } + if (isset($vals['rely_cstr'])) { + $this->rely_cstr = $vals['rely_cstr']; + } + } + } + + public function getName() { + return 'SQLUniqueConstraint'; + } + + 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->table_db); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->key_seq); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->uk_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->enable_cstr); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->validate_cstr); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->rely_cstr); + } 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('SQLUniqueConstraint'); + if ($this->table_db !== null) { + $xfer += $output->writeFieldBegin('table_db', TType::STRING, 1); + $xfer += $output->writeString($this->table_db); + $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(); + } + if ($this->column_name !== null) { + $xfer += $output->writeFieldBegin('column_name', TType::STRING, 3); + $xfer += $output->writeString($this->column_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->key_seq !== null) { + $xfer += $output->writeFieldBegin('key_seq', TType::I32, 4); + $xfer += $output->writeI32($this->key_seq); + $xfer += $output->writeFieldEnd(); + } + if ($this->uk_name !== null) { + $xfer += $output->writeFieldBegin('uk_name', TType::STRING, 5); + $xfer += $output->writeString($this->uk_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->enable_cstr !== null) { + $xfer += $output->writeFieldBegin('enable_cstr', TType::BOOL, 6); + $xfer += $output->writeBool($this->enable_cstr); + $xfer += $output->writeFieldEnd(); + } + if ($this->validate_cstr !== null) { + $xfer += $output->writeFieldBegin('validate_cstr', TType::BOOL, 7); + $xfer += $output->writeBool($this->validate_cstr); + $xfer += $output->writeFieldEnd(); + } + if ($this->rely_cstr !== null) { + $xfer += $output->writeFieldBegin('rely_cstr', TType::BOOL, 8); + $xfer += $output->writeBool($this->rely_cstr); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class SQLNotNullConstraint { + static $_TSPEC; + + /** + * @var string + */ + public $table_db = null; + /** + * @var string + */ + public $table_name = null; + /** + * @var string + */ + public $column_name = null; + /** + * @var string + */ + public $nn_name = null; + /** + * @var bool + */ + public $enable_cstr = null; + /** + * @var bool + */ + public $validate_cstr = null; + /** + * @var bool + */ + public $rely_cstr = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'table_db', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'column_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'nn_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'enable_cstr', + 'type' => TType::BOOL, + ), + 6 => array( + 'var' => 'validate_cstr', + 'type' => TType::BOOL, + ), + 7 => array( + 'var' => 'rely_cstr', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['table_db'])) { + $this->table_db = $vals['table_db']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + if (isset($vals['column_name'])) { + $this->column_name = $vals['column_name']; + } + if (isset($vals['nn_name'])) { + $this->nn_name = $vals['nn_name']; + } + if (isset($vals['enable_cstr'])) { + $this->enable_cstr = $vals['enable_cstr']; + } + if (isset($vals['validate_cstr'])) { + $this->validate_cstr = $vals['validate_cstr']; + } + if (isset($vals['rely_cstr'])) { + $this->rely_cstr = $vals['rely_cstr']; + } + } + } + + public function getName() { + return 'SQLNotNullConstraint'; + } + + 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->table_db); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->nn_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->enable_cstr); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->validate_cstr); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->rely_cstr); + } 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('SQLNotNullConstraint'); + if ($this->table_db !== null) { + $xfer += $output->writeFieldBegin('table_db', TType::STRING, 1); + $xfer += $output->writeString($this->table_db); + $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(); + } + if ($this->column_name !== null) { + $xfer += $output->writeFieldBegin('column_name', TType::STRING, 3); + $xfer += $output->writeString($this->column_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->nn_name !== null) { + $xfer += $output->writeFieldBegin('nn_name', TType::STRING, 4); + $xfer += $output->writeString($this->nn_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->enable_cstr !== null) { + $xfer += $output->writeFieldBegin('enable_cstr', TType::BOOL, 5); + $xfer += $output->writeBool($this->enable_cstr); + $xfer += $output->writeFieldEnd(); + } + if ($this->validate_cstr !== null) { + $xfer += $output->writeFieldBegin('validate_cstr', TType::BOOL, 6); + $xfer += $output->writeBool($this->validate_cstr); + $xfer += $output->writeFieldEnd(); + } + if ($this->rely_cstr !== null) { + $xfer += $output->writeFieldBegin('rely_cstr', TType::BOOL, 7); + $xfer += $output->writeBool($this->rely_cstr); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Type { + static $_TSPEC; + + /** + * @var string + */ + public $name = null; + /** + * @var string + */ + public $type1 = null; + /** + * @var string + */ + public $type2 = null; + /** + * @var \metastore\FieldSchema[] + */ + 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; + + /** + * @var int + */ + public $objectType = null; + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $objectName = null; + /** + * @var string[] + */ + public $partValues = null; + /** + * @var string + */ + 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; + + /** + * @var string + */ + public $privilege = null; + /** + * @var int + */ + public $createTime = null; + /** + * @var string + */ + public $grantor = null; + /** + * @var int + */ + public $grantorType = null; + /** + * @var bool + */ + 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; + + /** + * @var \metastore\HiveObjectRef + */ + public $hiveObject = null; + /** + * @var string + */ + public $principalName = null; + /** + * @var int + */ + public $principalType = null; + /** + * @var \metastore\PrivilegeGrantInfo + */ + 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; + + /** + * @var \metastore\HiveObjectPrivilege[] + */ + 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; + + /** + * @var array + */ + public $userPrivileges = null; + /** + * @var array + */ + public $groupPrivileges = null; + /** + * @var array + */ + 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 GrantRevokePrivilegeRequest { + static $_TSPEC; + + /** + * @var int + */ + public $requestType = null; + /** + * @var \metastore\PrivilegeBag + */ + public $privileges = null; + /** + * @var bool + */ + public $revokeGrantOption = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'requestType', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrivilegeBag', + ), + 3 => array( + 'var' => 'revokeGrantOption', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['requestType'])) { + $this->requestType = $vals['requestType']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + if (isset($vals['revokeGrantOption'])) { + $this->revokeGrantOption = $vals['revokeGrantOption']; + } + } + } + + public function getName() { + return 'GrantRevokePrivilegeRequest'; + } + + 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->requestType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->privileges = new \metastore\PrivilegeBag(); + $xfer += $this->privileges->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->revokeGrantOption); + } 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('GrantRevokePrivilegeRequest'); + if ($this->requestType !== null) { + $xfer += $output->writeFieldBegin('requestType', TType::I32, 1); + $xfer += $output->writeI32($this->requestType); + $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, 2); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->revokeGrantOption !== null) { + $xfer += $output->writeFieldBegin('revokeGrantOption', TType::BOOL, 3); + $xfer += $output->writeBool($this->revokeGrantOption); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GrantRevokePrivilegeResponse { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'GrantRevokePrivilegeResponse'; + } + + 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::BOOL) { + $xfer += $input->readBool($this->success); + } 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('GrantRevokePrivilegeResponse'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 1); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Role { + static $_TSPEC; + + /** + * @var string + */ + public $roleName = null; + /** + * @var int + */ + public $createTime = null; + /** + * @var string + */ + 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 RolePrincipalGrant { + static $_TSPEC; + + /** + * @var string + */ + public $roleName = null; + /** + * @var string + */ + public $principalName = null; + /** + * @var int + */ + public $principalType = null; + /** + * @var bool + */ + public $grantOption = null; + /** + * @var int + */ + public $grantTime = null; + /** + * @var string + */ + public $grantorName = null; + /** + * @var int + */ + public $grantorPrincipalType = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'roleName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'principalName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'principalType', + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'grantOption', + 'type' => TType::BOOL, + ), + 5 => array( + 'var' => 'grantTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'grantorName', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'grantorPrincipalType', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['roleName'])) { + $this->roleName = $vals['roleName']; + } + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; + } + if (isset($vals['principalType'])) { + $this->principalType = $vals['principalType']; + } + if (isset($vals['grantOption'])) { + $this->grantOption = $vals['grantOption']; + } + if (isset($vals['grantTime'])) { + $this->grantTime = $vals['grantTime']; + } + if (isset($vals['grantorName'])) { + $this->grantorName = $vals['grantorName']; + } + if (isset($vals['grantorPrincipalType'])) { + $this->grantorPrincipalType = $vals['grantorPrincipalType']; + } + } + } + + public function getName() { + return 'RolePrincipalGrant'; + } + + 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::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::BOOL) { + $xfer += $input->readBool($this->grantOption); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->grantTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantorName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->grantorPrincipalType); + } 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('RolePrincipalGrant'); + if ($this->roleName !== null) { + $xfer += $output->writeFieldBegin('roleName', TType::STRING, 1); + $xfer += $output->writeString($this->roleName); + $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->grantOption !== null) { + $xfer += $output->writeFieldBegin('grantOption', TType::BOOL, 4); + $xfer += $output->writeBool($this->grantOption); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantTime !== null) { + $xfer += $output->writeFieldBegin('grantTime', TType::I32, 5); + $xfer += $output->writeI32($this->grantTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantorName !== null) { + $xfer += $output->writeFieldBegin('grantorName', TType::STRING, 6); + $xfer += $output->writeString($this->grantorName); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantorPrincipalType !== null) { + $xfer += $output->writeFieldBegin('grantorPrincipalType', TType::I32, 7); + $xfer += $output->writeI32($this->grantorPrincipalType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetRoleGrantsForPrincipalRequest { + static $_TSPEC; + + /** + * @var string + */ + public $principal_name = null; + /** + * @var int + */ + 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 'GetRoleGrantsForPrincipalRequest'; + } + + 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('GetRoleGrantsForPrincipalRequest'); + 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 GetRoleGrantsForPrincipalResponse { + static $_TSPEC; + + /** + * @var \metastore\RolePrincipalGrant[] + */ + public $principalGrants = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'principalGrants', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\RolePrincipalGrant', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['principalGrants'])) { + $this->principalGrants = $vals['principalGrants']; + } + } + } + + public function getName() { + return 'GetRoleGrantsForPrincipalResponse'; + } + + 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->principalGrants = array(); + $_size69 = 0; + $_etype72 = 0; + $xfer += $input->readListBegin($_etype72, $_size69); + for ($_i73 = 0; $_i73 < $_size69; ++$_i73) + { + $elem74 = null; + $elem74 = new \metastore\RolePrincipalGrant(); + $xfer += $elem74->read($input); + $this->principalGrants []= $elem74; + } + $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('GetRoleGrantsForPrincipalResponse'); + if ($this->principalGrants !== null) { + if (!is_array($this->principalGrants)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('principalGrants', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->principalGrants)); + { + foreach ($this->principalGrants as $iter75) + { + $xfer += $iter75->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetPrincipalsInRoleRequest { + static $_TSPEC; + + /** + * @var string + */ + public $roleName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'roleName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['roleName'])) { + $this->roleName = $vals['roleName']; + } + } + } + + public function getName() { + return 'GetPrincipalsInRoleRequest'; + } + + 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; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('GetPrincipalsInRoleRequest'); + if ($this->roleName !== null) { + $xfer += $output->writeFieldBegin('roleName', TType::STRING, 1); + $xfer += $output->writeString($this->roleName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetPrincipalsInRoleResponse { + static $_TSPEC; + + /** + * @var \metastore\RolePrincipalGrant[] + */ + public $principalGrants = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'principalGrants', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\RolePrincipalGrant', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['principalGrants'])) { + $this->principalGrants = $vals['principalGrants']; + } + } + } + + public function getName() { + return 'GetPrincipalsInRoleResponse'; + } + + 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->principalGrants = array(); + $_size76 = 0; + $_etype79 = 0; + $xfer += $input->readListBegin($_etype79, $_size76); + for ($_i80 = 0; $_i80 < $_size76; ++$_i80) + { + $elem81 = null; + $elem81 = new \metastore\RolePrincipalGrant(); + $xfer += $elem81->read($input); + $this->principalGrants []= $elem81; + } + $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('GetPrincipalsInRoleResponse'); + if ($this->principalGrants !== null) { + if (!is_array($this->principalGrants)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('principalGrants', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->principalGrants)); + { + foreach ($this->principalGrants as $iter82) + { + $xfer += $iter82->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GrantRevokeRoleRequest { + static $_TSPEC; + + /** + * @var int + */ + public $requestType = null; + /** + * @var string + */ + public $roleName = null; + /** + * @var string + */ + public $principalName = null; + /** + * @var int + */ + public $principalType = null; + /** + * @var string + */ + public $grantor = null; + /** + * @var int + */ + public $grantorType = null; + /** + * @var bool + */ + public $grantOption = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'requestType', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'roleName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'principalName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'principalType', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'grantorType', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'grantOption', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['requestType'])) { + $this->requestType = $vals['requestType']; + } + if (isset($vals['roleName'])) { + $this->roleName = $vals['roleName']; + } + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; + } + if (isset($vals['principalType'])) { + $this->principalType = $vals['principalType']; + } + 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 'GrantRevokeRoleRequest'; + } + + 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->requestType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->roleName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principalName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principalType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->grantorType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + 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('GrantRevokeRoleRequest'); + if ($this->requestType !== null) { + $xfer += $output->writeFieldBegin('requestType', TType::I32, 1); + $xfer += $output->writeI32($this->requestType); + $xfer += $output->writeFieldEnd(); + } + if ($this->roleName !== null) { + $xfer += $output->writeFieldBegin('roleName', TType::STRING, 2); + $xfer += $output->writeString($this->roleName); + $xfer += $output->writeFieldEnd(); + } + if ($this->principalName !== null) { + $xfer += $output->writeFieldBegin('principalName', TType::STRING, 3); + $xfer += $output->writeString($this->principalName); + $xfer += $output->writeFieldEnd(); + } + if ($this->principalType !== null) { + $xfer += $output->writeFieldBegin('principalType', TType::I32, 4); + $xfer += $output->writeI32($this->principalType); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 5); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantorType !== null) { + $xfer += $output->writeFieldBegin('grantorType', TType::I32, 6); + $xfer += $output->writeI32($this->grantorType); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantOption !== null) { + $xfer += $output->writeFieldBegin('grantOption', TType::BOOL, 7); + $xfer += $output->writeBool($this->grantOption); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GrantRevokeRoleResponse { + static $_TSPEC; + + /** + * @var bool + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'GrantRevokeRoleResponse'; + } + + 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::BOOL) { + $xfer += $input->readBool($this->success); + } 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('GrantRevokeRoleResponse'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 1); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Database { + static $_TSPEC; + + /** + * @var string + */ + public $name = null; + /** + * @var string + */ + public $description = null; + /** + * @var string + */ + public $locationUri = null; + /** + * @var array + */ + public $parameters = null; + /** + * @var \metastore\PrincipalPrivilegeSet + */ + public $privileges = null; + /** + * @var string + */ + public $ownerName = null; + /** + * @var int + */ + public $ownerType = 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', + ), + 6 => array( + 'var' => 'ownerName', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'ownerType', + 'type' => TType::I32, + ), + ); + } + 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']; + } + if (isset($vals['ownerName'])) { + $this->ownerName = $vals['ownerName']; + } + if (isset($vals['ownerType'])) { + $this->ownerType = $vals['ownerType']; + } + } + } + + 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(); + $_size83 = 0; + $_ktype84 = 0; + $_vtype85 = 0; + $xfer += $input->readMapBegin($_ktype84, $_vtype85, $_size83); + for ($_i87 = 0; $_i87 < $_size83; ++$_i87) + { + $key88 = ''; + $val89 = ''; + $xfer += $input->readString($key88); + $xfer += $input->readString($val89); + $this->parameters[$key88] = $val89; + } + $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; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->ownerName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->ownerType); + } 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 $kiter90 => $viter91) + { + $xfer += $output->writeString($kiter90); + $xfer += $output->writeString($viter91); + } + } + $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(); + } + if ($this->ownerName !== null) { + $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 6); + $xfer += $output->writeString($this->ownerName); + $xfer += $output->writeFieldEnd(); + } + if ($this->ownerType !== null) { + $xfer += $output->writeFieldBegin('ownerType', TType::I32, 7); + $xfer += $output->writeI32($this->ownerType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class SerDeInfo { + static $_TSPEC; + + /** + * @var string + */ + public $name = null; + /** + * @var string + */ + public $serializationLib = null; + /** + * @var array + */ + 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(); + $_size92 = 0; + $_ktype93 = 0; + $_vtype94 = 0; + $xfer += $input->readMapBegin($_ktype93, $_vtype94, $_size92); + for ($_i96 = 0; $_i96 < $_size92; ++$_i96) + { + $key97 = ''; + $val98 = ''; + $xfer += $input->readString($key97); + $xfer += $input->readString($val98); + $this->parameters[$key97] = $val98; + } + $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 $kiter99 => $viter100) + { + $xfer += $output->writeString($kiter99); + $xfer += $output->writeString($viter100); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Order { + static $_TSPEC; + + /** + * @var string + */ + public $col = null; + /** + * @var int + */ + 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; + + /** + * @var string[] + */ + public $skewedColNames = null; + /** + * @var (string[])[] + */ + public $skewedColValues = null; + /** + * @var array + */ + 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(); + $_size101 = 0; + $_etype104 = 0; + $xfer += $input->readListBegin($_etype104, $_size101); + for ($_i105 = 0; $_i105 < $_size101; ++$_i105) + { + $elem106 = null; + $xfer += $input->readString($elem106); + $this->skewedColNames []= $elem106; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->skewedColValues = array(); + $_size107 = 0; + $_etype110 = 0; + $xfer += $input->readListBegin($_etype110, $_size107); + for ($_i111 = 0; $_i111 < $_size107; ++$_i111) + { + $elem112 = null; + $elem112 = array(); + $_size113 = 0; + $_etype116 = 0; + $xfer += $input->readListBegin($_etype116, $_size113); + for ($_i117 = 0; $_i117 < $_size113; ++$_i117) + { + $elem118 = null; + $xfer += $input->readString($elem118); + $elem112 []= $elem118; + } + $xfer += $input->readListEnd(); + $this->skewedColValues []= $elem112; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->skewedColValueLocationMaps = array(); + $_size119 = 0; + $_ktype120 = 0; + $_vtype121 = 0; + $xfer += $input->readMapBegin($_ktype120, $_vtype121, $_size119); + for ($_i123 = 0; $_i123 < $_size119; ++$_i123) + { + $key124 = array(); + $val125 = ''; + $key124 = array(); + $_size126 = 0; + $_etype129 = 0; + $xfer += $input->readListBegin($_etype129, $_size126); + for ($_i130 = 0; $_i130 < $_size126; ++$_i130) + { + $elem131 = null; + $xfer += $input->readString($elem131); + $key124 []= $elem131; + } + $xfer += $input->readListEnd(); + $xfer += $input->readString($val125); + $this->skewedColValueLocationMaps[$key124] = $val125; + } + $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 $iter132) + { + $xfer += $output->writeString($iter132); + } + } + $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 $iter133) + { + { + $output->writeListBegin(TType::STRING, count($iter133)); + { + foreach ($iter133 as $iter134) + { + $xfer += $output->writeString($iter134); + } + } + $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 $kiter135 => $viter136) + { + { + $output->writeListBegin(TType::STRING, count($kiter135)); + { + foreach ($kiter135 as $iter137) + { + $xfer += $output->writeString($iter137); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeString($viter136); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class StorageDescriptor { + static $_TSPEC; + + /** + * @var \metastore\FieldSchema[] + */ + public $cols = null; + /** + * @var string + */ + public $location = null; + /** + * @var string + */ + public $inputFormat = null; + /** + * @var string + */ + public $outputFormat = null; + /** + * @var bool + */ + public $compressed = null; + /** + * @var int + */ + public $numBuckets = null; + /** + * @var \metastore\SerDeInfo + */ + public $serdeInfo = null; + /** + * @var string[] + */ + public $bucketCols = null; + /** + * @var \metastore\Order[] + */ + public $sortCols = null; + /** + * @var array + */ + public $parameters = null; + /** + * @var \metastore\SkewedInfo + */ + public $skewedInfo = null; + /** + * @var bool + */ + public $storedAsSubDirectories = 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', + ), + 12 => array( + 'var' => 'storedAsSubDirectories', + 'type' => TType::BOOL, + ), + ); + } + 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']; + } + if (isset($vals['storedAsSubDirectories'])) { + $this->storedAsSubDirectories = $vals['storedAsSubDirectories']; + } + } + } + + 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(); + $_size138 = 0; + $_etype141 = 0; + $xfer += $input->readListBegin($_etype141, $_size138); + for ($_i142 = 0; $_i142 < $_size138; ++$_i142) + { + $elem143 = null; + $elem143 = new \metastore\FieldSchema(); + $xfer += $elem143->read($input); + $this->cols []= $elem143; + } + $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(); + $_size144 = 0; + $_etype147 = 0; + $xfer += $input->readListBegin($_etype147, $_size144); + for ($_i148 = 0; $_i148 < $_size144; ++$_i148) + { + $elem149 = null; + $xfer += $input->readString($elem149); + $this->bucketCols []= $elem149; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::LST) { + $this->sortCols = array(); + $_size150 = 0; + $_etype153 = 0; + $xfer += $input->readListBegin($_etype153, $_size150); + for ($_i154 = 0; $_i154 < $_size150; ++$_i154) + { + $elem155 = null; + $elem155 = new \metastore\Order(); + $xfer += $elem155->read($input); + $this->sortCols []= $elem155; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size156 = 0; + $_ktype157 = 0; + $_vtype158 = 0; + $xfer += $input->readMapBegin($_ktype157, $_vtype158, $_size156); + for ($_i160 = 0; $_i160 < $_size156; ++$_i160) + { + $key161 = ''; + $val162 = ''; + $xfer += $input->readString($key161); + $xfer += $input->readString($val162); + $this->parameters[$key161] = $val162; + } + $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; + case 12: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->storedAsSubDirectories); + } 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 $iter163) + { + $xfer += $iter163->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 $iter164) + { + $xfer += $output->writeString($iter164); + } + } + $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 $iter165) + { + $xfer += $iter165->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 $kiter166 => $viter167) + { + $xfer += $output->writeString($kiter166); + $xfer += $output->writeString($viter167); + } + } + $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(); + } + if ($this->storedAsSubDirectories !== null) { + $xfer += $output->writeFieldBegin('storedAsSubDirectories', TType::BOOL, 12); + $xfer += $output->writeBool($this->storedAsSubDirectories); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Table { + static $_TSPEC; + + /** + * @var string + */ + public $tableName = null; + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $owner = null; + /** + * @var int + */ + public $createTime = null; + /** + * @var int + */ + public $lastAccessTime = null; + /** + * @var int + */ + public $retention = null; + /** + * @var \metastore\StorageDescriptor + */ + public $sd = null; + /** + * @var \metastore\FieldSchema[] + */ + public $partitionKeys = null; + /** + * @var array + */ + public $parameters = null; + /** + * @var string + */ + public $viewOriginalText = null; + /** + * @var string + */ + public $viewExpandedText = null; + /** + * @var string + */ + public $tableType = null; + /** + * @var \metastore\PrincipalPrivilegeSet + */ + public $privileges = null; + /** + * @var bool + */ + public $temporary = false; + /** + * @var bool + */ + public $rewriteEnabled = 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', + ), + 14 => array( + 'var' => 'temporary', + 'type' => TType::BOOL, + ), + 15 => array( + 'var' => 'rewriteEnabled', + 'type' => TType::BOOL, + ), + ); + } + 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']; + } + if (isset($vals['temporary'])) { + $this->temporary = $vals['temporary']; + } + if (isset($vals['rewriteEnabled'])) { + $this->rewriteEnabled = $vals['rewriteEnabled']; + } + } + } + + 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(); + $_size168 = 0; + $_etype171 = 0; + $xfer += $input->readListBegin($_etype171, $_size168); + for ($_i172 = 0; $_i172 < $_size168; ++$_i172) + { + $elem173 = null; + $elem173 = new \metastore\FieldSchema(); + $xfer += $elem173->read($input); + $this->partitionKeys []= $elem173; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size174 = 0; + $_ktype175 = 0; + $_vtype176 = 0; + $xfer += $input->readMapBegin($_ktype175, $_vtype176, $_size174); + for ($_i178 = 0; $_i178 < $_size174; ++$_i178) + { + $key179 = ''; + $val180 = ''; + $xfer += $input->readString($key179); + $xfer += $input->readString($val180); + $this->parameters[$key179] = $val180; + } + $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; + case 14: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->temporary); + } else { + $xfer += $input->skip($ftype); + } + break; + case 15: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->rewriteEnabled); + } 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 $iter181) + { + $xfer += $iter181->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 $kiter182 => $viter183) + { + $xfer += $output->writeString($kiter182); + $xfer += $output->writeString($viter183); + } + } + $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(); + } + if ($this->temporary !== null) { + $xfer += $output->writeFieldBegin('temporary', TType::BOOL, 14); + $xfer += $output->writeBool($this->temporary); + $xfer += $output->writeFieldEnd(); + } + if ($this->rewriteEnabled !== null) { + $xfer += $output->writeFieldBegin('rewriteEnabled', TType::BOOL, 15); + $xfer += $output->writeBool($this->rewriteEnabled); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Partition { + static $_TSPEC; + + /** + * @var string[] + */ + public $values = null; + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tableName = null; + /** + * @var int + */ + public $createTime = null; + /** + * @var int + */ + public $lastAccessTime = null; + /** + * @var \metastore\StorageDescriptor + */ + public $sd = null; + /** + * @var array + */ + public $parameters = null; + /** + * @var \metastore\PrincipalPrivilegeSet + */ + 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(); + $_size184 = 0; + $_etype187 = 0; + $xfer += $input->readListBegin($_etype187, $_size184); + for ($_i188 = 0; $_i188 < $_size184; ++$_i188) + { + $elem189 = null; + $xfer += $input->readString($elem189); + $this->values []= $elem189; + } + $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(); + $_size190 = 0; + $_ktype191 = 0; + $_vtype192 = 0; + $xfer += $input->readMapBegin($_ktype191, $_vtype192, $_size190); + for ($_i194 = 0; $_i194 < $_size190; ++$_i194) + { + $key195 = ''; + $val196 = ''; + $xfer += $input->readString($key195); + $xfer += $input->readString($val196); + $this->parameters[$key195] = $val196; + } + $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 $iter197) + { + $xfer += $output->writeString($iter197); + } + } + $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 $kiter198 => $viter199) + { + $xfer += $output->writeString($kiter198); + $xfer += $output->writeString($viter199); + } + } + $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 PartitionWithoutSD { + static $_TSPEC; + + /** + * @var string[] + */ + public $values = null; + /** + * @var int + */ + public $createTime = null; + /** + * @var int + */ + public $lastAccessTime = null; + /** + * @var string + */ + public $relativePath = null; + /** + * @var array + */ + public $parameters = null; + /** + * @var \metastore\PrincipalPrivilegeSet + */ + 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' => 'createTime', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'lastAccessTime', + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'relativePath', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 6 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => '\metastore\PrincipalPrivilegeSet', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['values'])) { + $this->values = $vals['values']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['lastAccessTime'])) { + $this->lastAccessTime = $vals['lastAccessTime']; + } + if (isset($vals['relativePath'])) { + $this->relativePath = $vals['relativePath']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + public function getName() { + return 'PartitionWithoutSD'; + } + + 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(); + $_size200 = 0; + $_etype203 = 0; + $xfer += $input->readListBegin($_etype203, $_size200); + for ($_i204 = 0; $_i204 < $_size200; ++$_i204) + { + $elem205 = null; + $xfer += $input->readString($elem205); + $this->values []= $elem205; + } + $xfer += $input->readListEnd(); + } 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::I32) { + $xfer += $input->readI32($this->lastAccessTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->relativePath); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size206 = 0; + $_ktype207 = 0; + $_vtype208 = 0; + $xfer += $input->readMapBegin($_ktype207, $_vtype208, $_size206); + for ($_i210 = 0; $_i210 < $_size206; ++$_i210) + { + $key211 = ''; + $val212 = ''; + $xfer += $input->readString($key211); + $xfer += $input->readString($val212); + $this->parameters[$key211] = $val212; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + 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('PartitionWithoutSD'); + 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 $iter213) + { + $xfer += $output->writeString($iter213); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 2); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAccessTime !== null) { + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 3); + $xfer += $output->writeI32($this->lastAccessTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->relativePath !== null) { + $xfer += $output->writeFieldBegin('relativePath', TType::STRING, 4); + $xfer += $output->writeString($this->relativePath); + $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, 5); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter214 => $viter215) + { + $xfer += $output->writeString($kiter214); + $xfer += $output->writeString($viter215); + } + } + $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, 6); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PartitionSpecWithSharedSD { + static $_TSPEC; + + /** + * @var \metastore\PartitionWithoutSD[] + */ + public $partitions = null; + /** + * @var \metastore\StorageDescriptor + */ + public $sd = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'partitions', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\PartitionWithoutSD', + ), + ), + 2 => array( + 'var' => 'sd', + 'type' => TType::STRUCT, + 'class' => '\metastore\StorageDescriptor', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['partitions'])) { + $this->partitions = $vals['partitions']; + } + if (isset($vals['sd'])) { + $this->sd = $vals['sd']; + } + } + } + + public function getName() { + return 'PartitionSpecWithSharedSD'; + } + + 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->partitions = array(); + $_size216 = 0; + $_etype219 = 0; + $xfer += $input->readListBegin($_etype219, $_size216); + for ($_i220 = 0; $_i220 < $_size216; ++$_i220) + { + $elem221 = null; + $elem221 = new \metastore\PartitionWithoutSD(); + $xfer += $elem221->read($input); + $this->partitions []= $elem221; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->sd = new \metastore\StorageDescriptor(); + $xfer += $this->sd->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('PartitionSpecWithSharedSD'); + if ($this->partitions !== null) { + if (!is_array($this->partitions)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitions', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->partitions)); + { + foreach ($this->partitions as $iter222) + { + $xfer += $iter222->write($output); + } + } + $output->writeListEnd(); + } + $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, 2); + $xfer += $this->sd->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PartitionListComposingSpec { + static $_TSPEC; + + /** + * @var \metastore\Partition[] + */ + public $partitions = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'partitions', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['partitions'])) { + $this->partitions = $vals['partitions']; + } + } + } + + public function getName() { + return 'PartitionListComposingSpec'; + } + + 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->partitions = array(); + $_size223 = 0; + $_etype226 = 0; + $xfer += $input->readListBegin($_etype226, $_size223); + for ($_i227 = 0; $_i227 < $_size223; ++$_i227) + { + $elem228 = null; + $elem228 = new \metastore\Partition(); + $xfer += $elem228->read($input); + $this->partitions []= $elem228; + } + $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('PartitionListComposingSpec'); + if ($this->partitions !== null) { + if (!is_array($this->partitions)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitions', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->partitions)); + { + foreach ($this->partitions as $iter229) + { + $xfer += $iter229->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PartitionSpec { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tableName = null; + /** + * @var string + */ + public $rootPath = null; + /** + * @var \metastore\PartitionSpecWithSharedSD + */ + public $sharedSDPartitionSpec = null; + /** + * @var \metastore\PartitionListComposingSpec + */ + public $partitionList = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'rootPath', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'sharedSDPartitionSpec', + 'type' => TType::STRUCT, + 'class' => '\metastore\PartitionSpecWithSharedSD', + ), + 5 => array( + 'var' => 'partitionList', + 'type' => TType::STRUCT, + 'class' => '\metastore\PartitionListComposingSpec', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['rootPath'])) { + $this->rootPath = $vals['rootPath']; + } + if (isset($vals['sharedSDPartitionSpec'])) { + $this->sharedSDPartitionSpec = $vals['sharedSDPartitionSpec']; + } + if (isset($vals['partitionList'])) { + $this->partitionList = $vals['partitionList']; + } + } + } + + public function getName() { + return 'PartitionSpec'; + } + + 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->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->rootPath); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->sharedSDPartitionSpec = new \metastore\PartitionSpecWithSharedSD(); + $xfer += $this->sharedSDPartitionSpec->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->partitionList = new \metastore\PartitionListComposingSpec(); + $xfer += $this->partitionList->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('PartitionSpec'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 2); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->rootPath !== null) { + $xfer += $output->writeFieldBegin('rootPath', TType::STRING, 3); + $xfer += $output->writeString($this->rootPath); + $xfer += $output->writeFieldEnd(); + } + if ($this->sharedSDPartitionSpec !== null) { + if (!is_object($this->sharedSDPartitionSpec)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sharedSDPartitionSpec', TType::STRUCT, 4); + $xfer += $this->sharedSDPartitionSpec->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionList !== null) { + if (!is_object($this->partitionList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitionList', TType::STRUCT, 5); + $xfer += $this->partitionList->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Index { + static $_TSPEC; + + /** + * @var string + */ + public $indexName = null; + /** + * @var string + */ + public $indexHandlerClass = null; + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $origTableName = null; + /** + * @var int + */ + public $createTime = null; + /** + * @var int + */ + public $lastAccessTime = null; + /** + * @var string + */ + public $indexTableName = null; + /** + * @var \metastore\StorageDescriptor + */ + public $sd = null; + /** + * @var array + */ + public $parameters = null; + /** + * @var bool + */ + 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(); + $_size230 = 0; + $_ktype231 = 0; + $_vtype232 = 0; + $xfer += $input->readMapBegin($_ktype231, $_vtype232, $_size230); + for ($_i234 = 0; $_i234 < $_size230; ++$_i234) + { + $key235 = ''; + $val236 = ''; + $xfer += $input->readString($key235); + $xfer += $input->readString($val236); + $this->parameters[$key235] = $val236; + } + $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 $kiter237 => $viter238) + { + $xfer += $output->writeString($kiter237); + $xfer += $output->writeString($viter238); + } + } + $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 BooleanColumnStatsData { + static $_TSPEC; + + /** + * @var int + */ + public $numTrues = null; + /** + * @var int + */ + public $numFalses = null; + /** + * @var int + */ + public $numNulls = null; + /** + * @var string + */ + public $bitVectors = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'numTrues', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'numFalses', + 'type' => TType::I64, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'bitVectors', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['numTrues'])) { + $this->numTrues = $vals['numTrues']; + } + if (isset($vals['numFalses'])) { + $this->numFalses = $vals['numFalses']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['bitVectors'])) { + $this->bitVectors = $vals['bitVectors']; + } + } + } + + public function getName() { + return 'BooleanColumnStatsData'; + } + + 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::I64) { + $xfer += $input->readI64($this->numTrues); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numFalses); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->bitVectors); + } 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('BooleanColumnStatsData'); + if ($this->numTrues !== null) { + $xfer += $output->writeFieldBegin('numTrues', TType::I64, 1); + $xfer += $output->writeI64($this->numTrues); + $xfer += $output->writeFieldEnd(); + } + if ($this->numFalses !== null) { + $xfer += $output->writeFieldBegin('numFalses', TType::I64, 2); + $xfer += $output->writeI64($this->numFalses); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->bitVectors !== null) { + $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 4); + $xfer += $output->writeString($this->bitVectors); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class DoubleColumnStatsData { + static $_TSPEC; + + /** + * @var double + */ + public $lowValue = null; + /** + * @var double + */ + public $highValue = null; + /** + * @var int + */ + public $numNulls = null; + /** + * @var int + */ + public $numDVs = null; + /** + * @var string + */ + public $bitVectors = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lowValue', + 'type' => TType::DOUBLE, + ), + 2 => array( + 'var' => 'highValue', + 'type' => TType::DOUBLE, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'numDVs', + 'type' => TType::I64, + ), + 5 => array( + 'var' => 'bitVectors', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lowValue'])) { + $this->lowValue = $vals['lowValue']; + } + if (isset($vals['highValue'])) { + $this->highValue = $vals['highValue']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['numDVs'])) { + $this->numDVs = $vals['numDVs']; + } + if (isset($vals['bitVectors'])) { + $this->bitVectors = $vals['bitVectors']; + } + } + } + + public function getName() { + return 'DoubleColumnStatsData'; + } + + 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::DOUBLE) { + $xfer += $input->readDouble($this->lowValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->highValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numDVs); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->bitVectors); + } 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('DoubleColumnStatsData'); + if ($this->lowValue !== null) { + $xfer += $output->writeFieldBegin('lowValue', TType::DOUBLE, 1); + $xfer += $output->writeDouble($this->lowValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->highValue !== null) { + $xfer += $output->writeFieldBegin('highValue', TType::DOUBLE, 2); + $xfer += $output->writeDouble($this->highValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->numDVs !== null) { + $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); + $xfer += $output->writeI64($this->numDVs); + $xfer += $output->writeFieldEnd(); + } + if ($this->bitVectors !== null) { + $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 5); + $xfer += $output->writeString($this->bitVectors); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class LongColumnStatsData { + static $_TSPEC; + + /** + * @var int + */ + public $lowValue = null; + /** + * @var int + */ + public $highValue = null; + /** + * @var int + */ + public $numNulls = null; + /** + * @var int + */ + public $numDVs = null; + /** + * @var string + */ + public $bitVectors = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lowValue', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'highValue', + 'type' => TType::I64, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'numDVs', + 'type' => TType::I64, + ), + 5 => array( + 'var' => 'bitVectors', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lowValue'])) { + $this->lowValue = $vals['lowValue']; + } + if (isset($vals['highValue'])) { + $this->highValue = $vals['highValue']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['numDVs'])) { + $this->numDVs = $vals['numDVs']; + } + if (isset($vals['bitVectors'])) { + $this->bitVectors = $vals['bitVectors']; + } + } + } + + public function getName() { + return 'LongColumnStatsData'; + } + + 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::I64) { + $xfer += $input->readI64($this->lowValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->highValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numDVs); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->bitVectors); + } 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('LongColumnStatsData'); + if ($this->lowValue !== null) { + $xfer += $output->writeFieldBegin('lowValue', TType::I64, 1); + $xfer += $output->writeI64($this->lowValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->highValue !== null) { + $xfer += $output->writeFieldBegin('highValue', TType::I64, 2); + $xfer += $output->writeI64($this->highValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->numDVs !== null) { + $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); + $xfer += $output->writeI64($this->numDVs); + $xfer += $output->writeFieldEnd(); + } + if ($this->bitVectors !== null) { + $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 5); + $xfer += $output->writeString($this->bitVectors); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class StringColumnStatsData { + static $_TSPEC; + + /** + * @var int + */ + public $maxColLen = null; + /** + * @var double + */ + public $avgColLen = null; + /** + * @var int + */ + public $numNulls = null; + /** + * @var int + */ + public $numDVs = null; + /** + * @var string + */ + public $bitVectors = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'maxColLen', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'avgColLen', + 'type' => TType::DOUBLE, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'numDVs', + 'type' => TType::I64, + ), + 5 => array( + 'var' => 'bitVectors', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['maxColLen'])) { + $this->maxColLen = $vals['maxColLen']; + } + if (isset($vals['avgColLen'])) { + $this->avgColLen = $vals['avgColLen']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['numDVs'])) { + $this->numDVs = $vals['numDVs']; + } + if (isset($vals['bitVectors'])) { + $this->bitVectors = $vals['bitVectors']; + } + } + } + + public function getName() { + return 'StringColumnStatsData'; + } + + 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::I64) { + $xfer += $input->readI64($this->maxColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->avgColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numDVs); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->bitVectors); + } 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('StringColumnStatsData'); + if ($this->maxColLen !== null) { + $xfer += $output->writeFieldBegin('maxColLen', TType::I64, 1); + $xfer += $output->writeI64($this->maxColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->avgColLen !== null) { + $xfer += $output->writeFieldBegin('avgColLen', TType::DOUBLE, 2); + $xfer += $output->writeDouble($this->avgColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->numDVs !== null) { + $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); + $xfer += $output->writeI64($this->numDVs); + $xfer += $output->writeFieldEnd(); + } + if ($this->bitVectors !== null) { + $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 5); + $xfer += $output->writeString($this->bitVectors); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class BinaryColumnStatsData { + static $_TSPEC; + + /** + * @var int + */ + public $maxColLen = null; + /** + * @var double + */ + public $avgColLen = null; + /** + * @var int + */ + public $numNulls = null; + /** + * @var string + */ + public $bitVectors = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'maxColLen', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'avgColLen', + 'type' => TType::DOUBLE, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'bitVectors', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['maxColLen'])) { + $this->maxColLen = $vals['maxColLen']; + } + if (isset($vals['avgColLen'])) { + $this->avgColLen = $vals['avgColLen']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['bitVectors'])) { + $this->bitVectors = $vals['bitVectors']; + } + } + } + + public function getName() { + return 'BinaryColumnStatsData'; + } + + 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::I64) { + $xfer += $input->readI64($this->maxColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->avgColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->bitVectors); + } 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('BinaryColumnStatsData'); + if ($this->maxColLen !== null) { + $xfer += $output->writeFieldBegin('maxColLen', TType::I64, 1); + $xfer += $output->writeI64($this->maxColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->avgColLen !== null) { + $xfer += $output->writeFieldBegin('avgColLen', TType::DOUBLE, 2); + $xfer += $output->writeDouble($this->avgColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->bitVectors !== null) { + $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 4); + $xfer += $output->writeString($this->bitVectors); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Decimal { + static $_TSPEC; + + /** + * @var string + */ + public $unscaled = null; + /** + * @var int + */ + public $scale = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'unscaled', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'scale', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['unscaled'])) { + $this->unscaled = $vals['unscaled']; + } + if (isset($vals['scale'])) { + $this->scale = $vals['scale']; + } + } + } + + public function getName() { + return 'Decimal'; + } + + 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->unscaled); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->scale); + } 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('Decimal'); + if ($this->unscaled !== null) { + $xfer += $output->writeFieldBegin('unscaled', TType::STRING, 1); + $xfer += $output->writeString($this->unscaled); + $xfer += $output->writeFieldEnd(); + } + if ($this->scale !== null) { + $xfer += $output->writeFieldBegin('scale', TType::I16, 3); + $xfer += $output->writeI16($this->scale); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class DecimalColumnStatsData { + static $_TSPEC; + + /** + * @var \metastore\Decimal + */ + public $lowValue = null; + /** + * @var \metastore\Decimal + */ + public $highValue = null; + /** + * @var int + */ + public $numNulls = null; + /** + * @var int + */ + public $numDVs = null; + /** + * @var string + */ + public $bitVectors = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lowValue', + 'type' => TType::STRUCT, + 'class' => '\metastore\Decimal', + ), + 2 => array( + 'var' => 'highValue', + 'type' => TType::STRUCT, + 'class' => '\metastore\Decimal', + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'numDVs', + 'type' => TType::I64, + ), + 5 => array( + 'var' => 'bitVectors', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lowValue'])) { + $this->lowValue = $vals['lowValue']; + } + if (isset($vals['highValue'])) { + $this->highValue = $vals['highValue']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['numDVs'])) { + $this->numDVs = $vals['numDVs']; + } + if (isset($vals['bitVectors'])) { + $this->bitVectors = $vals['bitVectors']; + } + } + } + + public function getName() { + return 'DecimalColumnStatsData'; + } + + 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->lowValue = new \metastore\Decimal(); + $xfer += $this->lowValue->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->highValue = new \metastore\Decimal(); + $xfer += $this->highValue->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numDVs); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->bitVectors); + } 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('DecimalColumnStatsData'); + if ($this->lowValue !== null) { + if (!is_object($this->lowValue)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('lowValue', TType::STRUCT, 1); + $xfer += $this->lowValue->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->highValue !== null) { + if (!is_object($this->highValue)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('highValue', TType::STRUCT, 2); + $xfer += $this->highValue->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->numDVs !== null) { + $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); + $xfer += $output->writeI64($this->numDVs); + $xfer += $output->writeFieldEnd(); + } + if ($this->bitVectors !== null) { + $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 5); + $xfer += $output->writeString($this->bitVectors); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Date { + static $_TSPEC; + + /** + * @var int + */ + public $daysSinceEpoch = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'daysSinceEpoch', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['daysSinceEpoch'])) { + $this->daysSinceEpoch = $vals['daysSinceEpoch']; + } + } + } + + public function getName() { + return 'Date'; + } + + 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::I64) { + $xfer += $input->readI64($this->daysSinceEpoch); + } 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('Date'); + if ($this->daysSinceEpoch !== null) { + $xfer += $output->writeFieldBegin('daysSinceEpoch', TType::I64, 1); + $xfer += $output->writeI64($this->daysSinceEpoch); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class DateColumnStatsData { + static $_TSPEC; + + /** + * @var \metastore\Date + */ + public $lowValue = null; + /** + * @var \metastore\Date + */ + public $highValue = null; + /** + * @var int + */ + public $numNulls = null; + /** + * @var int + */ + public $numDVs = null; + /** + * @var string + */ + public $bitVectors = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lowValue', + 'type' => TType::STRUCT, + 'class' => '\metastore\Date', + ), + 2 => array( + 'var' => 'highValue', + 'type' => TType::STRUCT, + 'class' => '\metastore\Date', + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'numDVs', + 'type' => TType::I64, + ), + 5 => array( + 'var' => 'bitVectors', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lowValue'])) { + $this->lowValue = $vals['lowValue']; + } + if (isset($vals['highValue'])) { + $this->highValue = $vals['highValue']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['numDVs'])) { + $this->numDVs = $vals['numDVs']; + } + if (isset($vals['bitVectors'])) { + $this->bitVectors = $vals['bitVectors']; + } + } + } + + public function getName() { + return 'DateColumnStatsData'; + } + + 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->lowValue = new \metastore\Date(); + $xfer += $this->lowValue->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->highValue = new \metastore\Date(); + $xfer += $this->highValue->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numDVs); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->bitVectors); + } 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('DateColumnStatsData'); + if ($this->lowValue !== null) { + if (!is_object($this->lowValue)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('lowValue', TType::STRUCT, 1); + $xfer += $this->lowValue->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->highValue !== null) { + if (!is_object($this->highValue)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('highValue', TType::STRUCT, 2); + $xfer += $this->highValue->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->numDVs !== null) { + $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); + $xfer += $output->writeI64($this->numDVs); + $xfer += $output->writeFieldEnd(); + } + if ($this->bitVectors !== null) { + $xfer += $output->writeFieldBegin('bitVectors', TType::STRING, 5); + $xfer += $output->writeString($this->bitVectors); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnStatisticsData { + static $_TSPEC; + + /** + * @var \metastore\BooleanColumnStatsData + */ + public $booleanStats = null; + /** + * @var \metastore\LongColumnStatsData + */ + public $longStats = null; + /** + * @var \metastore\DoubleColumnStatsData + */ + public $doubleStats = null; + /** + * @var \metastore\StringColumnStatsData + */ + public $stringStats = null; + /** + * @var \metastore\BinaryColumnStatsData + */ + public $binaryStats = null; + /** + * @var \metastore\DecimalColumnStatsData + */ + public $decimalStats = null; + /** + * @var \metastore\DateColumnStatsData + */ + public $dateStats = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'booleanStats', + 'type' => TType::STRUCT, + 'class' => '\metastore\BooleanColumnStatsData', + ), + 2 => array( + 'var' => 'longStats', + 'type' => TType::STRUCT, + 'class' => '\metastore\LongColumnStatsData', + ), + 3 => array( + 'var' => 'doubleStats', + 'type' => TType::STRUCT, + 'class' => '\metastore\DoubleColumnStatsData', + ), + 4 => array( + 'var' => 'stringStats', + 'type' => TType::STRUCT, + 'class' => '\metastore\StringColumnStatsData', + ), + 5 => array( + 'var' => 'binaryStats', + 'type' => TType::STRUCT, + 'class' => '\metastore\BinaryColumnStatsData', + ), + 6 => array( + 'var' => 'decimalStats', + 'type' => TType::STRUCT, + 'class' => '\metastore\DecimalColumnStatsData', + ), + 7 => array( + 'var' => 'dateStats', + 'type' => TType::STRUCT, + 'class' => '\metastore\DateColumnStatsData', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['booleanStats'])) { + $this->booleanStats = $vals['booleanStats']; + } + if (isset($vals['longStats'])) { + $this->longStats = $vals['longStats']; + } + if (isset($vals['doubleStats'])) { + $this->doubleStats = $vals['doubleStats']; + } + if (isset($vals['stringStats'])) { + $this->stringStats = $vals['stringStats']; + } + if (isset($vals['binaryStats'])) { + $this->binaryStats = $vals['binaryStats']; + } + if (isset($vals['decimalStats'])) { + $this->decimalStats = $vals['decimalStats']; + } + if (isset($vals['dateStats'])) { + $this->dateStats = $vals['dateStats']; + } + } + } + + public function getName() { + return 'ColumnStatisticsData'; + } + + 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->booleanStats = new \metastore\BooleanColumnStatsData(); + $xfer += $this->booleanStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->longStats = new \metastore\LongColumnStatsData(); + $xfer += $this->longStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->doubleStats = new \metastore\DoubleColumnStatsData(); + $xfer += $this->doubleStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->stringStats = new \metastore\StringColumnStatsData(); + $xfer += $this->stringStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->binaryStats = new \metastore\BinaryColumnStatsData(); + $xfer += $this->binaryStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRUCT) { + $this->decimalStats = new \metastore\DecimalColumnStatsData(); + $xfer += $this->decimalStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->dateStats = new \metastore\DateColumnStatsData(); + $xfer += $this->dateStats->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('ColumnStatisticsData'); + if ($this->booleanStats !== null) { + if (!is_object($this->booleanStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('booleanStats', TType::STRUCT, 1); + $xfer += $this->booleanStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->longStats !== null) { + if (!is_object($this->longStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('longStats', TType::STRUCT, 2); + $xfer += $this->longStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->doubleStats !== null) { + if (!is_object($this->doubleStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('doubleStats', TType::STRUCT, 3); + $xfer += $this->doubleStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->stringStats !== null) { + if (!is_object($this->stringStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stringStats', TType::STRUCT, 4); + $xfer += $this->stringStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->binaryStats !== null) { + if (!is_object($this->binaryStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('binaryStats', TType::STRUCT, 5); + $xfer += $this->binaryStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->decimalStats !== null) { + if (!is_object($this->decimalStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('decimalStats', TType::STRUCT, 6); + $xfer += $this->decimalStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->dateStats !== null) { + if (!is_object($this->dateStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('dateStats', TType::STRUCT, 7); + $xfer += $this->dateStats->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnStatisticsObj { + static $_TSPEC; + + /** + * @var string + */ + public $colName = null; + /** + * @var string + */ + public $colType = null; + /** + * @var \metastore\ColumnStatisticsData + */ + public $statsData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'colName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'colType', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'statsData', + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatisticsData', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['colName'])) { + $this->colName = $vals['colName']; + } + if (isset($vals['colType'])) { + $this->colType = $vals['colType']; + } + if (isset($vals['statsData'])) { + $this->statsData = $vals['statsData']; + } + } + } + + public function getName() { + return 'ColumnStatisticsObj'; + } + + 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->colName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->colType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->statsData = new \metastore\ColumnStatisticsData(); + $xfer += $this->statsData->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('ColumnStatisticsObj'); + if ($this->colName !== null) { + $xfer += $output->writeFieldBegin('colName', TType::STRING, 1); + $xfer += $output->writeString($this->colName); + $xfer += $output->writeFieldEnd(); + } + if ($this->colType !== null) { + $xfer += $output->writeFieldBegin('colType', TType::STRING, 2); + $xfer += $output->writeString($this->colType); + $xfer += $output->writeFieldEnd(); + } + if ($this->statsData !== null) { + if (!is_object($this->statsData)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('statsData', TType::STRUCT, 3); + $xfer += $this->statsData->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnStatisticsDesc { + static $_TSPEC; + + /** + * @var bool + */ + public $isTblLevel = null; + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tableName = null; + /** + * @var string + */ + public $partName = null; + /** + * @var int + */ + public $lastAnalyzed = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'isTblLevel', + 'type' => TType::BOOL, + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'partName', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'lastAnalyzed', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['isTblLevel'])) { + $this->isTblLevel = $vals['isTblLevel']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['partName'])) { + $this->partName = $vals['partName']; + } + if (isset($vals['lastAnalyzed'])) { + $this->lastAnalyzed = $vals['lastAnalyzed']; + } + } + } + + public function getName() { + return 'ColumnStatisticsDesc'; + } + + 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::BOOL) { + $xfer += $input->readBool($this->isTblLevel); + } 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::STRING) { + $xfer += $input->readString($this->partName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->lastAnalyzed); + } 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('ColumnStatisticsDesc'); + if ($this->isTblLevel !== null) { + $xfer += $output->writeFieldBegin('isTblLevel', TType::BOOL, 1); + $xfer += $output->writeBool($this->isTblLevel); + $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->partName !== null) { + $xfer += $output->writeFieldBegin('partName', TType::STRING, 4); + $xfer += $output->writeString($this->partName); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAnalyzed !== null) { + $xfer += $output->writeFieldBegin('lastAnalyzed', TType::I64, 5); + $xfer += $output->writeI64($this->lastAnalyzed); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnStatistics { + static $_TSPEC; + + /** + * @var \metastore\ColumnStatisticsDesc + */ + public $statsDesc = null; + /** + * @var \metastore\ColumnStatisticsObj[] + */ + public $statsObj = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'statsDesc', + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatisticsDesc', + ), + 2 => array( + 'var' => 'statsObj', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatisticsObj', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['statsDesc'])) { + $this->statsDesc = $vals['statsDesc']; + } + if (isset($vals['statsObj'])) { + $this->statsObj = $vals['statsObj']; + } + } + } + + public function getName() { + return 'ColumnStatistics'; + } + + 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->statsDesc = new \metastore\ColumnStatisticsDesc(); + $xfer += $this->statsDesc->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->statsObj = array(); + $_size239 = 0; + $_etype242 = 0; + $xfer += $input->readListBegin($_etype242, $_size239); + for ($_i243 = 0; $_i243 < $_size239; ++$_i243) + { + $elem244 = null; + $elem244 = new \metastore\ColumnStatisticsObj(); + $xfer += $elem244->read($input); + $this->statsObj []= $elem244; + } + $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('ColumnStatistics'); + if ($this->statsDesc !== null) { + if (!is_object($this->statsDesc)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('statsDesc', TType::STRUCT, 1); + $xfer += $this->statsDesc->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->statsObj !== null) { + if (!is_array($this->statsObj)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('statsObj', TType::LST, 2); + { + $output->writeListBegin(TType::STRUCT, count($this->statsObj)); + { + foreach ($this->statsObj as $iter245) + { + $xfer += $iter245->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AggrStats { + static $_TSPEC; + + /** + * @var \metastore\ColumnStatisticsObj[] + */ + public $colStats = null; + /** + * @var int + */ + public $partsFound = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'colStats', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatisticsObj', + ), + ), + 2 => array( + 'var' => 'partsFound', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['colStats'])) { + $this->colStats = $vals['colStats']; + } + if (isset($vals['partsFound'])) { + $this->partsFound = $vals['partsFound']; + } + } + } + + public function getName() { + return 'AggrStats'; + } + + 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->colStats = array(); + $_size246 = 0; + $_etype249 = 0; + $xfer += $input->readListBegin($_etype249, $_size246); + for ($_i250 = 0; $_i250 < $_size246; ++$_i250) + { + $elem251 = null; + $elem251 = new \metastore\ColumnStatisticsObj(); + $xfer += $elem251->read($input); + $this->colStats []= $elem251; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->partsFound); + } 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('AggrStats'); + if ($this->colStats !== null) { + if (!is_array($this->colStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('colStats', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->colStats)); + { + foreach ($this->colStats as $iter252) + { + $xfer += $iter252->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->partsFound !== null) { + $xfer += $output->writeFieldBegin('partsFound', TType::I64, 2); + $xfer += $output->writeI64($this->partsFound); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class SetPartitionsStatsRequest { + static $_TSPEC; + + /** + * @var \metastore\ColumnStatistics[] + */ + public $colStats = null; + /** + * @var bool + */ + public $needMerge = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'colStats', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatistics', + ), + ), + 2 => array( + 'var' => 'needMerge', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['colStats'])) { + $this->colStats = $vals['colStats']; + } + if (isset($vals['needMerge'])) { + $this->needMerge = $vals['needMerge']; + } + } + } + + public function getName() { + return 'SetPartitionsStatsRequest'; + } + + 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->colStats = array(); + $_size253 = 0; + $_etype256 = 0; + $xfer += $input->readListBegin($_etype256, $_size253); + for ($_i257 = 0; $_i257 < $_size253; ++$_i257) + { + $elem258 = null; + $elem258 = new \metastore\ColumnStatistics(); + $xfer += $elem258->read($input); + $this->colStats []= $elem258; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->needMerge); + } 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('SetPartitionsStatsRequest'); + if ($this->colStats !== null) { + if (!is_array($this->colStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('colStats', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->colStats)); + { + foreach ($this->colStats as $iter259) + { + $xfer += $iter259->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->needMerge !== null) { + $xfer += $output->writeFieldBegin('needMerge', TType::BOOL, 2); + $xfer += $output->writeBool($this->needMerge); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Schema { + static $_TSPEC; + + /** + * @var \metastore\FieldSchema[] + */ + public $fieldSchemas = null; + /** + * @var array + */ + 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(); + $_size260 = 0; + $_etype263 = 0; + $xfer += $input->readListBegin($_etype263, $_size260); + for ($_i264 = 0; $_i264 < $_size260; ++$_i264) + { + $elem265 = null; + $elem265 = new \metastore\FieldSchema(); + $xfer += $elem265->read($input); + $this->fieldSchemas []= $elem265; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::MAP) { + $this->properties = array(); + $_size266 = 0; + $_ktype267 = 0; + $_vtype268 = 0; + $xfer += $input->readMapBegin($_ktype267, $_vtype268, $_size266); + for ($_i270 = 0; $_i270 < $_size266; ++$_i270) + { + $key271 = ''; + $val272 = ''; + $xfer += $input->readString($key271); + $xfer += $input->readString($val272); + $this->properties[$key271] = $val272; + } + $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 $iter273) + { + $xfer += $iter273->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 $kiter274 => $viter275) + { + $xfer += $output->writeString($kiter274); + $xfer += $output->writeString($viter275); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class EnvironmentContext { + static $_TSPEC; + + /** + * @var array + */ + 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(); + $_size276 = 0; + $_ktype277 = 0; + $_vtype278 = 0; + $xfer += $input->readMapBegin($_ktype277, $_vtype278, $_size276); + for ($_i280 = 0; $_i280 < $_size276; ++$_i280) + { + $key281 = ''; + $val282 = ''; + $xfer += $input->readString($key281); + $xfer += $input->readString($val282); + $this->properties[$key281] = $val282; + } + $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 $kiter283 => $viter284) + { + $xfer += $output->writeString($kiter283); + $xfer += $output->writeString($viter284); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PrimaryKeysRequest { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_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, + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'PrimaryKeysRequest'; + } + + 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; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('PrimaryKeysRequest'); + 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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PrimaryKeysResponse { + static $_TSPEC; + + /** + * @var \metastore\SQLPrimaryKey[] + */ + public $primaryKeys = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'primaryKeys', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\SQLPrimaryKey', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['primaryKeys'])) { + $this->primaryKeys = $vals['primaryKeys']; + } + } + } + + public function getName() { + return 'PrimaryKeysResponse'; + } + + 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->primaryKeys = array(); + $_size285 = 0; + $_etype288 = 0; + $xfer += $input->readListBegin($_etype288, $_size285); + for ($_i289 = 0; $_i289 < $_size285; ++$_i289) + { + $elem290 = null; + $elem290 = new \metastore\SQLPrimaryKey(); + $xfer += $elem290->read($input); + $this->primaryKeys []= $elem290; + } + $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('PrimaryKeysResponse'); + if ($this->primaryKeys !== null) { + if (!is_array($this->primaryKeys)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('primaryKeys', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->primaryKeys)); + { + foreach ($this->primaryKeys as $iter291) + { + $xfer += $iter291->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ForeignKeysRequest { + static $_TSPEC; + + /** + * @var string + */ + public $parent_db_name = null; + /** + * @var string + */ + public $parent_tbl_name = null; + /** + * @var string + */ + public $foreign_db_name = null; + /** + * @var string + */ + public $foreign_tbl_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'parent_db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'parent_tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'foreign_db_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'foreign_tbl_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['parent_db_name'])) { + $this->parent_db_name = $vals['parent_db_name']; + } + if (isset($vals['parent_tbl_name'])) { + $this->parent_tbl_name = $vals['parent_tbl_name']; + } + if (isset($vals['foreign_db_name'])) { + $this->foreign_db_name = $vals['foreign_db_name']; + } + if (isset($vals['foreign_tbl_name'])) { + $this->foreign_tbl_name = $vals['foreign_tbl_name']; + } + } + } + + public function getName() { + return 'ForeignKeysRequest'; + } + + 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->parent_db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->parent_tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->foreign_db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->foreign_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('ForeignKeysRequest'); + if ($this->parent_db_name !== null) { + $xfer += $output->writeFieldBegin('parent_db_name', TType::STRING, 1); + $xfer += $output->writeString($this->parent_db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->parent_tbl_name !== null) { + $xfer += $output->writeFieldBegin('parent_tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->parent_tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->foreign_db_name !== null) { + $xfer += $output->writeFieldBegin('foreign_db_name', TType::STRING, 3); + $xfer += $output->writeString($this->foreign_db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->foreign_tbl_name !== null) { + $xfer += $output->writeFieldBegin('foreign_tbl_name', TType::STRING, 4); + $xfer += $output->writeString($this->foreign_tbl_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ForeignKeysResponse { + static $_TSPEC; + + /** + * @var \metastore\SQLForeignKey[] + */ + public $foreignKeys = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'foreignKeys', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\SQLForeignKey', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['foreignKeys'])) { + $this->foreignKeys = $vals['foreignKeys']; + } + } + } + + public function getName() { + return 'ForeignKeysResponse'; + } + + 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->foreignKeys = array(); + $_size292 = 0; + $_etype295 = 0; + $xfer += $input->readListBegin($_etype295, $_size292); + for ($_i296 = 0; $_i296 < $_size292; ++$_i296) + { + $elem297 = null; + $elem297 = new \metastore\SQLForeignKey(); + $xfer += $elem297->read($input); + $this->foreignKeys []= $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('ForeignKeysResponse'); + if ($this->foreignKeys !== null) { + if (!is_array($this->foreignKeys)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('foreignKeys', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->foreignKeys)); + { + foreach ($this->foreignKeys as $iter298) + { + $xfer += $iter298->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class UniqueConstraintsRequest { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_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, + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'UniqueConstraintsRequest'; + } + + 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; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('UniqueConstraintsRequest'); + 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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class UniqueConstraintsResponse { + static $_TSPEC; + + /** + * @var \metastore\SQLUniqueConstraint[] + */ + public $uniqueConstraints = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'uniqueConstraints', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\SQLUniqueConstraint', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['uniqueConstraints'])) { + $this->uniqueConstraints = $vals['uniqueConstraints']; + } + } + } + + public function getName() { + return 'UniqueConstraintsResponse'; + } + + 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->uniqueConstraints = array(); + $_size299 = 0; + $_etype302 = 0; + $xfer += $input->readListBegin($_etype302, $_size299); + for ($_i303 = 0; $_i303 < $_size299; ++$_i303) + { + $elem304 = null; + $elem304 = new \metastore\SQLUniqueConstraint(); + $xfer += $elem304->read($input); + $this->uniqueConstraints []= $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('UniqueConstraintsResponse'); + if ($this->uniqueConstraints !== null) { + if (!is_array($this->uniqueConstraints)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('uniqueConstraints', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->uniqueConstraints)); + { + foreach ($this->uniqueConstraints as $iter305) + { + $xfer += $iter305->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class NotNullConstraintsRequest { + static $_TSPEC; + + /** + * @var string + */ + public $db_name = null; + /** + * @var string + */ + public $tbl_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, + ), + ); + } + 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']; + } + } + } + + public function getName() { + return 'NotNullConstraintsRequest'; + } + + 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; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('NotNullConstraintsRequest'); + 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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class NotNullConstraintsResponse { + static $_TSPEC; + + /** + * @var \metastore\SQLNotNullConstraint[] + */ + public $notNullConstraints = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'notNullConstraints', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\SQLNotNullConstraint', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['notNullConstraints'])) { + $this->notNullConstraints = $vals['notNullConstraints']; + } + } + } + + public function getName() { + return 'NotNullConstraintsResponse'; + } + + 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->notNullConstraints = array(); + $_size306 = 0; + $_etype309 = 0; + $xfer += $input->readListBegin($_etype309, $_size306); + for ($_i310 = 0; $_i310 < $_size306; ++$_i310) + { + $elem311 = null; + $elem311 = new \metastore\SQLNotNullConstraint(); + $xfer += $elem311->read($input); + $this->notNullConstraints []= $elem311; + } + $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('NotNullConstraintsResponse'); + if ($this->notNullConstraints !== null) { + if (!is_array($this->notNullConstraints)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('notNullConstraints', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->notNullConstraints)); + { + foreach ($this->notNullConstraints as $iter312) + { + $xfer += $iter312->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class DropConstraintRequest { + static $_TSPEC; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $tablename = null; + /** + * @var string + */ + public $constraintname = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tablename', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'constraintname', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tablename'])) { + $this->tablename = $vals['tablename']; + } + if (isset($vals['constraintname'])) { + $this->constraintname = $vals['constraintname']; + } + } + } + + public function getName() { + return 'DropConstraintRequest'; + } + + 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->tablename); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->constraintname); + } 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('DropConstraintRequest'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tablename !== null) { + $xfer += $output->writeFieldBegin('tablename', TType::STRING, 2); + $xfer += $output->writeString($this->tablename); + $xfer += $output->writeFieldEnd(); + } + if ($this->constraintname !== null) { + $xfer += $output->writeFieldBegin('constraintname', TType::STRING, 3); + $xfer += $output->writeString($this->constraintname); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AddPrimaryKeyRequest { + static $_TSPEC; + + /** + * @var \metastore\SQLPrimaryKey[] + */ + public $primaryKeyCols = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'primaryKeyCols', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\SQLPrimaryKey', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['primaryKeyCols'])) { + $this->primaryKeyCols = $vals['primaryKeyCols']; + } + } + } + + public function getName() { + return 'AddPrimaryKeyRequest'; + } + + 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->primaryKeyCols = array(); + $_size313 = 0; + $_etype316 = 0; + $xfer += $input->readListBegin($_etype316, $_size313); + for ($_i317 = 0; $_i317 < $_size313; ++$_i317) + { + $elem318 = null; + $elem318 = new \metastore\SQLPrimaryKey(); + $xfer += $elem318->read($input); + $this->primaryKeyCols []= $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('AddPrimaryKeyRequest'); + if ($this->primaryKeyCols !== null) { + if (!is_array($this->primaryKeyCols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('primaryKeyCols', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->primaryKeyCols)); + { + foreach ($this->primaryKeyCols as $iter319) + { + $xfer += $iter319->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AddForeignKeyRequest { + static $_TSPEC; + + /** + * @var \metastore\SQLForeignKey[] + */ + public $foreignKeyCols = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'foreignKeyCols', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\SQLForeignKey', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['foreignKeyCols'])) { + $this->foreignKeyCols = $vals['foreignKeyCols']; + } + } + } + + public function getName() { + return 'AddForeignKeyRequest'; + } + + 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->foreignKeyCols = array(); + $_size320 = 0; + $_etype323 = 0; + $xfer += $input->readListBegin($_etype323, $_size320); + for ($_i324 = 0; $_i324 < $_size320; ++$_i324) + { + $elem325 = null; + $elem325 = new \metastore\SQLForeignKey(); + $xfer += $elem325->read($input); + $this->foreignKeyCols []= $elem325; + } + $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('AddForeignKeyRequest'); + if ($this->foreignKeyCols !== null) { + if (!is_array($this->foreignKeyCols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('foreignKeyCols', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->foreignKeyCols)); + { + foreach ($this->foreignKeyCols as $iter326) + { + $xfer += $iter326->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AddUniqueConstraintRequest { + static $_TSPEC; + + /** + * @var \metastore\SQLUniqueConstraint[] + */ + public $uniqueConstraintCols = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'uniqueConstraintCols', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\SQLUniqueConstraint', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['uniqueConstraintCols'])) { + $this->uniqueConstraintCols = $vals['uniqueConstraintCols']; + } + } + } + + public function getName() { + return 'AddUniqueConstraintRequest'; + } + + 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->uniqueConstraintCols = array(); + $_size327 = 0; + $_etype330 = 0; + $xfer += $input->readListBegin($_etype330, $_size327); + for ($_i331 = 0; $_i331 < $_size327; ++$_i331) + { + $elem332 = null; + $elem332 = new \metastore\SQLUniqueConstraint(); + $xfer += $elem332->read($input); + $this->uniqueConstraintCols []= $elem332; + } + $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('AddUniqueConstraintRequest'); + if ($this->uniqueConstraintCols !== null) { + if (!is_array($this->uniqueConstraintCols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('uniqueConstraintCols', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->uniqueConstraintCols)); + { + foreach ($this->uniqueConstraintCols as $iter333) + { + $xfer += $iter333->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AddNotNullConstraintRequest { + static $_TSPEC; + + /** + * @var \metastore\SQLNotNullConstraint[] + */ + public $notNullConstraintCols = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'notNullConstraintCols', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\SQLNotNullConstraint', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['notNullConstraintCols'])) { + $this->notNullConstraintCols = $vals['notNullConstraintCols']; + } + } + } + + public function getName() { + return 'AddNotNullConstraintRequest'; + } + + 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->notNullConstraintCols = array(); + $_size334 = 0; + $_etype337 = 0; + $xfer += $input->readListBegin($_etype337, $_size334); + for ($_i338 = 0; $_i338 < $_size334; ++$_i338) + { + $elem339 = null; + $elem339 = new \metastore\SQLNotNullConstraint(); + $xfer += $elem339->read($input); + $this->notNullConstraintCols []= $elem339; + } + $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('AddNotNullConstraintRequest'); + if ($this->notNullConstraintCols !== null) { + if (!is_array($this->notNullConstraintCols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('notNullConstraintCols', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->notNullConstraintCols)); + { + foreach ($this->notNullConstraintCols as $iter340) + { + $xfer += $iter340->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PartitionsByExprResult { + static $_TSPEC; + + /** + * @var \metastore\Partition[] + */ + public $partitions = null; + /** + * @var bool + */ + public $hasUnknownPartitions = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'partitions', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 2 => array( + 'var' => 'hasUnknownPartitions', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['partitions'])) { + $this->partitions = $vals['partitions']; + } + if (isset($vals['hasUnknownPartitions'])) { + $this->hasUnknownPartitions = $vals['hasUnknownPartitions']; + } + } + } + + public function getName() { + return 'PartitionsByExprResult'; + } + + 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->partitions = array(); + $_size341 = 0; + $_etype344 = 0; + $xfer += $input->readListBegin($_etype344, $_size341); + for ($_i345 = 0; $_i345 < $_size341; ++$_i345) + { + $elem346 = null; + $elem346 = new \metastore\Partition(); + $xfer += $elem346->read($input); + $this->partitions []= $elem346; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->hasUnknownPartitions); + } 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('PartitionsByExprResult'); + if ($this->partitions !== null) { + if (!is_array($this->partitions)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitions', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->partitions)); + { + foreach ($this->partitions as $iter347) + { + $xfer += $iter347->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->hasUnknownPartitions !== null) { + $xfer += $output->writeFieldBegin('hasUnknownPartitions', TType::BOOL, 2); + $xfer += $output->writeBool($this->hasUnknownPartitions); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PartitionsByExprRequest { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tblName = null; + /** + * @var string + */ + public $expr = null; + /** + * @var string + */ + public $defaultPartitionName = null; + /** + * @var int + */ + public $maxParts = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tblName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'expr', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'defaultPartitionName', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'maxParts', + 'type' => TType::I16, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tblName'])) { + $this->tblName = $vals['tblName']; + } + if (isset($vals['expr'])) { + $this->expr = $vals['expr']; + } + if (isset($vals['defaultPartitionName'])) { + $this->defaultPartitionName = $vals['defaultPartitionName']; + } + if (isset($vals['maxParts'])) { + $this->maxParts = $vals['maxParts']; + } + } + } + + public function getName() { + return 'PartitionsByExprRequest'; + } + + 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->tblName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->expr); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->defaultPartitionName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->maxParts); + } 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('PartitionsByExprRequest'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tblName !== null) { + $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); + $xfer += $output->writeString($this->tblName); + $xfer += $output->writeFieldEnd(); + } + if ($this->expr !== null) { + $xfer += $output->writeFieldBegin('expr', TType::STRING, 3); + $xfer += $output->writeString($this->expr); + $xfer += $output->writeFieldEnd(); + } + if ($this->defaultPartitionName !== null) { + $xfer += $output->writeFieldBegin('defaultPartitionName', TType::STRING, 4); + $xfer += $output->writeString($this->defaultPartitionName); + $xfer += $output->writeFieldEnd(); + } + if ($this->maxParts !== null) { + $xfer += $output->writeFieldBegin('maxParts', TType::I16, 5); + $xfer += $output->writeI16($this->maxParts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class TableStatsResult { + static $_TSPEC; + + /** + * @var \metastore\ColumnStatisticsObj[] + */ + public $tableStats = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableStats', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\ColumnStatisticsObj', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableStats'])) { + $this->tableStats = $vals['tableStats']; + } + } + } + + public function getName() { + return 'TableStatsResult'; + } + + 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->tableStats = array(); + $_size348 = 0; + $_etype351 = 0; + $xfer += $input->readListBegin($_etype351, $_size348); + for ($_i352 = 0; $_i352 < $_size348; ++$_i352) + { + $elem353 = null; + $elem353 = new \metastore\ColumnStatisticsObj(); + $xfer += $elem353->read($input); + $this->tableStats []= $elem353; + } + $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('TableStatsResult'); + if ($this->tableStats !== null) { + if (!is_array($this->tableStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tableStats', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->tableStats)); + { + foreach ($this->tableStats as $iter354) + { + $xfer += $iter354->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PartitionsStatsResult { + static $_TSPEC; + + /** + * @var array + */ + public $partStats = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'partStats', + '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\ColumnStatisticsObj', + ), + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['partStats'])) { + $this->partStats = $vals['partStats']; + } + } + } + + public function getName() { + return 'PartitionsStatsResult'; + } + + 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->partStats = array(); + $_size355 = 0; + $_ktype356 = 0; + $_vtype357 = 0; + $xfer += $input->readMapBegin($_ktype356, $_vtype357, $_size355); + for ($_i359 = 0; $_i359 < $_size355; ++$_i359) + { + $key360 = ''; + $val361 = array(); + $xfer += $input->readString($key360); + $val361 = array(); + $_size362 = 0; + $_etype365 = 0; + $xfer += $input->readListBegin($_etype365, $_size362); + for ($_i366 = 0; $_i366 < $_size362; ++$_i366) + { + $elem367 = null; + $elem367 = new \metastore\ColumnStatisticsObj(); + $xfer += $elem367->read($input); + $val361 []= $elem367; + } + $xfer += $input->readListEnd(); + $this->partStats[$key360] = $val361; + } + $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('PartitionsStatsResult'); + if ($this->partStats !== null) { + if (!is_array($this->partStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partStats', TType::MAP, 1); + { + $output->writeMapBegin(TType::STRING, TType::LST, count($this->partStats)); + { + foreach ($this->partStats as $kiter368 => $viter369) + { + $xfer += $output->writeString($kiter368); + { + $output->writeListBegin(TType::STRUCT, count($viter369)); + { + foreach ($viter369 as $iter370) + { + $xfer += $iter370->write($output); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class TableStatsRequest { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tblName = null; + /** + * @var string[] + */ + public $colNames = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tblName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'colNames', + '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['tblName'])) { + $this->tblName = $vals['tblName']; + } + if (isset($vals['colNames'])) { + $this->colNames = $vals['colNames']; + } + } + } + + public function getName() { + return 'TableStatsRequest'; + } + + 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->tblName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->colNames = array(); + $_size371 = 0; + $_etype374 = 0; + $xfer += $input->readListBegin($_etype374, $_size371); + for ($_i375 = 0; $_i375 < $_size371; ++$_i375) + { + $elem376 = null; + $xfer += $input->readString($elem376); + $this->colNames []= $elem376; + } + $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('TableStatsRequest'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tblName !== null) { + $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); + $xfer += $output->writeString($this->tblName); + $xfer += $output->writeFieldEnd(); + } + if ($this->colNames !== null) { + if (!is_array($this->colNames)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('colNames', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->colNames)); + { + foreach ($this->colNames as $iter377) + { + $xfer += $output->writeString($iter377); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PartitionsStatsRequest { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tblName = null; + /** + * @var string[] + */ + public $colNames = null; + /** + * @var string[] + */ + public $partNames = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tblName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'colNames', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'partNames', + '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['tblName'])) { + $this->tblName = $vals['tblName']; + } + if (isset($vals['colNames'])) { + $this->colNames = $vals['colNames']; + } + if (isset($vals['partNames'])) { + $this->partNames = $vals['partNames']; + } + } + } + + public function getName() { + return 'PartitionsStatsRequest'; + } + + 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->tblName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->colNames = array(); + $_size378 = 0; + $_etype381 = 0; + $xfer += $input->readListBegin($_etype381, $_size378); + for ($_i382 = 0; $_i382 < $_size378; ++$_i382) + { + $elem383 = null; + $xfer += $input->readString($elem383); + $this->colNames []= $elem383; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->partNames = array(); + $_size384 = 0; + $_etype387 = 0; + $xfer += $input->readListBegin($_etype387, $_size384); + for ($_i388 = 0; $_i388 < $_size384; ++$_i388) + { + $elem389 = null; + $xfer += $input->readString($elem389); + $this->partNames []= $elem389; + } + $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('PartitionsStatsRequest'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tblName !== null) { + $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); + $xfer += $output->writeString($this->tblName); + $xfer += $output->writeFieldEnd(); + } + if ($this->colNames !== null) { + if (!is_array($this->colNames)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('colNames', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->colNames)); + { + foreach ($this->colNames as $iter390) + { + $xfer += $output->writeString($iter390); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->partNames !== null) { + if (!is_array($this->partNames)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partNames', TType::LST, 4); + { + $output->writeListBegin(TType::STRING, count($this->partNames)); + { + foreach ($this->partNames as $iter391) + { + $xfer += $output->writeString($iter391); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AddPartitionsResult { + static $_TSPEC; + + /** + * @var \metastore\Partition[] + */ + public $partitions = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'partitions', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['partitions'])) { + $this->partitions = $vals['partitions']; + } + } + } + + public function getName() { + return 'AddPartitionsResult'; + } + + 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->partitions = array(); + $_size392 = 0; + $_etype395 = 0; + $xfer += $input->readListBegin($_etype395, $_size392); + for ($_i396 = 0; $_i396 < $_size392; ++$_i396) + { + $elem397 = null; + $elem397 = new \metastore\Partition(); + $xfer += $elem397->read($input); + $this->partitions []= $elem397; + } + $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('AddPartitionsResult'); + if ($this->partitions !== null) { + if (!is_array($this->partitions)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitions', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->partitions)); + { + foreach ($this->partitions as $iter398) + { + $xfer += $iter398->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AddPartitionsRequest { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tblName = null; + /** + * @var \metastore\Partition[] + */ + public $parts = null; + /** + * @var bool + */ + public $ifNotExists = null; + /** + * @var bool + */ + public $needResult = true; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tblName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'parts', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + 4 => array( + 'var' => 'ifNotExists', + 'type' => TType::BOOL, + ), + 5 => array( + 'var' => 'needResult', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tblName'])) { + $this->tblName = $vals['tblName']; + } + if (isset($vals['parts'])) { + $this->parts = $vals['parts']; + } + if (isset($vals['ifNotExists'])) { + $this->ifNotExists = $vals['ifNotExists']; + } + if (isset($vals['needResult'])) { + $this->needResult = $vals['needResult']; + } + } + } + + public function getName() { + return 'AddPartitionsRequest'; + } + + 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->tblName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->parts = array(); + $_size399 = 0; + $_etype402 = 0; + $xfer += $input->readListBegin($_etype402, $_size399); + for ($_i403 = 0; $_i403 < $_size399; ++$_i403) + { + $elem404 = null; + $elem404 = new \metastore\Partition(); + $xfer += $elem404->read($input); + $this->parts []= $elem404; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->ifNotExists); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->needResult); + } 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('AddPartitionsRequest'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tblName !== null) { + $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); + $xfer += $output->writeString($this->tblName); + $xfer += $output->writeFieldEnd(); + } + if ($this->parts !== null) { + if (!is_array($this->parts)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parts', TType::LST, 3); + { + $output->writeListBegin(TType::STRUCT, count($this->parts)); + { + foreach ($this->parts as $iter405) + { + $xfer += $iter405->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->ifNotExists !== null) { + $xfer += $output->writeFieldBegin('ifNotExists', TType::BOOL, 4); + $xfer += $output->writeBool($this->ifNotExists); + $xfer += $output->writeFieldEnd(); + } + if ($this->needResult !== null) { + $xfer += $output->writeFieldBegin('needResult', TType::BOOL, 5); + $xfer += $output->writeBool($this->needResult); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class DropPartitionsResult { + static $_TSPEC; + + /** + * @var \metastore\Partition[] + */ + public $partitions = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'partitions', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Partition', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['partitions'])) { + $this->partitions = $vals['partitions']; + } + } + } + + public function getName() { + return 'DropPartitionsResult'; + } + + 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->partitions = array(); + $_size406 = 0; + $_etype409 = 0; + $xfer += $input->readListBegin($_etype409, $_size406); + for ($_i410 = 0; $_i410 < $_size406; ++$_i410) + { + $elem411 = null; + $elem411 = new \metastore\Partition(); + $xfer += $elem411->read($input); + $this->partitions []= $elem411; + } + $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('DropPartitionsResult'); + if ($this->partitions !== null) { + if (!is_array($this->partitions)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitions', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->partitions)); + { + foreach ($this->partitions as $iter412) + { + $xfer += $iter412->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class DropPartitionsExpr { + static $_TSPEC; + + /** + * @var string + */ + public $expr = null; + /** + * @var int + */ + public $partArchiveLevel = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'expr', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'partArchiveLevel', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['expr'])) { + $this->expr = $vals['expr']; + } + if (isset($vals['partArchiveLevel'])) { + $this->partArchiveLevel = $vals['partArchiveLevel']; + } + } + } + + public function getName() { + return 'DropPartitionsExpr'; + } + + 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->expr); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->partArchiveLevel); + } 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('DropPartitionsExpr'); + if ($this->expr !== null) { + $xfer += $output->writeFieldBegin('expr', TType::STRING, 1); + $xfer += $output->writeString($this->expr); + $xfer += $output->writeFieldEnd(); + } + if ($this->partArchiveLevel !== null) { + $xfer += $output->writeFieldBegin('partArchiveLevel', TType::I32, 2); + $xfer += $output->writeI32($this->partArchiveLevel); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class RequestPartsSpec { + static $_TSPEC; + + /** + * @var string[] + */ + public $names = null; + /** + * @var \metastore\DropPartitionsExpr[] + */ + public $exprs = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'exprs', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\DropPartitionsExpr', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['names'])) { + $this->names = $vals['names']; + } + if (isset($vals['exprs'])) { + $this->exprs = $vals['exprs']; + } + } + } + + public function getName() { + return 'RequestPartsSpec'; + } + + 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->names = array(); + $_size413 = 0; + $_etype416 = 0; + $xfer += $input->readListBegin($_etype416, $_size413); + for ($_i417 = 0; $_i417 < $_size413; ++$_i417) + { + $elem418 = null; + $xfer += $input->readString($elem418); + $this->names []= $elem418; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->exprs = array(); + $_size419 = 0; + $_etype422 = 0; + $xfer += $input->readListBegin($_etype422, $_size419); + for ($_i423 = 0; $_i423 < $_size419; ++$_i423) + { + $elem424 = null; + $elem424 = new \metastore\DropPartitionsExpr(); + $xfer += $elem424->read($input); + $this->exprs []= $elem424; + } + $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('RequestPartsSpec'); + 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, 1); + { + $output->writeListBegin(TType::STRING, count($this->names)); + { + foreach ($this->names as $iter425) + { + $xfer += $output->writeString($iter425); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->exprs !== null) { + if (!is_array($this->exprs)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('exprs', TType::LST, 2); + { + $output->writeListBegin(TType::STRUCT, count($this->exprs)); + { + foreach ($this->exprs as $iter426) + { + $xfer += $iter426->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class DropPartitionsRequest { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tblName = null; + /** + * @var \metastore\RequestPartsSpec + */ + public $parts = null; + /** + * @var bool + */ + public $deleteData = null; + /** + * @var bool + */ + public $ifExists = true; + /** + * @var bool + */ + public $ignoreProtection = null; + /** + * @var \metastore\EnvironmentContext + */ + public $environmentContext = null; + /** + * @var bool + */ + public $needResult = true; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tblName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'parts', + 'type' => TType::STRUCT, + 'class' => '\metastore\RequestPartsSpec', + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + 5 => array( + 'var' => 'ifExists', + 'type' => TType::BOOL, + ), + 6 => array( + 'var' => 'ignoreProtection', + 'type' => TType::BOOL, + ), + 7 => array( + 'var' => 'environmentContext', + 'type' => TType::STRUCT, + 'class' => '\metastore\EnvironmentContext', + ), + 8 => array( + 'var' => 'needResult', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tblName'])) { + $this->tblName = $vals['tblName']; + } + if (isset($vals['parts'])) { + $this->parts = $vals['parts']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + if (isset($vals['ifExists'])) { + $this->ifExists = $vals['ifExists']; + } + if (isset($vals['ignoreProtection'])) { + $this->ignoreProtection = $vals['ignoreProtection']; + } + if (isset($vals['environmentContext'])) { + $this->environmentContext = $vals['environmentContext']; + } + if (isset($vals['needResult'])) { + $this->needResult = $vals['needResult']; + } + } + } + + public function getName() { + return 'DropPartitionsRequest'; + } + + 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->tblName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->parts = new \metastore\RequestPartsSpec(); + $xfer += $this->parts->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->ifExists); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->ignoreProtection); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->environmentContext = new \metastore\EnvironmentContext(); + $xfer += $this->environmentContext->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->needResult); + } 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('DropPartitionsRequest'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tblName !== null) { + $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); + $xfer += $output->writeString($this->tblName); + $xfer += $output->writeFieldEnd(); + } + if ($this->parts !== null) { + if (!is_object($this->parts)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parts', TType::STRUCT, 3); + $xfer += $this->parts->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + if ($this->ifExists !== null) { + $xfer += $output->writeFieldBegin('ifExists', TType::BOOL, 5); + $xfer += $output->writeBool($this->ifExists); + $xfer += $output->writeFieldEnd(); + } + if ($this->ignoreProtection !== null) { + $xfer += $output->writeFieldBegin('ignoreProtection', TType::BOOL, 6); + $xfer += $output->writeBool($this->ignoreProtection); + $xfer += $output->writeFieldEnd(); + } + if ($this->environmentContext !== null) { + if (!is_object($this->environmentContext)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('environmentContext', TType::STRUCT, 7); + $xfer += $this->environmentContext->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->needResult !== null) { + $xfer += $output->writeFieldBegin('needResult', TType::BOOL, 8); + $xfer += $output->writeBool($this->needResult); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ResourceUri { + static $_TSPEC; + + /** + * @var int + */ + public $resourceType = null; + /** + * @var string + */ + public $uri = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'resourceType', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'uri', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['resourceType'])) { + $this->resourceType = $vals['resourceType']; + } + if (isset($vals['uri'])) { + $this->uri = $vals['uri']; + } + } + } + + public function getName() { + return 'ResourceUri'; + } + + 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->resourceType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->uri); + } 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('ResourceUri'); + if ($this->resourceType !== null) { + $xfer += $output->writeFieldBegin('resourceType', TType::I32, 1); + $xfer += $output->writeI32($this->resourceType); + $xfer += $output->writeFieldEnd(); + } + if ($this->uri !== null) { + $xfer += $output->writeFieldBegin('uri', TType::STRING, 2); + $xfer += $output->writeString($this->uri); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Function { + static $_TSPEC; + + /** + * @var string + */ + public $functionName = null; + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $className = null; + /** + * @var string + */ + public $ownerName = null; + /** + * @var int + */ + public $ownerType = null; + /** + * @var int + */ + public $createTime = null; + /** + * @var int + */ + public $functionType = null; + /** + * @var \metastore\ResourceUri[] + */ + public $resourceUris = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'functionName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'className', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'ownerName', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'ownerType', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'functionType', + 'type' => TType::I32, + ), + 8 => array( + 'var' => 'resourceUris', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\ResourceUri', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['functionName'])) { + $this->functionName = $vals['functionName']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['className'])) { + $this->className = $vals['className']; + } + if (isset($vals['ownerName'])) { + $this->ownerName = $vals['ownerName']; + } + if (isset($vals['ownerType'])) { + $this->ownerType = $vals['ownerType']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['functionType'])) { + $this->functionType = $vals['functionType']; + } + if (isset($vals['resourceUris'])) { + $this->resourceUris = $vals['resourceUris']; + } + } + } + + public function getName() { + return 'Function'; + } + + 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->functionName); + } 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->className); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->ownerName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->ownerType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->functionType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::LST) { + $this->resourceUris = array(); + $_size427 = 0; + $_etype430 = 0; + $xfer += $input->readListBegin($_etype430, $_size427); + for ($_i431 = 0; $_i431 < $_size427; ++$_i431) + { + $elem432 = null; + $elem432 = new \metastore\ResourceUri(); + $xfer += $elem432->read($input); + $this->resourceUris []= $elem432; + } + $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('Function'); + if ($this->functionName !== null) { + $xfer += $output->writeFieldBegin('functionName', TType::STRING, 1); + $xfer += $output->writeString($this->functionName); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->className !== null) { + $xfer += $output->writeFieldBegin('className', TType::STRING, 3); + $xfer += $output->writeString($this->className); + $xfer += $output->writeFieldEnd(); + } + if ($this->ownerName !== null) { + $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 4); + $xfer += $output->writeString($this->ownerName); + $xfer += $output->writeFieldEnd(); + } + if ($this->ownerType !== null) { + $xfer += $output->writeFieldBegin('ownerType', TType::I32, 5); + $xfer += $output->writeI32($this->ownerType); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 6); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->functionType !== null) { + $xfer += $output->writeFieldBegin('functionType', TType::I32, 7); + $xfer += $output->writeI32($this->functionType); + $xfer += $output->writeFieldEnd(); + } + if ($this->resourceUris !== null) { + if (!is_array($this->resourceUris)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('resourceUris', TType::LST, 8); + { + $output->writeListBegin(TType::STRUCT, count($this->resourceUris)); + { + foreach ($this->resourceUris as $iter433) + { + $xfer += $iter433->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class TxnInfo { + static $_TSPEC; + + /** + * @var int + */ + public $id = null; + /** + * @var int + */ + public $state = null; + /** + * @var string + */ + public $user = null; + /** + * @var string + */ + public $hostname = null; + /** + * @var string + */ + public $agentInfo = "Unknown"; + /** + * @var int + */ + public $heartbeatCount = 0; + /** + * @var string + */ + public $metaInfo = null; + /** + * @var int + */ + public $startedTime = null; + /** + * @var int + */ + public $lastHeartbeatTime = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'id', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'state', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'user', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'hostname', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'agentInfo', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'heartbeatCount', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'metaInfo', + 'type' => TType::STRING, + ), + 8 => array( + 'var' => 'startedTime', + 'type' => TType::I64, + ), + 9 => array( + 'var' => 'lastHeartbeatTime', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['id'])) { + $this->id = $vals['id']; + } + if (isset($vals['state'])) { + $this->state = $vals['state']; + } + if (isset($vals['user'])) { + $this->user = $vals['user']; + } + if (isset($vals['hostname'])) { + $this->hostname = $vals['hostname']; + } + if (isset($vals['agentInfo'])) { + $this->agentInfo = $vals['agentInfo']; + } + if (isset($vals['heartbeatCount'])) { + $this->heartbeatCount = $vals['heartbeatCount']; + } + if (isset($vals['metaInfo'])) { + $this->metaInfo = $vals['metaInfo']; + } + if (isset($vals['startedTime'])) { + $this->startedTime = $vals['startedTime']; + } + if (isset($vals['lastHeartbeatTime'])) { + $this->lastHeartbeatTime = $vals['lastHeartbeatTime']; + } + } + } + + public function getName() { + return 'TxnInfo'; + } + + 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::I64) { + $xfer += $input->readI64($this->id); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->state); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->hostname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->agentInfo); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->heartbeatCount); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->metaInfo); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->startedTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->lastHeartbeatTime); + } 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('TxnInfo'); + if ($this->id !== null) { + $xfer += $output->writeFieldBegin('id', TType::I64, 1); + $xfer += $output->writeI64($this->id); + $xfer += $output->writeFieldEnd(); + } + if ($this->state !== null) { + $xfer += $output->writeFieldBegin('state', TType::I32, 2); + $xfer += $output->writeI32($this->state); + $xfer += $output->writeFieldEnd(); + } + if ($this->user !== null) { + $xfer += $output->writeFieldBegin('user', TType::STRING, 3); + $xfer += $output->writeString($this->user); + $xfer += $output->writeFieldEnd(); + } + if ($this->hostname !== null) { + $xfer += $output->writeFieldBegin('hostname', TType::STRING, 4); + $xfer += $output->writeString($this->hostname); + $xfer += $output->writeFieldEnd(); + } + if ($this->agentInfo !== null) { + $xfer += $output->writeFieldBegin('agentInfo', TType::STRING, 5); + $xfer += $output->writeString($this->agentInfo); + $xfer += $output->writeFieldEnd(); + } + if ($this->heartbeatCount !== null) { + $xfer += $output->writeFieldBegin('heartbeatCount', TType::I32, 6); + $xfer += $output->writeI32($this->heartbeatCount); + $xfer += $output->writeFieldEnd(); + } + if ($this->metaInfo !== null) { + $xfer += $output->writeFieldBegin('metaInfo', TType::STRING, 7); + $xfer += $output->writeString($this->metaInfo); + $xfer += $output->writeFieldEnd(); + } + if ($this->startedTime !== null) { + $xfer += $output->writeFieldBegin('startedTime', TType::I64, 8); + $xfer += $output->writeI64($this->startedTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastHeartbeatTime !== null) { + $xfer += $output->writeFieldBegin('lastHeartbeatTime', TType::I64, 9); + $xfer += $output->writeI64($this->lastHeartbeatTime); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetOpenTxnsInfoResponse { + static $_TSPEC; + + /** + * @var int + */ + public $txn_high_water_mark = null; + /** + * @var \metastore\TxnInfo[] + */ + public $open_txns = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'txn_high_water_mark', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'open_txns', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\TxnInfo', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['txn_high_water_mark'])) { + $this->txn_high_water_mark = $vals['txn_high_water_mark']; + } + if (isset($vals['open_txns'])) { + $this->open_txns = $vals['open_txns']; + } + } + } + + public function getName() { + return 'GetOpenTxnsInfoResponse'; + } + + 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::I64) { + $xfer += $input->readI64($this->txn_high_water_mark); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->open_txns = array(); + $_size434 = 0; + $_etype437 = 0; + $xfer += $input->readListBegin($_etype437, $_size434); + for ($_i438 = 0; $_i438 < $_size434; ++$_i438) + { + $elem439 = null; + $elem439 = new \metastore\TxnInfo(); + $xfer += $elem439->read($input); + $this->open_txns []= $elem439; + } + $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('GetOpenTxnsInfoResponse'); + if ($this->txn_high_water_mark !== null) { + $xfer += $output->writeFieldBegin('txn_high_water_mark', TType::I64, 1); + $xfer += $output->writeI64($this->txn_high_water_mark); + $xfer += $output->writeFieldEnd(); + } + if ($this->open_txns !== null) { + if (!is_array($this->open_txns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('open_txns', TType::LST, 2); + { + $output->writeListBegin(TType::STRUCT, count($this->open_txns)); + { + foreach ($this->open_txns as $iter440) + { + $xfer += $iter440->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetOpenTxnsResponse { + static $_TSPEC; + + /** + * @var int + */ + public $txn_high_water_mark = null; + /** + * @var int[] + */ + public $open_txns = null; + /** + * @var int + */ + public $min_open_txn = null; + /** + * @var string + */ + public $abortedBits = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'txn_high_water_mark', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'open_txns', + 'type' => TType::LST, + 'etype' => TType::I64, + 'elem' => array( + 'type' => TType::I64, + ), + ), + 3 => array( + 'var' => 'min_open_txn', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'abortedBits', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['txn_high_water_mark'])) { + $this->txn_high_water_mark = $vals['txn_high_water_mark']; + } + if (isset($vals['open_txns'])) { + $this->open_txns = $vals['open_txns']; + } + if (isset($vals['min_open_txn'])) { + $this->min_open_txn = $vals['min_open_txn']; + } + if (isset($vals['abortedBits'])) { + $this->abortedBits = $vals['abortedBits']; + } + } + } + + public function getName() { + return 'GetOpenTxnsResponse'; + } + + 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::I64) { + $xfer += $input->readI64($this->txn_high_water_mark); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->open_txns = array(); + $_size441 = 0; + $_etype444 = 0; + $xfer += $input->readListBegin($_etype444, $_size441); + for ($_i445 = 0; $_i445 < $_size441; ++$_i445) + { + $elem446 = null; + $xfer += $input->readI64($elem446); + $this->open_txns []= $elem446; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->min_open_txn); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->abortedBits); + } 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('GetOpenTxnsResponse'); + if ($this->txn_high_water_mark !== null) { + $xfer += $output->writeFieldBegin('txn_high_water_mark', TType::I64, 1); + $xfer += $output->writeI64($this->txn_high_water_mark); + $xfer += $output->writeFieldEnd(); + } + if ($this->open_txns !== null) { + if (!is_array($this->open_txns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('open_txns', TType::LST, 2); + { + $output->writeListBegin(TType::I64, count($this->open_txns)); + { + foreach ($this->open_txns as $iter447) + { + $xfer += $output->writeI64($iter447); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->min_open_txn !== null) { + $xfer += $output->writeFieldBegin('min_open_txn', TType::I64, 3); + $xfer += $output->writeI64($this->min_open_txn); + $xfer += $output->writeFieldEnd(); + } + if ($this->abortedBits !== null) { + $xfer += $output->writeFieldBegin('abortedBits', TType::STRING, 4); + $xfer += $output->writeString($this->abortedBits); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class OpenTxnRequest { + static $_TSPEC; + + /** + * @var int + */ + public $num_txns = null; + /** + * @var string + */ + public $user = null; + /** + * @var string + */ + public $hostname = null; + /** + * @var string + */ + public $agentInfo = "Unknown"; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'num_txns', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'user', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'hostname', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'agentInfo', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['num_txns'])) { + $this->num_txns = $vals['num_txns']; + } + if (isset($vals['user'])) { + $this->user = $vals['user']; + } + if (isset($vals['hostname'])) { + $this->hostname = $vals['hostname']; + } + if (isset($vals['agentInfo'])) { + $this->agentInfo = $vals['agentInfo']; + } + } + } + + public function getName() { + return 'OpenTxnRequest'; + } + + 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->num_txns); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->hostname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->agentInfo); + } 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('OpenTxnRequest'); + if ($this->num_txns !== null) { + $xfer += $output->writeFieldBegin('num_txns', TType::I32, 1); + $xfer += $output->writeI32($this->num_txns); + $xfer += $output->writeFieldEnd(); + } + if ($this->user !== null) { + $xfer += $output->writeFieldBegin('user', TType::STRING, 2); + $xfer += $output->writeString($this->user); + $xfer += $output->writeFieldEnd(); + } + if ($this->hostname !== null) { + $xfer += $output->writeFieldBegin('hostname', TType::STRING, 3); + $xfer += $output->writeString($this->hostname); + $xfer += $output->writeFieldEnd(); + } + if ($this->agentInfo !== null) { + $xfer += $output->writeFieldBegin('agentInfo', TType::STRING, 4); + $xfer += $output->writeString($this->agentInfo); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class OpenTxnsResponse { + static $_TSPEC; + + /** + * @var int[] + */ + public $txn_ids = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'txn_ids', + 'type' => TType::LST, + 'etype' => TType::I64, + 'elem' => array( + 'type' => TType::I64, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['txn_ids'])) { + $this->txn_ids = $vals['txn_ids']; + } + } + } + + public function getName() { + return 'OpenTxnsResponse'; + } + + 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->txn_ids = array(); + $_size448 = 0; + $_etype451 = 0; + $xfer += $input->readListBegin($_etype451, $_size448); + for ($_i452 = 0; $_i452 < $_size448; ++$_i452) + { + $elem453 = null; + $xfer += $input->readI64($elem453); + $this->txn_ids []= $elem453; + } + $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('OpenTxnsResponse'); + if ($this->txn_ids !== null) { + if (!is_array($this->txn_ids)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('txn_ids', TType::LST, 1); + { + $output->writeListBegin(TType::I64, count($this->txn_ids)); + { + foreach ($this->txn_ids as $iter454) + { + $xfer += $output->writeI64($iter454); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AbortTxnRequest { + static $_TSPEC; + + /** + * @var int + */ + public $txnid = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'txnid', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['txnid'])) { + $this->txnid = $vals['txnid']; + } + } + } + + public function getName() { + return 'AbortTxnRequest'; + } + + 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::I64) { + $xfer += $input->readI64($this->txnid); + } 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('AbortTxnRequest'); + if ($this->txnid !== null) { + $xfer += $output->writeFieldBegin('txnid', TType::I64, 1); + $xfer += $output->writeI64($this->txnid); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AbortTxnsRequest { + static $_TSPEC; + + /** + * @var int[] + */ + public $txn_ids = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'txn_ids', + 'type' => TType::LST, + 'etype' => TType::I64, + 'elem' => array( + 'type' => TType::I64, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['txn_ids'])) { + $this->txn_ids = $vals['txn_ids']; + } + } + } + + public function getName() { + return 'AbortTxnsRequest'; + } + + 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->txn_ids = array(); + $_size455 = 0; + $_etype458 = 0; + $xfer += $input->readListBegin($_etype458, $_size455); + for ($_i459 = 0; $_i459 < $_size455; ++$_i459) + { + $elem460 = null; + $xfer += $input->readI64($elem460); + $this->txn_ids []= $elem460; + } + $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('AbortTxnsRequest'); + if ($this->txn_ids !== null) { + if (!is_array($this->txn_ids)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('txn_ids', TType::LST, 1); + { + $output->writeListBegin(TType::I64, count($this->txn_ids)); + { + foreach ($this->txn_ids as $iter461) + { + $xfer += $output->writeI64($iter461); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class CommitTxnRequest { + static $_TSPEC; + + /** + * @var int + */ + public $txnid = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'txnid', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['txnid'])) { + $this->txnid = $vals['txnid']; + } + } + } + + public function getName() { + return 'CommitTxnRequest'; + } + + 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::I64) { + $xfer += $input->readI64($this->txnid); + } 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('CommitTxnRequest'); + if ($this->txnid !== null) { + $xfer += $output->writeFieldBegin('txnid', TType::I64, 1); + $xfer += $output->writeI64($this->txnid); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class LockComponent { + static $_TSPEC; + + /** + * @var int + */ + public $type = null; + /** + * @var int + */ + public $level = null; + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $tablename = null; + /** + * @var string + */ + public $partitionname = null; + /** + * @var int + */ + public $operationType = 5; + /** + * @var bool + */ + public $isAcid = false; + /** + * @var bool + */ + public $isDynamicPartitionWrite = false; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'type', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'level', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'tablename', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'partitionname', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'operationType', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'isAcid', + 'type' => TType::BOOL, + ), + 8 => array( + 'var' => 'isDynamicPartitionWrite', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['level'])) { + $this->level = $vals['level']; + } + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tablename'])) { + $this->tablename = $vals['tablename']; + } + if (isset($vals['partitionname'])) { + $this->partitionname = $vals['partitionname']; + } + if (isset($vals['operationType'])) { + $this->operationType = $vals['operationType']; + } + if (isset($vals['isAcid'])) { + $this->isAcid = $vals['isAcid']; + } + if (isset($vals['isDynamicPartitionWrite'])) { + $this->isDynamicPartitionWrite = $vals['isDynamicPartitionWrite']; + } + } + } + + public function getName() { + return 'LockComponent'; + } + + 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->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->level); + } 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->tablename); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->partitionname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->operationType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isAcid); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isDynamicPartitionWrite); + } 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('LockComponent'); + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::I32, 1); + $xfer += $output->writeI32($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->level !== null) { + $xfer += $output->writeFieldBegin('level', TType::I32, 2); + $xfer += $output->writeI32($this->level); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 3); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tablename !== null) { + $xfer += $output->writeFieldBegin('tablename', TType::STRING, 4); + $xfer += $output->writeString($this->tablename); + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionname !== null) { + $xfer += $output->writeFieldBegin('partitionname', TType::STRING, 5); + $xfer += $output->writeString($this->partitionname); + $xfer += $output->writeFieldEnd(); + } + if ($this->operationType !== null) { + $xfer += $output->writeFieldBegin('operationType', TType::I32, 6); + $xfer += $output->writeI32($this->operationType); + $xfer += $output->writeFieldEnd(); + } + if ($this->isAcid !== null) { + $xfer += $output->writeFieldBegin('isAcid', TType::BOOL, 7); + $xfer += $output->writeBool($this->isAcid); + $xfer += $output->writeFieldEnd(); + } + if ($this->isDynamicPartitionWrite !== null) { + $xfer += $output->writeFieldBegin('isDynamicPartitionWrite', TType::BOOL, 8); + $xfer += $output->writeBool($this->isDynamicPartitionWrite); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class LockRequest { + static $_TSPEC; + + /** + * @var \metastore\LockComponent[] + */ + public $component = null; + /** + * @var int + */ + public $txnid = null; + /** + * @var string + */ + public $user = null; + /** + * @var string + */ + public $hostname = null; + /** + * @var string + */ + public $agentInfo = "Unknown"; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'component', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\LockComponent', + ), + ), + 2 => array( + 'var' => 'txnid', + 'type' => TType::I64, + ), + 3 => array( + 'var' => 'user', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'hostname', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'agentInfo', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['component'])) { + $this->component = $vals['component']; + } + if (isset($vals['txnid'])) { + $this->txnid = $vals['txnid']; + } + if (isset($vals['user'])) { + $this->user = $vals['user']; + } + if (isset($vals['hostname'])) { + $this->hostname = $vals['hostname']; + } + if (isset($vals['agentInfo'])) { + $this->agentInfo = $vals['agentInfo']; + } + } + } + + public function getName() { + return 'LockRequest'; + } + + 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->component = array(); + $_size462 = 0; + $_etype465 = 0; + $xfer += $input->readListBegin($_etype465, $_size462); + for ($_i466 = 0; $_i466 < $_size462; ++$_i466) + { + $elem467 = null; + $elem467 = new \metastore\LockComponent(); + $xfer += $elem467->read($input); + $this->component []= $elem467; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->txnid); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->hostname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->agentInfo); + } 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('LockRequest'); + if ($this->component !== null) { + if (!is_array($this->component)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('component', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->component)); + { + foreach ($this->component as $iter468) + { + $xfer += $iter468->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->txnid !== null) { + $xfer += $output->writeFieldBegin('txnid', TType::I64, 2); + $xfer += $output->writeI64($this->txnid); + $xfer += $output->writeFieldEnd(); + } + if ($this->user !== null) { + $xfer += $output->writeFieldBegin('user', TType::STRING, 3); + $xfer += $output->writeString($this->user); + $xfer += $output->writeFieldEnd(); + } + if ($this->hostname !== null) { + $xfer += $output->writeFieldBegin('hostname', TType::STRING, 4); + $xfer += $output->writeString($this->hostname); + $xfer += $output->writeFieldEnd(); + } + if ($this->agentInfo !== null) { + $xfer += $output->writeFieldBegin('agentInfo', TType::STRING, 5); + $xfer += $output->writeString($this->agentInfo); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class LockResponse { + static $_TSPEC; + + /** + * @var int + */ + public $lockid = null; + /** + * @var int + */ + public $state = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lockid', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'state', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lockid'])) { + $this->lockid = $vals['lockid']; + } + if (isset($vals['state'])) { + $this->state = $vals['state']; + } + } + } + + public function getName() { + return 'LockResponse'; + } + + 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::I64) { + $xfer += $input->readI64($this->lockid); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + 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('LockResponse'); + if ($this->lockid !== null) { + $xfer += $output->writeFieldBegin('lockid', TType::I64, 1); + $xfer += $output->writeI64($this->lockid); + $xfer += $output->writeFieldEnd(); + } + if ($this->state !== null) { + $xfer += $output->writeFieldBegin('state', TType::I32, 2); + $xfer += $output->writeI32($this->state); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class CheckLockRequest { + static $_TSPEC; + + /** + * @var int + */ + public $lockid = null; + /** + * @var int + */ + public $txnid = null; + /** + * @var int + */ + public $elapsed_ms = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lockid', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'txnid', + 'type' => TType::I64, + ), + 3 => array( + 'var' => 'elapsed_ms', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lockid'])) { + $this->lockid = $vals['lockid']; + } + if (isset($vals['txnid'])) { + $this->txnid = $vals['txnid']; + } + if (isset($vals['elapsed_ms'])) { + $this->elapsed_ms = $vals['elapsed_ms']; + } + } + } + + public function getName() { + return 'CheckLockRequest'; + } + + 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::I64) { + $xfer += $input->readI64($this->lockid); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->txnid); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->elapsed_ms); + } 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('CheckLockRequest'); + if ($this->lockid !== null) { + $xfer += $output->writeFieldBegin('lockid', TType::I64, 1); + $xfer += $output->writeI64($this->lockid); + $xfer += $output->writeFieldEnd(); + } + if ($this->txnid !== null) { + $xfer += $output->writeFieldBegin('txnid', TType::I64, 2); + $xfer += $output->writeI64($this->txnid); + $xfer += $output->writeFieldEnd(); + } + if ($this->elapsed_ms !== null) { + $xfer += $output->writeFieldBegin('elapsed_ms', TType::I64, 3); + $xfer += $output->writeI64($this->elapsed_ms); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class UnlockRequest { + static $_TSPEC; + + /** + * @var int + */ + public $lockid = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lockid', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lockid'])) { + $this->lockid = $vals['lockid']; + } + } + } + + public function getName() { + return 'UnlockRequest'; + } + + 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::I64) { + $xfer += $input->readI64($this->lockid); + } 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('UnlockRequest'); + if ($this->lockid !== null) { + $xfer += $output->writeFieldBegin('lockid', TType::I64, 1); + $xfer += $output->writeI64($this->lockid); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ShowLocksRequest { + static $_TSPEC; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $tablename = null; + /** + * @var string + */ + public $partname = null; + /** + * @var bool + */ + public $isExtended = false; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tablename', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'partname', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'isExtended', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tablename'])) { + $this->tablename = $vals['tablename']; + } + if (isset($vals['partname'])) { + $this->partname = $vals['partname']; + } + if (isset($vals['isExtended'])) { + $this->isExtended = $vals['isExtended']; + } + } + } + + public function getName() { + return 'ShowLocksRequest'; + } + + 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->tablename); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->partname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isExtended); + } 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('ShowLocksRequest'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tablename !== null) { + $xfer += $output->writeFieldBegin('tablename', TType::STRING, 2); + $xfer += $output->writeString($this->tablename); + $xfer += $output->writeFieldEnd(); + } + if ($this->partname !== null) { + $xfer += $output->writeFieldBegin('partname', TType::STRING, 3); + $xfer += $output->writeString($this->partname); + $xfer += $output->writeFieldEnd(); + } + if ($this->isExtended !== null) { + $xfer += $output->writeFieldBegin('isExtended', TType::BOOL, 4); + $xfer += $output->writeBool($this->isExtended); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ShowLocksResponseElement { + static $_TSPEC; + + /** + * @var int + */ + public $lockid = null; + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $tablename = null; + /** + * @var string + */ + public $partname = null; + /** + * @var int + */ + public $state = null; + /** + * @var int + */ + public $type = null; + /** + * @var int + */ + public $txnid = null; + /** + * @var int + */ + public $lastheartbeat = null; + /** + * @var int + */ + public $acquiredat = null; + /** + * @var string + */ + public $user = null; + /** + * @var string + */ + public $hostname = null; + /** + * @var int + */ + public $heartbeatCount = 0; + /** + * @var string + */ + public $agentInfo = null; + /** + * @var int + */ + public $blockedByExtId = null; + /** + * @var int + */ + public $blockedByIntId = null; + /** + * @var int + */ + public $lockIdInternal = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lockid', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'tablename', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'partname', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'state', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'type', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'txnid', + 'type' => TType::I64, + ), + 8 => array( + 'var' => 'lastheartbeat', + 'type' => TType::I64, + ), + 9 => array( + 'var' => 'acquiredat', + 'type' => TType::I64, + ), + 10 => array( + 'var' => 'user', + 'type' => TType::STRING, + ), + 11 => array( + 'var' => 'hostname', + 'type' => TType::STRING, + ), + 12 => array( + 'var' => 'heartbeatCount', + 'type' => TType::I32, + ), + 13 => array( + 'var' => 'agentInfo', + 'type' => TType::STRING, + ), + 14 => array( + 'var' => 'blockedByExtId', + 'type' => TType::I64, + ), + 15 => array( + 'var' => 'blockedByIntId', + 'type' => TType::I64, + ), + 16 => array( + 'var' => 'lockIdInternal', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lockid'])) { + $this->lockid = $vals['lockid']; + } + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tablename'])) { + $this->tablename = $vals['tablename']; + } + if (isset($vals['partname'])) { + $this->partname = $vals['partname']; + } + if (isset($vals['state'])) { + $this->state = $vals['state']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['txnid'])) { + $this->txnid = $vals['txnid']; + } + if (isset($vals['lastheartbeat'])) { + $this->lastheartbeat = $vals['lastheartbeat']; + } + if (isset($vals['acquiredat'])) { + $this->acquiredat = $vals['acquiredat']; + } + if (isset($vals['user'])) { + $this->user = $vals['user']; + } + if (isset($vals['hostname'])) { + $this->hostname = $vals['hostname']; + } + if (isset($vals['heartbeatCount'])) { + $this->heartbeatCount = $vals['heartbeatCount']; + } + if (isset($vals['agentInfo'])) { + $this->agentInfo = $vals['agentInfo']; + } + if (isset($vals['blockedByExtId'])) { + $this->blockedByExtId = $vals['blockedByExtId']; + } + if (isset($vals['blockedByIntId'])) { + $this->blockedByIntId = $vals['blockedByIntId']; + } + if (isset($vals['lockIdInternal'])) { + $this->lockIdInternal = $vals['lockIdInternal']; + } + } + } + + public function getName() { + return 'ShowLocksResponseElement'; + } + + 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::I64) { + $xfer += $input->readI64($this->lockid); + } 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::STRING) { + $xfer += $input->readString($this->partname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->state); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->txnid); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->lastheartbeat); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->acquiredat); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->hostname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 12: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->heartbeatCount); + } else { + $xfer += $input->skip($ftype); + } + break; + case 13: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->agentInfo); + } else { + $xfer += $input->skip($ftype); + } + break; + case 14: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->blockedByExtId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 15: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->blockedByIntId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 16: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->lockIdInternal); + } 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('ShowLocksResponseElement'); + if ($this->lockid !== null) { + $xfer += $output->writeFieldBegin('lockid', TType::I64, 1); + $xfer += $output->writeI64($this->lockid); + $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->partname !== null) { + $xfer += $output->writeFieldBegin('partname', TType::STRING, 4); + $xfer += $output->writeString($this->partname); + $xfer += $output->writeFieldEnd(); + } + if ($this->state !== null) { + $xfer += $output->writeFieldBegin('state', TType::I32, 5); + $xfer += $output->writeI32($this->state); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::I32, 6); + $xfer += $output->writeI32($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->txnid !== null) { + $xfer += $output->writeFieldBegin('txnid', TType::I64, 7); + $xfer += $output->writeI64($this->txnid); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastheartbeat !== null) { + $xfer += $output->writeFieldBegin('lastheartbeat', TType::I64, 8); + $xfer += $output->writeI64($this->lastheartbeat); + $xfer += $output->writeFieldEnd(); + } + if ($this->acquiredat !== null) { + $xfer += $output->writeFieldBegin('acquiredat', TType::I64, 9); + $xfer += $output->writeI64($this->acquiredat); + $xfer += $output->writeFieldEnd(); + } + if ($this->user !== null) { + $xfer += $output->writeFieldBegin('user', TType::STRING, 10); + $xfer += $output->writeString($this->user); + $xfer += $output->writeFieldEnd(); + } + if ($this->hostname !== null) { + $xfer += $output->writeFieldBegin('hostname', TType::STRING, 11); + $xfer += $output->writeString($this->hostname); + $xfer += $output->writeFieldEnd(); + } + if ($this->heartbeatCount !== null) { + $xfer += $output->writeFieldBegin('heartbeatCount', TType::I32, 12); + $xfer += $output->writeI32($this->heartbeatCount); + $xfer += $output->writeFieldEnd(); + } + if ($this->agentInfo !== null) { + $xfer += $output->writeFieldBegin('agentInfo', TType::STRING, 13); + $xfer += $output->writeString($this->agentInfo); + $xfer += $output->writeFieldEnd(); + } + if ($this->blockedByExtId !== null) { + $xfer += $output->writeFieldBegin('blockedByExtId', TType::I64, 14); + $xfer += $output->writeI64($this->blockedByExtId); + $xfer += $output->writeFieldEnd(); + } + if ($this->blockedByIntId !== null) { + $xfer += $output->writeFieldBegin('blockedByIntId', TType::I64, 15); + $xfer += $output->writeI64($this->blockedByIntId); + $xfer += $output->writeFieldEnd(); + } + if ($this->lockIdInternal !== null) { + $xfer += $output->writeFieldBegin('lockIdInternal', TType::I64, 16); + $xfer += $output->writeI64($this->lockIdInternal); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ShowLocksResponse { + static $_TSPEC; + + /** + * @var \metastore\ShowLocksResponseElement[] + */ + public $locks = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'locks', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\ShowLocksResponseElement', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['locks'])) { + $this->locks = $vals['locks']; + } + } + } + + public function getName() { + return 'ShowLocksResponse'; + } + + 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->locks = array(); + $_size469 = 0; + $_etype472 = 0; + $xfer += $input->readListBegin($_etype472, $_size469); + for ($_i473 = 0; $_i473 < $_size469; ++$_i473) + { + $elem474 = null; + $elem474 = new \metastore\ShowLocksResponseElement(); + $xfer += $elem474->read($input); + $this->locks []= $elem474; + } + $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('ShowLocksResponse'); + if ($this->locks !== null) { + if (!is_array($this->locks)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('locks', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->locks)); + { + foreach ($this->locks as $iter475) + { + $xfer += $iter475->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class HeartbeatRequest { + static $_TSPEC; + + /** + * @var int + */ + public $lockid = null; + /** + * @var int + */ + public $txnid = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lockid', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'txnid', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lockid'])) { + $this->lockid = $vals['lockid']; + } + if (isset($vals['txnid'])) { + $this->txnid = $vals['txnid']; + } + } + } + + public function getName() { + return 'HeartbeatRequest'; + } + + 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::I64) { + $xfer += $input->readI64($this->lockid); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->txnid); + } 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('HeartbeatRequest'); + if ($this->lockid !== null) { + $xfer += $output->writeFieldBegin('lockid', TType::I64, 1); + $xfer += $output->writeI64($this->lockid); + $xfer += $output->writeFieldEnd(); + } + if ($this->txnid !== null) { + $xfer += $output->writeFieldBegin('txnid', TType::I64, 2); + $xfer += $output->writeI64($this->txnid); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class HeartbeatTxnRangeRequest { + static $_TSPEC; + + /** + * @var int + */ + public $min = null; + /** + * @var int + */ + public $max = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'min', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'max', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['min'])) { + $this->min = $vals['min']; + } + if (isset($vals['max'])) { + $this->max = $vals['max']; + } + } + } + + public function getName() { + return 'HeartbeatTxnRangeRequest'; + } + + 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::I64) { + $xfer += $input->readI64($this->min); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->max); + } 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('HeartbeatTxnRangeRequest'); + if ($this->min !== null) { + $xfer += $output->writeFieldBegin('min', TType::I64, 1); + $xfer += $output->writeI64($this->min); + $xfer += $output->writeFieldEnd(); + } + if ($this->max !== null) { + $xfer += $output->writeFieldBegin('max', TType::I64, 2); + $xfer += $output->writeI64($this->max); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class HeartbeatTxnRangeResponse { + static $_TSPEC; + + /** + * @var int[] + */ + public $aborted = null; + /** + * @var int[] + */ + public $nosuch = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'aborted', + 'type' => TType::SET, + 'etype' => TType::I64, + 'elem' => array( + 'type' => TType::I64, + ), + ), + 2 => array( + 'var' => 'nosuch', + 'type' => TType::SET, + 'etype' => TType::I64, + 'elem' => array( + 'type' => TType::I64, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['aborted'])) { + $this->aborted = $vals['aborted']; + } + if (isset($vals['nosuch'])) { + $this->nosuch = $vals['nosuch']; + } + } + } + + public function getName() { + return 'HeartbeatTxnRangeResponse'; + } + + 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::SET) { + $this->aborted = array(); + $_size476 = 0; + $_etype479 = 0; + $xfer += $input->readSetBegin($_etype479, $_size476); + for ($_i480 = 0; $_i480 < $_size476; ++$_i480) + { + $elem481 = null; + $xfer += $input->readI64($elem481); + if (is_scalar($elem481)) { + $this->aborted[$elem481] = true; + } else { + $this->aborted []= $elem481; + } + } + $xfer += $input->readSetEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::SET) { + $this->nosuch = array(); + $_size482 = 0; + $_etype485 = 0; + $xfer += $input->readSetBegin($_etype485, $_size482); + for ($_i486 = 0; $_i486 < $_size482; ++$_i486) + { + $elem487 = null; + $xfer += $input->readI64($elem487); + if (is_scalar($elem487)) { + $this->nosuch[$elem487] = true; + } else { + $this->nosuch []= $elem487; + } + } + $xfer += $input->readSetEnd(); + } 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('HeartbeatTxnRangeResponse'); + if ($this->aborted !== null) { + if (!is_array($this->aborted)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('aborted', TType::SET, 1); + { + $output->writeSetBegin(TType::I64, count($this->aborted)); + { + foreach ($this->aborted as $iter488 => $iter489) + { + if (is_scalar($iter489)) { + $xfer += $output->writeI64($iter488); + } else { + $xfer += $output->writeI64($iter489); + } + } + } + $output->writeSetEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->nosuch !== null) { + if (!is_array($this->nosuch)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('nosuch', TType::SET, 2); + { + $output->writeSetBegin(TType::I64, count($this->nosuch)); + { + foreach ($this->nosuch as $iter490 => $iter491) + { + if (is_scalar($iter491)) { + $xfer += $output->writeI64($iter490); + } else { + $xfer += $output->writeI64($iter491); + } + } + } + $output->writeSetEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class CompactionRequest { + static $_TSPEC; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $tablename = null; + /** + * @var string + */ + public $partitionname = null; + /** + * @var int + */ + public $type = null; + /** + * @var string + */ + public $runas = null; + /** + * @var array + */ + public $properties = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tablename', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'partitionname', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'type', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'runas', + 'type' => TType::STRING, + ), + 6 => 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['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tablename'])) { + $this->tablename = $vals['tablename']; + } + if (isset($vals['partitionname'])) { + $this->partitionname = $vals['partitionname']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['runas'])) { + $this->runas = $vals['runas']; + } + if (isset($vals['properties'])) { + $this->properties = $vals['properties']; + } + } + } + + public function getName() { + return 'CompactionRequest'; + } + + 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->tablename); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->partitionname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->runas); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::MAP) { + $this->properties = array(); + $_size492 = 0; + $_ktype493 = 0; + $_vtype494 = 0; + $xfer += $input->readMapBegin($_ktype493, $_vtype494, $_size492); + for ($_i496 = 0; $_i496 < $_size492; ++$_i496) + { + $key497 = ''; + $val498 = ''; + $xfer += $input->readString($key497); + $xfer += $input->readString($val498); + $this->properties[$key497] = $val498; + } + $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('CompactionRequest'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tablename !== null) { + $xfer += $output->writeFieldBegin('tablename', TType::STRING, 2); + $xfer += $output->writeString($this->tablename); + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionname !== null) { + $xfer += $output->writeFieldBegin('partitionname', TType::STRING, 3); + $xfer += $output->writeString($this->partitionname); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::I32, 4); + $xfer += $output->writeI32($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->runas !== null) { + $xfer += $output->writeFieldBegin('runas', TType::STRING, 5); + $xfer += $output->writeString($this->runas); + $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, 6); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); + { + foreach ($this->properties as $kiter499 => $viter500) + { + $xfer += $output->writeString($kiter499); + $xfer += $output->writeString($viter500); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class CompactionResponse { + static $_TSPEC; + + /** + * @var int + */ + public $id = null; + /** + * @var string + */ + public $state = null; + /** + * @var bool + */ + public $accepted = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'id', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'state', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'accepted', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['id'])) { + $this->id = $vals['id']; + } + if (isset($vals['state'])) { + $this->state = $vals['state']; + } + if (isset($vals['accepted'])) { + $this->accepted = $vals['accepted']; + } + } + } + + public function getName() { + return 'CompactionResponse'; + } + + 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::I64) { + $xfer += $input->readI64($this->id); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->state); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->accepted); + } 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('CompactionResponse'); + if ($this->id !== null) { + $xfer += $output->writeFieldBegin('id', TType::I64, 1); + $xfer += $output->writeI64($this->id); + $xfer += $output->writeFieldEnd(); + } + if ($this->state !== null) { + $xfer += $output->writeFieldBegin('state', TType::STRING, 2); + $xfer += $output->writeString($this->state); + $xfer += $output->writeFieldEnd(); + } + if ($this->accepted !== null) { + $xfer += $output->writeFieldBegin('accepted', TType::BOOL, 3); + $xfer += $output->writeBool($this->accepted); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ShowCompactRequest { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ShowCompactRequest'; + } + + 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('ShowCompactRequest'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ShowCompactResponseElement { + static $_TSPEC; + + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $tablename = null; + /** + * @var string + */ + public $partitionname = null; + /** + * @var int + */ + public $type = null; + /** + * @var string + */ + public $state = null; + /** + * @var string + */ + public $workerid = null; + /** + * @var int + */ + public $start = null; + /** + * @var string + */ + public $runAs = null; + /** + * @var int + */ + public $hightestTxnId = null; + /** + * @var string + */ + public $metaInfo = null; + /** + * @var int + */ + public $endTime = null; + /** + * @var string + */ + public $hadoopJobId = "None"; + /** + * @var int + */ + public $id = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tablename', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'partitionname', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'type', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'state', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'workerid', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'start', + 'type' => TType::I64, + ), + 8 => array( + 'var' => 'runAs', + 'type' => TType::STRING, + ), + 9 => array( + 'var' => 'hightestTxnId', + 'type' => TType::I64, + ), + 10 => array( + 'var' => 'metaInfo', + 'type' => TType::STRING, + ), + 11 => array( + 'var' => 'endTime', + 'type' => TType::I64, + ), + 12 => array( + 'var' => 'hadoopJobId', + 'type' => TType::STRING, + ), + 13 => array( + 'var' => 'id', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tablename'])) { + $this->tablename = $vals['tablename']; + } + if (isset($vals['partitionname'])) { + $this->partitionname = $vals['partitionname']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['state'])) { + $this->state = $vals['state']; + } + if (isset($vals['workerid'])) { + $this->workerid = $vals['workerid']; + } + if (isset($vals['start'])) { + $this->start = $vals['start']; + } + if (isset($vals['runAs'])) { + $this->runAs = $vals['runAs']; + } + if (isset($vals['hightestTxnId'])) { + $this->hightestTxnId = $vals['hightestTxnId']; + } + if (isset($vals['metaInfo'])) { + $this->metaInfo = $vals['metaInfo']; + } + if (isset($vals['endTime'])) { + $this->endTime = $vals['endTime']; + } + if (isset($vals['hadoopJobId'])) { + $this->hadoopJobId = $vals['hadoopJobId']; + } + if (isset($vals['id'])) { + $this->id = $vals['id']; + } + } + } + + public function getName() { + return 'ShowCompactResponseElement'; + } + + 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->tablename); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->partitionname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->state); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->workerid); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->start); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->runAs); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->hightestTxnId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->metaInfo); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->endTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 12: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->hadoopJobId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 13: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->id); + } 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('ShowCompactResponseElement'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tablename !== null) { + $xfer += $output->writeFieldBegin('tablename', TType::STRING, 2); + $xfer += $output->writeString($this->tablename); + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionname !== null) { + $xfer += $output->writeFieldBegin('partitionname', TType::STRING, 3); + $xfer += $output->writeString($this->partitionname); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::I32, 4); + $xfer += $output->writeI32($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->state !== null) { + $xfer += $output->writeFieldBegin('state', TType::STRING, 5); + $xfer += $output->writeString($this->state); + $xfer += $output->writeFieldEnd(); + } + if ($this->workerid !== null) { + $xfer += $output->writeFieldBegin('workerid', TType::STRING, 6); + $xfer += $output->writeString($this->workerid); + $xfer += $output->writeFieldEnd(); + } + if ($this->start !== null) { + $xfer += $output->writeFieldBegin('start', TType::I64, 7); + $xfer += $output->writeI64($this->start); + $xfer += $output->writeFieldEnd(); + } + if ($this->runAs !== null) { + $xfer += $output->writeFieldBegin('runAs', TType::STRING, 8); + $xfer += $output->writeString($this->runAs); + $xfer += $output->writeFieldEnd(); + } + if ($this->hightestTxnId !== null) { + $xfer += $output->writeFieldBegin('hightestTxnId', TType::I64, 9); + $xfer += $output->writeI64($this->hightestTxnId); + $xfer += $output->writeFieldEnd(); + } + if ($this->metaInfo !== null) { + $xfer += $output->writeFieldBegin('metaInfo', TType::STRING, 10); + $xfer += $output->writeString($this->metaInfo); + $xfer += $output->writeFieldEnd(); + } + if ($this->endTime !== null) { + $xfer += $output->writeFieldBegin('endTime', TType::I64, 11); + $xfer += $output->writeI64($this->endTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->hadoopJobId !== null) { + $xfer += $output->writeFieldBegin('hadoopJobId', TType::STRING, 12); + $xfer += $output->writeString($this->hadoopJobId); + $xfer += $output->writeFieldEnd(); + } + if ($this->id !== null) { + $xfer += $output->writeFieldBegin('id', TType::I64, 13); + $xfer += $output->writeI64($this->id); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ShowCompactResponse { + static $_TSPEC; + + /** + * @var \metastore\ShowCompactResponseElement[] + */ + public $compacts = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'compacts', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\ShowCompactResponseElement', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['compacts'])) { + $this->compacts = $vals['compacts']; + } + } + } + + public function getName() { + return 'ShowCompactResponse'; + } + + 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->compacts = array(); + $_size501 = 0; + $_etype504 = 0; + $xfer += $input->readListBegin($_etype504, $_size501); + for ($_i505 = 0; $_i505 < $_size501; ++$_i505) + { + $elem506 = null; + $elem506 = new \metastore\ShowCompactResponseElement(); + $xfer += $elem506->read($input); + $this->compacts []= $elem506; + } + $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('ShowCompactResponse'); + if ($this->compacts !== null) { + if (!is_array($this->compacts)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('compacts', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->compacts)); + { + foreach ($this->compacts as $iter507) + { + $xfer += $iter507->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AddDynamicPartitions { + static $_TSPEC; + + /** + * @var int + */ + public $txnid = null; + /** + * @var string + */ + public $dbname = null; + /** + * @var string + */ + public $tablename = null; + /** + * @var string[] + */ + public $partitionnames = null; + /** + * @var int + */ + public $operationType = 5; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'txnid', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'tablename', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'partitionnames', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 5 => array( + 'var' => 'operationType', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['txnid'])) { + $this->txnid = $vals['txnid']; + } + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tablename'])) { + $this->tablename = $vals['tablename']; + } + if (isset($vals['partitionnames'])) { + $this->partitionnames = $vals['partitionnames']; + } + if (isset($vals['operationType'])) { + $this->operationType = $vals['operationType']; + } + } + } + + public function getName() { + return 'AddDynamicPartitions'; + } + + 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::I64) { + $xfer += $input->readI64($this->txnid); + } 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::LST) { + $this->partitionnames = array(); + $_size508 = 0; + $_etype511 = 0; + $xfer += $input->readListBegin($_etype511, $_size508); + for ($_i512 = 0; $_i512 < $_size508; ++$_i512) + { + $elem513 = null; + $xfer += $input->readString($elem513); + $this->partitionnames []= $elem513; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->operationType); + } 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('AddDynamicPartitions'); + if ($this->txnid !== null) { + $xfer += $output->writeFieldBegin('txnid', TType::I64, 1); + $xfer += $output->writeI64($this->txnid); + $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->partitionnames !== null) { + if (!is_array($this->partitionnames)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitionnames', TType::LST, 4); + { + $output->writeListBegin(TType::STRING, count($this->partitionnames)); + { + foreach ($this->partitionnames as $iter514) + { + $xfer += $output->writeString($iter514); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->operationType !== null) { + $xfer += $output->writeFieldBegin('operationType', TType::I32, 5); + $xfer += $output->writeI32($this->operationType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class NotificationEventRequest { + static $_TSPEC; + + /** + * @var int + */ + public $lastEvent = null; + /** + * @var int + */ + public $maxEvents = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lastEvent', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'maxEvents', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lastEvent'])) { + $this->lastEvent = $vals['lastEvent']; + } + if (isset($vals['maxEvents'])) { + $this->maxEvents = $vals['maxEvents']; + } + } + } + + public function getName() { + return 'NotificationEventRequest'; + } + + 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::I64) { + $xfer += $input->readI64($this->lastEvent); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->maxEvents); + } 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('NotificationEventRequest'); + if ($this->lastEvent !== null) { + $xfer += $output->writeFieldBegin('lastEvent', TType::I64, 1); + $xfer += $output->writeI64($this->lastEvent); + $xfer += $output->writeFieldEnd(); + } + if ($this->maxEvents !== null) { + $xfer += $output->writeFieldBegin('maxEvents', TType::I32, 2); + $xfer += $output->writeI32($this->maxEvents); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class NotificationEvent { + static $_TSPEC; + + /** + * @var int + */ + public $eventId = null; + /** + * @var int + */ + public $eventTime = null; + /** + * @var string + */ + public $eventType = null; + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tableName = null; + /** + * @var string + */ + public $message = null; + /** + * @var string + */ + public $messageFormat = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'eventId', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'eventTime', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'eventType', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'messageFormat', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['eventId'])) { + $this->eventId = $vals['eventId']; + } + if (isset($vals['eventTime'])) { + $this->eventTime = $vals['eventTime']; + } + if (isset($vals['eventType'])) { + $this->eventType = $vals['eventType']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + if (isset($vals['messageFormat'])) { + $this->messageFormat = $vals['messageFormat']; + } + } + } + + public function getName() { + return 'NotificationEvent'; + } + + 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::I64) { + $xfer += $input->readI64($this->eventId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->eventTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->eventType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->messageFormat); + } 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('NotificationEvent'); + if ($this->eventId !== null) { + $xfer += $output->writeFieldBegin('eventId', TType::I64, 1); + $xfer += $output->writeI64($this->eventId); + $xfer += $output->writeFieldEnd(); + } + if ($this->eventTime !== null) { + $xfer += $output->writeFieldBegin('eventTime', TType::I32, 2); + $xfer += $output->writeI32($this->eventTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->eventType !== null) { + $xfer += $output->writeFieldBegin('eventType', TType::STRING, 3); + $xfer += $output->writeString($this->eventType); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 4); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 5); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 6); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + if ($this->messageFormat !== null) { + $xfer += $output->writeFieldBegin('messageFormat', TType::STRING, 7); + $xfer += $output->writeString($this->messageFormat); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class NotificationEventResponse { + static $_TSPEC; + + /** + * @var \metastore\NotificationEvent[] + */ + public $events = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'events', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\NotificationEvent', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['events'])) { + $this->events = $vals['events']; + } + } + } + + public function getName() { + return 'NotificationEventResponse'; + } + + 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->events = array(); + $_size515 = 0; + $_etype518 = 0; + $xfer += $input->readListBegin($_etype518, $_size515); + for ($_i519 = 0; $_i519 < $_size515; ++$_i519) + { + $elem520 = null; + $elem520 = new \metastore\NotificationEvent(); + $xfer += $elem520->read($input); + $this->events []= $elem520; + } + $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('NotificationEventResponse'); + if ($this->events !== null) { + if (!is_array($this->events)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('events', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->events)); + { + foreach ($this->events as $iter521) + { + $xfer += $iter521->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class CurrentNotificationEventId { + static $_TSPEC; + + /** + * @var int + */ + public $eventId = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'eventId', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['eventId'])) { + $this->eventId = $vals['eventId']; + } + } + } + + public function getName() { + return 'CurrentNotificationEventId'; + } + + 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::I64) { + $xfer += $input->readI64($this->eventId); + } 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('CurrentNotificationEventId'); + if ($this->eventId !== null) { + $xfer += $output->writeFieldBegin('eventId', TType::I64, 1); + $xfer += $output->writeI64($this->eventId); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class InsertEventRequestData { + static $_TSPEC; + + /** + * @var bool + */ + public $replace = null; + /** + * @var string[] + */ + public $filesAdded = null; + /** + * @var string[] + */ + public $filesAddedChecksum = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'replace', + 'type' => TType::BOOL, + ), + 2 => array( + 'var' => 'filesAdded', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'filesAddedChecksum', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['replace'])) { + $this->replace = $vals['replace']; + } + if (isset($vals['filesAdded'])) { + $this->filesAdded = $vals['filesAdded']; + } + if (isset($vals['filesAddedChecksum'])) { + $this->filesAddedChecksum = $vals['filesAddedChecksum']; + } + } + } + + public function getName() { + return 'InsertEventRequestData'; + } + + 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::BOOL) { + $xfer += $input->readBool($this->replace); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->filesAdded = array(); + $_size522 = 0; + $_etype525 = 0; + $xfer += $input->readListBegin($_etype525, $_size522); + for ($_i526 = 0; $_i526 < $_size522; ++$_i526) + { + $elem527 = null; + $xfer += $input->readString($elem527); + $this->filesAdded []= $elem527; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->filesAddedChecksum = array(); + $_size528 = 0; + $_etype531 = 0; + $xfer += $input->readListBegin($_etype531, $_size528); + for ($_i532 = 0; $_i532 < $_size528; ++$_i532) + { + $elem533 = null; + $xfer += $input->readString($elem533); + $this->filesAddedChecksum []= $elem533; + } + $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('InsertEventRequestData'); + if ($this->replace !== null) { + $xfer += $output->writeFieldBegin('replace', TType::BOOL, 1); + $xfer += $output->writeBool($this->replace); + $xfer += $output->writeFieldEnd(); + } + if ($this->filesAdded !== null) { + if (!is_array($this->filesAdded)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('filesAdded', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->filesAdded)); + { + foreach ($this->filesAdded as $iter534) + { + $xfer += $output->writeString($iter534); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->filesAddedChecksum !== null) { + if (!is_array($this->filesAddedChecksum)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('filesAddedChecksum', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->filesAddedChecksum)); + { + foreach ($this->filesAddedChecksum as $iter535) + { + $xfer += $output->writeString($iter535); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class FireEventRequestData { + static $_TSPEC; + + /** + * @var \metastore\InsertEventRequestData + */ + public $insertData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'insertData', + 'type' => TType::STRUCT, + 'class' => '\metastore\InsertEventRequestData', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['insertData'])) { + $this->insertData = $vals['insertData']; + } + } + } + + public function getName() { + return 'FireEventRequestData'; + } + + 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->insertData = new \metastore\InsertEventRequestData(); + $xfer += $this->insertData->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('FireEventRequestData'); + if ($this->insertData !== null) { + if (!is_object($this->insertData)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('insertData', TType::STRUCT, 1); + $xfer += $this->insertData->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class FireEventRequest { + static $_TSPEC; + + /** + * @var bool + */ + public $successful = null; + /** + * @var \metastore\FireEventRequestData + */ + public $data = null; + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tableName = null; + /** + * @var string[] + */ + public $partitionVals = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'successful', + 'type' => TType::BOOL, + ), + 2 => array( + 'var' => 'data', + 'type' => TType::STRUCT, + 'class' => '\metastore\FireEventRequestData', + ), + 3 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'partitionVals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['successful'])) { + $this->successful = $vals['successful']; + } + if (isset($vals['data'])) { + $this->data = $vals['data']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['partitionVals'])) { + $this->partitionVals = $vals['partitionVals']; + } + } + } + + public function getName() { + return 'FireEventRequest'; + } + + 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::BOOL) { + $xfer += $input->readBool($this->successful); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->data = new \metastore\FireEventRequestData(); + $xfer += $this->data->read($input); + } 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->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->partitionVals = array(); + $_size536 = 0; + $_etype539 = 0; + $xfer += $input->readListBegin($_etype539, $_size536); + for ($_i540 = 0; $_i540 < $_size536; ++$_i540) + { + $elem541 = null; + $xfer += $input->readString($elem541); + $this->partitionVals []= $elem541; + } + $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('FireEventRequest'); + if ($this->successful !== null) { + $xfer += $output->writeFieldBegin('successful', TType::BOOL, 1); + $xfer += $output->writeBool($this->successful); + $xfer += $output->writeFieldEnd(); + } + if ($this->data !== null) { + if (!is_object($this->data)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('data', TType::STRUCT, 2); + $xfer += $this->data->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 3); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 4); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionVals !== null) { + if (!is_array($this->partitionVals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitionVals', TType::LST, 5); + { + $output->writeListBegin(TType::STRING, count($this->partitionVals)); + { + foreach ($this->partitionVals as $iter542) + { + $xfer += $output->writeString($iter542); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class FireEventResponse { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'FireEventResponse'; + } + + 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('FireEventResponse'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class MetadataPpdResult { + static $_TSPEC; + + /** + * @var string + */ + public $metadata = null; + /** + * @var string + */ + public $includeBitset = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'metadata', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'includeBitset', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['metadata'])) { + $this->metadata = $vals['metadata']; + } + if (isset($vals['includeBitset'])) { + $this->includeBitset = $vals['includeBitset']; + } + } + } + + public function getName() { + return 'MetadataPpdResult'; + } + + 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->metadata); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->includeBitset); + } 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('MetadataPpdResult'); + if ($this->metadata !== null) { + $xfer += $output->writeFieldBegin('metadata', TType::STRING, 1); + $xfer += $output->writeString($this->metadata); + $xfer += $output->writeFieldEnd(); + } + if ($this->includeBitset !== null) { + $xfer += $output->writeFieldBegin('includeBitset', TType::STRING, 2); + $xfer += $output->writeString($this->includeBitset); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetFileMetadataByExprResult { + static $_TSPEC; + + /** + * @var array + */ + public $metadata = null; + /** + * @var bool + */ + public $isSupported = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'metadata', + 'type' => TType::MAP, + 'ktype' => TType::I64, + 'vtype' => TType::STRUCT, + 'key' => array( + 'type' => TType::I64, + ), + 'val' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\MetadataPpdResult', + ), + ), + 2 => array( + 'var' => 'isSupported', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['metadata'])) { + $this->metadata = $vals['metadata']; + } + if (isset($vals['isSupported'])) { + $this->isSupported = $vals['isSupported']; + } + } + } + + public function getName() { + return 'GetFileMetadataByExprResult'; + } + + 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->metadata = array(); + $_size543 = 0; + $_ktype544 = 0; + $_vtype545 = 0; + $xfer += $input->readMapBegin($_ktype544, $_vtype545, $_size543); + for ($_i547 = 0; $_i547 < $_size543; ++$_i547) + { + $key548 = 0; + $val549 = new \metastore\MetadataPpdResult(); + $xfer += $input->readI64($key548); + $val549 = new \metastore\MetadataPpdResult(); + $xfer += $val549->read($input); + $this->metadata[$key548] = $val549; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isSupported); + } 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('GetFileMetadataByExprResult'); + if ($this->metadata !== null) { + if (!is_array($this->metadata)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('metadata', TType::MAP, 1); + { + $output->writeMapBegin(TType::I64, TType::STRUCT, count($this->metadata)); + { + foreach ($this->metadata as $kiter550 => $viter551) + { + $xfer += $output->writeI64($kiter550); + $xfer += $viter551->write($output); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->isSupported !== null) { + $xfer += $output->writeFieldBegin('isSupported', TType::BOOL, 2); + $xfer += $output->writeBool($this->isSupported); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetFileMetadataByExprRequest { + static $_TSPEC; + + /** + * @var int[] + */ + public $fileIds = null; + /** + * @var string + */ + public $expr = null; + /** + * @var bool + */ + public $doGetFooters = null; + /** + * @var int + */ + public $type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'fileIds', + 'type' => TType::LST, + 'etype' => TType::I64, + 'elem' => array( + 'type' => TType::I64, + ), + ), + 2 => array( + 'var' => 'expr', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'doGetFooters', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'type', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['fileIds'])) { + $this->fileIds = $vals['fileIds']; + } + if (isset($vals['expr'])) { + $this->expr = $vals['expr']; + } + if (isset($vals['doGetFooters'])) { + $this->doGetFooters = $vals['doGetFooters']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + } + } + + public function getName() { + return 'GetFileMetadataByExprRequest'; + } + + 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->fileIds = array(); + $_size552 = 0; + $_etype555 = 0; + $xfer += $input->readListBegin($_etype555, $_size552); + for ($_i556 = 0; $_i556 < $_size552; ++$_i556) + { + $elem557 = null; + $xfer += $input->readI64($elem557); + $this->fileIds []= $elem557; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->expr); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->doGetFooters); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($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('GetFileMetadataByExprRequest'); + if ($this->fileIds !== null) { + if (!is_array($this->fileIds)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fileIds', TType::LST, 1); + { + $output->writeListBegin(TType::I64, count($this->fileIds)); + { + foreach ($this->fileIds as $iter558) + { + $xfer += $output->writeI64($iter558); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->expr !== null) { + $xfer += $output->writeFieldBegin('expr', TType::STRING, 2); + $xfer += $output->writeString($this->expr); + $xfer += $output->writeFieldEnd(); + } + if ($this->doGetFooters !== null) { + $xfer += $output->writeFieldBegin('doGetFooters', TType::BOOL, 3); + $xfer += $output->writeBool($this->doGetFooters); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::I32, 4); + $xfer += $output->writeI32($this->type); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetFileMetadataResult { + static $_TSPEC; + + /** + * @var array + */ + public $metadata = null; + /** + * @var bool + */ + public $isSupported = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'metadata', + 'type' => TType::MAP, + 'ktype' => TType::I64, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::I64, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'isSupported', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['metadata'])) { + $this->metadata = $vals['metadata']; + } + if (isset($vals['isSupported'])) { + $this->isSupported = $vals['isSupported']; + } + } + } + + public function getName() { + return 'GetFileMetadataResult'; + } + + 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->metadata = array(); + $_size559 = 0; + $_ktype560 = 0; + $_vtype561 = 0; + $xfer += $input->readMapBegin($_ktype560, $_vtype561, $_size559); + for ($_i563 = 0; $_i563 < $_size559; ++$_i563) + { + $key564 = 0; + $val565 = ''; + $xfer += $input->readI64($key564); + $xfer += $input->readString($val565); + $this->metadata[$key564] = $val565; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isSupported); + } 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('GetFileMetadataResult'); + if ($this->metadata !== null) { + if (!is_array($this->metadata)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('metadata', TType::MAP, 1); + { + $output->writeMapBegin(TType::I64, TType::STRING, count($this->metadata)); + { + foreach ($this->metadata as $kiter566 => $viter567) + { + $xfer += $output->writeI64($kiter566); + $xfer += $output->writeString($viter567); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->isSupported !== null) { + $xfer += $output->writeFieldBegin('isSupported', TType::BOOL, 2); + $xfer += $output->writeBool($this->isSupported); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetFileMetadataRequest { + static $_TSPEC; + + /** + * @var int[] + */ + public $fileIds = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'fileIds', + 'type' => TType::LST, + 'etype' => TType::I64, + 'elem' => array( + 'type' => TType::I64, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['fileIds'])) { + $this->fileIds = $vals['fileIds']; + } + } + } + + public function getName() { + return 'GetFileMetadataRequest'; + } + + 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->fileIds = array(); + $_size568 = 0; + $_etype571 = 0; + $xfer += $input->readListBegin($_etype571, $_size568); + for ($_i572 = 0; $_i572 < $_size568; ++$_i572) + { + $elem573 = null; + $xfer += $input->readI64($elem573); + $this->fileIds []= $elem573; + } + $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('GetFileMetadataRequest'); + if ($this->fileIds !== null) { + if (!is_array($this->fileIds)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fileIds', TType::LST, 1); + { + $output->writeListBegin(TType::I64, count($this->fileIds)); + { + foreach ($this->fileIds as $iter574) + { + $xfer += $output->writeI64($iter574); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PutFileMetadataResult { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'PutFileMetadataResult'; + } + + 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('PutFileMetadataResult'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class PutFileMetadataRequest { + static $_TSPEC; + + /** + * @var int[] + */ + public $fileIds = null; + /** + * @var string[] + */ + public $metadata = null; + /** + * @var int + */ + public $type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'fileIds', + 'type' => TType::LST, + 'etype' => TType::I64, + 'elem' => array( + 'type' => TType::I64, + ), + ), + 2 => array( + 'var' => 'metadata', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'type', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['fileIds'])) { + $this->fileIds = $vals['fileIds']; + } + if (isset($vals['metadata'])) { + $this->metadata = $vals['metadata']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + } + } + + public function getName() { + return 'PutFileMetadataRequest'; + } + + 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->fileIds = array(); + $_size575 = 0; + $_etype578 = 0; + $xfer += $input->readListBegin($_etype578, $_size575); + for ($_i579 = 0; $_i579 < $_size575; ++$_i579) + { + $elem580 = null; + $xfer += $input->readI64($elem580); + $this->fileIds []= $elem580; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->metadata = array(); + $_size581 = 0; + $_etype584 = 0; + $xfer += $input->readListBegin($_etype584, $_size581); + for ($_i585 = 0; $_i585 < $_size581; ++$_i585) + { + $elem586 = null; + $xfer += $input->readString($elem586); + $this->metadata []= $elem586; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($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('PutFileMetadataRequest'); + if ($this->fileIds !== null) { + if (!is_array($this->fileIds)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fileIds', TType::LST, 1); + { + $output->writeListBegin(TType::I64, count($this->fileIds)); + { + foreach ($this->fileIds as $iter587) + { + $xfer += $output->writeI64($iter587); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->metadata !== null) { + if (!is_array($this->metadata)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('metadata', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->metadata)); + { + foreach ($this->metadata as $iter588) + { + $xfer += $output->writeString($iter588); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::I32, 3); + $xfer += $output->writeI32($this->type); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ClearFileMetadataResult { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ClearFileMetadataResult'; + } + + 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('ClearFileMetadataResult'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ClearFileMetadataRequest { + static $_TSPEC; + + /** + * @var int[] + */ + public $fileIds = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'fileIds', + 'type' => TType::LST, + 'etype' => TType::I64, + 'elem' => array( + 'type' => TType::I64, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['fileIds'])) { + $this->fileIds = $vals['fileIds']; + } + } + } + + public function getName() { + return 'ClearFileMetadataRequest'; + } + + 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->fileIds = array(); + $_size589 = 0; + $_etype592 = 0; + $xfer += $input->readListBegin($_etype592, $_size589); + for ($_i593 = 0; $_i593 < $_size589; ++$_i593) + { + $elem594 = null; + $xfer += $input->readI64($elem594); + $this->fileIds []= $elem594; + } + $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('ClearFileMetadataRequest'); + if ($this->fileIds !== null) { + if (!is_array($this->fileIds)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fileIds', TType::LST, 1); + { + $output->writeListBegin(TType::I64, count($this->fileIds)); + { + foreach ($this->fileIds as $iter595) + { + $xfer += $output->writeI64($iter595); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class CacheFileMetadataResult { + static $_TSPEC; + + /** + * @var bool + */ + public $isSupported = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'isSupported', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['isSupported'])) { + $this->isSupported = $vals['isSupported']; + } + } + } + + public function getName() { + return 'CacheFileMetadataResult'; + } + + 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::BOOL) { + $xfer += $input->readBool($this->isSupported); + } 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('CacheFileMetadataResult'); + if ($this->isSupported !== null) { + $xfer += $output->writeFieldBegin('isSupported', TType::BOOL, 1); + $xfer += $output->writeBool($this->isSupported); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class CacheFileMetadataRequest { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tblName = null; + /** + * @var string + */ + public $partName = null; + /** + * @var bool + */ + public $isAllParts = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tblName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'partName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'isAllParts', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tblName'])) { + $this->tblName = $vals['tblName']; + } + if (isset($vals['partName'])) { + $this->partName = $vals['partName']; + } + if (isset($vals['isAllParts'])) { + $this->isAllParts = $vals['isAllParts']; + } + } + } + + public function getName() { + return 'CacheFileMetadataRequest'; + } + + 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->tblName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->partName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isAllParts); + } 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('CacheFileMetadataRequest'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tblName !== null) { + $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); + $xfer += $output->writeString($this->tblName); + $xfer += $output->writeFieldEnd(); + } + if ($this->partName !== null) { + $xfer += $output->writeFieldBegin('partName', TType::STRING, 3); + $xfer += $output->writeString($this->partName); + $xfer += $output->writeFieldEnd(); + } + if ($this->isAllParts !== null) { + $xfer += $output->writeFieldBegin('isAllParts', TType::BOOL, 4); + $xfer += $output->writeBool($this->isAllParts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetAllFunctionsResponse { + static $_TSPEC; + + /** + * @var \metastore\Function[] + */ + public $functions = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'functions', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Function', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['functions'])) { + $this->functions = $vals['functions']; + } + } + } + + public function getName() { + return 'GetAllFunctionsResponse'; + } + + 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->functions = array(); + $_size596 = 0; + $_etype599 = 0; + $xfer += $input->readListBegin($_etype599, $_size596); + for ($_i600 = 0; $_i600 < $_size596; ++$_i600) + { + $elem601 = null; + $elem601 = new \metastore\Function(); + $xfer += $elem601->read($input); + $this->functions []= $elem601; + } + $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('GetAllFunctionsResponse'); + if ($this->functions !== null) { + if (!is_array($this->functions)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('functions', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->functions)); + { + foreach ($this->functions as $iter602) + { + $xfer += $iter602->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ClientCapabilities { + static $_TSPEC; + + /** + * @var int[] + */ + public $values = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'values', + 'type' => TType::LST, + 'etype' => TType::I32, + 'elem' => array( + 'type' => TType::I32, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['values'])) { + $this->values = $vals['values']; + } + } + } + + public function getName() { + return 'ClientCapabilities'; + } + + 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(); + $_size603 = 0; + $_etype606 = 0; + $xfer += $input->readListBegin($_etype606, $_size603); + for ($_i607 = 0; $_i607 < $_size603; ++$_i607) + { + $elem608 = null; + $xfer += $input->readI32($elem608); + $this->values []= $elem608; + } + $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('ClientCapabilities'); + 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::I32, count($this->values)); + { + foreach ($this->values as $iter609) + { + $xfer += $output->writeI32($iter609); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetTableRequest { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tblName = null; + /** + * @var \metastore\ClientCapabilities + */ + public $capabilities = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tblName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'capabilities', + 'type' => TType::STRUCT, + 'class' => '\metastore\ClientCapabilities', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tblName'])) { + $this->tblName = $vals['tblName']; + } + if (isset($vals['capabilities'])) { + $this->capabilities = $vals['capabilities']; + } + } + } + + public function getName() { + return 'GetTableRequest'; + } + + 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->tblName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->capabilities = new \metastore\ClientCapabilities(); + $xfer += $this->capabilities->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('GetTableRequest'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tblName !== null) { + $xfer += $output->writeFieldBegin('tblName', TType::STRING, 2); + $xfer += $output->writeString($this->tblName); + $xfer += $output->writeFieldEnd(); + } + if ($this->capabilities !== null) { + if (!is_object($this->capabilities)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('capabilities', TType::STRUCT, 3); + $xfer += $this->capabilities->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetTableResult { + static $_TSPEC; + + /** + * @var \metastore\Table + */ + public $table = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'table', + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['table'])) { + $this->table = $vals['table']; + } + } + } + + public function getName() { + return 'GetTableResult'; + } + + 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->table = new \metastore\Table(); + $xfer += $this->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('GetTableResult'); + if ($this->table !== null) { + if (!is_object($this->table)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('table', TType::STRUCT, 1); + $xfer += $this->table->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetTablesRequest { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string[] + */ + public $tblNames = null; + /** + * @var \metastore\ClientCapabilities + */ + public $capabilities = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tblNames', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'capabilities', + 'type' => TType::STRUCT, + 'class' => '\metastore\ClientCapabilities', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tblNames'])) { + $this->tblNames = $vals['tblNames']; + } + if (isset($vals['capabilities'])) { + $this->capabilities = $vals['capabilities']; + } + } + } + + public function getName() { + return 'GetTablesRequest'; + } + + 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->tblNames = array(); + $_size610 = 0; + $_etype613 = 0; + $xfer += $input->readListBegin($_etype613, $_size610); + for ($_i614 = 0; $_i614 < $_size610; ++$_i614) + { + $elem615 = null; + $xfer += $input->readString($elem615); + $this->tblNames []= $elem615; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->capabilities = new \metastore\ClientCapabilities(); + $xfer += $this->capabilities->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('GetTablesRequest'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tblNames !== null) { + if (!is_array($this->tblNames)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tblNames', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->tblNames)); + { + foreach ($this->tblNames as $iter616) + { + $xfer += $output->writeString($iter616); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->capabilities !== null) { + if (!is_object($this->capabilities)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('capabilities', TType::STRUCT, 3); + $xfer += $this->capabilities->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class GetTablesResult { + static $_TSPEC; + + /** + * @var \metastore\Table[] + */ + public $tables = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tables', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\metastore\Table', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tables'])) { + $this->tables = $vals['tables']; + } + } + } + + public function getName() { + return 'GetTablesResult'; + } + + 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->tables = array(); + $_size617 = 0; + $_etype620 = 0; + $xfer += $input->readListBegin($_etype620, $_size617); + for ($_i621 = 0; $_i621 < $_size617; ++$_i621) + { + $elem622 = null; + $elem622 = new \metastore\Table(); + $xfer += $elem622->read($input); + $this->tables []= $elem622; + } + $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('GetTablesResult'); + if ($this->tables !== null) { + if (!is_array($this->tables)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tables', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->tables)); + { + foreach ($this->tables as $iter623) + { + $xfer += $iter623->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class CmRecycleRequest { + static $_TSPEC; + + /** + * @var string + */ + public $dataPath = null; + /** + * @var bool + */ + public $purge = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dataPath', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'purge', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dataPath'])) { + $this->dataPath = $vals['dataPath']; + } + if (isset($vals['purge'])) { + $this->purge = $vals['purge']; + } + } + } + + public function getName() { + return 'CmRecycleRequest'; + } + + 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->dataPath); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->purge); + } 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('CmRecycleRequest'); + if ($this->dataPath !== null) { + $xfer += $output->writeFieldBegin('dataPath', TType::STRING, 1); + $xfer += $output->writeString($this->dataPath); + $xfer += $output->writeFieldEnd(); + } + if ($this->purge !== null) { + $xfer += $output->writeFieldBegin('purge', TType::BOOL, 2); + $xfer += $output->writeBool($this->purge); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class CmRecycleResponse { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'CmRecycleResponse'; + } + + 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('CmRecycleResponse'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class TableMeta { + static $_TSPEC; + + /** + * @var string + */ + public $dbName = null; + /** + * @var string + */ + public $tableName = null; + /** + * @var string + */ + public $tableType = null; + /** + * @var string + */ + public $comments = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'tableType', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'comments', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['tableType'])) { + $this->tableType = $vals['tableType']; + } + if (isset($vals['comments'])) { + $this->comments = $vals['comments']; + } + } + } + + public function getName() { + return 'TableMeta'; + } + + 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->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + 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('TableMeta'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 2); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableType !== null) { + $xfer += $output->writeFieldBegin('tableType', TType::STRING, 3); + $xfer += $output->writeString($this->tableType); + $xfer += $output->writeFieldEnd(); + } + if ($this->comments !== null) { + $xfer += $output->writeFieldBegin('comments', TType::STRING, 4); + $xfer += $output->writeString($this->comments); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class MetaException extends TException { + static $_TSPEC; + + /** + * @var string + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var string + */ + 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; + + /** + * @var string + */ + 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; + } + +} + +class InvalidInputException extends TException { + static $_TSPEC; + + /** + * @var string + */ + 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 'InvalidInputException'; + } + + 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('InvalidInputException'); + 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 NoSuchTxnException extends TException { + static $_TSPEC; + + /** + * @var string + */ + 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 'NoSuchTxnException'; + } + + 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('NoSuchTxnException'); + 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 TxnAbortedException extends TException { + static $_TSPEC; + + /** + * @var string + */ + 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 'TxnAbortedException'; + } + + 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('TxnAbortedException'); + 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 TxnOpenException extends TException { + static $_TSPEC; + + /** + * @var string + */ + 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 'TxnOpenException'; + } + + 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('TxnOpenException'); + 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 NoSuchLockException extends TException { + static $_TSPEC; + + /** + * @var string + */ + 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 'NoSuchLockException'; + } + + 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('NoSuchLockException'); + 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; + } + +} + +final class Constant extends \Thrift\Type\TConstant { + static protected $DDL_TIME; + static protected $HIVE_FILTER_FIELD_OWNER; + static protected $HIVE_FILTER_FIELD_PARAMS; + static protected $HIVE_FILTER_FIELD_LAST_ACCESS; + static protected $IS_ARCHIVED; + static protected $ORIGINAL_LOCATION; + static protected $IS_IMMUTABLE; + static protected $META_TABLE_COLUMNS; + static protected $META_TABLE_COLUMN_TYPES; + static protected $BUCKET_FIELD_NAME; + static protected $BUCKET_COUNT; + static protected $FIELD_TO_DIMENSION; + static protected $META_TABLE_NAME; + static protected $META_TABLE_DB; + static protected $META_TABLE_LOCATION; + static protected $META_TABLE_SERDE; + static protected $META_TABLE_PARTITION_COLUMNS; + static protected $META_TABLE_PARTITION_COLUMN_TYPES; + static protected $FILE_INPUT_FORMAT; + static protected $FILE_OUTPUT_FORMAT; + static protected $META_TABLE_STORAGE; + static protected $TABLE_IS_TRANSACTIONAL; + static protected $TABLE_NO_AUTO_COMPACT; + static protected $TABLE_TRANSACTIONAL_PROPERTIES; + + static protected function init_DDL_TIME() { + return "transient_lastDdlTime"; + } + + static protected function init_HIVE_FILTER_FIELD_OWNER() { + return "hive_filter_field_owner__"; + } + + static protected function init_HIVE_FILTER_FIELD_PARAMS() { + return "hive_filter_field_params__"; + } + + static protected function init_HIVE_FILTER_FIELD_LAST_ACCESS() { + return "hive_filter_field_last_access__"; + } + + static protected function init_IS_ARCHIVED() { + return "is_archived"; + } + + static protected function init_ORIGINAL_LOCATION() { + return "original_location"; + } + + static protected function init_IS_IMMUTABLE() { + return "immutable"; + } + + static protected function init_META_TABLE_COLUMNS() { + return "columns"; + } + + static protected function init_META_TABLE_COLUMN_TYPES() { + return "columns.types"; + } + + static protected function init_BUCKET_FIELD_NAME() { + return "bucket_field_name"; + } + + static protected function init_BUCKET_COUNT() { + return "bucket_count"; + } + + static protected function init_FIELD_TO_DIMENSION() { + return "field_to_dimension"; + } + + static protected function init_META_TABLE_NAME() { + return "name"; + } + + static protected function init_META_TABLE_DB() { + return "db"; + } + + static protected function init_META_TABLE_LOCATION() { + return "location"; + } + + static protected function init_META_TABLE_SERDE() { + return "serde"; + } + + static protected function init_META_TABLE_PARTITION_COLUMNS() { + return "partition_columns"; + } + + static protected function init_META_TABLE_PARTITION_COLUMN_TYPES() { + return "partition_columns.types"; + } + + static protected function init_FILE_INPUT_FORMAT() { + return "file.inputformat"; + } + + static protected function init_FILE_OUTPUT_FORMAT() { + return "file.outputformat"; + } + + static protected function init_META_TABLE_STORAGE() { + return "storage_handler"; + } + + static protected function init_TABLE_IS_TRANSACTIONAL() { + return "transactional"; + } + + static protected function init_TABLE_NO_AUTO_COMPACT() { + return "no_auto_compaction"; + } + + static protected function init_TABLE_TRANSACTIONAL_PROPERTIES() { + return "transactional_properties"; + } +} + + diff --git standalone-metastore/src/gen/thrift/gen-py/__init__.py standalone-metastore/src/gen/thrift/gen-py/__init__.py new file mode 100644 index 0000000..e69de29 diff --git standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote new file mode 100755 index 0000000..46dcac9 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote @@ -0,0 +1,1298 @@ +#!/usr/bin/env python +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +import sys +import pprint +from urlparse import urlparse +from thrift.transport import TTransport +from thrift.transport import TSocket +from thrift.transport import TSSLSocket +from thrift.transport import THttpClient +from thrift.protocol import TBinaryProtocol + +from hive_metastore import ThriftHiveMetastore +from hive_metastore.ttypes import * + +if len(sys.argv) <= 1 or sys.argv[1] == '--help': + print('') + print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] function [arg1 [arg2...]]') + print('') + print('Functions:') + print(' string getMetaConf(string key)') + print(' void setMetaConf(string key, string value)') + print(' void create_database(Database database)') + print(' Database get_database(string name)') + print(' void drop_database(string name, bool deleteData, bool cascade)') + print(' get_databases(string pattern)') + print(' get_all_databases()') + print(' void alter_database(string dbname, Database db)') + print(' Type get_type(string name)') + print(' bool create_type(Type type)') + print(' bool drop_type(string type)') + print(' get_type_all(string name)') + print(' get_fields(string db_name, string table_name)') + print(' get_fields_with_environment_context(string db_name, string table_name, EnvironmentContext environment_context)') + print(' get_schema(string db_name, string table_name)') + print(' get_schema_with_environment_context(string db_name, string table_name, EnvironmentContext environment_context)') + print(' void create_table(Table tbl)') + print(' void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context)') + print(' void create_table_with_constraints(Table tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints)') + print(' void drop_constraint(DropConstraintRequest req)') + print(' void add_primary_key(AddPrimaryKeyRequest req)') + print(' void add_foreign_key(AddForeignKeyRequest req)') + print(' void add_unique_constraint(AddUniqueConstraintRequest req)') + print(' void add_not_null_constraint(AddNotNullConstraintRequest req)') + print(' void drop_table(string dbname, string name, bool deleteData)') + print(' void drop_table_with_environment_context(string dbname, string name, bool deleteData, EnvironmentContext environment_context)') + print(' void truncate_table(string dbName, string tableName, partNames)') + print(' get_tables(string db_name, string pattern)') + print(' get_tables_by_type(string db_name, string pattern, string tableType)') + print(' get_table_meta(string db_patterns, string tbl_patterns, tbl_types)') + print(' get_all_tables(string db_name)') + print(' Table get_table(string dbname, string tbl_name)') + print(' get_table_objects_by_name(string dbname, tbl_names)') + print(' GetTableResult get_table_req(GetTableRequest req)') + print(' GetTablesResult get_table_objects_by_name_req(GetTablesRequest req)') + print(' get_table_names_by_filter(string dbname, string filter, i16 max_tables)') + print(' void alter_table(string dbname, string tbl_name, Table new_tbl)') + print(' void alter_table_with_environment_context(string dbname, string tbl_name, Table new_tbl, EnvironmentContext environment_context)') + print(' void alter_table_with_cascade(string dbname, string tbl_name, Table new_tbl, bool cascade)') + print(' Partition add_partition(Partition new_part)') + print(' Partition add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context)') + print(' i32 add_partitions( new_parts)') + print(' i32 add_partitions_pspec( new_parts)') + print(' Partition append_partition(string db_name, string tbl_name, part_vals)') + print(' AddPartitionsResult add_partitions_req(AddPartitionsRequest request)') + print(' Partition append_partition_with_environment_context(string db_name, string tbl_name, part_vals, EnvironmentContext environment_context)') + print(' Partition append_partition_by_name(string db_name, string tbl_name, string part_name)') + print(' Partition append_partition_by_name_with_environment_context(string db_name, string tbl_name, string part_name, EnvironmentContext environment_context)') + print(' bool drop_partition(string db_name, string tbl_name, part_vals, bool deleteData)') + print(' bool drop_partition_with_environment_context(string db_name, string tbl_name, part_vals, bool deleteData, EnvironmentContext environment_context)') + print(' bool drop_partition_by_name(string db_name, string tbl_name, string part_name, bool deleteData)') + print(' bool drop_partition_by_name_with_environment_context(string db_name, string tbl_name, string part_name, bool deleteData, EnvironmentContext environment_context)') + print(' DropPartitionsResult drop_partitions_req(DropPartitionsRequest req)') + print(' Partition get_partition(string db_name, string tbl_name, part_vals)') + print(' Partition exchange_partition( partitionSpecs, string source_db, string source_table_name, string dest_db, string dest_table_name)') + print(' exchange_partitions( partitionSpecs, string source_db, string source_table_name, string dest_db, string dest_table_name)') + print(' Partition get_partition_with_auth(string db_name, string tbl_name, part_vals, string user_name, group_names)') + print(' Partition get_partition_by_name(string db_name, string tbl_name, string part_name)') + print(' get_partitions(string db_name, string tbl_name, i16 max_parts)') + print(' get_partitions_with_auth(string db_name, string tbl_name, i16 max_parts, string user_name, group_names)') + print(' get_partitions_pspec(string db_name, string tbl_name, i32 max_parts)') + print(' get_partition_names(string db_name, string tbl_name, i16 max_parts)') + print(' get_partitions_ps(string db_name, string tbl_name, part_vals, i16 max_parts)') + print(' get_partitions_ps_with_auth(string db_name, string tbl_name, part_vals, i16 max_parts, string user_name, group_names)') + print(' get_partition_names_ps(string db_name, string tbl_name, part_vals, i16 max_parts)') + print(' get_partitions_by_filter(string db_name, string tbl_name, string filter, i16 max_parts)') + print(' get_part_specs_by_filter(string db_name, string tbl_name, string filter, i32 max_parts)') + print(' PartitionsByExprResult get_partitions_by_expr(PartitionsByExprRequest req)') + print(' i32 get_num_partitions_by_filter(string db_name, string tbl_name, string filter)') + print(' get_partitions_by_names(string db_name, string tbl_name, names)') + print(' void alter_partition(string db_name, string tbl_name, Partition new_part)') + print(' void alter_partitions(string db_name, string tbl_name, new_parts)') + print(' void alter_partitions_with_environment_context(string db_name, string tbl_name, new_parts, EnvironmentContext environment_context)') + print(' void alter_partition_with_environment_context(string db_name, string tbl_name, Partition new_part, EnvironmentContext environment_context)') + print(' void rename_partition(string db_name, string tbl_name, part_vals, Partition new_part)') + print(' bool partition_name_has_valid_characters( part_vals, bool throw_exception)') + print(' string get_config_value(string name, string defaultValue)') + print(' partition_name_to_vals(string part_name)') + print(' partition_name_to_spec(string part_name)') + print(' void markPartitionForEvent(string db_name, string tbl_name, part_vals, PartitionEventType eventType)') + print(' bool isPartitionMarkedForEvent(string db_name, string tbl_name, part_vals, PartitionEventType eventType)') + print(' Index add_index(Index new_index, Table index_table)') + print(' void alter_index(string dbname, string base_tbl_name, string idx_name, Index new_idx)') + print(' bool drop_index_by_name(string db_name, string tbl_name, string index_name, bool deleteData)') + print(' Index get_index_by_name(string db_name, string tbl_name, string index_name)') + print(' get_indexes(string db_name, string tbl_name, i16 max_indexes)') + print(' get_index_names(string db_name, string tbl_name, i16 max_indexes)') + print(' PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request)') + print(' ForeignKeysResponse get_foreign_keys(ForeignKeysRequest request)') + print(' UniqueConstraintsResponse get_unique_constraints(UniqueConstraintsRequest request)') + print(' NotNullConstraintsResponse get_not_null_constraints(NotNullConstraintsRequest request)') + print(' bool update_table_column_statistics(ColumnStatistics stats_obj)') + print(' bool update_partition_column_statistics(ColumnStatistics stats_obj)') + print(' ColumnStatistics get_table_column_statistics(string db_name, string tbl_name, string col_name)') + print(' ColumnStatistics get_partition_column_statistics(string db_name, string tbl_name, string part_name, string col_name)') + print(' TableStatsResult get_table_statistics_req(TableStatsRequest request)') + print(' PartitionsStatsResult get_partitions_statistics_req(PartitionsStatsRequest request)') + print(' AggrStats get_aggr_stats_for(PartitionsStatsRequest request)') + print(' bool set_aggr_stats_for(SetPartitionsStatsRequest request)') + print(' bool delete_partition_column_statistics(string db_name, string tbl_name, string part_name, string col_name)') + print(' bool delete_table_column_statistics(string db_name, string tbl_name, string col_name)') + print(' void create_function(Function func)') + print(' void drop_function(string dbName, string funcName)') + print(' void alter_function(string dbName, string funcName, Function newFunc)') + print(' get_functions(string dbName, string pattern)') + print(' Function get_function(string dbName, string funcName)') + print(' GetAllFunctionsResponse get_all_functions()') + print(' bool create_role(Role role)') + print(' bool drop_role(string role_name)') + print(' get_role_names()') + print(' bool grant_role(string role_name, string principal_name, PrincipalType principal_type, string grantor, PrincipalType grantorType, bool grant_option)') + print(' bool revoke_role(string role_name, string principal_name, PrincipalType principal_type)') + print(' list_roles(string principal_name, PrincipalType principal_type)') + print(' GrantRevokeRoleResponse grant_revoke_role(GrantRevokeRoleRequest request)') + print(' GetPrincipalsInRoleResponse get_principals_in_role(GetPrincipalsInRoleRequest request)') + print(' GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest request)') + print(' PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, string user_name, group_names)') + print(' list_privileges(string principal_name, PrincipalType principal_type, HiveObjectRef hiveObject)') + print(' bool grant_privileges(PrivilegeBag privileges)') + print(' bool revoke_privileges(PrivilegeBag privileges)') + print(' GrantRevokePrivilegeResponse grant_revoke_privileges(GrantRevokePrivilegeRequest request)') + print(' set_ugi(string user_name, group_names)') + print(' string get_delegation_token(string token_owner, string renewer_kerberos_principal_name)') + print(' i64 renew_delegation_token(string token_str_form)') + print(' void cancel_delegation_token(string token_str_form)') + print(' bool add_token(string token_identifier, string delegation_token)') + print(' bool remove_token(string token_identifier)') + print(' string get_token(string token_identifier)') + print(' get_all_token_identifiers()') + print(' i32 add_master_key(string key)') + print(' void update_master_key(i32 seq_number, string key)') + print(' bool remove_master_key(i32 key_seq)') + print(' get_master_keys()') + print(' GetOpenTxnsResponse get_open_txns()') + print(' GetOpenTxnsInfoResponse get_open_txns_info()') + print(' OpenTxnsResponse open_txns(OpenTxnRequest rqst)') + print(' void abort_txn(AbortTxnRequest rqst)') + print(' void abort_txns(AbortTxnsRequest rqst)') + print(' void commit_txn(CommitTxnRequest rqst)') + print(' LockResponse lock(LockRequest rqst)') + print(' LockResponse check_lock(CheckLockRequest rqst)') + print(' void unlock(UnlockRequest rqst)') + print(' ShowLocksResponse show_locks(ShowLocksRequest rqst)') + print(' void heartbeat(HeartbeatRequest ids)') + print(' HeartbeatTxnRangeResponse heartbeat_txn_range(HeartbeatTxnRangeRequest txns)') + print(' void compact(CompactionRequest rqst)') + print(' CompactionResponse compact2(CompactionRequest rqst)') + print(' ShowCompactResponse show_compact(ShowCompactRequest rqst)') + print(' void add_dynamic_partitions(AddDynamicPartitions rqst)') + print(' NotificationEventResponse get_next_notification(NotificationEventRequest rqst)') + print(' CurrentNotificationEventId get_current_notificationEventId()') + print(' FireEventResponse fire_listener_event(FireEventRequest rqst)') + print(' void flushCache()') + print(' CmRecycleResponse cm_recycle(CmRecycleRequest request)') + print(' GetFileMetadataByExprResult get_file_metadata_by_expr(GetFileMetadataByExprRequest req)') + print(' GetFileMetadataResult get_file_metadata(GetFileMetadataRequest req)') + print(' PutFileMetadataResult put_file_metadata(PutFileMetadataRequest req)') + print(' ClearFileMetadataResult clear_file_metadata(ClearFileMetadataRequest req)') + print(' CacheFileMetadataResult cache_file_metadata(CacheFileMetadataRequest req)') + print(' string get_metastore_db_uuid()') + print(' string getName()') + print(' string getVersion()') + print(' fb_status getStatus()') + print(' string getStatusDetails()') + print(' getCounters()') + print(' i64 getCounter(string key)') + print(' void setOption(string key, string value)') + print(' string getOption(string key)') + print(' getOptions()') + print(' string getCpuProfile(i32 profileDurationInSec)') + print(' i64 aliveSince()') + print(' void reinitialize()') + print(' void shutdown()') + print('') + sys.exit(0) + +pp = pprint.PrettyPrinter(indent = 2) +host = 'localhost' +port = 9090 +uri = '' +framed = False +ssl = False +http = False +argi = 1 + +if sys.argv[argi] == '-h': + parts = sys.argv[argi+1].split(':') + host = parts[0] + if len(parts) > 1: + port = int(parts[1]) + argi += 2 + +if sys.argv[argi] == '-u': + url = urlparse(sys.argv[argi+1]) + parts = url[1].split(':') + host = parts[0] + if len(parts) > 1: + port = int(parts[1]) + else: + port = 80 + uri = url[2] + if url[4]: + uri += '?%s' % url[4] + http = True + argi += 2 + +if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': + framed = True + argi += 1 + +if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl': + ssl = True + argi += 1 + +cmd = sys.argv[argi] +args = sys.argv[argi+1:] + +if http: + transport = THttpClient.THttpClient(host, port, uri) +else: + socket = TSSLSocket.TSSLSocket(host, port, validate=False) if ssl else TSocket.TSocket(host, port) + if framed: + transport = TTransport.TFramedTransport(socket) + else: + transport = TTransport.TBufferedTransport(socket) +protocol = TBinaryProtocol.TBinaryProtocol(transport) +client = ThriftHiveMetastore.Client(protocol) +transport.open() + +if cmd == 'getMetaConf': + if len(args) != 1: + print('getMetaConf requires 1 args') + sys.exit(1) + pp.pprint(client.getMetaConf(args[0],)) + +elif cmd == 'setMetaConf': + if len(args) != 2: + print('setMetaConf requires 2 args') + sys.exit(1) + pp.pprint(client.setMetaConf(args[0],args[1],)) + +elif cmd == 'create_database': + if len(args) != 1: + print('create_database requires 1 args') + sys.exit(1) + pp.pprint(client.create_database(eval(args[0]),)) + +elif cmd == 'get_database': + if len(args) != 1: + print('get_database requires 1 args') + sys.exit(1) + pp.pprint(client.get_database(args[0],)) + +elif cmd == 'drop_database': + if len(args) != 3: + print('drop_database requires 3 args') + sys.exit(1) + pp.pprint(client.drop_database(args[0],eval(args[1]),eval(args[2]),)) + +elif cmd == 'get_databases': + if len(args) != 1: + print('get_databases requires 1 args') + sys.exit(1) + pp.pprint(client.get_databases(args[0],)) + +elif cmd == 'get_all_databases': + if len(args) != 0: + print('get_all_databases requires 0 args') + sys.exit(1) + pp.pprint(client.get_all_databases()) + +elif cmd == 'alter_database': + if len(args) != 2: + print('alter_database requires 2 args') + sys.exit(1) + pp.pprint(client.alter_database(args[0],eval(args[1]),)) + +elif cmd == 'get_type': + if len(args) != 1: + print('get_type requires 1 args') + sys.exit(1) + pp.pprint(client.get_type(args[0],)) + +elif cmd == 'create_type': + if len(args) != 1: + print('create_type requires 1 args') + sys.exit(1) + pp.pprint(client.create_type(eval(args[0]),)) + +elif cmd == 'drop_type': + if len(args) != 1: + print('drop_type requires 1 args') + sys.exit(1) + pp.pprint(client.drop_type(args[0],)) + +elif cmd == 'get_type_all': + if len(args) != 1: + print('get_type_all requires 1 args') + sys.exit(1) + pp.pprint(client.get_type_all(args[0],)) + +elif cmd == 'get_fields': + if len(args) != 2: + print('get_fields requires 2 args') + sys.exit(1) + pp.pprint(client.get_fields(args[0],args[1],)) + +elif cmd == 'get_fields_with_environment_context': + if len(args) != 3: + print('get_fields_with_environment_context requires 3 args') + sys.exit(1) + pp.pprint(client.get_fields_with_environment_context(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_schema': + if len(args) != 2: + print('get_schema requires 2 args') + sys.exit(1) + pp.pprint(client.get_schema(args[0],args[1],)) + +elif cmd == 'get_schema_with_environment_context': + if len(args) != 3: + print('get_schema_with_environment_context requires 3 args') + sys.exit(1) + pp.pprint(client.get_schema_with_environment_context(args[0],args[1],eval(args[2]),)) + +elif cmd == 'create_table': + if len(args) != 1: + print('create_table requires 1 args') + sys.exit(1) + pp.pprint(client.create_table(eval(args[0]),)) + +elif cmd == 'create_table_with_environment_context': + if len(args) != 2: + print('create_table_with_environment_context requires 2 args') + sys.exit(1) + pp.pprint(client.create_table_with_environment_context(eval(args[0]),eval(args[1]),)) + +elif cmd == 'create_table_with_constraints': + if len(args) != 5: + print('create_table_with_constraints requires 5 args') + sys.exit(1) + pp.pprint(client.create_table_with_constraints(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + +elif cmd == 'drop_constraint': + if len(args) != 1: + print('drop_constraint requires 1 args') + sys.exit(1) + pp.pprint(client.drop_constraint(eval(args[0]),)) + +elif cmd == 'add_primary_key': + if len(args) != 1: + print('add_primary_key requires 1 args') + sys.exit(1) + pp.pprint(client.add_primary_key(eval(args[0]),)) + +elif cmd == 'add_foreign_key': + if len(args) != 1: + print('add_foreign_key requires 1 args') + sys.exit(1) + pp.pprint(client.add_foreign_key(eval(args[0]),)) + +elif cmd == 'add_unique_constraint': + if len(args) != 1: + print('add_unique_constraint requires 1 args') + sys.exit(1) + pp.pprint(client.add_unique_constraint(eval(args[0]),)) + +elif cmd == 'add_not_null_constraint': + if len(args) != 1: + print('add_not_null_constraint requires 1 args') + sys.exit(1) + pp.pprint(client.add_not_null_constraint(eval(args[0]),)) + +elif cmd == 'drop_table': + if len(args) != 3: + print('drop_table requires 3 args') + sys.exit(1) + pp.pprint(client.drop_table(args[0],args[1],eval(args[2]),)) + +elif cmd == 'drop_table_with_environment_context': + if len(args) != 4: + print('drop_table_with_environment_context requires 4 args') + sys.exit(1) + pp.pprint(client.drop_table_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'truncate_table': + if len(args) != 3: + print('truncate_table requires 3 args') + sys.exit(1) + pp.pprint(client.truncate_table(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_tables': + if len(args) != 2: + print('get_tables requires 2 args') + sys.exit(1) + pp.pprint(client.get_tables(args[0],args[1],)) + +elif cmd == 'get_tables_by_type': + if len(args) != 3: + print('get_tables_by_type requires 3 args') + sys.exit(1) + pp.pprint(client.get_tables_by_type(args[0],args[1],args[2],)) + +elif cmd == 'get_table_meta': + if len(args) != 3: + print('get_table_meta requires 3 args') + sys.exit(1) + pp.pprint(client.get_table_meta(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_all_tables': + if len(args) != 1: + print('get_all_tables requires 1 args') + sys.exit(1) + pp.pprint(client.get_all_tables(args[0],)) + +elif cmd == 'get_table': + if len(args) != 2: + print('get_table requires 2 args') + sys.exit(1) + pp.pprint(client.get_table(args[0],args[1],)) + +elif cmd == 'get_table_objects_by_name': + if len(args) != 2: + print('get_table_objects_by_name requires 2 args') + sys.exit(1) + pp.pprint(client.get_table_objects_by_name(args[0],eval(args[1]),)) + +elif cmd == 'get_table_req': + if len(args) != 1: + print('get_table_req requires 1 args') + sys.exit(1) + pp.pprint(client.get_table_req(eval(args[0]),)) + +elif cmd == 'get_table_objects_by_name_req': + if len(args) != 1: + print('get_table_objects_by_name_req requires 1 args') + sys.exit(1) + pp.pprint(client.get_table_objects_by_name_req(eval(args[0]),)) + +elif cmd == 'get_table_names_by_filter': + if len(args) != 3: + print('get_table_names_by_filter requires 3 args') + sys.exit(1) + pp.pprint(client.get_table_names_by_filter(args[0],args[1],eval(args[2]),)) + +elif cmd == 'alter_table': + if len(args) != 3: + print('alter_table requires 3 args') + sys.exit(1) + pp.pprint(client.alter_table(args[0],args[1],eval(args[2]),)) + +elif cmd == 'alter_table_with_environment_context': + if len(args) != 4: + print('alter_table_with_environment_context requires 4 args') + sys.exit(1) + pp.pprint(client.alter_table_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'alter_table_with_cascade': + if len(args) != 4: + print('alter_table_with_cascade requires 4 args') + sys.exit(1) + pp.pprint(client.alter_table_with_cascade(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'add_partition': + if len(args) != 1: + print('add_partition requires 1 args') + sys.exit(1) + pp.pprint(client.add_partition(eval(args[0]),)) + +elif cmd == 'add_partition_with_environment_context': + if len(args) != 2: + print('add_partition_with_environment_context requires 2 args') + sys.exit(1) + pp.pprint(client.add_partition_with_environment_context(eval(args[0]),eval(args[1]),)) + +elif cmd == 'add_partitions': + if len(args) != 1: + print('add_partitions requires 1 args') + sys.exit(1) + pp.pprint(client.add_partitions(eval(args[0]),)) + +elif cmd == 'add_partitions_pspec': + if len(args) != 1: + print('add_partitions_pspec requires 1 args') + sys.exit(1) + pp.pprint(client.add_partitions_pspec(eval(args[0]),)) + +elif cmd == 'append_partition': + if len(args) != 3: + print('append_partition requires 3 args') + sys.exit(1) + pp.pprint(client.append_partition(args[0],args[1],eval(args[2]),)) + +elif cmd == 'add_partitions_req': + if len(args) != 1: + print('add_partitions_req requires 1 args') + sys.exit(1) + pp.pprint(client.add_partitions_req(eval(args[0]),)) + +elif cmd == 'append_partition_with_environment_context': + if len(args) != 4: + print('append_partition_with_environment_context requires 4 args') + sys.exit(1) + pp.pprint(client.append_partition_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'append_partition_by_name': + if len(args) != 3: + print('append_partition_by_name requires 3 args') + sys.exit(1) + pp.pprint(client.append_partition_by_name(args[0],args[1],args[2],)) + +elif cmd == 'append_partition_by_name_with_environment_context': + if len(args) != 4: + print('append_partition_by_name_with_environment_context requires 4 args') + sys.exit(1) + pp.pprint(client.append_partition_by_name_with_environment_context(args[0],args[1],args[2],eval(args[3]),)) + +elif cmd == 'drop_partition': + if len(args) != 4: + print('drop_partition requires 4 args') + sys.exit(1) + pp.pprint(client.drop_partition(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'drop_partition_with_environment_context': + if len(args) != 5: + print('drop_partition_with_environment_context requires 5 args') + sys.exit(1) + pp.pprint(client.drop_partition_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),eval(args[4]),)) + +elif cmd == 'drop_partition_by_name': + if len(args) != 4: + print('drop_partition_by_name requires 4 args') + sys.exit(1) + pp.pprint(client.drop_partition_by_name(args[0],args[1],args[2],eval(args[3]),)) + +elif cmd == 'drop_partition_by_name_with_environment_context': + if len(args) != 5: + print('drop_partition_by_name_with_environment_context requires 5 args') + sys.exit(1) + pp.pprint(client.drop_partition_by_name_with_environment_context(args[0],args[1],args[2],eval(args[3]),eval(args[4]),)) + +elif cmd == 'drop_partitions_req': + if len(args) != 1: + print('drop_partitions_req requires 1 args') + sys.exit(1) + pp.pprint(client.drop_partitions_req(eval(args[0]),)) + +elif cmd == 'get_partition': + if len(args) != 3: + print('get_partition requires 3 args') + sys.exit(1) + pp.pprint(client.get_partition(args[0],args[1],eval(args[2]),)) + +elif cmd == 'exchange_partition': + if len(args) != 5: + print('exchange_partition requires 5 args') + sys.exit(1) + pp.pprint(client.exchange_partition(eval(args[0]),args[1],args[2],args[3],args[4],)) + +elif cmd == 'exchange_partitions': + if len(args) != 5: + print('exchange_partitions requires 5 args') + sys.exit(1) + pp.pprint(client.exchange_partitions(eval(args[0]),args[1],args[2],args[3],args[4],)) + +elif cmd == 'get_partition_with_auth': + if len(args) != 5: + print('get_partition_with_auth requires 5 args') + sys.exit(1) + pp.pprint(client.get_partition_with_auth(args[0],args[1],eval(args[2]),args[3],eval(args[4]),)) + +elif cmd == 'get_partition_by_name': + if len(args) != 3: + print('get_partition_by_name requires 3 args') + sys.exit(1) + pp.pprint(client.get_partition_by_name(args[0],args[1],args[2],)) + +elif cmd == 'get_partitions': + if len(args) != 3: + print('get_partitions requires 3 args') + sys.exit(1) + pp.pprint(client.get_partitions(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_partitions_with_auth': + if len(args) != 5: + print('get_partitions_with_auth requires 5 args') + sys.exit(1) + pp.pprint(client.get_partitions_with_auth(args[0],args[1],eval(args[2]),args[3],eval(args[4]),)) + +elif cmd == 'get_partitions_pspec': + if len(args) != 3: + print('get_partitions_pspec requires 3 args') + sys.exit(1) + pp.pprint(client.get_partitions_pspec(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_partition_names': + if len(args) != 3: + print('get_partition_names requires 3 args') + sys.exit(1) + pp.pprint(client.get_partition_names(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_partitions_ps': + if len(args) != 4: + print('get_partitions_ps requires 4 args') + sys.exit(1) + pp.pprint(client.get_partitions_ps(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'get_partitions_ps_with_auth': + if len(args) != 6: + print('get_partitions_ps_with_auth requires 6 args') + sys.exit(1) + pp.pprint(client.get_partitions_ps_with_auth(args[0],args[1],eval(args[2]),eval(args[3]),args[4],eval(args[5]),)) + +elif cmd == 'get_partition_names_ps': + if len(args) != 4: + print('get_partition_names_ps requires 4 args') + sys.exit(1) + pp.pprint(client.get_partition_names_ps(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'get_partitions_by_filter': + if len(args) != 4: + print('get_partitions_by_filter requires 4 args') + sys.exit(1) + pp.pprint(client.get_partitions_by_filter(args[0],args[1],args[2],eval(args[3]),)) + +elif cmd == 'get_part_specs_by_filter': + if len(args) != 4: + print('get_part_specs_by_filter requires 4 args') + sys.exit(1) + pp.pprint(client.get_part_specs_by_filter(args[0],args[1],args[2],eval(args[3]),)) + +elif cmd == 'get_partitions_by_expr': + if len(args) != 1: + print('get_partitions_by_expr requires 1 args') + sys.exit(1) + pp.pprint(client.get_partitions_by_expr(eval(args[0]),)) + +elif cmd == 'get_num_partitions_by_filter': + if len(args) != 3: + print('get_num_partitions_by_filter requires 3 args') + sys.exit(1) + pp.pprint(client.get_num_partitions_by_filter(args[0],args[1],args[2],)) + +elif cmd == 'get_partitions_by_names': + if len(args) != 3: + print('get_partitions_by_names requires 3 args') + sys.exit(1) + pp.pprint(client.get_partitions_by_names(args[0],args[1],eval(args[2]),)) + +elif cmd == 'alter_partition': + if len(args) != 3: + print('alter_partition requires 3 args') + sys.exit(1) + pp.pprint(client.alter_partition(args[0],args[1],eval(args[2]),)) + +elif cmd == 'alter_partitions': + if len(args) != 3: + print('alter_partitions requires 3 args') + sys.exit(1) + pp.pprint(client.alter_partitions(args[0],args[1],eval(args[2]),)) + +elif cmd == 'alter_partitions_with_environment_context': + if len(args) != 4: + print('alter_partitions_with_environment_context requires 4 args') + sys.exit(1) + pp.pprint(client.alter_partitions_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'alter_partition_with_environment_context': + if len(args) != 4: + print('alter_partition_with_environment_context requires 4 args') + sys.exit(1) + pp.pprint(client.alter_partition_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'rename_partition': + if len(args) != 4: + print('rename_partition requires 4 args') + sys.exit(1) + pp.pprint(client.rename_partition(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'partition_name_has_valid_characters': + if len(args) != 2: + print('partition_name_has_valid_characters requires 2 args') + sys.exit(1) + pp.pprint(client.partition_name_has_valid_characters(eval(args[0]),eval(args[1]),)) + +elif cmd == 'get_config_value': + if len(args) != 2: + print('get_config_value requires 2 args') + sys.exit(1) + pp.pprint(client.get_config_value(args[0],args[1],)) + +elif cmd == 'partition_name_to_vals': + if len(args) != 1: + print('partition_name_to_vals requires 1 args') + sys.exit(1) + pp.pprint(client.partition_name_to_vals(args[0],)) + +elif cmd == 'partition_name_to_spec': + if len(args) != 1: + print('partition_name_to_spec requires 1 args') + sys.exit(1) + pp.pprint(client.partition_name_to_spec(args[0],)) + +elif cmd == 'markPartitionForEvent': + if len(args) != 4: + print('markPartitionForEvent requires 4 args') + sys.exit(1) + pp.pprint(client.markPartitionForEvent(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'isPartitionMarkedForEvent': + if len(args) != 4: + print('isPartitionMarkedForEvent requires 4 args') + sys.exit(1) + pp.pprint(client.isPartitionMarkedForEvent(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'add_index': + if len(args) != 2: + print('add_index requires 2 args') + sys.exit(1) + pp.pprint(client.add_index(eval(args[0]),eval(args[1]),)) + +elif cmd == 'alter_index': + if len(args) != 4: + print('alter_index requires 4 args') + sys.exit(1) + pp.pprint(client.alter_index(args[0],args[1],args[2],eval(args[3]),)) + +elif cmd == 'drop_index_by_name': + if len(args) != 4: + print('drop_index_by_name requires 4 args') + sys.exit(1) + pp.pprint(client.drop_index_by_name(args[0],args[1],args[2],eval(args[3]),)) + +elif cmd == 'get_index_by_name': + if len(args) != 3: + print('get_index_by_name requires 3 args') + sys.exit(1) + pp.pprint(client.get_index_by_name(args[0],args[1],args[2],)) + +elif cmd == 'get_indexes': + if len(args) != 3: + print('get_indexes requires 3 args') + sys.exit(1) + pp.pprint(client.get_indexes(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_index_names': + if len(args) != 3: + print('get_index_names requires 3 args') + sys.exit(1) + pp.pprint(client.get_index_names(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_primary_keys': + if len(args) != 1: + print('get_primary_keys requires 1 args') + sys.exit(1) + pp.pprint(client.get_primary_keys(eval(args[0]),)) + +elif cmd == 'get_foreign_keys': + if len(args) != 1: + print('get_foreign_keys requires 1 args') + sys.exit(1) + pp.pprint(client.get_foreign_keys(eval(args[0]),)) + +elif cmd == 'get_unique_constraints': + if len(args) != 1: + print('get_unique_constraints requires 1 args') + sys.exit(1) + pp.pprint(client.get_unique_constraints(eval(args[0]),)) + +elif cmd == 'get_not_null_constraints': + if len(args) != 1: + print('get_not_null_constraints requires 1 args') + sys.exit(1) + pp.pprint(client.get_not_null_constraints(eval(args[0]),)) + +elif cmd == 'update_table_column_statistics': + if len(args) != 1: + print('update_table_column_statistics requires 1 args') + sys.exit(1) + pp.pprint(client.update_table_column_statistics(eval(args[0]),)) + +elif cmd == 'update_partition_column_statistics': + if len(args) != 1: + print('update_partition_column_statistics requires 1 args') + sys.exit(1) + pp.pprint(client.update_partition_column_statistics(eval(args[0]),)) + +elif cmd == 'get_table_column_statistics': + if len(args) != 3: + print('get_table_column_statistics requires 3 args') + sys.exit(1) + pp.pprint(client.get_table_column_statistics(args[0],args[1],args[2],)) + +elif cmd == 'get_partition_column_statistics': + if len(args) != 4: + print('get_partition_column_statistics requires 4 args') + sys.exit(1) + pp.pprint(client.get_partition_column_statistics(args[0],args[1],args[2],args[3],)) + +elif cmd == 'get_table_statistics_req': + if len(args) != 1: + print('get_table_statistics_req requires 1 args') + sys.exit(1) + pp.pprint(client.get_table_statistics_req(eval(args[0]),)) + +elif cmd == 'get_partitions_statistics_req': + if len(args) != 1: + print('get_partitions_statistics_req requires 1 args') + sys.exit(1) + pp.pprint(client.get_partitions_statistics_req(eval(args[0]),)) + +elif cmd == 'get_aggr_stats_for': + if len(args) != 1: + print('get_aggr_stats_for requires 1 args') + sys.exit(1) + pp.pprint(client.get_aggr_stats_for(eval(args[0]),)) + +elif cmd == 'set_aggr_stats_for': + if len(args) != 1: + print('set_aggr_stats_for requires 1 args') + sys.exit(1) + pp.pprint(client.set_aggr_stats_for(eval(args[0]),)) + +elif cmd == 'delete_partition_column_statistics': + if len(args) != 4: + print('delete_partition_column_statistics requires 4 args') + sys.exit(1) + pp.pprint(client.delete_partition_column_statistics(args[0],args[1],args[2],args[3],)) + +elif cmd == 'delete_table_column_statistics': + if len(args) != 3: + print('delete_table_column_statistics requires 3 args') + sys.exit(1) + pp.pprint(client.delete_table_column_statistics(args[0],args[1],args[2],)) + +elif cmd == 'create_function': + if len(args) != 1: + print('create_function requires 1 args') + sys.exit(1) + pp.pprint(client.create_function(eval(args[0]),)) + +elif cmd == 'drop_function': + if len(args) != 2: + print('drop_function requires 2 args') + sys.exit(1) + pp.pprint(client.drop_function(args[0],args[1],)) + +elif cmd == 'alter_function': + if len(args) != 3: + print('alter_function requires 3 args') + sys.exit(1) + pp.pprint(client.alter_function(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_functions': + if len(args) != 2: + print('get_functions requires 2 args') + sys.exit(1) + pp.pprint(client.get_functions(args[0],args[1],)) + +elif cmd == 'get_function': + if len(args) != 2: + print('get_function requires 2 args') + sys.exit(1) + pp.pprint(client.get_function(args[0],args[1],)) + +elif cmd == 'get_all_functions': + if len(args) != 0: + print('get_all_functions requires 0 args') + sys.exit(1) + pp.pprint(client.get_all_functions()) + +elif cmd == 'create_role': + if len(args) != 1: + print('create_role requires 1 args') + sys.exit(1) + pp.pprint(client.create_role(eval(args[0]),)) + +elif cmd == 'drop_role': + if len(args) != 1: + print('drop_role requires 1 args') + sys.exit(1) + pp.pprint(client.drop_role(args[0],)) + +elif cmd == 'get_role_names': + if len(args) != 0: + print('get_role_names requires 0 args') + sys.exit(1) + pp.pprint(client.get_role_names()) + +elif cmd == 'grant_role': + if len(args) != 6: + print('grant_role requires 6 args') + sys.exit(1) + pp.pprint(client.grant_role(args[0],args[1],eval(args[2]),args[3],eval(args[4]),eval(args[5]),)) + +elif cmd == 'revoke_role': + if len(args) != 3: + print('revoke_role requires 3 args') + sys.exit(1) + pp.pprint(client.revoke_role(args[0],args[1],eval(args[2]),)) + +elif cmd == 'list_roles': + if len(args) != 2: + print('list_roles requires 2 args') + sys.exit(1) + pp.pprint(client.list_roles(args[0],eval(args[1]),)) + +elif cmd == 'grant_revoke_role': + if len(args) != 1: + print('grant_revoke_role requires 1 args') + sys.exit(1) + pp.pprint(client.grant_revoke_role(eval(args[0]),)) + +elif cmd == 'get_principals_in_role': + if len(args) != 1: + print('get_principals_in_role requires 1 args') + sys.exit(1) + pp.pprint(client.get_principals_in_role(eval(args[0]),)) + +elif cmd == 'get_role_grants_for_principal': + if len(args) != 1: + print('get_role_grants_for_principal requires 1 args') + sys.exit(1) + pp.pprint(client.get_role_grants_for_principal(eval(args[0]),)) + +elif cmd == 'get_privilege_set': + if len(args) != 3: + print('get_privilege_set requires 3 args') + sys.exit(1) + pp.pprint(client.get_privilege_set(eval(args[0]),args[1],eval(args[2]),)) + +elif cmd == 'list_privileges': + if len(args) != 3: + print('list_privileges requires 3 args') + sys.exit(1) + pp.pprint(client.list_privileges(args[0],eval(args[1]),eval(args[2]),)) + +elif cmd == 'grant_privileges': + if len(args) != 1: + print('grant_privileges requires 1 args') + sys.exit(1) + pp.pprint(client.grant_privileges(eval(args[0]),)) + +elif cmd == 'revoke_privileges': + if len(args) != 1: + print('revoke_privileges requires 1 args') + sys.exit(1) + pp.pprint(client.revoke_privileges(eval(args[0]),)) + +elif cmd == 'grant_revoke_privileges': + if len(args) != 1: + print('grant_revoke_privileges requires 1 args') + sys.exit(1) + pp.pprint(client.grant_revoke_privileges(eval(args[0]),)) + +elif cmd == 'set_ugi': + if len(args) != 2: + print('set_ugi requires 2 args') + sys.exit(1) + pp.pprint(client.set_ugi(args[0],eval(args[1]),)) + +elif cmd == 'get_delegation_token': + if len(args) != 2: + print('get_delegation_token requires 2 args') + sys.exit(1) + pp.pprint(client.get_delegation_token(args[0],args[1],)) + +elif cmd == 'renew_delegation_token': + if len(args) != 1: + print('renew_delegation_token requires 1 args') + sys.exit(1) + pp.pprint(client.renew_delegation_token(args[0],)) + +elif cmd == 'cancel_delegation_token': + if len(args) != 1: + print('cancel_delegation_token requires 1 args') + sys.exit(1) + pp.pprint(client.cancel_delegation_token(args[0],)) + +elif cmd == 'add_token': + if len(args) != 2: + print('add_token requires 2 args') + sys.exit(1) + pp.pprint(client.add_token(args[0],args[1],)) + +elif cmd == 'remove_token': + if len(args) != 1: + print('remove_token requires 1 args') + sys.exit(1) + pp.pprint(client.remove_token(args[0],)) + +elif cmd == 'get_token': + if len(args) != 1: + print('get_token requires 1 args') + sys.exit(1) + pp.pprint(client.get_token(args[0],)) + +elif cmd == 'get_all_token_identifiers': + if len(args) != 0: + print('get_all_token_identifiers requires 0 args') + sys.exit(1) + pp.pprint(client.get_all_token_identifiers()) + +elif cmd == 'add_master_key': + if len(args) != 1: + print('add_master_key requires 1 args') + sys.exit(1) + pp.pprint(client.add_master_key(args[0],)) + +elif cmd == 'update_master_key': + if len(args) != 2: + print('update_master_key requires 2 args') + sys.exit(1) + pp.pprint(client.update_master_key(eval(args[0]),args[1],)) + +elif cmd == 'remove_master_key': + if len(args) != 1: + print('remove_master_key requires 1 args') + sys.exit(1) + pp.pprint(client.remove_master_key(eval(args[0]),)) + +elif cmd == 'get_master_keys': + if len(args) != 0: + print('get_master_keys requires 0 args') + sys.exit(1) + pp.pprint(client.get_master_keys()) + +elif cmd == 'get_open_txns': + if len(args) != 0: + print('get_open_txns requires 0 args') + sys.exit(1) + pp.pprint(client.get_open_txns()) + +elif cmd == 'get_open_txns_info': + if len(args) != 0: + print('get_open_txns_info requires 0 args') + sys.exit(1) + pp.pprint(client.get_open_txns_info()) + +elif cmd == 'open_txns': + if len(args) != 1: + print('open_txns requires 1 args') + sys.exit(1) + pp.pprint(client.open_txns(eval(args[0]),)) + +elif cmd == 'abort_txn': + if len(args) != 1: + print('abort_txn requires 1 args') + sys.exit(1) + pp.pprint(client.abort_txn(eval(args[0]),)) + +elif cmd == 'abort_txns': + if len(args) != 1: + print('abort_txns requires 1 args') + sys.exit(1) + pp.pprint(client.abort_txns(eval(args[0]),)) + +elif cmd == 'commit_txn': + if len(args) != 1: + print('commit_txn requires 1 args') + sys.exit(1) + pp.pprint(client.commit_txn(eval(args[0]),)) + +elif cmd == 'lock': + if len(args) != 1: + print('lock requires 1 args') + sys.exit(1) + pp.pprint(client.lock(eval(args[0]),)) + +elif cmd == 'check_lock': + if len(args) != 1: + print('check_lock requires 1 args') + sys.exit(1) + pp.pprint(client.check_lock(eval(args[0]),)) + +elif cmd == 'unlock': + if len(args) != 1: + print('unlock requires 1 args') + sys.exit(1) + pp.pprint(client.unlock(eval(args[0]),)) + +elif cmd == 'show_locks': + if len(args) != 1: + print('show_locks requires 1 args') + sys.exit(1) + pp.pprint(client.show_locks(eval(args[0]),)) + +elif cmd == 'heartbeat': + if len(args) != 1: + print('heartbeat requires 1 args') + sys.exit(1) + pp.pprint(client.heartbeat(eval(args[0]),)) + +elif cmd == 'heartbeat_txn_range': + if len(args) != 1: + print('heartbeat_txn_range requires 1 args') + sys.exit(1) + pp.pprint(client.heartbeat_txn_range(eval(args[0]),)) + +elif cmd == 'compact': + if len(args) != 1: + print('compact requires 1 args') + sys.exit(1) + pp.pprint(client.compact(eval(args[0]),)) + +elif cmd == 'compact2': + if len(args) != 1: + print('compact2 requires 1 args') + sys.exit(1) + pp.pprint(client.compact2(eval(args[0]),)) + +elif cmd == 'show_compact': + if len(args) != 1: + print('show_compact requires 1 args') + sys.exit(1) + pp.pprint(client.show_compact(eval(args[0]),)) + +elif cmd == 'add_dynamic_partitions': + if len(args) != 1: + print('add_dynamic_partitions requires 1 args') + sys.exit(1) + pp.pprint(client.add_dynamic_partitions(eval(args[0]),)) + +elif cmd == 'get_next_notification': + if len(args) != 1: + print('get_next_notification requires 1 args') + sys.exit(1) + pp.pprint(client.get_next_notification(eval(args[0]),)) + +elif cmd == 'get_current_notificationEventId': + if len(args) != 0: + print('get_current_notificationEventId requires 0 args') + sys.exit(1) + pp.pprint(client.get_current_notificationEventId()) + +elif cmd == 'fire_listener_event': + if len(args) != 1: + print('fire_listener_event requires 1 args') + sys.exit(1) + pp.pprint(client.fire_listener_event(eval(args[0]),)) + +elif cmd == 'flushCache': + if len(args) != 0: + print('flushCache requires 0 args') + sys.exit(1) + pp.pprint(client.flushCache()) + +elif cmd == 'cm_recycle': + if len(args) != 1: + print('cm_recycle requires 1 args') + sys.exit(1) + pp.pprint(client.cm_recycle(eval(args[0]),)) + +elif cmd == 'get_file_metadata_by_expr': + if len(args) != 1: + print('get_file_metadata_by_expr requires 1 args') + sys.exit(1) + pp.pprint(client.get_file_metadata_by_expr(eval(args[0]),)) + +elif cmd == 'get_file_metadata': + if len(args) != 1: + print('get_file_metadata requires 1 args') + sys.exit(1) + pp.pprint(client.get_file_metadata(eval(args[0]),)) + +elif cmd == 'put_file_metadata': + if len(args) != 1: + print('put_file_metadata requires 1 args') + sys.exit(1) + pp.pprint(client.put_file_metadata(eval(args[0]),)) + +elif cmd == 'clear_file_metadata': + if len(args) != 1: + print('clear_file_metadata requires 1 args') + sys.exit(1) + pp.pprint(client.clear_file_metadata(eval(args[0]),)) + +elif cmd == 'cache_file_metadata': + if len(args) != 1: + print('cache_file_metadata requires 1 args') + sys.exit(1) + pp.pprint(client.cache_file_metadata(eval(args[0]),)) + +elif cmd == 'get_metastore_db_uuid': + if len(args) != 0: + print('get_metastore_db_uuid requires 0 args') + sys.exit(1) + pp.pprint(client.get_metastore_db_uuid()) + +elif cmd == 'getName': + if len(args) != 0: + print('getName requires 0 args') + sys.exit(1) + pp.pprint(client.getName()) + +elif cmd == 'getVersion': + if len(args) != 0: + print('getVersion requires 0 args') + sys.exit(1) + pp.pprint(client.getVersion()) + +elif cmd == 'getStatus': + if len(args) != 0: + print('getStatus requires 0 args') + sys.exit(1) + pp.pprint(client.getStatus()) + +elif cmd == 'getStatusDetails': + if len(args) != 0: + print('getStatusDetails requires 0 args') + sys.exit(1) + pp.pprint(client.getStatusDetails()) + +elif cmd == 'getCounters': + if len(args) != 0: + print('getCounters requires 0 args') + sys.exit(1) + pp.pprint(client.getCounters()) + +elif cmd == 'getCounter': + if len(args) != 1: + print('getCounter requires 1 args') + sys.exit(1) + pp.pprint(client.getCounter(args[0],)) + +elif cmd == 'setOption': + if len(args) != 2: + print('setOption requires 2 args') + sys.exit(1) + pp.pprint(client.setOption(args[0],args[1],)) + +elif cmd == 'getOption': + if len(args) != 1: + print('getOption requires 1 args') + sys.exit(1) + pp.pprint(client.getOption(args[0],)) + +elif cmd == 'getOptions': + if len(args) != 0: + print('getOptions requires 0 args') + sys.exit(1) + pp.pprint(client.getOptions()) + +elif cmd == 'getCpuProfile': + if len(args) != 1: + print('getCpuProfile requires 1 args') + sys.exit(1) + pp.pprint(client.getCpuProfile(eval(args[0]),)) + +elif cmd == 'aliveSince': + if len(args) != 0: + print('aliveSince requires 0 args') + sys.exit(1) + pp.pprint(client.aliveSince()) + +elif cmd == 'reinitialize': + if len(args) != 0: + print('reinitialize requires 0 args') + sys.exit(1) + pp.pprint(client.reinitialize()) + +elif cmd == 'shutdown': + if len(args) != 0: + print('shutdown requires 0 args') + sys.exit(1) + pp.pprint(client.shutdown()) + +else: + print('Unrecognized method %s' % cmd) + sys.exit(1) + +transport.close() diff --git standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py new file mode 100644 index 0000000..2ecf555 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py @@ -0,0 +1,38112 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +from thrift.Thrift import TType, TMessageType, TException, TApplicationException +import fb303.FacebookService +import logging +from ttypes import * +from thrift.Thrift import TProcessor +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + +class Iface(fb303.FacebookService.Iface): + """ + This interface is live. + """ + def getMetaConf(self, key): + """ + Parameters: + - key + """ + pass + + def setMetaConf(self, key, value): + """ + Parameters: + - key + - value + """ + pass + + def create_database(self, database): + """ + Parameters: + - database + """ + pass + + def get_database(self, name): + """ + Parameters: + - name + """ + pass + + def drop_database(self, name, deleteData, cascade): + """ + Parameters: + - name + - deleteData + - cascade + """ + pass + + def get_databases(self, pattern): + """ + Parameters: + - pattern + """ + pass + + def get_all_databases(self): + pass + + def alter_database(self, dbname, db): + """ + Parameters: + - dbname + - db + """ + pass + + def get_type(self, name): + """ + Parameters: + - name + """ + pass + + def create_type(self, type): + """ + Parameters: + - type + """ + pass + + def drop_type(self, type): + """ + Parameters: + - type + """ + pass + + def get_type_all(self, name): + """ + Parameters: + - name + """ + pass + + def get_fields(self, db_name, table_name): + """ + Parameters: + - db_name + - table_name + """ + pass + + def get_fields_with_environment_context(self, db_name, table_name, environment_context): + """ + Parameters: + - db_name + - table_name + - environment_context + """ + pass + + def get_schema(self, db_name, table_name): + """ + Parameters: + - db_name + - table_name + """ + pass + + def get_schema_with_environment_context(self, db_name, table_name, environment_context): + """ + Parameters: + - db_name + - table_name + - environment_context + """ + pass + + def create_table(self, tbl): + """ + Parameters: + - tbl + """ + pass + + def create_table_with_environment_context(self, tbl, environment_context): + """ + Parameters: + - tbl + - environment_context + """ + pass + + def create_table_with_constraints(self, tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints): + """ + Parameters: + - tbl + - primaryKeys + - foreignKeys + - uniqueConstraints + - notNullConstraints + """ + pass + + def drop_constraint(self, req): + """ + Parameters: + - req + """ + pass + + def add_primary_key(self, req): + """ + Parameters: + - req + """ + pass + + def add_foreign_key(self, req): + """ + Parameters: + - req + """ + pass + + def add_unique_constraint(self, req): + """ + Parameters: + - req + """ + pass + + def add_not_null_constraint(self, req): + """ + Parameters: + - req + """ + pass + + def drop_table(self, dbname, name, deleteData): + """ + Parameters: + - dbname + - name + - deleteData + """ + pass + + def drop_table_with_environment_context(self, dbname, name, deleteData, environment_context): + """ + Parameters: + - dbname + - name + - deleteData + - environment_context + """ + pass + + def truncate_table(self, dbName, tableName, partNames): + """ + Parameters: + - dbName + - tableName + - partNames + """ + pass + + def get_tables(self, db_name, pattern): + """ + Parameters: + - db_name + - pattern + """ + pass + + def get_tables_by_type(self, db_name, pattern, tableType): + """ + Parameters: + - db_name + - pattern + - tableType + """ + pass + + def get_table_meta(self, db_patterns, tbl_patterns, tbl_types): + """ + Parameters: + - db_patterns + - tbl_patterns + - tbl_types + """ + pass + + def get_all_tables(self, db_name): + """ + Parameters: + - db_name + """ + pass + + def get_table(self, dbname, tbl_name): + """ + Parameters: + - dbname + - tbl_name + """ + pass + + def get_table_objects_by_name(self, dbname, tbl_names): + """ + Parameters: + - dbname + - tbl_names + """ + pass + + def get_table_req(self, req): + """ + Parameters: + - req + """ + pass + + def get_table_objects_by_name_req(self, req): + """ + Parameters: + - req + """ + pass + + def get_table_names_by_filter(self, dbname, filter, max_tables): + """ + Parameters: + - dbname + - filter + - max_tables + """ + pass + + def alter_table(self, dbname, tbl_name, new_tbl): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + """ + pass + + def alter_table_with_environment_context(self, dbname, tbl_name, new_tbl, environment_context): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + - environment_context + """ + pass + + def alter_table_with_cascade(self, dbname, tbl_name, new_tbl, cascade): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + - cascade + """ + pass + + def add_partition(self, new_part): + """ + Parameters: + - new_part + """ + pass + + def add_partition_with_environment_context(self, new_part, environment_context): + """ + Parameters: + - new_part + - environment_context + """ + pass + + def add_partitions(self, new_parts): + """ + Parameters: + - new_parts + """ + pass + + def add_partitions_pspec(self, new_parts): + """ + Parameters: + - new_parts + """ + pass + + def append_partition(self, db_name, tbl_name, part_vals): + """ + Parameters: + - db_name + - tbl_name + - part_vals + """ + pass + + def add_partitions_req(self, request): + """ + Parameters: + - request + """ + pass + + def append_partition_with_environment_context(self, db_name, tbl_name, part_vals, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - environment_context + """ + pass + + def append_partition_by_name(self, db_name, tbl_name, part_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + """ + pass + + def append_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_name + - environment_context + """ + pass + + def drop_partition(self, db_name, tbl_name, part_vals, deleteData): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - deleteData + """ + pass + + def drop_partition_with_environment_context(self, db_name, tbl_name, part_vals, deleteData, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - deleteData + - environment_context + """ + pass + + def drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): + """ + Parameters: + - db_name + - tbl_name + - part_name + - deleteData + """ + pass + + def drop_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, deleteData, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_name + - deleteData + - environment_context + """ + pass + + def drop_partitions_req(self, req): + """ + Parameters: + - req + """ + pass + + def get_partition(self, db_name, tbl_name, part_vals): + """ + Parameters: + - db_name + - tbl_name + - part_vals + """ + pass + + def exchange_partition(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): + """ + Parameters: + - partitionSpecs + - source_db + - source_table_name + - dest_db + - dest_table_name + """ + pass + + def exchange_partitions(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): + """ + Parameters: + - partitionSpecs + - source_db + - source_table_name + - dest_db + - dest_table_name + """ + pass + + def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - user_name + - group_names + """ + pass + + def get_partition_by_name(self, db_name, tbl_name, part_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + """ + pass + + def get_partitions(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + """ + pass + + def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - max_parts + - user_name + - group_names + """ + pass + + def get_partitions_pspec(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + """ + pass + + def get_partition_names(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + """ + pass + + def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + """ + pass + + def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + - user_name + - group_names + """ + pass + + def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + """ + pass + + def get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): + """ + Parameters: + - db_name + - tbl_name + - filter + - max_parts + """ + pass + + def get_part_specs_by_filter(self, db_name, tbl_name, filter, max_parts): + """ + Parameters: + - db_name + - tbl_name + - filter + - max_parts + """ + pass + + def get_partitions_by_expr(self, req): + """ + Parameters: + - req + """ + pass + + def get_num_partitions_by_filter(self, db_name, tbl_name, filter): + """ + Parameters: + - db_name + - tbl_name + - filter + """ + pass + + def get_partitions_by_names(self, db_name, tbl_name, names): + """ + Parameters: + - db_name + - tbl_name + - names + """ + pass + + def alter_partition(self, db_name, tbl_name, new_part): + """ + Parameters: + - db_name + - tbl_name + - new_part + """ + pass + + def alter_partitions(self, db_name, tbl_name, new_parts): + """ + Parameters: + - db_name + - tbl_name + - new_parts + """ + pass + + def alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context): + """ + Parameters: + - db_name + - tbl_name + - new_parts + - environment_context + """ + pass + + def alter_partition_with_environment_context(self, db_name, tbl_name, new_part, environment_context): + """ + Parameters: + - db_name + - tbl_name + - new_part + - environment_context + """ + pass + + def rename_partition(self, db_name, tbl_name, part_vals, new_part): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - new_part + """ + pass + + def partition_name_has_valid_characters(self, part_vals, throw_exception): + """ + Parameters: + - part_vals + - throw_exception + """ + pass + + def get_config_value(self, name, defaultValue): + """ + Parameters: + - name + - defaultValue + """ + pass + + def partition_name_to_vals(self, part_name): + """ + Parameters: + - part_name + """ + pass + + def partition_name_to_spec(self, part_name): + """ + Parameters: + - part_name + """ + pass + + def markPartitionForEvent(self, db_name, tbl_name, part_vals, eventType): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - eventType + """ + pass + + def isPartitionMarkedForEvent(self, db_name, tbl_name, part_vals, eventType): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - eventType + """ + pass + + def add_index(self, new_index, index_table): + """ + Parameters: + - new_index + - index_table + """ + pass + + def alter_index(self, dbname, base_tbl_name, idx_name, new_idx): + """ + Parameters: + - dbname + - base_tbl_name + - idx_name + - new_idx + """ + pass + + def drop_index_by_name(self, db_name, tbl_name, index_name, deleteData): + """ + Parameters: + - db_name + - tbl_name + - index_name + - deleteData + """ + pass + + def get_index_by_name(self, db_name, tbl_name, index_name): + """ + Parameters: + - db_name + - tbl_name + - index_name + """ + pass + + def get_indexes(self, db_name, tbl_name, max_indexes): + """ + Parameters: + - db_name + - tbl_name + - max_indexes + """ + pass + + def get_index_names(self, db_name, tbl_name, max_indexes): + """ + Parameters: + - db_name + - tbl_name + - max_indexes + """ + pass + + def get_primary_keys(self, request): + """ + Parameters: + - request + """ + pass + + def get_foreign_keys(self, request): + """ + Parameters: + - request + """ + pass + + def get_unique_constraints(self, request): + """ + Parameters: + - request + """ + pass + + def get_not_null_constraints(self, request): + """ + Parameters: + - request + """ + pass + + def update_table_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + """ + pass + + def update_partition_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + """ + pass + + def get_table_column_statistics(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + """ + pass + + def get_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + """ + pass + + def get_table_statistics_req(self, request): + """ + Parameters: + - request + """ + pass + + def get_partitions_statistics_req(self, request): + """ + Parameters: + - request + """ + pass + + def get_aggr_stats_for(self, request): + """ + Parameters: + - request + """ + pass + + def set_aggr_stats_for(self, request): + """ + Parameters: + - request + """ + pass + + def delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + """ + pass + + def delete_table_column_statistics(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + """ + pass + + def create_function(self, func): + """ + Parameters: + - func + """ + pass + + def drop_function(self, dbName, funcName): + """ + Parameters: + - dbName + - funcName + """ + pass + + def alter_function(self, dbName, funcName, newFunc): + """ + Parameters: + - dbName + - funcName + - newFunc + """ + pass + + def get_functions(self, dbName, pattern): + """ + Parameters: + - dbName + - pattern + """ + pass + + def get_function(self, dbName, funcName): + """ + Parameters: + - dbName + - funcName + """ + pass + + def get_all_functions(self): + pass + + def create_role(self, role): + """ + Parameters: + - role + """ + pass + + def drop_role(self, role_name): + """ + Parameters: + - role_name + """ + pass + + def get_role_names(self): + pass + + def grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option): + """ + Parameters: + - role_name + - principal_name + - principal_type + - grantor + - grantorType + - grant_option + """ + pass + + def revoke_role(self, role_name, principal_name, principal_type): + """ + Parameters: + - role_name + - principal_name + - principal_type + """ + pass + + def list_roles(self, principal_name, principal_type): + """ + Parameters: + - principal_name + - principal_type + """ + pass + + def grant_revoke_role(self, request): + """ + Parameters: + - request + """ + pass + + def get_principals_in_role(self, request): + """ + Parameters: + - request + """ + pass + + def get_role_grants_for_principal(self, request): + """ + Parameters: + - request + """ + pass + + def get_privilege_set(self, hiveObject, user_name, group_names): + """ + Parameters: + - hiveObject + - user_name + - group_names + """ + pass + + def list_privileges(self, principal_name, principal_type, hiveObject): + """ + Parameters: + - principal_name + - principal_type + - hiveObject + """ + pass + + def grant_privileges(self, privileges): + """ + Parameters: + - privileges + """ + pass + + def revoke_privileges(self, privileges): + """ + Parameters: + - privileges + """ + pass + + def grant_revoke_privileges(self, request): + """ + Parameters: + - request + """ + pass + + def set_ugi(self, user_name, group_names): + """ + Parameters: + - user_name + - group_names + """ + pass + + def get_delegation_token(self, token_owner, renewer_kerberos_principal_name): + """ + Parameters: + - token_owner + - renewer_kerberos_principal_name + """ + pass + + def renew_delegation_token(self, token_str_form): + """ + Parameters: + - token_str_form + """ + pass + + def cancel_delegation_token(self, token_str_form): + """ + Parameters: + - token_str_form + """ + pass + + def add_token(self, token_identifier, delegation_token): + """ + Parameters: + - token_identifier + - delegation_token + """ + pass + + def remove_token(self, token_identifier): + """ + Parameters: + - token_identifier + """ + pass + + def get_token(self, token_identifier): + """ + Parameters: + - token_identifier + """ + pass + + def get_all_token_identifiers(self): + pass + + def add_master_key(self, key): + """ + Parameters: + - key + """ + pass + + def update_master_key(self, seq_number, key): + """ + Parameters: + - seq_number + - key + """ + pass + + def remove_master_key(self, key_seq): + """ + Parameters: + - key_seq + """ + pass + + def get_master_keys(self): + pass + + def get_open_txns(self): + pass + + def get_open_txns_info(self): + pass + + def open_txns(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def abort_txn(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def abort_txns(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def commit_txn(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def lock(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def check_lock(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def unlock(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def show_locks(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def heartbeat(self, ids): + """ + Parameters: + - ids + """ + pass + + def heartbeat_txn_range(self, txns): + """ + Parameters: + - txns + """ + pass + + def compact(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def compact2(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def show_compact(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def add_dynamic_partitions(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def get_next_notification(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def get_current_notificationEventId(self): + pass + + def fire_listener_event(self, rqst): + """ + Parameters: + - rqst + """ + pass + + def flushCache(self): + pass + + def cm_recycle(self, request): + """ + Parameters: + - request + """ + pass + + def get_file_metadata_by_expr(self, req): + """ + Parameters: + - req + """ + pass + + def get_file_metadata(self, req): + """ + Parameters: + - req + """ + pass + + def put_file_metadata(self, req): + """ + Parameters: + - req + """ + pass + + def clear_file_metadata(self, req): + """ + Parameters: + - req + """ + pass + + def cache_file_metadata(self, req): + """ + Parameters: + - req + """ + pass + + def get_metastore_db_uuid(self): + pass + + +class Client(fb303.FacebookService.Client, Iface): + """ + This interface is live. + """ + def __init__(self, iprot, oprot=None): + fb303.FacebookService.Client.__init__(self, iprot, oprot) + + def getMetaConf(self, key): + """ + Parameters: + - key + """ + self.send_getMetaConf(key) + return self.recv_getMetaConf() + + def send_getMetaConf(self, key): + self._oprot.writeMessageBegin('getMetaConf', TMessageType.CALL, self._seqid) + args = getMetaConf_args() + args.key = key + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getMetaConf(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getMetaConf_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "getMetaConf failed: unknown result") + + def setMetaConf(self, key, value): + """ + Parameters: + - key + - value + """ + self.send_setMetaConf(key, value) + self.recv_setMetaConf() + + def send_setMetaConf(self, key, value): + self._oprot.writeMessageBegin('setMetaConf', TMessageType.CALL, self._seqid) + args = setMetaConf_args() + args.key = key + args.value = value + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_setMetaConf(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = setMetaConf_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def create_database(self, database): + """ + Parameters: + - database + """ + self.send_create_database(database) + self.recv_create_database() + + def send_create_database(self, database): + self._oprot.writeMessageBegin('create_database', TMessageType.CALL, self._seqid) + args = create_database_args() + args.database = database + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_database(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_database_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def get_database(self, name): + """ + Parameters: + - name + """ + self.send_get_database(name) + return self.recv_get_database() + + def send_get_database(self, name): + self._oprot.writeMessageBegin('get_database', TMessageType.CALL, self._seqid) + args = get_database_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_database(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_database_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_database failed: unknown result") + + def drop_database(self, name, deleteData, cascade): + """ + Parameters: + - name + - deleteData + - cascade + """ + self.send_drop_database(name, deleteData, cascade) + self.recv_drop_database() + + def send_drop_database(self, name, deleteData, cascade): + self._oprot.writeMessageBegin('drop_database', TMessageType.CALL, self._seqid) + args = drop_database_args() + args.name = name + args.deleteData = deleteData + args.cascade = cascade + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_database(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_database_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def get_databases(self, pattern): + """ + Parameters: + - pattern + """ + self.send_get_databases(pattern) + return self.recv_get_databases() + + def send_get_databases(self, pattern): + self._oprot.writeMessageBegin('get_databases', TMessageType.CALL, self._seqid) + args = get_databases_args() + args.pattern = pattern + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_databases(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_databases_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_databases failed: unknown result") + + def get_all_databases(self): + self.send_get_all_databases() + return self.recv_get_all_databases() + + def send_get_all_databases(self): + self._oprot.writeMessageBegin('get_all_databases', TMessageType.CALL, self._seqid) + args = get_all_databases_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_databases(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_databases_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result") + + def alter_database(self, dbname, db): + """ + Parameters: + - dbname + - db + """ + self.send_alter_database(dbname, db) + self.recv_alter_database() + + def send_alter_database(self, dbname, db): + self._oprot.writeMessageBegin('alter_database', TMessageType.CALL, self._seqid) + args = alter_database_args() + args.dbname = dbname + args.db = db + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_database(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_database_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def get_type(self, name): + """ + Parameters: + - name + """ + self.send_get_type(name) + return self.recv_get_type() + + def send_get_type(self, name): + self._oprot.writeMessageBegin('get_type', TMessageType.CALL, self._seqid) + args = get_type_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_type(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_type_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type failed: unknown result") + + def create_type(self, type): + """ + Parameters: + - type + """ + self.send_create_type(type) + return self.recv_create_type() + + def send_create_type(self, type): + self._oprot.writeMessageBegin('create_type', TMessageType.CALL, self._seqid) + args = create_type_args() + args.type = type + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_type(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_type_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_type failed: unknown result") + + def drop_type(self, type): + """ + Parameters: + - type + """ + self.send_drop_type(type) + return self.recv_drop_type() + + def send_drop_type(self, type): + self._oprot.writeMessageBegin('drop_type', TMessageType.CALL, self._seqid) + args = drop_type_args() + args.type = type + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_type(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_type_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_type failed: unknown result") + + def get_type_all(self, name): + """ + Parameters: + - name + """ + self.send_get_type_all(name) + return self.recv_get_type_all() + + def send_get_type_all(self, name): + self._oprot.writeMessageBegin('get_type_all', TMessageType.CALL, self._seqid) + args = get_type_all_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_type_all(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_type_all_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type_all failed: unknown result") + + def get_fields(self, db_name, table_name): + """ + Parameters: + - db_name + - table_name + """ + self.send_get_fields(db_name, table_name) + return self.recv_get_fields() + + def send_get_fields(self, db_name, table_name): + self._oprot.writeMessageBegin('get_fields', TMessageType.CALL, self._seqid) + args = get_fields_args() + args.db_name = db_name + args.table_name = table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_fields(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_fields_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_fields failed: unknown result") + + def get_fields_with_environment_context(self, db_name, table_name, environment_context): + """ + Parameters: + - db_name + - table_name + - environment_context + """ + self.send_get_fields_with_environment_context(db_name, table_name, environment_context) + return self.recv_get_fields_with_environment_context() + + def send_get_fields_with_environment_context(self, db_name, table_name, environment_context): + self._oprot.writeMessageBegin('get_fields_with_environment_context', TMessageType.CALL, self._seqid) + args = get_fields_with_environment_context_args() + args.db_name = db_name + args.table_name = table_name + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_fields_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_fields_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_fields_with_environment_context failed: unknown result") + + def get_schema(self, db_name, table_name): + """ + Parameters: + - db_name + - table_name + """ + self.send_get_schema(db_name, table_name) + return self.recv_get_schema() + + def send_get_schema(self, db_name, table_name): + self._oprot.writeMessageBegin('get_schema', TMessageType.CALL, self._seqid) + args = get_schema_args() + args.db_name = db_name + args.table_name = table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_schema(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_schema_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema failed: unknown result") + + def get_schema_with_environment_context(self, db_name, table_name, environment_context): + """ + Parameters: + - db_name + - table_name + - environment_context + """ + self.send_get_schema_with_environment_context(db_name, table_name, environment_context) + return self.recv_get_schema_with_environment_context() + + def send_get_schema_with_environment_context(self, db_name, table_name, environment_context): + self._oprot.writeMessageBegin('get_schema_with_environment_context', TMessageType.CALL, self._seqid) + args = get_schema_with_environment_context_args() + args.db_name = db_name + args.table_name = table_name + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_schema_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_schema_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema_with_environment_context failed: unknown result") + + def create_table(self, tbl): + """ + Parameters: + - tbl + """ + self.send_create_table(tbl) + self.recv_create_table() + + def send_create_table(self, tbl): + self._oprot.writeMessageBegin('create_table', TMessageType.CALL, self._seqid) + args = create_table_args() + args.tbl = tbl + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_table(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_table_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + return + + def create_table_with_environment_context(self, tbl, environment_context): + """ + Parameters: + - tbl + - environment_context + """ + self.send_create_table_with_environment_context(tbl, environment_context) + self.recv_create_table_with_environment_context() + + def send_create_table_with_environment_context(self, tbl, environment_context): + self._oprot.writeMessageBegin('create_table_with_environment_context', TMessageType.CALL, self._seqid) + args = create_table_with_environment_context_args() + args.tbl = tbl + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_table_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_table_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + return + + def create_table_with_constraints(self, tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints): + """ + Parameters: + - tbl + - primaryKeys + - foreignKeys + - uniqueConstraints + - notNullConstraints + """ + self.send_create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints) + self.recv_create_table_with_constraints() + + def send_create_table_with_constraints(self, tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints): + self._oprot.writeMessageBegin('create_table_with_constraints', TMessageType.CALL, self._seqid) + args = create_table_with_constraints_args() + args.tbl = tbl + args.primaryKeys = primaryKeys + args.foreignKeys = foreignKeys + args.uniqueConstraints = uniqueConstraints + args.notNullConstraints = notNullConstraints + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_table_with_constraints(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_table_with_constraints_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + return + + def drop_constraint(self, req): + """ + Parameters: + - req + """ + self.send_drop_constraint(req) + self.recv_drop_constraint() + + def send_drop_constraint(self, req): + self._oprot.writeMessageBegin('drop_constraint', TMessageType.CALL, self._seqid) + args = drop_constraint_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_constraint(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_constraint_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o3 is not None: + raise result.o3 + return + + def add_primary_key(self, req): + """ + Parameters: + - req + """ + self.send_add_primary_key(req) + self.recv_add_primary_key() + + def send_add_primary_key(self, req): + self._oprot.writeMessageBegin('add_primary_key', TMessageType.CALL, self._seqid) + args = add_primary_key_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_primary_key(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_primary_key_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def add_foreign_key(self, req): + """ + Parameters: + - req + """ + self.send_add_foreign_key(req) + self.recv_add_foreign_key() + + def send_add_foreign_key(self, req): + self._oprot.writeMessageBegin('add_foreign_key', TMessageType.CALL, self._seqid) + args = add_foreign_key_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_foreign_key(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_foreign_key_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def add_unique_constraint(self, req): + """ + Parameters: + - req + """ + self.send_add_unique_constraint(req) + self.recv_add_unique_constraint() + + def send_add_unique_constraint(self, req): + self._oprot.writeMessageBegin('add_unique_constraint', TMessageType.CALL, self._seqid) + args = add_unique_constraint_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_unique_constraint(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_unique_constraint_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def add_not_null_constraint(self, req): + """ + Parameters: + - req + """ + self.send_add_not_null_constraint(req) + self.recv_add_not_null_constraint() + + def send_add_not_null_constraint(self, req): + self._oprot.writeMessageBegin('add_not_null_constraint', TMessageType.CALL, self._seqid) + args = add_not_null_constraint_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_not_null_constraint(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_not_null_constraint_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def drop_table(self, dbname, name, deleteData): + """ + Parameters: + - dbname + - name + - deleteData + """ + self.send_drop_table(dbname, name, deleteData) + self.recv_drop_table() + + def send_drop_table(self, dbname, name, deleteData): + self._oprot.writeMessageBegin('drop_table', TMessageType.CALL, self._seqid) + args = drop_table_args() + args.dbname = dbname + args.name = name + args.deleteData = deleteData + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_table(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_table_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o3 is not None: + raise result.o3 + return + + def drop_table_with_environment_context(self, dbname, name, deleteData, environment_context): + """ + Parameters: + - dbname + - name + - deleteData + - environment_context + """ + self.send_drop_table_with_environment_context(dbname, name, deleteData, environment_context) + self.recv_drop_table_with_environment_context() + + def send_drop_table_with_environment_context(self, dbname, name, deleteData, environment_context): + self._oprot.writeMessageBegin('drop_table_with_environment_context', TMessageType.CALL, self._seqid) + args = drop_table_with_environment_context_args() + args.dbname = dbname + args.name = name + args.deleteData = deleteData + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_table_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_table_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o3 is not None: + raise result.o3 + return + + def truncate_table(self, dbName, tableName, partNames): + """ + Parameters: + - dbName + - tableName + - partNames + """ + self.send_truncate_table(dbName, tableName, partNames) + self.recv_truncate_table() + + def send_truncate_table(self, dbName, tableName, partNames): + self._oprot.writeMessageBegin('truncate_table', TMessageType.CALL, self._seqid) + args = truncate_table_args() + args.dbName = dbName + args.tableName = tableName + args.partNames = partNames + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_truncate_table(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = truncate_table_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def get_tables(self, db_name, pattern): + """ + Parameters: + - db_name + - pattern + """ + self.send_get_tables(db_name, pattern) + return self.recv_get_tables() + + def send_get_tables(self, db_name, pattern): + self._oprot.writeMessageBegin('get_tables', TMessageType.CALL, self._seqid) + args = get_tables_args() + args.db_name = db_name + args.pattern = pattern + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_tables(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_tables_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables failed: unknown result") + + def get_tables_by_type(self, db_name, pattern, tableType): + """ + Parameters: + - db_name + - pattern + - tableType + """ + self.send_get_tables_by_type(db_name, pattern, tableType) + return self.recv_get_tables_by_type() + + def send_get_tables_by_type(self, db_name, pattern, tableType): + self._oprot.writeMessageBegin('get_tables_by_type', TMessageType.CALL, self._seqid) + args = get_tables_by_type_args() + args.db_name = db_name + args.pattern = pattern + args.tableType = tableType + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_tables_by_type(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_tables_by_type_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables_by_type failed: unknown result") + + def get_table_meta(self, db_patterns, tbl_patterns, tbl_types): + """ + Parameters: + - db_patterns + - tbl_patterns + - tbl_types + """ + self.send_get_table_meta(db_patterns, tbl_patterns, tbl_types) + return self.recv_get_table_meta() + + def send_get_table_meta(self, db_patterns, tbl_patterns, tbl_types): + self._oprot.writeMessageBegin('get_table_meta', TMessageType.CALL, self._seqid) + args = get_table_meta_args() + args.db_patterns = db_patterns + args.tbl_patterns = tbl_patterns + args.tbl_types = tbl_types + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_meta(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_meta_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_meta failed: unknown result") + + def get_all_tables(self, db_name): + """ + Parameters: + - db_name + """ + self.send_get_all_tables(db_name) + return self.recv_get_all_tables() + + def send_get_all_tables(self, db_name): + self._oprot.writeMessageBegin('get_all_tables', TMessageType.CALL, self._seqid) + args = get_all_tables_args() + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_tables(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_tables_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result") + + def get_table(self, dbname, tbl_name): + """ + Parameters: + - dbname + - tbl_name + """ + self.send_get_table(dbname, tbl_name) + return self.recv_get_table() + + def send_get_table(self, dbname, tbl_name): + self._oprot.writeMessageBegin('get_table', TMessageType.CALL, self._seqid) + args = get_table_args() + args.dbname = dbname + args.tbl_name = tbl_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table failed: unknown result") + + def get_table_objects_by_name(self, dbname, tbl_names): + """ + Parameters: + - dbname + - tbl_names + """ + self.send_get_table_objects_by_name(dbname, tbl_names) + return self.recv_get_table_objects_by_name() + + def send_get_table_objects_by_name(self, dbname, tbl_names): + self._oprot.writeMessageBegin('get_table_objects_by_name', TMessageType.CALL, self._seqid) + args = get_table_objects_by_name_args() + args.dbname = dbname + args.tbl_names = tbl_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_objects_by_name(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_objects_by_name_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_objects_by_name failed: unknown result") + + def get_table_req(self, req): + """ + Parameters: + - req + """ + self.send_get_table_req(req) + return self.recv_get_table_req() + + def send_get_table_req(self, req): + self._oprot.writeMessageBegin('get_table_req', TMessageType.CALL, self._seqid) + args = get_table_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_req failed: unknown result") + + def get_table_objects_by_name_req(self, req): + """ + Parameters: + - req + """ + self.send_get_table_objects_by_name_req(req) + return self.recv_get_table_objects_by_name_req() + + def send_get_table_objects_by_name_req(self, req): + self._oprot.writeMessageBegin('get_table_objects_by_name_req', TMessageType.CALL, self._seqid) + args = get_table_objects_by_name_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_objects_by_name_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_objects_by_name_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_objects_by_name_req failed: unknown result") + + def get_table_names_by_filter(self, dbname, filter, max_tables): + """ + Parameters: + - dbname + - filter + - max_tables + """ + self.send_get_table_names_by_filter(dbname, filter, max_tables) + return self.recv_get_table_names_by_filter() + + def send_get_table_names_by_filter(self, dbname, filter, max_tables): + self._oprot.writeMessageBegin('get_table_names_by_filter', TMessageType.CALL, self._seqid) + args = get_table_names_by_filter_args() + args.dbname = dbname + args.filter = filter + args.max_tables = max_tables + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_names_by_filter(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_names_by_filter_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_names_by_filter failed: unknown result") + + def alter_table(self, dbname, tbl_name, new_tbl): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + """ + self.send_alter_table(dbname, tbl_name, new_tbl) + self.recv_alter_table() + + def send_alter_table(self, dbname, tbl_name, new_tbl): + self._oprot.writeMessageBegin('alter_table', TMessageType.CALL, self._seqid) + args = alter_table_args() + args.dbname = dbname + args.tbl_name = tbl_name + args.new_tbl = new_tbl + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_table(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_table_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def alter_table_with_environment_context(self, dbname, tbl_name, new_tbl, environment_context): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + - environment_context + """ + self.send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context) + self.recv_alter_table_with_environment_context() + + def send_alter_table_with_environment_context(self, dbname, tbl_name, new_tbl, environment_context): + self._oprot.writeMessageBegin('alter_table_with_environment_context', TMessageType.CALL, self._seqid) + args = alter_table_with_environment_context_args() + args.dbname = dbname + args.tbl_name = tbl_name + args.new_tbl = new_tbl + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_table_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_table_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def alter_table_with_cascade(self, dbname, tbl_name, new_tbl, cascade): + """ + Parameters: + - dbname + - tbl_name + - new_tbl + - cascade + """ + self.send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade) + self.recv_alter_table_with_cascade() + + def send_alter_table_with_cascade(self, dbname, tbl_name, new_tbl, cascade): + self._oprot.writeMessageBegin('alter_table_with_cascade', TMessageType.CALL, self._seqid) + args = alter_table_with_cascade_args() + args.dbname = dbname + args.tbl_name = tbl_name + args.new_tbl = new_tbl + args.cascade = cascade + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_table_with_cascade(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_table_with_cascade_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def add_partition(self, new_part): + """ + Parameters: + - new_part + """ + self.send_add_partition(new_part) + return self.recv_add_partition() + + def send_add_partition(self, new_part): + self._oprot.writeMessageBegin('add_partition', TMessageType.CALL, self._seqid) + args = add_partition_args() + args.new_part = new_part + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partition failed: unknown result") + + def add_partition_with_environment_context(self, new_part, environment_context): + """ + Parameters: + - new_part + - environment_context + """ + self.send_add_partition_with_environment_context(new_part, environment_context) + return self.recv_add_partition_with_environment_context() + + def send_add_partition_with_environment_context(self, new_part, environment_context): + self._oprot.writeMessageBegin('add_partition_with_environment_context', TMessageType.CALL, self._seqid) + args = add_partition_with_environment_context_args() + args.new_part = new_part + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_partition_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_partition_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partition_with_environment_context failed: unknown result") + + def add_partitions(self, new_parts): + """ + Parameters: + - new_parts + """ + self.send_add_partitions(new_parts) + return self.recv_add_partitions() + + def send_add_partitions(self, new_parts): + self._oprot.writeMessageBegin('add_partitions', TMessageType.CALL, self._seqid) + args = add_partitions_args() + args.new_parts = new_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_partitions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_partitions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partitions failed: unknown result") + + def add_partitions_pspec(self, new_parts): + """ + Parameters: + - new_parts + """ + self.send_add_partitions_pspec(new_parts) + return self.recv_add_partitions_pspec() + + def send_add_partitions_pspec(self, new_parts): + self._oprot.writeMessageBegin('add_partitions_pspec', TMessageType.CALL, self._seqid) + args = add_partitions_pspec_args() + args.new_parts = new_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_partitions_pspec(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_partitions_pspec_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partitions_pspec failed: unknown result") + + def append_partition(self, db_name, tbl_name, part_vals): + """ + Parameters: + - db_name + - tbl_name + - part_vals + """ + self.send_append_partition(db_name, tbl_name, part_vals) + return self.recv_append_partition() + + def send_append_partition(self, db_name, tbl_name, part_vals): + self._oprot.writeMessageBegin('append_partition', TMessageType.CALL, self._seqid) + args = append_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_append_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = append_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition failed: unknown result") + + def add_partitions_req(self, request): + """ + Parameters: + - request + """ + self.send_add_partitions_req(request) + return self.recv_add_partitions_req() + + def send_add_partitions_req(self, request): + self._oprot.writeMessageBegin('add_partitions_req', TMessageType.CALL, self._seqid) + args = add_partitions_req_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_partitions_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_partitions_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partitions_req failed: unknown result") + + def append_partition_with_environment_context(self, db_name, tbl_name, part_vals, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - environment_context + """ + self.send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context) + return self.recv_append_partition_with_environment_context() + + def send_append_partition_with_environment_context(self, db_name, tbl_name, part_vals, environment_context): + self._oprot.writeMessageBegin('append_partition_with_environment_context', TMessageType.CALL, self._seqid) + args = append_partition_with_environment_context_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_append_partition_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = append_partition_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition_with_environment_context failed: unknown result") + + def append_partition_by_name(self, db_name, tbl_name, part_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + """ + self.send_append_partition_by_name(db_name, tbl_name, part_name) + return self.recv_append_partition_by_name() + + def send_append_partition_by_name(self, db_name, tbl_name, part_name): + self._oprot.writeMessageBegin('append_partition_by_name', TMessageType.CALL, self._seqid) + args = append_partition_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_append_partition_by_name(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = append_partition_by_name_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition_by_name failed: unknown result") + + def append_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_name + - environment_context + """ + self.send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context) + return self.recv_append_partition_by_name_with_environment_context() + + def send_append_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, environment_context): + self._oprot.writeMessageBegin('append_partition_by_name_with_environment_context', TMessageType.CALL, self._seqid) + args = append_partition_by_name_with_environment_context_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_append_partition_by_name_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = append_partition_by_name_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition_by_name_with_environment_context failed: unknown result") + + def drop_partition(self, db_name, tbl_name, part_vals, deleteData): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - deleteData + """ + self.send_drop_partition(db_name, tbl_name, part_vals, deleteData) + return self.recv_drop_partition() + + def send_drop_partition(self, db_name, tbl_name, part_vals, deleteData): + self._oprot.writeMessageBegin('drop_partition', TMessageType.CALL, self._seqid) + args = drop_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.deleteData = deleteData + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition failed: unknown result") + + def drop_partition_with_environment_context(self, db_name, tbl_name, part_vals, deleteData, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - deleteData + - environment_context + """ + self.send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context) + return self.recv_drop_partition_with_environment_context() + + def send_drop_partition_with_environment_context(self, db_name, tbl_name, part_vals, deleteData, environment_context): + self._oprot.writeMessageBegin('drop_partition_with_environment_context', TMessageType.CALL, self._seqid) + args = drop_partition_with_environment_context_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.deleteData = deleteData + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_partition_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_partition_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition_with_environment_context failed: unknown result") + + def drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): + """ + Parameters: + - db_name + - tbl_name + - part_name + - deleteData + """ + self.send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) + return self.recv_drop_partition_by_name() + + def send_drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData): + self._oprot.writeMessageBegin('drop_partition_by_name', TMessageType.CALL, self._seqid) + args = drop_partition_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.deleteData = deleteData + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_partition_by_name(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_partition_by_name_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition_by_name failed: unknown result") + + def drop_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, deleteData, environment_context): + """ + Parameters: + - db_name + - tbl_name + - part_name + - deleteData + - environment_context + """ + self.send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context) + return self.recv_drop_partition_by_name_with_environment_context() + + def send_drop_partition_by_name_with_environment_context(self, db_name, tbl_name, part_name, deleteData, environment_context): + self._oprot.writeMessageBegin('drop_partition_by_name_with_environment_context', TMessageType.CALL, self._seqid) + args = drop_partition_by_name_with_environment_context_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.deleteData = deleteData + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_partition_by_name_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_partition_by_name_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition_by_name_with_environment_context failed: unknown result") + + def drop_partitions_req(self, req): + """ + Parameters: + - req + """ + self.send_drop_partitions_req(req) + return self.recv_drop_partitions_req() + + def send_drop_partitions_req(self, req): + self._oprot.writeMessageBegin('drop_partitions_req', TMessageType.CALL, self._seqid) + args = drop_partitions_req_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_partitions_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_partitions_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partitions_req failed: unknown result") + + def get_partition(self, db_name, tbl_name, part_vals): + """ + Parameters: + - db_name + - tbl_name + - part_vals + """ + self.send_get_partition(db_name, tbl_name, part_vals) + return self.recv_get_partition() + + def send_get_partition(self, db_name, tbl_name, part_vals): + self._oprot.writeMessageBegin('get_partition', TMessageType.CALL, self._seqid) + args = get_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result") + + def exchange_partition(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): + """ + Parameters: + - partitionSpecs + - source_db + - source_table_name + - dest_db + - dest_table_name + """ + self.send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) + return self.recv_exchange_partition() + + def send_exchange_partition(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): + self._oprot.writeMessageBegin('exchange_partition', TMessageType.CALL, self._seqid) + args = exchange_partition_args() + args.partitionSpecs = partitionSpecs + args.source_db = source_db + args.source_table_name = source_table_name + args.dest_db = dest_db + args.dest_table_name = dest_table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_exchange_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = exchange_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "exchange_partition failed: unknown result") + + def exchange_partitions(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): + """ + Parameters: + - partitionSpecs + - source_db + - source_table_name + - dest_db + - dest_table_name + """ + self.send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) + return self.recv_exchange_partitions() + + def send_exchange_partitions(self, partitionSpecs, source_db, source_table_name, dest_db, dest_table_name): + self._oprot.writeMessageBegin('exchange_partitions', TMessageType.CALL, self._seqid) + args = exchange_partitions_args() + args.partitionSpecs = partitionSpecs + args.source_db = source_db + args.source_table_name = source_table_name + args.dest_db = dest_db + args.dest_table_name = dest_table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_exchange_partitions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = exchange_partitions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "exchange_partitions failed: unknown result") + + def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - user_name + - group_names + """ + self.send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) + return self.recv_get_partition_with_auth() + + def send_get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): + self._oprot.writeMessageBegin('get_partition_with_auth', TMessageType.CALL, self._seqid) + args = 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 + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_with_auth(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_with_auth_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_with_auth failed: unknown result") + + def get_partition_by_name(self, db_name, tbl_name, part_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + """ + self.send_get_partition_by_name(db_name, tbl_name, part_name) + return self.recv_get_partition_by_name() + + def send_get_partition_by_name(self, db_name, tbl_name, part_name): + self._oprot.writeMessageBegin('get_partition_by_name', TMessageType.CALL, self._seqid) + args = get_partition_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_by_name(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_by_name_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_by_name failed: unknown result") + + def get_partitions(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + """ + self.send_get_partitions(db_name, tbl_name, max_parts) + return self.recv_get_partitions() + + def send_get_partitions(self, db_name, tbl_name, max_parts): + self._oprot.writeMessageBegin('get_partitions', TMessageType.CALL, self._seqid) + args = get_partitions_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result") + + def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - max_parts + - user_name + - group_names + """ + self.send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) + return self.recv_get_partitions_with_auth() + + def send_get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): + self._oprot.writeMessageBegin('get_partitions_with_auth', TMessageType.CALL, self._seqid) + args = 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 + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_with_auth(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_with_auth_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_with_auth failed: unknown result") + + def get_partitions_pspec(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + """ + self.send_get_partitions_pspec(db_name, tbl_name, max_parts) + return self.recv_get_partitions_pspec() + + def send_get_partitions_pspec(self, db_name, tbl_name, max_parts): + self._oprot.writeMessageBegin('get_partitions_pspec', TMessageType.CALL, self._seqid) + args = get_partitions_pspec_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_pspec(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_pspec_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_pspec failed: unknown result") + + def get_partition_names(self, db_name, tbl_name, max_parts): + """ + Parameters: + - db_name + - tbl_name + - max_parts + """ + self.send_get_partition_names(db_name, tbl_name, max_parts) + return self.recv_get_partition_names() + + def send_get_partition_names(self, db_name, tbl_name, max_parts): + self._oprot.writeMessageBegin('get_partition_names', TMessageType.CALL, self._seqid) + args = get_partition_names_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_names(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_names_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names failed: unknown result") + + def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + """ + self.send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) + return self.recv_get_partitions_ps() + + def send_get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts): + self._oprot.writeMessageBegin('get_partitions_ps', TMessageType.CALL, self._seqid) + args = get_partitions_ps_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_ps(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_ps_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result") + + def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + - user_name + - group_names + """ + self.send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) + return self.recv_get_partitions_ps_with_auth() + + def send_get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): + self._oprot.writeMessageBegin('get_partitions_ps_with_auth', TMessageType.CALL, self._seqid) + args = 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 + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_ps_with_auth(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_ps_with_auth_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result") + + def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + """ + self.send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) + return self.recv_get_partition_names_ps() + + def send_get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): + self._oprot.writeMessageBegin('get_partition_names_ps', TMessageType.CALL, self._seqid) + args = 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 + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_names_ps(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_names_ps_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names_ps failed: unknown result") + + def get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): + """ + Parameters: + - db_name + - tbl_name + - filter + - max_parts + """ + self.send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) + return self.recv_get_partitions_by_filter() + + def send_get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts): + self._oprot.writeMessageBegin('get_partitions_by_filter', TMessageType.CALL, self._seqid) + args = get_partitions_by_filter_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.filter = filter + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_by_filter(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_by_filter_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_filter failed: unknown result") + + def get_part_specs_by_filter(self, db_name, tbl_name, filter, max_parts): + """ + Parameters: + - db_name + - tbl_name + - filter + - max_parts + """ + self.send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts) + return self.recv_get_part_specs_by_filter() + + def send_get_part_specs_by_filter(self, db_name, tbl_name, filter, max_parts): + self._oprot.writeMessageBegin('get_part_specs_by_filter', TMessageType.CALL, self._seqid) + args = get_part_specs_by_filter_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.filter = filter + args.max_parts = max_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_part_specs_by_filter(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_part_specs_by_filter_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_part_specs_by_filter failed: unknown result") + + def get_partitions_by_expr(self, req): + """ + Parameters: + - req + """ + self.send_get_partitions_by_expr(req) + return self.recv_get_partitions_by_expr() + + def send_get_partitions_by_expr(self, req): + self._oprot.writeMessageBegin('get_partitions_by_expr', TMessageType.CALL, self._seqid) + args = get_partitions_by_expr_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_by_expr(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_by_expr_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_expr failed: unknown result") + + def get_num_partitions_by_filter(self, db_name, tbl_name, filter): + """ + Parameters: + - db_name + - tbl_name + - filter + """ + self.send_get_num_partitions_by_filter(db_name, tbl_name, filter) + return self.recv_get_num_partitions_by_filter() + + def send_get_num_partitions_by_filter(self, db_name, tbl_name, filter): + self._oprot.writeMessageBegin('get_num_partitions_by_filter', TMessageType.CALL, self._seqid) + args = get_num_partitions_by_filter_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.filter = filter + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_num_partitions_by_filter(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_num_partitions_by_filter_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_num_partitions_by_filter failed: unknown result") + + def get_partitions_by_names(self, db_name, tbl_name, names): + """ + Parameters: + - db_name + - tbl_name + - names + """ + self.send_get_partitions_by_names(db_name, tbl_name, names) + return self.recv_get_partitions_by_names() + + def send_get_partitions_by_names(self, db_name, tbl_name, names): + self._oprot.writeMessageBegin('get_partitions_by_names', TMessageType.CALL, self._seqid) + args = get_partitions_by_names_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.names = names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_by_names(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_by_names_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_names failed: unknown result") + + def alter_partition(self, db_name, tbl_name, new_part): + """ + Parameters: + - db_name + - tbl_name + - new_part + """ + self.send_alter_partition(db_name, tbl_name, new_part) + self.recv_alter_partition() + + def send_alter_partition(self, db_name, tbl_name, new_part): + self._oprot.writeMessageBegin('alter_partition', TMessageType.CALL, self._seqid) + args = alter_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.new_part = new_part + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def alter_partitions(self, db_name, tbl_name, new_parts): + """ + Parameters: + - db_name + - tbl_name + - new_parts + """ + self.send_alter_partitions(db_name, tbl_name, new_parts) + self.recv_alter_partitions() + + def send_alter_partitions(self, db_name, tbl_name, new_parts): + self._oprot.writeMessageBegin('alter_partitions', TMessageType.CALL, self._seqid) + args = alter_partitions_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.new_parts = new_parts + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_partitions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_partitions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context): + """ + Parameters: + - db_name + - tbl_name + - new_parts + - environment_context + """ + self.send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context) + self.recv_alter_partitions_with_environment_context() + + def send_alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context): + self._oprot.writeMessageBegin('alter_partitions_with_environment_context', TMessageType.CALL, self._seqid) + args = alter_partitions_with_environment_context_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.new_parts = new_parts + args.environment_context = environment_context + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_partitions_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_partitions_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def alter_partition_with_environment_context(self, db_name, tbl_name, new_part, environment_context): + """ + Parameters: + - db_name + - tbl_name + - new_part + - environment_context + """ + self.send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context) + self.recv_alter_partition_with_environment_context() + + def send_alter_partition_with_environment_context(self, db_name, tbl_name, new_part, environment_context): + self._oprot.writeMessageBegin('alter_partition_with_environment_context', TMessageType.CALL, self._seqid) + args = 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 + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_partition_with_environment_context(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_partition_with_environment_context_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def rename_partition(self, db_name, tbl_name, part_vals, new_part): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - new_part + """ + self.send_rename_partition(db_name, tbl_name, part_vals, new_part) + self.recv_rename_partition() + + def send_rename_partition(self, db_name, tbl_name, part_vals, new_part): + self._oprot.writeMessageBegin('rename_partition', TMessageType.CALL, self._seqid) + args = rename_partition_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.new_part = new_part + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_rename_partition(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = rename_partition_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def partition_name_has_valid_characters(self, part_vals, throw_exception): + """ + Parameters: + - part_vals + - throw_exception + """ + self.send_partition_name_has_valid_characters(part_vals, throw_exception) + return self.recv_partition_name_has_valid_characters() + + def send_partition_name_has_valid_characters(self, part_vals, throw_exception): + self._oprot.writeMessageBegin('partition_name_has_valid_characters', TMessageType.CALL, self._seqid) + args = partition_name_has_valid_characters_args() + args.part_vals = part_vals + args.throw_exception = throw_exception + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_partition_name_has_valid_characters(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = partition_name_has_valid_characters_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_has_valid_characters failed: unknown result") + + def get_config_value(self, name, defaultValue): + """ + Parameters: + - name + - defaultValue + """ + self.send_get_config_value(name, defaultValue) + return self.recv_get_config_value() + + def send_get_config_value(self, name, defaultValue): + self._oprot.writeMessageBegin('get_config_value', TMessageType.CALL, self._seqid) + args = get_config_value_args() + args.name = name + args.defaultValue = defaultValue + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_config_value(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_config_value_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_config_value failed: unknown result") + + def partition_name_to_vals(self, part_name): + """ + Parameters: + - part_name + """ + self.send_partition_name_to_vals(part_name) + return self.recv_partition_name_to_vals() + + def send_partition_name_to_vals(self, part_name): + self._oprot.writeMessageBegin('partition_name_to_vals', TMessageType.CALL, self._seqid) + args = partition_name_to_vals_args() + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_partition_name_to_vals(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = partition_name_to_vals_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_vals failed: unknown result") + + def partition_name_to_spec(self, part_name): + """ + Parameters: + - part_name + """ + self.send_partition_name_to_spec(part_name) + return self.recv_partition_name_to_spec() + + def send_partition_name_to_spec(self, part_name): + self._oprot.writeMessageBegin('partition_name_to_spec', TMessageType.CALL, self._seqid) + args = partition_name_to_spec_args() + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_partition_name_to_spec(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = partition_name_to_spec_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_spec failed: unknown result") + + def markPartitionForEvent(self, db_name, tbl_name, part_vals, eventType): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - eventType + """ + self.send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType) + self.recv_markPartitionForEvent() + + def send_markPartitionForEvent(self, db_name, tbl_name, part_vals, eventType): + self._oprot.writeMessageBegin('markPartitionForEvent', TMessageType.CALL, self._seqid) + args = markPartitionForEvent_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.eventType = eventType + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_markPartitionForEvent(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = markPartitionForEvent_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + if result.o5 is not None: + raise result.o5 + if result.o6 is not None: + raise result.o6 + return + + def isPartitionMarkedForEvent(self, db_name, tbl_name, part_vals, eventType): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - eventType + """ + self.send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType) + return self.recv_isPartitionMarkedForEvent() + + def send_isPartitionMarkedForEvent(self, db_name, tbl_name, part_vals, eventType): + self._oprot.writeMessageBegin('isPartitionMarkedForEvent', TMessageType.CALL, self._seqid) + args = isPartitionMarkedForEvent_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.eventType = eventType + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_isPartitionMarkedForEvent(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = isPartitionMarkedForEvent_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + if result.o5 is not None: + raise result.o5 + if result.o6 is not None: + raise result.o6 + raise TApplicationException(TApplicationException.MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result") + + def add_index(self, new_index, index_table): + """ + Parameters: + - new_index + - index_table + """ + self.send_add_index(new_index, index_table) + return self.recv_add_index() + + def send_add_index(self, new_index, index_table): + self._oprot.writeMessageBegin('add_index', TMessageType.CALL, self._seqid) + args = add_index_args() + args.new_index = new_index + args.index_table = index_table + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_index(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_index_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_index failed: unknown result") + + def alter_index(self, dbname, base_tbl_name, idx_name, new_idx): + """ + Parameters: + - dbname + - base_tbl_name + - idx_name + - new_idx + """ + self.send_alter_index(dbname, base_tbl_name, idx_name, new_idx) + self.recv_alter_index() + + def send_alter_index(self, dbname, base_tbl_name, idx_name, new_idx): + self._oprot.writeMessageBegin('alter_index', TMessageType.CALL, self._seqid) + args = alter_index_args() + args.dbname = dbname + args.base_tbl_name = base_tbl_name + args.idx_name = idx_name + args.new_idx = new_idx + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_index(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_index_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def drop_index_by_name(self, db_name, tbl_name, index_name, deleteData): + """ + Parameters: + - db_name + - tbl_name + - index_name + - deleteData + """ + self.send_drop_index_by_name(db_name, tbl_name, index_name, deleteData) + return self.recv_drop_index_by_name() + + def send_drop_index_by_name(self, db_name, tbl_name, index_name, deleteData): + self._oprot.writeMessageBegin('drop_index_by_name', TMessageType.CALL, self._seqid) + args = drop_index_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.index_name = index_name + args.deleteData = deleteData + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_index_by_name(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_index_by_name_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_index_by_name failed: unknown result") + + def get_index_by_name(self, db_name, tbl_name, index_name): + """ + Parameters: + - db_name + - tbl_name + - index_name + """ + self.send_get_index_by_name(db_name, tbl_name, index_name) + return self.recv_get_index_by_name() + + def send_get_index_by_name(self, db_name, tbl_name, index_name): + self._oprot.writeMessageBegin('get_index_by_name', TMessageType.CALL, self._seqid) + args = get_index_by_name_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.index_name = index_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_index_by_name(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_index_by_name_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_by_name failed: unknown result") + + def get_indexes(self, db_name, tbl_name, max_indexes): + """ + Parameters: + - db_name + - tbl_name + - max_indexes + """ + self.send_get_indexes(db_name, tbl_name, max_indexes) + return self.recv_get_indexes() + + def send_get_indexes(self, db_name, tbl_name, max_indexes): + self._oprot.writeMessageBegin('get_indexes', TMessageType.CALL, self._seqid) + args = get_indexes_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_indexes = max_indexes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_indexes(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_indexes_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_indexes failed: unknown result") + + def get_index_names(self, db_name, tbl_name, max_indexes): + """ + Parameters: + - db_name + - tbl_name + - max_indexes + """ + self.send_get_index_names(db_name, tbl_name, max_indexes) + return self.recv_get_index_names() + + def send_get_index_names(self, db_name, tbl_name, max_indexes): + self._oprot.writeMessageBegin('get_index_names', TMessageType.CALL, self._seqid) + args = get_index_names_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_indexes = max_indexes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_index_names(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_index_names_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result") + + def get_primary_keys(self, request): + """ + Parameters: + - request + """ + self.send_get_primary_keys(request) + return self.recv_get_primary_keys() + + def send_get_primary_keys(self, request): + self._oprot.writeMessageBegin('get_primary_keys', TMessageType.CALL, self._seqid) + args = get_primary_keys_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_primary_keys(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_primary_keys_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_primary_keys failed: unknown result") + + def get_foreign_keys(self, request): + """ + Parameters: + - request + """ + self.send_get_foreign_keys(request) + return self.recv_get_foreign_keys() + + def send_get_foreign_keys(self, request): + self._oprot.writeMessageBegin('get_foreign_keys', TMessageType.CALL, self._seqid) + args = get_foreign_keys_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_foreign_keys(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_foreign_keys_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_foreign_keys failed: unknown result") + + def get_unique_constraints(self, request): + """ + Parameters: + - request + """ + self.send_get_unique_constraints(request) + return self.recv_get_unique_constraints() + + def send_get_unique_constraints(self, request): + self._oprot.writeMessageBegin('get_unique_constraints', TMessageType.CALL, self._seqid) + args = get_unique_constraints_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_unique_constraints(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_unique_constraints_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_unique_constraints failed: unknown result") + + def get_not_null_constraints(self, request): + """ + Parameters: + - request + """ + self.send_get_not_null_constraints(request) + return self.recv_get_not_null_constraints() + + def send_get_not_null_constraints(self, request): + self._oprot.writeMessageBegin('get_not_null_constraints', TMessageType.CALL, self._seqid) + args = get_not_null_constraints_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_not_null_constraints(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_not_null_constraints_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_not_null_constraints failed: unknown result") + + def update_table_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + """ + self.send_update_table_column_statistics(stats_obj) + return self.recv_update_table_column_statistics() + + def send_update_table_column_statistics(self, stats_obj): + self._oprot.writeMessageBegin('update_table_column_statistics', TMessageType.CALL, self._seqid) + args = update_table_column_statistics_args() + args.stats_obj = stats_obj + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_table_column_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = update_table_column_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "update_table_column_statistics failed: unknown result") + + def update_partition_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + """ + self.send_update_partition_column_statistics(stats_obj) + return self.recv_update_partition_column_statistics() + + def send_update_partition_column_statistics(self, stats_obj): + self._oprot.writeMessageBegin('update_partition_column_statistics', TMessageType.CALL, self._seqid) + args = update_partition_column_statistics_args() + args.stats_obj = stats_obj + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_partition_column_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = update_partition_column_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "update_partition_column_statistics failed: unknown result") + + def get_table_column_statistics(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + """ + self.send_get_table_column_statistics(db_name, tbl_name, col_name) + return self.recv_get_table_column_statistics() + + def send_get_table_column_statistics(self, db_name, tbl_name, col_name): + self._oprot.writeMessageBegin('get_table_column_statistics', TMessageType.CALL, self._seqid) + args = get_table_column_statistics_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.col_name = col_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_column_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_column_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_column_statistics failed: unknown result") + + def get_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + """ + self.send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name) + return self.recv_get_partition_column_statistics() + + def send_get_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + self._oprot.writeMessageBegin('get_partition_column_statistics', TMessageType.CALL, self._seqid) + args = get_partition_column_statistics_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.col_name = col_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_column_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partition_column_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_column_statistics failed: unknown result") + + def get_table_statistics_req(self, request): + """ + Parameters: + - request + """ + self.send_get_table_statistics_req(request) + return self.recv_get_table_statistics_req() + + def send_get_table_statistics_req(self, request): + self._oprot.writeMessageBegin('get_table_statistics_req', TMessageType.CALL, self._seqid) + args = get_table_statistics_req_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_statistics_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_table_statistics_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_statistics_req failed: unknown result") + + def get_partitions_statistics_req(self, request): + """ + Parameters: + - request + """ + self.send_get_partitions_statistics_req(request) + return self.recv_get_partitions_statistics_req() + + def send_get_partitions_statistics_req(self, request): + self._oprot.writeMessageBegin('get_partitions_statistics_req', TMessageType.CALL, self._seqid) + args = get_partitions_statistics_req_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_statistics_req(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_partitions_statistics_req_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_statistics_req failed: unknown result") + + def get_aggr_stats_for(self, request): + """ + Parameters: + - request + """ + self.send_get_aggr_stats_for(request) + return self.recv_get_aggr_stats_for() + + def send_get_aggr_stats_for(self, request): + self._oprot.writeMessageBegin('get_aggr_stats_for', TMessageType.CALL, self._seqid) + args = get_aggr_stats_for_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_aggr_stats_for(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_aggr_stats_for_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_aggr_stats_for failed: unknown result") + + def set_aggr_stats_for(self, request): + """ + Parameters: + - request + """ + self.send_set_aggr_stats_for(request) + return self.recv_set_aggr_stats_for() + + def send_set_aggr_stats_for(self, request): + self._oprot.writeMessageBegin('set_aggr_stats_for', TMessageType.CALL, self._seqid) + args = set_aggr_stats_for_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_set_aggr_stats_for(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = set_aggr_stats_for_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "set_aggr_stats_for failed: unknown result") + + def delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + """ + self.send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name) + return self.recv_delete_partition_column_statistics() + + def send_delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + self._oprot.writeMessageBegin('delete_partition_column_statistics', TMessageType.CALL, self._seqid) + args = delete_partition_column_statistics_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.col_name = col_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_delete_partition_column_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = delete_partition_column_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_partition_column_statistics failed: unknown result") + + def delete_table_column_statistics(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + """ + self.send_delete_table_column_statistics(db_name, tbl_name, col_name) + return self.recv_delete_table_column_statistics() + + def send_delete_table_column_statistics(self, db_name, tbl_name, col_name): + self._oprot.writeMessageBegin('delete_table_column_statistics', TMessageType.CALL, self._seqid) + args = delete_table_column_statistics_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.col_name = col_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_delete_table_column_statistics(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = delete_table_column_statistics_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_table_column_statistics failed: unknown result") + + def create_function(self, func): + """ + Parameters: + - func + """ + self.send_create_function(func) + self.recv_create_function() + + def send_create_function(self, func): + self._oprot.writeMessageBegin('create_function', TMessageType.CALL, self._seqid) + args = create_function_args() + args.func = func + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_function(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_function_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + return + + def drop_function(self, dbName, funcName): + """ + Parameters: + - dbName + - funcName + """ + self.send_drop_function(dbName, funcName) + self.recv_drop_function() + + def send_drop_function(self, dbName, funcName): + self._oprot.writeMessageBegin('drop_function', TMessageType.CALL, self._seqid) + args = drop_function_args() + args.dbName = dbName + args.funcName = funcName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_function(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_function_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o3 is not None: + raise result.o3 + return + + def alter_function(self, dbName, funcName, newFunc): + """ + Parameters: + - dbName + - funcName + - newFunc + """ + self.send_alter_function(dbName, funcName, newFunc) + self.recv_alter_function() + + def send_alter_function(self, dbName, funcName, newFunc): + self._oprot.writeMessageBegin('alter_function', TMessageType.CALL, self._seqid) + args = alter_function_args() + args.dbName = dbName + args.funcName = funcName + args.newFunc = newFunc + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_alter_function(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = alter_function_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def get_functions(self, dbName, pattern): + """ + Parameters: + - dbName + - pattern + """ + self.send_get_functions(dbName, pattern) + return self.recv_get_functions() + + def send_get_functions(self, dbName, pattern): + self._oprot.writeMessageBegin('get_functions', TMessageType.CALL, self._seqid) + args = get_functions_args() + args.dbName = dbName + args.pattern = pattern + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_functions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_functions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_functions failed: unknown result") + + def get_function(self, dbName, funcName): + """ + Parameters: + - dbName + - funcName + """ + self.send_get_function(dbName, funcName) + return self.recv_get_function() + + def send_get_function(self, dbName, funcName): + self._oprot.writeMessageBegin('get_function', TMessageType.CALL, self._seqid) + args = get_function_args() + args.dbName = dbName + args.funcName = funcName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_function(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_function_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_function failed: unknown result") + + def get_all_functions(self): + self.send_get_all_functions() + return self.recv_get_all_functions() + + def send_get_all_functions(self): + self._oprot.writeMessageBegin('get_all_functions', TMessageType.CALL, self._seqid) + args = get_all_functions_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_functions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_functions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_functions failed: unknown result") + + def create_role(self, role): + """ + Parameters: + - role + """ + self.send_create_role(role) + return self.recv_create_role() + + def send_create_role(self, role): + self._oprot.writeMessageBegin('create_role', TMessageType.CALL, self._seqid) + args = create_role_args() + args.role = role + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_role(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = create_role_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_role failed: unknown result") + + def drop_role(self, role_name): + """ + Parameters: + - role_name + """ + self.send_drop_role(role_name) + return self.recv_drop_role() + + def send_drop_role(self, role_name): + self._oprot.writeMessageBegin('drop_role', TMessageType.CALL, self._seqid) + args = drop_role_args() + args.role_name = role_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_role(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = drop_role_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_role failed: unknown result") + + def get_role_names(self): + self.send_get_role_names() + return self.recv_get_role_names() + + def send_get_role_names(self): + self._oprot.writeMessageBegin('get_role_names', TMessageType.CALL, self._seqid) + args = get_role_names_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_role_names(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_role_names_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_role_names failed: unknown result") + + def grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option): + """ + Parameters: + - role_name + - principal_name + - principal_type + - grantor + - grantorType + - grant_option + """ + self.send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) + return self.recv_grant_role() + + def send_grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option): + self._oprot.writeMessageBegin('grant_role', TMessageType.CALL, self._seqid) + args = 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 + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_grant_role(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = grant_role_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_role failed: unknown result") + + def revoke_role(self, role_name, principal_name, principal_type): + """ + Parameters: + - role_name + - principal_name + - principal_type + """ + self.send_revoke_role(role_name, principal_name, principal_type) + return self.recv_revoke_role() + + def send_revoke_role(self, role_name, principal_name, principal_type): + self._oprot.writeMessageBegin('revoke_role', TMessageType.CALL, self._seqid) + args = revoke_role_args() + args.role_name = role_name + args.principal_name = principal_name + args.principal_type = principal_type + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_revoke_role(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = revoke_role_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_role failed: unknown result") + + def list_roles(self, principal_name, principal_type): + """ + Parameters: + - principal_name + - principal_type + """ + self.send_list_roles(principal_name, principal_type) + return self.recv_list_roles() + + def send_list_roles(self, principal_name, principal_type): + self._oprot.writeMessageBegin('list_roles', TMessageType.CALL, self._seqid) + args = list_roles_args() + args.principal_name = principal_name + args.principal_type = principal_type + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_roles(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = list_roles_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_roles failed: unknown result") + + def grant_revoke_role(self, request): + """ + Parameters: + - request + """ + self.send_grant_revoke_role(request) + return self.recv_grant_revoke_role() + + def send_grant_revoke_role(self, request): + self._oprot.writeMessageBegin('grant_revoke_role', TMessageType.CALL, self._seqid) + args = grant_revoke_role_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_grant_revoke_role(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = grant_revoke_role_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_revoke_role failed: unknown result") + + def get_principals_in_role(self, request): + """ + Parameters: + - request + """ + self.send_get_principals_in_role(request) + return self.recv_get_principals_in_role() + + def send_get_principals_in_role(self, request): + self._oprot.writeMessageBegin('get_principals_in_role', TMessageType.CALL, self._seqid) + args = get_principals_in_role_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_principals_in_role(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_principals_in_role_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_principals_in_role failed: unknown result") + + def get_role_grants_for_principal(self, request): + """ + Parameters: + - request + """ + self.send_get_role_grants_for_principal(request) + return self.recv_get_role_grants_for_principal() + + def send_get_role_grants_for_principal(self, request): + self._oprot.writeMessageBegin('get_role_grants_for_principal', TMessageType.CALL, self._seqid) + args = get_role_grants_for_principal_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_role_grants_for_principal(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_role_grants_for_principal_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_role_grants_for_principal failed: unknown result") + + def get_privilege_set(self, hiveObject, user_name, group_names): + """ + Parameters: + - hiveObject + - user_name + - group_names + """ + self.send_get_privilege_set(hiveObject, user_name, group_names) + return self.recv_get_privilege_set() + + def send_get_privilege_set(self, hiveObject, user_name, group_names): + self._oprot.writeMessageBegin('get_privilege_set', TMessageType.CALL, self._seqid) + args = get_privilege_set_args() + args.hiveObject = hiveObject + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_privilege_set(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_privilege_set_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_privilege_set failed: unknown result") + + def list_privileges(self, principal_name, principal_type, hiveObject): + """ + Parameters: + - principal_name + - principal_type + - hiveObject + """ + self.send_list_privileges(principal_name, principal_type, hiveObject) + return self.recv_list_privileges() + + def send_list_privileges(self, principal_name, principal_type, hiveObject): + self._oprot.writeMessageBegin('list_privileges', TMessageType.CALL, self._seqid) + args = list_privileges_args() + args.principal_name = principal_name + args.principal_type = principal_type + args.hiveObject = hiveObject + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_privileges(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = list_privileges_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_privileges failed: unknown result") + + def grant_privileges(self, privileges): + """ + Parameters: + - privileges + """ + self.send_grant_privileges(privileges) + return self.recv_grant_privileges() + + def send_grant_privileges(self, privileges): + self._oprot.writeMessageBegin('grant_privileges', TMessageType.CALL, self._seqid) + args = grant_privileges_args() + args.privileges = privileges + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_grant_privileges(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = grant_privileges_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_privileges failed: unknown result") + + def revoke_privileges(self, privileges): + """ + Parameters: + - privileges + """ + self.send_revoke_privileges(privileges) + return self.recv_revoke_privileges() + + def send_revoke_privileges(self, privileges): + self._oprot.writeMessageBegin('revoke_privileges', TMessageType.CALL, self._seqid) + args = revoke_privileges_args() + args.privileges = privileges + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_revoke_privileges(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = revoke_privileges_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result") + + def grant_revoke_privileges(self, request): + """ + Parameters: + - request + """ + self.send_grant_revoke_privileges(request) + return self.recv_grant_revoke_privileges() + + def send_grant_revoke_privileges(self, request): + self._oprot.writeMessageBegin('grant_revoke_privileges', TMessageType.CALL, self._seqid) + args = grant_revoke_privileges_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_grant_revoke_privileges(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = grant_revoke_privileges_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_revoke_privileges failed: unknown result") + + def set_ugi(self, user_name, group_names): + """ + Parameters: + - user_name + - group_names + """ + self.send_set_ugi(user_name, group_names) + return self.recv_set_ugi() + + def send_set_ugi(self, user_name, group_names): + self._oprot.writeMessageBegin('set_ugi', TMessageType.CALL, self._seqid) + args = set_ugi_args() + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_set_ugi(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = set_ugi_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "set_ugi failed: unknown result") + + def get_delegation_token(self, token_owner, renewer_kerberos_principal_name): + """ + Parameters: + - token_owner + - renewer_kerberos_principal_name + """ + self.send_get_delegation_token(token_owner, renewer_kerberos_principal_name) + return self.recv_get_delegation_token() + + def send_get_delegation_token(self, token_owner, renewer_kerberos_principal_name): + self._oprot.writeMessageBegin('get_delegation_token', TMessageType.CALL, self._seqid) + args = get_delegation_token_args() + args.token_owner = token_owner + args.renewer_kerberos_principal_name = renewer_kerberos_principal_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_delegation_token(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_delegation_token_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_delegation_token failed: unknown result") + + def renew_delegation_token(self, token_str_form): + """ + Parameters: + - token_str_form + """ + self.send_renew_delegation_token(token_str_form) + return self.recv_renew_delegation_token() + + def send_renew_delegation_token(self, token_str_form): + self._oprot.writeMessageBegin('renew_delegation_token', TMessageType.CALL, self._seqid) + args = renew_delegation_token_args() + args.token_str_form = token_str_form + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_renew_delegation_token(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = renew_delegation_token_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "renew_delegation_token failed: unknown result") + + def cancel_delegation_token(self, token_str_form): + """ + Parameters: + - token_str_form + """ + self.send_cancel_delegation_token(token_str_form) + self.recv_cancel_delegation_token() + + def send_cancel_delegation_token(self, token_str_form): + self._oprot.writeMessageBegin('cancel_delegation_token', TMessageType.CALL, self._seqid) + args = cancel_delegation_token_args() + args.token_str_form = token_str_form + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_cancel_delegation_token(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = cancel_delegation_token_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def add_token(self, token_identifier, delegation_token): + """ + Parameters: + - token_identifier + - delegation_token + """ + self.send_add_token(token_identifier, delegation_token) + return self.recv_add_token() + + def send_add_token(self, token_identifier, delegation_token): + self._oprot.writeMessageBegin('add_token', TMessageType.CALL, self._seqid) + args = add_token_args() + args.token_identifier = token_identifier + args.delegation_token = delegation_token + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_token(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_token_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_token failed: unknown result") + + def remove_token(self, token_identifier): + """ + Parameters: + - token_identifier + """ + self.send_remove_token(token_identifier) + return self.recv_remove_token() + + def send_remove_token(self, token_identifier): + self._oprot.writeMessageBegin('remove_token', TMessageType.CALL, self._seqid) + args = remove_token_args() + args.token_identifier = token_identifier + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_remove_token(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = remove_token_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "remove_token failed: unknown result") + + def get_token(self, token_identifier): + """ + Parameters: + - token_identifier + """ + self.send_get_token(token_identifier) + return self.recv_get_token() + + def send_get_token(self, token_identifier): + self._oprot.writeMessageBegin('get_token', TMessageType.CALL, self._seqid) + args = get_token_args() + args.token_identifier = token_identifier + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_token(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_token_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_token failed: unknown result") + + def get_all_token_identifiers(self): + self.send_get_all_token_identifiers() + return self.recv_get_all_token_identifiers() + + def send_get_all_token_identifiers(self): + self._oprot.writeMessageBegin('get_all_token_identifiers', TMessageType.CALL, self._seqid) + args = get_all_token_identifiers_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_all_token_identifiers(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_all_token_identifiers_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_token_identifiers failed: unknown result") + + def add_master_key(self, key): + """ + Parameters: + - key + """ + self.send_add_master_key(key) + return self.recv_add_master_key() + + def send_add_master_key(self, key): + self._oprot.writeMessageBegin('add_master_key', TMessageType.CALL, self._seqid) + args = add_master_key_args() + args.key = key + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_master_key(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_master_key_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_master_key failed: unknown result") + + def update_master_key(self, seq_number, key): + """ + Parameters: + - seq_number + - key + """ + self.send_update_master_key(seq_number, key) + self.recv_update_master_key() + + def send_update_master_key(self, seq_number, key): + self._oprot.writeMessageBegin('update_master_key', TMessageType.CALL, self._seqid) + args = update_master_key_args() + args.seq_number = seq_number + args.key = key + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_master_key(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = update_master_key_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def remove_master_key(self, key_seq): + """ + Parameters: + - key_seq + """ + self.send_remove_master_key(key_seq) + return self.recv_remove_master_key() + + def send_remove_master_key(self, key_seq): + self._oprot.writeMessageBegin('remove_master_key', TMessageType.CALL, self._seqid) + args = remove_master_key_args() + args.key_seq = key_seq + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_remove_master_key(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = remove_master_key_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "remove_master_key failed: unknown result") + + def get_master_keys(self): + self.send_get_master_keys() + return self.recv_get_master_keys() + + def send_get_master_keys(self): + self._oprot.writeMessageBegin('get_master_keys', TMessageType.CALL, self._seqid) + args = get_master_keys_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_master_keys(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_master_keys_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_master_keys failed: unknown result") + + def get_open_txns(self): + self.send_get_open_txns() + return self.recv_get_open_txns() + + def send_get_open_txns(self): + self._oprot.writeMessageBegin('get_open_txns', TMessageType.CALL, self._seqid) + args = get_open_txns_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_open_txns(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_open_txns_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_open_txns failed: unknown result") + + def get_open_txns_info(self): + self.send_get_open_txns_info() + return self.recv_get_open_txns_info() + + def send_get_open_txns_info(self): + self._oprot.writeMessageBegin('get_open_txns_info', TMessageType.CALL, self._seqid) + args = get_open_txns_info_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_open_txns_info(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_open_txns_info_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_open_txns_info failed: unknown result") + + def open_txns(self, rqst): + """ + Parameters: + - rqst + """ + self.send_open_txns(rqst) + return self.recv_open_txns() + + def send_open_txns(self, rqst): + self._oprot.writeMessageBegin('open_txns', TMessageType.CALL, self._seqid) + args = open_txns_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_open_txns(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = open_txns_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "open_txns failed: unknown result") + + def abort_txn(self, rqst): + """ + Parameters: + - rqst + """ + self.send_abort_txn(rqst) + self.recv_abort_txn() + + def send_abort_txn(self, rqst): + self._oprot.writeMessageBegin('abort_txn', TMessageType.CALL, self._seqid) + args = abort_txn_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_abort_txn(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = abort_txn_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def abort_txns(self, rqst): + """ + Parameters: + - rqst + """ + self.send_abort_txns(rqst) + self.recv_abort_txns() + + def send_abort_txns(self, rqst): + self._oprot.writeMessageBegin('abort_txns', TMessageType.CALL, self._seqid) + args = abort_txns_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_abort_txns(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = abort_txns_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + return + + def commit_txn(self, rqst): + """ + Parameters: + - rqst + """ + self.send_commit_txn(rqst) + self.recv_commit_txn() + + def send_commit_txn(self, rqst): + self._oprot.writeMessageBegin('commit_txn', TMessageType.CALL, self._seqid) + args = commit_txn_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_commit_txn(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = commit_txn_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def lock(self, rqst): + """ + Parameters: + - rqst + """ + self.send_lock(rqst) + return self.recv_lock() + + def send_lock(self, rqst): + self._oprot.writeMessageBegin('lock', TMessageType.CALL, self._seqid) + args = lock_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_lock(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = lock_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "lock failed: unknown result") + + def check_lock(self, rqst): + """ + Parameters: + - rqst + """ + self.send_check_lock(rqst) + return self.recv_check_lock() + + def send_check_lock(self, rqst): + self._oprot.writeMessageBegin('check_lock', TMessageType.CALL, self._seqid) + args = check_lock_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_check_lock(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = check_lock_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + raise TApplicationException(TApplicationException.MISSING_RESULT, "check_lock failed: unknown result") + + def unlock(self, rqst): + """ + Parameters: + - rqst + """ + self.send_unlock(rqst) + self.recv_unlock() + + def send_unlock(self, rqst): + self._oprot.writeMessageBegin('unlock', TMessageType.CALL, self._seqid) + args = unlock_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_unlock(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = unlock_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def show_locks(self, rqst): + """ + Parameters: + - rqst + """ + self.send_show_locks(rqst) + return self.recv_show_locks() + + def send_show_locks(self, rqst): + self._oprot.writeMessageBegin('show_locks', TMessageType.CALL, self._seqid) + args = show_locks_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_show_locks(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = show_locks_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "show_locks failed: unknown result") + + def heartbeat(self, ids): + """ + Parameters: + - ids + """ + self.send_heartbeat(ids) + self.recv_heartbeat() + + def send_heartbeat(self, ids): + self._oprot.writeMessageBegin('heartbeat', TMessageType.CALL, self._seqid) + args = heartbeat_args() + args.ids = ids + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_heartbeat(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = heartbeat_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + return + + def heartbeat_txn_range(self, txns): + """ + Parameters: + - txns + """ + self.send_heartbeat_txn_range(txns) + return self.recv_heartbeat_txn_range() + + def send_heartbeat_txn_range(self, txns): + self._oprot.writeMessageBegin('heartbeat_txn_range', TMessageType.CALL, self._seqid) + args = heartbeat_txn_range_args() + args.txns = txns + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_heartbeat_txn_range(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = heartbeat_txn_range_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "heartbeat_txn_range failed: unknown result") + + def compact(self, rqst): + """ + Parameters: + - rqst + """ + self.send_compact(rqst) + self.recv_compact() + + def send_compact(self, rqst): + self._oprot.writeMessageBegin('compact', TMessageType.CALL, self._seqid) + args = compact_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_compact(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = compact_result() + result.read(iprot) + iprot.readMessageEnd() + return + + def compact2(self, rqst): + """ + Parameters: + - rqst + """ + self.send_compact2(rqst) + return self.recv_compact2() + + def send_compact2(self, rqst): + self._oprot.writeMessageBegin('compact2', TMessageType.CALL, self._seqid) + args = compact2_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_compact2(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = compact2_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "compact2 failed: unknown result") + + def show_compact(self, rqst): + """ + Parameters: + - rqst + """ + self.send_show_compact(rqst) + return self.recv_show_compact() + + def send_show_compact(self, rqst): + self._oprot.writeMessageBegin('show_compact', TMessageType.CALL, self._seqid) + args = show_compact_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_show_compact(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = show_compact_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "show_compact failed: unknown result") + + def add_dynamic_partitions(self, rqst): + """ + Parameters: + - rqst + """ + self.send_add_dynamic_partitions(rqst) + self.recv_add_dynamic_partitions() + + def send_add_dynamic_partitions(self, rqst): + self._oprot.writeMessageBegin('add_dynamic_partitions', TMessageType.CALL, self._seqid) + args = add_dynamic_partitions_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_dynamic_partitions(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = add_dynamic_partitions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + return + + def get_next_notification(self, rqst): + """ + Parameters: + - rqst + """ + self.send_get_next_notification(rqst) + return self.recv_get_next_notification() + + def send_get_next_notification(self, rqst): + self._oprot.writeMessageBegin('get_next_notification', TMessageType.CALL, self._seqid) + args = get_next_notification_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_next_notification(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_next_notification_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_next_notification failed: unknown result") + + def get_current_notificationEventId(self): + self.send_get_current_notificationEventId() + return self.recv_get_current_notificationEventId() + + def send_get_current_notificationEventId(self): + self._oprot.writeMessageBegin('get_current_notificationEventId', TMessageType.CALL, self._seqid) + args = get_current_notificationEventId_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_current_notificationEventId(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_current_notificationEventId_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_current_notificationEventId failed: unknown result") + + def fire_listener_event(self, rqst): + """ + Parameters: + - rqst + """ + self.send_fire_listener_event(rqst) + return self.recv_fire_listener_event() + + def send_fire_listener_event(self, rqst): + self._oprot.writeMessageBegin('fire_listener_event', TMessageType.CALL, self._seqid) + args = fire_listener_event_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_fire_listener_event(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = fire_listener_event_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "fire_listener_event failed: unknown result") + + def flushCache(self): + self.send_flushCache() + self.recv_flushCache() + + def send_flushCache(self): + self._oprot.writeMessageBegin('flushCache', TMessageType.CALL, self._seqid) + args = flushCache_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_flushCache(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = flushCache_result() + result.read(iprot) + iprot.readMessageEnd() + return + + def cm_recycle(self, request): + """ + Parameters: + - request + """ + self.send_cm_recycle(request) + return self.recv_cm_recycle() + + def send_cm_recycle(self, request): + self._oprot.writeMessageBegin('cm_recycle', TMessageType.CALL, self._seqid) + args = cm_recycle_args() + args.request = request + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_cm_recycle(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = cm_recycle_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "cm_recycle failed: unknown result") + + def get_file_metadata_by_expr(self, req): + """ + Parameters: + - req + """ + self.send_get_file_metadata_by_expr(req) + return self.recv_get_file_metadata_by_expr() + + def send_get_file_metadata_by_expr(self, req): + self._oprot.writeMessageBegin('get_file_metadata_by_expr', TMessageType.CALL, self._seqid) + args = get_file_metadata_by_expr_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_file_metadata_by_expr(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_file_metadata_by_expr_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_file_metadata_by_expr failed: unknown result") + + def get_file_metadata(self, req): + """ + Parameters: + - req + """ + self.send_get_file_metadata(req) + return self.recv_get_file_metadata() + + def send_get_file_metadata(self, req): + self._oprot.writeMessageBegin('get_file_metadata', TMessageType.CALL, self._seqid) + args = get_file_metadata_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_file_metadata(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_file_metadata_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_file_metadata failed: unknown result") + + def put_file_metadata(self, req): + """ + Parameters: + - req + """ + self.send_put_file_metadata(req) + return self.recv_put_file_metadata() + + def send_put_file_metadata(self, req): + self._oprot.writeMessageBegin('put_file_metadata', TMessageType.CALL, self._seqid) + args = put_file_metadata_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_put_file_metadata(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = put_file_metadata_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "put_file_metadata failed: unknown result") + + def clear_file_metadata(self, req): + """ + Parameters: + - req + """ + self.send_clear_file_metadata(req) + return self.recv_clear_file_metadata() + + def send_clear_file_metadata(self, req): + self._oprot.writeMessageBegin('clear_file_metadata', TMessageType.CALL, self._seqid) + args = clear_file_metadata_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_clear_file_metadata(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = clear_file_metadata_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "clear_file_metadata failed: unknown result") + + def cache_file_metadata(self, req): + """ + Parameters: + - req + """ + self.send_cache_file_metadata(req) + return self.recv_cache_file_metadata() + + def send_cache_file_metadata(self, req): + self._oprot.writeMessageBegin('cache_file_metadata', TMessageType.CALL, self._seqid) + args = cache_file_metadata_args() + args.req = req + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_cache_file_metadata(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = cache_file_metadata_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "cache_file_metadata failed: unknown result") + + def get_metastore_db_uuid(self): + self.send_get_metastore_db_uuid() + return self.recv_get_metastore_db_uuid() + + def send_get_metastore_db_uuid(self): + self._oprot.writeMessageBegin('get_metastore_db_uuid', TMessageType.CALL, self._seqid) + args = get_metastore_db_uuid_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_metastore_db_uuid(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_metastore_db_uuid_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_metastore_db_uuid failed: unknown result") + + +class Processor(fb303.FacebookService.Processor, Iface, TProcessor): + def __init__(self, handler): + fb303.FacebookService.Processor.__init__(self, handler) + self._processMap["getMetaConf"] = Processor.process_getMetaConf + self._processMap["setMetaConf"] = Processor.process_setMetaConf + self._processMap["create_database"] = Processor.process_create_database + self._processMap["get_database"] = Processor.process_get_database + self._processMap["drop_database"] = Processor.process_drop_database + self._processMap["get_databases"] = Processor.process_get_databases + self._processMap["get_all_databases"] = Processor.process_get_all_databases + self._processMap["alter_database"] = Processor.process_alter_database + self._processMap["get_type"] = Processor.process_get_type + self._processMap["create_type"] = Processor.process_create_type + self._processMap["drop_type"] = Processor.process_drop_type + self._processMap["get_type_all"] = Processor.process_get_type_all + self._processMap["get_fields"] = Processor.process_get_fields + self._processMap["get_fields_with_environment_context"] = Processor.process_get_fields_with_environment_context + self._processMap["get_schema"] = Processor.process_get_schema + self._processMap["get_schema_with_environment_context"] = Processor.process_get_schema_with_environment_context + self._processMap["create_table"] = Processor.process_create_table + self._processMap["create_table_with_environment_context"] = Processor.process_create_table_with_environment_context + self._processMap["create_table_with_constraints"] = Processor.process_create_table_with_constraints + self._processMap["drop_constraint"] = Processor.process_drop_constraint + self._processMap["add_primary_key"] = Processor.process_add_primary_key + self._processMap["add_foreign_key"] = Processor.process_add_foreign_key + self._processMap["add_unique_constraint"] = Processor.process_add_unique_constraint + self._processMap["add_not_null_constraint"] = Processor.process_add_not_null_constraint + self._processMap["drop_table"] = Processor.process_drop_table + self._processMap["drop_table_with_environment_context"] = Processor.process_drop_table_with_environment_context + self._processMap["truncate_table"] = Processor.process_truncate_table + self._processMap["get_tables"] = Processor.process_get_tables + self._processMap["get_tables_by_type"] = Processor.process_get_tables_by_type + self._processMap["get_table_meta"] = Processor.process_get_table_meta + self._processMap["get_all_tables"] = Processor.process_get_all_tables + self._processMap["get_table"] = Processor.process_get_table + self._processMap["get_table_objects_by_name"] = Processor.process_get_table_objects_by_name + self._processMap["get_table_req"] = Processor.process_get_table_req + self._processMap["get_table_objects_by_name_req"] = Processor.process_get_table_objects_by_name_req + self._processMap["get_table_names_by_filter"] = Processor.process_get_table_names_by_filter + self._processMap["alter_table"] = Processor.process_alter_table + self._processMap["alter_table_with_environment_context"] = Processor.process_alter_table_with_environment_context + self._processMap["alter_table_with_cascade"] = Processor.process_alter_table_with_cascade + self._processMap["add_partition"] = Processor.process_add_partition + self._processMap["add_partition_with_environment_context"] = Processor.process_add_partition_with_environment_context + self._processMap["add_partitions"] = Processor.process_add_partitions + self._processMap["add_partitions_pspec"] = Processor.process_add_partitions_pspec + self._processMap["append_partition"] = Processor.process_append_partition + self._processMap["add_partitions_req"] = Processor.process_add_partitions_req + self._processMap["append_partition_with_environment_context"] = Processor.process_append_partition_with_environment_context + self._processMap["append_partition_by_name"] = Processor.process_append_partition_by_name + self._processMap["append_partition_by_name_with_environment_context"] = Processor.process_append_partition_by_name_with_environment_context + self._processMap["drop_partition"] = Processor.process_drop_partition + self._processMap["drop_partition_with_environment_context"] = Processor.process_drop_partition_with_environment_context + self._processMap["drop_partition_by_name"] = Processor.process_drop_partition_by_name + self._processMap["drop_partition_by_name_with_environment_context"] = Processor.process_drop_partition_by_name_with_environment_context + self._processMap["drop_partitions_req"] = Processor.process_drop_partitions_req + self._processMap["get_partition"] = Processor.process_get_partition + self._processMap["exchange_partition"] = Processor.process_exchange_partition + self._processMap["exchange_partitions"] = Processor.process_exchange_partitions + self._processMap["get_partition_with_auth"] = Processor.process_get_partition_with_auth + self._processMap["get_partition_by_name"] = Processor.process_get_partition_by_name + self._processMap["get_partitions"] = Processor.process_get_partitions + self._processMap["get_partitions_with_auth"] = Processor.process_get_partitions_with_auth + self._processMap["get_partitions_pspec"] = Processor.process_get_partitions_pspec + self._processMap["get_partition_names"] = Processor.process_get_partition_names + self._processMap["get_partitions_ps"] = Processor.process_get_partitions_ps + self._processMap["get_partitions_ps_with_auth"] = Processor.process_get_partitions_ps_with_auth + self._processMap["get_partition_names_ps"] = Processor.process_get_partition_names_ps + self._processMap["get_partitions_by_filter"] = Processor.process_get_partitions_by_filter + self._processMap["get_part_specs_by_filter"] = Processor.process_get_part_specs_by_filter + self._processMap["get_partitions_by_expr"] = Processor.process_get_partitions_by_expr + self._processMap["get_num_partitions_by_filter"] = Processor.process_get_num_partitions_by_filter + self._processMap["get_partitions_by_names"] = Processor.process_get_partitions_by_names + self._processMap["alter_partition"] = Processor.process_alter_partition + self._processMap["alter_partitions"] = Processor.process_alter_partitions + self._processMap["alter_partitions_with_environment_context"] = Processor.process_alter_partitions_with_environment_context + self._processMap["alter_partition_with_environment_context"] = Processor.process_alter_partition_with_environment_context + self._processMap["rename_partition"] = Processor.process_rename_partition + self._processMap["partition_name_has_valid_characters"] = Processor.process_partition_name_has_valid_characters + self._processMap["get_config_value"] = Processor.process_get_config_value + self._processMap["partition_name_to_vals"] = Processor.process_partition_name_to_vals + self._processMap["partition_name_to_spec"] = Processor.process_partition_name_to_spec + self._processMap["markPartitionForEvent"] = Processor.process_markPartitionForEvent + self._processMap["isPartitionMarkedForEvent"] = Processor.process_isPartitionMarkedForEvent + self._processMap["add_index"] = Processor.process_add_index + self._processMap["alter_index"] = Processor.process_alter_index + self._processMap["drop_index_by_name"] = Processor.process_drop_index_by_name + self._processMap["get_index_by_name"] = Processor.process_get_index_by_name + self._processMap["get_indexes"] = Processor.process_get_indexes + self._processMap["get_index_names"] = Processor.process_get_index_names + self._processMap["get_primary_keys"] = Processor.process_get_primary_keys + self._processMap["get_foreign_keys"] = Processor.process_get_foreign_keys + self._processMap["get_unique_constraints"] = Processor.process_get_unique_constraints + self._processMap["get_not_null_constraints"] = Processor.process_get_not_null_constraints + self._processMap["update_table_column_statistics"] = Processor.process_update_table_column_statistics + self._processMap["update_partition_column_statistics"] = Processor.process_update_partition_column_statistics + self._processMap["get_table_column_statistics"] = Processor.process_get_table_column_statistics + self._processMap["get_partition_column_statistics"] = Processor.process_get_partition_column_statistics + self._processMap["get_table_statistics_req"] = Processor.process_get_table_statistics_req + self._processMap["get_partitions_statistics_req"] = Processor.process_get_partitions_statistics_req + self._processMap["get_aggr_stats_for"] = Processor.process_get_aggr_stats_for + self._processMap["set_aggr_stats_for"] = Processor.process_set_aggr_stats_for + self._processMap["delete_partition_column_statistics"] = Processor.process_delete_partition_column_statistics + self._processMap["delete_table_column_statistics"] = Processor.process_delete_table_column_statistics + self._processMap["create_function"] = Processor.process_create_function + self._processMap["drop_function"] = Processor.process_drop_function + self._processMap["alter_function"] = Processor.process_alter_function + self._processMap["get_functions"] = Processor.process_get_functions + self._processMap["get_function"] = Processor.process_get_function + self._processMap["get_all_functions"] = Processor.process_get_all_functions + self._processMap["create_role"] = Processor.process_create_role + self._processMap["drop_role"] = Processor.process_drop_role + self._processMap["get_role_names"] = Processor.process_get_role_names + self._processMap["grant_role"] = Processor.process_grant_role + self._processMap["revoke_role"] = Processor.process_revoke_role + self._processMap["list_roles"] = Processor.process_list_roles + self._processMap["grant_revoke_role"] = Processor.process_grant_revoke_role + self._processMap["get_principals_in_role"] = Processor.process_get_principals_in_role + self._processMap["get_role_grants_for_principal"] = Processor.process_get_role_grants_for_principal + self._processMap["get_privilege_set"] = Processor.process_get_privilege_set + self._processMap["list_privileges"] = Processor.process_list_privileges + self._processMap["grant_privileges"] = Processor.process_grant_privileges + self._processMap["revoke_privileges"] = Processor.process_revoke_privileges + self._processMap["grant_revoke_privileges"] = Processor.process_grant_revoke_privileges + self._processMap["set_ugi"] = Processor.process_set_ugi + self._processMap["get_delegation_token"] = Processor.process_get_delegation_token + self._processMap["renew_delegation_token"] = Processor.process_renew_delegation_token + self._processMap["cancel_delegation_token"] = Processor.process_cancel_delegation_token + self._processMap["add_token"] = Processor.process_add_token + self._processMap["remove_token"] = Processor.process_remove_token + self._processMap["get_token"] = Processor.process_get_token + self._processMap["get_all_token_identifiers"] = Processor.process_get_all_token_identifiers + self._processMap["add_master_key"] = Processor.process_add_master_key + self._processMap["update_master_key"] = Processor.process_update_master_key + self._processMap["remove_master_key"] = Processor.process_remove_master_key + self._processMap["get_master_keys"] = Processor.process_get_master_keys + self._processMap["get_open_txns"] = Processor.process_get_open_txns + self._processMap["get_open_txns_info"] = Processor.process_get_open_txns_info + self._processMap["open_txns"] = Processor.process_open_txns + self._processMap["abort_txn"] = Processor.process_abort_txn + self._processMap["abort_txns"] = Processor.process_abort_txns + self._processMap["commit_txn"] = Processor.process_commit_txn + self._processMap["lock"] = Processor.process_lock + self._processMap["check_lock"] = Processor.process_check_lock + self._processMap["unlock"] = Processor.process_unlock + self._processMap["show_locks"] = Processor.process_show_locks + self._processMap["heartbeat"] = Processor.process_heartbeat + self._processMap["heartbeat_txn_range"] = Processor.process_heartbeat_txn_range + self._processMap["compact"] = Processor.process_compact + self._processMap["compact2"] = Processor.process_compact2 + self._processMap["show_compact"] = Processor.process_show_compact + self._processMap["add_dynamic_partitions"] = Processor.process_add_dynamic_partitions + self._processMap["get_next_notification"] = Processor.process_get_next_notification + self._processMap["get_current_notificationEventId"] = Processor.process_get_current_notificationEventId + self._processMap["fire_listener_event"] = Processor.process_fire_listener_event + self._processMap["flushCache"] = Processor.process_flushCache + self._processMap["cm_recycle"] = Processor.process_cm_recycle + self._processMap["get_file_metadata_by_expr"] = Processor.process_get_file_metadata_by_expr + self._processMap["get_file_metadata"] = Processor.process_get_file_metadata + self._processMap["put_file_metadata"] = Processor.process_put_file_metadata + self._processMap["clear_file_metadata"] = Processor.process_clear_file_metadata + self._processMap["cache_file_metadata"] = Processor.process_cache_file_metadata + self._processMap["get_metastore_db_uuid"] = Processor.process_get_metastore_db_uuid + + def process(self, iprot, oprot): + (name, type, seqid) = iprot.readMessageBegin() + if name not in self._processMap: + iprot.skip(TType.STRUCT) + iprot.readMessageEnd() + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) + oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) + x.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + return + else: + self._processMap[name](self, seqid, iprot, oprot) + return True + + def process_getMetaConf(self, seqid, iprot, oprot): + args = getMetaConf_args() + args.read(iprot) + iprot.readMessageEnd() + result = getMetaConf_result() + try: + result.success = self._handler.getMetaConf(args.key) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getMetaConf", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_setMetaConf(self, seqid, iprot, oprot): + args = setMetaConf_args() + args.read(iprot) + iprot.readMessageEnd() + result = setMetaConf_result() + try: + self._handler.setMetaConf(args.key, args.value) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("setMetaConf", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_database(self, seqid, iprot, oprot): + args = create_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_database_result() + try: + self._handler.create_database(args.database) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("create_database", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_database(self, seqid, iprot, oprot): + args = get_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_database_result() + try: + result.success = self._handler.get_database(args.name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_database", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_database(self, seqid, iprot, oprot): + args = drop_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_database_result() + try: + self._handler.drop_database(args.name, args.deleteData, args.cascade) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_database", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_databases(self, seqid, iprot, oprot): + args = get_databases_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_databases_result() + try: + result.success = self._handler.get_databases(args.pattern) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_databases", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_databases(self, seqid, iprot, oprot): + args = get_all_databases_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_databases_result() + try: + result.success = self._handler.get_all_databases() + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_all_databases", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_database(self, seqid, iprot, oprot): + args = alter_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_database_result() + try: + self._handler.alter_database(args.dbname, args.db) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("alter_database", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_type(self, seqid, iprot, oprot): + args = get_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_type_result() + try: + result.success = self._handler.get_type(args.name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_type", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_type(self, seqid, iprot, oprot): + args = create_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_type_result() + try: + result.success = self._handler.create_type(args.type) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("create_type", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_type(self, seqid, iprot, oprot): + args = drop_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_type_result() + try: + result.success = self._handler.drop_type(args.type) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_type", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_type_all(self, seqid, iprot, oprot): + args = get_type_all_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_type_all_result() + try: + result.success = self._handler.get_type_all(args.name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_type_all", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_fields(self, seqid, iprot, oprot): + args = get_fields_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_fields_result() + try: + result.success = self._handler.get_fields(args.db_name, args.table_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except UnknownTableException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_fields", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_fields_with_environment_context(self, seqid, iprot, oprot): + args = get_fields_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_fields_with_environment_context_result() + try: + result.success = self._handler.get_fields_with_environment_context(args.db_name, args.table_name, args.environment_context) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except UnknownTableException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_fields_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schema(self, seqid, iprot, oprot): + args = get_schema_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schema_result() + try: + result.success = self._handler.get_schema(args.db_name, args.table_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except UnknownTableException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_schema", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schema_with_environment_context(self, seqid, iprot, oprot): + args = get_schema_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schema_with_environment_context_result() + try: + result.success = self._handler.get_schema_with_environment_context(args.db_name, args.table_name, args.environment_context) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except UnknownTableException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_schema_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_table(self, seqid, iprot, oprot): + args = create_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_table_result() + try: + self._handler.create_table(args.tbl) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except NoSuchObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("create_table", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_table_with_environment_context(self, seqid, iprot, oprot): + args = create_table_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_table_with_environment_context_result() + try: + self._handler.create_table_with_environment_context(args.tbl, args.environment_context) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except NoSuchObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("create_table_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_table_with_constraints(self, seqid, iprot, oprot): + args = create_table_with_constraints_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_table_with_constraints_result() + try: + self._handler.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys, args.uniqueConstraints, args.notNullConstraints) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except NoSuchObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("create_table_with_constraints", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_constraint(self, seqid, iprot, oprot): + args = drop_constraint_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_constraint_result() + try: + self._handler.drop_constraint(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_constraint", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_primary_key(self, seqid, iprot, oprot): + args = add_primary_key_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_primary_key_result() + try: + self._handler.add_primary_key(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_primary_key", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_foreign_key(self, seqid, iprot, oprot): + args = add_foreign_key_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_foreign_key_result() + try: + self._handler.add_foreign_key(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_foreign_key", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_unique_constraint(self, seqid, iprot, oprot): + args = add_unique_constraint_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_unique_constraint_result() + try: + self._handler.add_unique_constraint(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_unique_constraint", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_not_null_constraint(self, seqid, iprot, oprot): + args = add_not_null_constraint_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_not_null_constraint_result() + try: + self._handler.add_not_null_constraint(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_not_null_constraint", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_table(self, seqid, iprot, oprot): + args = drop_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_table_result() + try: + self._handler.drop_table(args.dbname, args.name, args.deleteData) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_table", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_table_with_environment_context(self, seqid, iprot, oprot): + args = drop_table_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_table_with_environment_context_result() + try: + self._handler.drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_table_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_truncate_table(self, seqid, iprot, oprot): + args = truncate_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = truncate_table_result() + try: + self._handler.truncate_table(args.dbName, args.tableName, args.partNames) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("truncate_table", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_tables(self, seqid, iprot, oprot): + args = get_tables_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_tables_result() + try: + result.success = self._handler.get_tables(args.db_name, args.pattern) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_tables", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_tables_by_type(self, seqid, iprot, oprot): + args = get_tables_by_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_tables_by_type_result() + try: + result.success = self._handler.get_tables_by_type(args.db_name, args.pattern, args.tableType) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_tables_by_type", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_meta(self, seqid, iprot, oprot): + args = get_table_meta_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_meta_result() + try: + result.success = self._handler.get_table_meta(args.db_patterns, args.tbl_patterns, args.tbl_types) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_table_meta", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_tables(self, seqid, iprot, oprot): + args = get_all_tables_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_tables_result() + try: + result.success = self._handler.get_all_tables(args.db_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_all_tables", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table(self, seqid, iprot, oprot): + args = get_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_result() + try: + result.success = self._handler.get_table(args.dbname, args.tbl_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_table", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_objects_by_name(self, seqid, iprot, oprot): + args = get_table_objects_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_objects_by_name_result() + try: + result.success = self._handler.get_table_objects_by_name(args.dbname, args.tbl_names) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_table_objects_by_name", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_req(self, seqid, iprot, oprot): + args = get_table_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_req_result() + try: + result.success = self._handler.get_table_req(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_table_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_objects_by_name_req(self, seqid, iprot, oprot): + args = get_table_objects_by_name_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_objects_by_name_req_result() + try: + result.success = self._handler.get_table_objects_by_name_req(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_table_objects_by_name_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_names_by_filter(self, seqid, iprot, oprot): + args = get_table_names_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_names_by_filter_result() + try: + result.success = self._handler.get_table_names_by_filter(args.dbname, args.filter, args.max_tables) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidOperationException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_table_names_by_filter", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_table(self, seqid, iprot, oprot): + args = alter_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_table_result() + try: + self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("alter_table", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_table_with_environment_context(self, seqid, iprot, oprot): + args = alter_table_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + 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) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("alter_table_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_table_with_cascade(self, seqid, iprot, oprot): + args = alter_table_with_cascade_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_table_with_cascade_result() + try: + self._handler.alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("alter_table_with_cascade", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partition(self, seqid, iprot, oprot): + args = add_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partition_result() + try: + result.success = self._handler.add_partition(args.new_part) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partition_with_environment_context(self, seqid, iprot, oprot): + args = add_partition_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partition_with_environment_context_result() + try: + result.success = self._handler.add_partition_with_environment_context(args.new_part, args.environment_context) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_partition_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partitions(self, seqid, iprot, oprot): + args = add_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partitions_result() + try: + result.success = self._handler.add_partitions(args.new_parts) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_partitions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partitions_pspec(self, seqid, iprot, oprot): + args = add_partitions_pspec_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partitions_pspec_result() + try: + result.success = self._handler.add_partitions_pspec(args.new_parts) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_partitions_pspec", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition(self, seqid, iprot, oprot): + args = append_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_result() + try: + result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("append_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partitions_req(self, seqid, iprot, oprot): + args = add_partitions_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partitions_req_result() + try: + result.success = self._handler.add_partitions_req(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_partitions_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition_with_environment_context(self, seqid, iprot, oprot): + args = append_partition_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_with_environment_context_result() + try: + result.success = self._handler.append_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.environment_context) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("append_partition_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition_by_name(self, seqid, iprot, oprot): + args = append_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_by_name_result() + try: + result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("append_partition_by_name", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition_by_name_with_environment_context(self, seqid, iprot, oprot): + args = append_partition_by_name_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_by_name_with_environment_context_result() + try: + result.success = self._handler.append_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.environment_context) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("append_partition_by_name_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition(self, seqid, iprot, oprot): + args = drop_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_result() + try: + result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition_with_environment_context(self, seqid, iprot, oprot): + args = drop_partition_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_with_environment_context_result() + try: + result.success = self._handler.drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_partition_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition_by_name(self, seqid, iprot, oprot): + args = drop_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + 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) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_partition_by_name", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition_by_name_with_environment_context(self, seqid, iprot, oprot): + args = drop_partition_by_name_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_by_name_with_environment_context_result() + try: + result.success = self._handler.drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_partition_by_name_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partitions_req(self, seqid, iprot, oprot): + args = drop_partitions_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partitions_req_result() + try: + result.success = self._handler.drop_partitions_req(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_partitions_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition(self, seqid, iprot, oprot): + args = get_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_result() + try: + result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_exchange_partition(self, seqid, iprot, oprot): + args = exchange_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = exchange_partition_result() + try: + result.success = self._handler.exchange_partition(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("exchange_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_exchange_partitions(self, seqid, iprot, oprot): + args = exchange_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = exchange_partitions_result() + try: + result.success = self._handler.exchange_partitions(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("exchange_partitions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_with_auth(self, seqid, iprot, oprot): + args = get_partition_with_auth_args() + args.read(iprot) + iprot.readMessageEnd() + 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) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partition_with_auth", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_by_name(self, seqid, iprot, oprot): + args = get_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_by_name_result() + try: + result.success = self._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partition_by_name", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions(self, seqid, iprot, oprot): + args = get_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_result() + try: + result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partitions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_with_auth(self, seqid, iprot, oprot): + args = get_partitions_with_auth_args() + args.read(iprot) + iprot.readMessageEnd() + 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) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partitions_with_auth", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_pspec(self, seqid, iprot, oprot): + args = get_partitions_pspec_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_pspec_result() + try: + result.success = self._handler.get_partitions_pspec(args.db_name, args.tbl_name, args.max_parts) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partitions_pspec", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_names(self, seqid, iprot, oprot): + args = get_partition_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_names_result() + try: + result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partition_names", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_ps(self, seqid, iprot, oprot): + args = get_partitions_ps_args() + args.read(iprot) + iprot.readMessageEnd() + 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) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partitions_ps", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_ps_with_auth(self, seqid, iprot, oprot): + args = get_partitions_ps_with_auth_args() + args.read(iprot) + iprot.readMessageEnd() + 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) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partitions_ps_with_auth", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_names_ps(self, seqid, iprot, oprot): + args = get_partition_names_ps_args() + args.read(iprot) + iprot.readMessageEnd() + 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) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partition_names_ps", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_by_filter(self, seqid, iprot, oprot): + args = get_partitions_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + 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) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partitions_by_filter", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_part_specs_by_filter(self, seqid, iprot, oprot): + args = get_part_specs_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_part_specs_by_filter_result() + try: + result.success = self._handler.get_part_specs_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_part_specs_by_filter", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_by_expr(self, seqid, iprot, oprot): + args = get_partitions_by_expr_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_by_expr_result() + try: + result.success = self._handler.get_partitions_by_expr(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partitions_by_expr", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_num_partitions_by_filter(self, seqid, iprot, oprot): + args = get_num_partitions_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_num_partitions_by_filter_result() + try: + result.success = self._handler.get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_num_partitions_by_filter", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_by_names(self, seqid, iprot, oprot): + args = get_partitions_by_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_by_names_result() + try: + result.success = self._handler.get_partitions_by_names(args.db_name, args.tbl_name, args.names) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partitions_by_names", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_partition(self, seqid, iprot, oprot): + args = alter_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_partition_result() + try: + self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("alter_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_partitions(self, seqid, iprot, oprot): + args = alter_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_partitions_result() + try: + self._handler.alter_partitions(args.db_name, args.tbl_name, args.new_parts) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("alter_partitions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_partitions_with_environment_context(self, seqid, iprot, oprot): + args = alter_partitions_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_partitions_with_environment_context_result() + try: + self._handler.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("alter_partitions_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_partition_with_environment_context(self, seqid, iprot, oprot): + args = alter_partition_with_environment_context_args() + args.read(iprot) + iprot.readMessageEnd() + 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) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("alter_partition_with_environment_context", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_rename_partition(self, seqid, iprot, oprot): + args = rename_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = rename_partition_result() + try: + self._handler.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("rename_partition", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_partition_name_has_valid_characters(self, seqid, iprot, oprot): + args = partition_name_has_valid_characters_args() + args.read(iprot) + iprot.readMessageEnd() + result = partition_name_has_valid_characters_result() + try: + result.success = self._handler.partition_name_has_valid_characters(args.part_vals, args.throw_exception) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("partition_name_has_valid_characters", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_config_value(self, seqid, iprot, oprot): + args = get_config_value_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_config_value_result() + try: + result.success = self._handler.get_config_value(args.name, args.defaultValue) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except ConfigValSecurityException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_config_value", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_partition_name_to_vals(self, seqid, iprot, oprot): + args = partition_name_to_vals_args() + args.read(iprot) + iprot.readMessageEnd() + result = partition_name_to_vals_result() + try: + result.success = self._handler.partition_name_to_vals(args.part_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("partition_name_to_vals", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_partition_name_to_spec(self, seqid, iprot, oprot): + args = partition_name_to_spec_args() + args.read(iprot) + iprot.readMessageEnd() + result = partition_name_to_spec_result() + try: + result.success = self._handler.partition_name_to_spec(args.part_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("partition_name_to_spec", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_markPartitionForEvent(self, seqid, iprot, oprot): + args = markPartitionForEvent_args() + args.read(iprot) + iprot.readMessageEnd() + result = markPartitionForEvent_result() + try: + self._handler.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except UnknownTableException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except UnknownPartitionException as o5: + msg_type = TMessageType.REPLY + result.o5 = o5 + except InvalidPartitionException as o6: + msg_type = TMessageType.REPLY + result.o6 = o6 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("markPartitionForEvent", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_isPartitionMarkedForEvent(self, seqid, iprot, oprot): + args = isPartitionMarkedForEvent_args() + args.read(iprot) + iprot.readMessageEnd() + result = isPartitionMarkedForEvent_result() + try: + result.success = self._handler.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except UnknownDBException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except UnknownTableException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except UnknownPartitionException as o5: + msg_type = TMessageType.REPLY + result.o5 = o5 + except InvalidPartitionException as o6: + msg_type = TMessageType.REPLY + result.o6 = o6 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("isPartitionMarkedForEvent", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_index(self, seqid, iprot, oprot): + args = add_index_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_index_result() + try: + result.success = self._handler.add_index(args.new_index, args.index_table) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except AlreadyExistsException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_index", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_index(self, seqid, iprot, oprot): + args = alter_index_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_index_result() + try: + self._handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("alter_index", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_index_by_name(self, seqid, iprot, oprot): + args = drop_index_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + 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) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_index_by_name", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_index_by_name(self, seqid, iprot, oprot): + args = get_index_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_index_by_name_result() + try: + result.success = self._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_index_by_name", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_indexes(self, seqid, iprot, oprot): + args = get_indexes_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_indexes_result() + try: + result.success = self._handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_indexes", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_index_names(self, seqid, iprot, oprot): + args = get_index_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_index_names_result() + try: + result.success = self._handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_index_names", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_primary_keys(self, seqid, iprot, oprot): + args = get_primary_keys_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_primary_keys_result() + try: + result.success = self._handler.get_primary_keys(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_primary_keys", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_foreign_keys(self, seqid, iprot, oprot): + args = get_foreign_keys_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_foreign_keys_result() + try: + result.success = self._handler.get_foreign_keys(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_foreign_keys", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_unique_constraints(self, seqid, iprot, oprot): + args = get_unique_constraints_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_unique_constraints_result() + try: + result.success = self._handler.get_unique_constraints(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_unique_constraints", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_not_null_constraints(self, seqid, iprot, oprot): + args = get_not_null_constraints_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_not_null_constraints_result() + try: + result.success = self._handler.get_not_null_constraints(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_not_null_constraints", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_table_column_statistics(self, seqid, iprot, oprot): + args = update_table_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_table_column_statistics_result() + try: + result.success = self._handler.update_table_column_statistics(args.stats_obj) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("update_table_column_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_partition_column_statistics(self, seqid, iprot, oprot): + args = update_partition_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_partition_column_statistics_result() + try: + result.success = self._handler.update_partition_column_statistics(args.stats_obj) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("update_partition_column_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_column_statistics(self, seqid, iprot, oprot): + args = get_table_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_column_statistics_result() + try: + result.success = self._handler.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidInputException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_table_column_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_column_statistics(self, seqid, iprot, oprot): + args = get_partition_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_column_statistics_result() + try: + result.success = self._handler.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidInputException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partition_column_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_statistics_req(self, seqid, iprot, oprot): + args = get_table_statistics_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_statistics_req_result() + try: + result.success = self._handler.get_table_statistics_req(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_table_statistics_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_statistics_req(self, seqid, iprot, oprot): + args = get_partitions_statistics_req_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_statistics_req_result() + try: + result.success = self._handler.get_partitions_statistics_req(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_partitions_statistics_req", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_aggr_stats_for(self, seqid, iprot, oprot): + args = get_aggr_stats_for_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_aggr_stats_for_result() + try: + result.success = self._handler.get_aggr_stats_for(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_aggr_stats_for", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_set_aggr_stats_for(self, seqid, iprot, oprot): + args = set_aggr_stats_for_args() + args.read(iprot) + iprot.readMessageEnd() + result = set_aggr_stats_for_result() + try: + result.success = self._handler.set_aggr_stats_for(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("set_aggr_stats_for", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_delete_partition_column_statistics(self, seqid, iprot, oprot): + args = delete_partition_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = delete_partition_column_statistics_result() + try: + result.success = self._handler.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("delete_partition_column_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_delete_table_column_statistics(self, seqid, iprot, oprot): + args = delete_table_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = delete_table_column_statistics_result() + try: + result.success = self._handler.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except InvalidObjectException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except InvalidInputException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("delete_table_column_statistics", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_function(self, seqid, iprot, oprot): + args = create_function_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_function_result() + try: + self._handler.create_function(args.func) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except AlreadyExistsException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except InvalidObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except NoSuchObjectException as o4: + msg_type = TMessageType.REPLY + result.o4 = o4 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("create_function", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_function(self, seqid, iprot, oprot): + args = drop_function_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_function_result() + try: + self._handler.drop_function(args.dbName, args.funcName) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_function", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_function(self, seqid, iprot, oprot): + args = alter_function_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_function_result() + try: + self._handler.alter_function(args.dbName, args.funcName, args.newFunc) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except InvalidOperationException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("alter_function", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_functions(self, seqid, iprot, oprot): + args = get_functions_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_functions_result() + try: + result.success = self._handler.get_functions(args.dbName, args.pattern) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_functions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_function(self, seqid, iprot, oprot): + args = get_function_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_function_result() + try: + result.success = self._handler.get_function(args.dbName, args.funcName) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchObjectException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_function", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_functions(self, seqid, iprot, oprot): + args = get_all_functions_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_functions_result() + try: + result.success = self._handler.get_all_functions() + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_all_functions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_role(self, seqid, iprot, oprot): + args = create_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_role_result() + try: + result.success = self._handler.create_role(args.role) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("create_role", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_role(self, seqid, iprot, oprot): + args = drop_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_role_result() + try: + result.success = self._handler.drop_role(args.role_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("drop_role", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_role_names(self, seqid, iprot, oprot): + args = get_role_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_role_names_result() + try: + result.success = self._handler.get_role_names() + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_role_names", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_grant_role(self, seqid, iprot, oprot): + args = grant_role_args() + args.read(iprot) + iprot.readMessageEnd() + 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) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("grant_role", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_revoke_role(self, seqid, iprot, oprot): + args = revoke_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = revoke_role_result() + try: + result.success = self._handler.revoke_role(args.role_name, args.principal_name, args.principal_type) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("revoke_role", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_roles(self, seqid, iprot, oprot): + args = list_roles_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_roles_result() + try: + result.success = self._handler.list_roles(args.principal_name, args.principal_type) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("list_roles", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_grant_revoke_role(self, seqid, iprot, oprot): + args = grant_revoke_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = grant_revoke_role_result() + try: + result.success = self._handler.grant_revoke_role(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("grant_revoke_role", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_principals_in_role(self, seqid, iprot, oprot): + args = get_principals_in_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_principals_in_role_result() + try: + result.success = self._handler.get_principals_in_role(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_principals_in_role", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_role_grants_for_principal(self, seqid, iprot, oprot): + args = get_role_grants_for_principal_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_role_grants_for_principal_result() + try: + result.success = self._handler.get_role_grants_for_principal(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_role_grants_for_principal", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_privilege_set(self, seqid, iprot, oprot): + args = get_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_privilege_set_result() + try: + result.success = self._handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_privilege_set", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_privileges(self, seqid, iprot, oprot): + args = list_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_privileges_result() + try: + result.success = self._handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("list_privileges", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_grant_privileges(self, seqid, iprot, oprot): + args = grant_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = grant_privileges_result() + try: + result.success = self._handler.grant_privileges(args.privileges) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("grant_privileges", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_revoke_privileges(self, seqid, iprot, oprot): + args = revoke_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = revoke_privileges_result() + try: + result.success = self._handler.revoke_privileges(args.privileges) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("revoke_privileges", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_grant_revoke_privileges(self, seqid, iprot, oprot): + args = grant_revoke_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = grant_revoke_privileges_result() + try: + result.success = self._handler.grant_revoke_privileges(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("grant_revoke_privileges", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_set_ugi(self, seqid, iprot, oprot): + args = set_ugi_args() + args.read(iprot) + iprot.readMessageEnd() + result = set_ugi_result() + try: + result.success = self._handler.set_ugi(args.user_name, args.group_names) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("set_ugi", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_delegation_token(self, seqid, iprot, oprot): + args = get_delegation_token_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_delegation_token_result() + try: + result.success = self._handler.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_delegation_token", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_renew_delegation_token(self, seqid, iprot, oprot): + args = renew_delegation_token_args() + args.read(iprot) + iprot.readMessageEnd() + result = renew_delegation_token_result() + try: + result.success = self._handler.renew_delegation_token(args.token_str_form) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("renew_delegation_token", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_cancel_delegation_token(self, seqid, iprot, oprot): + args = cancel_delegation_token_args() + args.read(iprot) + iprot.readMessageEnd() + result = cancel_delegation_token_result() + try: + self._handler.cancel_delegation_token(args.token_str_form) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("cancel_delegation_token", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_token(self, seqid, iprot, oprot): + args = add_token_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_token_result() + try: + result.success = self._handler.add_token(args.token_identifier, args.delegation_token) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_token", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_remove_token(self, seqid, iprot, oprot): + args = remove_token_args() + args.read(iprot) + iprot.readMessageEnd() + result = remove_token_result() + try: + result.success = self._handler.remove_token(args.token_identifier) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("remove_token", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_token(self, seqid, iprot, oprot): + args = get_token_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_token_result() + try: + result.success = self._handler.get_token(args.token_identifier) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_token", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_token_identifiers(self, seqid, iprot, oprot): + args = get_all_token_identifiers_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_token_identifiers_result() + try: + result.success = self._handler.get_all_token_identifiers() + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_all_token_identifiers", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_master_key(self, seqid, iprot, oprot): + args = add_master_key_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_master_key_result() + try: + result.success = self._handler.add_master_key(args.key) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_master_key", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_master_key(self, seqid, iprot, oprot): + args = update_master_key_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_master_key_result() + try: + self._handler.update_master_key(args.seq_number, args.key) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchObjectException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except MetaException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("update_master_key", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_remove_master_key(self, seqid, iprot, oprot): + args = remove_master_key_args() + args.read(iprot) + iprot.readMessageEnd() + result = remove_master_key_result() + try: + result.success = self._handler.remove_master_key(args.key_seq) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("remove_master_key", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_master_keys(self, seqid, iprot, oprot): + args = get_master_keys_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_master_keys_result() + try: + result.success = self._handler.get_master_keys() + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_master_keys", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_open_txns(self, seqid, iprot, oprot): + args = get_open_txns_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_open_txns_result() + try: + result.success = self._handler.get_open_txns() + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_open_txns", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_open_txns_info(self, seqid, iprot, oprot): + args = get_open_txns_info_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_open_txns_info_result() + try: + result.success = self._handler.get_open_txns_info() + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_open_txns_info", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_open_txns(self, seqid, iprot, oprot): + args = open_txns_args() + args.read(iprot) + iprot.readMessageEnd() + result = open_txns_result() + try: + result.success = self._handler.open_txns(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("open_txns", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_abort_txn(self, seqid, iprot, oprot): + args = abort_txn_args() + args.read(iprot) + iprot.readMessageEnd() + result = abort_txn_result() + try: + self._handler.abort_txn(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("abort_txn", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_abort_txns(self, seqid, iprot, oprot): + args = abort_txns_args() + args.read(iprot) + iprot.readMessageEnd() + result = abort_txns_result() + try: + self._handler.abort_txns(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("abort_txns", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_commit_txn(self, seqid, iprot, oprot): + args = commit_txn_args() + args.read(iprot) + iprot.readMessageEnd() + result = commit_txn_result() + try: + self._handler.commit_txn(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TxnAbortedException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("commit_txn", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_lock(self, seqid, iprot, oprot): + args = lock_args() + args.read(iprot) + iprot.readMessageEnd() + result = lock_result() + try: + result.success = self._handler.lock(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TxnAbortedException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("lock", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_check_lock(self, seqid, iprot, oprot): + args = check_lock_args() + args.read(iprot) + iprot.readMessageEnd() + result = check_lock_result() + try: + result.success = self._handler.check_lock(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TxnAbortedException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except NoSuchLockException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("check_lock", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_unlock(self, seqid, iprot, oprot): + args = unlock_args() + args.read(iprot) + iprot.readMessageEnd() + result = unlock_result() + try: + self._handler.unlock(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchLockException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TxnOpenException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("unlock", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_show_locks(self, seqid, iprot, oprot): + args = show_locks_args() + args.read(iprot) + iprot.readMessageEnd() + result = show_locks_result() + try: + result.success = self._handler.show_locks(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("show_locks", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_heartbeat(self, seqid, iprot, oprot): + args = heartbeat_args() + args.read(iprot) + iprot.readMessageEnd() + result = heartbeat_result() + try: + self._handler.heartbeat(args.ids) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchLockException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except NoSuchTxnException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except TxnAbortedException as o3: + msg_type = TMessageType.REPLY + result.o3 = o3 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("heartbeat", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_heartbeat_txn_range(self, seqid, iprot, oprot): + args = heartbeat_txn_range_args() + args.read(iprot) + iprot.readMessageEnd() + result = heartbeat_txn_range_result() + try: + result.success = self._handler.heartbeat_txn_range(args.txns) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("heartbeat_txn_range", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_compact(self, seqid, iprot, oprot): + args = compact_args() + args.read(iprot) + iprot.readMessageEnd() + result = compact_result() + try: + self._handler.compact(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("compact", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_compact2(self, seqid, iprot, oprot): + args = compact2_args() + args.read(iprot) + iprot.readMessageEnd() + result = compact2_result() + try: + result.success = self._handler.compact2(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("compact2", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_show_compact(self, seqid, iprot, oprot): + args = show_compact_args() + args.read(iprot) + iprot.readMessageEnd() + result = show_compact_result() + try: + result.success = self._handler.show_compact(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("show_compact", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_dynamic_partitions(self, seqid, iprot, oprot): + args = add_dynamic_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_dynamic_partitions_result() + try: + self._handler.add_dynamic_partitions(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except NoSuchTxnException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except TxnAbortedException as o2: + msg_type = TMessageType.REPLY + result.o2 = o2 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("add_dynamic_partitions", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_next_notification(self, seqid, iprot, oprot): + args = get_next_notification_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_next_notification_result() + try: + result.success = self._handler.get_next_notification(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_next_notification", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_current_notificationEventId(self, seqid, iprot, oprot): + args = get_current_notificationEventId_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_current_notificationEventId_result() + try: + result.success = self._handler.get_current_notificationEventId() + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_current_notificationEventId", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_fire_listener_event(self, seqid, iprot, oprot): + args = fire_listener_event_args() + args.read(iprot) + iprot.readMessageEnd() + result = fire_listener_event_result() + try: + result.success = self._handler.fire_listener_event(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("fire_listener_event", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_flushCache(self, seqid, iprot, oprot): + args = flushCache_args() + args.read(iprot) + iprot.readMessageEnd() + result = flushCache_result() + try: + self._handler.flushCache() + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("flushCache", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_cm_recycle(self, seqid, iprot, oprot): + args = cm_recycle_args() + args.read(iprot) + iprot.readMessageEnd() + result = cm_recycle_result() + try: + result.success = self._handler.cm_recycle(args.request) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("cm_recycle", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_file_metadata_by_expr(self, seqid, iprot, oprot): + args = get_file_metadata_by_expr_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_file_metadata_by_expr_result() + try: + result.success = self._handler.get_file_metadata_by_expr(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_file_metadata_by_expr", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_file_metadata(self, seqid, iprot, oprot): + args = get_file_metadata_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_file_metadata_result() + try: + result.success = self._handler.get_file_metadata(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_file_metadata", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_put_file_metadata(self, seqid, iprot, oprot): + args = put_file_metadata_args() + args.read(iprot) + iprot.readMessageEnd() + result = put_file_metadata_result() + try: + result.success = self._handler.put_file_metadata(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("put_file_metadata", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_clear_file_metadata(self, seqid, iprot, oprot): + args = clear_file_metadata_args() + args.read(iprot) + iprot.readMessageEnd() + result = clear_file_metadata_result() + try: + result.success = self._handler.clear_file_metadata(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("clear_file_metadata", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_cache_file_metadata(self, seqid, iprot, oprot): + args = cache_file_metadata_args() + args.read(iprot) + iprot.readMessageEnd() + result = cache_file_metadata_result() + try: + result.success = self._handler.cache_file_metadata(args.req) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("cache_file_metadata", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_metastore_db_uuid(self, seqid, iprot, oprot): + args = get_metastore_db_uuid_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_metastore_db_uuid_result() + try: + result.success = self._handler.get_metastore_db_uuid() + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except MetaException as o1: + msg_type = TMessageType.REPLY + result.o1 = o1 + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get_metastore_db_uuid", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + +# HELPER FUNCTIONS AND STRUCTURES + +class getMetaConf_args: + """ + Attributes: + - key + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'key', None, None, ), # 1 + ) + + def __init__(self, key=None,): + self.key = key + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.key = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getMetaConf_args') + if self.key is not None: + oprot.writeFieldBegin('key', TType.STRING, 1) + oprot.writeString(self.key) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.key) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getMetaConf_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRING, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getMetaConf_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class setMetaConf_args: + """ + Attributes: + - key + - value + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'key', None, None, ), # 1 + (2, TType.STRING, 'value', None, None, ), # 2 + ) + + def __init__(self, key=None, value=None,): + self.key = key + self.value = value + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.key = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.value = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('setMetaConf_args') + if self.key is not None: + oprot.writeFieldBegin('key', TType.STRING, 1) + oprot.writeString(self.key) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin('value', TType.STRING, 2) + oprot.writeString(self.value) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.key) + value = (value * 31) ^ hash(self.value) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class setMetaConf_result: + """ + Attributes: + - o1 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, o1=None,): + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('setMetaConf_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_database_args: + """ + Attributes: + - database + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 1 + ) + + def __init__(self, database=None,): + self.database = database + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.database = Database() + self.database.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_database_args') + if self.database is not None: + oprot.writeFieldBegin('database', TType.STRUCT, 1) + self.database.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.database) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_database_result: + """ + Attributes: + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, o1=None, o2=None, o3=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_database_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_database_args: + """ + Attributes: + - name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + ) + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_database_args') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_database_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Database, Database.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Database() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_database_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_database_args: + """ + Attributes: + - name + - deleteData + - cascade + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleteData', None, None, ), # 2 + (3, TType.BOOL, 'cascade', None, None, ), # 3 + ) + + def __init__(self, name=None, deleteData=None, cascade=None,): + self.name = name + self.deleteData = deleteData + self.cascade = cascade + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.cascade = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_database_args') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 2) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + if self.cascade is not None: + oprot.writeFieldBegin('cascade', TType.BOOL, 3) + oprot.writeBool(self.cascade) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.name) + value = (value * 31) ^ hash(self.deleteData) + value = (value * 31) ^ hash(self.cascade) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_database_result: + """ + Attributes: + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, o1=None, o2=None, o3=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_database_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_databases_args: + """ + Attributes: + - pattern + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'pattern', None, None, ), # 1 + ) + + def __init__(self, pattern=None,): + self.pattern = pattern + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.pattern = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_databases_args') + if self.pattern is not None: + oprot.writeFieldBegin('pattern', TType.STRING, 1) + oprot.writeString(self.pattern) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.pattern) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_databases_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype625, _size622) = iprot.readListBegin() + for _i626 in xrange(_size622): + _elem627 = iprot.readString() + self.success.append(_elem627) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_databases_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter628 in self.success: + oprot.writeString(iter628) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_databases_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_databases_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_databases_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype632, _size629) = iprot.readListBegin() + for _i633 in xrange(_size629): + _elem634 = iprot.readString() + self.success.append(_elem634) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_databases_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter635 in self.success: + oprot.writeString(iter635) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_database_args: + """ + Attributes: + - dbname + - db + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRUCT, 'db', (Database, Database.thrift_spec), None, ), # 2 + ) + + def __init__(self, dbname=None, db=None,): + self.dbname = dbname + self.db = db + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.db = Database() + self.db.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_database_args') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.db is not None: + oprot.writeFieldBegin('db', TType.STRUCT, 2) + self.db.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.db) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_database_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_database_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_type_args: + """ + Attributes: + - name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + ) + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_args') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_type_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Type, Type.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Type() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_type_args: + """ + Attributes: + - type + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'type', (Type, Type.thrift_spec), None, ), # 1 + ) + + def __init__(self, type=None,): + self.type = type + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.type = Type() + self.type.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_type_args') + if self.type is not None: + oprot.writeFieldBegin('type', TType.STRUCT, 1) + self.type.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.type) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_type_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_type_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_type_args: + """ + Attributes: + - type + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'type', None, None, ), # 1 + ) + + def __init__(self, type=None,): + self.type = type + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.type = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_type_args') + if self.type is not None: + oprot.writeFieldBegin('type', TType.STRING, 1) + oprot.writeString(self.type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.type) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_type_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_type_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_type_all_args: + """ + Attributes: + - name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + ) + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_all_args') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_type_all_result: + """ + Attributes: + - success + - o2 + """ + + thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(Type, Type.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o2=None,): + self.success = success + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.MAP: + self.success = {} + (_ktype637, _vtype638, _size636 ) = iprot.readMapBegin() + for _i640 in xrange(_size636): + _key641 = iprot.readString() + _val642 = Type() + _val642.read(iprot) + self.success[_key641] = _val642 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_all_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) + for kiter643,viter644 in self.success.items(): + oprot.writeString(kiter643) + viter644.write(oprot) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 1) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_fields_args: + """ + Attributes: + - db_name + - table_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + ) + + def __init__(self, db_name=None, table_name=None,): + self.db_name = db_name + self.table_name = table_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_fields_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.table_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_fields_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype648, _size645) = iprot.readListBegin() + for _i649 in xrange(_size645): + _elem650 = FieldSchema() + _elem650.read(iprot) + self.success.append(_elem650) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_fields_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter651 in self.success: + iter651.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_fields_with_environment_context_args: + """ + Attributes: + - db_name + - table_name + - environment_context + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 3 + ) + + def __init__(self, db_name=None, table_name=None, environment_context=None,): + self.db_name = db_name + self.table_name = table_name + self.environment_context = environment_context + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_fields_with_environment_context_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin('environment_context', TType.STRUCT, 3) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.table_name) + value = (value * 31) ^ hash(self.environment_context) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_fields_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype655, _size652) = iprot.readListBegin() + for _i656 in xrange(_size652): + _elem657 = FieldSchema() + _elem657.read(iprot) + self.success.append(_elem657) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_fields_with_environment_context_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter658 in self.success: + iter658.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_schema_args: + """ + Attributes: + - db_name + - table_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + ) + + def __init__(self, db_name=None, table_name=None,): + self.db_name = db_name + self.table_name = table_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_schema_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.table_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_schema_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype662, _size659) = iprot.readListBegin() + for _i663 in xrange(_size659): + _elem664 = FieldSchema() + _elem664.read(iprot) + self.success.append(_elem664) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_schema_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter665 in self.success: + iter665.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_schema_with_environment_context_args: + """ + Attributes: + - db_name + - table_name + - environment_context + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 3 + ) + + def __init__(self, db_name=None, table_name=None, environment_context=None,): + self.db_name = db_name + self.table_name = table_name + self.environment_context = environment_context + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_schema_with_environment_context_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin('environment_context', TType.STRUCT, 3) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.table_name) + value = (value * 31) ^ hash(self.environment_context) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_schema_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype669, _size666) = iprot.readListBegin() + for _i670 in xrange(_size666): + _elem671 = FieldSchema() + _elem671.read(iprot) + self.success.append(_elem671) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_schema_with_environment_context_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter672 in self.success: + iter672.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_table_args: + """ + Attributes: + - tbl + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1 + ) + + def __init__(self, tbl=None,): + self.tbl = tbl + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tbl = Table() + self.tbl.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_table_args') + if self.tbl is not None: + oprot.writeFieldBegin('tbl', TType.STRUCT, 1) + self.tbl.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.tbl) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_table_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 + ) + + def __init__(self, o1=None, o2=None, o3=None, o4=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_table_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_table_with_environment_context_args: + """ + Attributes: + - tbl + - environment_context + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 2 + ) + + def __init__(self, tbl=None, environment_context=None,): + self.tbl = tbl + self.environment_context = environment_context + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tbl = Table() + self.tbl.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_table_with_environment_context_args') + if self.tbl is not None: + oprot.writeFieldBegin('tbl', TType.STRUCT, 1) + self.tbl.write(oprot) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin('environment_context', TType.STRUCT, 2) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.tbl) + value = (value * 31) ^ hash(self.environment_context) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_table_with_environment_context_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 + ) + + def __init__(self, o1=None, o2=None, o3=None, o4=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_table_with_environment_context_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_table_with_constraints_args: + """ + Attributes: + - tbl + - primaryKeys + - foreignKeys + - uniqueConstraints + - notNullConstraints + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1 + (2, TType.LIST, 'primaryKeys', (TType.STRUCT,(SQLPrimaryKey, SQLPrimaryKey.thrift_spec)), None, ), # 2 + (3, TType.LIST, 'foreignKeys', (TType.STRUCT,(SQLForeignKey, SQLForeignKey.thrift_spec)), None, ), # 3 + (4, TType.LIST, 'uniqueConstraints', (TType.STRUCT,(SQLUniqueConstraint, SQLUniqueConstraint.thrift_spec)), None, ), # 4 + (5, TType.LIST, 'notNullConstraints', (TType.STRUCT,(SQLNotNullConstraint, SQLNotNullConstraint.thrift_spec)), None, ), # 5 + ) + + def __init__(self, tbl=None, primaryKeys=None, foreignKeys=None, uniqueConstraints=None, notNullConstraints=None,): + self.tbl = tbl + self.primaryKeys = primaryKeys + self.foreignKeys = foreignKeys + self.uniqueConstraints = uniqueConstraints + self.notNullConstraints = notNullConstraints + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tbl = Table() + self.tbl.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.primaryKeys = [] + (_etype676, _size673) = iprot.readListBegin() + for _i677 in xrange(_size673): + _elem678 = SQLPrimaryKey() + _elem678.read(iprot) + self.primaryKeys.append(_elem678) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.foreignKeys = [] + (_etype682, _size679) = iprot.readListBegin() + for _i683 in xrange(_size679): + _elem684 = SQLForeignKey() + _elem684.read(iprot) + self.foreignKeys.append(_elem684) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.uniqueConstraints = [] + (_etype688, _size685) = iprot.readListBegin() + for _i689 in xrange(_size685): + _elem690 = SQLUniqueConstraint() + _elem690.read(iprot) + self.uniqueConstraints.append(_elem690) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.notNullConstraints = [] + (_etype694, _size691) = iprot.readListBegin() + for _i695 in xrange(_size691): + _elem696 = SQLNotNullConstraint() + _elem696.read(iprot) + self.notNullConstraints.append(_elem696) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_table_with_constraints_args') + if self.tbl is not None: + oprot.writeFieldBegin('tbl', TType.STRUCT, 1) + self.tbl.write(oprot) + oprot.writeFieldEnd() + if self.primaryKeys is not None: + oprot.writeFieldBegin('primaryKeys', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys)) + for iter697 in self.primaryKeys: + iter697.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.foreignKeys is not None: + oprot.writeFieldBegin('foreignKeys', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys)) + for iter698 in self.foreignKeys: + iter698.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.uniqueConstraints is not None: + oprot.writeFieldBegin('uniqueConstraints', TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints)) + for iter699 in self.uniqueConstraints: + iter699.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.notNullConstraints is not None: + oprot.writeFieldBegin('notNullConstraints', TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints)) + for iter700 in self.notNullConstraints: + iter700.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.tbl) + value = (value * 31) ^ hash(self.primaryKeys) + value = (value * 31) ^ hash(self.foreignKeys) + value = (value * 31) ^ hash(self.uniqueConstraints) + value = (value * 31) ^ hash(self.notNullConstraints) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_table_with_constraints_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 + ) + + def __init__(self, o1=None, o2=None, o3=None, o4=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_table_with_constraints_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_constraint_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (DropConstraintRequest, DropConstraintRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = DropConstraintRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_constraint_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_constraint_result: + """ + Attributes: + - o1 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o3=None,): + self.o1 = o1 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_constraint_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 2) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_primary_key_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (AddPrimaryKeyRequest, AddPrimaryKeyRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = AddPrimaryKeyRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_primary_key_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_primary_key_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_primary_key_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_foreign_key_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (AddForeignKeyRequest, AddForeignKeyRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = AddForeignKeyRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_foreign_key_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_foreign_key_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_foreign_key_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_unique_constraint_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (AddUniqueConstraintRequest, AddUniqueConstraintRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = AddUniqueConstraintRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_unique_constraint_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_unique_constraint_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_unique_constraint_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_not_null_constraint_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (AddNotNullConstraintRequest, AddNotNullConstraintRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = AddNotNullConstraintRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_not_null_constraint_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_not_null_constraint_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_not_null_constraint_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_table_args: + """ + Attributes: + - dbname + - name + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.BOOL, 'deleteData', None, None, ), # 3 + ) + + def __init__(self, dbname=None, name=None, deleteData=None,): + self.dbname = dbname + self.name = name + self.deleteData = deleteData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_table_args') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 3) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.name) + value = (value * 31) ^ hash(self.deleteData) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_table_result: + """ + Attributes: + - o1 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o3=None,): + self.o1 = o1 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_table_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 2) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_table_with_environment_context_args: + """ + Attributes: + - dbname + - name + - deleteData + - environment_context + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.BOOL, 'deleteData', None, None, ), # 3 + (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4 + ) + + def __init__(self, dbname=None, name=None, deleteData=None, environment_context=None,): + self.dbname = dbname + self.name = name + self.deleteData = deleteData + self.environment_context = environment_context + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_table_with_environment_context_args') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 3) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin('environment_context', TType.STRUCT, 4) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.name) + value = (value * 31) ^ hash(self.deleteData) + value = (value * 31) ^ hash(self.environment_context) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_table_with_environment_context_result: + """ + Attributes: + - o1 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o3=None,): + self.o1 = o1 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_table_with_environment_context_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 2) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class truncate_table_args: + """ + Attributes: + - dbName + - tableName + - partNames + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'tableName', None, None, ), # 2 + (3, TType.LIST, 'partNames', (TType.STRING,None), None, ), # 3 + ) + + def __init__(self, dbName=None, tableName=None, partNames=None,): + self.dbName = dbName + self.tableName = tableName + self.partNames = partNames + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.partNames = [] + (_etype704, _size701) = iprot.readListBegin() + for _i705 in xrange(_size701): + _elem706 = iprot.readString() + self.partNames.append(_elem706) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('truncate_table_args') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 2) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.partNames is not None: + oprot.writeFieldBegin('partNames', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.partNames)) + for iter707 in self.partNames: + oprot.writeString(iter707) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tableName) + value = (value * 31) ^ hash(self.partNames) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class truncate_table_result: + """ + Attributes: + - o1 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, o1=None,): + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('truncate_table_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_tables_args: + """ + Attributes: + - db_name + - pattern + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'pattern', None, None, ), # 2 + ) + + def __init__(self, db_name=None, pattern=None,): + self.db_name = db_name + self.pattern = pattern + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pattern = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_tables_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.pattern is not None: + oprot.writeFieldBegin('pattern', TType.STRING, 2) + oprot.writeString(self.pattern) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.pattern) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_tables_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype711, _size708) = iprot.readListBegin() + for _i712 in xrange(_size708): + _elem713 = iprot.readString() + self.success.append(_elem713) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_tables_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter714 in self.success: + oprot.writeString(iter714) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_tables_by_type_args: + """ + Attributes: + - db_name + - pattern + - tableType + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'pattern', None, None, ), # 2 + (3, TType.STRING, 'tableType', None, None, ), # 3 + ) + + def __init__(self, db_name=None, pattern=None, tableType=None,): + self.db_name = db_name + self.pattern = pattern + self.tableType = tableType + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pattern = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableType = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_tables_by_type_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.pattern is not None: + oprot.writeFieldBegin('pattern', TType.STRING, 2) + oprot.writeString(self.pattern) + oprot.writeFieldEnd() + if self.tableType is not None: + oprot.writeFieldBegin('tableType', TType.STRING, 3) + oprot.writeString(self.tableType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.pattern) + value = (value * 31) ^ hash(self.tableType) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_tables_by_type_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype718, _size715) = iprot.readListBegin() + for _i719 in xrange(_size715): + _elem720 = iprot.readString() + self.success.append(_elem720) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_tables_by_type_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter721 in self.success: + oprot.writeString(iter721) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_meta_args: + """ + Attributes: + - db_patterns + - tbl_patterns + - tbl_types + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_patterns', None, None, ), # 1 + (2, TType.STRING, 'tbl_patterns', None, None, ), # 2 + (3, TType.LIST, 'tbl_types', (TType.STRING,None), None, ), # 3 + ) + + def __init__(self, db_patterns=None, tbl_patterns=None, tbl_types=None,): + self.db_patterns = db_patterns + self.tbl_patterns = tbl_patterns + self.tbl_types = tbl_types + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_patterns = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_patterns = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.tbl_types = [] + (_etype725, _size722) = iprot.readListBegin() + for _i726 in xrange(_size722): + _elem727 = iprot.readString() + self.tbl_types.append(_elem727) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_meta_args') + if self.db_patterns is not None: + oprot.writeFieldBegin('db_patterns', TType.STRING, 1) + oprot.writeString(self.db_patterns) + oprot.writeFieldEnd() + if self.tbl_patterns is not None: + oprot.writeFieldBegin('tbl_patterns', TType.STRING, 2) + oprot.writeString(self.tbl_patterns) + oprot.writeFieldEnd() + if self.tbl_types is not None: + oprot.writeFieldBegin('tbl_types', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.tbl_types)) + for iter728 in self.tbl_types: + oprot.writeString(iter728) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_patterns) + value = (value * 31) ^ hash(self.tbl_patterns) + value = (value * 31) ^ hash(self.tbl_types) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_meta_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TableMeta, TableMeta.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype732, _size729) = iprot.readListBegin() + for _i733 in xrange(_size729): + _elem734 = TableMeta() + _elem734.read(iprot) + self.success.append(_elem734) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_meta_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter735 in self.success: + iter735.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_tables_args: + """ + Attributes: + - db_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + ) + + def __init__(self, db_name=None,): + self.db_name = db_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_tables_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_tables_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype739, _size736) = iprot.readListBegin() + for _i740 in xrange(_size736): + _elem741 = iprot.readString() + self.success.append(_elem741) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_tables_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter742 in self.success: + oprot.writeString(iter742) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_args: + """ + Attributes: + - dbname + - tbl_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + ) + + def __init__(self, dbname=None, tbl_name=None,): + self.dbname = dbname + self.tbl_name = tbl_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_args') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tbl_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Table() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_objects_by_name_args: + """ + Attributes: + - dbname + - tbl_names + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.LIST, 'tbl_names', (TType.STRING,None), None, ), # 2 + ) + + def __init__(self, dbname=None, tbl_names=None,): + self.dbname = dbname + self.tbl_names = tbl_names + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.tbl_names = [] + (_etype746, _size743) = iprot.readListBegin() + for _i747 in xrange(_size743): + _elem748 = iprot.readString() + self.tbl_names.append(_elem748) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_objects_by_name_args') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tbl_names is not None: + oprot.writeFieldBegin('tbl_names', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.tbl_names)) + for iter749 in self.tbl_names: + oprot.writeString(iter749) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tbl_names) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_objects_by_name_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Table, Table.thrift_spec)), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype753, _size750) = iprot.readListBegin() + for _i754 in xrange(_size750): + _elem755 = Table() + _elem755.read(iprot) + self.success.append(_elem755) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_objects_by_name_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter756 in self.success: + iter756.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_req_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (GetTableRequest, GetTableRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetTableRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_req_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_req_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GetTableResult, GetTableResult.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetTableResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_req_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_objects_by_name_req_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (GetTablesRequest, GetTablesRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetTablesRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_objects_by_name_req_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_objects_by_name_req_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GetTablesResult, GetTablesResult.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetTablesResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_objects_by_name_req_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_names_by_filter_args: + """ + Attributes: + - dbname + - filter + - max_tables + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'filter', None, None, ), # 2 + (3, TType.I16, 'max_tables', None, -1, ), # 3 + ) + + def __init__(self, dbname=None, filter=None, max_tables=thrift_spec[3][4],): + self.dbname = dbname + self.filter = filter + self.max_tables = max_tables + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.filter = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_tables = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_names_by_filter_args') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.filter is not None: + oprot.writeFieldBegin('filter', TType.STRING, 2) + oprot.writeString(self.filter) + oprot.writeFieldEnd() + if self.max_tables is not None: + oprot.writeFieldBegin('max_tables', TType.I16, 3) + oprot.writeI16(self.max_tables) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.filter) + value = (value * 31) ^ hash(self.max_tables) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_names_by_filter_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype760, _size757) = iprot.readListBegin() + for _i761 in xrange(_size757): + _elem762 = iprot.readString() + self.success.append(_elem762) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_names_by_filter_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter763 in self.success: + oprot.writeString(iter763) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_table_args: + """ + Attributes: + - dbname + - tbl_name + - new_tbl + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3 + ) + + def __init__(self, dbname=None, tbl_name=None, new_tbl=None,): + self.dbname = dbname + self.tbl_name = tbl_name + self.new_tbl = new_tbl + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_tbl = Table() + self.new_tbl.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_table_args') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_tbl is not None: + oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) + self.new_tbl.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.new_tbl) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_table_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_table_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_table_with_environment_context_args: + """ + Attributes: + - dbname + - tbl_name + - new_tbl + - environment_context + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4 + ) + + def __init__(self, dbname=None, tbl_name=None, new_tbl=None, environment_context=None,): + self.dbname = dbname + self.tbl_name = tbl_name + self.new_tbl = new_tbl + self.environment_context = environment_context + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_tbl = Table() + self.new_tbl.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_table_with_environment_context_args') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_tbl is not None: + oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) + self.new_tbl.write(oprot) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin('environment_context', TType.STRUCT, 4) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.new_tbl) + value = (value * 31) ^ hash(self.environment_context) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_table_with_environment_context_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_table_with_environment_context_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_table_with_cascade_args: + """ + Attributes: + - dbname + - tbl_name + - new_tbl + - cascade + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3 + (4, TType.BOOL, 'cascade', None, None, ), # 4 + ) + + def __init__(self, dbname=None, tbl_name=None, new_tbl=None, cascade=None,): + self.dbname = dbname + self.tbl_name = tbl_name + self.new_tbl = new_tbl + self.cascade = cascade + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_tbl = Table() + self.new_tbl.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.cascade = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_table_with_cascade_args') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_tbl is not None: + oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) + self.new_tbl.write(oprot) + oprot.writeFieldEnd() + if self.cascade is not None: + oprot.writeFieldBegin('cascade', TType.BOOL, 4) + oprot.writeBool(self.cascade) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.new_tbl) + value = (value * 31) ^ hash(self.cascade) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_table_with_cascade_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_table_with_cascade_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partition_args: + """ + Attributes: + - new_part + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1 + ) + + def __init__(self, new_part=None,): + self.new_part = new_part + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_partition_args') + if self.new_part is not None: + oprot.writeFieldBegin('new_part', TType.STRUCT, 1) + self.new_part.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.new_part) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partition_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_partition_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partition_with_environment_context_args: + """ + Attributes: + - new_part + - environment_context + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 2 + ) + + def __init__(self, new_part=None, environment_context=None,): + self.new_part = new_part + self.environment_context = environment_context + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_partition_with_environment_context_args') + if self.new_part is not None: + oprot.writeFieldBegin('new_part', TType.STRUCT, 1) + self.new_part.write(oprot) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin('environment_context', TType.STRUCT, 2) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.new_part) + value = (value * 31) ^ hash(self.environment_context) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partition_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_partition_with_environment_context_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partitions_args: + """ + Attributes: + - new_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'new_parts', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1 + ) + + def __init__(self, new_parts=None,): + self.new_parts = new_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.new_parts = [] + (_etype767, _size764) = iprot.readListBegin() + for _i768 in xrange(_size764): + _elem769 = Partition() + _elem769.read(iprot) + self.new_parts.append(_elem769) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_partitions_args') + if self.new_parts is not None: + oprot.writeFieldBegin('new_parts', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) + for iter770 in self.new_parts: + iter770.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.new_parts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partitions_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_partitions_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partitions_pspec_args: + """ + Attributes: + - new_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'new_parts', (TType.STRUCT,(PartitionSpec, PartitionSpec.thrift_spec)), None, ), # 1 + ) + + def __init__(self, new_parts=None,): + self.new_parts = new_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.new_parts = [] + (_etype774, _size771) = iprot.readListBegin() + for _i775 in xrange(_size771): + _elem776 = PartitionSpec() + _elem776.read(iprot) + self.new_parts.append(_elem776) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_partitions_pspec_args') + if self.new_parts is not None: + oprot.writeFieldBegin('new_parts', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) + for iter777 in self.new_parts: + iter777.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.new_parts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partitions_pspec_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_partitions_pspec_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype781, _size778) = iprot.readListBegin() + for _i782 in xrange(_size778): + _elem783 = iprot.readString() + self.part_vals.append(_elem783) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('append_partition_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter784 in self.part_vals: + oprot.writeString(iter784) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_vals) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('append_partition_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partitions_req_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (AddPartitionsRequest, AddPartitionsRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = AddPartitionsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_partitions_req_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partitions_req_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (AddPartitionsResult, AddPartitionsResult.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = AddPartitionsResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_partitions_req_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_with_environment_context_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - environment_context + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, environment_context=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.environment_context = environment_context + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype788, _size785) = iprot.readListBegin() + for _i789 in xrange(_size785): + _elem790 = iprot.readString() + self.part_vals.append(_elem790) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('append_partition_with_environment_context_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter791 in self.part_vals: + oprot.writeString(iter791) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin('environment_context', TType.STRUCT, 4) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_vals) + value = (value * 31) ^ hash(self.environment_context) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('append_partition_with_environment_context_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('append_partition_by_name_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('append_partition_by_name_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_by_name_with_environment_context_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - environment_context + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None, environment_context=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.environment_context = environment_context + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('append_partition_by_name_with_environment_context_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin('environment_context', TType.STRUCT, 4) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_name) + value = (value * 31) ^ hash(self.environment_context) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_by_name_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('append_partition_by_name_with_environment_context_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.deleteData = deleteData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype795, _size792) = iprot.readListBegin() + for _i796 in xrange(_size792): + _elem797 = iprot.readString() + self.part_vals.append(_elem797) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter798 in self.part_vals: + oprot.writeString(iter798) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_vals) + value = (value * 31) ^ hash(self.deleteData) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partition_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partition_with_environment_context_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - deleteData + - environment_context + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 + (5, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 5 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None, environment_context=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.deleteData = deleteData + self.environment_context = environment_context + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype802, _size799) = iprot.readListBegin() + for _i803 in xrange(_size799): + _elem804 = iprot.readString() + self.part_vals.append(_elem804) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_with_environment_context_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter805 in self.part_vals: + oprot.writeString(iter805) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin('environment_context', TType.STRUCT, 5) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_vals) + value = (value * 31) ^ hash(self.deleteData) + value = (value * 31) ^ hash(self.environment_context) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partition_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_with_environment_context_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partition_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None, deleteData=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.deleteData = deleteData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_by_name_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_name) + value = (value * 31) ^ hash(self.deleteData) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partition_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_by_name_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partition_by_name_with_environment_context_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - deleteData + - environment_context + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 + (5, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 5 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None, deleteData=None, environment_context=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.deleteData = deleteData + self.environment_context = environment_context + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_by_name_with_environment_context_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin('environment_context', TType.STRUCT, 5) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_name) + value = (value * 31) ^ hash(self.deleteData) + value = (value * 31) ^ hash(self.environment_context) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partition_by_name_with_environment_context_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_by_name_with_environment_context_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partitions_req_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (DropPartitionsRequest, DropPartitionsRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = DropPartitionsRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partitions_req_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_partitions_req_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (DropPartitionsResult, DropPartitionsResult.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = DropPartitionsResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partitions_req_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype809, _size806) = iprot.readListBegin() + for _i810 in xrange(_size806): + _elem811 = iprot.readString() + self.part_vals.append(_elem811) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter812 in self.part_vals: + oprot.writeString(iter812) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_vals) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class exchange_partition_args: + """ + Attributes: + - partitionSpecs + - source_db + - source_table_name + - dest_db + - dest_table_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.MAP, 'partitionSpecs', (TType.STRING,None,TType.STRING,None), None, ), # 1 + (2, TType.STRING, 'source_db', None, None, ), # 2 + (3, TType.STRING, 'source_table_name', None, None, ), # 3 + (4, TType.STRING, 'dest_db', None, None, ), # 4 + (5, TType.STRING, 'dest_table_name', None, None, ), # 5 + ) + + def __init__(self, partitionSpecs=None, source_db=None, source_table_name=None, dest_db=None, dest_table_name=None,): + self.partitionSpecs = partitionSpecs + self.source_db = source_db + self.source_table_name = source_table_name + self.dest_db = dest_db + self.dest_table_name = dest_table_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.partitionSpecs = {} + (_ktype814, _vtype815, _size813 ) = iprot.readMapBegin() + for _i817 in xrange(_size813): + _key818 = iprot.readString() + _val819 = iprot.readString() + self.partitionSpecs[_key818] = _val819 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.source_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.source_table_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.dest_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.dest_table_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('exchange_partition_args') + if self.partitionSpecs is not None: + oprot.writeFieldBegin('partitionSpecs', TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.partitionSpecs)) + for kiter820,viter821 in self.partitionSpecs.items(): + oprot.writeString(kiter820) + oprot.writeString(viter821) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.source_db is not None: + oprot.writeFieldBegin('source_db', TType.STRING, 2) + oprot.writeString(self.source_db) + oprot.writeFieldEnd() + if self.source_table_name is not None: + oprot.writeFieldBegin('source_table_name', TType.STRING, 3) + oprot.writeString(self.source_table_name) + oprot.writeFieldEnd() + if self.dest_db is not None: + oprot.writeFieldBegin('dest_db', TType.STRING, 4) + oprot.writeString(self.dest_db) + oprot.writeFieldEnd() + if self.dest_table_name is not None: + oprot.writeFieldBegin('dest_table_name', TType.STRING, 5) + oprot.writeString(self.dest_table_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.partitionSpecs) + value = (value * 31) ^ hash(self.source_db) + value = (value * 31) ^ hash(self.source_table_name) + value = (value * 31) ^ hash(self.dest_db) + value = (value * 31) ^ hash(self.dest_table_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class exchange_partition_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('exchange_partition_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class exchange_partitions_args: + """ + Attributes: + - partitionSpecs + - source_db + - source_table_name + - dest_db + - dest_table_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.MAP, 'partitionSpecs', (TType.STRING,None,TType.STRING,None), None, ), # 1 + (2, TType.STRING, 'source_db', None, None, ), # 2 + (3, TType.STRING, 'source_table_name', None, None, ), # 3 + (4, TType.STRING, 'dest_db', None, None, ), # 4 + (5, TType.STRING, 'dest_table_name', None, None, ), # 5 + ) + + def __init__(self, partitionSpecs=None, source_db=None, source_table_name=None, dest_db=None, dest_table_name=None,): + self.partitionSpecs = partitionSpecs + self.source_db = source_db + self.source_table_name = source_table_name + self.dest_db = dest_db + self.dest_table_name = dest_table_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.partitionSpecs = {} + (_ktype823, _vtype824, _size822 ) = iprot.readMapBegin() + for _i826 in xrange(_size822): + _key827 = iprot.readString() + _val828 = iprot.readString() + self.partitionSpecs[_key827] = _val828 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.source_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.source_table_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.dest_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.dest_table_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('exchange_partitions_args') + if self.partitionSpecs is not None: + oprot.writeFieldBegin('partitionSpecs', TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.partitionSpecs)) + for kiter829,viter830 in self.partitionSpecs.items(): + oprot.writeString(kiter829) + oprot.writeString(viter830) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.source_db is not None: + oprot.writeFieldBegin('source_db', TType.STRING, 2) + oprot.writeString(self.source_db) + oprot.writeFieldEnd() + if self.source_table_name is not None: + oprot.writeFieldBegin('source_table_name', TType.STRING, 3) + oprot.writeString(self.source_table_name) + oprot.writeFieldEnd() + if self.dest_db is not None: + oprot.writeFieldBegin('dest_db', TType.STRING, 4) + oprot.writeString(self.dest_db) + oprot.writeFieldEnd() + if self.dest_table_name is not None: + oprot.writeFieldBegin('dest_table_name', TType.STRING, 5) + oprot.writeString(self.dest_table_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.partitionSpecs) + value = (value * 31) ^ hash(self.source_db) + value = (value * 31) ^ hash(self.source_table_name) + value = (value * 31) ^ hash(self.dest_db) + value = (value * 31) ^ hash(self.dest_table_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class exchange_partitions_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype834, _size831) = iprot.readListBegin() + for _i835 in xrange(_size831): + _elem836 = Partition() + _elem836.read(iprot) + self.success.append(_elem836) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('exchange_partitions_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter837 in self.success: + iter837.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_with_auth_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - user_name + - group_names + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.STRING, 'user_name', None, None, ), # 4 + (5, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 5 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, user_name=None, group_names=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.user_name = user_name + self.group_names = group_names + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype841, _size838) = iprot.readListBegin() + for _i842 in xrange(_size838): + _elem843 = iprot.readString() + self.part_vals.append(_elem843) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.user_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.group_names = [] + (_etype847, _size844) = iprot.readListBegin() + for _i848 in xrange(_size844): + _elem849 = iprot.readString() + self.group_names.append(_elem849) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_with_auth_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter850 in self.part_vals: + oprot.writeString(iter850) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.user_name is not None: + oprot.writeFieldBegin('user_name', TType.STRING, 4) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names is not None: + oprot.writeFieldBegin('group_names', TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter851 in self.group_names: + oprot.writeString(iter851) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_vals) + value = (value * 31) ^ hash(self.user_name) + value = (value * 31) ^ hash(self.group_names) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_with_auth_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_with_auth_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_by_name_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_by_name_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_args: + """ + Attributes: + - db_name + - tbl_name + - max_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_parts', None, -1, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin('max_parts', TType.I16, 3) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.max_parts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype855, _size852) = iprot.readListBegin() + for _i856 in xrange(_size852): + _elem857 = Partition() + _elem857.read(iprot) + self.success.append(_elem857) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter858 in self.success: + iter858.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_with_auth_args: + """ + Attributes: + - db_name + - tbl_name + - max_parts + - user_name + - group_names + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_parts', None, -1, ), # 3 + (4, TType.STRING, 'user_name', None, None, ), # 4 + (5, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 5 + ) + + def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4], user_name=None, group_names=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + self.user_name = user_name + self.group_names = group_names + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.user_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.group_names = [] + (_etype862, _size859) = iprot.readListBegin() + for _i863 in xrange(_size859): + _elem864 = iprot.readString() + self.group_names.append(_elem864) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_with_auth_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin('max_parts', TType.I16, 3) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + if self.user_name is not None: + oprot.writeFieldBegin('user_name', TType.STRING, 4) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names is not None: + oprot.writeFieldBegin('group_names', TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter865 in self.group_names: + oprot.writeString(iter865) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.max_parts) + value = (value * 31) ^ hash(self.user_name) + value = (value * 31) ^ hash(self.group_names) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_with_auth_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype869, _size866) = iprot.readListBegin() + for _i870 in xrange(_size866): + _elem871 = Partition() + _elem871.read(iprot) + self.success.append(_elem871) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_with_auth_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter872 in self.success: + iter872.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_pspec_args: + """ + Attributes: + - db_name + - tbl_name + - max_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I32, 'max_parts', None, -1, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.max_parts = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_pspec_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin('max_parts', TType.I32, 3) + oprot.writeI32(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.max_parts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_pspec_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(PartitionSpec, PartitionSpec.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype876, _size873) = iprot.readListBegin() + for _i877 in xrange(_size873): + _elem878 = PartitionSpec() + _elem878.read(iprot) + self.success.append(_elem878) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_pspec_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter879 in self.success: + iter879.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_names_args: + """ + Attributes: + - db_name + - tbl_name + - max_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_parts', None, -1, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_names_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin('max_parts', TType.I16, 3) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.max_parts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_names_result: + """ + Attributes: + - success + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o2=None,): + self.success = success + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype883, _size880) = iprot.readListBegin() + for _i884 in xrange(_size880): + _elem885 = iprot.readString() + self.success.append(_elem885) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_names_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter886 in self.success: + oprot.writeString(iter886) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 1) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_ps_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - max_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype890, _size887) = iprot.readListBegin() + for _i891 in xrange(_size887): + _elem892 = iprot.readString() + self.part_vals.append(_elem892) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_ps_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter893 in self.part_vals: + oprot.writeString(iter893) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_vals) + value = (value * 31) ^ hash(self.max_parts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_ps_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype897, _size894) = iprot.readListBegin() + for _i898 in xrange(_size894): + _elem899 = Partition() + _elem899.read(iprot) + self.success.append(_elem899) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_ps_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter900 in self.success: + iter900.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_ps_with_auth_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - max_parts + - user_name + - group_names + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 + (5, TType.STRING, 'user_name', None, None, ), # 5 + (6, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 6 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4], user_name=None, group_names=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts + self.user_name = user_name + self.group_names = group_names + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype904, _size901) = iprot.readListBegin() + for _i905 in xrange(_size901): + _elem906 = iprot.readString() + self.part_vals.append(_elem906) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.user_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.group_names = [] + (_etype910, _size907) = iprot.readListBegin() + for _i911 in xrange(_size907): + _elem912 = iprot.readString() + self.group_names.append(_elem912) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_ps_with_auth_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter913 in self.part_vals: + oprot.writeString(iter913) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + if self.user_name is not None: + oprot.writeFieldBegin('user_name', TType.STRING, 5) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names is not None: + oprot.writeFieldBegin('group_names', TType.LIST, 6) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter914 in self.group_names: + oprot.writeString(iter914) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_vals) + value = (value * 31) ^ hash(self.max_parts) + value = (value * 31) ^ hash(self.user_name) + value = (value * 31) ^ hash(self.group_names) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_ps_with_auth_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype918, _size915) = iprot.readListBegin() + for _i919 in xrange(_size915): + _elem920 = Partition() + _elem920.read(iprot) + self.success.append(_elem920) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_ps_with_auth_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter921 in self.success: + iter921.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_names_ps_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - max_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype925, _size922) = iprot.readListBegin() + for _i926 in xrange(_size922): + _elem927 = iprot.readString() + self.part_vals.append(_elem927) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_names_ps_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter928 in self.part_vals: + oprot.writeString(iter928) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_vals) + value = (value * 31) ^ hash(self.max_parts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_names_ps_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype932, _size929) = iprot.readListBegin() + for _i933 in xrange(_size929): + _elem934 = iprot.readString() + self.success.append(_elem934) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_names_ps_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter935 in self.success: + oprot.writeString(iter935) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_by_filter_args: + """ + Attributes: + - db_name + - tbl_name + - filter + - max_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'filter', None, None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.filter = filter + self.max_parts = max_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.filter = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_by_filter_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.filter is not None: + oprot.writeFieldBegin('filter', TType.STRING, 3) + oprot.writeString(self.filter) + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.filter) + value = (value * 31) ^ hash(self.max_parts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_by_filter_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype939, _size936) = iprot.readListBegin() + for _i940 in xrange(_size936): + _elem941 = Partition() + _elem941.read(iprot) + self.success.append(_elem941) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_by_filter_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter942 in self.success: + iter942.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_part_specs_by_filter_args: + """ + Attributes: + - db_name + - tbl_name + - filter + - max_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'filter', None, None, ), # 3 + (4, TType.I32, 'max_parts', None, -1, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.filter = filter + self.max_parts = max_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.filter = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.max_parts = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_part_specs_by_filter_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.filter is not None: + oprot.writeFieldBegin('filter', TType.STRING, 3) + oprot.writeString(self.filter) + oprot.writeFieldEnd() + if self.max_parts is not None: + oprot.writeFieldBegin('max_parts', TType.I32, 4) + oprot.writeI32(self.max_parts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.filter) + value = (value * 31) ^ hash(self.max_parts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_part_specs_by_filter_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(PartitionSpec, PartitionSpec.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype946, _size943) = iprot.readListBegin() + for _i947 in xrange(_size943): + _elem948 = PartitionSpec() + _elem948.read(iprot) + self.success.append(_elem948) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_part_specs_by_filter_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter949 in self.success: + iter949.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_by_expr_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (PartitionsByExprRequest, PartitionsByExprRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = PartitionsByExprRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_by_expr_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_by_expr_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (PartitionsByExprResult, PartitionsByExprResult.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PartitionsByExprResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_by_expr_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_num_partitions_by_filter_args: + """ + Attributes: + - db_name + - tbl_name + - filter + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'filter', None, None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, filter=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.filter = filter + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.filter = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_num_partitions_by_filter_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.filter is not None: + oprot.writeFieldBegin('filter', TType.STRING, 3) + oprot.writeString(self.filter) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.filter) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_num_partitions_by_filter_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_num_partitions_by_filter_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_by_names_args: + """ + Attributes: + - db_name + - tbl_name + - names + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'names', (TType.STRING,None), None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, names=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.names = names + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.names = [] + (_etype953, _size950) = iprot.readListBegin() + for _i954 in xrange(_size950): + _elem955 = iprot.readString() + self.names.append(_elem955) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_by_names_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.names is not None: + oprot.writeFieldBegin('names', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.names)) + for iter956 in self.names: + oprot.writeString(iter956) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.names) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_by_names_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype960, _size957) = iprot.readListBegin() + for _i961 in xrange(_size957): + _elem962 = Partition() + _elem962.read(iprot) + self.success.append(_elem962) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_by_names_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter963 in self.success: + iter963.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_partition_args: + """ + Attributes: + - db_name + - tbl_name + - new_part + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, new_part=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.new_part = new_part + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_partition_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_part is not None: + oprot.writeFieldBegin('new_part', TType.STRUCT, 3) + self.new_part.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.new_part) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_partition_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_partition_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_partitions_args: + """ + Attributes: + - db_name + - tbl_name + - new_parts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'new_parts', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, new_parts=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.new_parts = new_parts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.new_parts = [] + (_etype967, _size964) = iprot.readListBegin() + for _i968 in xrange(_size964): + _elem969 = Partition() + _elem969.read(iprot) + self.new_parts.append(_elem969) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_partitions_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_parts is not None: + oprot.writeFieldBegin('new_parts', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) + for iter970 in self.new_parts: + iter970.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.new_parts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_partitions_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_partitions_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_partitions_with_environment_context_args: + """ + Attributes: + - db_name + - tbl_name + - new_parts + - environment_context + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'new_parts', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 3 + (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, new_parts=None, environment_context=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.new_parts = new_parts + self.environment_context = environment_context + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.new_parts = [] + (_etype974, _size971) = iprot.readListBegin() + for _i975 in xrange(_size971): + _elem976 = Partition() + _elem976.read(iprot) + self.new_parts.append(_elem976) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_partitions_with_environment_context_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_parts is not None: + oprot.writeFieldBegin('new_parts', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) + for iter977 in self.new_parts: + iter977.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin('environment_context', TType.STRUCT, 4) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.new_parts) + value = (value * 31) ^ hash(self.environment_context) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_partitions_with_environment_context_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_partitions_with_environment_context_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_partition_with_environment_context_args: + """ + Attributes: + - db_name + - tbl_name + - new_part + - environment_context + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, new_part=None, environment_context=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.new_part = new_part + self.environment_context = environment_context + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.environment_context = EnvironmentContext() + self.environment_context.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_partition_with_environment_context_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_part is not None: + oprot.writeFieldBegin('new_part', TType.STRUCT, 3) + self.new_part.write(oprot) + oprot.writeFieldEnd() + if self.environment_context is not None: + oprot.writeFieldBegin('environment_context', TType.STRUCT, 4) + self.environment_context.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.new_part) + value = (value * 31) ^ hash(self.environment_context) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_partition_with_environment_context_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_partition_with_environment_context_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class rename_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - new_part + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, new_part=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.new_part = new_part + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype981, _size978) = iprot.readListBegin() + for _i982 in xrange(_size978): + _elem983 = iprot.readString() + self.part_vals.append(_elem983) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('rename_partition_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter984 in self.part_vals: + oprot.writeString(iter984) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.new_part is not None: + oprot.writeFieldBegin('new_part', TType.STRUCT, 4) + self.new_part.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_vals) + value = (value * 31) ^ hash(self.new_part) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class rename_partition_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('rename_partition_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class partition_name_has_valid_characters_args: + """ + Attributes: + - part_vals + - throw_exception + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 1 + (2, TType.BOOL, 'throw_exception', None, None, ), # 2 + ) + + def __init__(self, part_vals=None, throw_exception=None,): + self.part_vals = part_vals + self.throw_exception = throw_exception + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.part_vals = [] + (_etype988, _size985) = iprot.readListBegin() + for _i989 in xrange(_size985): + _elem990 = iprot.readString() + self.part_vals.append(_elem990) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.throw_exception = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('partition_name_has_valid_characters_args') + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter991 in self.part_vals: + oprot.writeString(iter991) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.throw_exception is not None: + oprot.writeFieldBegin('throw_exception', TType.BOOL, 2) + oprot.writeBool(self.throw_exception) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.part_vals) + value = (value * 31) ^ hash(self.throw_exception) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class partition_name_has_valid_characters_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('partition_name_has_valid_characters_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_config_value_args: + """ + Attributes: + - name + - defaultValue + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'defaultValue', None, None, ), # 2 + ) + + def __init__(self, name=None, defaultValue=None,): + self.name = name + self.defaultValue = defaultValue + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.defaultValue = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_config_value_args') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.defaultValue is not None: + oprot.writeFieldBegin('defaultValue', TType.STRING, 2) + oprot.writeString(self.defaultValue) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.name) + value = (value * 31) ^ hash(self.defaultValue) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_config_value_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRING, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = ConfigValSecurityException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_config_value_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class partition_name_to_vals_args: + """ + Attributes: + - part_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'part_name', None, None, ), # 1 + ) + + def __init__(self, part_name=None,): + self.part_name = part_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.part_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('partition_name_to_vals_args') + if self.part_name is not None: + oprot.writeFieldBegin('part_name', TType.STRING, 1) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.part_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class partition_name_to_vals_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype995, _size992) = iprot.readListBegin() + for _i996 in xrange(_size992): + _elem997 = iprot.readString() + self.success.append(_elem997) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('partition_name_to_vals_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter998 in self.success: + oprot.writeString(iter998) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class partition_name_to_spec_args: + """ + Attributes: + - part_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'part_name', None, None, ), # 1 + ) + + def __init__(self, part_name=None,): + self.part_name = part_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.part_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('partition_name_to_spec_args') + if self.part_name is not None: + oprot.writeFieldBegin('part_name', TType.STRING, 1) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.part_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class partition_name_to_spec_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.MAP: + self.success = {} + (_ktype1000, _vtype1001, _size999 ) = iprot.readMapBegin() + for _i1003 in xrange(_size999): + _key1004 = iprot.readString() + _val1005 = iprot.readString() + self.success[_key1004] = _val1005 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('partition_name_to_spec_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) + for kiter1006,viter1007 in self.success.items(): + oprot.writeString(kiter1006) + oprot.writeString(viter1007) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class markPartitionForEvent_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - eventType + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.MAP, 'part_vals', (TType.STRING,None,TType.STRING,None), None, ), # 3 + (4, TType.I32, 'eventType', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, eventType=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.eventType = eventType + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.part_vals = {} + (_ktype1009, _vtype1010, _size1008 ) = iprot.readMapBegin() + for _i1012 in xrange(_size1008): + _key1013 = iprot.readString() + _val1014 = iprot.readString() + self.part_vals[_key1013] = _val1014 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.eventType = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('markPartitionForEvent_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals)) + for kiter1015,viter1016 in self.part_vals.items(): + oprot.writeString(kiter1015) + oprot.writeString(viter1016) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.eventType is not None: + oprot.writeFieldBegin('eventType', TType.I32, 4) + oprot.writeI32(self.eventType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_vals) + value = (value * 31) ^ hash(self.eventType) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class markPartitionForEvent_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + - o5 + - o6 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 4 + (5, TType.STRUCT, 'o5', (UnknownPartitionException, UnknownPartitionException.thrift_spec), None, ), # 5 + (6, TType.STRUCT, 'o6', (InvalidPartitionException, InvalidPartitionException.thrift_spec), None, ), # 6 + ) + + def __init__(self, o1=None, o2=None, o3=None, o4=None, o5=None, o6=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + self.o5 = o5 + self.o6 = o6 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = UnknownTableException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.o5 = UnknownPartitionException() + self.o5.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.o6 = InvalidPartitionException() + self.o6.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('markPartitionForEvent_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + if self.o5 is not None: + oprot.writeFieldBegin('o5', TType.STRUCT, 5) + self.o5.write(oprot) + oprot.writeFieldEnd() + if self.o6 is not None: + oprot.writeFieldBegin('o6', TType.STRUCT, 6) + self.o6.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + value = (value * 31) ^ hash(self.o5) + value = (value * 31) ^ hash(self.o6) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class isPartitionMarkedForEvent_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - eventType + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.MAP, 'part_vals', (TType.STRING,None,TType.STRING,None), None, ), # 3 + (4, TType.I32, 'eventType', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, eventType=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.eventType = eventType + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.part_vals = {} + (_ktype1018, _vtype1019, _size1017 ) = iprot.readMapBegin() + for _i1021 in xrange(_size1017): + _key1022 = iprot.readString() + _val1023 = iprot.readString() + self.part_vals[_key1022] = _val1023 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.eventType = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('isPartitionMarkedForEvent_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals is not None: + oprot.writeFieldBegin('part_vals', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals)) + for kiter1024,viter1025 in self.part_vals.items(): + oprot.writeString(kiter1024) + oprot.writeString(viter1025) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.eventType is not None: + oprot.writeFieldBegin('eventType', TType.I32, 4) + oprot.writeI32(self.eventType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_vals) + value = (value * 31) ^ hash(self.eventType) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class isPartitionMarkedForEvent_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + - o5 + - o6 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 4 + (5, TType.STRUCT, 'o5', (UnknownPartitionException, UnknownPartitionException.thrift_spec), None, ), # 5 + (6, TType.STRUCT, 'o6', (InvalidPartitionException, InvalidPartitionException.thrift_spec), None, ), # 6 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None, o5=None, o6=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + self.o5 = o5 + self.o6 = o6 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = UnknownTableException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.o5 = UnknownPartitionException() + self.o5.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.o6 = InvalidPartitionException() + self.o6.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('isPartitionMarkedForEvent_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + if self.o5 is not None: + oprot.writeFieldBegin('o5', TType.STRUCT, 5) + self.o5.write(oprot) + oprot.writeFieldEnd() + if self.o6 is not None: + oprot.writeFieldBegin('o6', TType.STRUCT, 6) + self.o6.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + value = (value * 31) ^ hash(self.o5) + value = (value * 31) ^ hash(self.o6) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_index_args: + """ + Attributes: + - new_index + - index_table + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'new_index', (Index, Index.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'index_table', (Table, Table.thrift_spec), None, ), # 2 + ) + + def __init__(self, new_index=None, index_table=None,): + self.new_index = new_index + self.index_table = index_table + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.new_index = Index() + self.new_index.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.index_table = Table() + self.index_table.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_index_args') + if self.new_index is not None: + oprot.writeFieldBegin('new_index', TType.STRUCT, 1) + self.new_index.write(oprot) + oprot.writeFieldEnd() + if self.index_table is not None: + oprot.writeFieldBegin('index_table', TType.STRUCT, 2) + self.index_table.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.new_index) + value = (value * 31) ^ hash(self.index_table) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_index_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Index() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_index_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_index_args: + """ + Attributes: + - dbname + - base_tbl_name + - idx_name + - new_idx + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'base_tbl_name', None, None, ), # 2 + (3, TType.STRING, 'idx_name', None, None, ), # 3 + (4, TType.STRUCT, 'new_idx', (Index, Index.thrift_spec), None, ), # 4 + ) + + def __init__(self, dbname=None, base_tbl_name=None, idx_name=None, new_idx=None,): + self.dbname = dbname + self.base_tbl_name = base_tbl_name + self.idx_name = idx_name + self.new_idx = new_idx + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.base_tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.idx_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.new_idx = Index() + self.new_idx.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_index_args') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.base_tbl_name is not None: + oprot.writeFieldBegin('base_tbl_name', TType.STRING, 2) + oprot.writeString(self.base_tbl_name) + oprot.writeFieldEnd() + if self.idx_name is not None: + oprot.writeFieldBegin('idx_name', TType.STRING, 3) + oprot.writeString(self.idx_name) + oprot.writeFieldEnd() + if self.new_idx is not None: + oprot.writeFieldBegin('new_idx', TType.STRUCT, 4) + self.new_idx.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.base_tbl_name) + value = (value * 31) ^ hash(self.idx_name) + value = (value * 31) ^ hash(self.new_idx) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_index_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_index_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_index_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - index_name + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'index_name', None, None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, index_name=None, deleteData=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.index_name = index_name + self.deleteData = deleteData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.index_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_index_by_name_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.index_name is not None: + oprot.writeFieldBegin('index_name', TType.STRING, 3) + oprot.writeString(self.index_name) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.index_name) + value = (value * 31) ^ hash(self.deleteData) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_index_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_index_by_name_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_index_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - index_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'index_name', None, None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, index_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.index_name = index_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.index_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_index_by_name_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.index_name is not None: + oprot.writeFieldBegin('index_name', TType.STRING, 3) + oprot.writeString(self.index_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.index_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_index_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Index() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_index_by_name_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_indexes_args: + """ + Attributes: + - db_name + - tbl_name + - max_indexes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_indexes', None, -1, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_indexes = max_indexes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_indexes = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_indexes_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_indexes is not None: + oprot.writeFieldBegin('max_indexes', TType.I16, 3) + oprot.writeI16(self.max_indexes) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.max_indexes) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_indexes_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Index, Index.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1029, _size1026) = iprot.readListBegin() + for _i1030 in xrange(_size1026): + _elem1031 = Index() + _elem1031.read(iprot) + self.success.append(_elem1031) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_indexes_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1032 in self.success: + iter1032.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_index_names_args: + """ + Attributes: + - db_name + - tbl_name + - max_indexes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_indexes', None, -1, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_indexes = max_indexes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_indexes = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_index_names_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_indexes is not None: + oprot.writeFieldBegin('max_indexes', TType.I16, 3) + oprot.writeI16(self.max_indexes) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.max_indexes) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_index_names_result: + """ + Attributes: + - success + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o2=None,): + self.success = success + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1036, _size1033) = iprot.readListBegin() + for _i1037 in xrange(_size1033): + _elem1038 = iprot.readString() + self.success.append(_elem1038) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_index_names_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1039 in self.success: + oprot.writeString(iter1039) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 1) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_primary_keys_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (PrimaryKeysRequest, PrimaryKeysRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = PrimaryKeysRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_primary_keys_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_primary_keys_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (PrimaryKeysResponse, PrimaryKeysResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PrimaryKeysResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_primary_keys_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_foreign_keys_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (ForeignKeysRequest, ForeignKeysRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = ForeignKeysRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_foreign_keys_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_foreign_keys_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (ForeignKeysResponse, ForeignKeysResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ForeignKeysResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_foreign_keys_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_unique_constraints_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (UniqueConstraintsRequest, UniqueConstraintsRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = UniqueConstraintsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_unique_constraints_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_unique_constraints_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (UniqueConstraintsResponse, UniqueConstraintsResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = UniqueConstraintsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_unique_constraints_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_not_null_constraints_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (NotNullConstraintsRequest, NotNullConstraintsRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = NotNullConstraintsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_not_null_constraints_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_not_null_constraints_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (NotNullConstraintsResponse, NotNullConstraintsResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = NotNullConstraintsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_not_null_constraints_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class update_table_column_statistics_args: + """ + Attributes: + - stats_obj + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'stats_obj', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 1 + ) + + def __init__(self, stats_obj=None,): + self.stats_obj = stats_obj + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.stats_obj = ColumnStatistics() + self.stats_obj.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('update_table_column_statistics_args') + if self.stats_obj is not None: + oprot.writeFieldBegin('stats_obj', TType.STRUCT, 1) + self.stats_obj.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.stats_obj) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class update_table_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('update_table_column_statistics_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class update_partition_column_statistics_args: + """ + Attributes: + - stats_obj + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'stats_obj', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 1 + ) + + def __init__(self, stats_obj=None,): + self.stats_obj = stats_obj + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.stats_obj = ColumnStatistics() + self.stats_obj.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('update_partition_column_statistics_args') + if self.stats_obj is not None: + oprot.writeFieldBegin('stats_obj', TType.STRUCT, 1) + self.stats_obj.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.stats_obj) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class update_partition_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('update_partition_column_statistics_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_column_statistics_args: + """ + Attributes: + - db_name + - tbl_name + - col_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'col_name', None, None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, col_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.col_name = col_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.col_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_column_statistics_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.col_name is not None: + oprot.writeFieldBegin('col_name', TType.STRING, 3) + oprot.writeString(self.col_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.col_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ColumnStatistics() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidInputException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidObjectException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_column_statistics_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_column_statistics_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - col_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.STRING, 'col_name', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None, col_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.col_name = col_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.col_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_column_statistics_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.col_name is not None: + oprot.writeFieldBegin('col_name', TType.STRING, 4) + oprot.writeString(self.col_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_name) + value = (value * 31) ^ hash(self.col_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ColumnStatistics() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidInputException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidObjectException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_column_statistics_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_statistics_req_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (TableStatsRequest, TableStatsRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = TableStatsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_statistics_req_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_statistics_req_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (TableStatsResult, TableStatsResult.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = TableStatsResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_statistics_req_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_statistics_req_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (PartitionsStatsRequest, PartitionsStatsRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = PartitionsStatsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_statistics_req_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partitions_statistics_req_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (PartitionsStatsResult, PartitionsStatsResult.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PartitionsStatsResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partitions_statistics_req_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_aggr_stats_for_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (PartitionsStatsRequest, PartitionsStatsRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = PartitionsStatsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_aggr_stats_for_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_aggr_stats_for_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (AggrStats, AggrStats.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = AggrStats() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_aggr_stats_for_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class set_aggr_stats_for_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (SetPartitionsStatsRequest, SetPartitionsStatsRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = SetPartitionsStatsRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('set_aggr_stats_for_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class set_aggr_stats_for_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('set_aggr_stats_for_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class delete_partition_column_statistics_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - col_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.STRING, 'col_name', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None, col_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.col_name = col_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.col_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('delete_partition_column_statistics_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.col_name is not None: + oprot.writeFieldBegin('col_name', TType.STRING, 4) + oprot.writeString(self.col_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.part_name) + value = (value * 31) ^ hash(self.col_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class delete_partition_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('delete_partition_column_statistics_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class delete_table_column_statistics_args: + """ + Attributes: + - db_name + - tbl_name + - col_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'col_name', None, None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, col_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.col_name = col_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.col_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('delete_table_column_statistics_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.col_name is not None: + oprot.writeFieldBegin('col_name', TType.STRING, 3) + oprot.writeString(self.col_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + value = (value * 31) ^ hash(self.col_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class delete_table_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('delete_table_column_statistics_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_function_args: + """ + Attributes: + - func + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'func', (Function, Function.thrift_spec), None, ), # 1 + ) + + def __init__(self, func=None,): + self.func = func + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.func = Function() + self.func.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_function_args') + if self.func is not None: + oprot.writeFieldBegin('func', TType.STRUCT, 1) + self.func.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.func) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_function_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 + ) + + def __init__(self, o1=None, o2=None, o3=None, o4=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_function_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + value = (value * 31) ^ hash(self.o4) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_function_args: + """ + Attributes: + - dbName + - funcName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'funcName', None, None, ), # 2 + ) + + def __init__(self, dbName=None, funcName=None,): + self.dbName = dbName + self.funcName = funcName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.funcName = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_function_args') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.funcName is not None: + oprot.writeFieldBegin('funcName', TType.STRING, 2) + oprot.writeString(self.funcName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.funcName) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_function_result: + """ + Attributes: + - o1 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o3=None,): + self.o1 = o1 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_function_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 2) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_function_args: + """ + Attributes: + - dbName + - funcName + - newFunc + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'funcName', None, None, ), # 2 + (3, TType.STRUCT, 'newFunc', (Function, Function.thrift_spec), None, ), # 3 + ) + + def __init__(self, dbName=None, funcName=None, newFunc=None,): + self.dbName = dbName + self.funcName = funcName + self.newFunc = newFunc + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.funcName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.newFunc = Function() + self.newFunc.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_function_args') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.funcName is not None: + oprot.writeFieldBegin('funcName', TType.STRING, 2) + oprot.writeString(self.funcName) + oprot.writeFieldEnd() + if self.newFunc is not None: + oprot.writeFieldBegin('newFunc', TType.STRUCT, 3) + self.newFunc.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.funcName) + value = (value * 31) ^ hash(self.newFunc) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_function_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_function_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_functions_args: + """ + Attributes: + - dbName + - pattern + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'pattern', None, None, ), # 2 + ) + + def __init__(self, dbName=None, pattern=None,): + self.dbName = dbName + self.pattern = pattern + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pattern = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_functions_args') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.pattern is not None: + oprot.writeFieldBegin('pattern', TType.STRING, 2) + oprot.writeString(self.pattern) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.pattern) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_functions_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1043, _size1040) = iprot.readListBegin() + for _i1044 in xrange(_size1040): + _elem1045 = iprot.readString() + self.success.append(_elem1045) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_functions_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1046 in self.success: + oprot.writeString(iter1046) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_function_args: + """ + Attributes: + - dbName + - funcName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'funcName', None, None, ), # 2 + ) + + def __init__(self, dbName=None, funcName=None,): + self.dbName = dbName + self.funcName = funcName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.funcName = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_function_args') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.funcName is not None: + oprot.writeFieldBegin('funcName', TType.STRING, 2) + oprot.writeString(self.funcName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.funcName) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_function_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Function, Function.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Function() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_function_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_functions_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_functions_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_functions_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GetAllFunctionsResponse, GetAllFunctionsResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetAllFunctionsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_functions_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_role_args: + """ + Attributes: + - role + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'role', (Role, Role.thrift_spec), None, ), # 1 + ) + + def __init__(self, role=None,): + self.role = role + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.role = Role() + self.role.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_role_args') + if self.role is not None: + oprot.writeFieldBegin('role', TType.STRUCT, 1) + self.role.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.role) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_role_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_role_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_role_args: + """ + Attributes: + - role_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'role_name', None, None, ), # 1 + ) + + def __init__(self, role_name=None,): + self.role_name = role_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.role_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_role_args') + if self.role_name is not None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.role_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_role_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_role_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_role_names_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_role_names_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_role_names_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1050, _size1047) = iprot.readListBegin() + for _i1051 in xrange(_size1047): + _elem1052 = iprot.readString() + self.success.append(_elem1052) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_role_names_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1053 in self.success: + oprot.writeString(iter1053) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class grant_role_args: + """ + Attributes: + - role_name + - principal_name + - principal_type + - grantor + - grantorType + - grant_option + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'principal_name', None, None, ), # 2 + (3, TType.I32, 'principal_type', None, None, ), # 3 + (4, TType.STRING, 'grantor', None, None, ), # 4 + (5, TType.I32, 'grantorType', None, None, ), # 5 + (6, TType.BOOL, 'grant_option', None, None, ), # 6 + ) + + def __init__(self, role_name=None, principal_name=None, principal_type=None, grantor=None, grantorType=None, grant_option=None,): + self.role_name = role_name + self.principal_name = principal_name + self.principal_type = principal_type + self.grantor = grantor + self.grantorType = grantorType + self.grant_option = grant_option + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.role_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.principal_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principal_type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.grantor = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.grantorType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.grant_option = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('grant_role_args') + if self.role_name is not None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) + oprot.writeFieldEnd() + if self.principal_name is not None: + oprot.writeFieldBegin('principal_name', TType.STRING, 2) + oprot.writeString(self.principal_name) + oprot.writeFieldEnd() + if self.principal_type is not None: + oprot.writeFieldBegin('principal_type', TType.I32, 3) + oprot.writeI32(self.principal_type) + oprot.writeFieldEnd() + if self.grantor is not None: + oprot.writeFieldBegin('grantor', TType.STRING, 4) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.grantorType is not None: + oprot.writeFieldBegin('grantorType', TType.I32, 5) + oprot.writeI32(self.grantorType) + oprot.writeFieldEnd() + if self.grant_option is not None: + oprot.writeFieldBegin('grant_option', TType.BOOL, 6) + oprot.writeBool(self.grant_option) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.role_name) + value = (value * 31) ^ hash(self.principal_name) + value = (value * 31) ^ hash(self.principal_type) + value = (value * 31) ^ hash(self.grantor) + value = (value * 31) ^ hash(self.grantorType) + value = (value * 31) ^ hash(self.grant_option) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class grant_role_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('grant_role_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class revoke_role_args: + """ + Attributes: + - role_name + - principal_name + - principal_type + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'principal_name', None, None, ), # 2 + (3, TType.I32, 'principal_type', None, None, ), # 3 + ) + + def __init__(self, role_name=None, principal_name=None, principal_type=None,): + self.role_name = role_name + self.principal_name = principal_name + self.principal_type = principal_type + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.role_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.principal_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principal_type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('revoke_role_args') + if self.role_name is not None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) + oprot.writeFieldEnd() + if self.principal_name is not None: + oprot.writeFieldBegin('principal_name', TType.STRING, 2) + oprot.writeString(self.principal_name) + oprot.writeFieldEnd() + if self.principal_type is not None: + oprot.writeFieldBegin('principal_type', TType.I32, 3) + oprot.writeI32(self.principal_type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.role_name) + value = (value * 31) ^ hash(self.principal_name) + value = (value * 31) ^ hash(self.principal_type) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class revoke_role_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('revoke_role_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class list_roles_args: + """ + Attributes: + - principal_name + - principal_type + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.I32, 'principal_type', None, None, ), # 2 + ) + + def __init__(self, principal_name=None, principal_type=None,): + self.principal_name = principal_name + self.principal_type = principal_type + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principal_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.principal_type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('list_roles_args') + if self.principal_name is not None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) + oprot.writeFieldEnd() + if self.principal_type is not None: + oprot.writeFieldBegin('principal_type', TType.I32, 2) + oprot.writeI32(self.principal_type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.principal_name) + value = (value * 31) ^ hash(self.principal_type) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class list_roles_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Role, Role.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1057, _size1054) = iprot.readListBegin() + for _i1058 in xrange(_size1054): + _elem1059 = Role() + _elem1059.read(iprot) + self.success.append(_elem1059) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('list_roles_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1060 in self.success: + iter1060.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class grant_revoke_role_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (GrantRevokeRoleRequest, GrantRevokeRoleRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GrantRevokeRoleRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('grant_revoke_role_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class grant_revoke_role_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GrantRevokeRoleResponse, GrantRevokeRoleResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GrantRevokeRoleResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('grant_revoke_role_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_principals_in_role_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (GetPrincipalsInRoleRequest, GetPrincipalsInRoleRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GetPrincipalsInRoleRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_principals_in_role_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_principals_in_role_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GetPrincipalsInRoleResponse, GetPrincipalsInRoleResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetPrincipalsInRoleResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_principals_in_role_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_role_grants_for_principal_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (GetRoleGrantsForPrincipalRequest, GetRoleGrantsForPrincipalRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GetRoleGrantsForPrincipalRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_role_grants_for_principal_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_role_grants_for_principal_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GetRoleGrantsForPrincipalResponse, GetRoleGrantsForPrincipalResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetRoleGrantsForPrincipalResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_role_grants_for_principal_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_privilege_set_args: + """ + Attributes: + - hiveObject + - user_name + - group_names + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 1 + (2, TType.STRING, 'user_name', None, None, ), # 2 + (3, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 3 + ) + + def __init__(self, hiveObject=None, user_name=None, group_names=None,): + self.hiveObject = hiveObject + self.user_name = user_name + self.group_names = group_names + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.hiveObject = HiveObjectRef() + self.hiveObject.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.user_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.group_names = [] + (_etype1064, _size1061) = iprot.readListBegin() + for _i1065 in xrange(_size1061): + _elem1066 = iprot.readString() + self.group_names.append(_elem1066) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_privilege_set_args') + if self.hiveObject is not None: + oprot.writeFieldBegin('hiveObject', TType.STRUCT, 1) + self.hiveObject.write(oprot) + oprot.writeFieldEnd() + if self.user_name is not None: + oprot.writeFieldBegin('user_name', TType.STRING, 2) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names is not None: + oprot.writeFieldBegin('group_names', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter1067 in self.group_names: + oprot.writeString(iter1067) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.hiveObject) + value = (value * 31) ^ hash(self.user_name) + value = (value * 31) ^ hash(self.group_names) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_privilege_set_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PrincipalPrivilegeSet() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_privilege_set_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class list_privileges_args: + """ + Attributes: + - principal_name + - principal_type + - hiveObject + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.I32, 'principal_type', None, None, ), # 2 + (3, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 3 + ) + + def __init__(self, principal_name=None, principal_type=None, hiveObject=None,): + self.principal_name = principal_name + self.principal_type = principal_type + self.hiveObject = hiveObject + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principal_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.principal_type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.hiveObject = HiveObjectRef() + self.hiveObject.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('list_privileges_args') + if self.principal_name is not None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) + oprot.writeFieldEnd() + if self.principal_type is not None: + oprot.writeFieldBegin('principal_type', TType.I32, 2) + oprot.writeI32(self.principal_type) + oprot.writeFieldEnd() + if self.hiveObject is not None: + oprot.writeFieldBegin('hiveObject', TType.STRUCT, 3) + self.hiveObject.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.principal_name) + value = (value * 31) ^ hash(self.principal_type) + value = (value * 31) ^ hash(self.hiveObject) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class list_privileges_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(HiveObjectPrivilege, HiveObjectPrivilege.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1071, _size1068) = iprot.readListBegin() + for _i1072 in xrange(_size1068): + _elem1073 = HiveObjectPrivilege() + _elem1073.read(iprot) + self.success.append(_elem1073) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('list_privileges_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter1074 in self.success: + iter1074.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class grant_privileges_args: + """ + Attributes: + - privileges + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 1 + ) + + def __init__(self, privileges=None,): + self.privileges = privileges + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('grant_privileges_args') + if self.privileges is not None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 1) + self.privileges.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.privileges) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class grant_privileges_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('grant_privileges_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class revoke_privileges_args: + """ + Attributes: + - privileges + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 1 + ) + + def __init__(self, privileges=None,): + self.privileges = privileges + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('revoke_privileges_args') + if self.privileges is not None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 1) + self.privileges.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.privileges) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class revoke_privileges_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('revoke_privileges_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class grant_revoke_privileges_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (GrantRevokePrivilegeRequest, GrantRevokePrivilegeRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = GrantRevokePrivilegeRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('grant_revoke_privileges_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class grant_revoke_privileges_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GrantRevokePrivilegeResponse, GrantRevokePrivilegeResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GrantRevokePrivilegeResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('grant_revoke_privileges_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class set_ugi_args: + """ + Attributes: + - user_name + - group_names + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'user_name', None, None, ), # 1 + (2, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 2 + ) + + def __init__(self, user_name=None, group_names=None,): + self.user_name = user_name + self.group_names = group_names + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.user_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.group_names = [] + (_etype1078, _size1075) = iprot.readListBegin() + for _i1079 in xrange(_size1075): + _elem1080 = iprot.readString() + self.group_names.append(_elem1080) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('set_ugi_args') + if self.user_name is not None: + oprot.writeFieldBegin('user_name', TType.STRING, 1) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names is not None: + oprot.writeFieldBegin('group_names', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter1081 in self.group_names: + oprot.writeString(iter1081) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.user_name) + value = (value * 31) ^ hash(self.group_names) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class set_ugi_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1085, _size1082) = iprot.readListBegin() + for _i1086 in xrange(_size1082): + _elem1087 = iprot.readString() + self.success.append(_elem1087) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('set_ugi_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1088 in self.success: + oprot.writeString(iter1088) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_delegation_token_args: + """ + Attributes: + - token_owner + - renewer_kerberos_principal_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'token_owner', None, None, ), # 1 + (2, TType.STRING, 'renewer_kerberos_principal_name', None, None, ), # 2 + ) + + def __init__(self, token_owner=None, renewer_kerberos_principal_name=None,): + self.token_owner = token_owner + self.renewer_kerberos_principal_name = renewer_kerberos_principal_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.token_owner = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.renewer_kerberos_principal_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_delegation_token_args') + if self.token_owner is not None: + oprot.writeFieldBegin('token_owner', TType.STRING, 1) + oprot.writeString(self.token_owner) + oprot.writeFieldEnd() + if self.renewer_kerberos_principal_name is not None: + oprot.writeFieldBegin('renewer_kerberos_principal_name', TType.STRING, 2) + oprot.writeString(self.renewer_kerberos_principal_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.token_owner) + value = (value * 31) ^ hash(self.renewer_kerberos_principal_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_delegation_token_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRING, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_delegation_token_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class renew_delegation_token_args: + """ + Attributes: + - token_str_form + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'token_str_form', None, None, ), # 1 + ) + + def __init__(self, token_str_form=None,): + self.token_str_form = token_str_form + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.token_str_form = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('renew_delegation_token_args') + if self.token_str_form is not None: + oprot.writeFieldBegin('token_str_form', TType.STRING, 1) + oprot.writeString(self.token_str_form) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.token_str_form) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class renew_delegation_token_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.I64, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I64: + self.success = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('renew_delegation_token_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I64, 0) + oprot.writeI64(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class cancel_delegation_token_args: + """ + Attributes: + - token_str_form + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'token_str_form', None, None, ), # 1 + ) + + def __init__(self, token_str_form=None,): + self.token_str_form = token_str_form + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.token_str_form = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('cancel_delegation_token_args') + if self.token_str_form is not None: + oprot.writeFieldBegin('token_str_form', TType.STRING, 1) + oprot.writeString(self.token_str_form) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.token_str_form) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class cancel_delegation_token_result: + """ + Attributes: + - o1 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, o1=None,): + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('cancel_delegation_token_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_token_args: + """ + Attributes: + - token_identifier + - delegation_token + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'token_identifier', None, None, ), # 1 + (2, TType.STRING, 'delegation_token', None, None, ), # 2 + ) + + def __init__(self, token_identifier=None, delegation_token=None,): + self.token_identifier = token_identifier + self.delegation_token = delegation_token + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.token_identifier = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.delegation_token = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_token_args') + if self.token_identifier is not None: + oprot.writeFieldBegin('token_identifier', TType.STRING, 1) + oprot.writeString(self.token_identifier) + oprot.writeFieldEnd() + if self.delegation_token is not None: + oprot.writeFieldBegin('delegation_token', TType.STRING, 2) + oprot.writeString(self.delegation_token) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.token_identifier) + value = (value * 31) ^ hash(self.delegation_token) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_token_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_token_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class remove_token_args: + """ + Attributes: + - token_identifier + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'token_identifier', None, None, ), # 1 + ) + + def __init__(self, token_identifier=None,): + self.token_identifier = token_identifier + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.token_identifier = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('remove_token_args') + if self.token_identifier is not None: + oprot.writeFieldBegin('token_identifier', TType.STRING, 1) + oprot.writeString(self.token_identifier) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.token_identifier) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class remove_token_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('remove_token_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_token_args: + """ + Attributes: + - token_identifier + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'token_identifier', None, None, ), # 1 + ) + + def __init__(self, token_identifier=None,): + self.token_identifier = token_identifier + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.token_identifier = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_token_args') + if self.token_identifier is not None: + oprot.writeFieldBegin('token_identifier', TType.STRING, 1) + oprot.writeString(self.token_identifier) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.token_identifier) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_token_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRING, 'success', None, None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_token_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_token_identifiers_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_token_identifiers_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_token_identifiers_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1092, _size1089) = iprot.readListBegin() + for _i1093 in xrange(_size1089): + _elem1094 = iprot.readString() + self.success.append(_elem1094) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_token_identifiers_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1095 in self.success: + oprot.writeString(iter1095) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_master_key_args: + """ + Attributes: + - key + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'key', None, None, ), # 1 + ) + + def __init__(self, key=None,): + self.key = key + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.key = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_master_key_args') + if self.key is not None: + oprot.writeFieldBegin('key', TType.STRING, 1) + oprot.writeString(self.key) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.key) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_master_key_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_master_key_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class update_master_key_args: + """ + Attributes: + - seq_number + - key + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'seq_number', None, None, ), # 1 + (2, TType.STRING, 'key', None, None, ), # 2 + ) + + def __init__(self, seq_number=None, key=None,): + self.seq_number = seq_number + self.key = key + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.seq_number = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.key = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('update_master_key_args') + if self.seq_number is not None: + oprot.writeFieldBegin('seq_number', TType.I32, 1) + oprot.writeI32(self.seq_number) + oprot.writeFieldEnd() + if self.key is not None: + oprot.writeFieldBegin('key', TType.STRING, 2) + oprot.writeString(self.key) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.seq_number) + value = (value * 31) ^ hash(self.key) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class update_master_key_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('update_master_key_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class remove_master_key_args: + """ + Attributes: + - key_seq + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'key_seq', None, None, ), # 1 + ) + + def __init__(self, key_seq=None,): + self.key_seq = key_seq + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.key_seq = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('remove_master_key_args') + if self.key_seq is not None: + oprot.writeFieldBegin('key_seq', TType.I32, 1) + oprot.writeI32(self.key_seq) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.key_seq) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class remove_master_key_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('remove_master_key_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_master_keys_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_master_keys_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_master_keys_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype1099, _size1096) = iprot.readListBegin() + for _i1100 in xrange(_size1096): + _elem1101 = iprot.readString() + self.success.append(_elem1101) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_master_keys_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter1102 in self.success: + oprot.writeString(iter1102) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_open_txns_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_open_txns_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_open_txns_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GetOpenTxnsResponse, GetOpenTxnsResponse.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetOpenTxnsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_open_txns_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_open_txns_info_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_open_txns_info_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_open_txns_info_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GetOpenTxnsInfoResponse, GetOpenTxnsInfoResponse.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetOpenTxnsInfoResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_open_txns_info_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class open_txns_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (OpenTxnRequest, OpenTxnRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = OpenTxnRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('open_txns_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class open_txns_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (OpenTxnsResponse, OpenTxnsResponse.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = OpenTxnsResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('open_txns_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class abort_txn_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (AbortTxnRequest, AbortTxnRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = AbortTxnRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('abort_txn_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class abort_txn_result: + """ + Attributes: + - o1 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + ) + + def __init__(self, o1=None,): + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('abort_txn_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class abort_txns_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (AbortTxnsRequest, AbortTxnsRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = AbortTxnsRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('abort_txns_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class abort_txns_result: + """ + Attributes: + - o1 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + ) + + def __init__(self, o1=None,): + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('abort_txns_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class commit_txn_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (CommitTxnRequest, CommitTxnRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = CommitTxnRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('commit_txn_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class commit_txn_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('commit_txn_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class lock_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (LockRequest, LockRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = LockRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('lock_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class lock_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (LockResponse, LockResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = LockResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('lock_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class check_lock_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (CheckLockRequest, CheckLockRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = CheckLockRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('check_lock_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class check_lock_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (LockResponse, LockResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (NoSuchLockException, NoSuchLockException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = LockResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = NoSuchLockException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('check_lock_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class unlock_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (UnlockRequest, UnlockRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = UnlockRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('unlock_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class unlock_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchLockException, NoSuchLockException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (TxnOpenException, TxnOpenException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchLockException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnOpenException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('unlock_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class show_locks_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (ShowLocksRequest, ShowLocksRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = ShowLocksRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('show_locks_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class show_locks_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (ShowLocksResponse, ShowLocksResponse.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ShowLocksResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('show_locks_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class heartbeat_args: + """ + Attributes: + - ids + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'ids', (HeartbeatRequest, HeartbeatRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, ids=None,): + self.ids = ids + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.ids = HeartbeatRequest() + self.ids.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('heartbeat_args') + if self.ids is not None: + oprot.writeFieldBegin('ids', TType.STRUCT, 1) + self.ids.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.ids) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class heartbeat_result: + """ + Attributes: + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchLockException, NoSuchLockException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 3 + ) + + def __init__(self, o1=None, o2=None, o3=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchLockException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchTxnException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = TxnAbortedException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('heartbeat_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + value = (value * 31) ^ hash(self.o3) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class heartbeat_txn_range_args: + """ + Attributes: + - txns + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'txns', (HeartbeatTxnRangeRequest, HeartbeatTxnRangeRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, txns=None,): + self.txns = txns + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.txns = HeartbeatTxnRangeRequest() + self.txns.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('heartbeat_txn_range_args') + if self.txns is not None: + oprot.writeFieldBegin('txns', TType.STRUCT, 1) + self.txns.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.txns) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class heartbeat_txn_range_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (HeartbeatTxnRangeResponse, HeartbeatTxnRangeResponse.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = HeartbeatTxnRangeResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('heartbeat_txn_range_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class compact_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (CompactionRequest, CompactionRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = CompactionRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('compact_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class compact_result: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('compact_result') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class compact2_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (CompactionRequest, CompactionRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = CompactionRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('compact2_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class compact2_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (CompactionResponse, CompactionResponse.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = CompactionResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('compact2_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class show_compact_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (ShowCompactRequest, ShowCompactRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = ShowCompactRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('show_compact_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class show_compact_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (ShowCompactResponse, ShowCompactResponse.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ShowCompactResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('show_compact_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_dynamic_partitions_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (AddDynamicPartitions, AddDynamicPartitions.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = AddDynamicPartitions() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_dynamic_partitions_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_dynamic_partitions_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchTxnException, NoSuchTxnException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (TxnAbortedException, TxnAbortedException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchTxnException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = TxnAbortedException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_dynamic_partitions_result') + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.o1) + value = (value * 31) ^ hash(self.o2) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_next_notification_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (NotificationEventRequest, NotificationEventRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = NotificationEventRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_next_notification_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_next_notification_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (NotificationEventResponse, NotificationEventResponse.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = NotificationEventResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_next_notification_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_current_notificationEventId_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_current_notificationEventId_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_current_notificationEventId_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (CurrentNotificationEventId, CurrentNotificationEventId.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = CurrentNotificationEventId() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_current_notificationEventId_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class fire_listener_event_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (FireEventRequest, FireEventRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = FireEventRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('fire_listener_event_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class fire_listener_event_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (FireEventResponse, FireEventResponse.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = FireEventResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('fire_listener_event_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class flushCache_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('flushCache_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class flushCache_result: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('flushCache_result') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class cm_recycle_args: + """ + Attributes: + - request + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'request', (CmRecycleRequest, CmRecycleRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, request=None,): + self.request = request + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.request = CmRecycleRequest() + self.request.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('cm_recycle_args') + if self.request is not None: + oprot.writeFieldBegin('request', TType.STRUCT, 1) + self.request.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.request) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class cm_recycle_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (CmRecycleResponse, CmRecycleResponse.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = CmRecycleResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('cm_recycle_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_file_metadata_by_expr_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (GetFileMetadataByExprRequest, GetFileMetadataByExprRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetFileMetadataByExprRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_file_metadata_by_expr_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_file_metadata_by_expr_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GetFileMetadataByExprResult, GetFileMetadataByExprResult.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetFileMetadataByExprResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_file_metadata_by_expr_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_file_metadata_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (GetFileMetadataRequest, GetFileMetadataRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = GetFileMetadataRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_file_metadata_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_file_metadata_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (GetFileMetadataResult, GetFileMetadataResult.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = GetFileMetadataResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_file_metadata_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class put_file_metadata_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (PutFileMetadataRequest, PutFileMetadataRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = PutFileMetadataRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('put_file_metadata_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class put_file_metadata_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (PutFileMetadataResult, PutFileMetadataResult.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = PutFileMetadataResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('put_file_metadata_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class clear_file_metadata_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (ClearFileMetadataRequest, ClearFileMetadataRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = ClearFileMetadataRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('clear_file_metadata_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class clear_file_metadata_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (ClearFileMetadataResult, ClearFileMetadataResult.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ClearFileMetadataResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('clear_file_metadata_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class cache_file_metadata_args: + """ + Attributes: + - req + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'req', (CacheFileMetadataRequest, CacheFileMetadataRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, req=None,): + self.req = req + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.req = CacheFileMetadataRequest() + self.req.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('cache_file_metadata_args') + if self.req is not None: + oprot.writeFieldBegin('req', TType.STRUCT, 1) + self.req.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.req) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class cache_file_metadata_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (CacheFileMetadataResult, CacheFileMetadataResult.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = CacheFileMetadataResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('cache_file_metadata_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_metastore_db_uuid_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_metastore_db_uuid_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_metastore_db_uuid_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRING, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_metastore_db_uuid_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.o1) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) diff --git standalone-metastore/src/gen/thrift/gen-py/hive_metastore/__init__.py standalone-metastore/src/gen/thrift/gen-py/hive_metastore/__init__.py new file mode 100644 index 0000000..e9ee039 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-py/hive_metastore/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants', 'ThriftHiveMetastore'] diff --git standalone-metastore/src/gen/thrift/gen-py/hive_metastore/constants.py standalone-metastore/src/gen/thrift/gen-py/hive_metastore/constants.py new file mode 100644 index 0000000..5100236 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-py/hive_metastore/constants.py @@ -0,0 +1,35 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +from thrift.Thrift import TType, TMessageType, TException, TApplicationException +from ttypes import * + +DDL_TIME = "transient_lastDdlTime" +HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__" +HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__" +HIVE_FILTER_FIELD_LAST_ACCESS = "hive_filter_field_last_access__" +IS_ARCHIVED = "is_archived" +ORIGINAL_LOCATION = "original_location" +IS_IMMUTABLE = "immutable" +META_TABLE_COLUMNS = "columns" +META_TABLE_COLUMN_TYPES = "columns.types" +BUCKET_FIELD_NAME = "bucket_field_name" +BUCKET_COUNT = "bucket_count" +FIELD_TO_DIMENSION = "field_to_dimension" +META_TABLE_NAME = "name" +META_TABLE_DB = "db" +META_TABLE_LOCATION = "location" +META_TABLE_SERDE = "serde" +META_TABLE_PARTITION_COLUMNS = "partition_columns" +META_TABLE_PARTITION_COLUMN_TYPES = "partition_columns.types" +FILE_INPUT_FORMAT = "file.inputformat" +FILE_OUTPUT_FORMAT = "file.outputformat" +META_TABLE_STORAGE = "storage_handler" +TABLE_IS_TRANSACTIONAL = "transactional" +TABLE_NO_AUTO_COMPACT = "no_auto_compaction" +TABLE_TRANSACTIONAL_PROPERTIES = "transactional_properties" diff --git standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py new file mode 100644 index 0000000..53671e3 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -0,0 +1,15011 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +from thrift.Thrift import TType, TMessageType, TException, TApplicationException +import fb303.ttypes + + +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + +class HiveObjectType: + GLOBAL = 1 + DATABASE = 2 + TABLE = 3 + PARTITION = 4 + COLUMN = 5 + + _VALUES_TO_NAMES = { + 1: "GLOBAL", + 2: "DATABASE", + 3: "TABLE", + 4: "PARTITION", + 5: "COLUMN", + } + + _NAMES_TO_VALUES = { + "GLOBAL": 1, + "DATABASE": 2, + "TABLE": 3, + "PARTITION": 4, + "COLUMN": 5, + } + +class PrincipalType: + USER = 1 + ROLE = 2 + GROUP = 3 + + _VALUES_TO_NAMES = { + 1: "USER", + 2: "ROLE", + 3: "GROUP", + } + + _NAMES_TO_VALUES = { + "USER": 1, + "ROLE": 2, + "GROUP": 3, + } + +class PartitionEventType: + LOAD_DONE = 1 + + _VALUES_TO_NAMES = { + 1: "LOAD_DONE", + } + + _NAMES_TO_VALUES = { + "LOAD_DONE": 1, + } + +class TxnState: + COMMITTED = 1 + ABORTED = 2 + OPEN = 3 + + _VALUES_TO_NAMES = { + 1: "COMMITTED", + 2: "ABORTED", + 3: "OPEN", + } + + _NAMES_TO_VALUES = { + "COMMITTED": 1, + "ABORTED": 2, + "OPEN": 3, + } + +class LockLevel: + DB = 1 + TABLE = 2 + PARTITION = 3 + + _VALUES_TO_NAMES = { + 1: "DB", + 2: "TABLE", + 3: "PARTITION", + } + + _NAMES_TO_VALUES = { + "DB": 1, + "TABLE": 2, + "PARTITION": 3, + } + +class LockState: + ACQUIRED = 1 + WAITING = 2 + ABORT = 3 + NOT_ACQUIRED = 4 + + _VALUES_TO_NAMES = { + 1: "ACQUIRED", + 2: "WAITING", + 3: "ABORT", + 4: "NOT_ACQUIRED", + } + + _NAMES_TO_VALUES = { + "ACQUIRED": 1, + "WAITING": 2, + "ABORT": 3, + "NOT_ACQUIRED": 4, + } + +class LockType: + SHARED_READ = 1 + SHARED_WRITE = 2 + EXCLUSIVE = 3 + + _VALUES_TO_NAMES = { + 1: "SHARED_READ", + 2: "SHARED_WRITE", + 3: "EXCLUSIVE", + } + + _NAMES_TO_VALUES = { + "SHARED_READ": 1, + "SHARED_WRITE": 2, + "EXCLUSIVE": 3, + } + +class CompactionType: + MINOR = 1 + MAJOR = 2 + + _VALUES_TO_NAMES = { + 1: "MINOR", + 2: "MAJOR", + } + + _NAMES_TO_VALUES = { + "MINOR": 1, + "MAJOR": 2, + } + +class GrantRevokeType: + GRANT = 1 + REVOKE = 2 + + _VALUES_TO_NAMES = { + 1: "GRANT", + 2: "REVOKE", + } + + _NAMES_TO_VALUES = { + "GRANT": 1, + "REVOKE": 2, + } + +class DataOperationType: + SELECT = 1 + INSERT = 2 + UPDATE = 3 + DELETE = 4 + UNSET = 5 + NO_TXN = 6 + + _VALUES_TO_NAMES = { + 1: "SELECT", + 2: "INSERT", + 3: "UPDATE", + 4: "DELETE", + 5: "UNSET", + 6: "NO_TXN", + } + + _NAMES_TO_VALUES = { + "SELECT": 1, + "INSERT": 2, + "UPDATE": 3, + "DELETE": 4, + "UNSET": 5, + "NO_TXN": 6, + } + +class EventRequestType: + INSERT = 1 + UPDATE = 2 + DELETE = 3 + + _VALUES_TO_NAMES = { + 1: "INSERT", + 2: "UPDATE", + 3: "DELETE", + } + + _NAMES_TO_VALUES = { + "INSERT": 1, + "UPDATE": 2, + "DELETE": 3, + } + +class FunctionType: + JAVA = 1 + + _VALUES_TO_NAMES = { + 1: "JAVA", + } + + _NAMES_TO_VALUES = { + "JAVA": 1, + } + +class ResourceType: + JAR = 1 + FILE = 2 + ARCHIVE = 3 + + _VALUES_TO_NAMES = { + 1: "JAR", + 2: "FILE", + 3: "ARCHIVE", + } + + _NAMES_TO_VALUES = { + "JAR": 1, + "FILE": 2, + "ARCHIVE": 3, + } + +class FileMetadataExprType: + ORC_SARG = 1 + + _VALUES_TO_NAMES = { + 1: "ORC_SARG", + } + + _NAMES_TO_VALUES = { + "ORC_SARG": 1, + } + +class ClientCapability: + TEST_CAPABILITY = 1 + + _VALUES_TO_NAMES = { + 1: "TEST_CAPABILITY", + } + + _NAMES_TO_VALUES = { + "TEST_CAPABILITY": 1, + } + + +class Version: + """ + Attributes: + - version + - comments + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'version', None, None, ), # 1 + (2, TType.STRING, 'comments', None, None, ), # 2 + ) + + def __init__(self, version=None, comments=None,): + self.version = version + self.comments = comments + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.version = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.comments = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Version') + if self.version is not None: + oprot.writeFieldBegin('version', TType.STRING, 1) + oprot.writeString(self.version) + oprot.writeFieldEnd() + if self.comments is not None: + oprot.writeFieldBegin('comments', TType.STRING, 2) + oprot.writeString(self.comments) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.version) + value = (value * 31) ^ hash(self.comments) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class FieldSchema: + """ + Attributes: + - name + - type + - comment + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'type', None, None, ), # 2 + (3, TType.STRING, 'comment', None, None, ), # 3 + ) + + def __init__(self, name=None, type=None, comment=None,): + self.name = name + self.type = type + self.comment = comment + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.type = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.comment = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('FieldSchema') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.STRING, 2) + oprot.writeString(self.type) + oprot.writeFieldEnd() + if self.comment is not None: + oprot.writeFieldBegin('comment', TType.STRING, 3) + oprot.writeString(self.comment) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.name) + value = (value * 31) ^ hash(self.type) + value = (value * 31) ^ hash(self.comment) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class SQLPrimaryKey: + """ + Attributes: + - table_db + - table_name + - column_name + - key_seq + - pk_name + - enable_cstr + - validate_cstr + - rely_cstr + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table_db', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRING, 'column_name', None, None, ), # 3 + (4, TType.I32, 'key_seq', None, None, ), # 4 + (5, TType.STRING, 'pk_name', None, None, ), # 5 + (6, TType.BOOL, 'enable_cstr', None, None, ), # 6 + (7, TType.BOOL, 'validate_cstr', None, None, ), # 7 + (8, TType.BOOL, 'rely_cstr', None, None, ), # 8 + ) + + def __init__(self, table_db=None, table_name=None, column_name=None, key_seq=None, pk_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,): + self.table_db = table_db + self.table_name = table_name + self.column_name = column_name + self.key_seq = key_seq + self.pk_name = pk_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.table_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.key_seq = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.pk_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SQLPrimaryKey') + if self.table_db is not None: + oprot.writeFieldBegin('table_db', TType.STRING, 1) + oprot.writeString(self.table_db) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + if self.column_name is not None: + oprot.writeFieldBegin('column_name', TType.STRING, 3) + oprot.writeString(self.column_name) + oprot.writeFieldEnd() + if self.key_seq is not None: + oprot.writeFieldBegin('key_seq', TType.I32, 4) + oprot.writeI32(self.key_seq) + oprot.writeFieldEnd() + if self.pk_name is not None: + oprot.writeFieldBegin('pk_name', TType.STRING, 5) + oprot.writeString(self.pk_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin('enable_cstr', TType.BOOL, 6) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin('validate_cstr', TType.BOOL, 7) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin('rely_cstr', TType.BOOL, 8) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.table_db) + value = (value * 31) ^ hash(self.table_name) + value = (value * 31) ^ hash(self.column_name) + value = (value * 31) ^ hash(self.key_seq) + value = (value * 31) ^ hash(self.pk_name) + value = (value * 31) ^ hash(self.enable_cstr) + value = (value * 31) ^ hash(self.validate_cstr) + value = (value * 31) ^ hash(self.rely_cstr) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class SQLForeignKey: + """ + Attributes: + - pktable_db + - pktable_name + - pkcolumn_name + - fktable_db + - fktable_name + - fkcolumn_name + - key_seq + - update_rule + - delete_rule + - fk_name + - pk_name + - enable_cstr + - validate_cstr + - rely_cstr + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'pktable_db', None, None, ), # 1 + (2, TType.STRING, 'pktable_name', None, None, ), # 2 + (3, TType.STRING, 'pkcolumn_name', None, None, ), # 3 + (4, TType.STRING, 'fktable_db', None, None, ), # 4 + (5, TType.STRING, 'fktable_name', None, None, ), # 5 + (6, TType.STRING, 'fkcolumn_name', None, None, ), # 6 + (7, TType.I32, 'key_seq', None, None, ), # 7 + (8, TType.I32, 'update_rule', None, None, ), # 8 + (9, TType.I32, 'delete_rule', None, None, ), # 9 + (10, TType.STRING, 'fk_name', None, None, ), # 10 + (11, TType.STRING, 'pk_name', None, None, ), # 11 + (12, TType.BOOL, 'enable_cstr', None, None, ), # 12 + (13, TType.BOOL, 'validate_cstr', None, None, ), # 13 + (14, TType.BOOL, 'rely_cstr', None, None, ), # 14 + ) + + def __init__(self, pktable_db=None, pktable_name=None, pkcolumn_name=None, fktable_db=None, fktable_name=None, fkcolumn_name=None, key_seq=None, update_rule=None, delete_rule=None, fk_name=None, pk_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,): + self.pktable_db = pktable_db + self.pktable_name = pktable_name + self.pkcolumn_name = pkcolumn_name + self.fktable_db = fktable_db + self.fktable_name = fktable_name + self.fkcolumn_name = fkcolumn_name + self.key_seq = key_seq + self.update_rule = update_rule + self.delete_rule = delete_rule + self.fk_name = fk_name + self.pk_name = pk_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.pktable_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pktable_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.pkcolumn_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.fktable_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.fktable_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.fkcolumn_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.key_seq = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I32: + self.update_rule = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I32: + self.delete_rule = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.fk_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.pk_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SQLForeignKey') + if self.pktable_db is not None: + oprot.writeFieldBegin('pktable_db', TType.STRING, 1) + oprot.writeString(self.pktable_db) + oprot.writeFieldEnd() + if self.pktable_name is not None: + oprot.writeFieldBegin('pktable_name', TType.STRING, 2) + oprot.writeString(self.pktable_name) + oprot.writeFieldEnd() + if self.pkcolumn_name is not None: + oprot.writeFieldBegin('pkcolumn_name', TType.STRING, 3) + oprot.writeString(self.pkcolumn_name) + oprot.writeFieldEnd() + if self.fktable_db is not None: + oprot.writeFieldBegin('fktable_db', TType.STRING, 4) + oprot.writeString(self.fktable_db) + oprot.writeFieldEnd() + if self.fktable_name is not None: + oprot.writeFieldBegin('fktable_name', TType.STRING, 5) + oprot.writeString(self.fktable_name) + oprot.writeFieldEnd() + if self.fkcolumn_name is not None: + oprot.writeFieldBegin('fkcolumn_name', TType.STRING, 6) + oprot.writeString(self.fkcolumn_name) + oprot.writeFieldEnd() + if self.key_seq is not None: + oprot.writeFieldBegin('key_seq', TType.I32, 7) + oprot.writeI32(self.key_seq) + oprot.writeFieldEnd() + if self.update_rule is not None: + oprot.writeFieldBegin('update_rule', TType.I32, 8) + oprot.writeI32(self.update_rule) + oprot.writeFieldEnd() + if self.delete_rule is not None: + oprot.writeFieldBegin('delete_rule', TType.I32, 9) + oprot.writeI32(self.delete_rule) + oprot.writeFieldEnd() + if self.fk_name is not None: + oprot.writeFieldBegin('fk_name', TType.STRING, 10) + oprot.writeString(self.fk_name) + oprot.writeFieldEnd() + if self.pk_name is not None: + oprot.writeFieldBegin('pk_name', TType.STRING, 11) + oprot.writeString(self.pk_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin('enable_cstr', TType.BOOL, 12) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin('validate_cstr', TType.BOOL, 13) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin('rely_cstr', TType.BOOL, 14) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.pktable_db) + value = (value * 31) ^ hash(self.pktable_name) + value = (value * 31) ^ hash(self.pkcolumn_name) + value = (value * 31) ^ hash(self.fktable_db) + value = (value * 31) ^ hash(self.fktable_name) + value = (value * 31) ^ hash(self.fkcolumn_name) + value = (value * 31) ^ hash(self.key_seq) + value = (value * 31) ^ hash(self.update_rule) + value = (value * 31) ^ hash(self.delete_rule) + value = (value * 31) ^ hash(self.fk_name) + value = (value * 31) ^ hash(self.pk_name) + value = (value * 31) ^ hash(self.enable_cstr) + value = (value * 31) ^ hash(self.validate_cstr) + value = (value * 31) ^ hash(self.rely_cstr) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class SQLUniqueConstraint: + """ + Attributes: + - table_db + - table_name + - column_name + - key_seq + - uk_name + - enable_cstr + - validate_cstr + - rely_cstr + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table_db', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRING, 'column_name', None, None, ), # 3 + (4, TType.I32, 'key_seq', None, None, ), # 4 + (5, TType.STRING, 'uk_name', None, None, ), # 5 + (6, TType.BOOL, 'enable_cstr', None, None, ), # 6 + (7, TType.BOOL, 'validate_cstr', None, None, ), # 7 + (8, TType.BOOL, 'rely_cstr', None, None, ), # 8 + ) + + def __init__(self, table_db=None, table_name=None, column_name=None, key_seq=None, uk_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,): + self.table_db = table_db + self.table_name = table_name + self.column_name = column_name + self.key_seq = key_seq + self.uk_name = uk_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.table_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.key_seq = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.uk_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SQLUniqueConstraint') + if self.table_db is not None: + oprot.writeFieldBegin('table_db', TType.STRING, 1) + oprot.writeString(self.table_db) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + if self.column_name is not None: + oprot.writeFieldBegin('column_name', TType.STRING, 3) + oprot.writeString(self.column_name) + oprot.writeFieldEnd() + if self.key_seq is not None: + oprot.writeFieldBegin('key_seq', TType.I32, 4) + oprot.writeI32(self.key_seq) + oprot.writeFieldEnd() + if self.uk_name is not None: + oprot.writeFieldBegin('uk_name', TType.STRING, 5) + oprot.writeString(self.uk_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin('enable_cstr', TType.BOOL, 6) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin('validate_cstr', TType.BOOL, 7) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin('rely_cstr', TType.BOOL, 8) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.table_db) + value = (value * 31) ^ hash(self.table_name) + value = (value * 31) ^ hash(self.column_name) + value = (value * 31) ^ hash(self.key_seq) + value = (value * 31) ^ hash(self.uk_name) + value = (value * 31) ^ hash(self.enable_cstr) + value = (value * 31) ^ hash(self.validate_cstr) + value = (value * 31) ^ hash(self.rely_cstr) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class SQLNotNullConstraint: + """ + Attributes: + - table_db + - table_name + - column_name + - nn_name + - enable_cstr + - validate_cstr + - rely_cstr + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table_db', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRING, 'column_name', None, None, ), # 3 + (4, TType.STRING, 'nn_name', None, None, ), # 4 + (5, TType.BOOL, 'enable_cstr', None, None, ), # 5 + (6, TType.BOOL, 'validate_cstr', None, None, ), # 6 + (7, TType.BOOL, 'rely_cstr', None, None, ), # 7 + ) + + def __init__(self, table_db=None, table_name=None, column_name=None, nn_name=None, enable_cstr=None, validate_cstr=None, rely_cstr=None,): + self.table_db = table_db + self.table_name = table_name + self.column_name = column_name + self.nn_name = nn_name + self.enable_cstr = enable_cstr + self.validate_cstr = validate_cstr + self.rely_cstr = rely_cstr + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.table_db = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.nn_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.enable_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.validate_cstr = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.rely_cstr = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SQLNotNullConstraint') + if self.table_db is not None: + oprot.writeFieldBegin('table_db', TType.STRING, 1) + oprot.writeString(self.table_db) + oprot.writeFieldEnd() + if self.table_name is not None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + if self.column_name is not None: + oprot.writeFieldBegin('column_name', TType.STRING, 3) + oprot.writeString(self.column_name) + oprot.writeFieldEnd() + if self.nn_name is not None: + oprot.writeFieldBegin('nn_name', TType.STRING, 4) + oprot.writeString(self.nn_name) + oprot.writeFieldEnd() + if self.enable_cstr is not None: + oprot.writeFieldBegin('enable_cstr', TType.BOOL, 5) + oprot.writeBool(self.enable_cstr) + oprot.writeFieldEnd() + if self.validate_cstr is not None: + oprot.writeFieldBegin('validate_cstr', TType.BOOL, 6) + oprot.writeBool(self.validate_cstr) + oprot.writeFieldEnd() + if self.rely_cstr is not None: + oprot.writeFieldBegin('rely_cstr', TType.BOOL, 7) + oprot.writeBool(self.rely_cstr) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.table_db) + value = (value * 31) ^ hash(self.table_name) + value = (value * 31) ^ hash(self.column_name) + value = (value * 31) ^ hash(self.nn_name) + value = (value * 31) ^ hash(self.enable_cstr) + value = (value * 31) ^ hash(self.validate_cstr) + value = (value * 31) ^ hash(self.rely_cstr) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Type: + """ + Attributes: + - name + - type1 + - type2 + - fields + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'type1', None, None, ), # 2 + (3, TType.STRING, 'type2', None, None, ), # 3 + (4, TType.LIST, 'fields', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 4 + ) + + def __init__(self, name=None, type1=None, type2=None, fields=None,): + self.name = name + self.type1 = type1 + self.type2 = type2 + self.fields = fields + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.type1 = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.type2 = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.fields = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in xrange(_size0): + _elem5 = FieldSchema() + _elem5.read(iprot) + self.fields.append(_elem5) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Type') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.type1 is not None: + oprot.writeFieldBegin('type1', TType.STRING, 2) + oprot.writeString(self.type1) + oprot.writeFieldEnd() + if self.type2 is not None: + oprot.writeFieldBegin('type2', TType.STRING, 3) + oprot.writeString(self.type2) + oprot.writeFieldEnd() + if self.fields is not None: + oprot.writeFieldBegin('fields', TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.fields)) + for iter6 in self.fields: + iter6.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.name) + value = (value * 31) ^ hash(self.type1) + value = (value * 31) ^ hash(self.type2) + value = (value * 31) ^ hash(self.fields) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class HiveObjectRef: + """ + Attributes: + - objectType + - dbName + - objectName + - partValues + - columnName + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'objectType', None, None, ), # 1 + (2, TType.STRING, 'dbName', None, None, ), # 2 + (3, TType.STRING, 'objectName', None, None, ), # 3 + (4, TType.LIST, 'partValues', (TType.STRING,None), None, ), # 4 + (5, TType.STRING, 'columnName', None, None, ), # 5 + ) + + def __init__(self, objectType=None, dbName=None, objectName=None, partValues=None, columnName=None,): + self.objectType = objectType + self.dbName = dbName + self.objectName = objectName + self.partValues = partValues + self.columnName = columnName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.objectType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.objectName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.partValues = [] + (_etype10, _size7) = iprot.readListBegin() + for _i11 in xrange(_size7): + _elem12 = iprot.readString() + self.partValues.append(_elem12) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.columnName = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('HiveObjectRef') + if self.objectType is not None: + oprot.writeFieldBegin('objectType', TType.I32, 1) + oprot.writeI32(self.objectType) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 2) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.objectName is not None: + oprot.writeFieldBegin('objectName', TType.STRING, 3) + oprot.writeString(self.objectName) + oprot.writeFieldEnd() + if self.partValues is not None: + oprot.writeFieldBegin('partValues', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.partValues)) + for iter13 in self.partValues: + oprot.writeString(iter13) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.columnName is not None: + oprot.writeFieldBegin('columnName', TType.STRING, 5) + oprot.writeString(self.columnName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.objectType) + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.objectName) + value = (value * 31) ^ hash(self.partValues) + value = (value * 31) ^ hash(self.columnName) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PrivilegeGrantInfo: + """ + Attributes: + - privilege + - createTime + - grantor + - grantorType + - grantOption + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'privilege', None, None, ), # 1 + (2, TType.I32, 'createTime', None, None, ), # 2 + (3, TType.STRING, 'grantor', None, None, ), # 3 + (4, TType.I32, 'grantorType', None, None, ), # 4 + (5, TType.BOOL, 'grantOption', None, None, ), # 5 + ) + + def __init__(self, privilege=None, createTime=None, grantor=None, grantorType=None, grantOption=None,): + self.privilege = privilege + self.createTime = createTime + self.grantor = grantor + self.grantorType = grantorType + self.grantOption = grantOption + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.privilege = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.grantor = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.grantorType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.grantOption = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PrivilegeGrantInfo') + if self.privilege is not None: + oprot.writeFieldBegin('privilege', TType.STRING, 1) + oprot.writeString(self.privilege) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin('createTime', TType.I32, 2) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor is not None: + oprot.writeFieldBegin('grantor', TType.STRING, 3) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.grantorType is not None: + oprot.writeFieldBegin('grantorType', TType.I32, 4) + oprot.writeI32(self.grantorType) + oprot.writeFieldEnd() + if self.grantOption is not None: + oprot.writeFieldBegin('grantOption', TType.BOOL, 5) + oprot.writeBool(self.grantOption) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.privilege) + value = (value * 31) ^ hash(self.createTime) + value = (value * 31) ^ hash(self.grantor) + value = (value * 31) ^ hash(self.grantorType) + value = (value * 31) ^ hash(self.grantOption) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class HiveObjectPrivilege: + """ + Attributes: + - hiveObject + - principalName + - principalType + - grantInfo + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 1 + (2, TType.STRING, 'principalName', None, None, ), # 2 + (3, TType.I32, 'principalType', None, None, ), # 3 + (4, TType.STRUCT, 'grantInfo', (PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec), None, ), # 4 + ) + + def __init__(self, hiveObject=None, principalName=None, principalType=None, grantInfo=None,): + self.hiveObject = hiveObject + self.principalName = principalName + self.principalType = principalType + self.grantInfo = grantInfo + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.hiveObject = HiveObjectRef() + self.hiveObject.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.principalName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principalType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.grantInfo = PrivilegeGrantInfo() + self.grantInfo.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('HiveObjectPrivilege') + if self.hiveObject is not None: + oprot.writeFieldBegin('hiveObject', TType.STRUCT, 1) + self.hiveObject.write(oprot) + oprot.writeFieldEnd() + if self.principalName is not None: + oprot.writeFieldBegin('principalName', TType.STRING, 2) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.principalType is not None: + oprot.writeFieldBegin('principalType', TType.I32, 3) + oprot.writeI32(self.principalType) + oprot.writeFieldEnd() + if self.grantInfo is not None: + oprot.writeFieldBegin('grantInfo', TType.STRUCT, 4) + self.grantInfo.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.hiveObject) + value = (value * 31) ^ hash(self.principalName) + value = (value * 31) ^ hash(self.principalType) + value = (value * 31) ^ hash(self.grantInfo) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PrivilegeBag: + """ + Attributes: + - privileges + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'privileges', (TType.STRUCT,(HiveObjectPrivilege, HiveObjectPrivilege.thrift_spec)), None, ), # 1 + ) + + def __init__(self, privileges=None,): + self.privileges = privileges + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.privileges = [] + (_etype17, _size14) = iprot.readListBegin() + for _i18 in xrange(_size14): + _elem19 = HiveObjectPrivilege() + _elem19.read(iprot) + self.privileges.append(_elem19) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PrivilegeBag') + if self.privileges is not None: + oprot.writeFieldBegin('privileges', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.privileges)) + for iter20 in self.privileges: + iter20.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.privileges) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PrincipalPrivilegeSet: + """ + Attributes: + - userPrivileges + - groupPrivileges + - rolePrivileges + """ + + thrift_spec = ( + None, # 0 + (1, TType.MAP, 'userPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 1 + (2, TType.MAP, 'groupPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 2 + (3, TType.MAP, 'rolePrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 3 + ) + + def __init__(self, userPrivileges=None, groupPrivileges=None, rolePrivileges=None,): + self.userPrivileges = userPrivileges + self.groupPrivileges = groupPrivileges + self.rolePrivileges = rolePrivileges + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.userPrivileges = {} + (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin() + for _i25 in xrange(_size21): + _key26 = iprot.readString() + _val27 = [] + (_etype31, _size28) = iprot.readListBegin() + for _i32 in xrange(_size28): + _elem33 = PrivilegeGrantInfo() + _elem33.read(iprot) + _val27.append(_elem33) + iprot.readListEnd() + self.userPrivileges[_key26] = _val27 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.groupPrivileges = {} + (_ktype35, _vtype36, _size34 ) = iprot.readMapBegin() + for _i38 in xrange(_size34): + _key39 = iprot.readString() + _val40 = [] + (_etype44, _size41) = iprot.readListBegin() + for _i45 in xrange(_size41): + _elem46 = PrivilegeGrantInfo() + _elem46.read(iprot) + _val40.append(_elem46) + iprot.readListEnd() + self.groupPrivileges[_key39] = _val40 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.rolePrivileges = {} + (_ktype48, _vtype49, _size47 ) = iprot.readMapBegin() + for _i51 in xrange(_size47): + _key52 = iprot.readString() + _val53 = [] + (_etype57, _size54) = iprot.readListBegin() + for _i58 in xrange(_size54): + _elem59 = PrivilegeGrantInfo() + _elem59.read(iprot) + _val53.append(_elem59) + iprot.readListEnd() + self.rolePrivileges[_key52] = _val53 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PrincipalPrivilegeSet') + if self.userPrivileges is not None: + oprot.writeFieldBegin('userPrivileges', TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.userPrivileges)) + for kiter60,viter61 in self.userPrivileges.items(): + oprot.writeString(kiter60) + oprot.writeListBegin(TType.STRUCT, len(viter61)) + for iter62 in viter61: + iter62.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.groupPrivileges is not None: + oprot.writeFieldBegin('groupPrivileges', TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.groupPrivileges)) + for kiter63,viter64 in self.groupPrivileges.items(): + oprot.writeString(kiter63) + oprot.writeListBegin(TType.STRUCT, len(viter64)) + for iter65 in viter64: + iter65.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.rolePrivileges is not None: + oprot.writeFieldBegin('rolePrivileges', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.rolePrivileges)) + for kiter66,viter67 in self.rolePrivileges.items(): + oprot.writeString(kiter66) + oprot.writeListBegin(TType.STRUCT, len(viter67)) + for iter68 in viter67: + iter68.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.userPrivileges) + value = (value * 31) ^ hash(self.groupPrivileges) + value = (value * 31) ^ hash(self.rolePrivileges) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GrantRevokePrivilegeRequest: + """ + Attributes: + - requestType + - privileges + - revokeGrantOption + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'requestType', None, None, ), # 1 + (2, TType.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 2 + (3, TType.BOOL, 'revokeGrantOption', None, None, ), # 3 + ) + + def __init__(self, requestType=None, privileges=None, revokeGrantOption=None,): + self.requestType = requestType + self.privileges = privileges + self.revokeGrantOption = revokeGrantOption + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.requestType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.revokeGrantOption = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GrantRevokePrivilegeRequest') + if self.requestType is not None: + oprot.writeFieldBegin('requestType', TType.I32, 1) + oprot.writeI32(self.requestType) + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 2) + self.privileges.write(oprot) + oprot.writeFieldEnd() + if self.revokeGrantOption is not None: + oprot.writeFieldBegin('revokeGrantOption', TType.BOOL, 3) + oprot.writeBool(self.revokeGrantOption) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.requestType) + value = (value * 31) ^ hash(self.privileges) + value = (value * 31) ^ hash(self.revokeGrantOption) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GrantRevokePrivilegeResponse: + """ + Attributes: + - success + """ + + thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'success', None, None, ), # 1 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GrantRevokePrivilegeResponse') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 1) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Role: + """ + Attributes: + - roleName + - createTime + - ownerName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'roleName', None, None, ), # 1 + (2, TType.I32, 'createTime', None, None, ), # 2 + (3, TType.STRING, 'ownerName', None, None, ), # 3 + ) + + def __init__(self, roleName=None, createTime=None, ownerName=None,): + self.roleName = roleName + self.createTime = createTime + self.ownerName = ownerName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.roleName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.ownerName = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Role') + if self.roleName is not None: + oprot.writeFieldBegin('roleName', TType.STRING, 1) + oprot.writeString(self.roleName) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin('createTime', TType.I32, 2) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin('ownerName', TType.STRING, 3) + oprot.writeString(self.ownerName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.roleName) + value = (value * 31) ^ hash(self.createTime) + value = (value * 31) ^ hash(self.ownerName) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class RolePrincipalGrant: + """ + Attributes: + - roleName + - principalName + - principalType + - grantOption + - grantTime + - grantorName + - grantorPrincipalType + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'roleName', None, None, ), # 1 + (2, TType.STRING, 'principalName', None, None, ), # 2 + (3, TType.I32, 'principalType', None, None, ), # 3 + (4, TType.BOOL, 'grantOption', None, None, ), # 4 + (5, TType.I32, 'grantTime', None, None, ), # 5 + (6, TType.STRING, 'grantorName', None, None, ), # 6 + (7, TType.I32, 'grantorPrincipalType', None, None, ), # 7 + ) + + def __init__(self, roleName=None, principalName=None, principalType=None, grantOption=None, grantTime=None, grantorName=None, grantorPrincipalType=None,): + self.roleName = roleName + self.principalName = principalName + self.principalType = principalType + self.grantOption = grantOption + self.grantTime = grantTime + self.grantorName = grantorName + self.grantorPrincipalType = grantorPrincipalType + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.roleName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.principalName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principalType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.grantOption = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.grantTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.grantorName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.grantorPrincipalType = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('RolePrincipalGrant') + if self.roleName is not None: + oprot.writeFieldBegin('roleName', TType.STRING, 1) + oprot.writeString(self.roleName) + oprot.writeFieldEnd() + if self.principalName is not None: + oprot.writeFieldBegin('principalName', TType.STRING, 2) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.principalType is not None: + oprot.writeFieldBegin('principalType', TType.I32, 3) + oprot.writeI32(self.principalType) + oprot.writeFieldEnd() + if self.grantOption is not None: + oprot.writeFieldBegin('grantOption', TType.BOOL, 4) + oprot.writeBool(self.grantOption) + oprot.writeFieldEnd() + if self.grantTime is not None: + oprot.writeFieldBegin('grantTime', TType.I32, 5) + oprot.writeI32(self.grantTime) + oprot.writeFieldEnd() + if self.grantorName is not None: + oprot.writeFieldBegin('grantorName', TType.STRING, 6) + oprot.writeString(self.grantorName) + oprot.writeFieldEnd() + if self.grantorPrincipalType is not None: + oprot.writeFieldBegin('grantorPrincipalType', TType.I32, 7) + oprot.writeI32(self.grantorPrincipalType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.roleName) + value = (value * 31) ^ hash(self.principalName) + value = (value * 31) ^ hash(self.principalType) + value = (value * 31) ^ hash(self.grantOption) + value = (value * 31) ^ hash(self.grantTime) + value = (value * 31) ^ hash(self.grantorName) + value = (value * 31) ^ hash(self.grantorPrincipalType) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetRoleGrantsForPrincipalRequest: + """ + Attributes: + - principal_name + - principal_type + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.I32, 'principal_type', None, None, ), # 2 + ) + + def __init__(self, principal_name=None, principal_type=None,): + self.principal_name = principal_name + self.principal_type = principal_type + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principal_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.principal_type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetRoleGrantsForPrincipalRequest') + if self.principal_name is not None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) + oprot.writeFieldEnd() + if self.principal_type is not None: + oprot.writeFieldBegin('principal_type', TType.I32, 2) + oprot.writeI32(self.principal_type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.principal_name is None: + raise TProtocol.TProtocolException(message='Required field principal_name is unset!') + if self.principal_type is None: + raise TProtocol.TProtocolException(message='Required field principal_type is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.principal_name) + value = (value * 31) ^ hash(self.principal_type) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetRoleGrantsForPrincipalResponse: + """ + Attributes: + - principalGrants + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'principalGrants', (TType.STRUCT,(RolePrincipalGrant, RolePrincipalGrant.thrift_spec)), None, ), # 1 + ) + + def __init__(self, principalGrants=None,): + self.principalGrants = principalGrants + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.principalGrants = [] + (_etype72, _size69) = iprot.readListBegin() + for _i73 in xrange(_size69): + _elem74 = RolePrincipalGrant() + _elem74.read(iprot) + self.principalGrants.append(_elem74) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetRoleGrantsForPrincipalResponse') + if self.principalGrants is not None: + oprot.writeFieldBegin('principalGrants', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.principalGrants)) + for iter75 in self.principalGrants: + iter75.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.principalGrants is None: + raise TProtocol.TProtocolException(message='Required field principalGrants is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.principalGrants) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetPrincipalsInRoleRequest: + """ + Attributes: + - roleName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'roleName', None, None, ), # 1 + ) + + def __init__(self, roleName=None,): + self.roleName = roleName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.roleName = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetPrincipalsInRoleRequest') + if self.roleName is not None: + oprot.writeFieldBegin('roleName', TType.STRING, 1) + oprot.writeString(self.roleName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.roleName is None: + raise TProtocol.TProtocolException(message='Required field roleName is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.roleName) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetPrincipalsInRoleResponse: + """ + Attributes: + - principalGrants + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'principalGrants', (TType.STRUCT,(RolePrincipalGrant, RolePrincipalGrant.thrift_spec)), None, ), # 1 + ) + + def __init__(self, principalGrants=None,): + self.principalGrants = principalGrants + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.principalGrants = [] + (_etype79, _size76) = iprot.readListBegin() + for _i80 in xrange(_size76): + _elem81 = RolePrincipalGrant() + _elem81.read(iprot) + self.principalGrants.append(_elem81) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetPrincipalsInRoleResponse') + if self.principalGrants is not None: + oprot.writeFieldBegin('principalGrants', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.principalGrants)) + for iter82 in self.principalGrants: + iter82.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.principalGrants is None: + raise TProtocol.TProtocolException(message='Required field principalGrants is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.principalGrants) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GrantRevokeRoleRequest: + """ + Attributes: + - requestType + - roleName + - principalName + - principalType + - grantor + - grantorType + - grantOption + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'requestType', None, None, ), # 1 + (2, TType.STRING, 'roleName', None, None, ), # 2 + (3, TType.STRING, 'principalName', None, None, ), # 3 + (4, TType.I32, 'principalType', None, None, ), # 4 + (5, TType.STRING, 'grantor', None, None, ), # 5 + (6, TType.I32, 'grantorType', None, None, ), # 6 + (7, TType.BOOL, 'grantOption', None, None, ), # 7 + ) + + def __init__(self, requestType=None, roleName=None, principalName=None, principalType=None, grantor=None, grantorType=None, grantOption=None,): + self.requestType = requestType + self.roleName = roleName + self.principalName = principalName + self.principalType = principalType + self.grantor = grantor + self.grantorType = grantorType + self.grantOption = grantOption + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.requestType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.roleName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.principalName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.principalType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.grantor = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.grantorType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.grantOption = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GrantRevokeRoleRequest') + if self.requestType is not None: + oprot.writeFieldBegin('requestType', TType.I32, 1) + oprot.writeI32(self.requestType) + oprot.writeFieldEnd() + if self.roleName is not None: + oprot.writeFieldBegin('roleName', TType.STRING, 2) + oprot.writeString(self.roleName) + oprot.writeFieldEnd() + if self.principalName is not None: + oprot.writeFieldBegin('principalName', TType.STRING, 3) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.principalType is not None: + oprot.writeFieldBegin('principalType', TType.I32, 4) + oprot.writeI32(self.principalType) + oprot.writeFieldEnd() + if self.grantor is not None: + oprot.writeFieldBegin('grantor', TType.STRING, 5) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.grantorType is not None: + oprot.writeFieldBegin('grantorType', TType.I32, 6) + oprot.writeI32(self.grantorType) + oprot.writeFieldEnd() + if self.grantOption is not None: + oprot.writeFieldBegin('grantOption', TType.BOOL, 7) + oprot.writeBool(self.grantOption) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.requestType) + value = (value * 31) ^ hash(self.roleName) + value = (value * 31) ^ hash(self.principalName) + value = (value * 31) ^ hash(self.principalType) + value = (value * 31) ^ hash(self.grantor) + value = (value * 31) ^ hash(self.grantorType) + value = (value * 31) ^ hash(self.grantOption) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GrantRevokeRoleResponse: + """ + Attributes: + - success + """ + + thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'success', None, None, ), # 1 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GrantRevokeRoleResponse') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 1) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Database: + """ + Attributes: + - name + - description + - locationUri + - parameters + - privileges + - ownerName + - ownerType + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'description', None, None, ), # 2 + (3, TType.STRING, 'locationUri', None, None, ), # 3 + (4, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 4 + (5, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 5 + (6, TType.STRING, 'ownerName', None, None, ), # 6 + (7, TType.I32, 'ownerType', None, None, ), # 7 + ) + + def __init__(self, name=None, description=None, locationUri=None, parameters=None, privileges=None, ownerName=None, ownerType=None,): + self.name = name + self.description = description + self.locationUri = locationUri + self.parameters = parameters + self.privileges = privileges + self.ownerName = ownerName + self.ownerType = ownerType + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.description = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.locationUri = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.parameters = {} + (_ktype84, _vtype85, _size83 ) = iprot.readMapBegin() + for _i87 in xrange(_size83): + _key88 = iprot.readString() + _val89 = iprot.readString() + self.parameters[_key88] = _val89 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.ownerName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.ownerType = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Database') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.description is not None: + oprot.writeFieldBegin('description', TType.STRING, 2) + oprot.writeString(self.description) + oprot.writeFieldEnd() + if self.locationUri is not None: + oprot.writeFieldBegin('locationUri', TType.STRING, 3) + oprot.writeString(self.locationUri) + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin('parameters', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter90,viter91 in self.parameters.items(): + oprot.writeString(kiter90) + oprot.writeString(viter91) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 5) + self.privileges.write(oprot) + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin('ownerName', TType.STRING, 6) + oprot.writeString(self.ownerName) + oprot.writeFieldEnd() + if self.ownerType is not None: + oprot.writeFieldBegin('ownerType', TType.I32, 7) + oprot.writeI32(self.ownerType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.name) + value = (value * 31) ^ hash(self.description) + value = (value * 31) ^ hash(self.locationUri) + value = (value * 31) ^ hash(self.parameters) + value = (value * 31) ^ hash(self.privileges) + value = (value * 31) ^ hash(self.ownerName) + value = (value * 31) ^ hash(self.ownerType) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class SerDeInfo: + """ + Attributes: + - name + - serializationLib + - parameters + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'serializationLib', None, None, ), # 2 + (3, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 3 + ) + + def __init__(self, name=None, serializationLib=None, parameters=None,): + self.name = name + self.serializationLib = serializationLib + self.parameters = parameters + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.serializationLib = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.parameters = {} + (_ktype93, _vtype94, _size92 ) = iprot.readMapBegin() + for _i96 in xrange(_size92): + _key97 = iprot.readString() + _val98 = iprot.readString() + self.parameters[_key97] = _val98 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SerDeInfo') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.serializationLib is not None: + oprot.writeFieldBegin('serializationLib', TType.STRING, 2) + oprot.writeString(self.serializationLib) + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin('parameters', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter99,viter100 in self.parameters.items(): + oprot.writeString(kiter99) + oprot.writeString(viter100) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.name) + value = (value * 31) ^ hash(self.serializationLib) + value = (value * 31) ^ hash(self.parameters) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Order: + """ + Attributes: + - col + - order + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'col', None, None, ), # 1 + (2, TType.I32, 'order', None, None, ), # 2 + ) + + def __init__(self, col=None, order=None,): + self.col = col + self.order = order + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.col = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.order = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Order') + if self.col is not None: + oprot.writeFieldBegin('col', TType.STRING, 1) + oprot.writeString(self.col) + oprot.writeFieldEnd() + if self.order is not None: + oprot.writeFieldBegin('order', TType.I32, 2) + oprot.writeI32(self.order) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.col) + value = (value * 31) ^ hash(self.order) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class SkewedInfo: + """ + Attributes: + - skewedColNames + - skewedColValues + - skewedColValueLocationMaps + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'skewedColNames', (TType.STRING,None), None, ), # 1 + (2, TType.LIST, 'skewedColValues', (TType.LIST,(TType.STRING,None)), None, ), # 2 + (3, TType.MAP, 'skewedColValueLocationMaps', (TType.LIST,(TType.STRING,None),TType.STRING,None), None, ), # 3 + ) + + def __init__(self, skewedColNames=None, skewedColValues=None, skewedColValueLocationMaps=None,): + self.skewedColNames = skewedColNames + self.skewedColValues = skewedColValues + self.skewedColValueLocationMaps = skewedColValueLocationMaps + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.skewedColNames = [] + (_etype104, _size101) = iprot.readListBegin() + for _i105 in xrange(_size101): + _elem106 = iprot.readString() + self.skewedColNames.append(_elem106) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.skewedColValues = [] + (_etype110, _size107) = iprot.readListBegin() + for _i111 in xrange(_size107): + _elem112 = [] + (_etype116, _size113) = iprot.readListBegin() + for _i117 in xrange(_size113): + _elem118 = iprot.readString() + _elem112.append(_elem118) + iprot.readListEnd() + self.skewedColValues.append(_elem112) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.skewedColValueLocationMaps = {} + (_ktype120, _vtype121, _size119 ) = iprot.readMapBegin() + for _i123 in xrange(_size119): + _key124 = [] + (_etype129, _size126) = iprot.readListBegin() + for _i130 in xrange(_size126): + _elem131 = iprot.readString() + _key124.append(_elem131) + iprot.readListEnd() + _val125 = iprot.readString() + self.skewedColValueLocationMaps[_key124] = _val125 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SkewedInfo') + if self.skewedColNames is not None: + oprot.writeFieldBegin('skewedColNames', TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.skewedColNames)) + for iter132 in self.skewedColNames: + oprot.writeString(iter132) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.skewedColValues is not None: + oprot.writeFieldBegin('skewedColValues', TType.LIST, 2) + oprot.writeListBegin(TType.LIST, len(self.skewedColValues)) + for iter133 in self.skewedColValues: + oprot.writeListBegin(TType.STRING, len(iter133)) + for iter134 in iter133: + oprot.writeString(iter134) + oprot.writeListEnd() + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.skewedColValueLocationMaps is not None: + oprot.writeFieldBegin('skewedColValueLocationMaps', TType.MAP, 3) + oprot.writeMapBegin(TType.LIST, TType.STRING, len(self.skewedColValueLocationMaps)) + for kiter135,viter136 in self.skewedColValueLocationMaps.items(): + oprot.writeListBegin(TType.STRING, len(kiter135)) + for iter137 in kiter135: + oprot.writeString(iter137) + oprot.writeListEnd() + oprot.writeString(viter136) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.skewedColNames) + value = (value * 31) ^ hash(self.skewedColValues) + value = (value * 31) ^ hash(self.skewedColValueLocationMaps) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class StorageDescriptor: + """ + Attributes: + - cols + - location + - inputFormat + - outputFormat + - compressed + - numBuckets + - serdeInfo + - bucketCols + - sortCols + - parameters + - skewedInfo + - storedAsSubDirectories + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'cols', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1 + (2, TType.STRING, 'location', None, None, ), # 2 + (3, TType.STRING, 'inputFormat', None, None, ), # 3 + (4, TType.STRING, 'outputFormat', None, None, ), # 4 + (5, TType.BOOL, 'compressed', None, None, ), # 5 + (6, TType.I32, 'numBuckets', None, None, ), # 6 + (7, TType.STRUCT, 'serdeInfo', (SerDeInfo, SerDeInfo.thrift_spec), None, ), # 7 + (8, TType.LIST, 'bucketCols', (TType.STRING,None), None, ), # 8 + (9, TType.LIST, 'sortCols', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 9 + (10, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 10 + (11, TType.STRUCT, 'skewedInfo', (SkewedInfo, SkewedInfo.thrift_spec), None, ), # 11 + (12, TType.BOOL, 'storedAsSubDirectories', None, None, ), # 12 + ) + + def __init__(self, cols=None, location=None, inputFormat=None, outputFormat=None, compressed=None, numBuckets=None, serdeInfo=None, bucketCols=None, sortCols=None, parameters=None, skewedInfo=None, storedAsSubDirectories=None,): + self.cols = cols + self.location = location + self.inputFormat = inputFormat + self.outputFormat = outputFormat + self.compressed = compressed + self.numBuckets = numBuckets + self.serdeInfo = serdeInfo + self.bucketCols = bucketCols + self.sortCols = sortCols + self.parameters = parameters + self.skewedInfo = skewedInfo + self.storedAsSubDirectories = storedAsSubDirectories + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.cols = [] + (_etype141, _size138) = iprot.readListBegin() + for _i142 in xrange(_size138): + _elem143 = FieldSchema() + _elem143.read(iprot) + self.cols.append(_elem143) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.location = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.inputFormat = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.outputFormat = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.compressed = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.numBuckets = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.serdeInfo = SerDeInfo() + self.serdeInfo.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.bucketCols = [] + (_etype147, _size144) = iprot.readListBegin() + for _i148 in xrange(_size144): + _elem149 = iprot.readString() + self.bucketCols.append(_elem149) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.LIST: + self.sortCols = [] + (_etype153, _size150) = iprot.readListBegin() + for _i154 in xrange(_size150): + _elem155 = Order() + _elem155.read(iprot) + self.sortCols.append(_elem155) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.MAP: + self.parameters = {} + (_ktype157, _vtype158, _size156 ) = iprot.readMapBegin() + for _i160 in xrange(_size156): + _key161 = iprot.readString() + _val162 = iprot.readString() + self.parameters[_key161] = _val162 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRUCT: + self.skewedInfo = SkewedInfo() + self.skewedInfo.read(iprot) + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.BOOL: + self.storedAsSubDirectories = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('StorageDescriptor') + if self.cols is not None: + oprot.writeFieldBegin('cols', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.cols)) + for iter163 in self.cols: + iter163.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.location is not None: + oprot.writeFieldBegin('location', TType.STRING, 2) + oprot.writeString(self.location) + oprot.writeFieldEnd() + if self.inputFormat is not None: + oprot.writeFieldBegin('inputFormat', TType.STRING, 3) + oprot.writeString(self.inputFormat) + oprot.writeFieldEnd() + if self.outputFormat is not None: + oprot.writeFieldBegin('outputFormat', TType.STRING, 4) + oprot.writeString(self.outputFormat) + oprot.writeFieldEnd() + if self.compressed is not None: + oprot.writeFieldBegin('compressed', TType.BOOL, 5) + oprot.writeBool(self.compressed) + oprot.writeFieldEnd() + if self.numBuckets is not None: + oprot.writeFieldBegin('numBuckets', TType.I32, 6) + oprot.writeI32(self.numBuckets) + oprot.writeFieldEnd() + if self.serdeInfo is not None: + oprot.writeFieldBegin('serdeInfo', TType.STRUCT, 7) + self.serdeInfo.write(oprot) + oprot.writeFieldEnd() + if self.bucketCols is not None: + oprot.writeFieldBegin('bucketCols', TType.LIST, 8) + oprot.writeListBegin(TType.STRING, len(self.bucketCols)) + for iter164 in self.bucketCols: + oprot.writeString(iter164) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.sortCols is not None: + oprot.writeFieldBegin('sortCols', TType.LIST, 9) + oprot.writeListBegin(TType.STRUCT, len(self.sortCols)) + for iter165 in self.sortCols: + iter165.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin('parameters', TType.MAP, 10) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter166,viter167 in self.parameters.items(): + oprot.writeString(kiter166) + oprot.writeString(viter167) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.skewedInfo is not None: + oprot.writeFieldBegin('skewedInfo', TType.STRUCT, 11) + self.skewedInfo.write(oprot) + oprot.writeFieldEnd() + if self.storedAsSubDirectories is not None: + oprot.writeFieldBegin('storedAsSubDirectories', TType.BOOL, 12) + oprot.writeBool(self.storedAsSubDirectories) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.cols) + value = (value * 31) ^ hash(self.location) + value = (value * 31) ^ hash(self.inputFormat) + value = (value * 31) ^ hash(self.outputFormat) + value = (value * 31) ^ hash(self.compressed) + value = (value * 31) ^ hash(self.numBuckets) + value = (value * 31) ^ hash(self.serdeInfo) + value = (value * 31) ^ hash(self.bucketCols) + value = (value * 31) ^ hash(self.sortCols) + value = (value * 31) ^ hash(self.parameters) + value = (value * 31) ^ hash(self.skewedInfo) + value = (value * 31) ^ hash(self.storedAsSubDirectories) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Table: + """ + Attributes: + - tableName + - dbName + - owner + - createTime + - lastAccessTime + - retention + - sd + - partitionKeys + - parameters + - viewOriginalText + - viewExpandedText + - tableType + - privileges + - temporary + - rewriteEnabled + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'dbName', None, None, ), # 2 + (3, TType.STRING, 'owner', None, None, ), # 3 + (4, TType.I32, 'createTime', None, None, ), # 4 + (5, TType.I32, 'lastAccessTime', None, None, ), # 5 + (6, TType.I32, 'retention', None, None, ), # 6 + (7, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 7 + (8, TType.LIST, 'partitionKeys', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 8 + (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9 + (10, TType.STRING, 'viewOriginalText', None, None, ), # 10 + (11, TType.STRING, 'viewExpandedText', None, None, ), # 11 + (12, TType.STRING, 'tableType', None, None, ), # 12 + (13, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 13 + (14, TType.BOOL, 'temporary', None, False, ), # 14 + (15, TType.BOOL, 'rewriteEnabled', None, None, ), # 15 + ) + + def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None, privileges=None, temporary=thrift_spec[14][4], rewriteEnabled=None,): + self.tableName = tableName + self.dbName = dbName + self.owner = owner + self.createTime = createTime + self.lastAccessTime = lastAccessTime + self.retention = retention + self.sd = sd + self.partitionKeys = partitionKeys + self.parameters = parameters + self.viewOriginalText = viewOriginalText + self.viewExpandedText = viewExpandedText + self.tableType = tableType + self.privileges = privileges + self.temporary = temporary + self.rewriteEnabled = rewriteEnabled + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.owner = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.lastAccessTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.retention = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.sd = StorageDescriptor() + self.sd.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.partitionKeys = [] + (_etype171, _size168) = iprot.readListBegin() + for _i172 in xrange(_size168): + _elem173 = FieldSchema() + _elem173.read(iprot) + self.partitionKeys.append(_elem173) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.MAP: + self.parameters = {} + (_ktype175, _vtype176, _size174 ) = iprot.readMapBegin() + for _i178 in xrange(_size174): + _key179 = iprot.readString() + _val180 = iprot.readString() + self.parameters[_key179] = _val180 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.viewOriginalText = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.viewExpandedText = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRING: + self.tableType = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.BOOL: + self.temporary = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.BOOL: + self.rewriteEnabled = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Table') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 2) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.owner is not None: + oprot.writeFieldBegin('owner', TType.STRING, 3) + oprot.writeString(self.owner) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin('createTime', TType.I32, 4) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.lastAccessTime is not None: + oprot.writeFieldBegin('lastAccessTime', TType.I32, 5) + oprot.writeI32(self.lastAccessTime) + oprot.writeFieldEnd() + if self.retention is not None: + oprot.writeFieldBegin('retention', TType.I32, 6) + oprot.writeI32(self.retention) + oprot.writeFieldEnd() + if self.sd is not None: + oprot.writeFieldBegin('sd', TType.STRUCT, 7) + self.sd.write(oprot) + oprot.writeFieldEnd() + if self.partitionKeys is not None: + oprot.writeFieldBegin('partitionKeys', TType.LIST, 8) + oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys)) + for iter181 in self.partitionKeys: + iter181.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin('parameters', TType.MAP, 9) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter182,viter183 in self.parameters.items(): + oprot.writeString(kiter182) + oprot.writeString(viter183) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.viewOriginalText is not None: + oprot.writeFieldBegin('viewOriginalText', TType.STRING, 10) + oprot.writeString(self.viewOriginalText) + oprot.writeFieldEnd() + if self.viewExpandedText is not None: + oprot.writeFieldBegin('viewExpandedText', TType.STRING, 11) + oprot.writeString(self.viewExpandedText) + oprot.writeFieldEnd() + if self.tableType is not None: + oprot.writeFieldBegin('tableType', TType.STRING, 12) + oprot.writeString(self.tableType) + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 13) + self.privileges.write(oprot) + oprot.writeFieldEnd() + if self.temporary is not None: + oprot.writeFieldBegin('temporary', TType.BOOL, 14) + oprot.writeBool(self.temporary) + oprot.writeFieldEnd() + if self.rewriteEnabled is not None: + oprot.writeFieldBegin('rewriteEnabled', TType.BOOL, 15) + oprot.writeBool(self.rewriteEnabled) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.tableName) + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.owner) + value = (value * 31) ^ hash(self.createTime) + value = (value * 31) ^ hash(self.lastAccessTime) + value = (value * 31) ^ hash(self.retention) + value = (value * 31) ^ hash(self.sd) + value = (value * 31) ^ hash(self.partitionKeys) + value = (value * 31) ^ hash(self.parameters) + value = (value * 31) ^ hash(self.viewOriginalText) + value = (value * 31) ^ hash(self.viewExpandedText) + value = (value * 31) ^ hash(self.tableType) + value = (value * 31) ^ hash(self.privileges) + value = (value * 31) ^ hash(self.temporary) + value = (value * 31) ^ hash(self.rewriteEnabled) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Partition: + """ + Attributes: + - values + - dbName + - tableName + - createTime + - lastAccessTime + - sd + - parameters + - privileges + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'values', (TType.STRING,None), None, ), # 1 + (2, TType.STRING, 'dbName', None, None, ), # 2 + (3, TType.STRING, 'tableName', None, None, ), # 3 + (4, TType.I32, 'createTime', None, None, ), # 4 + (5, TType.I32, 'lastAccessTime', None, None, ), # 5 + (6, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 6 + (7, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 7 + (8, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 8 + ) + + def __init__(self, values=None, dbName=None, tableName=None, createTime=None, lastAccessTime=None, sd=None, parameters=None, privileges=None,): + self.values = values + self.dbName = dbName + self.tableName = tableName + self.createTime = createTime + self.lastAccessTime = lastAccessTime + self.sd = sd + self.parameters = parameters + self.privileges = privileges + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.values = [] + (_etype187, _size184) = iprot.readListBegin() + for _i188 in xrange(_size184): + _elem189 = iprot.readString() + self.values.append(_elem189) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.lastAccessTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.sd = StorageDescriptor() + self.sd.read(iprot) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.MAP: + self.parameters = {} + (_ktype191, _vtype192, _size190 ) = iprot.readMapBegin() + for _i194 in xrange(_size190): + _key195 = iprot.readString() + _val196 = iprot.readString() + self.parameters[_key195] = _val196 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Partition') + if self.values is not None: + oprot.writeFieldBegin('values', TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.values)) + for iter197 in self.values: + oprot.writeString(iter197) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 2) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 3) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin('createTime', TType.I32, 4) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.lastAccessTime is not None: + oprot.writeFieldBegin('lastAccessTime', TType.I32, 5) + oprot.writeI32(self.lastAccessTime) + oprot.writeFieldEnd() + if self.sd is not None: + oprot.writeFieldBegin('sd', TType.STRUCT, 6) + self.sd.write(oprot) + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin('parameters', TType.MAP, 7) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter198,viter199 in self.parameters.items(): + oprot.writeString(kiter198) + oprot.writeString(viter199) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 8) + self.privileges.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.values) + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tableName) + value = (value * 31) ^ hash(self.createTime) + value = (value * 31) ^ hash(self.lastAccessTime) + value = (value * 31) ^ hash(self.sd) + value = (value * 31) ^ hash(self.parameters) + value = (value * 31) ^ hash(self.privileges) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PartitionWithoutSD: + """ + Attributes: + - values + - createTime + - lastAccessTime + - relativePath + - parameters + - privileges + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'values', (TType.STRING,None), None, ), # 1 + (2, TType.I32, 'createTime', None, None, ), # 2 + (3, TType.I32, 'lastAccessTime', None, None, ), # 3 + (4, TType.STRING, 'relativePath', None, None, ), # 4 + (5, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 5 + (6, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 6 + ) + + def __init__(self, values=None, createTime=None, lastAccessTime=None, relativePath=None, parameters=None, privileges=None,): + self.values = values + self.createTime = createTime + self.lastAccessTime = lastAccessTime + self.relativePath = relativePath + self.parameters = parameters + self.privileges = privileges + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.values = [] + (_etype203, _size200) = iprot.readListBegin() + for _i204 in xrange(_size200): + _elem205 = iprot.readString() + self.values.append(_elem205) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.lastAccessTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.relativePath = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.parameters = {} + (_ktype207, _vtype208, _size206 ) = iprot.readMapBegin() + for _i210 in xrange(_size206): + _key211 = iprot.readString() + _val212 = iprot.readString() + self.parameters[_key211] = _val212 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PartitionWithoutSD') + if self.values is not None: + oprot.writeFieldBegin('values', TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.values)) + for iter213 in self.values: + oprot.writeString(iter213) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin('createTime', TType.I32, 2) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.lastAccessTime is not None: + oprot.writeFieldBegin('lastAccessTime', TType.I32, 3) + oprot.writeI32(self.lastAccessTime) + oprot.writeFieldEnd() + if self.relativePath is not None: + oprot.writeFieldBegin('relativePath', TType.STRING, 4) + oprot.writeString(self.relativePath) + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin('parameters', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter214,viter215 in self.parameters.items(): + oprot.writeString(kiter214) + oprot.writeString(viter215) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.privileges is not None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 6) + self.privileges.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.values) + value = (value * 31) ^ hash(self.createTime) + value = (value * 31) ^ hash(self.lastAccessTime) + value = (value * 31) ^ hash(self.relativePath) + value = (value * 31) ^ hash(self.parameters) + value = (value * 31) ^ hash(self.privileges) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PartitionSpecWithSharedSD: + """ + Attributes: + - partitions + - sd + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'partitions', (TType.STRUCT,(PartitionWithoutSD, PartitionWithoutSD.thrift_spec)), None, ), # 1 + (2, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 2 + ) + + def __init__(self, partitions=None, sd=None,): + self.partitions = partitions + self.sd = sd + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype219, _size216) = iprot.readListBegin() + for _i220 in xrange(_size216): + _elem221 = PartitionWithoutSD() + _elem221.read(iprot) + self.partitions.append(_elem221) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.sd = StorageDescriptor() + self.sd.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PartitionSpecWithSharedSD') + if self.partitions is not None: + oprot.writeFieldBegin('partitions', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter222 in self.partitions: + iter222.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.sd is not None: + oprot.writeFieldBegin('sd', TType.STRUCT, 2) + self.sd.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.partitions) + value = (value * 31) ^ hash(self.sd) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PartitionListComposingSpec: + """ + Attributes: + - partitions + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'partitions', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1 + ) + + def __init__(self, partitions=None,): + self.partitions = partitions + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype226, _size223) = iprot.readListBegin() + for _i227 in xrange(_size223): + _elem228 = Partition() + _elem228.read(iprot) + self.partitions.append(_elem228) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PartitionListComposingSpec') + if self.partitions is not None: + oprot.writeFieldBegin('partitions', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter229 in self.partitions: + iter229.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.partitions) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PartitionSpec: + """ + Attributes: + - dbName + - tableName + - rootPath + - sharedSDPartitionSpec + - partitionList + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'tableName', None, None, ), # 2 + (3, TType.STRING, 'rootPath', None, None, ), # 3 + (4, TType.STRUCT, 'sharedSDPartitionSpec', (PartitionSpecWithSharedSD, PartitionSpecWithSharedSD.thrift_spec), None, ), # 4 + (5, TType.STRUCT, 'partitionList', (PartitionListComposingSpec, PartitionListComposingSpec.thrift_spec), None, ), # 5 + ) + + def __init__(self, dbName=None, tableName=None, rootPath=None, sharedSDPartitionSpec=None, partitionList=None,): + self.dbName = dbName + self.tableName = tableName + self.rootPath = rootPath + self.sharedSDPartitionSpec = sharedSDPartitionSpec + self.partitionList = partitionList + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.rootPath = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.sharedSDPartitionSpec = PartitionSpecWithSharedSD() + self.sharedSDPartitionSpec.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.partitionList = PartitionListComposingSpec() + self.partitionList.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PartitionSpec') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 2) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.rootPath is not None: + oprot.writeFieldBegin('rootPath', TType.STRING, 3) + oprot.writeString(self.rootPath) + oprot.writeFieldEnd() + if self.sharedSDPartitionSpec is not None: + oprot.writeFieldBegin('sharedSDPartitionSpec', TType.STRUCT, 4) + self.sharedSDPartitionSpec.write(oprot) + oprot.writeFieldEnd() + if self.partitionList is not None: + oprot.writeFieldBegin('partitionList', TType.STRUCT, 5) + self.partitionList.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tableName) + value = (value * 31) ^ hash(self.rootPath) + value = (value * 31) ^ hash(self.sharedSDPartitionSpec) + value = (value * 31) ^ hash(self.partitionList) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Index: + """ + Attributes: + - indexName + - indexHandlerClass + - dbName + - origTableName + - createTime + - lastAccessTime + - indexTableName + - sd + - parameters + - deferredRebuild + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'indexName', None, None, ), # 1 + (2, TType.STRING, 'indexHandlerClass', None, None, ), # 2 + (3, TType.STRING, 'dbName', None, None, ), # 3 + (4, TType.STRING, 'origTableName', None, None, ), # 4 + (5, TType.I32, 'createTime', None, None, ), # 5 + (6, TType.I32, 'lastAccessTime', None, None, ), # 6 + (7, TType.STRING, 'indexTableName', None, None, ), # 7 + (8, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 8 + (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9 + (10, TType.BOOL, 'deferredRebuild', None, None, ), # 10 + ) + + def __init__(self, indexName=None, indexHandlerClass=None, dbName=None, origTableName=None, createTime=None, lastAccessTime=None, indexTableName=None, sd=None, parameters=None, deferredRebuild=None,): + self.indexName = indexName + self.indexHandlerClass = indexHandlerClass + self.dbName = dbName + self.origTableName = origTableName + self.createTime = createTime + self.lastAccessTime = lastAccessTime + self.indexTableName = indexTableName + self.sd = sd + self.parameters = parameters + self.deferredRebuild = deferredRebuild + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.indexName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.indexHandlerClass = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.origTableName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.lastAccessTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.indexTableName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.sd = StorageDescriptor() + self.sd.read(iprot) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.MAP: + self.parameters = {} + (_ktype231, _vtype232, _size230 ) = iprot.readMapBegin() + for _i234 in xrange(_size230): + _key235 = iprot.readString() + _val236 = iprot.readString() + self.parameters[_key235] = _val236 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.BOOL: + self.deferredRebuild = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Index') + if self.indexName is not None: + oprot.writeFieldBegin('indexName', TType.STRING, 1) + oprot.writeString(self.indexName) + oprot.writeFieldEnd() + if self.indexHandlerClass is not None: + oprot.writeFieldBegin('indexHandlerClass', TType.STRING, 2) + oprot.writeString(self.indexHandlerClass) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 3) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.origTableName is not None: + oprot.writeFieldBegin('origTableName', TType.STRING, 4) + oprot.writeString(self.origTableName) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.lastAccessTime is not None: + oprot.writeFieldBegin('lastAccessTime', TType.I32, 6) + oprot.writeI32(self.lastAccessTime) + oprot.writeFieldEnd() + if self.indexTableName is not None: + oprot.writeFieldBegin('indexTableName', TType.STRING, 7) + oprot.writeString(self.indexTableName) + oprot.writeFieldEnd() + if self.sd is not None: + oprot.writeFieldBegin('sd', TType.STRUCT, 8) + self.sd.write(oprot) + oprot.writeFieldEnd() + if self.parameters is not None: + oprot.writeFieldBegin('parameters', TType.MAP, 9) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter237,viter238 in self.parameters.items(): + oprot.writeString(kiter237) + oprot.writeString(viter238) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.deferredRebuild is not None: + oprot.writeFieldBegin('deferredRebuild', TType.BOOL, 10) + oprot.writeBool(self.deferredRebuild) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.indexName) + value = (value * 31) ^ hash(self.indexHandlerClass) + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.origTableName) + value = (value * 31) ^ hash(self.createTime) + value = (value * 31) ^ hash(self.lastAccessTime) + value = (value * 31) ^ hash(self.indexTableName) + value = (value * 31) ^ hash(self.sd) + value = (value * 31) ^ hash(self.parameters) + value = (value * 31) ^ hash(self.deferredRebuild) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class BooleanColumnStatsData: + """ + Attributes: + - numTrues + - numFalses + - numNulls + - bitVectors + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'numTrues', None, None, ), # 1 + (2, TType.I64, 'numFalses', None, None, ), # 2 + (3, TType.I64, 'numNulls', None, None, ), # 3 + (4, TType.STRING, 'bitVectors', None, None, ), # 4 + ) + + def __init__(self, numTrues=None, numFalses=None, numNulls=None, bitVectors=None,): + self.numTrues = numTrues + self.numFalses = numFalses + self.numNulls = numNulls + self.bitVectors = bitVectors + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.numTrues = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.numFalses = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.bitVectors = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('BooleanColumnStatsData') + if self.numTrues is not None: + oprot.writeFieldBegin('numTrues', TType.I64, 1) + oprot.writeI64(self.numTrues) + oprot.writeFieldEnd() + if self.numFalses is not None: + oprot.writeFieldBegin('numFalses', TType.I64, 2) + oprot.writeI64(self.numFalses) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin('bitVectors', TType.STRING, 4) + oprot.writeString(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.numTrues is None: + raise TProtocol.TProtocolException(message='Required field numTrues is unset!') + if self.numFalses is None: + raise TProtocol.TProtocolException(message='Required field numFalses is unset!') + if self.numNulls is None: + raise TProtocol.TProtocolException(message='Required field numNulls is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.numTrues) + value = (value * 31) ^ hash(self.numFalses) + value = (value * 31) ^ hash(self.numNulls) + value = (value * 31) ^ hash(self.bitVectors) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class DoubleColumnStatsData: + """ + Attributes: + - lowValue + - highValue + - numNulls + - numDVs + - bitVectors + """ + + thrift_spec = ( + None, # 0 + (1, TType.DOUBLE, 'lowValue', None, None, ), # 1 + (2, TType.DOUBLE, 'highValue', None, None, ), # 2 + (3, TType.I64, 'numNulls', None, None, ), # 3 + (4, TType.I64, 'numDVs', None, None, ), # 4 + (5, TType.STRING, 'bitVectors', None, None, ), # 5 + ) + + def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None, bitVectors=None,): + self.lowValue = lowValue + self.highValue = highValue + self.numNulls = numNulls + self.numDVs = numDVs + self.bitVectors = bitVectors + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.DOUBLE: + self.lowValue = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.DOUBLE: + self.highValue = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.bitVectors = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('DoubleColumnStatsData') + if self.lowValue is not None: + oprot.writeFieldBegin('lowValue', TType.DOUBLE, 1) + oprot.writeDouble(self.lowValue) + oprot.writeFieldEnd() + if self.highValue is not None: + oprot.writeFieldBegin('highValue', TType.DOUBLE, 2) + oprot.writeDouble(self.highValue) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin('numDVs', TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin('bitVectors', TType.STRING, 5) + oprot.writeString(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.numNulls is None: + raise TProtocol.TProtocolException(message='Required field numNulls is unset!') + if self.numDVs is None: + raise TProtocol.TProtocolException(message='Required field numDVs is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.lowValue) + value = (value * 31) ^ hash(self.highValue) + value = (value * 31) ^ hash(self.numNulls) + value = (value * 31) ^ hash(self.numDVs) + value = (value * 31) ^ hash(self.bitVectors) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class LongColumnStatsData: + """ + Attributes: + - lowValue + - highValue + - numNulls + - numDVs + - bitVectors + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'lowValue', None, None, ), # 1 + (2, TType.I64, 'highValue', None, None, ), # 2 + (3, TType.I64, 'numNulls', None, None, ), # 3 + (4, TType.I64, 'numDVs', None, None, ), # 4 + (5, TType.STRING, 'bitVectors', None, None, ), # 5 + ) + + def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None, bitVectors=None,): + self.lowValue = lowValue + self.highValue = highValue + self.numNulls = numNulls + self.numDVs = numDVs + self.bitVectors = bitVectors + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lowValue = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.highValue = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.bitVectors = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('LongColumnStatsData') + if self.lowValue is not None: + oprot.writeFieldBegin('lowValue', TType.I64, 1) + oprot.writeI64(self.lowValue) + oprot.writeFieldEnd() + if self.highValue is not None: + oprot.writeFieldBegin('highValue', TType.I64, 2) + oprot.writeI64(self.highValue) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin('numDVs', TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin('bitVectors', TType.STRING, 5) + oprot.writeString(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.numNulls is None: + raise TProtocol.TProtocolException(message='Required field numNulls is unset!') + if self.numDVs is None: + raise TProtocol.TProtocolException(message='Required field numDVs is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.lowValue) + value = (value * 31) ^ hash(self.highValue) + value = (value * 31) ^ hash(self.numNulls) + value = (value * 31) ^ hash(self.numDVs) + value = (value * 31) ^ hash(self.bitVectors) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class StringColumnStatsData: + """ + Attributes: + - maxColLen + - avgColLen + - numNulls + - numDVs + - bitVectors + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'maxColLen', None, None, ), # 1 + (2, TType.DOUBLE, 'avgColLen', None, None, ), # 2 + (3, TType.I64, 'numNulls', None, None, ), # 3 + (4, TType.I64, 'numDVs', None, None, ), # 4 + (5, TType.STRING, 'bitVectors', None, None, ), # 5 + ) + + def __init__(self, maxColLen=None, avgColLen=None, numNulls=None, numDVs=None, bitVectors=None,): + self.maxColLen = maxColLen + self.avgColLen = avgColLen + self.numNulls = numNulls + self.numDVs = numDVs + self.bitVectors = bitVectors + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.maxColLen = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.DOUBLE: + self.avgColLen = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.bitVectors = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('StringColumnStatsData') + if self.maxColLen is not None: + oprot.writeFieldBegin('maxColLen', TType.I64, 1) + oprot.writeI64(self.maxColLen) + oprot.writeFieldEnd() + if self.avgColLen is not None: + oprot.writeFieldBegin('avgColLen', TType.DOUBLE, 2) + oprot.writeDouble(self.avgColLen) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin('numDVs', TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin('bitVectors', TType.STRING, 5) + oprot.writeString(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.maxColLen is None: + raise TProtocol.TProtocolException(message='Required field maxColLen is unset!') + if self.avgColLen is None: + raise TProtocol.TProtocolException(message='Required field avgColLen is unset!') + if self.numNulls is None: + raise TProtocol.TProtocolException(message='Required field numNulls is unset!') + if self.numDVs is None: + raise TProtocol.TProtocolException(message='Required field numDVs is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.maxColLen) + value = (value * 31) ^ hash(self.avgColLen) + value = (value * 31) ^ hash(self.numNulls) + value = (value * 31) ^ hash(self.numDVs) + value = (value * 31) ^ hash(self.bitVectors) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class BinaryColumnStatsData: + """ + Attributes: + - maxColLen + - avgColLen + - numNulls + - bitVectors + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'maxColLen', None, None, ), # 1 + (2, TType.DOUBLE, 'avgColLen', None, None, ), # 2 + (3, TType.I64, 'numNulls', None, None, ), # 3 + (4, TType.STRING, 'bitVectors', None, None, ), # 4 + ) + + def __init__(self, maxColLen=None, avgColLen=None, numNulls=None, bitVectors=None,): + self.maxColLen = maxColLen + self.avgColLen = avgColLen + self.numNulls = numNulls + self.bitVectors = bitVectors + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.maxColLen = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.DOUBLE: + self.avgColLen = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.bitVectors = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('BinaryColumnStatsData') + if self.maxColLen is not None: + oprot.writeFieldBegin('maxColLen', TType.I64, 1) + oprot.writeI64(self.maxColLen) + oprot.writeFieldEnd() + if self.avgColLen is not None: + oprot.writeFieldBegin('avgColLen', TType.DOUBLE, 2) + oprot.writeDouble(self.avgColLen) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin('bitVectors', TType.STRING, 4) + oprot.writeString(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.maxColLen is None: + raise TProtocol.TProtocolException(message='Required field maxColLen is unset!') + if self.avgColLen is None: + raise TProtocol.TProtocolException(message='Required field avgColLen is unset!') + if self.numNulls is None: + raise TProtocol.TProtocolException(message='Required field numNulls is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.maxColLen) + value = (value * 31) ^ hash(self.avgColLen) + value = (value * 31) ^ hash(self.numNulls) + value = (value * 31) ^ hash(self.bitVectors) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Decimal: + """ + Attributes: + - unscaled + - scale + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'unscaled', None, None, ), # 1 + None, # 2 + (3, TType.I16, 'scale', None, None, ), # 3 + ) + + def __init__(self, unscaled=None, scale=None,): + self.unscaled = unscaled + self.scale = scale + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.unscaled = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.scale = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Decimal') + if self.unscaled is not None: + oprot.writeFieldBegin('unscaled', TType.STRING, 1) + oprot.writeString(self.unscaled) + oprot.writeFieldEnd() + if self.scale is not None: + oprot.writeFieldBegin('scale', TType.I16, 3) + oprot.writeI16(self.scale) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.unscaled is None: + raise TProtocol.TProtocolException(message='Required field unscaled is unset!') + if self.scale is None: + raise TProtocol.TProtocolException(message='Required field scale is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.unscaled) + value = (value * 31) ^ hash(self.scale) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class DecimalColumnStatsData: + """ + Attributes: + - lowValue + - highValue + - numNulls + - numDVs + - bitVectors + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'lowValue', (Decimal, Decimal.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'highValue', (Decimal, Decimal.thrift_spec), None, ), # 2 + (3, TType.I64, 'numNulls', None, None, ), # 3 + (4, TType.I64, 'numDVs', None, None, ), # 4 + (5, TType.STRING, 'bitVectors', None, None, ), # 5 + ) + + def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None, bitVectors=None,): + self.lowValue = lowValue + self.highValue = highValue + self.numNulls = numNulls + self.numDVs = numDVs + self.bitVectors = bitVectors + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.lowValue = Decimal() + self.lowValue.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.highValue = Decimal() + self.highValue.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.bitVectors = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('DecimalColumnStatsData') + if self.lowValue is not None: + oprot.writeFieldBegin('lowValue', TType.STRUCT, 1) + self.lowValue.write(oprot) + oprot.writeFieldEnd() + if self.highValue is not None: + oprot.writeFieldBegin('highValue', TType.STRUCT, 2) + self.highValue.write(oprot) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin('numDVs', TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin('bitVectors', TType.STRING, 5) + oprot.writeString(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.numNulls is None: + raise TProtocol.TProtocolException(message='Required field numNulls is unset!') + if self.numDVs is None: + raise TProtocol.TProtocolException(message='Required field numDVs is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.lowValue) + value = (value * 31) ^ hash(self.highValue) + value = (value * 31) ^ hash(self.numNulls) + value = (value * 31) ^ hash(self.numDVs) + value = (value * 31) ^ hash(self.bitVectors) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Date: + """ + Attributes: + - daysSinceEpoch + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'daysSinceEpoch', None, None, ), # 1 + ) + + def __init__(self, daysSinceEpoch=None,): + self.daysSinceEpoch = daysSinceEpoch + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.daysSinceEpoch = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Date') + if self.daysSinceEpoch is not None: + oprot.writeFieldBegin('daysSinceEpoch', TType.I64, 1) + oprot.writeI64(self.daysSinceEpoch) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.daysSinceEpoch is None: + raise TProtocol.TProtocolException(message='Required field daysSinceEpoch is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.daysSinceEpoch) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class DateColumnStatsData: + """ + Attributes: + - lowValue + - highValue + - numNulls + - numDVs + - bitVectors + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'lowValue', (Date, Date.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'highValue', (Date, Date.thrift_spec), None, ), # 2 + (3, TType.I64, 'numNulls', None, None, ), # 3 + (4, TType.I64, 'numDVs', None, None, ), # 4 + (5, TType.STRING, 'bitVectors', None, None, ), # 5 + ) + + def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None, bitVectors=None,): + self.lowValue = lowValue + self.highValue = highValue + self.numNulls = numNulls + self.numDVs = numDVs + self.bitVectors = bitVectors + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.lowValue = Date() + self.lowValue.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.highValue = Date() + self.highValue.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.bitVectors = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('DateColumnStatsData') + if self.lowValue is not None: + oprot.writeFieldBegin('lowValue', TType.STRUCT, 1) + self.lowValue.write(oprot) + oprot.writeFieldEnd() + if self.highValue is not None: + oprot.writeFieldBegin('highValue', TType.STRUCT, 2) + self.highValue.write(oprot) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin('numDVs', TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + if self.bitVectors is not None: + oprot.writeFieldBegin('bitVectors', TType.STRING, 5) + oprot.writeString(self.bitVectors) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.numNulls is None: + raise TProtocol.TProtocolException(message='Required field numNulls is unset!') + if self.numDVs is None: + raise TProtocol.TProtocolException(message='Required field numDVs is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.lowValue) + value = (value * 31) ^ hash(self.highValue) + value = (value * 31) ^ hash(self.numNulls) + value = (value * 31) ^ hash(self.numDVs) + value = (value * 31) ^ hash(self.bitVectors) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ColumnStatisticsData: + """ + Attributes: + - booleanStats + - longStats + - doubleStats + - stringStats + - binaryStats + - decimalStats + - dateStats + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'booleanStats', (BooleanColumnStatsData, BooleanColumnStatsData.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'longStats', (LongColumnStatsData, LongColumnStatsData.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'doubleStats', (DoubleColumnStatsData, DoubleColumnStatsData.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'stringStats', (StringColumnStatsData, StringColumnStatsData.thrift_spec), None, ), # 4 + (5, TType.STRUCT, 'binaryStats', (BinaryColumnStatsData, BinaryColumnStatsData.thrift_spec), None, ), # 5 + (6, TType.STRUCT, 'decimalStats', (DecimalColumnStatsData, DecimalColumnStatsData.thrift_spec), None, ), # 6 + (7, TType.STRUCT, 'dateStats', (DateColumnStatsData, DateColumnStatsData.thrift_spec), None, ), # 7 + ) + + def __init__(self, booleanStats=None, longStats=None, doubleStats=None, stringStats=None, binaryStats=None, decimalStats=None, dateStats=None,): + self.booleanStats = booleanStats + self.longStats = longStats + self.doubleStats = doubleStats + self.stringStats = stringStats + self.binaryStats = binaryStats + self.decimalStats = decimalStats + self.dateStats = dateStats + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.booleanStats = BooleanColumnStatsData() + self.booleanStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.longStats = LongColumnStatsData() + self.longStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.doubleStats = DoubleColumnStatsData() + self.doubleStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.stringStats = StringColumnStatsData() + self.stringStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.binaryStats = BinaryColumnStatsData() + self.binaryStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.decimalStats = DecimalColumnStatsData() + self.decimalStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.dateStats = DateColumnStatsData() + self.dateStats.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ColumnStatisticsData') + if self.booleanStats is not None: + oprot.writeFieldBegin('booleanStats', TType.STRUCT, 1) + self.booleanStats.write(oprot) + oprot.writeFieldEnd() + if self.longStats is not None: + oprot.writeFieldBegin('longStats', TType.STRUCT, 2) + self.longStats.write(oprot) + oprot.writeFieldEnd() + if self.doubleStats is not None: + oprot.writeFieldBegin('doubleStats', TType.STRUCT, 3) + self.doubleStats.write(oprot) + oprot.writeFieldEnd() + if self.stringStats is not None: + oprot.writeFieldBegin('stringStats', TType.STRUCT, 4) + self.stringStats.write(oprot) + oprot.writeFieldEnd() + if self.binaryStats is not None: + oprot.writeFieldBegin('binaryStats', TType.STRUCT, 5) + self.binaryStats.write(oprot) + oprot.writeFieldEnd() + if self.decimalStats is not None: + oprot.writeFieldBegin('decimalStats', TType.STRUCT, 6) + self.decimalStats.write(oprot) + oprot.writeFieldEnd() + if self.dateStats is not None: + oprot.writeFieldBegin('dateStats', TType.STRUCT, 7) + self.dateStats.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.booleanStats) + value = (value * 31) ^ hash(self.longStats) + value = (value * 31) ^ hash(self.doubleStats) + value = (value * 31) ^ hash(self.stringStats) + value = (value * 31) ^ hash(self.binaryStats) + value = (value * 31) ^ hash(self.decimalStats) + value = (value * 31) ^ hash(self.dateStats) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ColumnStatisticsObj: + """ + Attributes: + - colName + - colType + - statsData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'colName', None, None, ), # 1 + (2, TType.STRING, 'colType', None, None, ), # 2 + (3, TType.STRUCT, 'statsData', (ColumnStatisticsData, ColumnStatisticsData.thrift_spec), None, ), # 3 + ) + + def __init__(self, colName=None, colType=None, statsData=None,): + self.colName = colName + self.colType = colType + self.statsData = statsData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.colName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.colType = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.statsData = ColumnStatisticsData() + self.statsData.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ColumnStatisticsObj') + if self.colName is not None: + oprot.writeFieldBegin('colName', TType.STRING, 1) + oprot.writeString(self.colName) + oprot.writeFieldEnd() + if self.colType is not None: + oprot.writeFieldBegin('colType', TType.STRING, 2) + oprot.writeString(self.colType) + oprot.writeFieldEnd() + if self.statsData is not None: + oprot.writeFieldBegin('statsData', TType.STRUCT, 3) + self.statsData.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.colName is None: + raise TProtocol.TProtocolException(message='Required field colName is unset!') + if self.colType is None: + raise TProtocol.TProtocolException(message='Required field colType is unset!') + if self.statsData is None: + raise TProtocol.TProtocolException(message='Required field statsData is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.colName) + value = (value * 31) ^ hash(self.colType) + value = (value * 31) ^ hash(self.statsData) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ColumnStatisticsDesc: + """ + Attributes: + - isTblLevel + - dbName + - tableName + - partName + - lastAnalyzed + """ + + thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'isTblLevel', None, None, ), # 1 + (2, TType.STRING, 'dbName', None, None, ), # 2 + (3, TType.STRING, 'tableName', None, None, ), # 3 + (4, TType.STRING, 'partName', None, None, ), # 4 + (5, TType.I64, 'lastAnalyzed', None, None, ), # 5 + ) + + def __init__(self, isTblLevel=None, dbName=None, tableName=None, partName=None, lastAnalyzed=None,): + self.isTblLevel = isTblLevel + self.dbName = dbName + self.tableName = tableName + self.partName = partName + self.lastAnalyzed = lastAnalyzed + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.isTblLevel = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.partName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.lastAnalyzed = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ColumnStatisticsDesc') + if self.isTblLevel is not None: + oprot.writeFieldBegin('isTblLevel', TType.BOOL, 1) + oprot.writeBool(self.isTblLevel) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 2) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 3) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.partName is not None: + oprot.writeFieldBegin('partName', TType.STRING, 4) + oprot.writeString(self.partName) + oprot.writeFieldEnd() + if self.lastAnalyzed is not None: + oprot.writeFieldBegin('lastAnalyzed', TType.I64, 5) + oprot.writeI64(self.lastAnalyzed) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.isTblLevel is None: + raise TProtocol.TProtocolException(message='Required field isTblLevel is unset!') + if self.dbName is None: + raise TProtocol.TProtocolException(message='Required field dbName is unset!') + if self.tableName is None: + raise TProtocol.TProtocolException(message='Required field tableName is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.isTblLevel) + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tableName) + value = (value * 31) ^ hash(self.partName) + value = (value * 31) ^ hash(self.lastAnalyzed) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ColumnStatistics: + """ + Attributes: + - statsDesc + - statsObj + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'statsDesc', (ColumnStatisticsDesc, ColumnStatisticsDesc.thrift_spec), None, ), # 1 + (2, TType.LIST, 'statsObj', (TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec)), None, ), # 2 + ) + + def __init__(self, statsDesc=None, statsObj=None,): + self.statsDesc = statsDesc + self.statsObj = statsObj + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.statsDesc = ColumnStatisticsDesc() + self.statsDesc.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.statsObj = [] + (_etype242, _size239) = iprot.readListBegin() + for _i243 in xrange(_size239): + _elem244 = ColumnStatisticsObj() + _elem244.read(iprot) + self.statsObj.append(_elem244) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ColumnStatistics') + if self.statsDesc is not None: + oprot.writeFieldBegin('statsDesc', TType.STRUCT, 1) + self.statsDesc.write(oprot) + oprot.writeFieldEnd() + if self.statsObj is not None: + oprot.writeFieldBegin('statsObj', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.statsObj)) + for iter245 in self.statsObj: + iter245.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.statsDesc is None: + raise TProtocol.TProtocolException(message='Required field statsDesc is unset!') + if self.statsObj is None: + raise TProtocol.TProtocolException(message='Required field statsObj is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.statsDesc) + value = (value * 31) ^ hash(self.statsObj) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AggrStats: + """ + Attributes: + - colStats + - partsFound + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'colStats', (TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec)), None, ), # 1 + (2, TType.I64, 'partsFound', None, None, ), # 2 + ) + + def __init__(self, colStats=None, partsFound=None,): + self.colStats = colStats + self.partsFound = partsFound + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.colStats = [] + (_etype249, _size246) = iprot.readListBegin() + for _i250 in xrange(_size246): + _elem251 = ColumnStatisticsObj() + _elem251.read(iprot) + self.colStats.append(_elem251) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.partsFound = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AggrStats') + if self.colStats is not None: + oprot.writeFieldBegin('colStats', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.colStats)) + for iter252 in self.colStats: + iter252.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.partsFound is not None: + oprot.writeFieldBegin('partsFound', TType.I64, 2) + oprot.writeI64(self.partsFound) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.colStats is None: + raise TProtocol.TProtocolException(message='Required field colStats is unset!') + if self.partsFound is None: + raise TProtocol.TProtocolException(message='Required field partsFound is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.colStats) + value = (value * 31) ^ hash(self.partsFound) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class SetPartitionsStatsRequest: + """ + Attributes: + - colStats + - needMerge + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'colStats', (TType.STRUCT,(ColumnStatistics, ColumnStatistics.thrift_spec)), None, ), # 1 + (2, TType.BOOL, 'needMerge', None, None, ), # 2 + ) + + def __init__(self, colStats=None, needMerge=None,): + self.colStats = colStats + self.needMerge = needMerge + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.colStats = [] + (_etype256, _size253) = iprot.readListBegin() + for _i257 in xrange(_size253): + _elem258 = ColumnStatistics() + _elem258.read(iprot) + self.colStats.append(_elem258) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.needMerge = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SetPartitionsStatsRequest') + if self.colStats is not None: + oprot.writeFieldBegin('colStats', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.colStats)) + for iter259 in self.colStats: + iter259.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.needMerge is not None: + oprot.writeFieldBegin('needMerge', TType.BOOL, 2) + oprot.writeBool(self.needMerge) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.colStats is None: + raise TProtocol.TProtocolException(message='Required field colStats is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.colStats) + value = (value * 31) ^ hash(self.needMerge) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Schema: + """ + Attributes: + - fieldSchemas + - properties + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'fieldSchemas', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1 + (2, TType.MAP, 'properties', (TType.STRING,None,TType.STRING,None), None, ), # 2 + ) + + def __init__(self, fieldSchemas=None, properties=None,): + self.fieldSchemas = fieldSchemas + self.properties = properties + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fieldSchemas = [] + (_etype263, _size260) = iprot.readListBegin() + for _i264 in xrange(_size260): + _elem265 = FieldSchema() + _elem265.read(iprot) + self.fieldSchemas.append(_elem265) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.properties = {} + (_ktype267, _vtype268, _size266 ) = iprot.readMapBegin() + for _i270 in xrange(_size266): + _key271 = iprot.readString() + _val272 = iprot.readString() + self.properties[_key271] = _val272 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Schema') + if self.fieldSchemas is not None: + oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas)) + for iter273 in self.fieldSchemas: + iter273.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.properties is not None: + oprot.writeFieldBegin('properties', TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) + for kiter274,viter275 in self.properties.items(): + oprot.writeString(kiter274) + oprot.writeString(viter275) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.fieldSchemas) + value = (value * 31) ^ hash(self.properties) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class EnvironmentContext: + """ + Attributes: + - properties + """ + + thrift_spec = ( + None, # 0 + (1, TType.MAP, 'properties', (TType.STRING,None,TType.STRING,None), None, ), # 1 + ) + + def __init__(self, properties=None,): + self.properties = properties + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.properties = {} + (_ktype277, _vtype278, _size276 ) = iprot.readMapBegin() + for _i280 in xrange(_size276): + _key281 = iprot.readString() + _val282 = iprot.readString() + self.properties[_key281] = _val282 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('EnvironmentContext') + if self.properties is not None: + oprot.writeFieldBegin('properties', TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) + for kiter283,viter284 in self.properties.items(): + oprot.writeString(kiter283) + oprot.writeString(viter284) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.properties) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PrimaryKeysRequest: + """ + Attributes: + - db_name + - tbl_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + ) + + def __init__(self, db_name=None, tbl_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PrimaryKeysRequest') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.db_name is None: + raise TProtocol.TProtocolException(message='Required field db_name is unset!') + if self.tbl_name is None: + raise TProtocol.TProtocolException(message='Required field tbl_name is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PrimaryKeysResponse: + """ + Attributes: + - primaryKeys + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'primaryKeys', (TType.STRUCT,(SQLPrimaryKey, SQLPrimaryKey.thrift_spec)), None, ), # 1 + ) + + def __init__(self, primaryKeys=None,): + self.primaryKeys = primaryKeys + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.primaryKeys = [] + (_etype288, _size285) = iprot.readListBegin() + for _i289 in xrange(_size285): + _elem290 = SQLPrimaryKey() + _elem290.read(iprot) + self.primaryKeys.append(_elem290) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PrimaryKeysResponse') + if self.primaryKeys is not None: + oprot.writeFieldBegin('primaryKeys', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys)) + for iter291 in self.primaryKeys: + iter291.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.primaryKeys is None: + raise TProtocol.TProtocolException(message='Required field primaryKeys is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.primaryKeys) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ForeignKeysRequest: + """ + Attributes: + - parent_db_name + - parent_tbl_name + - foreign_db_name + - foreign_tbl_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'parent_db_name', None, None, ), # 1 + (2, TType.STRING, 'parent_tbl_name', None, None, ), # 2 + (3, TType.STRING, 'foreign_db_name', None, None, ), # 3 + (4, TType.STRING, 'foreign_tbl_name', None, None, ), # 4 + ) + + def __init__(self, parent_db_name=None, parent_tbl_name=None, foreign_db_name=None, foreign_tbl_name=None,): + self.parent_db_name = parent_db_name + self.parent_tbl_name = parent_tbl_name + self.foreign_db_name = foreign_db_name + self.foreign_tbl_name = foreign_tbl_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.parent_db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.parent_tbl_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.foreign_db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.foreign_tbl_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ForeignKeysRequest') + if self.parent_db_name is not None: + oprot.writeFieldBegin('parent_db_name', TType.STRING, 1) + oprot.writeString(self.parent_db_name) + oprot.writeFieldEnd() + if self.parent_tbl_name is not None: + oprot.writeFieldBegin('parent_tbl_name', TType.STRING, 2) + oprot.writeString(self.parent_tbl_name) + oprot.writeFieldEnd() + if self.foreign_db_name is not None: + oprot.writeFieldBegin('foreign_db_name', TType.STRING, 3) + oprot.writeString(self.foreign_db_name) + oprot.writeFieldEnd() + if self.foreign_tbl_name is not None: + oprot.writeFieldBegin('foreign_tbl_name', TType.STRING, 4) + oprot.writeString(self.foreign_tbl_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.parent_db_name) + value = (value * 31) ^ hash(self.parent_tbl_name) + value = (value * 31) ^ hash(self.foreign_db_name) + value = (value * 31) ^ hash(self.foreign_tbl_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ForeignKeysResponse: + """ + Attributes: + - foreignKeys + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'foreignKeys', (TType.STRUCT,(SQLForeignKey, SQLForeignKey.thrift_spec)), None, ), # 1 + ) + + def __init__(self, foreignKeys=None,): + self.foreignKeys = foreignKeys + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.foreignKeys = [] + (_etype295, _size292) = iprot.readListBegin() + for _i296 in xrange(_size292): + _elem297 = SQLForeignKey() + _elem297.read(iprot) + self.foreignKeys.append(_elem297) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ForeignKeysResponse') + if self.foreignKeys is not None: + oprot.writeFieldBegin('foreignKeys', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys)) + for iter298 in self.foreignKeys: + iter298.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.foreignKeys is None: + raise TProtocol.TProtocolException(message='Required field foreignKeys is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.foreignKeys) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UniqueConstraintsRequest: + """ + Attributes: + - db_name + - tbl_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + ) + + def __init__(self, db_name=None, tbl_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UniqueConstraintsRequest') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.db_name is None: + raise TProtocol.TProtocolException(message='Required field db_name is unset!') + if self.tbl_name is None: + raise TProtocol.TProtocolException(message='Required field tbl_name is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UniqueConstraintsResponse: + """ + Attributes: + - uniqueConstraints + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'uniqueConstraints', (TType.STRUCT,(SQLUniqueConstraint, SQLUniqueConstraint.thrift_spec)), None, ), # 1 + ) + + def __init__(self, uniqueConstraints=None,): + self.uniqueConstraints = uniqueConstraints + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.uniqueConstraints = [] + (_etype302, _size299) = iprot.readListBegin() + for _i303 in xrange(_size299): + _elem304 = SQLUniqueConstraint() + _elem304.read(iprot) + self.uniqueConstraints.append(_elem304) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UniqueConstraintsResponse') + if self.uniqueConstraints is not None: + oprot.writeFieldBegin('uniqueConstraints', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints)) + for iter305 in self.uniqueConstraints: + iter305.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.uniqueConstraints is None: + raise TProtocol.TProtocolException(message='Required field uniqueConstraints is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.uniqueConstraints) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class NotNullConstraintsRequest: + """ + Attributes: + - db_name + - tbl_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + ) + + def __init__(self, db_name=None, tbl_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('NotNullConstraintsRequest') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.db_name is None: + raise TProtocol.TProtocolException(message='Required field db_name is unset!') + if self.tbl_name is None: + raise TProtocol.TProtocolException(message='Required field tbl_name is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.db_name) + value = (value * 31) ^ hash(self.tbl_name) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class NotNullConstraintsResponse: + """ + Attributes: + - notNullConstraints + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'notNullConstraints', (TType.STRUCT,(SQLNotNullConstraint, SQLNotNullConstraint.thrift_spec)), None, ), # 1 + ) + + def __init__(self, notNullConstraints=None,): + self.notNullConstraints = notNullConstraints + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.notNullConstraints = [] + (_etype309, _size306) = iprot.readListBegin() + for _i310 in xrange(_size306): + _elem311 = SQLNotNullConstraint() + _elem311.read(iprot) + self.notNullConstraints.append(_elem311) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('NotNullConstraintsResponse') + if self.notNullConstraints is not None: + oprot.writeFieldBegin('notNullConstraints', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints)) + for iter312 in self.notNullConstraints: + iter312.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.notNullConstraints is None: + raise TProtocol.TProtocolException(message='Required field notNullConstraints is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.notNullConstraints) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class DropConstraintRequest: + """ + Attributes: + - dbname + - tablename + - constraintname + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tablename', None, None, ), # 2 + (3, TType.STRING, 'constraintname', None, None, ), # 3 + ) + + def __init__(self, dbname=None, tablename=None, constraintname=None,): + self.dbname = dbname + self.tablename = tablename + self.constraintname = constraintname + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tablename = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.constraintname = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('DropConstraintRequest') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin('tablename', TType.STRING, 2) + oprot.writeString(self.tablename) + oprot.writeFieldEnd() + if self.constraintname is not None: + oprot.writeFieldBegin('constraintname', TType.STRING, 3) + oprot.writeString(self.constraintname) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbname is None: + raise TProtocol.TProtocolException(message='Required field dbname is unset!') + if self.tablename is None: + raise TProtocol.TProtocolException(message='Required field tablename is unset!') + if self.constraintname is None: + raise TProtocol.TProtocolException(message='Required field constraintname is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tablename) + value = (value * 31) ^ hash(self.constraintname) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AddPrimaryKeyRequest: + """ + Attributes: + - primaryKeyCols + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'primaryKeyCols', (TType.STRUCT,(SQLPrimaryKey, SQLPrimaryKey.thrift_spec)), None, ), # 1 + ) + + def __init__(self, primaryKeyCols=None,): + self.primaryKeyCols = primaryKeyCols + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.primaryKeyCols = [] + (_etype316, _size313) = iprot.readListBegin() + for _i317 in xrange(_size313): + _elem318 = SQLPrimaryKey() + _elem318.read(iprot) + self.primaryKeyCols.append(_elem318) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AddPrimaryKeyRequest') + if self.primaryKeyCols is not None: + oprot.writeFieldBegin('primaryKeyCols', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.primaryKeyCols)) + for iter319 in self.primaryKeyCols: + iter319.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.primaryKeyCols is None: + raise TProtocol.TProtocolException(message='Required field primaryKeyCols is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.primaryKeyCols) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AddForeignKeyRequest: + """ + Attributes: + - foreignKeyCols + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'foreignKeyCols', (TType.STRUCT,(SQLForeignKey, SQLForeignKey.thrift_spec)), None, ), # 1 + ) + + def __init__(self, foreignKeyCols=None,): + self.foreignKeyCols = foreignKeyCols + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.foreignKeyCols = [] + (_etype323, _size320) = iprot.readListBegin() + for _i324 in xrange(_size320): + _elem325 = SQLForeignKey() + _elem325.read(iprot) + self.foreignKeyCols.append(_elem325) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AddForeignKeyRequest') + if self.foreignKeyCols is not None: + oprot.writeFieldBegin('foreignKeyCols', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.foreignKeyCols)) + for iter326 in self.foreignKeyCols: + iter326.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.foreignKeyCols is None: + raise TProtocol.TProtocolException(message='Required field foreignKeyCols is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.foreignKeyCols) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AddUniqueConstraintRequest: + """ + Attributes: + - uniqueConstraintCols + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'uniqueConstraintCols', (TType.STRUCT,(SQLUniqueConstraint, SQLUniqueConstraint.thrift_spec)), None, ), # 1 + ) + + def __init__(self, uniqueConstraintCols=None,): + self.uniqueConstraintCols = uniqueConstraintCols + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.uniqueConstraintCols = [] + (_etype330, _size327) = iprot.readListBegin() + for _i331 in xrange(_size327): + _elem332 = SQLUniqueConstraint() + _elem332.read(iprot) + self.uniqueConstraintCols.append(_elem332) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AddUniqueConstraintRequest') + if self.uniqueConstraintCols is not None: + oprot.writeFieldBegin('uniqueConstraintCols', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraintCols)) + for iter333 in self.uniqueConstraintCols: + iter333.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.uniqueConstraintCols is None: + raise TProtocol.TProtocolException(message='Required field uniqueConstraintCols is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.uniqueConstraintCols) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AddNotNullConstraintRequest: + """ + Attributes: + - notNullConstraintCols + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'notNullConstraintCols', (TType.STRUCT,(SQLNotNullConstraint, SQLNotNullConstraint.thrift_spec)), None, ), # 1 + ) + + def __init__(self, notNullConstraintCols=None,): + self.notNullConstraintCols = notNullConstraintCols + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.notNullConstraintCols = [] + (_etype337, _size334) = iprot.readListBegin() + for _i338 in xrange(_size334): + _elem339 = SQLNotNullConstraint() + _elem339.read(iprot) + self.notNullConstraintCols.append(_elem339) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AddNotNullConstraintRequest') + if self.notNullConstraintCols is not None: + oprot.writeFieldBegin('notNullConstraintCols', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraintCols)) + for iter340 in self.notNullConstraintCols: + iter340.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.notNullConstraintCols is None: + raise TProtocol.TProtocolException(message='Required field notNullConstraintCols is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.notNullConstraintCols) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PartitionsByExprResult: + """ + Attributes: + - partitions + - hasUnknownPartitions + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'partitions', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1 + (2, TType.BOOL, 'hasUnknownPartitions', None, None, ), # 2 + ) + + def __init__(self, partitions=None, hasUnknownPartitions=None,): + self.partitions = partitions + self.hasUnknownPartitions = hasUnknownPartitions + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype344, _size341) = iprot.readListBegin() + for _i345 in xrange(_size341): + _elem346 = Partition() + _elem346.read(iprot) + self.partitions.append(_elem346) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.hasUnknownPartitions = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PartitionsByExprResult') + if self.partitions is not None: + oprot.writeFieldBegin('partitions', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter347 in self.partitions: + iter347.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.hasUnknownPartitions is not None: + oprot.writeFieldBegin('hasUnknownPartitions', TType.BOOL, 2) + oprot.writeBool(self.hasUnknownPartitions) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.partitions is None: + raise TProtocol.TProtocolException(message='Required field partitions is unset!') + if self.hasUnknownPartitions is None: + raise TProtocol.TProtocolException(message='Required field hasUnknownPartitions is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.partitions) + value = (value * 31) ^ hash(self.hasUnknownPartitions) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PartitionsByExprRequest: + """ + Attributes: + - dbName + - tblName + - expr + - defaultPartitionName + - maxParts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'tblName', None, None, ), # 2 + (3, TType.STRING, 'expr', None, None, ), # 3 + (4, TType.STRING, 'defaultPartitionName', None, None, ), # 4 + (5, TType.I16, 'maxParts', None, -1, ), # 5 + ) + + def __init__(self, dbName=None, tblName=None, expr=None, defaultPartitionName=None, maxParts=thrift_spec[5][4],): + self.dbName = dbName + self.tblName = tblName + self.expr = expr + self.defaultPartitionName = defaultPartitionName + self.maxParts = maxParts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.expr = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.defaultPartitionName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I16: + self.maxParts = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PartitionsByExprRequest') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin('tblName', TType.STRING, 2) + oprot.writeString(self.tblName) + oprot.writeFieldEnd() + if self.expr is not None: + oprot.writeFieldBegin('expr', TType.STRING, 3) + oprot.writeString(self.expr) + oprot.writeFieldEnd() + if self.defaultPartitionName is not None: + oprot.writeFieldBegin('defaultPartitionName', TType.STRING, 4) + oprot.writeString(self.defaultPartitionName) + oprot.writeFieldEnd() + if self.maxParts is not None: + oprot.writeFieldBegin('maxParts', TType.I16, 5) + oprot.writeI16(self.maxParts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocol.TProtocolException(message='Required field dbName is unset!') + if self.tblName is None: + raise TProtocol.TProtocolException(message='Required field tblName is unset!') + if self.expr is None: + raise TProtocol.TProtocolException(message='Required field expr is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tblName) + value = (value * 31) ^ hash(self.expr) + value = (value * 31) ^ hash(self.defaultPartitionName) + value = (value * 31) ^ hash(self.maxParts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class TableStatsResult: + """ + Attributes: + - tableStats + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'tableStats', (TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec)), None, ), # 1 + ) + + def __init__(self, tableStats=None,): + self.tableStats = tableStats + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.tableStats = [] + (_etype351, _size348) = iprot.readListBegin() + for _i352 in xrange(_size348): + _elem353 = ColumnStatisticsObj() + _elem353.read(iprot) + self.tableStats.append(_elem353) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('TableStatsResult') + if self.tableStats is not None: + oprot.writeFieldBegin('tableStats', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.tableStats)) + for iter354 in self.tableStats: + iter354.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableStats is None: + raise TProtocol.TProtocolException(message='Required field tableStats is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.tableStats) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PartitionsStatsResult: + """ + Attributes: + - partStats + """ + + thrift_spec = ( + None, # 0 + (1, TType.MAP, 'partStats', (TType.STRING,None,TType.LIST,(TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec))), None, ), # 1 + ) + + def __init__(self, partStats=None,): + self.partStats = partStats + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.partStats = {} + (_ktype356, _vtype357, _size355 ) = iprot.readMapBegin() + for _i359 in xrange(_size355): + _key360 = iprot.readString() + _val361 = [] + (_etype365, _size362) = iprot.readListBegin() + for _i366 in xrange(_size362): + _elem367 = ColumnStatisticsObj() + _elem367.read(iprot) + _val361.append(_elem367) + iprot.readListEnd() + self.partStats[_key360] = _val361 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PartitionsStatsResult') + if self.partStats is not None: + oprot.writeFieldBegin('partStats', TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.partStats)) + for kiter368,viter369 in self.partStats.items(): + oprot.writeString(kiter368) + oprot.writeListBegin(TType.STRUCT, len(viter369)) + for iter370 in viter369: + iter370.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.partStats is None: + raise TProtocol.TProtocolException(message='Required field partStats is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.partStats) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class TableStatsRequest: + """ + Attributes: + - dbName + - tblName + - colNames + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'tblName', None, None, ), # 2 + (3, TType.LIST, 'colNames', (TType.STRING,None), None, ), # 3 + ) + + def __init__(self, dbName=None, tblName=None, colNames=None,): + self.dbName = dbName + self.tblName = tblName + self.colNames = colNames + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.colNames = [] + (_etype374, _size371) = iprot.readListBegin() + for _i375 in xrange(_size371): + _elem376 = iprot.readString() + self.colNames.append(_elem376) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('TableStatsRequest') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin('tblName', TType.STRING, 2) + oprot.writeString(self.tblName) + oprot.writeFieldEnd() + if self.colNames is not None: + oprot.writeFieldBegin('colNames', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.colNames)) + for iter377 in self.colNames: + oprot.writeString(iter377) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocol.TProtocolException(message='Required field dbName is unset!') + if self.tblName is None: + raise TProtocol.TProtocolException(message='Required field tblName is unset!') + if self.colNames is None: + raise TProtocol.TProtocolException(message='Required field colNames is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tblName) + value = (value * 31) ^ hash(self.colNames) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PartitionsStatsRequest: + """ + Attributes: + - dbName + - tblName + - colNames + - partNames + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'tblName', None, None, ), # 2 + (3, TType.LIST, 'colNames', (TType.STRING,None), None, ), # 3 + (4, TType.LIST, 'partNames', (TType.STRING,None), None, ), # 4 + ) + + def __init__(self, dbName=None, tblName=None, colNames=None, partNames=None,): + self.dbName = dbName + self.tblName = tblName + self.colNames = colNames + self.partNames = partNames + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.colNames = [] + (_etype381, _size378) = iprot.readListBegin() + for _i382 in xrange(_size378): + _elem383 = iprot.readString() + self.colNames.append(_elem383) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.partNames = [] + (_etype387, _size384) = iprot.readListBegin() + for _i388 in xrange(_size384): + _elem389 = iprot.readString() + self.partNames.append(_elem389) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PartitionsStatsRequest') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin('tblName', TType.STRING, 2) + oprot.writeString(self.tblName) + oprot.writeFieldEnd() + if self.colNames is not None: + oprot.writeFieldBegin('colNames', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.colNames)) + for iter390 in self.colNames: + oprot.writeString(iter390) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.partNames is not None: + oprot.writeFieldBegin('partNames', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.partNames)) + for iter391 in self.partNames: + oprot.writeString(iter391) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocol.TProtocolException(message='Required field dbName is unset!') + if self.tblName is None: + raise TProtocol.TProtocolException(message='Required field tblName is unset!') + if self.colNames is None: + raise TProtocol.TProtocolException(message='Required field colNames is unset!') + if self.partNames is None: + raise TProtocol.TProtocolException(message='Required field partNames is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tblName) + value = (value * 31) ^ hash(self.colNames) + value = (value * 31) ^ hash(self.partNames) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AddPartitionsResult: + """ + Attributes: + - partitions + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'partitions', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1 + ) + + def __init__(self, partitions=None,): + self.partitions = partitions + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype395, _size392) = iprot.readListBegin() + for _i396 in xrange(_size392): + _elem397 = Partition() + _elem397.read(iprot) + self.partitions.append(_elem397) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AddPartitionsResult') + if self.partitions is not None: + oprot.writeFieldBegin('partitions', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter398 in self.partitions: + iter398.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.partitions) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AddPartitionsRequest: + """ + Attributes: + - dbName + - tblName + - parts + - ifNotExists + - needResult + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'tblName', None, None, ), # 2 + (3, TType.LIST, 'parts', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 3 + (4, TType.BOOL, 'ifNotExists', None, None, ), # 4 + (5, TType.BOOL, 'needResult', None, True, ), # 5 + ) + + def __init__(self, dbName=None, tblName=None, parts=None, ifNotExists=None, needResult=thrift_spec[5][4],): + self.dbName = dbName + self.tblName = tblName + self.parts = parts + self.ifNotExists = ifNotExists + self.needResult = needResult + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.parts = [] + (_etype402, _size399) = iprot.readListBegin() + for _i403 in xrange(_size399): + _elem404 = Partition() + _elem404.read(iprot) + self.parts.append(_elem404) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.ifNotExists = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.needResult = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AddPartitionsRequest') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin('tblName', TType.STRING, 2) + oprot.writeString(self.tblName) + oprot.writeFieldEnd() + if self.parts is not None: + oprot.writeFieldBegin('parts', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.parts)) + for iter405 in self.parts: + iter405.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.ifNotExists is not None: + oprot.writeFieldBegin('ifNotExists', TType.BOOL, 4) + oprot.writeBool(self.ifNotExists) + oprot.writeFieldEnd() + if self.needResult is not None: + oprot.writeFieldBegin('needResult', TType.BOOL, 5) + oprot.writeBool(self.needResult) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocol.TProtocolException(message='Required field dbName is unset!') + if self.tblName is None: + raise TProtocol.TProtocolException(message='Required field tblName is unset!') + if self.parts is None: + raise TProtocol.TProtocolException(message='Required field parts is unset!') + if self.ifNotExists is None: + raise TProtocol.TProtocolException(message='Required field ifNotExists is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tblName) + value = (value * 31) ^ hash(self.parts) + value = (value * 31) ^ hash(self.ifNotExists) + value = (value * 31) ^ hash(self.needResult) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class DropPartitionsResult: + """ + Attributes: + - partitions + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'partitions', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1 + ) + + def __init__(self, partitions=None,): + self.partitions = partitions + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.partitions = [] + (_etype409, _size406) = iprot.readListBegin() + for _i410 in xrange(_size406): + _elem411 = Partition() + _elem411.read(iprot) + self.partitions.append(_elem411) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('DropPartitionsResult') + if self.partitions is not None: + oprot.writeFieldBegin('partitions', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.partitions)) + for iter412 in self.partitions: + iter412.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.partitions) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class DropPartitionsExpr: + """ + Attributes: + - expr + - partArchiveLevel + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'expr', None, None, ), # 1 + (2, TType.I32, 'partArchiveLevel', None, None, ), # 2 + ) + + def __init__(self, expr=None, partArchiveLevel=None,): + self.expr = expr + self.partArchiveLevel = partArchiveLevel + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.expr = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.partArchiveLevel = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('DropPartitionsExpr') + if self.expr is not None: + oprot.writeFieldBegin('expr', TType.STRING, 1) + oprot.writeString(self.expr) + oprot.writeFieldEnd() + if self.partArchiveLevel is not None: + oprot.writeFieldBegin('partArchiveLevel', TType.I32, 2) + oprot.writeI32(self.partArchiveLevel) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.expr is None: + raise TProtocol.TProtocolException(message='Required field expr is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.expr) + value = (value * 31) ^ hash(self.partArchiveLevel) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class RequestPartsSpec: + """ + Attributes: + - names + - exprs + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'names', (TType.STRING,None), None, ), # 1 + (2, TType.LIST, 'exprs', (TType.STRUCT,(DropPartitionsExpr, DropPartitionsExpr.thrift_spec)), None, ), # 2 + ) + + def __init__(self, names=None, exprs=None,): + self.names = names + self.exprs = exprs + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.names = [] + (_etype416, _size413) = iprot.readListBegin() + for _i417 in xrange(_size413): + _elem418 = iprot.readString() + self.names.append(_elem418) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.exprs = [] + (_etype422, _size419) = iprot.readListBegin() + for _i423 in xrange(_size419): + _elem424 = DropPartitionsExpr() + _elem424.read(iprot) + self.exprs.append(_elem424) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('RequestPartsSpec') + if self.names is not None: + oprot.writeFieldBegin('names', TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.names)) + for iter425 in self.names: + oprot.writeString(iter425) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.exprs is not None: + oprot.writeFieldBegin('exprs', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.exprs)) + for iter426 in self.exprs: + iter426.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.names) + value = (value * 31) ^ hash(self.exprs) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class DropPartitionsRequest: + """ + Attributes: + - dbName + - tblName + - parts + - deleteData + - ifExists + - ignoreProtection + - environmentContext + - needResult + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'tblName', None, None, ), # 2 + (3, TType.STRUCT, 'parts', (RequestPartsSpec, RequestPartsSpec.thrift_spec), None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 + (5, TType.BOOL, 'ifExists', None, True, ), # 5 + (6, TType.BOOL, 'ignoreProtection', None, None, ), # 6 + (7, TType.STRUCT, 'environmentContext', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 7 + (8, TType.BOOL, 'needResult', None, True, ), # 8 + ) + + def __init__(self, dbName=None, tblName=None, parts=None, deleteData=None, ifExists=thrift_spec[5][4], ignoreProtection=None, environmentContext=None, needResult=thrift_spec[8][4],): + self.dbName = dbName + self.tblName = tblName + self.parts = parts + self.deleteData = deleteData + self.ifExists = ifExists + self.ignoreProtection = ignoreProtection + self.environmentContext = environmentContext + self.needResult = needResult + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.parts = RequestPartsSpec() + self.parts.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.ifExists = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.ignoreProtection = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.environmentContext = EnvironmentContext() + self.environmentContext.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.needResult = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('DropPartitionsRequest') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin('tblName', TType.STRING, 2) + oprot.writeString(self.tblName) + oprot.writeFieldEnd() + if self.parts is not None: + oprot.writeFieldBegin('parts', TType.STRUCT, 3) + self.parts.write(oprot) + oprot.writeFieldEnd() + if self.deleteData is not None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + if self.ifExists is not None: + oprot.writeFieldBegin('ifExists', TType.BOOL, 5) + oprot.writeBool(self.ifExists) + oprot.writeFieldEnd() + if self.ignoreProtection is not None: + oprot.writeFieldBegin('ignoreProtection', TType.BOOL, 6) + oprot.writeBool(self.ignoreProtection) + oprot.writeFieldEnd() + if self.environmentContext is not None: + oprot.writeFieldBegin('environmentContext', TType.STRUCT, 7) + self.environmentContext.write(oprot) + oprot.writeFieldEnd() + if self.needResult is not None: + oprot.writeFieldBegin('needResult', TType.BOOL, 8) + oprot.writeBool(self.needResult) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocol.TProtocolException(message='Required field dbName is unset!') + if self.tblName is None: + raise TProtocol.TProtocolException(message='Required field tblName is unset!') + if self.parts is None: + raise TProtocol.TProtocolException(message='Required field parts is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tblName) + value = (value * 31) ^ hash(self.parts) + value = (value * 31) ^ hash(self.deleteData) + value = (value * 31) ^ hash(self.ifExists) + value = (value * 31) ^ hash(self.ignoreProtection) + value = (value * 31) ^ hash(self.environmentContext) + value = (value * 31) ^ hash(self.needResult) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ResourceUri: + """ + Attributes: + - resourceType + - uri + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'resourceType', None, None, ), # 1 + (2, TType.STRING, 'uri', None, None, ), # 2 + ) + + def __init__(self, resourceType=None, uri=None,): + self.resourceType = resourceType + self.uri = uri + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.resourceType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.uri = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ResourceUri') + if self.resourceType is not None: + oprot.writeFieldBegin('resourceType', TType.I32, 1) + oprot.writeI32(self.resourceType) + oprot.writeFieldEnd() + if self.uri is not None: + oprot.writeFieldBegin('uri', TType.STRING, 2) + oprot.writeString(self.uri) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.resourceType) + value = (value * 31) ^ hash(self.uri) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Function: + """ + Attributes: + - functionName + - dbName + - className + - ownerName + - ownerType + - createTime + - functionType + - resourceUris + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'functionName', None, None, ), # 1 + (2, TType.STRING, 'dbName', None, None, ), # 2 + (3, TType.STRING, 'className', None, None, ), # 3 + (4, TType.STRING, 'ownerName', None, None, ), # 4 + (5, TType.I32, 'ownerType', None, None, ), # 5 + (6, TType.I32, 'createTime', None, None, ), # 6 + (7, TType.I32, 'functionType', None, None, ), # 7 + (8, TType.LIST, 'resourceUris', (TType.STRUCT,(ResourceUri, ResourceUri.thrift_spec)), None, ), # 8 + ) + + def __init__(self, functionName=None, dbName=None, className=None, ownerName=None, ownerType=None, createTime=None, functionType=None, resourceUris=None,): + self.functionName = functionName + self.dbName = dbName + self.className = className + self.ownerName = ownerName + self.ownerType = ownerType + self.createTime = createTime + self.functionType = functionType + self.resourceUris = resourceUris + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.functionName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.className = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.ownerName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.ownerType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.createTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.functionType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.resourceUris = [] + (_etype430, _size427) = iprot.readListBegin() + for _i431 in xrange(_size427): + _elem432 = ResourceUri() + _elem432.read(iprot) + self.resourceUris.append(_elem432) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Function') + if self.functionName is not None: + oprot.writeFieldBegin('functionName', TType.STRING, 1) + oprot.writeString(self.functionName) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 2) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.className is not None: + oprot.writeFieldBegin('className', TType.STRING, 3) + oprot.writeString(self.className) + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin('ownerName', TType.STRING, 4) + oprot.writeString(self.ownerName) + oprot.writeFieldEnd() + if self.ownerType is not None: + oprot.writeFieldBegin('ownerType', TType.I32, 5) + oprot.writeI32(self.ownerType) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin('createTime', TType.I32, 6) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.functionType is not None: + oprot.writeFieldBegin('functionType', TType.I32, 7) + oprot.writeI32(self.functionType) + oprot.writeFieldEnd() + if self.resourceUris is not None: + oprot.writeFieldBegin('resourceUris', TType.LIST, 8) + oprot.writeListBegin(TType.STRUCT, len(self.resourceUris)) + for iter433 in self.resourceUris: + iter433.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.functionName) + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.className) + value = (value * 31) ^ hash(self.ownerName) + value = (value * 31) ^ hash(self.ownerType) + value = (value * 31) ^ hash(self.createTime) + value = (value * 31) ^ hash(self.functionType) + value = (value * 31) ^ hash(self.resourceUris) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class TxnInfo: + """ + Attributes: + - id + - state + - user + - hostname + - agentInfo + - heartbeatCount + - metaInfo + - startedTime + - lastHeartbeatTime + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'id', None, None, ), # 1 + (2, TType.I32, 'state', None, None, ), # 2 + (3, TType.STRING, 'user', None, None, ), # 3 + (4, TType.STRING, 'hostname', None, None, ), # 4 + (5, TType.STRING, 'agentInfo', None, "Unknown", ), # 5 + (6, TType.I32, 'heartbeatCount', None, 0, ), # 6 + (7, TType.STRING, 'metaInfo', None, None, ), # 7 + (8, TType.I64, 'startedTime', None, None, ), # 8 + (9, TType.I64, 'lastHeartbeatTime', None, None, ), # 9 + ) + + def __init__(self, id=None, state=None, user=None, hostname=None, agentInfo=thrift_spec[5][4], heartbeatCount=thrift_spec[6][4], metaInfo=None, startedTime=None, lastHeartbeatTime=None,): + self.id = id + self.state = state + self.user = user + self.hostname = hostname + self.agentInfo = agentInfo + self.heartbeatCount = heartbeatCount + self.metaInfo = metaInfo + self.startedTime = startedTime + self.lastHeartbeatTime = lastHeartbeatTime + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.state = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.user = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.hostname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.agentInfo = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.heartbeatCount = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.metaInfo = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I64: + self.startedTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I64: + self.lastHeartbeatTime = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('TxnInfo') + if self.id is not None: + oprot.writeFieldBegin('id', TType.I64, 1) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin('state', TType.I32, 2) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + if self.user is not None: + oprot.writeFieldBegin('user', TType.STRING, 3) + oprot.writeString(self.user) + oprot.writeFieldEnd() + if self.hostname is not None: + oprot.writeFieldBegin('hostname', TType.STRING, 4) + oprot.writeString(self.hostname) + oprot.writeFieldEnd() + if self.agentInfo is not None: + oprot.writeFieldBegin('agentInfo', TType.STRING, 5) + oprot.writeString(self.agentInfo) + oprot.writeFieldEnd() + if self.heartbeatCount is not None: + oprot.writeFieldBegin('heartbeatCount', TType.I32, 6) + oprot.writeI32(self.heartbeatCount) + oprot.writeFieldEnd() + if self.metaInfo is not None: + oprot.writeFieldBegin('metaInfo', TType.STRING, 7) + oprot.writeString(self.metaInfo) + oprot.writeFieldEnd() + if self.startedTime is not None: + oprot.writeFieldBegin('startedTime', TType.I64, 8) + oprot.writeI64(self.startedTime) + oprot.writeFieldEnd() + if self.lastHeartbeatTime is not None: + oprot.writeFieldBegin('lastHeartbeatTime', TType.I64, 9) + oprot.writeI64(self.lastHeartbeatTime) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.id is None: + raise TProtocol.TProtocolException(message='Required field id is unset!') + if self.state is None: + raise TProtocol.TProtocolException(message='Required field state is unset!') + if self.user is None: + raise TProtocol.TProtocolException(message='Required field user is unset!') + if self.hostname is None: + raise TProtocol.TProtocolException(message='Required field hostname is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.id) + value = (value * 31) ^ hash(self.state) + value = (value * 31) ^ hash(self.user) + value = (value * 31) ^ hash(self.hostname) + value = (value * 31) ^ hash(self.agentInfo) + value = (value * 31) ^ hash(self.heartbeatCount) + value = (value * 31) ^ hash(self.metaInfo) + value = (value * 31) ^ hash(self.startedTime) + value = (value * 31) ^ hash(self.lastHeartbeatTime) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetOpenTxnsInfoResponse: + """ + Attributes: + - txn_high_water_mark + - open_txns + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'txn_high_water_mark', None, None, ), # 1 + (2, TType.LIST, 'open_txns', (TType.STRUCT,(TxnInfo, TxnInfo.thrift_spec)), None, ), # 2 + ) + + def __init__(self, txn_high_water_mark=None, open_txns=None,): + self.txn_high_water_mark = txn_high_water_mark + self.open_txns = open_txns + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txn_high_water_mark = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.open_txns = [] + (_etype437, _size434) = iprot.readListBegin() + for _i438 in xrange(_size434): + _elem439 = TxnInfo() + _elem439.read(iprot) + self.open_txns.append(_elem439) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetOpenTxnsInfoResponse') + if self.txn_high_water_mark is not None: + oprot.writeFieldBegin('txn_high_water_mark', TType.I64, 1) + oprot.writeI64(self.txn_high_water_mark) + oprot.writeFieldEnd() + if self.open_txns is not None: + oprot.writeFieldBegin('open_txns', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.open_txns)) + for iter440 in self.open_txns: + iter440.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txn_high_water_mark is None: + raise TProtocol.TProtocolException(message='Required field txn_high_water_mark is unset!') + if self.open_txns is None: + raise TProtocol.TProtocolException(message='Required field open_txns is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.txn_high_water_mark) + value = (value * 31) ^ hash(self.open_txns) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetOpenTxnsResponse: + """ + Attributes: + - txn_high_water_mark + - open_txns + - min_open_txn + - abortedBits + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'txn_high_water_mark', None, None, ), # 1 + (2, TType.LIST, 'open_txns', (TType.I64,None), None, ), # 2 + (3, TType.I64, 'min_open_txn', None, None, ), # 3 + (4, TType.STRING, 'abortedBits', None, None, ), # 4 + ) + + def __init__(self, txn_high_water_mark=None, open_txns=None, min_open_txn=None, abortedBits=None,): + self.txn_high_water_mark = txn_high_water_mark + self.open_txns = open_txns + self.min_open_txn = min_open_txn + self.abortedBits = abortedBits + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txn_high_water_mark = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.open_txns = [] + (_etype444, _size441) = iprot.readListBegin() + for _i445 in xrange(_size441): + _elem446 = iprot.readI64() + self.open_txns.append(_elem446) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.min_open_txn = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.abortedBits = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetOpenTxnsResponse') + if self.txn_high_water_mark is not None: + oprot.writeFieldBegin('txn_high_water_mark', TType.I64, 1) + oprot.writeI64(self.txn_high_water_mark) + oprot.writeFieldEnd() + if self.open_txns is not None: + oprot.writeFieldBegin('open_txns', TType.LIST, 2) + oprot.writeListBegin(TType.I64, len(self.open_txns)) + for iter447 in self.open_txns: + oprot.writeI64(iter447) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.min_open_txn is not None: + oprot.writeFieldBegin('min_open_txn', TType.I64, 3) + oprot.writeI64(self.min_open_txn) + oprot.writeFieldEnd() + if self.abortedBits is not None: + oprot.writeFieldBegin('abortedBits', TType.STRING, 4) + oprot.writeString(self.abortedBits) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txn_high_water_mark is None: + raise TProtocol.TProtocolException(message='Required field txn_high_water_mark is unset!') + if self.open_txns is None: + raise TProtocol.TProtocolException(message='Required field open_txns is unset!') + if self.abortedBits is None: + raise TProtocol.TProtocolException(message='Required field abortedBits is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.txn_high_water_mark) + value = (value * 31) ^ hash(self.open_txns) + value = (value * 31) ^ hash(self.min_open_txn) + value = (value * 31) ^ hash(self.abortedBits) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class OpenTxnRequest: + """ + Attributes: + - num_txns + - user + - hostname + - agentInfo + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'num_txns', None, None, ), # 1 + (2, TType.STRING, 'user', None, None, ), # 2 + (3, TType.STRING, 'hostname', None, None, ), # 3 + (4, TType.STRING, 'agentInfo', None, "Unknown", ), # 4 + ) + + def __init__(self, num_txns=None, user=None, hostname=None, agentInfo=thrift_spec[4][4],): + self.num_txns = num_txns + self.user = user + self.hostname = hostname + self.agentInfo = agentInfo + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.num_txns = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.user = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.hostname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.agentInfo = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('OpenTxnRequest') + if self.num_txns is not None: + oprot.writeFieldBegin('num_txns', TType.I32, 1) + oprot.writeI32(self.num_txns) + oprot.writeFieldEnd() + if self.user is not None: + oprot.writeFieldBegin('user', TType.STRING, 2) + oprot.writeString(self.user) + oprot.writeFieldEnd() + if self.hostname is not None: + oprot.writeFieldBegin('hostname', TType.STRING, 3) + oprot.writeString(self.hostname) + oprot.writeFieldEnd() + if self.agentInfo is not None: + oprot.writeFieldBegin('agentInfo', TType.STRING, 4) + oprot.writeString(self.agentInfo) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.num_txns is None: + raise TProtocol.TProtocolException(message='Required field num_txns is unset!') + if self.user is None: + raise TProtocol.TProtocolException(message='Required field user is unset!') + if self.hostname is None: + raise TProtocol.TProtocolException(message='Required field hostname is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.num_txns) + value = (value * 31) ^ hash(self.user) + value = (value * 31) ^ hash(self.hostname) + value = (value * 31) ^ hash(self.agentInfo) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class OpenTxnsResponse: + """ + Attributes: + - txn_ids + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'txn_ids', (TType.I64,None), None, ), # 1 + ) + + def __init__(self, txn_ids=None,): + self.txn_ids = txn_ids + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.txn_ids = [] + (_etype451, _size448) = iprot.readListBegin() + for _i452 in xrange(_size448): + _elem453 = iprot.readI64() + self.txn_ids.append(_elem453) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('OpenTxnsResponse') + if self.txn_ids is not None: + oprot.writeFieldBegin('txn_ids', TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.txn_ids)) + for iter454 in self.txn_ids: + oprot.writeI64(iter454) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txn_ids is None: + raise TProtocol.TProtocolException(message='Required field txn_ids is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.txn_ids) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AbortTxnRequest: + """ + Attributes: + - txnid + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'txnid', None, None, ), # 1 + ) + + def __init__(self, txnid=None,): + self.txnid = txnid + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AbortTxnRequest') + if self.txnid is not None: + oprot.writeFieldBegin('txnid', TType.I64, 1) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txnid is None: + raise TProtocol.TProtocolException(message='Required field txnid is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.txnid) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AbortTxnsRequest: + """ + Attributes: + - txn_ids + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'txn_ids', (TType.I64,None), None, ), # 1 + ) + + def __init__(self, txn_ids=None,): + self.txn_ids = txn_ids + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.txn_ids = [] + (_etype458, _size455) = iprot.readListBegin() + for _i459 in xrange(_size455): + _elem460 = iprot.readI64() + self.txn_ids.append(_elem460) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AbortTxnsRequest') + if self.txn_ids is not None: + oprot.writeFieldBegin('txn_ids', TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.txn_ids)) + for iter461 in self.txn_ids: + oprot.writeI64(iter461) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txn_ids is None: + raise TProtocol.TProtocolException(message='Required field txn_ids is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.txn_ids) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CommitTxnRequest: + """ + Attributes: + - txnid + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'txnid', None, None, ), # 1 + ) + + def __init__(self, txnid=None,): + self.txnid = txnid + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('CommitTxnRequest') + if self.txnid is not None: + oprot.writeFieldBegin('txnid', TType.I64, 1) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txnid is None: + raise TProtocol.TProtocolException(message='Required field txnid is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.txnid) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class LockComponent: + """ + Attributes: + - type + - level + - dbname + - tablename + - partitionname + - operationType + - isAcid + - isDynamicPartitionWrite + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'type', None, None, ), # 1 + (2, TType.I32, 'level', None, None, ), # 2 + (3, TType.STRING, 'dbname', None, None, ), # 3 + (4, TType.STRING, 'tablename', None, None, ), # 4 + (5, TType.STRING, 'partitionname', None, None, ), # 5 + (6, TType.I32, 'operationType', None, 5, ), # 6 + (7, TType.BOOL, 'isAcid', None, False, ), # 7 + (8, TType.BOOL, 'isDynamicPartitionWrite', None, False, ), # 8 + ) + + def __init__(self, type=None, level=None, dbname=None, tablename=None, partitionname=None, operationType=thrift_spec[6][4], isAcid=thrift_spec[7][4], isDynamicPartitionWrite=thrift_spec[8][4],): + self.type = type + self.level = level + self.dbname = dbname + self.tablename = tablename + self.partitionname = partitionname + self.operationType = operationType + self.isAcid = isAcid + self.isDynamicPartitionWrite = isDynamicPartitionWrite + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.level = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.tablename = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.partitionname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.operationType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.isAcid = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.isDynamicPartitionWrite = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('LockComponent') + if self.type is not None: + oprot.writeFieldBegin('type', TType.I32, 1) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.level is not None: + oprot.writeFieldBegin('level', TType.I32, 2) + oprot.writeI32(self.level) + oprot.writeFieldEnd() + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 3) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin('tablename', TType.STRING, 4) + oprot.writeString(self.tablename) + oprot.writeFieldEnd() + if self.partitionname is not None: + oprot.writeFieldBegin('partitionname', TType.STRING, 5) + oprot.writeString(self.partitionname) + oprot.writeFieldEnd() + if self.operationType is not None: + oprot.writeFieldBegin('operationType', TType.I32, 6) + oprot.writeI32(self.operationType) + oprot.writeFieldEnd() + if self.isAcid is not None: + oprot.writeFieldBegin('isAcid', TType.BOOL, 7) + oprot.writeBool(self.isAcid) + oprot.writeFieldEnd() + if self.isDynamicPartitionWrite is not None: + oprot.writeFieldBegin('isDynamicPartitionWrite', TType.BOOL, 8) + oprot.writeBool(self.isDynamicPartitionWrite) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.type is None: + raise TProtocol.TProtocolException(message='Required field type is unset!') + if self.level is None: + raise TProtocol.TProtocolException(message='Required field level is unset!') + if self.dbname is None: + raise TProtocol.TProtocolException(message='Required field dbname is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.type) + value = (value * 31) ^ hash(self.level) + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tablename) + value = (value * 31) ^ hash(self.partitionname) + value = (value * 31) ^ hash(self.operationType) + value = (value * 31) ^ hash(self.isAcid) + value = (value * 31) ^ hash(self.isDynamicPartitionWrite) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class LockRequest: + """ + Attributes: + - component + - txnid + - user + - hostname + - agentInfo + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'component', (TType.STRUCT,(LockComponent, LockComponent.thrift_spec)), None, ), # 1 + (2, TType.I64, 'txnid', None, None, ), # 2 + (3, TType.STRING, 'user', None, None, ), # 3 + (4, TType.STRING, 'hostname', None, None, ), # 4 + (5, TType.STRING, 'agentInfo', None, "Unknown", ), # 5 + ) + + def __init__(self, component=None, txnid=None, user=None, hostname=None, agentInfo=thrift_spec[5][4],): + self.component = component + self.txnid = txnid + self.user = user + self.hostname = hostname + self.agentInfo = agentInfo + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.component = [] + (_etype465, _size462) = iprot.readListBegin() + for _i466 in xrange(_size462): + _elem467 = LockComponent() + _elem467.read(iprot) + self.component.append(_elem467) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.user = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.hostname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.agentInfo = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('LockRequest') + if self.component is not None: + oprot.writeFieldBegin('component', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.component)) + for iter468 in self.component: + iter468.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.txnid is not None: + oprot.writeFieldBegin('txnid', TType.I64, 2) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + if self.user is not None: + oprot.writeFieldBegin('user', TType.STRING, 3) + oprot.writeString(self.user) + oprot.writeFieldEnd() + if self.hostname is not None: + oprot.writeFieldBegin('hostname', TType.STRING, 4) + oprot.writeString(self.hostname) + oprot.writeFieldEnd() + if self.agentInfo is not None: + oprot.writeFieldBegin('agentInfo', TType.STRING, 5) + oprot.writeString(self.agentInfo) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.component is None: + raise TProtocol.TProtocolException(message='Required field component is unset!') + if self.user is None: + raise TProtocol.TProtocolException(message='Required field user is unset!') + if self.hostname is None: + raise TProtocol.TProtocolException(message='Required field hostname is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.component) + value = (value * 31) ^ hash(self.txnid) + value = (value * 31) ^ hash(self.user) + value = (value * 31) ^ hash(self.hostname) + value = (value * 31) ^ hash(self.agentInfo) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class LockResponse: + """ + Attributes: + - lockid + - state + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'lockid', None, None, ), # 1 + (2, TType.I32, 'state', None, None, ), # 2 + ) + + def __init__(self, lockid=None, state=None,): + self.lockid = lockid + self.state = state + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lockid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.state = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('LockResponse') + if self.lockid is not None: + oprot.writeFieldBegin('lockid', TType.I64, 1) + oprot.writeI64(self.lockid) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin('state', TType.I32, 2) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.lockid is None: + raise TProtocol.TProtocolException(message='Required field lockid is unset!') + if self.state is None: + raise TProtocol.TProtocolException(message='Required field state is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.lockid) + value = (value * 31) ^ hash(self.state) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CheckLockRequest: + """ + Attributes: + - lockid + - txnid + - elapsed_ms + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'lockid', None, None, ), # 1 + (2, TType.I64, 'txnid', None, None, ), # 2 + (3, TType.I64, 'elapsed_ms', None, None, ), # 3 + ) + + def __init__(self, lockid=None, txnid=None, elapsed_ms=None,): + self.lockid = lockid + self.txnid = txnid + self.elapsed_ms = elapsed_ms + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lockid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.elapsed_ms = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('CheckLockRequest') + if self.lockid is not None: + oprot.writeFieldBegin('lockid', TType.I64, 1) + oprot.writeI64(self.lockid) + oprot.writeFieldEnd() + if self.txnid is not None: + oprot.writeFieldBegin('txnid', TType.I64, 2) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + if self.elapsed_ms is not None: + oprot.writeFieldBegin('elapsed_ms', TType.I64, 3) + oprot.writeI64(self.elapsed_ms) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.lockid is None: + raise TProtocol.TProtocolException(message='Required field lockid is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.lockid) + value = (value * 31) ^ hash(self.txnid) + value = (value * 31) ^ hash(self.elapsed_ms) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UnlockRequest: + """ + Attributes: + - lockid + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'lockid', None, None, ), # 1 + ) + + def __init__(self, lockid=None,): + self.lockid = lockid + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lockid = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UnlockRequest') + if self.lockid is not None: + oprot.writeFieldBegin('lockid', TType.I64, 1) + oprot.writeI64(self.lockid) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.lockid is None: + raise TProtocol.TProtocolException(message='Required field lockid is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.lockid) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ShowLocksRequest: + """ + Attributes: + - dbname + - tablename + - partname + - isExtended + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tablename', None, None, ), # 2 + (3, TType.STRING, 'partname', None, None, ), # 3 + (4, TType.BOOL, 'isExtended', None, False, ), # 4 + ) + + def __init__(self, dbname=None, tablename=None, partname=None, isExtended=thrift_spec[4][4],): + self.dbname = dbname + self.tablename = tablename + self.partname = partname + self.isExtended = isExtended + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tablename = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.partname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.isExtended = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ShowLocksRequest') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin('tablename', TType.STRING, 2) + oprot.writeString(self.tablename) + oprot.writeFieldEnd() + if self.partname is not None: + oprot.writeFieldBegin('partname', TType.STRING, 3) + oprot.writeString(self.partname) + oprot.writeFieldEnd() + if self.isExtended is not None: + oprot.writeFieldBegin('isExtended', TType.BOOL, 4) + oprot.writeBool(self.isExtended) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tablename) + value = (value * 31) ^ hash(self.partname) + value = (value * 31) ^ hash(self.isExtended) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ShowLocksResponseElement: + """ + Attributes: + - lockid + - dbname + - tablename + - partname + - state + - type + - txnid + - lastheartbeat + - acquiredat + - user + - hostname + - heartbeatCount + - agentInfo + - blockedByExtId + - blockedByIntId + - lockIdInternal + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'lockid', None, None, ), # 1 + (2, TType.STRING, 'dbname', None, None, ), # 2 + (3, TType.STRING, 'tablename', None, None, ), # 3 + (4, TType.STRING, 'partname', None, None, ), # 4 + (5, TType.I32, 'state', None, None, ), # 5 + (6, TType.I32, 'type', None, None, ), # 6 + (7, TType.I64, 'txnid', None, None, ), # 7 + (8, TType.I64, 'lastheartbeat', None, None, ), # 8 + (9, TType.I64, 'acquiredat', None, None, ), # 9 + (10, TType.STRING, 'user', None, None, ), # 10 + (11, TType.STRING, 'hostname', None, None, ), # 11 + (12, TType.I32, 'heartbeatCount', None, 0, ), # 12 + (13, TType.STRING, 'agentInfo', None, None, ), # 13 + (14, TType.I64, 'blockedByExtId', None, None, ), # 14 + (15, TType.I64, 'blockedByIntId', None, None, ), # 15 + (16, TType.I64, 'lockIdInternal', None, None, ), # 16 + ) + + def __init__(self, lockid=None, dbname=None, tablename=None, partname=None, state=None, type=None, txnid=None, lastheartbeat=None, acquiredat=None, user=None, hostname=None, heartbeatCount=thrift_spec[12][4], agentInfo=None, blockedByExtId=None, blockedByIntId=None, lockIdInternal=None,): + self.lockid = lockid + self.dbname = dbname + self.tablename = tablename + self.partname = partname + self.state = state + self.type = type + self.txnid = txnid + self.lastheartbeat = lastheartbeat + self.acquiredat = acquiredat + self.user = user + self.hostname = hostname + self.heartbeatCount = heartbeatCount + self.agentInfo = agentInfo + self.blockedByExtId = blockedByExtId + self.blockedByIntId = blockedByIntId + self.lockIdInternal = lockIdInternal + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lockid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tablename = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.partname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.state = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I64: + self.lastheartbeat = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I64: + self.acquiredat = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.user = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.hostname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.I32: + self.heartbeatCount = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.STRING: + self.agentInfo = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.I64: + self.blockedByExtId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.I64: + self.blockedByIntId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 16: + if ftype == TType.I64: + self.lockIdInternal = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ShowLocksResponseElement') + if self.lockid is not None: + oprot.writeFieldBegin('lockid', TType.I64, 1) + oprot.writeI64(self.lockid) + oprot.writeFieldEnd() + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 2) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin('tablename', TType.STRING, 3) + oprot.writeString(self.tablename) + oprot.writeFieldEnd() + if self.partname is not None: + oprot.writeFieldBegin('partname', TType.STRING, 4) + oprot.writeString(self.partname) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin('state', TType.I32, 5) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.I32, 6) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.txnid is not None: + oprot.writeFieldBegin('txnid', TType.I64, 7) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + if self.lastheartbeat is not None: + oprot.writeFieldBegin('lastheartbeat', TType.I64, 8) + oprot.writeI64(self.lastheartbeat) + oprot.writeFieldEnd() + if self.acquiredat is not None: + oprot.writeFieldBegin('acquiredat', TType.I64, 9) + oprot.writeI64(self.acquiredat) + oprot.writeFieldEnd() + if self.user is not None: + oprot.writeFieldBegin('user', TType.STRING, 10) + oprot.writeString(self.user) + oprot.writeFieldEnd() + if self.hostname is not None: + oprot.writeFieldBegin('hostname', TType.STRING, 11) + oprot.writeString(self.hostname) + oprot.writeFieldEnd() + if self.heartbeatCount is not None: + oprot.writeFieldBegin('heartbeatCount', TType.I32, 12) + oprot.writeI32(self.heartbeatCount) + oprot.writeFieldEnd() + if self.agentInfo is not None: + oprot.writeFieldBegin('agentInfo', TType.STRING, 13) + oprot.writeString(self.agentInfo) + oprot.writeFieldEnd() + if self.blockedByExtId is not None: + oprot.writeFieldBegin('blockedByExtId', TType.I64, 14) + oprot.writeI64(self.blockedByExtId) + oprot.writeFieldEnd() + if self.blockedByIntId is not None: + oprot.writeFieldBegin('blockedByIntId', TType.I64, 15) + oprot.writeI64(self.blockedByIntId) + oprot.writeFieldEnd() + if self.lockIdInternal is not None: + oprot.writeFieldBegin('lockIdInternal', TType.I64, 16) + oprot.writeI64(self.lockIdInternal) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.lockid is None: + raise TProtocol.TProtocolException(message='Required field lockid is unset!') + if self.dbname is None: + raise TProtocol.TProtocolException(message='Required field dbname is unset!') + if self.state is None: + raise TProtocol.TProtocolException(message='Required field state is unset!') + if self.type is None: + raise TProtocol.TProtocolException(message='Required field type is unset!') + if self.lastheartbeat is None: + raise TProtocol.TProtocolException(message='Required field lastheartbeat is unset!') + if self.user is None: + raise TProtocol.TProtocolException(message='Required field user is unset!') + if self.hostname is None: + raise TProtocol.TProtocolException(message='Required field hostname is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.lockid) + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tablename) + value = (value * 31) ^ hash(self.partname) + value = (value * 31) ^ hash(self.state) + value = (value * 31) ^ hash(self.type) + value = (value * 31) ^ hash(self.txnid) + value = (value * 31) ^ hash(self.lastheartbeat) + value = (value * 31) ^ hash(self.acquiredat) + value = (value * 31) ^ hash(self.user) + value = (value * 31) ^ hash(self.hostname) + value = (value * 31) ^ hash(self.heartbeatCount) + value = (value * 31) ^ hash(self.agentInfo) + value = (value * 31) ^ hash(self.blockedByExtId) + value = (value * 31) ^ hash(self.blockedByIntId) + value = (value * 31) ^ hash(self.lockIdInternal) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ShowLocksResponse: + """ + Attributes: + - locks + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'locks', (TType.STRUCT,(ShowLocksResponseElement, ShowLocksResponseElement.thrift_spec)), None, ), # 1 + ) + + def __init__(self, locks=None,): + self.locks = locks + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.locks = [] + (_etype472, _size469) = iprot.readListBegin() + for _i473 in xrange(_size469): + _elem474 = ShowLocksResponseElement() + _elem474.read(iprot) + self.locks.append(_elem474) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ShowLocksResponse') + if self.locks is not None: + oprot.writeFieldBegin('locks', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.locks)) + for iter475 in self.locks: + iter475.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.locks) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class HeartbeatRequest: + """ + Attributes: + - lockid + - txnid + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'lockid', None, None, ), # 1 + (2, TType.I64, 'txnid', None, None, ), # 2 + ) + + def __init__(self, lockid=None, txnid=None,): + self.lockid = lockid + self.txnid = txnid + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lockid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('HeartbeatRequest') + if self.lockid is not None: + oprot.writeFieldBegin('lockid', TType.I64, 1) + oprot.writeI64(self.lockid) + oprot.writeFieldEnd() + if self.txnid is not None: + oprot.writeFieldBegin('txnid', TType.I64, 2) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.lockid) + value = (value * 31) ^ hash(self.txnid) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class HeartbeatTxnRangeRequest: + """ + Attributes: + - min + - max + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'min', None, None, ), # 1 + (2, TType.I64, 'max', None, None, ), # 2 + ) + + def __init__(self, min=None, max=None,): + self.min = min + self.max = max + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.min = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.max = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('HeartbeatTxnRangeRequest') + if self.min is not None: + oprot.writeFieldBegin('min', TType.I64, 1) + oprot.writeI64(self.min) + oprot.writeFieldEnd() + if self.max is not None: + oprot.writeFieldBegin('max', TType.I64, 2) + oprot.writeI64(self.max) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.min is None: + raise TProtocol.TProtocolException(message='Required field min is unset!') + if self.max is None: + raise TProtocol.TProtocolException(message='Required field max is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.min) + value = (value * 31) ^ hash(self.max) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class HeartbeatTxnRangeResponse: + """ + Attributes: + - aborted + - nosuch + """ + + thrift_spec = ( + None, # 0 + (1, TType.SET, 'aborted', (TType.I64,None), None, ), # 1 + (2, TType.SET, 'nosuch', (TType.I64,None), None, ), # 2 + ) + + def __init__(self, aborted=None, nosuch=None,): + self.aborted = aborted + self.nosuch = nosuch + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.SET: + self.aborted = set() + (_etype479, _size476) = iprot.readSetBegin() + for _i480 in xrange(_size476): + _elem481 = iprot.readI64() + self.aborted.add(_elem481) + iprot.readSetEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.SET: + self.nosuch = set() + (_etype485, _size482) = iprot.readSetBegin() + for _i486 in xrange(_size482): + _elem487 = iprot.readI64() + self.nosuch.add(_elem487) + iprot.readSetEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('HeartbeatTxnRangeResponse') + if self.aborted is not None: + oprot.writeFieldBegin('aborted', TType.SET, 1) + oprot.writeSetBegin(TType.I64, len(self.aborted)) + for iter488 in self.aborted: + oprot.writeI64(iter488) + oprot.writeSetEnd() + oprot.writeFieldEnd() + if self.nosuch is not None: + oprot.writeFieldBegin('nosuch', TType.SET, 2) + oprot.writeSetBegin(TType.I64, len(self.nosuch)) + for iter489 in self.nosuch: + oprot.writeI64(iter489) + oprot.writeSetEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.aborted is None: + raise TProtocol.TProtocolException(message='Required field aborted is unset!') + if self.nosuch is None: + raise TProtocol.TProtocolException(message='Required field nosuch is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.aborted) + value = (value * 31) ^ hash(self.nosuch) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CompactionRequest: + """ + Attributes: + - dbname + - tablename + - partitionname + - type + - runas + - properties + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tablename', None, None, ), # 2 + (3, TType.STRING, 'partitionname', None, None, ), # 3 + (4, TType.I32, 'type', None, None, ), # 4 + (5, TType.STRING, 'runas', None, None, ), # 5 + (6, TType.MAP, 'properties', (TType.STRING,None,TType.STRING,None), None, ), # 6 + ) + + def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, runas=None, properties=None,): + self.dbname = dbname + self.tablename = tablename + self.partitionname = partitionname + self.type = type + self.runas = runas + self.properties = properties + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tablename = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.partitionname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.runas = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.MAP: + self.properties = {} + (_ktype491, _vtype492, _size490 ) = iprot.readMapBegin() + for _i494 in xrange(_size490): + _key495 = iprot.readString() + _val496 = iprot.readString() + self.properties[_key495] = _val496 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('CompactionRequest') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin('tablename', TType.STRING, 2) + oprot.writeString(self.tablename) + oprot.writeFieldEnd() + if self.partitionname is not None: + oprot.writeFieldBegin('partitionname', TType.STRING, 3) + oprot.writeString(self.partitionname) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.I32, 4) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.runas is not None: + oprot.writeFieldBegin('runas', TType.STRING, 5) + oprot.writeString(self.runas) + oprot.writeFieldEnd() + if self.properties is not None: + oprot.writeFieldBegin('properties', TType.MAP, 6) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) + for kiter497,viter498 in self.properties.items(): + oprot.writeString(kiter497) + oprot.writeString(viter498) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbname is None: + raise TProtocol.TProtocolException(message='Required field dbname is unset!') + if self.tablename is None: + raise TProtocol.TProtocolException(message='Required field tablename is unset!') + if self.type is None: + raise TProtocol.TProtocolException(message='Required field type is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tablename) + value = (value * 31) ^ hash(self.partitionname) + value = (value * 31) ^ hash(self.type) + value = (value * 31) ^ hash(self.runas) + value = (value * 31) ^ hash(self.properties) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CompactionResponse: + """ + Attributes: + - id + - state + - accepted + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'id', None, None, ), # 1 + (2, TType.STRING, 'state', None, None, ), # 2 + (3, TType.BOOL, 'accepted', None, None, ), # 3 + ) + + def __init__(self, id=None, state=None, accepted=None,): + self.id = id + self.state = state + self.accepted = accepted + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.state = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.accepted = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('CompactionResponse') + if self.id is not None: + oprot.writeFieldBegin('id', TType.I64, 1) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin('state', TType.STRING, 2) + oprot.writeString(self.state) + oprot.writeFieldEnd() + if self.accepted is not None: + oprot.writeFieldBegin('accepted', TType.BOOL, 3) + oprot.writeBool(self.accepted) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.id is None: + raise TProtocol.TProtocolException(message='Required field id is unset!') + if self.state is None: + raise TProtocol.TProtocolException(message='Required field state is unset!') + if self.accepted is None: + raise TProtocol.TProtocolException(message='Required field accepted is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.id) + value = (value * 31) ^ hash(self.state) + value = (value * 31) ^ hash(self.accepted) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ShowCompactRequest: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ShowCompactRequest') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ShowCompactResponseElement: + """ + Attributes: + - dbname + - tablename + - partitionname + - type + - state + - workerid + - start + - runAs + - hightestTxnId + - metaInfo + - endTime + - hadoopJobId + - id + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tablename', None, None, ), # 2 + (3, TType.STRING, 'partitionname', None, None, ), # 3 + (4, TType.I32, 'type', None, None, ), # 4 + (5, TType.STRING, 'state', None, None, ), # 5 + (6, TType.STRING, 'workerid', None, None, ), # 6 + (7, TType.I64, 'start', None, None, ), # 7 + (8, TType.STRING, 'runAs', None, None, ), # 8 + (9, TType.I64, 'hightestTxnId', None, None, ), # 9 + (10, TType.STRING, 'metaInfo', None, None, ), # 10 + (11, TType.I64, 'endTime', None, None, ), # 11 + (12, TType.STRING, 'hadoopJobId', None, "None", ), # 12 + (13, TType.I64, 'id', None, None, ), # 13 + ) + + def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, state=None, workerid=None, start=None, runAs=None, hightestTxnId=None, metaInfo=None, endTime=None, hadoopJobId=thrift_spec[12][4], id=None,): + self.dbname = dbname + self.tablename = tablename + self.partitionname = partitionname + self.type = type + self.state = state + self.workerid = workerid + self.start = start + self.runAs = runAs + self.hightestTxnId = hightestTxnId + self.metaInfo = metaInfo + self.endTime = endTime + self.hadoopJobId = hadoopJobId + self.id = id + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tablename = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.partitionname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.state = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.workerid = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I64: + self.start = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.runAs = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I64: + self.hightestTxnId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.metaInfo = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.I64: + self.endTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRING: + self.hadoopJobId = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ShowCompactResponseElement') + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin('tablename', TType.STRING, 2) + oprot.writeString(self.tablename) + oprot.writeFieldEnd() + if self.partitionname is not None: + oprot.writeFieldBegin('partitionname', TType.STRING, 3) + oprot.writeString(self.partitionname) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.I32, 4) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin('state', TType.STRING, 5) + oprot.writeString(self.state) + oprot.writeFieldEnd() + if self.workerid is not None: + oprot.writeFieldBegin('workerid', TType.STRING, 6) + oprot.writeString(self.workerid) + oprot.writeFieldEnd() + if self.start is not None: + oprot.writeFieldBegin('start', TType.I64, 7) + oprot.writeI64(self.start) + oprot.writeFieldEnd() + if self.runAs is not None: + oprot.writeFieldBegin('runAs', TType.STRING, 8) + oprot.writeString(self.runAs) + oprot.writeFieldEnd() + if self.hightestTxnId is not None: + oprot.writeFieldBegin('hightestTxnId', TType.I64, 9) + oprot.writeI64(self.hightestTxnId) + oprot.writeFieldEnd() + if self.metaInfo is not None: + oprot.writeFieldBegin('metaInfo', TType.STRING, 10) + oprot.writeString(self.metaInfo) + oprot.writeFieldEnd() + if self.endTime is not None: + oprot.writeFieldBegin('endTime', TType.I64, 11) + oprot.writeI64(self.endTime) + oprot.writeFieldEnd() + if self.hadoopJobId is not None: + oprot.writeFieldBegin('hadoopJobId', TType.STRING, 12) + oprot.writeString(self.hadoopJobId) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin('id', TType.I64, 13) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbname is None: + raise TProtocol.TProtocolException(message='Required field dbname is unset!') + if self.tablename is None: + raise TProtocol.TProtocolException(message='Required field tablename is unset!') + if self.type is None: + raise TProtocol.TProtocolException(message='Required field type is unset!') + if self.state is None: + raise TProtocol.TProtocolException(message='Required field state is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tablename) + value = (value * 31) ^ hash(self.partitionname) + value = (value * 31) ^ hash(self.type) + value = (value * 31) ^ hash(self.state) + value = (value * 31) ^ hash(self.workerid) + value = (value * 31) ^ hash(self.start) + value = (value * 31) ^ hash(self.runAs) + value = (value * 31) ^ hash(self.hightestTxnId) + value = (value * 31) ^ hash(self.metaInfo) + value = (value * 31) ^ hash(self.endTime) + value = (value * 31) ^ hash(self.hadoopJobId) + value = (value * 31) ^ hash(self.id) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ShowCompactResponse: + """ + Attributes: + - compacts + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'compacts', (TType.STRUCT,(ShowCompactResponseElement, ShowCompactResponseElement.thrift_spec)), None, ), # 1 + ) + + def __init__(self, compacts=None,): + self.compacts = compacts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.compacts = [] + (_etype502, _size499) = iprot.readListBegin() + for _i503 in xrange(_size499): + _elem504 = ShowCompactResponseElement() + _elem504.read(iprot) + self.compacts.append(_elem504) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ShowCompactResponse') + if self.compacts is not None: + oprot.writeFieldBegin('compacts', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.compacts)) + for iter505 in self.compacts: + iter505.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.compacts is None: + raise TProtocol.TProtocolException(message='Required field compacts is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.compacts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AddDynamicPartitions: + """ + Attributes: + - txnid + - dbname + - tablename + - partitionnames + - operationType + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'txnid', None, None, ), # 1 + (2, TType.STRING, 'dbname', None, None, ), # 2 + (3, TType.STRING, 'tablename', None, None, ), # 3 + (4, TType.LIST, 'partitionnames', (TType.STRING,None), None, ), # 4 + (5, TType.I32, 'operationType', None, 5, ), # 5 + ) + + def __init__(self, txnid=None, dbname=None, tablename=None, partitionnames=None, operationType=thrift_spec[5][4],): + self.txnid = txnid + self.dbname = dbname + self.tablename = tablename + self.partitionnames = partitionnames + self.operationType = operationType + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.txnid = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tablename = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.partitionnames = [] + (_etype509, _size506) = iprot.readListBegin() + for _i510 in xrange(_size506): + _elem511 = iprot.readString() + self.partitionnames.append(_elem511) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.operationType = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AddDynamicPartitions') + if self.txnid is not None: + oprot.writeFieldBegin('txnid', TType.I64, 1) + oprot.writeI64(self.txnid) + oprot.writeFieldEnd() + if self.dbname is not None: + oprot.writeFieldBegin('dbname', TType.STRING, 2) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tablename is not None: + oprot.writeFieldBegin('tablename', TType.STRING, 3) + oprot.writeString(self.tablename) + oprot.writeFieldEnd() + if self.partitionnames is not None: + oprot.writeFieldBegin('partitionnames', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.partitionnames)) + for iter512 in self.partitionnames: + oprot.writeString(iter512) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.operationType is not None: + oprot.writeFieldBegin('operationType', TType.I32, 5) + oprot.writeI32(self.operationType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.txnid is None: + raise TProtocol.TProtocolException(message='Required field txnid is unset!') + if self.dbname is None: + raise TProtocol.TProtocolException(message='Required field dbname is unset!') + if self.tablename is None: + raise TProtocol.TProtocolException(message='Required field tablename is unset!') + if self.partitionnames is None: + raise TProtocol.TProtocolException(message='Required field partitionnames is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.txnid) + value = (value * 31) ^ hash(self.dbname) + value = (value * 31) ^ hash(self.tablename) + value = (value * 31) ^ hash(self.partitionnames) + value = (value * 31) ^ hash(self.operationType) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class NotificationEventRequest: + """ + Attributes: + - lastEvent + - maxEvents + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'lastEvent', None, None, ), # 1 + (2, TType.I32, 'maxEvents', None, None, ), # 2 + ) + + def __init__(self, lastEvent=None, maxEvents=None,): + self.lastEvent = lastEvent + self.maxEvents = maxEvents + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lastEvent = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.maxEvents = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('NotificationEventRequest') + if self.lastEvent is not None: + oprot.writeFieldBegin('lastEvent', TType.I64, 1) + oprot.writeI64(self.lastEvent) + oprot.writeFieldEnd() + if self.maxEvents is not None: + oprot.writeFieldBegin('maxEvents', TType.I32, 2) + oprot.writeI32(self.maxEvents) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.lastEvent is None: + raise TProtocol.TProtocolException(message='Required field lastEvent is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.lastEvent) + value = (value * 31) ^ hash(self.maxEvents) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class NotificationEvent: + """ + Attributes: + - eventId + - eventTime + - eventType + - dbName + - tableName + - message + - messageFormat + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'eventId', None, None, ), # 1 + (2, TType.I32, 'eventTime', None, None, ), # 2 + (3, TType.STRING, 'eventType', None, None, ), # 3 + (4, TType.STRING, 'dbName', None, None, ), # 4 + (5, TType.STRING, 'tableName', None, None, ), # 5 + (6, TType.STRING, 'message', None, None, ), # 6 + (7, TType.STRING, 'messageFormat', None, None, ), # 7 + ) + + def __init__(self, eventId=None, eventTime=None, eventType=None, dbName=None, tableName=None, message=None, messageFormat=None,): + self.eventId = eventId + self.eventTime = eventTime + self.eventType = eventType + self.dbName = dbName + self.tableName = tableName + self.message = message + self.messageFormat = messageFormat + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.eventId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.eventTime = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.eventType = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.tableName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.messageFormat = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('NotificationEvent') + if self.eventId is not None: + oprot.writeFieldBegin('eventId', TType.I64, 1) + oprot.writeI64(self.eventId) + oprot.writeFieldEnd() + if self.eventTime is not None: + oprot.writeFieldBegin('eventTime', TType.I32, 2) + oprot.writeI32(self.eventTime) + oprot.writeFieldEnd() + if self.eventType is not None: + oprot.writeFieldBegin('eventType', TType.STRING, 3) + oprot.writeString(self.eventType) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 4) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 5) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 6) + oprot.writeString(self.message) + oprot.writeFieldEnd() + if self.messageFormat is not None: + oprot.writeFieldBegin('messageFormat', TType.STRING, 7) + oprot.writeString(self.messageFormat) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.eventId is None: + raise TProtocol.TProtocolException(message='Required field eventId is unset!') + if self.eventTime is None: + raise TProtocol.TProtocolException(message='Required field eventTime is unset!') + if self.eventType is None: + raise TProtocol.TProtocolException(message='Required field eventType is unset!') + if self.message is None: + raise TProtocol.TProtocolException(message='Required field message is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.eventId) + value = (value * 31) ^ hash(self.eventTime) + value = (value * 31) ^ hash(self.eventType) + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tableName) + value = (value * 31) ^ hash(self.message) + value = (value * 31) ^ hash(self.messageFormat) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class NotificationEventResponse: + """ + Attributes: + - events + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'events', (TType.STRUCT,(NotificationEvent, NotificationEvent.thrift_spec)), None, ), # 1 + ) + + def __init__(self, events=None,): + self.events = events + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.events = [] + (_etype516, _size513) = iprot.readListBegin() + for _i517 in xrange(_size513): + _elem518 = NotificationEvent() + _elem518.read(iprot) + self.events.append(_elem518) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('NotificationEventResponse') + if self.events is not None: + oprot.writeFieldBegin('events', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.events)) + for iter519 in self.events: + iter519.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.events is None: + raise TProtocol.TProtocolException(message='Required field events is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.events) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CurrentNotificationEventId: + """ + Attributes: + - eventId + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'eventId', None, None, ), # 1 + ) + + def __init__(self, eventId=None,): + self.eventId = eventId + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.eventId = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('CurrentNotificationEventId') + if self.eventId is not None: + oprot.writeFieldBegin('eventId', TType.I64, 1) + oprot.writeI64(self.eventId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.eventId is None: + raise TProtocol.TProtocolException(message='Required field eventId is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.eventId) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class InsertEventRequestData: + """ + Attributes: + - replace + - filesAdded + - filesAddedChecksum + """ + + thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'replace', None, None, ), # 1 + (2, TType.LIST, 'filesAdded', (TType.STRING,None), None, ), # 2 + (3, TType.LIST, 'filesAddedChecksum', (TType.STRING,None), None, ), # 3 + ) + + def __init__(self, replace=None, filesAdded=None, filesAddedChecksum=None,): + self.replace = replace + self.filesAdded = filesAdded + self.filesAddedChecksum = filesAddedChecksum + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.replace = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.filesAdded = [] + (_etype523, _size520) = iprot.readListBegin() + for _i524 in xrange(_size520): + _elem525 = iprot.readString() + self.filesAdded.append(_elem525) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.filesAddedChecksum = [] + (_etype529, _size526) = iprot.readListBegin() + for _i530 in xrange(_size526): + _elem531 = iprot.readString() + self.filesAddedChecksum.append(_elem531) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('InsertEventRequestData') + if self.replace is not None: + oprot.writeFieldBegin('replace', TType.BOOL, 1) + oprot.writeBool(self.replace) + oprot.writeFieldEnd() + if self.filesAdded is not None: + oprot.writeFieldBegin('filesAdded', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.filesAdded)) + for iter532 in self.filesAdded: + oprot.writeString(iter532) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.filesAddedChecksum is not None: + oprot.writeFieldBegin('filesAddedChecksum', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.filesAddedChecksum)) + for iter533 in self.filesAddedChecksum: + oprot.writeString(iter533) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.filesAdded is None: + raise TProtocol.TProtocolException(message='Required field filesAdded is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.replace) + value = (value * 31) ^ hash(self.filesAdded) + value = (value * 31) ^ hash(self.filesAddedChecksum) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class FireEventRequestData: + """ + Attributes: + - insertData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'insertData', (InsertEventRequestData, InsertEventRequestData.thrift_spec), None, ), # 1 + ) + + def __init__(self, insertData=None,): + self.insertData = insertData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.insertData = InsertEventRequestData() + self.insertData.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('FireEventRequestData') + if self.insertData is not None: + oprot.writeFieldBegin('insertData', TType.STRUCT, 1) + self.insertData.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.insertData) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class FireEventRequest: + """ + Attributes: + - successful + - data + - dbName + - tableName + - partitionVals + """ + + thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'successful', None, None, ), # 1 + (2, TType.STRUCT, 'data', (FireEventRequestData, FireEventRequestData.thrift_spec), None, ), # 2 + (3, TType.STRING, 'dbName', None, None, ), # 3 + (4, TType.STRING, 'tableName', None, None, ), # 4 + (5, TType.LIST, 'partitionVals', (TType.STRING,None), None, ), # 5 + ) + + def __init__(self, successful=None, data=None, dbName=None, tableName=None, partitionVals=None,): + self.successful = successful + self.data = data + self.dbName = dbName + self.tableName = tableName + self.partitionVals = partitionVals + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.successful = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.data = FireEventRequestData() + self.data.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.tableName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.partitionVals = [] + (_etype537, _size534) = iprot.readListBegin() + for _i538 in xrange(_size534): + _elem539 = iprot.readString() + self.partitionVals.append(_elem539) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('FireEventRequest') + if self.successful is not None: + oprot.writeFieldBegin('successful', TType.BOOL, 1) + oprot.writeBool(self.successful) + oprot.writeFieldEnd() + if self.data is not None: + oprot.writeFieldBegin('data', TType.STRUCT, 2) + self.data.write(oprot) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 3) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 4) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.partitionVals is not None: + oprot.writeFieldBegin('partitionVals', TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.partitionVals)) + for iter540 in self.partitionVals: + oprot.writeString(iter540) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.successful is None: + raise TProtocol.TProtocolException(message='Required field successful is unset!') + if self.data is None: + raise TProtocol.TProtocolException(message='Required field data is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.successful) + value = (value * 31) ^ hash(self.data) + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tableName) + value = (value * 31) ^ hash(self.partitionVals) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class FireEventResponse: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('FireEventResponse') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class MetadataPpdResult: + """ + Attributes: + - metadata + - includeBitset + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'metadata', None, None, ), # 1 + (2, TType.STRING, 'includeBitset', None, None, ), # 2 + ) + + def __init__(self, metadata=None, includeBitset=None,): + self.metadata = metadata + self.includeBitset = includeBitset + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.metadata = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.includeBitset = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('MetadataPpdResult') + if self.metadata is not None: + oprot.writeFieldBegin('metadata', TType.STRING, 1) + oprot.writeString(self.metadata) + oprot.writeFieldEnd() + if self.includeBitset is not None: + oprot.writeFieldBegin('includeBitset', TType.STRING, 2) + oprot.writeString(self.includeBitset) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.metadata) + value = (value * 31) ^ hash(self.includeBitset) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetFileMetadataByExprResult: + """ + Attributes: + - metadata + - isSupported + """ + + thrift_spec = ( + None, # 0 + (1, TType.MAP, 'metadata', (TType.I64,None,TType.STRUCT,(MetadataPpdResult, MetadataPpdResult.thrift_spec)), None, ), # 1 + (2, TType.BOOL, 'isSupported', None, None, ), # 2 + ) + + def __init__(self, metadata=None, isSupported=None,): + self.metadata = metadata + self.isSupported = isSupported + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.metadata = {} + (_ktype542, _vtype543, _size541 ) = iprot.readMapBegin() + for _i545 in xrange(_size541): + _key546 = iprot.readI64() + _val547 = MetadataPpdResult() + _val547.read(iprot) + self.metadata[_key546] = _val547 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isSupported = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetFileMetadataByExprResult') + if self.metadata is not None: + oprot.writeFieldBegin('metadata', TType.MAP, 1) + oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.metadata)) + for kiter548,viter549 in self.metadata.items(): + oprot.writeI64(kiter548) + viter549.write(oprot) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.isSupported is not None: + oprot.writeFieldBegin('isSupported', TType.BOOL, 2) + oprot.writeBool(self.isSupported) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.metadata is None: + raise TProtocol.TProtocolException(message='Required field metadata is unset!') + if self.isSupported is None: + raise TProtocol.TProtocolException(message='Required field isSupported is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.metadata) + value = (value * 31) ^ hash(self.isSupported) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetFileMetadataByExprRequest: + """ + Attributes: + - fileIds + - expr + - doGetFooters + - type + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'fileIds', (TType.I64,None), None, ), # 1 + (2, TType.STRING, 'expr', None, None, ), # 2 + (3, TType.BOOL, 'doGetFooters', None, None, ), # 3 + (4, TType.I32, 'type', None, None, ), # 4 + ) + + def __init__(self, fileIds=None, expr=None, doGetFooters=None, type=None,): + self.fileIds = fileIds + self.expr = expr + self.doGetFooters = doGetFooters + self.type = type + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fileIds = [] + (_etype553, _size550) = iprot.readListBegin() + for _i554 in xrange(_size550): + _elem555 = iprot.readI64() + self.fileIds.append(_elem555) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.expr = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.doGetFooters = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetFileMetadataByExprRequest') + if self.fileIds is not None: + oprot.writeFieldBegin('fileIds', TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.fileIds)) + for iter556 in self.fileIds: + oprot.writeI64(iter556) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.expr is not None: + oprot.writeFieldBegin('expr', TType.STRING, 2) + oprot.writeString(self.expr) + oprot.writeFieldEnd() + if self.doGetFooters is not None: + oprot.writeFieldBegin('doGetFooters', TType.BOOL, 3) + oprot.writeBool(self.doGetFooters) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.I32, 4) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fileIds is None: + raise TProtocol.TProtocolException(message='Required field fileIds is unset!') + if self.expr is None: + raise TProtocol.TProtocolException(message='Required field expr is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.fileIds) + value = (value * 31) ^ hash(self.expr) + value = (value * 31) ^ hash(self.doGetFooters) + value = (value * 31) ^ hash(self.type) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetFileMetadataResult: + """ + Attributes: + - metadata + - isSupported + """ + + thrift_spec = ( + None, # 0 + (1, TType.MAP, 'metadata', (TType.I64,None,TType.STRING,None), None, ), # 1 + (2, TType.BOOL, 'isSupported', None, None, ), # 2 + ) + + def __init__(self, metadata=None, isSupported=None,): + self.metadata = metadata + self.isSupported = isSupported + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.metadata = {} + (_ktype558, _vtype559, _size557 ) = iprot.readMapBegin() + for _i561 in xrange(_size557): + _key562 = iprot.readI64() + _val563 = iprot.readString() + self.metadata[_key562] = _val563 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isSupported = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetFileMetadataResult') + if self.metadata is not None: + oprot.writeFieldBegin('metadata', TType.MAP, 1) + oprot.writeMapBegin(TType.I64, TType.STRING, len(self.metadata)) + for kiter564,viter565 in self.metadata.items(): + oprot.writeI64(kiter564) + oprot.writeString(viter565) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.isSupported is not None: + oprot.writeFieldBegin('isSupported', TType.BOOL, 2) + oprot.writeBool(self.isSupported) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.metadata is None: + raise TProtocol.TProtocolException(message='Required field metadata is unset!') + if self.isSupported is None: + raise TProtocol.TProtocolException(message='Required field isSupported is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.metadata) + value = (value * 31) ^ hash(self.isSupported) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetFileMetadataRequest: + """ + Attributes: + - fileIds + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'fileIds', (TType.I64,None), None, ), # 1 + ) + + def __init__(self, fileIds=None,): + self.fileIds = fileIds + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fileIds = [] + (_etype569, _size566) = iprot.readListBegin() + for _i570 in xrange(_size566): + _elem571 = iprot.readI64() + self.fileIds.append(_elem571) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetFileMetadataRequest') + if self.fileIds is not None: + oprot.writeFieldBegin('fileIds', TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.fileIds)) + for iter572 in self.fileIds: + oprot.writeI64(iter572) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fileIds is None: + raise TProtocol.TProtocolException(message='Required field fileIds is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.fileIds) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PutFileMetadataResult: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PutFileMetadataResult') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class PutFileMetadataRequest: + """ + Attributes: + - fileIds + - metadata + - type + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'fileIds', (TType.I64,None), None, ), # 1 + (2, TType.LIST, 'metadata', (TType.STRING,None), None, ), # 2 + (3, TType.I32, 'type', None, None, ), # 3 + ) + + def __init__(self, fileIds=None, metadata=None, type=None,): + self.fileIds = fileIds + self.metadata = metadata + self.type = type + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fileIds = [] + (_etype576, _size573) = iprot.readListBegin() + for _i577 in xrange(_size573): + _elem578 = iprot.readI64() + self.fileIds.append(_elem578) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.metadata = [] + (_etype582, _size579) = iprot.readListBegin() + for _i583 in xrange(_size579): + _elem584 = iprot.readString() + self.metadata.append(_elem584) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.type = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PutFileMetadataRequest') + if self.fileIds is not None: + oprot.writeFieldBegin('fileIds', TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.fileIds)) + for iter585 in self.fileIds: + oprot.writeI64(iter585) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.metadata is not None: + oprot.writeFieldBegin('metadata', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.metadata)) + for iter586 in self.metadata: + oprot.writeString(iter586) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.I32, 3) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fileIds is None: + raise TProtocol.TProtocolException(message='Required field fileIds is unset!') + if self.metadata is None: + raise TProtocol.TProtocolException(message='Required field metadata is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.fileIds) + value = (value * 31) ^ hash(self.metadata) + value = (value * 31) ^ hash(self.type) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ClearFileMetadataResult: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ClearFileMetadataResult') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ClearFileMetadataRequest: + """ + Attributes: + - fileIds + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'fileIds', (TType.I64,None), None, ), # 1 + ) + + def __init__(self, fileIds=None,): + self.fileIds = fileIds + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.fileIds = [] + (_etype590, _size587) = iprot.readListBegin() + for _i591 in xrange(_size587): + _elem592 = iprot.readI64() + self.fileIds.append(_elem592) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ClearFileMetadataRequest') + if self.fileIds is not None: + oprot.writeFieldBegin('fileIds', TType.LIST, 1) + oprot.writeListBegin(TType.I64, len(self.fileIds)) + for iter593 in self.fileIds: + oprot.writeI64(iter593) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fileIds is None: + raise TProtocol.TProtocolException(message='Required field fileIds is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.fileIds) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CacheFileMetadataResult: + """ + Attributes: + - isSupported + """ + + thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'isSupported', None, None, ), # 1 + ) + + def __init__(self, isSupported=None,): + self.isSupported = isSupported + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.isSupported = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('CacheFileMetadataResult') + if self.isSupported is not None: + oprot.writeFieldBegin('isSupported', TType.BOOL, 1) + oprot.writeBool(self.isSupported) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.isSupported is None: + raise TProtocol.TProtocolException(message='Required field isSupported is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.isSupported) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CacheFileMetadataRequest: + """ + Attributes: + - dbName + - tblName + - partName + - isAllParts + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'tblName', None, None, ), # 2 + (3, TType.STRING, 'partName', None, None, ), # 3 + (4, TType.BOOL, 'isAllParts', None, None, ), # 4 + ) + + def __init__(self, dbName=None, tblName=None, partName=None, isAllParts=None,): + self.dbName = dbName + self.tblName = tblName + self.partName = partName + self.isAllParts = isAllParts + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.partName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.isAllParts = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('CacheFileMetadataRequest') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin('tblName', TType.STRING, 2) + oprot.writeString(self.tblName) + oprot.writeFieldEnd() + if self.partName is not None: + oprot.writeFieldBegin('partName', TType.STRING, 3) + oprot.writeString(self.partName) + oprot.writeFieldEnd() + if self.isAllParts is not None: + oprot.writeFieldBegin('isAllParts', TType.BOOL, 4) + oprot.writeBool(self.isAllParts) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocol.TProtocolException(message='Required field dbName is unset!') + if self.tblName is None: + raise TProtocol.TProtocolException(message='Required field tblName is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tblName) + value = (value * 31) ^ hash(self.partName) + value = (value * 31) ^ hash(self.isAllParts) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetAllFunctionsResponse: + """ + Attributes: + - functions + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'functions', (TType.STRUCT,(Function, Function.thrift_spec)), None, ), # 1 + ) + + def __init__(self, functions=None,): + self.functions = functions + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.functions = [] + (_etype597, _size594) = iprot.readListBegin() + for _i598 in xrange(_size594): + _elem599 = Function() + _elem599.read(iprot) + self.functions.append(_elem599) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetAllFunctionsResponse') + if self.functions is not None: + oprot.writeFieldBegin('functions', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.functions)) + for iter600 in self.functions: + iter600.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.functions) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ClientCapabilities: + """ + Attributes: + - values + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'values', (TType.I32,None), None, ), # 1 + ) + + def __init__(self, values=None,): + self.values = values + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.values = [] + (_etype604, _size601) = iprot.readListBegin() + for _i605 in xrange(_size601): + _elem606 = iprot.readI32() + self.values.append(_elem606) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ClientCapabilities') + if self.values is not None: + oprot.writeFieldBegin('values', TType.LIST, 1) + oprot.writeListBegin(TType.I32, len(self.values)) + for iter607 in self.values: + oprot.writeI32(iter607) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.values is None: + raise TProtocol.TProtocolException(message='Required field values is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.values) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetTableRequest: + """ + Attributes: + - dbName + - tblName + - capabilities + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'tblName', None, None, ), # 2 + (3, TType.STRUCT, 'capabilities', (ClientCapabilities, ClientCapabilities.thrift_spec), None, ), # 3 + ) + + def __init__(self, dbName=None, tblName=None, capabilities=None,): + self.dbName = dbName + self.tblName = tblName + self.capabilities = capabilities + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tblName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.capabilities = ClientCapabilities() + self.capabilities.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetTableRequest') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tblName is not None: + oprot.writeFieldBegin('tblName', TType.STRING, 2) + oprot.writeString(self.tblName) + oprot.writeFieldEnd() + if self.capabilities is not None: + oprot.writeFieldBegin('capabilities', TType.STRUCT, 3) + self.capabilities.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocol.TProtocolException(message='Required field dbName is unset!') + if self.tblName is None: + raise TProtocol.TProtocolException(message='Required field tblName is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tblName) + value = (value * 31) ^ hash(self.capabilities) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetTableResult: + """ + Attributes: + - table + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'table', (Table, Table.thrift_spec), None, ), # 1 + ) + + def __init__(self, table=None,): + self.table = table + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.table = Table() + self.table.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetTableResult') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRUCT, 1) + self.table.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocol.TProtocolException(message='Required field table is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.table) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetTablesRequest: + """ + Attributes: + - dbName + - tblNames + - capabilities + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.LIST, 'tblNames', (TType.STRING,None), None, ), # 2 + (3, TType.STRUCT, 'capabilities', (ClientCapabilities, ClientCapabilities.thrift_spec), None, ), # 3 + ) + + def __init__(self, dbName=None, tblNames=None, capabilities=None,): + self.dbName = dbName + self.tblNames = tblNames + self.capabilities = capabilities + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.tblNames = [] + (_etype611, _size608) = iprot.readListBegin() + for _i612 in xrange(_size608): + _elem613 = iprot.readString() + self.tblNames.append(_elem613) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.capabilities = ClientCapabilities() + self.capabilities.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetTablesRequest') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tblNames is not None: + oprot.writeFieldBegin('tblNames', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.tblNames)) + for iter614 in self.tblNames: + oprot.writeString(iter614) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.capabilities is not None: + oprot.writeFieldBegin('capabilities', TType.STRUCT, 3) + self.capabilities.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocol.TProtocolException(message='Required field dbName is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tblNames) + value = (value * 31) ^ hash(self.capabilities) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class GetTablesResult: + """ + Attributes: + - tables + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'tables', (TType.STRUCT,(Table, Table.thrift_spec)), None, ), # 1 + ) + + def __init__(self, tables=None,): + self.tables = tables + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.tables = [] + (_etype618, _size615) = iprot.readListBegin() + for _i619 in xrange(_size615): + _elem620 = Table() + _elem620.read(iprot) + self.tables.append(_elem620) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('GetTablesResult') + if self.tables is not None: + oprot.writeFieldBegin('tables', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.tables)) + for iter621 in self.tables: + iter621.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tables is None: + raise TProtocol.TProtocolException(message='Required field tables is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.tables) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CmRecycleRequest: + """ + Attributes: + - dataPath + - purge + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dataPath', None, None, ), # 1 + (2, TType.BOOL, 'purge', None, None, ), # 2 + ) + + def __init__(self, dataPath=None, purge=None,): + self.dataPath = dataPath + self.purge = purge + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dataPath = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.purge = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('CmRecycleRequest') + if self.dataPath is not None: + oprot.writeFieldBegin('dataPath', TType.STRING, 1) + oprot.writeString(self.dataPath) + oprot.writeFieldEnd() + if self.purge is not None: + oprot.writeFieldBegin('purge', TType.BOOL, 2) + oprot.writeBool(self.purge) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dataPath is None: + raise TProtocol.TProtocolException(message='Required field dataPath is unset!') + if self.purge is None: + raise TProtocol.TProtocolException(message='Required field purge is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dataPath) + value = (value * 31) ^ hash(self.purge) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class CmRecycleResponse: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('CmRecycleResponse') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class TableMeta: + """ + Attributes: + - dbName + - tableName + - tableType + - comments + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'tableName', None, None, ), # 2 + (3, TType.STRING, 'tableType', None, None, ), # 3 + (4, TType.STRING, 'comments', None, None, ), # 4 + ) + + def __init__(self, dbName=None, tableName=None, tableType=None, comments=None,): + self.dbName = dbName + self.tableName = tableName + self.tableType = tableType + self.comments = comments + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableType = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.comments = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('TableMeta') + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 2) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.tableType is not None: + oprot.writeFieldBegin('tableType', TType.STRING, 3) + oprot.writeString(self.tableType) + oprot.writeFieldEnd() + if self.comments is not None: + oprot.writeFieldBegin('comments', TType.STRING, 4) + oprot.writeString(self.comments) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbName is None: + raise TProtocol.TProtocolException(message='Required field dbName is unset!') + if self.tableName is None: + raise TProtocol.TProtocolException(message='Required field tableName is unset!') + if self.tableType is None: + raise TProtocol.TProtocolException(message='Required field tableType is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbName) + value = (value * 31) ^ hash(self.tableName) + value = (value * 31) ^ hash(self.tableType) + value = (value * 31) ^ hash(self.comments) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class MetaException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('MetaException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UnknownTableException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UnknownTableException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UnknownDBException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UnknownDBException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AlreadyExistsException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AlreadyExistsException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class InvalidPartitionException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('InvalidPartitionException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UnknownPartitionException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UnknownPartitionException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class InvalidObjectException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('InvalidObjectException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class NoSuchObjectException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('NoSuchObjectException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class IndexAlreadyExistsException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('IndexAlreadyExistsException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class InvalidOperationException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('InvalidOperationException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ConfigValSecurityException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ConfigValSecurityException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class InvalidInputException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('InvalidInputException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class NoSuchTxnException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('NoSuchTxnException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class TxnAbortedException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('TxnAbortedException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class TxnOpenException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('TxnOpenException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class NoSuchLockException(TException): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('NoSuchLockException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) diff --git standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb new file mode 100644 index 0000000..6aa7143 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_constants.rb @@ -0,0 +1,57 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# 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" + +HIVE_FILTER_FIELD_OWNER = %q"hive_filter_field_owner__" + +HIVE_FILTER_FIELD_PARAMS = %q"hive_filter_field_params__" + +HIVE_FILTER_FIELD_LAST_ACCESS = %q"hive_filter_field_last_access__" + +IS_ARCHIVED = %q"is_archived" + +ORIGINAL_LOCATION = %q"original_location" + +IS_IMMUTABLE = %q"immutable" + +META_TABLE_COLUMNS = %q"columns" + +META_TABLE_COLUMN_TYPES = %q"columns.types" + +BUCKET_FIELD_NAME = %q"bucket_field_name" + +BUCKET_COUNT = %q"bucket_count" + +FIELD_TO_DIMENSION = %q"field_to_dimension" + +META_TABLE_NAME = %q"name" + +META_TABLE_DB = %q"db" + +META_TABLE_LOCATION = %q"location" + +META_TABLE_SERDE = %q"serde" + +META_TABLE_PARTITION_COLUMNS = %q"partition_columns" + +META_TABLE_PARTITION_COLUMN_TYPES = %q"partition_columns.types" + +FILE_INPUT_FORMAT = %q"file.inputformat" + +FILE_OUTPUT_FORMAT = %q"file.outputformat" + +META_TABLE_STORAGE = %q"storage_handler" + +TABLE_IS_TRANSACTIONAL = %q"transactional" + +TABLE_NO_AUTO_COMPACT = %q"no_auto_compaction" + +TABLE_TRANSACTIONAL_PROPERTIES = %q"transactional_properties" + diff --git standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb new file mode 100644 index 0000000..02c5717 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -0,0 +1,3478 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'thrift' +require 'fb303_types' + + +module HiveObjectType + GLOBAL = 1 + DATABASE = 2 + TABLE = 3 + PARTITION = 4 + COLUMN = 5 + VALUE_MAP = {1 => "GLOBAL", 2 => "DATABASE", 3 => "TABLE", 4 => "PARTITION", 5 => "COLUMN"} + VALID_VALUES = Set.new([GLOBAL, DATABASE, TABLE, PARTITION, COLUMN]).freeze +end + +module PrincipalType + USER = 1 + ROLE = 2 + GROUP = 3 + VALUE_MAP = {1 => "USER", 2 => "ROLE", 3 => "GROUP"} + VALID_VALUES = Set.new([USER, ROLE, GROUP]).freeze +end + +module PartitionEventType + LOAD_DONE = 1 + VALUE_MAP = {1 => "LOAD_DONE"} + VALID_VALUES = Set.new([LOAD_DONE]).freeze +end + +module TxnState + COMMITTED = 1 + ABORTED = 2 + OPEN = 3 + VALUE_MAP = {1 => "COMMITTED", 2 => "ABORTED", 3 => "OPEN"} + VALID_VALUES = Set.new([COMMITTED, ABORTED, OPEN]).freeze +end + +module LockLevel + DB = 1 + TABLE = 2 + PARTITION = 3 + VALUE_MAP = {1 => "DB", 2 => "TABLE", 3 => "PARTITION"} + VALID_VALUES = Set.new([DB, TABLE, PARTITION]).freeze +end + +module LockState + ACQUIRED = 1 + WAITING = 2 + ABORT = 3 + NOT_ACQUIRED = 4 + VALUE_MAP = {1 => "ACQUIRED", 2 => "WAITING", 3 => "ABORT", 4 => "NOT_ACQUIRED"} + VALID_VALUES = Set.new([ACQUIRED, WAITING, ABORT, NOT_ACQUIRED]).freeze +end + +module LockType + SHARED_READ = 1 + SHARED_WRITE = 2 + EXCLUSIVE = 3 + VALUE_MAP = {1 => "SHARED_READ", 2 => "SHARED_WRITE", 3 => "EXCLUSIVE"} + VALID_VALUES = Set.new([SHARED_READ, SHARED_WRITE, EXCLUSIVE]).freeze +end + +module CompactionType + MINOR = 1 + MAJOR = 2 + VALUE_MAP = {1 => "MINOR", 2 => "MAJOR"} + VALID_VALUES = Set.new([MINOR, MAJOR]).freeze +end + +module GrantRevokeType + GRANT = 1 + REVOKE = 2 + VALUE_MAP = {1 => "GRANT", 2 => "REVOKE"} + VALID_VALUES = Set.new([GRANT, REVOKE]).freeze +end + +module DataOperationType + SELECT = 1 + INSERT = 2 + UPDATE = 3 + DELETE = 4 + UNSET = 5 + NO_TXN = 6 + VALUE_MAP = {1 => "SELECT", 2 => "INSERT", 3 => "UPDATE", 4 => "DELETE", 5 => "UNSET", 6 => "NO_TXN"} + VALID_VALUES = Set.new([SELECT, INSERT, UPDATE, DELETE, UNSET, NO_TXN]).freeze +end + +module EventRequestType + INSERT = 1 + UPDATE = 2 + DELETE = 3 + VALUE_MAP = {1 => "INSERT", 2 => "UPDATE", 3 => "DELETE"} + VALID_VALUES = Set.new([INSERT, UPDATE, DELETE]).freeze +end + +module FunctionType + JAVA = 1 + VALUE_MAP = {1 => "JAVA"} + VALID_VALUES = Set.new([JAVA]).freeze +end + +module ResourceType + JAR = 1 + FILE = 2 + ARCHIVE = 3 + VALUE_MAP = {1 => "JAR", 2 => "FILE", 3 => "ARCHIVE"} + VALID_VALUES = Set.new([JAR, FILE, ARCHIVE]).freeze +end + +module FileMetadataExprType + ORC_SARG = 1 + VALUE_MAP = {1 => "ORC_SARG"} + VALID_VALUES = Set.new([ORC_SARG]).freeze +end + +module ClientCapability + TEST_CAPABILITY = 1 + VALUE_MAP = {1 => "TEST_CAPABILITY"} + VALID_VALUES = Set.new([TEST_CAPABILITY]).freeze +end + +class Version + include ::Thrift::Struct, ::Thrift::Struct_Union + VERSION = 1 + COMMENTS = 2 + + FIELDS = { + VERSION => {:type => ::Thrift::Types::STRING, :name => 'version'}, + COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class FieldSchema + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + TYPE = 2 + COMMENT = 3 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'}, + COMMENT => {:type => ::Thrift::Types::STRING, :name => 'comment'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class SQLPrimaryKey + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLE_DB = 1 + TABLE_NAME = 2 + COLUMN_NAME = 3 + KEY_SEQ = 4 + PK_NAME = 5 + ENABLE_CSTR = 6 + VALIDATE_CSTR = 7 + RELY_CSTR = 8 + + FIELDS = { + TABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'table_db'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, + COLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'column_name'}, + KEY_SEQ => {:type => ::Thrift::Types::I32, :name => 'key_seq'}, + PK_NAME => {:type => ::Thrift::Types::STRING, :name => 'pk_name'}, + ENABLE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'enable_cstr'}, + VALIDATE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'validate_cstr'}, + RELY_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'rely_cstr'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class SQLForeignKey + include ::Thrift::Struct, ::Thrift::Struct_Union + PKTABLE_DB = 1 + PKTABLE_NAME = 2 + PKCOLUMN_NAME = 3 + FKTABLE_DB = 4 + FKTABLE_NAME = 5 + FKCOLUMN_NAME = 6 + KEY_SEQ = 7 + UPDATE_RULE = 8 + DELETE_RULE = 9 + FK_NAME = 10 + PK_NAME = 11 + ENABLE_CSTR = 12 + VALIDATE_CSTR = 13 + RELY_CSTR = 14 + + FIELDS = { + PKTABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'pktable_db'}, + PKTABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'pktable_name'}, + PKCOLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'pkcolumn_name'}, + FKTABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'fktable_db'}, + FKTABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'fktable_name'}, + FKCOLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'fkcolumn_name'}, + KEY_SEQ => {:type => ::Thrift::Types::I32, :name => 'key_seq'}, + UPDATE_RULE => {:type => ::Thrift::Types::I32, :name => 'update_rule'}, + DELETE_RULE => {:type => ::Thrift::Types::I32, :name => 'delete_rule'}, + FK_NAME => {:type => ::Thrift::Types::STRING, :name => 'fk_name'}, + PK_NAME => {:type => ::Thrift::Types::STRING, :name => 'pk_name'}, + ENABLE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'enable_cstr'}, + VALIDATE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'validate_cstr'}, + RELY_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'rely_cstr'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class SQLUniqueConstraint + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLE_DB = 1 + TABLE_NAME = 2 + COLUMN_NAME = 3 + KEY_SEQ = 4 + UK_NAME = 5 + ENABLE_CSTR = 6 + VALIDATE_CSTR = 7 + RELY_CSTR = 8 + + FIELDS = { + TABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'table_db'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, + COLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'column_name'}, + KEY_SEQ => {:type => ::Thrift::Types::I32, :name => 'key_seq'}, + UK_NAME => {:type => ::Thrift::Types::STRING, :name => 'uk_name'}, + ENABLE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'enable_cstr'}, + VALIDATE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'validate_cstr'}, + RELY_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'rely_cstr'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class SQLNotNullConstraint + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLE_DB = 1 + TABLE_NAME = 2 + COLUMN_NAME = 3 + NN_NAME = 4 + ENABLE_CSTR = 5 + VALIDATE_CSTR = 6 + RELY_CSTR = 7 + + FIELDS = { + TABLE_DB => {:type => ::Thrift::Types::STRING, :name => 'table_db'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, + COLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'column_name'}, + NN_NAME => {:type => ::Thrift::Types::STRING, :name => 'nn_name'}, + ENABLE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'enable_cstr'}, + VALIDATE_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'validate_cstr'}, + RELY_CSTR => {:type => ::Thrift::Types::BOOL, :name => 'rely_cstr'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Type + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + TYPE1 = 2 + TYPE2 = 3 + FIELDS = 4 + + FIELDS = { + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class HiveObjectRef + include ::Thrift::Struct, ::Thrift::Struct_Union + OBJECTTYPE = 1 + DBNAME = 2 + OBJECTNAME = 3 + PARTVALUES = 4 + COLUMNNAME = 5 + + FIELDS = { + 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}}, + COLUMNNAME => {:type => ::Thrift::Types::STRING, :name => 'columnName'} + } + + def struct_fields; FIELDS; end + + def validate + unless @objectType.nil? || ::HiveObjectType::VALID_VALUES.include?(@objectType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field objectType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class PrivilegeGrantInfo + include ::Thrift::Struct, ::Thrift::Struct_Union + PRIVILEGE = 1 + CREATETIME = 2 + GRANTOR = 3 + GRANTORTYPE = 4 + GRANTOPTION = 5 + + FIELDS = { + 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}, + GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption'} + } + + def struct_fields; FIELDS; end + + def validate + unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class HiveObjectPrivilege + include ::Thrift::Struct, ::Thrift::Struct_Union + HIVEOBJECT = 1 + PRINCIPALNAME = 2 + PRINCIPALTYPE = 3 + GRANTINFO = 4 + + FIELDS = { + 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} + } + + def struct_fields; FIELDS; end + + def validate + unless @principalType.nil? || ::PrincipalType::VALID_VALUES.include?(@principalType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principalType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class PrivilegeBag + include ::Thrift::Struct, ::Thrift::Struct_Union + PRIVILEGES = 1 + + FIELDS = { + PRIVILEGES => {:type => ::Thrift::Types::LIST, :name => 'privileges', :element => {:type => ::Thrift::Types::STRUCT, :class => ::HiveObjectPrivilege}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class PrincipalPrivilegeSet + include ::Thrift::Struct, ::Thrift::Struct_Union + USERPRIVILEGES = 1 + GROUPPRIVILEGES = 2 + 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}}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class GrantRevokePrivilegeRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUESTTYPE = 1 + PRIVILEGES = 2 + REVOKEGRANTOPTION = 3 + + FIELDS = { + REQUESTTYPE => {:type => ::Thrift::Types::I32, :name => 'requestType', :enum_class => ::GrantRevokeType}, + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrivilegeBag}, + REVOKEGRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'revokeGrantOption', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + unless @requestType.nil? || ::GrantRevokeType::VALID_VALUES.include?(@requestType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field requestType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class GrantRevokePrivilegeResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Role + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLENAME = 1 + CREATETIME = 2 + OWNERNAME = 3 + + FIELDS = { + ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + OWNERNAME => {:type => ::Thrift::Types::STRING, :name => 'ownerName'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class RolePrincipalGrant + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLENAME = 1 + PRINCIPALNAME = 2 + PRINCIPALTYPE = 3 + GRANTOPTION = 4 + GRANTTIME = 5 + GRANTORNAME = 6 + GRANTORPRINCIPALTYPE = 7 + + FIELDS = { + ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'}, + PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'}, + PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => ::PrincipalType}, + GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption'}, + GRANTTIME => {:type => ::Thrift::Types::I32, :name => 'grantTime'}, + GRANTORNAME => {:type => ::Thrift::Types::STRING, :name => 'grantorName'}, + GRANTORPRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorPrincipalType', :enum_class => ::PrincipalType} + } + + def struct_fields; FIELDS; end + + def validate + unless @principalType.nil? || ::PrincipalType::VALID_VALUES.include?(@principalType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principalType!') + end + unless @grantorPrincipalType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorPrincipalType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorPrincipalType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class GetRoleGrantsForPrincipalRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPAL_NAME = 1 + PRINCIPAL_TYPE = 2 + + FIELDS = { + PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => ::PrincipalType} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field principal_name is unset!') unless @principal_name + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field principal_type is unset!') unless @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 + + ::Thrift::Struct.generate_accessors self +end + +class GetRoleGrantsForPrincipalResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPALGRANTS = 1 + + FIELDS = { + PRINCIPALGRANTS => {:type => ::Thrift::Types::LIST, :name => 'principalGrants', :element => {:type => ::Thrift::Types::STRUCT, :class => ::RolePrincipalGrant}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field principalGrants is unset!') unless @principalGrants + end + + ::Thrift::Struct.generate_accessors self +end + +class GetPrincipalsInRoleRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLENAME = 1 + + FIELDS = { + ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field roleName is unset!') unless @roleName + end + + ::Thrift::Struct.generate_accessors self +end + +class GetPrincipalsInRoleResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPALGRANTS = 1 + + FIELDS = { + PRINCIPALGRANTS => {:type => ::Thrift::Types::LIST, :name => 'principalGrants', :element => {:type => ::Thrift::Types::STRUCT, :class => ::RolePrincipalGrant}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field principalGrants is unset!') unless @principalGrants + end + + ::Thrift::Struct.generate_accessors self +end + +class GrantRevokeRoleRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUESTTYPE = 1 + ROLENAME = 2 + PRINCIPALNAME = 3 + PRINCIPALTYPE = 4 + GRANTOR = 5 + GRANTORTYPE = 6 + GRANTOPTION = 7 + + FIELDS = { + REQUESTTYPE => {:type => ::Thrift::Types::I32, :name => 'requestType', :enum_class => ::GrantRevokeType}, + ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'}, + PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'}, + PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => ::PrincipalType}, + GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor', :optional => true}, + GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :optional => true, :enum_class => ::PrincipalType}, + GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + unless @requestType.nil? || ::GrantRevokeType::VALID_VALUES.include?(@requestType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field requestType!') + end + unless @principalType.nil? || ::PrincipalType::VALID_VALUES.include?(@principalType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principalType!') + end + unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class GrantRevokeRoleResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Database + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + DESCRIPTION = 2 + LOCATIONURI = 3 + PARAMETERS = 4 + PRIVILEGES = 5 + OWNERNAME = 6 + OWNERTYPE = 7 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + 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}, + OWNERNAME => {:type => ::Thrift::Types::STRING, :name => 'ownerName', :optional => true}, + OWNERTYPE => {:type => ::Thrift::Types::I32, :name => 'ownerType', :optional => true, :enum_class => ::PrincipalType} + } + + def struct_fields; FIELDS; end + + def validate + unless @ownerType.nil? || ::PrincipalType::VALID_VALUES.include?(@ownerType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field ownerType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class SerDeInfo + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + SERIALIZATIONLIB = 2 + PARAMETERS = 3 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + SERIALIZATIONLIB => {:type => ::Thrift::Types::STRING, :name => 'serializationLib'}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Order + include ::Thrift::Struct, ::Thrift::Struct_Union + COL = 1 + ORDER = 2 + + FIELDS = { + COL => {:type => ::Thrift::Types::STRING, :name => 'col'}, + ORDER => {:type => ::Thrift::Types::I32, :name => 'order'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class SkewedInfo + include ::Thrift::Struct, ::Thrift::Struct_Union + SKEWEDCOLNAMES = 1 + SKEWEDCOLVALUES = 2 + SKEWEDCOLVALUELOCATIONMAPS = 3 + + FIELDS = { + SKEWEDCOLNAMES => {:type => ::Thrift::Types::LIST, :name => 'skewedColNames', :element => {:type => ::Thrift::Types::STRING}}, + SKEWEDCOLVALUES => {:type => ::Thrift::Types::LIST, :name => 'skewedColValues', :element => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRING}}}, + SKEWEDCOLVALUELOCATIONMAPS => {:type => ::Thrift::Types::MAP, :name => 'skewedColValueLocationMaps', :key => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRING}}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class StorageDescriptor + include ::Thrift::Struct, ::Thrift::Struct_Union + COLS = 1 + LOCATION = 2 + INPUTFORMAT = 3 + OUTPUTFORMAT = 4 + COMPRESSED = 5 + NUMBUCKETS = 6 + SERDEINFO = 7 + BUCKETCOLS = 8 + SORTCOLS = 9 + PARAMETERS = 10 + SKEWEDINFO = 11 + STOREDASSUBDIRECTORIES = 12 + + FIELDS = { + 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}, + 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}}, + 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}, + STOREDASSUBDIRECTORIES => {:type => ::Thrift::Types::BOOL, :name => 'storedAsSubDirectories', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Table + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + DBNAME = 2 + OWNER = 3 + CREATETIME = 4 + LASTACCESSTIME = 5 + RETENTION = 6 + SD = 7 + PARTITIONKEYS = 8 + PARAMETERS = 9 + VIEWORIGINALTEXT = 10 + VIEWEXPANDEDTEXT = 11 + TABLETYPE = 12 + PRIVILEGES = 13 + TEMPORARY = 14 + REWRITEENABLED = 15 + + FIELDS = { + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + OWNER => {:type => ::Thrift::Types::STRING, :name => 'owner'}, + 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}}, + 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}, + TEMPORARY => {:type => ::Thrift::Types::BOOL, :name => 'temporary', :default => false, :optional => true}, + REWRITEENABLED => {:type => ::Thrift::Types::BOOL, :name => 'rewriteEnabled', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Partition + include ::Thrift::Struct, ::Thrift::Struct_Union + VALUES = 1 + DBNAME = 2 + TABLENAME = 3 + CREATETIME = 4 + LASTACCESSTIME = 5 + SD = 6 + PARAMETERS = 7 + PRIVILEGES = 8 + + FIELDS = { + VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + 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}, + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class PartitionWithoutSD + include ::Thrift::Struct, ::Thrift::Struct_Union + VALUES = 1 + CREATETIME = 2 + LASTACCESSTIME = 3 + RELATIVEPATH = 4 + PARAMETERS = 5 + PRIVILEGES = 6 + + FIELDS = { + VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, + RELATIVEPATH => {:type => ::Thrift::Types::STRING, :name => 'relativePath'}, + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class PartitionSpecWithSharedSD + include ::Thrift::Struct, ::Thrift::Struct_Union + PARTITIONS = 1 + SD = 2 + + FIELDS = { + PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::PartitionWithoutSD}}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => ::StorageDescriptor} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class PartitionListComposingSpec + include ::Thrift::Struct, ::Thrift::Struct_Union + PARTITIONS = 1 + + FIELDS = { + PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class PartitionSpec + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TABLENAME = 2 + ROOTPATH = 3 + SHAREDSDPARTITIONSPEC = 4 + PARTITIONLIST = 5 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, + ROOTPATH => {:type => ::Thrift::Types::STRING, :name => 'rootPath'}, + SHAREDSDPARTITIONSPEC => {:type => ::Thrift::Types::STRUCT, :name => 'sharedSDPartitionSpec', :class => ::PartitionSpecWithSharedSD, :optional => true}, + PARTITIONLIST => {:type => ::Thrift::Types::STRUCT, :name => 'partitionList', :class => ::PartitionListComposingSpec, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Index + include ::Thrift::Struct, ::Thrift::Struct_Union + INDEXNAME = 1 + INDEXHANDLERCLASS = 2 + DBNAME = 3 + ORIGTABLENAME = 4 + CREATETIME = 5 + LASTACCESSTIME = 6 + INDEXTABLENAME = 7 + SD = 8 + PARAMETERS = 9 + DEFERREDREBUILD = 10 + + FIELDS = { + INDEXNAME => {:type => ::Thrift::Types::STRING, :name => 'indexName'}, + INDEXHANDLERCLASS => {:type => ::Thrift::Types::STRING, :name => 'indexHandlerClass'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + ORIGTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'origTableName'}, + 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}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + DEFERREDREBUILD => {:type => ::Thrift::Types::BOOL, :name => 'deferredRebuild'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class BooleanColumnStatsData + include ::Thrift::Struct, ::Thrift::Struct_Union + NUMTRUES = 1 + NUMFALSES = 2 + NUMNULLS = 3 + BITVECTORS = 4 + + FIELDS = { + NUMTRUES => {:type => ::Thrift::Types::I64, :name => 'numTrues'}, + NUMFALSES => {:type => ::Thrift::Types::I64, :name => 'numFalses'}, + NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, + BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numTrues is unset!') unless @numTrues + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numFalses is unset!') unless @numFalses + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls + end + + ::Thrift::Struct.generate_accessors self +end + +class DoubleColumnStatsData + include ::Thrift::Struct, ::Thrift::Struct_Union + LOWVALUE = 1 + HIGHVALUE = 2 + NUMNULLS = 3 + NUMDVS = 4 + BITVECTORS = 5 + + FIELDS = { + LOWVALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'lowValue', :optional => true}, + HIGHVALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'highValue', :optional => true}, + NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, + NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}, + BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs + end + + ::Thrift::Struct.generate_accessors self +end + +class LongColumnStatsData + include ::Thrift::Struct, ::Thrift::Struct_Union + LOWVALUE = 1 + HIGHVALUE = 2 + NUMNULLS = 3 + NUMDVS = 4 + BITVECTORS = 5 + + FIELDS = { + LOWVALUE => {:type => ::Thrift::Types::I64, :name => 'lowValue', :optional => true}, + HIGHVALUE => {:type => ::Thrift::Types::I64, :name => 'highValue', :optional => true}, + NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, + NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}, + BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs + end + + ::Thrift::Struct.generate_accessors self +end + +class StringColumnStatsData + include ::Thrift::Struct, ::Thrift::Struct_Union + MAXCOLLEN = 1 + AVGCOLLEN = 2 + NUMNULLS = 3 + NUMDVS = 4 + BITVECTORS = 5 + + FIELDS = { + MAXCOLLEN => {:type => ::Thrift::Types::I64, :name => 'maxColLen'}, + AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'}, + NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, + NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}, + BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxColLen is unset!') unless @maxColLen + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field avgColLen is unset!') unless @avgColLen + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs + end + + ::Thrift::Struct.generate_accessors self +end + +class BinaryColumnStatsData + include ::Thrift::Struct, ::Thrift::Struct_Union + MAXCOLLEN = 1 + AVGCOLLEN = 2 + NUMNULLS = 3 + BITVECTORS = 4 + + FIELDS = { + MAXCOLLEN => {:type => ::Thrift::Types::I64, :name => 'maxColLen'}, + AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'}, + NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, + BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxColLen is unset!') unless @maxColLen + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field avgColLen is unset!') unless @avgColLen + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls + end + + ::Thrift::Struct.generate_accessors self +end + +class Decimal + include ::Thrift::Struct, ::Thrift::Struct_Union + UNSCALED = 1 + SCALE = 3 + + FIELDS = { + UNSCALED => {:type => ::Thrift::Types::STRING, :name => 'unscaled', :binary => true}, + SCALE => {:type => ::Thrift::Types::I16, :name => 'scale'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field unscaled is unset!') unless @unscaled + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field scale is unset!') unless @scale + end + + ::Thrift::Struct.generate_accessors self +end + +class DecimalColumnStatsData + include ::Thrift::Struct, ::Thrift::Struct_Union + LOWVALUE = 1 + HIGHVALUE = 2 + NUMNULLS = 3 + NUMDVS = 4 + BITVECTORS = 5 + + FIELDS = { + LOWVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'lowValue', :class => ::Decimal, :optional => true}, + HIGHVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'highValue', :class => ::Decimal, :optional => true}, + NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, + NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}, + BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs + end + + ::Thrift::Struct.generate_accessors self +end + +class Date + include ::Thrift::Struct, ::Thrift::Struct_Union + DAYSSINCEEPOCH = 1 + + FIELDS = { + DAYSSINCEEPOCH => {:type => ::Thrift::Types::I64, :name => 'daysSinceEpoch'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field daysSinceEpoch is unset!') unless @daysSinceEpoch + end + + ::Thrift::Struct.generate_accessors self +end + +class DateColumnStatsData + include ::Thrift::Struct, ::Thrift::Struct_Union + LOWVALUE = 1 + HIGHVALUE = 2 + NUMNULLS = 3 + NUMDVS = 4 + BITVECTORS = 5 + + FIELDS = { + LOWVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'lowValue', :class => ::Date, :optional => true}, + HIGHVALUE => {:type => ::Thrift::Types::STRUCT, :name => 'highValue', :class => ::Date, :optional => true}, + NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, + NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}, + BITVECTORS => {:type => ::Thrift::Types::STRING, :name => 'bitVectors', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs + end + + ::Thrift::Struct.generate_accessors self +end + +class ColumnStatisticsData < ::Thrift::Union + include ::Thrift::Struct_Union + class << self + def booleanStats(val) + ColumnStatisticsData.new(:booleanStats, val) + end + + def longStats(val) + ColumnStatisticsData.new(:longStats, val) + end + + def doubleStats(val) + ColumnStatisticsData.new(:doubleStats, val) + end + + def stringStats(val) + ColumnStatisticsData.new(:stringStats, val) + end + + def binaryStats(val) + ColumnStatisticsData.new(:binaryStats, val) + end + + def decimalStats(val) + ColumnStatisticsData.new(:decimalStats, val) + end + + def dateStats(val) + ColumnStatisticsData.new(:dateStats, val) + end + end + + BOOLEANSTATS = 1 + LONGSTATS = 2 + DOUBLESTATS = 3 + STRINGSTATS = 4 + BINARYSTATS = 5 + DECIMALSTATS = 6 + DATESTATS = 7 + + FIELDS = { + BOOLEANSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'booleanStats', :class => ::BooleanColumnStatsData}, + LONGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'longStats', :class => ::LongColumnStatsData}, + DOUBLESTATS => {:type => ::Thrift::Types::STRUCT, :name => 'doubleStats', :class => ::DoubleColumnStatsData}, + STRINGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'stringStats', :class => ::StringColumnStatsData}, + BINARYSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'binaryStats', :class => ::BinaryColumnStatsData}, + DECIMALSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'decimalStats', :class => ::DecimalColumnStatsData}, + DATESTATS => {:type => ::Thrift::Types::STRUCT, :name => 'dateStats', :class => ::DateColumnStatsData} + } + + def struct_fields; FIELDS; end + + def validate + raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? + end + + ::Thrift::Union.generate_accessors self +end + +class ColumnStatisticsObj + include ::Thrift::Struct, ::Thrift::Struct_Union + COLNAME = 1 + COLTYPE = 2 + STATSDATA = 3 + + FIELDS = { + COLNAME => {:type => ::Thrift::Types::STRING, :name => 'colName'}, + COLTYPE => {:type => ::Thrift::Types::STRING, :name => 'colType'}, + STATSDATA => {:type => ::Thrift::Types::STRUCT, :name => 'statsData', :class => ::ColumnStatisticsData} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colName is unset!') unless @colName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colType is unset!') unless @colType + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsData is unset!') unless @statsData + end + + ::Thrift::Struct.generate_accessors self +end + +class ColumnStatisticsDesc + include ::Thrift::Struct, ::Thrift::Struct_Union + ISTBLLEVEL = 1 + DBNAME = 2 + TABLENAME = 3 + PARTNAME = 4 + LASTANALYZED = 5 + + FIELDS = { + ISTBLLEVEL => {:type => ::Thrift::Types::BOOL, :name => 'isTblLevel'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, + PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partName', :optional => true}, + LASTANALYZED => {:type => ::Thrift::Types::I64, :name => 'lastAnalyzed', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isTblLevel is unset!') if @isTblLevel.nil? + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableName is unset!') unless @tableName + end + + ::Thrift::Struct.generate_accessors self +end + +class ColumnStatistics + include ::Thrift::Struct, ::Thrift::Struct_Union + STATSDESC = 1 + STATSOBJ = 2 + + FIELDS = { + STATSDESC => {:type => ::Thrift::Types::STRUCT, :name => 'statsDesc', :class => ::ColumnStatisticsDesc}, + STATSOBJ => {:type => ::Thrift::Types::LIST, :name => 'statsObj', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsDesc is unset!') unless @statsDesc + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsObj is unset!') unless @statsObj + end + + ::Thrift::Struct.generate_accessors self +end + +class AggrStats + include ::Thrift::Struct, ::Thrift::Struct_Union + COLSTATS = 1 + PARTSFOUND = 2 + + FIELDS = { + COLSTATS => {:type => ::Thrift::Types::LIST, :name => 'colStats', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}}, + PARTSFOUND => {:type => ::Thrift::Types::I64, :name => 'partsFound'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colStats is unset!') unless @colStats + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partsFound is unset!') unless @partsFound + end + + ::Thrift::Struct.generate_accessors self +end + +class SetPartitionsStatsRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + COLSTATS = 1 + NEEDMERGE = 2 + + FIELDS = { + COLSTATS => {:type => ::Thrift::Types::LIST, :name => 'colStats', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatistics}}, + NEEDMERGE => {:type => ::Thrift::Types::BOOL, :name => 'needMerge', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colStats is unset!') unless @colStats + end + + ::Thrift::Struct.generate_accessors self +end + +class Schema + include ::Thrift::Struct, ::Thrift::Struct_Union + FIELDSCHEMAS = 1 + PROPERTIES = 2 + + FIELDS = { + 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}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class EnvironmentContext + include ::Thrift::Struct, ::Thrift::Struct_Union + PROPERTIES = 1 + + FIELDS = { + PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class PrimaryKeysRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field db_name is unset!') unless @db_name + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tbl_name is unset!') unless @tbl_name + end + + ::Thrift::Struct.generate_accessors self +end + +class PrimaryKeysResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + PRIMARYKEYS = 1 + + FIELDS = { + PRIMARYKEYS => {:type => ::Thrift::Types::LIST, :name => 'primaryKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLPrimaryKey}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field primaryKeys is unset!') unless @primaryKeys + end + + ::Thrift::Struct.generate_accessors self +end + +class ForeignKeysRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + PARENT_DB_NAME = 1 + PARENT_TBL_NAME = 2 + FOREIGN_DB_NAME = 3 + FOREIGN_TBL_NAME = 4 + + FIELDS = { + PARENT_DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'parent_db_name'}, + PARENT_TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'parent_tbl_name'}, + FOREIGN_DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'foreign_db_name'}, + FOREIGN_TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'foreign_tbl_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class ForeignKeysResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + FOREIGNKEYS = 1 + + FIELDS = { + FOREIGNKEYS => {:type => ::Thrift::Types::LIST, :name => 'foreignKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLForeignKey}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field foreignKeys is unset!') unless @foreignKeys + end + + ::Thrift::Struct.generate_accessors self +end + +class UniqueConstraintsRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field db_name is unset!') unless @db_name + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tbl_name is unset!') unless @tbl_name + end + + ::Thrift::Struct.generate_accessors self +end + +class UniqueConstraintsResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + UNIQUECONSTRAINTS = 1 + + FIELDS = { + UNIQUECONSTRAINTS => {:type => ::Thrift::Types::LIST, :name => 'uniqueConstraints', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLUniqueConstraint}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field uniqueConstraints is unset!') unless @uniqueConstraints + end + + ::Thrift::Struct.generate_accessors self +end + +class NotNullConstraintsRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field db_name is unset!') unless @db_name + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tbl_name is unset!') unless @tbl_name + end + + ::Thrift::Struct.generate_accessors self +end + +class NotNullConstraintsResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + NOTNULLCONSTRAINTS = 1 + + FIELDS = { + NOTNULLCONSTRAINTS => {:type => ::Thrift::Types::LIST, :name => 'notNullConstraints', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLNotNullConstraint}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field notNullConstraints is unset!') unless @notNullConstraints + end + + ::Thrift::Struct.generate_accessors self +end + +class DropConstraintRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TABLENAME = 2 + CONSTRAINTNAME = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'}, + CONSTRAINTNAME => {:type => ::Thrift::Types::STRING, :name => 'constraintname'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field constraintname is unset!') unless @constraintname + end + + ::Thrift::Struct.generate_accessors self +end + +class AddPrimaryKeyRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + PRIMARYKEYCOLS = 1 + + FIELDS = { + PRIMARYKEYCOLS => {:type => ::Thrift::Types::LIST, :name => 'primaryKeyCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLPrimaryKey}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field primaryKeyCols is unset!') unless @primaryKeyCols + end + + ::Thrift::Struct.generate_accessors self +end + +class AddForeignKeyRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + FOREIGNKEYCOLS = 1 + + FIELDS = { + FOREIGNKEYCOLS => {:type => ::Thrift::Types::LIST, :name => 'foreignKeyCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLForeignKey}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field foreignKeyCols is unset!') unless @foreignKeyCols + end + + ::Thrift::Struct.generate_accessors self +end + +class AddUniqueConstraintRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + UNIQUECONSTRAINTCOLS = 1 + + FIELDS = { + UNIQUECONSTRAINTCOLS => {:type => ::Thrift::Types::LIST, :name => 'uniqueConstraintCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLUniqueConstraint}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field uniqueConstraintCols is unset!') unless @uniqueConstraintCols + end + + ::Thrift::Struct.generate_accessors self +end + +class AddNotNullConstraintRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + NOTNULLCONSTRAINTCOLS = 1 + + FIELDS = { + NOTNULLCONSTRAINTCOLS => {:type => ::Thrift::Types::LIST, :name => 'notNullConstraintCols', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLNotNullConstraint}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field notNullConstraintCols is unset!') unless @notNullConstraintCols + end + + ::Thrift::Struct.generate_accessors self +end + +class PartitionsByExprResult + include ::Thrift::Struct, ::Thrift::Struct_Union + PARTITIONS = 1 + HASUNKNOWNPARTITIONS = 2 + + FIELDS = { + PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + HASUNKNOWNPARTITIONS => {:type => ::Thrift::Types::BOOL, :name => 'hasUnknownPartitions'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partitions is unset!') unless @partitions + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hasUnknownPartitions is unset!') if @hasUnknownPartitions.nil? + end + + ::Thrift::Struct.generate_accessors self +end + +class PartitionsByExprRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBLNAME = 2 + EXPR = 3 + DEFAULTPARTITIONNAME = 4 + MAXPARTS = 5 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, + EXPR => {:type => ::Thrift::Types::STRING, :name => 'expr', :binary => true}, + DEFAULTPARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'defaultPartitionName', :optional => true}, + MAXPARTS => {:type => ::Thrift::Types::I16, :name => 'maxParts', :default => -1, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expr is unset!') unless @expr + end + + ::Thrift::Struct.generate_accessors self +end + +class TableStatsResult + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLESTATS = 1 + + FIELDS = { + TABLESTATS => {:type => ::Thrift::Types::LIST, :name => 'tableStats', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableStats is unset!') unless @tableStats + end + + ::Thrift::Struct.generate_accessors self +end + +class PartitionsStatsResult + include ::Thrift::Struct, ::Thrift::Struct_Union + PARTSTATS = 1 + + FIELDS = { + PARTSTATS => {:type => ::Thrift::Types::MAP, :name => 'partStats', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partStats is unset!') unless @partStats + end + + ::Thrift::Struct.generate_accessors self +end + +class TableStatsRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBLNAME = 2 + COLNAMES = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, + COLNAMES => {:type => ::Thrift::Types::LIST, :name => 'colNames', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colNames is unset!') unless @colNames + end + + ::Thrift::Struct.generate_accessors self +end + +class PartitionsStatsRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBLNAME = 2 + COLNAMES = 3 + PARTNAMES = 4 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, + COLNAMES => {:type => ::Thrift::Types::LIST, :name => 'colNames', :element => {:type => ::Thrift::Types::STRING}}, + PARTNAMES => {:type => ::Thrift::Types::LIST, :name => 'partNames', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colNames is unset!') unless @colNames + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partNames is unset!') unless @partNames + end + + ::Thrift::Struct.generate_accessors self +end + +class AddPartitionsResult + include ::Thrift::Struct, ::Thrift::Struct_Union + PARTITIONS = 1 + + FIELDS = { + PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class AddPartitionsRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBLNAME = 2 + PARTS = 3 + IFNOTEXISTS = 4 + NEEDRESULT = 5 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, + PARTS => {:type => ::Thrift::Types::LIST, :name => 'parts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}}, + IFNOTEXISTS => {:type => ::Thrift::Types::BOOL, :name => 'ifNotExists'}, + NEEDRESULT => {:type => ::Thrift::Types::BOOL, :name => 'needResult', :default => true, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field parts is unset!') unless @parts + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field ifNotExists is unset!') if @ifNotExists.nil? + end + + ::Thrift::Struct.generate_accessors self +end + +class DropPartitionsResult + include ::Thrift::Struct, ::Thrift::Struct_Union + PARTITIONS = 1 + + FIELDS = { + PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class DropPartitionsExpr + include ::Thrift::Struct, ::Thrift::Struct_Union + EXPR = 1 + PARTARCHIVELEVEL = 2 + + FIELDS = { + EXPR => {:type => ::Thrift::Types::STRING, :name => 'expr', :binary => true}, + PARTARCHIVELEVEL => {:type => ::Thrift::Types::I32, :name => 'partArchiveLevel', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expr is unset!') unless @expr + end + + ::Thrift::Struct.generate_accessors self +end + +class RequestPartsSpec < ::Thrift::Union + include ::Thrift::Struct_Union + class << self + def names(val) + RequestPartsSpec.new(:names, val) + end + + def exprs(val) + RequestPartsSpec.new(:exprs, val) + end + end + + NAMES = 1 + EXPRS = 2 + + FIELDS = { + NAMES => {:type => ::Thrift::Types::LIST, :name => 'names', :element => {:type => ::Thrift::Types::STRING}}, + EXPRS => {:type => ::Thrift::Types::LIST, :name => 'exprs', :element => {:type => ::Thrift::Types::STRUCT, :class => ::DropPartitionsExpr}} + } + + def struct_fields; FIELDS; end + + def validate + raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? + end + + ::Thrift::Union.generate_accessors self +end + +class DropPartitionsRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBLNAME = 2 + PARTS = 3 + DELETEDATA = 4 + IFEXISTS = 5 + IGNOREPROTECTION = 6 + ENVIRONMENTCONTEXT = 7 + NEEDRESULT = 8 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, + PARTS => {:type => ::Thrift::Types::STRUCT, :name => 'parts', :class => ::RequestPartsSpec}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData', :optional => true}, + IFEXISTS => {:type => ::Thrift::Types::BOOL, :name => 'ifExists', :default => true, :optional => true}, + IGNOREPROTECTION => {:type => ::Thrift::Types::BOOL, :name => 'ignoreProtection', :optional => true}, + ENVIRONMENTCONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environmentContext', :class => ::EnvironmentContext, :optional => true}, + NEEDRESULT => {:type => ::Thrift::Types::BOOL, :name => 'needResult', :default => true, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field parts is unset!') unless @parts + end + + ::Thrift::Struct.generate_accessors self +end + +class ResourceUri + include ::Thrift::Struct, ::Thrift::Struct_Union + RESOURCETYPE = 1 + URI = 2 + + FIELDS = { + RESOURCETYPE => {:type => ::Thrift::Types::I32, :name => 'resourceType', :enum_class => ::ResourceType}, + URI => {:type => ::Thrift::Types::STRING, :name => 'uri'} + } + + def struct_fields; FIELDS; end + + def validate + unless @resourceType.nil? || ::ResourceType::VALID_VALUES.include?(@resourceType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field resourceType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class Function + include ::Thrift::Struct, ::Thrift::Struct_Union + FUNCTIONNAME = 1 + DBNAME = 2 + CLASSNAME = 3 + OWNERNAME = 4 + OWNERTYPE = 5 + CREATETIME = 6 + FUNCTIONTYPE = 7 + RESOURCEURIS = 8 + + FIELDS = { + FUNCTIONNAME => {:type => ::Thrift::Types::STRING, :name => 'functionName'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + CLASSNAME => {:type => ::Thrift::Types::STRING, :name => 'className'}, + OWNERNAME => {:type => ::Thrift::Types::STRING, :name => 'ownerName'}, + OWNERTYPE => {:type => ::Thrift::Types::I32, :name => 'ownerType', :enum_class => ::PrincipalType}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + FUNCTIONTYPE => {:type => ::Thrift::Types::I32, :name => 'functionType', :enum_class => ::FunctionType}, + RESOURCEURIS => {:type => ::Thrift::Types::LIST, :name => 'resourceUris', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ResourceUri}} + } + + def struct_fields; FIELDS; end + + def validate + unless @ownerType.nil? || ::PrincipalType::VALID_VALUES.include?(@ownerType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field ownerType!') + end + unless @functionType.nil? || ::FunctionType::VALID_VALUES.include?(@functionType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field functionType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class TxnInfo + include ::Thrift::Struct, ::Thrift::Struct_Union + ID = 1 + STATE = 2 + USER = 3 + HOSTNAME = 4 + AGENTINFO = 5 + HEARTBEATCOUNT = 6 + METAINFO = 7 + STARTEDTIME = 8 + LASTHEARTBEATTIME = 9 + + FIELDS = { + ID => {:type => ::Thrift::Types::I64, :name => 'id'}, + STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::TxnState}, + USER => {:type => ::Thrift::Types::STRING, :name => 'user'}, + HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'}, + AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :default => %q"Unknown", :optional => true}, + HEARTBEATCOUNT => {:type => ::Thrift::Types::I32, :name => 'heartbeatCount', :default => 0, :optional => true}, + METAINFO => {:type => ::Thrift::Types::STRING, :name => 'metaInfo', :optional => true}, + STARTEDTIME => {:type => ::Thrift::Types::I64, :name => 'startedTime', :optional => true}, + LASTHEARTBEATTIME => {:type => ::Thrift::Types::I64, :name => 'lastHeartbeatTime', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field user is unset!') unless @user + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostname is unset!') unless @hostname + unless @state.nil? || ::TxnState::VALID_VALUES.include?(@state) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class GetOpenTxnsInfoResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + TXN_HIGH_WATER_MARK = 1 + OPEN_TXNS = 2 + + FIELDS = { + TXN_HIGH_WATER_MARK => {:type => ::Thrift::Types::I64, :name => 'txn_high_water_mark'}, + OPEN_TXNS => {:type => ::Thrift::Types::LIST, :name => 'open_txns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::TxnInfo}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txn_high_water_mark is unset!') unless @txn_high_water_mark + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field open_txns is unset!') unless @open_txns + end + + ::Thrift::Struct.generate_accessors self +end + +class GetOpenTxnsResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + TXN_HIGH_WATER_MARK = 1 + OPEN_TXNS = 2 + MIN_OPEN_TXN = 3 + ABORTEDBITS = 4 + + FIELDS = { + TXN_HIGH_WATER_MARK => {:type => ::Thrift::Types::I64, :name => 'txn_high_water_mark'}, + OPEN_TXNS => {:type => ::Thrift::Types::LIST, :name => 'open_txns', :element => {:type => ::Thrift::Types::I64}}, + MIN_OPEN_TXN => {:type => ::Thrift::Types::I64, :name => 'min_open_txn', :optional => true}, + ABORTEDBITS => {:type => ::Thrift::Types::STRING, :name => 'abortedBits', :binary => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txn_high_water_mark is unset!') unless @txn_high_water_mark + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field open_txns is unset!') unless @open_txns + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field abortedBits is unset!') unless @abortedBits + end + + ::Thrift::Struct.generate_accessors self +end + +class OpenTxnRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + NUM_TXNS = 1 + USER = 2 + HOSTNAME = 3 + AGENTINFO = 4 + + FIELDS = { + NUM_TXNS => {:type => ::Thrift::Types::I32, :name => 'num_txns'}, + USER => {:type => ::Thrift::Types::STRING, :name => 'user'}, + HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'}, + AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :default => %q"Unknown", :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field num_txns is unset!') unless @num_txns + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field user is unset!') unless @user + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostname is unset!') unless @hostname + end + + ::Thrift::Struct.generate_accessors self +end + +class OpenTxnsResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + TXN_IDS = 1 + + FIELDS = { + TXN_IDS => {:type => ::Thrift::Types::LIST, :name => 'txn_ids', :element => {:type => ::Thrift::Types::I64}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txn_ids is unset!') unless @txn_ids + end + + ::Thrift::Struct.generate_accessors self +end + +class AbortTxnRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + TXNID = 1 + + FIELDS = { + TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnid is unset!') unless @txnid + end + + ::Thrift::Struct.generate_accessors self +end + +class AbortTxnsRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + TXN_IDS = 1 + + FIELDS = { + TXN_IDS => {:type => ::Thrift::Types::LIST, :name => 'txn_ids', :element => {:type => ::Thrift::Types::I64}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txn_ids is unset!') unless @txn_ids + end + + ::Thrift::Struct.generate_accessors self +end + +class CommitTxnRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + TXNID = 1 + + FIELDS = { + TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnid is unset!') unless @txnid + end + + ::Thrift::Struct.generate_accessors self +end + +class LockComponent + include ::Thrift::Struct, ::Thrift::Struct_Union + TYPE = 1 + LEVEL = 2 + DBNAME = 3 + TABLENAME = 4 + PARTITIONNAME = 5 + OPERATIONTYPE = 6 + ISACID = 7 + ISDYNAMICPARTITIONWRITE = 8 + + FIELDS = { + TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::LockType}, + LEVEL => {:type => ::Thrift::Types::I32, :name => 'level', :enum_class => ::LockLevel}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true}, + PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true}, + OPERATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'operationType', :default => 5, :optional => true, :enum_class => ::DataOperationType}, + ISACID => {:type => ::Thrift::Types::BOOL, :name => 'isAcid', :default => false, :optional => true}, + ISDYNAMICPARTITIONWRITE => {:type => ::Thrift::Types::BOOL, :name => 'isDynamicPartitionWrite', :default => false, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field level is unset!') unless @level + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname + unless @type.nil? || ::LockType::VALID_VALUES.include?(@type) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') + end + unless @level.nil? || ::LockLevel::VALID_VALUES.include?(@level) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field level!') + end + unless @operationType.nil? || ::DataOperationType::VALID_VALUES.include?(@operationType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class LockRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + COMPONENT = 1 + TXNID = 2 + USER = 3 + HOSTNAME = 4 + AGENTINFO = 5 + + FIELDS = { + COMPONENT => {:type => ::Thrift::Types::LIST, :name => 'component', :element => {:type => ::Thrift::Types::STRUCT, :class => ::LockComponent}}, + TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true}, + USER => {:type => ::Thrift::Types::STRING, :name => 'user'}, + HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'}, + AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :default => %q"Unknown", :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field component is unset!') unless @component + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field user is unset!') unless @user + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostname is unset!') unless @hostname + end + + ::Thrift::Struct.generate_accessors self +end + +class LockResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + LOCKID = 1 + STATE = 2 + + FIELDS = { + LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'}, + STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::LockState} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lockid is unset!') unless @lockid + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state + unless @state.nil? || ::LockState::VALID_VALUES.include?(@state) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class CheckLockRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + LOCKID = 1 + TXNID = 2 + ELAPSED_MS = 3 + + FIELDS = { + LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'}, + TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true}, + ELAPSED_MS => {:type => ::Thrift::Types::I64, :name => 'elapsed_ms', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lockid is unset!') unless @lockid + end + + ::Thrift::Struct.generate_accessors self +end + +class UnlockRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + LOCKID = 1 + + FIELDS = { + LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lockid is unset!') unless @lockid + end + + ::Thrift::Struct.generate_accessors self +end + +class ShowLocksRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TABLENAME = 2 + PARTNAME = 3 + ISEXTENDED = 4 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname', :optional => true}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true}, + PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partname', :optional => true}, + ISEXTENDED => {:type => ::Thrift::Types::BOOL, :name => 'isExtended', :default => false, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class ShowLocksResponseElement + include ::Thrift::Struct, ::Thrift::Struct_Union + LOCKID = 1 + DBNAME = 2 + TABLENAME = 3 + PARTNAME = 4 + STATE = 5 + TYPE = 6 + TXNID = 7 + LASTHEARTBEAT = 8 + ACQUIREDAT = 9 + USER = 10 + HOSTNAME = 11 + HEARTBEATCOUNT = 12 + AGENTINFO = 13 + BLOCKEDBYEXTID = 14 + BLOCKEDBYINTID = 15 + LOCKIDINTERNAL = 16 + + FIELDS = { + LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true}, + PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partname', :optional => true}, + STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::LockState}, + TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::LockType}, + TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true}, + LASTHEARTBEAT => {:type => ::Thrift::Types::I64, :name => 'lastheartbeat'}, + ACQUIREDAT => {:type => ::Thrift::Types::I64, :name => 'acquiredat', :optional => true}, + USER => {:type => ::Thrift::Types::STRING, :name => 'user'}, + HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'}, + HEARTBEATCOUNT => {:type => ::Thrift::Types::I32, :name => 'heartbeatCount', :default => 0, :optional => true}, + AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :optional => true}, + BLOCKEDBYEXTID => {:type => ::Thrift::Types::I64, :name => 'blockedByExtId', :optional => true}, + BLOCKEDBYINTID => {:type => ::Thrift::Types::I64, :name => 'blockedByIntId', :optional => true}, + LOCKIDINTERNAL => {:type => ::Thrift::Types::I64, :name => 'lockIdInternal', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lockid is unset!') unless @lockid + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lastheartbeat is unset!') unless @lastheartbeat + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field user is unset!') unless @user + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostname is unset!') unless @hostname + unless @state.nil? || ::LockState::VALID_VALUES.include?(@state) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') + end + unless @type.nil? || ::LockType::VALID_VALUES.include?(@type) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class ShowLocksResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + LOCKS = 1 + + FIELDS = { + LOCKS => {:type => ::Thrift::Types::LIST, :name => 'locks', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ShowLocksResponseElement}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class HeartbeatRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + LOCKID = 1 + TXNID = 2 + + FIELDS = { + LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid', :optional => true}, + TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class HeartbeatTxnRangeRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + MIN = 1 + MAX = 2 + + FIELDS = { + MIN => {:type => ::Thrift::Types::I64, :name => 'min'}, + MAX => {:type => ::Thrift::Types::I64, :name => 'max'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field min is unset!') unless @min + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field max is unset!') unless @max + end + + ::Thrift::Struct.generate_accessors self +end + +class HeartbeatTxnRangeResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + ABORTED = 1 + NOSUCH = 2 + + FIELDS = { + ABORTED => {:type => ::Thrift::Types::SET, :name => 'aborted', :element => {:type => ::Thrift::Types::I64}}, + NOSUCH => {:type => ::Thrift::Types::SET, :name => 'nosuch', :element => {:type => ::Thrift::Types::I64}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field aborted is unset!') unless @aborted + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nosuch is unset!') unless @nosuch + end + + ::Thrift::Struct.generate_accessors self +end + +class CompactionRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TABLENAME = 2 + PARTITIONNAME = 3 + TYPE = 4 + RUNAS = 5 + PROPERTIES = 6 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'}, + PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true}, + TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::CompactionType}, + RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runas', :optional => true}, + PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type + unless @type.nil? || ::CompactionType::VALID_VALUES.include?(@type) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class CompactionResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + ID = 1 + STATE = 2 + ACCEPTED = 3 + + FIELDS = { + ID => {:type => ::Thrift::Types::I64, :name => 'id'}, + STATE => {:type => ::Thrift::Types::STRING, :name => 'state'}, + ACCEPTED => {:type => ::Thrift::Types::BOOL, :name => 'accepted'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field accepted is unset!') if @accepted.nil? + end + + ::Thrift::Struct.generate_accessors self +end + +class ShowCompactRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class ShowCompactResponseElement + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TABLENAME = 2 + PARTITIONNAME = 3 + TYPE = 4 + STATE = 5 + WORKERID = 6 + START = 7 + RUNAS = 8 + HIGHTESTTXNID = 9 + METAINFO = 10 + ENDTIME = 11 + HADOOPJOBID = 12 + ID = 13 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'}, + PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true}, + TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::CompactionType}, + STATE => {:type => ::Thrift::Types::STRING, :name => 'state'}, + WORKERID => {:type => ::Thrift::Types::STRING, :name => 'workerid', :optional => true}, + START => {:type => ::Thrift::Types::I64, :name => 'start', :optional => true}, + RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runAs', :optional => true}, + HIGHTESTTXNID => {:type => ::Thrift::Types::I64, :name => 'hightestTxnId', :optional => true}, + METAINFO => {:type => ::Thrift::Types::STRING, :name => 'metaInfo', :optional => true}, + ENDTIME => {:type => ::Thrift::Types::I64, :name => 'endTime', :optional => true}, + HADOOPJOBID => {:type => ::Thrift::Types::STRING, :name => 'hadoopJobId', :default => %q"None", :optional => true}, + ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state + unless @type.nil? || ::CompactionType::VALID_VALUES.include?(@type) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class ShowCompactResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + COMPACTS = 1 + + FIELDS = { + COMPACTS => {:type => ::Thrift::Types::LIST, :name => 'compacts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ShowCompactResponseElement}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field compacts is unset!') unless @compacts + end + + ::Thrift::Struct.generate_accessors self +end + +class AddDynamicPartitions + include ::Thrift::Struct, ::Thrift::Struct_Union + TXNID = 1 + DBNAME = 2 + TABLENAME = 3 + PARTITIONNAMES = 4 + OPERATIONTYPE = 5 + + FIELDS = { + TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'}, + PARTITIONNAMES => {:type => ::Thrift::Types::LIST, :name => 'partitionnames', :element => {:type => ::Thrift::Types::STRING}}, + OPERATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'operationType', :default => 5, :optional => true, :enum_class => ::DataOperationType} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field txnid is unset!') unless @txnid + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partitionnames is unset!') unless @partitionnames + unless @operationType.nil? || ::DataOperationType::VALID_VALUES.include?(@operationType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class NotificationEventRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + LASTEVENT = 1 + MAXEVENTS = 2 + + FIELDS = { + LASTEVENT => {:type => ::Thrift::Types::I64, :name => 'lastEvent'}, + MAXEVENTS => {:type => ::Thrift::Types::I32, :name => 'maxEvents', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lastEvent is unset!') unless @lastEvent + end + + ::Thrift::Struct.generate_accessors self +end + +class NotificationEvent + include ::Thrift::Struct, ::Thrift::Struct_Union + EVENTID = 1 + EVENTTIME = 2 + EVENTTYPE = 3 + DBNAME = 4 + TABLENAME = 5 + MESSAGE = 6 + MESSAGEFORMAT = 7 + + FIELDS = { + EVENTID => {:type => ::Thrift::Types::I64, :name => 'eventId'}, + EVENTTIME => {:type => ::Thrift::Types::I32, :name => 'eventTime'}, + EVENTTYPE => {:type => ::Thrift::Types::STRING, :name => 'eventType'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName', :optional => true}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :optional => true}, + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}, + MESSAGEFORMAT => {:type => ::Thrift::Types::STRING, :name => 'messageFormat', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventId is unset!') unless @eventId + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventTime is unset!') unless @eventTime + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventType is unset!') unless @eventType + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field message is unset!') unless @message + end + + ::Thrift::Struct.generate_accessors self +end + +class NotificationEventResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + EVENTS = 1 + + FIELDS = { + EVENTS => {:type => ::Thrift::Types::LIST, :name => 'events', :element => {:type => ::Thrift::Types::STRUCT, :class => ::NotificationEvent}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field events is unset!') unless @events + end + + ::Thrift::Struct.generate_accessors self +end + +class CurrentNotificationEventId + include ::Thrift::Struct, ::Thrift::Struct_Union + EVENTID = 1 + + FIELDS = { + EVENTID => {:type => ::Thrift::Types::I64, :name => 'eventId'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventId is unset!') unless @eventId + end + + ::Thrift::Struct.generate_accessors self +end + +class InsertEventRequestData + include ::Thrift::Struct, ::Thrift::Struct_Union + REPLACE = 1 + FILESADDED = 2 + FILESADDEDCHECKSUM = 3 + + FIELDS = { + REPLACE => {:type => ::Thrift::Types::BOOL, :name => 'replace', :optional => true}, + FILESADDED => {:type => ::Thrift::Types::LIST, :name => 'filesAdded', :element => {:type => ::Thrift::Types::STRING}}, + FILESADDEDCHECKSUM => {:type => ::Thrift::Types::LIST, :name => 'filesAddedChecksum', :element => {:type => ::Thrift::Types::STRING}, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field filesAdded is unset!') unless @filesAdded + end + + ::Thrift::Struct.generate_accessors self +end + +class FireEventRequestData < ::Thrift::Union + include ::Thrift::Struct_Union + class << self + def insertData(val) + FireEventRequestData.new(:insertData, val) + end + end + + INSERTDATA = 1 + + FIELDS = { + INSERTDATA => {:type => ::Thrift::Types::STRUCT, :name => 'insertData', :class => ::InsertEventRequestData} + } + + def struct_fields; FIELDS; end + + def validate + raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? + end + + ::Thrift::Union.generate_accessors self +end + +class FireEventRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESSFUL = 1 + DATA = 2 + DBNAME = 3 + TABLENAME = 4 + PARTITIONVALS = 5 + + FIELDS = { + SUCCESSFUL => {:type => ::Thrift::Types::BOOL, :name => 'successful'}, + DATA => {:type => ::Thrift::Types::STRUCT, :name => 'data', :class => ::FireEventRequestData}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName', :optional => true}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :optional => true}, + PARTITIONVALS => {:type => ::Thrift::Types::LIST, :name => 'partitionVals', :element => {:type => ::Thrift::Types::STRING}, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field successful is unset!') if @successful.nil? + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field data is unset!') unless @data + end + + ::Thrift::Struct.generate_accessors self +end + +class FireEventResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class MetadataPpdResult + include ::Thrift::Struct, ::Thrift::Struct_Union + METADATA = 1 + INCLUDEBITSET = 2 + + FIELDS = { + METADATA => {:type => ::Thrift::Types::STRING, :name => 'metadata', :binary => true, :optional => true}, + INCLUDEBITSET => {:type => ::Thrift::Types::STRING, :name => 'includeBitset', :binary => true, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class GetFileMetadataByExprResult + include ::Thrift::Struct, ::Thrift::Struct_Union + METADATA = 1 + ISSUPPORTED = 2 + + FIELDS = { + METADATA => {:type => ::Thrift::Types::MAP, :name => 'metadata', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::MetadataPpdResult}}, + ISSUPPORTED => {:type => ::Thrift::Types::BOOL, :name => 'isSupported'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field metadata is unset!') unless @metadata + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isSupported is unset!') if @isSupported.nil? + end + + ::Thrift::Struct.generate_accessors self +end + +class GetFileMetadataByExprRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + FILEIDS = 1 + EXPR = 2 + DOGETFOOTERS = 3 + TYPE = 4 + + FIELDS = { + FILEIDS => {:type => ::Thrift::Types::LIST, :name => 'fileIds', :element => {:type => ::Thrift::Types::I64}}, + EXPR => {:type => ::Thrift::Types::STRING, :name => 'expr', :binary => true}, + DOGETFOOTERS => {:type => ::Thrift::Types::BOOL, :name => 'doGetFooters', :optional => true}, + TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :optional => true, :enum_class => ::FileMetadataExprType} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileIds is unset!') unless @fileIds + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expr is unset!') unless @expr + unless @type.nil? || ::FileMetadataExprType::VALID_VALUES.include?(@type) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class GetFileMetadataResult + include ::Thrift::Struct, ::Thrift::Struct_Union + METADATA = 1 + ISSUPPORTED = 2 + + FIELDS = { + METADATA => {:type => ::Thrift::Types::MAP, :name => 'metadata', :key => {:type => ::Thrift::Types::I64}, :value => {:type => ::Thrift::Types::STRING, :binary => true}}, + ISSUPPORTED => {:type => ::Thrift::Types::BOOL, :name => 'isSupported'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field metadata is unset!') unless @metadata + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isSupported is unset!') if @isSupported.nil? + end + + ::Thrift::Struct.generate_accessors self +end + +class GetFileMetadataRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + FILEIDS = 1 + + FIELDS = { + FILEIDS => {:type => ::Thrift::Types::LIST, :name => 'fileIds', :element => {:type => ::Thrift::Types::I64}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileIds is unset!') unless @fileIds + end + + ::Thrift::Struct.generate_accessors self +end + +class PutFileMetadataResult + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class PutFileMetadataRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + FILEIDS = 1 + METADATA = 2 + TYPE = 3 + + FIELDS = { + FILEIDS => {:type => ::Thrift::Types::LIST, :name => 'fileIds', :element => {:type => ::Thrift::Types::I64}}, + METADATA => {:type => ::Thrift::Types::LIST, :name => 'metadata', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, + TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :optional => true, :enum_class => ::FileMetadataExprType} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileIds is unset!') unless @fileIds + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field metadata is unset!') unless @metadata + unless @type.nil? || ::FileMetadataExprType::VALID_VALUES.include?(@type) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class ClearFileMetadataResult + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class ClearFileMetadataRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + FILEIDS = 1 + + FIELDS = { + FILEIDS => {:type => ::Thrift::Types::LIST, :name => 'fileIds', :element => {:type => ::Thrift::Types::I64}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fileIds is unset!') unless @fileIds + end + + ::Thrift::Struct.generate_accessors self +end + +class CacheFileMetadataResult + include ::Thrift::Struct, ::Thrift::Struct_Union + ISSUPPORTED = 1 + + FIELDS = { + ISSUPPORTED => {:type => ::Thrift::Types::BOOL, :name => 'isSupported'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isSupported is unset!') if @isSupported.nil? + end + + ::Thrift::Struct.generate_accessors self +end + +class CacheFileMetadataRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBLNAME = 2 + PARTNAME = 3 + ISALLPARTS = 4 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, + PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partName', :optional => true}, + ISALLPARTS => {:type => ::Thrift::Types::BOOL, :name => 'isAllParts', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName + end + + ::Thrift::Struct.generate_accessors self +end + +class GetAllFunctionsResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + FUNCTIONS = 1 + + FIELDS = { + FUNCTIONS => {:type => ::Thrift::Types::LIST, :name => 'functions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Function}, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class ClientCapabilities + include ::Thrift::Struct, ::Thrift::Struct_Union + VALUES = 1 + + FIELDS = { + VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::I32, :enum_class => ::ClientCapability}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field values is unset!') unless @values + end + + ::Thrift::Struct.generate_accessors self +end + +class GetTableRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBLNAME = 2 + CAPABILITIES = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TBLNAME => {:type => ::Thrift::Types::STRING, :name => 'tblName'}, + CAPABILITIES => {:type => ::Thrift::Types::STRUCT, :name => 'capabilities', :class => ::ClientCapabilities, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tblName is unset!') unless @tblName + end + + ::Thrift::Struct.generate_accessors self +end + +class GetTableResult + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLE = 1 + + FIELDS = { + TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'table', :class => ::Table} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table is unset!') unless @table + end + + ::Thrift::Struct.generate_accessors self +end + +class GetTablesRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBLNAMES = 2 + CAPABILITIES = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TBLNAMES => {:type => ::Thrift::Types::LIST, :name => 'tblNames', :element => {:type => ::Thrift::Types::STRING}, :optional => true}, + CAPABILITIES => {:type => ::Thrift::Types::STRUCT, :name => 'capabilities', :class => ::ClientCapabilities, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName + end + + ::Thrift::Struct.generate_accessors self +end + +class GetTablesResult + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLES = 1 + + FIELDS = { + TABLES => {:type => ::Thrift::Types::LIST, :name => 'tables', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Table}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tables is unset!') unless @tables + end + + ::Thrift::Struct.generate_accessors self +end + +class CmRecycleRequest + include ::Thrift::Struct, ::Thrift::Struct_Union + DATAPATH = 1 + PURGE = 2 + + FIELDS = { + DATAPATH => {:type => ::Thrift::Types::STRING, :name => 'dataPath'}, + PURGE => {:type => ::Thrift::Types::BOOL, :name => 'purge'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dataPath is unset!') unless @dataPath + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field purge is unset!') if @purge.nil? + end + + ::Thrift::Struct.generate_accessors self +end + +class CmRecycleResponse + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class TableMeta + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TABLENAME = 2 + TABLETYPE = 3 + COMMENTS = 4 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, + TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'}, + COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableName is unset!') unless @tableName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableType is unset!') unless @tableType + end + + ::Thrift::Struct.generate_accessors self +end + +class MetaException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class UnknownTableException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class UnknownDBException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class AlreadyExistsException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class InvalidPartitionException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class UnknownPartitionException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class InvalidObjectException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class NoSuchObjectException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class IndexAlreadyExistsException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class InvalidOperationException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class ConfigValSecurityException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class InvalidInputException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class NoSuchTxnException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class TxnAbortedException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class TxnOpenException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class NoSuchLockException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + diff --git standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb new file mode 100644 index 0000000..cfe08f6 --- /dev/null +++ standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb @@ -0,0 +1,10618 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'thrift' +require 'facebook_service' +require 'hive_metastore_types' + +module ThriftHiveMetastore + class Client < ::FacebookService::Client + include ::Thrift::Client + + def getMetaConf(key) + send_getMetaConf(key) + return recv_getMetaConf() + end + + def send_getMetaConf(key) + send_message('getMetaConf', GetMetaConf_args, :key => key) + end + + def recv_getMetaConf() + result = receive_message(GetMetaConf_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getMetaConf failed: unknown result') + end + + def setMetaConf(key, value) + send_setMetaConf(key, value) + recv_setMetaConf() + end + + def send_setMetaConf(key, value) + send_message('setMetaConf', SetMetaConf_args, :key => key, :value => value) + end + + def recv_setMetaConf() + result = receive_message(SetMetaConf_result) + raise result.o1 unless result.o1.nil? + return + end + + def create_database(database) + send_create_database(database) + recv_create_database() + end + + def send_create_database(database) + send_message('create_database', Create_database_args, :database => database) + end + + def recv_create_database() + result = receive_message(Create_database_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + return + end + + def get_database(name) + send_get_database(name) + return recv_get_database() + end + + def send_get_database(name) + send_message('get_database', Get_database_args, :name => name) + end + + def recv_get_database() + result = receive_message(Get_database_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_database failed: unknown result') + end + + def drop_database(name, deleteData, cascade) + send_drop_database(name, deleteData, cascade) + recv_drop_database() + end + + def send_drop_database(name, deleteData, cascade) + send_message('drop_database', Drop_database_args, :name => name, :deleteData => deleteData, :cascade => cascade) + end + + def recv_drop_database() + result = receive_message(Drop_database_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + return + end + + def get_databases(pattern) + send_get_databases(pattern) + return recv_get_databases() + end + + def send_get_databases(pattern) + send_message('get_databases', Get_databases_args, :pattern => pattern) + end + + def recv_get_databases() + result = receive_message(Get_databases_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_databases failed: unknown result') + end + + def get_all_databases() + send_get_all_databases() + return recv_get_all_databases() + end + + def send_get_all_databases() + send_message('get_all_databases', Get_all_databases_args) + end + + def recv_get_all_databases() + result = receive_message(Get_all_databases_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_databases failed: unknown result') + end + + def alter_database(dbname, db) + send_alter_database(dbname, db) + recv_alter_database() + end + + def send_alter_database(dbname, db) + send_message('alter_database', Alter_database_args, :dbname => dbname, :db => db) + end + + def recv_alter_database() + result = receive_message(Alter_database_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def get_type(name) + send_get_type(name) + return recv_get_type() + end + + def send_get_type(name) + send_message('get_type', Get_type_args, :name => name) + end + + def recv_get_type() + result = receive_message(Get_type_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_type failed: unknown result') + end + + def create_type(type) + send_create_type(type) + return recv_create_type() + end + + def send_create_type(type) + send_message('create_type', Create_type_args, :type => type) + end + + def recv_create_type() + result = receive_message(Create_type_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'create_type failed: unknown result') + end + + def drop_type(type) + send_drop_type(type) + return recv_drop_type() + end + + def send_drop_type(type) + send_message('drop_type', Drop_type_args, :type => type) + end + + def recv_drop_type() + result = receive_message(Drop_type_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_type failed: unknown result') + end + + def get_type_all(name) + send_get_type_all(name) + return recv_get_type_all() + end + + def send_get_type_all(name) + send_message('get_type_all', Get_type_all_args, :name => name) + end + + def recv_get_type_all() + result = receive_message(Get_type_all_result) + return result.success unless result.success.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_type_all failed: unknown result') + end + + def get_fields(db_name, table_name) + send_get_fields(db_name, table_name) + return recv_get_fields() + end + + def send_get_fields(db_name, table_name) + send_message('get_fields', Get_fields_args, :db_name => db_name, :table_name => table_name) + end + + def recv_get_fields() + result = receive_message(Get_fields_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_fields failed: unknown result') + end + + def get_fields_with_environment_context(db_name, table_name, environment_context) + send_get_fields_with_environment_context(db_name, table_name, environment_context) + return recv_get_fields_with_environment_context() + end + + def send_get_fields_with_environment_context(db_name, table_name, environment_context) + send_message('get_fields_with_environment_context', Get_fields_with_environment_context_args, :db_name => db_name, :table_name => table_name, :environment_context => environment_context) + end + + def recv_get_fields_with_environment_context() + result = receive_message(Get_fields_with_environment_context_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_fields_with_environment_context failed: unknown result') + end + + def get_schema(db_name, table_name) + send_get_schema(db_name, table_name) + return recv_get_schema() + end + + def send_get_schema(db_name, table_name) + send_message('get_schema', Get_schema_args, :db_name => db_name, :table_name => table_name) + end + + def recv_get_schema() + result = receive_message(Get_schema_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_schema failed: unknown result') + end + + def get_schema_with_environment_context(db_name, table_name, environment_context) + send_get_schema_with_environment_context(db_name, table_name, environment_context) + return recv_get_schema_with_environment_context() + end + + def send_get_schema_with_environment_context(db_name, table_name, environment_context) + send_message('get_schema_with_environment_context', Get_schema_with_environment_context_args, :db_name => db_name, :table_name => table_name, :environment_context => environment_context) + end + + def recv_get_schema_with_environment_context() + result = receive_message(Get_schema_with_environment_context_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_schema_with_environment_context failed: unknown result') + end + + def create_table(tbl) + send_create_table(tbl) + recv_create_table() + end + + def send_create_table(tbl) + send_message('create_table', Create_table_args, :tbl => tbl) + end + + def recv_create_table() + result = receive_message(Create_table_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + return + end + + def create_table_with_environment_context(tbl, environment_context) + send_create_table_with_environment_context(tbl, environment_context) + recv_create_table_with_environment_context() + end + + def send_create_table_with_environment_context(tbl, environment_context) + send_message('create_table_with_environment_context', Create_table_with_environment_context_args, :tbl => tbl, :environment_context => environment_context) + end + + def recv_create_table_with_environment_context() + result = receive_message(Create_table_with_environment_context_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + return + end + + def create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints) + send_create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints) + recv_create_table_with_constraints() + end + + def send_create_table_with_constraints(tbl, primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints) + send_message('create_table_with_constraints', Create_table_with_constraints_args, :tbl => tbl, :primaryKeys => primaryKeys, :foreignKeys => foreignKeys, :uniqueConstraints => uniqueConstraints, :notNullConstraints => notNullConstraints) + end + + def recv_create_table_with_constraints() + result = receive_message(Create_table_with_constraints_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + return + end + + def drop_constraint(req) + send_drop_constraint(req) + recv_drop_constraint() + end + + def send_drop_constraint(req) + send_message('drop_constraint', Drop_constraint_args, :req => req) + end + + def recv_drop_constraint() + result = receive_message(Drop_constraint_result) + raise result.o1 unless result.o1.nil? + raise result.o3 unless result.o3.nil? + return + end + + def add_primary_key(req) + send_add_primary_key(req) + recv_add_primary_key() + end + + def send_add_primary_key(req) + send_message('add_primary_key', Add_primary_key_args, :req => req) + end + + def recv_add_primary_key() + result = receive_message(Add_primary_key_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def add_foreign_key(req) + send_add_foreign_key(req) + recv_add_foreign_key() + end + + def send_add_foreign_key(req) + send_message('add_foreign_key', Add_foreign_key_args, :req => req) + end + + def recv_add_foreign_key() + result = receive_message(Add_foreign_key_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def add_unique_constraint(req) + send_add_unique_constraint(req) + recv_add_unique_constraint() + end + + def send_add_unique_constraint(req) + send_message('add_unique_constraint', Add_unique_constraint_args, :req => req) + end + + def recv_add_unique_constraint() + result = receive_message(Add_unique_constraint_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def add_not_null_constraint(req) + send_add_not_null_constraint(req) + recv_add_not_null_constraint() + end + + def send_add_not_null_constraint(req) + send_message('add_not_null_constraint', Add_not_null_constraint_args, :req => req) + end + + def recv_add_not_null_constraint() + result = receive_message(Add_not_null_constraint_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def drop_table(dbname, name, deleteData) + send_drop_table(dbname, name, deleteData) + recv_drop_table() + end + + def send_drop_table(dbname, name, deleteData) + send_message('drop_table', Drop_table_args, :dbname => dbname, :name => name, :deleteData => deleteData) + end + + def recv_drop_table() + result = receive_message(Drop_table_result) + raise result.o1 unless result.o1.nil? + raise result.o3 unless result.o3.nil? + return + end + + def drop_table_with_environment_context(dbname, name, deleteData, environment_context) + send_drop_table_with_environment_context(dbname, name, deleteData, environment_context) + recv_drop_table_with_environment_context() + end + + def send_drop_table_with_environment_context(dbname, name, deleteData, environment_context) + send_message('drop_table_with_environment_context', Drop_table_with_environment_context_args, :dbname => dbname, :name => name, :deleteData => deleteData, :environment_context => environment_context) + end + + def recv_drop_table_with_environment_context() + result = receive_message(Drop_table_with_environment_context_result) + raise result.o1 unless result.o1.nil? + raise result.o3 unless result.o3.nil? + return + end + + def truncate_table(dbName, tableName, partNames) + send_truncate_table(dbName, tableName, partNames) + recv_truncate_table() + end + + def send_truncate_table(dbName, tableName, partNames) + send_message('truncate_table', Truncate_table_args, :dbName => dbName, :tableName => tableName, :partNames => partNames) + end + + def recv_truncate_table() + result = receive_message(Truncate_table_result) + raise result.o1 unless result.o1.nil? + return + end + + def get_tables(db_name, pattern) + send_get_tables(db_name, pattern) + return recv_get_tables() + end + + def send_get_tables(db_name, pattern) + send_message('get_tables', Get_tables_args, :db_name => db_name, :pattern => pattern) + end + + def recv_get_tables() + result = receive_message(Get_tables_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_tables failed: unknown result') + end + + def get_tables_by_type(db_name, pattern, tableType) + send_get_tables_by_type(db_name, pattern, tableType) + return recv_get_tables_by_type() + end + + def send_get_tables_by_type(db_name, pattern, tableType) + send_message('get_tables_by_type', Get_tables_by_type_args, :db_name => db_name, :pattern => pattern, :tableType => tableType) + end + + def recv_get_tables_by_type() + result = receive_message(Get_tables_by_type_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_tables_by_type failed: unknown result') + end + + def get_table_meta(db_patterns, tbl_patterns, tbl_types) + send_get_table_meta(db_patterns, tbl_patterns, tbl_types) + return recv_get_table_meta() + end + + def send_get_table_meta(db_patterns, tbl_patterns, tbl_types) + send_message('get_table_meta', Get_table_meta_args, :db_patterns => db_patterns, :tbl_patterns => tbl_patterns, :tbl_types => tbl_types) + end + + def recv_get_table_meta() + result = receive_message(Get_table_meta_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_meta failed: unknown result') + end + + def get_all_tables(db_name) + send_get_all_tables(db_name) + return recv_get_all_tables() + end + + def send_get_all_tables(db_name) + send_message('get_all_tables', Get_all_tables_args, :db_name => db_name) + end + + def recv_get_all_tables() + result = receive_message(Get_all_tables_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_tables failed: unknown result') + end + + def get_table(dbname, tbl_name) + send_get_table(dbname, tbl_name) + return recv_get_table() + end + + def send_get_table(dbname, tbl_name) + send_message('get_table', Get_table_args, :dbname => dbname, :tbl_name => tbl_name) + end + + def recv_get_table() + result = receive_message(Get_table_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table failed: unknown result') + end + + def get_table_objects_by_name(dbname, tbl_names) + send_get_table_objects_by_name(dbname, tbl_names) + return recv_get_table_objects_by_name() + end + + def send_get_table_objects_by_name(dbname, tbl_names) + send_message('get_table_objects_by_name', Get_table_objects_by_name_args, :dbname => dbname, :tbl_names => tbl_names) + end + + def recv_get_table_objects_by_name() + result = receive_message(Get_table_objects_by_name_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_objects_by_name failed: unknown result') + end + + def get_table_req(req) + send_get_table_req(req) + return recv_get_table_req() + end + + def send_get_table_req(req) + send_message('get_table_req', Get_table_req_args, :req => req) + end + + def recv_get_table_req() + result = receive_message(Get_table_req_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_req failed: unknown result') + end + + def get_table_objects_by_name_req(req) + send_get_table_objects_by_name_req(req) + return recv_get_table_objects_by_name_req() + end + + def send_get_table_objects_by_name_req(req) + send_message('get_table_objects_by_name_req', Get_table_objects_by_name_req_args, :req => req) + end + + def recv_get_table_objects_by_name_req() + result = receive_message(Get_table_objects_by_name_req_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_objects_by_name_req failed: unknown result') + end + + def get_table_names_by_filter(dbname, filter, max_tables) + send_get_table_names_by_filter(dbname, filter, max_tables) + return recv_get_table_names_by_filter() + end + + def send_get_table_names_by_filter(dbname, filter, max_tables) + send_message('get_table_names_by_filter', Get_table_names_by_filter_args, :dbname => dbname, :filter => filter, :max_tables => max_tables) + end + + def recv_get_table_names_by_filter() + result = receive_message(Get_table_names_by_filter_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_names_by_filter failed: unknown result') + end + + def alter_table(dbname, tbl_name, new_tbl) + send_alter_table(dbname, tbl_name, new_tbl) + recv_alter_table() + end + + def send_alter_table(dbname, tbl_name, new_tbl) + send_message('alter_table', Alter_table_args, :dbname => dbname, :tbl_name => tbl_name, :new_tbl => new_tbl) + end + + def recv_alter_table() + result = receive_message(Alter_table_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context) + send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context) + recv_alter_table_with_environment_context() + end + + def send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context) + send_message('alter_table_with_environment_context', Alter_table_with_environment_context_args, :dbname => dbname, :tbl_name => tbl_name, :new_tbl => new_tbl, :environment_context => environment_context) + end + + def recv_alter_table_with_environment_context() + result = receive_message(Alter_table_with_environment_context_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade) + send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade) + recv_alter_table_with_cascade() + end + + def send_alter_table_with_cascade(dbname, tbl_name, new_tbl, cascade) + send_message('alter_table_with_cascade', Alter_table_with_cascade_args, :dbname => dbname, :tbl_name => tbl_name, :new_tbl => new_tbl, :cascade => cascade) + end + + def recv_alter_table_with_cascade() + result = receive_message(Alter_table_with_cascade_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def add_partition(new_part) + send_add_partition(new_part) + return recv_add_partition() + end + + def send_add_partition(new_part) + send_message('add_partition', Add_partition_args, :new_part => new_part) + end + + def recv_add_partition() + result = receive_message(Add_partition_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partition failed: unknown result') + end + + def add_partition_with_environment_context(new_part, environment_context) + send_add_partition_with_environment_context(new_part, environment_context) + return recv_add_partition_with_environment_context() + end + + def send_add_partition_with_environment_context(new_part, environment_context) + send_message('add_partition_with_environment_context', Add_partition_with_environment_context_args, :new_part => new_part, :environment_context => environment_context) + end + + def recv_add_partition_with_environment_context() + result = receive_message(Add_partition_with_environment_context_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partition_with_environment_context failed: unknown result') + end + + def add_partitions(new_parts) + send_add_partitions(new_parts) + return recv_add_partitions() + end + + def send_add_partitions(new_parts) + send_message('add_partitions', Add_partitions_args, :new_parts => new_parts) + end + + def recv_add_partitions() + result = receive_message(Add_partitions_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partitions failed: unknown result') + end + + def add_partitions_pspec(new_parts) + send_add_partitions_pspec(new_parts) + return recv_add_partitions_pspec() + end + + def send_add_partitions_pspec(new_parts) + send_message('add_partitions_pspec', Add_partitions_pspec_args, :new_parts => new_parts) + end + + def recv_add_partitions_pspec() + result = receive_message(Add_partitions_pspec_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partitions_pspec failed: unknown result') + end + + def append_partition(db_name, tbl_name, part_vals) + send_append_partition(db_name, tbl_name, part_vals) + return recv_append_partition() + end + + def send_append_partition(db_name, tbl_name, part_vals) + send_message('append_partition', Append_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals) + end + + def recv_append_partition() + result = receive_message(Append_partition_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition failed: unknown result') + end + + def add_partitions_req(request) + send_add_partitions_req(request) + return recv_add_partitions_req() + end + + def send_add_partitions_req(request) + send_message('add_partitions_req', Add_partitions_req_args, :request => request) + end + + def recv_add_partitions_req() + result = receive_message(Add_partitions_req_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partitions_req failed: unknown result') + end + + def append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context) + send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context) + return recv_append_partition_with_environment_context() + end + + def send_append_partition_with_environment_context(db_name, tbl_name, part_vals, environment_context) + send_message('append_partition_with_environment_context', Append_partition_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :environment_context => environment_context) + end + + def recv_append_partition_with_environment_context() + result = receive_message(Append_partition_with_environment_context_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition_with_environment_context failed: unknown result') + end + + def append_partition_by_name(db_name, tbl_name, part_name) + send_append_partition_by_name(db_name, tbl_name, part_name) + return recv_append_partition_by_name() + end + + def send_append_partition_by_name(db_name, tbl_name, part_name) + send_message('append_partition_by_name', Append_partition_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name) + end + + def recv_append_partition_by_name() + result = receive_message(Append_partition_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition_by_name failed: unknown result') + end + + def append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context) + send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context) + return recv_append_partition_by_name_with_environment_context() + end + + def send_append_partition_by_name_with_environment_context(db_name, tbl_name, part_name, environment_context) + send_message('append_partition_by_name_with_environment_context', Append_partition_by_name_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :environment_context => environment_context) + end + + def recv_append_partition_by_name_with_environment_context() + result = receive_message(Append_partition_by_name_with_environment_context_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition_by_name_with_environment_context failed: unknown result') + end + + def drop_partition(db_name, tbl_name, part_vals, deleteData) + send_drop_partition(db_name, tbl_name, part_vals, deleteData) + return recv_drop_partition() + end + + def send_drop_partition(db_name, tbl_name, part_vals, deleteData) + send_message('drop_partition', Drop_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :deleteData => deleteData) + end + + def recv_drop_partition() + result = receive_message(Drop_partition_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition failed: unknown result') + end + + def drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context) + send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context) + return recv_drop_partition_with_environment_context() + end + + def send_drop_partition_with_environment_context(db_name, tbl_name, part_vals, deleteData, environment_context) + send_message('drop_partition_with_environment_context', Drop_partition_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :deleteData => deleteData, :environment_context => environment_context) + end + + def recv_drop_partition_with_environment_context() + result = receive_message(Drop_partition_with_environment_context_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition_with_environment_context failed: unknown result') + end + + def drop_partition_by_name(db_name, tbl_name, part_name, deleteData) + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) + return recv_drop_partition_by_name() + end + + def send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) + send_message('drop_partition_by_name', Drop_partition_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :deleteData => deleteData) + end + + def recv_drop_partition_by_name() + result = receive_message(Drop_partition_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition_by_name failed: unknown result') + end + + def drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context) + send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context) + return recv_drop_partition_by_name_with_environment_context() + end + + def send_drop_partition_by_name_with_environment_context(db_name, tbl_name, part_name, deleteData, environment_context) + send_message('drop_partition_by_name_with_environment_context', Drop_partition_by_name_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :deleteData => deleteData, :environment_context => environment_context) + end + + def recv_drop_partition_by_name_with_environment_context() + result = receive_message(Drop_partition_by_name_with_environment_context_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition_by_name_with_environment_context failed: unknown result') + end + + def drop_partitions_req(req) + send_drop_partitions_req(req) + return recv_drop_partitions_req() + end + + def send_drop_partitions_req(req) + send_message('drop_partitions_req', Drop_partitions_req_args, :req => req) + end + + def recv_drop_partitions_req() + result = receive_message(Drop_partitions_req_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partitions_req failed: unknown result') + end + + def get_partition(db_name, tbl_name, part_vals) + send_get_partition(db_name, tbl_name, part_vals) + return recv_get_partition() + end + + def send_get_partition(db_name, tbl_name, part_vals) + send_message('get_partition', Get_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals) + end + + def recv_get_partition() + result = receive_message(Get_partition_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition failed: unknown result') + end + + def exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) + send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) + return recv_exchange_partition() + end + + def send_exchange_partition(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) + send_message('exchange_partition', Exchange_partition_args, :partitionSpecs => partitionSpecs, :source_db => source_db, :source_table_name => source_table_name, :dest_db => dest_db, :dest_table_name => dest_table_name) + end + + def recv_exchange_partition() + result = receive_message(Exchange_partition_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'exchange_partition failed: unknown result') + end + + def exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) + send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) + return recv_exchange_partitions() + end + + def send_exchange_partitions(partitionSpecs, source_db, source_table_name, dest_db, dest_table_name) + send_message('exchange_partitions', Exchange_partitions_args, :partitionSpecs => partitionSpecs, :source_db => source_db, :source_table_name => source_table_name, :dest_db => dest_db, :dest_table_name => dest_table_name) + end + + def recv_exchange_partitions() + result = receive_message(Exchange_partitions_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'exchange_partitions failed: unknown result') + end + + def get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) + send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) + return recv_get_partition_with_auth() + end + + def send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) + send_message('get_partition_with_auth', Get_partition_with_auth_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :user_name => user_name, :group_names => group_names) + end + + def recv_get_partition_with_auth() + result = receive_message(Get_partition_with_auth_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_with_auth failed: unknown result') + end + + def get_partition_by_name(db_name, tbl_name, part_name) + send_get_partition_by_name(db_name, tbl_name, part_name) + return recv_get_partition_by_name() + end + + def send_get_partition_by_name(db_name, tbl_name, part_name) + send_message('get_partition_by_name', Get_partition_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name) + end + + def recv_get_partition_by_name() + result = receive_message(Get_partition_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_by_name failed: unknown result') + end + + def get_partitions(db_name, tbl_name, max_parts) + send_get_partitions(db_name, tbl_name, max_parts) + return recv_get_partitions() + end + + def send_get_partitions(db_name, tbl_name, max_parts) + send_message('get_partitions', Get_partitions_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts) + end + + def recv_get_partitions() + result = receive_message(Get_partitions_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions failed: unknown result') + end + + def get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) + send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) + return recv_get_partitions_with_auth() + end + + def send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) + send_message('get_partitions_with_auth', Get_partitions_with_auth_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts, :user_name => user_name, :group_names => group_names) + end + + def recv_get_partitions_with_auth() + result = receive_message(Get_partitions_with_auth_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_with_auth failed: unknown result') + end + + def get_partitions_pspec(db_name, tbl_name, max_parts) + send_get_partitions_pspec(db_name, tbl_name, max_parts) + return recv_get_partitions_pspec() + end + + def send_get_partitions_pspec(db_name, tbl_name, max_parts) + send_message('get_partitions_pspec', Get_partitions_pspec_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts) + end + + def recv_get_partitions_pspec() + result = receive_message(Get_partitions_pspec_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_pspec failed: unknown result') + end + + def get_partition_names(db_name, tbl_name, max_parts) + send_get_partition_names(db_name, tbl_name, max_parts) + return recv_get_partition_names() + end + + def send_get_partition_names(db_name, tbl_name, max_parts) + send_message('get_partition_names', Get_partition_names_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts) + end + + def recv_get_partition_names() + result = receive_message(Get_partition_names_result) + return result.success unless result.success.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_names failed: unknown result') + end + + def get_partitions_ps(db_name, tbl_name, part_vals, max_parts) + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) + return recv_get_partitions_ps() + end + + def send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) + send_message('get_partitions_ps', Get_partitions_ps_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :max_parts => max_parts) + end + + def recv_get_partitions_ps() + result = receive_message(Get_partitions_ps_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_ps failed: unknown result') + end + + def get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) + send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) + return recv_get_partitions_ps_with_auth() + end + + def send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) + send_message('get_partitions_ps_with_auth', Get_partitions_ps_with_auth_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :max_parts => max_parts, :user_name => user_name, :group_names => group_names) + end + + def recv_get_partitions_ps_with_auth() + result = receive_message(Get_partitions_ps_with_auth_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_ps_with_auth failed: unknown result') + end + + def get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) + return recv_get_partition_names_ps() + end + + def send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) + send_message('get_partition_names_ps', Get_partition_names_ps_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :max_parts => max_parts) + end + + def recv_get_partition_names_ps() + result = receive_message(Get_partition_names_ps_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_names_ps failed: unknown result') + end + + def get_partitions_by_filter(db_name, tbl_name, filter, max_parts) + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) + return recv_get_partitions_by_filter() + end + + def send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) + send_message('get_partitions_by_filter', Get_partitions_by_filter_args, :db_name => db_name, :tbl_name => tbl_name, :filter => filter, :max_parts => max_parts) + end + + def recv_get_partitions_by_filter() + result = receive_message(Get_partitions_by_filter_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_by_filter failed: unknown result') + end + + def get_part_specs_by_filter(db_name, tbl_name, filter, max_parts) + send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts) + return recv_get_part_specs_by_filter() + end + + def send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts) + send_message('get_part_specs_by_filter', Get_part_specs_by_filter_args, :db_name => db_name, :tbl_name => tbl_name, :filter => filter, :max_parts => max_parts) + end + + def recv_get_part_specs_by_filter() + result = receive_message(Get_part_specs_by_filter_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_part_specs_by_filter failed: unknown result') + end + + def get_partitions_by_expr(req) + send_get_partitions_by_expr(req) + return recv_get_partitions_by_expr() + end + + def send_get_partitions_by_expr(req) + send_message('get_partitions_by_expr', Get_partitions_by_expr_args, :req => req) + end + + def recv_get_partitions_by_expr() + result = receive_message(Get_partitions_by_expr_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_by_expr failed: unknown result') + end + + def get_num_partitions_by_filter(db_name, tbl_name, filter) + send_get_num_partitions_by_filter(db_name, tbl_name, filter) + return recv_get_num_partitions_by_filter() + end + + def send_get_num_partitions_by_filter(db_name, tbl_name, filter) + send_message('get_num_partitions_by_filter', Get_num_partitions_by_filter_args, :db_name => db_name, :tbl_name => tbl_name, :filter => filter) + end + + def recv_get_num_partitions_by_filter() + result = receive_message(Get_num_partitions_by_filter_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_num_partitions_by_filter failed: unknown result') + end + + def get_partitions_by_names(db_name, tbl_name, names) + send_get_partitions_by_names(db_name, tbl_name, names) + return recv_get_partitions_by_names() + end + + def send_get_partitions_by_names(db_name, tbl_name, names) + send_message('get_partitions_by_names', Get_partitions_by_names_args, :db_name => db_name, :tbl_name => tbl_name, :names => names) + end + + def recv_get_partitions_by_names() + result = receive_message(Get_partitions_by_names_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_by_names failed: unknown result') + end + + def alter_partition(db_name, tbl_name, new_part) + send_alter_partition(db_name, tbl_name, new_part) + recv_alter_partition() + end + + def send_alter_partition(db_name, tbl_name, new_part) + send_message('alter_partition', Alter_partition_args, :db_name => db_name, :tbl_name => tbl_name, :new_part => new_part) + end + + def recv_alter_partition() + result = receive_message(Alter_partition_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def alter_partitions(db_name, tbl_name, new_parts) + send_alter_partitions(db_name, tbl_name, new_parts) + recv_alter_partitions() + end + + def send_alter_partitions(db_name, tbl_name, new_parts) + send_message('alter_partitions', Alter_partitions_args, :db_name => db_name, :tbl_name => tbl_name, :new_parts => new_parts) + end + + def recv_alter_partitions() + result = receive_message(Alter_partitions_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context) + send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context) + recv_alter_partitions_with_environment_context() + end + + def send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context) + send_message('alter_partitions_with_environment_context', Alter_partitions_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :new_parts => new_parts, :environment_context => environment_context) + end + + def recv_alter_partitions_with_environment_context() + result = receive_message(Alter_partitions_with_environment_context_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context) + send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context) + recv_alter_partition_with_environment_context() + end + + def send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context) + send_message('alter_partition_with_environment_context', Alter_partition_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :new_part => new_part, :environment_context => environment_context) + end + + def recv_alter_partition_with_environment_context() + result = receive_message(Alter_partition_with_environment_context_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def rename_partition(db_name, tbl_name, part_vals, new_part) + send_rename_partition(db_name, tbl_name, part_vals, new_part) + recv_rename_partition() + end + + def send_rename_partition(db_name, tbl_name, part_vals, new_part) + send_message('rename_partition', Rename_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :new_part => new_part) + end + + def recv_rename_partition() + result = receive_message(Rename_partition_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def partition_name_has_valid_characters(part_vals, throw_exception) + send_partition_name_has_valid_characters(part_vals, throw_exception) + return recv_partition_name_has_valid_characters() + end + + def send_partition_name_has_valid_characters(part_vals, throw_exception) + send_message('partition_name_has_valid_characters', Partition_name_has_valid_characters_args, :part_vals => part_vals, :throw_exception => throw_exception) + end + + def recv_partition_name_has_valid_characters() + result = receive_message(Partition_name_has_valid_characters_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'partition_name_has_valid_characters failed: unknown result') + end + + def get_config_value(name, defaultValue) + send_get_config_value(name, defaultValue) + return recv_get_config_value() + end + + def send_get_config_value(name, defaultValue) + send_message('get_config_value', Get_config_value_args, :name => name, :defaultValue => defaultValue) + end + + def recv_get_config_value() + result = receive_message(Get_config_value_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_config_value failed: unknown result') + end + + def partition_name_to_vals(part_name) + send_partition_name_to_vals(part_name) + return recv_partition_name_to_vals() + end + + def send_partition_name_to_vals(part_name) + send_message('partition_name_to_vals', Partition_name_to_vals_args, :part_name => part_name) + end + + def recv_partition_name_to_vals() + result = receive_message(Partition_name_to_vals_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'partition_name_to_vals failed: unknown result') + end + + def partition_name_to_spec(part_name) + send_partition_name_to_spec(part_name) + return recv_partition_name_to_spec() + end + + def send_partition_name_to_spec(part_name) + send_message('partition_name_to_spec', Partition_name_to_spec_args, :part_name => part_name) + end + + def recv_partition_name_to_spec() + result = receive_message(Partition_name_to_spec_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'partition_name_to_spec failed: unknown result') + end + + def markPartitionForEvent(db_name, tbl_name, part_vals, eventType) + send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType) + recv_markPartitionForEvent() + end + + def send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType) + send_message('markPartitionForEvent', MarkPartitionForEvent_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :eventType => eventType) + end + + def recv_markPartitionForEvent() + result = receive_message(MarkPartitionForEvent_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise result.o5 unless result.o5.nil? + raise result.o6 unless result.o6.nil? + return + end + + def isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType) + send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType) + return recv_isPartitionMarkedForEvent() + end + + def send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType) + send_message('isPartitionMarkedForEvent', IsPartitionMarkedForEvent_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :eventType => eventType) + end + + def recv_isPartitionMarkedForEvent() + result = receive_message(IsPartitionMarkedForEvent_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise result.o5 unless result.o5.nil? + raise result.o6 unless result.o6.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'isPartitionMarkedForEvent failed: unknown result') + end + + def add_index(new_index, index_table) + send_add_index(new_index, index_table) + return recv_add_index() + end + + def send_add_index(new_index, index_table) + send_message('add_index', Add_index_args, :new_index => new_index, :index_table => index_table) + end + + def recv_add_index() + result = receive_message(Add_index_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_index failed: unknown result') + end + + def alter_index(dbname, base_tbl_name, idx_name, new_idx) + send_alter_index(dbname, base_tbl_name, idx_name, new_idx) + recv_alter_index() + end + + def send_alter_index(dbname, base_tbl_name, idx_name, new_idx) + send_message('alter_index', Alter_index_args, :dbname => dbname, :base_tbl_name => base_tbl_name, :idx_name => idx_name, :new_idx => new_idx) + end + + def recv_alter_index() + result = receive_message(Alter_index_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def drop_index_by_name(db_name, tbl_name, index_name, deleteData) + send_drop_index_by_name(db_name, tbl_name, index_name, deleteData) + return recv_drop_index_by_name() + end + + def send_drop_index_by_name(db_name, tbl_name, index_name, deleteData) + send_message('drop_index_by_name', Drop_index_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :index_name => index_name, :deleteData => deleteData) + end + + def recv_drop_index_by_name() + result = receive_message(Drop_index_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_index_by_name failed: unknown result') + end + + def get_index_by_name(db_name, tbl_name, index_name) + send_get_index_by_name(db_name, tbl_name, index_name) + return recv_get_index_by_name() + end + + def send_get_index_by_name(db_name, tbl_name, index_name) + send_message('get_index_by_name', Get_index_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :index_name => index_name) + end + + def recv_get_index_by_name() + result = receive_message(Get_index_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_by_name failed: unknown result') + end + + def get_indexes(db_name, tbl_name, max_indexes) + send_get_indexes(db_name, tbl_name, max_indexes) + return recv_get_indexes() + end + + def send_get_indexes(db_name, tbl_name, max_indexes) + send_message('get_indexes', Get_indexes_args, :db_name => db_name, :tbl_name => tbl_name, :max_indexes => max_indexes) + end + + def recv_get_indexes() + result = receive_message(Get_indexes_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_indexes failed: unknown result') + end + + def get_index_names(db_name, tbl_name, max_indexes) + send_get_index_names(db_name, tbl_name, max_indexes) + return recv_get_index_names() + end + + def send_get_index_names(db_name, tbl_name, max_indexes) + send_message('get_index_names', Get_index_names_args, :db_name => db_name, :tbl_name => tbl_name, :max_indexes => max_indexes) + end + + def recv_get_index_names() + result = receive_message(Get_index_names_result) + return result.success unless result.success.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_names failed: unknown result') + end + + def get_primary_keys(request) + send_get_primary_keys(request) + return recv_get_primary_keys() + end + + def send_get_primary_keys(request) + send_message('get_primary_keys', Get_primary_keys_args, :request => request) + end + + def recv_get_primary_keys() + result = receive_message(Get_primary_keys_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_primary_keys failed: unknown result') + end + + def get_foreign_keys(request) + send_get_foreign_keys(request) + return recv_get_foreign_keys() + end + + def send_get_foreign_keys(request) + send_message('get_foreign_keys', Get_foreign_keys_args, :request => request) + end + + def recv_get_foreign_keys() + result = receive_message(Get_foreign_keys_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_foreign_keys failed: unknown result') + end + + def get_unique_constraints(request) + send_get_unique_constraints(request) + return recv_get_unique_constraints() + end + + def send_get_unique_constraints(request) + send_message('get_unique_constraints', Get_unique_constraints_args, :request => request) + end + + def recv_get_unique_constraints() + result = receive_message(Get_unique_constraints_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_unique_constraints failed: unknown result') + end + + def get_not_null_constraints(request) + send_get_not_null_constraints(request) + return recv_get_not_null_constraints() + end + + def send_get_not_null_constraints(request) + send_message('get_not_null_constraints', Get_not_null_constraints_args, :request => request) + end + + def recv_get_not_null_constraints() + result = receive_message(Get_not_null_constraints_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_not_null_constraints failed: unknown result') + end + + def update_table_column_statistics(stats_obj) + send_update_table_column_statistics(stats_obj) + return recv_update_table_column_statistics() + end + + def send_update_table_column_statistics(stats_obj) + send_message('update_table_column_statistics', Update_table_column_statistics_args, :stats_obj => stats_obj) + end + + def recv_update_table_column_statistics() + result = receive_message(Update_table_column_statistics_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'update_table_column_statistics failed: unknown result') + end + + def update_partition_column_statistics(stats_obj) + send_update_partition_column_statistics(stats_obj) + return recv_update_partition_column_statistics() + end + + def send_update_partition_column_statistics(stats_obj) + send_message('update_partition_column_statistics', Update_partition_column_statistics_args, :stats_obj => stats_obj) + end + + def recv_update_partition_column_statistics() + result = receive_message(Update_partition_column_statistics_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'update_partition_column_statistics failed: unknown result') + end + + def get_table_column_statistics(db_name, tbl_name, col_name) + send_get_table_column_statistics(db_name, tbl_name, col_name) + return recv_get_table_column_statistics() + end + + def send_get_table_column_statistics(db_name, tbl_name, col_name) + send_message('get_table_column_statistics', Get_table_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :col_name => col_name) + end + + def recv_get_table_column_statistics() + result = receive_message(Get_table_column_statistics_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_column_statistics failed: unknown result') + end + + def get_partition_column_statistics(db_name, tbl_name, part_name, col_name) + send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name) + return recv_get_partition_column_statistics() + end + + def send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name) + send_message('get_partition_column_statistics', Get_partition_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :col_name => col_name) + end + + def recv_get_partition_column_statistics() + result = receive_message(Get_partition_column_statistics_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_column_statistics failed: unknown result') + end + + def get_table_statistics_req(request) + send_get_table_statistics_req(request) + return recv_get_table_statistics_req() + end + + def send_get_table_statistics_req(request) + send_message('get_table_statistics_req', Get_table_statistics_req_args, :request => request) + end + + def recv_get_table_statistics_req() + result = receive_message(Get_table_statistics_req_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_statistics_req failed: unknown result') + end + + def get_partitions_statistics_req(request) + send_get_partitions_statistics_req(request) + return recv_get_partitions_statistics_req() + end + + def send_get_partitions_statistics_req(request) + send_message('get_partitions_statistics_req', Get_partitions_statistics_req_args, :request => request) + end + + def recv_get_partitions_statistics_req() + result = receive_message(Get_partitions_statistics_req_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_statistics_req failed: unknown result') + end + + def get_aggr_stats_for(request) + send_get_aggr_stats_for(request) + return recv_get_aggr_stats_for() + end + + def send_get_aggr_stats_for(request) + send_message('get_aggr_stats_for', Get_aggr_stats_for_args, :request => request) + end + + def recv_get_aggr_stats_for() + result = receive_message(Get_aggr_stats_for_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_aggr_stats_for failed: unknown result') + end + + def set_aggr_stats_for(request) + send_set_aggr_stats_for(request) + return recv_set_aggr_stats_for() + end + + def send_set_aggr_stats_for(request) + send_message('set_aggr_stats_for', Set_aggr_stats_for_args, :request => request) + end + + def recv_set_aggr_stats_for() + result = receive_message(Set_aggr_stats_for_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'set_aggr_stats_for failed: unknown result') + end + + def delete_partition_column_statistics(db_name, tbl_name, part_name, col_name) + send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name) + return recv_delete_partition_column_statistics() + end + + def send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name) + send_message('delete_partition_column_statistics', Delete_partition_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :col_name => col_name) + end + + def recv_delete_partition_column_statistics() + result = receive_message(Delete_partition_column_statistics_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'delete_partition_column_statistics failed: unknown result') + end + + def delete_table_column_statistics(db_name, tbl_name, col_name) + send_delete_table_column_statistics(db_name, tbl_name, col_name) + return recv_delete_table_column_statistics() + end + + def send_delete_table_column_statistics(db_name, tbl_name, col_name) + send_message('delete_table_column_statistics', Delete_table_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :col_name => col_name) + end + + def recv_delete_table_column_statistics() + result = receive_message(Delete_table_column_statistics_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'delete_table_column_statistics failed: unknown result') + end + + def create_function(func) + send_create_function(func) + recv_create_function() + end + + def send_create_function(func) + send_message('create_function', Create_function_args, :func => func) + end + + def recv_create_function() + result = receive_message(Create_function_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + return + end + + def drop_function(dbName, funcName) + send_drop_function(dbName, funcName) + recv_drop_function() + end + + def send_drop_function(dbName, funcName) + send_message('drop_function', Drop_function_args, :dbName => dbName, :funcName => funcName) + end + + def recv_drop_function() + result = receive_message(Drop_function_result) + raise result.o1 unless result.o1.nil? + raise result.o3 unless result.o3.nil? + return + end + + def alter_function(dbName, funcName, newFunc) + send_alter_function(dbName, funcName, newFunc) + recv_alter_function() + end + + def send_alter_function(dbName, funcName, newFunc) + send_message('alter_function', Alter_function_args, :dbName => dbName, :funcName => funcName, :newFunc => newFunc) + end + + def recv_alter_function() + result = receive_message(Alter_function_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def get_functions(dbName, pattern) + send_get_functions(dbName, pattern) + return recv_get_functions() + end + + def send_get_functions(dbName, pattern) + send_message('get_functions', Get_functions_args, :dbName => dbName, :pattern => pattern) + end + + def recv_get_functions() + result = receive_message(Get_functions_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_functions failed: unknown result') + end + + def get_function(dbName, funcName) + send_get_function(dbName, funcName) + return recv_get_function() + end + + def send_get_function(dbName, funcName) + send_message('get_function', Get_function_args, :dbName => dbName, :funcName => funcName) + end + + def recv_get_function() + result = receive_message(Get_function_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_function failed: unknown result') + end + + def get_all_functions() + send_get_all_functions() + return recv_get_all_functions() + end + + def send_get_all_functions() + send_message('get_all_functions', Get_all_functions_args) + end + + def recv_get_all_functions() + result = receive_message(Get_all_functions_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_functions failed: unknown result') + end + + def create_role(role) + send_create_role(role) + return recv_create_role() + end + + def send_create_role(role) + send_message('create_role', Create_role_args, :role => role) + end + + def recv_create_role() + result = receive_message(Create_role_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'create_role failed: unknown result') + end + + def drop_role(role_name) + send_drop_role(role_name) + return recv_drop_role() + end + + def send_drop_role(role_name) + send_message('drop_role', Drop_role_args, :role_name => role_name) + end + + def recv_drop_role() + result = receive_message(Drop_role_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_role failed: unknown result') + end + + def get_role_names() + send_get_role_names() + return recv_get_role_names() + end + + def send_get_role_names() + send_message('get_role_names', Get_role_names_args) + end + + def recv_get_role_names() + result = receive_message(Get_role_names_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_role_names failed: unknown result') + end + + def grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) + send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) + return recv_grant_role() + end + + def send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) + send_message('grant_role', Grant_role_args, :role_name => role_name, :principal_name => principal_name, :principal_type => principal_type, :grantor => grantor, :grantorType => grantorType, :grant_option => grant_option) + end + + def recv_grant_role() + result = receive_message(Grant_role_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'grant_role failed: unknown result') + end + + def revoke_role(role_name, principal_name, principal_type) + send_revoke_role(role_name, principal_name, principal_type) + return recv_revoke_role() + end + + def send_revoke_role(role_name, principal_name, principal_type) + send_message('revoke_role', Revoke_role_args, :role_name => role_name, :principal_name => principal_name, :principal_type => principal_type) + end + + def recv_revoke_role() + result = receive_message(Revoke_role_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'revoke_role failed: unknown result') + end + + def list_roles(principal_name, principal_type) + send_list_roles(principal_name, principal_type) + return recv_list_roles() + end + + def send_list_roles(principal_name, principal_type) + send_message('list_roles', List_roles_args, :principal_name => principal_name, :principal_type => principal_type) + end + + def recv_list_roles() + result = receive_message(List_roles_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_roles failed: unknown result') + end + + def grant_revoke_role(request) + send_grant_revoke_role(request) + return recv_grant_revoke_role() + end + + def send_grant_revoke_role(request) + send_message('grant_revoke_role', Grant_revoke_role_args, :request => request) + end + + def recv_grant_revoke_role() + result = receive_message(Grant_revoke_role_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'grant_revoke_role failed: unknown result') + end + + def get_principals_in_role(request) + send_get_principals_in_role(request) + return recv_get_principals_in_role() + end + + def send_get_principals_in_role(request) + send_message('get_principals_in_role', Get_principals_in_role_args, :request => request) + end + + def recv_get_principals_in_role() + result = receive_message(Get_principals_in_role_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_principals_in_role failed: unknown result') + end + + def get_role_grants_for_principal(request) + send_get_role_grants_for_principal(request) + return recv_get_role_grants_for_principal() + end + + def send_get_role_grants_for_principal(request) + send_message('get_role_grants_for_principal', Get_role_grants_for_principal_args, :request => request) + end + + def recv_get_role_grants_for_principal() + result = receive_message(Get_role_grants_for_principal_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_role_grants_for_principal failed: unknown result') + end + + def get_privilege_set(hiveObject, user_name, group_names) + send_get_privilege_set(hiveObject, user_name, group_names) + return recv_get_privilege_set() + end + + def send_get_privilege_set(hiveObject, user_name, group_names) + send_message('get_privilege_set', Get_privilege_set_args, :hiveObject => hiveObject, :user_name => user_name, :group_names => group_names) + end + + def recv_get_privilege_set() + result = receive_message(Get_privilege_set_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_privilege_set failed: unknown result') + end + + def list_privileges(principal_name, principal_type, hiveObject) + send_list_privileges(principal_name, principal_type, hiveObject) + return recv_list_privileges() + end + + def send_list_privileges(principal_name, principal_type, hiveObject) + send_message('list_privileges', List_privileges_args, :principal_name => principal_name, :principal_type => principal_type, :hiveObject => hiveObject) + end + + def recv_list_privileges() + result = receive_message(List_privileges_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_privileges failed: unknown result') + end + + def grant_privileges(privileges) + send_grant_privileges(privileges) + return recv_grant_privileges() + end + + def send_grant_privileges(privileges) + send_message('grant_privileges', Grant_privileges_args, :privileges => privileges) + end + + def recv_grant_privileges() + result = receive_message(Grant_privileges_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'grant_privileges failed: unknown result') + end + + def revoke_privileges(privileges) + send_revoke_privileges(privileges) + return recv_revoke_privileges() + end + + def send_revoke_privileges(privileges) + send_message('revoke_privileges', Revoke_privileges_args, :privileges => privileges) + end + + def recv_revoke_privileges() + result = receive_message(Revoke_privileges_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'revoke_privileges failed: unknown result') + end + + def grant_revoke_privileges(request) + send_grant_revoke_privileges(request) + return recv_grant_revoke_privileges() + end + + def send_grant_revoke_privileges(request) + send_message('grant_revoke_privileges', Grant_revoke_privileges_args, :request => request) + end + + def recv_grant_revoke_privileges() + result = receive_message(Grant_revoke_privileges_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'grant_revoke_privileges failed: unknown result') + end + + def set_ugi(user_name, group_names) + send_set_ugi(user_name, group_names) + return recv_set_ugi() + end + + def send_set_ugi(user_name, group_names) + send_message('set_ugi', Set_ugi_args, :user_name => user_name, :group_names => group_names) + end + + def recv_set_ugi() + result = receive_message(Set_ugi_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'set_ugi failed: unknown result') + end + + def get_delegation_token(token_owner, renewer_kerberos_principal_name) + send_get_delegation_token(token_owner, renewer_kerberos_principal_name) + return recv_get_delegation_token() + end + + def send_get_delegation_token(token_owner, renewer_kerberos_principal_name) + send_message('get_delegation_token', Get_delegation_token_args, :token_owner => token_owner, :renewer_kerberos_principal_name => renewer_kerberos_principal_name) + end + + def recv_get_delegation_token() + result = receive_message(Get_delegation_token_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_delegation_token failed: unknown result') + end + + def renew_delegation_token(token_str_form) + send_renew_delegation_token(token_str_form) + return recv_renew_delegation_token() + end + + def send_renew_delegation_token(token_str_form) + send_message('renew_delegation_token', Renew_delegation_token_args, :token_str_form => token_str_form) + end + + def recv_renew_delegation_token() + result = receive_message(Renew_delegation_token_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'renew_delegation_token failed: unknown result') + end + + def cancel_delegation_token(token_str_form) + send_cancel_delegation_token(token_str_form) + recv_cancel_delegation_token() + end + + def send_cancel_delegation_token(token_str_form) + send_message('cancel_delegation_token', Cancel_delegation_token_args, :token_str_form => token_str_form) + end + + def recv_cancel_delegation_token() + result = receive_message(Cancel_delegation_token_result) + raise result.o1 unless result.o1.nil? + return + end + + def add_token(token_identifier, delegation_token) + send_add_token(token_identifier, delegation_token) + return recv_add_token() + end + + def send_add_token(token_identifier, delegation_token) + send_message('add_token', Add_token_args, :token_identifier => token_identifier, :delegation_token => delegation_token) + end + + def recv_add_token() + result = receive_message(Add_token_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_token failed: unknown result') + end + + def remove_token(token_identifier) + send_remove_token(token_identifier) + return recv_remove_token() + end + + def send_remove_token(token_identifier) + send_message('remove_token', Remove_token_args, :token_identifier => token_identifier) + end + + def recv_remove_token() + result = receive_message(Remove_token_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'remove_token failed: unknown result') + end + + def get_token(token_identifier) + send_get_token(token_identifier) + return recv_get_token() + end + + def send_get_token(token_identifier) + send_message('get_token', Get_token_args, :token_identifier => token_identifier) + end + + def recv_get_token() + result = receive_message(Get_token_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_token failed: unknown result') + end + + def get_all_token_identifiers() + send_get_all_token_identifiers() + return recv_get_all_token_identifiers() + end + + def send_get_all_token_identifiers() + send_message('get_all_token_identifiers', Get_all_token_identifiers_args) + end + + def recv_get_all_token_identifiers() + result = receive_message(Get_all_token_identifiers_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_token_identifiers failed: unknown result') + end + + def add_master_key(key) + send_add_master_key(key) + return recv_add_master_key() + end + + def send_add_master_key(key) + send_message('add_master_key', Add_master_key_args, :key => key) + end + + def recv_add_master_key() + result = receive_message(Add_master_key_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_master_key failed: unknown result') + end + + def update_master_key(seq_number, key) + send_update_master_key(seq_number, key) + recv_update_master_key() + end + + def send_update_master_key(seq_number, key) + send_message('update_master_key', Update_master_key_args, :seq_number => seq_number, :key => key) + end + + def recv_update_master_key() + result = receive_message(Update_master_key_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def remove_master_key(key_seq) + send_remove_master_key(key_seq) + return recv_remove_master_key() + end + + def send_remove_master_key(key_seq) + send_message('remove_master_key', Remove_master_key_args, :key_seq => key_seq) + end + + def recv_remove_master_key() + result = receive_message(Remove_master_key_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'remove_master_key failed: unknown result') + end + + def get_master_keys() + send_get_master_keys() + return recv_get_master_keys() + end + + def send_get_master_keys() + send_message('get_master_keys', Get_master_keys_args) + end + + def recv_get_master_keys() + result = receive_message(Get_master_keys_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_master_keys failed: unknown result') + end + + def get_open_txns() + send_get_open_txns() + return recv_get_open_txns() + end + + def send_get_open_txns() + send_message('get_open_txns', Get_open_txns_args) + end + + def recv_get_open_txns() + result = receive_message(Get_open_txns_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_open_txns failed: unknown result') + end + + def get_open_txns_info() + send_get_open_txns_info() + return recv_get_open_txns_info() + end + + def send_get_open_txns_info() + send_message('get_open_txns_info', Get_open_txns_info_args) + end + + def recv_get_open_txns_info() + result = receive_message(Get_open_txns_info_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_open_txns_info failed: unknown result') + end + + def open_txns(rqst) + send_open_txns(rqst) + return recv_open_txns() + end + + def send_open_txns(rqst) + send_message('open_txns', Open_txns_args, :rqst => rqst) + end + + def recv_open_txns() + result = receive_message(Open_txns_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'open_txns failed: unknown result') + end + + def abort_txn(rqst) + send_abort_txn(rqst) + recv_abort_txn() + end + + def send_abort_txn(rqst) + send_message('abort_txn', Abort_txn_args, :rqst => rqst) + end + + def recv_abort_txn() + result = receive_message(Abort_txn_result) + raise result.o1 unless result.o1.nil? + return + end + + def abort_txns(rqst) + send_abort_txns(rqst) + recv_abort_txns() + end + + def send_abort_txns(rqst) + send_message('abort_txns', Abort_txns_args, :rqst => rqst) + end + + def recv_abort_txns() + result = receive_message(Abort_txns_result) + raise result.o1 unless result.o1.nil? + return + end + + def commit_txn(rqst) + send_commit_txn(rqst) + recv_commit_txn() + end + + def send_commit_txn(rqst) + send_message('commit_txn', Commit_txn_args, :rqst => rqst) + end + + def recv_commit_txn() + result = receive_message(Commit_txn_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def lock(rqst) + send_lock(rqst) + return recv_lock() + end + + def send_lock(rqst) + send_message('lock', Lock_args, :rqst => rqst) + end + + def recv_lock() + result = receive_message(Lock_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'lock failed: unknown result') + end + + def check_lock(rqst) + send_check_lock(rqst) + return recv_check_lock() + end + + def send_check_lock(rqst) + send_message('check_lock', Check_lock_args, :rqst => rqst) + end + + def recv_check_lock() + result = receive_message(Check_lock_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'check_lock failed: unknown result') + end + + def unlock(rqst) + send_unlock(rqst) + recv_unlock() + end + + def send_unlock(rqst) + send_message('unlock', Unlock_args, :rqst => rqst) + end + + def recv_unlock() + result = receive_message(Unlock_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def show_locks(rqst) + send_show_locks(rqst) + return recv_show_locks() + end + + def send_show_locks(rqst) + send_message('show_locks', Show_locks_args, :rqst => rqst) + end + + def recv_show_locks() + result = receive_message(Show_locks_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'show_locks failed: unknown result') + end + + def heartbeat(ids) + send_heartbeat(ids) + recv_heartbeat() + end + + def send_heartbeat(ids) + send_message('heartbeat', Heartbeat_args, :ids => ids) + end + + def recv_heartbeat() + result = receive_message(Heartbeat_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + return + end + + def heartbeat_txn_range(txns) + send_heartbeat_txn_range(txns) + return recv_heartbeat_txn_range() + end + + def send_heartbeat_txn_range(txns) + send_message('heartbeat_txn_range', Heartbeat_txn_range_args, :txns => txns) + end + + def recv_heartbeat_txn_range() + result = receive_message(Heartbeat_txn_range_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'heartbeat_txn_range failed: unknown result') + end + + def compact(rqst) + send_compact(rqst) + recv_compact() + end + + def send_compact(rqst) + send_message('compact', Compact_args, :rqst => rqst) + end + + def recv_compact() + result = receive_message(Compact_result) + return + end + + def compact2(rqst) + send_compact2(rqst) + return recv_compact2() + end + + def send_compact2(rqst) + send_message('compact2', Compact2_args, :rqst => rqst) + end + + def recv_compact2() + result = receive_message(Compact2_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'compact2 failed: unknown result') + end + + def show_compact(rqst) + send_show_compact(rqst) + return recv_show_compact() + end + + def send_show_compact(rqst) + send_message('show_compact', Show_compact_args, :rqst => rqst) + end + + def recv_show_compact() + result = receive_message(Show_compact_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'show_compact failed: unknown result') + end + + def add_dynamic_partitions(rqst) + send_add_dynamic_partitions(rqst) + recv_add_dynamic_partitions() + end + + def send_add_dynamic_partitions(rqst) + send_message('add_dynamic_partitions', Add_dynamic_partitions_args, :rqst => rqst) + end + + def recv_add_dynamic_partitions() + result = receive_message(Add_dynamic_partitions_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def get_next_notification(rqst) + send_get_next_notification(rqst) + return recv_get_next_notification() + end + + def send_get_next_notification(rqst) + send_message('get_next_notification', Get_next_notification_args, :rqst => rqst) + end + + def recv_get_next_notification() + result = receive_message(Get_next_notification_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_next_notification failed: unknown result') + end + + def get_current_notificationEventId() + send_get_current_notificationEventId() + return recv_get_current_notificationEventId() + end + + def send_get_current_notificationEventId() + send_message('get_current_notificationEventId', Get_current_notificationEventId_args) + end + + def recv_get_current_notificationEventId() + result = receive_message(Get_current_notificationEventId_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_current_notificationEventId failed: unknown result') + end + + def fire_listener_event(rqst) + send_fire_listener_event(rqst) + return recv_fire_listener_event() + end + + def send_fire_listener_event(rqst) + send_message('fire_listener_event', Fire_listener_event_args, :rqst => rqst) + end + + def recv_fire_listener_event() + result = receive_message(Fire_listener_event_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fire_listener_event failed: unknown result') + end + + def flushCache() + send_flushCache() + recv_flushCache() + end + + def send_flushCache() + send_message('flushCache', FlushCache_args) + end + + def recv_flushCache() + result = receive_message(FlushCache_result) + return + end + + def cm_recycle(request) + send_cm_recycle(request) + return recv_cm_recycle() + end + + def send_cm_recycle(request) + send_message('cm_recycle', Cm_recycle_args, :request => request) + end + + def recv_cm_recycle() + result = receive_message(Cm_recycle_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'cm_recycle failed: unknown result') + end + + def get_file_metadata_by_expr(req) + send_get_file_metadata_by_expr(req) + return recv_get_file_metadata_by_expr() + end + + def send_get_file_metadata_by_expr(req) + send_message('get_file_metadata_by_expr', Get_file_metadata_by_expr_args, :req => req) + end + + def recv_get_file_metadata_by_expr() + result = receive_message(Get_file_metadata_by_expr_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_file_metadata_by_expr failed: unknown result') + end + + def get_file_metadata(req) + send_get_file_metadata(req) + return recv_get_file_metadata() + end + + def send_get_file_metadata(req) + send_message('get_file_metadata', Get_file_metadata_args, :req => req) + end + + def recv_get_file_metadata() + result = receive_message(Get_file_metadata_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_file_metadata failed: unknown result') + end + + def put_file_metadata(req) + send_put_file_metadata(req) + return recv_put_file_metadata() + end + + def send_put_file_metadata(req) + send_message('put_file_metadata', Put_file_metadata_args, :req => req) + end + + def recv_put_file_metadata() + result = receive_message(Put_file_metadata_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'put_file_metadata failed: unknown result') + end + + def clear_file_metadata(req) + send_clear_file_metadata(req) + return recv_clear_file_metadata() + end + + def send_clear_file_metadata(req) + send_message('clear_file_metadata', Clear_file_metadata_args, :req => req) + end + + def recv_clear_file_metadata() + result = receive_message(Clear_file_metadata_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'clear_file_metadata failed: unknown result') + end + + def cache_file_metadata(req) + send_cache_file_metadata(req) + return recv_cache_file_metadata() + end + + def send_cache_file_metadata(req) + send_message('cache_file_metadata', Cache_file_metadata_args, :req => req) + end + + def recv_cache_file_metadata() + result = receive_message(Cache_file_metadata_result) + return result.success unless result.success.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'cache_file_metadata failed: unknown result') + end + + def get_metastore_db_uuid() + send_get_metastore_db_uuid() + return recv_get_metastore_db_uuid() + end + + def send_get_metastore_db_uuid() + send_message('get_metastore_db_uuid', Get_metastore_db_uuid_args) + end + + def recv_get_metastore_db_uuid() + result = receive_message(Get_metastore_db_uuid_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_metastore_db_uuid failed: unknown result') + end + + end + + class Processor < ::FacebookService::Processor + include ::Thrift::Processor + + def process_getMetaConf(seqid, iprot, oprot) + args = read_args(iprot, GetMetaConf_args) + result = GetMetaConf_result.new() + begin + result.success = @handler.getMetaConf(args.key) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'getMetaConf', seqid) + end + + def process_setMetaConf(seqid, iprot, oprot) + args = read_args(iprot, SetMetaConf_args) + result = SetMetaConf_result.new() + begin + @handler.setMetaConf(args.key, args.value) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'setMetaConf', seqid) + end + + def process_create_database(seqid, iprot, oprot) + args = read_args(iprot, Create_database_args) + result = Create_database_result.new() + begin + @handler.create_database(args.database) + rescue ::AlreadyExistsException => o1 + result.o1 = o1 + rescue ::InvalidObjectException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'create_database', seqid) + end + + def process_get_database(seqid, iprot, oprot) + args = read_args(iprot, Get_database_args) + result = Get_database_result.new() + begin + result.success = @handler.get_database(args.name) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_database', seqid) + end + + def process_drop_database(seqid, iprot, oprot) + args = read_args(iprot, Drop_database_args) + result = Drop_database_result.new() + begin + @handler.drop_database(args.name, args.deleteData, args.cascade) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::InvalidOperationException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'drop_database', seqid) + end + + def process_get_databases(seqid, iprot, oprot) + args = read_args(iprot, Get_databases_args) + result = Get_databases_result.new() + begin + result.success = @handler.get_databases(args.pattern) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_databases', seqid) + end + + def process_get_all_databases(seqid, iprot, oprot) + args = read_args(iprot, Get_all_databases_args) + result = Get_all_databases_result.new() + begin + result.success = @handler.get_all_databases() + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_all_databases', seqid) + end + + def process_alter_database(seqid, iprot, oprot) + args = read_args(iprot, Alter_database_args) + result = Alter_database_result.new() + begin + @handler.alter_database(args.dbname, args.db) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_database', seqid) + end + + def process_get_type(seqid, iprot, oprot) + args = read_args(iprot, Get_type_args) + result = Get_type_result.new() + begin + result.success = @handler.get_type(args.name) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_type', seqid) + end + + def process_create_type(seqid, iprot, oprot) + args = read_args(iprot, Create_type_args) + result = Create_type_result.new() + begin + result.success = @handler.create_type(args.type) + rescue ::AlreadyExistsException => o1 + result.o1 = o1 + rescue ::InvalidObjectException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'create_type', seqid) + end + + def process_drop_type(seqid, iprot, oprot) + args = read_args(iprot, Drop_type_args) + result = Drop_type_result.new() + begin + result.success = @handler.drop_type(args.type) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_type', seqid) + end + + def process_get_type_all(seqid, iprot, oprot) + args = read_args(iprot, Get_type_all_args) + result = Get_type_all_result.new() + begin + result.success = @handler.get_type_all(args.name) + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_type_all', seqid) + end + + def process_get_fields(seqid, iprot, oprot) + args = read_args(iprot, Get_fields_args) + result = Get_fields_result.new() + begin + result.success = @handler.get_fields(args.db_name, args.table_name) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::UnknownTableException => o2 + result.o2 = o2 + rescue ::UnknownDBException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'get_fields', seqid) + end + + def process_get_fields_with_environment_context(seqid, iprot, oprot) + args = read_args(iprot, Get_fields_with_environment_context_args) + result = Get_fields_with_environment_context_result.new() + begin + result.success = @handler.get_fields_with_environment_context(args.db_name, args.table_name, args.environment_context) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::UnknownTableException => o2 + result.o2 = o2 + rescue ::UnknownDBException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'get_fields_with_environment_context', seqid) + end + + def process_get_schema(seqid, iprot, oprot) + args = read_args(iprot, Get_schema_args) + result = Get_schema_result.new() + begin + result.success = @handler.get_schema(args.db_name, args.table_name) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::UnknownTableException => o2 + result.o2 = o2 + rescue ::UnknownDBException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'get_schema', seqid) + end + + def process_get_schema_with_environment_context(seqid, iprot, oprot) + args = read_args(iprot, Get_schema_with_environment_context_args) + result = Get_schema_with_environment_context_result.new() + begin + result.success = @handler.get_schema_with_environment_context(args.db_name, args.table_name, args.environment_context) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::UnknownTableException => o2 + result.o2 = o2 + rescue ::UnknownDBException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'get_schema_with_environment_context', seqid) + end + + def process_create_table(seqid, iprot, oprot) + args = read_args(iprot, Create_table_args) + result = Create_table_result.new() + begin + @handler.create_table(args.tbl) + rescue ::AlreadyExistsException => o1 + result.o1 = o1 + rescue ::InvalidObjectException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + rescue ::NoSuchObjectException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'create_table', seqid) + end + + def process_create_table_with_environment_context(seqid, iprot, oprot) + args = read_args(iprot, Create_table_with_environment_context_args) + result = Create_table_with_environment_context_result.new() + begin + @handler.create_table_with_environment_context(args.tbl, args.environment_context) + rescue ::AlreadyExistsException => o1 + result.o1 = o1 + rescue ::InvalidObjectException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + rescue ::NoSuchObjectException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'create_table_with_environment_context', seqid) + end + + def process_create_table_with_constraints(seqid, iprot, oprot) + args = read_args(iprot, Create_table_with_constraints_args) + result = Create_table_with_constraints_result.new() + begin + @handler.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys, args.uniqueConstraints, args.notNullConstraints) + rescue ::AlreadyExistsException => o1 + result.o1 = o1 + rescue ::InvalidObjectException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + rescue ::NoSuchObjectException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'create_table_with_constraints', seqid) + end + + def process_drop_constraint(seqid, iprot, oprot) + args = read_args(iprot, Drop_constraint_args) + result = Drop_constraint_result.new() + begin + @handler.drop_constraint(args.req) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'drop_constraint', seqid) + end + + def process_add_primary_key(seqid, iprot, oprot) + args = read_args(iprot, Add_primary_key_args) + result = Add_primary_key_result.new() + begin + @handler.add_primary_key(args.req) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'add_primary_key', seqid) + end + + def process_add_foreign_key(seqid, iprot, oprot) + args = read_args(iprot, Add_foreign_key_args) + result = Add_foreign_key_result.new() + begin + @handler.add_foreign_key(args.req) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'add_foreign_key', seqid) + end + + def process_add_unique_constraint(seqid, iprot, oprot) + args = read_args(iprot, Add_unique_constraint_args) + result = Add_unique_constraint_result.new() + begin + @handler.add_unique_constraint(args.req) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'add_unique_constraint', seqid) + end + + def process_add_not_null_constraint(seqid, iprot, oprot) + args = read_args(iprot, Add_not_null_constraint_args) + result = Add_not_null_constraint_result.new() + begin + @handler.add_not_null_constraint(args.req) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'add_not_null_constraint', seqid) + end + + def process_drop_table(seqid, iprot, oprot) + args = read_args(iprot, Drop_table_args) + result = Drop_table_result.new() + begin + @handler.drop_table(args.dbname, args.name, args.deleteData) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'drop_table', seqid) + end + + def process_drop_table_with_environment_context(seqid, iprot, oprot) + args = read_args(iprot, Drop_table_with_environment_context_args) + result = Drop_table_with_environment_context_result.new() + begin + @handler.drop_table_with_environment_context(args.dbname, args.name, args.deleteData, args.environment_context) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'drop_table_with_environment_context', seqid) + end + + def process_truncate_table(seqid, iprot, oprot) + args = read_args(iprot, Truncate_table_args) + result = Truncate_table_result.new() + begin + @handler.truncate_table(args.dbName, args.tableName, args.partNames) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'truncate_table', seqid) + end + + def process_get_tables(seqid, iprot, oprot) + args = read_args(iprot, Get_tables_args) + result = Get_tables_result.new() + begin + result.success = @handler.get_tables(args.db_name, args.pattern) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_tables', seqid) + end + + def process_get_tables_by_type(seqid, iprot, oprot) + args = read_args(iprot, Get_tables_by_type_args) + result = Get_tables_by_type_result.new() + begin + result.success = @handler.get_tables_by_type(args.db_name, args.pattern, args.tableType) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_tables_by_type', seqid) + end + + def process_get_table_meta(seqid, iprot, oprot) + args = read_args(iprot, Get_table_meta_args) + result = Get_table_meta_result.new() + begin + result.success = @handler.get_table_meta(args.db_patterns, args.tbl_patterns, args.tbl_types) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_table_meta', seqid) + end + + def process_get_all_tables(seqid, iprot, oprot) + args = read_args(iprot, Get_all_tables_args) + result = Get_all_tables_result.new() + begin + result.success = @handler.get_all_tables(args.db_name) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_all_tables', seqid) + end + + def process_get_table(seqid, iprot, oprot) + args = read_args(iprot, Get_table_args) + result = Get_table_result.new() + begin + result.success = @handler.get_table(args.dbname, args.tbl_name) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_table', seqid) + end + + def process_get_table_objects_by_name(seqid, iprot, oprot) + args = read_args(iprot, Get_table_objects_by_name_args) + result = Get_table_objects_by_name_result.new() + result.success = @handler.get_table_objects_by_name(args.dbname, args.tbl_names) + write_result(result, oprot, 'get_table_objects_by_name', seqid) + end + + def process_get_table_req(seqid, iprot, oprot) + args = read_args(iprot, Get_table_req_args) + result = Get_table_req_result.new() + begin + result.success = @handler.get_table_req(args.req) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_table_req', seqid) + end + + def process_get_table_objects_by_name_req(seqid, iprot, oprot) + args = read_args(iprot, Get_table_objects_by_name_req_args) + result = Get_table_objects_by_name_req_result.new() + begin + result.success = @handler.get_table_objects_by_name_req(args.req) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::InvalidOperationException => o2 + result.o2 = o2 + rescue ::UnknownDBException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'get_table_objects_by_name_req', seqid) + end + + def process_get_table_names_by_filter(seqid, iprot, oprot) + args = read_args(iprot, Get_table_names_by_filter_args) + 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 + result.o1 = o1 + rescue ::InvalidOperationException => o2 + result.o2 = o2 + rescue ::UnknownDBException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'get_table_names_by_filter', seqid) + end + + def process_alter_table(seqid, iprot, oprot) + args = read_args(iprot, Alter_table_args) + result = Alter_table_result.new() + begin + @handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) + rescue ::InvalidOperationException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_table', seqid) + end + + def process_alter_table_with_environment_context(seqid, iprot, oprot) + args = read_args(iprot, Alter_table_with_environment_context_args) + 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 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_table_with_environment_context', seqid) + end + + def process_alter_table_with_cascade(seqid, iprot, oprot) + args = read_args(iprot, Alter_table_with_cascade_args) + result = Alter_table_with_cascade_result.new() + begin + @handler.alter_table_with_cascade(args.dbname, args.tbl_name, args.new_tbl, args.cascade) + rescue ::InvalidOperationException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_table_with_cascade', seqid) + end + + def process_add_partition(seqid, iprot, oprot) + args = read_args(iprot, Add_partition_args) + result = Add_partition_result.new() + begin + result.success = @handler.add_partition(args.new_part) + rescue ::InvalidObjectException => o1 + result.o1 = o1 + rescue ::AlreadyExistsException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'add_partition', seqid) + end + + def process_add_partition_with_environment_context(seqid, iprot, oprot) + args = read_args(iprot, Add_partition_with_environment_context_args) + 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 + result.o1 = o1 + rescue ::AlreadyExistsException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'add_partition_with_environment_context', seqid) + end + + def process_add_partitions(seqid, iprot, oprot) + args = read_args(iprot, Add_partitions_args) + result = Add_partitions_result.new() + begin + result.success = @handler.add_partitions(args.new_parts) + rescue ::InvalidObjectException => o1 + result.o1 = o1 + rescue ::AlreadyExistsException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'add_partitions', seqid) + end + + def process_add_partitions_pspec(seqid, iprot, oprot) + args = read_args(iprot, Add_partitions_pspec_args) + result = Add_partitions_pspec_result.new() + begin + result.success = @handler.add_partitions_pspec(args.new_parts) + rescue ::InvalidObjectException => o1 + result.o1 = o1 + rescue ::AlreadyExistsException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'add_partitions_pspec', seqid) + end + + def process_append_partition(seqid, iprot, oprot) + args = read_args(iprot, Append_partition_args) + result = Append_partition_result.new() + begin + result.success = @handler.append_partition(args.db_name, args.tbl_name, args.part_vals) + rescue ::InvalidObjectException => o1 + result.o1 = o1 + rescue ::AlreadyExistsException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'append_partition', seqid) + end + + def process_add_partitions_req(seqid, iprot, oprot) + args = read_args(iprot, Add_partitions_req_args) + result = Add_partitions_req_result.new() + begin + result.success = @handler.add_partitions_req(args.request) + rescue ::InvalidObjectException => o1 + result.o1 = o1 + rescue ::AlreadyExistsException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'add_partitions_req', seqid) + end + + def process_append_partition_with_environment_context(seqid, iprot, oprot) + args = read_args(iprot, Append_partition_with_environment_context_args) + result = Append_partition_with_environment_context_result.new() + begin + result.success = @handler.append_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.environment_context) + rescue ::InvalidObjectException => o1 + result.o1 = o1 + rescue ::AlreadyExistsException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'append_partition_with_environment_context', seqid) + end + + def process_append_partition_by_name(seqid, iprot, oprot) + args = read_args(iprot, Append_partition_by_name_args) + 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 + result.o1 = o1 + rescue ::AlreadyExistsException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'append_partition_by_name', seqid) + end + + def process_append_partition_by_name_with_environment_context(seqid, iprot, oprot) + args = read_args(iprot, Append_partition_by_name_with_environment_context_args) + result = Append_partition_by_name_with_environment_context_result.new() + begin + result.success = @handler.append_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.environment_context) + rescue ::InvalidObjectException => o1 + result.o1 = o1 + rescue ::AlreadyExistsException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'append_partition_by_name_with_environment_context', seqid) + end + + def process_drop_partition(seqid, iprot, oprot) + args = read_args(iprot, Drop_partition_args) + 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 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_partition', seqid) + end + + def process_drop_partition_with_environment_context(seqid, iprot, oprot) + args = read_args(iprot, Drop_partition_with_environment_context_args) + result = Drop_partition_with_environment_context_result.new() + begin + result.success = @handler.drop_partition_with_environment_context(args.db_name, args.tbl_name, args.part_vals, args.deleteData, args.environment_context) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_partition_with_environment_context', seqid) + end + + def process_drop_partition_by_name(seqid, iprot, oprot) + args = read_args(iprot, Drop_partition_by_name_args) + 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 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_partition_by_name', seqid) + end + + def process_drop_partition_by_name_with_environment_context(seqid, iprot, oprot) + args = read_args(iprot, Drop_partition_by_name_with_environment_context_args) + result = Drop_partition_by_name_with_environment_context_result.new() + begin + result.success = @handler.drop_partition_by_name_with_environment_context(args.db_name, args.tbl_name, args.part_name, args.deleteData, args.environment_context) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_partition_by_name_with_environment_context', seqid) + end + + def process_drop_partitions_req(seqid, iprot, oprot) + args = read_args(iprot, Drop_partitions_req_args) + result = Drop_partitions_req_result.new() + begin + result.success = @handler.drop_partitions_req(args.req) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_partitions_req', seqid) + end + + def process_get_partition(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_args) + result = Get_partition_result.new() + begin + result.success = @handler.get_partition(args.db_name, args.tbl_name, args.part_vals) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partition', seqid) + end + + def process_exchange_partition(seqid, iprot, oprot) + args = read_args(iprot, Exchange_partition_args) + result = Exchange_partition_result.new() + begin + result.success = @handler.exchange_partition(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + rescue ::InvalidObjectException => o3 + result.o3 = o3 + rescue ::InvalidInputException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'exchange_partition', seqid) + end + + def process_exchange_partitions(seqid, iprot, oprot) + args = read_args(iprot, Exchange_partitions_args) + result = Exchange_partitions_result.new() + begin + result.success = @handler.exchange_partitions(args.partitionSpecs, args.source_db, args.source_table_name, args.dest_db, args.dest_table_name) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + rescue ::InvalidObjectException => o3 + result.o3 = o3 + rescue ::InvalidInputException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'exchange_partitions', seqid) + end + + def process_get_partition_with_auth(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_with_auth_args) + 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 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partition_with_auth', seqid) + end + + def process_get_partition_by_name(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_by_name_args) + 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 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partition_by_name', seqid) + end + + def process_get_partitions(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_args) + result = Get_partitions_result.new() + begin + result.success = @handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions', seqid) + end + + def process_get_partitions_with_auth(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_with_auth_args) + 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 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions_with_auth', seqid) + end + + def process_get_partitions_pspec(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_pspec_args) + result = Get_partitions_pspec_result.new() + begin + result.success = @handler.get_partitions_pspec(args.db_name, args.tbl_name, args.max_parts) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions_pspec', seqid) + end + + def process_get_partition_names(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_names_args) + 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 + result.o2 = o2 + end + write_result(result, oprot, 'get_partition_names', seqid) + end + + def process_get_partitions_ps(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_ps_args) + 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 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions_ps', seqid) + end + + def process_get_partitions_ps_with_auth(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_ps_with_auth_args) + 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 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions_ps_with_auth', seqid) + end + + def process_get_partition_names_ps(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_names_ps_args) + 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 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partition_names_ps', seqid) + end + + def process_get_partitions_by_filter(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_by_filter_args) + 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 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions_by_filter', seqid) + end + + def process_get_part_specs_by_filter(seqid, iprot, oprot) + args = read_args(iprot, Get_part_specs_by_filter_args) + result = Get_part_specs_by_filter_result.new() + begin + result.success = @handler.get_part_specs_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_part_specs_by_filter', seqid) + end + + def process_get_partitions_by_expr(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_by_expr_args) + result = Get_partitions_by_expr_result.new() + begin + result.success = @handler.get_partitions_by_expr(args.req) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions_by_expr', seqid) + end + + def process_get_num_partitions_by_filter(seqid, iprot, oprot) + args = read_args(iprot, Get_num_partitions_by_filter_args) + result = Get_num_partitions_by_filter_result.new() + begin + result.success = @handler.get_num_partitions_by_filter(args.db_name, args.tbl_name, args.filter) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_num_partitions_by_filter', seqid) + end + + def process_get_partitions_by_names(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_by_names_args) + 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 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions_by_names', seqid) + end + + def process_alter_partition(seqid, iprot, oprot) + args = read_args(iprot, Alter_partition_args) + result = Alter_partition_result.new() + begin + @handler.alter_partition(args.db_name, args.tbl_name, args.new_part) + rescue ::InvalidOperationException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_partition', seqid) + end + + def process_alter_partitions(seqid, iprot, oprot) + args = read_args(iprot, Alter_partitions_args) + result = Alter_partitions_result.new() + begin + @handler.alter_partitions(args.db_name, args.tbl_name, args.new_parts) + rescue ::InvalidOperationException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_partitions', seqid) + end + + def process_alter_partitions_with_environment_context(seqid, iprot, oprot) + args = read_args(iprot, Alter_partitions_with_environment_context_args) + result = Alter_partitions_with_environment_context_result.new() + begin + @handler.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context) + rescue ::InvalidOperationException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_partitions_with_environment_context', seqid) + end + + def process_alter_partition_with_environment_context(seqid, iprot, oprot) + args = read_args(iprot, Alter_partition_with_environment_context_args) + 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 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_partition_with_environment_context', seqid) + end + + def process_rename_partition(seqid, iprot, oprot) + args = read_args(iprot, Rename_partition_args) + result = Rename_partition_result.new() + begin + @handler.rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part) + rescue ::InvalidOperationException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'rename_partition', seqid) + end + + def process_partition_name_has_valid_characters(seqid, iprot, oprot) + args = read_args(iprot, Partition_name_has_valid_characters_args) + result = Partition_name_has_valid_characters_result.new() + begin + result.success = @handler.partition_name_has_valid_characters(args.part_vals, args.throw_exception) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'partition_name_has_valid_characters', seqid) + end + + def process_get_config_value(seqid, iprot, oprot) + args = read_args(iprot, Get_config_value_args) + result = Get_config_value_result.new() + begin + result.success = @handler.get_config_value(args.name, args.defaultValue) + rescue ::ConfigValSecurityException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_config_value', seqid) + end + + def process_partition_name_to_vals(seqid, iprot, oprot) + args = read_args(iprot, Partition_name_to_vals_args) + result = Partition_name_to_vals_result.new() + begin + result.success = @handler.partition_name_to_vals(args.part_name) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'partition_name_to_vals', seqid) + end + + def process_partition_name_to_spec(seqid, iprot, oprot) + args = read_args(iprot, Partition_name_to_spec_args) + result = Partition_name_to_spec_result.new() + begin + result.success = @handler.partition_name_to_spec(args.part_name) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'partition_name_to_spec', seqid) + end + + def process_markPartitionForEvent(seqid, iprot, oprot) + args = read_args(iprot, MarkPartitionForEvent_args) + result = MarkPartitionForEvent_result.new() + begin + @handler.markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + rescue ::UnknownDBException => o3 + result.o3 = o3 + rescue ::UnknownTableException => o4 + result.o4 = o4 + rescue ::UnknownPartitionException => o5 + result.o5 = o5 + rescue ::InvalidPartitionException => o6 + result.o6 = o6 + end + write_result(result, oprot, 'markPartitionForEvent', seqid) + end + + def process_isPartitionMarkedForEvent(seqid, iprot, oprot) + args = read_args(iprot, IsPartitionMarkedForEvent_args) + result = IsPartitionMarkedForEvent_result.new() + begin + result.success = @handler.isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + rescue ::UnknownDBException => o3 + result.o3 = o3 + rescue ::UnknownTableException => o4 + result.o4 = o4 + rescue ::UnknownPartitionException => o5 + result.o5 = o5 + rescue ::InvalidPartitionException => o6 + result.o6 = o6 + end + write_result(result, oprot, 'isPartitionMarkedForEvent', seqid) + end + + def process_add_index(seqid, iprot, oprot) + args = read_args(iprot, Add_index_args) + result = Add_index_result.new() + begin + result.success = @handler.add_index(args.new_index, args.index_table) + rescue ::InvalidObjectException => o1 + result.o1 = o1 + rescue ::AlreadyExistsException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'add_index', seqid) + end + + def process_alter_index(seqid, iprot, oprot) + args = read_args(iprot, Alter_index_args) + result = Alter_index_result.new() + begin + @handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) + rescue ::InvalidOperationException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_index', seqid) + end + + def process_drop_index_by_name(seqid, iprot, oprot) + args = read_args(iprot, Drop_index_by_name_args) + 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 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_index_by_name', seqid) + end + + def process_get_index_by_name(seqid, iprot, oprot) + args = read_args(iprot, Get_index_by_name_args) + 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 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_index_by_name', seqid) + end + + def process_get_indexes(seqid, iprot, oprot) + args = read_args(iprot, Get_indexes_args) + result = Get_indexes_result.new() + begin + result.success = @handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_indexes', seqid) + end + + def process_get_index_names(seqid, iprot, oprot) + args = read_args(iprot, Get_index_names_args) + 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 + result.o2 = o2 + end + write_result(result, oprot, 'get_index_names', seqid) + end + + def process_get_primary_keys(seqid, iprot, oprot) + args = read_args(iprot, Get_primary_keys_args) + result = Get_primary_keys_result.new() + begin + result.success = @handler.get_primary_keys(args.request) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_primary_keys', seqid) + end + + def process_get_foreign_keys(seqid, iprot, oprot) + args = read_args(iprot, Get_foreign_keys_args) + result = Get_foreign_keys_result.new() + begin + result.success = @handler.get_foreign_keys(args.request) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_foreign_keys', seqid) + end + + def process_get_unique_constraints(seqid, iprot, oprot) + args = read_args(iprot, Get_unique_constraints_args) + result = Get_unique_constraints_result.new() + begin + result.success = @handler.get_unique_constraints(args.request) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_unique_constraints', seqid) + end + + def process_get_not_null_constraints(seqid, iprot, oprot) + args = read_args(iprot, Get_not_null_constraints_args) + result = Get_not_null_constraints_result.new() + begin + result.success = @handler.get_not_null_constraints(args.request) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_not_null_constraints', seqid) + end + + def process_update_table_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Update_table_column_statistics_args) + result = Update_table_column_statistics_result.new() + begin + result.success = @handler.update_table_column_statistics(args.stats_obj) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::InvalidObjectException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + rescue ::InvalidInputException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'update_table_column_statistics', seqid) + end + + def process_update_partition_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Update_partition_column_statistics_args) + result = Update_partition_column_statistics_result.new() + begin + result.success = @handler.update_partition_column_statistics(args.stats_obj) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::InvalidObjectException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + rescue ::InvalidInputException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'update_partition_column_statistics', seqid) + end + + def process_get_table_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Get_table_column_statistics_args) + result = Get_table_column_statistics_result.new() + begin + result.success = @handler.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + rescue ::InvalidInputException => o3 + result.o3 = o3 + rescue ::InvalidObjectException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'get_table_column_statistics', seqid) + end + + def process_get_partition_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_column_statistics_args) + result = Get_partition_column_statistics_result.new() + begin + result.success = @handler.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + rescue ::InvalidInputException => o3 + result.o3 = o3 + rescue ::InvalidObjectException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'get_partition_column_statistics', seqid) + end + + def process_get_table_statistics_req(seqid, iprot, oprot) + args = read_args(iprot, Get_table_statistics_req_args) + result = Get_table_statistics_req_result.new() + begin + result.success = @handler.get_table_statistics_req(args.request) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_table_statistics_req', seqid) + end + + def process_get_partitions_statistics_req(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_statistics_req_args) + result = Get_partitions_statistics_req_result.new() + begin + result.success = @handler.get_partitions_statistics_req(args.request) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions_statistics_req', seqid) + end + + def process_get_aggr_stats_for(seqid, iprot, oprot) + args = read_args(iprot, Get_aggr_stats_for_args) + result = Get_aggr_stats_for_result.new() + begin + result.success = @handler.get_aggr_stats_for(args.request) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_aggr_stats_for', seqid) + end + + def process_set_aggr_stats_for(seqid, iprot, oprot) + args = read_args(iprot, Set_aggr_stats_for_args) + result = Set_aggr_stats_for_result.new() + begin + result.success = @handler.set_aggr_stats_for(args.request) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::InvalidObjectException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + rescue ::InvalidInputException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'set_aggr_stats_for', seqid) + end + + def process_delete_partition_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Delete_partition_column_statistics_args) + result = Delete_partition_column_statistics_result.new() + begin + result.success = @handler.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + rescue ::InvalidObjectException => o3 + result.o3 = o3 + rescue ::InvalidInputException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'delete_partition_column_statistics', seqid) + end + + def process_delete_table_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Delete_table_column_statistics_args) + result = Delete_table_column_statistics_result.new() + begin + result.success = @handler.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + rescue ::InvalidObjectException => o3 + result.o3 = o3 + rescue ::InvalidInputException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'delete_table_column_statistics', seqid) + end + + def process_create_function(seqid, iprot, oprot) + args = read_args(iprot, Create_function_args) + result = Create_function_result.new() + begin + @handler.create_function(args.func) + rescue ::AlreadyExistsException => o1 + result.o1 = o1 + rescue ::InvalidObjectException => o2 + result.o2 = o2 + rescue ::MetaException => o3 + result.o3 = o3 + rescue ::NoSuchObjectException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'create_function', seqid) + end + + def process_drop_function(seqid, iprot, oprot) + args = read_args(iprot, Drop_function_args) + result = Drop_function_result.new() + begin + @handler.drop_function(args.dbName, args.funcName) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'drop_function', seqid) + end + + def process_alter_function(seqid, iprot, oprot) + args = read_args(iprot, Alter_function_args) + result = Alter_function_result.new() + begin + @handler.alter_function(args.dbName, args.funcName, args.newFunc) + rescue ::InvalidOperationException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_function', seqid) + end + + def process_get_functions(seqid, iprot, oprot) + args = read_args(iprot, Get_functions_args) + result = Get_functions_result.new() + begin + result.success = @handler.get_functions(args.dbName, args.pattern) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_functions', seqid) + end + + def process_get_function(seqid, iprot, oprot) + args = read_args(iprot, Get_function_args) + result = Get_function_result.new() + begin + result.success = @handler.get_function(args.dbName, args.funcName) + rescue ::MetaException => o1 + result.o1 = o1 + rescue ::NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_function', seqid) + end + + def process_get_all_functions(seqid, iprot, oprot) + args = read_args(iprot, Get_all_functions_args) + result = Get_all_functions_result.new() + begin + result.success = @handler.get_all_functions() + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_all_functions', seqid) + end + + def process_create_role(seqid, iprot, oprot) + args = read_args(iprot, Create_role_args) + result = Create_role_result.new() + begin + result.success = @handler.create_role(args.role) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'create_role', seqid) + end + + def process_drop_role(seqid, iprot, oprot) + args = read_args(iprot, Drop_role_args) + result = Drop_role_result.new() + begin + result.success = @handler.drop_role(args.role_name) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'drop_role', seqid) + end + + def process_get_role_names(seqid, iprot, oprot) + args = read_args(iprot, Get_role_names_args) + result = Get_role_names_result.new() + begin + result.success = @handler.get_role_names() + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_role_names', seqid) + end + + def process_grant_role(seqid, iprot, oprot) + args = read_args(iprot, Grant_role_args) + 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 + result.o1 = o1 + end + write_result(result, oprot, 'grant_role', seqid) + end + + def process_revoke_role(seqid, iprot, oprot) + args = read_args(iprot, Revoke_role_args) + result = Revoke_role_result.new() + begin + result.success = @handler.revoke_role(args.role_name, args.principal_name, args.principal_type) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'revoke_role', seqid) + end + + def process_list_roles(seqid, iprot, oprot) + args = read_args(iprot, List_roles_args) + result = List_roles_result.new() + begin + result.success = @handler.list_roles(args.principal_name, args.principal_type) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'list_roles', seqid) + end + + def process_grant_revoke_role(seqid, iprot, oprot) + args = read_args(iprot, Grant_revoke_role_args) + result = Grant_revoke_role_result.new() + begin + result.success = @handler.grant_revoke_role(args.request) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'grant_revoke_role', seqid) + end + + def process_get_principals_in_role(seqid, iprot, oprot) + args = read_args(iprot, Get_principals_in_role_args) + result = Get_principals_in_role_result.new() + begin + result.success = @handler.get_principals_in_role(args.request) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_principals_in_role', seqid) + end + + def process_get_role_grants_for_principal(seqid, iprot, oprot) + args = read_args(iprot, Get_role_grants_for_principal_args) + result = Get_role_grants_for_principal_result.new() + begin + result.success = @handler.get_role_grants_for_principal(args.request) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_role_grants_for_principal', seqid) + end + + def process_get_privilege_set(seqid, iprot, oprot) + args = read_args(iprot, Get_privilege_set_args) + result = Get_privilege_set_result.new() + begin + result.success = @handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_privilege_set', seqid) + end + + def process_list_privileges(seqid, iprot, oprot) + args = read_args(iprot, List_privileges_args) + result = List_privileges_result.new() + begin + result.success = @handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'list_privileges', seqid) + end + + def process_grant_privileges(seqid, iprot, oprot) + args = read_args(iprot, Grant_privileges_args) + result = Grant_privileges_result.new() + begin + result.success = @handler.grant_privileges(args.privileges) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'grant_privileges', seqid) + end + + def process_revoke_privileges(seqid, iprot, oprot) + args = read_args(iprot, Revoke_privileges_args) + result = Revoke_privileges_result.new() + begin + result.success = @handler.revoke_privileges(args.privileges) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'revoke_privileges', seqid) + end + + def process_grant_revoke_privileges(seqid, iprot, oprot) + args = read_args(iprot, Grant_revoke_privileges_args) + result = Grant_revoke_privileges_result.new() + begin + result.success = @handler.grant_revoke_privileges(args.request) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'grant_revoke_privileges', seqid) + end + + def process_set_ugi(seqid, iprot, oprot) + args = read_args(iprot, Set_ugi_args) + result = Set_ugi_result.new() + begin + result.success = @handler.set_ugi(args.user_name, args.group_names) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'set_ugi', seqid) + end + + def process_get_delegation_token(seqid, iprot, oprot) + args = read_args(iprot, Get_delegation_token_args) + result = Get_delegation_token_result.new() + begin + result.success = @handler.get_delegation_token(args.token_owner, args.renewer_kerberos_principal_name) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_delegation_token', seqid) + end + + def process_renew_delegation_token(seqid, iprot, oprot) + args = read_args(iprot, Renew_delegation_token_args) + result = Renew_delegation_token_result.new() + begin + result.success = @handler.renew_delegation_token(args.token_str_form) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'renew_delegation_token', seqid) + end + + def process_cancel_delegation_token(seqid, iprot, oprot) + args = read_args(iprot, Cancel_delegation_token_args) + result = Cancel_delegation_token_result.new() + begin + @handler.cancel_delegation_token(args.token_str_form) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'cancel_delegation_token', seqid) + end + + def process_add_token(seqid, iprot, oprot) + args = read_args(iprot, Add_token_args) + result = Add_token_result.new() + result.success = @handler.add_token(args.token_identifier, args.delegation_token) + write_result(result, oprot, 'add_token', seqid) + end + + def process_remove_token(seqid, iprot, oprot) + args = read_args(iprot, Remove_token_args) + result = Remove_token_result.new() + result.success = @handler.remove_token(args.token_identifier) + write_result(result, oprot, 'remove_token', seqid) + end + + def process_get_token(seqid, iprot, oprot) + args = read_args(iprot, Get_token_args) + result = Get_token_result.new() + result.success = @handler.get_token(args.token_identifier) + write_result(result, oprot, 'get_token', seqid) + end + + def process_get_all_token_identifiers(seqid, iprot, oprot) + args = read_args(iprot, Get_all_token_identifiers_args) + result = Get_all_token_identifiers_result.new() + result.success = @handler.get_all_token_identifiers() + write_result(result, oprot, 'get_all_token_identifiers', seqid) + end + + def process_add_master_key(seqid, iprot, oprot) + args = read_args(iprot, Add_master_key_args) + result = Add_master_key_result.new() + begin + result.success = @handler.add_master_key(args.key) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'add_master_key', seqid) + end + + def process_update_master_key(seqid, iprot, oprot) + args = read_args(iprot, Update_master_key_args) + result = Update_master_key_result.new() + begin + @handler.update_master_key(args.seq_number, args.key) + rescue ::NoSuchObjectException => o1 + result.o1 = o1 + rescue ::MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'update_master_key', seqid) + end + + def process_remove_master_key(seqid, iprot, oprot) + args = read_args(iprot, Remove_master_key_args) + result = Remove_master_key_result.new() + result.success = @handler.remove_master_key(args.key_seq) + write_result(result, oprot, 'remove_master_key', seqid) + end + + def process_get_master_keys(seqid, iprot, oprot) + args = read_args(iprot, Get_master_keys_args) + result = Get_master_keys_result.new() + result.success = @handler.get_master_keys() + write_result(result, oprot, 'get_master_keys', seqid) + end + + def process_get_open_txns(seqid, iprot, oprot) + args = read_args(iprot, Get_open_txns_args) + result = Get_open_txns_result.new() + result.success = @handler.get_open_txns() + write_result(result, oprot, 'get_open_txns', seqid) + end + + def process_get_open_txns_info(seqid, iprot, oprot) + args = read_args(iprot, Get_open_txns_info_args) + result = Get_open_txns_info_result.new() + result.success = @handler.get_open_txns_info() + write_result(result, oprot, 'get_open_txns_info', seqid) + end + + def process_open_txns(seqid, iprot, oprot) + args = read_args(iprot, Open_txns_args) + result = Open_txns_result.new() + result.success = @handler.open_txns(args.rqst) + write_result(result, oprot, 'open_txns', seqid) + end + + def process_abort_txn(seqid, iprot, oprot) + args = read_args(iprot, Abort_txn_args) + result = Abort_txn_result.new() + begin + @handler.abort_txn(args.rqst) + rescue ::NoSuchTxnException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'abort_txn', seqid) + end + + def process_abort_txns(seqid, iprot, oprot) + args = read_args(iprot, Abort_txns_args) + result = Abort_txns_result.new() + begin + @handler.abort_txns(args.rqst) + rescue ::NoSuchTxnException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'abort_txns', seqid) + end + + def process_commit_txn(seqid, iprot, oprot) + args = read_args(iprot, Commit_txn_args) + result = Commit_txn_result.new() + begin + @handler.commit_txn(args.rqst) + rescue ::NoSuchTxnException => o1 + result.o1 = o1 + rescue ::TxnAbortedException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'commit_txn', seqid) + end + + def process_lock(seqid, iprot, oprot) + args = read_args(iprot, Lock_args) + result = Lock_result.new() + begin + result.success = @handler.lock(args.rqst) + rescue ::NoSuchTxnException => o1 + result.o1 = o1 + rescue ::TxnAbortedException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'lock', seqid) + end + + def process_check_lock(seqid, iprot, oprot) + args = read_args(iprot, Check_lock_args) + result = Check_lock_result.new() + begin + result.success = @handler.check_lock(args.rqst) + rescue ::NoSuchTxnException => o1 + result.o1 = o1 + rescue ::TxnAbortedException => o2 + result.o2 = o2 + rescue ::NoSuchLockException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'check_lock', seqid) + end + + def process_unlock(seqid, iprot, oprot) + args = read_args(iprot, Unlock_args) + result = Unlock_result.new() + begin + @handler.unlock(args.rqst) + rescue ::NoSuchLockException => o1 + result.o1 = o1 + rescue ::TxnOpenException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'unlock', seqid) + end + + def process_show_locks(seqid, iprot, oprot) + args = read_args(iprot, Show_locks_args) + result = Show_locks_result.new() + result.success = @handler.show_locks(args.rqst) + write_result(result, oprot, 'show_locks', seqid) + end + + def process_heartbeat(seqid, iprot, oprot) + args = read_args(iprot, Heartbeat_args) + result = Heartbeat_result.new() + begin + @handler.heartbeat(args.ids) + rescue ::NoSuchLockException => o1 + result.o1 = o1 + rescue ::NoSuchTxnException => o2 + result.o2 = o2 + rescue ::TxnAbortedException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'heartbeat', seqid) + end + + def process_heartbeat_txn_range(seqid, iprot, oprot) + args = read_args(iprot, Heartbeat_txn_range_args) + result = Heartbeat_txn_range_result.new() + result.success = @handler.heartbeat_txn_range(args.txns) + write_result(result, oprot, 'heartbeat_txn_range', seqid) + end + + def process_compact(seqid, iprot, oprot) + args = read_args(iprot, Compact_args) + result = Compact_result.new() + @handler.compact(args.rqst) + write_result(result, oprot, 'compact', seqid) + end + + def process_compact2(seqid, iprot, oprot) + args = read_args(iprot, Compact2_args) + result = Compact2_result.new() + result.success = @handler.compact2(args.rqst) + write_result(result, oprot, 'compact2', seqid) + end + + def process_show_compact(seqid, iprot, oprot) + args = read_args(iprot, Show_compact_args) + result = Show_compact_result.new() + result.success = @handler.show_compact(args.rqst) + write_result(result, oprot, 'show_compact', seqid) + end + + def process_add_dynamic_partitions(seqid, iprot, oprot) + args = read_args(iprot, Add_dynamic_partitions_args) + result = Add_dynamic_partitions_result.new() + begin + @handler.add_dynamic_partitions(args.rqst) + rescue ::NoSuchTxnException => o1 + result.o1 = o1 + rescue ::TxnAbortedException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'add_dynamic_partitions', seqid) + end + + def process_get_next_notification(seqid, iprot, oprot) + args = read_args(iprot, Get_next_notification_args) + result = Get_next_notification_result.new() + result.success = @handler.get_next_notification(args.rqst) + write_result(result, oprot, 'get_next_notification', seqid) + end + + def process_get_current_notificationEventId(seqid, iprot, oprot) + args = read_args(iprot, Get_current_notificationEventId_args) + result = Get_current_notificationEventId_result.new() + result.success = @handler.get_current_notificationEventId() + write_result(result, oprot, 'get_current_notificationEventId', seqid) + end + + def process_fire_listener_event(seqid, iprot, oprot) + args = read_args(iprot, Fire_listener_event_args) + result = Fire_listener_event_result.new() + result.success = @handler.fire_listener_event(args.rqst) + write_result(result, oprot, 'fire_listener_event', seqid) + end + + def process_flushCache(seqid, iprot, oprot) + args = read_args(iprot, FlushCache_args) + result = FlushCache_result.new() + @handler.flushCache() + write_result(result, oprot, 'flushCache', seqid) + end + + def process_cm_recycle(seqid, iprot, oprot) + args = read_args(iprot, Cm_recycle_args) + result = Cm_recycle_result.new() + begin + result.success = @handler.cm_recycle(args.request) + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'cm_recycle', seqid) + end + + def process_get_file_metadata_by_expr(seqid, iprot, oprot) + args = read_args(iprot, Get_file_metadata_by_expr_args) + result = Get_file_metadata_by_expr_result.new() + result.success = @handler.get_file_metadata_by_expr(args.req) + write_result(result, oprot, 'get_file_metadata_by_expr', seqid) + end + + def process_get_file_metadata(seqid, iprot, oprot) + args = read_args(iprot, Get_file_metadata_args) + result = Get_file_metadata_result.new() + result.success = @handler.get_file_metadata(args.req) + write_result(result, oprot, 'get_file_metadata', seqid) + end + + def process_put_file_metadata(seqid, iprot, oprot) + args = read_args(iprot, Put_file_metadata_args) + result = Put_file_metadata_result.new() + result.success = @handler.put_file_metadata(args.req) + write_result(result, oprot, 'put_file_metadata', seqid) + end + + def process_clear_file_metadata(seqid, iprot, oprot) + args = read_args(iprot, Clear_file_metadata_args) + result = Clear_file_metadata_result.new() + result.success = @handler.clear_file_metadata(args.req) + write_result(result, oprot, 'clear_file_metadata', seqid) + end + + def process_cache_file_metadata(seqid, iprot, oprot) + args = read_args(iprot, Cache_file_metadata_args) + result = Cache_file_metadata_result.new() + result.success = @handler.cache_file_metadata(args.req) + write_result(result, oprot, 'cache_file_metadata', seqid) + end + + def process_get_metastore_db_uuid(seqid, iprot, oprot) + args = read_args(iprot, Get_metastore_db_uuid_args) + result = Get_metastore_db_uuid_result.new() + begin + result.success = @handler.get_metastore_db_uuid() + rescue ::MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_metastore_db_uuid', seqid) + end + + end + + # HELPER FUNCTIONS AND STRUCTURES + + class GetMetaConf_args + include ::Thrift::Struct, ::Thrift::Struct_Union + KEY = 1 + + FIELDS = { + KEY => {:type => ::Thrift::Types::STRING, :name => 'key'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetMetaConf_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class SetMetaConf_args + include ::Thrift::Struct, ::Thrift::Struct_Union + KEY = 1 + VALUE = 2 + + FIELDS = { + KEY => {:type => ::Thrift::Types::STRING, :name => 'key'}, + VALUE => {:type => ::Thrift::Types::STRING, :name => 'value'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class SetMetaConf_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_database_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DATABASE = 1 + + FIELDS = { + DATABASE => {:type => ::Thrift::Types::STRUCT, :name => 'database', :class => ::Database} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_database_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_database_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_database_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_database_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + DELETEDATA = 2 + CASCADE = 3 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'}, + CASCADE => {:type => ::Thrift::Types::BOOL, :name => 'cascade'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_database_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_databases_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PATTERN = 1 + + FIELDS = { + PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_databases_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_databases_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_databases_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_database_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + DB = 2 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + DB => {:type => ::Thrift::Types::STRUCT, :name => 'db', :class => ::Database} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_database_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_type_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_type_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_type_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TYPE = 1 + + FIELDS = { + TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'type', :class => ::Type} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_type_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_type_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TYPE = 1 + + FIELDS = { + TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_type_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_type_all_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_type_all_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_fields_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TABLE_NAME = 2 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_fields_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_fields_with_environment_context_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TABLE_NAME = 2 + ENVIRONMENT_CONTEXT = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_fields_with_environment_context_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_schema_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TABLE_NAME = 2 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_schema_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_schema_with_environment_context_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TABLE_NAME = 2 + ENVIRONMENT_CONTEXT = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_schema_with_environment_context_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TBL = 1 + + FIELDS = { + TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => ::Table} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_table_with_environment_context_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TBL = 1 + ENVIRONMENT_CONTEXT = 2 + + FIELDS = { + 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 + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_table_with_environment_context_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_table_with_constraints_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TBL = 1 + PRIMARYKEYS = 2 + FOREIGNKEYS = 3 + UNIQUECONSTRAINTS = 4 + NOTNULLCONSTRAINTS = 5 + + FIELDS = { + TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => ::Table}, + PRIMARYKEYS => {:type => ::Thrift::Types::LIST, :name => 'primaryKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLPrimaryKey}}, + FOREIGNKEYS => {:type => ::Thrift::Types::LIST, :name => 'foreignKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLForeignKey}}, + UNIQUECONSTRAINTS => {:type => ::Thrift::Types::LIST, :name => 'uniqueConstraints', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLUniqueConstraint}}, + NOTNULLCONSTRAINTS => {:type => ::Thrift::Types::LIST, :name => 'notNullConstraints', :element => {:type => ::Thrift::Types::STRUCT, :class => ::SQLNotNullConstraint}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_table_with_constraints_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_constraint_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::DropConstraintRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_constraint_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O3 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_primary_key_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::AddPrimaryKeyRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_primary_key_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_foreign_key_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::AddForeignKeyRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_foreign_key_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_unique_constraint_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::AddUniqueConstraintRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_unique_constraint_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_not_null_constraint_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::AddNotNullConstraintRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_not_null_constraint_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + NAME = 2 + DELETEDATA = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O3 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_table_with_environment_context_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + NAME = 2 + DELETEDATA = 3 + ENVIRONMENT_CONTEXT = 4 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_table_with_environment_context_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O3 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Truncate_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TABLENAME = 2 + PARTNAMES = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, + PARTNAMES => {:type => ::Thrift::Types::LIST, :name => 'partNames', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Truncate_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_tables_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + PATTERN = 2 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_tables_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_tables_by_type_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + PATTERN = 2 + TABLETYPE = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'}, + TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_tables_by_type_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_meta_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_PATTERNS = 1 + TBL_PATTERNS = 2 + TBL_TYPES = 3 + + FIELDS = { + DB_PATTERNS => {:type => ::Thrift::Types::STRING, :name => 'db_patterns'}, + TBL_PATTERNS => {:type => ::Thrift::Types::STRING, :name => 'tbl_patterns'}, + TBL_TYPES => {:type => ::Thrift::Types::LIST, :name => 'tbl_types', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_meta_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::TableMeta}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_tables_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_tables_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBL_NAME = 2 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_objects_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBL_NAMES = 2 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TBL_NAMES => {:type => ::Thrift::Types::LIST, :name => 'tbl_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_objects_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Table}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_req_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::GetTableRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_req_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetTableResult}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_objects_by_name_req_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::GetTablesRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_objects_by_name_req_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetTablesResult}, + 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 + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_names_by_filter_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + FILTER = 2 + MAX_TABLES = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'}, + MAX_TABLES => {:type => ::Thrift::Types::I16, :name => 'max_tables', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_names_by_filter_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBL_NAME = 2 + NEW_TBL = 3 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_table_with_environment_context_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBL_NAME = 2 + NEW_TBL = 3 + ENVIRONMENT_CONTEXT = 4 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_table_with_environment_context_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_table_with_cascade_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBL_NAME = 2 + NEW_TBL = 3 + CASCADE = 4 + + 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}, + CASCADE => {:type => ::Thrift::Types::BOOL, :name => 'cascade'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_table_with_cascade_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NEW_PART = 1 + + FIELDS = { + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => ::Partition} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partition_with_environment_context_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NEW_PART = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partition_with_environment_context_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partitions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NEW_PARTS = 1 + + FIELDS = { + NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partitions_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partitions_pspec_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NEW_PARTS = 1 + + FIELDS = { + NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::PartitionSpec}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partitions_pspec_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + + FIELDS = { + 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}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partitions_req_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::AddPartitionsRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partitions_req_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::AddPartitionsResult}, + 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 + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_with_environment_context_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + ENVIRONMENT_CONTEXT = 4 + + FIELDS = { + 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}}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_with_environment_context_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_by_name_with_environment_context_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + ENVIRONMENT_CONTEXT = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_by_name_with_environment_context_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + DELETEDATA = 4 + + FIELDS = { + 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}}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_with_environment_context_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + DELETEDATA = 4 + ENVIRONMENT_CONTEXT = 5 + + FIELDS = { + 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}}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_with_environment_context_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + DELETEDATA = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_by_name_with_environment_context_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + DELETEDATA = 4 + ENVIRONMENT_CONTEXT = 5 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_by_name_with_environment_context_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partitions_req_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::DropPartitionsRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partitions_req_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::DropPartitionsResult}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + + FIELDS = { + 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}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Exchange_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PARTITIONSPECS = 1 + SOURCE_DB = 2 + SOURCE_TABLE_NAME = 3 + DEST_DB = 4 + DEST_TABLE_NAME = 5 + + FIELDS = { + PARTITIONSPECS => {:type => ::Thrift::Types::MAP, :name => 'partitionSpecs', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + SOURCE_DB => {:type => ::Thrift::Types::STRING, :name => 'source_db'}, + SOURCE_TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'source_table_name'}, + DEST_DB => {:type => ::Thrift::Types::STRING, :name => 'dest_db'}, + DEST_TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'dest_table_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Exchange_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + 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}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidObjectException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Exchange_partitions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PARTITIONSPECS = 1 + SOURCE_DB = 2 + SOURCE_TABLE_NAME = 3 + DEST_DB = 4 + DEST_TABLE_NAME = 5 + + FIELDS = { + PARTITIONSPECS => {:type => ::Thrift::Types::MAP, :name => 'partitionSpecs', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + SOURCE_DB => {:type => ::Thrift::Types::STRING, :name => 'source_db'}, + SOURCE_TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'source_table_name'}, + DEST_DB => {:type => ::Thrift::Types::STRING, :name => 'dest_db'}, + DEST_TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'dest_table_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Exchange_partitions_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + 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}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidObjectException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_with_auth_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + USER_NAME = 4 + GROUP_NAMES = 5 + + FIELDS = { + 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}}, + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_with_auth_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_PARTS = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_with_auth_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_PARTS = 3 + USER_NAME = 4 + GROUP_NAMES = 5 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1}, + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_with_auth_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_pspec_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_PARTS = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_PARTS => {:type => ::Thrift::Types::I32, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_pspec_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::PartitionSpec}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_PARTS = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O2 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_ps_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + MAX_PARTS = 4 + + FIELDS = { + 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}}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_ps_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_ps_with_auth_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + MAX_PARTS = 4 + USER_NAME = 5 + GROUP_NAMES = 6 + + FIELDS = { + 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}}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1}, + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_ps_with_auth_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_ps_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + MAX_PARTS = 4 + + FIELDS = { + 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}}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_ps_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_by_filter_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + FILTER = 3 + MAX_PARTS = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_by_filter_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_part_specs_by_filter_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + FILTER = 3 + MAX_PARTS = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'}, + MAX_PARTS => {:type => ::Thrift::Types::I32, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_part_specs_by_filter_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::PartitionSpec}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_by_expr_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::PartitionsByExprRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_by_expr_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::PartitionsByExprResult}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_num_partitions_by_filter_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + FILTER = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_num_partitions_by_filter_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_by_names_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + NAMES = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + NAMES => {:type => ::Thrift::Types::LIST, :name => 'names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_by_names_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + NEW_PART = 3 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partitions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + NEW_PARTS = 3 + + 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}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partitions_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partitions_with_environment_context_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + NEW_PARTS = 3 + ENVIRONMENT_CONTEXT = 4 + + 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}}, + ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partitions_with_environment_context_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partition_with_environment_context_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + NEW_PART = 3 + ENVIRONMENT_CONTEXT = 4 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partition_with_environment_context_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Rename_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + NEW_PART = 4 + + FIELDS = { + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Rename_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_has_valid_characters_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PART_VALS = 1 + THROW_EXCEPTION = 2 + + FIELDS = { + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}, + THROW_EXCEPTION => {:type => ::Thrift::Types::BOOL, :name => 'throw_exception'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_has_valid_characters_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_config_value_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + DEFAULTVALUE = 2 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + DEFAULTVALUE => {:type => ::Thrift::Types::STRING, :name => 'defaultValue'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_config_value_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::ConfigValSecurityException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_to_vals_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PART_NAME = 1 + + FIELDS = { + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_to_vals_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_to_spec_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PART_NAME = 1 + + FIELDS = { + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_to_spec_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class MarkPartitionForEvent_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + EVENTTYPE = 4 + + FIELDS = { + 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} + } + + def struct_fields; FIELDS; end + + def validate + unless @eventType.nil? || ::PartitionEventType::VALID_VALUES.include?(@eventType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field eventType!') + end + end + + ::Thrift::Struct.generate_accessors self + end + + class MarkPartitionForEvent_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + O5 = 5 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class IsPartitionMarkedForEvent_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + EVENTTYPE = 4 + + FIELDS = { + 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} + } + + def struct_fields; FIELDS; end + + def validate + unless @eventType.nil? || ::PartitionEventType::VALID_VALUES.include?(@eventType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field eventType!') + end + end + + ::Thrift::Struct.generate_accessors self + end + + class IsPartitionMarkedForEvent_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + O5 = 5 + O6 = 6 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_index_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NEW_INDEX = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_index_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_index_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + BASE_TBL_NAME = 2 + IDX_NAME = 3 + NEW_IDX = 4 + + FIELDS = { + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_index_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_index_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + INDEX_NAME = 3 + DELETEDATA = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + INDEX_NAME => {:type => ::Thrift::Types::STRING, :name => 'index_name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_index_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_index_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + INDEX_NAME = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + INDEX_NAME => {:type => ::Thrift::Types::STRING, :name => 'index_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_index_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_indexes_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_INDEXES = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_INDEXES => {:type => ::Thrift::Types::I16, :name => 'max_indexes', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_indexes_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_index_names_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_INDEXES = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_INDEXES => {:type => ::Thrift::Types::I16, :name => 'max_indexes', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_index_names_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O2 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_primary_keys_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::PrimaryKeysRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_primary_keys_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::PrimaryKeysResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_foreign_keys_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::ForeignKeysRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_foreign_keys_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ForeignKeysResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_unique_constraints_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::UniqueConstraintsRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_unique_constraints_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::UniqueConstraintsResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_not_null_constraints_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::NotNullConstraintsRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_not_null_constraints_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::NotNullConstraintsResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Update_table_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + STATS_OBJ = 1 + + FIELDS = { + STATS_OBJ => {:type => ::Thrift::Types::STRUCT, :name => 'stats_obj', :class => ::ColumnStatistics} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Update_table_column_statistics_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + 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 => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Update_partition_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + STATS_OBJ = 1 + + FIELDS = { + STATS_OBJ => {:type => ::Thrift::Types::STRUCT, :name => 'stats_obj', :class => ::ColumnStatistics} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Update_partition_column_statistics_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + 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 => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + COL_NAME = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_column_statistics_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ColumnStatistics}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidInputException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + COL_NAME = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, + COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_column_statistics_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ColumnStatistics}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidInputException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_statistics_req_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::TableStatsRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_statistics_req_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::TableStatsResult}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_statistics_req_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::PartitionsStatsRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_statistics_req_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::PartitionsStatsResult}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_aggr_stats_for_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::PartitionsStatsRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_aggr_stats_for_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::AggrStats}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Set_aggr_stats_for_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::SetPartitionsStatsRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Set_aggr_stats_for_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + 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 => ::InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Delete_partition_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + COL_NAME = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, + COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Delete_partition_column_statistics_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + 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}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidObjectException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Delete_table_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + COL_NAME = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Delete_table_column_statistics_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + 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}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::InvalidObjectException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_function_args + include ::Thrift::Struct, ::Thrift::Struct_Union + FUNC = 1 + + FIELDS = { + FUNC => {:type => ::Thrift::Types::STRUCT, :name => 'func', :class => ::Function} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_function_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_function_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + FUNCNAME = 2 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + FUNCNAME => {:type => ::Thrift::Types::STRING, :name => 'funcName'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_function_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O3 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_function_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + FUNCNAME = 2 + NEWFUNC = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + FUNCNAME => {:type => ::Thrift::Types::STRING, :name => 'funcName'}, + NEWFUNC => {:type => ::Thrift::Types::STRUCT, :name => 'newFunc', :class => ::Function} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_function_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_functions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + PATTERN = 2 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_functions_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_function_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + FUNCNAME = 2 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + FUNCNAME => {:type => ::Thrift::Types::STRING, :name => 'funcName'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_function_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Function}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_functions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_functions_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetAllFunctionsResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_role_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLE = 1 + + FIELDS = { + ROLE => {:type => ::Thrift::Types::STRUCT, :name => 'role', :class => ::Role} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_role_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_role_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLE_NAME = 1 + + FIELDS = { + ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_role_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_role_names_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_role_names_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Grant_role_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLE_NAME = 1 + PRINCIPAL_NAME = 2 + PRINCIPAL_TYPE = 3 + GRANTOR = 4 + GRANTORTYPE = 5 + GRANT_OPTION = 6 + + 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}, + GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'}, + 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) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') + end + unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!') + end + end + + ::Thrift::Struct.generate_accessors self + end + + class Grant_role_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Revoke_role_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLE_NAME = 1 + PRINCIPAL_NAME = 2 + PRINCIPAL_TYPE = 3 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + 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 + + ::Thrift::Struct.generate_accessors self + end + + class Revoke_role_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_roles_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPAL_NAME = 1 + PRINCIPAL_TYPE = 2 + + FIELDS = { + PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, + 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) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') + end + end + + ::Thrift::Struct.generate_accessors self + end + + class List_roles_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Grant_revoke_role_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::GrantRevokeRoleRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Grant_revoke_role_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GrantRevokeRoleResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_principals_in_role_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::GetPrincipalsInRoleRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_principals_in_role_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetPrincipalsInRoleResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_role_grants_for_principal_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::GetRoleGrantsForPrincipalRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_role_grants_for_principal_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetRoleGrantsForPrincipalResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_privilege_set_args + include ::Thrift::Struct, ::Thrift::Struct_Union + HIVEOBJECT = 1 + USER_NAME = 2 + GROUP_NAMES = 3 + + FIELDS = { + 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}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_privilege_set_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::PrincipalPrivilegeSet}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_privileges_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPAL_NAME = 1 + PRINCIPAL_TYPE = 2 + HIVEOBJECT = 3 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + 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 + + ::Thrift::Struct.generate_accessors self + end + + class List_privileges_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Grant_privileges_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PRIVILEGES = 1 + + FIELDS = { + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrivilegeBag} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Grant_privileges_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Revoke_privileges_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PRIVILEGES = 1 + + FIELDS = { + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrivilegeBag} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Revoke_privileges_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Grant_revoke_privileges_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::GrantRevokePrivilegeRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Grant_revoke_privileges_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GrantRevokePrivilegeResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Set_ugi_args + include ::Thrift::Struct, ::Thrift::Struct_Union + USER_NAME = 1 + GROUP_NAMES = 2 + + FIELDS = { + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Set_ugi_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_delegation_token_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TOKEN_OWNER = 1 + RENEWER_KERBEROS_PRINCIPAL_NAME = 2 + + FIELDS = { + TOKEN_OWNER => {:type => ::Thrift::Types::STRING, :name => 'token_owner'}, + RENEWER_KERBEROS_PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'renewer_kerberos_principal_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_delegation_token_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Renew_delegation_token_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TOKEN_STR_FORM = 1 + + FIELDS = { + TOKEN_STR_FORM => {:type => ::Thrift::Types::STRING, :name => 'token_str_form'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Renew_delegation_token_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::I64, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Cancel_delegation_token_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TOKEN_STR_FORM = 1 + + FIELDS = { + TOKEN_STR_FORM => {:type => ::Thrift::Types::STRING, :name => 'token_str_form'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Cancel_delegation_token_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_token_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TOKEN_IDENTIFIER = 1 + DELEGATION_TOKEN = 2 + + FIELDS = { + TOKEN_IDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'token_identifier'}, + DELEGATION_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'delegation_token'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_token_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Remove_token_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TOKEN_IDENTIFIER = 1 + + FIELDS = { + TOKEN_IDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'token_identifier'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Remove_token_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_token_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TOKEN_IDENTIFIER = 1 + + FIELDS = { + TOKEN_IDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'token_identifier'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_token_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_token_identifiers_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_token_identifiers_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_master_key_args + include ::Thrift::Struct, ::Thrift::Struct_Union + KEY = 1 + + FIELDS = { + KEY => {:type => ::Thrift::Types::STRING, :name => 'key'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_master_key_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Update_master_key_args + include ::Thrift::Struct, ::Thrift::Struct_Union + SEQ_NUMBER = 1 + KEY = 2 + + FIELDS = { + SEQ_NUMBER => {:type => ::Thrift::Types::I32, :name => 'seq_number'}, + KEY => {:type => ::Thrift::Types::STRING, :name => 'key'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Update_master_key_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Remove_master_key_args + include ::Thrift::Struct, ::Thrift::Struct_Union + KEY_SEQ = 1 + + FIELDS = { + KEY_SEQ => {:type => ::Thrift::Types::I32, :name => 'key_seq'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Remove_master_key_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_master_keys_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_master_keys_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_open_txns_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_open_txns_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetOpenTxnsResponse} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_open_txns_info_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_open_txns_info_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetOpenTxnsInfoResponse} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Open_txns_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::OpenTxnRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Open_txns_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::OpenTxnsResponse} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Abort_txn_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::AbortTxnRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Abort_txn_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Abort_txns_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::AbortTxnsRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Abort_txns_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Commit_txn_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::CommitTxnRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Commit_txn_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::TxnAbortedException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Lock_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::LockRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Lock_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::LockResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::TxnAbortedException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Check_lock_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::CheckLockRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Check_lock_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::LockResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::TxnAbortedException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::NoSuchLockException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Unlock_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::UnlockRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Unlock_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchLockException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::TxnOpenException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Show_locks_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::ShowLocksRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Show_locks_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ShowLocksResponse} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Heartbeat_args + include ::Thrift::Struct, ::Thrift::Struct_Union + IDS = 1 + + FIELDS = { + IDS => {:type => ::Thrift::Types::STRUCT, :name => 'ids', :class => ::HeartbeatRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Heartbeat_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchLockException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::NoSuchTxnException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::TxnAbortedException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Heartbeat_txn_range_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TXNS = 1 + + FIELDS = { + TXNS => {:type => ::Thrift::Types::STRUCT, :name => 'txns', :class => ::HeartbeatTxnRangeRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Heartbeat_txn_range_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::HeartbeatTxnRangeResponse} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Compact_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::CompactionRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Compact_result + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Compact2_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::CompactionRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Compact2_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::CompactionResponse} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Show_compact_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::ShowCompactRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Show_compact_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ShowCompactResponse} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_dynamic_partitions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::AddDynamicPartitions} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_dynamic_partitions_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchTxnException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::TxnAbortedException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_next_notification_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::NotificationEventRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_next_notification_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::NotificationEventResponse} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_current_notificationEventId_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_current_notificationEventId_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::CurrentNotificationEventId} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Fire_listener_event_args + include ::Thrift::Struct, ::Thrift::Struct_Union + RQST = 1 + + FIELDS = { + RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::FireEventRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Fire_listener_event_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::FireEventResponse} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FlushCache_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FlushCache_result + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Cm_recycle_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQUEST = 1 + + FIELDS = { + REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::CmRecycleRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Cm_recycle_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::CmRecycleResponse}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_file_metadata_by_expr_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::GetFileMetadataByExprRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_file_metadata_by_expr_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetFileMetadataByExprResult} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_file_metadata_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::GetFileMetadataRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_file_metadata_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GetFileMetadataResult} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Put_file_metadata_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::PutFileMetadataRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Put_file_metadata_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::PutFileMetadataResult} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Clear_file_metadata_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::ClearFileMetadataRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Clear_file_metadata_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::ClearFileMetadataResult} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Cache_file_metadata_args + include ::Thrift::Struct, ::Thrift::Struct_Union + REQ = 1 + + FIELDS = { + REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::CacheFileMetadataRequest} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Cache_file_metadata_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::CacheFileMetadataResult} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_metastore_db_uuid_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_metastore_db_uuid_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + +end + diff --git standalone-metastore/src/main/resources/thrift-replacements.txt standalone-metastore/src/main/resources/thrift-replacements.txt new file mode 100644 index 0000000..7251131 --- /dev/null +++ standalone-metastore/src/main/resources/thrift-replacements.txt @@ -0,0 +1,61 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################################################### +# # +# Used for the internalizing of String instance field assignments in the Thrift generated files # +# FieldSchema.java, Partition.java, SerDeInfo.java, and StorageDescriptor.java. # +# # +# Look in hive/standalone-metastore/pom.xml for the thriftif profile. # +# Usage: thriftif profile automatically refers to this file. # +# # +################################################################################################### + +# Fix constructors and setters of String instance fields + +org.apache.hadoop.hive.metastore.utils.StringUtils.intern(name); +this\.name\ \=\ name;=this.name\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(name); +this\.serializationLib\ \=\ serializationLib;=this.serializationLib\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(serializationLib); +this\.type\ \=\ type;=this.type\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(type); +this\.comment\ \=\ comment;=this.comment\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(comment); +this\.location\ \=\ location;=this.location\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(location); +this\.inputFormat\ \=\ inputFormat;=this.inputFormat\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(inputFormat); +this\.outputFormat\ \=\ outputFormat;=this.outputFormat\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(outputFormat); +this\.dbName\ \=\ dbName;=this.dbName\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(dbName); +this\.tableName\ \=\ tableName;=this.tableName\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(tableName); + +# Fix constructors and setters of List instance fields + +this\.bucketCols\ \=\ bucketCols;=this.bucketCols\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(bucketCols); + +# Fix constructors and setters of Map instance fields + +this\.parameters\ \=\ parameters;=this.parameters\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(parameters); + +# Fix copy constructors + +this\.name\ \=\ other\.name;=this.name\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.name); +this\.serializationLib\ \=\ other\.serializationLib;=this.serializationLib\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.serializationLib); +this\.type\ \=\ other\.type;=this.type\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.type); +this\.comment\ \=\ other\.comment;=this.comment\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.comment); +this\.location\ \=\ other\.location;=this.location\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.location); +this\.inputFormat\ \=\ other\.inputFormat;=this.inputFormat\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.inputFormat); +this\.outputFormat\ \=\ other\.outputFormat;=this.outputFormat\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.outputFormat); +this\.dbName\ \=\ other\.dbName;=this.dbName\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.dbName); +this\.tableName\ \=\ other\.tableName;=this.tableName\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.tableName); + +__this__parameters_copy_key\ \=\ other_element_key;=__this__parameters_copy_key\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other_element_key); +__this__parameters_copy_value\ \=\ other_element_value;=__this__parameters_copy_value\ \=\ org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other_element_value); +__this_values\.add(other_element);=__this_values.add(org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other_element)); diff --git standalone-metastore/src/main/thrift/hive_metastore.thrift standalone-metastore/src/main/thrift/hive_metastore.thrift new file mode 100755 index 0000000..042a5d8 --- /dev/null +++ standalone-metastore/src/main/thrift/hive_metastore.thrift @@ -0,0 +1,1602 @@ +#!/usr/local/bin/thrift -java + +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +# +# Thrift Service that the MetaStore is built on +# + +include "share/fb303/if/fb303.thrift" + +namespace java org.apache.hadoop.hive.metastore.api +namespace php metastore +namespace cpp Apache.Hadoop.Hive + +const string DDL_TIME = "transient_lastDdlTime" + +struct Version { + 1: string version, + 2: string comments +} + +struct FieldSchema { + 1: string name, // name of the field + 2: string type, // type of the field. primitive types defined above, specify list, map for lists & maps + 3: string comment +} + +struct SQLPrimaryKey { + 1: string table_db, // table schema + 2: string table_name, // table name + 3: string column_name, // column name + 4: i32 key_seq, // sequence number within primary key + 5: string pk_name, // primary key name + 6: bool enable_cstr, // Enable/Disable + 7: bool validate_cstr, // Validate/No validate + 8: bool rely_cstr // Rely/No Rely +} + +struct SQLForeignKey { + 1: string pktable_db, // primary key table schema + 2: string pktable_name, // primary key table name + 3: string pkcolumn_name, // primary key column name + 4: string fktable_db, // foreign key table schema + 5: string fktable_name, // foreign key table name + 6: string fkcolumn_name, // foreign key column name + 7: i32 key_seq, // sequence within foreign key + 8: i32 update_rule, // what happens to foreign key when parent key is updated + 9: i32 delete_rule, // what happens to foreign key when parent key is deleted + 10: string fk_name, // foreign key name + 11: string pk_name, // primary key name + 12: bool enable_cstr, // Enable/Disable + 13: bool validate_cstr, // Validate/No validate + 14: bool rely_cstr // Rely/No Rely +} + +struct SQLUniqueConstraint { + 1: string table_db, // table schema + 2: string table_name, // table name + 3: string column_name, // column name + 4: i32 key_seq, // sequence number within unique constraint + 5: string uk_name, // unique key name + 6: bool enable_cstr, // Enable/Disable + 7: bool validate_cstr, // Validate/No validate + 8: bool rely_cstr // Rely/No Rely +} + +struct SQLNotNullConstraint { + 1: string table_db, // table schema + 2: string table_name, // table name + 3: string column_name, // column name + 4: string nn_name, // not null name + 5: bool enable_cstr, // Enable/Disable + 6: bool validate_cstr, // Validate/No validate + 7: bool rely_cstr // Rely/No Rely +} + +struct Type { + 1: string name, // one of the types in PrimitiveTypes or CollectionTypes or User defined types + 2: optional string type1, // object type if the name is 'list' (LIST_TYPE), key type if the name is 'map' (MAP_TYPE) + 3: optional string type2, // val type if the name is 'map' (MAP_TYPE) + 4: optional list fields // if the name is one of the user defined types +} + +enum HiveObjectType { + GLOBAL = 1, + DATABASE = 2, + TABLE = 3, + PARTITION = 4, + COLUMN = 5, +} + +enum PrincipalType { + USER = 1, + ROLE = 2, + GROUP = 3, +} + +const string HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__" +const string HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__" +const string HIVE_FILTER_FIELD_LAST_ACCESS = "hive_filter_field_last_access__" + +enum PartitionEventType { + LOAD_DONE = 1, +} + +// Enums for transaction and lock management +enum TxnState { + COMMITTED = 1, + ABORTED = 2, + OPEN = 3, +} + +enum LockLevel { + DB = 1, + TABLE = 2, + PARTITION = 3, +} + +enum LockState { + ACQUIRED = 1, // requester has the lock + WAITING = 2, // requester is waiting for the lock and should call checklock at a later point to see if the lock has been obtained. + ABORT = 3, // the lock has been aborted, most likely due to timeout + NOT_ACQUIRED = 4, // returned only with lockNoWait, indicates the lock was not available and was not acquired +} + +enum LockType { + SHARED_READ = 1, + SHARED_WRITE = 2, + EXCLUSIVE = 3, +} + +enum CompactionType { + MINOR = 1, + MAJOR = 2, +} + +enum GrantRevokeType { + GRANT = 1, + REVOKE = 2, +} + +enum DataOperationType { + SELECT = 1, + INSERT = 2 + UPDATE = 3, + DELETE = 4, + UNSET = 5,//this is the default to distinguish from NULL from old clients + NO_TXN = 6,//drop table, insert overwrite, etc - something non-transactional +} + +// Types of events the client can request that the metastore fire. For now just support DML operations, as the metastore knows +// about DDL operations and there's no reason for the client to request such an event. +enum EventRequestType { + INSERT = 1, + UPDATE = 2, + DELETE = 3, +} + +struct HiveObjectRef{ + 1: HiveObjectType objectType, + 2: string dbName, + 3: string objectName, + 4: list partValues, + 5: string columnName, +} + +struct PrivilegeGrantInfo { + 1: string privilege, + 2: i32 createTime, + 3: string grantor, + 4: PrincipalType grantorType, + 5: bool grantOption, +} + +struct HiveObjectPrivilege { + 1: HiveObjectRef hiveObject, + 2: string principalName, + 3: PrincipalType principalType, + 4: PrivilegeGrantInfo grantInfo, +} + +struct PrivilegeBag { + 1: list privileges, +} + +struct PrincipalPrivilegeSet { + 1: map> userPrivileges, // user name -> privilege grant info + 2: map> groupPrivileges, // group name -> privilege grant info + 3: map> rolePrivileges, //role name -> privilege grant info +} + +struct GrantRevokePrivilegeRequest { + 1: GrantRevokeType requestType; + 2: PrivilegeBag privileges; + 3: optional bool revokeGrantOption; // Only for revoke request +} + +struct GrantRevokePrivilegeResponse { + 1: optional bool success; +} + +struct Role { + 1: string roleName, + 2: i32 createTime, + 3: string ownerName, +} + +// Representation of a grant for a principal to a role +struct RolePrincipalGrant { + 1: string roleName, + 2: string principalName, + 3: PrincipalType principalType, + 4: bool grantOption, + 5: i32 grantTime, + 6: string grantorName, + 7: PrincipalType grantorPrincipalType +} + +struct GetRoleGrantsForPrincipalRequest { + 1: required string principal_name, + 2: required PrincipalType principal_type +} + +struct GetRoleGrantsForPrincipalResponse { + 1: required list principalGrants; +} + +struct GetPrincipalsInRoleRequest { + 1: required string roleName; +} + +struct GetPrincipalsInRoleResponse { + 1: required list principalGrants; +} + +struct GrantRevokeRoleRequest { + 1: GrantRevokeType requestType; + 2: string roleName; + 3: string principalName; + 4: PrincipalType principalType; + 5: optional string grantor; // Needed for grant + 6: optional PrincipalType grantorType; // Needed for grant + 7: optional bool grantOption; +} + +struct GrantRevokeRoleResponse { + 1: optional bool success; +} + +// namespace for tables +struct Database { + 1: string name, + 2: string description, + 3: string locationUri, + 4: map parameters, // properties associated with the database + 5: optional PrincipalPrivilegeSet privileges, + 6: optional string ownerName, + 7: optional PrincipalType ownerType +} + +// This object holds the information needed by SerDes +struct SerDeInfo { + 1: string name, // name of the serde, table name by default + 2: string serializationLib, // usually the class that implements the extractor & loader + 3: map parameters // initialization parameters +} + +// sort order of a column (column name along with asc(1)/desc(0)) +struct Order { + 1: string col, // sort column name + 2: i32 order // asc(1) or desc(0) +} + +// this object holds all the information about skewed table +struct SkewedInfo { + 1: list skewedColNames, // skewed column names + 2: list> skewedColValues, //skewed values + 3: map, string> skewedColValueLocationMaps, //skewed value to location mappings +} + +// this object holds all the information about physical storage of the data belonging to a table +struct StorageDescriptor { + 1: list cols, // required (refer to types defined above) + 2: string location, // defaults to //tablename + 3: string inputFormat, // SequenceFileInputFormat (binary) or TextInputFormat` or custom format + 4: string outputFormat, // SequenceFileOutputFormat (binary) or IgnoreKeyTextOutputFormat or custom format + 5: bool compressed, // compressed or not + 6: i32 numBuckets, // this must be specified if there are any dimension columns + 7: SerDeInfo serdeInfo, // serialization and deserialization information + 8: list bucketCols, // reducer grouping columns and clustering columns and bucketing columns` + 9: list sortCols, // sort order of the data in each bucket + 10: map parameters, // any user supplied key value hash + 11: optional SkewedInfo skewedInfo, // skewed information + 12: optional bool storedAsSubDirectories // stored as subdirectories or not +} + +// table information +struct Table { + 1: string tableName, // name of the table + 2: string dbName, // database name ('default') + 3: string owner, // owner of this table + 4: i32 createTime, // creation time of the table + 5: i32 lastAccessTime, // last access time (usually this will be filled from HDFS and shouldn't be relied on) + 6: i32 retention, // retention time + 7: StorageDescriptor sd, // storage descriptor of the table + 8: list partitionKeys, // partition keys of the table. only primitive types are supported + 9: map parameters, // to store comments or any other user level parameters + 10: string viewOriginalText, // original view text, null for non-view + 11: string viewExpandedText, // expanded view text, null for non-view + 12: string tableType, // table type enum, e.g. EXTERNAL_TABLE + 13: optional PrincipalPrivilegeSet privileges, + 14: optional bool temporary=false, + 15: optional bool rewriteEnabled // rewrite enabled or not +} + +struct Partition { + 1: list values // string value is converted to appropriate partition key type + 2: string dbName, + 3: string tableName, + 4: i32 createTime, + 5: i32 lastAccessTime, + 6: StorageDescriptor sd, + 7: map parameters, + 8: optional PrincipalPrivilegeSet privileges +} + +struct PartitionWithoutSD { + 1: list values // string value is converted to appropriate partition key type + 2: i32 createTime, + 3: i32 lastAccessTime, + 4: string relativePath, + 5: map parameters, + 6: optional PrincipalPrivilegeSet privileges +} + +struct PartitionSpecWithSharedSD { + 1: list partitions, + 2: StorageDescriptor sd, +} + +struct PartitionListComposingSpec { + 1: list partitions +} + +struct PartitionSpec { + 1: string dbName, + 2: string tableName, + 3: string rootPath, + 4: optional PartitionSpecWithSharedSD sharedSDPartitionSpec, + 5: optional PartitionListComposingSpec partitionList +} + +struct Index { + 1: string indexName, // unique with in the whole database namespace + 2: string indexHandlerClass, // reserved + 3: string dbName, + 4: string origTableName, + 5: i32 createTime, + 6: i32 lastAccessTime, + 7: string indexTableName, + 8: StorageDescriptor sd, + 9: map parameters, + 10: bool deferredRebuild +} + +// column statistics +struct BooleanColumnStatsData { +1: required i64 numTrues, +2: required i64 numFalses, +3: required i64 numNulls, +4: optional string bitVectors +} + +struct DoubleColumnStatsData { +1: optional double lowValue, +2: optional double highValue, +3: required i64 numNulls, +4: required i64 numDVs, +5: optional string bitVectors +} + +struct LongColumnStatsData { +1: optional i64 lowValue, +2: optional i64 highValue, +3: required i64 numNulls, +4: required i64 numDVs, +5: optional string bitVectors +} + +struct StringColumnStatsData { +1: required i64 maxColLen, +2: required double avgColLen, +3: required i64 numNulls, +4: required i64 numDVs, +5: optional string bitVectors +} + +struct BinaryColumnStatsData { +1: required i64 maxColLen, +2: required double avgColLen, +3: required i64 numNulls, +4: optional string bitVectors +} + + +struct Decimal { +1: required binary unscaled, +3: required i16 scale +} + +struct DecimalColumnStatsData { +1: optional Decimal lowValue, +2: optional Decimal highValue, +3: required i64 numNulls, +4: required i64 numDVs, +5: optional string bitVectors +} + +struct Date { +1: required i64 daysSinceEpoch +} + +struct DateColumnStatsData { +1: optional Date lowValue, +2: optional Date highValue, +3: required i64 numNulls, +4: required i64 numDVs, +5: optional string bitVectors +} + +union ColumnStatisticsData { +1: BooleanColumnStatsData booleanStats, +2: LongColumnStatsData longStats, +3: DoubleColumnStatsData doubleStats, +4: StringColumnStatsData stringStats, +5: BinaryColumnStatsData binaryStats, +6: DecimalColumnStatsData decimalStats, +7: DateColumnStatsData dateStats +} + +struct ColumnStatisticsObj { +1: required string colName, +2: required string colType, +3: required ColumnStatisticsData statsData +} + +struct ColumnStatisticsDesc { +1: required bool isTblLevel, +2: required string dbName, +3: required string tableName, +4: optional string partName, +5: optional i64 lastAnalyzed +} + +struct ColumnStatistics { +1: required ColumnStatisticsDesc statsDesc, +2: required list statsObj; +} + +struct AggrStats { +1: required list colStats, +2: required i64 partsFound // number of partitions for which stats were found +} + +struct SetPartitionsStatsRequest { +1: required list colStats, +2: optional bool needMerge //stats need to be merged with the existing stats +} + +// schema of the table/query results etc. +struct Schema { + // column names, types, comments + 1: list fieldSchemas, // delimiters etc + 2: map properties +} + +// Key-value store to be used with selected +// Metastore APIs (create, alter methods). +// The client can pass environment properties / configs that can be +// accessed in hooks. +struct EnvironmentContext { + 1: map properties +} + +struct PrimaryKeysRequest { + 1: required string db_name, + 2: required string tbl_name +} + +struct PrimaryKeysResponse { + 1: required list primaryKeys +} + +struct ForeignKeysRequest { + 1: string parent_db_name, + 2: string parent_tbl_name, + 3: string foreign_db_name, + 4: string foreign_tbl_name +} + +struct ForeignKeysResponse { + 1: required list foreignKeys +} + +struct UniqueConstraintsRequest { + 1: required string db_name, + 2: required string tbl_name +} + +struct UniqueConstraintsResponse { + 1: required list uniqueConstraints +} + +struct NotNullConstraintsRequest { + 1: required string db_name, + 2: required string tbl_name +} + +struct NotNullConstraintsResponse { + 1: required list notNullConstraints +} + +struct DropConstraintRequest { + 1: required string dbname, + 2: required string tablename, + 3: required string constraintname +} + +struct AddPrimaryKeyRequest { + 1: required list primaryKeyCols +} + +struct AddForeignKeyRequest { + 1: required list foreignKeyCols +} + +struct AddUniqueConstraintRequest { + 1: required list uniqueConstraintCols +} + +struct AddNotNullConstraintRequest { + 1: required list notNullConstraintCols +} + +// Return type for get_partitions_by_expr +struct PartitionsByExprResult { + 1: required list partitions, + // Whether the results has any (currently, all) partitions which may or may not match + 2: required bool hasUnknownPartitions +} + +struct PartitionsByExprRequest { + 1: required string dbName, + 2: required string tblName, + 3: required binary expr, + 4: optional string defaultPartitionName, + 5: optional i16 maxParts=-1 +} + +struct TableStatsResult { + 1: required list tableStats +} + +struct PartitionsStatsResult { + 1: required map> partStats +} + +struct TableStatsRequest { + 1: required string dbName, + 2: required string tblName, + 3: required list colNames +} + +struct PartitionsStatsRequest { + 1: required string dbName, + 2: required string tblName, + 3: required list colNames, + 4: required list partNames +} + +// Return type for add_partitions_req +struct AddPartitionsResult { + 1: optional list partitions, +} + +// Request type for add_partitions_req +struct AddPartitionsRequest { + 1: required string dbName, + 2: required string tblName, + 3: required list parts, + 4: required bool ifNotExists, + 5: optional bool needResult=true +} + +// Return type for drop_partitions_req +struct DropPartitionsResult { + 1: optional list partitions, +} + +struct DropPartitionsExpr { + 1: required binary expr; + 2: optional i32 partArchiveLevel; +} + +union RequestPartsSpec { + 1: list names; + 2: list exprs; +} + +// Request type for drop_partitions_req +// TODO: we might want to add "bestEffort" flag; where a subset can fail +struct DropPartitionsRequest { + 1: required string dbName, + 2: required string tblName, + 3: required RequestPartsSpec parts, + 4: optional bool deleteData, + 5: optional bool ifExists=true, // currently verified on client + 6: optional bool ignoreProtection, + 7: optional EnvironmentContext environmentContext, + 8: optional bool needResult=true +} + +enum FunctionType { + JAVA = 1, +} + +enum ResourceType { + JAR = 1, + FILE = 2, + ARCHIVE = 3, +} + +struct ResourceUri { + 1: ResourceType resourceType, + 2: string uri, +} + +// User-defined function +struct Function { + 1: string functionName, + 2: string dbName, + 3: string className, + 4: string ownerName, + 5: PrincipalType ownerType, + 6: i32 createTime, + 7: FunctionType functionType, + 8: list resourceUris, +} + +// Structs for transaction and locks +struct TxnInfo { + 1: required i64 id, + 2: required TxnState state, + 3: required string user, // used in 'show transactions' to help admins find who has open transactions + 4: required string hostname, // used in 'show transactions' to help admins find who has open transactions + 5: optional string agentInfo = "Unknown", + 6: optional i32 heartbeatCount=0, + 7: optional string metaInfo, + 8: optional i64 startedTime, + 9: optional i64 lastHeartbeatTime, +} + +struct GetOpenTxnsInfoResponse { + 1: required i64 txn_high_water_mark, + 2: required list open_txns, +} + +struct GetOpenTxnsResponse { + 1: required i64 txn_high_water_mark, + 2: required list open_txns, // set changed to list since 3.0 + 3: optional i64 min_open_txn, //since 1.3,2.2 + 4: required binary abortedBits, // since 3.0 +} + +struct OpenTxnRequest { + 1: required i32 num_txns, + 2: required string user, + 3: required string hostname, + 4: optional string agentInfo = "Unknown", +} + +struct OpenTxnsResponse { + 1: required list txn_ids, +} + +struct AbortTxnRequest { + 1: required i64 txnid, +} + +struct AbortTxnsRequest { + 1: required list txn_ids, +} + +struct CommitTxnRequest { + 1: required i64 txnid, +} + +struct LockComponent { + 1: required LockType type, + 2: required LockLevel level, + 3: required string dbname, + 4: optional string tablename, + 5: optional string partitionname, + 6: optional DataOperationType operationType = DataOperationType.UNSET, + 7: optional bool isAcid = false, + 8: optional bool isDynamicPartitionWrite = false +} + +struct LockRequest { + 1: required list component, + 2: optional i64 txnid, + 3: required string user, // used in 'show locks' to help admins find who has open locks + 4: required string hostname, // used in 'show locks' to help admins find who has open locks + 5: optional string agentInfo = "Unknown", +} + +struct LockResponse { + 1: required i64 lockid, + 2: required LockState state, +} + +struct CheckLockRequest { + 1: required i64 lockid, + 2: optional i64 txnid, + 3: optional i64 elapsed_ms, +} + +struct UnlockRequest { + 1: required i64 lockid, +} + +struct ShowLocksRequest { + 1: optional string dbname, + 2: optional string tablename, + 3: optional string partname, + 4: optional bool isExtended=false, +} + +struct ShowLocksResponseElement { + 1: required i64 lockid, + 2: required string dbname, + 3: optional string tablename, + 4: optional string partname, + 5: required LockState state, + 6: required LockType type, + 7: optional i64 txnid, + 8: required i64 lastheartbeat, + 9: optional i64 acquiredat, + 10: required string user, + 11: required string hostname, + 12: optional i32 heartbeatCount = 0, + 13: optional string agentInfo, + 14: optional i64 blockedByExtId, + 15: optional i64 blockedByIntId, + 16: optional i64 lockIdInternal, +} + +struct ShowLocksResponse { + 1: list locks, +} + +struct HeartbeatRequest { + 1: optional i64 lockid, + 2: optional i64 txnid +} + +struct HeartbeatTxnRangeRequest { + 1: required i64 min, + 2: required i64 max +} + +struct HeartbeatTxnRangeResponse { + 1: required set aborted, + 2: required set nosuch +} + +struct CompactionRequest { + 1: required string dbname, + 2: required string tablename, + 3: optional string partitionname, + 4: required CompactionType type, + 5: optional string runas, + 6: optional map properties +} + +struct CompactionResponse { + 1: required i64 id, + 2: required string state, + 3: required bool accepted +} + +struct ShowCompactRequest { +} + +struct ShowCompactResponseElement { + 1: required string dbname, + 2: required string tablename, + 3: optional string partitionname, + 4: required CompactionType type, + 5: required string state, + 6: optional string workerid, + 7: optional i64 start, + 8: optional string runAs, + 9: optional i64 hightestTxnId, // Highest Txn ID handled by this compaction + 10: optional string metaInfo, + 11: optional i64 endTime, + 12: optional string hadoopJobId = "None", + 13: optional i64 id, +} + +struct ShowCompactResponse { + 1: required list compacts, +} + +struct AddDynamicPartitions { + 1: required i64 txnid, + 2: required string dbname, + 3: required string tablename, + 4: required list partitionnames, + 5: optional DataOperationType operationType = DataOperationType.UNSET +} + +struct NotificationEventRequest { + 1: required i64 lastEvent, + 2: optional i32 maxEvents, +} + +struct NotificationEvent { + 1: required i64 eventId, + 2: required i32 eventTime, + 3: required string eventType, + 4: optional string dbName, + 5: optional string tableName, + 6: required string message, + 7: optional string messageFormat, +} + +struct NotificationEventResponse { + 1: required list events, +} + +struct CurrentNotificationEventId { + 1: required i64 eventId, +} + +struct InsertEventRequestData { + 1: optional bool replace, + 2: required list filesAdded, + // Checksum of files (hex string of checksum byte payload) + 3: optional list filesAddedChecksum, +} + +union FireEventRequestData { + 1: InsertEventRequestData insertData +} + +struct FireEventRequest { + 1: required bool successful, + 2: required FireEventRequestData data + // dbname, tablename, and partition vals are included as optional in the top level event rather than placed in each type of + // subevent as I assume they'll be used across most event types. + 3: optional string dbName, + 4: optional string tableName, + 5: optional list partitionVals, +} + +struct FireEventResponse { + // NOP for now, this is just a place holder for future responses +} + +struct MetadataPpdResult { + 1: optional binary metadata, + 2: optional binary includeBitset +} + +// Return type for get_file_metadata_by_expr +struct GetFileMetadataByExprResult { + 1: required map metadata, + 2: required bool isSupported +} + +enum FileMetadataExprType { + ORC_SARG = 1 +} + + +// Request type for get_file_metadata_by_expr +struct GetFileMetadataByExprRequest { + 1: required list fileIds, + 2: required binary expr, + 3: optional bool doGetFooters, + 4: optional FileMetadataExprType type +} + +// Return type for get_file_metadata +struct GetFileMetadataResult { + 1: required map metadata, + 2: required bool isSupported +} + +// Request type for get_file_metadata +struct GetFileMetadataRequest { + 1: required list fileIds +} + +// Return type for put_file_metadata +struct PutFileMetadataResult { +} + +// Request type for put_file_metadata +struct PutFileMetadataRequest { + 1: required list fileIds, + 2: required list metadata, + 3: optional FileMetadataExprType type +} + +// Return type for clear_file_metadata +struct ClearFileMetadataResult { +} + +// Request type for clear_file_metadata +struct ClearFileMetadataRequest { + 1: required list fileIds +} + +// Return type for cache_file_metadata +struct CacheFileMetadataResult { + 1: required bool isSupported +} + +// Request type for cache_file_metadata +struct CacheFileMetadataRequest { + 1: required string dbName, + 2: required string tblName, + 3: optional string partName, + 4: optional bool isAllParts +} + +struct GetAllFunctionsResponse { + 1: optional list functions +} + +enum ClientCapability { + TEST_CAPABILITY = 1 +} + + +struct ClientCapabilities { + 1: required list values +} + +struct GetTableRequest { + 1: required string dbName, + 2: required string tblName, + 3: optional ClientCapabilities capabilities +} + +struct GetTableResult { + 1: required Table table +} + +struct GetTablesRequest { + 1: required string dbName, + 2: optional list tblNames, + 3: optional ClientCapabilities capabilities +} + +struct GetTablesResult { + 1: required list
tables +} + +// Request type for cm_recycle +struct CmRecycleRequest { + 1: required string dataPath, + 2: required bool purge +} + +// Response type for cm_recycle +struct CmRecycleResponse { +} + +struct TableMeta { + 1: required string dbName; + 2: required string tableName; + 3: required string tableType; + 4: optional string comments; +} + +exception MetaException { + 1: string message +} + +exception UnknownTableException { + 1: string message +} + +exception UnknownDBException { + 1: string message +} + +exception AlreadyExistsException { + 1: string message +} + +exception InvalidPartitionException { + 1: string message +} + +exception UnknownPartitionException { + 1: string message +} + +exception InvalidObjectException { + 1: string message +} + +exception NoSuchObjectException { + 1: string message +} + +exception IndexAlreadyExistsException { + 1: string message +} + +exception InvalidOperationException { + 1: string message +} + +exception ConfigValSecurityException { + 1: string message +} + +exception InvalidInputException { + 1: string message +} + +// Transaction and lock exceptions +exception NoSuchTxnException { + 1: string message +} + +exception TxnAbortedException { + 1: string message +} + +exception TxnOpenException { + 1: string message +} + +exception NoSuchLockException { + 1: string message +} + +/** +* This interface is live. +*/ +service ThriftHiveMetastore extends fb303.FacebookService +{ + string getMetaConf(1:string key) throws(1:MetaException o1) + void setMetaConf(1:string key, 2:string value) throws(1:MetaException o1) + + void create_database(1:Database database) throws(1:AlreadyExistsException o1, 2:InvalidObjectException o2, 3:MetaException o3) + Database get_database(1:string name) throws(1:NoSuchObjectException o1, 2:MetaException o2) + void drop_database(1:string name, 2:bool deleteData, 3:bool cascade) throws(1:NoSuchObjectException o1, 2:InvalidOperationException o2, 3:MetaException o3) + list get_databases(1:string pattern) throws(1:MetaException o1) + list get_all_databases() throws(1:MetaException o1) + void alter_database(1:string dbname, 2:Database db) throws(1:MetaException o1, 2:NoSuchObjectException o2) + + // returns the type with given name (make seperate calls for the dependent types if needed) + Type get_type(1:string name) throws(1:MetaException o1, 2:NoSuchObjectException o2) + bool create_type(1:Type type) throws(1:AlreadyExistsException o1, 2:InvalidObjectException o2, 3:MetaException o3) + bool drop_type(1:string type) throws(1:MetaException o1, 2:NoSuchObjectException o2) + map get_type_all(1:string name) + throws(1:MetaException o2) + + // Gets a list of FieldSchemas describing the columns of a particular table + list get_fields(1: string db_name, 2: string table_name) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3), + list get_fields_with_environment_context(1: string db_name, 2: string table_name, 3:EnvironmentContext environment_context) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3) + + // Gets a list of FieldSchemas describing both the columns and the partition keys of a particular table + list get_schema(1: string db_name, 2: string table_name) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3) + list get_schema_with_environment_context(1: string db_name, 2: string table_name, 3:EnvironmentContext environment_context) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3) + + // create a Hive table. Following fields must be set + // tableName + // database (only 'default' for now until Hive QL supports databases) + // owner (not needed, but good to have for tracking purposes) + // sd.cols (list of field schemas) + // sd.inputFormat (SequenceFileInputFormat (binary like falcon tables or u_full) or TextInputFormat) + // sd.outputFormat (SequenceFileInputFormat (binary) or TextInputFormat) + // sd.serdeInfo.serializationLib (SerDe class name eg org.apache.hadoop.hive.serde.simple_meta.MetadataTypedColumnsetSerDe + // * See notes on DDL_TIME + void create_table(1:Table tbl) throws(1:AlreadyExistsException o1, 2:InvalidObjectException o2, 3:MetaException o3, 4:NoSuchObjectException o4) + void create_table_with_environment_context(1:Table tbl, + 2:EnvironmentContext environment_context) + throws (1:AlreadyExistsException o1, + 2:InvalidObjectException o2, 3:MetaException o3, + 4:NoSuchObjectException o4) + void create_table_with_constraints(1:Table tbl, 2: list primaryKeys, 3: list foreignKeys, + 4: list uniqueConstraints, 5: list notNullConstraints) + throws (1:AlreadyExistsException o1, + 2:InvalidObjectException o2, 3:MetaException o3, + 4:NoSuchObjectException o4) + void drop_constraint(1:DropConstraintRequest req) + throws(1:NoSuchObjectException o1, 2:MetaException o3) + void add_primary_key(1:AddPrimaryKeyRequest req) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + void add_foreign_key(1:AddForeignKeyRequest req) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + void add_unique_constraint(1:AddUniqueConstraintRequest req) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + void add_not_null_constraint(1:AddNotNullConstraintRequest req) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + + // drops the table and all the partitions associated with it if the table has partitions + // delete data (including partitions) if deleteData is set to true + void drop_table(1:string dbname, 2:string name, 3:bool deleteData) + throws(1:NoSuchObjectException o1, 2:MetaException o3) + void drop_table_with_environment_context(1:string dbname, 2:string name, 3:bool deleteData, + 4:EnvironmentContext environment_context) + throws(1:NoSuchObjectException o1, 2:MetaException o3) + void truncate_table(1:string dbName, 2:string tableName, 3:list partNames) + throws(1:MetaException o1) + list get_tables(1: string db_name, 2: string pattern) throws (1: MetaException o1) + list get_tables_by_type(1: string db_name, 2: string pattern, 3: string tableType) throws (1: MetaException o1) + list get_table_meta(1: string db_patterns, 2: string tbl_patterns, 3: list tbl_types) + throws (1: MetaException o1) + list get_all_tables(1: string db_name) throws (1: MetaException o1) + + Table get_table(1:string dbname, 2:string tbl_name) + throws (1:MetaException o1, 2:NoSuchObjectException o2) + list
get_table_objects_by_name(1:string dbname, 2:list tbl_names) + GetTableResult get_table_req(1:GetTableRequest req) throws (1:MetaException o1, 2:NoSuchObjectException o2) + GetTablesResult get_table_objects_by_name_req(1:GetTablesRequest req) + throws (1:MetaException o1, 2:InvalidOperationException o2, 3:UnknownDBException o3) + + // Get a list of table names that match a filter. + // The filter operators are LIKE, <, <=, >, >=, =, <> + // + // In the filter statement, values interpreted as strings must be enclosed in quotes, + // while values interpreted as integers should not be. Strings and integers are the only + // supported value types. + // + // The currently supported key names in the filter are: + // Constants.HIVE_FILTER_FIELD_OWNER, which filters on the tables' owner's name + // and supports all filter operators + // Constants.HIVE_FILTER_FIELD_LAST_ACCESS, which filters on the last access times + // and supports all filter operators except LIKE + // Constants.HIVE_FILTER_FIELD_PARAMS, which filters on the tables' parameter keys and values + // and only supports the filter operators = and <>. + // Append the parameter key name to HIVE_FILTER_FIELD_PARAMS in the filter statement. + // For example, to filter on parameter keys called "retention", the key name in the filter + // statement should be Constants.HIVE_FILTER_FIELD_PARAMS + "retention" + // Also, = and <> only work for keys that exist + // in the tables. E.g., if you are looking for tables where key1 <> value, it will only + // look at tables that have a value for the parameter key1. + // Some example filter statements include: + // filter = Constants.HIVE_FILTER_FIELD_OWNER + " like \".*test.*\" and " + + // Constants.HIVE_FILTER_FIELD_LAST_ACCESS + " = 0"; + // filter = Constants.HIVE_FILTER_FIELD_PARAMS + "retention = \"30\" or " + + // Constants.HIVE_FILTER_FIELD_PARAMS + "retention = \"90\"" + // @param dbName + // The name of the database from which you will retrieve the table names + // @param filterType + // The type of filter + // @param filter + // The filter string + // @param max_tables + // The maximum number of tables returned + // @return A list of table names that match the desired filter + list get_table_names_by_filter(1:string dbname, 2:string filter, 3:i16 max_tables=-1) + throws (1:MetaException o1, 2:InvalidOperationException o2, 3:UnknownDBException o3) + + // alter table applies to only future partitions not for existing partitions + // * See notes on DDL_TIME + void alter_table(1:string dbname, 2:string tbl_name, 3:Table new_tbl) + throws (1:InvalidOperationException o1, 2:MetaException o2) + void alter_table_with_environment_context(1:string dbname, 2:string tbl_name, + 3:Table new_tbl, 4:EnvironmentContext environment_context) + throws (1:InvalidOperationException o1, 2:MetaException o2) + // alter table not only applies to future partitions but also cascade to existing partitions + void alter_table_with_cascade(1:string dbname, 2:string tbl_name, 3:Table new_tbl, 4:bool cascade) + throws (1:InvalidOperationException o1, 2:MetaException o2) + // the following applies to only tables that have partitions + // * See notes on DDL_TIME + Partition add_partition(1:Partition new_part) + throws(1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) + Partition add_partition_with_environment_context(1:Partition new_part, + 2:EnvironmentContext environment_context) + throws (1:InvalidObjectException o1, 2:AlreadyExistsException o2, + 3:MetaException o3) + i32 add_partitions(1:list new_parts) + throws(1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) + i32 add_partitions_pspec(1:list new_parts) + throws(1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) + Partition append_partition(1:string db_name, 2:string tbl_name, 3:list part_vals) + throws (1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) + AddPartitionsResult add_partitions_req(1:AddPartitionsRequest request) + throws(1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) + Partition append_partition_with_environment_context(1:string db_name, 2:string tbl_name, + 3:list part_vals, 4:EnvironmentContext environment_context) + throws (1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) + Partition append_partition_by_name(1:string db_name, 2:string tbl_name, 3:string part_name) + throws (1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) + Partition append_partition_by_name_with_environment_context(1:string db_name, 2:string tbl_name, + 3:string part_name, 4:EnvironmentContext environment_context) + throws (1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) + bool drop_partition(1:string db_name, 2:string tbl_name, 3:list part_vals, 4:bool deleteData) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + bool drop_partition_with_environment_context(1:string db_name, 2:string tbl_name, + 3:list part_vals, 4:bool deleteData, 5:EnvironmentContext environment_context) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + bool drop_partition_by_name(1:string db_name, 2:string tbl_name, 3:string part_name, 4:bool deleteData) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + bool drop_partition_by_name_with_environment_context(1:string db_name, 2:string tbl_name, + 3:string part_name, 4:bool deleteData, 5:EnvironmentContext environment_context) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + DropPartitionsResult drop_partitions_req(1: DropPartitionsRequest req) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + + Partition get_partition(1:string db_name, 2:string tbl_name, 3:list part_vals) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + Partition exchange_partition(1:map partitionSpecs, 2:string source_db, + 3:string source_table_name, 4:string dest_db, 5:string dest_table_name) + throws(1:MetaException o1, 2:NoSuchObjectException o2, 3:InvalidObjectException o3, + 4:InvalidInputException o4) + + list exchange_partitions(1:map partitionSpecs, 2:string source_db, + 3:string source_table_name, 4:string dest_db, 5:string dest_table_name) + throws(1:MetaException o1, 2:NoSuchObjectException o2, 3:InvalidObjectException o3, + 4:InvalidInputException o4) + + Partition get_partition_with_auth(1:string db_name, 2:string tbl_name, 3:list part_vals, + 4: string user_name, 5: list group_names) throws(1:MetaException o1, 2:NoSuchObjectException o2) + + Partition get_partition_by_name(1:string db_name 2:string tbl_name, 3:string part_name) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + + // returns all the partitions for this table in reverse chronological order. + // If max parts is given then it will return only that many. + list get_partitions(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + list get_partitions_with_auth(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1, + 4: string user_name, 5: list group_names) throws(1:NoSuchObjectException o1, 2:MetaException o2) + + list get_partitions_pspec(1:string db_name, 2:string tbl_name, 3:i32 max_parts=-1) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + + list get_partition_names(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1) + throws(1:MetaException o2) + + // get_partition*_ps methods allow filtering by a partial partition specification, + // as needed for dynamic partitions. The values that are not restricted should + // be empty strings. Nulls were considered (instead of "") but caused errors in + // generated Python code. The size of part_vals may be smaller than the + // number of partition columns - the unspecified values are considered the same + // as "". + list get_partitions_ps(1:string db_name 2:string tbl_name + 3:list part_vals, 4:i16 max_parts=-1) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + list get_partitions_ps_with_auth(1:string db_name, 2:string tbl_name, 3:list part_vals, 4:i16 max_parts=-1, + 5: string user_name, 6: list group_names) throws(1:NoSuchObjectException o1, 2:MetaException o2) + + list get_partition_names_ps(1:string db_name, + 2:string tbl_name, 3:list part_vals, 4:i16 max_parts=-1) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + + // get the partitions matching the given partition filter + list get_partitions_by_filter(1:string db_name 2:string tbl_name + 3:string filter, 4:i16 max_parts=-1) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + + // List partitions as PartitionSpec instances. + list get_part_specs_by_filter(1:string db_name 2:string tbl_name + 3:string filter, 4:i32 max_parts=-1) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + + // get the partitions matching the given partition filter + // unlike get_partitions_by_filter, takes serialized hive expression, and with that can work + // with any filter (get_partitions_by_filter only works if the filter can be pushed down to JDOQL. + PartitionsByExprResult get_partitions_by_expr(1:PartitionsByExprRequest req) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + + // get the partitions matching the given partition filter + i32 get_num_partitions_by_filter(1:string db_name 2:string tbl_name 3:string filter) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + + // get partitions give a list of partition names + list get_partitions_by_names(1:string db_name 2:string tbl_name 3:list names) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + + // changes the partition to the new partition object. partition is identified from the part values + // in the new_part + // * See notes on DDL_TIME + void alter_partition(1:string db_name, 2:string tbl_name, 3:Partition new_part) + throws (1:InvalidOperationException o1, 2:MetaException o2) + + // change a list of partitions. All partitions are altered atomically and all + // prehooks are fired together followed by all post hooks + void alter_partitions(1:string db_name, 2:string tbl_name, 3:list new_parts) + throws (1:InvalidOperationException o1, 2:MetaException o2) + void alter_partitions_with_environment_context(1:string db_name, 2:string tbl_name, 3:list new_parts, 4:EnvironmentContext environment_context) throws (1:InvalidOperationException o1, 2:MetaException o2) + + void alter_partition_with_environment_context(1:string db_name, + 2:string tbl_name, 3:Partition new_part, + 4:EnvironmentContext environment_context) + throws (1:InvalidOperationException o1, 2:MetaException o2) + + // rename the old partition to the new partition object by changing old part values to the part values + // in the new_part. old partition is identified from part_vals. + // partition keys in new_part should be the same as those in old partition. + void rename_partition(1:string db_name, 2:string tbl_name, 3:list part_vals, 4:Partition new_part) + throws (1:InvalidOperationException o1, 2:MetaException o2) + + // returns whether or not the partition name is valid based on the value of the config + // hive.metastore.partition.name.whitelist.pattern + bool partition_name_has_valid_characters(1:list part_vals, 2:bool throw_exception) + throws(1: MetaException o1) + + // gets the value of the configuration key in the metastore server. returns + // defaultValue if the key does not exist. if the configuration key does not + // begin with "hive", "mapred", or "hdfs", a ConfigValSecurityException is + // thrown. + string get_config_value(1:string name, 2:string defaultValue) + throws(1:ConfigValSecurityException o1) + + // converts a partition name into a partition values array + list partition_name_to_vals(1: string part_name) + throws(1: MetaException o1) + // converts a partition name into a partition specification (a mapping from + // the partition cols to the values) + map partition_name_to_spec(1: string part_name) + throws(1: MetaException o1) + + void markPartitionForEvent(1:string db_name, 2:string tbl_name, 3:map part_vals, + 4:PartitionEventType eventType) throws (1: MetaException o1, 2: NoSuchObjectException o2, + 3: UnknownDBException o3, 4: UnknownTableException o4, 5: UnknownPartitionException o5, + 6: InvalidPartitionException o6) + bool isPartitionMarkedForEvent(1:string db_name, 2:string tbl_name, 3:map part_vals, + 4: PartitionEventType eventType) throws (1: MetaException o1, 2:NoSuchObjectException o2, + 3: UnknownDBException o3, 4: UnknownTableException o4, 5: UnknownPartitionException o5, + 6: InvalidPartitionException o6) + + //index + Index add_index(1:Index new_index, 2: Table index_table) + throws(1:InvalidObjectException o1, 2:AlreadyExistsException o2, 3:MetaException o3) + void alter_index(1:string dbname, 2:string base_tbl_name, 3:string idx_name, 4:Index new_idx) + throws (1:InvalidOperationException o1, 2:MetaException o2) + bool drop_index_by_name(1:string db_name, 2:string tbl_name, 3:string index_name, 4:bool deleteData) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + Index get_index_by_name(1:string db_name 2:string tbl_name, 3:string index_name) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + + list get_indexes(1:string db_name, 2:string tbl_name, 3:i16 max_indexes=-1) + throws(1:NoSuchObjectException o1, 2:MetaException o2) + list get_index_names(1:string db_name, 2:string tbl_name, 3:i16 max_indexes=-1) + throws(1:MetaException o2) + + //primary keys and foreign keys + PrimaryKeysResponse get_primary_keys(1:PrimaryKeysRequest request) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + ForeignKeysResponse get_foreign_keys(1:ForeignKeysRequest request) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + // other constraints + UniqueConstraintsResponse get_unique_constraints(1:UniqueConstraintsRequest request) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + NotNullConstraintsResponse get_not_null_constraints(1:NotNullConstraintsRequest request) + throws(1:MetaException o1, 2:NoSuchObjectException o2) + + // column statistics interfaces + + // update APIs persist the column statistics object(s) that are passed in. If statistics already + // exists for one or more columns, the existing statistics will be overwritten. The update APIs + // validate that the dbName, tableName, partName, colName[] passed in as part of the ColumnStatistics + // struct are valid, throws InvalidInputException/NoSuchObjectException if found to be invalid + bool update_table_column_statistics(1:ColumnStatistics stats_obj) throws (1:NoSuchObjectException o1, + 2:InvalidObjectException o2, 3:MetaException o3, 4:InvalidInputException o4) + bool update_partition_column_statistics(1:ColumnStatistics stats_obj) throws (1:NoSuchObjectException o1, + 2:InvalidObjectException o2, 3:MetaException o3, 4:InvalidInputException o4) + + // get APIs return the column statistics corresponding to db_name, tbl_name, [part_name], col_name if + // such statistics exists. If the required statistics doesn't exist, get APIs throw NoSuchObjectException + // For instance, if get_table_column_statistics is called on a partitioned table for which only + // partition level column stats exist, get_table_column_statistics will throw NoSuchObjectException + ColumnStatistics get_table_column_statistics(1:string db_name, 2:string tbl_name, 3:string col_name) throws + (1:NoSuchObjectException o1, 2:MetaException o2, 3:InvalidInputException o3, 4:InvalidObjectException o4) + ColumnStatistics get_partition_column_statistics(1:string db_name, 2:string tbl_name, 3:string part_name, + 4:string col_name) throws (1:NoSuchObjectException o1, 2:MetaException o2, + 3:InvalidInputException o3, 4:InvalidObjectException o4) + TableStatsResult get_table_statistics_req(1:TableStatsRequest request) throws + (1:NoSuchObjectException o1, 2:MetaException o2) + PartitionsStatsResult get_partitions_statistics_req(1:PartitionsStatsRequest request) throws + (1:NoSuchObjectException o1, 2:MetaException o2) + AggrStats get_aggr_stats_for(1:PartitionsStatsRequest request) throws + (1:NoSuchObjectException o1, 2:MetaException o2) + bool set_aggr_stats_for(1:SetPartitionsStatsRequest request) throws + (1:NoSuchObjectException o1, 2:InvalidObjectException o2, 3:MetaException o3, 4:InvalidInputException o4) + + + // delete APIs attempt to delete column statistics, if found, associated with a given db_name, tbl_name, [part_name] + // and col_name. If the delete API doesn't find the statistics record in the metastore, throws NoSuchObjectException + // Delete API validates the input and if the input is invalid throws InvalidInputException/InvalidObjectException. + bool delete_partition_column_statistics(1:string db_name, 2:string tbl_name, 3:string part_name, 4:string col_name) throws + (1:NoSuchObjectException o1, 2:MetaException o2, 3:InvalidObjectException o3, + 4:InvalidInputException o4) + bool delete_table_column_statistics(1:string db_name, 2:string tbl_name, 3:string col_name) throws + (1:NoSuchObjectException o1, 2:MetaException o2, 3:InvalidObjectException o3, + 4:InvalidInputException o4) + + // + // user-defined functions + // + + void create_function(1:Function func) + throws (1:AlreadyExistsException o1, + 2:InvalidObjectException o2, + 3:MetaException o3, + 4:NoSuchObjectException o4) + + void drop_function(1:string dbName, 2:string funcName) + throws (1:NoSuchObjectException o1, 2:MetaException o3) + + void alter_function(1:string dbName, 2:string funcName, 3:Function newFunc) + throws (1:InvalidOperationException o1, 2:MetaException o2) + + list get_functions(1:string dbName, 2:string pattern) + throws (1:MetaException o1) + Function get_function(1:string dbName, 2:string funcName) + throws (1:MetaException o1, 2:NoSuchObjectException o2) + + GetAllFunctionsResponse get_all_functions() throws (1:MetaException o1) + + //authorization privileges + + bool create_role(1:Role role) throws(1:MetaException o1) + bool drop_role(1:string role_name) throws(1:MetaException o1) + list get_role_names() throws(1:MetaException o1) + // Deprecated, use grant_revoke_role() + bool grant_role(1:string role_name, 2:string principal_name, 3:PrincipalType principal_type, + 4:string grantor, 5:PrincipalType grantorType, 6:bool grant_option) throws(1:MetaException o1) + // Deprecated, use grant_revoke_role() + bool revoke_role(1:string role_name, 2:string principal_name, 3:PrincipalType principal_type) + throws(1:MetaException o1) + list list_roles(1:string principal_name, 2:PrincipalType principal_type) throws(1:MetaException o1) + GrantRevokeRoleResponse grant_revoke_role(1:GrantRevokeRoleRequest request) throws(1:MetaException o1) + + // get all role-grants for users/roles that have been granted the given role + // Note that in the returned list of RolePrincipalGrants, the roleName is + // redundant as it would match the role_name argument of this function + GetPrincipalsInRoleResponse get_principals_in_role(1: GetPrincipalsInRoleRequest request) throws(1:MetaException o1) + + // get grant information of all roles granted to the given principal + // Note that in the returned list of RolePrincipalGrants, the principal name,type is + // redundant as it would match the principal name,type arguments of this function + GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(1: GetRoleGrantsForPrincipalRequest request) throws(1:MetaException o1) + + PrincipalPrivilegeSet get_privilege_set(1:HiveObjectRef hiveObject, 2:string user_name, + 3: list group_names) throws(1:MetaException o1) + list list_privileges(1:string principal_name, 2:PrincipalType principal_type, + 3: HiveObjectRef hiveObject) throws(1:MetaException o1) + + // Deprecated, use grant_revoke_privileges() + bool grant_privileges(1:PrivilegeBag privileges) throws(1:MetaException o1) + // Deprecated, use grant_revoke_privileges() + bool revoke_privileges(1:PrivilegeBag privileges) throws(1:MetaException o1) + GrantRevokePrivilegeResponse grant_revoke_privileges(1:GrantRevokePrivilegeRequest request) throws(1:MetaException o1); + + // this is used by metastore client to send UGI information to metastore server immediately + // after setting up a connection. + list set_ugi(1:string user_name, 2:list group_names) throws (1:MetaException o1) + + //Authentication (delegation token) interfaces + + // get metastore server delegation token for use from the map/reduce tasks to authenticate + // to metastore server + string get_delegation_token(1:string token_owner, 2:string renewer_kerberos_principal_name) + throws (1:MetaException o1) + + // method to renew delegation token obtained from metastore server + i64 renew_delegation_token(1:string token_str_form) throws (1:MetaException o1) + + // method to cancel delegation token obtained from metastore server + void cancel_delegation_token(1:string token_str_form) throws (1:MetaException o1) + + // add a delegation token + bool add_token(1:string token_identifier, 2:string delegation_token) + + // remove a delegation token + bool remove_token(1:string token_identifier) + + // get a delegation token by identifier + string get_token(1:string token_identifier) + + // get all delegation token identifiers + list get_all_token_identifiers() + + // add master key + i32 add_master_key(1:string key) throws (1:MetaException o1) + + // update master key + void update_master_key(1:i32 seq_number, 2:string key) throws (1:NoSuchObjectException o1, 2:MetaException o2) + + // remove master key + bool remove_master_key(1:i32 key_seq) + + // get master keys + list get_master_keys() + + // Transaction and lock management calls + // Get just list of open transactions + GetOpenTxnsResponse get_open_txns() + // Get list of open transactions with state (open, aborted) + GetOpenTxnsInfoResponse get_open_txns_info() + OpenTxnsResponse open_txns(1:OpenTxnRequest rqst) + void abort_txn(1:AbortTxnRequest rqst) throws (1:NoSuchTxnException o1) + void abort_txns(1:AbortTxnsRequest rqst) throws (1:NoSuchTxnException o1) + void commit_txn(1:CommitTxnRequest rqst) throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2) + LockResponse lock(1:LockRequest rqst) throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2) + LockResponse check_lock(1:CheckLockRequest rqst) + throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2, 3:NoSuchLockException o3) + void unlock(1:UnlockRequest rqst) throws (1:NoSuchLockException o1, 2:TxnOpenException o2) + ShowLocksResponse show_locks(1:ShowLocksRequest rqst) + void heartbeat(1:HeartbeatRequest ids) throws (1:NoSuchLockException o1, 2:NoSuchTxnException o2, 3:TxnAbortedException o3) + HeartbeatTxnRangeResponse heartbeat_txn_range(1:HeartbeatTxnRangeRequest txns) + void compact(1:CompactionRequest rqst) + CompactionResponse compact2(1:CompactionRequest rqst) + ShowCompactResponse show_compact(1:ShowCompactRequest rqst) + void add_dynamic_partitions(1:AddDynamicPartitions rqst) throws (1:NoSuchTxnException o1, 2:TxnAbortedException o2) + + // Notification logging calls + NotificationEventResponse get_next_notification(1:NotificationEventRequest rqst) + CurrentNotificationEventId get_current_notificationEventId() + FireEventResponse fire_listener_event(1:FireEventRequest rqst) + void flushCache() + + // Repl Change Management api + CmRecycleResponse cm_recycle(1:CmRecycleRequest request) throws(1:MetaException o1) + + GetFileMetadataByExprResult get_file_metadata_by_expr(1:GetFileMetadataByExprRequest req) + GetFileMetadataResult get_file_metadata(1:GetFileMetadataRequest req) + PutFileMetadataResult put_file_metadata(1:PutFileMetadataRequest req) + ClearFileMetadataResult clear_file_metadata(1:ClearFileMetadataRequest req) + CacheFileMetadataResult cache_file_metadata(1:CacheFileMetadataRequest req) + + // Metastore DB properties + string get_metastore_db_uuid() throws (1:MetaException o1) +} + +// * Note about the DDL_TIME: When creating or altering a table or a partition, +// if the DDL_TIME is not set, the current time will be used. + +// For storing info about archived partitions in parameters + +// Whether the partition is archived +const string IS_ARCHIVED = "is_archived", +// The original location of the partition, before archiving. After archiving, +// this directory will contain the archive. When the partition +// is dropped, this directory will be deleted +const string ORIGINAL_LOCATION = "original_location", + +// Whether or not the table is considered immutable - immutable tables can only be +// overwritten or created if unpartitioned, or if partitioned, partitions inside them +// can only be overwritten or created. Immutability supports write-once and replace +// semantics, but not append. +const string IS_IMMUTABLE = "immutable", + +// these should be needed only for backward compatibility with filestore +const string META_TABLE_COLUMNS = "columns", +const string META_TABLE_COLUMN_TYPES = "columns.types", +const string BUCKET_FIELD_NAME = "bucket_field_name", +const string BUCKET_COUNT = "bucket_count", +const string FIELD_TO_DIMENSION = "field_to_dimension", +const string META_TABLE_NAME = "name", +const string META_TABLE_DB = "db", +const string META_TABLE_LOCATION = "location", +const string META_TABLE_SERDE = "serde", +const string META_TABLE_PARTITION_COLUMNS = "partition_columns", +const string META_TABLE_PARTITION_COLUMN_TYPES = "partition_columns.types", +const string FILE_INPUT_FORMAT = "file.inputformat", +const string FILE_OUTPUT_FORMAT = "file.outputformat", +const string META_TABLE_STORAGE = "storage_handler", +const string TABLE_IS_TRANSACTIONAL = "transactional", +const string TABLE_NO_AUTO_COMPACT = "no_auto_compaction", +const string TABLE_TRANSACTIONAL_PROPERTIES = "transactional_properties", + +